Commit graph

52 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
823c227c41 restores gui
Signed-off-by: Snider <snider@lt.hn>
2025-11-02 18:04:58 +00:00
dependabot[bot]
dc6375f552 Bump the npm_and_yarn group across 3 directories with 1 update (#21)
Bumps the npm_and_yarn group with 1 update in the /cmd/core-gui/public directory: [esbuild](https://github.com/evanw/esbuild).
Bumps the npm_and_yarn group with 1 update in the /cmd/examples/core-static-di/public directory: [esbuild](https://github.com/evanw/esbuild).
Bumps the npm_and_yarn group with 1 update in the /cmd/examples/core-task-change/public directory: [esbuild](https://github.com/evanw/esbuild).


Updates `esbuild` from 0.21.5 to 0.25.12
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.12)

Updates `esbuild` from 0.21.5 to 0.25.12
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.12)

Updates `esbuild` from 0.21.5 to 0.25.12
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG-2024.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.25.12)

---
updated-dependencies:
- dependency-name: esbuild
  dependency-version: 0.25.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: esbuild
  dependency-version: 0.25.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: esbuild
  dependency-version: 0.25.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 16:26:34 +00:00
dependabot[bot]
75e31dfdcf Bump the go_modules group across 1 directory with 2 updates (#20)
Bumps the go_modules group with 1 update in the /cmd/core directory: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.25.0 to 0.38.0
- [Commits](https://github.com/golang/net/compare/v0.25.0...v0.38.0)

Updates `github.com/cloudflare/circl` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.38.0
  dependency-type: direct:production
  dependency-group: go_modules
- dependency-name: github.com/cloudflare/circl
  dependency-version: 1.6.1
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-02 16:25:40 +00:00
Snider
d5f7764329 Refactor library improvements (#18)
* refactor: Rearchitect library to use runtime and pkg modules

This commit introduces a major architectural refactoring to simplify the library's structure and improve its maintainability.

Key changes include:

- **Simplified Project Structure:** All top-level facade packages (config, crypt, display, etc.) and the root `core.go` have been removed. All library code now resides directly under the `pkg/` directory.

- **Unified Runtime:** A new `pkg/runtime` module with a `New()` constructor has been introduced. This function initializes and wires together all core services, providing a single, convenient entry point for applications.

- **Updated Entry Points:** The `cmd/core-gui` application and all examples have been updated to use the new `runtime.New()` initialization.

- **Internal Packages:** The `config` and `crypt` packages have been refactored to use an `internal` subdirectory for their implementation. This hides private details and exposes a clean, stable public API.

- **Standardized Error Handling:** A new error handling package has been added at `pkg/e`. The `workspace` and `crypt` services have been updated to use this new standard.

- **Improved Feature Flagging:** A `IsFeatureEnabled` method was added to the `config` service for more robust and centralized feature flag checks.

- **CI and Dependencies:**
  - A GitHub Actions workflow has been added for continuous integration.
  - All Go dependencies have been updated to their latest versions.

- **Documentation:** All documentation has been updated to reflect the new, simplified architecture, and obsolete files have been removed.

* refactor: Rearchitect library to use runtime and pkg modules

This commit introduces a major architectural refactoring to simplify the library's structure and improve its maintainability.

Key changes include:

- **Simplified Project Structure:** All top-level facade packages (config, crypt, display, etc.) and the root `core.go` have been removed. All library code now resides directly under the `pkg/` directory.

- **Unified Runtime:** A new `pkg/runtime` module with a `New()` constructor has been introduced. This function initializes and wires together all core services, providing a single, convenient entry point for applications. The runtime now accepts the Wails application instance, ensuring proper integration with the GUI.

- **Updated Entry Points:** The `cmd/core-gui` application and all examples have been updated to use the new `runtime.New()` constructor and correctly register the runtime as a Wails service.

- **Internal Packages:** The `config` and `crypt` packages have been refactored to use an `internal` subdirectory for their implementation. This hides private details and exposes a clean, stable public API.

- **Standardized Error Handling:** A new error handling package has been added at `pkg/e`. The `workspace` and `crypt` services have been updated to use this new standard.

- **Improved Feature Flagging:** A `IsFeatureEnabled` method was added to the `config` service for more robust and centralized feature flag checks.

- **CI and Dependencies:**
  - A GitHub Actions workflow has been added for continuous integration.
  - All Go dependencies have been updated to their latest versions.

- **Documentation:** All documentation has been updated to reflect the new, simplified architecture, and obsolete files have been removed.

* Feature tdd contract testing (#19)

* feat: Implement TDD contract testing for public API

This commit introduces a Test-Driven Development (TDD) workflow to enforce the public API contract. A new `tdd/` directory has been added to house these tests, which are intended to be the starting point for any new features or bug fixes that affect the public interface.

The "Good, Bad, Ugly" testing methodology has been adopted for these tests:
- `_Good` tests verify the "happy path" with valid inputs.
- `_Bad` tests verify predictable errors with invalid inputs.
- `_Ugly` tests verify edge cases and unexpected inputs to prevent panics.

TDD contract tests have been implemented for the `core` and `config` packages, and the `core.New` function has been hardened to prevent panics from `nil` options.

The `README.md` has been updated to document this new workflow.

* feat: Add TDD contract tests for all services

This commit expands the TDD contract testing framework to cover all services in the application. "Good, Bad, Ugly" tests have been added for the `help`, `i18n`, and `workspace` services.

To facilitate testing, the following refactors were made:
- `help`: Added a `SetDisplay` method to allow for mock injection. Hardened `Show` and `ShowAt` to prevent panics.
- `i18n`: Added a `SetBundle` method to allow for loading test-specific localization files.
- `workspace`: Made the `Config` field public and added a `SetMedium` method to allow for mock injection.

The TDD tests for the `crypt` service have been skipped due to issues with PGP key generation in the test environment.

* CLI code-docgen function (#16)

* Refactor CLI structure: move commands to 'dev' package, add docstring generation command, and update Taskfile for new tasks

Signed-off-by: Snider <snider@lt.hn>

* Add CodeRabbit PR review badge to README

Signed-off-by: Snider <snider@lt.hn>

---------

Signed-off-by: Snider <snider@lt.hn>

---------

Signed-off-by: Snider <snider@lt.hn>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>

* Update pkg/runtime/runtime.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: Rearchitect library and add automated documentation

This commit introduces a major architectural refactoring of the Core library and adds a new, automated documentation system.

**Architectural Changes:**

*   **Unified Runtime:** A new `pkg/runtime` module provides a single `runtime.New()` constructor that initializes and manages all core services. This simplifies application startup and improves maintainability.
*   **Wails Integration:** The `Runtime` is now correctly integrated with the Wails application lifecycle, accepting the `*application.App` instance and being registered as a Wails service.
*   **Simplified Project Structure:** All top-level facade packages have been removed, and library code is now consolidated under the `pkg/` directory.
*   **Internal Packages:** The `config` and `crypt` services now use an `internal` package to enforce a clean separation between public API and implementation details.
*   **Standardized Error Handling:** The `pkg/e` package has been introduced and integrated into the `workspace` and `crypt` services for consistent error handling.
*   **Graceful Shutdown:** The shutdown process has been fixed to ensure shutdown signals are correctly propagated to all services.

**Documentation:**

*   **Automated Doc Generation:** A new `docgen` command has been added to `cmd/core` to automatically generate Markdown documentation from the service source code.
*   **MkDocs Site:** A new MkDocs Material documentation site has been configured in the `/docs` directory.
*   **Deployment Workflow:** A new GitHub Actions workflow (`.github/workflows/docs.yml`) automatically builds and deploys the documentation site to GitHub Pages.

**Quality Improvements:**

*   **Hermetic Tests:** The config service tests have been updated to be fully hermetic, running in a temporary environment to avoid side effects.
*   **Panic Fix:** A panic in the config service's `Set` method has been fixed, and "Good, Bad, Ugly" tests have been added to verify the fix.
*   **CI/CD:** The CI workflow has been updated to use the latest GitHub Actions.
*   **Code Quality:** Numerous smaller fixes and improvements have been made based on CI feedback.

---------

Signed-off-by: Snider <snider@lt.hn>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-11-02 16:17:25 +00:00
Snider
35024677c2 (#10) GitHub Actions workflow and refactor build and test infrastructure 2025-10-30 16:23:00 +00:00
Snider
2af6c4ad3e Refactor PGP module with helper functions and error handling title (#8) 2025-10-30 14:18:37 +00:00
Snider
20ebafbcc1 Refactor services and tests: update Config, Workspace, Display, and cryptography modules; add test-gen and PWA build support; improve workspace test utilities and mock implementations; and enhance file handling logic.
Signed-off-by: Snider <snider@lt.hn>
2025-10-28 21:42:29 +00:00
Snider
526716a785 Fix import paths in index.md for consistency and clarity
Signed-off-by: Snider <snider@lt.hn>
2025-10-28 12:07:27 +00:00
Snider
89721834ee cmd: core dev api sync - will update the root level go files to reflect the public API's of Core.*
Signed-off-by: Snider <snider@lt.hn>
2025-10-28 12:06:05 +00:00
Snider
5f3e4235aa Rename files and directories for improved structure and accessibility
Signed-off-by: Snider <snider@lt.hn>
2025-10-28 11:10:57 +00:00
Snider
536ce7b6cd Refactor project structure and add core modules for configuration, cryptography, display, and workspace management 2025-10-28 07:02:21 +00:00
Snider
0a3f067971 Fix typo in lipgloss method call: NewNewStyle -> NewStyle 2025-10-27 06:03:42 +00:00
Snider
90009eccd5 Add pre-commit task, CLI enhancements, and ATS updates
- Added `pre-commit` task in Makefile.
- Enhanced CLI with banner display and stricter file selection validation.
- Expanded App Transport Security settings and updated permissions in `Info.dev.plist`.
2025-10-27 05:41:11 +00:00
Snider
3944874c9f Add an initial CLI framework for Core 2025-10-27 05:07:22 +00:00
Snider
d0c08a6353 git keep before a gitignore 2025-10-27 03:38:27 +00:00
Snider
11e65079ac Add documentation for Core modules: Config, Crypt, Display, Docs, IO, and Workspace (#3) 2025-10-27 03:14:50 +00:00
Snider
d077831825 Remove unused packages, configurations, and assets 2025-10-26 00:02:40 +01:00
Snider
95d5ad1bcd Refactor .gitignore for improved build directory management 2025-10-25 10:48:04 +01:00
Snider
0d63002f73 Adding documentation checkpoint. 2025-10-25 09:24:50 +01:00
Snider
5aefe41f8a Adding documentation checkpoint. 2025-10-25 09:24:44 +01:00
Snider
91d565d5a4 Rename demo.go for improved project structure 2025-10-24 16:10:10 +01:00
Snider
e9b1845a4f Enhance index.html with responsive design and service cards for improved UI 2025-10-24 16:10:10 +01:00
Snider
0b285aef85 Add system tray HTML interface and update tray functionality 2025-10-24 16:10:10 +01:00