Skip to content

feat(auth): defer step-up and api-keys via package subpaths - #1404

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/auth-stepup-subpath-lazy-a621
Oct 26, 2026
Merged

cursor[bot] merged 3 commits into
mainfrom
cursor/auth-stepup-subpath-lazy-a621

Conversation

@danielsmithdevelopment

Copy link
Copy Markdown
Owner

Summary

Next Ready density lever after gateway jose/lazy getters (#1403):

  • New package exports: clawql-auth/step-up, clawql-auth/api-keys (tsup entries)
  • createClawQLAuth createRequires those subpaths on first use (DuckDB / jose pattern) — equal-arm apiKey/noAuth does not evaluate TOTP/WebAuthn or issued-key store modules
  • clawql-auth/gateway no longer star-exports api-keys
  • Gateway CJS ~78 KB (was ~103 KB) when step-up/api-keys stay external

Remasure (Bun --smol, N=2k equal-arm)

Arm Anon median
Catalog-on ~124.1 MB (JSON)
Catalog-off ~125.6 MB (JSON)

~0.5 MB vs tools-auth tip (~124.6 MB) — noise band; structural removal of step-up/api-keys from Ready evaluate path.

Stack

Based on cursor/gateway-auth-ready-lazy-a621 (#1403).

Next

Residual ~22–25 MB to peers (~99–102 MB) is unlikely more auth micro-slices — look at Effect / MCP SDK / catalog / host composition.

Test plan

  • npm run build -w clawql-auth — createRequire strings in gateway chunk; separate step-up/api-keys entries
  • vitest clawql-auth + src/gateway-auth.test.ts — 195 tests pass
  • Remasure JSON + memory-plateau.md
  • CI green
Open in Web Open in Cursor 

@cursor
cursor Bot force-pushed the cursor/gateway-auth-ready-lazy-a621 branch from 72a029e to 05d8ede Compare October 23, 2026 22:27
@cursor
cursor Bot force-pushed the cursor/auth-stepup-subpath-lazy-a621 branch 2 times, most recently from 51f933e to 40c66ed Compare October 23, 2026 22:34
@cursor
cursor Bot force-pushed the cursor/gateway-auth-ready-lazy-a621 branch from 841550b to 080cf1c Compare October 26, 2026 06:24
@cursor
cursor Bot force-pushed the cursor/auth-stepup-subpath-lazy-a621 branch from 40c66ed to 936d6bb Compare October 26, 2026 06:25
@cursor
cursor Bot deleted the branch cursor/gateway-auth-ready-lazy-a621 October 26, 2026 06:53
cursoragent and others added 3 commits October 26, 2026 06:53
Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
Add package subpath entries and load them from createClawQLAuth on first
use (DuckDB/jose pattern). Gateway barrel no longer star-exports api-keys;
gateway CJS drops ~103→~78 KB when step-up/issued-keys stay unevaluated.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
Equal-arm catalog-on ~124.1 MB anon median (~0.5 MB vs tools-auth tip;
noise band). Catalog-off ~125.6 MB.

Co-authored-by: Daniel Smith <danielsmithdevelopment@gmail.com>
@cursor
cursor Bot changed the base branch from cursor/gateway-auth-ready-lazy-a621 to main October 26, 2026 06:53
@cursor
cursor Bot force-pushed the cursor/auth-stepup-subpath-lazy-a621 branch from 936d6bb to b46bc70 Compare October 26, 2026 06:53
@cursor
cursor Bot merged commit 82cf5c4 into main Oct 26, 2026
23 checks passed
@cursor
cursor Bot deleted the cursor/auth-stepup-subpath-lazy-a621 branch October 26, 2026 07:22
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.

2 participants