Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
# Tasks — `@suaveplan/api-auth-rolled`
## 1. Spec authoring
- [x] 1.1 Read design doc (§2.3)
- [x] 1.2 Read `openspec/AGENTS.md` Sections 13 and 14
- [x] 1.3 Draft `proposal.md` — focused session-resolver scope
- [x] 1.4 Draft `specs/api-auth-rolled/spec.md`
- [x] 1.5 Every requirement carries `**Verified by:**`
## 2. Implementation
- [x] 2.1 Scaffold `packages/api-stack/api/api-auth-rolled/`
- [x] 2.2 `src/error-codes/` — 20-code registry
- [x] 2.3 `src/options/` — Zod-validated options + named defaults
- [x] 2.4 `src/token-rotator/` — rotating-key state machine
- [x] 2.5 `src/principal-projection/` — DB row → `Principal`
- [x] 2.6 `src/session/` — JWT signing + verification + cookie/bearer extraction
- [x] 2.7 `src/security-schemes/` — `api-openapi` contribution
- [x] 2.8 `src/composition/` — `createRolledAuthAdapter` factory + conformance
- [x] 2.9 `src/index.ts` — explicit named re-exports
## 3. Tests
- [x] 3.1 `error-codes.test.ts`
- [x] 3.2 `options.test.ts`
- [x] 3.3 `token-rotator.test.ts`
- [x] 3.4 `principal-projection.test.ts`
- [x] 3.5 `session.test.ts` — happy path + expired + revoked + retired kid
- [x] 3.6 `security-schemes.test.ts`
- [x] 3.7 `composition.spec-conformance.test.ts` — every code triggered
- [x] 3.8 `composition.test.ts` — `createRolledAuthAdapter` surface
## 4. Documentation
- [x] 4.1 Sibling `.md` per implementation `.ts`
- [x] 4.2 `README.md` `## Modules`
## 5. Pre-archive verification
- [x] 5.1 `bunx turbo lint typecheck test --filter=@suaveplan/api-auth-rolled` (gate)
- [x] 5.2 `bunx turbo test:coverage --filter=@suaveplan/api-auth-rolled` 100/100/100/100
## 6. Archive
- [x] 6.1 Fold spec delta into `openspec/specs/api-auth-rolled/spec.md`
- [x] 6.2 Move folder to archive
- [x] 6.3 Tick `8.12` in umbrella tasks
- [x] 6.4 Refresh `MANIFEST.md`