@mndrk/agx 2.0.38 → 2.0.39
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/cloud-runtime/standalone/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/.next/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/required-server-files.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__01cd082e._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0936925d._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c3dd73b._.js +6 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b0bb735._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1c86bf6e._.js +5 -5
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20c58b41._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2126c763._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__255b11f2._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__277ed37d._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2f06f568._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__30bd0c87._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__374cd94c._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3785024c._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__379604d4._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c8f1de6._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d0df5a8._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4014ed70._.js +7 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42fcb81c._.js +16 -16
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a3cd6ac._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4bce7db7._.js +23 -23
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4e522535._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50c24784._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50ddd3ce._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__529a6e1c._.js +12 -12
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59d1cdd8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__628d686b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__644e6285._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__65755104._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__73c20995._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__762ab29c._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8125bbc3._.js +6 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__85275b88._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__89666394._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c0fb154._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8f5cac13._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b22098._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__92924218._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__96ae701e._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98ce983b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9a9fd39f._.js +6 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ad4e385._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a01ddd0b._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a099c992._.js +14 -14
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a9b949c3._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__af7a73fd._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd43017b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf6fb108._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c122c54a._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ea4921._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d57e800e._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__db469f1b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dec3e1b7._.js +4 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1147a4a._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5597fea._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f8c94cb3._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f9f7f2df._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa79d53f._.js +11 -11
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb14cd4a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcf0b40a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffb21023._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/_17e53c87._.js +1 -1
- package/cloud-runtime/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{dfff51033c303fc7.js → ee5f1457fbc593e1.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{turbopack-22475f0dd0c18f92.js → turbopack-e1d640f2fbe4fa5e.js} +1 -1
- package/cloud-runtime/standalone/coverage/clover.xml +1208 -0
- package/cloud-runtime/standalone/coverage/coverage-final.json +29 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/audit/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/audit/route.ts.html +208 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/[...nextauth]/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/[...nextauth]/route.ts.html +166 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/daemon-secret/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/daemon-secret/route.ts.html +532 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/status/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/status/route.ts.html +178 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/learnings/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/learnings/route.ts.html +262 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/logs/stream/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/logs/stream/route.ts.html +448 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/complete/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/complete/route.ts.html +331 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/route.ts.html +505 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/stage-prompts/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/stage-prompts/route.ts.html +412 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/advance/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/advance/route.ts.html +304 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/logs/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/logs/route.ts.html +202 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/route.ts.html +373 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/route.ts.html +499 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/stream/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/stream/route.ts.html +349 -0
- package/cloud-runtime/standalone/coverage/lcov-report/base.css +224 -0
- package/cloud-runtime/standalone/coverage/lcov-report/block-navigation.js +87 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/AuthProvider.tsx.html +259 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/ChatInterface.tsx.html +1228 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/KanbanBoard.tsx.html +1024 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/Layout.tsx.html +211 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/LearningsPanel.tsx.html +535 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/LogTimeline.tsx.html +415 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/SortableTaskCard.tsx.html +358 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/StagePills.tsx.html +439 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskCard.tsx.html +514 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskCardOverlay.tsx.html +256 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskDetail.tsx.html +622 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskList.tsx.html +253 -0
- package/cloud-runtime/standalone/coverage/lcov-report/components/index.html +281 -0
- package/cloud-runtime/standalone/coverage/lcov-report/favicon.png +0 -0
- package/cloud-runtime/standalone/coverage/lcov-report/hooks/index.html +116 -0
- package/cloud-runtime/standalone/coverage/lcov-report/hooks/useTasks.ts.html +1042 -0
- package/cloud-runtime/standalone/coverage/lcov-report/index.html +341 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth-client.ts.html +202 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth-server.ts.html +172 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth.ts.html +265 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/db.ts.html +1252 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/index.html +131 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/orchestrator.ts.html +409 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/security.ts.html +1165 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/supabase-server.ts.html +175 -0
- package/cloud-runtime/standalone/coverage/lcov-report/lib/supabase.ts.html +157 -0
- package/cloud-runtime/standalone/coverage/lcov-report/prettify.css +1 -0
- package/cloud-runtime/standalone/coverage/lcov-report/prettify.js +2 -0
- package/cloud-runtime/standalone/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/cloud-runtime/standalone/coverage/lcov-report/sorter.js +210 -0
- package/cloud-runtime/standalone/coverage/lcov.info +2386 -0
- package/cloud-runtime/standalone/docs/LIMITS.md +63 -0
- package/cloud-runtime/standalone/docs/architecture/ADR-001-hybrid-to-full-sqlite.md +345 -0
- package/cloud-runtime/standalone/docs/baseline/baseline-report.json +1009 -0
- package/cloud-runtime/standalone/docs/baseline/critical-queries.md +105 -0
- package/cloud-runtime/standalone/docs/baseline/lock-metrics.json +21 -0
- package/cloud-runtime/standalone/docs/baseline/read-latency.json +146 -0
- package/cloud-runtime/standalone/docs/baseline/restore-time.json +10 -0
- package/cloud-runtime/standalone/docs/baseline/write-metrics.json +803 -0
- package/cloud-runtime/standalone/docs/decisions/sqlite-migration-adr.md +327 -0
- package/cloud-runtime/standalone/docs/error-code-mapping.md +74 -0
- package/cloud-runtime/standalone/docs/migration-plan.md +120 -0
- package/cloud-runtime/standalone/docs/migration-spec.md +345 -0
- package/cloud-runtime/standalone/docs/pg-sqlite-compatibility-matrix.md +554 -0
- package/cloud-runtime/standalone/docs/project-agent-migration-status.md +229 -0
- package/cloud-runtime/standalone/docs/runbook-shadow-read.md +66 -0
- package/cloud-runtime/standalone/docs/runbook.md +155 -0
- package/cloud-runtime/standalone/docs/specs/cli-postgres-removal.md +69 -0
- package/cloud-runtime/standalone/docs/specs/thread-mentions.md +53 -0
- package/cloud-runtime/standalone/docs/superpowers/plans/2026-04-01-prompt-scheduler.md +1907 -0
- package/cloud-runtime/standalone/docs/superpowers/plans/2026-04-02-sqlite-migration.md +1047 -0
- package/cloud-runtime/standalone/docs/transcript.txt +282 -0
- package/cloud-runtime/standalone/docs/ux/GlobalChatFlow.storyboard +23 -0
- package/cloud-runtime/standalone/docs/ux/assistant-chat-cli.md +32 -0
- package/cloud-runtime/standalone/instrumentation.ts +32 -0
- package/cloud-runtime/standalone/mcp/dist/constants.js +66 -0
- package/cloud-runtime/standalone/mcp/dist/db.js +220 -0
- package/cloud-runtime/standalone/mcp/dist/index.js +7 -0
- package/cloud-runtime/standalone/mcp/dist/security.js +18 -0
- package/cloud-runtime/standalone/mcp/dist/server.js +240 -0
- package/cloud-runtime/standalone/mcp/dist/task-context.js +287 -0
- package/cloud-runtime/standalone/mcp/dist/test-client.js +82 -0
- package/cloud-runtime/standalone/mcp/dist/tools/audit.js +69 -0
- package/cloud-runtime/standalone/mcp/dist/tools/learnings.js +88 -0
- package/cloud-runtime/standalone/mcp/dist/tools/queue.js +312 -0
- package/cloud-runtime/standalone/mcp/dist/tools/tasks.js +244 -0
- package/cloud-runtime/standalone/mcp/dist/types.js +74 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/cloud-runtime/standalone/node_modules/@img/{sharp-linux-x64 → sharp-darwin-arm64}/package.json +7 -13
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/README.md +2 -2
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/glib-2.0/include/glibconfig.h +8 -9
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 → sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib} +0 -0
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/package.json +5 -11
- package/cloud-runtime/standalone/notes/comments-context-demo.md +141 -0
- package/cloud-runtime/standalone/notes/comments-context-plan.md +119 -0
- package/cloud-runtime/standalone/notes/context-audit.md +21 -0
- package/cloud-runtime/standalone/notes/project-layer-plan.md +30 -0
- package/cloud-runtime/standalone/notes/project-layer.md +123 -0
- package/cloud-runtime/standalone/notes/temporal-migration-design.md +199 -0
- package/cloud-runtime/standalone/playwright-report/data/00d55996f37c1506b90144c85493dd85032c13e5.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/0b9d409e57237ae111d7ba258d3dfe64dc368456.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/b33d5e80a15bd1deda4415b9d318ef73f581c950.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/b55684161aa440d0614595e13c91338f0420abbb.md +131 -0
- package/cloud-runtime/standalone/playwright-report/data/b9913957ae07e7565c38ddd71215be79b1ceb017.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/c3538be8ebbebc9fe4a7df8f12f04483af4a0d91.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/fe638f64ff5e36f1c30325564565662d3f57da87.md +180 -0
- package/cloud-runtime/standalone/playwright-report/index.html +85 -0
- package/cloud-runtime/standalone/server.js +1 -1
- package/cloud-runtime/standalone/test-results/auth-Authentication-Flow-S-aff25-sion-across-page-navigation-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/comments-Task-comments-add-4dc59-nd-persists-it-for-the-task-chromium/error-context.md +131 -0
- package/cloud-runtime/standalone/test-results/comments-Task-comments-add-4dc59-nd-persists-it-for-the-task-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage--4082a-er-planning-after-ideation--chromium/error-context.md +180 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage--4082a-er-planning-after-ideation--chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage-Columns-displays-all-9-SDLC-stages-chromium/error-context.md +180 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage-Columns-displays-all-9-SDLC-stages-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Task-D-b6d98-ys-tasks-in-correct-columns-chromium/error-context.md +180 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Task-D-b6d98-ys-tasks-in-correct-columns-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Task-Display-shows-task-count-per-column-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Task-Lifecycle-can-advance-task-through-all-stages-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/tsconfig.json +1 -2
- package/cloud-runtime/standalone/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/cloud-runtime/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- /package/cloud-runtime/standalone/.next/static/{V5ruh627UpcC-LTWDgYk8 → 9PXl40CrFxI8nirdJ1A-T}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{V5ruh627UpcC-LTWDgYk8 → 9PXl40CrFxI8nirdJ1A-T}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{V5ruh627UpcC-LTWDgYk8 → 9PXl40CrFxI8nirdJ1A-T}/_ssgManifest.js +0 -0
- /package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/index.js +0 -0
- /package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/versions.json +0 -0
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# PostgreSQL → SQLite Compatibility Matrix
|
|
2
|
+
|
|
3
|
+
Every Postgres-specific SQL pattern in agx-cloud, with its SQLite rewrite.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. ILIKE → LIKE COLLATE NOCASE
|
|
8
|
+
|
|
9
|
+
**Locations:** `lib/db-adapter.ts:233`, `src/graph/migration-job.ts:161`, `mcp/src/tools/learnings.ts:95`
|
|
10
|
+
|
|
11
|
+
### Before (PG)
|
|
12
|
+
```sql
|
|
13
|
+
SELECT * FROM tasks WHERE title ILIKE '%deploy%';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### After (SQLite)
|
|
17
|
+
```sql
|
|
18
|
+
SELECT * FROM tasks WHERE title LIKE '%deploy%' COLLATE NOCASE;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Notes:** SQLite's `LIKE` is case-insensitive for ASCII by default when no collation is set, but explicit `COLLATE NOCASE` guarantees it. For programmatic queries in `db-adapter.ts`, replace the `ILIKE` operator branch with `LIKE ... COLLATE NOCASE`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. @> JSON Containment → json_each()
|
|
26
|
+
|
|
27
|
+
**Locations:** `lib/db-adapter.ts:275`
|
|
28
|
+
|
|
29
|
+
### Before (PG)
|
|
30
|
+
```sql
|
|
31
|
+
-- Check if tags array contains 'urgent'
|
|
32
|
+
SELECT * FROM tasks WHERE metadata @> '["urgent"]'::jsonb;
|
|
33
|
+
|
|
34
|
+
-- Check if labels column contains specific values
|
|
35
|
+
SELECT * FROM tasks WHERE labels @> ARRAY['bug','critical'];
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### After (SQLite)
|
|
39
|
+
```sql
|
|
40
|
+
-- Using json_each to check containment
|
|
41
|
+
SELECT DISTINCT t.* FROM tasks t, json_each(t.metadata) je
|
|
42
|
+
WHERE je.value = 'urgent';
|
|
43
|
+
|
|
44
|
+
-- Multiple containment checks
|
|
45
|
+
SELECT t.* FROM tasks t
|
|
46
|
+
WHERE (SELECT COUNT(*) FROM json_each(t.labels) je
|
|
47
|
+
WHERE je.value IN ('bug','critical')) = 2;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Notes:** For the `contains` operator in `db-adapter.ts`, emit a subquery using `json_each()` instead of `@>`. If checking a single value, a simpler form works:
|
|
51
|
+
```sql
|
|
52
|
+
SELECT * FROM tasks WHERE EXISTS (
|
|
53
|
+
SELECT 1 FROM json_each(tasks.labels) WHERE value = 'urgent'
|
|
54
|
+
);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 3. RETURNING → Separate SELECT
|
|
60
|
+
|
|
61
|
+
**Locations:** `lib/db-adapter.ts:398`, `mcp/src/db.ts:159`, `src/graph/migration-job.ts:361`, `src/graph/store.ts:251,436,520`
|
|
62
|
+
|
|
63
|
+
### Before (PG)
|
|
64
|
+
```sql
|
|
65
|
+
-- INSERT RETURNING
|
|
66
|
+
INSERT INTO agx.execution_graphs (id, task_id, nodes, edges)
|
|
67
|
+
VALUES ($1, $2, $3::jsonb, $4::jsonb)
|
|
68
|
+
RETURNING *;
|
|
69
|
+
|
|
70
|
+
-- UPDATE RETURNING
|
|
71
|
+
UPDATE agx.execution_graphs
|
|
72
|
+
SET updated_at = NOW()
|
|
73
|
+
WHERE id = $1
|
|
74
|
+
RETURNING graph_version, updated_at;
|
|
75
|
+
|
|
76
|
+
-- DELETE RETURNING
|
|
77
|
+
DELETE FROM agx.execution_graphs
|
|
78
|
+
WHERE task_id = $1
|
|
79
|
+
RETURNING id;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### After (SQLite)
|
|
83
|
+
```sql
|
|
84
|
+
-- INSERT + SELECT (use last_insert_rowid() or known id)
|
|
85
|
+
INSERT INTO execution_graphs (id, task_id, nodes, edges)
|
|
86
|
+
VALUES (?, ?, json(?), json(?));
|
|
87
|
+
SELECT * FROM execution_graphs WHERE id = ?;
|
|
88
|
+
|
|
89
|
+
-- UPDATE + SELECT
|
|
90
|
+
UPDATE execution_graphs
|
|
91
|
+
SET updated_at = datetime('now')
|
|
92
|
+
WHERE id = ?;
|
|
93
|
+
SELECT graph_version, updated_at FROM execution_graphs WHERE id = ?;
|
|
94
|
+
|
|
95
|
+
-- DELETE: capture ids first, then delete
|
|
96
|
+
SELECT id FROM execution_graphs WHERE task_id = ?;
|
|
97
|
+
DELETE FROM execution_graphs WHERE task_id = ?;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Notes:** Wrap INSERT+SELECT or DELETE(select)+DELETE in a transaction to ensure atomicity. SQLite supports `RETURNING` since version 3.35.0 (2021-03-12) — if targeting modern SQLite, `RETURNING` works as-is. Check your runtime version.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 4. Array Types → JSON Arrays
|
|
105
|
+
|
|
106
|
+
**Locations:** `001_agx_board_schema.sql:123,261`, `src/graph/store.ts:377`, `src/graph/migration-job.ts:137,149,258,312`
|
|
107
|
+
|
|
108
|
+
### Before (PG)
|
|
109
|
+
```sql
|
|
110
|
+
-- Schema
|
|
111
|
+
outputs text[],
|
|
112
|
+
depends_on uuid[] DEFAULT '{}'::uuid[],
|
|
113
|
+
|
|
114
|
+
-- Query with ANY()
|
|
115
|
+
SELECT * FROM graph_nodes
|
|
116
|
+
WHERE graph_id = $1 AND node_id = ANY($2::text[]);
|
|
117
|
+
|
|
118
|
+
-- Query with array parameter
|
|
119
|
+
SELECT * FROM tasks WHERE id = ANY($1::uuid[]);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### After (SQLite)
|
|
123
|
+
```sql
|
|
124
|
+
-- Schema: store as JSON text
|
|
125
|
+
outputs TEXT DEFAULT '[]', -- JSON array
|
|
126
|
+
depends_on TEXT DEFAULT '[]', -- JSON array of uuids
|
|
127
|
+
|
|
128
|
+
-- Query: replace ANY() with json_each subquery
|
|
129
|
+
SELECT * FROM graph_nodes
|
|
130
|
+
WHERE graph_id = ? AND node_id IN (SELECT value FROM json_each(?));
|
|
131
|
+
|
|
132
|
+
-- Same pattern for uuid arrays
|
|
133
|
+
SELECT * FROM tasks WHERE id IN (SELECT value FROM json_each(?));
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Notes:** Pass JSON-encoded arrays (`'["a","b","c"]'`) as parameters. The `json_each()` table-valued function unpacks them for `IN` clauses.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 5. increment_version Stored Procedure → Application-Level CAS
|
|
141
|
+
|
|
142
|
+
**Locations:** `001_agx_board_schema.sql:43-50,551-558` (triggers), `store.ts` (relies on auto-incremented versions)
|
|
143
|
+
|
|
144
|
+
### Before (PG)
|
|
145
|
+
```sql
|
|
146
|
+
-- Trigger function
|
|
147
|
+
CREATE OR REPLACE FUNCTION agx.increment_task_version()
|
|
148
|
+
RETURNS trigger LANGUAGE plpgsql AS $$
|
|
149
|
+
BEGIN
|
|
150
|
+
NEW.version = OLD.version + 1;
|
|
151
|
+
RETURN NEW;
|
|
152
|
+
END;
|
|
153
|
+
$$;
|
|
154
|
+
|
|
155
|
+
CREATE TRIGGER trg_increment_task_version
|
|
156
|
+
BEFORE UPDATE ON agx.tasks
|
|
157
|
+
FOR EACH ROW EXECUTE FUNCTION agx.increment_task_version();
|
|
158
|
+
|
|
159
|
+
-- Usage: just UPDATE, version increments automatically
|
|
160
|
+
UPDATE agx.tasks SET title = 'new title' WHERE id = $1;
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### After (SQLite)
|
|
164
|
+
```sql
|
|
165
|
+
-- Option A: SQLite trigger (closest equivalent)
|
|
166
|
+
CREATE TRIGGER trg_increment_task_version
|
|
167
|
+
BEFORE UPDATE ON tasks
|
|
168
|
+
FOR EACH ROW
|
|
169
|
+
BEGIN
|
|
170
|
+
UPDATE tasks SET version = OLD.version + 1 WHERE id = NEW.id;
|
|
171
|
+
END;
|
|
172
|
+
|
|
173
|
+
-- Option B: Application-level compare-and-swap (recommended)
|
|
174
|
+
-- Read current version, then update with version check:
|
|
175
|
+
UPDATE tasks
|
|
176
|
+
SET title = ?, version = version + 1
|
|
177
|
+
WHERE id = ? AND version = ?;
|
|
178
|
+
-- If rows_affected = 0, conflict detected → retry or error
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Notes:** Option B (CAS) is preferred because it provides explicit optimistic concurrency control. The caller reads the current version, attempts the update with `AND version = ?`, and retries on conflict. This avoids hidden trigger behavior and makes concurrency explicit.
|
|
182
|
+
|
|
183
|
+
The same pattern applies to `increment_graph_version`:
|
|
184
|
+
```sql
|
|
185
|
+
UPDATE execution_graphs
|
|
186
|
+
SET graph_version = graph_version + 1, nodes = json(?)
|
|
187
|
+
WHERE id = ? AND graph_version = ?;
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 6. update_updated_at Trigger → SQLite Trigger or Application Code
|
|
193
|
+
|
|
194
|
+
**Locations:** `001_agx_board_schema.sql:52-59`
|
|
195
|
+
|
|
196
|
+
### Before (PG)
|
|
197
|
+
```sql
|
|
198
|
+
CREATE OR REPLACE FUNCTION agx.update_updated_at()
|
|
199
|
+
RETURNS trigger LANGUAGE plpgsql AS $$
|
|
200
|
+
BEGIN
|
|
201
|
+
NEW.updated_at = now();
|
|
202
|
+
RETURN NEW;
|
|
203
|
+
END;
|
|
204
|
+
$$;
|
|
205
|
+
|
|
206
|
+
CREATE TRIGGER trg_user_settings_updated_at
|
|
207
|
+
BEFORE UPDATE ON agx.user_settings
|
|
208
|
+
FOR EACH ROW EXECUTE FUNCTION agx.update_updated_at();
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### After (SQLite)
|
|
212
|
+
```sql
|
|
213
|
+
CREATE TRIGGER trg_user_settings_updated_at
|
|
214
|
+
AFTER UPDATE ON user_settings
|
|
215
|
+
FOR EACH ROW
|
|
216
|
+
BEGIN
|
|
217
|
+
UPDATE user_settings SET updated_at = datetime('now')
|
|
218
|
+
WHERE id = NEW.id;
|
|
219
|
+
END;
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Notes:** SQLite triggers use `BEGIN...END` blocks instead of PL/pgSQL functions. Alternatively, set `updated_at` in application code on every UPDATE.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## 7. ON CONFLICT (Upsert) Differences
|
|
227
|
+
|
|
228
|
+
**Locations:** `lib/db-adapter.ts:376-395`, `mcp/src/db.ts:563`, `src/graph/store.ts:247`, `src/graph/migration-job.ts:263,389`
|
|
229
|
+
|
|
230
|
+
### Before (PG)
|
|
231
|
+
```sql
|
|
232
|
+
INSERT INTO agx.rate_limits (user_id, endpoint, window_start, request_count)
|
|
233
|
+
VALUES ($1, $2, $3, 1)
|
|
234
|
+
ON CONFLICT (user_id, endpoint, window_start)
|
|
235
|
+
DO UPDATE SET request_count = rate_limits.request_count + 1
|
|
236
|
+
RETURNING request_count;
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### After (SQLite)
|
|
240
|
+
```sql
|
|
241
|
+
INSERT INTO rate_limits (user_id, endpoint, window_start, request_count)
|
|
242
|
+
VALUES (?, ?, ?, 1)
|
|
243
|
+
ON CONFLICT (user_id, endpoint, window_start)
|
|
244
|
+
DO UPDATE SET request_count = rate_limits.request_count + 1;
|
|
245
|
+
-- Then SELECT if needed:
|
|
246
|
+
SELECT request_count FROM rate_limits
|
|
247
|
+
WHERE user_id = ? AND endpoint = ? AND window_start = ?;
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Notes:** SQLite supports `ON CONFLICT ... DO UPDATE SET` and `DO NOTHING` with the same syntax as PG. The key differences:
|
|
251
|
+
- Replace `EXCLUDED` with `excluded` (SQLite uses lowercase, but is case-insensitive so both work)
|
|
252
|
+
- Remove `RETURNING` (see section 3)
|
|
253
|
+
- Use `?` placeholders instead of `$1`, `$2`
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 8. gen_random_uuid() → Application-Generated UUIDs
|
|
258
|
+
|
|
259
|
+
**Locations:** `001_agx_board_schema.sql` (19 table definitions)
|
|
260
|
+
|
|
261
|
+
### Before (PG)
|
|
262
|
+
```sql
|
|
263
|
+
id uuid DEFAULT gen_random_uuid() NOT NULL PRIMARY KEY,
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### After (SQLite)
|
|
267
|
+
```sql
|
|
268
|
+
-- Option A: Use SQLite's randomblob to generate UUID
|
|
269
|
+
id TEXT NOT NULL PRIMARY KEY DEFAULT (
|
|
270
|
+
lower(hex(randomblob(4))) || '-' ||
|
|
271
|
+
lower(hex(randomblob(2))) || '-4' ||
|
|
272
|
+
substr(lower(hex(randomblob(2))),2) || '-' ||
|
|
273
|
+
substr('89ab', abs(random()) % 4 + 1, 1) ||
|
|
274
|
+
substr(lower(hex(randomblob(2))),2) || '-' ||
|
|
275
|
+
lower(hex(randomblob(6)))
|
|
276
|
+
),
|
|
277
|
+
|
|
278
|
+
-- Option B (recommended): Generate UUID in application code
|
|
279
|
+
id TEXT NOT NULL PRIMARY KEY,
|
|
280
|
+
-- Application generates: crypto.randomUUID() before INSERT
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
**Notes:** Option B is simpler and more portable. Generate UUIDs in TypeScript with `crypto.randomUUID()` and pass them as parameters.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 9. NOW() / CURRENT_TIMESTAMP → datetime('now')
|
|
288
|
+
|
|
289
|
+
**Locations:** Throughout schema and queries
|
|
290
|
+
|
|
291
|
+
### Before (PG)
|
|
292
|
+
```sql
|
|
293
|
+
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
294
|
+
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL,
|
|
295
|
+
|
|
296
|
+
-- In queries
|
|
297
|
+
UPDATE agx.execution_graphs SET updated_at = NOW() WHERE id = $1;
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### After (SQLite)
|
|
301
|
+
```sql
|
|
302
|
+
created_at TEXT DEFAULT (datetime('now')),
|
|
303
|
+
updated_at TEXT DEFAULT (datetime('now')) NOT NULL,
|
|
304
|
+
|
|
305
|
+
-- In queries
|
|
306
|
+
UPDATE execution_graphs SET updated_at = datetime('now') WHERE id = ?;
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**Notes:** SQLite stores timestamps as TEXT in ISO-8601 format. Use `datetime('now')` for UTC. For comparison operations, ISO-8601 strings sort correctly as text.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## 10. Type Casts (::type) → Removed or json()
|
|
314
|
+
|
|
315
|
+
**Locations:** `src/graph/store.ts`, `src/graph/migration-job.ts`
|
|
316
|
+
|
|
317
|
+
### Before (PG)
|
|
318
|
+
```sql
|
|
319
|
+
$5::jsonb, $6::jsonb, $7::timestamptz
|
|
320
|
+
$2::text[]
|
|
321
|
+
$1::uuid[]
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### After (SQLite)
|
|
325
|
+
```sql
|
|
326
|
+
json(?), json(?), ?
|
|
327
|
+
-- Array casts: pass JSON string, use json_each() for queries
|
|
328
|
+
-- UUID/text casts: just use ? (SQLite is dynamically typed)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
**Notes:** SQLite is dynamically typed. Remove all `::type` casts. For JSONB columns, wrap with `json()` to validate/normalize JSON. For arrays, pass JSON strings.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## 11. INTERVAL / date_trunc / extract → SQLite Date Functions
|
|
336
|
+
|
|
337
|
+
**Locations:** `001_agx_board_schema.sql:31` (check_rate_limit function)
|
|
338
|
+
|
|
339
|
+
### Before (PG)
|
|
340
|
+
```sql
|
|
341
|
+
v_window_start := date_trunc('minute', now()) -
|
|
342
|
+
((extract(minute from now())::int % (p_window_seconds / 60)) || ' minutes')::interval;
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### After (SQLite)
|
|
346
|
+
```sql
|
|
347
|
+
-- Compute window start in application code (recommended)
|
|
348
|
+
-- Or use strftime:
|
|
349
|
+
SELECT strftime('%Y-%m-%d %H:%M:00',
|
|
350
|
+
datetime('now', '-' || (strftime('%M','now') % (? / 60)) || ' minutes')
|
|
351
|
+
) AS window_start;
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
**Notes:** The entire `check_rate_limit` function should be moved to application code since SQLite lacks PL/pgSQL. Compute the window start in TypeScript and pass it as a parameter.
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## 12. json_populate_record() → Application-Level Deserialization
|
|
359
|
+
|
|
360
|
+
**Locations:** `src/graph/migration-job.ts:351`
|
|
361
|
+
|
|
362
|
+
### Before (PG)
|
|
363
|
+
```sql
|
|
364
|
+
SELECT * FROM json_populate_record(NULL::agx.tasks, $2::json);
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### After (SQLite)
|
|
368
|
+
```sql
|
|
369
|
+
-- No equivalent. Deserialize in application code:
|
|
370
|
+
-- const task = JSON.parse(jsonString);
|
|
371
|
+
-- Then construct INSERT from the parsed object.
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## 13. Schema Namespace (agx.) → Removed
|
|
377
|
+
|
|
378
|
+
**Locations:** All schema and query files
|
|
379
|
+
|
|
380
|
+
### Before (PG)
|
|
381
|
+
```sql
|
|
382
|
+
CREATE SCHEMA IF NOT EXISTS agx;
|
|
383
|
+
SELECT * FROM agx.tasks WHERE id = $1;
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
### After (SQLite)
|
|
387
|
+
```sql
|
|
388
|
+
-- SQLite has no schemas. Remove the agx. prefix.
|
|
389
|
+
SELECT * FROM tasks WHERE id = ?;
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## 14. Parameterized Query Placeholders
|
|
395
|
+
|
|
396
|
+
**Locations:** All query files
|
|
397
|
+
|
|
398
|
+
### Before (PG)
|
|
399
|
+
```sql
|
|
400
|
+
SELECT * FROM tasks WHERE id = $1 AND project_id = $2;
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### After (SQLite)
|
|
404
|
+
```sql
|
|
405
|
+
SELECT * FROM tasks WHERE id = ? AND project_id = ?;
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Notes:** SQLite uses positional `?` or `?NNN` (e.g., `?1`, `?2`). Most SQLite drivers for Node.js accept `?` placeholders.
|
|
409
|
+
|
|
410
|
+
---
|
|
411
|
+
|
|
412
|
+
## 15. Idempotency, Crash Recovery & Transaction Semantics
|
|
413
|
+
|
|
414
|
+
### 15.1 Enqueue Idempotency
|
|
415
|
+
|
|
416
|
+
Duplicate task submissions are rejected via a unique constraint on a deduplication key (e.g., `project_id + slug` or an explicit `dedup_key` column).
|
|
417
|
+
|
|
418
|
+
**PG:**
|
|
419
|
+
```sql
|
|
420
|
+
INSERT INTO agx.task_queue (task_id, action, dedup_key)
|
|
421
|
+
VALUES ($1, $2, $3)
|
|
422
|
+
ON CONFLICT (dedup_key) DO NOTHING
|
|
423
|
+
RETURNING id;
|
|
424
|
+
-- If RETURNING yields no rows → duplicate was silently ignored
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**SQLite:**
|
|
428
|
+
```sql
|
|
429
|
+
INSERT OR IGNORE INTO task_queue (task_id, action, dedup_key)
|
|
430
|
+
VALUES (?, ?, ?);
|
|
431
|
+
-- Check changes() to detect duplicate:
|
|
432
|
+
-- If changes() = 0, the row already existed (duplicate enqueue)
|
|
433
|
+
SELECT id FROM task_queue WHERE dedup_key = ?;
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
**Semantics:** Both engines treat duplicate enqueue as a no-op. The caller checks whether a row was actually inserted (PG: empty RETURNING; SQLite: `changes() = 0`) and returns the existing task ID.
|
|
437
|
+
|
|
438
|
+
### 15.2 Retry Idempotency with CAS (Compare-and-Swap)
|
|
439
|
+
|
|
440
|
+
Every state transition uses optimistic concurrency via the `version` column:
|
|
441
|
+
|
|
442
|
+
```sql
|
|
443
|
+
-- Claim a queued task for execution (identical SQL on both engines)
|
|
444
|
+
UPDATE tasks
|
|
445
|
+
SET stage = 'PROGRESS', version = version + 1, updated_at = datetime('now')
|
|
446
|
+
WHERE id = ? AND stage = 'QUEUED' AND version = ?;
|
|
447
|
+
-- rows_affected = 1 → successfully claimed
|
|
448
|
+
-- rows_affected = 0 → another worker claimed it or version changed → skip
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Duplicate retry scenario:** Worker A crashes after claiming task T (version 5→6). Worker B tries to claim the same task. Because T is now `stage = 'PROGRESS'` and `version = 6`, Worker B's `WHERE stage = 'QUEUED' AND version = 5` matches zero rows. The retry is safely rejected.
|
|
452
|
+
|
|
453
|
+
### 15.3 Crash Recovery Scenarios
|
|
454
|
+
|
|
455
|
+
| Scenario | State After Crash | Recovery Action |
|
|
456
|
+
|---|---|---|
|
|
457
|
+
| Worker crashes after claiming task | `stage='PROGRESS'`, stale `updated_at` | Reaper reclaims (see below) |
|
|
458
|
+
| Worker crashes mid-INSERT (before COMMIT) | Row never persisted | No cleanup needed — transaction rolled back |
|
|
459
|
+
| Worker crashes after completing work but before marking done | `stage='PROGRESS'`, work artifacts exist | Reaper reclaims; worker re-executes (must be idempotent) |
|
|
460
|
+
| DB crashes mid-WAL write | Partial WAL frames | SQLite WAL recovery replays committed frames on next open |
|
|
461
|
+
|
|
462
|
+
**Reaper query** (run periodically by a supervisor):
|
|
463
|
+
```sql
|
|
464
|
+
-- Reclaim tasks stuck in PROGRESS with no heartbeat for 5 minutes
|
|
465
|
+
UPDATE tasks
|
|
466
|
+
SET stage = 'QUEUED', version = version + 1, updated_at = datetime('now')
|
|
467
|
+
WHERE stage = 'PROGRESS'
|
|
468
|
+
AND updated_at < datetime('now', '-5 minutes');
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
The CAS version bump ensures that if the original worker is actually still alive (network partition, not a real crash), its next UPDATE will fail the version check and it will back off.
|
|
472
|
+
|
|
473
|
+
### 15.4 SQLite WAL Mode Configuration
|
|
474
|
+
|
|
475
|
+
SQLite **must** run in WAL (Write-Ahead Logging) mode for concurrent read/write access:
|
|
476
|
+
|
|
477
|
+
```sql
|
|
478
|
+
PRAGMA journal_mode = WAL; -- Enable WAL (persistent, set once)
|
|
479
|
+
PRAGMA busy_timeout = 5000; -- Wait up to 5s for locks instead of failing immediately
|
|
480
|
+
PRAGMA synchronous = NORMAL; -- Safe with WAL; FULL is unnecessary overhead
|
|
481
|
+
PRAGMA foreign_keys = ON; -- Not on by default in SQLite
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
**Why WAL matters:**
|
|
485
|
+
- **Without WAL** (default rollback journal): Readers block writers and writers block readers. A single slow read can stall all enqueue/dequeue operations.
|
|
486
|
+
- **With WAL:** Readers never block writers. Multiple readers can proceed concurrently with a single writer. This is essential for the task queue pattern where a reaper, workers, and the API all access the DB.
|
|
487
|
+
|
|
488
|
+
**Limitation:** SQLite allows only **one writer at a time**, even in WAL mode. Concurrent write transactions are serialized (one proceeds, others get `SQLITE_BUSY` and retry per `busy_timeout`). This is fine for single-node agx but prevents multi-process write scaling.
|
|
489
|
+
|
|
490
|
+
### 15.5 Transaction Isolation: PG MVCC vs SQLite Serialized
|
|
491
|
+
|
|
492
|
+
| Property | PostgreSQL | SQLite (WAL mode) |
|
|
493
|
+
|---|---|---|
|
|
494
|
+
| Default isolation | READ COMMITTED | SERIALIZED (effectively) |
|
|
495
|
+
| Concurrent readers | Yes (MVCC snapshots) | Yes (WAL snapshots) |
|
|
496
|
+
| Concurrent writers | Yes (row-level locks) | **No** — single writer at a time |
|
|
497
|
+
| Dirty reads | No | No |
|
|
498
|
+
| Phantom reads | Possible at READ COMMITTED | Not possible (serialized) |
|
|
499
|
+
| Deadlocks | Possible (detected + aborted) | Not possible (single writer) |
|
|
500
|
+
| Retry on conflict | Rare (row locks wait) | Common (`SQLITE_BUSY`) |
|
|
501
|
+
|
|
502
|
+
**Implications for agx:**
|
|
503
|
+
- **PG:** Multiple workers can claim different tasks concurrently via row-level locks. Two concurrent `UPDATE ... WHERE version = ?` on different rows both succeed.
|
|
504
|
+
- **SQLite:** Two concurrent writes serialize. The second writer waits (up to `busy_timeout`), then proceeds. For the CAS pattern, this is actually **safer** — no possibility of lost updates or deadlocks.
|
|
505
|
+
- **Application code must handle `SQLITE_BUSY`:** Wrap write operations in a retry loop (the `busy_timeout` PRAGMA handles most cases, but application-level retry with backoff is a safety net).
|
|
506
|
+
|
|
507
|
+
### 15.6 Idempotency Guarantees Summary
|
|
508
|
+
|
|
509
|
+
| Operation | Idempotency Mechanism | PG | SQLite |
|
|
510
|
+
|---|---|---|---|
|
|
511
|
+
| Enqueue task | `ON CONFLICT (dedup_key) DO NOTHING` | `RETURNING` empty = dup | `changes() = 0` = dup |
|
|
512
|
+
| Claim task | CAS: `WHERE version = ? AND stage = 'QUEUED'` | Same | Same |
|
|
513
|
+
| Complete task | CAS: `WHERE version = ? AND stage = 'PROGRESS'` | Same | Same |
|
|
514
|
+
| Retry after crash | Reaper bumps version, re-queues | Same | Same |
|
|
515
|
+
| Version increment | PG trigger / SQLite CAS in UPDATE | Trigger-based | Application CAS |
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
## 16. Error Code Mapping: PostgreSQL ↔ SQLite
|
|
520
|
+
|
|
521
|
+
| Error Condition | PostgreSQL | SQLite | Detection in Node.js |
|
|
522
|
+
|---|---|---|---|
|
|
523
|
+
| Unique violation | `23505` (`unique_violation`) | `SQLITE_CONSTRAINT_UNIQUE` (2067) | PG: `err.code === '23505'`; SQLite: `err.code === 'SQLITE_CONSTRAINT_UNIQUE'` |
|
|
524
|
+
| Foreign key violation | `23503` (`foreign_key_violation`) | `SQLITE_CONSTRAINT_FOREIGNKEY` (787) | PG: `err.code === '23503'`; SQLite: `err.code === 'SQLITE_CONSTRAINT_FOREIGNKEY'` |
|
|
525
|
+
| Not null violation | `23502` (`not_null_violation`) | `SQLITE_CONSTRAINT_NOTNULL` (1299) | PG: `err.code === '23502'`; SQLite: `err.code === 'SQLITE_CONSTRAINT_NOTNULL'` |
|
|
526
|
+
| Check constraint | `23514` (`check_violation`) | `SQLITE_CONSTRAINT_CHECK` (275) | PG: `err.code === '23514'`; SQLite: `err.code === 'SQLITE_CONSTRAINT_CHECK'` |
|
|
527
|
+
| Database locked / busy | `55P03` (`lock_not_available`) | `SQLITE_BUSY` (5) | PG: `err.code === '55P03'`; SQLite: `err.code === 'SQLITE_BUSY'` |
|
|
528
|
+
| Serialization failure | `40001` (`serialization_failure`) | N/A (single writer) | PG: `err.code === '40001'` → retry transaction |
|
|
529
|
+
| Deadlock | `40P01` (`deadlock_detected`) | N/A (single writer) | PG: `err.code === '40P01'` → retry transaction |
|
|
530
|
+
|
|
531
|
+
**Adapter pattern:** The DB adapter should normalize error codes into a common enum:
|
|
532
|
+
```typescript
|
|
533
|
+
enum DbError {
|
|
534
|
+
UNIQUE_VIOLATION = 'UNIQUE_VIOLATION',
|
|
535
|
+
FK_VIOLATION = 'FK_VIOLATION',
|
|
536
|
+
NOT_NULL_VIOLATION = 'NOT_NULL_VIOLATION',
|
|
537
|
+
BUSY = 'BUSY',
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
function classifyError(err: any, dialect: 'pg' | 'sqlite'): DbError | null {
|
|
541
|
+
if (dialect === 'pg') {
|
|
542
|
+
if (err.code === '23505') return DbError.UNIQUE_VIOLATION;
|
|
543
|
+
if (err.code === '23503') return DbError.FK_VIOLATION;
|
|
544
|
+
if (err.code === '23502') return DbError.NOT_NULL_VIOLATION;
|
|
545
|
+
if (err.code === '55P03' || err.code === '40001') return DbError.BUSY;
|
|
546
|
+
} else {
|
|
547
|
+
if (err.code === 'SQLITE_CONSTRAINT_UNIQUE') return DbError.UNIQUE_VIOLATION;
|
|
548
|
+
if (err.code === 'SQLITE_CONSTRAINT_FOREIGNKEY') return DbError.FK_VIOLATION;
|
|
549
|
+
if (err.code === 'SQLITE_CONSTRAINT_NOTNULL') return DbError.NOT_NULL_VIOLATION;
|
|
550
|
+
if (err.code === 'SQLITE_BUSY') return DbError.BUSY;
|
|
551
|
+
}
|
|
552
|
+
return null;
|
|
553
|
+
}
|
|
554
|
+
```
|