Files
headquarter/openspec/changes/archive/2026-05-22-opencode-web-terminal/proposal.md
T
Fusion 063a839790 feat: implement repository clone mode with SSH key support
- Add clone_mode and branch fields to tool_instances
- Add ssh_key_id to git_repositories for per-repo SSH key assignment
- Implement host-side git cloning with branch selection (default: main)
- Mount SSH keys into containers for git operations in clone mode
- Add dirty state check on clone-mode instance deletion with confirmation
- Update SessionsPage with mount/clone selector, branch input, SSH key display
- Add SSH key selector to repository creation form
- Add dirty delete confirmation modal with changed files list
- Update API schemas and endpoints for new fields
- Sync delta specs to main specs (git-repo, tool-instances, repo-clone-mode)
- Archive completed OpenSpec change: repo-clone-mode-with-ssh
- Document git requirement for custom tool types

Quality gates: Frontend typecheck and build passed
OpenSpec: repo-clone-mode-with-ssh archived with all tasks complete
2026-05-22 22:56:35 +02:00

1.7 KiB

Why

Tool instances currently have inconsistent port configuration. OpenCode lacks a default port and doesn't expose a web interface, while code-server and jupyter have hardcoded ports. We need a systematic way to define tool ports and ensure OpenCode works properly via the web terminal interface.

What Changes

  • Tool Port Configuration: Make default_port required for all tool types and validate it during tool type creation
  • OpenCode Web Terminal: Configure OpenCode to run a web server (e.g., on port 3000) so it can be accessed via browser, not just through the raw WebSocket terminal
  • Tunnel Port Discovery: Ensure cloudflared tunnels use the correct internal port from the tool type definition
  • Terminal-First Tools: Add support for tools that primarily use the terminal interface but may also expose a web UI
  • Tool Validation: Add validation to ensure tool compose templates expose the port defined in default_port

Capabilities

New Capabilities

  • tool-port-configuration: Systematic port definition and validation for tool types
  • opencode-web-server: Running OpenCode with a web interface accessible via browser

Modified Capabilities

  • tool-types: Adding port validation requirements and web interface support for terminal tools
  • tool-instances: Tunnel creation must read port from tool type configuration
  • tool-terminal: Terminal tools may optionally expose web endpoints

Impact

  • Backend: Tool type model, validation, seed data, tunnel creation logic
  • Frontend: Instance list may show both Open (web) and Terminal buttons for tools with dual interfaces
  • Docker: OpenCode compose template needs a web server command
  • Infrastructure: Cloudflared tunnels must target the correct internal port