Skip to content

fix(schemas): allow modelName, setAuthParams, getAuthorizationRequirements in api-module definition - #701

Open
seanspeaks wants to merge 7 commits into
nextfrom
cursor/api-module-schema-fields-1721
Open

seanspeaks wants to merge 7 commits into
nextfrom
cursor/api-module-schema-fields-1721

Conversation

@seanspeaks

@seanspeaks seanspeaks commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allows modelName, setAuthParams, and getAuthorizationRequirements in the api-module definition schema.

Also includes

Port of PR #639’s EventBridge scheduler lazy-load (@aws-sdk/client-scheduler loaded in the adapter constructor, declared as a core dependency) so CLI/canary consumers of @friggframework/core do not crash on require. #639 itself was left untouched (#639 is stale vs next); only the scheduler fix was ported here for the #701 → #702 stack.

Open in Web Open in Cursor 
📦 Published PR as canary version: 2.0.0--canary.701.32f702a.0

✨ Test out this PR locally via:

npm install @friggframework/admin-scripts@2.0.0--canary.701.32f702a.0
npm install @friggframework/core@2.0.0--canary.701.32f702a.0
npm install @friggframework/devtools@2.0.0--canary.701.32f702a.0
npm install @friggframework/eslint-config@2.0.0--canary.701.32f702a.0
npm install @friggframework/prettier-config@2.0.0--canary.701.32f702a.0
npm install @friggframework/schemas@2.0.0--canary.701.32f702a.0
npm install @friggframework/serverless-plugin@2.0.0--canary.701.32f702a.0
npm install @friggframework/test@2.0.0--canary.701.32f702a.0
npm install @friggframework/ui@2.0.0--canary.701.32f702a.0
# or 
yarn add @friggframework/admin-scripts@2.0.0--canary.701.32f702a.0
yarn add @friggframework/core@2.0.0--canary.701.32f702a.0
yarn add @friggframework/devtools@2.0.0--canary.701.32f702a.0
yarn add @friggframework/eslint-config@2.0.0--canary.701.32f702a.0
yarn add @friggframework/prettier-config@2.0.0--canary.701.32f702a.0
yarn add @friggframework/schemas@2.0.0--canary.701.32f702a.0
yarn add @friggframework/serverless-plugin@2.0.0--canary.701.32f702a.0
yarn add @friggframework/test@2.0.0--canary.701.32f702a.0
yarn add @friggframework/ui@2.0.0--canary.701.32f702a.0

Note

Low Risk
Changes are schema/CLI validation and documentation; they do not alter runtime auth or deployment behavior unless consumers relied on previously invalid module shapes.

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

@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for friggframework-org canceled.

Name Link
🔨 Latest commit 32f702a
🔍 Latest deploy log https://app.netlify.com/projects/friggframework-org/deploys/6adc9d134eb861e21ee21dd5

@seanspeaks seanspeaks added the release Create a release when this pr is merged label Oct 20, 2026 — with Cursor
cursor Bot pushed a commit that referenced this pull request Oct 20, 2026
Add frigg validate --module (also frigg validate module) to load Definition
from ./index.js, run validateApiModuleDefinition and checkModuleDefinition,
and exit non-zero with JSON field paths. Supports --json and -v.

Stacked on #701 (api-module schema fields) and includes #666 (ADR-051
frigg validate app mode) so the CLI canary has both.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
cursor Bot pushed a commit that referenced this pull request Oct 20, 2026
Add frigg validate --module (also frigg validate module) to load Definition
from ./index.js, run validateApiModuleDefinition and checkModuleDefinition,
and exit non-zero with JSON field paths. Supports --json and -v.

Stacked on #701 (api-module schema fields) and includes #666 (ADR-051
frigg validate app mode) so the CLI canary has both.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
cursor Bot pushed a commit that referenced this pull request Oct 20, 2026
Retriggers a solo #702 canary after a concurrent #701/#702 release race
left @friggframework/core and @friggframework/test unpublished for
2.0.0--canary.702.0c74b9c.0 while devtools still depended on them.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
@cursor

cursor Bot commented Oct 24, 2026

Copy link
Copy Markdown

Frigg 2.0.1 review (Group 2) — COMMENT only

Checklist (with #666 / #702)

  • Allow modelName, setAuthParams, getAuthorizationRequirements on api-module definition schema: pass
  • Consistent with #666 structural checks: pass (checkModuleDefinition still requires the auth method functions; schema now accepts the descriptors the view emits)

Verdict (would): would approve

Findings

None blocking. toApiModuleDefinitionSchemaView correctly turns functions into { type: 'function' } descriptors. Note: modelName remains optional in schema while v1 entity routing still needs a reliable name (modelName ?? moduleName) once getEntityModelFromDefinition is restored (#667 finding).

@cursor

cursor Bot commented Oct 24, 2026

Copy link
Copy Markdown

Follow-up (COMMENT)

should-fix (merge with #705): api-module-definition.schema.json still uses the legacy $id (https://schemas.friggframework.org/...). #705 rewrites the same file to https://friggframework.org/schemas/api-module-definition/v1.0.json.

Scenario: Merge order without reconciling $id + re-running sync:hosted → hosted v1.0 missing modelName / setAuthParams / getAuthorizationRequirements, or a conflict that drops one side’s changes. Keep the field additions and take #705’s $id, then sync.

@seanspeaks
seanspeaks force-pushed the cursor/api-module-schema-fields-1721 branch from d5e6de1 to 3b01ea3 Compare October 24, 2026 04:48
seanspeaks added a commit that referenced this pull request Oct 24, 2026
Retriggers a solo #702 canary after a concurrent #701/#702 release race
left @friggframework/core and @friggframework/test unpublished for
2.0.0--canary.702.0c74b9c.0 while devtools still depended on them.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
seanspeaks added a commit that referenced this pull request Oct 24, 2026
Add frigg validate --module (also frigg validate module) to load Definition
from ./index.js, run validateApiModuleDefinition and checkModuleDefinition,
and exit non-zero with JSON field paths. Supports --json and -v.

Stacked on #701 (api-module schema fields) and includes #666 (ADR-051
frigg validate app mode) so the CLI canary has both.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
cursoragent and others added 7 commits October 24, 2026 07:56
…ments in api-module definition

Add top-level modelName and API-key auth methods to the api-module-definition
schema (additionalProperties remains false). validateApiModuleDefinition now
accepts real Definitions via a schema view. Docs and Fathom fixture tests included.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
devtools depends on @friggframework/test at the canary version. A
packages/test change ensures lerna/auto includes it when cutting the
#702 canary (same pattern as the core package.json bump).

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
Retriggers a solo #702 canary after a concurrent #701/#702 release race
left @friggframework/core and @friggframework/test unpublished for
2.0.0--canary.702.0c74b9c.0 while devtools still depended on them.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
Add frigg validate --module (also frigg validate module) to load Definition
from ./index.js, run validateApiModuleDefinition and checkModuleDefinition,
and exit non-zero with JSON field paths. Supports --json and -v.

Stacked on #701 (api-module schema fields) and includes #666 (ADR-051
frigg validate app mode) so the CLI canary has both.

Co-authored-by: Sean Matthews <sean.matthews@lefthook.co>
@seanspeaks
seanspeaks force-pushed the cursor/api-module-schema-fields-1721 branch from 3b01ea3 to 32f702a Compare October 24, 2026 11:57
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
19.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@seanspeaks
seanspeaks marked this pull request as ready for review October 24, 2026 12:01

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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.

@seanspeaks

Copy link
Copy Markdown
Contributor Author

Rebase note for reviewers (rebased onto next after #666, head 32f702aa):

🤖 Generated with Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 32f702a. Configure here.

@@ -1,5 +1,6 @@
{
"name": "@friggframework/core",
"description": "Core framework for Frigg integrations (handlers, modules, encryption, database).",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate package description is ignored

Low Severity

The new description is overwritten by a later empty description in the same package.json. JSON parsers keep the last key, so npm publishes @friggframework/core with an empty description.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 32f702a. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Create a release when this pr is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants