Skip to content

feat(sdk): prepare pinned Babysitter catalog export - #550

Merged
kjgbot merged 2 commits into
mainfrom
feat/babysitter-catalog-export
Sep 22, 2026
Merged

kjgbot merged 2 commits into
mainfrom
feat/babysitter-catalog-export

Conversation

@AgentRelayBot

@AgentRelayBot AgentRelayBot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Cloud #3940 must not enable Babysitter from the legacy Claude/comment extension or mutable references. This adds a read-only exporter that fetches an immutable AgentWorkforce/flows ref through the existing SDK, verifies independently supplied bundle and manifest digests, and requires the native Codex/cloud:babysitter-turn permission declaration. It preserves digest-bound manifest bytes, never executes handler code, and refuses to overwrite an output file.

The handoff document identifies the existing Software Factory catalog JSON/API and Cloud parser. This PR does not publish an artifact, change catalog entries, or enable execution. Native handler implementation, reviewed artifact pins, catalog provenance, and released lineage/native-delivery/receipt dependencies remain blockers. #549 intentionally refuses matched handlers; changing permission strings on the old handler cannot close that gap.

Validation used the repository CI local-Surface override (npm ci --prefix packages/surface --ignore-scripts, then npm install ./packages/surface --prefix packages/sdk --no-save --ignore-scripts). Initial installed dependencies lacked current Surface hooks/events and relay-helpers rampClient; refreshing/building the local dependencies resolved those setup failures. No dependency manifests or gates changed.

Captured verification (also committed at evidence/babysitter-catalog-export/verification.txt):

$ (cd . && npm run build --prefix packages/surface)

> @relayflows/surface@2.0.25 build
> tsc

Exit: 0

$ (cd packages/sdk && npm run typecheck)

> @relayflows/sdk@2.0.25 typecheck
> tsc --noEmit && tsc -p tsconfig.type-tests.json

Exit: 0

$ (cd packages/sdk && npm run typecheck:tests)

> @relayflows/sdk@2.0.25 typecheck:tests
> tsc -p tsconfig.tests.json

Exit: 0

$ (cd packages/sdk && npm run build)

> @relayflows/sdk@2.0.25 build
> tsc && node scripts/make-cli-executable.mjs

Exit: 0

$ (cd packages/sdk && ./node_modules/.bin/vitest run tests/babysitter-catalog-export.test.ts)

 RUN  v2.1.9 /Users/khaliqgant/Projects/AgentWorkforce/flows/packages/sdk

 ✓ tests/babysitter-catalog-export.test.ts (13 tests) 358ms

 Test Files  1 passed (1)
      Tests  13 passed (13)
   Start at  01:22:27
   Duration  3.14s (transform 759ms, setup 0ms, collect 1.37s, tests 358ms, environment 0ms, prepare 226ms)

Exit: 0

CLI regression follow-up: invokes the real command with offline GitHub responses and covers successful export, EEXIST with byte preservation, and digest refusal without output creation.

$ (cd packages/sdk && npm run build && npm run typecheck:tests && ./node_modules/.bin/vitest run tests/babysitter-catalog-export.test.ts)

> @relayflows/sdk@2.0.25 build
> tsc && node scripts/make-cli-executable.mjs


> @relayflows/sdk@2.0.25 typecheck:tests
> tsc -p tsconfig.tests.json


 RUN  v2.1.9 /Users/khaliqgant/Projects/AgentWorkforce/flows/packages/sdk

 ✓ tests/babysitter-catalog-export.test.ts (14 tests) 2030ms
   ✓ Babysitter catalog artifact export > CLI refuses an existing output and leaves no file on validation failure 1689ms

 Test Files  1 passed (1)
      Tests  14 passed (14)
   Start at  01:35:33
   Duration  4.82s (transform 715ms, setup 0ms, collect 1.25s, tests 2.03s, environment 0ms, prepare 293ms)

Exit: 0

Note

Low Risk
Adds offline export/validation tooling and docs only; it does not change catalog data, Cloud enablement, or extension execution paths.

Overview
Adds a read-only SDK path to produce a pinned Babysitter FlowExtensionSubmission for the server-owned Software Factory catalog, without publishing an artifact or enabling runtime Babysitter.

exportBabysitterCatalogBundle reuses resolveExtensionSubmission to fetch a canonical AgentWorkforce/flows commit ref, then enforces independently supplied bundle/manifest SHA-256 pins, Software Factory compatibility, the native permission shape (GitHub + Codex, no MCP, only cloud:babysitter-turn), and handlers-only manifests. It returns digest-bound manifest bytes and does not execute handler code. A small CLI writes JSON with wx so failed validation or duplicate runs cannot truncate an existing export.

Vitest covers pin drift, mutable refs, overbroad manifests, byte preservation, and CLI EEXIST / no-output-on-failure behavior. docs/BABYSITTER-CATALOG-HANDOFF.md documents export steps, catalog insertion targets, and explicit blockers (native handler, catalog provenance, lineage/receipts); committed evidence/ captures build/test runs.

Reviewed by Cursor Bugbot for commit b74fb5b. Bugbot is set up for automated code reviews on this repo. Configure here.

Session-Id: 01a0c82b-2431-7510-9d21-2babb4d23a07
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 0d31f887-e724-4b3b-8b36-830cdb86d388


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Session-Id: 01a0c82b-2431-7510-9d21-2babb4d23a07
@AgentRelayBot
AgentRelayBot marked this pull request as ready for review September 22, 2026 08:45
@AgentRelayBot

Copy link
Copy Markdown
Contributor Author

CLI follow-up is complete at b74fb5b. Marked ready for review for publication-prep scope only. No native artifact was published and activation is not enabled. Focused CLI evidence is in evidence/babysitter-catalog-export/cli-regression.txt.

$ gh pr checks 550
Cursor Bugbot	pending	0	https://cursor.com/docs/bugbot	
cubic · AI code reviewer	pending	0	https://www.cubic.dev/pr/AgentWorkforce/flows/pull/550	
guard	pass	7s	https://github.com/AgentWorkforce/flows/actions/runs/35706523065/job/106676667116	
npm	skipping	0	https://github.com/AgentWorkforce/flows/actions/runs/35705713644/job/106674285921	
pages	skipping	0	https://github.com/AgentWorkforce/flows/actions/runs/35705713644/job/106674286357	
CodeRabbit	pass	0		Review skipped: manual review required for this OSS repository
linux-x64-artifact	pass	8m12s	https://github.com/AgentWorkforce/flows/actions/runs/35705713549/job/106673993591	
packed-consumer	pass	55s	https://github.com/AgentWorkforce/flows/actions/runs/35705713684/job/106673996147	
validate	pass	14s	https://github.com/AgentWorkforce/flows/actions/runs/35705713644/job/106674003672	

@kjgbot
kjgbot merged commit 607ac67 into main Sep 22, 2026
10 checks passed
kjgbot pushed a commit that referenced this pull request Sep 22, 2026
Add extensions/babysitter, a schema-2 extension on software-factory whose
eleven GitHub handlers turn Cloud's normalized delivery descriptor into one
cloud:babysitter-turn queue call:
f.capabilities.cloud.babysitterTurn.queue({ delivery }). It sends no
findings, head, label, session, lineage, or config. Unknown input, receipts
other than queued|duplicate, rejections, and a missing capability fail the
run. The manifest matches the #550 exporter permission shape.

#549's refusal is unchanged: hosted execution still refuses the handler
with plugin_unsupported. compat requires the surface release after 2.0.25.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Session-Id: 7d116c0d-6756-4905-ace7-1235559066ed

Co-authored-by: agentrelaybot <agentrelaybot@agentrelay.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants