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

Function composeHeadlessCommand

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

Source from the content-addressed store, hash-verified

99 // 0.78.1), so the prompt is a bare trailing positional — a prompt literally
100 // starting with `-`/`--` is unprotected on pi (rare for task prompts).
101 composeHeadlessCommand(_base: readonly string[], _ctx: SpawnContext, prompt: string): readonly string[] {
102 return ['pi', '-p', '--mode', 'json', prompt];
103 },
104
105 // pi `--mode json` line 1 is `{"type":"session","id":…,"cwd":…}` — pi mints
106 // its own id on a fresh headless run and announces it immediately (verified

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected