feat(auth): define CLI session and credential contracts - #34
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
concern: stack-wide regeneration boundary for the later Scalar-integration layers; this does not block #34. I confirmed the branch model is correct: official At the prepared stack tip ( Reference: https://scalar.com/products/sdk-generator/custom-code |
|
question: the later operation-catalog layer adds a second Dedalus-owned generator, I see the concrete reason: pristine Scalar output at When #23/#24 are opened officially, please call out this ownership decision and its exit condition explicitly: this generator is a bridge for the missing Scalar command catalog, not part of the authentication architecture, and should be removable if Scalar begins emitting the operation catalog natively. Keeping that boundary explicit prevents the auth stack from silently becoming a permanent fork of Scalar command generation. |
Linear Issue
Ref ENG-743
Summary
What:
Introduces the provider-neutral CLI session model and credential-storage contract needed by the Scalar-generated CLI authentication stack. It also enables the custom stack test command in CI and pins stable machine-readable credential error codes.
Why:
This is the first reviewable slice of the Clerk CLI authentication customization currently maintained in the
stephanieatdedalus/dedalus-clifork. It establishes the contracts required by the secure storage, OAuth, lifecycle, and Scalar runtime integrations that follow.Lines added: 166
Test Plan
npm testnpm run typecheckRepro / Showcase
N/A — foundational auth contracts with unit coverage.
Tests Added
Documentation
docs/): N/AReviewers
Notes for Reviewers
Base is
scalar-next, the Scalar-generated customization branch. This is stack 1 of 24; later prepared branches add secure credential storage, Clerk OAuth/PKCE, session lifecycle, safe output/errors, Scalar runtime wiring, and generated resource-command compatibility.Changelog
2026-08-21
Feedback received:
Changes made:
Browser counterpart
The validated Clerk browser handoff is reviewed in https://github.com/dedalus-labs/dedalus/pull/5530 and its browser stack. This CLI stack owns loopback callback setup, PKCE exchange, token persistence, refresh, logout, Scalar runtime injection, and generated resource-command authentication.