spawn: [spawn].presets config schema + resolution (shared) #22

Closed
opened 2026-06-20 14:38:57 +01:00 by naps62-yolo · 0 comments
Collaborator

Command presets for the spawn form, defined in shared config so every binary (web via daemon advertisement, TUI later) sees the same list.

Schema (maestro-config)

New optional [spawn] table in ~/.config/maestro/config.toml:

[spawn]
presets = [
  { id = "claude",   label = "Claude",   command = "claude" },
  { id = "opencode", label = "opencode", command = "opencode" },
  { id = "zsh",      label = "Shell",    command = "zsh" },
]

A preset is { id, label, command }.

Resolution

  • Built-in defaults: claude, opencode, zsh. custom (free-text command) is always appended implicitly.
  • If [spawn].presets is present it replaces the built-in list (custom still auto-appended); absent → built-ins.
  • Validate: id non-empty + unique, command non-empty.

Tests

Unit tests over default resolution, override-replaces, custom-auto-append, validation failures.


Part of #21 (spawn dialog rework).

Command presets for the spawn form, defined in shared config so every binary (web via daemon advertisement, TUI later) sees the same list. ### Schema (`maestro-config`) New optional `[spawn]` table in `~/.config/maestro/config.toml`: ```toml [spawn] presets = [ { id = "claude", label = "Claude", command = "claude" }, { id = "opencode", label = "opencode", command = "opencode" }, { id = "zsh", label = "Shell", command = "zsh" }, ] ``` A preset is `{ id, label, command }`. ### Resolution - Built-in defaults: `claude`, `opencode`, `zsh`. `custom` (free-text command) is **always appended implicitly**. - If `[spawn].presets` is present it **replaces** the built-in list (custom still auto-appended); absent → built-ins. - Validate: `id` non-empty + unique, `command` non-empty. ### Tests Unit tests over default resolution, override-replaces, custom-auto-append, validation failures. --- Part of #21 (spawn dialog rework).
naps62-yolo self-assigned this 2026-06-20 21:42:06 +01:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Reference: naps62/maestro#22