Commit Graph

74 Commits

Author SHA1 Message Date
alex 09920c1ca1 removed secs middleware from docker compose
CI / Web CI (push) Failing after 9s
CI / API CI (push) Failing after 11s
2026-05-16 15:07:04 +02:00
alex 75108afe29 Merge branch 'main' of ssh://git.commumedia.org:2222/alex/headquarter
CI / Web CI (push) Failing after 10s
CI / API CI (push) Failing after 10s
2026-05-16 12:42:07 +00:00
alex f92f9c33e6 fix: traefik compose contains app services only (no traefik service)
- docker-compose.traefik.yml now contains api, web, db services only
- Assumes external Traefik proxy is already deployed
- Uses external traefik network for discovery
- docker-compose.prod.yml remains the full stack with embedded Traefik
2026-05-16 12:41:37 +00:00
alex 984f9e5b9b docs: fix broken links to removed deploy directory
CI / Web CI (push) Failing after 8s
CI / API CI (push) Failing after 9s
2026-05-16 14:39:56 +02:00
alex 2655a29886 feat: restore traefik to prod compose and add standalone traefik compose
CI / Web CI (push) Failing after 10s
CI / API CI (push) Failing after 11s
- Add Traefik v3.2 service back to docker-compose.prod.yml with:
  - Dashboard with basic auth middleware
  - Let's Encrypt TLS challenge
  - HTTP→HTTPS redirect
  - Health checks and structured logging
- Create docker-compose.traefik.yml for standalone Traefik deployment:
  - Mirrors production Traefik configuration
  - Isolated network for external proxy usage
  - Persistent certificate storage
- Add TRAEFIK_ACME_EMAIL to .env.example
- All compose files validated with docker compose config
2026-05-16 12:37:03 +00:00
alex 8136eae8f4 Merge branch 'main' of ssh://git.commumedia.org:2222/alex/headquarter
CI / Web CI (push) Failing after 9s
CI / API CI (push) Failing after 10s
2026-05-16 12:32:08 +00:00
alex 9fcc73b874 refactor(docker): remove dashboard subdomain, prefix traefik router names
- Remove TRAEFIK_DASHBOARD_SUBDOMAIN from .env.example (no longer used)
- Rename traefik routers from 'api'/'web' to 'headquarter-api'/'headquarter-web'
- Rename traefik services from 'api'/'web' to 'headquarter-api'/'headquarter-web'

This prevents router/service name collisions with other projects
sharing the same Traefik instance.
2026-05-16 12:25:14 +00:00
alex 533d50dd01 chore: clean up root configuration files
CI / Web CI (push) Failing after 9s
CI / API CI (push) Failing after 10s
- Remove redundant .npmrc (ignore-build-scripts=false is default)
- Remove Makefile (scripts available in package.json)
- Simplify root package.json:
  - Remove duplicate pnpm keys
  - Remove frontend-specific esbuild config (already in apps/web/package.json)
  - Remove version/description (not needed for private workspace root)
  - Remove compose scripts (use docker compose directly)
- Clean pnpm-workspace.yaml:
  - Remove placeholder allowBuilds comment
  - Remove onlyBuiltDependencies (handled per-workspace)
2026-05-16 14:14:41 +02:00
alex aef6cbb2b1 Merge branch 'main' of ssh://git.commumedia.org:2222/alex/headquarter
CI / Web CI (push) Failing after 9s
CI / API CI (push) Failing after 10s
2026-05-16 12:14:29 +00:00
alex ae4fe95c40 refactor(docker): remove traefik compose, cleanup deploy folder
- Delete docker-compose.traefik.yml (redundant overlay)
- Remove Traefik service from docker-compose.prod.yml
- Add traefik external network and labels to api/web services in prod compose
- Add TRAEFIK_ENTRYPOINT env var to all Traefik router labels
- Remove deploy/ folder (portainer-stack.yml, .env examples, README)

Production compose now assumes external Traefik proxy on Docker network.
All environment variables come from host environment only.
2026-05-16 12:13:38 +00:00
alex 1f2017b7a9 refactor(docker): remove all .env file references and add configurable Traefik vars
- Remove env_file from deploy/portainer-stack.yml (api and web services)
- Add TRAEFIK_CERT_RESOLVER env var to all Traefik router labels
- Add TRAEFIK_DASHBOARD_SUBDOMAIN for configurable dashboard hostname
- Add TRAEFIK_ENTRYPOINT env var to Traefik dashboard router
- Update .env.example with TRAEFIK_DASHBOARD_SUBDOMAIN and TRAEFIK_LOG_LEVEL
- Update deploy/.env.example with new Traefik variables

All environment variables now come from host environment only.
2026-05-16 12:05:43 +00:00
alex e78339a7b1 Delete directory '.fusion'
CI / Web CI (push) Failing after 8s
CI / API CI (push) Failing after 9s
2026-05-16 14:05:40 +02:00
alex a2a0b2602c Delete directory '.worktrees'
CI / Web CI (push) Failing after 11s
CI / API CI (push) Failing after 12s
2026-05-16 14:05:18 +02:00
alex dab37a88e8 refactor(docker): replace env_file with explicit environment variables
CI / Web CI (push) Failing after 9s
CI / API CI (push) Failing after 10s
- Remove env_file references from docker-compose.yml and docker-compose.prod.yml
- Add explicit environment variable forwarding for all services
- Use TRAEFIK_NETWORK env var in docker-compose.traefik.yml instead of hardcoded name
- Add VITE_* frontend variables to .env.example and deploy/.env.example
- Add missing production variables (TRAEFIK_ENTRYPOINT, TRAEFIK_CERT_RESOLVER) to deploy/.env.example

This makes environment configuration more explicit and easier to manage
across different deployment scenarios (local dev, CI/CD, Portainer).
2026-05-16 11:50:39 +00:00
alex a443127779 chore(openspec): archive completed OpenSpec changes
CI / API CI (push) Failing after 10s
CI / Web CI (push) Failing after 11s
- Archive config-secrets (FN-009) change
- Archive deployment-config (FN-006) change
- Archive runfusion-poc (FN-008) change
2026-05-16 13:44:40 +02:00
alex 024278a3d2 docs(openspec): add FN-007 Git Connection Model change
- Add proposal, design, specs, and tasks for git connection model
- Include provider adapter, credential storage, SSH key lifecycle specs
- Add repository connection API and git operations specifications
2026-05-16 13:43:49 +02:00
alex e071e3418d docs(FN-007): add repository connection documentation
- Update development.md with Repository Connections section
- Document SSH key generation and provider adapter usage
2026-05-16 13:43:00 +02:00
alex ed642dcc66 feat(FN-007): add repository connection frontend UI
- Create RepositoryListPage with connection status display
- Create RepositoryDetailPage with SSH key management
- Add repository API methods to client
- Update router with repository routes
- Add Repository types to frontend
2026-05-16 13:42:08 +02:00
alex 3728c245d3 feat(FN-007): implement repository connection API and git operations
- Add GitHubAdapter and GitLabAdapter with URL parsing
- Create provider factory in apps/api/app/git/providers/
- Implement clone, fetch, push in LocalGitOperations
- Add repository_connections router with CRUD and SSH key endpoints
- Create RepositoryConnection schema with validation
- Update models and routers __init__.py for new components
- Add comprehensive tests for git operations
2026-05-16 13:41:37 +02:00
alex 25db3f81b0 feat(FN-007): implement credential storage with Fernet encryption
- Add DatabaseCredentialStorage with async CRUD operations
- Create Credential SQLAlchemy model with encrypted values
- Update GitCredential and AccessTokenCredential to support async
- Fix SSH key encryption to use Fernet instead of base64 placeholder
2026-05-16 13:41:07 +02:00
alex 8b4784f5ed chore(openspec): archive completed changes
CI / Web CI (push) Failing after 10s
CI / API CI (push) Failing after 11s
- Archive config-secrets (FN-009) - 31 tasks complete
- Archive runfusion-poc (FN-008) - 25 tasks complete
- Archive deployment-config (FN-006) - 27 tasks complete
- All changes moved to openspec/changes/archive/
2026-05-16 11:33:37 +02:00
alex 5a7b026cbc docs(openspec): mark all tasks complete for config-secrets, runfusion-poc, deployment-config
- Mark all 31 config-secrets tasks as complete
- Mark all 25 runfusion-poc tasks as complete
- Mark all 27 deployment-config tasks as complete
- All implementations verified and committed
2026-05-16 11:33:02 +02:00
alex e0f753803c docs(opencode): add OpenCode tool documentation to development guide
- Document manifest configuration and web terminal access
- Add environment variables and workspace mount details
- Include usage instructions and differences from code-server
- Add local testing commands for OpenCode container
2026-05-16 11:28:48 +02:00
alex 51d93d9dc6 feat(FN-009): implement config and secrets management with runtime injection
- Add RuntimeInjectionService for scope-based config/secret resolution
- Mount configs as JSON files at /app/config/ with 0400 permissions
- Inject secrets as environment variables with uppercase keys
- Implement scope hierarchy: instance > project > user > global
- Create ConfigListPage and SecretListPage frontend components
- Mask secret values in API responses (never expose decrypted)
- Validate secrets exist before spawning containers
- Add comprehensive tests for runtime injection service
- Update documentation with config/secrets workflow
2026-05-15 16:44:26 +02:00
alex 78aaddb2b5 docs(openspec): add OpenSpec changes for FN-005, FN-006, FN-008, FN-009, FN-010
CI / Web CI (push) Failing after 12s
CI / API CI (push) Failing after 1m1s
- Add frontend-foundation change (FN-005) with 46 tasks
- Add deployment-config change (FN-006) with 27 tasks
- Add runfusion-poc/opencode-poc change (FN-008) with 25 tasks
- Add config-secrets change (FN-009) with 31 tasks
- Add codeserver-spawn change (FN-010) with 38 tasks
- Include project specsheet and configuration
- Archive completed deployment-config change
2026-05-14 17:35:20 +02:00
alex 1539a67883 docs: update README with OpenCode references and deployment guide
- Replace RunFusion with OpenCode in description
- Add frontend environment variables section
- Add deployment quick start guide
- Update scope boundaries with current task status
2026-05-14 17:32:02 +02:00
alex 85ae390263 chore: add frontend dependencies and update test fixtures
- Add react-router-dom, @tanstack/react-query, zustand, @headlessui/react
- Update pnpm workspace configuration
- Update test fixtures to reference OpenCode instead of RunFusion
- Add frontend environment variable examples
- Update .gitignore for .opencode and .sisyphus directories
2026-05-14 17:30:41 +02:00
alex 62640daf36 docs: update all documentation for OpenCode and deployment
- Update architecture.md with spawn service and auth proxy sections
- Update deployment.md with production stack details
- Update development.md with spawn workflow documentation
- Update mvp-scope.md, project-brief.md, tool-manifest-spec.md
- Update conversation-handoff.md with current status
- Replace all RunFusion references with OpenCode
2026-05-14 17:30:03 +02:00
alex 139654d5c0 feat(FN-006): add production deployment configuration
- Create docker-compose.prod.yml with Traefik, API, web, and DB services
- Add Portainer stack deployment files
- Configure Let's Encrypt TLS and health checks
- Add deployment environment variable examples
- Update portainer.env.example with additional config vars
2026-05-14 17:28:56 +02:00
alex 6f18dd24a5 feat(FN-005): implement frontend foundation with auth and routing
- Add OIDC authentication with PKCE flow
- Create dashboard shell with sidebar and header
- Implement project management UI (list, create, detail)
- Add tool spawn page with tool/project selection
- Create tool instance detail page with status and controls
- Set up React Router with route guards
- Add Zustand auth store and API client with types
2026-05-14 17:28:15 +02:00
alex 6aea953734 feat(FN-010): implement code-server spawn service with Docker Compose
- Add SpawnService with container lifecycle (spawn/stop/status)
- Generate Docker Compose services from tool manifests
- Integrate Traefik label generation with subdomain routing
- Mount workspace, config, and SSH key volumes
- Add container status polling and health checks
- Enhance tool instance API with spawn/stop/start/status endpoints
- Add Traefik forwardAuth middleware for auth proxy
- Update code-server manifest with runtime configuration
2026-05-14 17:27:19 +02:00
alex ca18e25d8d feat(FN-008): replace RunFusion with OpenCode manifest
- Remove runfusion.yml, add opencode.yml with web terminal config
- Update all references across codebase (tests, docs, specs)
- Add OpenCode container setup with port 3000 and health checks
2026-05-14 17:26:25 +02:00
Fusion 61c5554c42 feat(FN-019): draft enhanced architecture.md with all 18 required sections (+4 more)
CI / API CI (push) Failing after 35s
CI / Web CI (push) Failing after 2m11s
Commits merged:
- docs(FN-019): complete Step 6 — documentation index, conversation handoff, project brief, and build config
- test(FN-019): complete Step 4 — doc validation tests, project-brief.md, and fix mvp-scope placeholders
- feat(FN-019): complete Step 3 — draft mvp-scope.md with milestones, dependency order, and open questions
- docs(FN-019): fix auth callback flow, Python syntax, dev bypass clarity, add AccessProvider protocol and type stubs
- feat(FN-019): complete Step 2 — draft enhanced architecture.md with all 18 required sections

Files changed:
docs/README.md                  |   11 +-
 docs/architecture.md            | 1185 ++++++++++++++++++++++++++++++++++-----
 docs/conversation-handoff.md    |   68 +++
 docs/mvp-scope.md               |  184 ++++++
 docs/project-brief.md           |   31 +
 package.json                    |    3 +
 tests/docs/__init__.py          |    0
 tests/docs/test_architecture.py |  120 ++++
 8 files changed, 1444 insertions(+), 158 deletions(-)

Fusion-Task-Id: FN-019
2026-05-14 10:56:20 +02:00
Fusion 7ff7acb717 feat(FN-002): React Frontend App Skeleton (+1 more)
Commits merged:
- feat(FN-002): add .local-bin to .gitignore for local pnpm bootstrap
- feat(FN-002): complete Step 2 — React Frontend App Skeleton

Files changed:
.gitignore | 1 +
 1 file changed, 1 insertion(+)

Fusion-Task-Id: FN-002
2026-05-14 09:52:11 +02:00
Fusion f33a563003 feat(FN-003): add tool manifest registry with FastAPI CRUD and built-in manifests
- Add ToolManifest Pydantic models with validators for ports, mounts, health checks, and traefik config

- Implement in-memory ToolRegistry with YAML loading and built-in manifest scanning

- Add FastAPI CRUD routes for listing, retrieving, and creating tool manifests

- Include built-in manifests for runfusion and code-server

- Harden web Dockerfile with unprivileged nginx and port 8080

- Add tool manifest specification documentation and architecture updates

Fusion-Task-Id: FN-003
2026-05-14 09:15:22 +02:00
Fusion 477abad4c9 fix(FN-011): gracefully skip DB tests when PostgreSQL is unavailable
- Wrap DB engine setup in try/except in conftest.py

- Call pytest.skip with clear message when PostgreSQL is unavailable

- Dispose engine before skipping to avoid connection leaks

Fusion-Task-Id: FN-011
2026-05-14 08:45:52 +02:00
Fusion 2c52b1634f docs(FN-011): complete Step 8 — update architecture and development docs
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion 31b363edb0 test(FN-011): complete Step 7 — tests for provider, credentials, and operations
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion a9ccbcb3fb feat(FN-011): add repository_connection alembic migration
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion ea30f28edb fix(FN-011): catch CalledProcessError in get_status, fix deletion logic, add explicit encoding
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion 3532bec00d feat(FN-011): complete Step 5 — Git operations interface and LocalGitOperations
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion 4214b48c37 fix(FN-011): wrap validate_connection in try/except, flush before return, remove unused import, document unique constraint deferral
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion cffeb11410 feat(FN-011): complete Step 4 — repository connection model and connection manager
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion edfbce9635 feat(FN-011): complete Step 3 — SSH key pair generation and lifecycle
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion 2037359e8d feat(FN-011): complete Step 2 — credential model and storage interface
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion 59d727072e fix(FN-011): make GitProvider methods synchronous and fix __init__ exports
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion f9dd56902f feat(FN-011): complete Step 1 — Git types and provider abstraction
Fusion-Task-Id: FN-011
Fusion-Task-Lineage: 4a9aca6f-9d91-43aa-8d2a-d59657c1541a
2026-05-14 08:37:11 +02:00
Fusion 64ba5e3e56 feat(FN-002): complete Step 7 — Documentation & Delivery
Fusion-Task-Id: FN-002
Fusion-Task-Lineage: 49cb7077-d805-4d39-9a27-ae50744f2839
2026-05-14 07:47:30 +02:00
Fusion d4d4844c03 fix(FN-002): remove invalid allowBuilds placeholder from pnpm-workspace.yaml
Fusion-Task-Id: FN-002
Fusion-Task-Lineage: 49cb7077-d805-4d39-9a27-ae50744f2839
2026-05-14 07:47:29 +02:00
Fusion f81fea2297 feat(FN-002): complete Step 6 — Testing & Verification
Fusion-Task-Id: FN-002
Fusion-Task-Lineage: 49cb7077-d805-4d39-9a27-ae50744f2839
2026-05-14 07:47:29 +02:00