Files
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

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

  1. Navigate to SettingsTool Types
  2. See a list of all tool types
  3. Built-in types are marked with a badge

Creating Custom Tool Types

  1. Click "New Tool Type"
  2. 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
  3. 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 services section
  • Must use all required variables
  • Invalid templates will be rejected

Editing Tool Types

  1. Find the tool type in the list
  2. Click "Edit"
  3. Update fields
  4. Click "Save"

Note: Built-in tool types cannot be modified or deleted.

Deleting Tool Types

  1. Find the tool type in the list
  2. Click "Delete"
  3. Confirm deletion

Note: Built-in tool types cannot be deleted.

API Reference

Endpoints

  • GET /tool-types - List tool types
  • POST /tool-types - Create tool type
  • GET /tool-types/{id} - Get tool type details
  • PUT /tool-types/{id} - Update tool type
  • DELETE /tool-types/{id} - Delete tool type

See Tool Types API for detailed endpoint documentation.