Add pkg/build package replacing goreleaser with native build system:
- Project discovery (go.mod, wails.json, package.json, composer.json)
- Go cross-compilation with GOOS/GOARCH, CGO_ENABLED=0, ldflags
- Config loading from .core/build.yaml with sensible defaults
- Archive creation (tar.gz for linux/darwin, zip for windows)
- SHA256 checksum generation with CHECKSUMS.txt
CLI integration via `core build`:
- Auto-detect project type or specify with --type
- Cross-compile with --targets (e.g., linux/amd64,darwin/arm64)
- CI mode with --ci for JSON output
- Archive/checksum flags (--archive, --checksum)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add dev-release.yml workflow that builds CLI for linux/darwin/windows
(amd64/arm64) on every push to dev branch
- Update .goreleaser.yaml repo owner from Snider to host-uk
- Dev release is automatically updated with latest binaries
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add exceptions in .gitignore to track build configuration files
(Taskfile.yml, info.json, manifests, etc.) while keeping build
outputs (bin/) ignored.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move Go module from github.com/Snider/Core to github.com/host-uk/core
to match the new repository location under the host-uk organization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add pkg/cache for file-based caching with TTL
- Cache lives in workspace .core/cache/ (not home dir)
- Search command now caches repo lists for 1 hour
- Shows "Cache: host-uk (5s ago)" on cache hit
- Use --refresh to bypass cache
- Add .core/ to core-devops .gitignore
Structure:
.core/cache/github/<org>/repos.json
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `core search --org <org>` to list repos from GitHub
- Supports --pattern for glob filtering (e.g., 'core-*')
- Supports --type for type filtering (e.g., 'service', 'mod')
- Uses `gh repo list` for reliable API access
- Add `core install --repo <org/repo>` to clone individual repos
- Auto-detects target directory from repos.yaml
- Optional --add flag to add to registry
- Detects repo type from naming convention
- Update gitClone to use HTTPS URL with gh (no SSH key needed)
- Falls back to SSH if HTTPS fails
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add `core setup` to clone repos from registry into packages/
- Supports --dry-run, --only type filter
- Skips repos with clone: false
- Detects existing clones
- Add `core doctor` to check development environment
- Checks git, gh, php, composer, node
- Verifies SSH key exists
- Checks gh CLI authentication
- Shows workspace registry status
- Update Repo struct with Clone field for skip control
- Change Repo.Type from RepoType to string for flexibility
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Show which registry file is being used (or if scanning directory)
for better debugging when commands behave unexpectedly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Mining module as a native Go plugin for lthn-desktop:
- Add github.com/Snider/Mining dependency (v0.0.9)
- Create MiningBridge that wraps the Mining service for Wails
- Implement module.GinModule interface for API route registration
- Register mining module with the Core module registry
- Provide Wails-bound methods for frontend: ListMiners, GetMinerStats,
StartMiner, StopMiner, GetAvailableMiners, InstallMiner, UninstallMiner
- Update mining.itw3.json with native module configuration
The mining module provides:
- XMRig and TTMiner support
- Mining pool management
- Real-time hashrate monitoring
- Miner installation/uninstallation
- Mining profiles
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add docs, ide, and module factories to runtime tests to match the
expanded service requirements in newWithFactories.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Set lthn-desktop as the default gui build target (port 9247)
- Add core-demo GUI with Vite frontend (port 9245)
- Configure core-gui on port 9246 to avoid conflicts
- Update .gitignore for lthn-desktop and core-demo artifacts
- Include lthn-desktop Angular frontend with Monaco editor and Claude panel
- Add frontend.old directory preserving original lthn-desktop pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit adds comprehensive docstrings to all Go files in the root of the repository, achieving 100% documentation coverage. Examples have been included where appropriate to improve clarity.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Previously, the `NewWithFactories` function in `runtime_pkg.go` iterated over an empty slice, which prevented any services from being created from the provided factories. This commit fixes the loop to correctly iterate over the keys of the `factories` map, ensuring that services are properly instantiated and registered.
feat(testing): Add Good, Bad, and Ugly tests for NewWithFactories
To improve test quality and ensure the reliability of the `NewWithFactories` function, this commit replaces the existing basic test with a comprehensive test suite following the Good, Bad, Ugly methodology:
- `TestNewWithFactories_Good`: Verifies the happy path, ensuring a service is created and registered successfully.
- `TestNewWithFactories_Bad`: Checks that the function correctly returns an error when a service factory fails.
- `TestNewWithFactories_Ugly`: Confirms that the function panics when a `nil` factory is provided, as this represents an unrecoverable programmer error.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit increases the test coverage of the Core package to over 88%.
- Adds tests for `ServiceStartup` and `ServiceShutdown` methods in `core.go`.
- Adds tests for `App()`, `Config()`, and `Display()` methods in `core.go`.
- Adds a test for `IsEnabled` in `interfaces.go`.
- Adds tests for `NewServiceRuntime`, `Core()`, and `Config()` in `runtime.go`.
- Adds tests for `NewWithFactories`, `ServiceName`, `ServiceStartup`, and `ServiceShutdown` in `runtime_pkg.go`.
- Removes the unused `core/testutil` directory.
- Rewrites the `TestNewWithFactories_Good` test to correctly validate the original `NewWithFactories` function's behavior.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
- Move Go files from core, e, and runtime directories to the project root.
- Unify package declarations to a single 'core' package.
- Update go.work to exclude the cmd directory from the main build.
- Resolve naming conflicts and update import paths.
- Fix tests to work with the new structure.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* refactor: Remove unused packages and flatten project structure
Removes the following unused packages:
- pkg/crypt
- pkg/workspace
- pkg/io
Moves the remaining packages (core, e, runtime) to the top level of the project.
Updates all import paths to reflect the new structure.
* refactor: Remove unused packages and flatten project structure
Removes the following unused packages:
- pkg/crypt
- pkg/workspace
- pkg/io
Moves the remaining packages (core, e, runtime) to the top level of the project.
Updates all import paths to reflect the new structure.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Removes the following unused packages:
- pkg/config
- pkg/display
- pkg/i18n
Also removes the dependencies from pkg/runtime and cleans up the go.mod and go.sum files.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
The help package has been moved to its own repository at Snider/help. This commit removes the local copy of the package from this repository and updates the dependencies.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* feat: Add TDD tests for core package
Adds a new `tdd/` directory for TDD-style contract tests.
Implements a comprehensive test suite for the `pkg/core` package, covering:
- `New()`
- `WithService()`
- `WithName()`
- `WithWails()`
- `WithAssets()`
- `WithServiceLock()`
- `RegisterService()`
- `Service()`
- `ServiceFor()`
- `MustServiceFor()`
- `ACTION()`
- `RegisterAction()`
- `RegisterActions()`
To support testing, a public `Assets()` method was added to the `Core` struct.
* feat: Add TDD tests for e, io, runtime, and config packages
Adds comprehensive TDD tests to the `tdd/` directory for the following packages:
- `pkg/e`
- `pkg/io`
- `pkg/runtime`
- `pkg/config`
This significantly improves the test coverage of the project.
To support testing the `runtime` package, the `newWithFactories` function was exported as `NewWithFactories`.
The existing tests for the `config` package were moved from the `internal` package to the `tdd/` directory and adapted to use the public API.
* fix: Update tdd tests for config, core, and runtime
Updates the TDD tests for the `config`, `core`, and `runtime` packages to improve their coverage and correctness.
- In `tdd/config_test.go`, the `TestIsFeatureEnabled` test is updated to use `s.Set` to modify the `features` slice, ensuring that the persistence logic is exercised.
- In `tdd/core_test.go`, the `TestCore_WithAssets_Good` test is updated to use a real embedded filesystem with `//go:embed` to verify the contents of a test file.
- In `tdd/runtime_test.go`, the `TestNew_Good` test is converted to a table-driven test to cover the happy path, error cases, and a case with a non-nil `application.App`.
* fix: Fix build and improve test coverage
This commit fixes a build failure in the `pkg/runtime` tests and significantly improves the test coverage for several packages.
- Fixes a build failure in `pkg/runtime/runtime_test.go` by updating a call to an exported function.
- Moves TDD tests for `config` and `e` packages into their respective package directories to ensure accurate coverage reporting.
- Adds a new test suite for the `pkg/i18n` package, including a test helper to inject a mock i18n bundle.
- Moves and updates tests for the `pkg/crypt` package to use its public API.
- The coverage for `config` and `e` is now 100%.
- The coverage for `crypt` and `i18n` has been significantly improved.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>