Commit graph

56 commits

Author SHA1 Message Date
Snider
7970e984e4 feat(release): add SDK configuration to release.yaml
Add SDKConfig struct and related types (SDKPackageConfig, SDKDiffConfig,
SDKPublishConfig) to support SDK generation configuration within the
release.yaml configuration file.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:24:37 +00:00
Snider
fe72111236 feat(sdk): wire up Generate to use all generators
SDK.Generate() and SDK.GenerateLanguage() now use the
generator registry to generate SDKs for configured languages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:20:58 +00:00
Snider
5690fa63ae feat(sdk): add breaking change detection with oasdiff
Compares OpenAPI specs to detect breaking changes:
- Removed endpoints
- Changed required parameters
- Modified response schemas

Returns CI-friendly exit codes (0=ok, 1=breaking, 2=error).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:19:44 +00:00
Snider
b0c1c1eea5 feat(sdk): add PHP generator
Implements PHP SDK generator using Docker-only approach:
- Requires Docker with openapitools/openapi-generator-cli
- No native PHP generator tool; Docker is the only option

Includes tests following _Good convention for Available and Generate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:16:05 +00:00
Snider
3d241e2a41 feat(sdk): add Go generator
Implements Go SDK generator with two-level fallback:
1. Native oapi-codegen if installed (generates types and client)
2. Docker openapitools/openapi-generator-cli as fallback

Native generation also creates a minimal go.mod file.
Includes tests following _Good convention for Available and Generate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:16:01 +00:00
Snider
ea5b2fabaf feat(sdk): add Python generator
Implements Python SDK generator with two-level fallback:
1. Native openapi-python-client if installed
2. Docker openapitools/openapi-generator-cli as fallback

Includes tests following _Good convention for Available and Generate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:15:57 +00:00
Snider
3a7349ce5f feat(sdk): add TypeScript generator
Implements TypeScript SDK generator with three-level fallback:
1. Native openapi-typescript-codegen if installed globally
2. npx openapi-typescript-codegen if npx available
3. Docker openapitools/openapi-generator-cli as fallback

Includes tests following _Good convention for Available and Generate.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:15:47 +00:00
Snider
656ff728ff feat(sdk): add Generator interface and Registry
Defines the common interface for SDK generators with:
- Generate(), Available(), Install() methods
- Registry for managing multiple generators

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:13:11 +00:00
Snider
c2b1e5dc61 feat(sdk): add OpenAPI spec detection
Detects OpenAPI spec via:
1. Configured spec path
2. Common paths (api/openapi.yaml, openapi.yaml, etc.)
3. Laravel Scramble (stub for now)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:11:15 +00:00
Snider
64a5b0e605 feat(sdk): add SDK package structure with types
Initial pkg/sdk setup with Config types for OpenAPI SDK generation.
Includes language selection, diff config, and publish config.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:07:19 +00:00
Snider
02d0167d91 feat(linuxkit): add docker format support for immutable containers
LinuxKit can now output docker format tarballs that can be loaded with
`docker load`. This gives you immutable, reproducible LinuxKit images
in Docker-compatible format.

Supported formats now include:
- iso, iso-bios, iso-efi
- raw, raw-bios, raw-efi
- qcow2, qcow2-bios, qcow2-efi
- vmdk, vhd, gcp, aws
- docker (tarball for `docker load`)
- tar, kernel+initrd

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:33:26 +00:00
Snider
513a241c1b feat(release): add package manager publishers for S3.2
Add publishers for distributing CLI binaries to package managers:
- npm: binary wrapper pattern with postinstall download
- Homebrew: formula generation + tap auto-commit
- Scoop: JSON manifest + bucket auto-commit
- AUR: PKGBUILD + .SRCINFO + AUR push
- Chocolatey: NuSpec + install script + optional push

Each publisher supports:
- Dry-run mode for previewing changes
- Auto-commit to own repos (tap/bucket/AUR)
- Generate files for PRs to official repos via `official` config

Also includes Docker and LinuxKit build helpers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:32:04 +00:00
Snider
20f25ca062 feat(agentic): add AI collaboration features
Context gathering:
- BuildTaskContext for AI consumption
- GatherRelatedFiles from task references
- Keyword search for related code
- Git status and recent commits

Task completion:
- AutoCommit with task reference and Co-Authored-By
- CreatePR using gh CLI
- SyncStatus back to agentic service
- CreateBranch with {type}/{id}-{title} format

CLI commands:
- core dev task <id> --context - show with AI context
- core dev task:commit <id> - auto-commit
- core dev task:pr <id> - create PR

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:04:45 +00:00
Snider
3b6427f324 feat(agentic): implement core-agentic API client
Add pkg/agentic for AI-assisted task management:
- API client for core-agentic service
- Task listing, claiming, updating, completion
- Config from .env or ~/.core/agentic.yaml

CLI commands:
- core dev tasks - list available tasks
- core dev task <id> - show/claim task
- core dev task --auto - AI picks highest priority
- core dev task:update <id> - update progress
- core dev task:complete <id> - mark complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:58:41 +00:00
Snider
605ee023ca feat(php): add Coolify deployment integration
Commands:
- core php deploy - deploy to production
- core php deploy --staging - deploy to staging
- core php deploy:status - show deployment status
- core php deploy:rollback - rollback to previous
- core php deploy:list - list recent deployments

Features:
- Coolify API client
- Config from .env (COOLIFY_URL, TOKEN, APP_ID)
- Wait for deployment completion with --wait

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:39:04 +00:00
Snider
312fce343d feat(php): add package management for local development
Commands:
- core php packages link <path>... - link local packages
- core php packages unlink <name>... - unlink packages
- core php packages update - update linked packages
- core php packages list - list linked packages

Features:
- Composer path repositories with symlink
- Auto-detect package name from composer.json
- Preserves existing composer.json fields

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:33:55 +00:00
Snider
5759d84268 feat(php): add testing and quality commands
Testing:
- core php test - run PHPUnit/Pest (auto-detected)
- core php test --parallel - parallel testing
- core php test --coverage - with coverage
- core php test --filter <pattern> - filter tests

Quality:
- core php fmt - format with Laravel Pint
- core php fmt --fix - auto-fix issues
- core php analyse - run PHPStan/Larastan
- core php analyse --level 9 - set analysis level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:26:57 +00:00
Snider
5568f86768 feat(php): add container build support (Docker + LinuxKit)
Add container commands to pkg/php:
- core php build - Docker/LinuxKit image builds
- core php serve --production - run production container
- core php shell - shell into running container

Features:
- Auto-generate FrankenPHP Dockerfile from project
- Detect PHP extensions from composer.json
- Multi-stage builds with frontend assets
- Laravel optimizations (config/route/view caching)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:24:11 +00:00
Snider
96d394435a feat(php): implement Laravel development environment support
Add pkg/php for Laravel/PHP development:
- Auto-detect Laravel project and required services
- FrankenPHP/Octane, Vite, Horizon, Reverb, Redis orchestration
- mkcert SSL integration for local HTTPS
- Unified log streaming with colored service prefixes
- Graceful shutdown handling

CLI commands:
- core php dev - start all services
- core php logs - unified/per-service logs
- core php stop - stop all services
- core php status - show service status
- core php ssl - setup SSL certificates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 19:14:06 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
google-labs-jules[bot]
0c3321bfab feat: Add feature system to Core (#17)
This commit introduces a new feature system to the Core struct.

A new `Features` struct is defined in `pkg/core/interfaces.go` with an `IsEnabled` method to check if a feature is enabled.

The `Core` struct is updated to include this new `Features` struct, which is initialized in the `New` function.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-02 03:03:54 +00:00
Snider
1f87ec75d1 (#15) feat(openpgp): increase test coverage
Adds new tests to the `pkg/crypt/openpgp` package to cover error handling and edge cases in the `EncryptPGP` and `DecryptPGP` functions.
2025-10-30 23:24:53 +00:00
Snider
41ed9baa12 (#14) feat(openpgp): increase test coverage
Adds new tests to the `pkg/crypt/openpgp` package to cover error handling and edge cases in the `EncryptPGP` and `DecryptPGP` functions.

- Adds a new test file, `encrypt_extra_test.go`, with tests for incorrect passphrases, malformed messages, and signing failures.
- Adds a pre-generated, encrypted PGP key to be used in tests, working around a limitation in the `go-crypto` library that prevents programmatic generation of encrypted keys.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-10-30 22:57:14 +00:00
Snider
c0914fd1ed (#12) Add GitHub Actions test coverage and platform-aware Taskfiles 2025-10-30 17:37:48 +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
3a40c83017 Refactor service documentation to standardize naming conventions and improve clarity
Signed-off-by: Snider <snider@lt.hn>
2025-10-28 12:06:24 +00:00