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
Browser extension owns classification logic (decides resource vs note vs prompt)
Three separate endpoints: POST /api/ext/save-resource, POST /api/ext/save-note, POST /api/ext/save-prompt
No API key authentication — extension uses session cookie only
No SDK — every client implements its own HTTP layer
No webhook events
Target state
Single POST /api/v1/capture endpoint consumed by every client. API key authentication for non-browser clients. @devventory/sdk package used by all clients. Backend owns classification, enrichment, relationships, and tagging. Browser extension becomes a thin client — one of 14+ possible clients (CLI, VS Code, Raycast, bots, MCP, n8n, etc.).
Phases
Phase A — Capture API + API Keys (~2 days)
POST /api/v1/capture route with Zod validation
Unified auth middleware supporting both sessions and API key Bearer tokens
Current state
POST /api/ext/save-resource,POST /api/ext/save-note,POST /api/ext/save-promptTarget state
Single
POST /api/v1/captureendpoint consumed by every client. API key authentication for non-browser clients.@devventory/sdkpackage used by all clients. Backend owns classification, enrichment, relationships, and tagging. Browser extension becomes a thin client — one of 14+ possible clients (CLI, VS Code, Raycast, bots, MCP, n8n, etc.).Phases
Phase A — Capture API + API Keys (~2 days)
POST /api/v1/captureroute with Zod validationApiKeyPrisma model + migration (name, prefix, hash, scopes, expiresAt, revokedAt)Phase B — SDK (~1 day)
packages/sdk/withDevventoryclasscapture(),search(),resources.*,notes.*,prompts.*fetch)@devventory/typesPhase C — Extension refactor (~2 days)
@devventory/sdkin extensiondv.capture()Phase D — Deprecate old endpoints (~1 day)
POST /api/ext/save-*POST /api/ext/save-resourcePOST /api/ext/save-notePOST /api/ext/save-promptPhase E — New clients (future issues)
npx devventory capture)Files changed
apps/web/src/app/api/v1/capture/route.tsapps/web/src/lib/auth/api-auth.tsapps/web/prisma/schema.prismaapps/web/src/app/settings/api-keys/page.tsxpackages/sdk/src/index.tsapps/extension/entrypoints/background.tsapps/extension/entrypoints/content.tsapps/extension/context-engine/capabilities.tsapps/web/src/app/api/ext/save-resource/route.tsapps/web/src/app/api/ext/save-note/route.tsapps/web/src/app/api/ext/save-prompt/route.tsArchitecture
Full specification in
ARCHITECTURE.md.Acceptance criteria
POST /api/v1/captureaccepts captures from any client (extension, curl, SDK)