diff --git a/AGENTS.md b/AGENTS.md index 98698a7..1fa6178 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,7 +37,8 @@ Runtime: Node.js (ESM, `.mjs` throughout). No build step. No bundler. `server.mj - `lib/ir/` โ€” Intermediate Representation definition + serializers. Governed by ADR 0003. - `lib/cache/` โ€” content-addressed cache layer (per-key isolation, `cache_control` bypass, chunked stream replay, singleflight). Governed by ADR 0005. - `lib/fallback/` โ€” fallback engine (trigger detection, chain advancement, idempotent-failure safety, header annotation). Governed by ADR 0004. -- `lib/keys.mjs` โ€” multi-key auth, per-key namespacing, identity layer. Carries OCP's per-key isolation model into OLP. **๐ŸŸก Phase 2 โ€” D44 core + D45 server integration + D46 owner gating shipped (validateKey on every /v1/* + /health; chain filtered by providers_enabled; touchLastUsed fires post-response; /health payload trimmed for non-owner; X-OLP-Fallback-Detail gated by fallback_detail_header_policy). Remaining: keygen CLI bootstrap surface; Phase 2 close โ†’ v0.2.0.** +- `lib/keys.mjs` โ€” multi-key auth, per-key namespacing, identity layer. Carries OCP's per-key isolation model into OLP. **โœ… Phase 2 โ€” D44 core + D45 server integration + D46 owner gating shipped (validateKey on every /v1/* + /health; chain filtered by providers_enabled; touchLastUsed fires post-response; /health payload trimmed for non-owner; X-OLP-Fallback-Detail gated by fallback_detail_header_policy).** +- `bin/olp-keys.mjs` โ€” keygen CLI bootstrap surface per ADR 0007 ยง 9.1. **โœ… Shipped at D47.** Subcommands: `keygen [--owner|--name=X|--providers=csv|--force]`, `list [--owner-only|--include-revoked]`, `revoke --id=X`. Plaintext token printed once on keygen. Installed via `package.json bin` so `npx olp-keys ...` works (also `npm run olp-keys ...`). - `lib/audit.mjs` โ€” append-only ndjson audit per ADR 0007 ยง 6.2 + ยง 8. **๐ŸŸก D45 โ€” appendAuditEvent + getAuditDropCount shipped. Fires per /v1/chat/completions + /v1/models request including 401/403/5xx paths. Warn+1-retry on append failure; no memory buffer at Phase 2 (forward path).** - `dashboard.html` โ€” owner-only multi-provider dashboard (quota panels, fallback rate, cache hit rate). **๐Ÿ“‹ Planned (Phase 6) โ€” not yet authored.** - `models-registry.json` โ€” single source of truth for `(provider, model) โ†’ metadata`. SPOT. @@ -46,7 +47,7 @@ Runtime: Node.js (ESM, `.mjs` throughout). No build step. No bundler. `server.mj - `.github/workflows/alignment.yml` โ€” CI blacklist grep + per-provider citation soft check; fails the build on known-hallucinated tokens. - `CLAUDE.md` โ€” Claude-Code-specific session instructions + `release_kit` overlay (Iron Rule 5.5). -**Implementation status note (as of 2026-05-25):** Files marked ๐Ÿ“‹ above are designed and documented but not yet on disk; files marked ๐ŸŸก are partially shipped (specific components landed; others scheduled). For the full status table see `README.md ยง "Implementation status"`. The shipped set as of D46 is: `server.mjs` (with Phase 2 auth middleware + audit wire + owner-vs-non-owner gating), `lib/ir/`, `lib/providers/{anthropic,codex,mistral}.mjs`, `lib/cache/{keys,store}.mjs`, `lib/fallback/engine.mjs`, `lib/keys.mjs` (core + loadAuthConfigSync โ€” D44 + D45), `lib/audit.mjs` (D45), `models-registry.json`, `test-features.mjs` (Suites 19 + 20 + 21). Phase 2 in progress: keygen CLI bootstrap surface; Phase 2 close โ†’ v0.2.0 (maintainer-triggered). +**Implementation status note (as of 2026-05-25):** Files marked ๐Ÿ“‹ above are designed and documented but not yet on disk; files marked ๐ŸŸก are partially shipped; files marked โœ… are Phase 2 deliverables. The shipped set as of D47 is: `server.mjs` (with Phase 2 auth middleware + audit wire + owner-vs-non-owner gating), `lib/ir/`, `lib/providers/{anthropic,codex,mistral}.mjs`, `lib/cache/{keys,store}.mjs`, `lib/fallback/engine.mjs`, `lib/keys.mjs` (core + loadAuthConfigSync โ€” D44 + D45), `lib/audit.mjs` (D45), `bin/olp-keys.mjs` (D47), `models-registry.json`, `test-features.mjs` (Suites 19โ€“22). Phase 2 functional scope is complete; remaining is Phase 2 close โ†’ v0.2.0 (maintainer-triggered, explicit per CLAUDE.md `release_kit.phase_close_trigger`). --- diff --git a/CHANGELOG.md b/CHANGELOG.md index 5260148..74abcad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ All notable changes to OLP land here. Per `CLAUDE.md` release_kit overlay, this ## Unreleased +### D47 โ€” `bin/olp-keys.mjs` keygen CLI (Phase 2 functional scope closes) + +Fourth Phase 2 implementation D-day. Closes ADR 0007 ยง 10 acceptance criterion #9 (bootstrap workflow must be reproducible without manual file editing) by shipping a minimal keygen CLI per ยง 9.1. **Phase 2 functional scope is complete with this D-day** โ€” remaining work is Phase 2 close โ†’ v0.2.0 (maintainer-triggered, explicit per CLAUDE.md `release_kit.phase_close_trigger`). + +- **New file `bin/olp-keys.mjs`** (~250 lines): subcommand CLI with three subcommands: + - `keygen [--owner] [--name=