feat(cli): add direct headless extension API - #1157
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
8a77d78 to
c2a17a8
Compare
150db93 to
978e2d8
Compare
83a32fc to
f6ecb17
Compare
Stack
Position 2 of 6 in the Zoo CLI stack.
fm/zoo-cli-contracts(PR feat(cli): define Zoo protocol contracts #1150)fm/zoo-cli-host-security(planned)(main) <- contracts <- headless-api; GitHub uses the approved classic fallback because native submit reported stacked PRs are not enabled.Scope
completedstatus before one authoritative result.apps/clibehavior.Acceptance Evidence
pnpm --dir src test extension/__tests__/api-headless.spec.ts(5 tests)pnpm --dir src check-typespnpm --dir packages/types check-typesRisk
The facade is additive, but it touches canonical task cancellation and ask identity. Existing cancellation keeps rehydration by default; only the explicit headless path disables replacement-task creation. Run overrides remain on the next stack layer and are not represented as persisted headless configuration semantics here.
sequenceDiagram participant H as zoo-host participant A as Headless API participant T as Canonical task tree participant S as Task history H->>A: startHeadlessTask A->>T: createTask directly T-->>A: typed asks/events H->>A: respond(taskId, askId) T-->>A: root TaskCompleted A->>S: verify root status=completed S-->>A: persisted A-->>H: exactly one root result