Skip to content

feat: provider-neutral scaffold, review and agent guidance (#1052 S6) - #1063

Merged
jimhoyd merged 2 commits into
mainfrom
claude/provider-neutral-scaffold-1052
Sep 30, 2026
Merged

jimhoyd merged 2 commits into
mainfrom
claude/provider-neutral-scaffold-1052

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator

Part of #1052 (slice S6: provider-neutral scaffold and review hints).

What changes

  • Scaffold request: ScaffoldRequest gains principalProviders: the installed extensions whose descriptors declare providesPrincipal, sorted. extensions add fills it (and so does the scaffold preview on remove).
  • Store example: --example protects /api/todos and makes the collection ownership: owner when any principal provider is installed, not only the package named auth. With one provider it writes auth: true. With several it writes policies.extensions.<first>, because auth: true refuses to choose between them. The notes no longer assume Better Auth's session cookie. An auth that declares no principal no longer counts.
  • Review: the global-mutable-state hint still names the store. It now also names the native path: an ordinary npm database library imported by a trusted (non-sandbox) function.
  • Feature plan: the protected-endpoint outline names "the installed sign-in provider (the bundled auth extension by default)". The durable-collection outline also names the native path.
  • Agent guidance: "Prefer tested first-party extensions" becomes "Inspect the installed stack first; first-party extensions are defaults, not requirements", in the agents guide, both skills, docs/FRAMEWORK.md and llms-full.txt. The guide also says the tests/seed.json shape is keyed by the installed provider's extension name. The starter AGENTS.md and the plugin copy are regenerated.
  • Docs: docs/EXTENSIONS.md documents principalProviders. docs/STORE.md now says the example works with any sign-in provider.
  • Extension generator: scripts/create-extension.ts passes principalProviders in the generated tests.

Tests

  • packages/store/test/scaffold.test.ts: an independent provider (authjs) gets the protected per-user example. Two providers get policies.extensions, which core validates. An auth without providesPrincipal is refused without the acknowledgement.
  • test/addons.test.ts: an independent fixture package that declares providesPrincipal in its descriptor reaches its scaffold as principalProviders: ["greeting"]. Without the declaration it gets [].
  • test/review.test.ts and test/feature-plan.test.ts assert the native-path and provider-neutral wording.

npm run verify and npm run test:package pass locally, after merging current main (S2 and S5). The Auth.js end-to-end proof (npm run test:proof:authjs, which needs the registry) was not run.

🤖 Generated with Claude Code

jimhoyd and others added 2 commits September 30, 2026 10:40
The store's --example protects its mount when any installed extension
provides the request principal, not only the package named auth:
ScaffoldRequest carries principalProviders, filled from descriptors'
providesPrincipal. Review and feature-plan hints name the native path
(an ordinary npm database library in a trusted function) beside the
store, the protected-endpoint outline names the installed sign-in
provider, and agent guidance says to inspect the installed stack first
with first-party extensions as defaults; seeds are keyed by extension
name.

Part of #1052

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 30, 2026 15:49
@jimhoyd
jimhoyd merged commit 60bf85f into main Sep 30, 2026
29 checks passed
@jimhoyd
jimhoyd deleted the claude/provider-neutral-scaffold-1052 branch September 30, 2026 16:01
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