panoma 0.1.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD-PARTY-NOTICES.md +109 -2546
- package/app/BUILD-INFO.json +7 -97
- package/app/apps/web/.next-bundle/BUILD_ID +1 -1
- package/app/apps/web/.next-bundle/app-build-manifest.json +654 -479
- package/app/apps/web/.next-bundle/app-path-routes-manifest.json +42 -22
- package/app/apps/web/.next-bundle/build-manifest.json +14 -14
- package/app/apps/web/.next-bundle/prerender-manifest.json +9 -9
- package/app/apps/web/.next-bundle/required-server-files.json +13 -10
- package/app/apps/web/.next-bundle/routes-manifest.json +101 -0
- package/app/apps/web/.next-bundle/server/app/(app)/agents/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/ai/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/ai/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/apps/[id]/page.js +2 -0
- package/app/apps/web/.next-bundle/server/app/(app)/apps/[id]/page_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/(app)/apps/page.js +2 -0
- package/app/apps/web/.next-bundle/server/app/(app)/apps/page_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/(app)/bridge/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/bridge/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/copies/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/copies/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/credentials/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/credentials/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/disk/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/disk/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/hidden/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/hidden/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/video/page.js +2 -0
- package/app/apps/web/.next-bundle/server/app/(app)/p/[slug]/video/page_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/(app)/packages/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/packages/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/[id]/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/runs/[id]/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/runs/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/runs/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/search/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/search/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/spend/page.js +2 -0
- package/app/apps/web/.next-bundle/server/app/(app)/spend/page_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/(app)/twin/look/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/twin/look/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/twin/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/twin/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/(app)/unsaved/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/(app)/unsaved/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/_not-found/page.js +2 -2
- package/app/apps/web/.next-bundle/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/accounts/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/accounts/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/consult/route.js +1 -2
- package/app/apps/web/.next-bundle/server/app/api/agent/consult/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/context/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/hello/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/hello/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/journal/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/journal/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/keys/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/keys/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/log/route.js +1 -18
- package/app/apps/web/.next-bundle/server/app/api/agent/log/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/mcp/route.js +2 -2
- package/app/apps/web/.next-bundle/server/app/api/agent/mcp/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/notes/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/notes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/[id]/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/agent/tasks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ai/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ai/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/[operation]/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/[operation]/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/credentials/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/credentials/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/jobs/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/jobs/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/legal/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/legal/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/settings/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/[id]/settings/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/artifact/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/artifact/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/cancel/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/cancel/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/jobs/[jobId]/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/apps/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/assets/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assets/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/launch/route.js +3 -3
- package/app/apps/web/.next-bundle/server/app/api/assignments/launch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/assignments/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/catalog/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/catalog/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/check/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/check/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/consultations/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/consultations/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/describe/route.js +2 -2
- package/app/apps/web/.next-bundle/server/app/api/describe/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/disk/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/disk/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/enrich/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/enrich/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/environment/route.js +2 -2
- package/app/apps/web/.next-bundle/server/app/api/environment/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/hooks/route.js +2 -2
- package/app/apps/web/.next-bundle/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ingest/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/ingest/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/apply/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/apply/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/context/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/context/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/inspect/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/inspect/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/repair/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/repair/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/md/review/route.js +4 -4
- package/app/apps/web/.next-bundle/server/app/api/md/review/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/memory/export/route.js +2 -0
- package/app/apps/web/.next-bundle/server/app/api/memory/export/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/north/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/north/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/notes/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/notes/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/open/all/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/open/all/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/open/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/open/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/project/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/project/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/rescan/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/rescan/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/roots/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/roots/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/[id]/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/runs/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/scale/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/scale/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/search/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/secrets/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/secrets/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/spend/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/spend/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/tasks/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/tasks/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/today/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/today/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/assign/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/assign/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/classify/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/classify/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/critique/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/critique/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/design/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/design/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/distill/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/distill/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/episodes/learn/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/twin/episodes/learn/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/twin/episodes/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/twin/episodes/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/twin/look/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/look/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/mine/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/mine/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/rehearse/route.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/twin/rehearse/route_client-reference-manifest.js +1 -0
- package/app/apps/web/.next-bundle/server/app/api/twin/score/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/score/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/shot/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/shot/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/sources/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/sources/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/synthesize/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/synthesize/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/taste/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/taste/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/verdicts/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/twin/verdicts/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/watch/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/api/watch/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/apple-icon.png/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/icon/[id]/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app/icon/[id]/route_client-reference-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/app/icon.png/route.js +1 -1
- package/app/apps/web/.next-bundle/server/app-paths-manifest.json +42 -22
- package/app/apps/web/.next-bundle/server/chunks/1190.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/1602.js +3 -0
- package/app/apps/web/.next-bundle/server/chunks/1646.js +11 -0
- package/app/apps/web/.next-bundle/server/chunks/170.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/2256.js +14 -0
- package/app/apps/web/.next-bundle/server/chunks/2387.js +22 -0
- package/app/apps/web/.next-bundle/server/chunks/2455.js +7 -0
- package/app/apps/web/.next-bundle/server/chunks/2658.js +2 -0
- package/app/apps/web/.next-bundle/server/chunks/3088.js +16 -0
- package/app/apps/web/.next-bundle/server/chunks/314.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/3171.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/3347.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/3768.js +3 -0
- package/app/apps/web/.next-bundle/server/chunks/3834.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/4018.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/4478.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/4498.js +12 -0
- package/app/apps/web/.next-bundle/server/chunks/4528.js +2 -0
- package/app/apps/web/.next-bundle/server/chunks/4810.js +9 -0
- package/app/apps/web/.next-bundle/server/chunks/5103.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/5251.js +217 -0
- package/app/apps/web/.next-bundle/server/chunks/5741.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/5941.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/5975.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/6145.js +6 -0
- package/app/apps/web/.next-bundle/server/chunks/6693.js +7 -0
- package/app/apps/web/.next-bundle/server/chunks/6913.js +21 -0
- package/app/apps/web/.next-bundle/server/chunks/7245.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/7348.js +28 -0
- package/app/apps/web/.next-bundle/server/chunks/7581.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/7957.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/817.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/8384.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/8404.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/8463.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/8887.js +30 -0
- package/app/apps/web/.next-bundle/server/chunks/8990.js +2 -0
- package/app/apps/web/.next-bundle/server/chunks/987.js +27 -0
- package/app/apps/web/.next-bundle/server/chunks/993.js +1 -0
- package/app/apps/web/.next-bundle/server/chunks/9938.js +1 -0
- package/app/apps/web/.next-bundle/server/edge-instrumentation.js +1 -1
- package/app/apps/web/.next-bundle/server/functions-config-manifest.json +23 -14
- package/app/apps/web/.next-bundle/server/instrumentation.js +1 -1
- package/app/apps/web/.next-bundle/server/middleware-build-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/middleware-manifest.json +5 -5
- package/app/apps/web/.next-bundle/server/middleware.js +8 -11
- package/app/apps/web/.next-bundle/server/next-font-manifest.js +1 -1
- package/app/apps/web/.next-bundle/server/next-font-manifest.json +1 -1
- package/app/apps/web/.next-bundle/server/pages/500.html +1 -1
- package/app/apps/web/.next-bundle/server/pages/_app.js +1 -1
- package/app/apps/web/.next-bundle/server/pages/_document.js +1 -1
- package/app/apps/web/.next-bundle/server/pages/_error.js +3 -3
- package/app/apps/web/.next-bundle/server/server-reference-manifest.json +1 -1
- package/app/apps/web/.next-bundle/static/chunks/003adf37-35e10d79e45c4e95.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/05e62ed0-bf68b9617e57b82f.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/1369-8f6dde7e48bc4684.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/1774-59392c79c651b3a0.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/2202-897aaad3cd785ea6.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/2340-11b365d374b2be7b.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/2575-62182d00e5cf3115.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/261-1c2829beaca77dc9.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/3953-4e8d5b8f11c07426.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/6823-e1004a1b90458d2d.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/7f092448-e07c21e2897ac52e.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/agents/page-28b11f831b7bc8c4.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/ai/page-8b5fe63986bf3757.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/apps/[id]/page-dc2c3a7874636c29.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/apps/page-00ec4bf42a14ac17.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/bridge/page-86a819d6d7f65cd0.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/copies/page-69ee3fc638b1eecf.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/credentials/page-0c3307d9cff31e71.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/disk/page-13cd17998c4b3c05.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/error-4706c73d842251e2.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/hidden/page-55639b16ccebad95.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/layout-7f3d387ae540018d.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/p/[slug]/page-c3c3a9be458adeed.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/p/[slug]/video/page-088684f252e3d59c.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/packages/page-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/page-6cf474454fb2ea5e.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/runs/[id]/page-0f664082168a49b2.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/runs/page-69ee3fc638b1eecf.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/search/page-0c57c71f581cdf40.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/spend/page-201b626f17f11eeb.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/twin/look/page-a1f666c611d55a0c.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/twin/page-c7212909b051736c.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/unsaved/page-c545489e991b83d2.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/_not-found/page-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/accounts/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/consult/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/context/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/hello/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/journal/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/keys/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/log/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/mcp/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/notes/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/tasks/[id]/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/tasks/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/ai/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/[id]/[operation]/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/[id]/credentials/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/[id]/jobs/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/[id]/legal/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/[id]/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/[id]/settings/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/jobs/[jobId]/artifact/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/jobs/[jobId]/cancel/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/jobs/[jobId]/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/apps/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/assets/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/assignments/launch/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/assignments/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/catalog/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/check/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/consultations/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/describe/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/disk/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/enrich/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/environment/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/hooks/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/ingest/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/apply/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/context/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/inspect/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/repair/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/review/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/memory/export/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/north/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/notes/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/open/all/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/open/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/project/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/rescan/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/roots/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/runs/[id]/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/runs/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/scale/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/search/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/secrets/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/spend/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/tasks/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/today/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/assign/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/classify/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/critique/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/design/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/distill/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/episodes/learn/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/episodes/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/look/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/mine/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/rehearse/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/score/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/shot/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/sources/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/synthesize/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/taste/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/verdicts/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/api/watch/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/global-not-found-69ee3fc638b1eecf.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/icon/[id]/route-de6e3e5d6198c075.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/app/not-found-69ee3fc638b1eecf.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/bed79bbe-48e9828a39c35383.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/framework-d5e4b15967daa90f.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/main-8ce36a8e89504138.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/main-app-a35ca295bbc2c578.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/pages/_app-9697265615ef43a0.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/pages/_error-ddfe0e0bd29e2283.js +1 -0
- package/app/apps/web/.next-bundle/static/chunks/webpack-a286bbf864e6618a.js +1 -0
- package/app/apps/web/.next-bundle/static/css/988bfb2024e770b7.css +1 -0
- package/app/apps/web/.next-bundle/static/mhsTm5XiqL98MCgDVB08u/_buildManifest.js +1 -0
- package/app/apps/web/package.json +1 -27
- package/app/apps/web/server.js +1 -1
- package/app/node_modules/@next/env/package.json +1 -1
- package/app/node_modules/@panoma/ai/dist/index.d.ts +16 -0
- package/app/node_modules/@panoma/ai/dist/index.js +24 -12
- package/app/node_modules/@panoma/apps/dist/chunk-4G5NKAON.js +147 -0
- package/app/node_modules/@panoma/apps/dist/faults.d.ts +74 -0
- package/app/node_modules/@panoma/apps/dist/faults.js +20 -0
- package/app/node_modules/@panoma/apps/dist/index.d.ts +688 -0
- package/app/node_modules/@panoma/apps/dist/index.js +889 -0
- package/app/node_modules/@panoma/apps/package.json +24 -0
- package/app/node_modules/@panoma/core/dist/index.d.ts +95 -14
- package/app/node_modules/@panoma/core/dist/index.js +495 -101
- package/app/node_modules/@panoma/db/dist/chunk-V6TJYC6N.js +1297 -0
- package/app/node_modules/@panoma/db/dist/client-B1_3MF0o.d.ts +7166 -0
- package/app/node_modules/@panoma/db/dist/client.d.ts +1 -1
- package/app/node_modules/@panoma/db/dist/client.js +1 -1
- package/app/node_modules/@panoma/db/dist/index.d.ts +627 -28
- package/app/node_modules/@panoma/db/dist/index.js +1540 -514
- package/app/node_modules/@panoma/db/migrations/0050_twin_decision_memory.sql +29 -0
- package/app/node_modules/@panoma/db/migrations/0051_twin_learning_retry.sql +1 -0
- package/app/node_modules/@panoma/db/migrations/0052_memory_experiment_enrollment.sql +1 -0
- package/app/node_modules/@panoma/db/migrations/0053_memory_distillation_jobs.sql +16 -0
- package/app/node_modules/@panoma/db/migrations/0054_decision_revision_lookup.sql +1 -0
- package/app/node_modules/@panoma/db/migrations/0055_decision_expiry.sql +1 -0
- package/app/node_modules/@panoma/db/migrations/0056_ai_summary_hash.sql +1 -0
- package/app/node_modules/@panoma/db/migrations/0057_open_plan.sql +1 -0
- package/app/node_modules/@panoma/db/migrations/0058_apps.sql +54 -0
- package/app/node_modules/@panoma/db/migrations/0059_desktop_keys.sql +15 -0
- package/app/node_modules/@panoma/db/migrations/meta/0050_snapshot.json +3556 -0
- package/app/node_modules/@panoma/db/migrations/meta/0051_snapshot.json +3562 -0
- package/app/node_modules/@panoma/db/migrations/meta/0054_snapshot.json +3696 -0
- package/app/node_modules/@panoma/db/migrations/meta/0055_snapshot.json +3702 -0
- package/app/node_modules/@panoma/db/migrations/meta/0056_snapshot.json +3708 -0
- package/app/node_modules/@panoma/db/migrations/meta/0057_snapshot.json +3714 -0
- package/app/node_modules/@panoma/db/migrations/meta/0058_snapshot.json +4084 -0
- package/app/node_modules/@panoma/db/migrations/meta/0059_snapshot.json +4084 -0
- package/app/node_modules/@panoma/db/migrations/meta/_journal.json +71 -1
- package/app/node_modules/@panoma/mcp/dist/index.js +608 -160
- package/app/node_modules/@panoma/mcp/package.json +4 -1
- package/app/node_modules/drizzle-orm/node_modules/.bin/gel +3 -3
- package/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/app/node_modules/next/dist/build/webpack-config.js +2 -2
- package/app/node_modules/next/dist/client/app-bootstrap.js +1 -1
- package/app/node_modules/next/dist/client/index.js +1 -1
- package/app/node_modules/next/dist/client/legacy/image.js +8 -2
- package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +7 -7
- package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +2 -2
- package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/app/node_modules/next/dist/server/image-optimizer.d.ts +3 -1
- package/app/node_modules/next/dist/server/image-optimizer.js +65 -2
- package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/app/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +17 -4
- package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/app/node_modules/next/dist/shared/lib/canary-only.js +1 -1
- package/app/node_modules/next/dist/shared/lib/get-img-props.js +8 -2
- package/app/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +1 -1
- package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/app/node_modules/next/package.json +11 -11
- package/app/node_modules/postcss/LICENSE +1 -1
- package/app/node_modules/postcss/lib/container.js +106 -51
- package/app/node_modules/postcss/lib/css-syntax-error.js +47 -14
- package/app/node_modules/postcss/lib/declaration.js +4 -4
- package/app/node_modules/postcss/lib/fromJSON.js +79 -26
- package/app/node_modules/postcss/lib/input.js +67 -33
- package/app/node_modules/postcss/lib/lazy-result.js +127 -51
- package/app/node_modules/postcss/lib/list.js +5 -2
- package/app/node_modules/postcss/lib/map-generator.js +27 -9
- package/app/node_modules/postcss/lib/no-work-result.js +57 -55
- package/app/node_modules/postcss/lib/node.js +197 -84
- package/app/node_modules/postcss/lib/parse.js +1 -1
- package/app/node_modules/postcss/lib/parser.js +49 -38
- package/app/node_modules/postcss/lib/postcss.js +13 -13
- package/app/node_modules/postcss/lib/previous-map.js +46 -12
- package/app/node_modules/postcss/lib/processor.js +7 -7
- package/app/node_modules/postcss/lib/result.js +5 -5
- package/app/node_modules/postcss/lib/root.js +16 -1
- package/app/node_modules/postcss/lib/rule.js +6 -6
- package/app/node_modules/postcss/lib/stringifier.js +148 -32
- package/app/node_modules/postcss/lib/tokenize.js +6 -2
- package/app/node_modules/postcss/lib/warning.js +10 -0
- package/app/node_modules/postcss/package.json +48 -48
- package/dist/ai-command-IRSVAWYU.js +220 -0
- package/dist/apps-FI2Q2CFP.js +17 -0
- package/dist/check-command-PPILA25M.js +103 -0
- package/dist/chunk-2MKBCYVH.js +158 -0
- package/dist/chunk-5EG7NRL4.js +8440 -0
- package/dist/chunk-AW6KPPIR.js +378 -0
- package/dist/chunk-BCHIG2AU.js +166 -0
- package/dist/chunk-DITTKJ7U.js +147 -0
- package/dist/chunk-JY7ALFNX.js +1362 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-P7ZGHSMO.js +1089 -0
- package/dist/chunk-YQOQAFTY.js +793 -0
- package/dist/dist-F5A5RVCK.js +4920 -0
- package/dist/dist-G32QKT7H.js +301 -0
- package/dist/dist-NQIOBJFO.js +78 -0
- package/dist/index.js +78 -45
- package/dist/md-command-Q4M2YBEH.js +282 -0
- package/dist/memory-command-IXVQSADX.js +65 -0
- package/dist/next-command-2PXBP5OR.js +245 -0
- package/dist/north-command-XFUNSNPH.js +281 -0
- package/dist/review-command-6AH7MVKP.js +94 -0
- package/dist/spend-command-DA36GLNI.js +135 -0
- package/dist/twin-command-HYEG2WPA.js +1375 -0
- package/dist/video-TWUW2L36.js +100 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +3 -1
- package/app/apps/web/.next-bundle/server/chunks/147.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/167.js +0 -7
- package/app/apps/web/.next-bundle/server/chunks/174.js +0 -3
- package/app/apps/web/.next-bundle/server/chunks/2643.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/2930.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/3182.js +0 -11
- package/app/apps/web/.next-bundle/server/chunks/3377.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/3440.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/3559.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/358.js +0 -27
- package/app/apps/web/.next-bundle/server/chunks/3610.js +0 -9
- package/app/apps/web/.next-bundle/server/chunks/3677.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/4289.js +0 -7
- package/app/apps/web/.next-bundle/server/chunks/4337.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/4858.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/5358.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/5611.js +0 -22
- package/app/apps/web/.next-bundle/server/chunks/6157.js +0 -21
- package/app/apps/web/.next-bundle/server/chunks/6195.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/6354.js +0 -28
- package/app/apps/web/.next-bundle/server/chunks/6462.js +0 -2
- package/app/apps/web/.next-bundle/server/chunks/6476.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/6790.js +0 -170
- package/app/apps/web/.next-bundle/server/chunks/7017.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/7276.js +0 -5
- package/app/apps/web/.next-bundle/server/chunks/7876.js +0 -1
- package/app/apps/web/.next-bundle/server/chunks/8393.js +0 -6
- package/app/apps/web/.next-bundle/server/chunks/8985.js +0 -1
- package/app/apps/web/.next-bundle/static/GWFC4d9IgsD38wa3aUlsQ/_buildManifest.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/003adf37-43d6365219a6cb5d.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/05e62ed0-4f8e7c265bd81def.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/0fef27c7-cd6dbf9ae86c168d.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/1723-71c045eb0c2a8daa.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/3885-7afc74e117f41ba5.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/4517-63995539421e71bd.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/4737-b098c74f87ae6fa7.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/5465-6207528c0ac5d5d7.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/7911-1f2ce7063b83e142.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/7f092448-897a4dfb37859e3a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/agents/page-349f843bcb6f4abd.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/ai/page-60083a1b6a36c928.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/bridge/page-9f270ffcd9da75ca.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/copies/page-fb206ee7ea581b0a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/credentials/page-e87253842975daa4.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/disk/page-15cd72dc04ac7de4.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/error-7a9266f6e98936d9.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/hidden/page-4e81219b6c5aeb2a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/layout-2ee40fbf22eee90a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/p/[slug]/page-630a1079cd683bad.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/packages/page-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/page-bd415d39f80a6370.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/runs/[id]/page-572f84e2016be38a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/runs/page-fb206ee7ea581b0a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/search/page-6e94501b5e36f4b1.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/twin/look/page-8e24b1b376cbdab8.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/twin/page-4d6804060b9830ff.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/(app)/unsaved/page-d7124f7da77909ad.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/_not-found/page-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/accounts/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/consult/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/context/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/hello/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/journal/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/keys/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/log/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/mcp/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/notes/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/tasks/[id]/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/agent/tasks/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/ai/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/assets/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/assignments/launch/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/assignments/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/catalog/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/check/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/consultations/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/describe/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/disk/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/enrich/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/environment/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/hooks/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/ingest/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/apply/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/context/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/inspect/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/repair/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/md/review/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/north/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/notes/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/open/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/project/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/rescan/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/roots/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/runs/[id]/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/runs/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/scale/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/search/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/secrets/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/tasks/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/today/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/assign/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/classify/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/critique/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/design/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/distill/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/look/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/mine/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/score/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/shot/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/sources/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/synthesize/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/taste/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/twin/verdicts/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/api/watch/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/global-not-found-fb206ee7ea581b0a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/icon/[id]/route-530c843e472daae6.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/app/not-found-fb206ee7ea581b0a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/framework-30b145ec0f5d120f.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/main-app-59aa759bdeaa5318.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/main-b6b5e7fa4424cc5d.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/pages/_app-c69705e3978589b3.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/pages/_error-03e7b340a5b9742a.js +0 -1
- package/app/apps/web/.next-bundle/static/chunks/webpack-dfabcb423274f722.js +0 -1
- package/app/apps/web/.next-bundle/static/css/6de932bb4718a4fa.css +0 -1
- package/app/node_modules/@hono/node-server/LICENSE +0 -21
- package/app/node_modules/@hono/node-server/README.md +0 -437
- package/app/node_modules/@hono/node-server/dist/conninfo.cjs +0 -22
- package/app/node_modules/@hono/node-server/dist/conninfo.d.cts +0 -11
- package/app/node_modules/@hono/node-server/dist/conninfo.d.mts +0 -11
- package/app/node_modules/@hono/node-server/dist/conninfo.mjs +0 -20
- package/app/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs +0 -5
- package/app/node_modules/@hono/node-server/dist/constants-BXAKTxRC.cjs +0 -11
- package/app/node_modules/@hono/node-server/dist/early-hints.cjs +0 -35
- package/app/node_modules/@hono/node-server/dist/early-hints.d.cts +0 -16
- package/app/node_modules/@hono/node-server/dist/early-hints.d.mts +0 -16
- package/app/node_modules/@hono/node-server/dist/early-hints.mjs +0 -33
- package/app/node_modules/@hono/node-server/dist/index.cjs +0 -1318
- package/app/node_modules/@hono/node-server/dist/index.d.cts +0 -101
- package/app/node_modules/@hono/node-server/dist/index.d.mts +0 -101
- package/app/node_modules/@hono/node-server/dist/index.mjs +0 -1313
- package/app/node_modules/@hono/node-server/dist/serve-static.cjs +0 -151
- package/app/node_modules/@hono/node-server/dist/serve-static.d.cts +0 -18
- package/app/node_modules/@hono/node-server/dist/serve-static.d.mts +0 -18
- package/app/node_modules/@hono/node-server/dist/serve-static.mjs +0 -150
- package/app/node_modules/@hono/node-server/dist/utils/response.cjs +0 -8
- package/app/node_modules/@hono/node-server/dist/utils/response.d.cts +0 -4
- package/app/node_modules/@hono/node-server/dist/utils/response.d.mts +0 -4
- package/app/node_modules/@hono/node-server/dist/utils/response.mjs +0 -7
- package/app/node_modules/@hono/node-server/dist/utils/stream.cjs +0 -65
- package/app/node_modules/@hono/node-server/dist/utils/stream.d.cts +0 -6
- package/app/node_modules/@hono/node-server/dist/utils/stream.d.mts +0 -6
- package/app/node_modules/@hono/node-server/dist/utils/stream.mjs +0 -64
- package/app/node_modules/@hono/node-server/package.json +0 -127
- package/app/node_modules/@modelcontextprotocol/sdk/LICENSE +0 -21
- package/app/node_modules/@modelcontextprotocol/sdk/README.md +0 -172
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.d.ts +0 -190
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth-extensions.js +0 -299
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.d.ts +0 -451
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/auth.js +0 -943
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts +0 -591
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js +0 -618
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.d.ts +0 -169
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/middleware.js +0 -252
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.d.ts +0 -81
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/sse.js +0 -211
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts +0 -84
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js +0 -202
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts +0 -171
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js +0 -484
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.d.ts +0 -17
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/websocket.js +0 -58
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/elicitationUrlExample.js +0 -680
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/multipleClientsParallel.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/multipleClientsParallel.js +0 -134
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/parallelToolCallsClient.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/parallelToolCallsClient.js +0 -176
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleClientCredentials.d.ts +0 -20
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleClientCredentials.js +0 -70
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClient.d.ts +0 -3
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClient.js +0 -397
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.d.ts +0 -26
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleOAuthClientProvider.js +0 -51
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleStreamableHttp.js +0 -857
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.d.ts +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/simpleTaskInteractiveClient.js +0 -157
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/ssePollingClient.js +0 -95
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/client/streamableHttpWithSseFallbackClient.js +0 -168
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.d.ts +0 -78
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/demoInMemoryOAuthProvider.js +0 -205
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationFormExample.js +0 -460
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/elicitationUrlExample.js +0 -656
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.d.ts +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/honoWebStandardStreamableHttp.js +0 -85
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/jsonResponseStreamableHttp.js +0 -171
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.d.ts +0 -7
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/mcpServerOutputSchema.js +0 -95
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.d.ts +0 -12
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/progressExample.js +0 -49
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleSseServer.js +0 -168
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStatelessStreamableHttp.js +0 -166
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleStreamableHttp.js +0 -750
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.d.ts +0 -12
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/simpleTaskInteractive.js +0 -600
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/sseAndStreamableHttpCompatibleServer.js +0 -256
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/ssePollingExample.js +0 -107
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/standaloneSseWithGetStreamableHttp.js +0 -124
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/server/toolWithSampleServer.js +0 -73
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.d.ts +0 -31
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/examples/shared/inMemoryEventStore.js +0 -69
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.d.ts +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/index.js +0 -29
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.d.ts +0 -121
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/client.js +0 -188
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.d.ts +0 -47
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/helpers.js +0 -68
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.d.ts +0 -16
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/index.js +0 -39
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.d.ts +0 -232
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/interfaces.js +0 -19
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.d.ts +0 -77
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/mcp-server.js +0 -36
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.d.ts +0 -170
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/server.js +0 -250
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.d.ts +0 -94
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/stores/in-memory.js +0 -251
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.d.ts +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/experimental/tasks/types.js +0 -28
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.d.ts +0 -31
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/inMemory.js +0 -51
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/package.json +0 -1
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.d.ts +0 -19
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/clients.js +0 -3
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.d.ts +0 -148
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/errors.js +0 -202
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.d.ts +0 -24
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/authorize.js +0 -201
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.d.ts +0 -4
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/metadata.js +0 -21
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.d.ts +0 -29
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/register.js +0 -77
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.d.ts +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/revoke.js +0 -65
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.d.ts +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/handlers/token.js +0 -136
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.d.ts +0 -9
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/allowedMethods.js +0 -21
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.d.ts +0 -35
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/bearerAuth.js +0 -75
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.d.ts +0 -19
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/middleware/clientAuth.js +0 -71
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.d.ts +0 -68
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/provider.js +0 -3
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.d.ts +0 -49
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/providers/proxyProvider.js +0 -159
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.d.ts +0 -101
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/router.js +0 -128
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.d.ts +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/auth/types.js +0 -3
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/completable.d.ts +0 -38
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/completable.js +0 -48
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/express.d.ts +0 -45
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/express.js +0 -56
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.d.ts +0 -196
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js +0 -433
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.d.ts +0 -364
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/mcp.js +0 -922
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/middleware/hostHeaderValidation.d.ts +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/middleware/hostHeaderValidation.js +0 -80
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sse.d.ts +0 -82
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sse.js +0 -172
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts +0 -5
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js +0 -17
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts +0 -36
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js +0 -88
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/streamableHttp.d.ts +0 -122
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/streamableHttp.js +0 -165
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts +0 -289
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js +0 -953
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.d.ts +0 -84
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js +0 -263
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.d.ts +0 -12
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-json-schema-compat.js +0 -79
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth-utils.d.ts +0 -23
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth-utils.js +0 -48
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth.d.ts +0 -240
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/auth.js +0 -224
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js +0 -64
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/metadataUtils.d.ts +0 -16
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/metadataUtils.js +0 -25
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.d.ts +0 -443
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/protocol.js +0 -1112
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/responseMessage.d.ts +0 -45
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/responseMessage.js +0 -23
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts +0 -18
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js +0 -46
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/toolNameValidation.d.ts +0 -31
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/toolNameValidation.js +0 -97
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.d.ts +0 -89
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/transport.js +0 -43
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/uriTemplate.d.ts +0 -25
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/uriTemplate.js +0 -243
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/spec.types.d.ts +0 -2311
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/spec.types.js +0 -27
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/types.d.ts +0 -8168
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/types.js +0 -2105
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/ajv-provider.d.ts +0 -53
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/ajv-provider.js +0 -94
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/cfworker-provider.d.ts +0 -51
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/cfworker-provider.js +0 -69
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/index.d.ts +0 -29
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/index.js +0 -30
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/types.d.ts +0 -65
- package/app/node_modules/@modelcontextprotocol/sdk/dist/cjs/validation/types.js +0 -3
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth-extensions.d.ts +0 -190
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth-extensions.js +0 -269
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.d.ts +0 -451
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js +0 -918
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.d.ts +0 -591
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +0 -613
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/middleware.d.ts +0 -169
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/middleware.js +0 -245
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.d.ts +0 -81
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/sse.js +0 -206
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts +0 -84
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js +0 -194
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts +0 -171
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +0 -479
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/websocket.d.ts +0 -17
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/client/websocket.js +0 -54
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/elicitationUrlExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/elicitationUrlExample.js +0 -678
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/multipleClientsParallel.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/multipleClientsParallel.js +0 -132
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/parallelToolCallsClient.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/parallelToolCallsClient.js +0 -174
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleClientCredentials.d.ts +0 -20
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleClientCredentials.js +0 -68
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleOAuthClient.d.ts +0 -3
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleOAuthClient.js +0 -395
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleOAuthClientProvider.d.ts +0 -26
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleOAuthClientProvider.js +0 -47
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleStreamableHttp.js +0 -855
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleTaskInteractiveClient.d.ts +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/simpleTaskInteractiveClient.js +0 -155
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/ssePollingClient.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/ssePollingClient.js +0 -93
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/streamableHttpWithSseFallbackClient.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/client/streamableHttpWithSseFallbackClient.js +0 -166
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/demoInMemoryOAuthProvider.d.ts +0 -78
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/demoInMemoryOAuthProvider.js +0 -196
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationFormExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationFormExample.js +0 -458
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationUrlExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/elicitationUrlExample.js +0 -651
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/honoWebStandardStreamableHttp.d.ts +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/honoWebStandardStreamableHttp.js +0 -60
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/jsonResponseStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/jsonResponseStreamableHttp.js +0 -146
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/mcpServerOutputSchema.d.ts +0 -7
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/mcpServerOutputSchema.js +0 -70
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/progressExample.d.ts +0 -12
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/progressExample.js +0 -47
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleSseServer.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleSseServer.js +0 -143
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStatelessStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStatelessStreamableHttp.js +0 -141
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleStreamableHttp.js +0 -725
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleTaskInteractive.d.ts +0 -12
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/simpleTaskInteractive.js +0 -598
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/sseAndStreamableHttpCompatibleServer.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/sseAndStreamableHttpCompatibleServer.js +0 -231
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/ssePollingExample.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/ssePollingExample.js +0 -102
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/standaloneSseWithGetStreamableHttp.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/standaloneSseWithGetStreamableHttp.js +0 -122
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/toolWithSampleServer.d.ts +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/server/toolWithSampleServer.js +0 -48
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/shared/inMemoryEventStore.d.ts +0 -31
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/examples/shared/inMemoryEventStore.js +0 -65
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/index.d.ts +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/index.js +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.d.ts +0 -121
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js +0 -184
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.d.ts +0 -47
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js +0 -64
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/index.d.ts +0 -16
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/index.js +0 -20
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.d.ts +0 -232
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js +0 -16
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.d.ts +0 -77
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.d.ts +0 -170
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js +0 -246
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.d.ts +0 -94
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/stores/in-memory.js +0 -246
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/types.d.ts +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/types.js +0 -10
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/inMemory.d.ts +0 -31
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/inMemory.js +0 -47
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/package.json +0 -1
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/clients.d.ts +0 -19
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/clients.js +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.d.ts +0 -148
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js +0 -180
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/authorize.d.ts +0 -24
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/authorize.js +0 -171
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/metadata.d.ts +0 -4
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/metadata.js +0 -15
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/register.d.ts +0 -29
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/register.js +0 -71
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/revoke.d.ts +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/revoke.js +0 -59
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/token.d.ts +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/handlers/token.js +0 -107
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/allowedMethods.d.ts +0 -9
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/allowedMethods.js +0 -18
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.d.ts +0 -35
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/bearerAuth.js +0 -72
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/clientAuth.d.ts +0 -19
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/middleware/clientAuth.js +0 -45
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/provider.d.ts +0 -68
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/provider.js +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/providers/proxyProvider.d.ts +0 -49
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/providers/proxyProvider.js +0 -155
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/router.d.ts +0 -101
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/router.js +0 -118
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/types.d.ts +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/types.js +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.d.ts +0 -38
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js +0 -41
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/express.d.ts +0 -45
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/express.js +0 -50
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.d.ts +0 -196
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +0 -429
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.d.ts +0 -364
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js +0 -917
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/middleware/hostHeaderValidation.d.ts +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/middleware/hostHeaderValidation.js +0 -76
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sse.d.ts +0 -82
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sse.js +0 -165
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts +0 -5
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js +0 -13
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts +0 -36
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +0 -81
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.d.ts +0 -122
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js +0 -161
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts +0 -289
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js +0 -949
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.d.ts +0 -84
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +0 -228
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.d.ts +0 -12
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js +0 -51
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.d.ts +0 -23
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js +0 -44
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.d.ts +0 -240
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js +0 -198
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts +0 -32
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js +0 -57
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/metadataUtils.d.ts +0 -16
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/metadataUtils.js +0 -22
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.d.ts +0 -443
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js +0 -1107
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/responseMessage.d.ts +0 -45
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/responseMessage.js +0 -19
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts +0 -18
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +0 -40
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.d.ts +0 -31
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js +0 -92
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.d.ts +0 -89
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js +0 -39
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.d.ts +0 -25
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js +0 -239
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/spec.types.d.ts +0 -2311
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/spec.types.js +0 -24
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/types.d.ts +0 -8168
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js +0 -2065
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.d.ts +0 -53
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js +0 -87
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/cfworker-provider.d.ts +0 -51
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/cfworker-provider.js +0 -65
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/index.d.ts +0 -29
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/index.js +0 -29
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/types.d.ts +0 -65
- package/app/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/types.js +0 -2
- package/app/node_modules/@modelcontextprotocol/sdk/package.json +0 -165
- package/app/node_modules/@panoma/db/dist/chunk-GRGC435V.js +0 -1134
- package/app/node_modules/@panoma/db/dist/client-C6AHYVoa.d.ts +0 -5811
- package/app/node_modules/accepts/HISTORY.md +0 -250
- package/app/node_modules/accepts/LICENSE +0 -23
- package/app/node_modules/accepts/README.md +0 -140
- package/app/node_modules/accepts/index.js +0 -238
- package/app/node_modules/accepts/package.json +0 -47
- package/app/node_modules/ajv/.runkit_example.js +0 -23
- package/app/node_modules/ajv/LICENSE +0 -22
- package/app/node_modules/ajv/README.md +0 -207
- package/app/node_modules/ajv/dist/2019.d.ts +0 -19
- package/app/node_modules/ajv/dist/2019.js +0 -61
- package/app/node_modules/ajv/dist/2020.d.ts +0 -19
- package/app/node_modules/ajv/dist/2020.js +0 -55
- package/app/node_modules/ajv/dist/ajv.d.ts +0 -18
- package/app/node_modules/ajv/dist/ajv.js +0 -50
- package/app/node_modules/ajv/dist/compile/codegen/code.d.ts +0 -40
- package/app/node_modules/ajv/dist/compile/codegen/code.js +0 -156
- package/app/node_modules/ajv/dist/compile/codegen/index.d.ts +0 -79
- package/app/node_modules/ajv/dist/compile/codegen/index.js +0 -697
- package/app/node_modules/ajv/dist/compile/codegen/scope.d.ts +0 -79
- package/app/node_modules/ajv/dist/compile/codegen/scope.js +0 -143
- package/app/node_modules/ajv/dist/compile/errors.d.ts +0 -13
- package/app/node_modules/ajv/dist/compile/errors.js +0 -123
- package/app/node_modules/ajv/dist/compile/index.d.ts +0 -80
- package/app/node_modules/ajv/dist/compile/index.js +0 -242
- package/app/node_modules/ajv/dist/compile/jtd/parse.d.ts +0 -4
- package/app/node_modules/ajv/dist/compile/jtd/parse.js +0 -350
- package/app/node_modules/ajv/dist/compile/jtd/serialize.d.ts +0 -4
- package/app/node_modules/ajv/dist/compile/jtd/serialize.js +0 -236
- package/app/node_modules/ajv/dist/compile/jtd/types.d.ts +0 -6
- package/app/node_modules/ajv/dist/compile/jtd/types.js +0 -14
- package/app/node_modules/ajv/dist/compile/names.d.ts +0 -20
- package/app/node_modules/ajv/dist/compile/names.js +0 -28
- package/app/node_modules/ajv/dist/compile/ref_error.d.ts +0 -6
- package/app/node_modules/ajv/dist/compile/ref_error.js +0 -12
- package/app/node_modules/ajv/dist/compile/resolve.d.ts +0 -12
- package/app/node_modules/ajv/dist/compile/resolve.js +0 -155
- package/app/node_modules/ajv/dist/compile/rules.d.ts +0 -28
- package/app/node_modules/ajv/dist/compile/rules.js +0 -26
- package/app/node_modules/ajv/dist/compile/util.d.ts +0 -40
- package/app/node_modules/ajv/dist/compile/util.js +0 -178
- package/app/node_modules/ajv/dist/compile/validate/applicability.d.ts +0 -6
- package/app/node_modules/ajv/dist/compile/validate/applicability.js +0 -19
- package/app/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +0 -4
- package/app/node_modules/ajv/dist/compile/validate/boolSchema.js +0 -50
- package/app/node_modules/ajv/dist/compile/validate/dataType.d.ts +0 -17
- package/app/node_modules/ajv/dist/compile/validate/dataType.js +0 -203
- package/app/node_modules/ajv/dist/compile/validate/defaults.d.ts +0 -2
- package/app/node_modules/ajv/dist/compile/validate/defaults.js +0 -35
- package/app/node_modules/ajv/dist/compile/validate/index.d.ts +0 -42
- package/app/node_modules/ajv/dist/compile/validate/index.js +0 -520
- package/app/node_modules/ajv/dist/compile/validate/keyword.d.ts +0 -8
- package/app/node_modules/ajv/dist/compile/validate/keyword.js +0 -124
- package/app/node_modules/ajv/dist/compile/validate/subschema.d.ts +0 -47
- package/app/node_modules/ajv/dist/compile/validate/subschema.js +0 -81
- package/app/node_modules/ajv/dist/core.d.ts +0 -174
- package/app/node_modules/ajv/dist/core.js +0 -618
- package/app/node_modules/ajv/dist/jtd.d.ts +0 -47
- package/app/node_modules/ajv/dist/jtd.js +0 -72
- package/app/node_modules/ajv/dist/refs/data.json +0 -13
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +0 -2
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +0 -28
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +0 -53
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +0 -17
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +0 -57
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +0 -14
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +0 -37
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +0 -90
- package/app/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +0 -39
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +0 -2
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +0 -30
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +0 -17
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +0 -51
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/app/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +0 -55
- package/app/node_modules/ajv/dist/refs/json-schema-draft-06.json +0 -137
- package/app/node_modules/ajv/dist/refs/json-schema-draft-07.json +0 -151
- package/app/node_modules/ajv/dist/refs/json-schema-secure.json +0 -88
- package/app/node_modules/ajv/dist/refs/jtd-schema.d.ts +0 -3
- package/app/node_modules/ajv/dist/refs/jtd-schema.js +0 -118
- package/app/node_modules/ajv/dist/runtime/equal.d.ts +0 -6
- package/app/node_modules/ajv/dist/runtime/equal.js +0 -7
- package/app/node_modules/ajv/dist/runtime/parseJson.d.ts +0 -18
- package/app/node_modules/ajv/dist/runtime/parseJson.js +0 -185
- package/app/node_modules/ajv/dist/runtime/quote.d.ts +0 -5
- package/app/node_modules/ajv/dist/runtime/quote.js +0 -30
- package/app/node_modules/ajv/dist/runtime/re2.d.ts +0 -6
- package/app/node_modules/ajv/dist/runtime/re2.js +0 -6
- package/app/node_modules/ajv/dist/runtime/timestamp.d.ts +0 -5
- package/app/node_modules/ajv/dist/runtime/timestamp.js +0 -42
- package/app/node_modules/ajv/dist/runtime/ucs2length.d.ts +0 -5
- package/app/node_modules/ajv/dist/runtime/ucs2length.js +0 -24
- package/app/node_modules/ajv/dist/runtime/uri.d.ts +0 -6
- package/app/node_modules/ajv/dist/runtime/uri.js +0 -6
- package/app/node_modules/ajv/dist/runtime/validation_error.d.ts +0 -7
- package/app/node_modules/ajv/dist/runtime/validation_error.js +0 -11
- package/app/node_modules/ajv/dist/standalone/index.d.ts +0 -6
- package/app/node_modules/ajv/dist/standalone/index.js +0 -90
- package/app/node_modules/ajv/dist/standalone/instance.d.ts +0 -12
- package/app/node_modules/ajv/dist/standalone/instance.js +0 -35
- package/app/node_modules/ajv/dist/types/index.d.ts +0 -183
- package/app/node_modules/ajv/dist/types/index.js +0 -3
- package/app/node_modules/ajv/dist/types/json-schema.d.ts +0 -125
- package/app/node_modules/ajv/dist/types/json-schema.js +0 -3
- package/app/node_modules/ajv/dist/types/jtd-schema.d.ts +0 -174
- package/app/node_modules/ajv/dist/types/jtd-schema.js +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +0 -49
- package/app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +0 -106
- package/app/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/allOf.js +0 -23
- package/app/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +0 -4
- package/app/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +0 -12
- package/app/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +0 -7
- package/app/node_modules/ajv/dist/vocabularies/applicator/contains.js +0 -95
- package/app/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +0 -21
- package/app/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +0 -85
- package/app/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +0 -11
- package/app/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/applicator/if.js +0 -66
- package/app/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +0 -13
- package/app/node_modules/ajv/dist/vocabularies/applicator/index.js +0 -44
- package/app/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/applicator/items.js +0 -52
- package/app/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/applicator/items2020.js +0 -30
- package/app/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +0 -4
- package/app/node_modules/ajv/dist/vocabularies/applicator/not.js +0 -26
- package/app/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +0 -60
- package/app/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +0 -75
- package/app/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +0 -12
- package/app/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/properties.js +0 -54
- package/app/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +0 -38
- package/app/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +0 -13
- package/app/node_modules/ajv/dist/vocabularies/code.d.ts +0 -17
- package/app/node_modules/ajv/dist/vocabularies/code.js +0 -131
- package/app/node_modules/ajv/dist/vocabularies/core/id.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/core/id.js +0 -10
- package/app/node_modules/ajv/dist/vocabularies/core/index.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/core/index.js +0 -16
- package/app/node_modules/ajv/dist/vocabularies/core/ref.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/core/ref.js +0 -122
- package/app/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/discriminator/index.js +0 -104
- package/app/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +0 -10
- package/app/node_modules/ajv/dist/vocabularies/discriminator/types.js +0 -9
- package/app/node_modules/ajv/dist/vocabularies/draft2020.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/draft2020.js +0 -23
- package/app/node_modules/ajv/dist/vocabularies/draft7.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/draft7.js +0 -17
- package/app/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +0 -30
- package/app/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +0 -51
- package/app/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/dynamic/index.js +0 -9
- package/app/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +0 -16
- package/app/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +0 -10
- package/app/node_modules/ajv/dist/vocabularies/errors.d.ts +0 -9
- package/app/node_modules/ajv/dist/vocabularies/errors.js +0 -3
- package/app/node_modules/ajv/dist/vocabularies/format/format.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/format/format.js +0 -92
- package/app/node_modules/ajv/dist/vocabularies/format/index.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/format/index.js +0 -6
- package/app/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +0 -71
- package/app/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/jtd/elements.js +0 -24
- package/app/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/jtd/enum.js +0 -43
- package/app/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +0 -9
- package/app/node_modules/ajv/dist/vocabularies/jtd/error.js +0 -20
- package/app/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +0 -10
- package/app/node_modules/ajv/dist/vocabularies/jtd/index.js +0 -29
- package/app/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/jtd/metadata.js +0 -25
- package/app/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +0 -4
- package/app/node_modules/ajv/dist/vocabularies/jtd/nullable.js +0 -22
- package/app/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +0 -15
- package/app/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +0 -22
- package/app/node_modules/ajv/dist/vocabularies/jtd/properties.js +0 -149
- package/app/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +0 -4
- package/app/node_modules/ajv/dist/vocabularies/jtd/ref.js +0 -67
- package/app/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +0 -10
- package/app/node_modules/ajv/dist/vocabularies/jtd/type.js +0 -69
- package/app/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/jtd/union.js +0 -12
- package/app/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/jtd/values.js +0 -51
- package/app/node_modules/ajv/dist/vocabularies/metadata.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/metadata.js +0 -18
- package/app/node_modules/ajv/dist/vocabularies/next.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/next.js +0 -8
- package/app/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/unevaluated/index.js +0 -7
- package/app/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +0 -40
- package/app/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +0 -65
- package/app/node_modules/ajv/dist/vocabularies/validation/const.d.ts +0 -6
- package/app/node_modules/ajv/dist/vocabularies/validation/const.js +0 -25
- package/app/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +0 -5
- package/app/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +0 -12
- package/app/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/validation/enum.js +0 -48
- package/app/node_modules/ajv/dist/vocabularies/validation/index.d.ts +0 -16
- package/app/node_modules/ajv/dist/vocabularies/validation/index.js +0 -33
- package/app/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/validation/limitContains.js +0 -15
- package/app/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/validation/limitItems.js +0 -24
- package/app/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/validation/limitLength.js +0 -27
- package/app/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +0 -11
- package/app/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +0 -27
- package/app/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +0 -3
- package/app/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +0 -24
- package/app/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +0 -26
- package/app/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/validation/pattern.js +0 -33
- package/app/node_modules/ajv/dist/vocabularies/validation/required.d.ts +0 -8
- package/app/node_modules/ajv/dist/vocabularies/validation/required.js +0 -79
- package/app/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +0 -9
- package/app/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +0 -64
- package/app/node_modules/ajv/lib/2019.ts +0 -81
- package/app/node_modules/ajv/lib/2020.ts +0 -75
- package/app/node_modules/ajv/lib/ajv.ts +0 -70
- package/app/node_modules/ajv/lib/compile/codegen/code.ts +0 -169
- package/app/node_modules/ajv/lib/compile/codegen/index.ts +0 -852
- package/app/node_modules/ajv/lib/compile/codegen/scope.ts +0 -215
- package/app/node_modules/ajv/lib/compile/errors.ts +0 -184
- package/app/node_modules/ajv/lib/compile/index.ts +0 -324
- package/app/node_modules/ajv/lib/compile/jtd/parse.ts +0 -411
- package/app/node_modules/ajv/lib/compile/jtd/serialize.ts +0 -277
- package/app/node_modules/ajv/lib/compile/jtd/types.ts +0 -16
- package/app/node_modules/ajv/lib/compile/names.ts +0 -27
- package/app/node_modules/ajv/lib/compile/ref_error.ts +0 -13
- package/app/node_modules/ajv/lib/compile/resolve.ts +0 -149
- package/app/node_modules/ajv/lib/compile/rules.ts +0 -50
- package/app/node_modules/ajv/lib/compile/util.ts +0 -213
- package/app/node_modules/ajv/lib/compile/validate/applicability.ts +0 -22
- package/app/node_modules/ajv/lib/compile/validate/boolSchema.ts +0 -47
- package/app/node_modules/ajv/lib/compile/validate/dataType.ts +0 -230
- package/app/node_modules/ajv/lib/compile/validate/defaults.ts +0 -32
- package/app/node_modules/ajv/lib/compile/validate/index.ts +0 -582
- package/app/node_modules/ajv/lib/compile/validate/keyword.ts +0 -171
- package/app/node_modules/ajv/lib/compile/validate/subschema.ts +0 -135
- package/app/node_modules/ajv/lib/core.ts +0 -892
- package/app/node_modules/ajv/lib/jtd.ts +0 -132
- package/app/node_modules/ajv/lib/refs/data.json +0 -13
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +0 -28
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +0 -53
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +0 -17
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +0 -57
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +0 -14
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +0 -37
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +0 -90
- package/app/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +0 -39
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +0 -30
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +0 -48
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +0 -17
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +0 -51
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +0 -14
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +0 -37
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +0 -15
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +0 -90
- package/app/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +0 -55
- package/app/node_modules/ajv/lib/refs/json-schema-draft-06.json +0 -137
- package/app/node_modules/ajv/lib/refs/json-schema-draft-07.json +0 -151
- package/app/node_modules/ajv/lib/refs/json-schema-secure.json +0 -88
- package/app/node_modules/ajv/lib/refs/jtd-schema.ts +0 -130
- package/app/node_modules/ajv/lib/runtime/equal.ts +0 -7
- package/app/node_modules/ajv/lib/runtime/parseJson.ts +0 -177
- package/app/node_modules/ajv/lib/runtime/quote.ts +0 -31
- package/app/node_modules/ajv/lib/runtime/re2.ts +0 -6
- package/app/node_modules/ajv/lib/runtime/timestamp.ts +0 -46
- package/app/node_modules/ajv/lib/runtime/ucs2length.ts +0 -20
- package/app/node_modules/ajv/lib/runtime/uri.ts +0 -6
- package/app/node_modules/ajv/lib/runtime/validation_error.ts +0 -13
- package/app/node_modules/ajv/lib/standalone/index.ts +0 -100
- package/app/node_modules/ajv/lib/standalone/instance.ts +0 -36
- package/app/node_modules/ajv/lib/types/index.ts +0 -244
- package/app/node_modules/ajv/lib/types/json-schema.ts +0 -187
- package/app/node_modules/ajv/lib/types/jtd-schema.ts +0 -273
- package/app/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +0 -56
- package/app/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +0 -118
- package/app/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +0 -22
- package/app/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +0 -14
- package/app/node_modules/ajv/lib/vocabularies/applicator/contains.ts +0 -109
- package/app/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +0 -112
- package/app/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +0 -11
- package/app/node_modules/ajv/lib/vocabularies/applicator/if.ts +0 -80
- package/app/node_modules/ajv/lib/vocabularies/applicator/index.ts +0 -53
- package/app/node_modules/ajv/lib/vocabularies/applicator/items.ts +0 -59
- package/app/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +0 -36
- package/app/node_modules/ajv/lib/vocabularies/applicator/not.ts +0 -38
- package/app/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +0 -82
- package/app/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +0 -91
- package/app/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +0 -12
- package/app/node_modules/ajv/lib/vocabularies/applicator/properties.ts +0 -57
- package/app/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +0 -50
- package/app/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +0 -13
- package/app/node_modules/ajv/lib/vocabularies/code.ts +0 -168
- package/app/node_modules/ajv/lib/vocabularies/core/id.ts +0 -10
- package/app/node_modules/ajv/lib/vocabularies/core/index.ts +0 -16
- package/app/node_modules/ajv/lib/vocabularies/core/ref.ts +0 -129
- package/app/node_modules/ajv/lib/vocabularies/discriminator/index.ts +0 -113
- package/app/node_modules/ajv/lib/vocabularies/discriminator/types.ts +0 -12
- package/app/node_modules/ajv/lib/vocabularies/draft2020.ts +0 -23
- package/app/node_modules/ajv/lib/vocabularies/draft7.ts +0 -17
- package/app/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +0 -31
- package/app/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +0 -51
- package/app/node_modules/ajv/lib/vocabularies/dynamic/index.ts +0 -9
- package/app/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +0 -14
- package/app/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +0 -10
- package/app/node_modules/ajv/lib/vocabularies/errors.ts +0 -18
- package/app/node_modules/ajv/lib/vocabularies/format/format.ts +0 -120
- package/app/node_modules/ajv/lib/vocabularies/format/index.ts +0 -6
- package/app/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +0 -89
- package/app/node_modules/ajv/lib/vocabularies/jtd/elements.ts +0 -32
- package/app/node_modules/ajv/lib/vocabularies/jtd/enum.ts +0 -45
- package/app/node_modules/ajv/lib/vocabularies/jtd/error.ts +0 -23
- package/app/node_modules/ajv/lib/vocabularies/jtd/index.ts +0 -37
- package/app/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +0 -24
- package/app/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +0 -21
- package/app/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +0 -15
- package/app/node_modules/ajv/lib/vocabularies/jtd/properties.ts +0 -184
- package/app/node_modules/ajv/lib/vocabularies/jtd/ref.ts +0 -76
- package/app/node_modules/ajv/lib/vocabularies/jtd/type.ts +0 -75
- package/app/node_modules/ajv/lib/vocabularies/jtd/union.ts +0 -12
- package/app/node_modules/ajv/lib/vocabularies/jtd/values.ts +0 -58
- package/app/node_modules/ajv/lib/vocabularies/metadata.ts +0 -17
- package/app/node_modules/ajv/lib/vocabularies/next.ts +0 -8
- package/app/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +0 -7
- package/app/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +0 -47
- package/app/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +0 -85
- package/app/node_modules/ajv/lib/vocabularies/validation/const.ts +0 -28
- package/app/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +0 -23
- package/app/node_modules/ajv/lib/vocabularies/validation/enum.ts +0 -54
- package/app/node_modules/ajv/lib/vocabularies/validation/index.ts +0 -49
- package/app/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +0 -16
- package/app/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +0 -26
- package/app/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +0 -30
- package/app/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +0 -42
- package/app/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +0 -26
- package/app/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +0 -34
- package/app/node_modules/ajv/lib/vocabularies/validation/pattern.ts +0 -39
- package/app/node_modules/ajv/lib/vocabularies/validation/required.ts +0 -98
- package/app/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +0 -79
- package/app/node_modules/ajv/package.json +0 -126
- package/app/node_modules/ajv-formats/LICENSE +0 -21
- package/app/node_modules/ajv-formats/README.md +0 -125
- package/app/node_modules/ajv-formats/dist/formats.d.ts +0 -9
- package/app/node_modules/ajv-formats/dist/formats.js +0 -208
- package/app/node_modules/ajv-formats/dist/index.d.ts +0 -15
- package/app/node_modules/ajv-formats/dist/index.js +0 -37
- package/app/node_modules/ajv-formats/dist/limit.d.ts +0 -10
- package/app/node_modules/ajv-formats/dist/limit.js +0 -69
- package/app/node_modules/ajv-formats/package.json +0 -74
- package/app/node_modules/ajv-formats/src/formats.ts +0 -269
- package/app/node_modules/ajv-formats/src/index.ts +0 -62
- package/app/node_modules/ajv-formats/src/limit.ts +0 -99
- package/app/node_modules/body-parser/LICENSE +0 -23
- package/app/node_modules/body-parser/README.md +0 -509
- package/app/node_modules/body-parser/index.js +0 -55
- package/app/node_modules/body-parser/lib/read.js +0 -247
- package/app/node_modules/body-parser/lib/types/json.js +0 -186
- package/app/node_modules/body-parser/lib/types/raw.js +0 -42
- package/app/node_modules/body-parser/lib/types/text.js +0 -36
- package/app/node_modules/body-parser/lib/types/urlencoded.js +0 -138
- package/app/node_modules/body-parser/lib/utils.js +0 -100
- package/app/node_modules/body-parser/package.json +0 -65
- package/app/node_modules/bytes/History.md +0 -97
- package/app/node_modules/bytes/LICENSE +0 -23
- package/app/node_modules/bytes/Readme.md +0 -152
- package/app/node_modules/bytes/index.js +0 -170
- package/app/node_modules/bytes/package.json +0 -42
- package/app/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
- package/app/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
- package/app/node_modules/call-bind-apply-helpers/.nycrc +0 -9
- package/app/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
- package/app/node_modules/call-bind-apply-helpers/LICENSE +0 -21
- package/app/node_modules/call-bind-apply-helpers/README.md +0 -62
- package/app/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
- package/app/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
- package/app/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
- package/app/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
- package/app/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
- package/app/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
- package/app/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
- package/app/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
- package/app/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
- package/app/node_modules/call-bind-apply-helpers/index.js +0 -15
- package/app/node_modules/call-bind-apply-helpers/package.json +0 -85
- package/app/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
- package/app/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
- package/app/node_modules/call-bind-apply-helpers/test/index.js +0 -63
- package/app/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
- package/app/node_modules/call-bound/.eslintrc +0 -13
- package/app/node_modules/call-bound/.github/FUNDING.yml +0 -12
- package/app/node_modules/call-bound/.nycrc +0 -9
- package/app/node_modules/call-bound/CHANGELOG.md +0 -42
- package/app/node_modules/call-bound/LICENSE +0 -21
- package/app/node_modules/call-bound/README.md +0 -53
- package/app/node_modules/call-bound/index.d.ts +0 -94
- package/app/node_modules/call-bound/index.js +0 -19
- package/app/node_modules/call-bound/package.json +0 -99
- package/app/node_modules/call-bound/test/index.js +0 -61
- package/app/node_modules/call-bound/tsconfig.json +0 -10
- package/app/node_modules/content-disposition/LICENSE +0 -22
- package/app/node_modules/content-disposition/README.md +0 -141
- package/app/node_modules/content-disposition/index.js +0 -536
- package/app/node_modules/content-disposition/package.json +0 -40
- package/app/node_modules/content-type/HISTORY.md +0 -29
- package/app/node_modules/content-type/LICENSE +0 -22
- package/app/node_modules/content-type/README.md +0 -94
- package/app/node_modules/content-type/index.js +0 -225
- package/app/node_modules/content-type/package.json +0 -42
- package/app/node_modules/cookie/LICENSE +0 -24
- package/app/node_modules/cookie/README.md +0 -317
- package/app/node_modules/cookie/SECURITY.md +0 -25
- package/app/node_modules/cookie/index.js +0 -335
- package/app/node_modules/cookie/package.json +0 -44
- package/app/node_modules/cookie-signature/History.md +0 -70
- package/app/node_modules/cookie-signature/LICENSE +0 -22
- package/app/node_modules/cookie-signature/Readme.md +0 -23
- package/app/node_modules/cookie-signature/index.js +0 -47
- package/app/node_modules/cookie-signature/package.json +0 -24
- package/app/node_modules/cors/LICENSE +0 -22
- package/app/node_modules/cors/README.md +0 -277
- package/app/node_modules/cors/lib/index.js +0 -238
- package/app/node_modules/cors/package.json +0 -42
- package/app/node_modules/cross-spawn/LICENSE +0 -21
- package/app/node_modules/cross-spawn/README.md +0 -89
- package/app/node_modules/cross-spawn/index.js +0 -39
- package/app/node_modules/cross-spawn/lib/enoent.js +0 -59
- package/app/node_modules/cross-spawn/lib/parse.js +0 -91
- package/app/node_modules/cross-spawn/lib/util/escape.js +0 -47
- package/app/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
- package/app/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
- package/app/node_modules/cross-spawn/node_modules/.bin/node-which +0 -55
- package/app/node_modules/cross-spawn/package.json +0 -73
- package/app/node_modules/debug/LICENSE +0 -20
- package/app/node_modules/debug/README.md +0 -481
- package/app/node_modules/debug/package.json +0 -64
- package/app/node_modules/debug/src/browser.js +0 -272
- package/app/node_modules/debug/src/common.js +0 -292
- package/app/node_modules/debug/src/index.js +0 -10
- package/app/node_modules/debug/src/node.js +0 -263
- package/app/node_modules/depd/History.md +0 -103
- package/app/node_modules/depd/LICENSE +0 -22
- package/app/node_modules/depd/Readme.md +0 -280
- package/app/node_modules/depd/index.js +0 -538
- package/app/node_modules/depd/lib/browser/index.js +0 -77
- package/app/node_modules/depd/package.json +0 -45
- package/app/node_modules/dunder-proto/.eslintrc +0 -5
- package/app/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
- package/app/node_modules/dunder-proto/.nycrc +0 -13
- package/app/node_modules/dunder-proto/CHANGELOG.md +0 -24
- package/app/node_modules/dunder-proto/LICENSE +0 -21
- package/app/node_modules/dunder-proto/README.md +0 -54
- package/app/node_modules/dunder-proto/get.d.ts +0 -5
- package/app/node_modules/dunder-proto/get.js +0 -30
- package/app/node_modules/dunder-proto/package.json +0 -76
- package/app/node_modules/dunder-proto/set.d.ts +0 -5
- package/app/node_modules/dunder-proto/set.js +0 -35
- package/app/node_modules/dunder-proto/test/get.js +0 -34
- package/app/node_modules/dunder-proto/test/index.js +0 -4
- package/app/node_modules/dunder-proto/test/set.js +0 -50
- package/app/node_modules/dunder-proto/tsconfig.json +0 -9
- package/app/node_modules/ee-first/LICENSE +0 -22
- package/app/node_modules/ee-first/README.md +0 -80
- package/app/node_modules/ee-first/index.js +0 -95
- package/app/node_modules/ee-first/package.json +0 -29
- package/app/node_modules/encodeurl/LICENSE +0 -22
- package/app/node_modules/encodeurl/README.md +0 -109
- package/app/node_modules/encodeurl/index.js +0 -60
- package/app/node_modules/encodeurl/package.json +0 -40
- package/app/node_modules/es-define-property/.eslintrc +0 -13
- package/app/node_modules/es-define-property/.github/FUNDING.yml +0 -12
- package/app/node_modules/es-define-property/.nycrc +0 -9
- package/app/node_modules/es-define-property/CHANGELOG.md +0 -29
- package/app/node_modules/es-define-property/LICENSE +0 -21
- package/app/node_modules/es-define-property/README.md +0 -49
- package/app/node_modules/es-define-property/index.d.ts +0 -3
- package/app/node_modules/es-define-property/index.js +0 -14
- package/app/node_modules/es-define-property/package.json +0 -81
- package/app/node_modules/es-define-property/test/index.js +0 -56
- package/app/node_modules/es-define-property/tsconfig.json +0 -10
- package/app/node_modules/es-errors/.eslintrc +0 -5
- package/app/node_modules/es-errors/.github/FUNDING.yml +0 -12
- package/app/node_modules/es-errors/CHANGELOG.md +0 -40
- package/app/node_modules/es-errors/LICENSE +0 -21
- package/app/node_modules/es-errors/README.md +0 -55
- package/app/node_modules/es-errors/eval.d.ts +0 -3
- package/app/node_modules/es-errors/eval.js +0 -4
- package/app/node_modules/es-errors/index.d.ts +0 -3
- package/app/node_modules/es-errors/index.js +0 -4
- package/app/node_modules/es-errors/package.json +0 -80
- package/app/node_modules/es-errors/range.d.ts +0 -3
- package/app/node_modules/es-errors/range.js +0 -4
- package/app/node_modules/es-errors/ref.d.ts +0 -3
- package/app/node_modules/es-errors/ref.js +0 -4
- package/app/node_modules/es-errors/syntax.d.ts +0 -3
- package/app/node_modules/es-errors/syntax.js +0 -4
- package/app/node_modules/es-errors/test/index.js +0 -19
- package/app/node_modules/es-errors/tsconfig.json +0 -49
- package/app/node_modules/es-errors/type.d.ts +0 -3
- package/app/node_modules/es-errors/type.js +0 -4
- package/app/node_modules/es-errors/uri.d.ts +0 -3
- package/app/node_modules/es-errors/uri.js +0 -4
- package/app/node_modules/es-object-atoms/.eslintrc +0 -16
- package/app/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
- package/app/node_modules/es-object-atoms/CHANGELOG.md +0 -44
- package/app/node_modules/es-object-atoms/LICENSE +0 -21
- package/app/node_modules/es-object-atoms/README.md +0 -63
- package/app/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
- package/app/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
- package/app/node_modules/es-object-atoms/ToObject.d.ts +0 -7
- package/app/node_modules/es-object-atoms/ToObject.js +0 -10
- package/app/node_modules/es-object-atoms/index.d.ts +0 -3
- package/app/node_modules/es-object-atoms/index.js +0 -4
- package/app/node_modules/es-object-atoms/isObject.d.ts +0 -3
- package/app/node_modules/es-object-atoms/isObject.js +0 -6
- package/app/node_modules/es-object-atoms/package.json +0 -79
- package/app/node_modules/es-object-atoms/test/index.js +0 -38
- package/app/node_modules/es-object-atoms/tsconfig.json +0 -7
- package/app/node_modules/escape-html/LICENSE +0 -24
- package/app/node_modules/escape-html/Readme.md +0 -43
- package/app/node_modules/escape-html/index.js +0 -78
- package/app/node_modules/escape-html/package.json +0 -24
- package/app/node_modules/etag/HISTORY.md +0 -83
- package/app/node_modules/etag/LICENSE +0 -22
- package/app/node_modules/etag/README.md +0 -159
- package/app/node_modules/etag/index.js +0 -131
- package/app/node_modules/etag/package.json +0 -47
- package/app/node_modules/eventsource/LICENSE +0 -22
- package/app/node_modules/eventsource/README.md +0 -167
- package/app/node_modules/eventsource/dist/index.cjs +0 -273
- package/app/node_modules/eventsource/dist/index.d.cts +0 -332
- package/app/node_modules/eventsource/dist/index.d.ts +0 -332
- package/app/node_modules/eventsource/dist/index.js +0 -273
- package/app/node_modules/eventsource/package.json +0 -130
- package/app/node_modules/eventsource/src/EventSource.ts +0 -596
- package/app/node_modules/eventsource/src/errors.ts +0 -141
- package/app/node_modules/eventsource/src/index.ts +0 -3
- package/app/node_modules/eventsource/src/types.ts +0 -152
- package/app/node_modules/eventsource-parser/LICENSE +0 -21
- package/app/node_modules/eventsource-parser/README.md +0 -157
- package/app/node_modules/eventsource-parser/dist/index.cjs +0 -177
- package/app/node_modules/eventsource-parser/dist/index.d.cts +0 -169
- package/app/node_modules/eventsource-parser/dist/index.d.ts +0 -169
- package/app/node_modules/eventsource-parser/dist/index.js +0 -177
- package/app/node_modules/eventsource-parser/dist/stream.cjs +0 -29
- package/app/node_modules/eventsource-parser/dist/stream.d.cts +0 -134
- package/app/node_modules/eventsource-parser/dist/stream.d.ts +0 -134
- package/app/node_modules/eventsource-parser/dist/stream.js +0 -30
- package/app/node_modules/eventsource-parser/package.json +0 -92
- package/app/node_modules/eventsource-parser/src/errors.ts +0 -44
- package/app/node_modules/eventsource-parser/src/index.ts +0 -8
- package/app/node_modules/eventsource-parser/src/parse.ts +0 -439
- package/app/node_modules/eventsource-parser/src/stream.ts +0 -107
- package/app/node_modules/eventsource-parser/src/types.ts +0 -122
- package/app/node_modules/eventsource-parser/stream.js +0 -2
- package/app/node_modules/express/LICENSE +0 -24
- package/app/node_modules/express/Readme.md +0 -276
- package/app/node_modules/express/index.js +0 -11
- package/app/node_modules/express/lib/application.js +0 -631
- package/app/node_modules/express/lib/express.js +0 -81
- package/app/node_modules/express/lib/request.js +0 -514
- package/app/node_modules/express/lib/response.js +0 -1053
- package/app/node_modules/express/lib/utils.js +0 -271
- package/app/node_modules/express/lib/view.js +0 -205
- package/app/node_modules/express/package.json +0 -99
- package/app/node_modules/express-rate-limit/dist/index.cjs +0 -1085
- package/app/node_modules/express-rate-limit/dist/index.d.cts +0 -688
- package/app/node_modules/express-rate-limit/dist/index.d.mts +0 -688
- package/app/node_modules/express-rate-limit/dist/index.d.ts +0 -688
- package/app/node_modules/express-rate-limit/dist/index.mjs +0 -1041
- package/app/node_modules/express-rate-limit/license.md +0 -20
- package/app/node_modules/express-rate-limit/package.json +0 -116
- package/app/node_modules/express-rate-limit/readme.md +0 -139
- package/app/node_modules/express-rate-limit/tsconfig.json +0 -8
- package/app/node_modules/fast-deep-equal/LICENSE +0 -21
- package/app/node_modules/fast-deep-equal/README.md +0 -96
- package/app/node_modules/fast-deep-equal/es6/index.d.ts +0 -2
- package/app/node_modules/fast-deep-equal/es6/index.js +0 -72
- package/app/node_modules/fast-deep-equal/es6/react.d.ts +0 -2
- package/app/node_modules/fast-deep-equal/es6/react.js +0 -79
- package/app/node_modules/fast-deep-equal/index.d.ts +0 -4
- package/app/node_modules/fast-deep-equal/index.js +0 -46
- package/app/node_modules/fast-deep-equal/package.json +0 -61
- package/app/node_modules/fast-deep-equal/react.d.ts +0 -2
- package/app/node_modules/fast-deep-equal/react.js +0 -53
- package/app/node_modules/fast-uri/.gitattributes +0 -2
- package/app/node_modules/fast-uri/.github/dependabot.yml +0 -13
- package/app/node_modules/fast-uri/.github/workflows/ci.yml +0 -106
- package/app/node_modules/fast-uri/.github/workflows/lock-threads.yml +0 -19
- package/app/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +0 -24
- package/app/node_modules/fast-uri/LICENSE +0 -30
- package/app/node_modules/fast-uri/README.md +0 -152
- package/app/node_modules/fast-uri/benchmark/benchmark.mjs +0 -159
- package/app/node_modules/fast-uri/benchmark/equal.mjs +0 -51
- package/app/node_modules/fast-uri/benchmark/non-simple-domain.mjs +0 -22
- package/app/node_modules/fast-uri/benchmark/package.json +0 -17
- package/app/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +0 -24
- package/app/node_modules/fast-uri/benchmark/ws-is-secure.mjs +0 -65
- package/app/node_modules/fast-uri/eslint.config.js +0 -6
- package/app/node_modules/fast-uri/index.js +0 -459
- package/app/node_modules/fast-uri/lib/schemes.js +0 -267
- package/app/node_modules/fast-uri/lib/utils.js +0 -443
- package/app/node_modules/fast-uri/package.json +0 -68
- package/app/node_modules/fast-uri/test/ajv.test.js +0 -43
- package/app/node_modules/fast-uri/test/equal.test.js +0 -117
- package/app/node_modules/fast-uri/test/fixtures/uri-js-parse.json +0 -501
- package/app/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +0 -120
- package/app/node_modules/fast-uri/test/parse.test.js +0 -323
- package/app/node_modules/fast-uri/test/resolve.test.js +0 -87
- package/app/node_modules/fast-uri/test/rfc-3986.test.js +0 -90
- package/app/node_modules/fast-uri/test/security-normalization.test.js +0 -39
- package/app/node_modules/fast-uri/test/security.test.js +0 -359
- package/app/node_modules/fast-uri/test/serialize.test.js +0 -151
- package/app/node_modules/fast-uri/test/uri-js-compatibility.test.js +0 -33
- package/app/node_modules/fast-uri/test/uri-js.test.js +0 -912
- package/app/node_modules/fast-uri/test/util.test.js +0 -38
- package/app/node_modules/fast-uri/tsconfig.json +0 -9
- package/app/node_modules/fast-uri/types/index.d.ts +0 -60
- package/app/node_modules/fast-uri/types/index.test-d.ts +0 -17
- package/app/node_modules/finalhandler/HISTORY.md +0 -239
- package/app/node_modules/finalhandler/LICENSE +0 -22
- package/app/node_modules/finalhandler/README.md +0 -150
- package/app/node_modules/finalhandler/index.js +0 -293
- package/app/node_modules/finalhandler/package.json +0 -47
- package/app/node_modules/forwarded/HISTORY.md +0 -21
- package/app/node_modules/forwarded/LICENSE +0 -22
- package/app/node_modules/forwarded/README.md +0 -57
- package/app/node_modules/forwarded/index.js +0 -90
- package/app/node_modules/forwarded/package.json +0 -45
- package/app/node_modules/fresh/HISTORY.md +0 -80
- package/app/node_modules/fresh/LICENSE +0 -23
- package/app/node_modules/fresh/README.md +0 -117
- package/app/node_modules/fresh/index.js +0 -136
- package/app/node_modules/fresh/package.json +0 -46
- package/app/node_modules/function-bind/.eslintrc +0 -21
- package/app/node_modules/function-bind/.github/FUNDING.yml +0 -12
- package/app/node_modules/function-bind/.github/SECURITY.md +0 -3
- package/app/node_modules/function-bind/.nycrc +0 -13
- package/app/node_modules/function-bind/CHANGELOG.md +0 -136
- package/app/node_modules/function-bind/LICENSE +0 -20
- package/app/node_modules/function-bind/README.md +0 -46
- package/app/node_modules/function-bind/implementation.js +0 -84
- package/app/node_modules/function-bind/index.js +0 -5
- package/app/node_modules/function-bind/package.json +0 -87
- package/app/node_modules/function-bind/test/.eslintrc +0 -9
- package/app/node_modules/function-bind/test/index.js +0 -252
- package/app/node_modules/get-intrinsic/.eslintrc +0 -42
- package/app/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
- package/app/node_modules/get-intrinsic/.nycrc +0 -9
- package/app/node_modules/get-intrinsic/CHANGELOG.md +0 -186
- package/app/node_modules/get-intrinsic/LICENSE +0 -21
- package/app/node_modules/get-intrinsic/README.md +0 -71
- package/app/node_modules/get-intrinsic/index.js +0 -378
- package/app/node_modules/get-intrinsic/package.json +0 -97
- package/app/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
- package/app/node_modules/get-proto/.eslintrc +0 -10
- package/app/node_modules/get-proto/.github/FUNDING.yml +0 -12
- package/app/node_modules/get-proto/.nycrc +0 -9
- package/app/node_modules/get-proto/CHANGELOG.md +0 -21
- package/app/node_modules/get-proto/LICENSE +0 -21
- package/app/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
- package/app/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
- package/app/node_modules/get-proto/README.md +0 -50
- package/app/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
- package/app/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
- package/app/node_modules/get-proto/index.d.ts +0 -5
- package/app/node_modules/get-proto/index.js +0 -27
- package/app/node_modules/get-proto/package.json +0 -81
- package/app/node_modules/get-proto/test/index.js +0 -68
- package/app/node_modules/get-proto/tsconfig.json +0 -9
- package/app/node_modules/gopd/.eslintrc +0 -16
- package/app/node_modules/gopd/.github/FUNDING.yml +0 -12
- package/app/node_modules/gopd/CHANGELOG.md +0 -45
- package/app/node_modules/gopd/LICENSE +0 -21
- package/app/node_modules/gopd/README.md +0 -40
- package/app/node_modules/gopd/gOPD.d.ts +0 -1
- package/app/node_modules/gopd/gOPD.js +0 -4
- package/app/node_modules/gopd/index.d.ts +0 -5
- package/app/node_modules/gopd/index.js +0 -15
- package/app/node_modules/gopd/package.json +0 -77
- package/app/node_modules/gopd/test/index.js +0 -36
- package/app/node_modules/gopd/tsconfig.json +0 -9
- package/app/node_modules/has-symbols/.eslintrc +0 -11
- package/app/node_modules/has-symbols/.github/FUNDING.yml +0 -12
- package/app/node_modules/has-symbols/.nycrc +0 -9
- package/app/node_modules/has-symbols/CHANGELOG.md +0 -91
- package/app/node_modules/has-symbols/LICENSE +0 -21
- package/app/node_modules/has-symbols/README.md +0 -46
- package/app/node_modules/has-symbols/index.d.ts +0 -3
- package/app/node_modules/has-symbols/index.js +0 -14
- package/app/node_modules/has-symbols/package.json +0 -111
- package/app/node_modules/has-symbols/shams.d.ts +0 -3
- package/app/node_modules/has-symbols/shams.js +0 -45
- package/app/node_modules/has-symbols/test/index.js +0 -22
- package/app/node_modules/has-symbols/test/shams/core-js.js +0 -29
- package/app/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
- package/app/node_modules/has-symbols/test/tests.js +0 -58
- package/app/node_modules/has-symbols/tsconfig.json +0 -10
- package/app/node_modules/hasown/.github/FUNDING.yml +0 -12
- package/app/node_modules/hasown/.nycrc +0 -13
- package/app/node_modules/hasown/CHANGELOG.md +0 -58
- package/app/node_modules/hasown/LICENSE +0 -21
- package/app/node_modules/hasown/README.md +0 -40
- package/app/node_modules/hasown/eslint.config.mjs +0 -6
- package/app/node_modules/hasown/index.d.ts +0 -3
- package/app/node_modules/hasown/index.js +0 -8
- package/app/node_modules/hasown/package.json +0 -91
- package/app/node_modules/hasown/tsconfig.json +0 -6
- package/app/node_modules/hono/LICENSE +0 -21
- package/app/node_modules/hono/README.md +0 -85
- package/app/node_modules/hono/dist/adapter/aws-lambda/conninfo.js +0 -24
- package/app/node_modules/hono/dist/adapter/aws-lambda/handler.js +0 -364
- package/app/node_modules/hono/dist/adapter/aws-lambda/index.js +0 -9
- package/app/node_modules/hono/dist/adapter/aws-lambda/types.js +0 -0
- package/app/node_modules/hono/dist/adapter/bun/conninfo.js +0 -27
- package/app/node_modules/hono/dist/adapter/bun/index.js +0 -16
- package/app/node_modules/hono/dist/adapter/bun/serve-static.js +0 -30
- package/app/node_modules/hono/dist/adapter/bun/server.js +0 -5
- package/app/node_modules/hono/dist/adapter/bun/ssg.js +0 -17
- package/app/node_modules/hono/dist/adapter/bun/websocket.js +0 -73
- package/app/node_modules/hono/dist/adapter/cloudflare-pages/conninfo.js +0 -9
- package/app/node_modules/hono/dist/adapter/cloudflare-pages/handler.js +0 -67
- package/app/node_modules/hono/dist/adapter/cloudflare-pages/index.js +0 -9
- package/app/node_modules/hono/dist/adapter/cloudflare-workers/conninfo.js +0 -9
- package/app/node_modules/hono/dist/adapter/cloudflare-workers/index.js +0 -9
- package/app/node_modules/hono/dist/adapter/cloudflare-workers/serve-static-module.js +0 -8
- package/app/node_modules/hono/dist/adapter/cloudflare-workers/serve-static.js +0 -22
- package/app/node_modules/hono/dist/adapter/cloudflare-workers/utils.js +0 -35
- package/app/node_modules/hono/dist/adapter/cloudflare-workers/websocket.js +0 -41
- package/app/node_modules/hono/dist/adapter/deno/conninfo.js +0 -14
- package/app/node_modules/hono/dist/adapter/deno/deno.d.js +0 -0
- package/app/node_modules/hono/dist/adapter/deno/index.js +0 -12
- package/app/node_modules/hono/dist/adapter/deno/serve-static.js +0 -40
- package/app/node_modules/hono/dist/adapter/deno/ssg.js +0 -18
- package/app/node_modules/hono/dist/adapter/deno/websocket.js +0 -32
- package/app/node_modules/hono/dist/adapter/lambda-edge/conninfo.js +0 -9
- package/app/node_modules/hono/dist/adapter/lambda-edge/handler.js +0 -96
- package/app/node_modules/hono/dist/adapter/lambda-edge/index.js +0 -7
- package/app/node_modules/hono/dist/adapter/netlify/conninfo.js +0 -9
- package/app/node_modules/hono/dist/adapter/netlify/handler.js +0 -9
- package/app/node_modules/hono/dist/adapter/netlify/index.js +0 -2
- package/app/node_modules/hono/dist/adapter/netlify/mod.js +0 -7
- package/app/node_modules/hono/dist/adapter/service-worker/handler.js +0 -20
- package/app/node_modules/hono/dist/adapter/service-worker/index.js +0 -9
- package/app/node_modules/hono/dist/adapter/service-worker/types.js +0 -0
- package/app/node_modules/hono/dist/adapter/vercel/conninfo.js +0 -10
- package/app/node_modules/hono/dist/adapter/vercel/handler.js +0 -7
- package/app/node_modules/hono/dist/adapter/vercel/index.js +0 -7
- package/app/node_modules/hono/dist/cjs/adapter/aws-lambda/conninfo.js +0 -46
- package/app/node_modules/hono/dist/cjs/adapter/aws-lambda/handler.js +0 -395
- package/app/node_modules/hono/dist/cjs/adapter/aws-lambda/index.js +0 -34
- package/app/node_modules/hono/dist/cjs/adapter/aws-lambda/types.js +0 -15
- package/app/node_modules/hono/dist/cjs/adapter/bun/conninfo.js +0 -49
- package/app/node_modules/hono/dist/cjs/adapter/bun/index.js +0 -45
- package/app/node_modules/hono/dist/cjs/adapter/bun/serve-static.js +0 -52
- package/app/node_modules/hono/dist/cjs/adapter/bun/server.js +0 -27
- package/app/node_modules/hono/dist/cjs/adapter/bun/ssg.js +0 -40
- package/app/node_modules/hono/dist/cjs/adapter/bun/websocket.js +0 -98
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-pages/conninfo.js +0 -31
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-pages/handler.js +0 -91
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-pages/index.js +0 -34
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-workers/conninfo.js +0 -31
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-workers/index.js +0 -33
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static-module.js +0 -30
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-workers/serve-static.js +0 -44
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-workers/utils.js +0 -57
- package/app/node_modules/hono/dist/cjs/adapter/cloudflare-workers/websocket.js +0 -63
- package/app/node_modules/hono/dist/cjs/adapter/deno/conninfo.js +0 -36
- package/app/node_modules/hono/dist/cjs/adapter/deno/deno.d.js +0 -0
- package/app/node_modules/hono/dist/cjs/adapter/deno/index.js +0 -38
- package/app/node_modules/hono/dist/cjs/adapter/deno/serve-static.js +0 -62
- package/app/node_modules/hono/dist/cjs/adapter/deno/ssg.js +0 -41
- package/app/node_modules/hono/dist/cjs/adapter/deno/websocket.js +0 -54
- package/app/node_modules/hono/dist/cjs/adapter/lambda-edge/conninfo.js +0 -31
- package/app/node_modules/hono/dist/cjs/adapter/lambda-edge/handler.js +0 -130
- package/app/node_modules/hono/dist/cjs/adapter/lambda-edge/index.js +0 -30
- package/app/node_modules/hono/dist/cjs/adapter/netlify/conninfo.js +0 -31
- package/app/node_modules/hono/dist/cjs/adapter/netlify/handler.js +0 -31
- package/app/node_modules/hono/dist/cjs/adapter/netlify/index.js +0 -21
- package/app/node_modules/hono/dist/cjs/adapter/netlify/mod.js +0 -30
- package/app/node_modules/hono/dist/cjs/adapter/service-worker/handler.js +0 -42
- package/app/node_modules/hono/dist/cjs/adapter/service-worker/index.js +0 -32
- package/app/node_modules/hono/dist/cjs/adapter/service-worker/types.js +0 -15
- package/app/node_modules/hono/dist/cjs/adapter/vercel/conninfo.js +0 -32
- package/app/node_modules/hono/dist/cjs/adapter/vercel/handler.js +0 -29
- package/app/node_modules/hono/dist/cjs/adapter/vercel/index.js +0 -30
- package/app/node_modules/hono/dist/cjs/client/client.js +0 -204
- package/app/node_modules/hono/dist/cjs/client/fetch-result-please.js +0 -85
- package/app/node_modules/hono/dist/cjs/client/index.js +0 -32
- package/app/node_modules/hono/dist/cjs/client/types.js +0 -15
- package/app/node_modules/hono/dist/cjs/client/utils.js +0 -105
- package/app/node_modules/hono/dist/cjs/compose.js +0 -68
- package/app/node_modules/hono/dist/cjs/context.js +0 -450
- package/app/node_modules/hono/dist/cjs/helper/accepts/accepts.js +0 -43
- package/app/node_modules/hono/dist/cjs/helper/accepts/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/helper/adapter/index.js +0 -81
- package/app/node_modules/hono/dist/cjs/helper/conninfo/index.js +0 -15
- package/app/node_modules/hono/dist/cjs/helper/conninfo/types.js +0 -15
- package/app/node_modules/hono/dist/cjs/helper/cookie/index.js +0 -130
- package/app/node_modules/hono/dist/cjs/helper/css/common.js +0 -273
- package/app/node_modules/hono/dist/cjs/helper/css/index.js +0 -157
- package/app/node_modules/hono/dist/cjs/helper/dev/index.js +0 -79
- package/app/node_modules/hono/dist/cjs/helper/factory/index.js +0 -54
- package/app/node_modules/hono/dist/cjs/helper/html/index.js +0 -64
- package/app/node_modules/hono/dist/cjs/helper/proxy/index.js +0 -115
- package/app/node_modules/hono/dist/cjs/helper/route/index.js +0 -71
- package/app/node_modules/hono/dist/cjs/helper/ssg/index.js +0 -43
- package/app/node_modules/hono/dist/cjs/helper/ssg/middleware.js +0 -73
- package/app/node_modules/hono/dist/cjs/helper/ssg/plugins.js +0 -70
- package/app/node_modules/hono/dist/cjs/helper/ssg/ssg.js +0 -320
- package/app/node_modules/hono/dist/cjs/helper/ssg/utils.js +0 -93
- package/app/node_modules/hono/dist/cjs/helper/streaming/index.js +0 -35
- package/app/node_modules/hono/dist/cjs/helper/streaming/sse.js +0 -91
- package/app/node_modules/hono/dist/cjs/helper/streaming/stream.js +0 -56
- package/app/node_modules/hono/dist/cjs/helper/streaming/text.js +0 -34
- package/app/node_modules/hono/dist/cjs/helper/streaming/utils.js +0 -35
- package/app/node_modules/hono/dist/cjs/helper/testing/index.js +0 -33
- package/app/node_modules/hono/dist/cjs/helper/websocket/index.js +0 -81
- package/app/node_modules/hono/dist/cjs/hono-base.js +0 -406
- package/app/node_modules/hono/dist/cjs/hono.js +0 -43
- package/app/node_modules/hono/dist/cjs/http-exception.js +0 -57
- package/app/node_modules/hono/dist/cjs/index.js +0 -30
- package/app/node_modules/hono/dist/cjs/jsx/base.js +0 -378
- package/app/node_modules/hono/dist/cjs/jsx/children.js +0 -44
- package/app/node_modules/hono/dist/cjs/jsx/components.js +0 -221
- package/app/node_modules/hono/dist/cjs/jsx/constants.js +0 -42
- package/app/node_modules/hono/dist/cjs/jsx/context.js +0 -188
- package/app/node_modules/hono/dist/cjs/jsx/dom/client.js +0 -76
- package/app/node_modules/hono/dist/cjs/jsx/dom/components.js +0 -55
- package/app/node_modules/hono/dist/cjs/jsx/dom/context.js +0 -71
- package/app/node_modules/hono/dist/cjs/jsx/dom/css.js +0 -168
- package/app/node_modules/hono/dist/cjs/jsx/dom/hooks/index.js +0 -74
- package/app/node_modules/hono/dist/cjs/jsx/dom/index.js +0 -181
- package/app/node_modules/hono/dist/cjs/jsx/dom/intrinsic-element/components.js +0 -399
- package/app/node_modules/hono/dist/cjs/jsx/dom/jsx-dev-runtime.js +0 -52
- package/app/node_modules/hono/dist/cjs/jsx/dom/jsx-runtime.js +0 -32
- package/app/node_modules/hono/dist/cjs/jsx/dom/render.js +0 -641
- package/app/node_modules/hono/dist/cjs/jsx/dom/server.js +0 -67
- package/app/node_modules/hono/dist/cjs/jsx/dom/utils.js +0 -32
- package/app/node_modules/hono/dist/cjs/jsx/hooks/index.js +0 -373
- package/app/node_modules/hono/dist/cjs/jsx/index.js +0 -138
- package/app/node_modules/hono/dist/cjs/jsx/intrinsic-element/common.js +0 -50
- package/app/node_modules/hono/dist/cjs/jsx/intrinsic-element/components.js +0 -189
- package/app/node_modules/hono/dist/cjs/jsx/intrinsic-elements.js +0 -15
- package/app/node_modules/hono/dist/cjs/jsx/jsx-dev-runtime.js +0 -41
- package/app/node_modules/hono/dist/cjs/jsx/jsx-runtime.js +0 -71
- package/app/node_modules/hono/dist/cjs/jsx/streaming.js +0 -179
- package/app/node_modules/hono/dist/cjs/jsx/types.js +0 -15
- package/app/node_modules/hono/dist/cjs/jsx/utils.js +0 -200
- package/app/node_modules/hono/dist/cjs/middleware/basic-auth/index.js +0 -88
- package/app/node_modules/hono/dist/cjs/middleware/bearer-auth/index.js +0 -114
- package/app/node_modules/hono/dist/cjs/middleware/body-limit/index.js +0 -75
- package/app/node_modules/hono/dist/cjs/middleware/cache/index.js +0 -219
- package/app/node_modules/hono/dist/cjs/middleware/combine/index.js +0 -101
- package/app/node_modules/hono/dist/cjs/middleware/compress/index.js +0 -97
- package/app/node_modules/hono/dist/cjs/middleware/context-storage/index.js +0 -47
- package/app/node_modules/hono/dist/cjs/middleware/cors/index.js +0 -109
- package/app/node_modules/hono/dist/cjs/middleware/csrf/index.js +0 -77
- package/app/node_modules/hono/dist/cjs/middleware/etag/digest.js +0 -101
- package/app/node_modules/hono/dist/cjs/middleware/etag/index.js +0 -99
- package/app/node_modules/hono/dist/cjs/middleware/ip-restriction/index.js +0 -176
- package/app/node_modules/hono/dist/cjs/middleware/jsx-renderer/index.js +0 -82
- package/app/node_modules/hono/dist/cjs/middleware/jwk/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +0 -139
- package/app/node_modules/hono/dist/cjs/middleware/jwt/index.js +0 -38
- package/app/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +0 -145
- package/app/node_modules/hono/dist/cjs/middleware/language/index.js +0 -35
- package/app/node_modules/hono/dist/cjs/middleware/language/language.js +0 -203
- package/app/node_modules/hono/dist/cjs/middleware/logger/index.js +0 -72
- package/app/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +0 -90
- package/app/node_modules/hono/dist/cjs/middleware/method-override/index.js +0 -106
- package/app/node_modules/hono/dist/cjs/middleware/powered-by/index.js +0 -32
- package/app/node_modules/hono/dist/cjs/middleware/pretty-json/index.js +0 -37
- package/app/node_modules/hono/dist/cjs/middleware/request-id/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/middleware/request-id/request-id.js +0 -43
- package/app/node_modules/hono/dist/cjs/middleware/secure-headers/index.js +0 -29
- package/app/node_modules/hono/dist/cjs/middleware/secure-headers/permissions-policy.js +0 -15
- package/app/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +0 -198
- package/app/node_modules/hono/dist/cjs/middleware/serve-static/index.js +0 -99
- package/app/node_modules/hono/dist/cjs/middleware/serve-static/path.js +0 -40
- package/app/node_modules/hono/dist/cjs/middleware/timeout/index.js +0 -47
- package/app/node_modules/hono/dist/cjs/middleware/timing/index.js +0 -35
- package/app/node_modules/hono/dist/cjs/middleware/timing/timing.js +0 -130
- package/app/node_modules/hono/dist/cjs/middleware/trailing-slash/index.js +0 -62
- package/app/node_modules/hono/dist/cjs/package.json +0 -3
- package/app/node_modules/hono/dist/cjs/preset/quick.js +0 -38
- package/app/node_modules/hono/dist/cjs/preset/tiny.js +0 -34
- package/app/node_modules/hono/dist/cjs/request/constants.js +0 -27
- package/app/node_modules/hono/dist/cjs/request.js +0 -342
- package/app/node_modules/hono/dist/cjs/router/linear-router/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/router/linear-router/router.js +0 -140
- package/app/node_modules/hono/dist/cjs/router/pattern-router/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/router/pattern-router/router.js +0 -70
- package/app/node_modules/hono/dist/cjs/router/reg-exp-router/index.js +0 -34
- package/app/node_modules/hono/dist/cjs/router/reg-exp-router/matcher.js +0 -48
- package/app/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +0 -133
- package/app/node_modules/hono/dist/cjs/router/reg-exp-router/prepared-router.js +0 -166
- package/app/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +0 -187
- package/app/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +0 -89
- package/app/node_modules/hono/dist/cjs/router/smart-router/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/router/smart-router/router.js +0 -80
- package/app/node_modules/hono/dist/cjs/router/trie-router/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/router/trie-router/node.js +0 -210
- package/app/node_modules/hono/dist/cjs/router/trie-router/router.js +0 -48
- package/app/node_modules/hono/dist/cjs/router.js +0 -40
- package/app/node_modules/hono/dist/cjs/types.js +0 -28
- package/app/node_modules/hono/dist/cjs/utils/accept.js +0 -245
- package/app/node_modules/hono/dist/cjs/utils/basic-auth.js +0 -45
- package/app/node_modules/hono/dist/cjs/utils/body.js +0 -111
- package/app/node_modules/hono/dist/cjs/utils/buffer.js +0 -103
- package/app/node_modules/hono/dist/cjs/utils/color.js +0 -48
- package/app/node_modules/hono/dist/cjs/utils/compress.js +0 -27
- package/app/node_modules/hono/dist/cjs/utils/concurrent.js +0 -61
- package/app/node_modules/hono/dist/cjs/utils/constants.js +0 -27
- package/app/node_modules/hono/dist/cjs/utils/cookie.js +0 -199
- package/app/node_modules/hono/dist/cjs/utils/crypto.js +0 -69
- package/app/node_modules/hono/dist/cjs/utils/encode.js +0 -54
- package/app/node_modules/hono/dist/cjs/utils/filepath.js +0 -58
- package/app/node_modules/hono/dist/cjs/utils/handler.js +0 -36
- package/app/node_modules/hono/dist/cjs/utils/headers.js +0 -15
- package/app/node_modules/hono/dist/cjs/utils/html.js +0 -150
- package/app/node_modules/hono/dist/cjs/utils/http-status.js +0 -15
- package/app/node_modules/hono/dist/cjs/utils/ipaddr.js +0 -318
- package/app/node_modules/hono/dist/cjs/utils/jwt/index.js +0 -28
- package/app/node_modules/hono/dist/cjs/utils/jwt/jwa.js +0 -42
- package/app/node_modules/hono/dist/cjs/utils/jwt/jws.js +0 -215
- package/app/node_modules/hono/dist/cjs/utils/jwt/jwt.js +0 -219
- package/app/node_modules/hono/dist/cjs/utils/jwt/types.js +0 -161
- package/app/node_modules/hono/dist/cjs/utils/jwt/utf8.js +0 -30
- package/app/node_modules/hono/dist/cjs/utils/mime.js +0 -106
- package/app/node_modules/hono/dist/cjs/utils/stream.js +0 -106
- package/app/node_modules/hono/dist/cjs/utils/types.js +0 -15
- package/app/node_modules/hono/dist/cjs/utils/url.js +0 -256
- package/app/node_modules/hono/dist/cjs/validator/index.js +0 -27
- package/app/node_modules/hono/dist/cjs/validator/utils.js +0 -15
- package/app/node_modules/hono/dist/cjs/validator/validator.js +0 -108
- package/app/node_modules/hono/dist/client/client.js +0 -189
- package/app/node_modules/hono/dist/client/fetch-result-please.js +0 -62
- package/app/node_modules/hono/dist/client/index.js +0 -8
- package/app/node_modules/hono/dist/client/types.js +0 -0
- package/app/node_modules/hono/dist/client/utils.js +0 -76
- package/app/node_modules/hono/dist/compose.js +0 -46
- package/app/node_modules/hono/dist/context.js +0 -427
- package/app/node_modules/hono/dist/helper/accepts/accepts.js +0 -20
- package/app/node_modules/hono/dist/helper/accepts/index.js +0 -5
- package/app/node_modules/hono/dist/helper/adapter/index.js +0 -56
- package/app/node_modules/hono/dist/helper/conninfo/index.js +0 -0
- package/app/node_modules/hono/dist/helper/conninfo/types.js +0 -0
- package/app/node_modules/hono/dist/helper/cookie/index.js +0 -102
- package/app/node_modules/hono/dist/helper/css/common.js +0 -236
- package/app/node_modules/hono/dist/helper/css/index.js +0 -140
- package/app/node_modules/hono/dist/helper/dev/index.js +0 -55
- package/app/node_modules/hono/dist/helper/factory/index.js +0 -30
- package/app/node_modules/hono/dist/helper/html/index.js +0 -41
- package/app/node_modules/hono/dist/helper/proxy/index.js +0 -93
- package/app/node_modules/hono/dist/helper/route/index.js +0 -46
- package/app/node_modules/hono/dist/helper/ssg/index.js +0 -19
- package/app/node_modules/hono/dist/helper/ssg/middleware.js +0 -45
- package/app/node_modules/hono/dist/helper/ssg/plugins.js +0 -47
- package/app/node_modules/hono/dist/helper/ssg/ssg.js +0 -297
- package/app/node_modules/hono/dist/helper/ssg/utils.js +0 -67
- package/app/node_modules/hono/dist/helper/streaming/index.js +0 -10
- package/app/node_modules/hono/dist/helper/streaming/sse.js +0 -68
- package/app/node_modules/hono/dist/helper/streaming/stream.js +0 -34
- package/app/node_modules/hono/dist/helper/streaming/text.js +0 -12
- package/app/node_modules/hono/dist/helper/streaming/utils.js +0 -13
- package/app/node_modules/hono/dist/helper/testing/index.js +0 -11
- package/app/node_modules/hono/dist/helper/websocket/index.js +0 -57
- package/app/node_modules/hono/dist/hono-base.js +0 -384
- package/app/node_modules/hono/dist/hono.js +0 -21
- package/app/node_modules/hono/dist/http-exception.js +0 -35
- package/app/node_modules/hono/dist/index.js +0 -7
- package/app/node_modules/hono/dist/jsx/base.js +0 -346
- package/app/node_modules/hono/dist/jsx/children.js +0 -21
- package/app/node_modules/hono/dist/jsx/components.js +0 -198
- package/app/node_modules/hono/dist/jsx/constants.js +0 -15
- package/app/node_modules/hono/dist/jsx/context.js +0 -162
- package/app/node_modules/hono/dist/jsx/dom/client.js +0 -53
- package/app/node_modules/hono/dist/jsx/dom/components.js +0 -32
- package/app/node_modules/hono/dist/jsx/dom/context.js +0 -48
- package/app/node_modules/hono/dist/jsx/dom/css.js +0 -150
- package/app/node_modules/hono/dist/jsx/dom/hooks/index.js +0 -48
- package/app/node_modules/hono/dist/jsx/dom/index.js +0 -142
- package/app/node_modules/hono/dist/jsx/dom/intrinsic-element/components.js +0 -374
- package/app/node_modules/hono/dist/jsx/dom/jsx-dev-runtime.js +0 -19
- package/app/node_modules/hono/dist/jsx/dom/jsx-runtime.js +0 -8
- package/app/node_modules/hono/dist/jsx/dom/render.js +0 -617
- package/app/node_modules/hono/dist/jsx/dom/server.js +0 -33
- package/app/node_modules/hono/dist/jsx/dom/utils.js +0 -10
- package/app/node_modules/hono/dist/jsx/hooks/index.js +0 -331
- package/app/node_modules/hono/dist/jsx/index.js +0 -103
- package/app/node_modules/hono/dist/jsx/intrinsic-element/common.js +0 -24
- package/app/node_modules/hono/dist/jsx/intrinsic-element/components.js +0 -165
- package/app/node_modules/hono/dist/jsx/intrinsic-elements.js +0 -0
- package/app/node_modules/hono/dist/jsx/jsx-dev-runtime.js +0 -18
- package/app/node_modules/hono/dist/jsx/jsx-runtime.js +0 -44
- package/app/node_modules/hono/dist/jsx/streaming.js +0 -155
- package/app/node_modules/hono/dist/jsx/types.js +0 -0
- package/app/node_modules/hono/dist/jsx/utils.js +0 -175
- package/app/node_modules/hono/dist/middleware/basic-auth/index.js +0 -66
- package/app/node_modules/hono/dist/middleware/bearer-auth/index.js +0 -92
- package/app/node_modules/hono/dist/middleware/body-limit/index.js +0 -53
- package/app/node_modules/hono/dist/middleware/cache/index.js +0 -197
- package/app/node_modules/hono/dist/middleware/combine/index.js +0 -77
- package/app/node_modules/hono/dist/middleware/compress/index.js +0 -74
- package/app/node_modules/hono/dist/middleware/context-storage/index.js +0 -23
- package/app/node_modules/hono/dist/middleware/cors/index.js +0 -87
- package/app/node_modules/hono/dist/middleware/csrf/index.js +0 -55
- package/app/node_modules/hono/dist/middleware/etag/digest.js +0 -79
- package/app/node_modules/hono/dist/middleware/etag/index.js +0 -76
- package/app/node_modules/hono/dist/middleware/ip-restriction/index.js +0 -162
- package/app/node_modules/hono/dist/middleware/jsx-renderer/index.js +0 -58
- package/app/node_modules/hono/dist/middleware/jwk/index.js +0 -5
- package/app/node_modules/hono/dist/middleware/jwk/jwk.js +0 -117
- package/app/node_modules/hono/dist/middleware/jwt/index.js +0 -11
- package/app/node_modules/hono/dist/middleware/jwt/jwt.js +0 -119
- package/app/node_modules/hono/dist/middleware/language/index.js +0 -15
- package/app/node_modules/hono/dist/middleware/language/language.js +0 -172
- package/app/node_modules/hono/dist/middleware/logger/index.js +0 -44
- package/app/node_modules/hono/dist/middleware/method-not-allowed/index.js +0 -68
- package/app/node_modules/hono/dist/middleware/method-override/index.js +0 -84
- package/app/node_modules/hono/dist/middleware/powered-by/index.js +0 -10
- package/app/node_modules/hono/dist/middleware/pretty-json/index.js +0 -15
- package/app/node_modules/hono/dist/middleware/request-id/index.js +0 -5
- package/app/node_modules/hono/dist/middleware/request-id/request-id.js +0 -21
- package/app/node_modules/hono/dist/middleware/secure-headers/index.js +0 -6
- package/app/node_modules/hono/dist/middleware/secure-headers/permissions-policy.js +0 -0
- package/app/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +0 -175
- package/app/node_modules/hono/dist/middleware/serve-static/index.js +0 -77
- package/app/node_modules/hono/dist/middleware/serve-static/path.js +0 -18
- package/app/node_modules/hono/dist/middleware/timeout/index.js +0 -25
- package/app/node_modules/hono/dist/middleware/timing/index.js +0 -9
- package/app/node_modules/hono/dist/middleware/timing/timing.js +0 -104
- package/app/node_modules/hono/dist/middleware/trailing-slash/index.js +0 -39
- package/app/node_modules/hono/dist/preset/quick.js +0 -16
- package/app/node_modules/hono/dist/preset/tiny.js +0 -12
- package/app/node_modules/hono/dist/request/constants.js +0 -5
- package/app/node_modules/hono/dist/request.js +0 -319
- package/app/node_modules/hono/dist/router/linear-router/index.js +0 -5
- package/app/node_modules/hono/dist/router/linear-router/router.js +0 -118
- package/app/node_modules/hono/dist/router/pattern-router/index.js +0 -5
- package/app/node_modules/hono/dist/router/pattern-router/router.js +0 -48
- package/app/node_modules/hono/dist/router/reg-exp-router/index.js +0 -9
- package/app/node_modules/hono/dist/router/reg-exp-router/matcher.js +0 -25
- package/app/node_modules/hono/dist/router/reg-exp-router/node.js +0 -110
- package/app/node_modules/hono/dist/router/reg-exp-router/prepared-router.js +0 -142
- package/app/node_modules/hono/dist/router/reg-exp-router/router.js +0 -169
- package/app/node_modules/hono/dist/router/reg-exp-router/trie.js +0 -67
- package/app/node_modules/hono/dist/router/smart-router/index.js +0 -5
- package/app/node_modules/hono/dist/router/smart-router/router.js +0 -58
- package/app/node_modules/hono/dist/router/trie-router/index.js +0 -5
- package/app/node_modules/hono/dist/router/trie-router/node.js +0 -188
- package/app/node_modules/hono/dist/router/trie-router/router.js +0 -26
- package/app/node_modules/hono/dist/router.js +0 -14
- package/app/node_modules/hono/dist/types/adapter/aws-lambda/conninfo.d.ts +0 -27
- package/app/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +0 -184
- package/app/node_modules/hono/dist/types/adapter/aws-lambda/index.d.ts +0 -8
- package/app/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +0 -153
- package/app/node_modules/hono/dist/types/adapter/bun/conninfo.d.ts +0 -7
- package/app/node_modules/hono/dist/types/adapter/bun/index.d.ts +0 -10
- package/app/node_modules/hono/dist/types/adapter/bun/serve-static.d.ts +0 -3
- package/app/node_modules/hono/dist/types/adapter/bun/server.d.ts +0 -12
- package/app/node_modules/hono/dist/types/adapter/bun/ssg.d.ts +0 -13
- package/app/node_modules/hono/dist/types/adapter/bun/websocket.d.ts +0 -39
- package/app/node_modules/hono/dist/types/adapter/cloudflare-pages/conninfo.d.ts +0 -21
- package/app/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +0 -33
- package/app/node_modules/hono/dist/types/adapter/cloudflare-pages/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/adapter/cloudflare-workers/conninfo.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/cloudflare-workers/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +0 -4
- package/app/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static.d.ts +0 -16
- package/app/node_modules/hono/dist/types/adapter/cloudflare-workers/utils.d.ts +0 -5
- package/app/node_modules/hono/dist/types/adapter/cloudflare-workers/websocket.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/deno/conninfo.d.ts +0 -7
- package/app/node_modules/hono/dist/types/adapter/deno/index.d.ts +0 -8
- package/app/node_modules/hono/dist/types/adapter/deno/serve-static.d.ts +0 -3
- package/app/node_modules/hono/dist/types/adapter/deno/ssg.d.ts +0 -13
- package/app/node_modules/hono/dist/types/adapter/deno/websocket.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/lambda-edge/conninfo.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts +0 -87
- package/app/node_modules/hono/dist/types/adapter/lambda-edge/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/adapter/netlify/conninfo.d.ts +0 -21
- package/app/node_modules/hono/dist/types/adapter/netlify/handler.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/netlify/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/adapter/netlify/mod.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts +0 -16
- package/app/node_modules/hono/dist/types/adapter/service-worker/index.d.ts +0 -28
- package/app/node_modules/hono/dist/types/adapter/service-worker/types.d.ts +0 -12
- package/app/node_modules/hono/dist/types/adapter/vercel/conninfo.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/vercel/handler.d.ts +0 -2
- package/app/node_modules/hono/dist/types/adapter/vercel/index.d.ts +0 -6
- package/app/node_modules/hono/dist/types/client/client.d.ts +0 -4
- package/app/node_modules/hono/dist/types/client/fetch-result-please.d.ts +0 -35
- package/app/node_modules/hono/dist/types/client/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/client/types.d.ts +0 -229
- package/app/node_modules/hono/dist/types/client/utils.d.ts +0 -18
- package/app/node_modules/hono/dist/types/compose.d.ts +0 -14
- package/app/node_modules/hono/dist/types/context.d.ts +0 -455
- package/app/node_modules/hono/dist/types/helper/accepts/accepts.d.ts +0 -30
- package/app/node_modules/hono/dist/types/helper/accepts/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/helper/adapter/index.d.ts +0 -12
- package/app/node_modules/hono/dist/types/helper/conninfo/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/helper/conninfo/types.d.ts +0 -36
- package/app/node_modules/hono/dist/types/helper/cookie/index.d.ts +0 -24
- package/app/node_modules/hono/dist/types/helper/css/common.d.ts +0 -59
- package/app/node_modules/hono/dist/types/helper/css/index.d.ts +0 -80
- package/app/node_modules/hono/dist/types/helper/dev/index.d.ts +0 -20
- package/app/node_modules/hono/dist/types/helper/factory/index.d.ts +0 -82
- package/app/node_modules/hono/dist/types/helper/html/index.d.ts +0 -8
- package/app/node_modules/hono/dist/types/helper/proxy/index.d.ts +0 -72
- package/app/node_modules/hono/dist/types/helper/route/index.d.ts +0 -75
- package/app/node_modules/hono/dist/types/helper/ssg/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/helper/ssg/middleware.d.ts +0 -44
- package/app/node_modules/hono/dist/types/helper/ssg/plugins.d.ts +0 -27
- package/app/node_modules/hono/dist/types/helper/ssg/ssg.d.ts +0 -91
- package/app/node_modules/hono/dist/types/helper/ssg/utils.d.ts +0 -16
- package/app/node_modules/hono/dist/types/helper/streaming/index.d.ts +0 -8
- package/app/node_modules/hono/dist/types/helper/streaming/sse.d.ts +0 -13
- package/app/node_modules/hono/dist/types/helper/streaming/stream.d.ts +0 -3
- package/app/node_modules/hono/dist/types/helper/streaming/text.d.ts +0 -3
- package/app/node_modules/hono/dist/types/helper/streaming/utils.d.ts +0 -1
- package/app/node_modules/hono/dist/types/helper/testing/index.d.ts +0 -12
- package/app/node_modules/hono/dist/types/helper/websocket/index.d.ts +0 -69
- package/app/node_modules/hono/dist/types/hono-base.d.ts +0 -221
- package/app/node_modules/hono/dist/types/hono.d.ts +0 -19
- package/app/node_modules/hono/dist/types/http-exception.d.ts +0 -59
- package/app/node_modules/hono/dist/types/index.d.ts +0 -37
- package/app/node_modules/hono/dist/types/jsx/base.d.ts +0 -58
- package/app/node_modules/hono/dist/types/jsx/children.d.ts +0 -9
- package/app/node_modules/hono/dist/types/jsx/components.d.ts +0 -15
- package/app/node_modules/hono/dist/types/jsx/constants.d.ts +0 -6
- package/app/node_modules/hono/dist/types/jsx/context.d.ts +0 -51
- package/app/node_modules/hono/dist/types/jsx/dom/client.d.ts +0 -31
- package/app/node_modules/hono/dist/types/jsx/dom/components.d.ts +0 -10
- package/app/node_modules/hono/dist/types/jsx/dom/context.d.ts +0 -3
- package/app/node_modules/hono/dist/types/jsx/dom/css.d.ts +0 -83
- package/app/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts +0 -39
- package/app/node_modules/hono/dist/types/jsx/dom/index.d.ts +0 -88
- package/app/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +0 -16
- package/app/node_modules/hono/dist/types/jsx/dom/jsx-dev-runtime.d.ts +0 -8
- package/app/node_modules/hono/dist/types/jsx/dom/jsx-runtime.d.ts +0 -7
- package/app/node_modules/hono/dist/types/jsx/dom/render.d.ts +0 -73
- package/app/node_modules/hono/dist/types/jsx/dom/server.d.ts +0 -106
- package/app/node_modules/hono/dist/types/jsx/dom/utils.d.ts +0 -1
- package/app/node_modules/hono/dist/types/jsx/hooks/index.d.ts +0 -47
- package/app/node_modules/hono/dist/types/jsx/index.d.ts +0 -75
- package/app/node_modules/hono/dist/types/jsx/intrinsic-element/common.d.ts +0 -6
- package/app/node_modules/hono/dist/types/jsx/intrinsic-element/components.d.ts +0 -13
- package/app/node_modules/hono/dist/types/jsx/intrinsic-elements.d.ts +0 -722
- package/app/node_modules/hono/dist/types/jsx/jsx-dev-runtime.d.ts +0 -8
- package/app/node_modules/hono/dist/types/jsx/jsx-runtime.d.ts +0 -12
- package/app/node_modules/hono/dist/types/jsx/streaming.d.ts +0 -36
- package/app/node_modules/hono/dist/types/jsx/types.d.ts +0 -35
- package/app/node_modules/hono/dist/types/jsx/utils.d.ts +0 -4
- package/app/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +0 -75
- package/app/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +0 -92
- package/app/node_modules/hono/dist/types/middleware/body-limit/index.d.ts +0 -45
- package/app/node_modules/hono/dist/types/middleware/cache/index.d.ts +0 -45
- package/app/node_modules/hono/dist/types/middleware/combine/index.d.ts +0 -85
- package/app/node_modules/hono/dist/types/middleware/compress/index.d.ts +0 -40
- package/app/node_modules/hono/dist/types/middleware/context-storage/index.d.ts +0 -40
- package/app/node_modules/hono/dist/types/middleware/cors/index.d.ts +0 -55
- package/app/node_modules/hono/dist/types/middleware/csrf/index.d.ts +0 -78
- package/app/node_modules/hono/dist/types/middleware/etag/digest.d.ts +0 -1
- package/app/node_modules/hono/dist/types/middleware/etag/index.d.ts +0 -42
- package/app/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +0 -67
- package/app/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +0 -77
- package/app/node_modules/hono/dist/types/middleware/jwk/index.d.ts +0 -1
- package/app/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +0 -56
- package/app/node_modules/hono/dist/types/middleware/jwt/index.d.ts +0 -8
- package/app/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +0 -69
- package/app/node_modules/hono/dist/types/middleware/language/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/middleware/language/language.d.ts +0 -120
- package/app/node_modules/hono/dist/types/middleware/logger/index.d.ts +0 -24
- package/app/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +0 -49
- package/app/node_modules/hono/dist/types/middleware/method-override/index.d.ts +0 -48
- package/app/node_modules/hono/dist/types/middleware/powered-by/index.d.ts +0 -29
- package/app/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts +0 -42
- package/app/node_modules/hono/dist/types/middleware/request-id/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/middleware/request-id/request-id.d.ts +0 -37
- package/app/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts +0 -8
- package/app/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +0 -14
- package/app/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +0 -109
- package/app/node_modules/hono/dist/types/middleware/serve-static/index.d.ts +0 -31
- package/app/node_modules/hono/dist/types/middleware/serve-static/path.d.ts +0 -5
- package/app/node_modules/hono/dist/types/middleware/timeout/index.d.ts +0 -31
- package/app/node_modules/hono/dist/types/middleware/timing/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/middleware/timing/timing.d.ts +0 -129
- package/app/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +0 -94
- package/app/node_modules/hono/dist/types/package.json +0 -3
- package/app/node_modules/hono/dist/types/preset/quick.d.ts +0 -10
- package/app/node_modules/hono/dist/types/preset/tiny.d.ts +0 -10
- package/app/node_modules/hono/dist/types/request/constants.d.ts +0 -1
- package/app/node_modules/hono/dist/types/request.d.ts +0 -324
- package/app/node_modules/hono/dist/types/router/linear-router/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/router/linear-router/router.d.ts +0 -7
- package/app/node_modules/hono/dist/types/router/pattern-router/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/router/pattern-router/router.d.ts +0 -7
- package/app/node_modules/hono/dist/types/router/reg-exp-router/index.d.ts +0 -6
- package/app/node_modules/hono/dist/types/router/reg-exp-router/matcher.d.ts +0 -7
- package/app/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +0 -10
- package/app/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +0 -17
- package/app/node_modules/hono/dist/types/router/reg-exp-router/router.d.ts +0 -11
- package/app/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +0 -8
- package/app/node_modules/hono/dist/types/router/smart-router/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/router/smart-router/router.d.ts +0 -11
- package/app/node_modules/hono/dist/types/router/trie-router/index.d.ts +0 -5
- package/app/node_modules/hono/dist/types/router/trie-router/node.d.ts +0 -7
- package/app/node_modules/hono/dist/types/router/trie-router/router.d.ts +0 -8
- package/app/node_modules/hono/dist/types/router.d.ts +0 -97
- package/app/node_modules/hono/dist/types/types.d.ts +0 -573
- package/app/node_modules/hono/dist/types/utils/accept.d.ts +0 -6
- package/app/node_modules/hono/dist/types/utils/basic-auth.d.ts +0 -5
- package/app/node_modules/hono/dist/types/utils/body.d.ts +0 -79
- package/app/node_modules/hono/dist/types/utils/buffer.d.ts +0 -17
- package/app/node_modules/hono/dist/types/utils/color.d.ts +0 -21
- package/app/node_modules/hono/dist/types/utils/compress.d.ts +0 -8
- package/app/node_modules/hono/dist/types/utils/concurrent.d.ts +0 -11
- package/app/node_modules/hono/dist/types/utils/constants.d.ts +0 -4
- package/app/node_modules/hono/dist/types/utils/cookie.d.ts +0 -40
- package/app/node_modules/hono/dist/types/utils/crypto.d.ts +0 -15
- package/app/node_modules/hono/dist/types/utils/encode.d.ts +0 -8
- package/app/node_modules/hono/dist/types/utils/filepath.d.ts +0 -12
- package/app/node_modules/hono/dist/types/utils/handler.d.ts +0 -6
- package/app/node_modules/hono/dist/types/utils/headers.d.ts +0 -8
- package/app/node_modules/hono/dist/types/utils/html.d.ts +0 -44
- package/app/node_modules/hono/dist/types/utils/http-status.d.ts +0 -32
- package/app/node_modules/hono/dist/types/utils/ipaddr.d.ts +0 -56
- package/app/node_modules/hono/dist/types/utils/jwt/index.d.ts +0 -18
- package/app/node_modules/hono/dist/types/utils/jwt/jwa.d.ts +0 -23
- package/app/node_modules/hono/dist/types/utils/jwt/jws.d.ts +0 -12
- package/app/node_modules/hono/dist/types/utils/jwt/jwt.d.ts +0 -43
- package/app/node_modules/hono/dist/types/utils/jwt/types.d.ts +0 -86
- package/app/node_modules/hono/dist/types/utils/jwt/utf8.d.ts +0 -6
- package/app/node_modules/hono/dist/types/utils/mime.d.ts +0 -70
- package/app/node_modules/hono/dist/types/utils/stream.d.ts +0 -31
- package/app/node_modules/hono/dist/types/utils/types.d.ts +0 -74
- package/app/node_modules/hono/dist/types/utils/url.d.ts +0 -40
- package/app/node_modules/hono/dist/types/validator/index.d.ts +0 -7
- package/app/node_modules/hono/dist/types/validator/utils.d.ts +0 -29
- package/app/node_modules/hono/dist/types/validator/validator.d.ts +0 -16
- package/app/node_modules/hono/dist/types.js +0 -6
- package/app/node_modules/hono/dist/utils/accept.js +0 -223
- package/app/node_modules/hono/dist/utils/basic-auth.js +0 -23
- package/app/node_modules/hono/dist/utils/body.js +0 -89
- package/app/node_modules/hono/dist/utils/buffer.js +0 -78
- package/app/node_modules/hono/dist/utils/color.js +0 -25
- package/app/node_modules/hono/dist/utils/compress.js +0 -5
- package/app/node_modules/hono/dist/utils/concurrent.js +0 -39
- package/app/node_modules/hono/dist/utils/constants.js +0 -5
- package/app/node_modules/hono/dist/utils/cookie.js +0 -174
- package/app/node_modules/hono/dist/utils/crypto.js +0 -44
- package/app/node_modules/hono/dist/utils/encode.js +0 -29
- package/app/node_modules/hono/dist/utils/filepath.js +0 -35
- package/app/node_modules/hono/dist/utils/handler.js +0 -13
- package/app/node_modules/hono/dist/utils/headers.js +0 -0
- package/app/node_modules/hono/dist/utils/html.js +0 -123
- package/app/node_modules/hono/dist/utils/http-status.js +0 -0
- package/app/node_modules/hono/dist/utils/ipaddr.js +0 -288
- package/app/node_modules/hono/dist/utils/jwt/index.js +0 -6
- package/app/node_modules/hono/dist/utils/jwt/jwa.js +0 -20
- package/app/node_modules/hono/dist/utils/jwt/jws.js +0 -192
- package/app/node_modules/hono/dist/utils/jwt/jwt.js +0 -207
- package/app/node_modules/hono/dist/utils/jwt/types.js +0 -124
- package/app/node_modules/hono/dist/utils/jwt/utf8.js +0 -7
- package/app/node_modules/hono/dist/utils/mime.js +0 -82
- package/app/node_modules/hono/dist/utils/stream.js +0 -84
- package/app/node_modules/hono/dist/utils/types.js +0 -0
- package/app/node_modules/hono/dist/utils/url.js +0 -221
- package/app/node_modules/hono/dist/validator/index.js +0 -5
- package/app/node_modules/hono/dist/validator/utils.js +0 -0
- package/app/node_modules/hono/dist/validator/validator.js +0 -86
- package/app/node_modules/hono/package.json +0 -706
- package/app/node_modules/http-errors/HISTORY.md +0 -186
- package/app/node_modules/http-errors/LICENSE +0 -23
- package/app/node_modules/http-errors/README.md +0 -169
- package/app/node_modules/http-errors/index.js +0 -290
- package/app/node_modules/http-errors/package.json +0 -54
- package/app/node_modules/iconv-lite/LICENSE +0 -21
- package/app/node_modules/iconv-lite/README.md +0 -138
- package/app/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -532
- package/app/node_modules/iconv-lite/encodings/dbcs-data.js +0 -185
- package/app/node_modules/iconv-lite/encodings/index.js +0 -23
- package/app/node_modules/iconv-lite/encodings/internal.js +0 -218
- package/app/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -75
- package/app/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
- package/app/node_modules/iconv-lite/encodings/sbcs-data.js +0 -180
- package/app/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
- package/app/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
- package/app/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
- package/app/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
- package/app/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
- package/app/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
- package/app/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
- package/app/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
- package/app/node_modules/iconv-lite/encodings/utf16.js +0 -187
- package/app/node_modules/iconv-lite/encodings/utf32.js +0 -314
- package/app/node_modules/iconv-lite/encodings/utf7.js +0 -283
- package/app/node_modules/iconv-lite/lib/bom-handling.js +0 -48
- package/app/node_modules/iconv-lite/lib/helpers/merge-exports.js +0 -13
- package/app/node_modules/iconv-lite/lib/index.d.ts +0 -129
- package/app/node_modules/iconv-lite/lib/index.js +0 -182
- package/app/node_modules/iconv-lite/lib/streams.js +0 -105
- package/app/node_modules/iconv-lite/package.json +0 -70
- package/app/node_modules/iconv-lite/types/encodings.d.ts +0 -425
- package/app/node_modules/inherits/LICENSE +0 -16
- package/app/node_modules/inherits/README.md +0 -42
- package/app/node_modules/inherits/inherits.js +0 -9
- package/app/node_modules/inherits/inherits_browser.js +0 -27
- package/app/node_modules/inherits/package.json +0 -29
- package/app/node_modules/ip-address/LICENSE +0 -19
- package/app/node_modules/ip-address/README.md +0 -298
- package/app/node_modules/ip-address/dist/address-error.d.ts +0 -15
- package/app/node_modules/ip-address/dist/address-error.js +0 -12
- package/app/node_modules/ip-address/dist/common.d.ts +0 -49
- package/app/node_modules/ip-address/dist/common.js +0 -106
- package/app/node_modules/ip-address/dist/ip-address.d.ts +0 -7
- package/app/node_modules/ip-address/dist/ip-address.js +0 -35
- package/app/node_modules/ip-address/dist/ipv4.d.ts +0 -290
- package/app/node_modules/ip-address/dist/ipv4.js +0 -505
- package/app/node_modules/ip-address/dist/ipv6.d.ts +0 -561
- package/app/node_modules/ip-address/dist/ipv6.js +0 -1353
- package/app/node_modules/ip-address/dist/v4/constants.d.ts +0 -4
- package/app/node_modules/ip-address/dist/v4/constants.js +0 -12
- package/app/node_modules/ip-address/dist/v6/constants.d.ts +0 -44
- package/app/node_modules/ip-address/dist/v6/constants.js +0 -82
- package/app/node_modules/ip-address/dist/v6/helpers.d.ts +0 -18
- package/app/node_modules/ip-address/dist/v6/helpers.js +0 -54
- package/app/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -5
- package/app/node_modules/ip-address/dist/v6/regular-expressions.js +0 -95
- package/app/node_modules/ip-address/package.json +0 -90
- package/app/node_modules/ipaddr.js/LICENSE +0 -19
- package/app/node_modules/ipaddr.js/README.md +0 -233
- package/app/node_modules/ipaddr.js/ipaddr.min.js +0 -1
- package/app/node_modules/ipaddr.js/lib/ipaddr.js +0 -673
- package/app/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +0 -68
- package/app/node_modules/ipaddr.js/package.json +0 -35
- package/app/node_modules/is-promise/LICENSE +0 -19
- package/app/node_modules/is-promise/index.d.ts +0 -2
- package/app/node_modules/is-promise/index.js +0 -6
- package/app/node_modules/is-promise/index.mjs +0 -3
- package/app/node_modules/is-promise/package.json +0 -30
- package/app/node_modules/is-promise/readme.md +0 -33
- package/app/node_modules/isexe/LICENSE +0 -15
- package/app/node_modules/isexe/README.md +0 -51
- package/app/node_modules/isexe/index.js +0 -57
- package/app/node_modules/isexe/mode.js +0 -41
- package/app/node_modules/isexe/package.json +0 -31
- package/app/node_modules/isexe/test/basic.js +0 -221
- package/app/node_modules/isexe/windows.js +0 -42
- package/app/node_modules/jose/LICENSE.md +0 -21
- package/app/node_modules/jose/README.md +0 -150
- package/app/node_modules/jose/dist/types/index.d.ts +0 -56
- package/app/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +0 -37
- package/app/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +0 -53
- package/app/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +0 -37
- package/app/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +0 -71
- package/app/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +0 -43
- package/app/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +0 -73
- package/app/node_modules/jose/dist/types/jwk/embedded.d.ts +0 -13
- package/app/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -17
- package/app/node_modules/jose/dist/types/jwks/local.d.ts +0 -20
- package/app/node_modules/jose/dist/types/jwks/remote.d.ts +0 -106
- package/app/node_modules/jose/dist/types/jws/compact/sign.d.ts +0 -25
- package/app/node_modules/jose/dist/types/jws/compact/verify.d.ts +0 -37
- package/app/node_modules/jose/dist/types/jws/flattened/sign.d.ts +0 -31
- package/app/node_modules/jose/dist/types/jws/flattened/verify.d.ts +0 -37
- package/app/node_modules/jose/dist/types/jws/general/sign.d.ts +0 -52
- package/app/node_modules/jose/dist/types/jws/general/verify.d.ts +0 -44
- package/app/node_modules/jose/dist/types/jwt/decrypt.d.ts +0 -41
- package/app/node_modules/jose/dist/types/jwt/encrypt.d.ts +0 -67
- package/app/node_modules/jose/dist/types/jwt/sign.d.ts +0 -32
- package/app/node_modules/jose/dist/types/jwt/unsecured.d.ts +0 -34
- package/app/node_modules/jose/dist/types/jwt/verify.d.ts +0 -38
- package/app/node_modules/jose/dist/types/key/export.d.ts +0 -19
- package/app/node_modules/jose/dist/types/key/generate_key_pair.d.ts +0 -40
- package/app/node_modules/jose/dist/types/key/generate_secret.d.ts +0 -37
- package/app/node_modules/jose/dist/types/key/import.d.ts +0 -73
- package/app/node_modules/jose/dist/types/types.d.ts +0 -869
- package/app/node_modules/jose/dist/types/util/base64url.d.ts +0 -16
- package/app/node_modules/jose/dist/types/util/decode_jwt.d.ts +0 -10
- package/app/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -9
- package/app/node_modules/jose/dist/types/util/errors.d.ts +0 -220
- package/app/node_modules/jose/dist/webapi/index.js +0 -32
- package/app/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +0 -9
- package/app/node_modules/jose/dist/webapi/jwe/compact/encrypt.js +0 -27
- package/app/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +0 -11
- package/app/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +0 -72
- package/app/node_modules/jose/dist/webapi/jwe/general/decrypt.js +0 -51
- package/app/node_modules/jose/dist/webapi/jwe/general/encrypt.js +0 -166
- package/app/node_modules/jose/dist/webapi/jwk/embedded.js +0 -19
- package/app/node_modules/jose/dist/webapi/jwk/thumbprint.js +0 -68
- package/app/node_modules/jose/dist/webapi/jwks/local.js +0 -78
- package/app/node_modules/jose/dist/webapi/jwks/remote.js +0 -170
- package/app/node_modules/jose/dist/webapi/jws/compact/sign.js +0 -21
- package/app/node_modules/jose/dist/webapi/jws/compact/verify.js +0 -9
- package/app/node_modules/jose/dist/webapi/jws/flattened/sign.js +0 -31
- package/app/node_modules/jose/dist/webapi/jws/flattened/verify.js +0 -24
- package/app/node_modules/jose/dist/webapi/jws/general/sign.js +0 -74
- package/app/node_modules/jose/dist/webapi/jws/general/verify.js +0 -44
- package/app/node_modules/jose/dist/webapi/jwt/decrypt.js +0 -23
- package/app/node_modules/jose/dist/webapi/jwt/encrypt.js +0 -101
- package/app/node_modules/jose/dist/webapi/jwt/sign.js +0 -51
- package/app/node_modules/jose/dist/webapi/jwt/unsecured.js +0 -64
- package/app/node_modules/jose/dist/webapi/jwt/verify.js +0 -15
- package/app/node_modules/jose/dist/webapi/key/export.js +0 -44
- package/app/node_modules/jose/dist/webapi/key/generate_key_pair.js +0 -48
- package/app/node_modules/jose/dist/webapi/key/generate_secret.js +0 -40
- package/app/node_modules/jose/dist/webapi/key/import.js +0 -57
- package/app/node_modules/jose/dist/webapi/lib/asn1.js +0 -174
- package/app/node_modules/jose/dist/webapi/lib/base64.js +0 -22
- package/app/node_modules/jose/dist/webapi/lib/buffer_utils.js +0 -44
- package/app/node_modules/jose/dist/webapi/lib/content_encryption.js +0 -142
- package/app/node_modules/jose/dist/webapi/lib/crypto_key.js +0 -28
- package/app/node_modules/jose/dist/webapi/lib/deflate.js +0 -44
- package/app/node_modules/jose/dist/webapi/lib/helpers.js +0 -42
- package/app/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -26
- package/app/node_modules/jose/dist/webapi/lib/is_key_like.js +0 -17
- package/app/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +0 -107
- package/app/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +0 -186
- package/app/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +0 -110
- package/app/node_modules/jose/dist/webapi/lib/jwk_to_key.js +0 -17
- package/app/node_modules/jose/dist/webapi/lib/jws_algorithms.js +0 -73
- package/app/node_modules/jose/dist/webapi/lib/jws_sign.js +0 -74
- package/app/node_modules/jose/dist/webapi/lib/jws_verify.js +0 -107
- package/app/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +0 -197
- package/app/node_modules/jose/dist/webapi/lib/key.js +0 -132
- package/app/node_modules/jose/dist/webapi/lib/key_algorithm.js +0 -10
- package/app/node_modules/jose/dist/webapi/lib/key_descriptor.js +0 -7
- package/app/node_modules/jose/dist/webapi/lib/key_management.js +0 -256
- package/app/node_modules/jose/dist/webapi/lib/options.js +0 -48
- package/app/node_modules/jose/dist/webapi/lib/signing.js +0 -26
- package/app/node_modules/jose/dist/webapi/lib/type_checks.js +0 -35
- package/app/node_modules/jose/dist/webapi/util/base64url.js +0 -39
- package/app/node_modules/jose/dist/webapi/util/decode_jwt.js +0 -32
- package/app/node_modules/jose/dist/webapi/util/decode_protected_header.js +0 -24
- package/app/node_modules/jose/dist/webapi/util/errors.js +0 -99
- package/app/node_modules/jose/package.json +0 -198
- package/app/node_modules/json-schema-traverse/.eslintrc.yml +0 -27
- package/app/node_modules/json-schema-traverse/.github/FUNDING.yml +0 -2
- package/app/node_modules/json-schema-traverse/.github/workflows/build.yml +0 -28
- package/app/node_modules/json-schema-traverse/.github/workflows/publish.yml +0 -27
- package/app/node_modules/json-schema-traverse/LICENSE +0 -21
- package/app/node_modules/json-schema-traverse/README.md +0 -95
- package/app/node_modules/json-schema-traverse/index.d.ts +0 -40
- package/app/node_modules/json-schema-traverse/index.js +0 -93
- package/app/node_modules/json-schema-traverse/package.json +0 -43
- package/app/node_modules/json-schema-traverse/spec/.eslintrc.yml +0 -6
- package/app/node_modules/json-schema-traverse/spec/fixtures/schema.js +0 -125
- package/app/node_modules/json-schema-traverse/spec/index.spec.js +0 -171
- package/app/node_modules/json-schema-typed/LICENSE.md +0 -57
- package/app/node_modules/json-schema-typed/README.md +0 -108
- package/app/node_modules/json-schema-typed/draft_07.d.ts +0 -882
- package/app/node_modules/json-schema-typed/draft_07.js +0 -328
- package/app/node_modules/json-schema-typed/draft_2019_09.d.ts +0 -1247
- package/app/node_modules/json-schema-typed/draft_2019_09.js +0 -349
- package/app/node_modules/json-schema-typed/draft_2020_12.d.ts +0 -1239
- package/app/node_modules/json-schema-typed/draft_2020_12.js +0 -352
- package/app/node_modules/json-schema-typed/package.json +0 -44
- package/app/node_modules/math-intrinsics/.eslintrc +0 -16
- package/app/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
- package/app/node_modules/math-intrinsics/CHANGELOG.md +0 -24
- package/app/node_modules/math-intrinsics/LICENSE +0 -21
- package/app/node_modules/math-intrinsics/README.md +0 -50
- package/app/node_modules/math-intrinsics/abs.d.ts +0 -1
- package/app/node_modules/math-intrinsics/abs.js +0 -4
- package/app/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
- package/app/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
- package/app/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
- package/app/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
- package/app/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
- package/app/node_modules/math-intrinsics/constants/maxValue.js +0 -5
- package/app/node_modules/math-intrinsics/floor.d.ts +0 -1
- package/app/node_modules/math-intrinsics/floor.js +0 -4
- package/app/node_modules/math-intrinsics/isFinite.d.ts +0 -3
- package/app/node_modules/math-intrinsics/isFinite.js +0 -12
- package/app/node_modules/math-intrinsics/isInteger.d.ts +0 -3
- package/app/node_modules/math-intrinsics/isInteger.js +0 -16
- package/app/node_modules/math-intrinsics/isNaN.d.ts +0 -1
- package/app/node_modules/math-intrinsics/isNaN.js +0 -6
- package/app/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
- package/app/node_modules/math-intrinsics/isNegativeZero.js +0 -6
- package/app/node_modules/math-intrinsics/max.d.ts +0 -1
- package/app/node_modules/math-intrinsics/max.js +0 -4
- package/app/node_modules/math-intrinsics/min.d.ts +0 -1
- package/app/node_modules/math-intrinsics/min.js +0 -4
- package/app/node_modules/math-intrinsics/mod.d.ts +0 -3
- package/app/node_modules/math-intrinsics/mod.js +0 -9
- package/app/node_modules/math-intrinsics/package.json +0 -86
- package/app/node_modules/math-intrinsics/pow.d.ts +0 -1
- package/app/node_modules/math-intrinsics/pow.js +0 -4
- package/app/node_modules/math-intrinsics/round.d.ts +0 -1
- package/app/node_modules/math-intrinsics/round.js +0 -4
- package/app/node_modules/math-intrinsics/sign.d.ts +0 -3
- package/app/node_modules/math-intrinsics/sign.js +0 -11
- package/app/node_modules/math-intrinsics/test/index.js +0 -192
- package/app/node_modules/math-intrinsics/tsconfig.json +0 -3
- package/app/node_modules/media-typer/HISTORY.md +0 -50
- package/app/node_modules/media-typer/LICENSE +0 -22
- package/app/node_modules/media-typer/README.md +0 -94
- package/app/node_modules/media-typer/index.js +0 -135
- package/app/node_modules/media-typer/package.json +0 -37
- package/app/node_modules/merge-descriptors/index.d.ts +0 -11
- package/app/node_modules/merge-descriptors/index.js +0 -26
- package/app/node_modules/merge-descriptors/license +0 -11
- package/app/node_modules/merge-descriptors/package.json +0 -50
- package/app/node_modules/merge-descriptors/readme.md +0 -55
- package/app/node_modules/mime-db/HISTORY.md +0 -541
- package/app/node_modules/mime-db/LICENSE +0 -23
- package/app/node_modules/mime-db/README.md +0 -109
- package/app/node_modules/mime-db/db.json +0 -9342
- package/app/node_modules/mime-db/index.js +0 -12
- package/app/node_modules/mime-db/package.json +0 -56
- package/app/node_modules/mime-types/HISTORY.md +0 -428
- package/app/node_modules/mime-types/LICENSE +0 -23
- package/app/node_modules/mime-types/README.md +0 -126
- package/app/node_modules/mime-types/index.js +0 -211
- package/app/node_modules/mime-types/mimeScore.js +0 -57
- package/app/node_modules/mime-types/package.json +0 -49
- package/app/node_modules/ms/index.js +0 -162
- package/app/node_modules/ms/license.md +0 -21
- package/app/node_modules/ms/package.json +0 -38
- package/app/node_modules/ms/readme.md +0 -59
- package/app/node_modules/negotiator/HISTORY.md +0 -114
- package/app/node_modules/negotiator/LICENSE +0 -24
- package/app/node_modules/negotiator/README.md +0 -212
- package/app/node_modules/negotiator/index.js +0 -83
- package/app/node_modules/negotiator/lib/charset.js +0 -169
- package/app/node_modules/negotiator/lib/encoding.js +0 -205
- package/app/node_modules/negotiator/lib/language.js +0 -179
- package/app/node_modules/negotiator/lib/mediaType.js +0 -294
- package/app/node_modules/negotiator/package.json +0 -43
- package/app/node_modules/object-assign/index.js +0 -90
- package/app/node_modules/object-assign/license +0 -21
- package/app/node_modules/object-assign/package.json +0 -42
- package/app/node_modules/object-assign/readme.md +0 -61
- package/app/node_modules/object-inspect/.eslintrc +0 -53
- package/app/node_modules/object-inspect/.github/FUNDING.yml +0 -12
- package/app/node_modules/object-inspect/.nycrc +0 -13
- package/app/node_modules/object-inspect/CHANGELOG.md +0 -424
- package/app/node_modules/object-inspect/LICENSE +0 -21
- package/app/node_modules/object-inspect/example/all.js +0 -23
- package/app/node_modules/object-inspect/example/circular.js +0 -6
- package/app/node_modules/object-inspect/example/fn.js +0 -5
- package/app/node_modules/object-inspect/example/inspect.js +0 -10
- package/app/node_modules/object-inspect/index.js +0 -544
- package/app/node_modules/object-inspect/package-support.json +0 -20
- package/app/node_modules/object-inspect/package.json +0 -105
- package/app/node_modules/object-inspect/readme.markdown +0 -84
- package/app/node_modules/object-inspect/test/bigint.js +0 -58
- package/app/node_modules/object-inspect/test/browser/dom.js +0 -15
- package/app/node_modules/object-inspect/test/circular.js +0 -16
- package/app/node_modules/object-inspect/test/deep.js +0 -12
- package/app/node_modules/object-inspect/test/element.js +0 -53
- package/app/node_modules/object-inspect/test/err.js +0 -48
- package/app/node_modules/object-inspect/test/fakes.js +0 -29
- package/app/node_modules/object-inspect/test/fn.js +0 -76
- package/app/node_modules/object-inspect/test/global.js +0 -17
- package/app/node_modules/object-inspect/test/has.js +0 -15
- package/app/node_modules/object-inspect/test/holes.js +0 -15
- package/app/node_modules/object-inspect/test/indent-option.js +0 -271
- package/app/node_modules/object-inspect/test/inspect.js +0 -139
- package/app/node_modules/object-inspect/test/lowbyte.js +0 -12
- package/app/node_modules/object-inspect/test/number.js +0 -58
- package/app/node_modules/object-inspect/test/quoteStyle.js +0 -26
- package/app/node_modules/object-inspect/test/toStringTag.js +0 -40
- package/app/node_modules/object-inspect/test/undef.js +0 -12
- package/app/node_modules/object-inspect/test/values.js +0 -261
- package/app/node_modules/object-inspect/test-core-js.js +0 -26
- package/app/node_modules/object-inspect/util.inspect.js +0 -1
- package/app/node_modules/on-finished/HISTORY.md +0 -98
- package/app/node_modules/on-finished/LICENSE +0 -23
- package/app/node_modules/on-finished/README.md +0 -162
- package/app/node_modules/on-finished/index.js +0 -234
- package/app/node_modules/on-finished/package.json +0 -39
- package/app/node_modules/once/LICENSE +0 -15
- package/app/node_modules/once/README.md +0 -79
- package/app/node_modules/once/once.js +0 -42
- package/app/node_modules/once/package.json +0 -33
- package/app/node_modules/parseurl/HISTORY.md +0 -58
- package/app/node_modules/parseurl/LICENSE +0 -24
- package/app/node_modules/parseurl/README.md +0 -133
- package/app/node_modules/parseurl/index.js +0 -158
- package/app/node_modules/parseurl/package.json +0 -40
- package/app/node_modules/path-key/index.d.ts +0 -40
- package/app/node_modules/path-key/index.js +0 -16
- package/app/node_modules/path-key/license +0 -9
- package/app/node_modules/path-key/package.json +0 -39
- package/app/node_modules/path-key/readme.md +0 -61
- package/app/node_modules/path-to-regexp/LICENSE +0 -21
- package/app/node_modules/path-to-regexp/Readme.md +0 -224
- package/app/node_modules/path-to-regexp/dist/index.d.ts +0 -147
- package/app/node_modules/path-to-regexp/dist/index.js +0 -431
- package/app/node_modules/path-to-regexp/package.json +0 -64
- package/app/node_modules/pkce-challenge/CHANGELOG.md +0 -114
- package/app/node_modules/pkce-challenge/LICENSE +0 -21
- package/app/node_modules/pkce-challenge/README.md +0 -55
- package/app/node_modules/pkce-challenge/dist/index.browser.d.ts +0 -19
- package/app/node_modules/pkce-challenge/dist/index.browser.js +0 -75
- package/app/node_modules/pkce-challenge/dist/index.node.cjs +0 -83
- package/app/node_modules/pkce-challenge/dist/index.node.d.cts +0 -19
- package/app/node_modules/pkce-challenge/dist/index.node.d.ts +0 -19
- package/app/node_modules/pkce-challenge/dist/index.node.js +0 -78
- package/app/node_modules/pkce-challenge/package.json +0 -59
- package/app/node_modules/proxy-addr/HISTORY.md +0 -161
- package/app/node_modules/proxy-addr/LICENSE +0 -22
- package/app/node_modules/proxy-addr/README.md +0 -139
- package/app/node_modules/proxy-addr/index.js +0 -327
- package/app/node_modules/proxy-addr/package.json +0 -47
- package/app/node_modules/qs/.editorconfig +0 -46
- package/app/node_modules/qs/.github/FUNDING.yml +0 -12
- package/app/node_modules/qs/.github/SECURITY.md +0 -11
- package/app/node_modules/qs/.github/THREAT_MODEL.md +0 -78
- package/app/node_modules/qs/.nycrc +0 -13
- package/app/node_modules/qs/CHANGELOG.md +0 -833
- package/app/node_modules/qs/LICENSE.md +0 -29
- package/app/node_modules/qs/README.md +0 -758
- package/app/node_modules/qs/dist/qs.js +0 -141
- package/app/node_modules/qs/eslint.config.mjs +0 -57
- package/app/node_modules/qs/lib/formats.js +0 -23
- package/app/node_modules/qs/lib/index.js +0 -11
- package/app/node_modules/qs/lib/parse.js +0 -414
- package/app/node_modules/qs/lib/stringify.js +0 -363
- package/app/node_modules/qs/lib/utils.js +0 -381
- package/app/node_modules/qs/package.json +0 -95
- package/app/node_modules/qs/test/empty-keys-cases.js +0 -267
- package/app/node_modules/qs/test/parse.js +0 -1933
- package/app/node_modules/qs/test/stringify.js +0 -1448
- package/app/node_modules/qs/test/utils.js +0 -626
- package/app/node_modules/range-parser/HISTORY.md +0 -56
- package/app/node_modules/range-parser/LICENSE +0 -23
- package/app/node_modules/range-parser/README.md +0 -85
- package/app/node_modules/range-parser/index.js +0 -181
- package/app/node_modules/range-parser/package.json +0 -48
- package/app/node_modules/raw-body/LICENSE +0 -22
- package/app/node_modules/raw-body/README.md +0 -223
- package/app/node_modules/raw-body/index.d.ts +0 -85
- package/app/node_modules/raw-body/index.js +0 -336
- package/app/node_modules/raw-body/package.json +0 -46
- package/app/node_modules/require-from-string/index.js +0 -34
- package/app/node_modules/require-from-string/license +0 -21
- package/app/node_modules/require-from-string/package.json +0 -28
- package/app/node_modules/require-from-string/readme.md +0 -56
- package/app/node_modules/router/HISTORY.md +0 -228
- package/app/node_modules/router/LICENSE +0 -23
- package/app/node_modules/router/README.md +0 -416
- package/app/node_modules/router/index.js +0 -748
- package/app/node_modules/router/lib/layer.js +0 -247
- package/app/node_modules/router/lib/route.js +0 -242
- package/app/node_modules/router/package.json +0 -44
- package/app/node_modules/safer-buffer/LICENSE +0 -21
- package/app/node_modules/safer-buffer/Porting-Buffer.md +0 -268
- package/app/node_modules/safer-buffer/Readme.md +0 -156
- package/app/node_modules/safer-buffer/dangerous.js +0 -58
- package/app/node_modules/safer-buffer/package.json +0 -34
- package/app/node_modules/safer-buffer/safer.js +0 -77
- package/app/node_modules/safer-buffer/tests.js +0 -406
- package/app/node_modules/send/LICENSE +0 -23
- package/app/node_modules/send/README.md +0 -317
- package/app/node_modules/send/index.js +0 -997
- package/app/node_modules/send/package.json +0 -63
- package/app/node_modules/serve-static/LICENSE +0 -25
- package/app/node_modules/serve-static/README.md +0 -253
- package/app/node_modules/serve-static/index.js +0 -208
- package/app/node_modules/serve-static/package.json +0 -44
- package/app/node_modules/setprototypeof/LICENSE +0 -13
- package/app/node_modules/setprototypeof/README.md +0 -31
- package/app/node_modules/setprototypeof/index.d.ts +0 -2
- package/app/node_modules/setprototypeof/index.js +0 -17
- package/app/node_modules/setprototypeof/package.json +0 -38
- package/app/node_modules/setprototypeof/test/index.js +0 -24
- package/app/node_modules/shebang-command/index.js +0 -19
- package/app/node_modules/shebang-command/license +0 -9
- package/app/node_modules/shebang-command/package.json +0 -34
- package/app/node_modules/shebang-command/readme.md +0 -34
- package/app/node_modules/shebang-regex/index.d.ts +0 -22
- package/app/node_modules/shebang-regex/index.js +0 -2
- package/app/node_modules/shebang-regex/license +0 -9
- package/app/node_modules/shebang-regex/package.json +0 -35
- package/app/node_modules/shebang-regex/readme.md +0 -33
- package/app/node_modules/side-channel/.editorconfig +0 -9
- package/app/node_modules/side-channel/.eslintrc +0 -12
- package/app/node_modules/side-channel/.github/FUNDING.yml +0 -12
- package/app/node_modules/side-channel/.nycrc +0 -13
- package/app/node_modules/side-channel/CHANGELOG.md +0 -120
- package/app/node_modules/side-channel/LICENSE +0 -21
- package/app/node_modules/side-channel/README.md +0 -61
- package/app/node_modules/side-channel/index.d.ts +0 -14
- package/app/node_modules/side-channel/index.js +0 -46
- package/app/node_modules/side-channel/package.json +0 -85
- package/app/node_modules/side-channel/test/index.js +0 -120
- package/app/node_modules/side-channel/tsconfig.json +0 -9
- package/app/node_modules/side-channel-list/.editorconfig +0 -9
- package/app/node_modules/side-channel-list/.eslintrc +0 -11
- package/app/node_modules/side-channel-list/.github/FUNDING.yml +0 -12
- package/app/node_modules/side-channel-list/.nycrc +0 -13
- package/app/node_modules/side-channel-list/CHANGELOG.md +0 -36
- package/app/node_modules/side-channel-list/LICENSE +0 -21
- package/app/node_modules/side-channel-list/README.md +0 -62
- package/app/node_modules/side-channel-list/index.d.ts +0 -13
- package/app/node_modules/side-channel-list/index.js +0 -111
- package/app/node_modules/side-channel-list/list.d.ts +0 -14
- package/app/node_modules/side-channel-list/package.json +0 -77
- package/app/node_modules/side-channel-list/test/index.js +0 -154
- package/app/node_modules/side-channel-list/tsconfig.json +0 -9
- package/app/node_modules/side-channel-map/.editorconfig +0 -9
- package/app/node_modules/side-channel-map/.eslintrc +0 -11
- package/app/node_modules/side-channel-map/.github/FUNDING.yml +0 -12
- package/app/node_modules/side-channel-map/.nycrc +0 -13
- package/app/node_modules/side-channel-map/CHANGELOG.md +0 -22
- package/app/node_modules/side-channel-map/LICENSE +0 -21
- package/app/node_modules/side-channel-map/README.md +0 -62
- package/app/node_modules/side-channel-map/index.d.ts +0 -15
- package/app/node_modules/side-channel-map/index.js +0 -68
- package/app/node_modules/side-channel-map/package.json +0 -80
- package/app/node_modules/side-channel-map/test/index.js +0 -114
- package/app/node_modules/side-channel-map/tsconfig.json +0 -9
- package/app/node_modules/side-channel-weakmap/.editorconfig +0 -9
- package/app/node_modules/side-channel-weakmap/.eslintrc +0 -12
- package/app/node_modules/side-channel-weakmap/.github/FUNDING.yml +0 -12
- package/app/node_modules/side-channel-weakmap/.nycrc +0 -13
- package/app/node_modules/side-channel-weakmap/CHANGELOG.md +0 -28
- package/app/node_modules/side-channel-weakmap/LICENSE +0 -21
- package/app/node_modules/side-channel-weakmap/README.md +0 -62
- package/app/node_modules/side-channel-weakmap/index.d.ts +0 -15
- package/app/node_modules/side-channel-weakmap/index.js +0 -84
- package/app/node_modules/side-channel-weakmap/package.json +0 -87
- package/app/node_modules/side-channel-weakmap/test/index.js +0 -114
- package/app/node_modules/side-channel-weakmap/tsconfig.json +0 -9
- package/app/node_modules/statuses/HISTORY.md +0 -87
- package/app/node_modules/statuses/LICENSE +0 -23
- package/app/node_modules/statuses/README.md +0 -139
- package/app/node_modules/statuses/codes.json +0 -65
- package/app/node_modules/statuses/index.js +0 -146
- package/app/node_modules/statuses/package.json +0 -49
- package/app/node_modules/toidentifier/HISTORY.md +0 -9
- package/app/node_modules/toidentifier/LICENSE +0 -21
- package/app/node_modules/toidentifier/README.md +0 -61
- package/app/node_modules/toidentifier/index.js +0 -32
- package/app/node_modules/toidentifier/package.json +0 -38
- package/app/node_modules/type-is/HISTORY.md +0 -292
- package/app/node_modules/type-is/LICENSE +0 -23
- package/app/node_modules/type-is/README.md +0 -198
- package/app/node_modules/type-is/index.js +0 -240
- package/app/node_modules/type-is/package.json +0 -51
- package/app/node_modules/unpipe/HISTORY.md +0 -4
- package/app/node_modules/unpipe/LICENSE +0 -22
- package/app/node_modules/unpipe/README.md +0 -43
- package/app/node_modules/unpipe/index.js +0 -69
- package/app/node_modules/unpipe/package.json +0 -27
- package/app/node_modules/vary/HISTORY.md +0 -39
- package/app/node_modules/vary/LICENSE +0 -22
- package/app/node_modules/vary/README.md +0 -101
- package/app/node_modules/vary/index.js +0 -149
- package/app/node_modules/vary/package.json +0 -43
- package/app/node_modules/which/CHANGELOG.md +0 -166
- package/app/node_modules/which/LICENSE +0 -15
- package/app/node_modules/which/README.md +0 -54
- package/app/node_modules/which/bin/node-which +0 -52
- package/app/node_modules/which/package.json +0 -43
- package/app/node_modules/which/which.js +0 -125
- package/app/node_modules/wrappy/LICENSE +0 -15
- package/app/node_modules/wrappy/README.md +0 -36
- package/app/node_modules/wrappy/package.json +0 -29
- package/app/node_modules/wrappy/wrappy.js +0 -33
- package/app/node_modules/zod-to-json-schema/.github/CR_logotype-full-color.png +0 -0
- package/app/node_modules/zod-to-json-schema/.github/FUNDING.yml +0 -1
- package/app/node_modules/zod-to-json-schema/.prettierrc.json +0 -1
- package/app/node_modules/zod-to-json-schema/LICENSE +0 -15
- package/app/node_modules/zod-to-json-schema/README.md +0 -390
- package/app/node_modules/zod-to-json-schema/changelog.md +0 -83
- package/app/node_modules/zod-to-json-schema/contributing.md +0 -9
- package/app/node_modules/zod-to-json-schema/createIndex.ts +0 -32
- package/app/node_modules/zod-to-json-schema/dist/cjs/Options.js +0 -51
- package/app/node_modules/zod-to-json-schema/dist/cjs/Refs.js +0 -26
- package/app/node_modules/zod-to-json-schema/dist/cjs/errorMessages.js +0 -19
- package/app/node_modules/zod-to-json-schema/dist/cjs/getRelativePath.js +0 -12
- package/app/node_modules/zod-to-json-schema/dist/cjs/index.js +0 -56
- package/app/node_modules/zod-to-json-schema/dist/cjs/package.json +0 -1
- package/app/node_modules/zod-to-json-schema/dist/cjs/parseDef.js +0 -66
- package/app/node_modules/zod-to-json-schema/dist/cjs/parseTypes.js +0 -2
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/any.js +0 -21
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/array.js +0 -30
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/bigint.js +0 -53
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/boolean.js +0 -9
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/branded.js +0 -8
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/catch.js +0 -8
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/date.js +0 -50
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/default.js +0 -11
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/effects.js +0 -11
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/enum.js +0 -10
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/intersection.js +0 -56
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/literal.js +0 -25
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/map.js +0 -30
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/nativeEnum.js +0 -20
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/never.js +0 -15
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/null.js +0 -14
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/nullable.js +0 -37
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/number.js +0 -56
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/object.js +0 -76
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/optional.js +0 -25
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/pipeline.js +0 -24
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/promise.js +0 -8
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/readonly.js +0 -8
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/record.js +0 -65
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/set.js +0 -24
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/string.js +0 -356
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/tuple.js +0 -36
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/undefined.js +0 -10
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/union.js +0 -84
- package/app/node_modules/zod-to-json-schema/dist/cjs/parsers/unknown.js +0 -8
- package/app/node_modules/zod-to-json-schema/dist/cjs/selectParser.js +0 -109
- package/app/node_modules/zod-to-json-schema/dist/cjs/zodToJsonSchema.js +0 -90
- package/app/node_modules/zod-to-json-schema/dist/esm/Options.js +0 -46
- package/app/node_modules/zod-to-json-schema/dist/esm/Refs.js +0 -22
- package/app/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +0 -14
- package/app/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js +0 -8
- package/app/node_modules/zod-to-json-schema/dist/esm/index.js +0 -40
- package/app/node_modules/zod-to-json-schema/dist/esm/package.json +0 -1
- package/app/node_modules/zod-to-json-schema/dist/esm/parseDef.js +0 -62
- package/app/node_modules/zod-to-json-schema/dist/esm/parseTypes.js +0 -1
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +0 -17
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +0 -26
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +0 -49
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +0 -5
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +0 -4
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +0 -4
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +0 -46
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +0 -7
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +0 -7
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +0 -6
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +0 -52
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +0 -21
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +0 -26
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +0 -16
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +0 -11
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +0 -10
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +0 -33
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +0 -52
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +0 -72
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +0 -21
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +0 -20
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +0 -4
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +0 -4
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +0 -61
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +0 -20
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +0 -352
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +0 -32
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +0 -6
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +0 -80
- package/app/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +0 -4
- package/app/node_modules/zod-to-json-schema/dist/esm/selectParser.js +0 -105
- package/app/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +0 -87
- package/app/node_modules/zod-to-json-schema/dist/types/Options.d.ts +0 -37
- package/app/node_modules/zod-to-json-schema/dist/types/Refs.d.ts +0 -17
- package/app/node_modules/zod-to-json-schema/dist/types/errorMessages.d.ts +0 -15
- package/app/node_modules/zod-to-json-schema/dist/types/getRelativePath.d.ts +0 -1
- package/app/node_modules/zod-to-json-schema/dist/types/index.d.ts +0 -40
- package/app/node_modules/zod-to-json-schema/dist/types/parseDef.d.ts +0 -4
- package/app/node_modules/zod-to-json-schema/dist/types/parseTypes.d.ts +0 -34
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/any.d.ts +0 -5
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/array.d.ts +0 -12
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/bigint.d.ts +0 -14
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/boolean.d.ts +0 -4
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/branded.d.ts +0 -3
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/catch.d.ts +0 -3
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/date.d.ts +0 -15
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/default.d.ts +0 -6
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/effects.d.ts +0 -4
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/enum.d.ts +0 -6
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/intersection.d.ts +0 -8
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/literal.d.ts +0 -9
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/map.d.ts +0 -15
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/nativeEnum.d.ts +0 -6
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/never.d.ts +0 -6
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/null.d.ts +0 -5
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/nullable.d.ts +0 -10
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/number.d.ts +0 -13
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/object.d.ts +0 -10
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/optional.d.ts +0 -4
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/pipeline.d.ts +0 -5
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/promise.d.ts +0 -4
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/readonly.d.ts +0 -3
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/record.d.ts +0 -13
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/set.d.ts +0 -13
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/string.d.ts +0 -73
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/tuple.d.ts +0 -13
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/undefined.d.ts +0 -6
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/union.d.ts +0 -23
- package/app/node_modules/zod-to-json-schema/dist/types/parsers/unknown.d.ts +0 -4
- package/app/node_modules/zod-to-json-schema/dist/types/selectParser.d.ts +0 -5
- package/app/node_modules/zod-to-json-schema/dist/types/zodToJsonSchema.d.ts +0 -10
- package/app/node_modules/zod-to-json-schema/package.json +0 -85
- package/app/node_modules/zod-to-json-schema/postcjs.ts +0 -3
- package/app/node_modules/zod-to-json-schema/postesm.ts +0 -3
- package/app/package.json +0 -43
- package/dist/ai-command-W6FV3QW5.js +0 -218
- package/dist/check-command-W52TXOPN.js +0 -101
- package/dist/chunk-FN63LYZH.js +0 -825
- package/dist/chunk-HFFASR7D.js +0 -789
- package/dist/chunk-K27F6QDR.js +0 -8050
- package/dist/chunk-MU4KCYKO.js +0 -107
- package/dist/chunk-ROPR3LUO.js +0 -1350
- package/dist/chunk-RX4GQLU2.js +0 -365
- package/dist/dist-7ZFLUTJ3.js +0 -292
- package/dist/dist-XTIHMRQM.js +0 -77
- package/dist/md-command-PBOLZO5S.js +0 -278
- package/dist/next-command-3J7F27RT.js +0 -243
- package/dist/north-command-VZKU3BBM.js +0 -279
- package/dist/review-command-PWW276HI.js +0 -92
- package/dist/twin-command-OA2R6OUW.js +0 -1315
- /package/app/apps/web/.next-bundle/static/{GWFC4d9IgsD38wa3aUlsQ → mhsTm5XiqL98MCgDVB08u}/_ssgManifest.js +0 -0
|
@@ -3,8 +3,12 @@ import {
|
|
|
3
3
|
agentActivities,
|
|
4
4
|
agentSessions,
|
|
5
5
|
agents,
|
|
6
|
+
appJobs,
|
|
7
|
+
appWorkspaces,
|
|
8
|
+
apps,
|
|
6
9
|
beliefs,
|
|
7
10
|
consultations,
|
|
11
|
+
decisionEpisodes,
|
|
8
12
|
decisions,
|
|
9
13
|
designFingerprints,
|
|
10
14
|
distributions,
|
|
@@ -13,7 +17,9 @@ import {
|
|
|
13
17
|
familyMembers,
|
|
14
18
|
launches,
|
|
15
19
|
looks,
|
|
20
|
+
memoryJobs,
|
|
16
21
|
modelCalls,
|
|
22
|
+
narratives,
|
|
17
23
|
notes,
|
|
18
24
|
observations,
|
|
19
25
|
packages,
|
|
@@ -32,13 +38,187 @@ import {
|
|
|
32
38
|
technologies,
|
|
33
39
|
verdicts,
|
|
34
40
|
vulnerabilities
|
|
35
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-V6TJYC6N.js";
|
|
42
|
+
|
|
43
|
+
// src/apps.ts
|
|
44
|
+
import { createHash, randomUUID } from "crypto";
|
|
45
|
+
import { and, asc, desc, eq, gte, inArray, ne, sql } from "drizzle-orm";
|
|
46
|
+
var LIVE_APP_JOBS = ["pending", "running", "cancelling"];
|
|
47
|
+
var MAX_APP_SPEND_CALLS = 1e3;
|
|
48
|
+
var TRANSITIONS = {
|
|
49
|
+
pending: ["running", "cancelled"],
|
|
50
|
+
running: ["done", "failed", "cancelling"],
|
|
51
|
+
cancelling: ["cancelled", "failed"],
|
|
52
|
+
cancelled: [],
|
|
53
|
+
failed: [],
|
|
54
|
+
done: []
|
|
55
|
+
};
|
|
56
|
+
function appJobTransition(from, to) {
|
|
57
|
+
return TRANSITIONS[from].includes(to);
|
|
58
|
+
}
|
|
59
|
+
function canonicalAppInput(value) {
|
|
60
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
61
|
+
if (Array.isArray(value)) return "[" + value.map(canonicalAppInput).join(",") + "]";
|
|
62
|
+
const row = value;
|
|
63
|
+
return "{" + Object.keys(row).sort().map((key) => JSON.stringify(key) + ":" + canonicalAppInput(row[key])).join(",") + "}";
|
|
64
|
+
}
|
|
65
|
+
function appDedupeKey(appId, identity, tool, input) {
|
|
66
|
+
return createHash("sha256").update(canonicalAppInput([appId, identity, tool, input])).digest("hex");
|
|
67
|
+
}
|
|
68
|
+
async function ensureApp(db, id, pkg) {
|
|
69
|
+
await db.insert(apps).values({ id, pkg }).onConflictDoNothing();
|
|
70
|
+
}
|
|
71
|
+
async function listApps(db) {
|
|
72
|
+
return db.select().from(apps).orderBy(asc(apps.id));
|
|
73
|
+
}
|
|
74
|
+
async function getApp(db, id) {
|
|
75
|
+
return (await db.select().from(apps).where(eq(apps.id, id)).limit(1))[0];
|
|
76
|
+
}
|
|
77
|
+
async function updateApp(db, id, patch) {
|
|
78
|
+
await db.update(apps).set({ ...patch, updatedAt: /* @__PURE__ */ new Date() }).where(eq(apps.id, id));
|
|
79
|
+
}
|
|
80
|
+
async function getAppJob(db, id) {
|
|
81
|
+
return (await db.select().from(appJobs).where(eq(appJobs.id, id)).limit(1))[0];
|
|
82
|
+
}
|
|
83
|
+
async function listAppJobs(db, options = {}) {
|
|
84
|
+
return db.select().from(appJobs).where(and(
|
|
85
|
+
options.appId === void 0 ? void 0 : eq(appJobs.appId, options.appId),
|
|
86
|
+
options.identity === void 0 ? void 0 : eq(appJobs.identity, options.identity),
|
|
87
|
+
options.statuses === void 0 ? void 0 : inArray(appJobs.status, options.statuses)
|
|
88
|
+
)).orderBy(desc(appJobs.requestedAt), desc(appJobs.id)).limit(options.limit ?? 50);
|
|
89
|
+
}
|
|
90
|
+
async function enqueueAppJobRow(db, input) {
|
|
91
|
+
const dedupeKey = appDedupeKey(input.appId, input.identity, input.tool, input.input);
|
|
92
|
+
return db.transaction(async (tx) => {
|
|
93
|
+
await tx.execute(sql`lock table ${appJobs} in share row exclusive mode`);
|
|
94
|
+
const [existing] = await tx.select().from(appJobs).where(and(
|
|
95
|
+
eq(appJobs.dedupeKey, dedupeKey),
|
|
96
|
+
inArray(appJobs.status, LIVE_APP_JOBS)
|
|
97
|
+
)).limit(1);
|
|
98
|
+
if (existing) return { job: existing, duplicate: true };
|
|
99
|
+
let reservedCalls = 0;
|
|
100
|
+
if (input.paid) {
|
|
101
|
+
const since = /* @__PURE__ */ new Date();
|
|
102
|
+
since.setHours(0, 0, 0, 0);
|
|
103
|
+
const [spent] = await tx.select({ n: sql`count(*)::int` }).from(modelCalls).where(and(eq(modelCalls.kind, "app"), gte(modelCalls.createdAt, since)));
|
|
104
|
+
const [held] = await tx.select({ n: sql`coalesce(sum(${appJobs.reservedCalls}), 0)::int` }).from(appJobs).where(sql`(${appJobs.status} in ('pending','running','cancelling')
|
|
105
|
+
or ${appJobs.finishedAt} >= ${since})`);
|
|
106
|
+
reservedCalls = Math.max(0, Math.floor(input.cap ?? 0) - (spent?.n ?? 0) - (held?.n ?? 0));
|
|
107
|
+
if (!reservedCalls) throw new Error("app-budget-exhausted");
|
|
108
|
+
}
|
|
109
|
+
const [job] = await tx.insert(appJobs).values({
|
|
110
|
+
id: randomUUID(),
|
|
111
|
+
appId: input.appId,
|
|
112
|
+
identity: input.identity,
|
|
113
|
+
workspaceId: input.workspaceId,
|
|
114
|
+
tool: input.tool,
|
|
115
|
+
input: input.input,
|
|
116
|
+
appVersion: input.appVersion,
|
|
117
|
+
dedupeKey,
|
|
118
|
+
reservedCalls
|
|
119
|
+
}).returning();
|
|
120
|
+
return { job, duplicate: false };
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
async function hasPendingAppJob(db) {
|
|
124
|
+
return (await db.select({ id: appJobs.id }).from(appJobs).where(eq(appJobs.status, "pending")).limit(1)).length > 0;
|
|
125
|
+
}
|
|
126
|
+
async function claimAppJob(db) {
|
|
127
|
+
return db.transaction(async (tx) => {
|
|
128
|
+
await tx.execute(sql`lock table ${appJobs} in share row exclusive mode`);
|
|
129
|
+
const running = await tx.select({ id: appJobs.id }).from(appJobs).where(inArray(appJobs.status, ["running", "cancelling"])).limit(1);
|
|
130
|
+
if (running.length) return void 0;
|
|
131
|
+
const [next] = await tx.select().from(appJobs).where(eq(appJobs.status, "pending")).orderBy(asc(appJobs.requestedAt), asc(appJobs.id)).limit(1);
|
|
132
|
+
if (!next) return void 0;
|
|
133
|
+
return (await tx.update(appJobs).set({ status: "running", startedAt: /* @__PURE__ */ new Date() }).where(eq(appJobs.id, next.id)).returning())[0];
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
async function transitionAppJob(db, id, from, to, patch = {}) {
|
|
137
|
+
if (!appJobTransition(from, to)) throw new Error("invalid-app-job-transition");
|
|
138
|
+
const terminal = !LIVE_APP_JOBS.includes(to);
|
|
139
|
+
const rows = await db.update(appJobs).set({
|
|
140
|
+
...patch,
|
|
141
|
+
status: to,
|
|
142
|
+
...terminal ? { pid: null, finishedAt: /* @__PURE__ */ new Date() } : {}
|
|
143
|
+
}).where(and(eq(appJobs.id, id), eq(appJobs.status, from))).returning({ id: appJobs.id });
|
|
144
|
+
return rows.length > 0;
|
|
145
|
+
}
|
|
146
|
+
async function updateAppJobProgress(db, id, progress, pid) {
|
|
147
|
+
await db.update(appJobs).set({ progress, ...pid ? { pid } : {} }).where(and(eq(appJobs.id, id), inArray(appJobs.status, ["running", "cancelling"])));
|
|
148
|
+
}
|
|
149
|
+
async function getAppWorkspace(db, appId, identity) {
|
|
150
|
+
return (await db.select().from(appWorkspaces).where(and(
|
|
151
|
+
eq(appWorkspaces.appId, appId),
|
|
152
|
+
eq(appWorkspaces.identity, identity)
|
|
153
|
+
)).limit(1))[0];
|
|
154
|
+
}
|
|
155
|
+
async function saveAppWorkspace(db, row) {
|
|
156
|
+
await db.insert(appWorkspaces).values(row).onConflictDoNothing();
|
|
157
|
+
}
|
|
158
|
+
async function forgetAppWorkspaces(db, appId) {
|
|
159
|
+
await db.delete(appWorkspaces).where(eq(appWorkspaces.appId, appId));
|
|
160
|
+
}
|
|
161
|
+
async function appProject(db, identity, projectId) {
|
|
162
|
+
const rows = await db.select({
|
|
163
|
+
id: projects.id,
|
|
164
|
+
identity: projects.identity,
|
|
165
|
+
root: projects.root,
|
|
166
|
+
slug: projects.slug,
|
|
167
|
+
name: projects.name
|
|
168
|
+
}).from(projects).where(and(
|
|
169
|
+
eq(projects.identity, identity),
|
|
170
|
+
projectId ? eq(projects.id, projectId) : void 0
|
|
171
|
+
)).limit(2);
|
|
172
|
+
if (rows.length !== 1) throw new Error(rows.length ? "ambiguous-project" : "project-not-found");
|
|
173
|
+
return rows[0];
|
|
174
|
+
}
|
|
175
|
+
async function revalidateAppBudget(db, job, cap) {
|
|
176
|
+
return db.transaction(async (tx) => {
|
|
177
|
+
await tx.execute(sql`lock table ${appJobs} in share row exclusive mode`);
|
|
178
|
+
const current = await getAppJob(tx, job.id);
|
|
179
|
+
if (!current) throw new Error("app-job-not-found");
|
|
180
|
+
const since = /* @__PURE__ */ new Date();
|
|
181
|
+
since.setHours(0, 0, 0, 0);
|
|
182
|
+
const [spent] = await tx.select({ n: sql`count(*)::int` }).from(modelCalls).where(and(eq(modelCalls.kind, "app"), gte(modelCalls.createdAt, since)));
|
|
183
|
+
const [held] = await tx.select({ n: sql`coalesce(sum(${appJobs.reservedCalls}), 0)::int` }).from(appJobs).where(and(
|
|
184
|
+
ne(appJobs.id, job.id),
|
|
185
|
+
sql`(${appJobs.status} in ('pending','running','cancelling') or ${appJobs.finishedAt} >= ${since})`
|
|
186
|
+
));
|
|
187
|
+
const allowed = Number.isFinite(cap) ? Math.max(0, Math.floor(cap) - (spent?.n ?? 0) - (held?.n ?? 0)) : 0;
|
|
188
|
+
const reservedCalls = Math.min(current.reservedCalls, job.reservedCalls, allowed);
|
|
189
|
+
const [updated] = await tx.update(appJobs).set({ reservedCalls }).where(eq(appJobs.id, job.id)).returning();
|
|
190
|
+
return updated;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
async function recordAppSpend(db, job, receipt) {
|
|
194
|
+
if (!receipt) return;
|
|
195
|
+
const sane = Number.isSafeInteger(receipt.calls) && receipt.calls >= 0 && receipt.calls <= MAX_APP_SPEND_CALLS;
|
|
196
|
+
if (!sane) throw new Error("invalid-app-spend-receipt");
|
|
197
|
+
await db.transaction(async (tx) => {
|
|
198
|
+
await tx.execute(sql`lock table ${appJobs} in share row exclusive mode`);
|
|
199
|
+
const current = await getAppJob(tx, job.id);
|
|
200
|
+
if (!current || current.reservedCalls === 0) return;
|
|
201
|
+
const count = Math.min(current.reservedCalls, receipt.calls);
|
|
202
|
+
for (let index = 0; index < count; index++) {
|
|
203
|
+
await tx.insert(modelCalls).values({
|
|
204
|
+
id: "app:" + job.id + ":" + index,
|
|
205
|
+
kind: "app",
|
|
206
|
+
appId: job.appId,
|
|
207
|
+
appJobId: job.id,
|
|
208
|
+
provider: receipt.provider ?? "unknown",
|
|
209
|
+
model: receipt.model ?? "unmetered",
|
|
210
|
+
identity: job.identity || null
|
|
211
|
+
}).onConflictDoNothing();
|
|
212
|
+
}
|
|
213
|
+
await tx.update(appJobs).set({ reservedCalls: 0 }).where(eq(appJobs.id, job.id));
|
|
214
|
+
});
|
|
215
|
+
}
|
|
36
216
|
|
|
37
217
|
// src/ingest.ts
|
|
38
|
-
import { createHash } from "crypto";
|
|
218
|
+
import { createHash as createHash2 } from "crypto";
|
|
39
219
|
import { readFile } from "fs/promises";
|
|
40
220
|
import { basename, dirname, extname, join } from "path";
|
|
41
|
-
import { and, eq, inArray, notInArray, or, sql } from "drizzle-orm";
|
|
221
|
+
import { and as and2, eq as eq2, inArray as inArray2, notInArray, or, sql as sql2 } from "drizzle-orm";
|
|
42
222
|
import {
|
|
43
223
|
identityCandidate,
|
|
44
224
|
slugify
|
|
@@ -53,7 +233,7 @@ var MIME_BY_EXTENSION = {
|
|
|
53
233
|
".ico": "image/x-icon"
|
|
54
234
|
};
|
|
55
235
|
function idFor(value) {
|
|
56
|
-
return
|
|
236
|
+
return createHash2("sha1").update(value).digest("hex").slice(0, 24);
|
|
57
237
|
}
|
|
58
238
|
var SNAPSHOTS_PER_PROJECT = 30;
|
|
59
239
|
async function ingestPortfolio(db, analyses, families2 = [], scope, origins = []) {
|
|
@@ -137,44 +317,44 @@ async function writeCatalog(tx, { analyses, families: families2, scope, originBy
|
|
|
137
317
|
}).onConflictDoUpdate({
|
|
138
318
|
target: projects.id,
|
|
139
319
|
set: {
|
|
140
|
-
name:
|
|
320
|
+
name: sql2`excluded.name`,
|
|
141
321
|
// `slug` is not to be touched here: its owner is `assignSlugs`.
|
|
142
|
-
description:
|
|
143
|
-
version:
|
|
144
|
-
iconDataUri:
|
|
145
|
-
iconHash:
|
|
146
|
-
primaryLanguage:
|
|
147
|
-
healthScore:
|
|
148
|
-
healthGrade:
|
|
149
|
-
sourceBytes:
|
|
150
|
-
fileCount:
|
|
151
|
-
gitBranch:
|
|
152
|
-
gitRemoteUrl:
|
|
153
|
-
gitCommitCount:
|
|
154
|
-
lastCommitAt:
|
|
155
|
-
summary:
|
|
156
|
-
summarySource:
|
|
157
|
-
summaryReadme:
|
|
158
|
-
summaryComposed:
|
|
159
|
-
summaryComposition:
|
|
160
|
-
originKind:
|
|
161
|
-
originStartedBy:
|
|
162
|
-
originShare:
|
|
163
|
-
originEvidence:
|
|
322
|
+
description: sql2`excluded.description`,
|
|
323
|
+
version: sql2`excluded.version`,
|
|
324
|
+
iconDataUri: sql2`excluded.icon_data_uri`,
|
|
325
|
+
iconHash: sql2`excluded.icon_hash`,
|
|
326
|
+
primaryLanguage: sql2`excluded.primary_language`,
|
|
327
|
+
healthScore: sql2`excluded.health_score`,
|
|
328
|
+
healthGrade: sql2`excluded.health_grade`,
|
|
329
|
+
sourceBytes: sql2`excluded.source_bytes`,
|
|
330
|
+
fileCount: sql2`excluded.file_count`,
|
|
331
|
+
gitBranch: sql2`excluded.git_branch`,
|
|
332
|
+
gitRemoteUrl: sql2`excluded.git_remote_url`,
|
|
333
|
+
gitCommitCount: sql2`excluded.git_commit_count`,
|
|
334
|
+
lastCommitAt: sql2`excluded.last_commit_at`,
|
|
335
|
+
summary: sql2`excluded.summary`,
|
|
336
|
+
summarySource: sql2`excluded.summary_source`,
|
|
337
|
+
summaryReadme: sql2`excluded.summary_readme`,
|
|
338
|
+
summaryComposed: sql2`excluded.summary_composed`,
|
|
339
|
+
summaryComposition: sql2`excluded.summary_composition`,
|
|
340
|
+
originKind: sql2`excluded.origin_kind`,
|
|
341
|
+
originStartedBy: sql2`excluded.origin_started_by`,
|
|
342
|
+
originShare: sql2`excluded.origin_share`,
|
|
343
|
+
originEvidence: sql2`excluded.origin_evidence`,
|
|
164
344
|
// `ai_summary` **is not** to be touched: `panoma describe` writes it, it costs one call
|
|
165
345
|
// to the model and a scan does not have to erase it.
|
|
166
|
-
runbook:
|
|
167
|
-
recentCommits:
|
|
168
|
-
agentsMd:
|
|
169
|
-
gitVersioned:
|
|
170
|
-
gitModified:
|
|
171
|
-
gitUntracked:
|
|
172
|
-
gitAhead:
|
|
173
|
-
gitBehind:
|
|
174
|
-
gitStashes:
|
|
175
|
-
gitOwnRepo:
|
|
176
|
-
depsUnresolved:
|
|
177
|
-
lastScannedAt:
|
|
346
|
+
runbook: sql2`excluded.runbook`,
|
|
347
|
+
recentCommits: sql2`excluded.recent_commits`,
|
|
348
|
+
agentsMd: sql2`excluded.agents_md`,
|
|
349
|
+
gitVersioned: sql2`excluded.git_versioned`,
|
|
350
|
+
gitModified: sql2`excluded.git_modified`,
|
|
351
|
+
gitUntracked: sql2`excluded.git_untracked`,
|
|
352
|
+
gitAhead: sql2`excluded.git_ahead`,
|
|
353
|
+
gitBehind: sql2`excluded.git_behind`,
|
|
354
|
+
gitStashes: sql2`excluded.git_stashes`,
|
|
355
|
+
gitOwnRepo: sql2`excluded.git_own_repo`,
|
|
356
|
+
depsUnresolved: sql2`excluded.deps_unresolved`,
|
|
357
|
+
lastScannedAt: sql2`excluded.last_scanned_at`
|
|
178
358
|
// `first_seen_at` stays as it was on purpose: it is the date when the project entered the
|
|
179
359
|
// catalog, not the date of the last scan.
|
|
180
360
|
}
|
|
@@ -194,7 +374,7 @@ async function writeCatalog(tx, { analyses, families: families2, scope, originBy
|
|
|
194
374
|
await tx.insert(technologies).values({ id: tech.id, name: tech.name, kind: tech.kind, iconSlug: tech.iconSlug }).onConflictDoNothing();
|
|
195
375
|
}
|
|
196
376
|
}
|
|
197
|
-
await tx.delete(projectTechnologies).where(
|
|
377
|
+
await tx.delete(projectTechnologies).where(eq2(projectTechnologies.projectId, projectId));
|
|
198
378
|
if (analysis.technologies.length > 0) {
|
|
199
379
|
await tx.insert(projectTechnologies).values(
|
|
200
380
|
analysis.technologies.map((tech) => ({
|
|
@@ -223,7 +403,7 @@ async function writeCatalog(tx, { analyses, families: families2, scope, originBy
|
|
|
223
403
|
}))
|
|
224
404
|
).onConflictDoNothing();
|
|
225
405
|
}
|
|
226
|
-
await tx.delete(projectDependencies).where(
|
|
406
|
+
await tx.delete(projectDependencies).where(eq2(projectDependencies.projectId, projectId));
|
|
227
407
|
if (dependencies.length > 0) {
|
|
228
408
|
await tx.insert(projectDependencies).values(
|
|
229
409
|
dedupeBy(dependencies, (d) => d.packageId).map((d) => ({
|
|
@@ -237,7 +417,7 @@ async function writeCatalog(tx, { analyses, families: families2, scope, originBy
|
|
|
237
417
|
}))
|
|
238
418
|
);
|
|
239
419
|
}
|
|
240
|
-
await tx.delete(distributions).where(
|
|
420
|
+
await tx.delete(distributions).where(eq2(distributions.projectId, projectId));
|
|
241
421
|
if (analysis.distributions.length > 0) {
|
|
242
422
|
await tx.insert(distributions).values(
|
|
243
423
|
dedupeBy(analysis.distributions, (d) => `${d.kind}:${d.label}`).map((d) => ({
|
|
@@ -249,7 +429,7 @@ async function writeCatalog(tx, { analyses, families: families2, scope, originBy
|
|
|
249
429
|
}))
|
|
250
430
|
);
|
|
251
431
|
}
|
|
252
|
-
await tx.delete(projectLinks).where(
|
|
432
|
+
await tx.delete(projectLinks).where(eq2(projectLinks.projectId, projectId));
|
|
253
433
|
if (analysis.links.length > 0) {
|
|
254
434
|
await tx.insert(projectLinks).values(
|
|
255
435
|
analysis.links.map((link) => ({
|
|
@@ -264,7 +444,7 @@ async function writeCatalog(tx, { analyses, families: families2, scope, originBy
|
|
|
264
444
|
}))
|
|
265
445
|
);
|
|
266
446
|
}
|
|
267
|
-
await tx.delete(projectAgents).where(
|
|
447
|
+
await tx.delete(projectAgents).where(eq2(projectAgents.projectId, projectId));
|
|
268
448
|
const agents2 = analysis.git?.agentContributors ?? [];
|
|
269
449
|
if (agents2.length > 0) {
|
|
270
450
|
await tx.insert(projectAgents).values(
|
|
@@ -335,7 +515,7 @@ async function assignIdentities(tx, candidates) {
|
|
|
335
515
|
const unique = candidate.value && claims.get(candidate.value).length === 1;
|
|
336
516
|
const identity = unique ? candidate.value : `ruta:${idFor(root)}`;
|
|
337
517
|
if (unique) stable++;
|
|
338
|
-
await tx.update(projects).set({ identity }).where(
|
|
518
|
+
await tx.update(projects).set({ identity }).where(eq2(projects.root, root));
|
|
339
519
|
}
|
|
340
520
|
return stable;
|
|
341
521
|
}
|
|
@@ -346,7 +526,7 @@ async function assignSlugs(tx) {
|
|
|
346
526
|
root: projects.root,
|
|
347
527
|
slug: projects.slug,
|
|
348
528
|
lastCommitAt: projects.lastCommitAt,
|
|
349
|
-
isCopy:
|
|
529
|
+
isCopy: sql2`exists (
|
|
350
530
|
select 1 from family_members fm where fm.project_id = projects.id
|
|
351
531
|
)`
|
|
352
532
|
}).from(projects);
|
|
@@ -406,7 +586,7 @@ async function rename(tx, id, candidates) {
|
|
|
406
586
|
for (const [index, slug] of candidates.entries()) {
|
|
407
587
|
try {
|
|
408
588
|
await tx.transaction(async (inner) => {
|
|
409
|
-
await inner.update(projects).set({ slug }).where(
|
|
589
|
+
await inner.update(projects).set({ slug }).where(eq2(projects.id, id));
|
|
410
590
|
});
|
|
411
591
|
return { first: index === 0 };
|
|
412
592
|
} catch (error) {
|
|
@@ -442,7 +622,7 @@ async function readIcon(analysis) {
|
|
|
442
622
|
if (buffer.byteLength > MAX_ICON_BYTES) return null;
|
|
443
623
|
return {
|
|
444
624
|
dataUri: `data:${mime};base64,${buffer.toString("base64")}`,
|
|
445
|
-
hash:
|
|
625
|
+
hash: createHash2("sha1").update(buffer).digest("hex")
|
|
446
626
|
};
|
|
447
627
|
} catch {
|
|
448
628
|
return null;
|
|
@@ -456,39 +636,39 @@ async function deleteFamilies(tx, scope) {
|
|
|
456
636
|
}
|
|
457
637
|
const root = scope.replace(/\/+$/, "");
|
|
458
638
|
const inside = or(
|
|
459
|
-
|
|
460
|
-
|
|
639
|
+
eq2(projects.root, root),
|
|
640
|
+
sql2`left(${projects.root}, ${codePoints(root) + 1}) = ${`${root}/`}`
|
|
461
641
|
);
|
|
462
|
-
const outside = await tx.select({ id: projects.id }).from(projects).where(
|
|
642
|
+
const outside = await tx.select({ id: projects.id }).from(projects).where(sql2`not (${inside})`);
|
|
463
643
|
const outsideIds = outside.map((row) => row.id);
|
|
464
644
|
const untouchable = /* @__PURE__ */ new Set();
|
|
465
645
|
if (outsideIds.length > 0) {
|
|
466
|
-
for (const row of await tx.select({ id: families.id }).from(families).where(
|
|
646
|
+
for (const row of await tx.select({ id: families.id }).from(families).where(inArray2(families.canonicalProjectId, outsideIds))) {
|
|
467
647
|
untouchable.add(row.id);
|
|
468
648
|
}
|
|
469
|
-
for (const row of await tx.select({ familyId: familyMembers.familyId }).from(familyMembers).where(
|
|
649
|
+
for (const row of await tx.select({ familyId: familyMembers.familyId }).from(familyMembers).where(inArray2(familyMembers.projectId, outsideIds))) {
|
|
470
650
|
untouchable.add(row.familyId);
|
|
471
651
|
}
|
|
472
652
|
}
|
|
473
653
|
const allOf = await tx.select({ id: families.id }).from(families);
|
|
474
654
|
const toDelete = allOf.map((f) => f.id).filter((id) => !untouchable.has(id));
|
|
475
655
|
if (toDelete.length === 0) return;
|
|
476
|
-
await tx.delete(familyMembers).where(
|
|
477
|
-
await tx.delete(families).where(
|
|
656
|
+
await tx.delete(familyMembers).where(inArray2(familyMembers.familyId, toDelete));
|
|
657
|
+
await tx.delete(families).where(inArray2(families.id, toDelete));
|
|
478
658
|
}
|
|
479
659
|
async function pruneMissing(tx, scope, keep, candidates = /* @__PURE__ */ new Map()) {
|
|
480
660
|
if (keep.length === 0) return 0;
|
|
481
661
|
const root = scope.replace(/\/+$/, "");
|
|
482
662
|
const stale = await tx.select({ id: projects.id, identity: projects.identity }).from(projects).where(
|
|
483
|
-
|
|
663
|
+
and2(
|
|
484
664
|
or(
|
|
485
|
-
|
|
665
|
+
eq2(projects.root, root),
|
|
486
666
|
// `left(root, n) = prefijo` and not `like`, because `_` and `%` are LIKE wildcards and on
|
|
487
667
|
// this disk `~/Desktop/convertir_a_geojson` and `~/Desktop/convertir a geojson` coexist:
|
|
488
668
|
// scanning the first one would make the pattern `.../convertir_a_geojson/%` match the
|
|
489
669
|
// second, and the cleanup would take away projects that did exist. Fourteen folders on
|
|
490
670
|
// the Desktop have an underscore. A prefix comparison interprets nothing.
|
|
491
|
-
|
|
671
|
+
sql2`left(${projects.root}, ${codePoints(root) + 1}) = ${`${root}/`}`
|
|
492
672
|
),
|
|
493
673
|
notInArray(projects.id, keep)
|
|
494
674
|
)
|
|
@@ -501,7 +681,7 @@ async function pruneMissing(tx, scope, keep, candidates = /* @__PURE__ */ new Ma
|
|
|
501
681
|
}
|
|
502
682
|
await rehomeMemory(tx, stale, candidates);
|
|
503
683
|
await tx.delete(projects).where(
|
|
504
|
-
|
|
684
|
+
inArray2(
|
|
505
685
|
projects.id,
|
|
506
686
|
stale.map((row) => row.id)
|
|
507
687
|
)
|
|
@@ -517,8 +697,8 @@ async function rehomeMemory(tx, stale, candidates) {
|
|
|
517
697
|
claims.set(value, [...claims.get(value) ?? [], projectId]);
|
|
518
698
|
}
|
|
519
699
|
const elsewhere = await tx.select({ id: projects.id, identity: projects.identity }).from(projects).where(
|
|
520
|
-
|
|
521
|
-
|
|
700
|
+
and2(
|
|
701
|
+
inArray2(
|
|
522
702
|
projects.identity,
|
|
523
703
|
movable.map((row) => row.identity)
|
|
524
704
|
),
|
|
@@ -531,19 +711,19 @@ async function rehomeMemory(tx, stale, candidates) {
|
|
|
531
711
|
const heirs = [.../* @__PURE__ */ new Set([...scanned, ...stored])];
|
|
532
712
|
if (heirs.length !== 1) continue;
|
|
533
713
|
const heir = heirs[0];
|
|
534
|
-
await tx.update(notes).set({ projectId: heir }).where(
|
|
535
|
-
await tx.update(agentSessions).set({ projectId: heir }).where(
|
|
536
|
-
await tx.update(agentActivities).set({ projectId: heir }).where(
|
|
537
|
-
await tx.update(tasks).set({ projectId: heir }).where(
|
|
538
|
-
await tx.update(consultations).set({ projectId: heir }).where(
|
|
539
|
-
await tx.update(servings).set({ projectId: heir }).where(
|
|
540
|
-
await tx.update(launches).set({ projectId: heir }).where(
|
|
541
|
-
await tx.update(runs).set({ projectId: heir }).where(
|
|
714
|
+
await tx.update(notes).set({ projectId: heir }).where(eq2(notes.projectId, row.id));
|
|
715
|
+
await tx.update(agentSessions).set({ projectId: heir }).where(eq2(agentSessions.projectId, row.id));
|
|
716
|
+
await tx.update(agentActivities).set({ projectId: heir }).where(eq2(agentActivities.projectId, row.id));
|
|
717
|
+
await tx.update(tasks).set({ projectId: heir }).where(eq2(tasks.projectId, row.id));
|
|
718
|
+
await tx.update(consultations).set({ projectId: heir }).where(eq2(consultations.projectId, row.id));
|
|
719
|
+
await tx.update(servings).set({ projectId: heir }).where(eq2(servings.projectId, row.id));
|
|
720
|
+
await tx.update(launches).set({ projectId: heir }).where(eq2(launches.projectId, row.id));
|
|
721
|
+
await tx.update(runs).set({ projectId: heir }).where(eq2(runs.projectId, row.id));
|
|
542
722
|
}
|
|
543
723
|
}
|
|
544
724
|
async function pruneSnapshots(tx, keep = SNAPSHOTS_PER_PROJECT) {
|
|
545
725
|
const pruned = await tx.delete(snapshots).where(
|
|
546
|
-
|
|
726
|
+
sql2`${snapshots.id} in (
|
|
547
727
|
select id from (
|
|
548
728
|
select id,
|
|
549
729
|
row_number() over (
|
|
@@ -572,8 +752,8 @@ function queueWrite(work) {
|
|
|
572
752
|
}
|
|
573
753
|
|
|
574
754
|
// src/queries.ts
|
|
575
|
-
import { randomUUID } from "crypto";
|
|
576
|
-
import { and as
|
|
755
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
756
|
+
import { and as and3, asc as asc2, desc as desc2, eq as eq3, gte as gte2, inArray as inArray3, isNotNull, isNull, lt, or as or2, sql as sql3 } from "drizzle-orm";
|
|
577
757
|
import { alias } from "drizzle-orm/pg-core";
|
|
578
758
|
var DORMANT_DAYS = 365;
|
|
579
759
|
var IDLE_DAYS = 60;
|
|
@@ -587,6 +767,7 @@ function stateOf(lastCommitAt) {
|
|
|
587
767
|
async function listProjects(db) {
|
|
588
768
|
const rows = await db.select({
|
|
589
769
|
id: projects.id,
|
|
770
|
+
identity: projects.identity,
|
|
590
771
|
name: projects.name,
|
|
591
772
|
slug: projects.slug,
|
|
592
773
|
root: projects.root,
|
|
@@ -595,7 +776,7 @@ async function listProjects(db) {
|
|
|
595
776
|
summarySource: projects.summarySource,
|
|
596
777
|
originKind: projects.originKind,
|
|
597
778
|
originStartedBy: projects.originStartedBy,
|
|
598
|
-
hasIcon:
|
|
779
|
+
hasIcon: sql3`(projects.icon_data_uri is not null)`,
|
|
599
780
|
primaryLanguage: projects.primaryLanguage,
|
|
600
781
|
healthScore: projects.healthScore,
|
|
601
782
|
healthGrade: projects.healthGrade,
|
|
@@ -619,7 +800,7 @@ async function listProjects(db) {
|
|
|
619
800
|
// qualify columns with their table, so interpolating `${t.projects.id}` in a correlated
|
|
620
801
|
// subquery produces a plain `id` that collides with the `id` of the joined table ("column
|
|
621
802
|
// reference is ambiguous").
|
|
622
|
-
technologies:
|
|
803
|
+
technologies: sql3`coalesce((
|
|
623
804
|
select json_agg(json_build_object(
|
|
624
805
|
'id', tech.id, 'name', tech.name, 'kind', tech.kind, 'version', pt.version
|
|
625
806
|
) order by pt.confidence desc, tech.name)
|
|
@@ -627,18 +808,18 @@ async function listProjects(db) {
|
|
|
627
808
|
join technologies tech on tech.id = pt.technology_id
|
|
628
809
|
where pt.project_id = projects.id
|
|
629
810
|
), '[]'::json)`,
|
|
630
|
-
agents:
|
|
811
|
+
agents: sql3`coalesce((
|
|
631
812
|
select json_agg(json_build_object('name', pa.agent_name, 'commits', pa.commits)
|
|
632
813
|
order by pa.commits desc)
|
|
633
814
|
from project_agents pa
|
|
634
815
|
where pa.project_id = projects.id
|
|
635
816
|
), '[]'::json)`,
|
|
636
|
-
copyCount:
|
|
817
|
+
copyCount: sql3`coalesce((
|
|
637
818
|
select count(*)::int from family_members fm
|
|
638
819
|
join families f on f.id = fm.family_id
|
|
639
820
|
where f.canonical_project_id = projects.id
|
|
640
821
|
), 0)`,
|
|
641
|
-
copyOf:
|
|
822
|
+
copyOf: sql3`(
|
|
642
823
|
select canon.name from family_members fm
|
|
643
824
|
join families f on f.id = fm.family_id
|
|
644
825
|
join projects canon on canon.id = f.canonical_project_id
|
|
@@ -648,14 +829,14 @@ async function listProjects(db) {
|
|
|
648
829
|
// A finished proposal is the only thing in the catalog that **awaits a human decision**: the
|
|
649
830
|
// agent did its part overnight and cannot continue without you. That is why it travels on the
|
|
650
831
|
// card and not just on its page, and that is why it matters in 'attention'.
|
|
651
|
-
proposedRuns:
|
|
832
|
+
proposedRuns: sql3`coalesce((
|
|
652
833
|
select count(*)::int from runs
|
|
653
834
|
where runs.project_id = projects.id and runs.status = 'propuesto'
|
|
654
835
|
), 0)`,
|
|
655
836
|
// The first element of `recent_commits` is the most recent: the engine already keeps them
|
|
656
837
|
// sorted, so there is no need to sort anything here.
|
|
657
|
-
lastCommitSubject:
|
|
658
|
-
}).from(projects).where(
|
|
838
|
+
lastCommitSubject: sql3`(projects.recent_commits->0->>'subject')`
|
|
839
|
+
}).from(projects).where(sql3`(select d.hidden from decisions d where d.identity = projects.identity) is not true`).orderBy(sql3`${projects.lastCommitAt} desc nulls last`, desc2(projects.healthScore));
|
|
659
840
|
return rows.map((row) => ({ ...row, work: workStateOf(row) }));
|
|
660
841
|
}
|
|
661
842
|
function workStateOf(row) {
|
|
@@ -670,9 +851,9 @@ function workStateOf(row) {
|
|
|
670
851
|
};
|
|
671
852
|
}
|
|
672
853
|
async function getProject(db, slug) {
|
|
673
|
-
const [project] = await db.select().from(projects).where(
|
|
854
|
+
const [project] = await db.select().from(projects).where(eq3(projects.slug, slug)).limit(1);
|
|
674
855
|
if (!project) return void 0;
|
|
675
|
-
const [decision] = project.identity ? await db.select().from(decisions).where(
|
|
856
|
+
const [decision] = project.identity ? await db.select().from(decisions).where(eq3(decisions.identity, project.identity)).limit(1) : [];
|
|
676
857
|
const [technologies2, dependencies, dists, links, agents2, advisories2, history] = await Promise.all([
|
|
677
858
|
db.select({
|
|
678
859
|
id: technologies.id,
|
|
@@ -682,7 +863,7 @@ async function getProject(db, slug) {
|
|
|
682
863
|
version: projectTechnologies.version,
|
|
683
864
|
confidence: projectTechnologies.confidence,
|
|
684
865
|
evidence: projectTechnologies.evidence
|
|
685
|
-
}).from(projectTechnologies).innerJoin(technologies,
|
|
866
|
+
}).from(projectTechnologies).innerJoin(technologies, eq3(technologies.id, projectTechnologies.technologyId)).where(eq3(projectTechnologies.projectId, project.id)).orderBy(desc2(projectTechnologies.confidence)),
|
|
686
867
|
db.select({
|
|
687
868
|
ecosystem: packages.ecosystem,
|
|
688
869
|
name: packages.name,
|
|
@@ -692,11 +873,11 @@ async function getProject(db, slug) {
|
|
|
692
873
|
isDev: projectDependencies.isDev,
|
|
693
874
|
isDirect: projectDependencies.isDirect,
|
|
694
875
|
source: projectDependencies.source
|
|
695
|
-
}).from(projectDependencies).innerJoin(packages,
|
|
696
|
-
db.select().from(distributions).where(
|
|
876
|
+
}).from(projectDependencies).innerJoin(packages, eq3(packages.id, projectDependencies.packageId)).where(eq3(projectDependencies.projectId, project.id)).orderBy(packages.ecosystem, packages.name),
|
|
877
|
+
db.select().from(distributions).where(eq3(distributions.projectId, project.id)),
|
|
697
878
|
// `deep` before `console`: those who really save time go first.
|
|
698
|
-
db.select().from(projectLinks).where(
|
|
699
|
-
db.select().from(projectAgents).where(
|
|
879
|
+
db.select().from(projectLinks).where(eq3(projectLinks.projectId, project.id)).orderBy(projectLinks.kind, projectLinks.service),
|
|
880
|
+
db.select().from(projectAgents).where(eq3(projectAgents.projectId, project.id)).orderBy(desc2(projectAgents.commits)),
|
|
700
881
|
db.select({
|
|
701
882
|
advisoryId: advisories.id,
|
|
702
883
|
summary: advisories.summary,
|
|
@@ -706,18 +887,18 @@ async function getProject(db, slug) {
|
|
|
706
887
|
packageName: packages.name,
|
|
707
888
|
ecosystem: packages.ecosystem,
|
|
708
889
|
affectedVersion: vulnerabilities.version
|
|
709
|
-
}).from(projectDependencies).innerJoin(packages,
|
|
890
|
+
}).from(projectDependencies).innerJoin(packages, eq3(packages.id, projectDependencies.packageId)).innerJoin(
|
|
710
891
|
vulnerabilities,
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
892
|
+
and3(
|
|
893
|
+
eq3(vulnerabilities.packageId, projectDependencies.packageId),
|
|
894
|
+
eq3(vulnerabilities.version, projectDependencies.resolvedVersion)
|
|
714
895
|
)
|
|
715
|
-
).innerJoin(advisories,
|
|
896
|
+
).innerJoin(advisories, eq3(advisories.id, vulnerabilities.advisoryId)).where(eq3(projectDependencies.projectId, project.id)),
|
|
716
897
|
db.select({
|
|
717
898
|
scannedAt: snapshots.scannedAt,
|
|
718
899
|
healthScore: snapshots.healthScore,
|
|
719
900
|
engineVersion: snapshots.engineVersion
|
|
720
|
-
}).from(snapshots).where(
|
|
901
|
+
}).from(snapshots).where(eq3(snapshots.projectId, project.id)).orderBy(desc2(snapshots.scannedAt)).limit(30)
|
|
721
902
|
]);
|
|
722
903
|
return {
|
|
723
904
|
project,
|
|
@@ -744,7 +925,7 @@ async function listUnsavedWork(db) {
|
|
|
744
925
|
name: projects.name,
|
|
745
926
|
slug: projects.slug,
|
|
746
927
|
root: projects.root,
|
|
747
|
-
hasIcon:
|
|
928
|
+
hasIcon: sql3`(projects.icon_data_uri is not null)`,
|
|
748
929
|
gitBranch: projects.gitBranch,
|
|
749
930
|
gitRemoteUrl: projects.gitRemoteUrl,
|
|
750
931
|
gitCommitCount: projects.gitCommitCount,
|
|
@@ -757,7 +938,7 @@ async function listUnsavedWork(db) {
|
|
|
757
938
|
gitBehind: projects.gitBehind,
|
|
758
939
|
gitStashes: projects.gitStashes,
|
|
759
940
|
gitOwnRepo: projects.gitOwnRepo,
|
|
760
|
-
copyOf:
|
|
941
|
+
copyOf: sql3`(
|
|
761
942
|
select canon.name from family_members fm
|
|
762
943
|
join families f on f.id = fm.family_id
|
|
763
944
|
join projects canon on canon.id = f.canonical_project_id
|
|
@@ -765,38 +946,38 @@ async function listUnsavedWork(db) {
|
|
|
765
946
|
limit 1
|
|
766
947
|
)`
|
|
767
948
|
}).from(projects).where(
|
|
768
|
-
|
|
949
|
+
and3(
|
|
769
950
|
// Git was checked: `--no-git` sets this to null, and no conclusion can be drawn from that.
|
|
770
|
-
|
|
951
|
+
sql3`${projects.gitVersioned} is not null`,
|
|
771
952
|
or2(
|
|
772
953
|
// There isn't even a repository. It's the biggest risk in the catalog and it was left out
|
|
773
954
|
// precisely for that reason: the previous filter required data from the work tree, which
|
|
774
955
|
// don't exist here because there is nothing to compare them with.
|
|
775
|
-
|
|
956
|
+
sql3`${projects.gitVersioned} = false`,
|
|
776
957
|
// `git init` and nothing more. `git_commit_count` comes up null because `rev-list HEAD`
|
|
777
958
|
// fails without HEAD; a folder with 497 files and zero commits came out as 'medium risk'
|
|
778
959
|
// behind a single affected file.
|
|
779
|
-
|
|
780
|
-
|
|
960
|
+
sql3`(${projects.gitVersioned} and coalesce(${projects.gitCommitCount}, 0) = 0)`,
|
|
961
|
+
sql3`${projects.gitModified} > 0`,
|
|
781
962
|
// Files that git does not know about and that are not ignored: they are not compilation
|
|
782
963
|
// leftovers —those do not appear in `status` —, it is work outside of any history.
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
964
|
+
sql3`${projects.gitUntracked} > 0`,
|
|
965
|
+
sql3`${projects.gitAhead} > 0`,
|
|
966
|
+
sql3`${projects.gitStashes} > 0`,
|
|
967
|
+
sql3`(${projects.gitOwnRepo}
|
|
787
968
|
and ${projects.gitRemoteUrl} is null
|
|
788
969
|
and ${projects.gitCommitCount} > 0)`
|
|
789
970
|
)
|
|
790
971
|
)
|
|
791
972
|
).orderBy(
|
|
792
|
-
|
|
973
|
+
sql3`(case
|
|
793
974
|
when ${projects.gitVersioned} = false then 0
|
|
794
975
|
when coalesce(${projects.gitCommitCount}, 0) = 0 then 1
|
|
795
976
|
when ${projects.gitOwnRepo} and ${projects.gitRemoteUrl} is null then 2
|
|
796
977
|
else 3 end)`,
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
978
|
+
sql3`coalesce(${projects.gitCommitCount}, 0) desc`,
|
|
979
|
+
sql3`coalesce(${projects.gitAhead}, 0) desc`,
|
|
980
|
+
sql3`coalesce(${projects.gitModified}, 0) + coalesce(${projects.gitUntracked}, 0) desc`
|
|
800
981
|
);
|
|
801
982
|
return rows.map((row) => ({ ...row, work: workStateOf(row) }));
|
|
802
983
|
}
|
|
@@ -806,32 +987,32 @@ async function listDiskUsage(db) {
|
|
|
806
987
|
name: projects.name,
|
|
807
988
|
slug: projects.slug,
|
|
808
989
|
root: projects.root,
|
|
809
|
-
hasIcon:
|
|
990
|
+
hasIcon: sql3`(projects.icon_data_uri is not null)`,
|
|
810
991
|
lastCommitAt: projects.lastCommitAt,
|
|
811
992
|
totalBytes: projects.diskTotalBytes,
|
|
812
993
|
reclaimableBytes: projects.diskReclaimableBytes,
|
|
813
994
|
dirs: projects.diskDirs,
|
|
814
995
|
measuredAt: projects.diskMeasuredAt,
|
|
815
|
-
copyOf:
|
|
996
|
+
copyOf: sql3`(
|
|
816
997
|
select canon.name from family_members fm
|
|
817
998
|
join families f on f.id = fm.family_id
|
|
818
999
|
join projects canon on canon.id = f.canonical_project_id
|
|
819
1000
|
where fm.project_id = projects.id
|
|
820
1001
|
limit 1
|
|
821
1002
|
)`
|
|
822
|
-
}).from(projects).where(
|
|
1003
|
+
}).from(projects).where(sql3`${projects.diskMeasuredAt} is not null`).orderBy(sql3`coalesce(${projects.diskReclaimableBytes}, 0) desc`);
|
|
823
1004
|
return rows.map((row) => ({ ...row, dirs: row.dirs ?? [] }));
|
|
824
1005
|
}
|
|
825
1006
|
async function getDiskTotals(db) {
|
|
826
1007
|
const [row] = await db.select({
|
|
827
|
-
measured:
|
|
828
|
-
totalBytes:
|
|
829
|
-
reclaimableBytes:
|
|
830
|
-
dormantReclaimableBytes:
|
|
831
|
-
where last_commit_at < now() - interval '${
|
|
1008
|
+
measured: sql3`count(*)::int`,
|
|
1009
|
+
totalBytes: sql3`coalesce(sum(disk_total_bytes), 0)::bigint`,
|
|
1010
|
+
reclaimableBytes: sql3`coalesce(sum(disk_reclaimable_bytes), 0)::bigint`,
|
|
1011
|
+
dormantReclaimableBytes: sql3`coalesce(sum(disk_reclaimable_bytes) filter (
|
|
1012
|
+
where last_commit_at < now() - interval '${sql3.raw(String(DORMANT_DAYS))} days'
|
|
832
1013
|
or last_commit_at is null), 0)::bigint`,
|
|
833
|
-
measuredAt:
|
|
834
|
-
}).from(projects).where(
|
|
1014
|
+
measuredAt: sql3`max(disk_measured_at)`
|
|
1015
|
+
}).from(projects).where(sql3`${projects.diskMeasuredAt} is not null`);
|
|
835
1016
|
return {
|
|
836
1017
|
measured: Number(row?.measured ?? 0),
|
|
837
1018
|
totalBytes: Number(row?.totalBytes ?? 0),
|
|
@@ -841,7 +1022,7 @@ async function getDiskTotals(db) {
|
|
|
841
1022
|
};
|
|
842
1023
|
}
|
|
843
1024
|
async function setHidden(db, id, hidden) {
|
|
844
|
-
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1025
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
845
1026
|
if (!project?.identity) return;
|
|
846
1027
|
await db.insert(decisions).values({ identity: project.identity, hidden, lastName: project.name }).onConflictDoUpdate({
|
|
847
1028
|
target: decisions.identity,
|
|
@@ -849,7 +1030,7 @@ async function setHidden(db, id, hidden) {
|
|
|
849
1030
|
});
|
|
850
1031
|
}
|
|
851
1032
|
async function excludeProject(db, id, confirmation) {
|
|
852
|
-
const [project] = await db.select({ name: projects.name, root: projects.root }).from(projects).where(
|
|
1033
|
+
const [project] = await db.select({ name: projects.name, root: projects.root }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
853
1034
|
if (!project) return void 0;
|
|
854
1035
|
if (confirmation !== void 0 && confirmation.trim() !== project.name) {
|
|
855
1036
|
throw new Error(
|
|
@@ -857,20 +1038,20 @@ async function excludeProject(db, id, confirmation) {
|
|
|
857
1038
|
);
|
|
858
1039
|
}
|
|
859
1040
|
await db.insert(exclusions).values({ root: project.root, name: project.name }).onConflictDoNothing();
|
|
860
|
-
await db.delete(projects).where(
|
|
1041
|
+
await db.delete(projects).where(eq3(projects.id, id));
|
|
861
1042
|
return project;
|
|
862
1043
|
}
|
|
863
1044
|
async function forgetProjectsUnder(db, root) {
|
|
864
1045
|
const scope = root.replace(/\/+$/, "");
|
|
865
1046
|
const doomed = await db.select({ id: projects.id }).from(projects).where(
|
|
866
1047
|
or2(
|
|
867
|
-
|
|
868
|
-
|
|
1048
|
+
eq3(projects.root, scope),
|
|
1049
|
+
sql3`left(${projects.root}, ${scope.length + 1}) = ${`${scope}/`}`
|
|
869
1050
|
)
|
|
870
1051
|
);
|
|
871
1052
|
if (doomed.length === 0) return 0;
|
|
872
1053
|
await db.delete(projects).where(
|
|
873
|
-
|
|
1054
|
+
inArray3(
|
|
874
1055
|
projects.id,
|
|
875
1056
|
doomed.map((row) => row.id)
|
|
876
1057
|
)
|
|
@@ -878,7 +1059,7 @@ async function forgetProjectsUnder(db, root) {
|
|
|
878
1059
|
return doomed.length;
|
|
879
1060
|
}
|
|
880
1061
|
async function unexcludeProject(db, root) {
|
|
881
|
-
await db.delete(exclusions).where(
|
|
1062
|
+
await db.delete(exclusions).where(eq3(exclusions.root, root));
|
|
882
1063
|
}
|
|
883
1064
|
async function listHidden(db) {
|
|
884
1065
|
const [hidden, excluded] = await Promise.all([
|
|
@@ -887,9 +1068,9 @@ async function listHidden(db) {
|
|
|
887
1068
|
name: projects.name,
|
|
888
1069
|
slug: projects.slug,
|
|
889
1070
|
root: projects.root,
|
|
890
|
-
hasIcon:
|
|
891
|
-
}).from(projects).where(
|
|
892
|
-
db.select().from(exclusions).orderBy(
|
|
1071
|
+
hasIcon: sql3`(projects.icon_data_uri is not null)`
|
|
1072
|
+
}).from(projects).where(sql3`(select d.hidden from decisions d where d.identity = projects.identity) is true`).orderBy(projects.name),
|
|
1073
|
+
db.select().from(exclusions).orderBy(desc2(exclusions.excludedAt))
|
|
893
1074
|
]);
|
|
894
1075
|
return { hidden, excluded };
|
|
895
1076
|
}
|
|
@@ -914,26 +1095,27 @@ async function saveDiskUsage(db, id, report) {
|
|
|
914
1095
|
diskReclaimableBytes: report.reclaimableBytes,
|
|
915
1096
|
diskDirs: report.dirs,
|
|
916
1097
|
diskMeasuredAt: /* @__PURE__ */ new Date()
|
|
917
|
-
}).where(
|
|
1098
|
+
}).where(eq3(projects.id, id));
|
|
918
1099
|
}
|
|
919
1100
|
async function getProjectLocation(db, id) {
|
|
920
|
-
const [row] = await db.select({ root: projects.root, name: projects.name }).from(projects).where(
|
|
1101
|
+
const [row] = await db.select({ root: projects.root, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
921
1102
|
return row;
|
|
922
1103
|
}
|
|
923
|
-
async function saveAiSummary(db, id, text, model, lang) {
|
|
924
|
-
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1104
|
+
async function saveAiSummary(db, id, text, model, lang, hash) {
|
|
1105
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
925
1106
|
if (!project?.identity) return;
|
|
926
1107
|
const value = {
|
|
927
1108
|
aiSummary: text,
|
|
928
1109
|
aiSummaryModel: model,
|
|
929
1110
|
aiSummaryAt: /* @__PURE__ */ new Date(),
|
|
930
1111
|
aiSummaryLang: lang,
|
|
1112
|
+
aiSummaryHash: hash,
|
|
931
1113
|
lastName: project.name
|
|
932
1114
|
};
|
|
933
1115
|
await db.insert(decisions).values({ identity: project.identity, ...value }).onConflictDoUpdate({ target: decisions.identity, set: { ...value, updatedAt: /* @__PURE__ */ new Date() } });
|
|
934
1116
|
}
|
|
935
1117
|
async function saveMdReview(db, id, text, model, hash, lang) {
|
|
936
|
-
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1118
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
937
1119
|
if (!project?.identity) return;
|
|
938
1120
|
const value = {
|
|
939
1121
|
mdReview: text,
|
|
@@ -946,29 +1128,29 @@ async function saveMdReview(db, id, text, model, hash, lang) {
|
|
|
946
1128
|
await db.insert(decisions).values({ identity: project.identity, ...value }).onConflictDoUpdate({ target: decisions.identity, set: { ...value, updatedAt: /* @__PURE__ */ new Date() } });
|
|
947
1129
|
}
|
|
948
1130
|
async function saveProjectAccounts(db, id, accounts) {
|
|
949
|
-
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1131
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
950
1132
|
if (!project?.identity) return;
|
|
951
1133
|
const value = { accounts, lastName: project.name };
|
|
952
1134
|
await db.insert(decisions).values({ identity: project.identity, ...value }).onConflictDoUpdate({ target: decisions.identity, set: { ...value, updatedAt: /* @__PURE__ */ new Date() } });
|
|
953
1135
|
}
|
|
954
1136
|
async function saveBuildCheck(db, id, verdict) {
|
|
955
|
-
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1137
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
956
1138
|
if (!project?.identity) return;
|
|
957
1139
|
const value = { buildCheck: verdict, lastName: project.name };
|
|
958
1140
|
await db.insert(decisions).values({ identity: project.identity, ...value }).onConflictDoUpdate({ target: decisions.identity, set: { ...value, updatedAt: /* @__PURE__ */ new Date() } });
|
|
959
1141
|
}
|
|
960
1142
|
async function saveNorth(db, slug, north) {
|
|
961
|
-
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1143
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.slug, slug)).limit(1);
|
|
962
1144
|
if (!project?.identity) return;
|
|
963
1145
|
const value = { north, lastName: project.name };
|
|
964
1146
|
await db.insert(decisions).values({ identity: project.identity, ...value }).onConflictDoUpdate({ target: decisions.identity, set: { ...value, updatedAt: /* @__PURE__ */ new Date() } });
|
|
965
1147
|
}
|
|
966
1148
|
async function getNorth(db, identity) {
|
|
967
|
-
const [row] = await db.select({ north: decisions.north }).from(decisions).where(
|
|
1149
|
+
const [row] = await db.select({ north: decisions.north }).from(decisions).where(eq3(decisions.identity, identity)).limit(1);
|
|
968
1150
|
return row?.north ?? void 0;
|
|
969
1151
|
}
|
|
970
1152
|
async function getProjectIcon(db, id) {
|
|
971
|
-
const [row] = await db.select({ icon: projects.iconDataUri, hash: projects.iconHash }).from(projects).where(
|
|
1153
|
+
const [row] = await db.select({ icon: projects.iconDataUri, hash: projects.iconHash }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
972
1154
|
const match = row?.icon ? /^data:([^;]+);base64,(.+)$/.exec(row.icon) : null;
|
|
973
1155
|
if (!match) return void 0;
|
|
974
1156
|
const buffer = Buffer.from(match[2], "base64");
|
|
@@ -991,7 +1173,7 @@ async function listFamilies(db) {
|
|
|
991
1173
|
slug: canon.slug,
|
|
992
1174
|
lastCommitAt: canon.lastCommitAt
|
|
993
1175
|
},
|
|
994
|
-
copies:
|
|
1176
|
+
copies: sql3`coalesce((
|
|
995
1177
|
select json_agg(json_build_object(
|
|
996
1178
|
'name', p.name, 'root', p.root, 'slug', p.slug,
|
|
997
1179
|
'confidence', fm.confidence, 'reason', fm.reason, 'daysBehind', fm.days_behind
|
|
@@ -1000,10 +1182,10 @@ async function listFamilies(db) {
|
|
|
1000
1182
|
join projects p on p.id = fm.project_id
|
|
1001
1183
|
where fm.family_id = families.id
|
|
1002
1184
|
), '[]'::json)`
|
|
1003
|
-
}).from(families).innerJoin(canon,
|
|
1185
|
+
}).from(families).innerJoin(canon, eq3(canon.id, families.canonicalProjectId)).orderBy(desc2(families.redundantBytes));
|
|
1004
1186
|
return rows;
|
|
1005
1187
|
}
|
|
1006
|
-
var notACopy =
|
|
1188
|
+
var notACopy = sql3`not exists (
|
|
1007
1189
|
select 1 from family_members fm where fm.project_id = projects.id
|
|
1008
1190
|
) and (select d.hidden from decisions d where d.identity = projects.identity) is not true`;
|
|
1009
1191
|
async function getStats(db) {
|
|
@@ -1012,7 +1194,7 @@ async function getStats(db) {
|
|
|
1012
1194
|
// copies, twelve folders of the same app counted as twelve live projects, and the sidebar
|
|
1013
1195
|
// said fourteen active while there were three on screen. A number that cannot be pointed out
|
|
1014
1196
|
// in the interface is a number that lies.
|
|
1015
|
-
projects:
|
|
1197
|
+
projects: sql3`(select count(*)::int from ${projects} where ${notACopy})`,
|
|
1016
1198
|
/*
|
|
1017
1199
|
The four states of `stateOf`, and the four add up to `projects`.
|
|
1018
1200
|
Before there were two and they didn't match: `dormant` grouped the sleeping ones with
|
|
@@ -1025,55 +1207,55 @@ async function getStats(db) {
|
|
|
1025
1207
|
and the grid cannot disagree again: without a date it is `no-git`, more than a year
|
|
1026
1208
|
`dormant`, more than two months `paused`, and the rest `active`.
|
|
1027
1209
|
*/
|
|
1028
|
-
live:
|
|
1210
|
+
live: sql3`(select count(*)::int from ${projects}
|
|
1029
1211
|
where ${notACopy}
|
|
1030
|
-
and last_commit_at > now() - interval '${
|
|
1031
|
-
paused:
|
|
1212
|
+
and last_commit_at > now() - interval '${sql3.raw(String(IDLE_DAYS))} days')`,
|
|
1213
|
+
paused: sql3`(select count(*)::int from ${projects}
|
|
1032
1214
|
where ${notACopy}
|
|
1033
|
-
and last_commit_at <= now() - interval '${
|
|
1034
|
-
and last_commit_at >= now() - interval '${
|
|
1035
|
-
dormant:
|
|
1215
|
+
and last_commit_at <= now() - interval '${sql3.raw(String(IDLE_DAYS))} days'
|
|
1216
|
+
and last_commit_at >= now() - interval '${sql3.raw(String(DORMANT_DAYS))} days')`,
|
|
1217
|
+
dormant: sql3`(select count(*)::int from ${projects}
|
|
1036
1218
|
where ${notACopy}
|
|
1037
|
-
and last_commit_at < now() - interval '${
|
|
1038
|
-
noGit:
|
|
1219
|
+
and last_commit_at < now() - interval '${sql3.raw(String(DORMANT_DAYS))} days')`,
|
|
1220
|
+
noGit: sql3`(select count(*)::int from ${projects}
|
|
1039
1221
|
where ${notACopy} and last_commit_at is null)`,
|
|
1040
|
-
copies:
|
|
1222
|
+
copies: sql3`(select count(*)::int from ${familyMembers})`,
|
|
1041
1223
|
/*
|
|
1042
1224
|
Counted from the decision and not from the project: `notACopy` reads `decisions.hidden`
|
|
1043
1225
|
through `identity`, which is what survives moving the folder, and a decision can outlive
|
|
1044
1226
|
the row it was about. Only rows that are still in the catalog are counted, so the figure
|
|
1045
1227
|
can always be pointed at — and one that is also a copy is not counted twice.
|
|
1046
1228
|
*/
|
|
1047
|
-
hidden:
|
|
1229
|
+
hidden: sql3`(select count(*)::int from ${projects} p
|
|
1048
1230
|
where not exists (select 1 from family_members fm where fm.project_id = p.id)
|
|
1049
1231
|
and (select d.hidden from decisions d where d.identity = p.identity) is true)`,
|
|
1050
|
-
redundantBytes:
|
|
1051
|
-
agentCommits:
|
|
1052
|
-
technologies:
|
|
1053
|
-
packages:
|
|
1054
|
-
outdatedDeps:
|
|
1055
|
-
vulnerableProjects:
|
|
1056
|
-
advisories:
|
|
1057
|
-
enrichedAt:
|
|
1232
|
+
redundantBytes: sql3`(select coalesce(sum(redundant_bytes), 0)::int from ${families})`,
|
|
1233
|
+
agentCommits: sql3`(select coalesce(sum(commits), 0)::int from ${projectAgents})`,
|
|
1234
|
+
technologies: sql3`(select count(*)::int from ${technologies})`,
|
|
1235
|
+
packages: sql3`(select count(*)::int from ${packages})`,
|
|
1236
|
+
outdatedDeps: sql3`(select coalesce(sum(outdated_deps), 0)::int from ${projects})`,
|
|
1237
|
+
vulnerableProjects: sql3`(select count(*)::int from ${projects} where vuln_count > 0)`,
|
|
1238
|
+
advisories: sql3`(select count(*)::int from ${advisories})`,
|
|
1239
|
+
enrichedAt: sql3`(select max(enriched_at) from ${projects})`,
|
|
1058
1240
|
// Unfiltered copies, just like `listUnsavedWork`: the counter has to match the list it opens,
|
|
1059
1241
|
// and in a copy is where the work truly gets lost.
|
|
1060
|
-
unsaved:
|
|
1242
|
+
unsaved: sql3`(select count(*)::int from ${projects}
|
|
1061
1243
|
where git_versioned is not null
|
|
1062
1244
|
and (git_versioned = false
|
|
1063
1245
|
or (git_versioned and coalesce(git_commit_count, 0) = 0)
|
|
1064
1246
|
or git_modified > 0 or git_untracked > 0 or git_ahead > 0 or git_stashes > 0
|
|
1065
1247
|
or (git_own_repo and git_remote_url is null and git_commit_count > 0)))`,
|
|
1066
|
-
noRemote:
|
|
1248
|
+
noRemote: sql3`(select count(*)::int from ${projects}
|
|
1067
1249
|
where git_own_repo and git_remote_url is null and git_commit_count > 0)`,
|
|
1068
1250
|
/** Folders with code and without a repository: nothing to undo, nothing to recover. */
|
|
1069
|
-
unversioned:
|
|
1251
|
+
unversioned: sql3`(select count(*)::int from ${projects}
|
|
1070
1252
|
where git_versioned = false)`,
|
|
1071
|
-
notMine:
|
|
1253
|
+
notMine: sql3`(select count(*)::int from ${projects}
|
|
1072
1254
|
where origin_kind in ('ajeno', 'bifurcado'))`,
|
|
1073
1255
|
// Without filtering copies or hiding them: a finished proposal awaits a decision even if its
|
|
1074
1256
|
// project does not appear on the grid, and hiding it would be losing work already done.
|
|
1075
|
-
proposedRuns:
|
|
1076
|
-
}).from(
|
|
1257
|
+
proposedRuns: sql3`(select count(*)::int from ${runs} where status = 'propuesto')`
|
|
1258
|
+
}).from(sql3`(select 1) as _`);
|
|
1077
1259
|
return {
|
|
1078
1260
|
...row,
|
|
1079
1261
|
enrichedAt: row?.enrichedAt ? new Date(row.enrichedAt) : null
|
|
@@ -1086,10 +1268,10 @@ async function listPackages(db) {
|
|
|
1086
1268
|
name: packages.name,
|
|
1087
1269
|
latestVersion: packages.latestVersion,
|
|
1088
1270
|
deprecated: packages.deprecated,
|
|
1089
|
-
projects:
|
|
1271
|
+
projects: sql3`(
|
|
1090
1272
|
select count(*)::int from project_dependencies pd where pd.package_id = packages.id
|
|
1091
1273
|
)`,
|
|
1092
|
-
versionsInUse:
|
|
1274
|
+
versionsInUse: sql3`coalesce((
|
|
1093
1275
|
select json_agg(v order by v.projects desc, v.version)
|
|
1094
1276
|
from (
|
|
1095
1277
|
select pd.resolved_version as version, count(*)::int as projects
|
|
@@ -1098,11 +1280,11 @@ async function listPackages(db) {
|
|
|
1098
1280
|
group by pd.resolved_version
|
|
1099
1281
|
) v
|
|
1100
1282
|
), '[]'::json)`,
|
|
1101
|
-
advisories:
|
|
1283
|
+
advisories: sql3`(
|
|
1102
1284
|
select count(distinct vu.advisory_id)::int
|
|
1103
1285
|
from vulnerabilities vu where vu.package_id = packages.id
|
|
1104
1286
|
)`,
|
|
1105
|
-
worstSeverity:
|
|
1287
|
+
worstSeverity: sql3`(
|
|
1106
1288
|
select a.severity from vulnerabilities vu
|
|
1107
1289
|
join advisories a on a.id = vu.advisory_id
|
|
1108
1290
|
where vu.package_id = packages.id
|
|
@@ -1111,7 +1293,7 @@ async function listPackages(db) {
|
|
|
1111
1293
|
when 'baja' then 3 else 4 end
|
|
1112
1294
|
limit 1
|
|
1113
1295
|
)`
|
|
1114
|
-
}).from(packages).orderBy(
|
|
1296
|
+
}).from(packages).orderBy(sql3`(
|
|
1115
1297
|
select count(*) from project_dependencies pd where pd.package_id = packages.id
|
|
1116
1298
|
) desc`, packages.name);
|
|
1117
1299
|
return rows;
|
|
@@ -1119,8 +1301,8 @@ async function listPackages(db) {
|
|
|
1119
1301
|
async function getDailyReport(db, since) {
|
|
1120
1302
|
const now = /* @__PURE__ */ new Date();
|
|
1121
1303
|
const window = since ?? new Date(now.getTime() - 24 * 60 * 60 * 1e3);
|
|
1122
|
-
const
|
|
1123
|
-
const [total] = await db.select({ n:
|
|
1304
|
+
const iso2 = window.toISOString();
|
|
1305
|
+
const [total] = await db.select({ n: sql3`count(*)::int` }).from(projects);
|
|
1124
1306
|
const catalog = total?.n ?? 0;
|
|
1125
1307
|
const projects2 = await db.select({
|
|
1126
1308
|
id: projects.id,
|
|
@@ -1142,36 +1324,36 @@ async function getDailyReport(db, since) {
|
|
|
1142
1324
|
report**. `nullif` protects against the commit without a date, which the engine leaves as
|
|
1143
1325
|
an empty string and that a plain `::timestamptz` would crash with an error.
|
|
1144
1326
|
*/
|
|
1145
|
-
commits:
|
|
1327
|
+
commits: sql3`coalesce((
|
|
1146
1328
|
select json_agg(json_build_object(
|
|
1147
1329
|
'sha', c->>'sha', 'at', c->>'at', 'subject', c->>'subject', 'agent', c->>'agent'
|
|
1148
1330
|
) order by nullif(c->>'at', '')::timestamptz desc)
|
|
1149
1331
|
from jsonb_array_elements(projects.recent_commits) c
|
|
1150
|
-
where nullif(c->>'at', '')::timestamptz > ${
|
|
1332
|
+
where nullif(c->>'at', '')::timestamptz > ${iso2}::timestamptz
|
|
1151
1333
|
), '[]'::json)`,
|
|
1152
|
-
agents:
|
|
1334
|
+
agents: sql3`coalesce((
|
|
1153
1335
|
select json_agg(json_build_object('name', ag.name, 'activities', n) order by n desc)
|
|
1154
1336
|
from (
|
|
1155
1337
|
select aa.agent_id, count(*)::int as n
|
|
1156
1338
|
from agent_activities aa
|
|
1157
|
-
where aa.project_id = projects.id and aa.created_at > ${
|
|
1339
|
+
where aa.project_id = projects.id and aa.created_at > ${iso2}
|
|
1158
1340
|
group by aa.agent_id
|
|
1159
1341
|
) act
|
|
1160
1342
|
join agents ag on ag.id = act.agent_id
|
|
1161
1343
|
), '[]'::json)`
|
|
1162
1344
|
}).from(projects).where(
|
|
1163
|
-
|
|
1345
|
+
sql3`(select d.hidden from decisions d where d.identity = projects.identity) is not true
|
|
1164
1346
|
and (
|
|
1165
1347
|
exists (
|
|
1166
1348
|
select 1 from jsonb_array_elements(projects.recent_commits) c
|
|
1167
|
-
where nullif(c->>'at', '')::timestamptz > ${
|
|
1349
|
+
where nullif(c->>'at', '')::timestamptz > ${iso2}::timestamptz
|
|
1168
1350
|
)
|
|
1169
1351
|
or exists (
|
|
1170
1352
|
select 1 from agent_activities aa
|
|
1171
|
-
where aa.project_id = projects.id and aa.created_at > ${
|
|
1353
|
+
where aa.project_id = projects.id and aa.created_at > ${iso2}
|
|
1172
1354
|
)
|
|
1173
1355
|
)`
|
|
1174
|
-
).orderBy(
|
|
1356
|
+
).orderBy(sql3`${projects.lastCommitAt} desc nulls last`);
|
|
1175
1357
|
const proposals = await db.select({
|
|
1176
1358
|
id: runs.id,
|
|
1177
1359
|
project: projects.name,
|
|
@@ -1179,26 +1361,26 @@ async function getDailyReport(db, since) {
|
|
|
1179
1361
|
target: runs.target,
|
|
1180
1362
|
verified: runs.verified,
|
|
1181
1363
|
when: runs.createdAt
|
|
1182
|
-
}).from(runs).innerJoin(projects,
|
|
1183
|
-
const born = await db.select({ slug: projects.slug, name: projects.name, when: projects.firstSeenAt }).from(projects).where(
|
|
1364
|
+
}).from(runs).innerJoin(projects, eq3(projects.id, runs.projectId)).where(eq3(runs.status, "proposed")).orderBy(desc2(runs.createdAt));
|
|
1365
|
+
const born = await db.select({ slug: projects.slug, name: projects.name, when: projects.firstSeenAt }).from(projects).where(sql3`projects.first_seen_at > ${iso2}`).orderBy(desc2(projects.firstSeenAt));
|
|
1184
1366
|
const [lookedAlone] = await db.select({
|
|
1185
|
-
looks:
|
|
1186
|
-
findings:
|
|
1187
|
-
}).from(looks).where(
|
|
1367
|
+
looks: sql3`count(*)::int`,
|
|
1368
|
+
findings: sql3`coalesce(sum(jsonb_array_length(${looks.findings})), 0)::int`
|
|
1369
|
+
}).from(looks).where(and3(eq3(looks.fired, "watch"), sql3`${looks.at} > ${iso2}`));
|
|
1188
1370
|
const [reviewed] = await db.select({
|
|
1189
|
-
reviews:
|
|
1190
|
-
findings:
|
|
1191
|
-
}).from(reviews).where(
|
|
1371
|
+
reviews: sql3`count(*)::int`,
|
|
1372
|
+
findings: sql3`coalesce(sum(jsonb_array_length(${reviews.findings})), 0)::int`
|
|
1373
|
+
}).from(reviews).where(sql3`${reviews.at} > ${iso2}`);
|
|
1192
1374
|
const mirados = await db.select({
|
|
1193
1375
|
slug: projects.slug,
|
|
1194
1376
|
name: projects.name,
|
|
1195
|
-
findings:
|
|
1196
|
-
}).from(looks).innerJoin(projects,
|
|
1377
|
+
findings: sql3`coalesce(sum(jsonb_array_length(${looks.findings})), 0)::int`
|
|
1378
|
+
}).from(looks).innerJoin(projects, eq3(projects.identity, looks.identity)).where(and3(eq3(looks.fired, "watch"), sql3`${looks.at} > ${iso2}`)).groupBy(projects.slug, projects.name);
|
|
1197
1379
|
const revisados = await db.select({
|
|
1198
1380
|
slug: projects.slug,
|
|
1199
1381
|
name: projects.name,
|
|
1200
|
-
findings:
|
|
1201
|
-
}).from(reviews).innerJoin(projects,
|
|
1382
|
+
findings: sql3`coalesce(sum(jsonb_array_length(${reviews.findings})), 0)::int`
|
|
1383
|
+
}).from(reviews).innerJoin(projects, eq3(projects.id, reviews.projectId)).where(sql3`${reviews.at} > ${iso2}`).groupBy(projects.slug, projects.name);
|
|
1202
1384
|
const porProyecto = /* @__PURE__ */ new Map();
|
|
1203
1385
|
for (const fila of [...mirados, ...revisados]) {
|
|
1204
1386
|
if (fila.findings === 0) continue;
|
|
@@ -1215,24 +1397,24 @@ async function getDailyReport(db, since) {
|
|
|
1215
1397
|
// It asks about the paragraph of README and not about the file: a README of one line with the
|
|
1216
1398
|
// project name exists on disk and tells nothing. It is the same criterion that `factsOf` uses
|
|
1217
1399
|
// to decide whether to offer the task of making it presentable.
|
|
1218
|
-
hasReadme:
|
|
1400
|
+
hasReadme: sql3`(${projects.summaryReadme} is not null)`,
|
|
1219
1401
|
health: projects.healthScore,
|
|
1220
1402
|
outdated: projects.outdatedDeps,
|
|
1221
1403
|
notices: projects.vulnCount,
|
|
1222
1404
|
// The two states that an agent considers pending work, the same ones that `getAgentContext`
|
|
1223
1405
|
// filters: if this account and that query were to disagree, the catalog would propose one
|
|
1224
1406
|
// more task on a queue that the agent already sees as full.
|
|
1225
|
-
openTasks:
|
|
1407
|
+
openTasks: sql3`(
|
|
1226
1408
|
select count(*)::int from tasks
|
|
1227
1409
|
where tasks.project_id = ${projects.id}
|
|
1228
1410
|
and tasks.status in ('open', 'in-progress')
|
|
1229
1411
|
)`,
|
|
1230
1412
|
north: decisions.north,
|
|
1231
|
-
built:
|
|
1413
|
+
built: sql3`(${decisions.buildCheck} is not null)`,
|
|
1232
1414
|
// What the critic saw at no cost. It is counted in the database and the list is not
|
|
1233
1415
|
// brought: the director only needs to know if there is something, and the lists of twenty
|
|
1234
1416
|
// folders are heavy.
|
|
1235
|
-
critiques:
|
|
1417
|
+
critiques: sql3`coalesce((
|
|
1236
1418
|
select jsonb_array_length(reviews.findings) from reviews
|
|
1237
1419
|
where reviews.project_id = ${projects.id}
|
|
1238
1420
|
), 0)`,
|
|
@@ -1245,7 +1427,7 @@ async function getDailyReport(db, since) {
|
|
|
1245
1427
|
gitBehind: projects.gitBehind,
|
|
1246
1428
|
gitStashes: projects.gitStashes,
|
|
1247
1429
|
gitOwnRepo: projects.gitOwnRepo
|
|
1248
|
-
}).from(projects).leftJoin(decisions,
|
|
1430
|
+
}).from(projects).leftJoin(decisions, eq3(decisions.identity, projects.identity)).where(sql3`${decisions.hidden} is not true`).orderBy(sql3`${projects.lastCommitAt} desc nulls last`);
|
|
1249
1431
|
const commits = projects2.reduce((sum, p) => sum + (p.commits?.length ?? 0), 0);
|
|
1250
1432
|
const byAgents = projects2.reduce(
|
|
1251
1433
|
(sum, p) => sum + (p.commits ?? []).filter((c) => c.agent).length,
|
|
@@ -1360,7 +1542,7 @@ async function saveVerdicts(db, rows) {
|
|
|
1360
1542
|
async function remap(db, chunk, inserted) {
|
|
1361
1543
|
const existing = chunk.filter((one) => !inserted.has(one.id));
|
|
1362
1544
|
if (existing.length === 0) return 0;
|
|
1363
|
-
const stored = await db.select({ id: verdicts.id, identity: verdicts.identity }).from(verdicts).where(
|
|
1545
|
+
const stored = await db.select({ id: verdicts.id, identity: verdicts.identity }).from(verdicts).where(inArray3(verdicts.id, existing.map((one) => one.id)));
|
|
1364
1546
|
const now = new Map(stored.map((row) => [row.id, row.identity]));
|
|
1365
1547
|
const byIdentity = /* @__PURE__ */ new Map();
|
|
1366
1548
|
for (const one of existing) {
|
|
@@ -1371,13 +1553,13 @@ async function remap(db, chunk, inserted) {
|
|
|
1371
1553
|
}
|
|
1372
1554
|
let changed = 0;
|
|
1373
1555
|
for (const [identity, ids] of byIdentity) {
|
|
1374
|
-
await db.update(verdicts).set({ identity }).where(
|
|
1556
|
+
await db.update(verdicts).set({ identity }).where(inArray3(verdicts.id, ids));
|
|
1375
1557
|
changed += ids.length;
|
|
1376
1558
|
}
|
|
1377
1559
|
return changed;
|
|
1378
1560
|
}
|
|
1379
1561
|
async function projectNamesByIdentity(db) {
|
|
1380
|
-
const rows = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(
|
|
1562
|
+
const rows = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(sql3`${projects.identity} is not null`);
|
|
1381
1563
|
const names = {};
|
|
1382
1564
|
for (const row of rows) {
|
|
1383
1565
|
if (row.identity && names[row.identity] === void 0) names[row.identity] = row.name;
|
|
@@ -1387,23 +1569,23 @@ async function projectNamesByIdentity(db) {
|
|
|
1387
1569
|
async function listVerdicts(db, options = {}) {
|
|
1388
1570
|
const { identity, accepted } = options;
|
|
1389
1571
|
const filters = [];
|
|
1390
|
-
if (identity !== void 0) filters.push(
|
|
1572
|
+
if (identity !== void 0) filters.push(eq3(verdicts.identity, identity));
|
|
1391
1573
|
if (accepted === null) filters.push(isNull(verdicts.accepted));
|
|
1392
|
-
else if (accepted !== void 0) filters.push(
|
|
1393
|
-
const query = db.select().from(verdicts).where(filters.length > 0 ?
|
|
1574
|
+
else if (accepted !== void 0) filters.push(eq3(verdicts.accepted, accepted));
|
|
1575
|
+
const query = db.select().from(verdicts).where(filters.length > 0 ? and3(...filters) : void 0).orderBy(desc2(verdicts.createdAt), desc2(verdicts.at), asc2(verdicts.id));
|
|
1394
1576
|
const rows = options.limit === void 0 ? await query : await query.limit(options.limit);
|
|
1395
1577
|
return rows.map((row) => ({ ...row, signals: row.signals ?? [] }));
|
|
1396
1578
|
}
|
|
1397
1579
|
async function deleteVerdicts(db, filter = {}) {
|
|
1398
1580
|
const filters = [];
|
|
1399
|
-
if (filter.source !== void 0) filters.push(
|
|
1400
|
-
if (filter.sessionId !== void 0) filters.push(
|
|
1401
|
-
if (filter.identity !== void 0) filters.push(
|
|
1402
|
-
const rows = await db.delete(verdicts).where(filters.length > 0 ?
|
|
1581
|
+
if (filter.source !== void 0) filters.push(eq3(verdicts.source, filter.source));
|
|
1582
|
+
if (filter.sessionId !== void 0) filters.push(eq3(verdicts.sessionId, filter.sessionId));
|
|
1583
|
+
if (filter.identity !== void 0) filters.push(eq3(verdicts.identity, filter.identity));
|
|
1584
|
+
const rows = await db.delete(verdicts).where(filters.length > 0 ? and3(...filters) : void 0).returning({ id: verdicts.id });
|
|
1403
1585
|
return rows.length;
|
|
1404
1586
|
}
|
|
1405
1587
|
async function saveDesignFingerprint(db, projectId, data) {
|
|
1406
|
-
const [project] = await db.select({ id: projects.id }).from(projects).where(
|
|
1588
|
+
const [project] = await db.select({ id: projects.id }).from(projects).where(eq3(projects.id, projectId)).limit(1);
|
|
1407
1589
|
if (!project) return;
|
|
1408
1590
|
await db.insert(designFingerprints).values({ projectId, data }).onConflictDoUpdate({
|
|
1409
1591
|
target: designFingerprints.projectId,
|
|
@@ -1411,12 +1593,12 @@ async function saveDesignFingerprint(db, projectId, data) {
|
|
|
1411
1593
|
});
|
|
1412
1594
|
}
|
|
1413
1595
|
async function getDesignFingerprint(db, projectId) {
|
|
1414
|
-
const [row] = await db.select({ data: designFingerprints.data }).from(designFingerprints).where(
|
|
1596
|
+
const [row] = await db.select({ data: designFingerprints.data }).from(designFingerprints).where(eq3(designFingerprints.projectId, projectId)).limit(1);
|
|
1415
1597
|
return row === void 0 ? void 0 : row.data;
|
|
1416
1598
|
}
|
|
1417
1599
|
var DESIGN_SHOWN = { colors: 12, fonts: 8, radii: 8 };
|
|
1418
1600
|
async function portfolioDesign(db) {
|
|
1419
|
-
const rows = await db.select({ data: designFingerprints.data }).from(designFingerprints).innerJoin(projects,
|
|
1601
|
+
const rows = await db.select({ data: designFingerprints.data }).from(designFingerprints).innerJoin(projects, eq3(projects.id, designFingerprints.projectId)).where(notACopy);
|
|
1420
1602
|
const colors = /* @__PURE__ */ new Map();
|
|
1421
1603
|
const fonts = /* @__PURE__ */ new Map();
|
|
1422
1604
|
const radii = /* @__PURE__ */ new Map();
|
|
@@ -1507,7 +1689,7 @@ async function saveObservations(db, rows) {
|
|
|
1507
1689
|
const known = await db.select({ identity: observations.identity, statement: observations.statement }).from(observations).where(
|
|
1508
1690
|
or2(
|
|
1509
1691
|
...identities.map(
|
|
1510
|
-
(identity) => identity === null ? isNull(observations.identity) :
|
|
1692
|
+
(identity) => identity === null ? isNull(observations.identity) : eq3(observations.identity, identity)
|
|
1511
1693
|
)
|
|
1512
1694
|
)
|
|
1513
1695
|
);
|
|
@@ -1541,27 +1723,27 @@ function newestCitation(citations) {
|
|
|
1541
1723
|
async function listObservations(db, options = {}) {
|
|
1542
1724
|
const { topic, classified, identity } = options;
|
|
1543
1725
|
const filters = [];
|
|
1544
|
-
if (topic !== void 0) filters.push(
|
|
1545
|
-
if (classified !== void 0) filters.push(
|
|
1726
|
+
if (topic !== void 0) filters.push(eq3(observations.topic, topic));
|
|
1727
|
+
if (classified !== void 0) filters.push(eq3(observations.classified, classified));
|
|
1546
1728
|
if (identity === null) filters.push(isNull(observations.identity));
|
|
1547
|
-
else if (identity !== void 0) filters.push(
|
|
1548
|
-
const query = db.select().from(observations).where(filters.length > 0 ?
|
|
1729
|
+
else if (identity !== void 0) filters.push(eq3(observations.identity, identity));
|
|
1730
|
+
const query = db.select().from(observations).where(filters.length > 0 ? and3(...filters) : void 0).orderBy(desc2(observations.at), asc2(observations.id));
|
|
1549
1731
|
const rows = options.limit === void 0 ? await query : await query.limit(options.limit);
|
|
1550
1732
|
return rows.map((row) => ({ ...row, citations: row.citations ?? [] }));
|
|
1551
1733
|
}
|
|
1552
1734
|
async function observationTopics(db) {
|
|
1553
1735
|
const rows = await db.select({
|
|
1554
1736
|
topic: observations.topic,
|
|
1555
|
-
observations:
|
|
1556
|
-
unclassified:
|
|
1737
|
+
observations: sql3`count(*)::int`,
|
|
1738
|
+
unclassified: sql3`count(*) filter (where not classified)::int`,
|
|
1557
1739
|
/*
|
|
1558
1740
|
In seconds from the era and not as a date: what comes from a `max()` written by hand does
|
|
1559
1741
|
not go through the column converter, so it arrives as the string that Postgres prints
|
|
1560
1742
|
—"2026-08-22 04:47:11.604-05"— and `new Date` that depends on the engine. A number depends
|
|
1561
1743
|
on no one. The date is composed here, in a single place, as in `listBeliefs`.
|
|
1562
1744
|
*/
|
|
1563
|
-
newest:
|
|
1564
|
-
}).from(observations).groupBy(observations.topic).orderBy(
|
|
1745
|
+
newest: sql3`extract(epoch from max(topic_at))::double precision`
|
|
1746
|
+
}).from(observations).groupBy(observations.topic).orderBy(desc2(sql3`count(*)`), asc2(observations.topic));
|
|
1565
1747
|
return rows.map((row) => ({
|
|
1566
1748
|
...row,
|
|
1567
1749
|
newest: row.newest === null ? null : new Date(row.newest * 1e3)
|
|
@@ -1570,7 +1752,7 @@ async function observationTopics(db) {
|
|
|
1570
1752
|
async function setObservationTopics(db, rows) {
|
|
1571
1753
|
let changed = 0;
|
|
1572
1754
|
for (const row of rows) {
|
|
1573
|
-
const done = await db.update(observations).set({ topic: row.topic, classified: true, topicAt: /* @__PURE__ */ new Date() }).where(
|
|
1755
|
+
const done = await db.update(observations).set({ topic: row.topic, classified: true, topicAt: /* @__PURE__ */ new Date() }).where(eq3(observations.id, row.id)).returning({ id: observations.id });
|
|
1574
1756
|
changed += done.length;
|
|
1575
1757
|
}
|
|
1576
1758
|
return changed;
|
|
@@ -1579,7 +1761,7 @@ async function insertBeliefs(db, rows) {
|
|
|
1579
1761
|
if (rows.length === 0) return [];
|
|
1580
1762
|
const done = await db.insert(beliefs).values(
|
|
1581
1763
|
rows.map((row) => ({
|
|
1582
|
-
id:
|
|
1764
|
+
id: randomUUID2(),
|
|
1583
1765
|
topic: row.topic,
|
|
1584
1766
|
classified: row.classified ?? true,
|
|
1585
1767
|
statement: row.statement,
|
|
@@ -1594,14 +1776,14 @@ async function insertBeliefs(db, rows) {
|
|
|
1594
1776
|
return done.map((row) => row.id);
|
|
1595
1777
|
}
|
|
1596
1778
|
async function updateBelief(db, id, patch) {
|
|
1597
|
-
const done = await db.update(beliefs).set({ ...patch, updatedAt: /* @__PURE__ */ new Date() }).where(
|
|
1779
|
+
const done = await db.update(beliefs).set({ ...patch, updatedAt: /* @__PURE__ */ new Date() }).where(and3(eq3(beliefs.id, id), eq3(beliefs.state, "inferred"))).returning({ id: beliefs.id });
|
|
1598
1780
|
return done.length > 0;
|
|
1599
1781
|
}
|
|
1600
1782
|
async function listBeliefs(db, options = {}) {
|
|
1601
1783
|
const filters = [];
|
|
1602
|
-
if (options.topic !== void 0) filters.push(
|
|
1603
|
-
if (options.states !== void 0) filters.push(
|
|
1604
|
-
const rows = await db.select().from(beliefs).where(filters.length > 0 ?
|
|
1784
|
+
if (options.topic !== void 0) filters.push(eq3(beliefs.topic, options.topic));
|
|
1785
|
+
if (options.states !== void 0) filters.push(inArray3(beliefs.state, options.states));
|
|
1786
|
+
const rows = await db.select().from(beliefs).where(filters.length > 0 ? and3(...filters) : void 0).orderBy(asc2(beliefs.createdAt), asc2(beliefs.id));
|
|
1605
1787
|
return rows.map((row) => ({
|
|
1606
1788
|
...row,
|
|
1607
1789
|
state: row.state,
|
|
@@ -1622,26 +1804,31 @@ async function signBelief(db, id, statement) {
|
|
|
1622
1804
|
const clean = statement?.replace(/\s+/g, " ").trim();
|
|
1623
1805
|
const done = await db.update(beliefs).set({
|
|
1624
1806
|
state: "signed",
|
|
1625
|
-
signedAt:
|
|
1807
|
+
signedAt: sql3`coalesce(${beliefs.signedAt}, now())`,
|
|
1626
1808
|
/*
|
|
1627
1809
|
`updatedAt` only if the text really changes. Fixing one as is a gesture, and gestures are
|
|
1628
1810
|
not churn from the machine: with the date moved, signing five beliefs without touching a
|
|
1629
1811
|
word of them read as 'tuned: 5' in the weekly summary.
|
|
1630
1812
|
*/
|
|
1631
|
-
|
|
1632
|
-
|
|
1813
|
+
// Editing an owner-authored rule stays authorship, not a correction of Twin's prediction.
|
|
1814
|
+
...clean ? {
|
|
1815
|
+
statement: clean,
|
|
1816
|
+
model: sql3`case when ${beliefs.model} = 'owner' then 'owner' else '' end`,
|
|
1817
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
1818
|
+
} : {}
|
|
1819
|
+
}).where(and3(eq3(beliefs.id, id), inArray3(beliefs.state, ALIVE))).returning({ id: beliefs.id });
|
|
1633
1820
|
return done.length > 0;
|
|
1634
1821
|
}
|
|
1635
1822
|
async function vetoBelief(db, id) {
|
|
1636
|
-
const done = await db.update(beliefs).set({ state: "vetoed", vetoedAt:
|
|
1823
|
+
const done = await db.update(beliefs).set({ state: "vetoed", vetoedAt: sql3`coalesce(${beliefs.vetoedAt}, now())` }).where(and3(eq3(beliefs.id, id), inArray3(beliefs.state, ALIVE))).returning({ id: beliefs.id });
|
|
1637
1824
|
if (done.length === 0) return false;
|
|
1638
|
-
const abiertas = await db.select({ id: beliefs.id, supersedes: beliefs.supersedes }).from(beliefs).where(
|
|
1825
|
+
const abiertas = await db.select({ id: beliefs.id, supersedes: beliefs.supersedes }).from(beliefs).where(eq3(beliefs.state, "proposed"));
|
|
1639
1826
|
const tocadas = abiertas.filter(
|
|
1640
1827
|
(one) => Array.isArray(one.supersedes) ? one.supersedes.includes(id) : false
|
|
1641
1828
|
);
|
|
1642
1829
|
if (tocadas.length > 0) {
|
|
1643
1830
|
const vivas = new Set(
|
|
1644
|
-
(await db.select({ id: beliefs.id }).from(beliefs).where(
|
|
1831
|
+
(await db.select({ id: beliefs.id }).from(beliefs).where(inArray3(beliefs.state, ALIVE))).map((row) => row.id)
|
|
1645
1832
|
);
|
|
1646
1833
|
const huerfanas = tocadas.filter(
|
|
1647
1834
|
(one) => one.supersedes.every(
|
|
@@ -1649,22 +1836,22 @@ async function vetoBelief(db, id) {
|
|
|
1649
1836
|
)
|
|
1650
1837
|
).map((one) => one.id);
|
|
1651
1838
|
if (huerfanas.length > 0) {
|
|
1652
|
-
await db.update(beliefs).set({ state: "answered", retiredAt:
|
|
1839
|
+
await db.update(beliefs).set({ state: "answered", retiredAt: sql3`coalesce(${beliefs.retiredAt}, now())` }).where(inArray3(beliefs.id, huerfanas));
|
|
1653
1840
|
}
|
|
1654
1841
|
}
|
|
1655
1842
|
return true;
|
|
1656
1843
|
}
|
|
1657
1844
|
async function retireBeliefs(db, ids) {
|
|
1658
1845
|
if (ids.length === 0) return 0;
|
|
1659
|
-
const done = await db.update(beliefs).set({ state: "retired", retiredAt:
|
|
1846
|
+
const done = await db.update(beliefs).set({ state: "retired", retiredAt: sql3`coalesce(${beliefs.retiredAt}, now())` }).where(and3(inArray3(beliefs.id, ids), eq3(beliefs.state, "inferred"))).returning({ id: beliefs.id });
|
|
1660
1847
|
return done.length;
|
|
1661
1848
|
}
|
|
1662
1849
|
async function setBeliefScope(db, id, identity) {
|
|
1663
|
-
const done = await db.update(beliefs).set({ identity }).where(
|
|
1850
|
+
const done = await db.update(beliefs).set({ identity }).where(and3(eq3(beliefs.id, id), inArray3(beliefs.state, ALIVE))).returning({ id: beliefs.id });
|
|
1664
1851
|
return done.length > 0;
|
|
1665
1852
|
}
|
|
1666
1853
|
async function resolveProposal(db, id, accept) {
|
|
1667
|
-
const [row] = await db.select().from(beliefs).where(
|
|
1854
|
+
const [row] = await db.select().from(beliefs).where(and3(eq3(beliefs.id, id), eq3(beliefs.state, "proposed")));
|
|
1668
1855
|
if (!row) return false;
|
|
1669
1856
|
const supersedes = Array.isArray(row.supersedes) ? row.supersedes.filter((one) => typeof one === "string") : [];
|
|
1670
1857
|
let aplicado = !accept;
|
|
@@ -1689,22 +1876,22 @@ async function resolveProposal(db, id, accept) {
|
|
|
1689
1876
|
accepted: a correction that occurred is not undone by a later agreement.
|
|
1690
1877
|
*/
|
|
1691
1878
|
updatedAt: /* @__PURE__ */ new Date()
|
|
1692
|
-
}).where(
|
|
1879
|
+
}).where(and3(eq3(beliefs.id, other), eq3(beliefs.state, "signed"))).returning({ id: beliefs.id });
|
|
1693
1880
|
if (done.length > 0) heredera = other;
|
|
1694
1881
|
continue;
|
|
1695
1882
|
}
|
|
1696
|
-
await db.update(beliefs).set({ state: "retired", retiredAt:
|
|
1883
|
+
await db.update(beliefs).set({ state: "retired", retiredAt: sql3`coalesce(${beliefs.retiredAt}, now())` }).where(and3(eq3(beliefs.id, other), eq3(beliefs.state, "signed")));
|
|
1697
1884
|
}
|
|
1698
1885
|
aplicado = heredera !== void 0;
|
|
1699
1886
|
}
|
|
1700
|
-
await db.update(beliefs).set({ state: "answered", retiredAt:
|
|
1887
|
+
await db.update(beliefs).set({ state: "answered", retiredAt: sql3`coalesce(${beliefs.retiredAt}, now())` }).where(eq3(beliefs.id, id));
|
|
1701
1888
|
if (supersedes.length > 0) {
|
|
1702
|
-
const abiertas = await db.select({ id: beliefs.id, supersedes: beliefs.supersedes }).from(beliefs).where(
|
|
1889
|
+
const abiertas = await db.select({ id: beliefs.id, supersedes: beliefs.supersedes }).from(beliefs).where(eq3(beliefs.state, "proposed"));
|
|
1703
1890
|
const mismas = abiertas.filter(
|
|
1704
1891
|
(one) => Array.isArray(one.supersedes) ? one.supersedes.some((other) => supersedes.includes(other)) : false
|
|
1705
1892
|
).map((one) => one.id);
|
|
1706
1893
|
if (mismas.length > 0) {
|
|
1707
|
-
await db.update(beliefs).set({ state: "answered", retiredAt:
|
|
1894
|
+
await db.update(beliefs).set({ state: "answered", retiredAt: sql3`coalesce(${beliefs.retiredAt}, now())` }).where(inArray3(beliefs.id, mismas));
|
|
1708
1895
|
}
|
|
1709
1896
|
}
|
|
1710
1897
|
return aplicado;
|
|
@@ -1720,13 +1907,13 @@ function asPublished(value) {
|
|
|
1720
1907
|
}
|
|
1721
1908
|
async function markPublished(db, rows) {
|
|
1722
1909
|
for (const row of rows) {
|
|
1723
|
-
await db.update(beliefs).set({ publishedAs: row.published }).where(
|
|
1910
|
+
await db.update(beliefs).set({ publishedAs: row.published }).where(eq3(beliefs.id, row.id));
|
|
1724
1911
|
}
|
|
1725
1912
|
}
|
|
1726
1913
|
async function setBeliefTopics(db, rows) {
|
|
1727
1914
|
let changed = 0;
|
|
1728
1915
|
for (const row of rows) {
|
|
1729
|
-
const done = await db.update(beliefs).set({ topic: row.topic, classified: true }).where(
|
|
1916
|
+
const done = await db.update(beliefs).set({ topic: row.topic, classified: true }).where(eq3(beliefs.id, row.id)).returning({ id: beliefs.id });
|
|
1730
1917
|
changed += done.length;
|
|
1731
1918
|
}
|
|
1732
1919
|
return changed;
|
|
@@ -1739,19 +1926,19 @@ function standsUp(support) {
|
|
|
1739
1926
|
return support.days >= SUPPORT_FLOOR.sources || support.projects >= SUPPORT_FLOOR.sources;
|
|
1740
1927
|
}
|
|
1741
1928
|
async function tasteScore(db) {
|
|
1742
|
-
const days =
|
|
1743
|
-
const twice =
|
|
1744
|
-
const thrice =
|
|
1745
|
-
const corrected =
|
|
1746
|
-
"(state = 'vetoed' or (state in ('signed', 'retired') and model = ''))"
|
|
1929
|
+
const days = sql3.raw(String(SCORE_WINDOW_DAYS));
|
|
1930
|
+
const twice = sql3.raw(String(SCORE_WINDOW_DAYS * 2));
|
|
1931
|
+
const thrice = sql3.raw(String(SCORE_WINDOW_DAYS * 3));
|
|
1932
|
+
const corrected = sql3.raw(
|
|
1933
|
+
"(model <> 'owner' and (state = 'vetoed' or (state in ('signed', 'retired') and model = '')))"
|
|
1747
1934
|
);
|
|
1748
|
-
const dicha =
|
|
1935
|
+
const dicha = sql3.raw("state not in ('proposed', 'answered') and model <> 'owner'");
|
|
1749
1936
|
const [row] = await db.select({
|
|
1750
|
-
alive:
|
|
1751
|
-
signed:
|
|
1752
|
-
vetoed:
|
|
1753
|
-
retired:
|
|
1754
|
-
proposed:
|
|
1937
|
+
alive: sql3`count(*) filter (where state in ('inferred', 'signed'))::int`,
|
|
1938
|
+
signed: sql3`count(*) filter (where state = 'signed')::int`,
|
|
1939
|
+
vetoed: sql3`count(*) filter (where state = 'vetoed')::int`,
|
|
1940
|
+
retired: sql3`count(*) filter (where state = 'retired')::int`,
|
|
1941
|
+
proposed: sql3`count(*) filter (where state = 'proposed')::int`,
|
|
1755
1942
|
/*
|
|
1756
1943
|
Everything except what was only asked, whether open (`proposed`) or answered (`answered`).
|
|
1757
1944
|
A proposal has not been taught to anyone as a belief: it has been taught as a question,
|
|
@@ -1763,8 +1950,8 @@ async function tasteScore(db) {
|
|
|
1763
1950
|
anything—in other words, the only product metric improved just by the act of answering
|
|
1764
1951
|
questions.
|
|
1765
1952
|
*/
|
|
1766
|
-
shown:
|
|
1767
|
-
corrections:
|
|
1953
|
+
shown: sql3`count(*) filter (where ${dicha})::int`,
|
|
1954
|
+
corrections: sql3`count(*) filter (where ${corrected})::int`,
|
|
1768
1955
|
/*
|
|
1769
1956
|
Two fifths go through one month: the middle one and the one before, not the one that goes.
|
|
1770
1957
|
A newly born fifth has not finished being judged, and to compare it against a settled one
|
|
@@ -1775,19 +1962,19 @@ async function tasteScore(db) {
|
|
|
1775
1962
|
sixty that already include them: always similar, never completely false, impossible to see
|
|
1776
1963
|
on screen.
|
|
1777
1964
|
*/
|
|
1778
|
-
recentShown:
|
|
1965
|
+
recentShown: sql3`count(*) filter (
|
|
1779
1966
|
where ${dicha}
|
|
1780
1967
|
and created_at > now() - interval '${twice} days'
|
|
1781
1968
|
and created_at <= now() - interval '${days} days')::int`,
|
|
1782
|
-
recentCorrections:
|
|
1969
|
+
recentCorrections: sql3`count(*) filter (
|
|
1783
1970
|
where ${dicha} and ${corrected}
|
|
1784
1971
|
and created_at > now() - interval '${twice} days'
|
|
1785
1972
|
and created_at <= now() - interval '${days} days')::int`,
|
|
1786
|
-
earlierShown:
|
|
1973
|
+
earlierShown: sql3`count(*) filter (
|
|
1787
1974
|
where ${dicha}
|
|
1788
1975
|
and created_at > now() - interval '${thrice} days'
|
|
1789
1976
|
and created_at <= now() - interval '${twice} days')::int`,
|
|
1790
|
-
earlierCorrections:
|
|
1977
|
+
earlierCorrections: sql3`count(*) filter (
|
|
1791
1978
|
where ${dicha} and ${corrected}
|
|
1792
1979
|
and created_at > now() - interval '${thrice} days'
|
|
1793
1980
|
and created_at <= now() - interval '${twice} days')::int`
|
|
@@ -1809,8 +1996,9 @@ async function tasteScore(db) {
|
|
|
1809
1996
|
const standing = alive.filter(
|
|
1810
1997
|
(one) => one.state === "signed" || standsUp(one.support)
|
|
1811
1998
|
).length;
|
|
1812
|
-
const
|
|
1813
|
-
const
|
|
1999
|
+
const learned = alive.filter((one) => one.model !== "owner");
|
|
2000
|
+
const apoyo = learned.reduce((total, one) => total + one.support.observations, 0);
|
|
2001
|
+
const [evidence] = await db.select({ observations: sql3`count(*)::int` }).from(observations);
|
|
1814
2002
|
const observations2 = evidence?.observations ?? 0;
|
|
1815
2003
|
const rate = rateOf(counts.corrections, counts.shown);
|
|
1816
2004
|
const recent = windowOf(counts.recentShown, counts.recentCorrections);
|
|
@@ -1826,7 +2014,7 @@ async function tasteScore(db) {
|
|
|
1826
2014
|
observations: observations2,
|
|
1827
2015
|
// With one decimal: the difference between 1.0 and 1.4 is the difference between copying and
|
|
1828
2016
|
// synthesizing, and a whole number would teach them as the same number.
|
|
1829
|
-
density:
|
|
2017
|
+
density: learned.length === 0 ? null : Math.round(apoyo * 10 / learned.length) / 10,
|
|
1830
2018
|
corrections: counts.corrections,
|
|
1831
2019
|
shown: counts.shown,
|
|
1832
2020
|
rate,
|
|
@@ -1844,19 +2032,19 @@ function windowOf(shown, corrections) {
|
|
|
1844
2032
|
return { shown, corrections, rate: rateOf(corrections, shown) };
|
|
1845
2033
|
}
|
|
1846
2034
|
async function briefScore(db) {
|
|
1847
|
-
const [total] = await db.select({ findings:
|
|
2035
|
+
const [total] = await db.select({ findings: sql3`coalesce(sum(jsonb_array_length(${looks.findings})), 0)::int` }).from(looks);
|
|
1848
2036
|
const [used] = await db.select({
|
|
1849
|
-
tasks:
|
|
1850
|
-
claimed:
|
|
1851
|
-
done:
|
|
1852
|
-
}).from(tasks).where(
|
|
2037
|
+
tasks: sql3`count(*)::int`,
|
|
2038
|
+
claimed: sql3`count(*) filter (where ${tasks.claimedAt} is not null)::int`,
|
|
2039
|
+
done: sql3`count(*) filter (where ${tasks.status} = 'done')::int`
|
|
2040
|
+
}).from(tasks).where(and3(isNotNull(tasks.fromLook), isNotNull(tasks.fromFinding)));
|
|
1853
2041
|
const pairs = await db.select({
|
|
1854
|
-
alive:
|
|
1855
|
-
}).from(tasks).where(
|
|
2042
|
+
alive: sql3`count(*) filter (where ${tasks.status} <> 'discarded')::int`
|
|
2043
|
+
}).from(tasks).where(and3(isNotNull(tasks.fromLook), isNotNull(tasks.fromFinding))).groupBy(tasks.fromLook, tasks.fromFinding);
|
|
1856
2044
|
const out = await db.select({
|
|
1857
|
-
launched:
|
|
1858
|
-
launches:
|
|
1859
|
-
}).from(launches).innerJoin(tasks,
|
|
2045
|
+
launched: sql3`count(distinct ${launches.taskId})::int`,
|
|
2046
|
+
launches: sql3`count(*)::int`
|
|
2047
|
+
}).from(launches).innerJoin(tasks, eq3(tasks.id, launches.taskId)).where(and3(isNotNull(tasks.fromLook), isNotNull(tasks.fromFinding)));
|
|
1860
2048
|
const findings = total?.findings ?? 0;
|
|
1861
2049
|
const ordered = pairs.filter((pair) => pair.alive > 0).length;
|
|
1862
2050
|
return {
|
|
@@ -1878,10 +2066,12 @@ function readingOf(rate, recent, previous) {
|
|
|
1878
2066
|
}
|
|
1879
2067
|
async function saveModelCall(db, call) {
|
|
1880
2068
|
await db.insert(modelCalls).values({
|
|
1881
|
-
id:
|
|
2069
|
+
id: randomUUID2(),
|
|
1882
2070
|
kind: call.kind,
|
|
1883
2071
|
provider: call.provider,
|
|
1884
2072
|
model: call.model,
|
|
2073
|
+
appId: call.appId ?? null,
|
|
2074
|
+
appJobId: call.appJobId ?? null,
|
|
1885
2075
|
identity: call.identity ?? null,
|
|
1886
2076
|
inputTokens: call.input ?? null,
|
|
1887
2077
|
outputTokens: call.output ?? null,
|
|
@@ -1895,17 +2085,43 @@ async function modelSpendToday(db, kind, since = startOfDay()) {
|
|
|
1895
2085
|
const none = { calls: 0, input: 0, output: 0, unmetered: 0, images: 0 };
|
|
1896
2086
|
const kinds = typeof kind === "string" ? [kind] : kind;
|
|
1897
2087
|
if (kinds.length === 0) return none;
|
|
1898
|
-
const [row] = await db.select(SPEND).from(modelCalls).where(
|
|
2088
|
+
const [row] = await db.select(SPEND).from(modelCalls).where(and3(inArray3(modelCalls.kind, [...kinds]), gte2(modelCalls.createdAt, since)));
|
|
1899
2089
|
return row ?? none;
|
|
1900
2090
|
}
|
|
1901
|
-
async function modelSpendByKind(db, since = startOfDay()) {
|
|
1902
|
-
return db.select({ kind: modelCalls.kind, ...SPEND }).from(modelCalls).where(
|
|
2091
|
+
async function modelSpendByKind(db, since = startOfDay(), until) {
|
|
2092
|
+
return db.select({ kind: modelCalls.kind, ...SPEND }).from(modelCalls).where(inWindow(since, until)).groupBy(modelCalls.kind).orderBy(asc2(modelCalls.kind));
|
|
2093
|
+
}
|
|
2094
|
+
async function modelSpendByModel(db, since = startOfDay(), until) {
|
|
2095
|
+
return db.select({ provider: modelCalls.provider, model: modelCalls.model, ...SPEND }).from(modelCalls).where(inWindow(since, until)).groupBy(modelCalls.provider, modelCalls.model).orderBy(asc2(modelCalls.provider), asc2(modelCalls.model));
|
|
2096
|
+
}
|
|
2097
|
+
async function listModelCalls(db, options) {
|
|
2098
|
+
const rows = await db.select({
|
|
2099
|
+
kind: modelCalls.kind,
|
|
2100
|
+
provider: modelCalls.provider,
|
|
2101
|
+
model: modelCalls.model,
|
|
2102
|
+
identity: modelCalls.identity,
|
|
2103
|
+
input: modelCalls.inputTokens,
|
|
2104
|
+
output: modelCalls.outputTokens,
|
|
2105
|
+
images: modelCalls.images,
|
|
2106
|
+
createdAt: modelCalls.createdAt
|
|
2107
|
+
}).from(modelCalls).where(inWindow(options.since, options.until)).orderBy(asc2(modelCalls.createdAt), asc2(modelCalls.id)).limit(options.limit ?? 2e4);
|
|
2108
|
+
return rows;
|
|
2109
|
+
}
|
|
2110
|
+
function inWindow(since, until) {
|
|
2111
|
+
return until ? and3(gte2(modelCalls.createdAt, since), lt(modelCalls.createdAt, until)) : gte2(modelCalls.createdAt, since);
|
|
2112
|
+
}
|
|
2113
|
+
async function latestSynthesisByTopic(db) {
|
|
2114
|
+
const rows = await db.select({
|
|
2115
|
+
topic: synthesisPasses.topic,
|
|
2116
|
+
at: sql3`extract(epoch from max(${synthesisPasses.at}))::double precision`
|
|
2117
|
+
}).from(synthesisPasses).groupBy(synthesisPasses.topic);
|
|
2118
|
+
return new Map(rows.map((row) => [row.topic, row.at * 1e3]));
|
|
1903
2119
|
}
|
|
1904
2120
|
async function saveSynthesisPass(db, pass) {
|
|
1905
|
-
await db.insert(synthesisPasses).values({ id:
|
|
2121
|
+
await db.insert(synthesisPasses).values({ id: randomUUID2(), ...pass });
|
|
1906
2122
|
}
|
|
1907
2123
|
async function beliefChurn(db, since) {
|
|
1908
|
-
const rows = await db.select().from(synthesisPasses).where(
|
|
2124
|
+
const rows = await db.select().from(synthesisPasses).where(gte2(synthesisPasses.at, since)).orderBy(desc2(synthesisPasses.at));
|
|
1909
2125
|
const byMonth = /* @__PURE__ */ new Map();
|
|
1910
2126
|
for (const row of rows) {
|
|
1911
2127
|
const month = monthOf(row.at);
|
|
@@ -1927,20 +2143,20 @@ function startOfMonthsAgo(n, at = /* @__PURE__ */ new Date()) {
|
|
|
1927
2143
|
return new Date(at.getFullYear(), at.getMonth() - n, 1);
|
|
1928
2144
|
}
|
|
1929
2145
|
var SPEND = {
|
|
1930
|
-
calls:
|
|
2146
|
+
calls: sql3`count(*)::int`,
|
|
1931
2147
|
// `coalesce` about the sum and not about each row: a table without rows today sums to zero, and
|
|
1932
2148
|
// there the zero is indeed the correct answer.
|
|
1933
|
-
input:
|
|
1934
|
-
output:
|
|
1935
|
-
unmetered:
|
|
1936
|
-
images:
|
|
2149
|
+
input: sql3`coalesce(sum(input_tokens), 0)::int`,
|
|
2150
|
+
output: sql3`coalesce(sum(output_tokens), 0)::int`,
|
|
2151
|
+
unmetered: sql3`count(*) filter (where input_tokens is null)::int`,
|
|
2152
|
+
images: sql3`coalesce(sum(images), 0)::int`
|
|
1937
2153
|
};
|
|
1938
2154
|
async function inTransaction(db, run) {
|
|
1939
2155
|
return db.transaction(async (tx) => run(tx));
|
|
1940
2156
|
}
|
|
1941
2157
|
async function citedVerdictIds(db) {
|
|
1942
2158
|
const rows = await db.select({
|
|
1943
|
-
verdictId:
|
|
2159
|
+
verdictId: sql3`jsonb_array_elements(${observations.citations})->>'verdictId'`
|
|
1944
2160
|
}).from(observations);
|
|
1945
2161
|
const ids = /* @__PURE__ */ new Set();
|
|
1946
2162
|
for (const row of rows) if (row.verdictId) ids.add(row.verdictId);
|
|
@@ -1948,7 +2164,7 @@ async function citedVerdictIds(db) {
|
|
|
1948
2164
|
}
|
|
1949
2165
|
async function markVerdictsDistilled(db, ids) {
|
|
1950
2166
|
if (ids.length === 0) return;
|
|
1951
|
-
await db.update(verdicts).set({ distilledAt:
|
|
2167
|
+
await db.update(verdicts).set({ distilledAt: sql3`coalesce(${verdicts.distilledAt}, now())` }).where(inArray3(verdicts.id, ids));
|
|
1952
2168
|
}
|
|
1953
2169
|
async function readVerdictIds(db) {
|
|
1954
2170
|
const marked = await db.select({ id: verdicts.id }).from(verdicts).where(isNotNull(verdicts.distilledAt));
|
|
@@ -1958,8 +2174,8 @@ async function readVerdictIds(db) {
|
|
|
1958
2174
|
}
|
|
1959
2175
|
async function tasteReach(db) {
|
|
1960
2176
|
const [row] = await db.select({
|
|
1961
|
-
projects:
|
|
1962
|
-
reached:
|
|
2177
|
+
projects: sql3`count(*)::int`,
|
|
2178
|
+
reached: sql3`count(*) filter (where exists (
|
|
1963
2179
|
select 1 from jsonb_array_elements(coalesce(${projects.agentsMd}->'files', '[]'::jsonb)) f
|
|
1964
2180
|
where (f->>'managed')::boolean
|
|
1965
2181
|
))::int`
|
|
@@ -1967,15 +2183,27 @@ async function tasteReach(db) {
|
|
|
1967
2183
|
return { projects: row?.projects ?? 0, reached: row?.reached ?? 0 };
|
|
1968
2184
|
}
|
|
1969
2185
|
async function corpusProgress(db) {
|
|
1970
|
-
const [row] = await db.select({ total:
|
|
2186
|
+
const [row] = await db.select({ total: sql3`count(*)::int` }).from(verdicts);
|
|
1971
2187
|
const total = row?.total ?? 0;
|
|
1972
2188
|
const leidos = await readVerdictIds(db);
|
|
1973
|
-
|
|
1974
|
-
const vivos = await db.select({ id: verdicts.id }).from(verdicts);
|
|
2189
|
+
const vivos = await db.select({ id: verdicts.id, identity: verdicts.identity, accepted: verdicts.accepted }).from(verdicts);
|
|
1975
2190
|
let read = 0;
|
|
1976
|
-
|
|
1977
|
-
|
|
2191
|
+
let rejected = 0;
|
|
2192
|
+
const unreadByProject = /* @__PURE__ */ new Map();
|
|
2193
|
+
for (const row2 of vivos) {
|
|
2194
|
+
if (leidos.has(row2.id)) {
|
|
2195
|
+
read += 1;
|
|
2196
|
+
} else if (row2.accepted === false) {
|
|
2197
|
+
rejected += 1;
|
|
2198
|
+
} else {
|
|
2199
|
+
unreadByProject.set(row2.identity, (unreadByProject.get(row2.identity) ?? 0) + 1);
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
let thin = 0;
|
|
2203
|
+
for (const count of unreadByProject.values()) if (count < MIN_DISTILL_CITATIONS) thin += count;
|
|
2204
|
+
return { total: Math.max(total - thin - rejected, read), read };
|
|
1978
2205
|
}
|
|
2206
|
+
var MIN_DISTILL_CITATIONS = 2;
|
|
1979
2207
|
async function remapObservations(db) {
|
|
1980
2208
|
const rows = await db.select({
|
|
1981
2209
|
id: observations.id,
|
|
@@ -1992,7 +2220,7 @@ async function remapObservations(db) {
|
|
|
1992
2220
|
for (const id of ids) wanted.add(id);
|
|
1993
2221
|
}
|
|
1994
2222
|
if (wanted.size === 0) return 0;
|
|
1995
|
-
const verdicts2 = await db.select({ id: verdicts.id, identity: verdicts.identity }).from(verdicts).where(
|
|
2223
|
+
const verdicts2 = await db.select({ id: verdicts.id, identity: verdicts.identity }).from(verdicts).where(inArray3(verdicts.id, [...wanted]));
|
|
1996
2224
|
const identityOf = new Map(verdicts2.map((row) => [row.id, row.identity]));
|
|
1997
2225
|
let changed = 0;
|
|
1998
2226
|
for (const row of rows) {
|
|
@@ -2013,7 +2241,7 @@ async function remapObservations(db) {
|
|
|
2013
2241
|
}
|
|
2014
2242
|
}
|
|
2015
2243
|
if (best === void 0 || best === row.identity) continue;
|
|
2016
|
-
await db.update(observations).set({ identity: best }).where(
|
|
2244
|
+
await db.update(observations).set({ identity: best }).where(eq3(observations.id, row.id));
|
|
2017
2245
|
changed += 1;
|
|
2018
2246
|
}
|
|
2019
2247
|
return changed;
|
|
@@ -2038,7 +2266,7 @@ async function saveReview(db, projectId, report) {
|
|
|
2038
2266
|
await db.insert(reviews).values({ projectId, ...value }).onConflictDoUpdate({ target: reviews.projectId, set: value });
|
|
2039
2267
|
}
|
|
2040
2268
|
async function getReview(db, projectId) {
|
|
2041
|
-
const [row] = await db.select().from(reviews).where(
|
|
2269
|
+
const [row] = await db.select().from(reviews).where(eq3(reviews.projectId, projectId)).limit(1);
|
|
2042
2270
|
if (row === void 0) return void 0;
|
|
2043
2271
|
return {
|
|
2044
2272
|
findings: storedCritiques(row.findings),
|
|
@@ -2052,7 +2280,7 @@ async function neverReviewed(db, limit) {
|
|
|
2052
2280
|
id: projects.id,
|
|
2053
2281
|
root: projects.root,
|
|
2054
2282
|
lastCommitAt: projects.lastCommitAt
|
|
2055
|
-
}).from(projects).leftJoin(reviews,
|
|
2283
|
+
}).from(projects).leftJoin(reviews, eq3(reviews.projectId, projects.id)).where(isNull(reviews.projectId)).orderBy(sql3`${projects.lastCommitAt} desc nulls last`).limit(limit);
|
|
2056
2284
|
}
|
|
2057
2285
|
function storedCritiques(value) {
|
|
2058
2286
|
if (!Array.isArray(value)) return [];
|
|
@@ -2072,7 +2300,7 @@ function storedCritiques(value) {
|
|
|
2072
2300
|
return findings;
|
|
2073
2301
|
}
|
|
2074
2302
|
async function saveLook(db, look) {
|
|
2075
|
-
const id =
|
|
2303
|
+
const id = randomUUID2();
|
|
2076
2304
|
await db.insert(looks).values({
|
|
2077
2305
|
id,
|
|
2078
2306
|
identity: look.identity,
|
|
@@ -2090,12 +2318,12 @@ async function saveLook(db, look) {
|
|
|
2090
2318
|
return id;
|
|
2091
2319
|
}
|
|
2092
2320
|
async function lookedAt(db, identity, digest) {
|
|
2093
|
-
const [row] = await db.select({ id: looks.id }).from(looks).where(
|
|
2321
|
+
const [row] = await db.select({ id: looks.id }).from(looks).where(and3(eq3(looks.identity, identity), eq3(looks.digest, digest))).limit(1);
|
|
2094
2322
|
return row !== void 0;
|
|
2095
2323
|
}
|
|
2096
2324
|
async function listLooks(db, options = {}) {
|
|
2097
|
-
const query = db.select().from(looks).orderBy(
|
|
2098
|
-
const rows = options.identity ? await query.where(
|
|
2325
|
+
const query = db.select().from(looks).orderBy(desc2(looks.at)).limit(options.limit ?? 20);
|
|
2326
|
+
const rows = options.identity ? await query.where(eq3(looks.identity, options.identity)) : await query;
|
|
2099
2327
|
return rows.map((row) => ({
|
|
2100
2328
|
id: row.id,
|
|
2101
2329
|
identity: row.identity,
|
|
@@ -2113,7 +2341,7 @@ async function listLooks(db, options = {}) {
|
|
|
2113
2341
|
}));
|
|
2114
2342
|
}
|
|
2115
2343
|
async function getLook(db, id) {
|
|
2116
|
-
const [row] = await db.select().from(looks).where(
|
|
2344
|
+
const [row] = await db.select().from(looks).where(eq3(looks.id, id)).limit(1);
|
|
2117
2345
|
if (row === void 0) return void 0;
|
|
2118
2346
|
return {
|
|
2119
2347
|
id: row.id,
|
|
@@ -2137,11 +2365,11 @@ async function projectByIdentity(db, identity) {
|
|
|
2137
2365
|
name: projects.name,
|
|
2138
2366
|
slug: projects.slug,
|
|
2139
2367
|
root: projects.root
|
|
2140
|
-
}).from(projects).where(
|
|
2368
|
+
}).from(projects).where(eq3(projects.identity, identity)).orderBy(sql3`${projects.lastCommitAt} desc nulls last`, asc2(projects.root)).limit(1);
|
|
2141
2369
|
return row;
|
|
2142
2370
|
}
|
|
2143
2371
|
async function autoLooksToday(db, since = startOfDay()) {
|
|
2144
|
-
const [row] = await db.select({ n:
|
|
2372
|
+
const [row] = await db.select({ n: sql3`count(*)::int` }).from(looks).where(and3(eq3(looks.fired, "watch"), gte2(looks.at, since)));
|
|
2145
2373
|
return row?.n ?? 0;
|
|
2146
2374
|
}
|
|
2147
2375
|
function storedFindings(value) {
|
|
@@ -2159,23 +2387,53 @@ function storedFindings(value) {
|
|
|
2159
2387
|
}
|
|
2160
2388
|
return findings;
|
|
2161
2389
|
}
|
|
2390
|
+
async function getOpenContext(db, id) {
|
|
2391
|
+
const [project] = await db.select({
|
|
2392
|
+
id: projects.id,
|
|
2393
|
+
name: projects.name,
|
|
2394
|
+
slug: projects.slug,
|
|
2395
|
+
root: projects.root,
|
|
2396
|
+
identity: projects.identity,
|
|
2397
|
+
gitRemoteUrl: projects.gitRemoteUrl,
|
|
2398
|
+
runbook: projects.runbook
|
|
2399
|
+
}).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
2400
|
+
if (!project) return void 0;
|
|
2401
|
+
const [decision] = project.identity ? await db.select({ accounts: decisions.accounts, openPlan: decisions.openPlan }).from(decisions).where(eq3(decisions.identity, project.identity)).limit(1) : [];
|
|
2402
|
+
const [links, distributions2] = await Promise.all([
|
|
2403
|
+
db.select().from(projectLinks).where(eq3(projectLinks.projectId, project.id)).orderBy(projectLinks.kind, projectLinks.service),
|
|
2404
|
+
db.select().from(distributions).where(eq3(distributions.projectId, project.id))
|
|
2405
|
+
]);
|
|
2406
|
+
return { project, decision: decision ?? null, links, distributions: distributions2 };
|
|
2407
|
+
}
|
|
2408
|
+
async function saveOpenPlan(db, id, plan) {
|
|
2409
|
+
const [project] = await db.select({ identity: projects.identity, name: projects.name }).from(projects).where(eq3(projects.id, id)).limit(1);
|
|
2410
|
+
if (!project?.identity) return false;
|
|
2411
|
+
const value = { openPlan: plan, lastName: project.name };
|
|
2412
|
+
await db.insert(decisions).values({ identity: project.identity, ...value }).onConflictDoUpdate({ target: decisions.identity, set: { ...value, updatedAt: /* @__PURE__ */ new Date() } });
|
|
2413
|
+
return true;
|
|
2414
|
+
}
|
|
2162
2415
|
|
|
2163
2416
|
// src/agents.ts
|
|
2164
|
-
import { createHash as
|
|
2165
|
-
import { and as
|
|
2417
|
+
import { createHash as createHash3, randomBytes } from "crypto";
|
|
2418
|
+
import { and as and5, asc as asc4, desc as desc4, eq as eq5, inArray as inArray5, isNotNull as isNotNull2, or as or3, sql as sql5 } from "drizzle-orm";
|
|
2166
2419
|
import { agentKindAliases, canonicalAgentKind, redactSecrets as redactSecrets2 } from "@panoma/core";
|
|
2167
2420
|
|
|
2168
2421
|
// src/notes.ts
|
|
2169
|
-
import { and as
|
|
2422
|
+
import { and as and4, asc as asc3, desc as desc3, eq as eq4, inArray as inArray4, sql as sql4 } from "drizzle-orm";
|
|
2170
2423
|
import { redactSecrets } from "@panoma/core";
|
|
2171
2424
|
var NOTE_MAX = 500;
|
|
2172
2425
|
var NOTE_BUDGET = 2e3;
|
|
2173
2426
|
var NOTE_PENDING_MAX = 20;
|
|
2174
2427
|
var NOTE_SLEEPING_MAX = 30;
|
|
2175
|
-
var TRIGGER_SHAPE = /^[\p{L}\p{N}_.@-]+(?:\/[\p{L}\p{N}_.@-]+)*(?:\/\*\*)?$/u;
|
|
2176
2428
|
var TRIGGER_MAX = 120;
|
|
2429
|
+
function validMemoryPath(path) {
|
|
2430
|
+
if (!path || path.length > 2048 || path !== path.trim() || /^[A-Za-z]:/.test(path)) return false;
|
|
2431
|
+
if (path.includes("\\") || path.includes("*") || /\p{Cc}/u.test(path)) return false;
|
|
2432
|
+
return path.split("/").every((segment) => segment.trim() !== "" && segment !== "." && segment !== "..");
|
|
2433
|
+
}
|
|
2177
2434
|
function validTrigger(trigger) {
|
|
2178
|
-
|
|
2435
|
+
const path = trigger.endsWith("/**") ? trigger.slice(0, -3) : trigger;
|
|
2436
|
+
return trigger.length <= TRIGGER_MAX && validMemoryPath(path);
|
|
2179
2437
|
}
|
|
2180
2438
|
function triggerMatches(trigger, path) {
|
|
2181
2439
|
if (trigger.endsWith("/**")) {
|
|
@@ -2184,6 +2442,9 @@ function triggerMatches(trigger, path) {
|
|
|
2184
2442
|
}
|
|
2185
2443
|
return path === trigger;
|
|
2186
2444
|
}
|
|
2445
|
+
async function lockNoteProject(db, projectId) {
|
|
2446
|
+
await db.select({ id: projects.id }).from(projects).where(eq4(projects.id, projectId)).for("update");
|
|
2447
|
+
}
|
|
2187
2448
|
async function proposeNote(db, input) {
|
|
2188
2449
|
const body = redactSecrets(input.body.trim());
|
|
2189
2450
|
if (body.length === 0 || body.length > NOTE_MAX) return { refused: "tooLong", max: NOTE_MAX };
|
|
@@ -2191,53 +2452,80 @@ async function proposeNote(db, input) {
|
|
|
2191
2452
|
if (trigger !== void 0 && trigger !== "" && !validTrigger(trigger)) {
|
|
2192
2453
|
return { refused: "badTrigger" };
|
|
2193
2454
|
}
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
id
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2455
|
+
return db.transaction(async (tx) => {
|
|
2456
|
+
await lockNoteProject(tx, input.projectId);
|
|
2457
|
+
const [row] = await tx.select({ pending: sql4`count(*)::int` }).from(notes).where(and4(eq4(notes.projectId, input.projectId), eq4(notes.status, "proposed")));
|
|
2458
|
+
const pending = row?.pending ?? 0;
|
|
2459
|
+
if (pending >= NOTE_PENDING_MAX) return { refused: "pendingFull", max: NOTE_PENDING_MAX };
|
|
2460
|
+
const id = newId("note");
|
|
2461
|
+
await tx.insert(notes).values({
|
|
2462
|
+
id,
|
|
2463
|
+
projectId: input.projectId,
|
|
2464
|
+
body,
|
|
2465
|
+
createdBy: input.createdBy,
|
|
2466
|
+
trigger: trigger || null
|
|
2467
|
+
});
|
|
2468
|
+
return { id, pending: pending + 1 };
|
|
2204
2469
|
});
|
|
2205
|
-
return { id, pending: pending + 1 };
|
|
2206
2470
|
}
|
|
2207
2471
|
async function addHumanNote(db, input) {
|
|
2208
2472
|
const body = redactSecrets(input.body.trim());
|
|
2209
2473
|
if (body.length === 0 || body.length > NOTE_MAX) return { refused: "tooLong", max: NOTE_MAX };
|
|
2210
|
-
const
|
|
2211
|
-
if (
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2474
|
+
const trigger = input.trigger?.trim() || null;
|
|
2475
|
+
if (trigger !== null && !validTrigger(trigger)) return { refused: "badTrigger" };
|
|
2476
|
+
return db.transaction(async (tx) => {
|
|
2477
|
+
await lockNoteProject(tx, input.projectId);
|
|
2478
|
+
const usage = await noteUsage(tx, input.projectId);
|
|
2479
|
+
if (trigger === null && usage.used + body.length > NOTE_BUDGET) {
|
|
2480
|
+
return { refused: "overBudget", used: usage.used, budget: NOTE_BUDGET };
|
|
2481
|
+
}
|
|
2482
|
+
if (trigger !== null && usage.sleeping >= NOTE_SLEEPING_MAX) {
|
|
2483
|
+
return { refused: "sleepingFull", used: usage.sleeping, budget: NOTE_SLEEPING_MAX };
|
|
2484
|
+
}
|
|
2485
|
+
const id = newId("note");
|
|
2486
|
+
await tx.insert(notes).values({
|
|
2487
|
+
id,
|
|
2488
|
+
projectId: input.projectId,
|
|
2489
|
+
body,
|
|
2490
|
+
trigger,
|
|
2491
|
+
status: "approved",
|
|
2492
|
+
createdBy: "human",
|
|
2493
|
+
decidedAt: /* @__PURE__ */ new Date(),
|
|
2494
|
+
sentinels: input.sentinels ?? []
|
|
2495
|
+
});
|
|
2496
|
+
return { id, body };
|
|
2222
2497
|
});
|
|
2223
|
-
return { id };
|
|
2224
2498
|
}
|
|
2225
|
-
async function decideNote(db, noteId, decision) {
|
|
2499
|
+
async function decideNote(db, noteId, decision, options = {}) {
|
|
2226
2500
|
const from = decision === "approved" ? ["proposed", "challenged"] : ["proposed", "approved", "challenged"];
|
|
2227
|
-
|
|
2228
|
-
const [
|
|
2501
|
+
return db.transaction(async (tx) => {
|
|
2502
|
+
const [owner] = await tx.select({ projectId: notes.projectId }).from(notes).where(and4(
|
|
2503
|
+
eq4(notes.id, noteId),
|
|
2504
|
+
options.projectId === void 0 ? void 0 : eq4(notes.projectId, options.projectId)
|
|
2505
|
+
)).limit(1);
|
|
2506
|
+
if (!owner) return { decided: false, reason: "gone" };
|
|
2507
|
+
await lockNoteProject(tx, owner.projectId);
|
|
2508
|
+
const [note] = await tx.select({ body: notes.body, trigger: notes.trigger, decidedAt: notes.decidedAt }).from(notes).where(and4(eq4(notes.id, noteId), eq4(notes.projectId, owner.projectId), inArray4(notes.status, from))).limit(1);
|
|
2229
2509
|
if (!note) return { decided: false, reason: "gone" };
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2510
|
+
if (decision === "approved") {
|
|
2511
|
+
const usage = await noteUsage(tx, owner.projectId);
|
|
2512
|
+
if (note.trigger === null && usage.used + note.body.length > NOTE_BUDGET) {
|
|
2513
|
+
return { decided: false, reason: "overBudget", used: usage.used, budget: NOTE_BUDGET };
|
|
2514
|
+
}
|
|
2515
|
+
if (note.trigger !== null && usage.sleeping >= NOTE_SLEEPING_MAX) {
|
|
2516
|
+
return { decided: false, reason: "sleepingFull", used: usage.sleeping, budget: NOTE_SLEEPING_MAX };
|
|
2517
|
+
}
|
|
2236
2518
|
}
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2519
|
+
const decidedAt = new Date(Math.max(Date.now(), (note.decidedAt?.getTime() ?? 0) + 1));
|
|
2520
|
+
const moved = await tx.update(notes).set({
|
|
2521
|
+
status: decision,
|
|
2522
|
+
decidedAt,
|
|
2523
|
+
...decision === "approved" ? { challenge: null } : {},
|
|
2524
|
+
...decision === "approved" && options.sentinels !== void 0 ? { sentinels: options.sentinels } : {}
|
|
2525
|
+
}).where(and4(eq4(notes.id, noteId), eq4(notes.projectId, owner.projectId), inArray4(notes.status, from))).returning({ id: notes.id, body: notes.body, trigger: notes.trigger });
|
|
2526
|
+
if (moved.length === 0) return { decided: false, reason: "gone" };
|
|
2527
|
+
return decision === "approved" ? { decided: true, body: moved[0]?.body, trigger: moved[0]?.trigger ?? null } : { decided: true };
|
|
2528
|
+
});
|
|
2241
2529
|
}
|
|
2242
2530
|
async function listProjectNotes(db, projectId, statuses = ["approved"]) {
|
|
2243
2531
|
return db.select({
|
|
@@ -2251,24 +2539,22 @@ async function listProjectNotes(db, projectId, statuses = ["approved"]) {
|
|
|
2251
2539
|
The lawsuit travels with the row: the card shows the diff of the basis. It does not reach
|
|
2252
2540
|
the agents' channel — `getAgentContext` chooses its fields and this is not among them.
|
|
2253
2541
|
*/
|
|
2254
|
-
challenge: notes.challenge
|
|
2255
|
-
|
|
2542
|
+
challenge: notes.challenge,
|
|
2543
|
+
sentinels: notes.sentinels
|
|
2544
|
+
}).from(notes).where(and4(eq4(notes.projectId, projectId), inArray4(notes.status, statuses))).orderBy(desc3(notes.createdAt), asc3(notes.id));
|
|
2256
2545
|
}
|
|
2257
2546
|
async function noteUsage(db, projectId) {
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
sleeping: row?.sleeping ?? 0,
|
|
2270
|
-
pending: row?.pending ?? 0
|
|
2271
|
-
};
|
|
2547
|
+
const rows = await db.select({ body: notes.body, status: notes.status, trigger: notes.trigger }).from(notes).where(and4(eq4(notes.projectId, projectId), inArray4(notes.status, ["approved", "proposed"])));
|
|
2548
|
+
const usage = { used: 0, budget: NOTE_BUDGET, count: 0, sleeping: 0, pending: 0 };
|
|
2549
|
+
for (const row of rows) {
|
|
2550
|
+
if (row.status === "proposed") usage.pending++;
|
|
2551
|
+
else if (row.trigger !== null) usage.sleeping++;
|
|
2552
|
+
else {
|
|
2553
|
+
usage.used += row.body.length;
|
|
2554
|
+
usage.count++;
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
return usage;
|
|
2272
2558
|
}
|
|
2273
2559
|
async function notesAt(db, projectId, path) {
|
|
2274
2560
|
const sleeping = await db.select({
|
|
@@ -2279,20 +2565,24 @@ async function notesAt(db, projectId, path) {
|
|
|
2279
2565
|
createdAt: notes.createdAt,
|
|
2280
2566
|
trigger: notes.trigger
|
|
2281
2567
|
}).from(notes).where(
|
|
2282
|
-
|
|
2283
|
-
).orderBy(
|
|
2568
|
+
and4(eq4(notes.projectId, projectId), eq4(notes.status, "approved"), sql4`${notes.trigger} is not null`)
|
|
2569
|
+
).orderBy(desc3(notes.createdAt), asc3(notes.id));
|
|
2284
2570
|
return sleeping.filter((note) => note.trigger !== null && triggerMatches(note.trigger, path));
|
|
2285
2571
|
}
|
|
2286
2572
|
async function setSentinels(db, noteId, sentinels) {
|
|
2287
|
-
await db.update(notes).set({ sentinels }).where(
|
|
2288
|
-
}
|
|
2289
|
-
async function challengeNote(db, noteId, challenge) {
|
|
2290
|
-
const moved = await db.update(notes).set({ status: "challenged", challenge }).where(
|
|
2573
|
+
await db.update(notes).set({ sentinels }).where(and4(eq4(notes.id, noteId), inArray4(notes.status, ["proposed", "approved", "challenged"])));
|
|
2574
|
+
}
|
|
2575
|
+
async function challengeNote(db, noteId, challenge, expectedDecidedAt) {
|
|
2576
|
+
const moved = await db.update(notes).set({ status: "challenged", challenge }).where(and4(
|
|
2577
|
+
eq4(notes.id, noteId),
|
|
2578
|
+
eq4(notes.status, "approved"),
|
|
2579
|
+
expectedDecidedAt === void 0 ? void 0 : sql4`${notes.decidedAt} is not distinct from ${expectedDecidedAt}`
|
|
2580
|
+
)).returning({ id: notes.id });
|
|
2291
2581
|
return moved.length > 0;
|
|
2292
2582
|
}
|
|
2293
2583
|
async function listSentinels(db, projectId) {
|
|
2294
|
-
const rows = await db.select({ id: notes.id, body: notes.body, sentinels: notes.sentinels }).from(notes).where(
|
|
2295
|
-
return rows.map((row) => ({ id: row.id, body: row.body, sentinels: row.sentinels ?? [] })).filter((row) => row.sentinels.length > 0);
|
|
2584
|
+
const rows = await db.select({ id: notes.id, body: notes.body, sentinels: notes.sentinels, decidedAt: notes.decidedAt }).from(notes).where(and4(eq4(notes.projectId, projectId), eq4(notes.status, "approved")));
|
|
2585
|
+
return rows.map((row) => ({ id: row.id, body: row.body, sentinels: row.sentinels ?? [], decidedAt: row.decidedAt })).filter((row) => row.sentinels.length > 0);
|
|
2296
2586
|
}
|
|
2297
2587
|
async function recordServing(db, input) {
|
|
2298
2588
|
await db.insert(servings).values({
|
|
@@ -2300,21 +2590,22 @@ async function recordServing(db, input) {
|
|
|
2300
2590
|
projectId: input.projectId,
|
|
2301
2591
|
agentId: input.agentId,
|
|
2302
2592
|
arm: input.arm,
|
|
2593
|
+
experimentId: input.experimentId ?? null,
|
|
2303
2594
|
noteIds: input.noteIds,
|
|
2304
2595
|
noteChars: input.noteChars
|
|
2305
2596
|
});
|
|
2306
2597
|
}
|
|
2307
|
-
async function scaleReport(db, days = 30) {
|
|
2598
|
+
async function scaleReport(db, days = 30, experimentId = "memory-v1") {
|
|
2308
2599
|
const since = new Date(Date.now() - days * 864e5);
|
|
2309
2600
|
const arms = await db.select({
|
|
2310
2601
|
arm: servings.arm,
|
|
2311
|
-
servings:
|
|
2602
|
+
servings: sql4`count(*)::int`,
|
|
2312
2603
|
/*
|
|
2313
2604
|
The day in explicit UTC: the arm is distributed by UTC date, and `date_trunc` by itself
|
|
2314
2605
|
would truncate in the session zone — two different calendars counting the same unit.
|
|
2315
2606
|
*/
|
|
2316
|
-
visits:
|
|
2317
|
-
projects:
|
|
2607
|
+
visits: sql4`count(distinct (${servings.agentId} || ':' || ${servings.projectId} || ':' || ((${servings.at} at time zone 'UTC')::date)))::int`,
|
|
2608
|
+
projects: sql4`count(distinct ${servings.projectId})::int`,
|
|
2318
2609
|
/*
|
|
2319
2610
|
Qualified by hand and not with `${t.servings.at}`: drizzle emits the columns of the outer
|
|
2320
2611
|
select WITHOUT their table ("at" by itself), and inside the subquery that name is captured
|
|
@@ -2324,30 +2615,32 @@ async function scaleReport(db, days = 30) {
|
|
|
2324
2615
|
re-drawn then, and what is launched already re-drawn is the yield of that day's arm, not
|
|
2325
2616
|
of this one.
|
|
2326
2617
|
*/
|
|
2327
|
-
launchesAfter:
|
|
2618
|
+
launchesAfter: sql4`sum((
|
|
2328
2619
|
select count(*) from ${launches} l
|
|
2329
2620
|
where l.project_id = servings.project_id
|
|
2330
2621
|
and l.at > servings.at
|
|
2331
2622
|
and (l.at at time zone 'UTC')::date = (servings.at at time zone 'UTC')::date
|
|
2332
2623
|
))::int`
|
|
2333
|
-
}).from(servings).where(
|
|
2624
|
+
}).from(servings).where(and4(sql4`${servings.at} >= ${since}`, eq4(servings.experimentId, experimentId))).groupBy(servings.arm).orderBy(asc3(servings.arm));
|
|
2625
|
+
const [observational] = await db.select({ count: sql4`count(*)::int` }).from(servings).where(and4(sql4`${servings.at} >= ${since}`, sql4`${servings.experimentId} is null`));
|
|
2334
2626
|
const [gate] = await db.select({
|
|
2335
|
-
pending:
|
|
2336
|
-
oldestPendingDays:
|
|
2627
|
+
pending: sql4`count(*) filter (where ${notes.status} = 'proposed')::int`,
|
|
2628
|
+
oldestPendingDays: sql4`floor(extract(epoch from now() - min(${notes.createdAt}) filter (where ${notes.status} = 'proposed')) / 86400)::int`,
|
|
2337
2629
|
/*
|
|
2338
2630
|
`decided` requires the state in addition to the date: one approved in a window that a
|
|
2339
2631
|
sentinel later challenged keeps its decidedAt without being in any breakdown anymore, and
|
|
2340
2632
|
the report's arithmetic must balance — decided = approved + discarded.
|
|
2341
2633
|
*/
|
|
2342
|
-
decided:
|
|
2343
|
-
approved:
|
|
2344
|
-
discarded:
|
|
2345
|
-
medianHoursToDecision:
|
|
2634
|
+
decided: sql4`count(*) filter (where ${notes.decidedAt} >= ${since} and ${notes.status} in ('approved', 'discarded'))::int`,
|
|
2635
|
+
approved: sql4`count(*) filter (where ${notes.decidedAt} >= ${since} and ${notes.status} = 'approved')::int`,
|
|
2636
|
+
discarded: sql4`count(*) filter (where ${notes.decidedAt} >= ${since} and ${notes.status} = 'discarded')::int`,
|
|
2637
|
+
medianHoursToDecision: sql4`round((percentile_cont(0.5) within group (
|
|
2346
2638
|
order by extract(epoch from ${notes.decidedAt} - ${notes.createdAt})
|
|
2347
2639
|
) filter (where ${notes.decidedAt} >= ${since}) / 3600)::numeric, 1)::float`
|
|
2348
2640
|
}).from(notes);
|
|
2349
2641
|
return {
|
|
2350
2642
|
days,
|
|
2643
|
+
observationalServings: observational?.count ?? 0,
|
|
2351
2644
|
arms: arms.map((row) => ({
|
|
2352
2645
|
arm: row.arm,
|
|
2353
2646
|
servings: row.servings,
|
|
@@ -2367,14 +2660,14 @@ async function scaleReport(db, days = 30) {
|
|
|
2367
2660
|
}
|
|
2368
2661
|
async function bridgeCounts(db) {
|
|
2369
2662
|
const [row] = await db.select({
|
|
2370
|
-
activities:
|
|
2371
|
-
consultations:
|
|
2372
|
-
agentKeys:
|
|
2373
|
-
agentsConnected:
|
|
2374
|
-
approved:
|
|
2375
|
-
sleeping:
|
|
2376
|
-
pending:
|
|
2377
|
-
}).from(
|
|
2663
|
+
activities: sql4`(select count(*) from ${agentActivities})::int`,
|
|
2664
|
+
consultations: sql4`(select count(*) from ${consultations})::int`,
|
|
2665
|
+
agentKeys: sql4`(select count(*) from ${agents})::int`,
|
|
2666
|
+
agentsConnected: sql4`(select count(*) from ${agents} where last_seen_at is not null)::int`,
|
|
2667
|
+
approved: sql4`(select count(*) from ${notes} where status = 'approved' and trigger is null)::int`,
|
|
2668
|
+
sleeping: sql4`(select count(*) from ${notes} where status = 'approved' and trigger is not null)::int`,
|
|
2669
|
+
pending: sql4`(select count(*) from ${notes} where status = 'proposed')::int`
|
|
2670
|
+
}).from(sql4`(select 1) as one`);
|
|
2378
2671
|
return {
|
|
2379
2672
|
activities: row?.activities ?? 0,
|
|
2380
2673
|
consultations: row?.consultations ?? 0,
|
|
@@ -2391,7 +2684,7 @@ function newId(prefix) {
|
|
|
2391
2684
|
return `${prefix}_${randomBytes(9).toString("base64url")}`;
|
|
2392
2685
|
}
|
|
2393
2686
|
function hashKey(key) {
|
|
2394
|
-
return
|
|
2687
|
+
return createHash3("sha256").update(key).digest("hex");
|
|
2395
2688
|
}
|
|
2396
2689
|
async function createAgent(db, input) {
|
|
2397
2690
|
const apiKey = `panoma_${randomBytes(24).toString("base64url")}`;
|
|
@@ -2406,72 +2699,72 @@ async function createAgent(db, input) {
|
|
|
2406
2699
|
}
|
|
2407
2700
|
async function rotateAgentKey(db, input) {
|
|
2408
2701
|
const kind = canonicalAgentKind(input.kind);
|
|
2409
|
-
const [existing] = await db.select({ id: agents.id }).from(agents).where(
|
|
2702
|
+
const [existing] = await db.select({ id: agents.id }).from(agents).where(inArray5(agents.kind, agentKindAliases(input.kind))).orderBy(desc4(agents.createdAt)).limit(1);
|
|
2410
2703
|
if (!existing) return createAgent(db, { ...input, kind });
|
|
2411
2704
|
const apiKey = `panoma_${randomBytes(24).toString("base64url")}`;
|
|
2412
|
-
await db.update(agents).set({ name: input.name, kind, apiKeyHash: hashKey(apiKey) }).where(
|
|
2705
|
+
await db.update(agents).set({ name: input.name, kind, apiKeyHash: hashKey(apiKey) }).where(eq5(agents.id, existing.id));
|
|
2413
2706
|
return { id: existing.id, name: input.name, apiKey };
|
|
2414
2707
|
}
|
|
2415
2708
|
async function deleteAgent(db, id) {
|
|
2416
|
-
const done = await db.delete(agents).where(
|
|
2709
|
+
const done = await db.delete(agents).where(eq5(agents.id, id)).returning({ id: agents.id });
|
|
2417
2710
|
return done.length > 0;
|
|
2418
2711
|
}
|
|
2419
2712
|
async function authenticateAgent(db, apiKey) {
|
|
2420
2713
|
if (!apiKey) return void 0;
|
|
2421
|
-
const [agent] = await db.select().from(agents).where(
|
|
2714
|
+
const [agent] = await db.select().from(agents).where(eq5(agents.apiKeyHash, hashKey(apiKey))).limit(1);
|
|
2422
2715
|
if (agent) {
|
|
2423
|
-
await db.update(agents).set({ lastSeenAt: /* @__PURE__ */ new Date() }).where(
|
|
2716
|
+
await db.update(agents).set({ lastSeenAt: /* @__PURE__ */ new Date() }).where(eq5(agents.id, agent.id));
|
|
2424
2717
|
}
|
|
2425
2718
|
return agent;
|
|
2426
2719
|
}
|
|
2427
2720
|
async function resolveProject(db, hint) {
|
|
2428
2721
|
if (hint.slug) {
|
|
2429
|
-
const [bySlug] = await db.select().from(projects).where(
|
|
2722
|
+
const [bySlug] = await db.select().from(projects).where(eq5(projects.slug, hint.slug)).limit(1);
|
|
2430
2723
|
if (bySlug) return bySlug;
|
|
2431
2724
|
}
|
|
2432
2725
|
if (hint.cwd) {
|
|
2433
|
-
const [exact] = await db.select().from(projects).where(
|
|
2726
|
+
const [exact] = await db.select().from(projects).where(eq5(projects.root, hint.cwd)).limit(1);
|
|
2434
2727
|
if (exact) return exact;
|
|
2435
|
-
const [ancestor] = await db.select().from(projects).where(
|
|
2728
|
+
const [ancestor] = await db.select().from(projects).where(sql5`${hint.cwd} like ${projects.root} || '/%'`).orderBy(sql5`length(root) desc`).limit(1);
|
|
2436
2729
|
if (ancestor) return ancestor;
|
|
2437
2730
|
}
|
|
2438
2731
|
if (hint.remote) {
|
|
2439
|
-
const
|
|
2440
|
-
const [byRemote] = await db.select().from(projects).where(
|
|
2732
|
+
const normalized2 = hint.remote.replace(/\.git$/, "");
|
|
2733
|
+
const [byRemote] = await db.select().from(projects).where(eq5(projects.gitRemoteUrl, normalized2)).orderBy(sql5`last_commit_at desc nulls last`).limit(1);
|
|
2441
2734
|
if (byRemote) return byRemote;
|
|
2442
2735
|
}
|
|
2443
2736
|
return void 0;
|
|
2444
2737
|
}
|
|
2445
2738
|
var TASK_TRANSPORT_LIMIT = 200;
|
|
2446
2739
|
async function getAgentContext(db, projectId) {
|
|
2447
|
-
const [project] = await db.select().from(projects).where(
|
|
2740
|
+
const [project] = await db.select().from(projects).where(eq5(projects.id, projectId)).limit(1);
|
|
2448
2741
|
if (!project) return void 0;
|
|
2449
2742
|
const [stack, deps, security, openTasks, [taskCount], recentWork, notes2, usage] = await Promise.all([
|
|
2450
2743
|
db.select({
|
|
2451
2744
|
name: technologies.name,
|
|
2452
2745
|
kind: technologies.kind,
|
|
2453
2746
|
version: projectTechnologies.version
|
|
2454
|
-
}).from(projectTechnologies).innerJoin(technologies,
|
|
2747
|
+
}).from(projectTechnologies).innerJoin(technologies, eq5(technologies.id, projectTechnologies.technologyId)).where(eq5(projectTechnologies.projectId, projectId)).orderBy(desc4(projectTechnologies.confidence), asc4(technologies.name)),
|
|
2455
2748
|
db.select({
|
|
2456
2749
|
name: packages.name,
|
|
2457
2750
|
ecosystem: packages.ecosystem,
|
|
2458
2751
|
current: projectDependencies.resolvedVersion,
|
|
2459
2752
|
latest: packages.latestVersion,
|
|
2460
2753
|
isDev: projectDependencies.isDev
|
|
2461
|
-
}).from(projectDependencies).innerJoin(packages,
|
|
2754
|
+
}).from(projectDependencies).innerJoin(packages, eq5(packages.id, projectDependencies.packageId)).where(eq5(projectDependencies.projectId, projectId)),
|
|
2462
2755
|
db.select({
|
|
2463
2756
|
advisoryId: advisories.id,
|
|
2464
2757
|
severity: advisories.severity,
|
|
2465
2758
|
packageName: packages.name,
|
|
2466
2759
|
summary: advisories.summary,
|
|
2467
2760
|
fixedVersions: advisories.fixedVersions
|
|
2468
|
-
}).from(projectDependencies).innerJoin(packages,
|
|
2761
|
+
}).from(projectDependencies).innerJoin(packages, eq5(packages.id, projectDependencies.packageId)).innerJoin(
|
|
2469
2762
|
vulnerabilities,
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2763
|
+
and5(
|
|
2764
|
+
eq5(vulnerabilities.packageId, projectDependencies.packageId),
|
|
2765
|
+
eq5(vulnerabilities.version, projectDependencies.resolvedVersion)
|
|
2473
2766
|
)
|
|
2474
|
-
).innerJoin(advisories,
|
|
2767
|
+
).innerJoin(advisories, eq5(advisories.id, vulnerabilities.advisoryId)).where(eq5(projectDependencies.projectId, projectId)),
|
|
2475
2768
|
/*
|
|
2476
2769
|
With a cap, and with a tiebreaker that does not depend on the scheduler.
|
|
2477
2770
|
Without `limit`, a project with a thousand open tasks would send all thousand through HTTP
|
|
@@ -2479,17 +2772,17 @@ async function getAgentContext(db, projectId) {
|
|
|
2479
2772
|
ties —two tasks created in the same millisecond, which is normal when created by an agent in
|
|
2480
2773
|
a loop— in the order Postgres feels like: two identical calls returned different texts.
|
|
2481
2774
|
*/
|
|
2482
|
-
db.select({ id: tasks.id, title: tasks.title, body: tasks.body, status: tasks.status }).from(tasks).where(
|
|
2775
|
+
db.select({ id: tasks.id, title: tasks.title, body: tasks.body, status: tasks.status }).from(tasks).where(and5(eq5(tasks.projectId, projectId), inArray5(tasks.status, ["open", "in-progress"]))).orderBy(desc4(tasks.createdAt), asc4(tasks.id)).limit(TASK_TRANSPORT_LIMIT),
|
|
2483
2776
|
// The total truth, in order to be able to say '...and N more' without making it up.
|
|
2484
|
-
db.select({ n:
|
|
2485
|
-
|
|
2777
|
+
db.select({ n: sql5`count(*)::int` }).from(tasks).where(
|
|
2778
|
+
and5(eq5(tasks.projectId, projectId), inArray5(tasks.status, ["open", "in-progress"]))
|
|
2486
2779
|
),
|
|
2487
2780
|
db.select({
|
|
2488
2781
|
agent: agents.name,
|
|
2489
2782
|
kind: agentActivities.kind,
|
|
2490
2783
|
summary: agentActivities.summary,
|
|
2491
2784
|
at: agentActivities.createdAt
|
|
2492
|
-
}).from(agentActivities).innerJoin(agents,
|
|
2785
|
+
}).from(agentActivities).innerJoin(agents, eq5(agents.id, agentActivities.agentId)).where(eq5(agentActivities.projectId, projectId)).orderBy(desc4(agentActivities.createdAt), asc4(agentActivities.id)).limit(15),
|
|
2493
2786
|
// Only the awake travel alone: the asleep serve themselves on their route, not here.
|
|
2494
2787
|
listProjectNotes(db, projectId).then((all) => all.filter((note) => note.trigger === null)),
|
|
2495
2788
|
noteUsage(db, projectId)
|
|
@@ -2528,12 +2821,12 @@ async function getAgentContext(db, projectId) {
|
|
|
2528
2821
|
}
|
|
2529
2822
|
async function openSession(db, agentId, projectId) {
|
|
2530
2823
|
const [existing] = await db.select({ id: agentSessions.id }).from(agentSessions).where(
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2824
|
+
and5(
|
|
2825
|
+
eq5(agentSessions.agentId, agentId),
|
|
2826
|
+
eq5(agentSessions.projectId, projectId),
|
|
2827
|
+
sql5`ended_at is null`
|
|
2535
2828
|
)
|
|
2536
|
-
).orderBy(
|
|
2829
|
+
).orderBy(desc4(agentSessions.startedAt)).limit(1);
|
|
2537
2830
|
if (existing) return existing.id;
|
|
2538
2831
|
const id = newId("ses");
|
|
2539
2832
|
await db.insert(agentSessions).values({ id, agentId, projectId });
|
|
@@ -2567,7 +2860,7 @@ async function logActivity(db, input) {
|
|
|
2567
2860
|
return { id };
|
|
2568
2861
|
}
|
|
2569
2862
|
async function closeSession(db, sessionId, summary) {
|
|
2570
|
-
await db.update(agentSessions).set({ endedAt: /* @__PURE__ */ new Date(), summary }).where(
|
|
2863
|
+
await db.update(agentSessions).set({ endedAt: /* @__PURE__ */ new Date(), summary }).where(eq5(agentSessions.id, sessionId));
|
|
2571
2864
|
}
|
|
2572
2865
|
async function createTask(db, input) {
|
|
2573
2866
|
const id = newId("tsk");
|
|
@@ -2585,7 +2878,7 @@ async function createTask(db, input) {
|
|
|
2585
2878
|
return id;
|
|
2586
2879
|
}
|
|
2587
2880
|
async function discardTask(db, taskId) {
|
|
2588
|
-
const updated = await db.update(tasks).set({ status: "discarded" }).where(
|
|
2881
|
+
const updated = await db.update(tasks).set({ status: "discarded" }).where(and5(eq5(tasks.id, taskId), inArray5(tasks.status, ["open", "in-progress"]))).returning({ id: tasks.id });
|
|
2589
2882
|
return updated.length > 0;
|
|
2590
2883
|
}
|
|
2591
2884
|
async function listProjectLaunches(db, projectId) {
|
|
@@ -2596,14 +2889,14 @@ async function listProjectLaunches(db, projectId) {
|
|
|
2596
2889
|
kind: launches.kind,
|
|
2597
2890
|
taskId: launches.taskId,
|
|
2598
2891
|
taskTitle: tasks.title
|
|
2599
|
-
}).from(launches).leftJoin(tasks,
|
|
2892
|
+
}).from(launches).leftJoin(tasks, eq5(tasks.id, launches.taskId)).where(eq5(launches.projectId, projectId)).orderBy(desc4(launches.at)).limit(50);
|
|
2600
2893
|
}
|
|
2601
2894
|
async function discardedFindings(db) {
|
|
2602
2895
|
const rows = await db.select({
|
|
2603
2896
|
fromLook: tasks.fromLook,
|
|
2604
2897
|
fromFinding: tasks.fromFinding,
|
|
2605
2898
|
status: tasks.status
|
|
2606
|
-
}).from(tasks).where(
|
|
2899
|
+
}).from(tasks).where(and5(isNotNull2(tasks.fromLook), isNotNull2(tasks.fromFinding))).orderBy(desc4(tasks.createdAt), desc4(tasks.id));
|
|
2607
2900
|
return ultimaPalabra(
|
|
2608
2901
|
rows.map((row) => ({
|
|
2609
2902
|
key: row.fromLook !== null && row.fromFinding !== null ? `${row.fromLook} ${row.fromFinding}` : null,
|
|
@@ -2630,7 +2923,7 @@ async function getTask(db, id) {
|
|
|
2630
2923
|
projectId: tasks.projectId,
|
|
2631
2924
|
projectSlug: projects.slug,
|
|
2632
2925
|
projectRoot: projects.root
|
|
2633
|
-
}).from(tasks).innerJoin(projects,
|
|
2926
|
+
}).from(tasks).innerJoin(projects, eq5(projects.id, tasks.projectId)).where(eq5(tasks.id, id)).limit(1);
|
|
2634
2927
|
return row;
|
|
2635
2928
|
}
|
|
2636
2929
|
async function assignedFindings(db) {
|
|
@@ -2639,9 +2932,9 @@ async function assignedFindings(db) {
|
|
|
2639
2932
|
fromLook: tasks.fromLook,
|
|
2640
2933
|
fromFinding: tasks.fromFinding
|
|
2641
2934
|
}).from(tasks).where(
|
|
2642
|
-
|
|
2935
|
+
and5(
|
|
2643
2936
|
isNotNull2(tasks.fromLook),
|
|
2644
|
-
|
|
2937
|
+
inArray5(tasks.status, ["open", "in-progress"])
|
|
2645
2938
|
)
|
|
2646
2939
|
);
|
|
2647
2940
|
const byFinding = /* @__PURE__ */ new Map();
|
|
@@ -2671,10 +2964,10 @@ async function launchedTasks(db) {
|
|
|
2671
2964
|
}
|
|
2672
2965
|
async function assignedCritiques(db, projectId) {
|
|
2673
2966
|
const rows = await db.select({ id: tasks.id, key: tasks.fromCritique }).from(tasks).where(
|
|
2674
|
-
|
|
2675
|
-
|
|
2967
|
+
and5(
|
|
2968
|
+
eq5(tasks.projectId, projectId),
|
|
2676
2969
|
isNotNull2(tasks.fromCritique),
|
|
2677
|
-
|
|
2970
|
+
inArray5(tasks.status, ["open", "in-progress"])
|
|
2678
2971
|
)
|
|
2679
2972
|
);
|
|
2680
2973
|
const byKey = /* @__PURE__ */ new Map();
|
|
@@ -2682,19 +2975,19 @@ async function assignedCritiques(db, projectId) {
|
|
|
2682
2975
|
return byKey;
|
|
2683
2976
|
}
|
|
2684
2977
|
async function discardedCritiques(db, projectId) {
|
|
2685
|
-
const rows = await db.select({ key: tasks.fromCritique, status: tasks.status }).from(tasks).where(
|
|
2978
|
+
const rows = await db.select({ key: tasks.fromCritique, status: tasks.status }).from(tasks).where(and5(eq5(tasks.projectId, projectId), isNotNull2(tasks.fromCritique))).orderBy(desc4(tasks.createdAt), desc4(tasks.id));
|
|
2686
2979
|
return ultimaPalabra(rows);
|
|
2687
2980
|
}
|
|
2688
2981
|
async function claimTask(db, taskId, agentId) {
|
|
2689
|
-
const updated = await db.update(tasks).set({ status: "in-progress", assignedAgentId: agentId, claimedAt: /* @__PURE__ */ new Date() }).where(
|
|
2982
|
+
const updated = await db.update(tasks).set({ status: "in-progress", assignedAgentId: agentId, claimedAt: /* @__PURE__ */ new Date() }).where(and5(eq5(tasks.id, taskId), eq5(tasks.status, "open"))).returning({ id: tasks.id });
|
|
2690
2983
|
return updated.length > 0;
|
|
2691
2984
|
}
|
|
2692
2985
|
async function completeTask(db, taskId, agentId, result) {
|
|
2693
2986
|
const updated = await db.update(tasks).set({ status: "done", completedAt: /* @__PURE__ */ new Date(), result }).where(
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
or3(
|
|
2987
|
+
and5(
|
|
2988
|
+
eq5(tasks.id, taskId),
|
|
2989
|
+
inArray5(tasks.status, ["open", "in-progress"]),
|
|
2990
|
+
or3(eq5(tasks.assignedAgentId, agentId), sql5`assigned_agent_id is null`)
|
|
2698
2991
|
)
|
|
2699
2992
|
).returning({ id: tasks.id });
|
|
2700
2993
|
return updated.length > 0;
|
|
@@ -2710,35 +3003,91 @@ async function listProjectActivity(db, projectId) {
|
|
|
2710
3003
|
agentName: agents.name,
|
|
2711
3004
|
agentKind: agents.kind,
|
|
2712
3005
|
sessionId: agentActivities.sessionId
|
|
2713
|
-
}).from(agentActivities).innerJoin(agents,
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
|
|
3006
|
+
}).from(agentActivities).innerJoin(agents, eq5(agents.id, agentActivities.agentId)).where(eq5(agentActivities.projectId, projectId)).orderBy(desc4(agentActivities.createdAt)).limit(100);
|
|
3007
|
+
}
|
|
3008
|
+
var JOURNAL_PAGE_SIZE = 12;
|
|
3009
|
+
var JOURNAL_ENTRY_CHARS = 4e3;
|
|
3010
|
+
var MATCH_START = "[[[panoma-match]]]";
|
|
3011
|
+
var MATCH_END = "[[[/panoma-match]]]";
|
|
3012
|
+
function boundedHeadline(headline) {
|
|
3013
|
+
const first = headline.indexOf(MATCH_START);
|
|
3014
|
+
const plain = headline.replaceAll(MATCH_START, "").replaceAll(MATCH_END, "");
|
|
3015
|
+
if (plain.length <= 1200) return plain;
|
|
3016
|
+
const start = Math.max(0, first - 100);
|
|
3017
|
+
const end = Math.min(plain.length, start + 1200);
|
|
3018
|
+
return `${start > 0 ? "\u2026" : ""}${plain.slice(start, end)}${end < plain.length ? "\u2026" : ""}`;
|
|
3019
|
+
}
|
|
3020
|
+
async function journalMatches(db, projectId, query, limit, position) {
|
|
3021
|
+
const rows = await db.select({
|
|
3022
|
+
id: agentActivities.id,
|
|
3023
|
+
agent: agents.name,
|
|
2717
3024
|
kind: agentActivities.kind,
|
|
2718
3025
|
summary: agentActivities.summary,
|
|
2719
3026
|
details: agentActivities.details,
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
3027
|
+
at: agentActivities.createdAt,
|
|
3028
|
+
positionAt: sql5`to_char(${agentActivities.createdAt} at time zone 'UTC', 'YYYY-MM-DD"T"HH24:MI:SS.US"Z"')`,
|
|
3029
|
+
headline: sql5`ts_headline('simple',
|
|
3030
|
+
replace(replace(${agentActivities.summary} || E'\n\n' || coalesce(${agentActivities.details}, ''), ${MATCH_START}, ''), ${MATCH_END}, ''),
|
|
3031
|
+
websearch_to_tsquery('simple', ${query}),
|
|
3032
|
+
'StartSel=[[[panoma-match]]],StopSel=[[[/panoma-match]]],MaxWords=50,MinWords=15,MaxFragments=1')`
|
|
3033
|
+
}).from(agentActivities).innerJoin(agents, eq5(agents.id, agentActivities.agentId)).where(and5(
|
|
3034
|
+
eq5(agentActivities.projectId, projectId),
|
|
3035
|
+
sql5`to_tsvector('simple', ${agentActivities.summary} || ' ' || coalesce(${agentActivities.details}, '')) @@ websearch_to_tsquery('simple', ${query})`,
|
|
3036
|
+
position === void 0 ? void 0 : sql5`(${agentActivities.createdAt} < ${position.at}::timestamptz or (${agentActivities.createdAt} = ${position.at}::timestamptz and ${agentActivities.id} > ${position.id}))`
|
|
3037
|
+
)).orderBy(desc4(agentActivities.createdAt), asc4(agentActivities.id)).limit(limit);
|
|
3038
|
+
return rows.map(({ headline, ...row }) => ({ ...row, excerpt: boundedHeadline(headline) }));
|
|
2723
3039
|
}
|
|
2724
3040
|
async function searchJournal(db, projectId, query, limit = 12) {
|
|
2725
3041
|
const clean = query.trim();
|
|
2726
3042
|
if (clean === "") return [];
|
|
2727
|
-
return db
|
|
3043
|
+
return journalMatches(db, projectId, clean, limit);
|
|
3044
|
+
}
|
|
3045
|
+
async function searchJournalPage(db, projectId, query, cursor) {
|
|
3046
|
+
const clean = query.trim();
|
|
3047
|
+
let position;
|
|
3048
|
+
if (cursor !== void 0) {
|
|
3049
|
+
try {
|
|
3050
|
+
if (cursor.length > 4096 || !/^[A-Za-z0-9_-]+$/.test(cursor)) throw new Error();
|
|
3051
|
+
const saved = JSON.parse(Buffer.from(cursor, "base64url").toString("utf8"));
|
|
3052
|
+
if (saved["projectId"] !== projectId || saved["query"] !== clean || typeof saved["at"] !== "string" || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z$/.test(saved["at"]) || !Number.isFinite(Date.parse(saved["at"])) || typeof saved["id"] !== "string" || !/^[A-Za-z0-9_-]{1,128}$/.test(saved["id"])) throw new Error();
|
|
3053
|
+
position = { at: saved["at"], id: saved["id"] };
|
|
3054
|
+
} catch {
|
|
3055
|
+
throw new RangeError("Invalid journal cursor. Repeat the search without a cursor.");
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
if (clean === "") return { matches: [], nextCursor: null };
|
|
3059
|
+
const rows = await journalMatches(db, projectId, clean, JOURNAL_PAGE_SIZE + 1, position);
|
|
3060
|
+
const page = rows.slice(0, JOURNAL_PAGE_SIZE);
|
|
3061
|
+
const last = page.at(-1);
|
|
3062
|
+
const nextCursor = rows.length > JOURNAL_PAGE_SIZE && last ? Buffer.from(JSON.stringify({
|
|
3063
|
+
projectId,
|
|
3064
|
+
query: clean,
|
|
3065
|
+
at: last.positionAt,
|
|
3066
|
+
id: last.id
|
|
3067
|
+
})).toString("base64url") : null;
|
|
3068
|
+
return { matches: page, nextCursor };
|
|
3069
|
+
}
|
|
3070
|
+
async function readJournalEntry(db, projectId, entryId, offset = 0) {
|
|
3071
|
+
if (!Number.isSafeInteger(offset) || offset < 0) throw new RangeError("Journal offset must be a non-negative integer.");
|
|
3072
|
+
const [entry] = await db.select({
|
|
3073
|
+
id: agentActivities.id,
|
|
2728
3074
|
agent: agents.name,
|
|
2729
3075
|
kind: agentActivities.kind,
|
|
2730
3076
|
summary: agentActivities.summary,
|
|
2731
3077
|
details: agentActivities.details,
|
|
2732
3078
|
at: agentActivities.createdAt
|
|
2733
|
-
}).from(agentActivities).innerJoin(agents,
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
3079
|
+
}).from(agentActivities).innerJoin(agents, eq5(agents.id, agentActivities.agentId)).where(and5(eq5(agentActivities.projectId, projectId), eq5(agentActivities.id, entryId))).limit(1);
|
|
3080
|
+
if (!entry) return void 0;
|
|
3081
|
+
const original = `${entry.summary}${entry.details ? `
|
|
3082
|
+
|
|
3083
|
+
${entry.details}` : ""}`;
|
|
3084
|
+
if (offset > original.length) throw new RangeError("Journal offset is past the end of this entry.");
|
|
3085
|
+
const end = Math.min(original.length, offset + JOURNAL_ENTRY_CHARS);
|
|
3086
|
+
const { details: _details, ...metadata } = entry;
|
|
3087
|
+
return { ...metadata, text: original.slice(offset, end), offset, totalChars: original.length, nextOffset: end < original.length ? end : null };
|
|
2739
3088
|
}
|
|
2740
3089
|
async function listProjectTasks(db, projectId, statuses) {
|
|
2741
|
-
const suyas =
|
|
3090
|
+
const suyas = eq5(tasks.projectId, projectId);
|
|
2742
3091
|
return db.select({
|
|
2743
3092
|
id: tasks.id,
|
|
2744
3093
|
title: tasks.title,
|
|
@@ -2748,7 +3097,7 @@ async function listProjectTasks(db, projectId, statuses) {
|
|
|
2748
3097
|
createdBy: tasks.createdBy,
|
|
2749
3098
|
createdAt: tasks.createdAt,
|
|
2750
3099
|
agentName: agents.name
|
|
2751
|
-
}).from(tasks).leftJoin(agents,
|
|
3100
|
+
}).from(tasks).leftJoin(agents, eq5(agents.id, tasks.assignedAgentId)).where(statuses === void 0 ? suyas : and5(suyas, inArray5(tasks.status, statuses))).orderBy(desc4(tasks.createdAt));
|
|
2752
3101
|
}
|
|
2753
3102
|
async function listAllActivity(db, limit = 200) {
|
|
2754
3103
|
return db.select({
|
|
@@ -2759,7 +3108,7 @@ async function listAllActivity(db, limit = 200) {
|
|
|
2759
3108
|
agentName: agents.name,
|
|
2760
3109
|
projectName: projects.name,
|
|
2761
3110
|
projectSlug: projects.slug
|
|
2762
|
-
}).from(agentActivities).innerJoin(agents,
|
|
3111
|
+
}).from(agentActivities).innerJoin(agents, eq5(agents.id, agentActivities.agentId)).innerJoin(projects, eq5(projects.id, agentActivities.projectId)).orderBy(desc4(agentActivities.createdAt)).limit(limit);
|
|
2763
3112
|
}
|
|
2764
3113
|
async function listAgents(db) {
|
|
2765
3114
|
return db.select({
|
|
@@ -2768,40 +3117,28 @@ async function listAgents(db) {
|
|
|
2768
3117
|
kind: agents.kind,
|
|
2769
3118
|
createdAt: agents.createdAt,
|
|
2770
3119
|
lastSeenAt: agents.lastSeenAt,
|
|
2771
|
-
activities:
|
|
3120
|
+
activities: sql5`(
|
|
2772
3121
|
select count(*)::int from agent_activities aa where aa.agent_id = agents.id
|
|
2773
3122
|
)`,
|
|
2774
|
-
projects:
|
|
3123
|
+
projects: sql5`(
|
|
2775
3124
|
select count(distinct aa.project_id)::int from agent_activities aa
|
|
2776
3125
|
where aa.agent_id = agents.id
|
|
2777
3126
|
)`
|
|
2778
|
-
}).from(agents).orderBy(
|
|
3127
|
+
}).from(agents).orderBy(desc4(agents.lastSeenAt));
|
|
2779
3128
|
}
|
|
2780
3129
|
|
|
2781
3130
|
// src/consultations.ts
|
|
2782
|
-
import { and as
|
|
3131
|
+
import { and as and6, asc as asc5, desc as desc5, eq as eq6, isNull as isNull2, or as or4, sql as sql6 } from "drizzle-orm";
|
|
2783
3132
|
import { redactSecrets as redactSecrets3 } from "@panoma/core";
|
|
2784
3133
|
var CONSULT_MAX = 300;
|
|
2785
3134
|
var CONSULT_PENDING_MAX = 20;
|
|
3135
|
+
var STALE_MAX_DAYS = 30;
|
|
2786
3136
|
async function recordConsultation(db, input) {
|
|
2787
3137
|
const question = redactSecrets3(input.question.trim());
|
|
2788
3138
|
if (question.length === 0 || question.length > CONSULT_MAX) {
|
|
2789
3139
|
return { refused: "tooLong", max: CONSULT_MAX };
|
|
2790
3140
|
}
|
|
2791
|
-
const
|
|
2792
|
-
and5(
|
|
2793
|
-
eq5(consultations.projectId, input.projectId),
|
|
2794
|
-
isNull2(consultations.verdict),
|
|
2795
|
-
or4(
|
|
2796
|
-
eq5(consultations.status, "drafted"),
|
|
2797
|
-
and5(
|
|
2798
|
-
eq5(consultations.status, "drafting"),
|
|
2799
|
-
sql5`${consultations.createdAt} > now() - interval '24 hours'`
|
|
2800
|
-
)
|
|
2801
|
-
)
|
|
2802
|
-
)
|
|
2803
|
-
);
|
|
2804
|
-
const pending = row?.pending ?? 0;
|
|
3141
|
+
const pending = await pendingConsultations(db, input.projectId);
|
|
2805
3142
|
if (pending >= CONSULT_PENDING_MAX) return { refused: "queueFull", max: CONSULT_PENDING_MAX };
|
|
2806
3143
|
const id = newId("ask");
|
|
2807
3144
|
await db.insert(consultations).values({
|
|
@@ -2812,30 +3149,53 @@ async function recordConsultation(db, input) {
|
|
|
2812
3149
|
});
|
|
2813
3150
|
return { id, pending: pending + 1 };
|
|
2814
3151
|
}
|
|
3152
|
+
async function pendingConsultations(db, projectId) {
|
|
3153
|
+
const [row] = await db.select({ pending: sql6`count(*)::int` }).from(consultations).where(
|
|
3154
|
+
and6(
|
|
3155
|
+
eq6(consultations.projectId, projectId),
|
|
3156
|
+
isNull2(consultations.verdict),
|
|
3157
|
+
or4(
|
|
3158
|
+
eq6(consultations.status, "drafted"),
|
|
3159
|
+
and6(
|
|
3160
|
+
eq6(consultations.status, "drafting"),
|
|
3161
|
+
sql6`${consultations.createdAt} > now() - interval '24 hours'`
|
|
3162
|
+
)
|
|
3163
|
+
)
|
|
3164
|
+
)
|
|
3165
|
+
);
|
|
3166
|
+
return row?.pending ?? 0;
|
|
3167
|
+
}
|
|
2815
3168
|
async function draftConsultation(db, id, draft) {
|
|
2816
3169
|
const fields = "abstained" in draft ? { status: "abstained", draftedAt: /* @__PURE__ */ new Date() } : { status: "drafted", answer: draft.answer, beliefIds: draft.beliefIds, draftedAt: /* @__PURE__ */ new Date() };
|
|
2817
|
-
const moved = await db.update(consultations).set(fields).where(
|
|
3170
|
+
const moved = await db.update(consultations).set(fields).where(and6(eq6(consultations.id, id), eq6(consultations.status, "drafting"))).returning({ id: consultations.id });
|
|
2818
3171
|
return moved.length > 0;
|
|
2819
3172
|
}
|
|
2820
|
-
async function labelConsultation(db, id, verdict) {
|
|
3173
|
+
async function labelConsultation(db, id, verdict, projectId) {
|
|
2821
3174
|
const moved = await db.update(consultations).set({ verdict, verdictAt: /* @__PURE__ */ new Date() }).where(
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
isNull2(consultations.verdict)
|
|
3175
|
+
and6(
|
|
3176
|
+
eq6(consultations.id, id),
|
|
3177
|
+
eq6(consultations.status, "drafted"),
|
|
3178
|
+
isNull2(consultations.verdict),
|
|
3179
|
+
...projectId === void 0 ? [] : [eq6(consultations.projectId, projectId)]
|
|
2826
3180
|
)
|
|
2827
3181
|
).returning({ id: consultations.id });
|
|
2828
3182
|
return moved.length > 0;
|
|
2829
3183
|
}
|
|
2830
|
-
async function
|
|
3184
|
+
async function draftingConsultation(db, id) {
|
|
3185
|
+
const [row] = await db.select({ question: consultations.question }).from(consultations).where(and6(eq6(consultations.id, id), eq6(consultations.status, "drafting"))).limit(1);
|
|
3186
|
+
return row;
|
|
3187
|
+
}
|
|
3188
|
+
async function staleDrafting(db, projectId, olderThanMs = 10 * 6e4, limit = 5, withinMs = STALE_MAX_DAYS * 864e5) {
|
|
2831
3189
|
const cutoff = new Date(Date.now() - olderThanMs);
|
|
3190
|
+
const since = new Date(Date.now() - withinMs);
|
|
2832
3191
|
return db.select({ id: consultations.id, question: consultations.question }).from(consultations).where(
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
3192
|
+
and6(
|
|
3193
|
+
eq6(consultations.projectId, projectId),
|
|
3194
|
+
eq6(consultations.status, "drafting"),
|
|
3195
|
+
sql6`${consultations.createdAt} < ${cutoff}`,
|
|
3196
|
+
sql6`${consultations.createdAt} >= ${since}`
|
|
2837
3197
|
)
|
|
2838
|
-
).orderBy(
|
|
3198
|
+
).orderBy(asc5(consultations.createdAt)).limit(limit);
|
|
2839
3199
|
}
|
|
2840
3200
|
async function listProjectConsultations(db, projectId, limit = 20) {
|
|
2841
3201
|
const rows = await db.select({
|
|
@@ -2847,19 +3207,19 @@ async function listProjectConsultations(db, projectId, limit = 20) {
|
|
|
2847
3207
|
verdict: consultations.verdict,
|
|
2848
3208
|
agent: agents.name,
|
|
2849
3209
|
createdAt: consultations.createdAt
|
|
2850
|
-
}).from(consultations).innerJoin(agents,
|
|
3210
|
+
}).from(consultations).innerJoin(agents, eq6(agents.id, consultations.agentId)).where(eq6(consultations.projectId, projectId)).orderBy(desc5(consultations.createdAt), asc5(consultations.id)).limit(limit);
|
|
2851
3211
|
return rows.map((row) => ({ ...row, beliefIds: row.beliefIds ?? [] }));
|
|
2852
3212
|
}
|
|
2853
|
-
async function doubleReport(db, days =
|
|
3213
|
+
async function doubleReport(db, days = STALE_MAX_DAYS) {
|
|
2854
3214
|
const since = new Date(Date.now() - days * 864e5);
|
|
2855
3215
|
const [row] = await db.select({
|
|
2856
|
-
questions:
|
|
2857
|
-
drafted:
|
|
2858
|
-
abstained:
|
|
2859
|
-
labeled:
|
|
2860
|
-
backed:
|
|
2861
|
-
vetoed:
|
|
2862
|
-
}).from(consultations).where(
|
|
3216
|
+
questions: sql6`count(*)::int`,
|
|
3217
|
+
drafted: sql6`count(*) filter (where ${consultations.status} = 'drafted')::int`,
|
|
3218
|
+
abstained: sql6`count(*) filter (where ${consultations.status} = 'abstained')::int`,
|
|
3219
|
+
labeled: sql6`count(*) filter (where ${consultations.verdict} is not null)::int`,
|
|
3220
|
+
backed: sql6`count(*) filter (where ${consultations.verdict} = 'backed')::int`,
|
|
3221
|
+
vetoed: sql6`count(*) filter (where ${consultations.verdict} = 'vetoed')::int`
|
|
3222
|
+
}).from(consultations).where(sql6`${consultations.createdAt} >= ${since}`);
|
|
2863
3223
|
const drafted = row?.drafted ?? 0;
|
|
2864
3224
|
const abstained = row?.abstained ?? 0;
|
|
2865
3225
|
const labeled = row?.labeled ?? 0;
|
|
@@ -2877,8 +3237,611 @@ async function doubleReport(db, days = 30) {
|
|
|
2877
3237
|
};
|
|
2878
3238
|
}
|
|
2879
3239
|
|
|
3240
|
+
// src/episodes.ts
|
|
3241
|
+
import { redactSecrets as redactSecrets4 } from "@panoma/core";
|
|
3242
|
+
import { and as and7, asc as asc6, desc as desc6, eq as eq7, getTableColumns, inArray as inArray6, isNull as isNull3, sql as sql7 } from "drizzle-orm";
|
|
3243
|
+
var EPISODE_FIELDS = [
|
|
3244
|
+
"context",
|
|
3245
|
+
"goal",
|
|
3246
|
+
"constraints",
|
|
3247
|
+
"alternatives",
|
|
3248
|
+
"decision",
|
|
3249
|
+
"rationale",
|
|
3250
|
+
"outcome",
|
|
3251
|
+
"conditions",
|
|
3252
|
+
"exceptions"
|
|
3253
|
+
];
|
|
3254
|
+
var CHUNK = 500;
|
|
3255
|
+
var DecisionEpisodeConflict = class extends Error {
|
|
3256
|
+
constructor(code) {
|
|
3257
|
+
super(code === "stale" ? "The decision episode changed since it was read." : "Another version of this decision is active.");
|
|
3258
|
+
this.code = code;
|
|
3259
|
+
this.name = "DecisionEpisodeConflict";
|
|
3260
|
+
}
|
|
3261
|
+
code;
|
|
3262
|
+
};
|
|
3263
|
+
async function episodeWrite(db, work) {
|
|
3264
|
+
return db.transaction(async (tx) => {
|
|
3265
|
+
await tx.execute(sql7`lock table ${decisionEpisodes} in share row exclusive mode`);
|
|
3266
|
+
return work(tx);
|
|
3267
|
+
});
|
|
3268
|
+
}
|
|
3269
|
+
async function saveNarratives(db, rows) {
|
|
3270
|
+
const unique = /* @__PURE__ */ new Map();
|
|
3271
|
+
for (const row of rows) {
|
|
3272
|
+
const clean = { ...row, text: redactSecrets4(row.text.trim()), context: row.context === null ? null : redactSecrets4(row.context) };
|
|
3273
|
+
if (!clean.text || !clean.identity || !clean.source || !clean.sessionId || !Number.isFinite(clean.at.getTime())) {
|
|
3274
|
+
throw new Error("Narratives require human text, a project identity, a source, a session and a valid date.");
|
|
3275
|
+
}
|
|
3276
|
+
const id = idFor(JSON.stringify([clean.source, clean.sessionId, clean.at.toISOString(), clean.text]));
|
|
3277
|
+
unique.set(id, clean);
|
|
3278
|
+
}
|
|
3279
|
+
const values = [...unique].map(([id, row]) => ({ id, ...row }));
|
|
3280
|
+
let inserted = 0;
|
|
3281
|
+
for (let offset = 0; offset < values.length; offset += CHUNK) {
|
|
3282
|
+
const chunk = values.slice(offset, offset + CHUNK);
|
|
3283
|
+
const saved = await db.insert(narratives).values(chunk).onConflictDoNothing().returning({ id: narratives.id });
|
|
3284
|
+
inserted += saved.length;
|
|
3285
|
+
const insertedIds = new Set(saved.map((row) => row.id));
|
|
3286
|
+
const existing = chunk.filter((row) => !insertedIds.has(row.id));
|
|
3287
|
+
if (existing.length === 0) continue;
|
|
3288
|
+
const stored = await narrativesByIds(db, existing.map((row) => row.id));
|
|
3289
|
+
const identities = new Map(stored.map((row) => [row.id, row.identity]));
|
|
3290
|
+
const remaps = /* @__PURE__ */ new Map();
|
|
3291
|
+
for (const row of existing) {
|
|
3292
|
+
if (identities.get(row.id) === row.identity) continue;
|
|
3293
|
+
const ids = remaps.get(row.identity) ?? [];
|
|
3294
|
+
ids.push(row.id);
|
|
3295
|
+
remaps.set(row.identity, ids);
|
|
3296
|
+
}
|
|
3297
|
+
for (const [identity, ids] of remaps) {
|
|
3298
|
+
await db.update(narratives).set({ identity, readAt: null }).where(inArray6(narratives.id, ids));
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
return { inserted };
|
|
3302
|
+
}
|
|
3303
|
+
async function listNarratives(db, options = {}) {
|
|
3304
|
+
const query = db.select().from(narratives).where(and7(
|
|
3305
|
+
options.identity === void 0 ? void 0 : eq7(narratives.identity, options.identity),
|
|
3306
|
+
options.unread ? isNull3(narratives.readAt) : void 0
|
|
3307
|
+
)).orderBy(
|
|
3308
|
+
...options.unread ? [sql7`${narratives.failedAt} asc nulls first`] : [],
|
|
3309
|
+
desc6(narratives.at),
|
|
3310
|
+
asc6(narratives.id)
|
|
3311
|
+
);
|
|
3312
|
+
return options.limit === void 0 ? query : query.limit(options.limit);
|
|
3313
|
+
}
|
|
3314
|
+
async function narrativesByIds(db, ids) {
|
|
3315
|
+
const unique = [...new Set(ids)];
|
|
3316
|
+
const rows = [];
|
|
3317
|
+
for (let offset = 0; offset < unique.length; offset += CHUNK) {
|
|
3318
|
+
rows.push(...await db.select().from(narratives).where(inArray6(narratives.id, unique.slice(offset, offset + CHUNK))));
|
|
3319
|
+
}
|
|
3320
|
+
return rows.sort((a, b) => b.at.getTime() - a.at.getTime() || a.id.localeCompare(b.id));
|
|
3321
|
+
}
|
|
3322
|
+
async function narrativeCount(db) {
|
|
3323
|
+
const [row] = await db.select({
|
|
3324
|
+
total: sql7`count(*)::int`,
|
|
3325
|
+
pending: sql7`count(*) filter (where ${narratives.readAt} is null)::int`,
|
|
3326
|
+
deferred: sql7`count(*) filter (where ${narratives.readAt} is null and ${narratives.failedAt} is not null)::int`
|
|
3327
|
+
}).from(narratives);
|
|
3328
|
+
return row ?? { total: 0, pending: 0, deferred: 0 };
|
|
3329
|
+
}
|
|
3330
|
+
async function markNarrativesFailed(db, ids) {
|
|
3331
|
+
let marked = 0;
|
|
3332
|
+
const unique = [...new Set(ids)];
|
|
3333
|
+
for (let offset = 0; offset < unique.length; offset += CHUNK) {
|
|
3334
|
+
const rows = await db.update(narratives).set({ failedAt: /* @__PURE__ */ new Date() }).where(and7(
|
|
3335
|
+
inArray6(narratives.id, unique.slice(offset, offset + CHUNK)),
|
|
3336
|
+
isNull3(narratives.readAt)
|
|
3337
|
+
)).returning({ id: narratives.id });
|
|
3338
|
+
marked += rows.length;
|
|
3339
|
+
}
|
|
3340
|
+
return marked;
|
|
3341
|
+
}
|
|
3342
|
+
async function deleteNarratives(db, options = {}) {
|
|
3343
|
+
const episodes = await db.delete(decisionEpisodes).where(and7(
|
|
3344
|
+
eq7(decisionEpisodes.origin, "history"),
|
|
3345
|
+
options.source === void 0 ? void 0 : sql7`exists (
|
|
3346
|
+
select 1 from jsonb_each(${decisionEpisodes.fields}) as field(name, evidence)
|
|
3347
|
+
inner join ${narratives} on ${narratives.id} = field.evidence->>'narrativeId'
|
|
3348
|
+
where ${narratives.source} = ${options.source}
|
|
3349
|
+
)`
|
|
3350
|
+
)).returning({ id: decisionEpisodes.id });
|
|
3351
|
+
const narratives2 = await db.delete(narratives).where(
|
|
3352
|
+
options.source === void 0 ? void 0 : eq7(narratives.source, options.source)
|
|
3353
|
+
).returning({ id: narratives.id });
|
|
3354
|
+
return { narratives: narratives2.length, episodes: episodes.length };
|
|
3355
|
+
}
|
|
3356
|
+
async function markNarrativesRead(db, ids, expectedIdentity) {
|
|
3357
|
+
let marked = 0;
|
|
3358
|
+
const unique = [...new Set(ids)];
|
|
3359
|
+
for (let offset = 0; offset < unique.length; offset += CHUNK) {
|
|
3360
|
+
const rows = await db.update(narratives).set({ readAt: /* @__PURE__ */ new Date() }).where(and7(
|
|
3361
|
+
inArray6(narratives.id, unique.slice(offset, offset + CHUNK)),
|
|
3362
|
+
isNull3(narratives.readAt),
|
|
3363
|
+
expectedIdentity === void 0 ? void 0 : eq7(narratives.identity, expectedIdentity)
|
|
3364
|
+
)).returning({ id: narratives.id });
|
|
3365
|
+
marked += rows.length;
|
|
3366
|
+
}
|
|
3367
|
+
return marked;
|
|
3368
|
+
}
|
|
3369
|
+
function cleanFields(input) {
|
|
3370
|
+
const fields = {};
|
|
3371
|
+
for (const name of Object.keys(input.fields)) {
|
|
3372
|
+
if (!EPISODE_FIELDS.includes(name)) throw new Error("Unknown decision episode field.");
|
|
3373
|
+
}
|
|
3374
|
+
for (const name of EPISODE_FIELDS) {
|
|
3375
|
+
const field = input.fields[name];
|
|
3376
|
+
if (!field) continue;
|
|
3377
|
+
const text = redactSecrets4(field.text.trim());
|
|
3378
|
+
if (!text) throw new Error("Decision episode fields must contain text.");
|
|
3379
|
+
if (input.origin === "owner" && field.narrativeId !== void 0) {
|
|
3380
|
+
throw new Error("Owner-authored episodes cannot claim extracted narrative evidence.");
|
|
3381
|
+
}
|
|
3382
|
+
if (input.origin === "history" && !field.narrativeId) {
|
|
3383
|
+
throw new Error("Every extracted field must cite its human narrative.");
|
|
3384
|
+
}
|
|
3385
|
+
fields[name] = field.narrativeId ? { text, narrativeId: field.narrativeId } : { text };
|
|
3386
|
+
}
|
|
3387
|
+
if (Object.keys(fields).length === 0) throw new Error("A decision episode must contain at least one field.");
|
|
3388
|
+
return fields;
|
|
3389
|
+
}
|
|
3390
|
+
function normalized(text) {
|
|
3391
|
+
return text.normalize("NFC").replace(/\s+/g, " ").trim().toLowerCase();
|
|
3392
|
+
}
|
|
3393
|
+
function episodeId(row) {
|
|
3394
|
+
const fields = EPISODE_FIELDS.flatMap((name) => {
|
|
3395
|
+
const field = row.fields[name];
|
|
3396
|
+
return field ? [[name, row.origin === "owner" ? normalized(field.text) : field.text, field.narrativeId ?? null]] : [];
|
|
3397
|
+
});
|
|
3398
|
+
return idFor(JSON.stringify([row.origin, row.origin === "owner" ? row.identity : null, row.supersedesId ?? null, fields]));
|
|
3399
|
+
}
|
|
3400
|
+
async function saveDecisionEpisodes(db, rows, options = {}) {
|
|
3401
|
+
if (rows.length === 0) return [];
|
|
3402
|
+
return episodeWrite(db, (tx) => saveEpisodesLocked(tx, rows, options));
|
|
3403
|
+
}
|
|
3404
|
+
async function saveEpisodesLocked(db, rows, options) {
|
|
3405
|
+
const unique = /* @__PURE__ */ new Map();
|
|
3406
|
+
for (const input of rows) {
|
|
3407
|
+
if (input.origin !== "owner" && input.origin !== "history") throw new Error("Unknown decision episode origin.");
|
|
3408
|
+
if (input.origin === "owner" && input.model !== null) throw new Error("Owner-authored episodes cannot have a model attribution.");
|
|
3409
|
+
if (input.origin === "history" && (!input.identity || !input.model?.trim())) {
|
|
3410
|
+
throw new Error("Extracted episodes require a project identity and a model attribution.");
|
|
3411
|
+
}
|
|
3412
|
+
if (input.validUntil !== void 0 && input.validUntil !== null && !Number.isFinite(input.validUntil.getTime())) {
|
|
3413
|
+
throw new Error("A decision episode expiry must be a valid instant.");
|
|
3414
|
+
}
|
|
3415
|
+
if (input.supersedesId !== void 0 && input.supersedesId !== null) {
|
|
3416
|
+
if (input.origin !== "owner") throw new Error("Only an owner-authored episode can revise a previous decision.");
|
|
3417
|
+
const previous = await decisionEpisodeById(db, input.supersedesId);
|
|
3418
|
+
if (!previous || previous.identity !== input.identity) throw new Error("A revision must reference an existing episode in the same project scope.");
|
|
3419
|
+
}
|
|
3420
|
+
const row = { ...input, fields: cleanFields(input) };
|
|
3421
|
+
unique.set(episodeId(row), row);
|
|
3422
|
+
}
|
|
3423
|
+
const narrativeIds = [...unique.values()].flatMap((row) => Object.values(row.fields).flatMap((field) => field.narrativeId ? [field.narrativeId] : []));
|
|
3424
|
+
const evidence = new Map((await narrativesByIds(db, narrativeIds)).map((row) => [row.id, row]));
|
|
3425
|
+
for (const row of unique.values()) {
|
|
3426
|
+
if (row.origin !== "history") continue;
|
|
3427
|
+
for (const field of Object.values(row.fields)) {
|
|
3428
|
+
const narrative = evidence.get(field.narrativeId);
|
|
3429
|
+
if (!narrative || narrative.identity !== row.identity || !narrative.text.includes(field.text)) {
|
|
3430
|
+
throw new Error("Extracted fields must quote an existing human narrative from the same project.");
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
}
|
|
3434
|
+
const saved = [];
|
|
3435
|
+
for (const [id, row] of unique) {
|
|
3436
|
+
const existing = await decisionEpisodeById(db, id);
|
|
3437
|
+
if (existing) {
|
|
3438
|
+
saved.push(existing);
|
|
3439
|
+
continue;
|
|
3440
|
+
}
|
|
3441
|
+
if (row.supersedesId) {
|
|
3442
|
+
const previous = await decisionEpisodeById(db, row.supersedesId);
|
|
3443
|
+
if (options.expectedPreviousUpdatedAt && previous?.updatedAt.getTime() !== options.expectedPreviousUpdatedAt.getTime()) {
|
|
3444
|
+
throw new DecisionEpisodeConflict("stale");
|
|
3445
|
+
}
|
|
3446
|
+
if (await activeSuccessor(db, row.supersedesId)) throw new DecisionEpisodeConflict("activeSuccessor");
|
|
3447
|
+
}
|
|
3448
|
+
const [inserted] = await db.insert(decisionEpisodes).values({ id, ...row }).onConflictDoNothing().returning();
|
|
3449
|
+
if (inserted) {
|
|
3450
|
+
if (row.supersedesId) {
|
|
3451
|
+
await db.update(decisionEpisodes).set({ status: "dismissed", updatedAt: sql7`greatest(current_timestamp, ${decisionEpisodes.updatedAt} + interval '1 millisecond')` }).where(eq7(decisionEpisodes.id, row.supersedesId));
|
|
3452
|
+
}
|
|
3453
|
+
saved.push(asEpisode(inserted));
|
|
3454
|
+
continue;
|
|
3455
|
+
}
|
|
3456
|
+
if (row.origin === "history") {
|
|
3457
|
+
await db.update(decisionEpisodes).set({ identity: row.identity, updatedAt: /* @__PURE__ */ new Date() }).where(and7(
|
|
3458
|
+
eq7(decisionEpisodes.id, id),
|
|
3459
|
+
sql7`${decisionEpisodes.identity} is distinct from ${row.identity}`
|
|
3460
|
+
));
|
|
3461
|
+
}
|
|
3462
|
+
const replayed = await decisionEpisodeById(db, id);
|
|
3463
|
+
if (replayed) saved.push(replayed);
|
|
3464
|
+
}
|
|
3465
|
+
return saved;
|
|
3466
|
+
}
|
|
3467
|
+
function asEpisode(row) {
|
|
3468
|
+
return { ...row, fields: row.fields };
|
|
3469
|
+
}
|
|
3470
|
+
function validEvidence(columns = decisionEpisodes) {
|
|
3471
|
+
return sql7`(${columns.origin} = 'owner' or not exists (
|
|
3472
|
+
select 1 from jsonb_each(${columns.fields}) as field(name, evidence)
|
|
3473
|
+
left join ${narratives} on ${narratives.id} = field.evidence->>'narrativeId'
|
|
3474
|
+
where ${narratives.id} is null
|
|
3475
|
+
or ${narratives.identity} is distinct from ${columns.identity}
|
|
3476
|
+
))`;
|
|
3477
|
+
}
|
|
3478
|
+
var CANDIDATE = { origin: sql7`candidate.origin`, fields: sql7`candidate.fields`, identity: sql7`candidate.identity` };
|
|
3479
|
+
function competingActive() {
|
|
3480
|
+
return sql7`exists (
|
|
3481
|
+
select 1 from decision_episodes candidate
|
|
3482
|
+
where candidate.id in (${familyIds(sql7`decision_episodes.id`)})
|
|
3483
|
+
and candidate.id <> decision_episodes.id and candidate.status = 'active'
|
|
3484
|
+
and ${validEvidence(CANDIDATE)}
|
|
3485
|
+
)`;
|
|
3486
|
+
}
|
|
3487
|
+
var CREATED_MS = sql7`date_trunc('milliseconds', ${decisionEpisodes.createdAt})`;
|
|
3488
|
+
var SEARCHED_FIELDS = ["goal", "decision", "rationale", "conditions", "exceptions", "context"];
|
|
3489
|
+
async function listDecisionEpisodes(db, options = {}) {
|
|
3490
|
+
const needle = options.query?.trim() ?? "";
|
|
3491
|
+
const pattern = `%${needle.replace(/[\\%_]/g, (char) => `\\${char}`)}%`;
|
|
3492
|
+
const query = db.select().from(decisionEpisodes).where(and7(
|
|
3493
|
+
validEvidence(),
|
|
3494
|
+
options.identity === void 0 ? void 0 : options.identity === null ? isNull3(decisionEpisodes.identity) : eq7(decisionEpisodes.identity, options.identity),
|
|
3495
|
+
options.status === void 0 ? void 0 : eq7(decisionEpisodes.status, options.status),
|
|
3496
|
+
// Legacy conflicting families remain inspectable by the owner, but cannot supply authority.
|
|
3497
|
+
options.unambiguousOnly ? sql7`not ${competingActive()}` : void 0,
|
|
3498
|
+
// The stored instant is the boundary and not the last valid moment: reaching it is expiring.
|
|
3499
|
+
// That is why a day is stored at 23:59:59.999 — the decision covers the whole of its last day.
|
|
3500
|
+
options.activeAt === void 0 ? void 0 : sql7`(${decisionEpisodes.validUntil} is null
|
|
3501
|
+
or ${decisionEpisodes.validUntil} > ${options.activeAt.toISOString()}::timestamptz)`,
|
|
3502
|
+
options.ownerDecisionsOnly ? and7(
|
|
3503
|
+
eq7(decisionEpisodes.origin, "owner"),
|
|
3504
|
+
sql7`nullif(btrim(${decisionEpisodes.fields}->'decision'->>'text'), '') is not null`
|
|
3505
|
+
) : void 0,
|
|
3506
|
+
needle === "" ? void 0 : sql7`concat_ws(' ', ${sql7.join(
|
|
3507
|
+
SEARCHED_FIELDS.map((name) => sql7`coalesce(${decisionEpisodes.fields}->${sql7.raw(`'${name}'`)}->>'text', '')`),
|
|
3508
|
+
sql7`, `
|
|
3509
|
+
)}) ilike ${pattern} escape '\\'`,
|
|
3510
|
+
options.before === void 0 ? void 0 : sql7`(${CREATED_MS} < ${options.before.createdAt.toISOString()}::timestamptz
|
|
3511
|
+
or (${CREATED_MS} = ${options.before.createdAt.toISOString()}::timestamptz and ${decisionEpisodes.id} > ${options.before.id}))`
|
|
3512
|
+
)).orderBy(sql7`${CREATED_MS} desc`, asc6(decisionEpisodes.id));
|
|
3513
|
+
const rows = await (options.limit === void 0 ? query : query.limit(options.limit));
|
|
3514
|
+
return rows.map(asEpisode);
|
|
3515
|
+
}
|
|
3516
|
+
async function listConflictingEpisodeFamilies(db) {
|
|
3517
|
+
const rows = await db.select({
|
|
3518
|
+
...getTableColumns(decisionEpisodes),
|
|
3519
|
+
members: sql7`(
|
|
3520
|
+
select string_agg(candidate.id, ',' order by candidate.created_at desc, candidate.id asc)
|
|
3521
|
+
from decision_episodes candidate
|
|
3522
|
+
where candidate.id in (${familyIds(sql7`decision_episodes.id`)})
|
|
3523
|
+
and candidate.status = 'active'
|
|
3524
|
+
and ${validEvidence(CANDIDATE)}
|
|
3525
|
+
)`
|
|
3526
|
+
}).from(decisionEpisodes).where(and7(
|
|
3527
|
+
eq7(decisionEpisodes.status, "active"),
|
|
3528
|
+
validEvidence(),
|
|
3529
|
+
competingActive()
|
|
3530
|
+
)).orderBy(sql7`${CREATED_MS} desc`, asc6(decisionEpisodes.id));
|
|
3531
|
+
const families2 = /* @__PURE__ */ new Map();
|
|
3532
|
+
for (const { members, ...row } of rows) {
|
|
3533
|
+
const family = families2.get(members) ?? [];
|
|
3534
|
+
family.push(asEpisode(row));
|
|
3535
|
+
families2.set(members, family);
|
|
3536
|
+
}
|
|
3537
|
+
return [...families2.values()];
|
|
3538
|
+
}
|
|
3539
|
+
async function decisionEpisodeById(db, id) {
|
|
3540
|
+
const [row] = await db.select().from(decisionEpisodes).where(and7(eq7(decisionEpisodes.id, id), validEvidence())).limit(1);
|
|
3541
|
+
return row ? asEpisode(row) : void 0;
|
|
3542
|
+
}
|
|
3543
|
+
function familyIds(id) {
|
|
3544
|
+
return sql7`with recursive family(id) as (
|
|
3545
|
+
select ${id}::text
|
|
3546
|
+
union
|
|
3547
|
+
select case when edge.id = family.id then edge.supersedes_id else edge.id end
|
|
3548
|
+
from decision_episodes edge inner join family
|
|
3549
|
+
on edge.id = family.id or edge.supersedes_id = family.id
|
|
3550
|
+
where case when edge.id = family.id then edge.supersedes_id else edge.id end is not null
|
|
3551
|
+
) select id from family`;
|
|
3552
|
+
}
|
|
3553
|
+
async function activeSuccessor(db, id) {
|
|
3554
|
+
const [row] = await db.select().from(decisionEpisodes).where(and7(
|
|
3555
|
+
sql7`${decisionEpisodes.id} in (${familyIds(id)})`,
|
|
3556
|
+
sql7`${decisionEpisodes.id} <> ${id}`,
|
|
3557
|
+
eq7(decisionEpisodes.status, "active"),
|
|
3558
|
+
validEvidence()
|
|
3559
|
+
)).orderBy(desc6(decisionEpisodes.createdAt), asc6(decisionEpisodes.id)).limit(1);
|
|
3560
|
+
return row ? asEpisode(row) : void 0;
|
|
3561
|
+
}
|
|
3562
|
+
async function activeEpisodeRevisions(db, ids) {
|
|
3563
|
+
const revisions = {};
|
|
3564
|
+
const unique = [...new Set(ids)];
|
|
3565
|
+
for (let offset = 0; offset < unique.length; offset += CHUNK) {
|
|
3566
|
+
const rows = await db.select({ id: decisionEpisodes.id, activeId: sql7`(
|
|
3567
|
+
select candidate.id from decision_episodes candidate
|
|
3568
|
+
where candidate.id in (${familyIds(sql7`decision_episodes.id`)})
|
|
3569
|
+
and candidate.id <> decision_episodes.id and candidate.status = 'active'
|
|
3570
|
+
and ${validEvidence(CANDIDATE)}
|
|
3571
|
+
order by candidate.created_at desc, candidate.id asc limit 1
|
|
3572
|
+
)` }).from(decisionEpisodes).where(inArray6(decisionEpisodes.id, unique.slice(offset, offset + CHUNK)));
|
|
3573
|
+
for (const row of rows) if (row.activeId) revisions[row.id] = row.activeId;
|
|
3574
|
+
}
|
|
3575
|
+
return revisions;
|
|
3576
|
+
}
|
|
3577
|
+
async function decisionEpisodeCount(db) {
|
|
3578
|
+
const [row] = await db.select({ count: sql7`count(*)::int` }).from(decisionEpisodes).where(and7(eq7(decisionEpisodes.status, "active"), validEvidence()));
|
|
3579
|
+
return row?.count ?? 0;
|
|
3580
|
+
}
|
|
3581
|
+
async function setDecisionEpisodeStatus(db, id, status, options = {}) {
|
|
3582
|
+
if (status !== "active" && status !== "dismissed") throw new Error("Unknown decision episode status.");
|
|
3583
|
+
return episodeWrite(db, async (tx) => {
|
|
3584
|
+
const existing = await decisionEpisodeById(tx, id);
|
|
3585
|
+
if (!existing || existing.status === status) return false;
|
|
3586
|
+
if (options.expectedUpdatedAt && existing.updatedAt.getTime() !== options.expectedUpdatedAt.getTime()) {
|
|
3587
|
+
throw new DecisionEpisodeConflict("stale");
|
|
3588
|
+
}
|
|
3589
|
+
if (status === "active" && await activeSuccessor(tx, id)) throw new DecisionEpisodeConflict("activeSuccessor");
|
|
3590
|
+
const rows = await tx.update(decisionEpisodes).set({ status, updatedAt: sql7`greatest(current_timestamp, ${decisionEpisodes.updatedAt} + interval '1 millisecond')` }).where(and7(
|
|
3591
|
+
eq7(decisionEpisodes.id, id),
|
|
3592
|
+
validEvidence(),
|
|
3593
|
+
eq7(decisionEpisodes.status, existing.status)
|
|
3594
|
+
)).returning({ id: decisionEpisodes.id });
|
|
3595
|
+
return rows.length > 0;
|
|
3596
|
+
});
|
|
3597
|
+
}
|
|
3598
|
+
async function setDecisionEpisodeValidUntil(db, id, validUntil, options = {}) {
|
|
3599
|
+
if (validUntil !== null && !Number.isFinite(validUntil.getTime())) throw new Error("A decision episode expiry must be a valid instant.");
|
|
3600
|
+
return episodeWrite(db, async (tx) => {
|
|
3601
|
+
const existing = await decisionEpisodeById(tx, id);
|
|
3602
|
+
if (!existing) return false;
|
|
3603
|
+
const stored = existing.validUntil ? existing.validUntil.getTime() : null;
|
|
3604
|
+
if (stored === (validUntil ? validUntil.getTime() : null)) return false;
|
|
3605
|
+
if (options.expectedUpdatedAt && existing.updatedAt.getTime() !== options.expectedUpdatedAt.getTime()) {
|
|
3606
|
+
throw new DecisionEpisodeConflict("stale");
|
|
3607
|
+
}
|
|
3608
|
+
const rows = await tx.update(decisionEpisodes).set({ validUntil, updatedAt: sql7`greatest(current_timestamp, ${decisionEpisodes.updatedAt} + interval '1 millisecond')` }).where(and7(
|
|
3609
|
+
eq7(decisionEpisodes.id, id),
|
|
3610
|
+
validEvidence()
|
|
3611
|
+
)).returning({ id: decisionEpisodes.id });
|
|
3612
|
+
return rows.length > 0;
|
|
3613
|
+
});
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3616
|
+
// src/memory-jobs.ts
|
|
3617
|
+
import { randomUUID as randomUUID3 } from "crypto";
|
|
3618
|
+
import { and as and8, asc as asc7, desc as desc7, eq as eq8, isNotNull as isNotNull3, lte, sql as sql8 } from "drizzle-orm";
|
|
3619
|
+
var MEMORY_JOB_MAX_ATTEMPTS = 3;
|
|
3620
|
+
var MEMORY_JOB_LEASE_MS = 5 * 6e4;
|
|
3621
|
+
var MEMORY_SESSION_WINDOW = 100;
|
|
3622
|
+
async function enqueueMemoryJob(db, sessionId) {
|
|
3623
|
+
const [session] = await db.select({ id: agentSessions.id }).from(agentSessions).where(and8(eq8(agentSessions.id, sessionId), isNotNull3(agentSessions.endedAt))).limit(1);
|
|
3624
|
+
if (!session) return false;
|
|
3625
|
+
const inserted = await db.insert(memoryJobs).values({ sessionId }).onConflictDoNothing().returning({ sessionId: memoryJobs.sessionId });
|
|
3626
|
+
return inserted.length > 0;
|
|
3627
|
+
}
|
|
3628
|
+
async function claimMemoryJob(db, options = {}) {
|
|
3629
|
+
const now = options.now ?? /* @__PURE__ */ new Date();
|
|
3630
|
+
const leaseMs = options.leaseMs ?? MEMORY_JOB_LEASE_MS;
|
|
3631
|
+
if (!Number.isFinite(now.getTime()) || !Number.isFinite(leaseMs) || leaseMs < 1) throw new Error("Invalid memory job lease.");
|
|
3632
|
+
const expiredBefore = new Date(now.getTime() - leaseMs);
|
|
3633
|
+
return db.transaction(async (tx) => {
|
|
3634
|
+
await tx.execute(sql8`lock table ${memoryJobs} in share row exclusive mode`);
|
|
3635
|
+
await tx.update(memoryJobs).set({ status: "failed", reason: "leaseExpired", leaseToken: null, finishedAt: now }).where(and8(
|
|
3636
|
+
eq8(memoryJobs.status, "running"),
|
|
3637
|
+
lte(memoryJobs.startedAt, expiredBefore),
|
|
3638
|
+
sql8`${memoryJobs.attempts} >= ${MEMORY_JOB_MAX_ATTEMPTS}`
|
|
3639
|
+
));
|
|
3640
|
+
const [job] = await tx.select({
|
|
3641
|
+
sessionId: memoryJobs.sessionId,
|
|
3642
|
+
attempts: memoryJobs.attempts,
|
|
3643
|
+
projectId: agentSessions.projectId,
|
|
3644
|
+
identity: projects.identity,
|
|
3645
|
+
root: projects.root
|
|
3646
|
+
}).from(memoryJobs).innerJoin(agentSessions, eq8(agentSessions.id, memoryJobs.sessionId)).innerJoin(projects, eq8(projects.id, agentSessions.projectId)).where(and8(
|
|
3647
|
+
isNotNull3(agentSessions.endedAt),
|
|
3648
|
+
sql8`${memoryJobs.attempts} < ${MEMORY_JOB_MAX_ATTEMPTS}`,
|
|
3649
|
+
sql8`(( ${memoryJobs.status} in ('pending', 'deferred', 'failed') and ${memoryJobs.availableAt} <= ${now})
|
|
3650
|
+
or (${memoryJobs.status} = 'running' and ${memoryJobs.startedAt} <= ${expiredBefore}))`
|
|
3651
|
+
)).orderBy(asc7(memoryJobs.availableAt), asc7(memoryJobs.createdAt), asc7(memoryJobs.sessionId)).limit(1);
|
|
3652
|
+
if (!job) return void 0;
|
|
3653
|
+
const leaseToken = randomUUID3();
|
|
3654
|
+
await tx.update(memoryJobs).set({
|
|
3655
|
+
status: "running",
|
|
3656
|
+
attempts: job.attempts + 1,
|
|
3657
|
+
startedAt: now,
|
|
3658
|
+
finishedAt: null,
|
|
3659
|
+
leaseToken,
|
|
3660
|
+
reason: null
|
|
3661
|
+
}).where(eq8(memoryJobs.sessionId, job.sessionId));
|
|
3662
|
+
return { ...job, attempts: job.attempts + 1, leaseToken };
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3665
|
+
async function withMemoryJobLease(db, sessionId, leaseToken, work, expectedProjectId) {
|
|
3666
|
+
return db.transaction(async (tx) => {
|
|
3667
|
+
const [job] = await tx.select({ sessionId: memoryJobs.sessionId }).from(memoryJobs).innerJoin(agentSessions, eq8(agentSessions.id, memoryJobs.sessionId)).where(and8(
|
|
3668
|
+
eq8(memoryJobs.sessionId, sessionId),
|
|
3669
|
+
eq8(memoryJobs.status, "running"),
|
|
3670
|
+
eq8(memoryJobs.leaseToken, leaseToken),
|
|
3671
|
+
expectedProjectId === void 0 ? void 0 : eq8(agentSessions.projectId, expectedProjectId)
|
|
3672
|
+
)).for("update");
|
|
3673
|
+
if (!job) return { current: false };
|
|
3674
|
+
return { current: true, value: await work(tx) };
|
|
3675
|
+
});
|
|
3676
|
+
}
|
|
3677
|
+
async function finishMemoryJob(db, sessionId, leaseToken, result) {
|
|
3678
|
+
if (!["complete", "deferred", "failed"].includes(result.status)) throw new Error("Invalid memory job result.");
|
|
3679
|
+
if (result.consumeAttempt === false && result.status !== "deferred") throw new Error("Only deferred work can refund an attempt.");
|
|
3680
|
+
if (result.retriesLeft !== void 0 && (result.status !== "failed" || result.consumeAttempt === false)) throw new Error("Only failed work can cap its retries.");
|
|
3681
|
+
if (result.retriesLeft !== void 0 && (!Number.isInteger(result.retriesLeft) || result.retriesLeft < 0 || result.retriesLeft >= MEMORY_JOB_MAX_ATTEMPTS)) throw new Error("Memory job retries must fit under the attempt ceiling.");
|
|
3682
|
+
if (result.runAfter && !Number.isFinite(result.runAfter.getTime())) throw new Error("Invalid memory retry date.");
|
|
3683
|
+
if (result.reason && !/^[a-zA-Z][a-zA-Z0-9_-]{0,79}$/.test(result.reason)) throw new Error("Memory job reasons must be bounded codes.");
|
|
3684
|
+
const now = /* @__PURE__ */ new Date();
|
|
3685
|
+
const rows = await db.update(memoryJobs).set({
|
|
3686
|
+
status: result.status,
|
|
3687
|
+
reason: result.reason ?? null,
|
|
3688
|
+
finishedAt: now,
|
|
3689
|
+
leaseToken: null,
|
|
3690
|
+
...result.receipt === void 0 ? {} : { receipt: result.receipt },
|
|
3691
|
+
...result.consumeAttempt === false ? { attempts: sql8`greatest(0, ${memoryJobs.attempts} - 1)` } : {},
|
|
3692
|
+
...result.retriesLeft === void 0 ? {} : { attempts: sql8`greatest(${memoryJobs.attempts}, ${MEMORY_JOB_MAX_ATTEMPTS - result.retriesLeft})` },
|
|
3693
|
+
availableAt: result.runAfter ?? sql8`${now}::timestamptz + (interval '1 minute' * power(2, greatest(0, ${memoryJobs.attempts} - 1)))`
|
|
3694
|
+
}).where(and8(eq8(memoryJobs.sessionId, sessionId), eq8(memoryJobs.status, "running"), eq8(memoryJobs.leaseToken, leaseToken))).returning({ sessionId: memoryJobs.sessionId });
|
|
3695
|
+
return rows.length > 0;
|
|
3696
|
+
}
|
|
3697
|
+
async function memoryJobCounts(db, projectId) {
|
|
3698
|
+
const [counts] = await db.select({
|
|
3699
|
+
pending: sql8`count(*) filter (where ${memoryJobs.status} = 'pending')::int`,
|
|
3700
|
+
running: sql8`count(*) filter (where ${memoryJobs.status} = 'running')::int`,
|
|
3701
|
+
deferred: sql8`count(*) filter (where ${memoryJobs.status} = 'deferred')::int`,
|
|
3702
|
+
failed: sql8`count(*) filter (where ${memoryJobs.status} = 'failed')::int`,
|
|
3703
|
+
complete: sql8`count(*) filter (where ${memoryJobs.status} = 'complete')::int`
|
|
3704
|
+
}).from(memoryJobs).innerJoin(agentSessions, eq8(agentSessions.id, memoryJobs.sessionId)).where(projectId === void 0 ? void 0 : eq8(agentSessions.projectId, projectId));
|
|
3705
|
+
return counts ?? { pending: 0, running: 0, deferred: 0, failed: 0, complete: 0 };
|
|
3706
|
+
}
|
|
3707
|
+
async function latestProjectMemoryJob(db, projectId) {
|
|
3708
|
+
const [job] = await db.select({
|
|
3709
|
+
sessionId: memoryJobs.sessionId,
|
|
3710
|
+
status: memoryJobs.status,
|
|
3711
|
+
reason: memoryJobs.reason,
|
|
3712
|
+
attempts: memoryJobs.attempts,
|
|
3713
|
+
receipt: memoryJobs.receipt,
|
|
3714
|
+
availableAt: memoryJobs.availableAt,
|
|
3715
|
+
finishedAt: memoryJobs.finishedAt
|
|
3716
|
+
}).from(memoryJobs).innerJoin(agentSessions, eq8(agentSessions.id, memoryJobs.sessionId)).where(eq8(agentSessions.projectId, projectId)).orderBy(desc7(memoryJobs.createdAt), desc7(memoryJobs.sessionId)).limit(1);
|
|
3717
|
+
return job;
|
|
3718
|
+
}
|
|
3719
|
+
async function sessionMemoryWindow(db, sessionId) {
|
|
3720
|
+
const rows = await db.select({
|
|
3721
|
+
total: sql8`(count(*) over ())::int`,
|
|
3722
|
+
kind: agentActivities.kind,
|
|
3723
|
+
summary: agentActivities.summary,
|
|
3724
|
+
details: agentActivities.details,
|
|
3725
|
+
filesTouched: agentActivities.filesTouched
|
|
3726
|
+
}).from(agentActivities).where(eq8(agentActivities.sessionId, sessionId)).orderBy(desc7(agentActivities.createdAt), desc7(agentActivities.id)).limit(MEMORY_SESSION_WINDOW);
|
|
3727
|
+
const total = rows[0]?.total ?? 0;
|
|
3728
|
+
return {
|
|
3729
|
+
activities: rows.reverse().map(({ kind, summary, details, filesTouched }) => ({ kind, summary, details, filesTouched })),
|
|
3730
|
+
total,
|
|
3731
|
+
omitted: Math.max(0, total - rows.length)
|
|
3732
|
+
};
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
// src/memory-export.ts
|
|
3736
|
+
import { asc as asc8, desc as desc8, eq as eq9, isNull as isNull4, sql as sql9 } from "drizzle-orm";
|
|
3737
|
+
var MEMORY_EXPORT_VERSION = 1;
|
|
3738
|
+
function iso(date) {
|
|
3739
|
+
return date ? date.toISOString() : null;
|
|
3740
|
+
}
|
|
3741
|
+
async function decisionsOf(db, identity) {
|
|
3742
|
+
const rows = await db.select({
|
|
3743
|
+
id: decisionEpisodes.id,
|
|
3744
|
+
identity: decisionEpisodes.identity,
|
|
3745
|
+
supersedesId: decisionEpisodes.supersedesId,
|
|
3746
|
+
origin: decisionEpisodes.origin,
|
|
3747
|
+
fields: decisionEpisodes.fields,
|
|
3748
|
+
model: decisionEpisodes.model,
|
|
3749
|
+
status: decisionEpisodes.status,
|
|
3750
|
+
validUntil: decisionEpisodes.validUntil,
|
|
3751
|
+
createdAt: decisionEpisodes.createdAt,
|
|
3752
|
+
updatedAt: decisionEpisodes.updatedAt,
|
|
3753
|
+
evidenceValid: sql9`(${decisionEpisodes.origin} = 'owner' or not exists (
|
|
3754
|
+
select 1 from jsonb_each(${decisionEpisodes.fields}) as field(name, evidence)
|
|
3755
|
+
left join ${narratives} on ${narratives.id} = field.evidence->>'narrativeId'
|
|
3756
|
+
where ${narratives.id} is null
|
|
3757
|
+
or ${narratives.identity} is distinct from ${decisionEpisodes.identity}
|
|
3758
|
+
))`
|
|
3759
|
+
}).from(decisionEpisodes).where(identity === null ? isNull4(decisionEpisodes.identity) : eq9(decisionEpisodes.identity, identity)).orderBy(desc8(decisionEpisodes.createdAt), asc8(decisionEpisodes.id));
|
|
3760
|
+
const revisions = await activeEpisodeRevisions(db, rows.map((row) => row.id));
|
|
3761
|
+
return rows.map((row) => ({
|
|
3762
|
+
id: row.id,
|
|
3763
|
+
identity: row.identity,
|
|
3764
|
+
supersedesId: row.supersedesId,
|
|
3765
|
+
activeRevisionId: revisions[row.id] ?? null,
|
|
3766
|
+
evidenceValid: row.evidenceValid,
|
|
3767
|
+
origin: row.origin,
|
|
3768
|
+
fields: row.fields,
|
|
3769
|
+
model: row.model,
|
|
3770
|
+
status: row.status,
|
|
3771
|
+
// An expired decision travels too: it stopped reaching agents, it did not stop being history.
|
|
3772
|
+
validUntil: iso(row.validUntil),
|
|
3773
|
+
createdAt: row.createdAt.toISOString(),
|
|
3774
|
+
updatedAt: row.updatedAt.toISOString()
|
|
3775
|
+
}));
|
|
3776
|
+
}
|
|
3777
|
+
async function exportProjectMemory(db, project) {
|
|
3778
|
+
const notes2 = await db.select({
|
|
3779
|
+
id: notes.id,
|
|
3780
|
+
body: notes.body,
|
|
3781
|
+
status: notes.status,
|
|
3782
|
+
createdBy: notes.createdBy,
|
|
3783
|
+
createdAt: notes.createdAt,
|
|
3784
|
+
decidedAt: notes.decidedAt,
|
|
3785
|
+
trigger: notes.trigger,
|
|
3786
|
+
sentinels: notes.sentinels,
|
|
3787
|
+
challenge: notes.challenge
|
|
3788
|
+
}).from(notes).where(eq9(notes.projectId, project.id)).orderBy(desc8(notes.createdAt), asc8(notes.id));
|
|
3789
|
+
const [decisions2, generalDecisions, counts] = await Promise.all([
|
|
3790
|
+
project.identity === null ? Promise.resolve([]) : decisionsOf(db, project.identity),
|
|
3791
|
+
decisionsOf(db, null),
|
|
3792
|
+
memoryJobCounts(db, project.id)
|
|
3793
|
+
]);
|
|
3794
|
+
const jobs = await db.select({
|
|
3795
|
+
sessionId: memoryJobs.sessionId,
|
|
3796
|
+
status: memoryJobs.status,
|
|
3797
|
+
reason: memoryJobs.reason,
|
|
3798
|
+
attempts: memoryJobs.attempts,
|
|
3799
|
+
availableAt: memoryJobs.availableAt,
|
|
3800
|
+
startedAt: memoryJobs.startedAt,
|
|
3801
|
+
finishedAt: memoryJobs.finishedAt,
|
|
3802
|
+
receipt: memoryJobs.receipt
|
|
3803
|
+
}).from(memoryJobs).innerJoin(agentSessions, eq9(agentSessions.id, memoryJobs.sessionId)).where(eq9(agentSessions.projectId, project.id)).orderBy(desc8(memoryJobs.createdAt), desc8(memoryJobs.sessionId));
|
|
3804
|
+
return {
|
|
3805
|
+
version: MEMORY_EXPORT_VERSION,
|
|
3806
|
+
exportedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3807
|
+
project: {
|
|
3808
|
+
id: project.id,
|
|
3809
|
+
slug: project.slug,
|
|
3810
|
+
name: project.name,
|
|
3811
|
+
root: project.root,
|
|
3812
|
+
identity: project.identity
|
|
3813
|
+
},
|
|
3814
|
+
notes: notes2.map((note) => ({
|
|
3815
|
+
id: note.id,
|
|
3816
|
+
body: note.body,
|
|
3817
|
+
status: note.status,
|
|
3818
|
+
createdBy: note.createdBy,
|
|
3819
|
+
createdAt: note.createdAt.toISOString(),
|
|
3820
|
+
decidedAt: iso(note.decidedAt),
|
|
3821
|
+
where: note.trigger,
|
|
3822
|
+
anchors: note.sentinels,
|
|
3823
|
+
challenge: note.challenge
|
|
3824
|
+
})),
|
|
3825
|
+
decisions: decisions2,
|
|
3826
|
+
generalDecisions,
|
|
3827
|
+
receipts: {
|
|
3828
|
+
counts,
|
|
3829
|
+
jobs: jobs.map((job) => ({
|
|
3830
|
+
sessionId: job.sessionId,
|
|
3831
|
+
status: job.status,
|
|
3832
|
+
reason: job.reason,
|
|
3833
|
+
attempts: job.attempts,
|
|
3834
|
+
availableAt: job.availableAt.toISOString(),
|
|
3835
|
+
startedAt: iso(job.startedAt),
|
|
3836
|
+
finishedAt: iso(job.finishedAt),
|
|
3837
|
+
receipt: job.receipt ?? null
|
|
3838
|
+
}))
|
|
3839
|
+
}
|
|
3840
|
+
};
|
|
3841
|
+
}
|
|
3842
|
+
|
|
2880
3843
|
// src/runs.ts
|
|
2881
|
-
import { and as
|
|
3844
|
+
import { and as and9, desc as desc9, eq as eq10, lt as lt2, sql as sql10 } from "drizzle-orm";
|
|
2882
3845
|
async function createRun(db, input) {
|
|
2883
3846
|
const id = newId("run");
|
|
2884
3847
|
await db.insert(runs).values({
|
|
@@ -2893,10 +3856,10 @@ async function createRun(db, input) {
|
|
|
2893
3856
|
return id;
|
|
2894
3857
|
}
|
|
2895
3858
|
async function finishRun(db, id, outcome) {
|
|
2896
|
-
await db.update(runs).set({ ...outcome, finishedAt: /* @__PURE__ */ new Date() }).where(
|
|
3859
|
+
await db.update(runs).set({ ...outcome, finishedAt: /* @__PURE__ */ new Date() }).where(eq10(runs.id, id));
|
|
2897
3860
|
}
|
|
2898
3861
|
async function setRunStatus(db, id, status) {
|
|
2899
|
-
await db.update(runs).set({ status }).where(
|
|
3862
|
+
await db.update(runs).set({ status }).where(eq10(runs.id, id));
|
|
2900
3863
|
}
|
|
2901
3864
|
var RUN_TIMEOUT_MS = 20 * 60 * 1e3;
|
|
2902
3865
|
async function reapStaleRuns(db) {
|
|
@@ -2905,15 +3868,15 @@ async function reapStaleRuns(db) {
|
|
|
2905
3868
|
status: "failed",
|
|
2906
3869
|
summary: "Interrumpida: el proceso que la ejecutaba desapareci\xF3 sin dejar resultado. No sabemos por d\xF3nde iba, as\xED que no se puede afirmar nada sobre el paquete.",
|
|
2907
3870
|
finishedAt: /* @__PURE__ */ new Date()
|
|
2908
|
-
}).where(
|
|
3871
|
+
}).where(and9(eq10(runs.status, "running"), lt2(runs.createdAt, cutoff))).returning({ id: runs.id });
|
|
2909
3872
|
return stale.length;
|
|
2910
3873
|
}
|
|
2911
3874
|
async function findRunningRun(db, projectId) {
|
|
2912
|
-
const [row] = await db.select({ id: runs.id, createdAt: runs.createdAt }).from(runs).where(
|
|
3875
|
+
const [row] = await db.select({ id: runs.id, createdAt: runs.createdAt }).from(runs).where(and9(eq10(runs.projectId, projectId), eq10(runs.status, "running"))).orderBy(desc9(runs.createdAt)).limit(1);
|
|
2913
3876
|
return row;
|
|
2914
3877
|
}
|
|
2915
3878
|
async function getRun(db, id) {
|
|
2916
|
-
const [row] = await db.select().from(runs).where(
|
|
3879
|
+
const [row] = await db.select().from(runs).where(eq10(runs.id, id)).limit(1);
|
|
2917
3880
|
return row;
|
|
2918
3881
|
}
|
|
2919
3882
|
async function getRunWithProject(db, id) {
|
|
@@ -2937,7 +3900,7 @@ async function getRunWithProject(db, id) {
|
|
|
2937
3900
|
projectName: projects.name,
|
|
2938
3901
|
projectSlug: projects.slug,
|
|
2939
3902
|
projectRoot: projects.root
|
|
2940
|
-
}).from(runs).innerJoin(projects,
|
|
3903
|
+
}).from(runs).innerJoin(projects, eq10(projects.id, runs.projectId)).where(eq10(runs.id, id)).limit(1);
|
|
2941
3904
|
return row;
|
|
2942
3905
|
}
|
|
2943
3906
|
async function listProjectRuns(db, projectId) {
|
|
@@ -2955,7 +3918,7 @@ async function listProjectRuns(db, projectId) {
|
|
|
2955
3918
|
requestedBy: runs.requestedBy,
|
|
2956
3919
|
createdAt: runs.createdAt,
|
|
2957
3920
|
finishedAt: runs.finishedAt
|
|
2958
|
-
}).from(runs).where(
|
|
3921
|
+
}).from(runs).where(eq10(runs.projectId, projectId)).orderBy(desc9(runs.createdAt)).limit(50);
|
|
2959
3922
|
}
|
|
2960
3923
|
async function listAllRuns(db, limit = 100) {
|
|
2961
3924
|
return db.select({
|
|
@@ -2972,14 +3935,14 @@ async function listAllRuns(db, limit = 100) {
|
|
|
2972
3935
|
createdAt: runs.createdAt,
|
|
2973
3936
|
projectName: projects.name,
|
|
2974
3937
|
projectSlug: projects.slug
|
|
2975
|
-
}).from(runs).innerJoin(projects,
|
|
3938
|
+
}).from(runs).innerJoin(projects, eq10(projects.id, runs.projectId)).orderBy(desc9(runs.createdAt)).limit(limit);
|
|
2976
3939
|
}
|
|
2977
3940
|
async function findUpgradeTarget(db, projectId, packageName) {
|
|
2978
3941
|
const [row] = await db.select({
|
|
2979
3942
|
latestVersion: packages.latestVersion,
|
|
2980
3943
|
ecosystem: packages.ecosystem
|
|
2981
|
-
}).from(projectDependencies).innerJoin(packages,
|
|
2982
|
-
|
|
3944
|
+
}).from(projectDependencies).innerJoin(packages, eq10(packages.id, projectDependencies.packageId)).where(
|
|
3945
|
+
and9(eq10(projectDependencies.projectId, projectId), eq10(packages.name, packageName))
|
|
2983
3946
|
).limit(1);
|
|
2984
3947
|
return row?.latestVersion ? { latestVersion: row.latestVersion, ecosystem: row.ecosystem } : void 0;
|
|
2985
3948
|
}
|
|
@@ -2990,13 +3953,13 @@ async function findKnownFailure(db, projectId, packageName, targetVersion) {
|
|
|
2990
3953
|
createdAt: runs.createdAt,
|
|
2991
3954
|
steps: runs.steps
|
|
2992
3955
|
}).from(runs).where(
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
3956
|
+
and9(
|
|
3957
|
+
eq10(runs.projectId, projectId),
|
|
3958
|
+
eq10(runs.status, "failed"),
|
|
3959
|
+
sql10`${runs.target}->>'packageName' = ${packageName}`,
|
|
3960
|
+
sql10`${runs.target}->>'targetVersion' = ${targetVersion}`
|
|
2998
3961
|
)
|
|
2999
|
-
).orderBy(
|
|
3962
|
+
).orderBy(desc9(runs.createdAt)).limit(1);
|
|
3000
3963
|
return row;
|
|
3001
3964
|
}
|
|
3002
3965
|
async function listSecurityTargets(db, projectId) {
|
|
@@ -3008,13 +3971,13 @@ async function listSecurityTargets(db, projectId) {
|
|
|
3008
3971
|
severity: advisories.severity,
|
|
3009
3972
|
summary: advisories.summary,
|
|
3010
3973
|
fixedVersions: advisories.fixedVersions
|
|
3011
|
-
}).from(projectDependencies).innerJoin(packages,
|
|
3974
|
+
}).from(projectDependencies).innerJoin(packages, eq10(packages.id, projectDependencies.packageId)).innerJoin(
|
|
3012
3975
|
vulnerabilities,
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3976
|
+
and9(
|
|
3977
|
+
eq10(vulnerabilities.packageId, projectDependencies.packageId),
|
|
3978
|
+
eq10(vulnerabilities.version, projectDependencies.resolvedVersion)
|
|
3016
3979
|
)
|
|
3017
|
-
).innerJoin(advisories,
|
|
3980
|
+
).innerJoin(advisories, eq10(advisories.id, vulnerabilities.advisoryId)).where(eq10(projectDependencies.projectId, projectId));
|
|
3018
3981
|
const targets = [];
|
|
3019
3982
|
for (const row of rows) {
|
|
3020
3983
|
const fixes = Array.isArray(row.fixedVersions) ? row.fixedVersions : [];
|
|
@@ -3037,16 +4000,31 @@ export {
|
|
|
3037
4000
|
CONSULT_MAX,
|
|
3038
4001
|
CONSULT_PENDING_MAX,
|
|
3039
4002
|
DORMANT_DAYS,
|
|
4003
|
+
DecisionEpisodeConflict,
|
|
4004
|
+
EPISODE_FIELDS,
|
|
3040
4005
|
IDLE_DAYS,
|
|
4006
|
+
LIVE_APP_JOBS,
|
|
3041
4007
|
LOG_DETAILS_MAX,
|
|
3042
4008
|
LOG_SUMMARY_MAX,
|
|
4009
|
+
MAX_APP_SPEND_CALLS,
|
|
4010
|
+
MEMORY_EXPORT_VERSION,
|
|
4011
|
+
MEMORY_JOB_LEASE_MS,
|
|
4012
|
+
MEMORY_JOB_MAX_ATTEMPTS,
|
|
4013
|
+
MEMORY_SESSION_WINDOW,
|
|
4014
|
+
MIN_DISTILL_CITATIONS,
|
|
3043
4015
|
NOTE_BUDGET,
|
|
3044
4016
|
NOTE_MAX,
|
|
3045
4017
|
NOTE_PENDING_MAX,
|
|
3046
4018
|
NOTE_SLEEPING_MAX,
|
|
3047
4019
|
SNAPSHOTS_PER_PROJECT,
|
|
4020
|
+
STALE_MAX_DAYS,
|
|
3048
4021
|
SUPPORT_FLOOR,
|
|
4022
|
+
activeEpisodeRevisions,
|
|
4023
|
+
activeSuccessor,
|
|
3049
4024
|
addHumanNote,
|
|
4025
|
+
appDedupeKey,
|
|
4026
|
+
appJobTransition,
|
|
4027
|
+
appProject,
|
|
3050
4028
|
assignedCritiques,
|
|
3051
4029
|
assignedFindings,
|
|
3052
4030
|
authenticateAgent,
|
|
@@ -3054,8 +4032,11 @@ export {
|
|
|
3054
4032
|
beliefChurn,
|
|
3055
4033
|
bridgeCounts,
|
|
3056
4034
|
briefScore,
|
|
4035
|
+
canonicalAppInput,
|
|
3057
4036
|
challengeNote,
|
|
3058
4037
|
citedVerdictIds,
|
|
4038
|
+
claimAppJob,
|
|
4039
|
+
claimMemoryJob,
|
|
3059
4040
|
claimTask,
|
|
3060
4041
|
closeSession,
|
|
3061
4042
|
completeTask,
|
|
@@ -3064,27 +4045,41 @@ export {
|
|
|
3064
4045
|
createRun,
|
|
3065
4046
|
createTask,
|
|
3066
4047
|
decideNote,
|
|
4048
|
+
decisionEpisodeById,
|
|
4049
|
+
decisionEpisodeCount,
|
|
3067
4050
|
deleteAgent,
|
|
4051
|
+
deleteNarratives,
|
|
3068
4052
|
deleteVerdicts,
|
|
3069
4053
|
discardTask,
|
|
3070
4054
|
discardedCritiques,
|
|
3071
4055
|
discardedFindings,
|
|
3072
4056
|
doubleReport,
|
|
3073
4057
|
draftConsultation,
|
|
4058
|
+
draftingConsultation,
|
|
4059
|
+
enqueueAppJobRow,
|
|
4060
|
+
enqueueMemoryJob,
|
|
4061
|
+
ensureApp,
|
|
3074
4062
|
esquina,
|
|
3075
4063
|
excludeProject,
|
|
4064
|
+
exportProjectMemory,
|
|
3076
4065
|
familia,
|
|
3077
4066
|
findKnownFailure,
|
|
3078
4067
|
findRunningRun,
|
|
3079
4068
|
findUpgradeTarget,
|
|
4069
|
+
finishMemoryJob,
|
|
3080
4070
|
finishRun,
|
|
4071
|
+
forgetAppWorkspaces,
|
|
3081
4072
|
forgetProjectsUnder,
|
|
3082
4073
|
getAgentContext,
|
|
4074
|
+
getApp,
|
|
4075
|
+
getAppJob,
|
|
4076
|
+
getAppWorkspace,
|
|
3083
4077
|
getDailyReport,
|
|
3084
4078
|
getDesignFingerprint,
|
|
3085
4079
|
getDiskTotals,
|
|
3086
4080
|
getLook,
|
|
3087
4081
|
getNorth,
|
|
4082
|
+
getOpenContext,
|
|
3088
4083
|
getProject,
|
|
3089
4084
|
getProjectIcon,
|
|
3090
4085
|
getProjectLocation,
|
|
@@ -3093,20 +4088,29 @@ export {
|
|
|
3093
4088
|
getRunWithProject,
|
|
3094
4089
|
getStats,
|
|
3095
4090
|
getTask,
|
|
4091
|
+
hasPendingAppJob,
|
|
3096
4092
|
idFor,
|
|
3097
4093
|
inTransaction,
|
|
3098
4094
|
ingestPortfolio,
|
|
3099
4095
|
insertBeliefs,
|
|
3100
4096
|
labelConsultation,
|
|
4097
|
+
latestProjectMemoryJob,
|
|
4098
|
+
latestSynthesisByTopic,
|
|
3101
4099
|
launchedTasks,
|
|
3102
4100
|
listAgents,
|
|
3103
4101
|
listAllActivity,
|
|
3104
4102
|
listAllRuns,
|
|
4103
|
+
listAppJobs,
|
|
4104
|
+
listApps,
|
|
3105
4105
|
listBeliefs,
|
|
4106
|
+
listConflictingEpisodeFamilies,
|
|
4107
|
+
listDecisionEpisodes,
|
|
3106
4108
|
listDiskUsage,
|
|
3107
4109
|
listFamilies,
|
|
3108
4110
|
listHidden,
|
|
3109
4111
|
listLooks,
|
|
4112
|
+
listModelCalls,
|
|
4113
|
+
listNarratives,
|
|
3110
4114
|
listObservations,
|
|
3111
4115
|
listPackages,
|
|
3112
4116
|
listProjectActivity,
|
|
@@ -3119,30 +4123,38 @@ export {
|
|
|
3119
4123
|
listProjects,
|
|
3120
4124
|
listSecurityTargets,
|
|
3121
4125
|
listSentinels,
|
|
3122
|
-
listSessionActivities,
|
|
3123
4126
|
listUnsavedWork,
|
|
3124
4127
|
listVerdicts,
|
|
3125
4128
|
logActivity,
|
|
3126
4129
|
lookedAt,
|
|
4130
|
+
markNarrativesFailed,
|
|
4131
|
+
markNarrativesRead,
|
|
3127
4132
|
markPublished,
|
|
3128
4133
|
markVerdictsDistilled,
|
|
4134
|
+
memoryJobCounts,
|
|
3129
4135
|
modelSpendByKind,
|
|
4136
|
+
modelSpendByModel,
|
|
3130
4137
|
modelSpendToday,
|
|
3131
4138
|
monthOf,
|
|
4139
|
+
narrativeCount,
|
|
4140
|
+
narrativesByIds,
|
|
3132
4141
|
neverReviewed,
|
|
3133
4142
|
newId,
|
|
3134
4143
|
noteUsage,
|
|
3135
4144
|
notesAt,
|
|
3136
4145
|
observationTopics,
|
|
3137
4146
|
openSession,
|
|
4147
|
+
pendingConsultations,
|
|
3138
4148
|
portfolioDesign,
|
|
3139
4149
|
projectByIdentity,
|
|
3140
4150
|
projectNamesByIdentity,
|
|
3141
4151
|
proposeNote,
|
|
3142
4152
|
pruneSnapshots,
|
|
3143
4153
|
queueWrite,
|
|
4154
|
+
readJournalEntry,
|
|
3144
4155
|
readVerdictIds,
|
|
3145
4156
|
reapStaleRuns,
|
|
4157
|
+
recordAppSpend,
|
|
3146
4158
|
recordConsultation,
|
|
3147
4159
|
recordLaunch,
|
|
3148
4160
|
recordServing,
|
|
@@ -3150,16 +4162,21 @@ export {
|
|
|
3150
4162
|
resolveProject,
|
|
3151
4163
|
resolveProposal,
|
|
3152
4164
|
retireBeliefs,
|
|
4165
|
+
revalidateAppBudget,
|
|
3153
4166
|
rotateAgentKey,
|
|
3154
4167
|
saveAiSummary,
|
|
4168
|
+
saveAppWorkspace,
|
|
3155
4169
|
saveBuildCheck,
|
|
4170
|
+
saveDecisionEpisodes,
|
|
3156
4171
|
saveDesignFingerprint,
|
|
3157
4172
|
saveDiskUsage,
|
|
3158
4173
|
saveLook,
|
|
3159
4174
|
saveMdReview,
|
|
3160
4175
|
saveModelCall,
|
|
4176
|
+
saveNarratives,
|
|
3161
4177
|
saveNorth,
|
|
3162
4178
|
saveObservations,
|
|
4179
|
+
saveOpenPlan,
|
|
3163
4180
|
saveProjectAccounts,
|
|
3164
4181
|
saveReview,
|
|
3165
4182
|
saveSynthesisPass,
|
|
@@ -3167,8 +4184,12 @@ export {
|
|
|
3167
4184
|
scaleReport,
|
|
3168
4185
|
schema_exports as schema,
|
|
3169
4186
|
searchJournal,
|
|
4187
|
+
searchJournalPage,
|
|
4188
|
+
sessionMemoryWindow,
|
|
3170
4189
|
setBeliefScope,
|
|
3171
4190
|
setBeliefTopics,
|
|
4191
|
+
setDecisionEpisodeStatus,
|
|
4192
|
+
setDecisionEpisodeValidUntil,
|
|
3172
4193
|
setHidden,
|
|
3173
4194
|
setObservationTopics,
|
|
3174
4195
|
setRunStatus,
|
|
@@ -3181,9 +4202,14 @@ export {
|
|
|
3181
4202
|
stateOf,
|
|
3182
4203
|
tasteReach,
|
|
3183
4204
|
tasteScore,
|
|
4205
|
+
transitionAppJob,
|
|
3184
4206
|
triggerMatches,
|
|
3185
4207
|
unexcludeProject,
|
|
4208
|
+
updateApp,
|
|
4209
|
+
updateAppJobProgress,
|
|
3186
4210
|
updateBelief,
|
|
4211
|
+
validMemoryPath,
|
|
3187
4212
|
validTrigger,
|
|
3188
|
-
vetoBelief
|
|
4213
|
+
vetoBelief,
|
|
4214
|
+
withMemoryJobLease
|
|
3189
4215
|
};
|