Files
headquarter/openspec/changes/archive/2026-05-22-opencode-web-terminal/tasks.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

1. Tool Type Port Configuration

  • 1.1 Update ToolType model to make default_port required (non-nullable)
  • 1.2 Add validation in tool type API to reject missing default_port
  • 1.3 Add compose template validation to verify port is exposed in ports section
  • 1.4 Update tool type creation/update endpoints to validate port configuration

2. OpenCode Web Server

  • 2.1 Update OpenCode compose template to run a web server on port 3000
  • 2.2 Add default_port: 3000 to OpenCode seed data
  • 2.3 Update OpenCode interfaces to ["terminal", "web"]
  • 2.4 Create a simple web terminal HTML page served by OpenCode container

3. Tunnel Port Fix

  • 3.1 Update tunnel creation to use tool_type.default_port instead of hardcoded 8080
  • 3.2 Ensure tunnel creation fails gracefully if port is not defined
  • 3.3 Remove fallback to port 8080 in tunnel creation

4. Frontend Updates

  • 4.1 Update instance list to show both "Open" and "Terminal" buttons for dual-interface tools
  • 4.2 Update ToolType interface in frontend to include default_port
  • 4.3 Update tool type creation form to require port input

5. Database Migration

  • 5.1 Create Alembic migration to make default_port non-nullable
  • 5.2 Set default_port for existing tool types (code-server=8443, jupyter=8888, opencode=3000)

6. Testing & Quality Gates

  • 6.1 Test creating tool type without port fails validation
  • 6.2 Test creating tool type with port mismatch fails validation
  • 6.3 Test OpenCode instance creates tunnel on port 3000
  • 6.4 Run backend quality gates (ruff, mypy) - skipped (not installed)
  • 6.5 Run frontend quality gates (typecheck, lint, build) - PASSED
  • 6.6 Commit and push changes