feat(capabilities): PR-8 — capability standard export + draft_capability generator#684
Merged
Conversation
…ity generator (G1 authoring) Author-by-derivation (plan §3.5): a provider supplies only irreducible facts; storyboard generates every derivable field + refuses non-compliant input. - lib/capabilities/standard.ts (browser-safe): the machine-readable standard — kinds, output-kinds, modality vocabulary + live-registry modalities, agent-param names, input transforms, naming grammar. + isKnownModality / suggestModalities. - app/api/capabilities/standard/route.ts: public cached GET so a provider / their agent authors against the current standard (same one the sync + validator use). - lib/mcp-server/tools/draft-capability.ts: draft_capability verb — pure buildDraft (derive semantic_key + canonical name + output_kind, assemble, validate) + dedupVerdict (NEW / ADD-CAPACITY / SYNONYM) + a modality-vocabulary check. Returns a ready-to-publish descriptor. - server.ts: register draft_capability. Additive; reuses PR-1 schema + PR-3 canonicalName/dedup. 9 tests + golden green. (CLI `cap init` wrapper over the same buildDraft is a thin follow-up.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… next build) describe_capability's defaultInvokeVia(entry?.output_kind) passes OutputKind | null | undefined, but the param was typed string | undefined — `null` isn't assignable, so `next build`'s type-check failed (vitest/esbuild doesn't typecheck, so it slipped through PR-4's #683 gate; main is red on Vercel as a result). Widen the param to string | null | undefined (the `?? "image"` already handles null at runtime). tsc clean on all touched files. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR-8 of zero-code onboarding (plan §3.5 author-by-derivation, gap G1-authoring). The anti-error layer: a provider gives irreducible facts; storyboard generates the derivable identity + refuses non-compliant input.
lib/capabilities/standard.ts— machine-readable standard (kinds, output-kinds, modality vocabulary + live-registry modalities, agent-param names, transforms, naming grammar) +isKnownModality/suggestModalities.GET /api/capabilities/standard— public cached endpoint; provider/agent authors against the same standard the sync + validator use.draft_capabilityMCP verb — purebuildDraft(derives semantic_key + canonical name + output_kind, assembles, validates) +dedupVerdict(NEW/ADD-CAPACITY/SYNONYM) + modality-vocabulary check; returns a ready-to-publish descriptor.Additive; reuses PR-1 schema + PR-3 canonicalName/dedup. 9 tests + golden green. CLI
cap initwrapper over the samebuildDraftis a thin follow-up.🤖 Generated with Claude Code