Commit graph

442 commits

Author SHA1 Message Date
Snider
b4e1b1423d feat(container): add LinuxKit YAML templates with variable substitution
Templates:
- core-dev: Development environment (Go, Node, PHP, Docker-in-LinuxKit)
- server-php: Production FrankenPHP server with Caddy

Features:
- Variable substitution: ${VAR} (required), ${VAR:-default} (optional)
- Template listing, viewing, and variable extraction
- Run directly from template: core run --template <name>

CLI commands:
- core templates - list available templates
- core templates show <name> - display template
- core templates vars <name> - show variables
- core run --template <name> --var KEY=value

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:59:45 +00:00
Snider
3bd9f9bc3d feat(container): implement LinuxKit container runtime
Add pkg/container for running LinuxKit VMs:
- Manager interface with Run, Stop, List, Logs, Exec
- Hypervisor abstraction (QEMU, Hyperkit)
- Auto-detect available hypervisor and image format
- State persistence in ~/.core/containers.json
- Log management in ~/.core/logs/

CLI commands:
- core run <image> - run LinuxKit image (-d for detach)
- core ps - list containers (-a for all)
- core stop <id> - stop container
- core logs <id> - view logs (-f to follow)
- core exec <id> <cmd> - execute via SSH

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:50:32 +00:00
Snider
d25a86feca feat(release): add LinuxKit and Docker publishers
LinuxKit publisher:
- Build images via linuxkit CLI (iso, qcow2, vmdk, raw)
- Multi-platform support (linux/amd64, linux/arm64)
- Upload artifacts to GitHub release

Docker publisher:
- Multi-arch builds via docker buildx
- Push to registry (default: ghcr.io)
- Tag templates with {{.Version}} expansion
- Build args support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:42:04 +00:00
Snider
0f072ad353 feat(release): implement release system with GitHub publisher
Add pkg/release package for automated releases:
- Config loading from .core/release.yaml
- Version detection from git tags with auto-increment
- Changelog generation from conventional commits
- GitHub publisher using gh CLI

CLI commands:
- core release - build + publish to GitHub
- core release --dry-run - preview without publishing
- core release init - interactive config setup
- core release changelog - generate changelog
- core release version - show/set version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:33:11 +00:00
Snider
0237edeb0d feat(build): add Wails v3 builder for desktop app cross-compilation
Add WailsBuilder to pkg/build/builders:
- Auto-detect frontend package manager (bun > pnpm > yarn > npm)
- Install dependencies and build frontend automatically
- Cross-compile with wails3 CLI for all target platforms
- Platform-specific artifact detection (NSIS/DMG/binary)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:16:57 +00:00
Snider
4cbd85612b chore: remove accidentally committed binary
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:02:22 +00:00
Snider
9fe47a9bc6 feat(build): implement core build system with cross-compilation
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>
2026-01-28 17:59:02 +00:00
Snider
3d6f1a86f2 fix(dependencies): update golang.org/x modules to latest versions 2026-01-28 17:13:27 +00:00
Snider
bed0cf5b50 ci: add dev release workflow with multi-platform builds
- 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>
2026-01-28 15:46:16 +00:00
Snider
d1f63342cb fix(ci): track Wails build config files for lthn-desktop and core-demo
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>
2026-01-28 15:35:51 +00:00
Snider
41a0faba75 refactor: migrate module path from Snider/Core to host-uk/core
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>
2026-01-28 15:29:42 +00:00
Snider
1d3245a00c docs(core): update org name in examples (letheanvpn → LetheanNetwork)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:22:02 +00:00
Snider
4d72229e01 docs(core): update README with setup, doctor, search, install commands
- Add setup command documentation
- Add doctor command documentation
- Add search command with caching notes
- Add install command documentation
- Add cache directory structure section
- Update architecture diagram with new files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:20:27 +00:00
Snider
858c9b4462 fix(dependencies): update golang.org/x modules to latest versions 2026-01-28 15:19:39 +00:00
Snider
936e968ad0 feat(core): add workspace-local cache for GitHub API responses
- 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>
2026-01-28 15:19:03 +00:00
Snider
75c52e96e9 feat(core): add search and install commands with gh HTTPS clone
- 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>
2026-01-28 15:12:34 +00:00
Snider
548602b97d feat(core): add setup and doctor commands for workspace bootstrap
- 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>
2026-01-28 14:50:55 +00:00
Snider
61e446b5ff fix(core): add registry path output to commit/push/pull commands
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>
2026-01-28 14:23:11 +00:00
Snider
b332f91559 fix: update dependencies and add new mining bridge functionality 2026-01-27 21:12:48 +00:00
Snider
9360430226 docs(core): add README for multi-repo CLI
Document all commands, configuration, and usage examples.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:09:33 +00:00
Snider
f3d5fd6668 feat(core): add multi-repo management CLI commands
Add comprehensive CLI tooling for managing multiple repositories:

Commands added:
- core health: Quick health summary across all repos
- core work: Status + Claude-assisted commits + push (replaces push-all.sh)
- core commit: Claude-assisted commits only
- core push: Push repos with unpushed commits
- core pull: Pull repos that are behind
- core impact <repo>: Dependency impact analysis
- core issues: List GitHub issues across repos
- core reviews: List PRs with review status
- core ci: Check GitHub Actions status
- core docs list/sync: Documentation management

New packages:
- pkg/repos: Registry parser for repos.yaml with dependency graph
- pkg/git: Parallel git status operations

Features:
- Auto-discovers repos.yaml or scans current directory
- Sequential GitHub API calls to avoid rate limits
- Colored output with lipgloss
- SSH passphrase gate preserved for push operations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 21:08:51 +00:00
Snider
091c725036 feat(lthn-desktop): integrate Snider/Mining as native plugin
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>
2026-01-21 17:17:14 +00:00
Snider
ce044759c1 fix(runtime): update test factories to include all required services
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>
2026-01-21 17:01:25 +00:00
Snider
9ef000853e feat: add lthn-desktop as default GUI and restructure build targets
- 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>
2026-01-21 14:40:33 +00:00
Snider
a0a7ea20da feat: add autogenerated TypeScript definitions and service interfaces 2026-01-15 22:47:11 +00:00
Snider
0ad5c09ee6 feat: add initial project structure with configuration files and components 2026-01-15 22:46:50 +00:00
Snider
8acdb10eb6 Merge branch 'main' into dev
Bring in workspace management and IPC event handling features:
- Workspace management features
- IPC event handling
- Config test improvements
- Display improvements (menu, tray, tests)
- i18n test improvements
- Restored pkg/crypt, pkg/io, pkg/runtime, pkg/workspace

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:36:00 +00:00
Snider
4e02d5bc97 refactor: bring external packages home and restructure
- Imported packages from separate repos:
  - github.com/Snider/config -> pkg/config
  - github.com/Snider/display -> pkg/display
  - github.com/Snider/help -> pkg/help
  - github.com/Snider/i18n -> pkg/i18n
  - github.com/Snider/updater -> pkg/updater
- Moved core code from root to pkg/core
- Flattened nested package structures
- Updated all import paths to github.com/Snider/Core/pkg/*
- Added Display interface to Core
- Updated go.work for workspace modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:30:43 +00:00
Snider
6c366e5ef4 feat(workspace): implement workspace management features and IPC event handling 2026-01-13 23:33:01 +00:00
Snider
60c0d4f6c7 refactor: Update import path for Core and add CLAUDE.md documentation
Signed-off-by: Snider <snider@host.uk.com>
2026-01-04 20:16:52 +00:00
google-labs-jules[bot]
456a5d6864 docs: replace raw AST dumps with descriptive markdown (#34)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-25 00:09:03 +00:00
Snider
f0f6dafc1d removes interfaces for pkg's moved out of core.
Signed-off-by: Snider <snider@lt.hn>
2025-11-24 23:48:24 +00:00
google-labs-jules[bot]
e4a77cb1ae Implement lifecycle interfaces for Core services (#33)
* Implement Startable and Stoppable lifecycle interfaces

* Refactor tests: remove redundant method overrides in MockLifecycle

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-23 19:27:52 +00:00
google-labs-jules[bot]
44dd023c43 docs: Add comprehensive docstrings to Go files (#31)
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>
2025-11-14 14:33:58 +00:00
35400ee927 fix(runtime): Correct NewWithFactories service creation loop (#30)
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>
2025-11-13 21:23:56 +00:00
e9e71bb9a2 feat: Increase test coverage to over 88% (#29)
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>
2025-11-13 20:27:41 +00:00
003996b148 refactor: Flatten repository structure (#28)
- 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>
2025-11-13 18:47:46 +00:00
67a38acc7c refactor: Remove unused packages and flatten project structure (#27)
* 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>
2025-11-13 17:26:38 +00:00
614aed51ba refactor: Remove config, display, and i18n packages (#26)
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>
2025-11-13 16:45:48 +00:00
623f05ffc1 refactor: Remove pkg/help (#25)
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>
2025-11-13 14:28:41 +00:00
1c10c3dff3 Revise README with version notice and project info (#24)
Updated README to reflect current version location and project status.
2025-11-09 17:55:35 +00:00
Snider
09aa39c42c Update web manifest and robots.txt for project rebranding
Signed-off-by: Snider <snider@lt.hn>
2025-11-04 13:13:51 +00:00
Snider
e0cf77c64a Remove unused commands from the development tools
Signed-off-by: Snider <snider@lt.hn>
2025-11-04 13:12:37 +00:00
Snider
5d4e081143 Refactor core tests and improve mock implementations
Signed-off-by: Snider <snider@lt.hn>
2025-11-04 13:12:09 +00:00
Snider
d25bd5c5ca Add GoReleaser configuration and update Go version to 1.25
Signed-off-by: Snider <snider@lt.hn>
2025-11-04 12:00:58 +00:00
Snider
32f1d0ab5d Feature add tdd core tests (#22)
* 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>
2025-11-02 22:29:17 +00:00
Snider
08532b0a27 Add Codecov badge to README 2025-11-02 22:07:45 +00:00
Snider
b31670b6cf Add Codecov upload step in coverage workflow (#23)
Added step to upload coverage reports to Codecov.
2025-11-02 22:06:05 +00:00
Snider
823c227c41 restores gui
Signed-off-by: Snider <snider@lt.hn>
2025-11-02 18:04:58 +00:00
Snider
e07d08ea90 Add CNAME file for custom domain 2025-11-02 16:29:45 +00:00