3.5 KiB
3.5 KiB
| id | slug | title | status | kind | priority | labels | created_at | updated_at | assignee | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 20260531-043239-insomnia-pod-subcommand-runtime | insomnia-pod-subcommand-runtime | CLI: add insomnia pod runtime entrypoint | closed | task | P2 |
|
2026-05-31T04:32:39Z | 2026-05-31T04:50:14Z | null |
Background
Parent/umbrella ticket: single-binary-insomnia-cli.
The project currently has two installed command names:
insomniafrom thetuipackage for user-facing CLI/TUI/headless commands;insomnia-podfrom thepodpackage for Pod runtime processes.
The target direction is one primary executable, insomnia, with insomnia pod ... as the Pod runtime entrypoint. Pod runtime remains a separate process when spawned; only the binary/entrypoint is unified.
This ticket is the first implementation step. It should add the new insomnia pod ... runtime entrypoint and share Pod runtime startup code, without yet requiring all internal spawn paths or packaging to drop insomnia-pod in the same diff.
Requirements
- Extract the current
crates/pod/src/main.rsruntime startup into a library-callable entrypoint in thepodcrate.- Keep existing Pod runtime flags/semantics.
- Preserve
INSOMNIA-READYstderr handshake and detached process behavior.
- Keep the existing
insomnia-podbinary only as a temporary transition wrapper if needed for tests/current spawn defaults.- Do not present it as the long-term compatibility alias.
- Do not change Nix installed command set in this ticket unless it is mechanically necessary.
- Add
insomnia pod ...to the existinginsomniabinary in thetuicrate.insomnia pod --helpshould reach the Pod runtime parser/help.insomnia pod <runtime flags>should invoke the same library entrypoint as the old runtime path.- This means
insomnia podbecomes reserved as a subcommand; a Pod literally namedpodcan still be addressed through explicit--pod podif needed.
- Preserve existing user-facing TUI/CLI behavior for non-
podcommands:insomnia memory lintremains headless and returns before terminal/TUI/Pod side effects;- existing
insomnia <pod-name>/--pod/--multi/ resume behavior remains unchanged except for the reservedpodsubcommand.
- Do not yet switch
client::spawn_pod,SpawnPod, orRestorePoddefault command resolution toinsomnia podunless doing so is small and fully tested.- If not switched, create/fill a follow-up note for command resolution
program + prefix_argsmigration.
- If not switched, create/fill a follow-up note for command resolution
- Do not rename the
tuipackage/crate in this ticket.
Non-goals
- Removing
insomnia-podfrom packaging in this first step. - Keeping
insomnia-podas a long-term alias. - Merging Pod controller into the TUI process.
- Reworking Pod protocol or CLI UX beyond the new runtime subcommand.
- Feature-gating TUI dependencies.
Acceptance criteria
insomnia pod --helpworks and uses the Pod runtime parser/help.insomnia-pod --helpstill works if the temporary binary remains.insomnia memory lintstill runs headlessly without TUI/raw-terminal/Pod startup side effects.- Existing TUI parser tests are updated for the reserved
podsubcommand and preserve other positional Pod-name behavior. - Pod runtime startup code has one shared library path rather than duplicated main logic.
- Follow-up work for switching internal spawn defaults and removing
insomnia-podpackaging is recorded if not completed here. cargo fmt --check, focusedcargo testfor affected TUI/Pod CLI parsing,cargo check -p tui -p pod -p client,./tickets.sh doctor, andgit diff --checkpass.