MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / composeHeadlessCommand

Function composeHeadlessCommand

src/workspaces/adapters/opencode.ts:109–111  ·  view source on GitHub ↗
(_base: readonly string[], _ctx: SpawnContext, prompt: string)

Source from the content-addressed store, hash-verified

107 // prompt is the trailing positional after a `--` end-of-options terminator
108 // (so a `-`-leading prompt isn't read as a flag).
109 composeHeadlessCommand(_base: readonly string[], _ctx: SpawnContext, prompt: string): readonly string[] {
110 return ['opencode', 'run', '--format', 'json', '--', prompt];
111 },
112
113 // `opencode run --format json` events carry a top-level `sessionID`
114 // (`ses_…`) from the first line (verified 2026-06-11) — resumable via

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected