Files
headquarter/openspec/changes/add-config-profiles/proposal.md
T
alex 073013bc61 feat: add heartbeat/ping to terminal WebSocket
- Backend: Send ping every 30s from WebSocket endpoint
- Frontend: Respond to pings with pongs, detect missed pings (60s timeout)
- Update type definitions to include 'resetting' status

Refs: persistent-terminal-sessions task 6.4
2026-05-24 12:45:50 +00:00

38 lines
2.9 KiB
Markdown

## Why
Tool launches need reusable user-owned configuration that can combine editable files, mount targets, environment variables, and runtime hints without forcing every tool start to be configured from scratch. The existing config folder and tool config concepts provide pieces of this, but they do not model a single selectable, composable launch profile with project/tool-aware defaults and override behavior.
## What Changes
- Add config profiles as the primary reusable launch configuration model.
- Allow exactly one config profile, or no config profile, to be selected when starting a session.
- Allow profiles to include other profiles in ordered composition, with cycle detection at save and launch resolution.
- Let profiles be portable, tool-specific, project-specific, or project+tool-specific based on optional project and tool references.
- Store profile-owned UTF-8 text files under mount roots, with relative file paths and `ro`/`rw` mount modes.
- Store plain-text environment variables and runtime hints on profiles.
- Resolve profile layers deterministically: included profiles in order, then the selected profile, with later layers overriding earlier layers.
- Select defaults by specificity: project+tool, project, tool, global, then first compatible profile unless a default is explicitly configured.
- Store the selected config profile on started instances so restarts are predictable.
- **BREAKING**: Replace legacy always-active config folder mounting with explicit config profile selection. Legacy compatibility is not required for this change.
## Capabilities
### New Capabilities
- `config-profiles`: User-owned launch profiles that compose files, mounts, env vars, runtime hints, defaults, compatibility, and include relationships.
### Modified Capabilities
- `tool-instances`: Session creation/start behavior accepts an optional selected config profile, applies resolved profile output, supports no-profile starts, and persists the selected profile for restart behavior.
- `user-config`: User settings expose profile management/default selection surfaces for launch configuration.
- `tool-config-management`: Legacy config folder behavior is superseded by config profiles for file mounts and reusable launch setup.
## Impact
- Backend models and migrations for config profiles, ordered profile includes, and default selection.
- Backend APIs for profile CRUD, include management, default configuration, compatibility filtering, and resolved profile preview.
- Tool instance create/start/restart APIs and Docker compose staging logic to apply resolved profile env vars, mounts, files, and runtime hints.
- Settings UI for a small profile/file editor and default profile management.
- Start session UI to select one compatible config profile or `None` before launching.
- Tests for profile resolution, override ordering, cycle detection, compatibility filtering, defaults, and launch application.