Files
headquarter/openspec/specs/tool-config-management/spec.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

53 lines
2.4 KiB
Markdown

## ADDED Requirements
### Requirement: Tool config supports runtime fields
The system SHALL support additional configuration fields for tool instances: `start_command`, `port`, `working_directory`, `environment_variables`, and `volumes`.
#### Scenario: Create config with runtime fields
- **WHEN** user creates a tool config with start_command="npm start", port=3000, working_directory="/app"
- **THEN** the config is saved with all fields populated
#### Scenario: Environment variables as JSON
- **WHEN** user sets environment_variables to {"NODE_ENV": "production", "API_KEY": "secret"}
- **THEN** the system stores and returns the config with the JSON object preserved
#### Scenario: Volumes as JSON
- **WHEN** user sets volumes to [{"host": "/data", "container": "/app/data", "mode": "rw"}]
- **THEN** the system stores and returns the config with the JSON array preserved
### Requirement: Split-pane UI for tool configs
The system SHALL present tool configs in a split-pane layout with a list on the left and detail/edit panel on the right.
#### Scenario: Browse tool configs
- **WHEN** user navigates to /tool-configs
- **THEN** the left panel displays a scrollable list of all tool configs grouped by tool type
#### Scenario: Select config to edit
- **WHEN** user clicks on a config in the left panel
- **THEN** the right panel displays the config details in an editable form
#### Scenario: Create new config
- **WHEN** user clicks "New Config" button
- **THEN** a blank form appears in the right panel for creating a new config
### Requirement: JSON editor for complex fields
The system SHALL provide user-friendly editors for JSON fields (environment_variables and volumes) that validate JSON syntax.
#### Scenario: Valid JSON input
- **WHEN** user enters valid JSON in the environment_variables field
- **THEN** the form accepts the input and shows a green indicator
#### Scenario: Invalid JSON input
- **WHEN** user enters invalid JSON in the environment_variables field
- **THEN** the form shows a red error indicator and prevents saving
### Requirement: Config validation
The system SHALL validate tool config fields before saving.
#### Scenario: Invalid port number
- **WHEN** user enters port=70000
- **THEN** the system rejects the config with error "Port must be between 1 and 65535"
#### Scenario: Missing required fields
- **WHEN** user attempts to save a config without key or tool_type_id
- **THEN** the system rejects the config with error "Key is required"