Skip to content

feat(capabilities): PR-3 — discovery→registry sync (zero-code onboarding)#681

Merged
seanhanca merged 1 commit into
mainfrom
feat/cap-discovery-sync
Jul 19, 2026
Merged

feat(capabilities): PR-3 — discovery→registry sync (zero-code onboarding)#681
seanhanca merged 1 commit into
mainfrom
feat/cap-discovery-sync

Conversation

@seanhanca

Copy link
Copy Markdown
Contributor

PR-3 of the zero-code capability-provider onboarding effort (plan: LIVE-RUNNER-CAP-ADOPTION-PROPOSAL.html §4, gap G2). Builds on PR-1 (#680).

What

Ingests Capability Descriptors a provider publishes in their orchestrator's /discovery advertisement and runs them through the shipped cap-lifecycle — so onboarding needs no hand-run cap_add and no hardcoded per-cap map.

  • validate (PR-1) → dedup by semantic_keyNEW identity registers into the universal overlay (describable/listable) · EXISTING same-name = idempotent refresh · different name = synonym, skipped + reported.

Files (all new — additive)

  • lib/capabilities/discovery-sync.tspure projection + planner (descriptorToEntry, synthesizeUsage from the io contract, planDiscoverySync, extractDescriptors — tolerant of array / {runners} / {orchestrators} shapes, ignores legacy no-descriptor entries) + thin I/O (applyDiscoverySync, fetchDiscoveryDescriptors).
  • app/api/cron/capability-sync/route.tsDEFAULT-OFF (CAP_DISCOVERY_SYNC_ENABLED), CRON_SECRET-guarded, best-effort per URL.
  • tests/unit/capability-discovery-sync.test.ts — 12 tests.

No-regression guarantees

  • Additive: new module + a default-off route. No edits to any existing path — merging changes nothing until CAP_DISCOVERY_SYNC_ENABLED=1.
  • Fail-open: a bad descriptor/URL is skipped, never thrown.
  • Writes only the operator-governed universal overlay; dedup mirrors cap_add/cap_seed.
  • Golden characterization test green.

Consumes / enables

  • Reuses PR-1's validateDescriptor + the shipped registry-overlay.
  • Synthesizes a usage block so describe_capability shows the right verb (run_capability for text, create_media for media) — the run_capability verb lands in PR-4 (paired with PR-2's descriptor-driven SDK dispatch).

🤖 Generated with Claude Code

…ing G2)

Reads Capability Descriptors (PR-1) that a provider publishes in their
orchestrator's /discovery advertisement and runs them through the shipped
cap-lifecycle: validate → dedup by semantic_key → NEW identity registers into
the universal overlay (so the agent can describe/list it), EXISTING same-name is
an idempotent refresh, DIFFERENT name is a synonym and is SKIPPED + reported.
This turns "provider does work" into "it just works" — no hand-run cap_add, no
hardcoded per-cap map.

- lib/capabilities/discovery-sync.ts: PURE projection + planner (descriptorToEntry,
  synthesizeUsage from the io contract, planDiscoverySync, extractDescriptors —
  tolerant of array / {runners} / {orchestrators} shapes, ignores legacy
  no-descriptor entries) + thin I/O (applyDiscoverySync, fetchDiscoveryDescriptors).
- app/api/cron/capability-sync/route.ts: DEFAULT-OFF (CAP_DISCOVERY_SYNC_ENABLED),
  CRON_SECRET-guarded, best-effort per URL.

SAFETY: additive (new module + default-off route, no edits to existing paths);
fail-open (bad descriptor/URL skipped, never thrown); writes only the
operator-governed universal overlay. Golden green; 12 unit tests.

Plan: LIVE-RUNNER-CAP-ADOPTION-PROPOSAL.html §4 (PR-3). Reuses PR-1 descriptor
schema + the shipped registry-overlay + cap_add dedup semantics.

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

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
storyboard Ready Ready Preview, Comment Jul 19, 2026 11:43pm
storyboard-a3 Ready Ready Preview, Comment Jul 19, 2026 11:43pm
storyboard-creative-stage Ready Ready Preview, Comment Jul 19, 2026 11:43pm

Request Review

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.

1 participant