@mndrk/agx 2.0.38 → 2.0.40
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/{[externals]__986fcdb7._.js → [externals]__bc6c7111._.js} +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]__09ca81e1._.js +101 -0
- 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]__f9cff4b0._.js → [root-of-the-server]__1017e012._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1ac3236d._.js +25 -0
- 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]__762ab29c._.js → [root-of-the-server]__236c35bb._.js} +4 -4
- 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]__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]__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]__ab7343c8._.js → [root-of-the-server]__a1e62918._.js} +1 -1
- 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]__da3a1ce7._.js → [root-of-the-server]__dc542063._.js} +2 -2
- 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/_22fe5fd2._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_2492d514._.js +81 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_281e5787._.js +16 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_63067e21._.js +16 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_orchestrator_chat-processor_ts_4c335719._.js +134 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +82 -21
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_61a87db9._.js +1 -1
- package/cloud-runtime/standalone/.next/server/instrumentation.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 +34 -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-linuxmusl-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/.next/server/chunks/[root-of-the-server]__4bce7db7._.js +0 -101
- package/cloud-runtime/standalone/.next/server/chunks/_17e53c87._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +0 -94
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -221
- 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/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 → tIFXRWCxPD896ykJ6O--N}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{V5ruh627UpcC-LTWDgYk8 → tIFXRWCxPD896ykJ6O--N}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{V5ruh627UpcC-LTWDgYk8 → tIFXRWCxPD896ykJ6O--N}/_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,1047 @@
|
|
|
1
|
+
# Migrate better-sqlite3 → node:sqlite Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
|
4
|
+
|
|
5
|
+
**Goal:** Replace the `better-sqlite3` native addon with Node.js built-in `node:sqlite` (`DatabaseSync`) to eliminate native compilation and cross-platform distribution issues in both agx-cloud and agx CLI.
|
|
6
|
+
|
|
7
|
+
**Architecture:** Create a thin compatibility layer (`lib/sqlite-compat.ts`) that provides `pragma()`, `transaction()`, and `backup()` helpers matching the better-sqlite3 API surface. All files then import from `node:sqlite` directly for the `DatabaseSync` class and use the compat helpers where needed. This avoids touching every call site for pragmas/transactions while keeping the migration mechanical.
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** `node:sqlite` (DatabaseSync) — built into Node.js ≥ 22.16
|
|
10
|
+
|
|
11
|
+
**Runtime floor:** Node.js ≥ 22.16.0 (required — `readOnly` in 22.12, `--experimental-sqlite` flag removed in 22.13, `sqlite.backup()` added in 22.16). Enforced via `engines` field in all package.json files AND a hard preinstall version check that exits with a clear error on unsupported runtimes.
|
|
12
|
+
|
|
13
|
+
**Constraints:**
|
|
14
|
+
- `node:sqlite` has no `db.pragma()` method — use `db.exec("PRAGMA ...")` or `db.prepare("PRAGMA ...").get()`
|
|
15
|
+
- `node:sqlite` has no `db.transaction()` wrapper — need manual BEGIN/COMMIT/ROLLBACK
|
|
16
|
+
- `node:sqlite` has `backup(sourceDb, destPath)` as a module-level async function (not a method on db)
|
|
17
|
+
- `node:sqlite` `readOnly` option uses camelCase (not `readonly`)
|
|
18
|
+
- `DatabaseSync` results use `Object.create(null)` prototypes (no `hasOwnProperty` etc.)
|
|
19
|
+
- Constructor: `new DatabaseSync(path)` not `new Database(path)`
|
|
20
|
+
- Type: `DatabaseSync` not `Database.Database`
|
|
21
|
+
- `@types/node` already ships `node:sqlite` typings — do NOT create local type declarations
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## File Structure
|
|
26
|
+
|
|
27
|
+
### agx-cloud — New files
|
|
28
|
+
- `lib/sqlite-compat.ts` — Compat helpers: `pragma()`, `transaction()`
|
|
29
|
+
|
|
30
|
+
### agx-cloud — Modified files (imports + API calls)
|
|
31
|
+
1. `lib/sqlite-query-adapter.ts` — Singleton DB connection, import + constructor
|
|
32
|
+
2. `lib/startup.ts` — Pragma validation, import + all `db.pragma()` calls
|
|
33
|
+
3. `src/db/init.ts` — `applyPragmas()`, import + pragma calls
|
|
34
|
+
4. `src/db/checks.ts` — Extension/version checks, import + type
|
|
35
|
+
5. `src/db/backup.ts` — Backup/restore/checkpoint, import + backup rewrite
|
|
36
|
+
6. `lib/sqlite_writer.ts` — Batch writer, import + pragma + transaction
|
|
37
|
+
7. `lib/queue/sqlite-adapter.ts` — Job queue, import + pragma + transaction
|
|
38
|
+
8. `lib/history-store.ts` — Chat history, import + transaction
|
|
39
|
+
9. `lib/participants-store.ts` — Participant store, import + transaction
|
|
40
|
+
10. `lib/agent-process-registry.ts` — Process registry, import + pragma
|
|
41
|
+
11. `lib/attachment-store.ts` — Attachment store, import + pragma
|
|
42
|
+
12. `src/graph/store.ts` — Graph store, import type + pragma + transaction
|
|
43
|
+
13. `src/graph/schedule-runner.ts` — Import type only
|
|
44
|
+
14. `src/prompt-scheduler/store.ts` — Import type only
|
|
45
|
+
15. `lib/workspaces-to-projects-migration.ts` — Migration, import type + transaction
|
|
46
|
+
16. `lib/db-adapter.interface.ts` — Comment update (mentions better-sqlite3)
|
|
47
|
+
17. `mcp/src/db.ts` — MCP server DB, dynamic import + pragma
|
|
48
|
+
18. `app/api/system/db-status/route.ts` — Health check, import + pragma
|
|
49
|
+
19. `app/api/agents/[id]/messages/route.ts` — Messages API, import + pragma + readonly
|
|
50
|
+
20. `next.config.ts` — Remove `serverExternalPackages`
|
|
51
|
+
21. `scripts/fix-turbopack-externals.mjs` — DELETE this file
|
|
52
|
+
22. `package.json` — Remove `better-sqlite3` + `@types/better-sqlite3`
|
|
53
|
+
23. `components/errors/StartupGuard.tsx` — Update error message text (mentions better-sqlite3)
|
|
54
|
+
24. `components/errors/StartupGuardWrapper.tsx` — Update error message text
|
|
55
|
+
25. `__tests__/db/init.test.ts` — Test file, import + pragma assertions
|
|
56
|
+
26. `__tests__/prompt-scheduler/store.test.ts` — Test file, import + pragma
|
|
57
|
+
27. `__tests__/prompt-scheduler/engine.test.ts` — Test file, import + pragma
|
|
58
|
+
28. `__tests__/graph/store.test.ts` — Test file, pragma calls
|
|
59
|
+
29. `test/adapters/sqlite.ts` — Test adapter, import + constructor
|
|
60
|
+
30. `scripts/bench-queue.ts` — Benchmark script, import + pragma
|
|
61
|
+
31. `lib/repo-knowledge.ts` — transaction calls
|
|
62
|
+
32. `lib/knowledge-store.ts` — transaction calls
|
|
63
|
+
33. `lib/thread-knowledge-runs.ts` — transaction calls
|
|
64
|
+
|
|
65
|
+
### agx CLI — Modified files
|
|
66
|
+
1. `lib/storage/db.js` — Import + constructor + pragma + transaction
|
|
67
|
+
2. `lib/cli/onboarding.js` — Import + constructor + pragma
|
|
68
|
+
3. `package.json` — Remove `better-sqlite3`
|
|
69
|
+
4. `scripts/postinstall.js` — Remove native addon copying logic
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### Task 1: Create sqlite-compat.ts helper module (agx-cloud)
|
|
74
|
+
|
|
75
|
+
**Files:**
|
|
76
|
+
- Create: `agx-cloud/lib/sqlite-compat.ts`
|
|
77
|
+
|
|
78
|
+
- [ ] **Step 1: Write the compat module**
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
/**
|
|
82
|
+
* Compatibility helpers for migrating from better-sqlite3 to node:sqlite.
|
|
83
|
+
*
|
|
84
|
+
* Provides pragma() and transaction() helpers that match
|
|
85
|
+
* the better-sqlite3 API surface used throughout agx-cloud.
|
|
86
|
+
*
|
|
87
|
+
* For backups, use the module-level `backup()` from "node:sqlite" directly.
|
|
88
|
+
*/
|
|
89
|
+
import { DatabaseSync } from "node:sqlite";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Read a PRAGMA value, returning the value directly (like better-sqlite3's simple mode).
|
|
93
|
+
* Example: pragmaGet(db, "journal_mode") => "wal"
|
|
94
|
+
*/
|
|
95
|
+
export function pragmaGet(db: DatabaseSync, key: string): unknown {
|
|
96
|
+
const row = db.prepare(`PRAGMA ${key}`).get() as Record<string, unknown> | undefined;
|
|
97
|
+
if (!row) return undefined;
|
|
98
|
+
return row[key];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Read a PRAGMA that returns multiple rows (like table_info, foreign_key_check).
|
|
103
|
+
* Example: pragmaAll(db, "table_info(agents)") => [{ cid: 0, name: "id", ... }]
|
|
104
|
+
*/
|
|
105
|
+
export function pragmaAll(db: DatabaseSync, key: string): unknown[] {
|
|
106
|
+
return db.prepare(`PRAGMA ${key}`).all();
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Set a PRAGMA value.
|
|
111
|
+
* Example: pragmaSet(db, "journal_mode", "WAL")
|
|
112
|
+
* Example: pragmaSet(db, "journal_mode = WAL")
|
|
113
|
+
*/
|
|
114
|
+
export function pragmaSet(db: DatabaseSync, pragma: string): void {
|
|
115
|
+
db.exec(`PRAGMA ${pragma}`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Run a function inside a transaction. Mimics better-sqlite3's db.transaction() API.
|
|
120
|
+
* Automatically commits on success, rolls back on error.
|
|
121
|
+
*/
|
|
122
|
+
export function transaction<T>(db: DatabaseSync, fn: () => T): T {
|
|
123
|
+
db.exec("BEGIN");
|
|
124
|
+
try {
|
|
125
|
+
const result = fn();
|
|
126
|
+
db.exec("COMMIT");
|
|
127
|
+
return result;
|
|
128
|
+
} catch (err) {
|
|
129
|
+
db.exec("ROLLBACK");
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Returns a reusable transaction wrapper (like better-sqlite3's db.transaction(fn)).
|
|
136
|
+
* The returned function accepts args and passes them to fn.
|
|
137
|
+
*/
|
|
138
|
+
export function transactionFn<TArgs extends unknown[], TResult>(
|
|
139
|
+
db: DatabaseSync,
|
|
140
|
+
fn: (...args: TArgs) => TResult,
|
|
141
|
+
): (...args: TArgs) => TResult {
|
|
142
|
+
return (...args: TArgs) => {
|
|
143
|
+
db.exec("BEGIN");
|
|
144
|
+
try {
|
|
145
|
+
const result = fn(...args);
|
|
146
|
+
db.exec("COMMIT");
|
|
147
|
+
return result;
|
|
148
|
+
} catch (err) {
|
|
149
|
+
db.exec("ROLLBACK");
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
- [ ] **Step 2: Verify the module compiles**
|
|
158
|
+
|
|
159
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npx tsc --noEmit lib/sqlite-compat.ts --esModuleInterop --module nodenext --moduleResolution nodenext --target es2022 --skipLibCheck 2>&1 | head -20`
|
|
160
|
+
|
|
161
|
+
Note: This may show errors about node:sqlite types — that's expected since @types/node may need updating. The runtime works; type errors will be addressed in Task 2.
|
|
162
|
+
|
|
163
|
+
- [ ] **Step 3: Commit**
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
167
|
+
git add lib/sqlite-compat.ts
|
|
168
|
+
git commit -m "feat: add node:sqlite compatibility helpers for better-sqlite3 migration"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### Task 2: Enforce Node.js ≥ 22.16 runtime floor
|
|
174
|
+
|
|
175
|
+
The migration requires Node ≥ 22.16 (`readOnly` in 22.12, `--experimental-sqlite` removed in 22.13, `sqlite.backup()` added in 22.16). Add `engines` to all three package.json files AND a hard preinstall version check — `engines` alone is advisory unless the user has `engine-strict` enabled.
|
|
176
|
+
|
|
177
|
+
`@types/node` already ships `node:sqlite` typings in this repo — no local type declarations needed.
|
|
178
|
+
|
|
179
|
+
**Files:**
|
|
180
|
+
- Modify: `agx-cloud/package.json`
|
|
181
|
+
- Modify: `agx-cloud/mcp/package.json`
|
|
182
|
+
- Modify: `agx/package.json`
|
|
183
|
+
- Modify: `agx/scripts/postinstall.js`
|
|
184
|
+
- Modify: `agx-cloud/instrumentation.ts`
|
|
185
|
+
- Modify: `agx-cloud/worker/index.ts`
|
|
186
|
+
- Modify: `agx-cloud/mcp/src/index.ts`
|
|
187
|
+
|
|
188
|
+
- [ ] **Step 1: Add engines to agx-cloud/package.json**
|
|
189
|
+
|
|
190
|
+
Add to the top level:
|
|
191
|
+
```json
|
|
192
|
+
"engines": {
|
|
193
|
+
"node": ">=22.16.0"
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
- [ ] **Step 2: Add engines to agx-cloud/mcp/package.json**
|
|
198
|
+
|
|
199
|
+
Add to the top level:
|
|
200
|
+
```json
|
|
201
|
+
"engines": {
|
|
202
|
+
"node": ">=22.16.0"
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
- [ ] **Step 3: Add engines to agx/package.json**
|
|
207
|
+
|
|
208
|
+
Add to the top level:
|
|
209
|
+
```json
|
|
210
|
+
"engines": {
|
|
211
|
+
"node": ">=22.16.0"
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- [ ] **Step 4: Add a hard preinstall version check to agx CLI**
|
|
216
|
+
|
|
217
|
+
The agx CLI is distributed via npm — `engines` won't block installs by default. Add a `preinstall` script that exits with a clear error:
|
|
218
|
+
|
|
219
|
+
In `agx/package.json`, add:
|
|
220
|
+
```json
|
|
221
|
+
"scripts": {
|
|
222
|
+
"preinstall": "node -e \"var v=process.versions.node.split('.').map(Number);if(v[0]<22||(v[0]===22&&v[1]<16)){console.error('agx requires Node.js >= 22.16.0 (found '+process.version+'). node:sqlite is not available on older versions.');process.exit(1)}\""
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
- [ ] **Step 5: Add a bootstrap version guard for agx-cloud**
|
|
227
|
+
|
|
228
|
+
agx-cloud is self-hosted, not npm-distributed. The guard **cannot** live in `lib/startup.ts` because that file will statically import `node:sqlite` after Task 4 — Node resolves imports before executing module code, so the process would crash before reaching the check.
|
|
229
|
+
|
|
230
|
+
Create a dedicated bootstrap module that runs before any `node:sqlite` import:
|
|
231
|
+
|
|
232
|
+
Create `agx-cloud/lib/check-node-version.ts`:
|
|
233
|
+
```typescript
|
|
234
|
+
const [major, minor] = process.versions.node.split(".").map(Number);
|
|
235
|
+
if (major < 22 || (major === 22 && minor < 16)) {
|
|
236
|
+
console.error(
|
|
237
|
+
`agx-cloud requires Node.js >= 22.16.0 (found ${process.version}). ` +
|
|
238
|
+
`node:sqlite is not available on older versions.`
|
|
239
|
+
);
|
|
240
|
+
process.exit(1);
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Then import it as the **first line** of the Next.js instrumentation hook (`instrumentation.ts` or the app entry point) so it runs before any other module loads:
|
|
245
|
+
```typescript
|
|
246
|
+
import "./lib/check-node-version";
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
This module must NOT import `node:sqlite` or any module that transitively imports it.
|
|
250
|
+
|
|
251
|
+
agx-cloud also has a standalone worker entrypoint (`worker/index.ts` via `npm run worker`). Import the same guard as the **first line** there too, before any queue or DB imports:
|
|
252
|
+
```typescript
|
|
253
|
+
import "@/lib/check-node-version";
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
- [ ] **Step 6: Add a bootstrap version guard for MCP**
|
|
257
|
+
|
|
258
|
+
The MCP package is separately runnable. Add the same guard to `mcp/src/index.ts` as the first import:
|
|
259
|
+
|
|
260
|
+
Create `agx-cloud/mcp/src/check-node-version.ts`:
|
|
261
|
+
```typescript
|
|
262
|
+
const [major, minor] = process.versions.node.split(".").map(Number);
|
|
263
|
+
if (major < 22 || (major === 22 && minor < 16)) {
|
|
264
|
+
console.error(
|
|
265
|
+
`agx-mcp requires Node.js >= 22.16.0 (found ${process.version}). ` +
|
|
266
|
+
`node:sqlite is not available on older versions.`
|
|
267
|
+
);
|
|
268
|
+
process.exit(1);
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Import as the first line of `mcp/src/index.ts`:
|
|
273
|
+
```typescript
|
|
274
|
+
import "./check-node-version";
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
- [ ] **Step 7: Commit**
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
281
|
+
git add package.json mcp/package.json instrumentation.ts worker/index.ts mcp/src/index.ts \
|
|
282
|
+
lib/check-node-version.ts mcp/src/check-node-version.ts
|
|
283
|
+
git commit -m "chore: enforce Node.js >= 22.16 runtime floor for node:sqlite migration"
|
|
284
|
+
|
|
285
|
+
cd /Users/mendrika/Projects/Agents/agx
|
|
286
|
+
git add package.json
|
|
287
|
+
git commit -m "chore: enforce Node.js >= 22.16 runtime floor for node:sqlite migration"
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### Task 3: Migrate core DB init layer (agx-cloud)
|
|
293
|
+
|
|
294
|
+
**Files:**
|
|
295
|
+
- Modify: `agx-cloud/src/db/checks.ts`
|
|
296
|
+
- Modify: `agx-cloud/src/db/init.ts`
|
|
297
|
+
- Modify: `agx-cloud/__tests__/db/init.test.ts`
|
|
298
|
+
|
|
299
|
+
- [ ] **Step 1: Migrate `src/db/checks.ts`**
|
|
300
|
+
|
|
301
|
+
Replace:
|
|
302
|
+
```typescript
|
|
303
|
+
import Database from "better-sqlite3";
|
|
304
|
+
```
|
|
305
|
+
With:
|
|
306
|
+
```typescript
|
|
307
|
+
import { DatabaseSync } from "node:sqlite";
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Replace all `Database.Database` type references with `DatabaseSync`.
|
|
311
|
+
|
|
312
|
+
The `checkVersion`, `checkExtensions`, `checkFilesystem` functions use `db.prepare()`, `db.exec()`, `db.prepare().get()` — these are identical in node:sqlite. No logic changes needed.
|
|
313
|
+
|
|
314
|
+
- [ ] **Step 2: Migrate `src/db/init.ts`**
|
|
315
|
+
|
|
316
|
+
Replace:
|
|
317
|
+
```typescript
|
|
318
|
+
import Database from "better-sqlite3";
|
|
319
|
+
```
|
|
320
|
+
With:
|
|
321
|
+
```typescript
|
|
322
|
+
import { DatabaseSync } from "node:sqlite";
|
|
323
|
+
import { pragmaGet, pragmaSet } from "@/lib/sqlite-compat";
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Update `applyPragmas`:
|
|
327
|
+
```typescript
|
|
328
|
+
export function applyPragmas(db: DatabaseSync, opts?: InitOptions): void {
|
|
329
|
+
pragmaSet(db, "journal_mode = WAL");
|
|
330
|
+
const jm = String(pragmaGet(db, "journal_mode")).toLowerCase();
|
|
331
|
+
if (jm !== "wal") {
|
|
332
|
+
pragmaSet(db, "journal_mode = DELETE");
|
|
333
|
+
pragmaSet(db, "synchronous = FULL");
|
|
334
|
+
console.warn(`[db/init] WAL unavailable (got '${jm}'), using DELETE with synchronous=FULL`);
|
|
335
|
+
} else {
|
|
336
|
+
pragmaSet(db, `synchronous = ${opts?.synchronous ?? "NORMAL"}`);
|
|
337
|
+
}
|
|
338
|
+
pragmaSet(db, "foreign_keys = ON");
|
|
339
|
+
pragmaSet(db, `busy_timeout = ${opts?.busyTimeout ?? 5000}`);
|
|
340
|
+
pragmaSet(db, `cache_size = ${opts?.cacheSize ?? -64000}`);
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Update `initDatabase`:
|
|
345
|
+
```typescript
|
|
346
|
+
export function initDatabase(
|
|
347
|
+
dbPath: string,
|
|
348
|
+
opts?: InitOptions
|
|
349
|
+
): DatabaseSync {
|
|
350
|
+
checkFilesystem(dbPath, { strict: opts?.strictFsCheck });
|
|
351
|
+
const db = new DatabaseSync(dbPath);
|
|
352
|
+
try {
|
|
353
|
+
checkVersion(db);
|
|
354
|
+
checkExtensions(db, { requireFts5: opts?.requireFts5 });
|
|
355
|
+
applyPragmas(db, opts);
|
|
356
|
+
} catch (err) {
|
|
357
|
+
db.close();
|
|
358
|
+
throw err;
|
|
359
|
+
}
|
|
360
|
+
return db;
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
- [ ] **Step 3: Migrate `__tests__/db/init.test.ts`**
|
|
365
|
+
|
|
366
|
+
Replace:
|
|
367
|
+
```typescript
|
|
368
|
+
import Database from "better-sqlite3";
|
|
369
|
+
```
|
|
370
|
+
With:
|
|
371
|
+
```typescript
|
|
372
|
+
import { DatabaseSync } from "node:sqlite";
|
|
373
|
+
import { pragmaGet } from "@/lib/sqlite-compat";
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
Replace all `new Database(...)` with `new DatabaseSync(...)`.
|
|
377
|
+
|
|
378
|
+
Replace pragma assertions like:
|
|
379
|
+
```typescript
|
|
380
|
+
expect(db.pragma("journal_mode", { simple: true })).toBe("wal");
|
|
381
|
+
```
|
|
382
|
+
With:
|
|
383
|
+
```typescript
|
|
384
|
+
expect(pragmaGet(db, "journal_mode")).toBe("wal");
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Replace:
|
|
388
|
+
```typescript
|
|
389
|
+
expect(db.pragma("foreign_keys", { simple: true })).toBe(1);
|
|
390
|
+
```
|
|
391
|
+
With:
|
|
392
|
+
```typescript
|
|
393
|
+
expect(pragmaGet(db, "foreign_keys")).toBe(1);
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Do the same for `busy_timeout`, `synchronous`, `cache_size` assertions.
|
|
397
|
+
|
|
398
|
+
- [ ] **Step 4: Run the tests**
|
|
399
|
+
|
|
400
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npx jest __tests__/db/init.test.ts --no-coverage 2>&1`
|
|
401
|
+
Expected: All tests pass
|
|
402
|
+
|
|
403
|
+
- [ ] **Step 5: Commit**
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
407
|
+
git add src/db/checks.ts src/db/init.ts __tests__/db/init.test.ts
|
|
408
|
+
git commit -m "refactor: migrate db init layer from better-sqlite3 to node:sqlite"
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
### Task 4: Migrate startup.ts (agx-cloud)
|
|
414
|
+
|
|
415
|
+
**Files:**
|
|
416
|
+
- Modify: `agx-cloud/lib/startup.ts`
|
|
417
|
+
|
|
418
|
+
- [ ] **Step 1: Update imports**
|
|
419
|
+
|
|
420
|
+
Replace:
|
|
421
|
+
```typescript
|
|
422
|
+
import Database from "better-sqlite3";
|
|
423
|
+
```
|
|
424
|
+
With:
|
|
425
|
+
```typescript
|
|
426
|
+
import { DatabaseSync } from "node:sqlite";
|
|
427
|
+
import { pragmaGet, pragmaSet } from "./sqlite-compat";
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
- [ ] **Step 2: Replace all `Database.Database` types with `DatabaseSync`**
|
|
431
|
+
|
|
432
|
+
Update function signatures: `checkExtension`, `validateSQLiteEnvironment`, `backupDatabase`.
|
|
433
|
+
|
|
434
|
+
- [ ] **Step 3: Replace all pragma calls**
|
|
435
|
+
|
|
436
|
+
Replace patterns like:
|
|
437
|
+
```typescript
|
|
438
|
+
db.pragma(`journal_mode = ${REQUIRED_PRAGMAS.journal_mode}`);
|
|
439
|
+
```
|
|
440
|
+
With:
|
|
441
|
+
```typescript
|
|
442
|
+
pragmaSet(db, `journal_mode = ${REQUIRED_PRAGMAS.journal_mode}`);
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Replace pragma reads like:
|
|
446
|
+
```typescript
|
|
447
|
+
const jm = (db.pragma("journal_mode", { simple: true }) as string).toLowerCase();
|
|
448
|
+
```
|
|
449
|
+
With:
|
|
450
|
+
```typescript
|
|
451
|
+
const jm = String(pragmaGet(db, "journal_mode")).toLowerCase();
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
- [ ] **Step 4: Replace backup function**
|
|
455
|
+
|
|
456
|
+
Replace:
|
|
457
|
+
```typescript
|
|
458
|
+
export async function backupDatabase(db: Database.Database, destPath: string): Promise<void> {
|
|
459
|
+
db.pragma("wal_checkpoint(TRUNCATE)");
|
|
460
|
+
await db.backup(destPath);
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
With:
|
|
464
|
+
```typescript
|
|
465
|
+
import { backup as sqliteBackup } from "node:sqlite";
|
|
466
|
+
|
|
467
|
+
export async function backupDatabase(db: DatabaseSync, destPath: string): Promise<void> {
|
|
468
|
+
db.exec("PRAGMA wal_checkpoint(TRUNCATE)");
|
|
469
|
+
await sqliteBackup(db, destPath);
|
|
470
|
+
}
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
Same async signature, same online-backup semantics — `backup()` is a module-level function in `node:sqlite`.
|
|
474
|
+
|
|
475
|
+
- [ ] **Step 5: Update the fix suggestion in error messages**
|
|
476
|
+
|
|
477
|
+
Replace any text mentioning `npm rebuild better-sqlite3` with guidance about Node.js version:
|
|
478
|
+
```typescript
|
|
479
|
+
fix: "Ensure Node.js >= 22.16 is installed (node:sqlite is built-in)"
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
- [ ] **Step 6: Commit**
|
|
483
|
+
|
|
484
|
+
```bash
|
|
485
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
486
|
+
git add lib/startup.ts
|
|
487
|
+
git commit -m "refactor: migrate startup.ts from better-sqlite3 to node:sqlite"
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
### Task 5: Migrate backup.ts (agx-cloud)
|
|
493
|
+
|
|
494
|
+
**Files:**
|
|
495
|
+
- Modify: `agx-cloud/src/db/backup.ts`
|
|
496
|
+
|
|
497
|
+
- [ ] **Step 1: Update imports and types**
|
|
498
|
+
|
|
499
|
+
Replace:
|
|
500
|
+
```typescript
|
|
501
|
+
import Database from "better-sqlite3";
|
|
502
|
+
```
|
|
503
|
+
With:
|
|
504
|
+
```typescript
|
|
505
|
+
import { DatabaseSync } from "node:sqlite";
|
|
506
|
+
import { pragmaGet, pragmaAll } from "@/lib/sqlite-compat";
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
Replace all `Database.Database` with `DatabaseSync`.
|
|
510
|
+
|
|
511
|
+
- [ ] **Step 2: Rewrite `backup()` function**
|
|
512
|
+
|
|
513
|
+
`node:sqlite` exposes `backup(sourceDb, destPath)` as a module-level async function that uses the SQLite Online Backup API — same semantics as better-sqlite3's `db.backup()`. Import it and use directly:
|
|
514
|
+
|
|
515
|
+
```typescript
|
|
516
|
+
import { DatabaseSync, backup as sqliteBackup } from "node:sqlite";
|
|
517
|
+
|
|
518
|
+
export async function backup(
|
|
519
|
+
db: DatabaseSync,
|
|
520
|
+
opts: BackupOptions
|
|
521
|
+
): Promise<string> {
|
|
522
|
+
if (!fs.existsSync(opts.backupDir)) {
|
|
523
|
+
fs.mkdirSync(opts.backupDir, { recursive: true });
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
527
|
+
const backupPath = path.join(opts.backupDir, `backup-${timestamp}.db`);
|
|
528
|
+
|
|
529
|
+
// Online backup — consistent snapshot without stopping writes
|
|
530
|
+
await sqliteBackup(db, backupPath);
|
|
531
|
+
|
|
532
|
+
// Prune old backups
|
|
533
|
+
const maxBackups = opts.maxBackups ?? DEFAULT_MAX_BACKUPS;
|
|
534
|
+
const files = fs
|
|
535
|
+
.readdirSync(opts.backupDir)
|
|
536
|
+
.filter((f) => f.startsWith("backup-") && f.endsWith(".db"))
|
|
537
|
+
.sort();
|
|
538
|
+
|
|
539
|
+
while (files.length > maxBackups) {
|
|
540
|
+
const oldest = files.shift()!;
|
|
541
|
+
fs.unlinkSync(path.join(opts.backupDir, oldest));
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
return backupPath;
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
Signature stays async, no `dbPath` parameter needed — same caller contract as before.
|
|
549
|
+
|
|
550
|
+
- [ ] **Step 3: Update `restore()` function**
|
|
551
|
+
|
|
552
|
+
Replace `new Database(targetDbPath)` with `new DatabaseSync(targetDbPath)`.
|
|
553
|
+
Replace `db.pragma("integrity_check")` with `pragmaAll(db, "integrity_check")`.
|
|
554
|
+
|
|
555
|
+
```typescript
|
|
556
|
+
export function restore(
|
|
557
|
+
backupPath: string,
|
|
558
|
+
targetDbPath: string
|
|
559
|
+
): DatabaseSync {
|
|
560
|
+
if (!fs.existsSync(backupPath)) {
|
|
561
|
+
throw new Error(`Backup file not found: ${backupPath}`);
|
|
562
|
+
}
|
|
563
|
+
for (const suffix of ["", "-wal", "-shm"]) {
|
|
564
|
+
const filePath = targetDbPath + suffix;
|
|
565
|
+
if (fs.existsSync(filePath)) {
|
|
566
|
+
fs.unlinkSync(filePath);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
fs.copyFileSync(backupPath, targetDbPath);
|
|
570
|
+
|
|
571
|
+
const db = new DatabaseSync(targetDbPath);
|
|
572
|
+
const result = pragmaAll(db, "integrity_check") as { integrity_check: string }[];
|
|
573
|
+
const status = result[0]?.integrity_check ?? "unknown";
|
|
574
|
+
if (status !== "ok") {
|
|
575
|
+
db.close();
|
|
576
|
+
throw new Error(`Integrity check failed after restore: ${status}`);
|
|
577
|
+
}
|
|
578
|
+
return db;
|
|
579
|
+
}
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
- [ ] **Step 4: Update `checkpoint()` function**
|
|
583
|
+
|
|
584
|
+
Replace:
|
|
585
|
+
```typescript
|
|
586
|
+
db.pragma(`wal_checkpoint(${mode})`);
|
|
587
|
+
```
|
|
588
|
+
With:
|
|
589
|
+
```typescript
|
|
590
|
+
db.exec(`PRAGMA wal_checkpoint(${mode})`);
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
- [ ] **Step 5: Commit**
|
|
594
|
+
|
|
595
|
+
```bash
|
|
596
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
597
|
+
git add src/db/backup.ts
|
|
598
|
+
git commit -m "refactor: migrate backup.ts from better-sqlite3 to node:sqlite"
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
---
|
|
602
|
+
|
|
603
|
+
### Task 6: Migrate sqlite-query-adapter.ts (agx-cloud)
|
|
604
|
+
|
|
605
|
+
**Files:**
|
|
606
|
+
- Modify: `agx-cloud/lib/sqlite-query-adapter.ts`
|
|
607
|
+
|
|
608
|
+
- [ ] **Step 1: Update import and singleton type**
|
|
609
|
+
|
|
610
|
+
Replace:
|
|
611
|
+
```typescript
|
|
612
|
+
import Database from "better-sqlite3";
|
|
613
|
+
```
|
|
614
|
+
With:
|
|
615
|
+
```typescript
|
|
616
|
+
import { DatabaseSync } from "node:sqlite";
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
Replace:
|
|
620
|
+
```typescript
|
|
621
|
+
let _db: Database.Database | null = null;
|
|
622
|
+
export function getSQLiteDb(): Database.Database {
|
|
623
|
+
```
|
|
624
|
+
With:
|
|
625
|
+
```typescript
|
|
626
|
+
let _db: DatabaseSync | null = null;
|
|
627
|
+
export function getSQLiteDb(): DatabaseSync {
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
Replace `new Database(dbPath)` with `new DatabaseSync(dbPath)`.
|
|
631
|
+
|
|
632
|
+
- [ ] **Step 2: Update pragma calls in the file**
|
|
633
|
+
|
|
634
|
+
Search for any `db.pragma(` calls and replace with `pragmaGet`/`pragmaAll`/`pragmaSet` from `./sqlite-compat`. Common ones:
|
|
635
|
+
- `db.pragma("table_info(...)")` → `pragmaAll(db, "table_info(...)")`
|
|
636
|
+
|
|
637
|
+
- [ ] **Step 3: Run type check**
|
|
638
|
+
|
|
639
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npx tsc --noEmit 2>&1 | head -30`
|
|
640
|
+
|
|
641
|
+
- [ ] **Step 4: Commit**
|
|
642
|
+
|
|
643
|
+
```bash
|
|
644
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
645
|
+
git add lib/sqlite-query-adapter.ts
|
|
646
|
+
git commit -m "refactor: migrate sqlite-query-adapter.ts from better-sqlite3 to node:sqlite"
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
---
|
|
650
|
+
|
|
651
|
+
### Task 7: Migrate transaction-heavy files (agx-cloud)
|
|
652
|
+
|
|
653
|
+
**Files:**
|
|
654
|
+
- Modify: `agx-cloud/lib/sqlite_writer.ts`
|
|
655
|
+
- Modify: `agx-cloud/lib/queue/sqlite-adapter.ts`
|
|
656
|
+
- Modify: `agx-cloud/lib/history-store.ts`
|
|
657
|
+
- Modify: `agx-cloud/lib/participants-store.ts`
|
|
658
|
+
- Modify: `agx-cloud/lib/workspaces-to-projects-migration.ts`
|
|
659
|
+
- Modify: `agx-cloud/src/graph/store.ts`
|
|
660
|
+
- Modify: `agx-cloud/lib/repo-knowledge.ts`
|
|
661
|
+
- Modify: `agx-cloud/lib/knowledge-store.ts`
|
|
662
|
+
- Modify: `agx-cloud/lib/thread-knowledge-runs.ts`
|
|
663
|
+
|
|
664
|
+
For each file:
|
|
665
|
+
|
|
666
|
+
- [ ] **Step 1: Update imports**
|
|
667
|
+
|
|
668
|
+
Replace `import Database from "better-sqlite3"` or `import type Database from "better-sqlite3"` with:
|
|
669
|
+
```typescript
|
|
670
|
+
import { DatabaseSync } from "node:sqlite";
|
|
671
|
+
// or for type-only:
|
|
672
|
+
import type { DatabaseSync } from "node:sqlite";
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
Add compat imports where needed:
|
|
676
|
+
```typescript
|
|
677
|
+
import { transaction, transactionFn, pragmaSet, pragmaGet, pragmaAll } from "@/lib/sqlite-compat";
|
|
678
|
+
// or relative path depending on file location
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
- [ ] **Step 2: Replace `Database.Database` types with `DatabaseSync`**
|
|
682
|
+
|
|
683
|
+
Global find-replace within each file.
|
|
684
|
+
|
|
685
|
+
- [ ] **Step 3: Replace `new Database(...)` with `new DatabaseSync(...)`**
|
|
686
|
+
|
|
687
|
+
- [ ] **Step 4: Replace pragma calls**
|
|
688
|
+
|
|
689
|
+
- `db.pragma("key = value")` → `pragmaSet(db, "key = value")`
|
|
690
|
+
- `db.pragma("key", { simple: true })` → `pragmaGet(db, "key")`
|
|
691
|
+
- `db.pragma("table_info(x)")` → `pragmaAll(db, "table_info(x)")`
|
|
692
|
+
- `db.pragma("foreign_key_check")` → `pragmaAll(db, "foreign_key_check")`
|
|
693
|
+
|
|
694
|
+
- [ ] **Step 5: Replace transaction calls**
|
|
695
|
+
|
|
696
|
+
Pattern A — immediate execution:
|
|
697
|
+
```typescript
|
|
698
|
+
// Before:
|
|
699
|
+
db.transaction(() => { ... })();
|
|
700
|
+
// After:
|
|
701
|
+
transaction(db, () => { ... });
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
Pattern B — parameterized transaction:
|
|
705
|
+
```typescript
|
|
706
|
+
// Before:
|
|
707
|
+
const tx = db.transaction((args: Type) => { ... });
|
|
708
|
+
tx(args);
|
|
709
|
+
// After:
|
|
710
|
+
const tx = transactionFn(db, (args: Type) => { ... });
|
|
711
|
+
tx(args);
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
Pattern C — inline transaction with return:
|
|
715
|
+
```typescript
|
|
716
|
+
// Before:
|
|
717
|
+
const result = db.transaction(() => { ...; return value; })();
|
|
718
|
+
// After:
|
|
719
|
+
const result = transaction(db, () => { ...; return value; });
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
- [ ] **Step 6: Run type check**
|
|
723
|
+
|
|
724
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npx tsc --noEmit 2>&1 | head -50`
|
|
725
|
+
|
|
726
|
+
- [ ] **Step 7: Commit**
|
|
727
|
+
|
|
728
|
+
```bash
|
|
729
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
730
|
+
git add lib/sqlite_writer.ts lib/queue/sqlite-adapter.ts lib/history-store.ts \
|
|
731
|
+
lib/participants-store.ts lib/workspaces-to-projects-migration.ts \
|
|
732
|
+
src/graph/store.ts lib/repo-knowledge.ts lib/knowledge-store.ts \
|
|
733
|
+
lib/thread-knowledge-runs.ts
|
|
734
|
+
git commit -m "refactor: migrate transaction-heavy files from better-sqlite3 to node:sqlite"
|
|
735
|
+
```
|
|
736
|
+
|
|
737
|
+
---
|
|
738
|
+
|
|
739
|
+
### Task 8: Migrate remaining files (agx-cloud)
|
|
740
|
+
|
|
741
|
+
**Files:**
|
|
742
|
+
- Modify: `agx-cloud/lib/agent-process-registry.ts`
|
|
743
|
+
- Modify: `agx-cloud/lib/attachment-store.ts`
|
|
744
|
+
- Modify: `agx-cloud/mcp/src/db.ts`
|
|
745
|
+
- Modify: `agx-cloud/app/api/system/db-status/route.ts`
|
|
746
|
+
- Modify: `agx-cloud/app/api/agents/[id]/messages/route.ts`
|
|
747
|
+
- Modify: `agx-cloud/src/graph/schedule-runner.ts`
|
|
748
|
+
- Modify: `agx-cloud/src/prompt-scheduler/store.ts`
|
|
749
|
+
- Modify: `agx-cloud/lib/db-adapter.interface.ts`
|
|
750
|
+
- Modify: `agx-cloud/scripts/bench-queue.ts`
|
|
751
|
+
|
|
752
|
+
- [ ] **Step 1: Migrate each file**
|
|
753
|
+
|
|
754
|
+
Apply the same patterns as Task 7:
|
|
755
|
+
- Update imports from `better-sqlite3` to `node:sqlite`
|
|
756
|
+
- Replace `Database.Database` with `DatabaseSync`
|
|
757
|
+
- Replace `new Database(...)` with `new DatabaseSync(...)`
|
|
758
|
+
- Replace pragma calls with compat helpers
|
|
759
|
+
- Note: `{ readonly: true }` → `{ readOnly: true }` in messages route
|
|
760
|
+
|
|
761
|
+
For `mcp/src/db.ts`, replace:
|
|
762
|
+
```typescript
|
|
763
|
+
const Database = (await import("better-sqlite3")).default;
|
|
764
|
+
```
|
|
765
|
+
With:
|
|
766
|
+
```typescript
|
|
767
|
+
const { DatabaseSync } = await import("node:sqlite");
|
|
768
|
+
```
|
|
769
|
+
And `new Database(...)` → `new DatabaseSync(...)`.
|
|
770
|
+
|
|
771
|
+
For `db-adapter.interface.ts`, update the comment mentioning `better-sqlite3 Database` to `node:sqlite DatabaseSync`.
|
|
772
|
+
|
|
773
|
+
- [ ] **Step 2: Run type check for root project**
|
|
774
|
+
|
|
775
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npx tsc --noEmit 2>&1 | head -50`
|
|
776
|
+
|
|
777
|
+
- [ ] **Step 3: Run type check for MCP subpackage**
|
|
778
|
+
|
|
779
|
+
The root tsconfig excludes `mcp/`. Type-check it separately:
|
|
780
|
+
|
|
781
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud/mcp && npx tsc --noEmit 2>&1 | head -30`
|
|
782
|
+
|
|
783
|
+
If mcp has no tsconfig, run: `cd /Users/mendrika/Projects/Agents/agx-cloud/mcp && npx tsc --noEmit src/db.ts --esModuleInterop --module nodenext --moduleResolution nodenext --target es2022 --skipLibCheck 2>&1 | head -30`
|
|
784
|
+
|
|
785
|
+
- [ ] **Step 4: Verify bench-queue script compiles**
|
|
786
|
+
|
|
787
|
+
The root tsconfig also excludes `scripts/`. Use a no-emit compile check — do NOT execute the script as it has top-level side effects (creates/deletes DB files, runs benchmarks):
|
|
788
|
+
|
|
789
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npx tsc --noEmit --esModuleInterop --module nodenext --moduleResolution nodenext --target es2022 --skipLibCheck scripts/bench-queue.ts 2>&1 | head -20`
|
|
790
|
+
|
|
791
|
+
- [ ] **Step 5: Commit**
|
|
792
|
+
|
|
793
|
+
```bash
|
|
794
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
795
|
+
git add lib/agent-process-registry.ts lib/attachment-store.ts mcp/src/db.ts \
|
|
796
|
+
app/api/system/db-status/route.ts "app/api/agents/[id]/messages/route.ts" \
|
|
797
|
+
src/graph/schedule-runner.ts src/prompt-scheduler/store.ts \
|
|
798
|
+
lib/db-adapter.interface.ts scripts/bench-queue.ts
|
|
799
|
+
git commit -m "refactor: migrate remaining files from better-sqlite3 to node:sqlite"
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
---
|
|
803
|
+
|
|
804
|
+
### Task 9: Migrate test files (agx-cloud)
|
|
805
|
+
|
|
806
|
+
**Files:**
|
|
807
|
+
- Modify: `agx-cloud/__tests__/prompt-scheduler/store.test.ts`
|
|
808
|
+
- Modify: `agx-cloud/__tests__/prompt-scheduler/engine.test.ts`
|
|
809
|
+
- Modify: `agx-cloud/__tests__/graph/store.test.ts`
|
|
810
|
+
- Modify: `agx-cloud/test/adapters/sqlite.ts`
|
|
811
|
+
|
|
812
|
+
- [ ] **Step 1: Update imports in all test files**
|
|
813
|
+
|
|
814
|
+
Replace `import Database from 'better-sqlite3'` with `import { DatabaseSync } from 'node:sqlite'`.
|
|
815
|
+
Replace `new Database(...)` with `new DatabaseSync(...)`.
|
|
816
|
+
Replace pragma calls with compat helpers.
|
|
817
|
+
|
|
818
|
+
- [ ] **Step 2: Run all tests**
|
|
819
|
+
|
|
820
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npm test 2>&1 | tail -30`
|
|
821
|
+
Expected: All tests pass.
|
|
822
|
+
|
|
823
|
+
- [ ] **Step 3: Commit**
|
|
824
|
+
|
|
825
|
+
```bash
|
|
826
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
827
|
+
git add __tests__/ test/
|
|
828
|
+
git commit -m "refactor: migrate test files from better-sqlite3 to node:sqlite"
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
---
|
|
832
|
+
|
|
833
|
+
### Task 10: Update error UI components (agx-cloud)
|
|
834
|
+
|
|
835
|
+
**Files:**
|
|
836
|
+
- Modify: `agx-cloud/components/errors/StartupGuard.tsx`
|
|
837
|
+
- Modify: `agx-cloud/components/errors/StartupGuardWrapper.tsx`
|
|
838
|
+
|
|
839
|
+
- [ ] **Step 1: Read both files and update any `better-sqlite3` references**
|
|
840
|
+
|
|
841
|
+
Replace any user-facing text mentioning `better-sqlite3` or `npm rebuild better-sqlite3` with Node.js version guidance (e.g., "Ensure Node.js >= 22.16 is installed").
|
|
842
|
+
|
|
843
|
+
- [ ] **Step 2: Commit**
|
|
844
|
+
|
|
845
|
+
```bash
|
|
846
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
847
|
+
git add components/errors/
|
|
848
|
+
git commit -m "refactor: update error UI to reference node:sqlite instead of better-sqlite3"
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
---
|
|
852
|
+
|
|
853
|
+
### Task 11: Clean up build config and dependencies (agx-cloud + MCP)
|
|
854
|
+
|
|
855
|
+
**Files:**
|
|
856
|
+
- Modify: `agx-cloud/next.config.ts`
|
|
857
|
+
- Delete: `agx-cloud/scripts/fix-turbopack-externals.mjs`
|
|
858
|
+
- Modify: `agx-cloud/package.json`
|
|
859
|
+
- Modify: `agx-cloud/mcp/package.json`
|
|
860
|
+
|
|
861
|
+
- [ ] **Step 1: Remove `serverExternalPackages` from next.config.ts**
|
|
862
|
+
|
|
863
|
+
Remove the line:
|
|
864
|
+
```typescript
|
|
865
|
+
serverExternalPackages: ["better-sqlite3"],
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
- [ ] **Step 2: Remove the build script from package.json**
|
|
869
|
+
|
|
870
|
+
Change:
|
|
871
|
+
```json
|
|
872
|
+
"build": "next build && node scripts/fix-turbopack-externals.mjs",
|
|
873
|
+
```
|
|
874
|
+
To:
|
|
875
|
+
```json
|
|
876
|
+
"build": "next build",
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
- [ ] **Step 3: Delete `scripts/fix-turbopack-externals.mjs`**
|
|
880
|
+
|
|
881
|
+
Run: `rm /Users/mendrika/Projects/Agents/agx-cloud/scripts/fix-turbopack-externals.mjs`
|
|
882
|
+
|
|
883
|
+
- [ ] **Step 4: Remove dependencies from package.json**
|
|
884
|
+
|
|
885
|
+
Remove from `dependencies`:
|
|
886
|
+
```
|
|
887
|
+
"better-sqlite3": "12.6.2",
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
Remove from `devDependencies`:
|
|
891
|
+
```
|
|
892
|
+
"@types/better-sqlite3": "^7.6.12",
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
- [ ] **Step 5: Remove better-sqlite3 from MCP package**
|
|
896
|
+
|
|
897
|
+
Remove from `mcp/package.json` dependencies:
|
|
898
|
+
```
|
|
899
|
+
"better-sqlite3": "12.6.2",
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
- [ ] **Step 6: Run `npm install` in both root and mcp to update lockfiles**
|
|
903
|
+
|
|
904
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npm install && cd mcp && npm install`
|
|
905
|
+
|
|
906
|
+
- [ ] **Step 7: Build test**
|
|
907
|
+
|
|
908
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npm run build 2>&1 | tail -20`
|
|
909
|
+
Expected: Build succeeds without better-sqlite3 workarounds.
|
|
910
|
+
|
|
911
|
+
- [ ] **Step 8: Commit**
|
|
912
|
+
|
|
913
|
+
```bash
|
|
914
|
+
cd /Users/mendrika/Projects/Agents/agx-cloud
|
|
915
|
+
git add next.config.ts package.json package-lock.json mcp/package.json mcp/package-lock.json
|
|
916
|
+
git rm scripts/fix-turbopack-externals.mjs
|
|
917
|
+
git commit -m "chore: remove better-sqlite3 dependency and build workarounds from agx-cloud and MCP"
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
---
|
|
921
|
+
|
|
922
|
+
### Task 12: Migrate agx CLI
|
|
923
|
+
|
|
924
|
+
**Files:**
|
|
925
|
+
- Modify: `agx/lib/storage/db.js`
|
|
926
|
+
- Modify: `agx/lib/cli/onboarding.js`
|
|
927
|
+
- Modify: `agx/package.json`
|
|
928
|
+
- Modify: `agx/scripts/postinstall.js`
|
|
929
|
+
|
|
930
|
+
- [ ] **Step 1: Migrate `lib/storage/db.js`**
|
|
931
|
+
|
|
932
|
+
Replace:
|
|
933
|
+
```javascript
|
|
934
|
+
const Database = require('better-sqlite3');
|
|
935
|
+
```
|
|
936
|
+
With:
|
|
937
|
+
```javascript
|
|
938
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
939
|
+
```
|
|
940
|
+
|
|
941
|
+
Replace `new Database(dbPath())` with `new DatabaseSync(dbPath())`.
|
|
942
|
+
|
|
943
|
+
Replace pragma calls:
|
|
944
|
+
```javascript
|
|
945
|
+
// Before:
|
|
946
|
+
_db.pragma('journal_mode = WAL');
|
|
947
|
+
_db.pragma('foreign_keys = ON');
|
|
948
|
+
// After:
|
|
949
|
+
_db.exec('PRAGMA journal_mode = WAL');
|
|
950
|
+
_db.exec('PRAGMA foreign_keys = ON');
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
Replace the transaction in `runMigrations`:
|
|
954
|
+
```javascript
|
|
955
|
+
// Before:
|
|
956
|
+
db.transaction(() => {
|
|
957
|
+
db.exec(migration.sql);
|
|
958
|
+
db.prepare('INSERT INTO _migrations ...').run(...);
|
|
959
|
+
})();
|
|
960
|
+
// After:
|
|
961
|
+
db.exec('BEGIN');
|
|
962
|
+
try {
|
|
963
|
+
db.exec(migration.sql);
|
|
964
|
+
db.prepare('INSERT INTO _migrations ...').run(...);
|
|
965
|
+
db.exec('COMMIT');
|
|
966
|
+
} catch (err) {
|
|
967
|
+
db.exec('ROLLBACK');
|
|
968
|
+
throw err;
|
|
969
|
+
}
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
- [ ] **Step 2: Migrate `lib/cli/onboarding.js`**
|
|
973
|
+
|
|
974
|
+
Replace:
|
|
975
|
+
```javascript
|
|
976
|
+
const Database = require('better-sqlite3');
|
|
977
|
+
const db = new Database(dbPath);
|
|
978
|
+
db.pragma('journal_mode = WAL');
|
|
979
|
+
```
|
|
980
|
+
With:
|
|
981
|
+
```javascript
|
|
982
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
983
|
+
const db = new DatabaseSync(dbPath);
|
|
984
|
+
db.exec('PRAGMA journal_mode = WAL');
|
|
985
|
+
```
|
|
986
|
+
|
|
987
|
+
- [ ] **Step 3: Remove better-sqlite3 from package.json**
|
|
988
|
+
|
|
989
|
+
Remove from `dependencies`:
|
|
990
|
+
```
|
|
991
|
+
"better-sqlite3": "^12.6.2",
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
- [ ] **Step 4: Clean up postinstall.js**
|
|
995
|
+
|
|
996
|
+
Remove the entire `try` block (lines 22-87) that copies the better-sqlite3 native addon and runs fix-turbopack-externals. Keep the cron/auto-update logic.
|
|
997
|
+
|
|
998
|
+
- [ ] **Step 5: Verify engines field in package.json**
|
|
999
|
+
|
|
1000
|
+
Confirm the `engines` field already reads `"node": ">=22.16.0"` from Task 2. If not, set it now.
|
|
1001
|
+
|
|
1002
|
+
- [ ] **Step 6: Run tests**
|
|
1003
|
+
|
|
1004
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx && npm test 2>&1 | tail -20`
|
|
1005
|
+
Expected: All tests pass.
|
|
1006
|
+
|
|
1007
|
+
- [ ] **Step 7: Commit**
|
|
1008
|
+
|
|
1009
|
+
```bash
|
|
1010
|
+
cd /Users/mendrika/Projects/Agents/agx
|
|
1011
|
+
git add lib/storage/db.js lib/cli/onboarding.js package.json scripts/postinstall.js
|
|
1012
|
+
git commit -m "refactor: migrate agx CLI from better-sqlite3 to node:sqlite"
|
|
1013
|
+
```
|
|
1014
|
+
|
|
1015
|
+
---
|
|
1016
|
+
|
|
1017
|
+
### Task 13: Final verification
|
|
1018
|
+
|
|
1019
|
+
- [ ] **Step 1: Verify no remaining better-sqlite3 references in agx-cloud**
|
|
1020
|
+
|
|
1021
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && grep -r "better-sqlite3" --include="*.ts" --include="*.tsx" --include="*.js" --include="*.mjs" -l`
|
|
1022
|
+
Expected: No results (or only CHANGELOG/docs).
|
|
1023
|
+
|
|
1024
|
+
- [ ] **Step 2: Verify no remaining better-sqlite3 references in agx**
|
|
1025
|
+
|
|
1026
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx && grep -r "better-sqlite3" --include="*.js" --include="*.json" -l`
|
|
1027
|
+
Expected: Only `package-lock.json` (if not cleaned) or no results.
|
|
1028
|
+
|
|
1029
|
+
- [ ] **Step 3: Run agx-cloud full test suite**
|
|
1030
|
+
|
|
1031
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npm test 2>&1 | tail -30`
|
|
1032
|
+
Expected: All tests pass.
|
|
1033
|
+
|
|
1034
|
+
- [ ] **Step 4: Run agx-cloud build**
|
|
1035
|
+
|
|
1036
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && npm run build 2>&1 | tail -20`
|
|
1037
|
+
Expected: Build succeeds.
|
|
1038
|
+
|
|
1039
|
+
- [ ] **Step 5: Run agx full test suite**
|
|
1040
|
+
|
|
1041
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx && npm test 2>&1 | tail -30`
|
|
1042
|
+
Expected: All tests pass.
|
|
1043
|
+
|
|
1044
|
+
- [ ] **Step 6: Smoke test — start agx-cloud dev server**
|
|
1045
|
+
|
|
1046
|
+
Run: `cd /Users/mendrika/Projects/Agents/agx-cloud && timeout 10 npm run dev 2>&1 || true`
|
|
1047
|
+
Expected: Server starts without better-sqlite3 errors.
|