You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make route policy shorthand extension-defined rather than auth-specific core schema #710
Core's configuration model and type definitions contain a built-in auth route field and hard-code its expansion to policies.extensions.auth. normalizeRouteAuth() also requires extensions.auth, and its TypeScript shape duplicates the auth extension's policy keys, including bearer quota.
That makes a first-party extension's vocabulary part of generic core parsing, typing, revision behavior and documentation. Other extensions cannot define an equivalent ergonomic short form through their RuntimeExtension definition, schema or authoring contract.
Desired direction
Preserve compatibility for auth:, but move shorthand registration/normalization to an extension-declared capability or a generic core shorthand registry supplied by the trusted host. The generic contract should validate and canonicalize a declared mapping without knowing the extension name or policy-key shape. Add a focused fixture for a non-auth extension-defined shorthand and ensure no core type refers to auth policy fields.
Evidence
packages/core/src/config.ts: normalizeRouteAuth() directly checks and writes auth.
Decision (owner, 2026-09-25): keep auth: exactly as authors write it today, and move ownership of its contents to the auth extension. Core keeps only the mapping auth: X → policies.extensions.auth (with true meaning {}), and validates the value through the auth registration's own policySchema. That means:
no auth policy field shapes in packages/core/src/types.ts (RouteAuthConfig) or in the core YAML schema beyond "true or an object";
A general shorthand system that any extension can claim is not being built now: only auth needs one, and it would open route-key name clashes. Revisit if a second extension needs a shorthand.
Keep the #702 behaviour: an invalid auth: object must still name the failing field (now reported from auth's policy schema, via extensionPolicyError from #720). Removing needs-decision.
Activity
jimhoyd commentedon Sep 25, 2026
Decision (owner, 2026-09-25): keep
auth:exactly as authors write it today, and move ownership of its contents to the auth extension. Core keeps only the mappingauth: X→policies.extensions.auth(withtruemeaning{}), and validates the value through the auth registration's ownpolicySchema. That means:packages/core/src/types.ts(RouteAuthConfig) or in the core YAML schema beyond "trueor an object";A general shorthand system that any extension can claim is not being built now: only auth needs one, and it would open route-key name clashes. Revisit if a second extension needs a shorthand.
Keep the #702 behaviour: an invalid
auth:object must still name the failing field (now reported from auth's policy schema, viaextensionPolicyErrorfrom #720). Removingneeds-decision.Generated by Claude Code
refactor(core): auth owns the auth: route shorthand's policy shape (#710
feat: auth owns the auth: shorthand, extension activation errors, bod…