Implements weeks 1-4 of the multi-provider architecture: Week 1 - Foundation: - Add domain models (AgentProvider, AgentRequest, AgentEvent, AgentResult) - Define CodeAgent port interface with Execute, Cancel, Capabilities - Create thread-safe provider registry with first-registered default Week 2 - Claude Code Adapter: - Extract kubectl exec logic into CodeAgent implementation - Parse stream-json output format (init, message, tool_use, result) - Support session continuation via --resume flag Week 3 - OpenCode Adapter: - HTTP/SSE client for opencode serve API - Session management (create, send message, abort) - Event streaming with documented buffer rationale Week 4 - Quality & Polish: - Fix race condition in OpenCode Cancel method - Add AgentRequest.Validate() with ErrPromptRequired, ErrInvalidTimeout - Document DefaultAvailabilityTimeout constants - Add HTTP error context for debugging Also includes: - Work queue system with PostgreSQL adapter - Credential store for infrastructure secrets - Project templates with Woodpecker CI integration - Comprehensive test coverage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
30 lines
885 B
YAML
30 lines
885 B
YAML
steps:
|
|
build:
|
|
image: docker:24-dind
|
|
privileged: true
|
|
commands:
|
|
- docker build -t zot.orchard9.ai/{{PROJECT_NAME}}:latest .
|
|
- docker build -t zot.orchard9.ai/{{PROJECT_NAME}}:${CI_COMMIT_SHA:0:8} .
|
|
when:
|
|
- event: push
|
|
|
|
push:
|
|
image: docker:24-dind
|
|
privileged: true
|
|
commands:
|
|
- echo "$ZOT_PASSWORD" | docker login zot.orchard9.ai -u "$ZOT_USER" --password-stdin
|
|
- docker push zot.orchard9.ai/{{PROJECT_NAME}}:latest
|
|
- docker push zot.orchard9.ai/{{PROJECT_NAME}}:${CI_COMMIT_SHA:0:8}
|
|
secrets: [zot_user, zot_password]
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
|
|
deploy:
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- kubectl set image deployment/{{PROJECT_NAME}} {{PROJECT_NAME}}=zot.orchard9.ai/{{PROJECT_NAME}}:${CI_COMMIT_SHA:0:8} -n projects
|
|
when:
|
|
- event: push
|
|
branch: main
|