Commit graph

9 commits

Author SHA1 Message Date
Rasmus Widing
3b6b7ab69f
feat: Phase 4 - Express to Hono migration (#318)
* feat: Phase 4 - Express to Hono migration

Replace Express with Hono in @archon/server for improved performance
and better Bun integration. This is a focused HTTP layer migration
that preserves all existing API functionality.

Changes:
- Replace express with hono dependency
- Migrate all endpoints to Hono context-based handlers
- Use Bun.serve() for native Bun server integration
- Update optional parameter syntax from Express 5 to Hono style
- Remove express.json()/express.raw() middleware (Hono handles natively)
- Change default port from 3000 to 3090
- Update log prefixes from [Express] to [Hono]
- Update CLAUDE.md documentation references

All endpoints verified working:
- GET /health, /health/db, /health/concurrency
- POST /test/message, GET /test/messages/:id
- DELETE /test/messages/:id?, PUT /test/mode
- POST /webhooks/github (signature verification)

* refactor: Simplify Hono endpoint handlers

- Remove unnecessary try/catch from /health/concurrency endpoint
  (getStats() is a simple sync operation that doesn't need error handling)
- Remove outer try/catch from /test/message endpoint
  (validation returns early, processing is fire-and-forget with its own error handler)
- Consolidate validation checks with clearer error messages
- Reduce nesting depth for improved readability

Total: 12 lines removed while maintaining identical functionality

* docs: Update port references from 3000 to 3090 after Hono migration

* fix: Improve error handling in Hono endpoints

- Add global app.onError() handler for consistent unhandled exception responses
- Add explicit JSON parsing error handling to /test/message endpoint (returns 400 instead of 500)
- Add explicit JSON parsing error handling to /test/mode endpoint (was completely unhandled)
- Fix CLAUDE.md worktree port example to use correct port (3637 with base 3090)
2026-01-21 13:23:34 +02:00
DIY Smart Code
c9277bbb4d
fix: add cloud deployment support for with-db profile (#134)
* fix: add cloud deployment support for with-db profile

The docker-compose.cloud.yml overlay previously only supported the
external-db profile. Users running with the with-db profile (local
PostgreSQL) could not use cloud deployment because:

- Caddy depended on 'app' service which doesn't exist in with-db profile
- No network overrides for 'app-with-db' or 'postgres' services

Changes:
- Add profile-aware Caddy services (caddy for external-db, caddy-with-db for with-db)
- Add network overrides for app-with-db and postgres services
- Update Caddyfile.example with service name note
- Update cloud-deployment.md with profile-specific instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: Add cloud deployment section to CLAUDE.md

* docs: Add profile hints to alternative examples and commands

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
Co-authored-by: Rasmus Widing <rasmus.widing@gmail.com>
2026-01-18 00:12:16 +02:00
Rasmus Widing
3026a6445d
Add Archon distribution config and directory structure (#101)
* Add Archon distribution config and directory structure

- Create centralized path resolution in src/utils/archon-paths.ts
- Add YAML configuration system (src/config/) with layered loading
- Update Dockerfile and docker-compose for /.archon/ directory
- Add GHCR publish workflow for multi-arch Docker builds
- Create deploy/ directory with end-user docker-compose
- Add /init command to create .archon structure in repos
- Add docs/configuration.md reference guide
- Update README with Quick Start section
- Add bun run validate script
- Update tests for new path defaults (~/.archon/)

Directory structure:
- Local: ~/.archon/{workspaces,worktrees,config.yaml}
- Docker: /.archon/{workspaces,worktrees}
- Repo: .archon/{commands,workflows,config.yaml}

Legacy WORKSPACE_PATH and WORKTREE_BASE env vars still supported.

* Complete Archon distribution config implementation

- Wire up config system in src/index.ts (Task 3.5)
- Remove legacy WORKSPACE_PATH and WORKTREE_BASE support
- Add logConfig() function to config-loader.ts
- Update docker-compose.yml to use ARCHON_DOCKER env var
- Remove legacy env vars from .env.example
- Update all documentation to reference ARCHON_HOME
- Create scripts/validate-setup.sh for setup validation
- Add setup:check script to package.json
- Create docs/getting-started.md guide
- Create docs/archon-architecture.md technical docs
- Update tests to use ARCHON_HOME instead of legacy vars
- Fix validate.md command template for new paths

All plan phases now complete:
- Phase 1: Archon Directory Structure
- Phase 2: Docker Distribution
- Phase 3: YAML Configuration System
- Phase 4: Developer Experience
- Phase 5: Documentation
2025-12-17 21:45:41 +02:00
Wirasm
1b6771ea2a
Fix WORKSPACE_PATH configuration to avoid nested repos (#37) (#54)
Updated documentation and configuration to recommend external paths
for WORKSPACE_PATH, preventing repo-inside-repo confusion when
working on this project's issues.

Changes:
- Updated .env.example default to /tmp/remote-agent-workspace
- Added detailed WORKSPACE_PATH guidance to README with warning section
- Updated cloud deployment docs with recommended external path
- Added startup warning when WORKSPACE_PATH is inside project directory

The warning helps developers avoid nested repository issues where
clones end up at paths like:
  /remote-coding-agent/workspace/remote-coding-agent

This caused path confusion, git worktree conflicts, and disk duplication.

Fixes #37

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-04 20:54:10 +02:00
Wirasm
ca6a5b2dd5
chore: Improve unit test coverage (#3)
* docs: add PRP for improving test coverage

- Create comprehensive PRP documenting test infrastructure improvements
- Add coverage directory to .gitignore
- Plan covers 6 phases: infrastructure, utilities, database, adapters, orchestrator, CI/CD
- Target: increase coverage from 15.98% to 80%+

* test: add comprehensive unit test coverage

- Add test infrastructure: setup.ts, mock utilities for database, platform, and streaming
- Add tests for all database modules (conversations, codebases, sessions)
- Add tests for test adapter, client factory, orchestrator
- Expand Claude and Codex client tests with full mock coverage
- Add tool-formatter tests
- Configure Jest with coverage thresholds (30% branches, 40% functions/lines/statements)
- Add CI workflow for automated testing on push/PR
- Add test:coverage and test:ci npm scripts

Coverage: 170 tests passing, 53% lines, 48% branches, 65% functions

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: improve test coverage and fix type issues

- Fix type annotations across multiple files
- Improve test mocks for streaming and database operations
- Update jest config for better coverage reporting
- Fix minor type issues in orchestrator, sessions, and adapters
- Update documentation for architecture and cloud deployment

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-01 11:31:00 +02:00
Cole Medin
f9ddd3ea5c Updating key names in cloud deployment guide 2025-11-20 14:02:55 -06:00
Cole Medin
db15eb39d6 Final touches to cloud deployment guide 2025-11-15 21:23:49 -06:00
Cole Medin
9d5c988eef Deployment guide updates 2025-11-15 15:27:36 -06:00
Cole Medin
923bae3258 Cloud Deployment Guide 2025-11-12 09:51:46 -06:00