Files
joelhooks__joelclaw/apps/web/package.json
Joel Hooks a02ece9702 feat(memory): Phase 1 slice — memory/run.captured + POST /api/runs
Adds the central ingest path for agent Run capture per ADR-0243 build order
steps 5 and 6:

packages/memory
  - src/schemas/runs.ts — Typesense `runs_dev` collection schema covering
    the full Run row from types.ts
  - src/nas.ts — blob writer honoring Rule 11 (user-partitioned paths);
    env var MEMORY_RUN_STORE defaults to ~/.joelclaw/runs-dev/ for local
    development, set to /nas/memory/runs in production

packages/system-bus
  - new memory/run.captured + memory/run.indexed event contracts
  - new functions/memory/run-captured.ts — receives event, loads jsonl
    from NAS (or inline payload), format-detects, chunks via per-turn
    chunker, embeds each chunk at ingest-realtime priority through
    @joelclaw/inference-router (so queries preempt), writes chunks to
    run_chunks_dev and Run row to runs_dev, emits OTEL + fanout indexed
    event; concurrency:4, retries:3; ensures collections exist idempotently
  - @joelclaw/memory added to dependencies

apps/web
  - new app/api/runs/route.ts — POST handler; dev bearer token auth
    (hardcoded allowlist, PDS flow lands Phase 3), writes jsonl to NAS
    via @joelclaw/memory writeRunBlob, fires memory/run.captured via
    HTTP to local Inngest, returns 202 HATEOAS envelope with run_id +
    _links + next_actions
  - @joelclaw/inference-router + @joelclaw/memory added to dependencies

Still v1 / dev scope:
  - Dev bearer token, not PDS App Password (Phase 3)
  - _dev collection suffix, will alias to run_chunks_current after cutover
  - No search endpoint yet (next slice)
  - No capture hooks yet (Phase 4)
  - No entity enrichment yet (Phase 6)

Typecheck clean, biome clean, 12 chunking tests still green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 18:21:35 -07:00

64 lines
1.8 KiB
JSON

{
"name": "web",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev --port 3000",
"build": "next build --webpack",
"start": "next start",
"check-types": "next typegen && tsc --noEmit",
"registry:build": "shadcn build"
},
"dependencies": {
"@better-auth/cli": "^1.4.18",
"@convex-dev/better-auth": "^0.10.10",
"@joelclaw/inference-router": "workspace:*",
"@joelclaw/mdx-pipeline": "workspace:^",
"@joelclaw/memory": "workspace:*",
"@repo/ui": "workspace:*",
"@types/mdast": "^4.0.4",
"@upstash/ratelimit": "^2.0.8",
"@upstash/redis": "^1.36.2",
"better-auth": "^1.4.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"convex": "^1.32.0",
"geist": "^1.7.0",
"gray-matter": "^4.0.3",
"lucide-react": "^0.564.0",
"next": "16.1.6",
"next-mdx-remote": "^6.0.0",
"nuqs": "^2.8.8",
"radix-ui": "^1.4.3",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-external-links": "^3.0.0",
"rehype-pretty-code": "^0.14.1",
"rehype-slug": "^6.0.0",
"rehype-unwrap-images": "^1.0.0",
"remark": "^15.0.1",
"remark-gfm": "^4.0.1",
"remark-mdx": "^3.1.1",
"remark-smartypants": "^3.0.2",
"shiki": "^3.22.0",
"tailwind-merge": "^3.5.0",
"unist-util-visit": "^5.1.0",
"vaul": "^1.1.2"
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
"@tailwindcss/postcss": "^4.1.18",
"@types/mdx": "^2.0.13",
"@types/node": "^22.15.3",
"@types/react": "19.2.2",
"@types/react-dom": "19.2.2",
"postcss": "^8.5.6",
"shadcn": "^3.8.5",
"tailwindcss": "^4.1.18",
"tw-animate-css": "^1.4.0",
"typescript": "5.9.2"
}
}