- 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
3.0 KiB
Tool Types
Overview
Tool types define development tools that can be spawned for projects. Headquarter includes built-in types and supports creating custom tool types with Docker Compose templates.
How to Use
Built-in Tool Types
Headquarter includes these built-in tool types:
VS Code Server
- Image:
lscr.io/linuxserver/code-server:latest - Purpose: Full VS Code in the browser
- Features: Extensions, terminal, debugging
- Access: Port 8443
Jupyter Notebook
- Image:
jupyter/scipy-notebook:latest - Purpose: Interactive Python development
- Features: Notebooks, data visualization
- Access: Port 8888
Managing Tool Types
Viewing Tool Types
- Navigate to Settings → Tool Types
- See a list of all tool types
- Built-in types are marked with a badge
Creating Custom Tool Types
- Click "New Tool Type"
- Fill in the form:
- Name: Unique identifier (e.g.,
my-custom-tool) - Display Name: Human-readable name
- Description: What this tool does
- Compose Template: Docker Compose YAML
- Name: Unique identifier (e.g.,
- Click "Create"
Compose Template Format
The compose template uses Docker Compose syntax with template variables:
version: "3.8"
services:
my-tool:
image: my-image:latest
container_name: {{TOOL_NAME}}
environment:
- VARIABLE=value
volumes:
- {{REPO_PATH}}:/workspace
ports:
- "8080:8080"
Required Variables:
{{TOOL_NAME}}- Unique name for the container{{REPO_PATH}}- Path to the repository
Git Requirement for Clone Mode
When users create instances in clone mode (fresh repository copy instead of bind mount), the container image must have git installed. This enables git operations (push, pull, branch) inside the container.
Built-in types with git:
- VS Code Server: Includes git
- Jupyter Notebook: Includes git
- OpenCode: Installs git during startup
Custom tool types: Ensure your base image includes git (e.g., apt-get install -y git in Dockerfile).
Validating Templates
The system validates templates:
- Must be valid YAML
- Must contain a
servicessection - Must use all required variables
- Invalid templates will be rejected
Editing Tool Types
- Find the tool type in the list
- Click "Edit"
- Update fields
- Click "Save"
Note: Built-in tool types cannot be modified or deleted.
Deleting Tool Types
- Find the tool type in the list
- Click "Delete"
- Confirm deletion
Note: Built-in tool types cannot be deleted.
API Reference
Endpoints
GET /tool-types- List tool typesPOST /tool-types- Create tool typeGET /tool-types/{id}- Get tool type detailsPUT /tool-types/{id}- Update tool typeDELETE /tool-types/{id}- Delete tool type
See Tool Types API for detailed endpoint documentation.
Related Features
- Tool Instances - Spawn and manage tool instances