@mndrk/agx 2.0.34 → 2.0.38
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 +2 -2
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/required-server-files.json +0 -3
- 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_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- 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 +3 -3
- 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]/messages/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/messages/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +3 -3
- 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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +3 -3
- 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 +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 +4 -4
- 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 +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 +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 +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/daemon/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/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 +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 +3 -3
- 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 +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 +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 +2 -2
- 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 +3 -3
- 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 +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 +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 +2 -2
- 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 +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 +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 +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 +2 -2
- 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 +2 -2
- 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 +4 -4
- 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 +3 -3
- 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 +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/processes/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +4 -4
- 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 +4 -4
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +3 -3
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +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 +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 +2 -2
- 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 +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 +2 -2
- 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 +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 +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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +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 +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 +4 -4
- 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 +2 -2
- 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 +3 -3
- 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 +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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +3 -3
- 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 +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 +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 +3 -3
- 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 +4 -4
- 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 +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 +2 -2
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +6 -6
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- 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 +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 +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 +3 -3
- 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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +3 -3
- 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_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- 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 +5 -5
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- 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_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[externals]__cf9f18a6._.js → [externals]__986fcdb7._.js} +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__01cd082e._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b500f1bf._.js → [root-of-the-server]__0936925d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c3dd73b._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0cc3f3b7._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d4126e05._.js → [root-of-the-server]__1b0bb735._.js} +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__4d865017._.js → [root-of-the-server]__1c86bf6e._.js} +6 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1dce6c15._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__0bb52353._.js → [root-of-the-server]__20c58b41._.js} +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2126c763._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__255b11f2._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__26817611._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__277ed37d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__294fceef._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2f06f568._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__30bd0c87._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__314d5c41._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__352dad6d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__374cd94c._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3785024c._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__379604d4._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c8f1de6._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d0df5a8._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__0b3b6a47._.js → [root-of-the-server]__4014ed70._.js} +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42fcb81c._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a3cd6ac._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a4265e0._.js +22 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c99509c2._.js → [root-of-the-server]__4bce7db7._.js} +17 -17
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c5c536d._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4e522535._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50c24784._.js +3 -0
- 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 +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59d1cdd8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a1fd688._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5d359afa._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__628d686b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__005b3c82._.js → [root-of-the-server]__644e6285._.js} +8 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__65755104._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__068b4f08._.js → [root-of-the-server]__73c20995._.js} +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__762ab29c._.js +51 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__981d92dd._.js → [root-of-the-server]__8125bbc3._.js} +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__85275b88._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__89666394._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c0fb154._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8f5cac13._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b22098._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__92924218._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__94bd7f65._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9746d1f5._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98ce983b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ee6511a0._.js → [root-of-the-server]__9a9fd39f._.js} +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ad4e385._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9b69f93e._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a01ddd0b._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__8ac0286e._.js → [root-of-the-server]__a099c992._.js} +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a9b949c3._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ab7343c8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__af7a73fd._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd43017b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf6fb108._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__7ee9b7b6._.js → [root-of-the-server]__c122c54a._.js} +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ea4921._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__8b0ab82f._.js → [root-of-the-server]__c4ed5d83._.js} +7 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c695a5f2._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d57e800e._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d8b615bf._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9bd6334._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__543ba6c4._.js → [root-of-the-server]__da3a1ce7._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__db469f1b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de2a1e43._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5031f8d4._.js → [root-of-the-server]__dec3e1b7._.js} +11 -11
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1147a4a._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5597fea._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f8c94cb3._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ceb02db8._.js → [root-of-the-server]__f9cff4b0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f9f7f2df._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa79d53f._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb14cd4a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a55c16a5._.js → [root-of-the-server]__fc27a898._.js} +31 -31
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcf0b40a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffb21023._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/_05fa3b89._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_17e53c87._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_4190f170._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_42e9c8d5._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_5ca51127._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/_8b9fde82._.js +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/_994414cd._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/_99b78daf._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_affbdbb0._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_d22934ab._.js +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/_efc73784._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/lib_a5adca60._.js +15 -15
- package/cloud-runtime/standalone/.next/server/chunks/lib_check-node-version_ts_ef89bf83._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +39 -39
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +39 -39
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +19 -19
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_14067235._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_b63e2d39._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0c5c111f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_314f4c49._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/instrumentation.js +1 -1
- 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/{47f22a56011af8d3.js → 5c0819dcc4bfec85.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{25c9ac515cfe5635.js → 9bde80696400d2ff.js} +2 -2
- package/cloud-runtime/standalone/.next/static/chunks/ac9a7d8cf17b5d75.js +1 -0
- package/cloud-runtime/standalone/app/api/agents/[id]/messages/route.ts +4 -3
- package/cloud-runtime/standalone/app/api/agents/[id]/profile/route.ts +1 -1
- package/cloud-runtime/standalone/app/api/automations/route.ts +1 -1
- package/cloud-runtime/standalone/app/api/chat/route.ts +2 -2
- package/cloud-runtime/standalone/app/api/memories/route.ts +2 -2
- package/cloud-runtime/standalone/app/api/prompt-jobs/[id]/route.ts +9 -1
- package/cloud-runtime/standalone/app/api/system/db-status/route.ts +12 -11
- package/cloud-runtime/standalone/components/PromptJobBoard.tsx +12 -1
- package/cloud-runtime/standalone/components/errors/StartupGuard.tsx +1 -1
- package/cloud-runtime/standalone/components/errors/StartupGuardWrapper.tsx +1 -1
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +1 -1
- package/cloud-runtime/standalone/hooks/usePromptJobs.ts +9 -18
- package/cloud-runtime/standalone/instrumentation.ts +1 -0
- package/cloud-runtime/standalone/lib/agent-process-registry.ts +10 -9
- package/cloud-runtime/standalone/lib/attachment-store.ts +6 -5
- package/cloud-runtime/standalone/lib/check-node-version.ts +12 -0
- package/cloud-runtime/standalone/lib/db-adapter.interface.ts +1 -1
- package/cloud-runtime/standalone/lib/history-store.ts +46 -46
- package/cloud-runtime/standalone/lib/knowledge-store.ts +2 -1
- package/cloud-runtime/standalone/lib/participants-store.ts +9 -8
- package/cloud-runtime/standalone/lib/queue/sqlite-adapter.ts +12 -11
- package/cloud-runtime/standalone/lib/repo-knowledge.ts +6 -5
- package/cloud-runtime/standalone/lib/sqlite-compat.ts +75 -0
- package/cloud-runtime/standalone/lib/sqlite-query-adapter.ts +15 -14
- package/cloud-runtime/standalone/lib/sqlite_writer.ts +10 -9
- package/cloud-runtime/standalone/lib/startup.ts +18 -19
- package/cloud-runtime/standalone/lib/thread-knowledge-runs.ts +2 -1
- package/cloud-runtime/standalone/lib/workspaces-to-projects-migration.ts +19 -18
- package/cloud-runtime/standalone/mcp/package-lock.json +3 -147
- package/cloud-runtime/standalone/mcp/package.json +1 -1
- package/cloud-runtime/standalone/mcp/src/check-node-version.ts +8 -0
- package/cloud-runtime/standalone/mcp/src/db.ts +4 -5
- package/cloud-runtime/standalone/mcp/src/index.ts +1 -0
- package/cloud-runtime/standalone/next.config.ts +0 -1
- package/cloud-runtime/standalone/package-lock.json +9 -413
- package/cloud-runtime/standalone/package.json +3 -2
- package/cloud-runtime/standalone/scripts/bench-queue.ts +5 -4
- package/cloud-runtime/standalone/server.js +1 -1
- package/cloud-runtime/standalone/src/db/backup.ts +12 -11
- package/cloud-runtime/standalone/src/db/checks.ts +3 -3
- package/cloud-runtime/standalone/src/db/init.ts +13 -12
- package/cloud-runtime/standalone/src/graph/schedule-runner.ts +1 -1
- package/cloud-runtime/standalone/src/graph/store.ts +14 -13
- package/cloud-runtime/standalone/src/prompt-scheduler/get-store.ts +19 -3
- package/cloud-runtime/standalone/src/prompt-scheduler/store.ts +9 -9
- package/cloud-runtime/standalone/test/adapters/sqlite.ts +7 -6
- package/cloud-runtime/standalone/worker/index.js +110 -822
- package/cloud-runtime/standalone/worker/index.ts +1 -0
- package/lib/cli/onboarding.js +3 -3
- package/lib/storage/db.js +12 -8
- package/package.json +5 -2
- package/scripts/postinstall.js +0 -68
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__017f03c3._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__056d94e4._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__06634853._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0f580808._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__164a80ba._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__16dd1fd7._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1a8e0957._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1cc2fe7f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__23ad03bf._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__241a8bcf._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__29419d66._.js +0 -42
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2948f712._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__32ef6623._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__34cb1b98._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c1567b6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c37453e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3faa64cd._.js +0 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4041bb93._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42497c7b._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__49c03d66._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a8d14c1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c50f159._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c861686._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__588b6ab0._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__596d0e81._.js +0 -42
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59b5d4e5._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__61c99680._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__64712846._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__707c32af._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7370bb86._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__749af50f._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74b97f0a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__75cedecf._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7e79d86a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8b461158._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__918f0106._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__922eb7cd._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__927cfc20._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__952af4b3._.js +0 -22
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98b352f7._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a44db634._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a67cd108._.js +0 -51
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ab2bf82d._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__abb032c1._.js +0 -34
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b4931ee1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b4d05543._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b707e701._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b9e41767._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__be4ad4b5._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf5803eb._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ccd4846e._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d7e839a8._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d908c9ea._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__da20a0aa._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dcdeee3d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e069c0a3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e1e51c02._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e3a4fd97._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e4a87984._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ef82dda1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa0ebee3._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fee58db1._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_d225c04f._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/d73f1cc3ebc9993b.js +0 -1
- package/cloud-runtime/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/database.js +0 -90
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/index.js +0 -3
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/util.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3/package.json +0 -59
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/build/Release/better_sqlite3.node +0 -0
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/database.js +0 -90
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/index.js +0 -3
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/aggregate.js +0 -43
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/backup.js +0 -67
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/function.js +0 -31
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/inspect.js +0 -7
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/pragma.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/serialize.js +0 -16
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/table.js +0 -189
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/transaction.js +0 -78
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/wrappers.js +0 -54
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/sqlite-error.js +0 -20
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/util.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/package.json +0 -59
- package/cloud-runtime/standalone/node_modules/bindings/bindings.js +0 -221
- package/cloud-runtime/standalone/node_modules/bindings/package.json +0 -28
- package/cloud-runtime/standalone/node_modules/file-uri-to-path/index.js +0 -66
- package/cloud-runtime/standalone/node_modules/file-uri-to-path/package.json +0 -32
- package/cloud-runtime/standalone/scripts/fix-turbopack-externals.mjs +0 -87
- /package/cloud-runtime/standalone/.next/static/{G0Hrt7JKBM1EtMPT0lUIr → V5ruh627UpcC-LTWDgYk8}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{G0Hrt7JKBM1EtMPT0lUIr → V5ruh627UpcC-LTWDgYk8}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{G0Hrt7JKBM1EtMPT0lUIr → V5ruh627UpcC-LTWDgYk8}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[55248,e=>{"use strict";var t=e.
|
|
1
|
+
module.exports=[55248,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0),a=e.i(42969),s=e.i(22734),r=e.i(14747),i=e.i(46786);let n=process.env.AGX_GROUP_CHAT_DIR?.trim()||r.default.join(i.default.homedir(),".agx","group-chat"),d=r.default.join(n,"history.sqlite"),o="global",p=new Set(["ack","working","done","clarify","blocked"]),_={ack:new Set(["ack","working"]),working:new Set(["ack","working","done","clarify","blocked"]),done:new Set(["done","ack","working"]),clarify:new Set(["ack","clarify","working"]),blocked:new Set(["ack","blocked","working"])};class E extends Error{status;constructor(e,t){super(e),this.name="ReactionStoreError",this.status=t}}function l(e,t){return(0,a.pragmaAll)(e,`table_info(${t})`).some(e=>"thread_id"===e.name)}function m(e){if(!e)return null;try{let t=JSON.parse(e);return t&&"object"==typeof t&&!Array.isArray(t)?t:null}catch{return null}}function c(e){return{id:e.id,threadId:e.thread_id,rootMessageId:e.root_message_id,userId:e.user_id,projectSlug:e.project_slug,status:e.status,currentStep:e.current_step,maxSteps:e.max_steps,stepsUsed:e.steps_used,lastError:e.last_error,activeParticipantIds:function(e){if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}(e.active_participant_ids),payload:m(e.payload_json),result:m(e.result_json),createdAt:e.created_at,updatedAt:e.updated_at,completedAt:e.completed_at}}function T(e){return{id:e.id,chatRunId:e.chat_run_id,stepIndex:e.step_index,kind:e.kind,status:e.status,participantId:e.participant_id,inputPayload:m(e.input_payload_json),outputPayload:m(e.output_payload_json),startedAt:e.started_at,completedAt:e.completed_at}}let u=async e=>{await s.promises.mkdir(n,{recursive:!0});let r=new t.DatabaseSync(d);(0,a.pragmaSet)(r,"journal_mode = WAL");try{let t,s;return r.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS messages (
|
|
3
3
|
thread_id TEXT NOT NULL,
|
|
4
4
|
id TEXT NOT NULL,
|
|
@@ -82,7 +82,7 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
82
82
|
repo_id TEXT NOT NULL,
|
|
83
83
|
PRIMARY KEY (thread_id, repo_id)
|
|
84
84
|
);
|
|
85
|
-
`),
|
|
85
|
+
`),l(r,"messages")||r.exec(`
|
|
86
86
|
ALTER TABLE messages RENAME TO messages_legacy;
|
|
87
87
|
CREATE TABLE messages (
|
|
88
88
|
thread_id TEXT NOT NULL,
|
|
@@ -94,10 +94,10 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
94
94
|
PRIMARY KEY (thread_id, id)
|
|
95
95
|
);
|
|
96
96
|
INSERT INTO messages (thread_id, id, role, participant_id, content, timestamp)
|
|
97
|
-
SELECT '${
|
|
97
|
+
SELECT '${o}', id, role, participant_id, content, timestamp
|
|
98
98
|
FROM messages_legacy;
|
|
99
99
|
DROP TABLE messages_legacy;
|
|
100
|
-
`),
|
|
100
|
+
`),l(r,"message_reactions")||r.exec(`
|
|
101
101
|
ALTER TABLE message_reactions RENAME TO message_reactions_legacy;
|
|
102
102
|
CREATE TABLE message_reactions (
|
|
103
103
|
thread_id TEXT NOT NULL,
|
|
@@ -112,10 +112,10 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
112
112
|
PRIMARY KEY (thread_id, message_id, participant_id)
|
|
113
113
|
);
|
|
114
114
|
INSERT INTO message_reactions (thread_id, message_id, participant_id, type, reason, blocker_code, host_pid, updated_at)
|
|
115
|
-
SELECT '${
|
|
115
|
+
SELECT '${o}', message_id, participant_id, type, reason, blocker_code, NULL, updated_at
|
|
116
116
|
FROM message_reactions_legacy;
|
|
117
117
|
DROP TABLE message_reactions_legacy;
|
|
118
|
-
`),new Set(
|
|
118
|
+
`),new Set((0,a.pragmaAll)(r,"table_info(logs)").map(e=>e.name)).has("agent_process_id")||r.exec(`
|
|
119
119
|
DROP TABLE IF EXISTS logs;
|
|
120
120
|
CREATE TABLE logs (
|
|
121
121
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -124,15 +124,15 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
124
124
|
line TEXT NOT NULL,
|
|
125
125
|
timestamp INTEGER NOT NULL
|
|
126
126
|
);
|
|
127
|
-
`),new Set(
|
|
127
|
+
`),new Set((0,a.pragmaAll)(r,"table_info(messages)").map(e=>e.name)).has("root_message_id")||r.exec(`
|
|
128
128
|
ALTER TABLE messages ADD COLUMN root_message_id TEXT;
|
|
129
129
|
ALTER TABLE messages ADD COLUMN parent_message_id TEXT;
|
|
130
130
|
ALTER TABLE messages ADD COLUMN depth INTEGER NOT NULL DEFAULT 0;
|
|
131
131
|
CREATE INDEX IF NOT EXISTS idx_messages_root ON messages(thread_id, root_message_id);
|
|
132
|
-
`),new Set(
|
|
132
|
+
`),new Set((0,a.pragmaAll)(r,"table_info(messages)").map(e=>e.name)).has("thread_status")||r.exec(`
|
|
133
133
|
ALTER TABLE messages ADD COLUMN thread_status TEXT;
|
|
134
134
|
ALTER TABLE messages ADD COLUMN outcome_note TEXT;
|
|
135
|
-
`),(t=new Set(
|
|
135
|
+
`),(t=new Set((0,a.pragmaAll)(r,"table_info(message_reactions)").map(e=>e.name))).has("host_pid")||r.exec("ALTER TABLE message_reactions ADD COLUMN host_pid INTEGER"),t.has("response_message_id")||r.exec("ALTER TABLE message_reactions ADD COLUMN response_message_id TEXT"),r.exec("UPDATE messages SET thread_status = 'in-review' WHERE thread_status = 'parked'"),r.exec("UPDATE messages SET thread_status = 'active' WHERE thread_status = 'thinking'"),r.exec("UPDATE messages SET thread_status = 'done' WHERE thread_status = 'resolved'"),r.exec("UPDATE messages SET thread_status = 'active' WHERE thread_status = 'converged'"),s=(0,a.pragmaAll)(r,"table_info(agent_processes)"),0===s.length||new Set(s.map(e=>e.name)).has("id")||r.exec(`
|
|
136
136
|
DROP TABLE IF EXISTS agent_processes;
|
|
137
137
|
CREATE TABLE agent_processes (
|
|
138
138
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -168,49 +168,49 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
168
168
|
INSERT INTO messages_fts(messages_fts, rowid, content) VALUES('delete', old.rowid, old.content);
|
|
169
169
|
INSERT INTO messages_fts(rowid, content) VALUES (new.rowid, new.content);
|
|
170
170
|
END;
|
|
171
|
-
`),0===e.prepare("SELECT COUNT(*) as count FROM messages").get().count)return;let a=e.prepare("SELECT COUNT(*) as count FROM messages_fts").get().count;t&&0!==a||e.exec("INSERT INTO messages_fts(rowid, content) SELECT rowid, content FROM messages;")}(
|
|
171
|
+
`),0===e.prepare("SELECT COUNT(*) as count FROM messages").get().count)return;let a=e.prepare("SELECT COUNT(*) as count FROM messages_fts").get().count;t&&0!==a||e.exec("INSERT INTO messages_fts(rowid, content) SELECT rowid, content FROM messages;")}(r),r.exec(`
|
|
172
172
|
CREATE INDEX IF NOT EXISTS idx_messages_thread_ts ON messages(thread_id, timestamp ASC);
|
|
173
173
|
CREATE INDEX IF NOT EXISTS idx_reactions_thread_message ON message_reactions(thread_id, message_id, updated_at ASC);
|
|
174
174
|
CREATE INDEX IF NOT EXISTS idx_logs_process_ts ON logs(agent_process_id, timestamp ASC);
|
|
175
175
|
CREATE INDEX IF NOT EXISTS idx_chat_runs_thread_updated ON chat_runs(thread_id, updated_at DESC);
|
|
176
176
|
CREATE INDEX IF NOT EXISTS idx_chat_runs_status_updated ON chat_runs(status, updated_at DESC);
|
|
177
177
|
CREATE INDEX IF NOT EXISTS idx_chat_run_steps_run_step ON chat_run_steps(chat_run_id, step_index ASC);
|
|
178
|
-
`),e(
|
|
178
|
+
`),e(r)}finally{r.close()}};function g(e){let t=new Map;for(let a of e){let e=t.get(a.message_id);e||(e=new Map,t.set(a.message_id,e));let s=e.get(a.type);s||(s={type:a.type,count:0,participantIds:[]},e.set(a.type,s)),s.count+=1,s.participantIds.push(a.participant_id)}let a=new Map;for(let[e,s]of t.entries()){let t=Array.from(s.values()).sort((e,t)=>t.count!==e.count?t.count-e.count:e.type.localeCompare(t.type));a.set(e,t)}return a}function N(e,t,a){if(a&&0===a.length)return new Map;if(a){let s=a.map(()=>"?").join(", ");return g(e.prepare(`SELECT message_id, participant_id, type
|
|
179
179
|
FROM message_reactions
|
|
180
180
|
WHERE thread_id = ? AND message_id IN (${s})
|
|
181
|
-
ORDER BY updated_at ASC`).all(t,...a))}return
|
|
181
|
+
ORDER BY updated_at ASC`).all(t,...a))}return g(e.prepare(`SELECT message_id, participant_id, type
|
|
182
182
|
FROM message_reactions
|
|
183
183
|
WHERE thread_id = ?
|
|
184
|
-
ORDER BY updated_at ASC`).all(t))}function
|
|
184
|
+
ORDER BY updated_at ASC`).all(t))}function h(e){if("string"!=typeof e)return null;let t=e.trim();return t.length>0?t:null}function L(e){return"number"!=typeof e||!Number.isInteger(e)||e<=0?null:e}function R(e,t,a=100){return Math.min(Math.max(Math.trunc(Number.isFinite(e)?Number(e):t),1),a)}function I(e){return e.replace(/[\\%_]/g,"\\$&")}function O(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function A(e,t){return{id:e.id,role:e.role,participantId:e.participant_id,content:e.content,timestamp:e.timestamp,reactions:t.get(e.id),rootMessageId:e.root_message_id,parentMessageId:e.parent_message_id,depth:e.depth,...e.thread_status?{threadStatus:e.thread_status}:{},...e.outcome_note?{outcomeNote:e.outcome_note}:{}}}function S(e){return e.replace(/\[agx:spawn\]\s*/g,"").replace(/\s*\[agx:exit:\d+\]\s*/g,"").replace(/^\[SKIP\]\s*$/gm,"").trim()}function f(e){return"working"===e?"running":"done"===e?"done":"blocked"===e||"clarify"===e?"failed":null}async function y(e){let{status:t,limit:a=20,offset:s=0}=e??{};return u(e=>{let r=["m.root_message_id IS NULL","m.depth = 0"],i=[];t&&(r.push("COALESCE(m.thread_status, 'active') = ?"),i.push(t));let n=r.join(" AND "),d=e.prepare(`SELECT COUNT(*) as cnt FROM messages m WHERE ${n}`).get(...(i.length?[i]:[]).flat().map(e=>e));return{rows:e.prepare(`SELECT m.thread_id, m.id, m.content, m.timestamp,
|
|
185
185
|
m.thread_status, m.outcome_note,
|
|
186
186
|
(SELECT COUNT(*) FROM messages r WHERE r.root_message_id = m.id AND r.thread_id = m.thread_id) as reply_count,
|
|
187
187
|
COALESCE((SELECT MAX(r.timestamp) FROM messages r WHERE r.root_message_id = m.id AND r.thread_id = m.thread_id), m.timestamp) as last_activity
|
|
188
188
|
FROM messages m
|
|
189
189
|
WHERE ${n}
|
|
190
190
|
ORDER BY last_activity DESC
|
|
191
|
-
LIMIT ? OFFSET ?`).all(...i,a,s),total:d.cnt}})}async function
|
|
191
|
+
LIMIT ? OFFSET ?`).all(...i.map(e=>e),a,s),total:d.cnt}})}async function D(t){if(0===t.length)return{};let{getSQLiteDb:a}=await e.A(48207),s=a(),r=t.map(()=>"?").join(", "),i=s.prepare(`SELECT pt.thread_id, p.name FROM project_threads pt
|
|
192
192
|
JOIN projects p ON p.id = pt.project_id
|
|
193
|
-
WHERE pt.thread_id IN (${r})`).all(...t),n={};for(let e of i)n[e.thread_id]||(n[e.thread_id]=e.name);return n}async function
|
|
193
|
+
WHERE pt.thread_id IN (${r})`).all(...t),n={};for(let e of i)n[e.thread_id]||(n[e.thread_id]=e.name);return n}async function C(t){let{getSQLiteDb:a}=await e.A(48207);return a().prepare("SELECT thread_id FROM project_threads WHERE project_id = ? ORDER BY created_at ASC").all(t).map(e=>e.thread_id)}async function U(e,t){let a=e.trim()||o;return u(e=>{let s=null!=t?`SELECT id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note
|
|
194
194
|
FROM messages
|
|
195
195
|
WHERE thread_id = ? AND timestamp > ?
|
|
196
196
|
ORDER BY timestamp ASC`:`SELECT id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note
|
|
197
197
|
FROM messages
|
|
198
198
|
WHERE thread_id = ?
|
|
199
|
-
ORDER BY timestamp ASC`,r=null!=t?e.prepare(s).all(a,t):e.prepare(s).all(a),i=
|
|
199
|
+
ORDER BY timestamp ASC`,r=null!=t?e.prepare(s).all(a,t):e.prepare(s).all(a),i=N(e,a,r.map(e=>e.id));return r.map(e=>A(e,i))})}async function M(e){let t=h(e.rootMessageId),s=e.threadId?.trim()||null,r=null!=e.processLimit?R(e.processLimit,10):null;return u(e=>{if(!t&&!s)return{rootMessage:null,processes:[],messages:[],lastUpdatedAt:null};let i=s&&t?e.prepare(`SELECT thread_id, id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note
|
|
200
200
|
FROM messages
|
|
201
201
|
WHERE thread_id = ? AND id = ?
|
|
202
|
-
LIMIT 1`).get(
|
|
202
|
+
LIMIT 1`).get(s,t):s?e.prepare(`SELECT thread_id, id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note
|
|
203
203
|
FROM messages
|
|
204
204
|
WHERE thread_id = ?
|
|
205
205
|
ORDER BY CASE WHEN root_message_id IS NULL THEN 0 ELSE 1 END, timestamp ASC, id ASC
|
|
206
|
-
LIMIT 1`).get(
|
|
206
|
+
LIMIT 1`).get(s):e.prepare(`SELECT thread_id, id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note
|
|
207
207
|
FROM messages
|
|
208
208
|
WHERE id = ?
|
|
209
209
|
ORDER BY timestamp ASC, thread_id ASC
|
|
210
|
-
LIMIT 1`).get(t);if(!
|
|
210
|
+
LIMIT 1`).get(t);if(!i)return{rootMessage:null,processes:[],messages:[],lastUpdatedAt:null};let n=i.thread_id,d=i.root_message_id??i.id,o=e.prepare(`SELECT id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note
|
|
211
211
|
FROM messages
|
|
212
212
|
WHERE thread_id = ? AND id = ?
|
|
213
|
-
LIMIT 1`).get(
|
|
213
|
+
LIMIT 1`).get(n,d);if(!o)return{rootMessage:null,processes:[],messages:[],lastUpdatedAt:null};let p=N(e,n,[d]),_=e.prepare(`SELECT
|
|
214
214
|
r.updated_at as datetime,
|
|
215
215
|
r.participant_id as participant_id,
|
|
216
216
|
r.type as type,
|
|
@@ -230,7 +230,7 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
230
230
|
AND r.type IN ('working', 'done', 'clarify', 'blocked')
|
|
231
231
|
AND (m.root_message_id = ? OR m.id = ?)
|
|
232
232
|
ORDER BY r.updated_at DESC
|
|
233
|
-
${null!=
|
|
233
|
+
${null!=r?"LIMIT ?":""}`).all(n,d,d,...null!=r?[r]:[]),E=A(o,p),l=_.map(e=>{let t=f(e.type);return t?{processId:L(e.host_pid),datetime:e.datetime,agent:e.participant_id,responseTo:e.response_to??"",responseToMessageId:e.response_to_message_id??"",responseToSenderName:h(e.response_to_participant_id)??e.response_to_role??"",responseToSenderRole:e.response_to_role??"user",responseMessageId:h(e.response_message_id),responseContent:e.response_content,status:t}:null}).filter(e=>null!==e),m=e.prepare(`SELECT ap.id, ap.agent_id, ap.pid, ap.state, ap.since_message_id, ap.started_at, ap.last_activity,
|
|
234
234
|
m.content as response_to,
|
|
235
235
|
m.role as response_to_role,
|
|
236
236
|
m.participant_id as response_to_participant_id
|
|
@@ -238,10 +238,10 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
238
238
|
LEFT JOIN messages m
|
|
239
239
|
ON m.id = ap.since_message_id AND m.thread_id = ap.workspace_id
|
|
240
240
|
WHERE ap.thread_id = ?
|
|
241
|
-
AND ap.state IN ('running', 'spawning')`).all(
|
|
241
|
+
AND ap.state IN ('running', 'spawning')`).all(d),c=Date.now(),T=m.filter(e=>!(Math.max(e.last_activity||0,e.started_at||0)>c-6e5)&&!function(e){if(!Number.isFinite(e)||!e||e<=0)return!1;try{return process.kill(e,0),!0}catch{return!1}}(e.pid)).map(e=>e.id),u=new Set(T);if(T.length>0){let t=e.prepare(`UPDATE agent_processes
|
|
242
242
|
SET state = 'error',
|
|
243
243
|
last_activity = ?
|
|
244
|
-
WHERE id = ?`);
|
|
244
|
+
WHERE id = ?`);(0,a.transactionFn)(e,e=>{for(let a of e)t.run(c,a)})(T)}let g=new Set(l.filter(e=>null!=e.processId).map(e=>e.processId)),R=new Set(l.filter(e=>"running"===e.status).map(e=>e.agent));for(let e of m)!u.has(e.id)&&(g.has(e.pid)||R.has(e.agent_id)||l.push({processId:e.pid||null,datetime:e.started_at,agent:e.agent_id,responseTo:e.response_to??"",responseToMessageId:e.since_message_id??"",responseToSenderName:h(e.response_to_participant_id)??e.response_to_role??"user",responseToSenderRole:e.response_to_role??"user",responseMessageId:null,responseContent:null,status:"running"}));let I=e.prepare(`SELECT m.id, m.role, m.participant_id, m.content, m.timestamp,
|
|
245
245
|
m.parent_message_id,
|
|
246
246
|
r.host_pid, r.type as reaction_type
|
|
247
247
|
FROM messages m
|
|
@@ -252,20 +252,20 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
252
252
|
AND r.type IN ('working', 'done', 'clarify', 'blocked')
|
|
253
253
|
WHERE m.thread_id = ?
|
|
254
254
|
AND (m.root_message_id = ? OR m.id = ?)
|
|
255
|
-
ORDER BY m.timestamp ASC`).all(
|
|
256
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);
|
|
255
|
+
ORDER BY m.timestamp ASC`).all(n,d,d).filter(e=>S(e.content).trim().length>0).map(e=>{let t=null;return"assistant"===e.role&&(t=e.reaction_type?f(e.reaction_type):"done"),{id:e.id,role:e.role,participantId:e.participant_id,content:S(e.content),timestamp:e.timestamp,parentMessageId:e.parent_message_id,processId:"assistant"===e.role?L(e.host_pid):null,status:t}}),O=[];for(let e of(O.push(E.timestamp),l))O.push(e.datetime);for(let e of I)O.push(e.timestamp);return{rootMessage:E,processes:l,messages:I,lastUpdatedAt:O.length>0?Math.max(...O):null}})}async function F(e,t){if(0===t.length)return;let s=e.trim()||o;await u(e=>{let r=e.prepare(`INSERT OR REPLACE INTO messages (thread_id, id, role, participant_id, content, timestamp, root_message_id, parent_message_id, depth, thread_status, outcome_note)
|
|
256
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`);(0,a.transactionFn)(e,e=>{for(let t of e)r.run(s,t.id,t.role,t.participantId,t.content,t.timestamp,t.rootMessageId??null,t.parentMessageId??null,t.depth??0,t.threadStatus??null,t.outcomeNote??null)})(t)})}async function X(e){let t=Date.now();return u(a=>{a.prepare(`INSERT INTO chat_runs (
|
|
257
257
|
id, thread_id, root_message_id, user_id, project_slug, status,
|
|
258
258
|
current_step, max_steps, steps_used, last_error, active_participant_ids,
|
|
259
259
|
payload_json, result_json, created_at, updated_at, completed_at
|
|
260
|
-
) VALUES (?, ?, ?, ?, ?, 'queued', 0, ?, 0, NULL, ?, ?, NULL, ?, ?, NULL)`).run(e.id,e.threadId.trim()||
|
|
260
|
+
) VALUES (?, ?, ?, ?, ?, 'queued', 0, ?, 0, NULL, ?, ?, NULL, ?, ?, NULL)`).run(e.id,e.threadId.trim()||o,h(e.rootMessageId),e.userId,h(e.projectSlug),R(e.maxSteps,10,50),JSON.stringify(e.activeParticipantIds),e.payload?JSON.stringify(e.payload):null,t,t);let s=a.prepare("SELECT * FROM chat_runs WHERE id = ? LIMIT 1").get(e.id);if(!s)throw Error(`Failed to create chat run ${e.id}`);return c(s)})}async function w(e){let t=h(e?.threadId??null),a=Number.isFinite(e?.olderThanMs)?Math.max(e.olderThanMs,1):6e5,s=Date.now(),r=s-a;return u(e=>{let a=["status = 'running'","updated_at <= ?"],i=[r];return t&&(a.push("thread_id = ?"),i.push(t)),Number(e.prepare(`UPDATE chat_runs
|
|
261
261
|
SET status = 'failed',
|
|
262
262
|
last_error = COALESCE(NULLIF(last_error, ''), 'Worker process died mid-execution'),
|
|
263
263
|
updated_at = ?,
|
|
264
264
|
completed_at = COALESCE(completed_at, ?)
|
|
265
|
-
WHERE ${a.join(" AND ")}`).run(s,s,...i).changes})}async function
|
|
265
|
+
WHERE ${a.join(" AND ")}`).run(s,s,...i).changes)})}async function k(e){return await w(),u(t=>{let a=t.prepare("SELECT * FROM chat_runs WHERE id = ? LIMIT 1").get(e);return a?c(a):null})}async function x(e){await w({threadId:e.threadId});let t=h(e.threadId??null),a=R(e.limit,20,100);return u(s=>{let r=[],i=[];t&&(r.push("thread_id = ?"),i.push(t)),"active"===e.status?r.push("status IN ('queued', 'running')"):e.status&&(r.push("status = ?"),i.push(e.status));let n=r.length>0?`WHERE ${r.join(" AND ")}`:"";return s.prepare(`SELECT * FROM chat_runs ${n} ORDER BY updated_at DESC LIMIT ?`).all(...i,a).map(c)})}async function W(e){return u(t=>{let a=["updated_at = ?"],s=[Date.now()];e.status&&(a.push("status = ?"),s.push(e.status)),"number"==typeof e.currentStep&&(a.push("current_step = ?"),s.push(e.currentStep)),"number"==typeof e.stepsUsed&&(a.push("steps_used = ?"),s.push(e.stepsUsed)),void 0!==e.lastError&&(a.push("last_error = ?"),s.push(h(e.lastError))),void 0!==e.payload&&(a.push("payload_json = ?"),s.push(e.payload?JSON.stringify(e.payload):null)),void 0!==e.result&&(a.push("result_json = ?"),s.push(e.result?JSON.stringify(e.result):null)),void 0!==e.completedAt&&(a.push("completed_at = ?"),s.push(e.completedAt)),s.push(e.id),t.prepare(`UPDATE chat_runs SET ${a.join(", ")} WHERE id = ?`).run(...s);let r=t.prepare("SELECT * FROM chat_runs WHERE id = ? LIMIT 1").get(e.id);return r?c(r):null})}async function H(e){let t=Date.now();return u(a=>{a.prepare(`INSERT INTO chat_run_steps (
|
|
266
266
|
id, chat_run_id, step_index, kind, status, participant_id,
|
|
267
267
|
input_payload_json, output_payload_json, started_at, completed_at
|
|
268
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(e.id,e.chatRunId,e.stepIndex,e.kind,e.status,
|
|
268
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(e.id,e.chatRunId,e.stepIndex,e.kind,e.status,h(e.participantId),e.inputPayload?JSON.stringify(e.inputPayload):null,e.outputPayload?JSON.stringify(e.outputPayload):null,t,"completed"===e.status||"failed"===e.status?t:null);let s=a.prepare("SELECT * FROM chat_run_steps WHERE id = ? LIMIT 1").get(e.id);if(!s)throw Error(`Failed to append chat run step ${e.id}`);return T(s)})}async function B(e){return u(t=>{let a=[],s=[];if(e.status&&(a.push("status = ?"),s.push(e.status)),void 0!==e.outputPayload&&(a.push("output_payload_json = ?"),s.push(e.outputPayload?JSON.stringify(e.outputPayload):null)),void 0!==e.completedAt&&(a.push("completed_at = ?"),s.push(e.completedAt)),0===a.length){let a=t.prepare("SELECT * FROM chat_run_steps WHERE id = ? LIMIT 1").get(e.id);return a?T(a):null}s.push(e.id),t.prepare(`UPDATE chat_run_steps SET ${a.join(", ")} WHERE id = ?`).run(...s);let r=t.prepare("SELECT * FROM chat_run_steps WHERE id = ? LIMIT 1").get(e.id);return r?T(r):null})}async function P(e){return u(t=>t.prepare("SELECT * FROM chat_run_steps WHERE chat_run_id = ? ORDER BY step_index ASC, started_at ASC").all(e).map(T))}async function b(e,t,a,s){let r=e.trim()||o;await u(e=>{e.prepare("UPDATE messages SET thread_status = ?, outcome_note = ? WHERE thread_id = ? AND id = ?").run(a,s,r,t)})}async function G(e){return u(t=>{let a=t.prepare("SELECT thread_id FROM messages WHERE id = ?").get(e.trim());return a?{threadId:a.thread_id}:null})}async function j(e){let t=e.trim()||o;await u(e=>{(0,a.transactionFn)(e,t=>{e.prepare("DELETE FROM message_reactions WHERE thread_id = ?").run(t),e.prepare("DELETE FROM messages WHERE thread_id = ?").run(t)})(t)})}async function Y(e,t){let s=e.trim()||o,r=t.trim();r&&await u(e=>{(0,a.transactionFn)(e,(t,a)=>{e.prepare("DELETE FROM message_reactions WHERE thread_id = ? AND message_id = ?").run(t,a),e.prepare("DELETE FROM messages WHERE thread_id = ? AND id = ?").run(t,a)})(s,r)})}async function v(e,t){let s=e.trim()||o,r=t.trim();r&&await u(e=>{(0,a.transactionFn)(e,(t,a)=>{e.prepare(`DELETE FROM message_reactions
|
|
269
269
|
WHERE thread_id = ?
|
|
270
270
|
AND message_id IN (
|
|
271
271
|
SELECT id
|
|
@@ -274,18 +274,18 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
274
274
|
AND (id = ? OR root_message_id = ?)
|
|
275
275
|
)`).run(t,t,a,a),e.prepare(`DELETE FROM messages
|
|
276
276
|
WHERE thread_id = ?
|
|
277
|
-
AND (id = ? OR root_message_id = ?)`).run(t,a,a)})(
|
|
277
|
+
AND (id = ? OR root_message_id = ?)`).run(t,a,a)})(s,r)})}async function $(e){let t=e.query.trim();if(!t)return{results:[],total:0};let a="string"==typeof e.threadId&&e.threadId.trim()||null,s=Number.isFinite(e.limit)?Number(e.limit):20,r=Number.isFinite(e.offset)?Number(e.offset):0,i=Math.min(Math.max(Math.trunc(s),1),100),n=Math.max(Math.trunc(r),0),d=function(e){let t=e.toLowerCase().match(/[\p{L}\p{N}]+/gu)??[],a=new Set,s=[];for(let e of t)a.has(e)||(a.add(e),s.push(e));return s}(t),o=d.length>0?d.map(e=>`${e}*`).join(" "):null;return u(e=>{let s=new Map;if(o){let t=["messages_fts MATCH ?"],r=[o];for(let i of(a&&(t.push("m.thread_id = ?"),r.push(a)),e.prepare(`SELECT m.thread_id, m.id, m.role, m.participant_id, m.timestamp, m.root_message_id,
|
|
278
278
|
snippet(messages_fts, 0, '<mark>', '</mark>', '...', 32) AS snippet,
|
|
279
279
|
bm25(messages_fts) as rank
|
|
280
280
|
FROM messages_fts
|
|
281
281
|
JOIN messages m ON messages_fts.rowid = m.rowid
|
|
282
282
|
WHERE ${t.join(" AND ")}
|
|
283
|
-
ORDER BY rank ASC, m.timestamp DESC`).all(...r))){let e=`${i.thread_id}:${i.id}`;s.set(e,{threadId:i.thread_id,messageId:i.id,role:i.role,participantId:i.participant_id,snippet:i.snippet,timestamp:i.timestamp,rootMessageId:i.root_message_id,sortRank:i.rank,matchedByFts:!0})}}let r=[],p=[];if(a&&(r.push("m.thread_id = ?"),p.push(a)),d.length>0)for(let e of d)r.push("LOWER(m.content) LIKE ? ESCAPE '\\'"),p.push(`%${
|
|
283
|
+
ORDER BY rank ASC, m.timestamp DESC`).all(...r))){let e=`${i.thread_id}:${i.id}`;s.set(e,{threadId:i.thread_id,messageId:i.id,role:i.role,participantId:i.participant_id,snippet:i.snippet,timestamp:i.timestamp,rootMessageId:i.root_message_id,sortRank:i.rank,matchedByFts:!0})}}let r=[],p=[];if(a&&(r.push("m.thread_id = ?"),p.push(a)),d.length>0)for(let e of d)r.push("LOWER(m.content) LIKE ? ESCAPE '\\'"),p.push(`%${I(e)}%`);else r.push("LOWER(m.content) LIKE ? ESCAPE '\\'"),p.push(`%${I(t.toLowerCase())}%`);for(let t of e.prepare(`SELECT m.thread_id, m.id, m.role, m.participant_id, m.content, m.timestamp, m.root_message_id
|
|
284
284
|
FROM messages m
|
|
285
285
|
WHERE ${r.join(" AND ")}
|
|
286
|
-
ORDER BY m.timestamp DESC`).all(...p)){let e=`${t.thread_id}:${t.id}`;s.has(e)||s.set(e,{threadId:t.thread_id,messageId:t.id,role:t.role,participantId:t.participant_id,snippet:function(e,t){let a=
|
|
286
|
+
ORDER BY m.timestamp DESC`).all(...p)){let e=`${t.thread_id}:${t.id}`;s.has(e)||s.set(e,{threadId:t.thread_id,messageId:t.id,role:t.role,participantId:t.participant_id,snippet:function(e,t){let a=S(e).replace(/\s+/g," ").trim();if(!a)return"";let s=t.filter(Boolean),r=a.toLowerCase(),i=s.reduce((e,t)=>{let a=r.indexOf(t);return -1===a?e:-1===e||a<e?a:e},-1),n=i>=0?Math.max(0,i-48):0,d=i>=0?Math.min(a.length,i+112):Math.min(a.length,160),o=n>0?"...":"",p=d<a.length?"...":"",_=`${o}${a.slice(n,d)}${p}`;if(0===s.length)return _;let E=RegExp(`(${s.map(O).join("|")})`,"giu");return _.replace(E,"<mark>$1</mark>")}(t.content,d),timestamp:t.timestamp,rootMessageId:t.root_message_id,sortRank:1/0,matchedByFts:!1})}return{results:Array.from(s.values()).sort((e,t)=>e.matchedByFts!==t.matchedByFts?e.matchedByFts?-1:1:e.sortRank!==t.sortRank?e.sortRank-t.sortRank:t.timestamp-e.timestamp).slice(n,n+i).map(e=>({threadId:e.threadId,messageId:e.messageId,role:e.role,participantId:e.participantId,snippet:e.snippet,timestamp:e.timestamp,rootMessageId:e.rootMessageId})),total:s.size}})}async function J(e){let t=e.threadId?.trim()||o,a=e.messageId?.trim(),s=e.participantId?.trim(),r=e.type;if(!a)throw new E("messageId is required",400);if(!s)throw new E("participantId is required",400);if(!p.has(r))throw new E(`Invalid reaction type: ${String(r)}`,400);let i=h(e.reason),n=h(e.blockerCode),d=L(e.hostPid),l=h(e.responseMessageId),m="clarify"===r||"blocked"===r;if(m&&!i)throw new E(`"${r}" reactions require a reason`,400);let c=m?i:null,T="blocked"===r?n:null;return u(e=>{var i;if(!e.prepare("SELECT 1 FROM messages WHERE thread_id = ? AND id = ? LIMIT 1").get(t,a))throw new E(`Message not found: ${a}`,404);let n=e.prepare(`SELECT type, reason, blocker_code, host_pid
|
|
287
287
|
FROM message_reactions
|
|
288
|
-
WHERE thread_id = ? AND message_id = ? AND participant_id = ?`).get(t,a,s);if(i=n?.type??null,!(!i||
|
|
288
|
+
WHERE thread_id = ? AND message_id = ? AND participant_id = ?`).get(t,a,s);if(i=n?.type??null,!(!i||_[i].has(r)))throw new E(`Cannot transition reaction from "${n.type}" to "${r}"`,409);if(n&&n.type===r&&h(n.reason)===c&&h(n.blocker_code)===T&&L(n.host_pid)===d)return{updated:!1,reactions:N(e,t,[a]).get(a)??[]};let o=Date.now();return e.prepare(`INSERT INTO message_reactions (thread_id, message_id, participant_id, type, reason, blocker_code, host_pid, response_message_id, updated_at)
|
|
289
289
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
290
290
|
ON CONFLICT(thread_id, message_id, participant_id)
|
|
291
291
|
DO UPDATE SET
|
|
@@ -294,31 +294,31 @@ module.exports=[55248,e=>{"use strict";var t=e.i(85148),a=e.i(22734),s=e.i(14747
|
|
|
294
294
|
blocker_code = excluded.blocker_code,
|
|
295
295
|
host_pid = excluded.host_pid,
|
|
296
296
|
response_message_id = COALESCE(excluded.response_message_id, message_reactions.response_message_id),
|
|
297
|
-
updated_at = excluded.updated_at`).run(t,a,s,r,c,
|
|
297
|
+
updated_at = excluded.updated_at`).run(t,a,s,r,c,T,d,l,o),{updated:!0,reactions:N(e,t,[a]).get(a)??[]}})}async function K(e){let t=e.trim()||o;return u(e=>e.prepare(`SELECT root_message_id, COUNT(*) as reply_count, MAX(timestamp) as last_activity
|
|
298
298
|
FROM messages
|
|
299
299
|
WHERE thread_id = ? AND root_message_id IS NOT NULL
|
|
300
300
|
GROUP BY root_message_id
|
|
301
301
|
ORDER BY last_activity DESC`).all(t).map(a=>{let s=e.prepare(`SELECT DISTINCT participant_id FROM messages
|
|
302
|
-
WHERE thread_id = ? AND root_message_id = ? AND participant_id IS NOT NULL`).all(t,a.root_message_id);return{rootMessageId:a.root_message_id,replyCount:a.reply_count,participants:s.map(e=>e.participant_id),lastActivityAt:a.last_activity}}))}async function
|
|
302
|
+
WHERE thread_id = ? AND root_message_id = ? AND participant_id IS NOT NULL`).all(t,a.root_message_id);return{rootMessageId:a.root_message_id,replyCount:a.reply_count,participants:s.map(e=>e.participant_id),lastActivityAt:a.last_activity}}))}async function V(e,t){if(0!==t.length&&e)return u(s=>{let r=s.prepare("INSERT INTO logs (agent_process_id, stream, line, timestamp) VALUES (?, ?, ?, ?)");(0,a.transaction)(s,()=>{for(let a of t)r.run(e,a.stream,a.line,a.timestamp)})})}async function q(e){let t=e.trim();return t?u(e=>e.prepare(`SELECT l.id, l.agent_process_id, ap.agent_id as participant_id, l.stream, l.line, l.timestamp
|
|
303
303
|
FROM logs l
|
|
304
304
|
JOIN agent_processes ap ON ap.id = l.agent_process_id
|
|
305
305
|
WHERE ap.workspace_id = ?
|
|
306
306
|
ORDER BY l.timestamp DESC, l.id DESC
|
|
307
|
-
LIMIT 100`).all(t).reverse()):[]}async function
|
|
307
|
+
LIMIT 100`).all(t).reverse()):[]}async function z(e){return 0===e.length?[]:u(t=>{let a=e.map(()=>"?").join(", ");return t.prepare(`SELECT ap.pid as process_pid, ap.agent_id as agent, l.stream, l.line, l.timestamp
|
|
308
308
|
FROM logs l
|
|
309
309
|
JOIN agent_processes ap ON ap.id = l.agent_process_id
|
|
310
310
|
WHERE ap.pid IN (${a})
|
|
311
311
|
ORDER BY l.timestamp ASC, l.id ASC
|
|
312
|
-
LIMIT 200`).all(...e).map(e=>({processId:e.process_pid,agent:e.agent,stream:e.stream,line:e.line,timestamp:e.timestamp}))})}async function
|
|
312
|
+
LIMIT 200`).all(...e).map(e=>({processId:e.process_pid,agent:e.agent,stream:e.stream,line:e.line,timestamp:e.timestamp}))})}async function Q(e){let t=e.trim();if(t)return u(e=>{e.prepare(`DELETE FROM logs WHERE agent_process_id IN (
|
|
313
313
|
SELECT id FROM agent_processes WHERE workspace_id = ?
|
|
314
|
-
)`).run(t)})}async function
|
|
314
|
+
)`).run(t)})}async function Z(e,t=3e5){let a=e.trim()||o,s=Number.isFinite(t)?Math.max(t,1):3e5,r=Date.now(),i=r-s;return u(e=>({updated:Number(e.prepare(`UPDATE message_reactions
|
|
315
315
|
SET type = 'blocked',
|
|
316
316
|
reason = 'stale_timeout',
|
|
317
317
|
blocker_code = 'stale_timeout',
|
|
318
318
|
updated_at = ?
|
|
319
|
-
WHERE thread_id = ? AND type = 'working' AND updated_at <= ?`).run(r,a,i).changes}))}async function
|
|
319
|
+
WHERE thread_id = ? AND type = 'working' AND updated_at <= ?`).run(r,a,i).changes)}))}async function ee(e,t,a){let s=e.trim()||o;return u(e=>{e.prepare(`INSERT INTO task_drafts (thread_id, message_id, data, updated_at)
|
|
320
320
|
VALUES (?, ?, ?, ?)
|
|
321
321
|
ON CONFLICT(thread_id, message_id)
|
|
322
|
-
DO UPDATE SET data = excluded.data, updated_at = excluded.updated_at`).run(s,t,JSON.stringify(a),Date.now())})}async function
|
|
322
|
+
DO UPDATE SET data = excluded.data, updated_at = excluded.updated_at`).run(s,t,JSON.stringify(a),Date.now())})}async function et(e){let t=e.trim()||o;return u(e=>{let a=e.prepare("SELECT message_id, data FROM task_drafts WHERE thread_id = ?").all(t),s={};for(let e of a)s[e.message_id]=JSON.parse(e.data);return s})}async function ea(e,t){let a=e.trim()||o;return u(e=>{e.prepare("DELETE FROM task_drafts WHERE thread_id = ? AND message_id = ?").run(a,t)})}async function es(e){let t=e.trim()||o;return u(e=>e.prepare("SELECT repo_id FROM thread_repo_selections WHERE thread_id = ?").all(t).map(e=>e.repo_id))}async function er(e,t){let a=e.trim()||o;return u(e=>{if(e.prepare("DELETE FROM thread_repo_selections WHERE thread_id = ?").run(a),t.length>0){let s=e.prepare("INSERT INTO thread_repo_selections (thread_id, repo_id) VALUES (?, ?)");for(let e of t)s.run(a,e)}})}e.s(["ReactionStoreError",()=>E,"appendChatRunStep",()=>H,"clearHistory",()=>j,"clearLogs",()=>Q,"clearRootThread",()=>v,"createChatRun",()=>X,"deleteMessage",()=>Y,"deleteTaskDraft",()=>ea,"getChatRun",()=>k,"getMessageThread",()=>G,"getProjectThreadIds",()=>C,"getThreadInfos",()=>K,"getThreadStatusSnapshot",()=>M,"getWorkspaceNames",()=>D,"listChatRunSteps",()=>P,"listChatRuns",()=>x,"listRootMessages",()=>y,"loadHistory",()=>U,"loadLogs",()=>q,"loadLogsByProcessPids",()=>z,"loadTaskDrafts",()=>et,"loadThreadRepoSelections",()=>es,"saveLogs",()=>V,"saveMessages",()=>F,"saveTaskDraft",()=>ee,"saveThreadRepoSelections",()=>er,"searchMessages",()=>$,"setReaction",()=>J,"sweepStaleChatRuns",()=>w,"sweepStaleWorkingReactions",()=>Z,"updateChatRun",()=>W,"updateChatRunStep",()=>B,"updateMessageStatus",()=>b])}];
|
|
323
323
|
|
|
324
324
|
//# sourceMappingURL=lib_history-store_ts_74d1c060._.js.map
|
package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[65196,86213,e=>{"use strict";var t=e.
|
|
1
|
+
module.exports=[65196,86213,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0),r=e.i(42969),i=e.i(22734),n=e.i(14747),o=e.i(46786);let a={id:"2c3cc1ca-956d-4b62-b295-4d2d3374103f",email:process.env.AGX_BOARD_USER_EMAIL||"local@agx.board",name:process.env.AGX_BOARD_USER_NAME||"Local Board User"};e.s(["LOCAL_USER",0,a],86213),(0,n.join)((0,o.homedir)(),".agx","agents"),(0,n.join)((0,o.homedir)(),".agx","agents"),(0,n.join)((0,o.homedir)(),".agx","agents");let s=(0,n.join)((0,o.homedir)(),".agx","agents");var l=e.x("node:sqlite",()=>require("node:sqlite"),!0);let d=process.env.AGX_GROUP_CHAT_DIR?.trim()||n.default.join(o.default.homedir(),".agx","group-chat"),E=n.default.join(d,"history.sqlite"),T=process.env.AGX_AGENTS_DIR?.trim()||n.default.join(o.default.homedir(),".agx","agents");function p(){let e,t,o=((0,i.mkdirSync)(d,{recursive:!0}),e=new l.DatabaseSync(E),(0,r.pragmaSet)(e,"journal_mode = WAL"),e.exec(`
|
|
2
2
|
CREATE TABLE IF NOT EXISTS participants (
|
|
3
3
|
id TEXT PRIMARY KEY,
|
|
4
4
|
name TEXT NOT NULL,
|
|
@@ -10,15 +10,15 @@ module.exports=[65196,86213,e=>{"use strict";var t=e.i(85148),r=e.i(22734),i=e.i
|
|
|
10
10
|
color TEXT NOT NULL,
|
|
11
11
|
sort_order INTEGER NOT NULL DEFAULT 0
|
|
12
12
|
);
|
|
13
|
-
`),(
|
|
14
|
-
`,"utf8")}catch{}}(t.from,t.to,t.name)}(e),e);try{return o.prepare("SELECT id, name, provider, model, identity, identity_file, skills_json, variables_json, color, sort_order FROM participants ORDER BY sort_order ASC, rowid ASC").all().map(e=>({id:e.id,name:e.name,provider:e.provider,model:e.model,color:e.color,...e.identity?{identity:e.identity}:{},...e.identity_file?{identityFile:e.identity_file}:{},...e.variables_json?(()=>{try{let t=JSON.parse(e.variables_json);if(t&&"object"==typeof t&&!Array.isArray(t))return{variables:t};return{}}catch{return{}}})():{},...e.skills_json?{skills:(()=>{try{let t=JSON.parse(e.skills_json);if(!Array.isArray(t))return[];return t.map(e=>"string"==typeof e?{file:e,condition:""}:e)}catch{return[]}})()}:{}}))}finally{o.close()}}var
|
|
13
|
+
`),(t=(0,r.pragmaAll)(e,"table_info(participants)")).some(e=>"persona"===e.name)&&(e.exec("ALTER TABLE participants RENAME COLUMN persona TO identity"),e.exec("ALTER TABLE participants RENAME COLUMN persona_file TO identity_file")),t.some(e=>"identity_file"===e.name)||t.some(e=>"persona_file"===e.name)||e.exec("ALTER TABLE participants ADD COLUMN identity_file TEXT"),t.some(e=>"skills_json"===e.name)||e.exec("ALTER TABLE participants ADD COLUMN skills_json TEXT"),t.some(e=>"variables_json"===e.name)||e.exec("ALTER TABLE participants ADD COLUMN variables_json TEXT"),t.some(e=>"sort_order"===e.name)||(e.exec("ALTER TABLE participants ADD COLUMN sort_order INTEGER NOT NULL DEFAULT 0"),e.exec("UPDATE participants SET sort_order = rowid")),!function(e){let t=e.prepare("SELECT id, name, provider FROM participants").all();if(0===t.length)return;let o=new Set(t.map(e=>e.id)),a=new Map(t.map(e=>[e.id,e.id])),s=[];for(let e of t){let t=(e.name||"").trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/--+/g,"-");if(!t||e.id===t||e.id!==e.provider)continue;o.delete(e.id);let r=function(e,t){if(!t.has(e))return e;let r=2,i=`${e}-${r}`;for(;t.has(i);)r+=1,i=`${e}-${r}`;return i}(t,o);o.add(r),a.set(e.id,r),s.push({from:e.id,to:r,name:e.name})}let l=t.map(e=>({id:a.get(e.id)||e.id,provider:e.provider})),d=new Set(l.map(e=>e.id)),E=new Map;for(let e of l){let t=e.provider.trim();if(!t)continue;let r=E.get(t)||new Set;r.add(e.id),E.set(t,r)}let p=[];for(let[e,t]of E){if(1!==t.size)continue;let[r]=Array.from(t);r&&e!==r&&(d.has(e)||p.push({from:e,to:r}))}if(0===s.length&&0===p.length)return;let c=new Map;for(let e of s)c.set(e.from,e.to);for(let e of p)c.set(e.from,e.to);let u=Array.from(c.entries()).map(([e,t])=>({from:e,to:t})),N=new Set(e.prepare("SELECT name FROM sqlite_master WHERE type = 'table'").all().map(e=>e.name));for(let t of((0,r.transactionFn)(e,(t,r)=>{let i=e.prepare("UPDATE participants SET id = ? WHERE id = ?"),n=N.has("messages")?e.prepare("UPDATE messages SET participant_id = ? WHERE participant_id = ?"):null,o=N.has("agent_processes")?e.prepare("UPDATE agent_processes SET agent_id = ? WHERE agent_id = ?"):null,a=N.has("message_reactions")?e.prepare("UPDATE message_reactions SET participant_id = ? WHERE participant_id = ?"):null;for(let e of t)i.run(e.to,e.from);for(let e of r)n?.run(e.to,e.from),o?.run(e.to,e.from),a?.run(e.to,e.from)})(s.map(e=>({from:e.from,to:e.to})),u),s))!function(e,t,r){if(!e||!t||e===t)return;let o=n.default.join(T,e),a=n.default.join(T,t);if(!(0,i.existsSync)(o)||(0,i.existsSync)(a))return;(0,i.mkdirSync)(T,{recursive:!0}),(0,i.renameSync)(o,a);let s=n.default.join(a,"identity.json");if((0,i.existsSync)(s))try{let e={...JSON.parse((0,i.readFileSync)(s,"utf8")),name:"string"==typeof r&&r.trim()?r.trim():t};(0,i.writeFileSync)(s,`${JSON.stringify(e,null,2)}
|
|
14
|
+
`,"utf8")}catch{}}(t.from,t.to,t.name)}(e),e);try{return o.prepare("SELECT id, name, provider, model, identity, identity_file, skills_json, variables_json, color, sort_order FROM participants ORDER BY sort_order ASC, rowid ASC").all().map(e=>({id:e.id,name:e.name,provider:e.provider,model:e.model,color:e.color,...e.identity?{identity:e.identity}:{},...e.identity_file?{identityFile:e.identity_file}:{},...e.variables_json?(()=>{try{let t=JSON.parse(e.variables_json);if(t&&"object"==typeof t&&!Array.isArray(t))return{variables:t};return{}}catch{return{}}})():{},...e.skills_json?{skills:(()=>{try{let t=JSON.parse(e.skills_json);if(!Array.isArray(t))return[];return t.map(e=>"string"==typeof e?{file:e,condition:""}:e)}catch{return[]}})()}:{}}))}finally{o.close()}}var c=e.i(28237);let u="legacy_workspaces_to_projects_v1";function N(e){e.exec(`
|
|
15
15
|
CREATE TABLE IF NOT EXISTS app_migrations (
|
|
16
16
|
key TEXT PRIMARY KEY,
|
|
17
17
|
applied_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
|
|
18
18
|
metadata JSON
|
|
19
19
|
);
|
|
20
|
-
`)}let
|
|
21
|
-
${e.join("\n")}`)}(function(e){let t=
|
|
20
|
+
`)}let _=process.env.AGX_DATA_DIR||n.default.join(o.default.homedir(),".agx");class L{expr;constructor(e){this.expr=e}}function m(e){return new L(e)}let g=null;function h(){var e;if(g)return g;let o=process.env.SQLITE_DB_PATH||n.default.join(_,"agx-board.db");g=new t.DatabaseSync(o);let l=(0,c.validateSQLiteEnvironment)(g,o);if(l.length>0){let e=l.map(e=>` - ${e.message}${e.fix?` (fix: ${e.fix})`:""}`);throw Error(`SQLite startup validation failed:
|
|
21
|
+
${e.join("\n")}`)}(function(e){let t=n.default.join(process.cwd(),"db","sqlite","001_agx_board_schema.sql");if(!i.default.existsSync(t))return console.warn(`[sqlite] DDL not found at ${t}, skipping schema init`);let r=i.default.readFileSync(t,"utf-8");e.exec(r)})(g),function(e){if(e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='execution_graphs'").all().length>0&&((0,r.pragmaAll)(e,"table_info(execution_graphs)").some(e=>"schedule"===e.name)||e.exec("ALTER TABLE execution_graphs ADD COLUMN schedule JSON")),e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='project_memory'").all().length>0&&((0,r.pragmaAll)(e,"table_info(project_memory)").some(e=>"producer"===e.name)||e.exec("ALTER TABLE project_memory ADD COLUMN producer TEXT NOT NULL DEFAULT 'human' CHECK(producer IN ('human', 'system'))"),e.exec("CREATE INDEX IF NOT EXISTS idx_project_memory_producer ON project_memory (producer)")),e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='agents'").all().length>0){let t=new Set((0,r.pragmaAll)(e,"table_info(agents)").map(e=>e.name));t.has("voice")||e.exec("ALTER TABLE agents ADD COLUMN voice TEXT"),t.has("seed")||e.exec("ALTER TABLE agents ADD COLUMN seed TEXT"),t.has("model")||e.exec("ALTER TABLE agents ADD COLUMN model TEXT"),t.has("provider")||e.exec("ALTER TABLE agents ADD COLUMN provider TEXT"),t.has("color")||e.exec("ALTER TABLE agents ADD COLUMN color TEXT"),t.has("title")||e.exec("ALTER TABLE agents ADD COLUMN title TEXT")}if(e.exec(`
|
|
22
22
|
CREATE TABLE IF NOT EXISTS agent_skills (
|
|
23
23
|
agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
|
|
24
24
|
file TEXT NOT NULL,
|
|
@@ -213,15 +213,15 @@ ${e.join("\n")}`)}(function(e){let t=i.default.join(process.cwd(),"db","sqlite",
|
|
|
213
213
|
WHEN COALESCE(NULLIF(agents.voice, ''), '') = '' OR COALESCE(NULLIF(agents.seed, ''), '') = ''
|
|
214
214
|
THEN strftime('%Y-%m-%dT%H:%M:%fZ','now')
|
|
215
215
|
ELSE agents.updated_at
|
|
216
|
-
END`);for(let e of(0,
|
|
216
|
+
END`);for(let e of(0,i.existsSync)(s)?(0,i.readdirSync)(s,{withFileTypes:!0}).filter(e=>e.isDirectory()).map(e=>e.name):[]){let r=function(e){let t=(0,n.join)(s,e,"identity.json");if(!(0,i.existsSync)(t))return null;try{return JSON.parse((0,i.readFileSync)(t,"utf-8"))}catch{return null}}(e);t.run(e,a.id,r?.name?.trim()||e,r?.voice?.trim()||null,r?.seed?.trim()||null)}})(e),function(e){let t=p(),r=new Set(e.prepare("SELECT id FROM agents").all().map(e=>e.id)),i=e.prepare(`INSERT INTO agent_skills (agent_id, file, condition)
|
|
217
217
|
VALUES (?, ?, ?)
|
|
218
218
|
ON CONFLICT(agent_id, file) DO UPDATE SET
|
|
219
|
-
condition = excluded.condition`);for(let e of t)if(r.has(e.id))for(let t of e.skills??[]){let r=t.file?.trim();r&&i.run(e.id,r,t.condition?.trim()||null)}}(e),function(e){for(let t of e.prepare("SELECT id, voice, seed FROM agents").all())!function(e,t){let
|
|
219
|
+
condition = excluded.condition`);for(let e of t)if(r.has(e.id))for(let t of e.skills??[]){let r=t.file?.trim();r&&i.run(e.id,r,t.condition?.trim()||null)}}(e),function(e){for(let t of e.prepare("SELECT id, voice, seed FROM agents").all())!function(e,t){let r=(0,n.join)(s,e);(0,i.existsSync)(r)||(0,i.mkdirSync)(r,{recursive:!0});let o=t?.voice?.trim()||"conversational, concise, practical",a=t?.seed?.trim()||"I evolve through experience and collaboration.",l=(0,n.join)(r,"identity.json");(0,i.existsSync)(l)||(0,i.writeFileSync)(l,JSON.stringify({name:e,voice:o,seed:a},null,2)+"\n","utf-8");let d=(0,n.join)(r,"journal.jsonl"),E=(0,n.join)(r,"reactions.jsonl"),T=(0,n.join)(r,"comments.jsonl"),p=(0,n.join)(r,"activity.jsonl"),c=(0,n.join)(r,"self.md");(0,i.existsSync)(d)||(0,i.writeFileSync)(d,"","utf-8"),(0,i.existsSync)(E)||(0,i.writeFileSync)(E,"","utf-8"),(0,i.existsSync)(T)||(0,i.writeFileSync)(T,"","utf-8"),(0,i.existsSync)(p)||(0,i.writeFileSync)(p,"","utf-8"),(0,i.existsSync)(c)||(0,i.writeFileSync)(c,`---
|
|
220
220
|
version: 0
|
|
221
221
|
derivedAt: ${new Date().toISOString()}
|
|
222
222
|
---
|
|
223
|
-
I am ${e}. ${
|
|
224
|
-
`,"utf-8")}(t.id,{voice:t.voice??void 0,seed:t.seed??void 0})}(e)}(
|
|
223
|
+
I am ${e}. ${a}
|
|
224
|
+
`,"utf-8")}(t.id,{voice:t.voice??void 0,seed:t.seed??void 0})}(e)}(g);let d=function(e){var t;if(!e)throw Error("autoMigrateLegacyWorkspacesToProjects requires an explicit database handle");if(!e.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'teams'").get()||(N(e),e.prepare("SELECT 1 FROM app_migrations WHERE key = ? LIMIT 1").get(u)))return null;let i=function(e){let t;if(!e)throw Error("migrateLegacyWorkspacesToProjects requires an explicit database handle");let i={usersProcessed:0,agentsImported:0,agentSkillsMigrated:0,projectsCreated:0,projectsMatched:0,projectAgentsLinked:0,projectThreadsLinked:0,projectVariablesMigrated:0,remappedThreadLinks:0,warnings:[],projectMappings:[]};if(!e.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'teams'").get())return i.warnings.push("No legacy teams table found."),i;let n=p(),o=new Map(n.map(e=>[e.id,e])),{teams:s,teamAgents:l,teamWorkspaces:d}=(t=e.prepare("SELECT id, name, user_id, COALESCE(is_default, 0) AS is_default FROM teams ORDER BY name ASC").all(),{teams:t,teamAgents:e.prepare("SELECT team_id, agent_id, routing_order FROM team_agents ORDER BY team_id, routing_order ASC").all(),teamWorkspaces:e.prepare("SELECT team_id, thread_id FROM team_workspaces ORDER BY team_id, thread_id ASC").all()}),E=new Map;for(let e of s){let t=E.get(e.user_id)??[];t.push(e),E.set(e.user_id,t)}let T=new Map;for(let e of l){let t=T.get(e.team_id)??[];t.push(e),T.set(e.team_id,t)}let c=new Map;for(let e of d){let t=c.get(e.team_id)??[];t.push(e.thread_id),c.set(e.team_id,t)}return(0,r.transaction)(e,()=>{for(let[t,r]of E.entries()){i.usersProcessed++;let s=t||a.id;!function(e,t,r,i){let n=e.prepare(`INSERT INTO agents (id, user_id, name, style, description, model, provider, color, voice, seed)
|
|
225
225
|
VALUES (?, ?, ?, 'balanced', ?, ?, ?, ?, NULL, NULL)
|
|
226
226
|
ON CONFLICT(id) DO UPDATE SET
|
|
227
227
|
user_id = excluded.user_id,
|
|
@@ -230,31 +230,31 @@ I am ${e}. ${s}
|
|
|
230
230
|
model = COALESCE(NULLIF(excluded.model, ''), agents.model),
|
|
231
231
|
provider = COALESCE(NULLIF(excluded.provider, ''), agents.provider),
|
|
232
232
|
color = COALESCE(NULLIF(excluded.color, ''), agents.color),
|
|
233
|
-
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')`),o=e.prepare("SELECT 1 FROM agents WHERE id = ?");for(let e of r){let r=!!o.get(e.id);n.run(e.id,t,e.name,e.identity??null,e.model??null,e.provider??"claude",e.color??"#6B7280"),!r&&i.agentsImported++}}(e,s,i
|
|
233
|
+
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')`),o=e.prepare("SELECT 1 FROM agents WHERE id = ?");for(let e of r){let r=!!o.get(e.id);n.run(e.id,t,e.name,e.identity??null,e.model??null,e.provider??"claude",e.color??"#6B7280"),!r&&i.agentsImported++}}(e,s,n,i),function(e,t,r){let i=e.prepare(`INSERT INTO agent_skills (agent_id, file, condition)
|
|
234
234
|
VALUES (?, ?, ?)
|
|
235
235
|
ON CONFLICT(agent_id, file) DO UPDATE SET
|
|
236
|
-
condition = excluded.condition`);for(let n of t)for(let t of n.skills??[]){let o=t.file?.trim();if(!o)continue;let a=e.prepare("SELECT condition FROM agent_skills WHERE agent_id = ? AND file = ?").get(n.id,o),s=t.condition||null;i.run(n.id,o,s),(!a||a.condition!==s)&&r.agentSkillsMigrated++}}(e,i
|
|
236
|
+
condition = excluded.condition`);for(let n of t)for(let t of n.skills??[]){let o=t.file?.trim();if(!o)continue;let a=e.prepare("SELECT condition FROM agent_skills WHERE agent_id = ? AND file = ?").get(n.id,o),s=t.condition||null;i.run(n.id,o,s),(!a||a.condition!==s)&&r.agentSkillsMigrated++}}(e,n,i);let l=new Map,d=new Map;for(let t of r){let r=c.get(t.id)??[],n=function(e,t,r,i){var n;let o,a=r.is_default?"default":r.name.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/--+/g,"-"),s=e.prepare("SELECT id, name FROM projects WHERE user_id = ? AND slug = ? LIMIT 1").get(t,a);if(s)return i.projectsMatched++,s;let l=r.is_default?"Default Project":(o=(n=r.name).trim())?o.split(/\s+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):n,d=e.prepare(`INSERT INTO projects (user_id, name, slug, description)
|
|
237
237
|
VALUES (?, ?, ?, ?)
|
|
238
|
-
RETURNING id, name`).get(t,l,a||`project-${r.id.slice(0,8)}`,"Migrated from legacy workspace/team structure");return i.projectsCreated++,d}(e,s,t,
|
|
238
|
+
RETURNING id, name`).get(t,l,a||`project-${r.id.slice(0,8)}`,"Migrated from legacy workspace/team structure");return i.projectsCreated++,d}(e,s,t,i),o=T.get(t.id)??[];l.set(n.id,o),d.set(n.id,r),i.projectMappings.push({teamId:t.id,teamName:t.name,projectId:n.id,projectName:n.name,threadIds:r})}let E=e.prepare(`INSERT INTO project_agents (project_id, agent_id, routing_order)
|
|
239
239
|
VALUES (?, ?, ?)
|
|
240
240
|
ON CONFLICT(project_id, agent_id) DO UPDATE SET
|
|
241
|
-
routing_order = excluded.routing_order`),
|
|
242
|
-
VALUES (?, ?)`);for(let[t,
|
|
241
|
+
routing_order = excluded.routing_order`),p=e.prepare("DELETE FROM project_threads WHERE thread_id = ? AND project_id <> ?"),u=e.prepare(`INSERT OR IGNORE INTO project_threads (project_id, thread_id)
|
|
242
|
+
VALUES (?, ?)`);for(let[t,r]of l.entries()){for(let e of r)E.run(t,e.agent_id,e.routing_order).changes>0&&i.projectAgentsLinked++;!function(e,t,r,i,n){let o=e.prepare(`INSERT INTO project_variables (project_id, key, value)
|
|
243
243
|
VALUES (?, ?, ?)
|
|
244
|
-
ON CONFLICT(project_id, key) DO UPDATE SET value = excluded.value`),a=e.prepare("SELECT value FROM project_variables WHERE project_id = ? AND key = ?");for(let e of r){let r=i.get(e);if(r)for(let[e,i]of Object.entries(r.variables??{})){let r=a.get(t,e);if(r&&r.value!==i){n.warnings.push(`Variable conflict for project ${t}: key "${e}" kept existing value "${r.value}" over "${i}"`);continue}let s=o.run(t,e,i);!r&&s.changes>0&&n.projectVariablesMigrated++}}}(e,t,
|
|
244
|
+
ON CONFLICT(project_id, key) DO UPDATE SET value = excluded.value`),a=e.prepare("SELECT value FROM project_variables WHERE project_id = ? AND key = ?");for(let e of r){let r=i.get(e);if(r)for(let[e,i]of Object.entries(r.variables??{})){let r=a.get(t,e);if(r&&r.value!==i){n.warnings.push(`Variable conflict for project ${t}: key "${e}" kept existing value "${r.value}" over "${i}"`);continue}let s=o.run(t,e,i);!r&&s.changes>0&&n.projectVariablesMigrated++}}}(e,t,r.map(e=>e.agent_id),o,i)}for(let[e,t]of d.entries())for(let r of t){let t=p.run(r,e);i.remappedThreadLinks+=Number(t.changes),u.run(e,r).changes>0&&i.projectThreadsLinked++}}}),i}(e);return t={usersProcessed:i.usersProcessed,agentsImported:i.agentsImported,agentSkillsMigrated:i.agentSkillsMigrated,projectsCreated:i.projectsCreated,projectsMatched:i.projectsMatched,projectAgentsLinked:i.projectAgentsLinked,projectThreadsLinked:i.projectThreadsLinked,projectVariablesMigrated:i.projectVariablesMigrated,remappedThreadLinks:i.remappedThreadLinks,warnings:i.warnings},N(e),e.prepare(`INSERT INTO app_migrations (key, metadata)
|
|
245
245
|
VALUES (?, json(?))
|
|
246
246
|
ON CONFLICT(key) DO UPDATE SET
|
|
247
247
|
applied_at = strftime('%Y-%m-%dT%H:%M:%fZ','now'),
|
|
248
|
-
metadata = excluded.metadata`).run(
|
|
248
|
+
metadata = excluded.metadata`).run(u,JSON.stringify(t)),i}(g);return d&&console.log(`[sqlite] auto-migrated legacy workspaces to projects: ${JSON.stringify({usersProcessed:d.usersProcessed,projectsCreated:d.projectsCreated,projectsMatched:d.projectsMatched,projectAgentsLinked:d.projectAgentsLinked,projectThreadsLinked:d.projectThreadsLinked})}`),(e=g).prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='teams'").get()&&e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='app_migrations'").get()&&e.prepare("SELECT 1 FROM app_migrations WHERE key = 'legacy_workspaces_to_projects_v1' LIMIT 1").get()&&(e.exec(`
|
|
249
249
|
DROP TABLE IF EXISTS team_workspaces;
|
|
250
250
|
DROP TABLE IF EXISTS team_agents;
|
|
251
251
|
DROP TABLE IF EXISTS teams;
|
|
252
|
-
`),console.log("[sqlite] dropped legacy teams, team_agents, team_workspaces tables")),
|
|
252
|
+
`),console.log("[sqlite] dropped legacy teams, team_agents, team_workspaces tables")),g}let O=new Set(["definition","depends_on","input","metadata","models","open_blockers","output","payload","run_index","stage_decisions","swarm_models"]);function f(e){return void 0===e?null:e instanceof Date?e.toISOString():e&&"object"==typeof e?JSON.stringify(e):e}function S(e,t){return null==t?null:t instanceof Date?t.toISOString():O.has(e)?JSON.stringify(t):f(t)}function A(e){let t=(e||"*").trim();if(!t||"*"===t)return{columns:["*"],includeProjectRepos:!1};let r=t.includes("project_repos(*)"),i=t.replace(/project_repos\(\*\)/g,"").split(",").map(e=>e.trim()).filter(Boolean);return 0===i.length?{columns:["*"],includeProjectRepos:r}:{columns:i,includeProjectRepos:r}}class I{table;operation="select";filters=[];orderSpecs=[];limitValue=null;selectColumns="*";returningColumns=null;singleMode="none";payload=null;upsertOptions=null;constructor(e){this.table=e}select(e="*"){return"select"===this.operation?this.selectColumns=e:this.returningColumns=e||"*",this}insert(e){return this.operation="insert",this.payload=e,this}update(e){return this.operation="update",this.payload=e,this}delete(){return this.operation="delete",this}upsert(e,t){return this.operation="upsert",this.payload=e,this.upsertOptions=t||{},this}eq(e,t){return this.filters.push({op:"eq",column:e,value:t}),this}neq(e,t){return this.filters.push({op:"neq",column:e,value:t}),this}gt(e,t){return this.filters.push({op:"gt",column:e,value:t}),this}gte(e,t){return this.filters.push({op:"gte",column:e,value:t}),this}lt(e,t){return this.filters.push({op:"lt",column:e,value:t}),this}lte(e,t){return this.filters.push({op:"lte",column:e,value:t}),this}is(e,t){return this.filters.push({op:"is",column:e,value:t}),this}in(e,t){return this.filters.push({op:"in",column:e,value:t||[]}),this}contains(e,t){return this.filters.push({op:"contains",column:e,value:t}),this}or(e){return this.filters.push({op:"or",expression:e}),this}order(e,t){return this.orderSpecs.push({column:e,...t||{}}),this}limit(e){return this.limitValue=e,this}single(){return this.singleMode="single",this.execute()}maybeSingle(){return this.singleMode="maybeSingle",this.execute()}then(e,t){return this.execute().then(e,t)}buildWhere(e,t){for(let r of this.filters){if("or"===r.op){let i=r.expression.split(",").map(e=>e.trim()).filter(Boolean).map(e=>{var r;let[i,n,...o]=e.split("."),a="true"===(r=o.join("."))||"false"!==r&&("null"===r?null:r);return"eq"===n?(t.push(f(a)),`${i} = ?`):"neq"===n?(t.push(f(a)),`${i} <> ?`):"is"===n?null===a?`${i} IS NULL`:(t.push(f(a)),`${i} IS ?`):"ilike"===n||"like"===n?(t.push(f(a)),`${i} LIKE ?`):"1=1"});i.length>0&&e.push(`(${i.join(" OR ")})`);continue}if("eq"===r.op)t.push(f(r.value)),e.push(`${r.column} = ?`);else if("neq"===r.op)t.push(f(r.value)),e.push(`${r.column} <> ?`);else if("gt"===r.op)t.push(f(r.value)),e.push(`${r.column} > ?`);else if("gte"===r.op)t.push(f(r.value)),e.push(`${r.column} >= ?`);else if("lt"===r.op)t.push(f(r.value)),e.push(`${r.column} < ?`);else if("lte"===r.op)t.push(f(r.value)),e.push(`${r.column} <= ?`);else if("is"===r.op)null===r.value?e.push(`${r.column} IS NULL`):(t.push(f(r.value)),e.push(`${r.column} IS ?`));else if("contains"===r.op){let i=(r.value||[]).map(f);if(0===i.length)e.push("1=1");else{let n=i.map(()=>"?").join(", ");t.push(...i),e.push(`(SELECT COUNT(*) FROM json_each(${r.column}) WHERE json_each.value IN (${n})) = ${i.length}`)}}else if("in"===r.op)if(r.value&&0!==r.value.length){let i=(r.value||[]).map(f),n=i.map(()=>"?").join(", ");t.push(...i),e.push(`${r.column} IN (${n})`)}else e.push("1=0")}}executeSelect(){try{let e=h(),{columns:t,includeProjectRepos:r}=A(this.selectColumns),i=[],n=[];this.buildWhere(n,i);let o=`SELECT ${t.join(", ")} FROM ${this.table}`;if(n.length>0&&(o+=` WHERE ${n.join(" AND ")}`),this.orderSpecs.length>0){let e=this.orderSpecs.map(e=>{let t=!1===e.ascending?"DESC":"ASC";return!0===e.nullsFirst?`CASE WHEN ${e.column} IS NULL THEN 0 ELSE 1 END, ${e.column} ${t}`:!1===e.nullsFirst?`CASE WHEN ${e.column} IS NULL THEN 1 ELSE 0 END, ${e.column} ${t}`:`${e.column} ${t}`}).join(", ");o+=` ORDER BY ${e}`}"number"==typeof this.limitValue&&(i.push(this.limitValue),o+=" LIMIT ?");let a=e.prepare(o).all(...i);if(a=a.map(C),r&&"projects"===this.table&&a.length>0){let t=a.map(e=>e.id).filter(Boolean);if(t.length>0){let r=t.map(()=>"?").join(", "),i=e.prepare(`SELECT * FROM project_repos WHERE project_id IN (${r})`).all(...t),n=new Map;for(let e of i){let t=n.get(e.project_id)||[];t.push(e),n.set(e.project_id,t)}a=a.map(e=>({...e,project_repos:n.get(e.id)||[]}))}}if("single"===this.singleMode){if(0===a.length)return{data:null,error:{message:"No rows",code:"PGRST116"}};return{data:a[0],error:null}}if("maybeSingle"===this.singleMode)return{data:a[0]||null,error:null};return{data:a,error:null}}catch(e){return{data:null,error:e}}}executeInsertOrUpsert(){try{let e,t=h(),r=Array.isArray(this.payload)?this.payload:[this.payload];if(!r.length)return{data:[],error:null};let i=Array.from(r.reduce((e,t)=>{for(let r of Object.keys(t||{}))e.add(r);return e},new Set)),n=[],o=r.map(e=>{let t=i.map(t=>(n.push(S(t,e[t])),"?"));return`(${t.join(", ")})`}),a=`INSERT INTO ${this.table} (${i.join(", ")}) VALUES ${o.join(", ")}`;if("upsert"===this.operation){let e=this.upsertOptions?.onConflict||"",t=String(e).split(",").map(e=>e.trim()).filter(Boolean);if(t.length>0)if(this.upsertOptions?.ignoreDuplicates)a+=` ON CONFLICT (${t.join(", ")}) DO NOTHING`;else{let e=i.filter(e=>!t.includes(e)).map(e=>`${e} = EXCLUDED.${e}`);e.length>0?a+=` ON CONFLICT (${t.join(", ")}) DO UPDATE SET ${e.join(", ")}`:a+=` ON CONFLICT (${t.join(", ")}) DO NOTHING`}}if(this.returningColumns){let{columns:e}=A(this.returningColumns);a+=` RETURNING ${e.join(", ")}`}this.returningColumns?e=(e=t.prepare(a).all(...n)).map(C):(t.prepare(a).run(...n),e=[]);let s=this.returningColumns?e:null;if("single"===this.singleMode||"maybeSingle"===this.singleMode)return{data:s&&s[0]||null,error:null};return{data:s,error:null}}catch(e){return{data:null,error:e}}}executeUpdateOrDelete(){try{let e,t=h(),r=[],i=[],n=[];this.buildWhere(n,i);let o="";if("update"===this.operation){let e=Object.keys(this.payload||{}).map(e=>{let t=this.payload[e];return t instanceof L?`${e} = ${t.expr}`:(r.push(S(e,t)),`${e} = ?`)});o=`UPDATE ${this.table} SET ${e.join(", ")}`}else o=`DELETE FROM ${this.table}`;n.length>0&&(o+=` WHERE ${n.join(" AND ")}`);let a=[...r,...i];if(this.returningColumns){let{columns:e}=A(this.returningColumns);o+=` RETURNING ${e.join(", ")}`}this.returningColumns?e=(e=t.prepare(o).all(...a)).map(C):(t.prepare(o).run(...a),e=[]);let s=this.returningColumns?e:null;if("single"===this.singleMode){if(!s||0===s.length)return{data:null,error:{message:"No rows",code:"PGRST116"}};return{data:s[0],error:null}}if("maybeSingle"===this.singleMode)return{data:s?.[0]||null,error:null};return{data:s,error:null}}catch(e){return{data:null,error:e}}}async execute(){return"select"===this.operation?this.executeSelect():"insert"===this.operation||"upsert"===this.operation?this.executeInsertOrUpsert():this.executeUpdateOrDelete()}}let R=new Set([...O,"depends_on","open_blockers","swarm_models","run_index","stage_decisions","definition","metadata","models","config","policy","done_criteria","outputs","task_snapshot","data_mapping"]);function C(e){if(!e||"object"!=typeof e)return e;let t={...e};for(let e of Object.keys(t)){if(R.has(e)&&"string"==typeof t[e])try{t[e]=JSON.parse(t[e])}catch{}("swarm"===e||"is_default"===e||"is_public"===e||"had_graph_before"===e)&&(0===t[e]?t[e]=!1:1===t[e]&&(t[e]=!0))}return t}function U(){return{from:e=>new I(e),auth:{getUser:async()=>({data:{user:{id:a.id,email:a.email,user_metadata:{name:a.name,full_name:a.name}}},error:null}),exchangeCodeForSession:async()=>({error:null}),refreshSession:async()=>({data:{session:{access_token:"local-token",refresh_token:"local-refresh",expires_in:3600},user:{id:a.id,email:a.email}},error:null})},async rpc(e,t){if("check_rate_limit"!==e)return{data:null,error:{message:`Unsupported rpc: ${e}`}};let r=h(),i=t.p_user_id,n=t.p_endpoint,o=Number(t.p_limit||60),a=Number(t.p_window_seconds||60),s=new Date(Math.floor(new Date().getTime()/(1e3*a))*a*1e3);try{let e=`
|
|
253
253
|
INSERT INTO rate_limits (user_id, endpoint, window_start, request_count)
|
|
254
254
|
VALUES (?, ?, ?, 1)
|
|
255
255
|
ON CONFLICT (user_id, endpoint, window_start)
|
|
256
256
|
DO UPDATE SET request_count = rate_limits.request_count + 1
|
|
257
257
|
RETURNING request_count
|
|
258
|
-
`,t=r.prepare(e).get(i,n,s.toISOString());return{data:Number(t?.request_count||0)<=o,error:null}}catch(e){return{data:!1,error:e}}},channel:()=>({on(){return this},subscribe(e){return e&&e("SUBSCRIBED"),this}}),removeChannel(){}}}e.s(["SqlExpression",()=>
|
|
258
|
+
`,t=r.prepare(e).get(i,n,s.toISOString());return{data:Number(t?.request_count||0)<=o,error:null}}catch(e){return{data:!1,error:e}}},channel:()=>({on(){return this},subscribe(e){return e&&e("SUBSCRIBED"),this}}),removeChannel(){}}}e.s(["SqlExpression",()=>L,"createAdminDbClientSQLite",()=>U,"getSQLiteDb",()=>h,"sqlExpr",()=>m],65196)}];
|
|
259
259
|
|
|
260
260
|
//# sourceMappingURL=lib_sqlite-query-adapter_ts_3ea4d849._.js.map
|