Repository navigation
feat: provider-neutral scaffold, review and agent guidance (#1052 S6) - #1063
Merged
Merged
Conversation
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]>
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.
Part of #1052 (slice S6: provider-neutral scaffold and review hints).
What changes
ScaffoldRequestgainsprincipalProviders: the installed extensions whose descriptors declareprovidesPrincipal, sorted.extensions addfills it (and so does the scaffold preview on remove).--exampleprotects/api/todosand makes the collectionownership: ownerwhen any principal provider is installed, not only the package namedauth. With one provider it writesauth: true. With several it writespolicies.extensions.<first>, becauseauth: truerefuses to choose between them. The notes no longer assume Better Auth's session cookie. Anauththat declares no principal no longer counts.docs/FRAMEWORK.mdandllms-full.txt. The guide also says thetests/seed.jsonshape is keyed by the installed provider's extension name. The starterAGENTS.mdand the plugin copy are regenerated.docs/EXTENSIONS.mddocumentsprincipalProviders.docs/STORE.mdnow says the example works with any sign-in provider.scripts/create-extension.tspassesprincipalProvidersin the generated tests.Tests
packages/store/test/scaffold.test.ts: an independent provider (authjs) gets the protected per-user example. Two providers getpolicies.extensions, which core validates. AnauthwithoutprovidesPrincipalis refused without the acknowledgement.test/addons.test.ts: an independent fixture package that declaresprovidesPrincipalin its descriptor reaches its scaffold asprincipalProviders: ["greeting"]. Without the declaration it gets[].test/review.test.tsandtest/feature-plan.test.tsassert the native-path and provider-neutral wording.npm run verifyandnpm run test:packagepass 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