Skip to content

Conversation

@khaliqgant
Copy link
Collaborator

Detailed spec for integrating OpenCode server capabilities with agent relay:

  • OpenCodeWrapper class using HTTP API instead of PTY
  • WrapperFactory for automatic backend selection
  • Session forking for context inheritance between agents
  • mDNS discovery for multi-host coordination
  • Dashboard API extensions for OpenCode features

The spec includes component interfaces, data flows, implementation phases,
and testing strategy for seamless integration.

claude added 3 commits January 7, 2026 08:14
Detailed spec for integrating OpenCode server capabilities with agent relay:
- OpenCodeWrapper class using HTTP API instead of PTY
- WrapperFactory for automatic backend selection
- Session forking for context inheritance between agents
- mDNS discovery for multi-host coordination
- Dashboard API extensions for OpenCode features

The spec includes component interfaces, data flows, implementation phases,
and testing strategy for seamless integration.
Expands the OpenCode integration spec with:
- Cloud production architecture diagram
- OpenCode as provider type with credential management
- OpenCodeCloudWrapper for cloud-hosted instances
- Cloud OpenCode Orchestrator design
- CloudSyncService extensions for credential sync
- Dashboard integration with provider settings
- Cloud API specification with all endpoints
- SSE event streaming from cloud
- Updated implementation phases (5 phases)
- Detailed open questions with recommendations

The goal is seamless UX: user connects OpenCode provider,
agents work automatically with no config changes needed.
- Add 6 detailed user flow diagrams with ASCII art:
  1. First-time OpenCode setup (cloud)
  2. Spawning an agent with OpenCode
  3. Agent-to-agent communication
  4. Session forking (context inheritance)
  5. Local OpenCode server (no cloud)
  6. BYOK (bring your own keys) setup

- Fix authentication model confusion:
  - OpenCode Zen uses API key (not OAuth)
  - BYOK uses underlying provider OAuth (Anthropic/OpenAI)
  - Updated OpenCodeProvider code with connectWithZenApiKey()

- Add authentication model summary table

- Add spec review section documenting:
  - What the proposal does well
  - Issues identified and fixed
  - Remaining considerations
  - Architecture validation
  - Recommended implementation order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants