Repository navigation
feat(core): capability manifests checked against the real API modules - #698
Conversation
…API modules Audit every manifest method against the Api classes in api-module-library and quo--frigg. Add args (positional calls), status: unimplemented (a definition warning, never an error) and webhook.status, fix renamed methods and shapes, add scripts/check-manifests.js and capabilities/AUDIT.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
…dules Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
…audit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
| if (t.type === 'webhook') { | ||
| if (!manifestOf[t.module]) err(`${p}.trigger.module`, `Unknown module key "${t.module}"`); | ||
| else if (!manifestOf[t.module].events?.[t.topic]) err(`${p}.trigger.topic`, `Module "${t.module}" emits no event "${t.topic}"`); | ||
| else if (manifestOf[t.module].webhook?.status === 'unimplemented' && (manifestOf[t.module].events[t.topic].delivery || 'webhook') === 'webhook') warn(`${p}.trigger`, `${t.module} events arrive by webhook, but the ${manifestOf[t.module].module} Api has no ${manifestOf[t.module].webhook.verify || 'verify'} method, so every delivery fails signature verification`); |
There was a problem hiding this comment.
Webhook syncs skip verify warning
Medium Severity
Unimplemented webhook verification warns only for webhook-triggered workflows. A sync with ongoing.mode webhook gets no warning, even though onWebhook still calls verify and rejects every delivery when that method is missing, so the sync never receives events.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 3f651f7. Configure here.
|
ADR reconciliation needed after Stack A/B — drafted with Claude Code at Sean's request Severity: must-reconcile. Capability manifests ( Overlap
Module paging is also described in ADR-054 §6's Proposed ADR-020 amendment (in this PR)
Code: move manifests to ship with the API module, as 063 §9 intends, rather than under Merge order: #648 (045 traits) → this PR with the 020 amendment → #700. The api-module-library PRs #105–#110 come before #700. |
…th modules - ADR-020: Amendment (ADR-063). The manifest is the serialised form of a module's Definition.capabilities; key convention (domain implied by the module for now, crm.contact.list the target); webhook events are webhook-source capabilities (ADR-054 contract 2); GET /api/capabilities moves to /api/v2/capabilities; /api/meta "capabilities" naming clash. - ADR-063 section 9: manifests should move to ship with each module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
…ier levels); neutral names in the manifest audit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGC9SnFuqdjX2xH2qeu8vw
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b1a2d30. Configure here.
| "output": "contact", | ||
| "args": [ | ||
| "properties" | ||
| ] |
There was a problem hiding this comment.
Create contact args unwrap properties wrapper
Medium Severity
hubspot.contact.create now sets args to ["properties"], so the runtime calls createContact with the inner properties object. The audited signature is createContact(body) with a single parameter, and HubSpot's create endpoint expects a properties envelope. Previously the whole input { properties: … } was passed as that one argument. Sync and workflow creates can POST a body the Api did not shape for, while contact.update already takes a bare properties argument as a second positional parameter.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b1a2d30. Configure here.
|
Release review follow-up: the ADR-020 amendment is now in this PR (
Generated by Claude Code |
Stack B review (COMMENT only) — Group 4Verdict (would merge?): would approve Should-fix
Notes
|
| @@ -0,0 +1,451 @@ | |||
| # Capability manifests against the real API modules | |||
There was a problem hiding this comment.
[should-fix] Modules listed here as unverified (but not unimplemented) still validate clean against mock manifests; runtime can then hit missing Api methods. No blocking findings on the checker itself — see top-level Stack B COMMENT summary.





Stack 7 of 9. Stacked on #697.
Summary
The capability manifests started out as mocks. This PR checks each one against the Api class it names.
scripts/check-manifests.js. It loads each module's Api with no network calls and nothing instantiated. Then it checks that everymethodexists and that every call matches the method's real signature.getContactById(id)), so a capability can now declareargs:"$rest", the remaining inputs as one object;{ "value": x }, a constant."status": "unimplemented". A definition that uses it validates with a warning, not an error.AUDIT.mdrecords the result per module: method renames, call-shape fixes, and what is missing upstream. It also notes the HubSpotupdateDealfix upstream.PR 9 resolves the missing methods.
Test plan
nextat this commit. Nothing new fails.real-manifests.test.jsexercises warnings andargsspreading.Generated by Claude Code
Note
Medium Risk
Changes how data-defined integrations invoke module APIs (positional
args); many capabilities are now marked unimplemented with validate-time warnings only, so workflows may pass validation but fail or skip behavior at runtime until modules catch up.Overview
Aligns data-defined capability manifests with real API module
Apiclasses instead of mock method names and single-object call shapes.Adds
scripts/check-manifests.jsandcapabilities/AUDIT.mdto load each module’sApi(no network) and report method existence, arity, and webhookverify. Manifests for nine checked modules gainargs(positional inputs,"$rest",{ "value" }constants),status: "unimplemented"with notes where upstream is missing or mismatched, and corrected method names (e.g. HubSpotgetContactById, PhonecreateUnifiedWebhook). Runtime now spreads arguments viaargumentsForthroughruntime.js,data-defined-integration.js, and tests/fakes.Validation extends the manifest schema and
manifests.js(strictargs/ no silent dropped inputs) andvalidate.jsso definitions that reference unimplemented capabilities, sync paths, option lists, or webhook verification get warnings, not hard errors. Example definitions drop unsupported inputs (e.g. HubSpotproperties, Asanaopt_fields). ADRs 020 and 063 document manifest ↔ capability graph alignment and future co-location of manifests in module packages.Reviewed by Cursor Bugbot for commit b1a2d30. Bugbot is set up for automated code reviews on this repo. Configure here.
📦 Published PR as canary version:
2.0.0--canary.698.b1a2d30.0✨ Test out this PR locally via:
npm install @friggframework/admin-scripts@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/core@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/devtools@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/eslint-config@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/prettier-config@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/schemas@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/serverless-plugin@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/test@2.0.0--canary.698.b1a2d30.0 npm install @friggframework/ui@2.0.0--canary.698.b1a2d30.0 # or yarn add @friggframework/admin-scripts@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/core@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/devtools@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/eslint-config@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/prettier-config@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/schemas@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/serverless-plugin@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/test@2.0.0--canary.698.b1a2d30.0 yarn add @friggframework/ui@2.0.0--canary.698.b1a2d30.0