Request: bless a stable headless contract so a Linux desktop client can embed `cmd`
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- linux, node.js, react, tauri, typescript
Rechercherichtung
Beginne mit den in der Anfrage genannten headless-Einstiegspunkten: cmd -p --output-format json, --list-models, status --json, cmd login sowie der Behandlung von Fortsetzungen oder Abbrüchen. Vergleiche ihr aktuelles Verhalten bei command-code 1.56.0 und bestimme, welche Ereignis-, Modelllisten-, Authentifizierungs-, Signal-, Nebenläufigkeits- und Linux-Runtime-Verhaltensweisen dokumentiert oder stabilisiert werden können. Die Aufgabe ist erledigt, wenn der unterstützte Vertrag und alle erforderlichen Flags für Clients wie den vorgeschlagenen TypeScript-Adapter klar spezifiziert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Request: bless a stable headless contract so a Linux desktop client can embed cmd
Hi, I maintain MonoCode Linux, a Tauri + React desktop app that puts several coding CLIs behind one composer. Each provider gets a small adapter: the app spawns the CLI, streams its events into the transcript, and maps approvals, questions, cancel, resume, and model lists.
I want to add Command Code as a provider and I have headless mode mostly mapped: cmd -p --output-format json gives NDJSON events plus a final result line, --verbose prints the session id on stderr for later --resume, transcripts persist per directory under ~/.commandcode/projects/, and without --yolo file writes and shell commands stay blocked, which fits a supervised mode.
Before I wire up the adapter, I need a few things nailed down so it does not depend on behavior that might change:
- Is
--output-format jsonin-pmode a stable contract I can parse? I will ignore unknownevent.typevalues, but I want to know if theresultline shape is versioned anywhere. - Is there a machine-readable model list?
--list-modelsprints a table whilestatus --jsonalready emits JSON. A--jsonflag for models would remove table parsing. - What are the cancel semantics for a headless run? SIGINT/SIGTERM maps to exit 130. Does the transcript stay resumable after a kill, and is there a preferred way to stop a run from a parent process?
- Is
cmd loginpluscmd status --jsonthe supported headless auth check? Anything a desktop client should do differently? - Does
-psupport concurrent runs in the same directory, or should the client serialize turns per session? Related: is--continuesafe when no headless session exists yet (it starts fresh in my tests)? - Anything Linux-specific to know? The npm package needs Node 22+, which matters for an AppImage that resolves its own runtime search path.
What I can offer back: a reference adapter in TypeScript that spawns cmd -p --output-format json, maps the NDJSON stream onto transcript events, and handles resume, cancel, and model switching. Happy to shape it to whatever contract you bless, or to test an unstable flag and report back.
Tested on: command-code 1.56.0, Node v22.23.2, Linux x64.
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 4k
- Forks
- 350
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus CommandCodeAI/command-code
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CommandCodeAI/command-code#855 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
CommandCodeAI/command-code#841 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CommandCodeAI/command-code#655 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CommandCodeAI/command-code#608 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 70/100
CommandCodeAI/command-code#893 ·
Alle Issues in CommandCodeAI/command-code
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
get-convex/migrations#69 ·
-
kind:bug needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100