You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mocactl: headless 'sessions' (and 'credentials') commands with --json #406
Found preparing the VM demo B runbook (#367, PR #403, fix-list item 5).
Problem
The headless CLI has only login, doctor and run (packages/mocactl/src/cli.ts:6-12). Listing sessions and adding credentials exist only in the TUI overlays (/sessions, /credentials). So the two-user acceptance run's "my list excludes the other user's sessions" check (Act 2a) is done with curl and a hand-built header file, and a scripted setup can't store an inference credential without the TUI.
Proposal
mocactl sessions [--json]: GET /v1/sessions, paginated, with id, title, created and last-turn times.
mocactl sessions delete ID.
mocactl credentials [--json], and mocactl credentials add NAME --kind … --consumer inference --host … --endpoint …, with the secret read from stdin, never argv.
A stable --json shape documented in packages/mocactl/README.md.
Related: #381 adds subagent-specific commands (spawn, subagents, …) over the same API. Share the output and --json conventions, and don't duplicate a sessions listing.
Not on the critical path
The acceptance run works with the TUI plus curl (documented in the runbook).
Activity
feat(mocactl): headless sessions and credentials commands with --json (…
Merge pull request #416 from pdettori/feat/406-headless-sessions-cred…