## ADDED Requirements ### Requirement: Tool configs can be stored per user The system SHALL allow users to store configuration values for tool types. #### Scenario: Save global config - **WHEN** a user saves a config value for a tool type - **THEN** the config is stored with user_id and tool_type_id - **AND** it is available for all future instances of that tool #### Scenario: Save project-specific config - **WHEN** a user saves a config value with a project_id - **THEN** the config is scoped to that project - **AND** it overrides global config for that project ### Requirement: Configs support env and file types The system SHALL support environment variable configs and file-based configs. #### Scenario: Env config - **WHEN** a config has type "env" - **THEN** it is injected as an environment variable when starting the container #### Scenario: File config - **WHEN** a config has type "file" - **THEN** it is written to a file in the container - **AND** the file path is configurable ### Requirement: Tool types have categories and interfaces The system SHALL categorize tool types and declare their interfaces. #### Scenario: Web interface tool - **WHEN** a tool type has interface "web" - **THEN** the UI shows an "Open" button #### Scenario: Terminal interface tool - **WHEN** a tool type has interface "terminal" - **THEN** the UI shows a "Terminal" button ### Requirement: OpenCode is available as built-in tool The system SHALL include OpenCode as a built-in tool type with terminal interface. #### Scenario: Create OpenCode instance - **WHEN** a user creates an OpenCode instance - **THEN** it starts a container with opencode installed - **AND** the repo is mounted at /workspace - **AND** the user can access it via terminal