@mndrk/agx 2.0.47 → 2.0.49
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/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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +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.js.nft.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- 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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +13 -7
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +14 -6
- 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 +13 -5
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +3 -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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +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]/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +3 -4
- 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 +3 -4
- 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 +3 -4
- 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 +3 -4
- 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 +3 -4
- 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 +4 -5
- 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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page.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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
- 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.js.nft.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
- 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/folders/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.segments/folders/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/folders.segments/folders.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +3 -3
- 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 +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +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/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +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.js.nft.json +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.js.nft.json +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]/linear/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js.nft.json +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.js.nft.json +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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page_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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page_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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page_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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +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.js.nft.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
- 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/[root-of-the-server]__015d40a6._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a300f072._.js → [root-of-the-server]__02a4a323._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__05dedbe1._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__4ce74056._.js → [root-of-the-server]__05f0bfbf._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c22dd3a6._.js → [root-of-the-server]__08c82fe8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__3fae531a._.js → [root-of-the-server]__09e37b59._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__1a1f66b1._.js → [root-of-the-server]__0e83aabc._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__27da58f0._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__9ffa67b7._.js → [root-of-the-server]__2ae8b938._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2cfd21b8._.js +108 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__37844df7._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d9f2041b._.js → [root-of-the-server]__3a93931b._.js} +4 -4
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f9f7f2df._.js → [root-of-the-server]__3c1403f2._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__143fdf69._.js → [root-of-the-server]__40e9e2e8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42e602eb._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a7b2350e._.js → [root-of-the-server]__456840d0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5c2848bb._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__667c658f._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6a92b882._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6c9baa7c._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c21747df._.js → [root-of-the-server]__719eddc2._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__36d15de5._.js → [root-of-the-server]__7ee3dfe1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d324f8a1._.js → [root-of-the-server]__80964fad._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__bab85495._.js → [root-of-the-server]__862cf77d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a280fa63._.js → [root-of-the-server]__8b5b9860._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__3170b7bf._.js → [root-of-the-server]__8d475640._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__958dded3._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ab655b9f._.js → [root-of-the-server]__96c424d5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5c55f67a._.js → [root-of-the-server]__976ebe46._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__179cb224._.js → [root-of-the-server]__a1cab8fe._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__20a2cb22._.js → [root-of-the-server]__a31dd756._.js} +9 -9
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a3955224._.js → [root-of-the-server]__ad53dc3f._.js} +17 -17
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ac6326b6._.js → [root-of-the-server]__b8eeb177._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__fcfa3690._.js → [root-of-the-server]__c10e827d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e58e9f91._.js → [root-of-the-server]__c11e0040._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c40b6f69._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c7d3c7ab._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cdc52544._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__8cbd8c56._.js → [root-of-the-server]__d1c698b6._.js} +12 -12
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9ea98bd._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ef27f8cd._.js → [root-of-the-server]__df886e3c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ca4987eb._.js → [root-of-the-server]__e0b6f424._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c8890cd6._.js → [root-of-the-server]__f43ecbc2._.js} +13 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f51c7b72._.js +5 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f662fd1e._.js +20 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__538b0bdd._.js → [root-of-the-server]__f961230c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b627cb83._.js → [root-of-the-server]__feec5b54._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d16caed5._.js → [root-of-the-server]__ff6ce4b1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff9ce15e._.js +5 -0
- package/cloud-runtime/standalone/.next/server/chunks/_26ffc857._.js +121 -0
- package/cloud-runtime/standalone/.next/server/chunks/_4d07f8db._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_66d0cf73._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_9b10087f._.js +3 -2
- package/cloud-runtime/standalone/.next/server/chunks/_a13c0bef._.js +121 -0
- package/cloud-runtime/standalone/.next/server/chunks/{lib_98ae187c._.js → lib_2cd3429c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/lib_a2a83df5._.js +55 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_a658c9ef._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_ba38ea08._.js +55 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_orchestrator_chat-processor_ts_4c335719._.js +27 -29
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +6 -102
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_schedule-runner_ts_43a13c69._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__0b2a2b86._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__32546242._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ff9ead4._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f2c3b7ab._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f59f0dc7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d96bb3b5._.js → [root-of-the-server]__fbe1ab4a._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1e9b9b1e._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_24fe6213._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_36a0c486._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_3b21d3b2._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_3eeac8f9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_48db42b7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_59f30a73._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_7d3b0032._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_916950b3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_b598ae8a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cc8c8302._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_d972a4e1._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_dd7bb6fb._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_dd9880fb._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_f02d786a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fd8cafe9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_linear_page_tsx_971a6ba7._.js +15 -12
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.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/chunks/ssr/node_modules_lucide-react_dist_esm_54bf563f._.js +3 -0
- 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/04c135686161dbb1.js +40 -0
- package/cloud-runtime/standalone/.next/static/chunks/0d63db0c39c0a3b2.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/136ed07d84b14632.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/18866ed04ed3a063.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{ccaf68956da192f8.js → 1bb38e61d891453c.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/2c7c8259c2b56bf5.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2da1f13d50dc4e54.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/5545da2ad239c0b6.js +3 -0
- package/cloud-runtime/standalone/.next/static/chunks/{41c518743656a291.js → 5f33b52d582b0bb4.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{97c11137cd6fc860.js → 64c2961edd3a3b13.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{db131a0b6350e416.js → 692ce04abdbb3970.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/83be8569d298c6b0.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/87b3afe828c8cc52.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{4343e7fe5bf5f34a.js → 9328740727c6456d.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/95d47e285ae9c031.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/b9bf5d3ee92a1313.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/ea35fb870141bcff.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/f59722264449b61c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/f727d2c8f039511d.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{31fe4e36a00fd7b5.js → f8706212baa8ec67.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/fd823c9d1381335d.js +1 -0
- package/cloud-runtime/standalone/app/api/chat/route.ts +5 -163
- package/cloud-runtime/standalone/app/api/schedules/route.ts +11 -2
- package/cloud-runtime/standalone/app/automations/page.tsx +11 -1
- package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +11 -1
- package/cloud-runtime/standalone/components/LinearBoard.tsx +118 -21
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +10 -13
- package/cloud-runtime/standalone/components/linear/RunScriptManager.tsx +356 -0
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +35 -0
- package/cloud-runtime/standalone/hooks/useLinearRunScripts.ts +115 -0
- package/cloud-runtime/standalone/lib/chat/project-context.ts +169 -0
- package/cloud-runtime/standalone/lib/linear-client.ts +33 -3
- package/cloud-runtime/standalone/lib/linear-execution-prompt.ts +92 -15
- package/cloud-runtime/standalone/lib/orchestrator/runtime.ts +2 -0
- package/cloud-runtime/standalone/lib/orchestrator/schedule-runtime.ts +76 -0
- package/cloud-runtime/standalone/src/graph/internal-function-dispatcher.ts +201 -16
- package/cloud-runtime/standalone/src/graph/work-dispatcher.ts +128 -35
- package/cloud-runtime/standalone/state/automations/.state/c4300b01-1203-40fe-b3a9-b9fb9ec0c5cc.json +8 -0
- package/cloud-runtime/standalone/state/automations/active/c4300b01-1203-40fe-b3a9-b9fb9ec0c5cc.md +15 -0
- package/cloud-runtime/standalone/state/linearRunScripts.test.ts +99 -0
- package/cloud-runtime/standalone/state/linearRunScripts.ts +132 -0
- package/cloud-runtime/standalone/state/windowState.ts +21 -0
- package/cloud-runtime/standalone/tsconfig.tsbuildinfo +1 -1
- package/cloud-runtime/standalone/vault/agx/issues/ESO-327/design-doc.md +202 -0
- package/cloud-runtime/standalone/worker/index.js +34516 -1717
- package/cloud-runtime/standalone/worker/index.ts +3 -0
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1154e5b3._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__152b2000._.js +0 -61
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__33865410._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6c53437e._.js +0 -110
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6dbe939c._.js +0 -49
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7012e83d._.js +0 -66
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76290829._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad6d6402._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__da645a5e._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f4b3df16._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_2a5aeb76._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_4689976f._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_682c9d81._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_6e7f0ae4._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_a32a5cdd._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_af7bd752._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_fe32a267._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/lib_2492d514._.js +0 -55
- package/cloud-runtime/standalone/.next/server/chunks/lib_3c080873._.js +0 -34
- package/cloud-runtime/standalone/.next/server/chunks/lib_9f439b27._.js +0 -70
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_12d46a92._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_55c06268._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__21a9eaef._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__69887882._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__9ad05ace._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bb149a22._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_11ce4c04._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1d949e96._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_32a156b6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_43c091dc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_45175f47._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_4f0c544d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_69164b06._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_7f7a828a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_97f6a18e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a511a014._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_c3a3a829._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cee3cf86._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_e8bdedc5._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/14fff3c493ea9c54.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/2a9c83f8211196e0.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/5405540470146645.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/69f2db4b9996b9c1.js +0 -37
- package/cloud-runtime/standalone/.next/static/chunks/8aeb69ceb497ad85.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/a9da98f883ac833b.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/b2127dc67c5ade9f.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/baf5d39d089efb87.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/bf2a2fafb710e63c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/c78969fde5798275.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/d3dc6fadb96ab3a2.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/fdadad2379039dce.js +0 -3
- package/cloud-runtime/standalone/state/automations/.state/24a6a5db-3b14-49c4-841f-29f10f015fbb.json +0 -8
- package/cloud-runtime/standalone/state/automations/active/24a6a5db-3b14-49c4-841f-29f10f015fbb.md +0 -17
- /package/cloud-runtime/standalone/.next/static/{lOB5InbmVcurTLQo9J3KK → ZkFZnP5h74O7GgdHudXgH}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{lOB5InbmVcurTLQo9J3KK → ZkFZnP5h74O7GgdHudXgH}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{lOB5InbmVcurTLQo9J3KK → ZkFZnP5h74O7GgdHudXgH}/_ssgManifest.js +0 -0
|
@@ -8,6 +8,7 @@ import "@/lib/check-node-version";
|
|
|
8
8
|
import { getQueue, QUEUE_NAMES, stopQueue } from "@/lib/queue/boss";
|
|
9
9
|
import { taskProcessor } from "@/lib/orchestrator/processor";
|
|
10
10
|
import { chatProcessor } from "@/lib/orchestrator/chat-processor";
|
|
11
|
+
import { ensureScheduleRuntime, stopScheduleRuntime } from "@/lib/orchestrator/schedule-runtime";
|
|
11
12
|
import { assertWorkerCount, MAX_WORKERS } from "@/lib/limits";
|
|
12
13
|
|
|
13
14
|
async function main(): Promise<void> {
|
|
@@ -30,6 +31,7 @@ async function main(): Promise<void> {
|
|
|
30
31
|
chatProcessor,
|
|
31
32
|
{ batchSize: 2 }
|
|
32
33
|
);
|
|
34
|
+
await ensureScheduleRuntime();
|
|
33
35
|
|
|
34
36
|
console.log(`[worker] Listening on queue: ${QUEUE_NAMES.TASK_PROCESS}`);
|
|
35
37
|
console.log(`[worker] Listening on queue: ${QUEUE_NAMES.CHAT_RUN_PROCESS}`);
|
|
@@ -37,6 +39,7 @@ async function main(): Promise<void> {
|
|
|
37
39
|
// Graceful shutdown
|
|
38
40
|
const shutdown = async (signal: string) => {
|
|
39
41
|
console.log(`[worker] Received ${signal}, shutting down...`);
|
|
42
|
+
await stopScheduleRuntime();
|
|
40
43
|
await stopQueue();
|
|
41
44
|
process.exit(0);
|
|
42
45
|
};
|
package/package.json
CHANGED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
module.exports=[193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},810010,e=>{"use strict";function t(e){let t=e?.trim();return t?t.replace(/\/+$/,""):null}let r="http://localhost:41741";function n(){return t("http://localhost:3000")??t(process.env.AGX_BOARD_URL)??t(process.env.NEXT_PUBLIC_AGX_BOARD_URL)??r}function a(){return t(process.env.AGX_BOARD_URL)??t(process.env.NEXT_PUBLIC_AGX_BOARD_URL)??t("http://localhost:3000")??r}function s(){let e=new Set([r,"http://127.0.0.1:41741"]);for(let r of["http://localhost:3000",process.env.AGX_BOARD_URL,process.env.NEXT_PUBLIC_AGX_BOARD_URL]){let n=t(r);n&&e.add(n)}return Array.from(e)}e.s(["getAllowedOrigins",()=>s,"getConfiguredAppBaseUrl",()=>n,"getConfiguredBoardBaseUrl",()=>a])},423502,(e,t,r)=>{},841897,e=>{"use strict";e.i(423502);var t=e.i(902157),r=e.i(750227);function n(){return r.default.join(process.cwd(),".linear-token.json")}function a(e){(0,t.writeFileSync)(n(),JSON.stringify(e,null,2))}function s(){try{(0,t.unlinkSync)(n())}catch{}}class i{accessToken;constructor(e){this.accessToken=e}get viewer(){return this.request("query { viewer { id name email } }").then(e=>e.viewer)}async users(){return(await this.request(`query {
|
|
2
|
-
users(first: 100) {
|
|
3
|
-
nodes {
|
|
4
|
-
id
|
|
5
|
-
name
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
}`)).users.nodes.filter(e=>e.name.trim().length>0).map(e=>({id:e.id,name:e.name})).sort((e,t)=>e.name.localeCompare(t.name))}async teams(){return(await this.request(`query {
|
|
9
|
-
teams(first: 50) {
|
|
10
|
-
nodes {
|
|
11
|
-
id
|
|
12
|
-
name
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}`)).teams.nodes.filter(e=>e.name.trim().length>0).map(e=>({id:e.id,name:e.name})).sort((e,t)=>e.name.localeCompare(t.name))}async issues(e){let t,r=(t=[`first: ${e.first}`],e.after&&t.push(`after: ${JSON.stringify(e.after)}`),e.orderBy&&t.push(`orderBy: ${e.orderBy}`),e.filter&&Object.keys(e.filter).length>0&&t.push(`filter: ${function e(t){if(null===t)return"null";if(Array.isArray(t))return`[${t.map(e).join(", ")}]`;if("string"==typeof t)return JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return String(t);if("object"==typeof t){let r=Object.entries(t).filter(([,e])=>void 0!==e);return`{ ${r.map(([t,r])=>`${t}: ${e(r)}`).join(", ")} }`}throw Error(`Unsupported GraphQL value: ${typeof t}`)}(e.filter)}`),t.join(", ")),n=await this.request(`query {
|
|
16
|
-
issues(${r}) {
|
|
17
|
-
nodes {
|
|
18
|
-
id
|
|
19
|
-
identifier
|
|
20
|
-
title
|
|
21
|
-
description
|
|
22
|
-
url
|
|
23
|
-
updatedAt
|
|
24
|
-
state { name }
|
|
25
|
-
assignee { id name email }
|
|
26
|
-
team { id name key }
|
|
27
|
-
cycle { id number name }
|
|
28
|
-
}
|
|
29
|
-
pageInfo {
|
|
30
|
-
hasNextPage
|
|
31
|
-
endCursor
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}`);return{nodes:n.issues.nodes.map(e=>({id:e.id,identifier:e.identifier,title:e.title,description:e.description,url:e.url,updatedAt:e.updatedAt,state:Promise.resolve(e.state),assignee:Promise.resolve(e.assignee),team:Promise.resolve(e.team),cycle:Promise.resolve(e.cycle)})),pageInfo:n.issues.pageInfo}}async cycles(){let e=await this.request(`query {
|
|
35
|
-
teams(first: 50) {
|
|
36
|
-
nodes {
|
|
37
|
-
id
|
|
38
|
-
name
|
|
39
|
-
activeCycle {
|
|
40
|
-
id
|
|
41
|
-
number
|
|
42
|
-
name
|
|
43
|
-
startsAt
|
|
44
|
-
endsAt
|
|
45
|
-
team {
|
|
46
|
-
id
|
|
47
|
-
name
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
cycles(first: 20) {
|
|
51
|
-
nodes {
|
|
52
|
-
id
|
|
53
|
-
number
|
|
54
|
-
name
|
|
55
|
-
startsAt
|
|
56
|
-
endsAt
|
|
57
|
-
team {
|
|
58
|
-
id
|
|
59
|
-
name
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}`),t=new Map;for(let r of e.teams.nodes)for(let e of[...r.activeCycle?[r.activeCycle]:[],...r.cycles.nodes])t.has(e.id)||t.set(e.id,{id:e.id,number:e.number,name:e.name,startsAt:e.startsAt,endsAt:e.endsAt,teamId:e.team?.id??r.id,teamName:e.team?.name??r.name});return[...t.values()].sort((e,t)=>new Date(t.startsAt).getTime()-new Date(e.startsAt).getTime())}async request(e){let t=await fetch("https://api.linear.app/graphql",{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.accessToken},body:JSON.stringify({query:e}),cache:"no-store"}),r=await t.json();if(!t.ok||r.errors?.length)throw Error(r.errors?.map(e=>e.message).find(Boolean)??`Linear request failed with status ${t.status}`);if(!r.data)throw Error("Linear response did not include data");return r.data}}function o(){let e=function(){try{let e=(0,t.readFileSync)(n(),"utf8");return JSON.parse(e)}catch{return null}}();return e?new i(e.accessToken):null}e.s(["LinearClient",()=>i,"deleteLinearToken",()=>s,"getLinearClient",()=>o,"saveLinearToken",()=>a])},924006,e=>{"use strict";var t=e.i(747909),r=e.i(174017),n=e.i(996250),a=e.i(759756),s=e.i(561916),i=e.i(174677),o=e.i(869741),l=e.i(316795),d=e.i(487718),u=e.i(995169),c=e.i(47587),p=e.i(666012),f=e.i(570101),h=e.i(626937),m=e.i(10372),y=e.i(193695);e.i(52474);var g=e.i(600220),v=e.i(89171),R=e.i(810010),x=e.i(841897);async function w(e){let t=e.nextUrl.searchParams.get("code");if(!t)return v.NextResponse.redirect("/?linear=error");let r=process.env.LINEAR_CLIENT_ID,n=process.env.LINEAR_CLIENT_SECRET,a=`${(0,R.getConfiguredAppBaseUrl)()}/api/linear/callback`,s=await fetch("https://api.linear.app/oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:t,client_id:r,client_secret:n,redirect_uri:a})});if(!s.ok)return v.NextResponse.redirect("/?linear=error");let i=await s.json();return(0,x.saveLinearToken)({accessToken:i.access_token,expiresAt:i.expires_in?Date.now()+1e3*i.expires_in:void 0}),v.NextResponse.redirect("/?linear=connected")}e.s(["GET",()=>w,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],825472);var A=e.i(825472);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/linear/callback/route",pathname:"/api/linear/callback",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/linear/callback/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:E,workUnitAsyncStorage:_,serverHooks:T}=C;function b(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:_})}async function k(e,t,n){C.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/linear/callback/route";v=v.replace(/\/index$/,"")||"/";let R=await C.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:x,params:w,nextConfig:A,parsedUrl:E,isDraftMode:_,prerenderManifest:T,routerServerContext:b,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,resolvedPathname:O,clientReferenceManifest:P,serverActionsManifest:q}=R,S=(0,o.normalizeAppPath)(v),U=!!(T.dynamicRoutes[S]||T.routes[O]),j=async()=>((null==b?void 0:b.render404)?await b.render404(e,t,E,!1):t.end("This page could not be found"),null);if(U&&!_){let e=!!T.routes[O],t=T.dynamicRoutes[S];if(t&&!1===t.fallback&&!e){if(A.experimental.adapterPath)return await j();throw new y.NoFallbackError}}let I=null;!U||C.isDev||_||(I="/index"===(I=O)?"/":I);let L=!0===C.isDev||!U,D=U&&!L;q&&P&&(0,i.setManifestsSingleton)({page:v,clientReferenceManifest:P,serverActionsManifest:q});let B=e.method||"GET",$=(0,s.getTracer)(),H=$.getActiveScopeSpan(),M={params:w,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!A.experimental.authInterrupts},cacheComponents:!!A.cacheComponents,supportsDynamicResponse:L,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:A.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>C.onRequestError(e,t,n,a,b)},sharedContext:{buildId:x}},X=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),F=d.NextRequestAdapter.fromNodeNextRequest(X,(0,d.signalFromNodeResponse)(t));try{let i=async e=>C.handle(F,M).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${B} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${B} ${v}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&k&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=M.renderOpts.fetchMetrics;let l=M.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=M.renderOpts.collectedTags;if(!U)return await (0,p.sendResponse)(X,G,s,M.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[m.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,n=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:k})},!1,b),t}},u=await C.handleResponse({req:e,nextConfig:A,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:o});if(!U)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),_&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let y=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&U||y.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||y.get("Cache-Control")||y.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(X,G,new Response(u.value.body,{headers:y,status:u.value.status||200})),null};H?await l(H):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${B} ${v}`,kind:s.SpanKind.SERVER,attributes:{"http.method":B,"http.target":e.url}},l))}catch(t){if(t instanceof y.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:k})},!1,b),U)throw t;return await (0,p.sendResponse)(X,G,new Response(null,{status:500})),null}}e.s(["handler",()=>k,"patchFetch",()=>b,"routeModule",()=>C,"serverHooks",()=>T,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>_],924006)}];
|
|
66
|
-
|
|
67
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__1154e5b3._.js.map
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
module.exports=[750227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},660526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},446786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},259833,e=>{"use strict";function t(e,t){let r=e.prepare(`PRAGMA ${t}`).get();if(!r)return;let s=Object.values(r);return s.length>0?s[0]:void 0}function r(e,t){return e.prepare(`PRAGMA ${t}`).all()}function s(e,t){e.exec(`PRAGMA ${t}`)}function n(e,t){e.exec("BEGIN");try{let r=t();return e.exec("COMMIT"),r}catch(t){throw e.exec("ROLLBACK"),t}}function a(e,t){return(...r)=>{e.exec("BEGIN");try{let s=t(...r);return e.exec("COMMIT"),s}catch(t){throw e.exec("ROLLBACK"),t}}}e.s(["pragmaAll",()=>r,"pragmaGet",()=>t,"pragmaSet",()=>s,"transaction",()=>n,"transactionFn",()=>a])},233405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},949041,e=>{"use strict";let t={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,t])},121729,e=>{"use strict";e.x("node:sqlite",()=>require("node:sqlite"),!0);var t=e.i(259833);e.i(522734);var r=e.i(446786),s=e.i(814747);let n="3.35.0",a=["json1"],o=["fts5"],i=["nfs","smb","cifs","efs","fuse.sshfs"];function u(e,t){try{if("json1"===t)return e.prepare("SELECT json('{}')").get(),!0;if("fts5"===t)return e.exec("CREATE VIRTUAL TABLE IF NOT EXISTS _fts5_check USING fts5(x)"),e.exec("DROP TABLE IF EXISTS _fts5_check"),!0;return!1}catch{return!1}}function d(d,l){let c=[],p=d.prepare("SELECT sqlite_version() as v").get();for(let e of(0>function(e,t){let r=e.split(".").map(Number),s=t.split(".").map(Number);for(let e=0;e<3;e++){let t=(r[e]||0)-(s[e]||0);if(0!==t)return t}return 0}(p.v,n)&&c.push({kind:"version_mismatch",message:`SQLite version ${p.v} is below minimum ${n}`,found:p.v,required:`>= ${n}`,fix:"Ensure Node.js >= 22.16 is installed (node:sqlite is built-in)"}),a))u(d,e)||c.push({kind:"missing_extension",message:`Required SQLite extension '${e}' is not available`,required:e,fix:`Rebuild SQLite with -DSQLITE_ENABLE_${e.toUpperCase()}=1, or use a system SQLite that includes it`});for(let e of o)u(d,e)||console.warn(`[startup] Recommended SQLite extension '${e}' is not available. Full-text search will be disabled.`);let h=function(t){"linux"!==r.default.platform()&&r.default.platform();try{let n=s.default.resolve(t),{execSync:a}=e.r(233405);if("darwin"===r.default.platform()){let e=a(`df -T "${n}" 2>/dev/null || df "${n}"`,{encoding:"utf-8",timeout:3e3}).trim().split("\n");if(e.length>=2){let t=e[1].split(/\s+/),r=t[0]?.toLowerCase()||"";if(r.includes("://")||r.includes("nfs")||r.includes("smb"))return r}}}catch{}return null}(l);h&&i.some(e=>h.toLowerCase().includes(e))&&c.push({kind:"filesystem_error",message:`Database path '${l}' is on a network filesystem (${h})`,path:l,found:h,fix:"Move the database file to a local SSD. WAL mode requires local filesystem with reliable fsync."});try{(0,t.pragmaSet)(d,"journal_mode = wal"),(0,t.pragmaSet)(d,"foreign_keys = 1"),(0,t.pragmaSet)(d,"busy_timeout = 5000"),(0,t.pragmaSet)(d,"synchronous = 1"),(0,t.pragmaSet)(d,"cache_size = -64000");let e=(0,t.pragmaGet)(d,"journal_mode").toLowerCase(),r=new Set(["wal","delete"]);if(!r.has(e)){(0,t.pragmaSet)(d,"journal_mode = DELETE");let e=(0,t.pragmaGet)(d,"journal_mode").toLowerCase();r.has(e)?((0,t.pragmaSet)(d,"synchronous = FULL"),console.warn(`[startup] WAL unavailable, using journal_mode=${e} with synchronous=FULL`)):c.push({kind:"pragma_error",message:`Failed to set journal_mode (got '${e}', tried WAL then DELETE)`,found:e,required:"wal or delete",fix:"Ensure the database file is on a local filesystem and no other process holds an exclusive lock."})}}catch(e){c.push({kind:"pragma_error",message:`Failed to apply required PRAGMAs: ${e.message}`,fix:"Check file permissions and ensure the database is not read-only."})}return c}e.s(["validateSQLiteEnvironment",()=>d])},500874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},254799,(e,t,r)=>{t.exports=e.x("crypto",()=>require("crypto"))},874533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},97812,e=>{"use strict";var t=e.i(960447),r=e.i(259833);e.i(201037);var s=e.i(200866),n=e.i(434542);let a=new Set(["replan","rollback"]);class o extends Error{expectedVersion;actualVersion;constructor(e,t){super(`Execution graph version conflict: expected ${e}, found ${t}.`),this.name="GraphVersionConflictError",this.expectedVersion=e,this.actualVersion=t}}class i extends Error{constructor(e){super(`Execution graph not found: ${e}`),this.name="GraphNotFoundError"}}class u extends Error{nodeIds;constructor(e,t){super(`Execution graph ${e} is missing node(s): ${t.join(", ")}`),this.name="GraphNodeNotFoundError",this.nodeIds=t}}class d extends Error{taskId;existingGraphId;constructor(e,t){super(`Task ${e} is already bound to execution graph ${t}.`),this.name="GraphTaskAlreadyBoundError",this.taskId=e,this.existingGraphId=t}}function l(e){return null==e?null:JSON.stringify(e)}function c(e){if(null==e)return null;if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function p(e){let t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toISOString()}function h(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:e}function g(e){if(!(0,n.isAutomationFrontmatterEnabled)()||!e.schedule)return;let t=(0,n.getAutomationRepository)(),r=(0,s.graphAutomationToDefinition)({graphId:e.id,taskId:e.taskId,schedule:e.schedule,createdAt:e.createdAt,updatedAt:e.updatedAt,executionState:e.executionState});t.upsertAutomation(r),t.updateAutomationState(e.id,{nextRunAt:e.schedule.nextTickAt,lastRunAt:e.schedule.lastTickAt,updatedAt:e.updatedAt,runCount:e.schedule.runCount,consecutiveFailures:e.schedule.consecutiveFailures,tickInProgress:e.schedule.tickInProgress})}function f(e){let r=e.trim();if(!r)return null;let s=(0,t.getSQLiteDb)().prepare(`SELECT task_id AS taskId
|
|
2
|
-
FROM execution_graphs
|
|
3
|
-
WHERE id = ?
|
|
4
|
-
LIMIT 1`).get(r);return s?.taskId??null}function m(e){let{type:t,status:r,metrics:s,output:n,...a}=e;return{type:t,status:r,config:a,output:n??null,metrics:s??null}}function E(e){let t={...h(c(e.payload))};return"eventType"in t||(t.eventType=e.event_type),"timestamp"in t||(t.timestamp=p(e.timestamp)),t}function _(e){return{query(t,r){let s=e.prepare(t);return/^\s*(INSERT|UPDATE|DELETE)/i.test(t)&&!/RETURNING/i.test(t)?(s.run(...(r??[]).map(e=>e)),{rows:[]}):{rows:s.all(...(r??[]).map(e=>e))}}}}class y{getDb(){return(0,t.getSQLiteDb)()}createGraph(e,t){let s=this.getDb(),n=_(s);t?.skipTaskBinding&&(0,r.pragmaSet)(s,"foreign_keys = OFF");try{return(0,r.transaction)(s,()=>{let r=n.query("SELECT id FROM execution_graphs WHERE task_id = ? LIMIT 1",[e.taskId]).rows[0];if(r&&r.id!==e.id)throw new d(e.taskId,r.id);for(let[t,r]of(n.query(`INSERT INTO execution_graphs
|
|
5
|
-
(id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at)
|
|
6
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
7
|
-
ON CONFLICT (id) DO UPDATE SET
|
|
8
|
-
task_id = excluded.task_id,
|
|
9
|
-
graph_version = excluded.graph_version,
|
|
10
|
-
mode = excluded.mode,
|
|
11
|
-
policy = excluded.policy,
|
|
12
|
-
done_criteria = excluded.done_criteria,
|
|
13
|
-
schedule = excluded.schedule,
|
|
14
|
-
created_at = excluded.created_at,
|
|
15
|
-
updated_at = excluded.updated_at`,[e.id,e.taskId,e.graphVersion,e.mode,l(e.policy),l(e.doneCriteria),l(e.schedule??null),e.createdAt,e.updatedAt]),n.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e.id]),n.query("DELETE FROM graph_edges WHERE graph_id = ?",[e.id]),Object.entries(e.nodes))){let s=m(r);n.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
|
|
16
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e.id,t,s.type,s.status,l(s.config),l(s.output),l(s.metrics)])}for(let t of e.edges)n.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
|
|
17
|
-
VALUES (?, ?, ?, ?, ?, ?)`,[e.id,t.from,t.to,t.type,t.condition??null,l(t.dataMapping??null)]);for(let t of e.versionHistory)this.appendEventInternal(n,e.id,t);for(let t of e.runtimeEvents??[])this.appendEventInternal(n,e.id,t);t?.skipTaskBinding||n.query("UPDATE tasks SET graph_id = ? WHERE id = ?",[e.id,e.taskId]);let s=this.getGraphForTask(n,e.taskId);if(!s)throw new i(e.id);return g(s),s})}finally{t?.skipTaskBinding&&(0,r.pragmaSet)(s,"foreign_keys = ON")}}getGraph(e){let t=this.getDb();return this.getGraphForTask(_(t),e)}updateNodeRuntime(e,t,s){let n=this.getDb(),a=_(n);return(0,r.transaction)(n,()=>{if(!a.query("SELECT id, graph_version FROM execution_graphs WHERE id = ?",[e]).rows[0])throw new i(e);let r=Object.keys(t);if(0===r.length){let t=a.query("SELECT graph_version, updated_at FROM execution_graphs WHERE id = ?",[e]);return{graphVersion:t.rows[0].graph_version,updatedAt:p(t.rows[0].updated_at)}}let s=r.map(()=>"?").join(", "),n=a.query(`SELECT node_id, type, status, config, output, metrics
|
|
18
|
-
FROM graph_nodes WHERE graph_id = ? AND node_id IN (${s})`,[e,...r]),o=new Map;for(let e of n.rows)o.set(e.node_id,e);let d=r.filter(e=>!o.has(e));if(d.length>0)throw new u(e,d);for(let s of r){let r=t[s],n=o.get(s);if(!n||!r)continue;let i={...h(c(n.config)),...h(r.configPatch)};void 0!==r.startedAt&&(i.startedAt=r.startedAt),void 0!==r.completedAt&&(i.completedAt=r.completedAt),void 0!==r.actualMinutes&&(i.actualMinutes=r.actualMinutes),a.query(`UPDATE graph_nodes SET status = ?, metrics = ?, output = ?, config = ?
|
|
19
|
-
WHERE graph_id = ? AND node_id = ?`,[r.status??n.status,l(r.metrics??c(n.metrics)),l(r.output??c(n.output)),l(i),e,s])}let g=a.query("UPDATE execution_graphs SET updated_at = datetime('now') WHERE id = ? RETURNING graph_version, updated_at",[e]);return{graphVersion:g.rows[0].graph_version,updatedAt:p(g.rows[0].updated_at)}})}updateGraphStructure(e,t,s){let n=this.getDb(),a=_(n);return(0,r.transaction)(n,()=>{let r=a.query("SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule FROM execution_graphs WHERE id = ?",[e]).rows[0];if(!r)throw new i(e);if(t.nodes)for(let[r,s]of(a.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e]),Object.entries(t.nodes))){let t=m(s);a.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
|
|
20
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e,r,t.type,t.status,l(t.config),l(t.output),l(t.metrics)])}if(t.edges)for(let r of(a.query("DELETE FROM graph_edges WHERE graph_id = ?",[e]),t.edges))a.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
|
|
21
|
-
VALUES (?, ?, ?, ?, ?, ?)`,[e,r.from,r.to,r.type,r.condition??null,l(r.dataMapping??null)]);let s=a.query(`UPDATE execution_graphs
|
|
22
|
-
SET mode = ?, policy = ?, done_criteria = ?, schedule = ?, updated_at = datetime('now')
|
|
23
|
-
WHERE id = ?
|
|
24
|
-
RETURNING graph_version, updated_at`,[t.mode??r.mode,l(t.policy??c(r.policy)??{}),l(t.doneCriteria??c(r.done_criteria)??{}),l(t.schedule??c(r.schedule)??null),e]);if(void 0!==t.schedule){let e=this.getGraphForTask(a,r.task_id);e?.schedule&&g(e)}return{graphVersion:s.rows[0].graph_version,updatedAt:p(s.rows[0].updated_at)}})}appendEvent(e,t){let r=this.getDb();this.appendEventInternal(_(r),e,t)}getGraphForTask(e,t){let r=e.query(`SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at
|
|
25
|
-
FROM execution_graphs WHERE task_id = ? ORDER BY updated_at DESC LIMIT 1`,[t]).rows[0];if(!r)return null;let o=e.query(`SELECT node_id, type, status, config, output, metrics
|
|
26
|
-
FROM graph_nodes WHERE graph_id = ? ORDER BY node_id ASC`,[r.id]),i=e.query(`SELECT from_id, to_id, type, condition, data_mapping
|
|
27
|
-
FROM graph_edges WHERE graph_id = ? ORDER BY from_id ASC, to_id ASC`,[r.id]),u=e.query(`SELECT event_type, payload, timestamp
|
|
28
|
-
FROM graph_events WHERE graph_id = ? ORDER BY timestamp ASC, event_type ASC`,[r.id]),d={};for(let e of o.rows)d[e.node_id]=function(e){let t={...h(c(e.config)),type:e.type,status:e.status},r=c(e.metrics);null!==r&&(t.metrics=r);let s=c(e.output);return null!==s&&(t.output=s),t}(e);let l=i.rows.map(e=>({from:e.from_id,to:e.to_id,type:e.type,...e.condition?{condition:c(e.condition)}:{},...e.data_mapping?{dataMapping:c(e.data_mapping)}:{}})),g=[],f=[];for(let e of u.rows){let t=E(e);a.has(t.eventType)?g.push(t):f.push(t)}var m={id:r.id,taskId:r.task_id,graphVersion:r.graph_version,mode:r.mode,nodes:d,edges:l,policy:c(r.policy)??{},doneCriteria:c(r.done_criteria)??{},schedule:c(r.schedule)??void 0,versionHistory:g,runtimeEvents:f,createdAt:p(r.created_at),updatedAt:p(r.updated_at)};if(!(0,n.isAutomationFrontmatterEnabled)())return m;let _=(0,n.getAutomationRepository)().getAutomation(m.id);return _&&"execution_graph"===_.definition.target.type?{...m,schedule:(0,s.automationRecordToGraphSchedule)(_,m.schedule)}:m}appendEventInternal(e,t,r){e.query(`INSERT INTO graph_events (graph_id, event_type, payload, timestamp)
|
|
29
|
-
VALUES (?, ?, ?, ?)`,[t,r.eventType,l(r),r.timestamp])}}function R(){return new y}let x=new y;function v(e,t){return x.createGraph(e,t)}function T(e){return x.getGraph(e)}function A(e,t,r){return x.updateNodeRuntime(e,t,r)}function S(e,t,r){return x.updateGraphStructure(e,t,r)}function I(e,t){return x.appendEvent(e,t)}function w(e,r={}){let s=["graph_id = ?"],n=[e];r.eventType&&(s.push("event_type = ?"),n.push(r.eventType)),r.since&&(s.push("timestamp >= ?"),n.push(r.since));let a=r.limit??1e3,o=`SELECT event_type, payload, timestamp
|
|
30
|
-
FROM graph_events
|
|
31
|
-
WHERE ${s.join(" AND ")}
|
|
32
|
-
ORDER BY timestamp ASC, event_type ASC
|
|
33
|
-
LIMIT ?`;return n.push(a),_((0,t.getSQLiteDb)()).query(o,n).rows.map(e=>E(e))}function k(e){let r=e.trim();if(!r)return null;if((0,n.isAutomationFrontmatterEnabled)()){let e=(0,n.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active",rootMessageId:r})[0];if(e?.definition.target.type==="execution_graph"){let t=e.definition.target.graphId??e.definition.id,r=e.definition.target.taskId??f(t);if(r)return{graphId:t,taskId:r}}if(!(0,n.isAutomationDualReadEnabled)())return null}return(0,t.getSQLiteDb)().prepare(`SELECT id AS graphId, task_id AS taskId
|
|
34
|
-
FROM execution_graphs
|
|
35
|
-
WHERE schedule IS NOT NULL
|
|
36
|
-
AND json_extract(schedule, '$.rootMessageId') = ?
|
|
37
|
-
AND json_extract(schedule, '$.state') = 'active'
|
|
38
|
-
ORDER BY updated_at DESC
|
|
39
|
-
LIMIT 1`).get(r)??null}function N(){let e=new Set;if((0,n.isAutomationFrontmatterEnabled)()){for(let t of(0,n.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active"}))"execution_graph"===t.definition.target.type&&t.definition.target.rootMessageId&&e.add(t.definition.target.rootMessageId);if(!(0,n.isAutomationDualReadEnabled)())return[...e]}for(let r of(0,t.getSQLiteDb)().prepare(`SELECT json_extract(schedule, '$.rootMessageId') AS rootMessageId
|
|
40
|
-
FROM execution_graphs
|
|
41
|
-
WHERE schedule IS NOT NULL
|
|
42
|
-
AND json_extract(schedule, '$.state') = 'active'`).all())r.rootMessageId&&e.add(r.rootMessageId);return[...e]}function C(e){let r=e.trim();if(!r)return 0;let s=0;if((0,n.isAutomationFrontmatterEnabled)()){for(let e of(0,n.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active",rootMessageId:r})){if("execution_graph"!==e.definition.target.type)continue;let t=e.definition.target.graphId??e.definition.id,r=e.definition.target.taskId??f(t);if(!r)continue;let n=T(r);n?.schedule&&(x.updateGraphStructure(n.id,{mode:n.mode,nodes:n.nodes,edges:n.edges,policy:n.policy,doneCriteria:n.doneCriteria,schedule:{...n.schedule,state:"stopped",tickInProgress:!1}},n.graphVersion),s+=1)}if(s>0||!(0,n.isAutomationDualReadEnabled)())return s}return Number((0,t.getSQLiteDb)().prepare(`UPDATE execution_graphs
|
|
43
|
-
SET schedule = json_set(schedule, '$.state', 'stopped', '$.tickInProgress', json('false')),
|
|
44
|
-
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')
|
|
45
|
-
WHERE schedule IS NOT NULL
|
|
46
|
-
AND json_extract(schedule, '$.rootMessageId') = ?
|
|
47
|
-
AND json_extract(schedule, '$.state') = 'active'`).run(r).changes??0)}e.s(["GraphNodeNotFoundError",()=>u,"GraphNotFoundError",()=>i,"GraphStore",()=>y,"GraphTaskAlreadyBoundError",()=>d,"GraphVersionConflictError",()=>o,"appendEvent",()=>I,"createGraph",()=>v,"createGraphStore",()=>R,"deactivateSchedulesByRootMessageId",()=>C,"getActiveScheduleForRootMessageId",()=>k,"getActiveScheduleRootMessageIds",()=>N,"getGraph",()=>T,"getGraphEvents",()=>w,"getTaskIdForGraphId",()=>f,"updateGraphStructure",()=>S,"updateNodeRuntime",()=>A])},579042,e=>{"use strict";e.s(["DEFAULT_EXECUTION_POLICY",0,{replanBudgetRemaining:3,replanBudgetInitial:3,verifyBudgetRemaining:5,verifyBudgetInitial:5,maxConcurrentAutoChecks:1,immutableRequiredGates:!0,maxConcurrent:3,priorityMode:"fifo",nodeTimeoutMs:18e5,graphTimeoutMs:864e5},"FAILURE_NODE_STATUSES",0,["failed"],"INCOMPLETE_FOR_DONE_STATUSES",0,["pending","running","awaiting_human","blocked"],"SOFT_DEP_SATISFIED_STATUSES",0,["done","passed","failed","skipped","blocked"],"SUCCESS_NODE_STATUSES",0,["done","passed"],"TERMINAL_NODE_STATUSES",0,["done","passed","failed","skipped"]])},810010,e=>{"use strict";function t(e){let t=e?.trim();return t?t.replace(/\/+$/,""):null}let r="http://localhost:41741";function s(){return t("http://localhost:3000")??t(process.env.AGX_BOARD_URL)??t(process.env.NEXT_PUBLIC_AGX_BOARD_URL)??r}function n(){return t(process.env.AGX_BOARD_URL)??t(process.env.NEXT_PUBLIC_AGX_BOARD_URL)??t("http://localhost:3000")??r}function a(){let e=new Set([r,"http://127.0.0.1:41741"]);for(let r of["http://localhost:3000",process.env.AGX_BOARD_URL,process.env.NEXT_PUBLIC_AGX_BOARD_URL]){let s=t(r);s&&e.add(s)}return Array.from(e)}e.s(["getAllowedOrigins",()=>a,"getConfiguredAppBaseUrl",()=>s,"getConfiguredBoardBaseUrl",()=>n])},812057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},504926,e=>{"use strict";var t=e.i(300248);function r(e,t=Date.now()){let s=t=>({graph:e,tickFired:!1,resetNodeIds:[],skipReason:t});if(!e.schedule)return s("no_schedule");let n=e.schedule;if("active"!==n.state)return s("not_active");if(n.tickInProgress)return s("tick_in_progress");if(null!=n.maxRuns&&n.runCount>=n.maxRuns)return s("max_runs_reached");if(n.cronExpr&&"number"==typeof n.nextTickAt){if(t<n.nextTickAt)return s("not_due")}else if(t-(n.lastTickAt??0)<n.intervalMs)return s("not_due");let a=JSON.parse(JSON.stringify(e)),o=[];for(let e of n.resetNodeIds){let t=a.nodes[e];t&&("done"===t.status||"passed"===t.status||"failed"===t.status||"skipped"===t.status)&&(a.nodes[e]={...t,status:"pending",startedAt:void 0,completedAt:void 0,metrics:void 0,..."function"===t.type?{output:void 0}:{},..."conditional"===t.type?{evaluatedTo:void 0}:{}},o.push(e))}return a.schedule={...n,tickInProgress:!0,lastTickAt:t,runCount:n.runCount+1},{graph:a,tickFired:!0,resetNodeIds:o}}function s(e){if(!e.schedule||!e.schedule.tickInProgress)return e;let r=e.schedule,s=r.nextTickAt;return r.cronExpr&&(s=(0,t.computeNextTickFromCron)(r.cronExpr)),{...e,schedule:{...r,tickInProgress:!1,nextTickAt:s}}}function n(e){if(!e.schedule)return!0;let t=new Set(["done","passed","failed","skipped"]);for(let r of e.schedule.resetNodeIds){let s=e.nodes[r];if(s&&!t.has(s.status))return!1}return!0}function a(e,t=6e4,r){return{intervalMs:t,state:"active",resetNodeIds:e,maxRuns:r,runCount:0,tickInProgress:!1,createdAt:new Date().toISOString()}}e.s(["completeScheduleTick",()=>s,"createThreadMonitorSchedule",()=>a,"isScheduleTickComplete",()=>n,"scheduleTickIfDue",()=>r])},326057,e=>{"use strict";var t=e.i(233405);function r(e,t){let r="string"==typeof e.args?.rootMessageId?e.args.rootMessageId.trim():"";return r||(t.schedule?.rootMessageId?.trim()??"")}async function s(t){try{let{getSQLiteDb:r}=await e.A(318801),s=r(),n=s.prepare("SELECT project_id FROM project_threads WHERE thread_id = ? ORDER BY created_at ASC LIMIT 1").get(t);if(!n?.project_id)return null;let a=s.prepare("SELECT agent_id FROM project_agents WHERE project_id = ? ORDER BY routing_order ASC, created_at ASC LIMIT 1").get(n.project_id);return a?.agent_id??null}catch{return null}}async function n(t,s){let n=r(t,s);if(!n)return{status:"failure",message:"thread-status requires rootMessageId"};let{getMessageThread:a,getThreadStatusSnapshot:o,sweepStaleWorkingReactions:i}=await e.A(718760),u=await a(n);if(!u)return{status:"failure",message:`Thread not found for rootMessageId: ${n}`};await i(u.threadId);let d=await o({threadId:u.threadId,rootMessageId:n});return{status:"success",output:{activeProcessCount:d.processes.filter(e=>"working"===e.status).length,messageCount:d.messages?.length??0,threadId:u.threadId,lastUpdatedAt:d.lastUpdatedAt}}}async function a(t,n){let a=r(t,n);if(!a)return{status:"failure",message:"ship-mode-act requires rootMessageId"};let o=function(e,t){let r="string"==typeof e.args?.steerNodeId&&e.args.steerNodeId.trim()?e.args.steerNodeId.trim():"steer",s=t.nodes[r];if(!s||"work"!==s.type)return null;let n=s.output;return n&&"object"==typeof n?{isDone:!!n.isDone,message:"string"==typeof n.message?n.message:""}:null}(t,n);if(!o)return{status:"failure",message:"Unable to read steer node output"};let{getMessageThread:i,saveMessages:u,updateMessageStatus:d}=await e.A(718760),{deactivateSchedulesByRootMessageId:l}=await e.A(972437),c=await i(a);if(!c)return{status:"failure",message:`Thread not found for rootMessageId: ${a}`};if(o.isDone)return l(a),await d(c.threadId,a,"in-review",null),{status:"success",output:{done:!0,action:"stopped_and_in_review"}};let p=await s(c.threadId),h=crypto.randomUUID();return await u(c.threadId,[{id:h,role:"assistant",participantId:p,content:o.message,timestamp:Date.now(),rootMessageId:a,parentMessageId:a,depth:1}]),{status:"success",output:{done:!1,action:"sent_next_steps",sender:p,messageId:h}}}async function o(e,t){if("internal"!==e.kind)return{status:"failure",message:`Unsupported function node kind: ${e.kind}`};switch(e.command){case"thread-status":return n(e,t);case"ship-mode-act":return a(e,t);default:return{status:"failure",message:`Unsupported internal function command: ${e.command}`}}}async function i(e,r){if("bash"!==e.kind)return{status:"failure",message:`Unsupported function node kind: ${e.kind}`};let s=e.command;if(!s||""===s.trim())return{status:"failure",message:"Empty command"};let n=e.timeoutMs??3e4;return new Promise(e=>{let r="",a="",o=0,i=!1,u=!1,d=(0,t.spawn)(s,[],{shell:!0,timeout:n,killSignal:"SIGTERM"}),l=setTimeout(()=>{u=!0,d.kill("SIGTERM")},n);d.stdout.on("data",e=>{if(i)return;let t=Buffer.byteLength(e.toString(),"utf8");if(o+t>65536){i=!0;return}r+=e.toString(),o+=t}),d.stderr.on("data",e=>{a+=e.toString()}),d.on("error",t=>{clearTimeout(l),e({status:"failure",message:`Failed to spawn command: ${t.message}`,error:t})}),d.on("close",t=>{if(clearTimeout(l),u)return void e({status:"failure",message:`Command timed out after ${n}ms`});if(i)return void e({status:"failure",message:"Stdout exceeded 65536 bytes limit"});if(0!==t)return void e({status:"failure",message:`Command exited with code ${t}: ${a||"(no stderr)"}`});let s=r.trim();if(""===s)return void e({status:"success",output:{}});try{let t=JSON.parse(s);e({status:"success",output:t})}catch{e({status:"success",output:{raw:s}})}})})}function u(){return async(e,t)=>{switch(e.kind){case"bash":return i(e,t);case"internal":return o(e,t);default:return{status:"failure",message:`Unsupported function node kind: ${e.kind}`}}}}e.i(810010),e.s(["createDispatchFunction",()=>u,"dispatchBashFunction",()=>i],326057)},997127,e=>{"use strict";var t=e.i(902157),r=e.i(750227),s=e.i(660526);let n=`You are a progress assessor. Review the conversation state below and determine:
|
|
48
|
-
1. Is the work DONE? (all objectives met, code written, tests passing)
|
|
49
|
-
2. If not done, what should the team do next?
|
|
50
|
-
|
|
51
|
-
You MUST respond with ONLY a JSON object, no markdown fences, no extra text:
|
|
52
|
-
{"isDone": true/false, "message": "your assessment"}
|
|
53
|
-
|
|
54
|
-
If done, message should confirm what was accomplished.
|
|
55
|
-
If not done, message must be exactly one message that combines:
|
|
56
|
-
- a brief assessment of what is done vs. not done
|
|
57
|
-
- the concrete next steps for the team
|
|
58
|
-
|
|
59
|
-
Do not produce separate status and instruction messages.`;function a(){return async(a,o)=>{let i=o.schedule?.rootMessageId;if(!i)return{status:"failure",message:"No rootMessageId on graph schedule"};console.log(`[work-dispatch] Dispatching steer node "${a.title}" for graph ${o.id} (root: ${i})`);try{let{getMessageThread:a,getThreadStatusSnapshot:o,sweepStaleWorkingReactions:u}=await e.A(718760),d=await a(i);if(!d)return{status:"failure",message:`Thread not found for rootMessageId: ${i}`};await u(d.threadId);let l=await o({threadId:d.threadId,rootMessageId:i}),c=l.processes.filter(e=>"working"===e.status).length,p=(l.messages??[]).slice(-10).map(e=>{let t=e.participantId??e.role??"?",r=(e.content??"").slice(0,300);return`[${t}]: ${r}`}).join("\n");console.log(`[work-dispatch] Thread: active=${c}, msgs=${l.messages?.length??0}`);let h=["--- THREAD STATE ---",`Active agents: ${c}`,`Total messages: ${l.messages?.length??0}`,"\nRecent messages:",p,"--- END THREAD STATE ---\n\nAssess the progress and respond with the JSON object."].join("\n"),{runCliResponse:g}=await e.A(531259),f=function(e){switch(e){case"claude":case"gemini":case"ollama":case"codex":case"zai":return e;default:return"claude"}}(function(){try{let e=(0,r.join)((0,s.homedir)(),".agx","config.json");return JSON.parse((0,t.readFileSync)(e,"utf8")).defaultProvider??"claude"}catch{return"claude"}}());console.log(`[work-dispatch] Calling ${f} via runCliResponse (prompt length: ${h.length})...`);let m="";await g({provider:f,model:null,prompt:h,systemContext:n,onDelta:e=>{m+=e},onLog:(e,t)=>{console.log(`[work-dispatch] [${e}] ${t}`)}}),console.log(`[work-dispatch] Raw response: ${m.slice(0,500)}`);let E=function(e){let t=e.match(/\{[\s\S]*?"isDone"\s*:\s*(true|false)[\s\S]*?\}/);if(t)try{let e=JSON.parse(t[0]);return{isDone:!!e.isDone,message:String(e.message??"")}}catch{}return e.includes("[done]")?{isDone:!0,message:e}:{isDone:!1,message:e}}(m.trim());return console.log("[work-dispatch] Parsed result:",E),{status:"success",output:E}}catch(e){return console.error("[work-dispatch] Steer dispatch failed:",e),{status:"failure",message:e instanceof Error?e.message:String(e),error:e}}}}e.s(["createDispatchWork",()=>a])},800050,e=>{"use strict";var t=e.i(747909),r=e.i(174017),s=e.i(996250),n=e.i(759756),a=e.i(561916),o=e.i(174677),i=e.i(869741),u=e.i(316795),d=e.i(487718),l=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),g=e.i(626937),f=e.i(10372),m=e.i(193695);e.i(52474);var E=e.i(600220),_=e.i(89171),y=e.i(97812),R=e.i(504926),x=e.i(300248),v=e.i(33601),T=e.i(326057),A=e.i(997127);async function S(e){let t=e.nextUrl.searchParams.get("rootMessageId"),r="1"===e.nextUrl.searchParams.get("run");if(!t)return _.NextResponse.json({error:"rootMessageId required"},{status:400});let s=new y.GraphStore().getGraph(t);if(!s)return _.NextResponse.json({error:"Graph not found"},{status:404});let n={id:s.id,schedule:{state:s.schedule?.state,intervalMs:s.schedule?.intervalMs,runCount:s.schedule?.runCount,tickInProgress:s.schedule?.tickInProgress,lastTickAt:s.schedule?.lastTickAt?new Date(s.schedule.lastTickAt).toISOString():null},pipeline:s.edges.map(e=>{let t=s.nodes[e.from],r=s.nodes[e.to];return`[${e.from}] (${t?.type}:${t?.status}) ─${e.type}→ [${e.to}] (${r?.type}:${r?.status})`}),nodes:Object.fromEntries(Object.entries(s.nodes).map(([e,t])=>{let r={type:t.type,status:t.status};return"function"===t.type&&(r.kind=t.kind,r.command=t.command),"conditional"===t.type&&(r.expression=t.condition.expression,r.inputFrom=t.condition.inputFrom,"evaluatedTo"in t&&(r.evaluatedTo=t.evaluatedTo)),"output"in t&&t.output&&(r.output=t.output),"deps"in t&&(r.deps=t.deps),[e,r]}))},a=(0,R.scheduleTickIfDue)(s),o={tickFired:a.tickFired,...!a.tickFired&&"skipReason"in a?{skipReason:a.skipReason}:{}};if(!a.tickFired)return _.NextResponse.json({workflow:n,tickCheck:o,nodes:[]});let i=[],u=a.graph,d=(0,T.createDispatchFunction)(),l=(0,A.createDispatchWork)();for(let e=0;e<10;e++){let e=(0,x.schedulerTick)(u);if(u=e.graph,!(e.functionToRun.length>0||e.workToRun.length>0||e.control.conditionalNodeIds.length>0))break;for(let t of e.control.conditionalNodeIds){let e=u.nodes[t];if(!e||"conditional"!==e.type)continue;let r=u.nodes[e.condition.inputFrom],s=r&&"output"in r?r.output:null;i.push({node:t,type:"conditional",input:{expression:e.condition.expression,inputFrom:e.condition.inputFrom,sourceOutput:s},processing:`evaluated "${e.condition.expression}"`,output:{status:e.status,evaluatedTo:"evaluatedTo"in e?e.evaluatedTo:null,thenBranch:e.thenBranch,elseBranch:e.elseBranch}})}for(let t of e.functionToRun){let e=u.nodes[t];if(!e||"function"!==e.type)continue;let s={node:t,type:"function",kind:e.kind,input:{command:e.command,timeoutMs:e.timeoutMs??3e4},processing:r?"executing...":"skipped (add &run=1)"};if(r){let e=Date.now();try{let r=(u=(await (0,v.executeNode)(u,t,{dispatchFunction:d})).graph).nodes[t];s.processing=`executed in ${Date.now()-e}ms`,s.output={status:r?.status,data:r&&"output"in r?r.output:null,errors:r&&"errors"in r?r.errors:null}}catch(t){s.processing=`failed after ${Date.now()-e}ms`,s.output={status:"error",error:t instanceof Error?t.message:String(t)}}}else s.output="(not executed)";i.push(s)}for(let t of e.workToRun){let e=u.nodes[t],s={node:t,type:"work",input:e,processing:r?"executing...":"ready to dispatch (add &run=1)",output:{status:e?.status}};if(r&&e?.type==="work"){let e=Date.now();try{u=(await (0,v.executeNode)(u,t,{dispatchFunction:d,dispatchWork:l})).graph,s.processing=`executed in ${Date.now()-e}ms`,s.output={status:u.nodes[t]?.status,data:"output"in u.nodes[t]?u.nodes[t].output:null}}catch(t){s.processing=`failed after ${Date.now()-e}ms`,s.output={status:"error",error:t instanceof Error?t.message:String(t)}}}i.push(s)}if((0,R.isScheduleTickComplete)(u))break}let c={complete:(0,R.isScheduleTickComplete)(u),resetNodes:s.schedule?.resetNodeIds.map(e=>({id:e,status:u.nodes[e]?.status}))};return _.NextResponse.json({workflow:n,tickCheck:o,nodes:i,completion:c})}e.s(["GET",()=>S,"dynamic",0,"force-dynamic","runtime",0,"nodejs"],556241);var I=e.i(556241);let w=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/schedules/debug/route",pathname:"/api/schedules/debug",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/schedules/debug/route.ts",nextConfigOutput:"standalone",userland:I}),{workAsyncStorage:k,workUnitAsyncStorage:N,serverHooks:C}=w;function D(){return(0,s.patchFetch)({workAsyncStorage:k,workUnitAsyncStorage:N})}async function b(e,t,s){w.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let _="/api/schedules/debug/route";_=_.replace(/\/index$/,"")||"/";let y=await w.prepare(e,t,{srcPage:_,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==s.waitUntil||s.waitUntil.call(s,Promise.resolve()),null;let{buildId:R,params:x,nextConfig:v,parsedUrl:T,isDraftMode:A,prerenderManifest:S,routerServerContext:I,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,resolvedPathname:C,clientReferenceManifest:D,serverActionsManifest:b}=y,O=(0,i.normalizeAppPath)(_),L=!!(S.dynamicRoutes[O]||S.routes[C]),M=async()=>((null==I?void 0:I.render404)?await I.render404(e,t,T,!1):t.end("This page could not be found"),null);if(L&&!A){let e=!!S.routes[C],t=S.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(v.experimental.adapterPath)return await M();throw new m.NoFallbackError}}let $=null;!L||w.isDev||A||($="/index"===($=C)?"/":$);let F=!0===w.isDev||!L,U=L&&!F;b&&D&&(0,o.setManifestsSingleton)({page:_,clientReferenceManifest:D,serverActionsManifest:b});let q=e.method||"GET",j=(0,a.getTracer)(),P=j.getActiveScopeSpan(),G={params:x,prerenderManifest:S,renderOpts:{experimental:{authInterrupts:!!v.experimental.authInterrupts},cacheComponents:!!v.cacheComponents,supportsDynamicResponse:F,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:v.cacheLife,waitUntil:s.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,s,n)=>w.onRequestError(e,t,s,n,I)},sharedContext:{buildId:R}},B=new u.NodeNextRequest(e),H=new u.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let o=async e=>w.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=j.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==l.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let s=r.get("next.route");if(s){let t=`${q} ${s}`;e.setAttributes({"next.route":s,"http.route":s,"next.span_name":t}),e.updateName(t)}else e.updateName(`${q} ${_}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),u=async n=>{var a,u;let d=async({previousCacheEntry:r})=>{try{if(!i&&k&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await o(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let u=G.renderOpts.pendingWaitUntil;u&&s.waitUntil&&(s.waitUntil(u),u=void 0);let d=G.renderOpts.collectedTags;if(!L)return await (0,p.sendResponse)(B,H,a,G.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);d&&(t[f.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,s=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:E.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:s}}}}catch(t){throw(null==r?void 0:r.isStale)&&await w.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:k})},!1,I),t}},l=await w.handleResponse({req:e,nextConfig:v,cacheKey:$,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:S,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,responseGenerator:d,waitUntil:s.waitUntil,isMinimalMode:i});if(!L)return null;if((null==l||null==(a=l.value)?void 0:a.kind)!==E.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(u=l.value)?void 0:u.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",k?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,h.fromNodeOutgoingHttpHeaders)(l.value.headers);return i&&L||m.delete(f.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||t.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,g.getCacheControlHeader)(l.cacheControl)),await (0,p.sendResponse)(B,H,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};P?await u(P):await j.withPropagatedContext(e.headers,()=>j.trace(l.BaseServerSpan.handleRequest,{spanName:`${q} ${_}`,kind:a.SpanKind.SERVER,attributes:{"http.method":q,"http.target":e.url}},u))}catch(t){if(t instanceof m.NoFallbackError||await w.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:k})},!1,I),L)throw t;return await (0,p.sendResponse)(B,H,new Response(null,{status:500})),null}}e.s(["handler",()=>b,"patchFetch",()=>D,"routeModule",()=>w,"serverHooks",()=>C,"workAsyncStorage",()=>k,"workUnitAsyncStorage",()=>N],800050)},482848,e=>{e.v(e=>Promise.resolve().then(()=>e(874533)))},997757,e=>{e.v(e=>Promise.resolve().then(()=>e(326057)))},318801,e=>{e.v(e=>Promise.resolve().then(()=>e(960447)))},718760,e=>{e.v(t=>Promise.all(["server/chunks/lib_history-store_ts_2e721df2._.js"].map(t=>e.l(t))).then(()=>t(442639)))},972437,e=>{e.v(e=>Promise.resolve().then(()=>e(97812)))},531259,e=>{e.v(t=>Promise.all(["server/chunks/lib_9f439b27._.js"].map(t=>e.l(t))).then(()=>t(914350)))}];
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__152b2000._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[233405,(e,t,s)=>{t.exports=e.x("child_process",()=>require("child_process"))},219778,e=>{"use strict";function t(e){let t=e?.trim();return t?t.replace(/\/+$/,""):null}let s="http://localhost:41741";function r(){return t("http://localhost:3000")??t(process.env.AGX_BOARD_URL)??t(process.env.NEXT_PUBLIC_AGX_BOARD_URL)??s}function a(){return t(process.env.AGX_BOARD_URL)??t(process.env.NEXT_PUBLIC_AGX_BOARD_URL)??t("http://localhost:3000")??s}function n(){return process.env.PORT?.trim()||String(41741)}function o(){let e=new Set([s,"http://127.0.0.1:41741"]);for(let s of["http://localhost:3000",process.env.AGX_BOARD_URL,process.env.NEXT_PUBLIC_AGX_BOARD_URL]){let r=t(s);r&&e.add(r)}return Array.from(e)}e.s(["LOCAL_APP_PORT",0,41741,"LOCAL_APP_URL",0,s,"getAllowedOrigins",()=>o,"getConfiguredAppBaseUrl",()=>r,"getConfiguredBoardBaseUrl",()=>a,"getConfiguredLocalServerPort",()=>n])},558898,e=>{"use strict";var t=e.i(233405);function s(e,t){let s="string"==typeof e.args?.rootMessageId?e.args.rootMessageId.trim():"";return s||(t.schedule?.rootMessageId?.trim()??"")}async function r(t){try{let{getSQLiteDb:s}=await e.A(548207),r=s(),a=r.prepare("SELECT project_id FROM project_threads WHERE thread_id = ? ORDER BY created_at ASC LIMIT 1").get(t);if(!a?.project_id)return null;let n=r.prepare("SELECT agent_id FROM project_agents WHERE project_id = ? ORDER BY routing_order ASC, created_at ASC LIMIT 1").get(a.project_id);return n?.agent_id??null}catch{return null}}async function a(t,r){let a=s(t,r);if(!a)return{status:"failure",message:"thread-status requires rootMessageId"};let{getMessageThread:n,getThreadStatusSnapshot:o,sweepStaleWorkingReactions:i}=await e.A(205617),u=await n(a);if(!u)return{status:"failure",message:`Thread not found for rootMessageId: ${a}`};await i(u.threadId);let d=await o({threadId:u.threadId,rootMessageId:a});return{status:"success",output:{activeProcessCount:d.processes.filter(e=>"working"===e.status).length,messageCount:d.messages?.length??0,threadId:u.threadId,lastUpdatedAt:d.lastUpdatedAt}}}async function n(t,a){let n=s(t,a);if(!n)return{status:"failure",message:"ship-mode-act requires rootMessageId"};let o=function(e,t){let s="string"==typeof e.args?.steerNodeId&&e.args.steerNodeId.trim()?e.args.steerNodeId.trim():"steer",r=t.nodes[s];if(!r||"work"!==r.type)return null;let a=r.output;return a&&"object"==typeof a?{isDone:!!a.isDone,message:"string"==typeof a.message?a.message:""}:null}(t,a);if(!o)return{status:"failure",message:"Unable to read steer node output"};let{getMessageThread:i,saveMessages:u,updateMessageStatus:d}=await e.A(205617),{deactivateSchedulesByRootMessageId:c}=await e.A(502224),l=await i(n);if(!l)return{status:"failure",message:`Thread not found for rootMessageId: ${n}`};if(o.isDone)return c(n),await d(l.threadId,n,"in-review",null),{status:"success",output:{done:!0,action:"stopped_and_in_review"}};let f=await r(l.threadId),p=crypto.randomUUID();return await u(l.threadId,[{id:p,role:"assistant",participantId:f,content:o.message,timestamp:Date.now(),rootMessageId:n,parentMessageId:n,depth:1}]),{status:"success",output:{done:!1,action:"sent_next_steps",sender:f,messageId:p}}}async function o(e,t){if("internal"!==e.kind)return{status:"failure",message:`Unsupported function node kind: ${e.kind}`};switch(e.command){case"thread-status":return a(e,t);case"ship-mode-act":return n(e,t);default:return{status:"failure",message:`Unsupported internal function command: ${e.command}`}}}async function i(e,s){if("bash"!==e.kind)return{status:"failure",message:`Unsupported function node kind: ${e.kind}`};let r=e.command;if(!r||""===r.trim())return{status:"failure",message:"Empty command"};let a=e.timeoutMs??3e4;return new Promise(e=>{let s="",n="",o=0,i=!1,u=!1,d=(0,t.spawn)(r,[],{shell:!0,timeout:a,killSignal:"SIGTERM"}),c=setTimeout(()=>{u=!0,d.kill("SIGTERM")},a);d.stdout.on("data",e=>{if(i)return;let t=Buffer.byteLength(e.toString(),"utf8");if(o+t>65536){i=!0;return}s+=e.toString(),o+=t}),d.stderr.on("data",e=>{n+=e.toString()}),d.on("error",t=>{clearTimeout(c),e({status:"failure",message:`Failed to spawn command: ${t.message}`,error:t})}),d.on("close",t=>{if(clearTimeout(c),u)return void e({status:"failure",message:`Command timed out after ${a}ms`});if(i)return void e({status:"failure",message:"Stdout exceeded 65536 bytes limit"});if(0!==t)return void e({status:"failure",message:`Command exited with code ${t}: ${n||"(no stderr)"}`});let r=s.trim();if(""===r)return void e({status:"success",output:{}});try{let t=JSON.parse(r);e({status:"success",output:t})}catch{e({status:"success",output:{raw:r}})}})})}function u(){return async(e,t)=>{switch(e.kind){case"bash":return i(e,t);case"internal":return o(e,t);default:return{status:"failure",message:`Unsupported function node kind: ${e.kind}`}}}}e.i(219778),e.s(["createDispatchFunction",()=>u,"dispatchBashFunction",()=>i],558898)},548207,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__255b11f2._.js","server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js"].map(t=>e.l(t))).then(()=>t(965196)))},205617,e=>{e.v(t=>Promise.all(["server/chunks/[root-of-the-server]__f7f336c7._.js","server/chunks/lib_history-store_ts_74d1c060._.js"].map(t=>e.l(t))).then(()=>t(455248)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__33865410._.js.map
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
module.exports=[924868,(e,t,i)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},97812,e=>{"use strict";var t=e.i(960447),i=e.i(259833);e.i(201037);var r=e.i(200866),a=e.i(434542);let n=new Set(["replan","rollback"]);class s extends Error{expectedVersion;actualVersion;constructor(e,t){super(`Execution graph version conflict: expected ${e}, found ${t}.`),this.name="GraphVersionConflictError",this.expectedVersion=e,this.actualVersion=t}}class d extends Error{constructor(e){super(`Execution graph not found: ${e}`),this.name="GraphNotFoundError"}}class o extends Error{nodeIds;constructor(e,t){super(`Execution graph ${e} is missing node(s): ${t.join(", ")}`),this.name="GraphNodeNotFoundError",this.nodeIds=t}}class l extends Error{taskId;existingGraphId;constructor(e,t){super(`Task ${e} is already bound to execution graph ${t}.`),this.name="GraphTaskAlreadyBoundError",this.taskId=e,this.existingGraphId=t}}function u(e){return null==e?null:JSON.stringify(e)}function p(e){if(null==e)return null;if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function c(e){let t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toISOString()}function g(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:e}function _(e){if(!(0,a.isAutomationFrontmatterEnabled)()||!e.schedule)return;let t=(0,a.getAutomationRepository)(),i=(0,r.graphAutomationToDefinition)({graphId:e.id,taskId:e.taskId,schedule:e.schedule,createdAt:e.createdAt,updatedAt:e.updatedAt,executionState:e.executionState});t.upsertAutomation(i),t.updateAutomationState(e.id,{nextRunAt:e.schedule.nextTickAt,lastRunAt:e.schedule.lastTickAt,updatedAt:e.updatedAt,runCount:e.schedule.runCount,consecutiveFailures:e.schedule.consecutiveFailures,tickInProgress:e.schedule.tickInProgress})}function m(e){let i=e.trim();if(!i)return null;let r=(0,t.getSQLiteDb)().prepare(`SELECT task_id AS taskId
|
|
2
|
-
FROM execution_graphs
|
|
3
|
-
WHERE id = ?
|
|
4
|
-
LIMIT 1`).get(i);return r?.taskId??null}function E(e){let{type:t,status:i,metrics:r,output:a,...n}=e;return{type:t,status:i,config:n,output:a??null,metrics:r??null}}function h(e){let t={...g(p(e.payload))};return"eventType"in t||(t.eventType=e.event_type),"timestamp"in t||(t.timestamp=c(e.timestamp)),t}function f(e){return{query(t,i){let r=e.prepare(t);return/^\s*(INSERT|UPDATE|DELETE)/i.test(t)&&!/RETURNING/i.test(t)?(r.run(...(i??[]).map(e=>e)),{rows:[]}):{rows:r.all(...(i??[]).map(e=>e))}}}}class T{getDb(){return(0,t.getSQLiteDb)()}createGraph(e,t){let r=this.getDb(),a=f(r);t?.skipTaskBinding&&(0,i.pragmaSet)(r,"foreign_keys = OFF");try{return(0,i.transaction)(r,()=>{let i=a.query("SELECT id FROM execution_graphs WHERE task_id = ? LIMIT 1",[e.taskId]).rows[0];if(i&&i.id!==e.id)throw new l(e.taskId,i.id);for(let[t,i]of(a.query(`INSERT INTO execution_graphs
|
|
5
|
-
(id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at)
|
|
6
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
7
|
-
ON CONFLICT (id) DO UPDATE SET
|
|
8
|
-
task_id = excluded.task_id,
|
|
9
|
-
graph_version = excluded.graph_version,
|
|
10
|
-
mode = excluded.mode,
|
|
11
|
-
policy = excluded.policy,
|
|
12
|
-
done_criteria = excluded.done_criteria,
|
|
13
|
-
schedule = excluded.schedule,
|
|
14
|
-
created_at = excluded.created_at,
|
|
15
|
-
updated_at = excluded.updated_at`,[e.id,e.taskId,e.graphVersion,e.mode,u(e.policy),u(e.doneCriteria),u(e.schedule??null),e.createdAt,e.updatedAt]),a.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e.id]),a.query("DELETE FROM graph_edges WHERE graph_id = ?",[e.id]),Object.entries(e.nodes))){let r=E(i);a.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
|
|
16
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e.id,t,r.type,r.status,u(r.config),u(r.output),u(r.metrics)])}for(let t of e.edges)a.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
|
|
17
|
-
VALUES (?, ?, ?, ?, ?, ?)`,[e.id,t.from,t.to,t.type,t.condition??null,u(t.dataMapping??null)]);for(let t of e.versionHistory)this.appendEventInternal(a,e.id,t);for(let t of e.runtimeEvents??[])this.appendEventInternal(a,e.id,t);t?.skipTaskBinding||a.query("UPDATE tasks SET graph_id = ? WHERE id = ?",[e.id,e.taskId]);let r=this.getGraphForTask(a,e.taskId);if(!r)throw new d(e.id);return _(r),r})}finally{t?.skipTaskBinding&&(0,i.pragmaSet)(r,"foreign_keys = ON")}}getGraph(e){let t=this.getDb();return this.getGraphForTask(f(t),e)}updateNodeRuntime(e,t,r){let a=this.getDb(),n=f(a);return(0,i.transaction)(a,()=>{if(!n.query("SELECT id, graph_version FROM execution_graphs WHERE id = ?",[e]).rows[0])throw new d(e);let i=Object.keys(t);if(0===i.length){let t=n.query("SELECT graph_version, updated_at FROM execution_graphs WHERE id = ?",[e]);return{graphVersion:t.rows[0].graph_version,updatedAt:c(t.rows[0].updated_at)}}let r=i.map(()=>"?").join(", "),a=n.query(`SELECT node_id, type, status, config, output, metrics
|
|
18
|
-
FROM graph_nodes WHERE graph_id = ? AND node_id IN (${r})`,[e,...i]),s=new Map;for(let e of a.rows)s.set(e.node_id,e);let l=i.filter(e=>!s.has(e));if(l.length>0)throw new o(e,l);for(let r of i){let i=t[r],a=s.get(r);if(!a||!i)continue;let d={...g(p(a.config)),...g(i.configPatch)};void 0!==i.startedAt&&(d.startedAt=i.startedAt),void 0!==i.completedAt&&(d.completedAt=i.completedAt),void 0!==i.actualMinutes&&(d.actualMinutes=i.actualMinutes),n.query(`UPDATE graph_nodes SET status = ?, metrics = ?, output = ?, config = ?
|
|
19
|
-
WHERE graph_id = ? AND node_id = ?`,[i.status??a.status,u(i.metrics??p(a.metrics)),u(i.output??p(a.output)),u(d),e,r])}let _=n.query("UPDATE execution_graphs SET updated_at = datetime('now') WHERE id = ? RETURNING graph_version, updated_at",[e]);return{graphVersion:_.rows[0].graph_version,updatedAt:c(_.rows[0].updated_at)}})}updateGraphStructure(e,t,r){let a=this.getDb(),n=f(a);return(0,i.transaction)(a,()=>{let i=n.query("SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule FROM execution_graphs WHERE id = ?",[e]).rows[0];if(!i)throw new d(e);if(t.nodes)for(let[i,r]of(n.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e]),Object.entries(t.nodes))){let t=E(r);n.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
|
|
20
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e,i,t.type,t.status,u(t.config),u(t.output),u(t.metrics)])}if(t.edges)for(let i of(n.query("DELETE FROM graph_edges WHERE graph_id = ?",[e]),t.edges))n.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
|
|
21
|
-
VALUES (?, ?, ?, ?, ?, ?)`,[e,i.from,i.to,i.type,i.condition??null,u(i.dataMapping??null)]);let r=n.query(`UPDATE execution_graphs
|
|
22
|
-
SET mode = ?, policy = ?, done_criteria = ?, schedule = ?, updated_at = datetime('now')
|
|
23
|
-
WHERE id = ?
|
|
24
|
-
RETURNING graph_version, updated_at`,[t.mode??i.mode,u(t.policy??p(i.policy)??{}),u(t.doneCriteria??p(i.done_criteria)??{}),u(t.schedule??p(i.schedule)??null),e]);if(void 0!==t.schedule){let e=this.getGraphForTask(n,i.task_id);e?.schedule&&_(e)}return{graphVersion:r.rows[0].graph_version,updatedAt:c(r.rows[0].updated_at)}})}appendEvent(e,t){let i=this.getDb();this.appendEventInternal(f(i),e,t)}getGraphForTask(e,t){let i=e.query(`SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at
|
|
25
|
-
FROM execution_graphs WHERE task_id = ? ORDER BY updated_at DESC LIMIT 1`,[t]).rows[0];if(!i)return null;let s=e.query(`SELECT node_id, type, status, config, output, metrics
|
|
26
|
-
FROM graph_nodes WHERE graph_id = ? ORDER BY node_id ASC`,[i.id]),d=e.query(`SELECT from_id, to_id, type, condition, data_mapping
|
|
27
|
-
FROM graph_edges WHERE graph_id = ? ORDER BY from_id ASC, to_id ASC`,[i.id]),o=e.query(`SELECT event_type, payload, timestamp
|
|
28
|
-
FROM graph_events WHERE graph_id = ? ORDER BY timestamp ASC, event_type ASC`,[i.id]),l={};for(let e of s.rows)l[e.node_id]=function(e){let t={...g(p(e.config)),type:e.type,status:e.status},i=p(e.metrics);null!==i&&(t.metrics=i);let r=p(e.output);return null!==r&&(t.output=r),t}(e);let u=d.rows.map(e=>({from:e.from_id,to:e.to_id,type:e.type,...e.condition?{condition:p(e.condition)}:{},...e.data_mapping?{dataMapping:p(e.data_mapping)}:{}})),_=[],m=[];for(let e of o.rows){let t=h(e);n.has(t.eventType)?_.push(t):m.push(t)}var E={id:i.id,taskId:i.task_id,graphVersion:i.graph_version,mode:i.mode,nodes:l,edges:u,policy:p(i.policy)??{},doneCriteria:p(i.done_criteria)??{},schedule:p(i.schedule)??void 0,versionHistory:_,runtimeEvents:m,createdAt:c(i.created_at),updatedAt:c(i.updated_at)};if(!(0,a.isAutomationFrontmatterEnabled)())return E;let f=(0,a.getAutomationRepository)().getAutomation(E.id);return f&&"execution_graph"===f.definition.target.type?{...E,schedule:(0,r.automationRecordToGraphSchedule)(f,E.schedule)}:E}appendEventInternal(e,t,i){e.query(`INSERT INTO graph_events (graph_id, event_type, payload, timestamp)
|
|
29
|
-
VALUES (?, ?, ?, ?)`,[t,i.eventType,u(i),i.timestamp])}}function y(){return new T}let S=new T;function A(e,t){return S.createGraph(e,t)}function k(e){return S.getGraph(e)}function I(e,t,i){return S.updateNodeRuntime(e,t,i)}function R(e,t,i){return S.updateGraphStructure(e,t,i)}function N(e,t){return S.appendEvent(e,t)}function L(e,i={}){let r=["graph_id = ?"],a=[e];i.eventType&&(r.push("event_type = ?"),a.push(i.eventType)),i.since&&(r.push("timestamp >= ?"),a.push(i.since));let n=i.limit??1e3,s=`SELECT event_type, payload, timestamp
|
|
30
|
-
FROM graph_events
|
|
31
|
-
WHERE ${r.join(" AND ")}
|
|
32
|
-
ORDER BY timestamp ASC, event_type ASC
|
|
33
|
-
LIMIT ?`;return a.push(n),f((0,t.getSQLiteDb)()).query(s,a).rows.map(e=>h(e))}function v(e){let i=e.trim();if(!i)return null;if((0,a.isAutomationFrontmatterEnabled)()){let e=(0,a.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active",rootMessageId:i})[0];if(e?.definition.target.type==="execution_graph"){let t=e.definition.target.graphId??e.definition.id,i=e.definition.target.taskId??m(t);if(i)return{graphId:t,taskId:i}}if(!(0,a.isAutomationDualReadEnabled)())return null}return(0,t.getSQLiteDb)().prepare(`SELECT id AS graphId, task_id AS taskId
|
|
34
|
-
FROM execution_graphs
|
|
35
|
-
WHERE schedule IS NOT NULL
|
|
36
|
-
AND json_extract(schedule, '$.rootMessageId') = ?
|
|
37
|
-
AND json_extract(schedule, '$.state') = 'active'
|
|
38
|
-
ORDER BY updated_at DESC
|
|
39
|
-
LIMIT 1`).get(i)??null}function O(){let e=new Set;if((0,a.isAutomationFrontmatterEnabled)()){for(let t of(0,a.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active"}))"execution_graph"===t.definition.target.type&&t.definition.target.rootMessageId&&e.add(t.definition.target.rootMessageId);if(!(0,a.isAutomationDualReadEnabled)())return[...e]}for(let i of(0,t.getSQLiteDb)().prepare(`SELECT json_extract(schedule, '$.rootMessageId') AS rootMessageId
|
|
40
|
-
FROM execution_graphs
|
|
41
|
-
WHERE schedule IS NOT NULL
|
|
42
|
-
AND json_extract(schedule, '$.state') = 'active'`).all())i.rootMessageId&&e.add(i.rootMessageId);return[...e]}function D(e){let i=e.trim();if(!i)return 0;let r=0;if((0,a.isAutomationFrontmatterEnabled)()){for(let e of(0,a.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active",rootMessageId:i})){if("execution_graph"!==e.definition.target.type)continue;let t=e.definition.target.graphId??e.definition.id,i=e.definition.target.taskId??m(t);if(!i)continue;let a=k(i);a?.schedule&&(S.updateGraphStructure(a.id,{mode:a.mode,nodes:a.nodes,edges:a.edges,policy:a.policy,doneCriteria:a.doneCriteria,schedule:{...a.schedule,state:"stopped",tickInProgress:!1}},a.graphVersion),r+=1)}if(r>0||!(0,a.isAutomationDualReadEnabled)())return r}return Number((0,t.getSQLiteDb)().prepare(`UPDATE execution_graphs
|
|
43
|
-
SET schedule = json_set(schedule, '$.state', 'stopped', '$.tickInProgress', json('false')),
|
|
44
|
-
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')
|
|
45
|
-
WHERE schedule IS NOT NULL
|
|
46
|
-
AND json_extract(schedule, '$.rootMessageId') = ?
|
|
47
|
-
AND json_extract(schedule, '$.state') = 'active'`).run(i).changes??0)}e.s(["GraphNodeNotFoundError",()=>o,"GraphNotFoundError",()=>d,"GraphStore",()=>T,"GraphTaskAlreadyBoundError",()=>l,"GraphVersionConflictError",()=>s,"appendEvent",()=>N,"createGraph",()=>A,"createGraphStore",()=>y,"deactivateSchedulesByRootMessageId",()=>D,"getActiveScheduleForRootMessageId",()=>v,"getActiveScheduleRootMessageIds",()=>O,"getGraph",()=>k,"getGraphEvents",()=>L,"getTaskIdForGraphId",()=>m,"updateGraphStructure",()=>R,"updateNodeRuntime",()=>I])},12616,e=>{"use strict";function t(e,t){return`---
|
|
48
|
-
${Object.entries(e).map(([e,t])=>`${e}: ${null==t?"":String(t)}`).join("\n")}
|
|
49
|
-
---
|
|
50
|
-
${t}`}e.s(["buildMarkdownWithFrontmatter",()=>t])},633938,e=>{"use strict";var t=e.i(492952);function i(e){let i=[];for(let r of e){if(!r.id){let e=String(r.notes??"").trim();if(!e)continue;i.push({repoId:"",repoName:r.name,path:r.path??null,content:e,producer:"human"});continue}let e=t.vaultStore.getKnowledgeNote("repo",r.id),a=e?.content.trim()||String(r.notes??"").trim();a&&i.push({repoId:r.id,repoName:r.name,path:r.path??null,content:a,producer:"human"})}return i}e.s(["listResolvedRepoKnowledge",()=>i])},926617,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0),i=e.i(259833),r=e.i(522734),a=e.i(814747),n=e.i(446786);let s=process.env.AGX_GROUP_CHAT_DIR?.trim()||a.default.join(n.default.homedir(),".agx","group-chat"),d=a.default.join(s,"history.sqlite"),o=a.default.join(s,"uploads");function l(){let e=new t.DatabaseSync(d);return(0,i.pragmaSet)(e,"journal_mode = WAL"),e}function u(e){if(e.exec(`
|
|
51
|
-
CREATE TABLE IF NOT EXISTS attachments (
|
|
52
|
-
id TEXT PRIMARY KEY,
|
|
53
|
-
message_id TEXT,
|
|
54
|
-
filename TEXT NOT NULL,
|
|
55
|
-
disk_name TEXT NOT NULL,
|
|
56
|
-
mime_type TEXT NOT NULL,
|
|
57
|
-
size INTEGER NOT NULL,
|
|
58
|
-
status TEXT NOT NULL DEFAULT 'uploaded',
|
|
59
|
-
created_at INTEGER NOT NULL
|
|
60
|
-
);
|
|
61
|
-
CREATE INDEX IF NOT EXISTS idx_attachments_message ON attachments(message_id);
|
|
62
|
-
`),!e.prepare("PRAGMA table_info(attachments)").all().some(e=>"disk_name"===e.name)){e.exec("ALTER TABLE attachments ADD COLUMN disk_name TEXT NOT NULL DEFAULT ''");let t=e.prepare("SELECT id, filename FROM attachments WHERE disk_name = ''").all(),i=e.prepare("UPDATE attachments SET disk_name = ? WHERE id = ?");for(let e of t){let t=e.filename.includes(".")?"."+e.filename.split(".").pop().toLowerCase():"";i.run(e.id+t,e.id)}}}async function p(e){await r.promises.mkdir(o,{recursive:!0});let t=e.filename.includes(".")?"."+e.filename.split(".").pop().toLowerCase():"",i=e.id+t,n=a.default.join(o,i);await r.promises.writeFile(n,e.data);let s=l();try{u(s),s.prepare(`INSERT INTO attachments (id, disk_name, filename, mime_type, size, status, created_at)
|
|
63
|
-
VALUES (?, ?, ?, ?, ?, 'uploaded', ?)`).run(e.id,i,e.filename,e.mimeType,e.size,Date.now())}finally{s.close()}return{id:e.id,filename:e.filename,mimeType:e.mimeType,size:e.size,status:"uploaded",url:`/api/attachments/${e.id}`}}async function c(e,t){if(0===t.length)return[];let i=l();try{u(i);let r=t.map(()=>"?").join(", ");return i.prepare(`UPDATE attachments SET message_id = ? WHERE id IN (${r})`).run(e,...t),i.prepare(`SELECT id, disk_name, filename, mime_type, size, status FROM attachments WHERE id IN (${r})`).all(...t).map(e=>({id:e.id,filename:e.filename,mimeType:e.mime_type,size:e.size,status:e.status,url:`/api/attachments/${e.id}`,diskPath:a.default.join(o,e.disk_name||e.id)}))}finally{i.close()}}async function g(e){let t=a.default.join(o,e);try{await r.promises.unlink(t)}catch{}let i=l();try{return u(i),i.prepare("DELETE FROM attachments WHERE id = ?").run(e).changes>0}finally{i.close()}}async function _(e){let t=l();try{u(t);let i=t.prepare("SELECT filename, disk_name, mime_type, size FROM attachments WHERE id = ?").get(e);if(!i)return null;let r=i.disk_name||e;return{filename:i.filename,mimeType:i.mime_type,size:i.size,diskPath:a.default.join(o,r)}}finally{t.close()}}async function m(e){if(0===e.length)return new Map;let t=l();try{u(t);let i=e.map(()=>"?").join(", "),r=t.prepare(`SELECT id, message_id, filename, mime_type, size, status
|
|
64
|
-
FROM attachments
|
|
65
|
-
WHERE message_id IN (${i})`).all(...e),a=new Map;for(let e of r){let t={id:e.id,filename:e.filename,mimeType:e.mime_type,size:e.size,status:e.status,url:`/api/attachments/${e.id}`},i=a.get(e.message_id)||[];i.push(t),a.set(e.message_id,i)}return a}finally{t.close()}}async function E(){let e=Date.now()-864e5,t=l();try{u(t);let i=t.prepare("SELECT id, disk_name FROM attachments WHERE message_id IS NULL AND created_at < ?").all(e);for(let{id:e,disk_name:t}of i){let i=a.default.join(o,t||e);try{await r.promises.unlink(i)}catch{}}if(i.length>0){let e=i.map(()=>"?").join(", ");t.prepare(`DELETE FROM attachments WHERE id IN (${e})`).run(...i.map(e=>e.id))}return i.length}finally{t.close()}}e.s(["createAttachment",()=>p,"deleteAttachment",()=>g,"finalizeAttachments",()=>c,"gcOrphanedAttachments",()=>E,"getAttachmentMeta",()=>_,"getAttachmentsForMessages",()=>m])},874533,(e,t,i)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},737175,e=>{"use strict";var t=e.i(902157),i=e.i(750227),r=e.i(874533),a=e.i(960447);let n=null,s=new Map;function d(e){return e.replace(/\s+/g," ").trim()}function o(e){return e.replace(/<br\s*\/?>/gi,"\n").replace(/<\/(p|h1|h2|h3|h4|h5|h6|li|tr|div)>/gi,"\n").replace(/<li[^>]*>/gi,"• ").replace(/<[^>]*>/g,"").replace(/&#x([0-9a-f]+);/gi,(e,t)=>{let i=Number.parseInt(t,16);return Number.isFinite(i)?String.fromCodePoint(i):e}).replace(/&#([0-9]+);/g,(e,t)=>{let i=Number.parseInt(t,10);return Number.isFinite(i)?String.fromCodePoint(i):e}).replace(/"/g,'"').replace(/'/g,"'").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/ /g," ").replace(/\r/g,"").replace(/[ \t]+\n/g,"\n").replace(/\n{3,}/g,"\n\n").trim()}function l(e){return"claude"===e||"codex"===e||"gemini"===e||"zai"===e?e:null}function u(e){return"claude"===e?"claude-code":"codex"===e?"codex":"gemini"===e?"gemini-cli":"zai"===e?"claude-code":null}function p(e){return i.default.join(process.cwd(),".agents","skills",e,"SKILL.md")}function c(){let e=i.default.join(process.cwd(),".agents","skills");return t.default.existsSync(e)?t.default.readdirSync(e,{withFileTypes:!0}).filter(r=>r.isDirectory()&&t.default.existsSync(i.default.join(e,r.name,"SKILL.md"))).map(e=>e.name).sort((e,t)=>e.localeCompare(t)):[]}async function g(){if(n&&Date.now()-n.loadedAt<36e5)return n.data;try{let e=await fetch("https://skills.sh");if(!e.ok)return[];let t=await e.text(),i=t.indexOf("initialSkills");if(-1===i)return[];let r=t.indexOf(":[",i);if(-1===r)return[];let a=r+1,s=0,d=a;for(let e=a;e<t.length;e+=1)if("["===t[e]&&(s+=1),"]"===t[e]&&(s-=1),0===s){d=e+1;break}let o=t.slice(a,d).replace(/\\"/g,'"'),l=JSON.parse(o).map((e,t)=>({rank:t+1,name:e.name??e.skillId??"",skillId:e.skillId??e.name??"",repo:e.source??"",installs:"number"==typeof e.installs?e.installs:0}));return n={loadedAt:Date.now(),data:l},l}catch{return[]}}async function _(e,t){let i=`${e}/${t}`,r=s.get(i);if(r&&Date.now()-r.loadedAt<36e5)return r.data;try{let r=await fetch(`https://skills.sh/${e}/${t}`);if(!r.ok)return null;let a=await r.text(),n=function(e){let t=e.match(/<div class="prose[^>]*>([\s\S]*?)<\/div>\s*<\/div>\s*<\/div>\s*<\/div>\s*<div class=" lg:col-span-3">/i);if(t?.[1])return t[1];let i=e.indexOf('<div class="prose');if(-1===i)return"";let r=e.indexOf(">",i);if(-1===r)return"";let a=e.indexOf('<div class=" lg:col-span-3">',r);return -1===a?"":e.slice(r+1,a).replace(/\s*<\/div>\s*$/i,"").trim()}(a),l=n.match(/<h1[^>]*>([\s\S]*?)<\/h1>/i),u=l?d(o(l[1])):"",p=(l?n.slice((l.index??0)+l[0].length):n).match(/<p[^>]*>([\s\S]*?)<\/p>/i),c=p?d(o(p[1])):"",g=[],_=n.match(/<h2[^>]*>\s*When to Use This Skill\s*<\/h2>([\s\S]*?)(?:<h2[^>]*>|$)/i);if(_){let e=_[1].match(/<ul[^>]*>([\s\S]*?)<\/ul>/i);if(e){let t=/<li[^>]*>([\s\S]*?)<\/li>/gi,i=null;for(;null!==(i=t.exec(e[1]));){let e=d(o(i[1]));e&&g.push(e)}}}let m=a.match(/Weekly\s+Installs[\s\S]{0,240}?>([\d,.]+[KkMm]?)<\/div>/i)?.[1]??"",E=a.match(/First\s+[Ss]een[\s\S]{0,240}?>([A-Za-z]{3}\s+\d{1,2},\s+\d{4})<\/div>/i)?.[1]??"",h=a.match(/\\"command\\":\\"((?:[^"\\]|\\.)*)\\"/),f=h?h[1].replace(/\\"/g,'"').replace(/\\\\/g,"\\").trim():`npx skills add ${e} --skill ${t}`,T={title:u,description:c,whenToUse:g,weeklyInstalls:m,firstSeen:E,installCommand:f};return s.set(i,{loadedAt:Date.now(),data:T}),T}catch{return null}}function m(e){(0,a.getSQLiteDb)().prepare(`INSERT INTO skill_learning_history
|
|
66
|
-
(provider, repo, skill_id, skill_label, status, command, error, run_started_at, run_completed_at, created_at, updated_at)
|
|
67
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(e.provider,e.repo,e.skill_id,e.skill_label,e.status,e.command,e.error,e.run_started_at,e.run_completed_at,e.created_at,e.updated_at)}function E(e=50,t){let i=(0,a.getSQLiteDb)(),r=[],n="",s=t?l(t):null;return s&&(n="WHERE provider = ?",r.push(s)),r.push(e),i.prepare(`SELECT id, provider, repo, skill_id, skill_label, status, command, error, run_started_at, run_completed_at, created_at, updated_at
|
|
68
|
-
FROM skill_learning_history
|
|
69
|
-
${n}
|
|
70
|
-
ORDER BY updated_at DESC, created_at DESC
|
|
71
|
-
LIMIT ?`).all(...r)}function h(e){let t=(0,a.getSQLiteDb)(),i=[],r="status = 'succeeded'",n=e?l(e):null;return n&&(r+=" AND provider = ?",i.push(n)),t.prepare(`SELECT provider, repo, skill_id, skill_label, MAX(COALESCE(run_completed_at, updated_at, created_at)) AS learned_at
|
|
72
|
-
FROM skill_learning_history
|
|
73
|
-
WHERE ${r}
|
|
74
|
-
GROUP BY provider, repo, skill_id, skill_label
|
|
75
|
-
ORDER BY learned_at DESC`).all(...i)}function f(e){let t=Array.from(new Set(e.providers.map(e=>l(e)).filter(Boolean)));if(0===t.length)return{ok:!1,command:"",stdout:"",stderr:"",results:[],error:"No supported providers selected"};let i=Date.now(),a=[],n="",s="",o="",p=new Map;for(let e of t){let t=u(e);if(!t)continue;let i=p.get(t)??[];i.push(e),p.set(t,i)}for(let[t,l]of p.entries()){let u=["--yes","skills@latest","add",e.repo,"--skill",e.skillId,"--agent",t,"--yes"];o=`npx ${u.join(" ")}`;let p=(0,r.spawnSync)("npx",u,{cwd:process.cwd(),encoding:"utf8",timeout:12e4,env:{...process.env,FORCE_COLOR:"0"}});n=String(p.stdout??""),s=String(p.stderr??"");let c=0===p.status;for(let r of l)a.push({provider:r,ok:c,agent:t}),m({provider:r,repo:e.repo,skill_id:e.skillId,skill_label:e.skillId,status:c?"succeeded":"failed",command:o,error:c?null:d(s||n).slice(0,1e3),run_started_at:i,run_completed_at:Date.now(),created_at:i,updated_at:Date.now()});if(!c)return{ok:!1,command:o,stdout:n,stderr:s,results:a,error:d(s||n)||"Installation failed"}}return{ok:!0,command:o,stdout:n,stderr:s,results:a}}function T(e){let t=Array.from(new Set(e.providers.map(e=>l(e)).filter(Boolean)));if(0===t.length)return{ok:!1,command:"",stdout:"",stderr:"",results:[],error:"No supported providers selected"};let i=Date.now(),a=[],n="",s="",o="",p=new Map;for(let e of t){let t=u(e);if(!t)continue;let i=p.get(t)??[];i.push(e),p.set(t,i)}for(let[t,l]of p.entries()){let u=["--yes","skills@latest","remove",e.skillId,"--agent",t,"--yes"];o=`npx ${u.join(" ")}`;let p=(0,r.spawnSync)("npx",u,{cwd:process.cwd(),encoding:"utf8",timeout:12e4,env:{...process.env,FORCE_COLOR:"0"}});n=String(p.stdout??""),s=String(p.stderr??"");let c=0===p.status;for(let r of l)a.push({provider:r,ok:c,agent:t}),m({provider:r,repo:"local/remove",skill_id:e.skillId,skill_label:e.skillId,status:c?"succeeded":"failed",command:o,error:c?null:d(s||n).slice(0,1e3),run_started_at:i,run_completed_at:Date.now(),created_at:i,updated_at:Date.now()});if(!c)return{ok:!1,command:o,stdout:n,stderr:s,results:a,error:d(s||n)||"Removal failed"}}return{ok:!0,command:o,stdout:n,stderr:s,results:a}}e.s(["fetchSkillDetail",()=>_,"fetchSkillsCatalog",()=>g,"installSkill",()=>f,"installedSkillPath",()=>p,"listAvailableSkills",()=>h,"listInstalledSkillIds",()=>c,"listSkillHistory",()=>E,"removeSkill",()=>T])},149953,e=>{"use strict";var t=e.i(902157),i=e.i(960447),r=e.i(737175);async function a(e){return(0,i.getSQLiteDb)().prepare("SELECT agent_id, repo, skill_id, condition, created_at FROM agent_skill_bindings WHERE agent_id = ? ORDER BY created_at ASC").all(e).map(e=>({repo:e.repo,skillId:e.skill_id,...e.condition?{condition:e.condition}:{}}))}async function n(e,t){let r=(0,i.getSQLiteDb)(),n=new Map;for(let e of t){let t=e.repo.trim(),i=e.skillId.trim();t&&i&&n.set(`${t}::${i}`,{repo:t,skillId:i,condition:e.condition?.trim()||null})}for(let t of(await a(e))){let i=`${t.repo}::${t.skillId}`;n.has(i)||r.prepare("DELETE FROM agent_skill_bindings WHERE agent_id = ? AND repo = ? AND skill_id = ?").run(e,t.repo,t.skillId)}for(let t of n.values())r.prepare(`INSERT INTO agent_skill_bindings (agent_id, repo, skill_id, condition)
|
|
76
|
-
VALUES (?, ?, ?, ?)
|
|
77
|
-
ON CONFLICT(agent_id, repo, skill_id) DO UPDATE SET condition = excluded.condition`).run(e,t.repo,t.skillId,t.condition);return a(e)}function s(e){return e.toLowerCase().replace(/[^a-z0-9]+/g," ").replace(/\s+/g," ").trim()}function d(e){let t=new Set,i=[];for(let r of s(e).split(" "))r.length<4||t.has(r)||(t.add(r),i.push(r));return i}function o(e,i,a){let n=[];for(let o of e){if(!function(e,t){let i=s(t);if(!i)return!1;if((e.condition?e.condition.split(/\n|,|;|\|/g).map(e=>s(e)).filter(e=>e.length>=4):[]).some(e=>i.includes(e)))return!0;let r=e.repo.split("/").filter(Boolean).pop()??e.repo;return[...d(e.skillId),...d(r)].some(e=>i.includes(e))}(o,i))continue;let e=(0,r.installedSkillPath)(o.skillId);(t.default.existsSync(e)||(0,r.installSkill)({repo:o.repo,skillId:o.skillId,providers:[a]}).ok)&&n.push({file:e,...o.condition?{condition:o.condition}:{}})}return n}e.s(["getAgentSkillBindings",()=>a,"resolveBoundSkillFiles",()=>o,"setAgentSkillBindings",()=>n])},384776,e=>{"use strict";var t=e.i(762294),i=e.i(149953),r=e.i(949041);async function a(){let e=await (0,t.getAgents)(r.LOCAL_USER.id),a=new Map,n=new Map;return await Promise.all(e.map(async e=>{a.set(e.id,await (0,t.getAgentSkills)(e.id)),n.set(e.id,await (0,i.getAgentSkillBindings)(e.id))})),e.map(e=>({id:e.id,name:e.name,...e.title?{title:e.title}:{},provider:e.provider||"claude",model:e.model||null,color:e.color||"#6B7280",...e.description?{identity:e.description}:{},...e.voice?{voice:e.voice}:{},...e.seed?{seed:e.seed}:{},...a.get(e.id)?.length?{skills:a.get(e.id).map(e=>({file:e.file,condition:e.condition??""}))}:{},...n.get(e.id)?.length?{skillBindings:n.get(e.id)}:{}}))}function n(e,t){if(!Array.isArray(t))return e;let i=new Set,r=[];for(let e of t){if("string"!=typeof e)continue;let t=e.trim();!t||i.has(t)||(i.add(t),r.push(t))}let a=new Set(r),n=e.filter(e=>a.has(e.id));if(r.length>0&&0===n.length)return e;let s=new Map(r.map((e,t)=>[e,t]));return n.sort((e,t)=>(s.get(e.id)??Number.MAX_SAFE_INTEGER)-(s.get(t.id)??Number.MAX_SAFE_INTEGER))}e.s(["filterActiveParticipants",()=>n,"loadDbParticipants",()=>a])},187885,e=>{"use strict";var t=e.x("node:sqlite",()=>require("node:sqlite"),!0),i=e.i(259833),r=e.i(814747),a=e.i(446786),n=e.i(522734);let s=process.env.AGX_GROUP_CHAT_DIR?.trim()||r.default.join(a.default.homedir(),".agx","group-chat"),d=r.default.join(s,"history.sqlite");function o(e){return{id:e.id,workspaceId:e.workspace_id,threadId:e.thread_id,agentId:e.agent_id,pid:e.pid,state:e.state,sinceMessageId:e.since_message_id,responseMessageId:e.response_message_id||"",startedAt:e.started_at,lastActivity:e.last_activity,projectSlug:e.project_slug||""}}function l(e){let r=function(){(0,n.mkdirSync)(s,{recursive:!0});let e=new t.DatabaseSync(d);(0,i.pragmaSet)(e,"journal_mode = WAL"),e.exec(`
|
|
78
|
-
CREATE TABLE IF NOT EXISTS agent_processes (
|
|
79
|
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
80
|
-
workspace_id TEXT NOT NULL,
|
|
81
|
-
thread_id TEXT NOT NULL DEFAULT '',
|
|
82
|
-
agent_id TEXT NOT NULL,
|
|
83
|
-
pid INTEGER NOT NULL DEFAULT 0,
|
|
84
|
-
state TEXT NOT NULL DEFAULT 'spawning',
|
|
85
|
-
since_message_id TEXT NOT NULL DEFAULT '',
|
|
86
|
-
started_at INTEGER NOT NULL,
|
|
87
|
-
last_activity INTEGER NOT NULL,
|
|
88
|
-
project_slug TEXT NOT NULL DEFAULT '',
|
|
89
|
-
UNIQUE (workspace_id, agent_id)
|
|
90
|
-
)
|
|
91
|
-
`),e.exec("CREATE INDEX IF NOT EXISTS idx_agent_processes_state ON agent_processes (state)"),e.exec("CREATE INDEX IF NOT EXISTS idx_agent_processes_thread ON agent_processes (thread_id)"),e.exec("CREATE INDEX IF NOT EXISTS idx_agent_processes_workspace ON agent_processes (workspace_id)");try{e.exec("ALTER TABLE agent_processes ADD COLUMN project_slug TEXT NOT NULL DEFAULT ''")}catch{}try{e.exec("ALTER TABLE agent_processes ADD COLUMN response_message_id TEXT NOT NULL DEFAULT ''")}catch{}return e}();try{return e(r)}finally{r.close()}}function u(e){return l(t=>{let i=t.prepare(`INSERT INTO agent_processes (workspace_id, thread_id, agent_id, pid, state, since_message_id, response_message_id, started_at, last_activity, project_slug)
|
|
92
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
93
|
-
ON CONFLICT(workspace_id, agent_id)
|
|
94
|
-
DO UPDATE SET
|
|
95
|
-
thread_id = excluded.thread_id,
|
|
96
|
-
pid = excluded.pid,
|
|
97
|
-
state = excluded.state,
|
|
98
|
-
since_message_id = excluded.since_message_id,
|
|
99
|
-
response_message_id = excluded.response_message_id,
|
|
100
|
-
started_at = excluded.started_at,
|
|
101
|
-
last_activity = excluded.last_activity,
|
|
102
|
-
project_slug = excluded.project_slug`).run(e.workspaceId,e.threadId,e.agentId,e.pid,e.state,e.sinceMessageId,e.responseMessageId||"",e.startedAt,e.lastActivity,e.projectSlug||"");if(1===i.changes&&i.lastInsertRowid)return Number(i.lastInsertRowid);let r=t.prepare("SELECT id FROM agent_processes WHERE workspace_id = ? AND agent_id = ?").get(e.workspaceId,e.agentId);return r?.id??0})}function p(e,t,i){let r=[],a=[];void 0!==i.state&&(r.push("state = ?"),a.push(i.state)),void 0!==i.lastActivity&&(r.push("last_activity = ?"),a.push(i.lastActivity)),void 0!==i.pid&&(r.push("pid = ?"),a.push(i.pid)),0!==r.length&&l(i=>i.prepare(`UPDATE agent_processes SET ${r.join(", ")} WHERE workspace_id = ? AND agent_id = ?`).run(...a,e,t))}function c(e){return l(t=>t.prepare("SELECT * FROM agent_processes WHERE thread_id = ?").all(e).map(o))}function g(e){return l(t=>t.prepare("SELECT * FROM agent_processes WHERE workspace_id = ?").all(e).map(o))}function _(){return l(e=>e.prepare("SELECT * FROM agent_processes").all().map(o))}function m(){return l(e=>e.prepare(`
|
|
103
|
-
SELECT ap.*, substr(m.content, 1, 120) AS thread_title
|
|
104
|
-
FROM agent_processes ap
|
|
105
|
-
LEFT JOIN messages m ON m.id = ap.thread_id AND m.thread_id = ap.workspace_id
|
|
106
|
-
`).all().map(e=>({...o(e),threadTitle:e.thread_title})))}function E(e){let t=0;for(let i of e){if(i.pid>0)try{process.kill(i.pid,"SIGTERM")}catch{}t++}return t}function h(e){let t=E(c(e).filter(e=>"running"===e.state||"spawning"===e.state));return t>0&&l(t=>t.prepare(`UPDATE agent_processes SET state = 'killed', last_activity = ?
|
|
107
|
-
WHERE thread_id = ? AND state IN ('running', 'spawning')`).run(Date.now(),e)),t}function f(e){let t=E(g(e).filter(e=>"running"===e.state||"spawning"===e.state));return t>0&&l(t=>t.prepare(`UPDATE agent_processes SET state = 'killed', last_activity = ?
|
|
108
|
-
WHERE workspace_id = ? AND state IN ('running', 'spawning')`).run(Date.now(),e)),t}e.s(["getAll",()=>_,"getAllEnriched",()=>m,"getByThread",()=>c,"getByWorkspace",()=>g,"killByThread",()=>h,"killByWorkspace",()=>f,"register",()=>u,"update",()=>p])},318801,e=>{e.v(e=>Promise.resolve().then(()=>e(960447)))}];
|
|
109
|
-
|
|
110
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__6c53437e._.js.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
module.exports=[924868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},97812,e=>{"use strict";var t=e.i(960447),r=e.i(259833);e.i(201037);var i=e.i(200866),a=e.i(434542);let n=new Set(["replan","rollback"]);class o extends Error{expectedVersion;actualVersion;constructor(e,t){super(`Execution graph version conflict: expected ${e}, found ${t}.`),this.name="GraphVersionConflictError",this.expectedVersion=e,this.actualVersion=t}}class d extends Error{constructor(e){super(`Execution graph not found: ${e}`),this.name="GraphNotFoundError"}}class s extends Error{nodeIds;constructor(e,t){super(`Execution graph ${e} is missing node(s): ${t.join(", ")}`),this.name="GraphNodeNotFoundError",this.nodeIds=t}}class u extends Error{taskId;existingGraphId;constructor(e,t){super(`Task ${e} is already bound to execution graph ${t}.`),this.name="GraphTaskAlreadyBoundError",this.taskId=e,this.existingGraphId=t}}function p(e){return null==e?null:JSON.stringify(e)}function c(e){if(null==e)return null;if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}function l(e){let t=Date.parse(e);return Number.isNaN(t)?e:new Date(t).toISOString()}function g(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:e}function h(e){if(!(0,a.isAutomationFrontmatterEnabled)()||!e.schedule)return;let t=(0,a.getAutomationRepository)(),r=(0,i.graphAutomationToDefinition)({graphId:e.id,taskId:e.taskId,schedule:e.schedule,createdAt:e.createdAt,updatedAt:e.updatedAt,executionState:e.executionState});t.upsertAutomation(r),t.updateAutomationState(e.id,{nextRunAt:e.schedule.nextTickAt,lastRunAt:e.schedule.lastTickAt,updatedAt:e.updatedAt,runCount:e.schedule.runCount,consecutiveFailures:e.schedule.consecutiveFailures,tickInProgress:e.schedule.tickInProgress})}function E(e){let r=e.trim();if(!r)return null;let i=(0,t.getSQLiteDb)().prepare(`SELECT task_id AS taskId
|
|
2
|
-
FROM execution_graphs
|
|
3
|
-
WHERE id = ?
|
|
4
|
-
LIMIT 1`).get(r);return i?.taskId??null}function _(e){let{type:t,status:r,metrics:i,output:a,...n}=e;return{type:t,status:r,config:n,output:a??null,metrics:i??null}}function m(e){let t={...g(c(e.payload))};return"eventType"in t||(t.eventType=e.event_type),"timestamp"in t||(t.timestamp=l(e.timestamp)),t}function f(e){return{query(t,r){let i=e.prepare(t);return/^\s*(INSERT|UPDATE|DELETE)/i.test(t)&&!/RETURNING/i.test(t)?(i.run(...(r??[]).map(e=>e)),{rows:[]}):{rows:i.all(...(r??[]).map(e=>e))}}}}class y{getDb(){return(0,t.getSQLiteDb)()}createGraph(e,t){let i=this.getDb(),a=f(i);t?.skipTaskBinding&&(0,r.pragmaSet)(i,"foreign_keys = OFF");try{return(0,r.transaction)(i,()=>{let r=a.query("SELECT id FROM execution_graphs WHERE task_id = ? LIMIT 1",[e.taskId]).rows[0];if(r&&r.id!==e.id)throw new u(e.taskId,r.id);for(let[t,r]of(a.query(`INSERT INTO execution_graphs
|
|
5
|
-
(id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at)
|
|
6
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
7
|
-
ON CONFLICT (id) DO UPDATE SET
|
|
8
|
-
task_id = excluded.task_id,
|
|
9
|
-
graph_version = excluded.graph_version,
|
|
10
|
-
mode = excluded.mode,
|
|
11
|
-
policy = excluded.policy,
|
|
12
|
-
done_criteria = excluded.done_criteria,
|
|
13
|
-
schedule = excluded.schedule,
|
|
14
|
-
created_at = excluded.created_at,
|
|
15
|
-
updated_at = excluded.updated_at`,[e.id,e.taskId,e.graphVersion,e.mode,p(e.policy),p(e.doneCriteria),p(e.schedule??null),e.createdAt,e.updatedAt]),a.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e.id]),a.query("DELETE FROM graph_edges WHERE graph_id = ?",[e.id]),Object.entries(e.nodes))){let i=_(r);a.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
|
|
16
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e.id,t,i.type,i.status,p(i.config),p(i.output),p(i.metrics)])}for(let t of e.edges)a.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
|
|
17
|
-
VALUES (?, ?, ?, ?, ?, ?)`,[e.id,t.from,t.to,t.type,t.condition??null,p(t.dataMapping??null)]);for(let t of e.versionHistory)this.appendEventInternal(a,e.id,t);for(let t of e.runtimeEvents??[])this.appendEventInternal(a,e.id,t);t?.skipTaskBinding||a.query("UPDATE tasks SET graph_id = ? WHERE id = ?",[e.id,e.taskId]);let i=this.getGraphForTask(a,e.taskId);if(!i)throw new d(e.id);return h(i),i})}finally{t?.skipTaskBinding&&(0,r.pragmaSet)(i,"foreign_keys = ON")}}getGraph(e){let t=this.getDb();return this.getGraphForTask(f(t),e)}updateNodeRuntime(e,t,i){let a=this.getDb(),n=f(a);return(0,r.transaction)(a,()=>{if(!n.query("SELECT id, graph_version FROM execution_graphs WHERE id = ?",[e]).rows[0])throw new d(e);let r=Object.keys(t);if(0===r.length){let t=n.query("SELECT graph_version, updated_at FROM execution_graphs WHERE id = ?",[e]);return{graphVersion:t.rows[0].graph_version,updatedAt:l(t.rows[0].updated_at)}}let i=r.map(()=>"?").join(", "),a=n.query(`SELECT node_id, type, status, config, output, metrics
|
|
18
|
-
FROM graph_nodes WHERE graph_id = ? AND node_id IN (${i})`,[e,...r]),o=new Map;for(let e of a.rows)o.set(e.node_id,e);let u=r.filter(e=>!o.has(e));if(u.length>0)throw new s(e,u);for(let i of r){let r=t[i],a=o.get(i);if(!a||!r)continue;let d={...g(c(a.config)),...g(r.configPatch)};void 0!==r.startedAt&&(d.startedAt=r.startedAt),void 0!==r.completedAt&&(d.completedAt=r.completedAt),void 0!==r.actualMinutes&&(d.actualMinutes=r.actualMinutes),n.query(`UPDATE graph_nodes SET status = ?, metrics = ?, output = ?, config = ?
|
|
19
|
-
WHERE graph_id = ? AND node_id = ?`,[r.status??a.status,p(r.metrics??c(a.metrics)),p(r.output??c(a.output)),p(d),e,i])}let h=n.query("UPDATE execution_graphs SET updated_at = datetime('now') WHERE id = ? RETURNING graph_version, updated_at",[e]);return{graphVersion:h.rows[0].graph_version,updatedAt:l(h.rows[0].updated_at)}})}updateGraphStructure(e,t,i){let a=this.getDb(),n=f(a);return(0,r.transaction)(a,()=>{let r=n.query("SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule FROM execution_graphs WHERE id = ?",[e]).rows[0];if(!r)throw new d(e);if(t.nodes)for(let[r,i]of(n.query("DELETE FROM graph_nodes WHERE graph_id = ?",[e]),Object.entries(t.nodes))){let t=_(i);n.query(`INSERT INTO graph_nodes (graph_id, node_id, type, status, config, output, metrics)
|
|
20
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)`,[e,r,t.type,t.status,p(t.config),p(t.output),p(t.metrics)])}if(t.edges)for(let r of(n.query("DELETE FROM graph_edges WHERE graph_id = ?",[e]),t.edges))n.query(`INSERT INTO graph_edges (graph_id, from_id, to_id, type, condition, data_mapping)
|
|
21
|
-
VALUES (?, ?, ?, ?, ?, ?)`,[e,r.from,r.to,r.type,r.condition??null,p(r.dataMapping??null)]);let i=n.query(`UPDATE execution_graphs
|
|
22
|
-
SET mode = ?, policy = ?, done_criteria = ?, schedule = ?, updated_at = datetime('now')
|
|
23
|
-
WHERE id = ?
|
|
24
|
-
RETURNING graph_version, updated_at`,[t.mode??r.mode,p(t.policy??c(r.policy)??{}),p(t.doneCriteria??c(r.done_criteria)??{}),p(t.schedule??c(r.schedule)??null),e]);if(void 0!==t.schedule){let e=this.getGraphForTask(n,r.task_id);e?.schedule&&h(e)}return{graphVersion:i.rows[0].graph_version,updatedAt:l(i.rows[0].updated_at)}})}appendEvent(e,t){let r=this.getDb();this.appendEventInternal(f(r),e,t)}getGraphForTask(e,t){let r=e.query(`SELECT id, task_id, graph_version, mode, policy, done_criteria, schedule, created_at, updated_at
|
|
25
|
-
FROM execution_graphs WHERE task_id = ? ORDER BY updated_at DESC LIMIT 1`,[t]).rows[0];if(!r)return null;let o=e.query(`SELECT node_id, type, status, config, output, metrics
|
|
26
|
-
FROM graph_nodes WHERE graph_id = ? ORDER BY node_id ASC`,[r.id]),d=e.query(`SELECT from_id, to_id, type, condition, data_mapping
|
|
27
|
-
FROM graph_edges WHERE graph_id = ? ORDER BY from_id ASC, to_id ASC`,[r.id]),s=e.query(`SELECT event_type, payload, timestamp
|
|
28
|
-
FROM graph_events WHERE graph_id = ? ORDER BY timestamp ASC, event_type ASC`,[r.id]),u={};for(let e of o.rows)u[e.node_id]=function(e){let t={...g(c(e.config)),type:e.type,status:e.status},r=c(e.metrics);null!==r&&(t.metrics=r);let i=c(e.output);return null!==i&&(t.output=i),t}(e);let p=d.rows.map(e=>({from:e.from_id,to:e.to_id,type:e.type,...e.condition?{condition:c(e.condition)}:{},...e.data_mapping?{dataMapping:c(e.data_mapping)}:{}})),h=[],E=[];for(let e of s.rows){let t=m(e);n.has(t.eventType)?h.push(t):E.push(t)}var _={id:r.id,taskId:r.task_id,graphVersion:r.graph_version,mode:r.mode,nodes:u,edges:p,policy:c(r.policy)??{},doneCriteria:c(r.done_criteria)??{},schedule:c(r.schedule)??void 0,versionHistory:h,runtimeEvents:E,createdAt:l(r.created_at),updatedAt:l(r.updated_at)};if(!(0,a.isAutomationFrontmatterEnabled)())return _;let f=(0,a.getAutomationRepository)().getAutomation(_.id);return f&&"execution_graph"===f.definition.target.type?{..._,schedule:(0,i.automationRecordToGraphSchedule)(f,_.schedule)}:_}appendEventInternal(e,t,r){e.query(`INSERT INTO graph_events (graph_id, event_type, payload, timestamp)
|
|
29
|
-
VALUES (?, ?, ?, ?)`,[t,r.eventType,p(r),r.timestamp])}}function T(){return new y}let I=new y;function S(e,t){return I.createGraph(e,t)}function A(e){return I.getGraph(e)}function R(e,t,r){return I.updateNodeRuntime(e,t,r)}function v(e,t,r){return I.updateGraphStructure(e,t,r)}function k(e,t){return I.appendEvent(e,t)}function C(e,r={}){let i=["graph_id = ?"],a=[e];r.eventType&&(i.push("event_type = ?"),a.push(r.eventType)),r.since&&(i.push("timestamp >= ?"),a.push(r.since));let n=r.limit??1e3,o=`SELECT event_type, payload, timestamp
|
|
30
|
-
FROM graph_events
|
|
31
|
-
WHERE ${i.join(" AND ")}
|
|
32
|
-
ORDER BY timestamp ASC, event_type ASC
|
|
33
|
-
LIMIT ?`;return a.push(n),f((0,t.getSQLiteDb)()).query(o,a).rows.map(e=>m(e))}function N(e){let r=e.trim();if(!r)return null;if((0,a.isAutomationFrontmatterEnabled)()){let e=(0,a.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active",rootMessageId:r})[0];if(e?.definition.target.type==="execution_graph"){let t=e.definition.target.graphId??e.definition.id,r=e.definition.target.taskId??E(t);if(r)return{graphId:t,taskId:r}}if(!(0,a.isAutomationDualReadEnabled)())return null}return(0,t.getSQLiteDb)().prepare(`SELECT id AS graphId, task_id AS taskId
|
|
34
|
-
FROM execution_graphs
|
|
35
|
-
WHERE schedule IS NOT NULL
|
|
36
|
-
AND json_extract(schedule, '$.rootMessageId') = ?
|
|
37
|
-
AND json_extract(schedule, '$.state') = 'active'
|
|
38
|
-
ORDER BY updated_at DESC
|
|
39
|
-
LIMIT 1`).get(r)??null}function x(){let e=new Set;if((0,a.isAutomationFrontmatterEnabled)()){for(let t of(0,a.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active"}))"execution_graph"===t.definition.target.type&&t.definition.target.rootMessageId&&e.add(t.definition.target.rootMessageId);if(!(0,a.isAutomationDualReadEnabled)())return[...e]}for(let r of(0,t.getSQLiteDb)().prepare(`SELECT json_extract(schedule, '$.rootMessageId') AS rootMessageId
|
|
40
|
-
FROM execution_graphs
|
|
41
|
-
WHERE schedule IS NOT NULL
|
|
42
|
-
AND json_extract(schedule, '$.state') = 'active'`).all())r.rootMessageId&&e.add(r.rootMessageId);return[...e]}function D(e){let r=e.trim();if(!r)return 0;let i=0;if((0,a.isAutomationFrontmatterEnabled)()){for(let e of(0,a.getAutomationRepository)().listVisibleAutomations({targetType:"execution_graph",state:"active",rootMessageId:r})){if("execution_graph"!==e.definition.target.type)continue;let t=e.definition.target.graphId??e.definition.id,r=e.definition.target.taskId??E(t);if(!r)continue;let a=A(r);a?.schedule&&(I.updateGraphStructure(a.id,{mode:a.mode,nodes:a.nodes,edges:a.edges,policy:a.policy,doneCriteria:a.doneCriteria,schedule:{...a.schedule,state:"stopped",tickInProgress:!1}},a.graphVersion),i+=1)}if(i>0||!(0,a.isAutomationDualReadEnabled)())return i}return Number((0,t.getSQLiteDb)().prepare(`UPDATE execution_graphs
|
|
43
|
-
SET schedule = json_set(schedule, '$.state', 'stopped', '$.tickInProgress', json('false')),
|
|
44
|
-
updated_at = strftime('%Y-%m-%dT%H:%M:%fZ','now')
|
|
45
|
-
WHERE schedule IS NOT NULL
|
|
46
|
-
AND json_extract(schedule, '$.rootMessageId') = ?
|
|
47
|
-
AND json_extract(schedule, '$.state') = 'active'`).run(r).changes??0)}e.s(["GraphNodeNotFoundError",()=>s,"GraphNotFoundError",()=>d,"GraphStore",()=>y,"GraphTaskAlreadyBoundError",()=>u,"GraphVersionConflictError",()=>o,"appendEvent",()=>k,"createGraph",()=>S,"createGraphStore",()=>T,"deactivateSchedulesByRootMessageId",()=>D,"getActiveScheduleForRootMessageId",()=>N,"getActiveScheduleRootMessageIds",()=>x,"getGraph",()=>A,"getGraphEvents",()=>C,"getTaskIdForGraphId",()=>E,"updateGraphStructure",()=>v,"updateNodeRuntime",()=>R])},579042,e=>{"use strict";e.s(["DEFAULT_EXECUTION_POLICY",0,{replanBudgetRemaining:3,replanBudgetInitial:3,verifyBudgetRemaining:5,verifyBudgetInitial:5,maxConcurrentAutoChecks:1,immutableRequiredGates:!0,maxConcurrent:3,priorityMode:"fifo",nodeTimeoutMs:18e5,graphTimeoutMs:864e5},"FAILURE_NODE_STATUSES",0,["failed"],"INCOMPLETE_FOR_DONE_STATUSES",0,["pending","running","awaiting_human","blocked"],"SOFT_DEP_SATISFIED_STATUSES",0,["done","passed","failed","skipped","blocked"],"SUCCESS_NODE_STATUSES",0,["done","passed"],"TERMINAL_NODE_STATUSES",0,["done","passed","failed","skipped"]])},306838,e=>{"use strict";var t=e.i(89171),r=e.i(949041),i=e.i(390081);async function a(e){let a=r.LOCAL_USER.id,n=await i.db.getTask(e.taskId,a);return n?{ok:!0,actor:{actorId:a,actorType:"service"},task:n,projectId:e.requestedProjectId??n.project_id??null}:{ok:!1,response:t.NextResponse.json({error:"Task not found"},{status:404})}}e.s(["authorizeGraphMutation",()=>a])},273122,277036,e=>{"use strict";function t(){return new Date().toISOString()}function r(e,t,r){return{actorId:e.actorId,actorType:e.actorType,action:t,...r?{projectId:r}:{}}}function i(e){return{eventType:"graph_created",timestamp:e.timestamp??t(),mode:e.mode,nodeCount:e.nodeCount,edgeCount:e.edgeCount,audit:r(e.actor,"graph_create",e.projectId)}}function a(e){return{eventType:"node_status",nodeId:e.nodeId,fromStatus:e.fromStatus,toStatus:e.toStatus,timestamp:e.timestamp??t(),...e.reason?{reason:e.reason}:{},audit:r(e.actor,"node_status_transition",e.projectId)}}function n(e){return{eventType:"gate_verification",nodeId:e.nodeId,timestamp:e.timestamp??t(),result:e.result,audit:r(e.actor,"gate_verification",e.projectId)}}function o(e){return{eventType:"budget_consumed",budgetType:e.budgetType,remaining:e.remaining,triggerNodeId:e.triggerNodeId,timestamp:e.timestamp??t(),audit:r(e.actor,"budget_consumption",e.projectId)}}function d(e){return{eventType:"replan",fromVersion:e.fromVersion,toVersion:e.toVersion,timestamp:e.timestamp??t(),reason:e.reason,triggeredBy:e.triggeredBy??("user"===e.actor.actorType?"human":"agent"),triggeredAtNodeId:e.triggeredAtNodeId,changes:e.changes,audit:r(e.actor,"graph_replan",e.projectId)}}function s(e){return{eventType:"rollback",toCheckpoint:e.toCheckpoint,timestamp:e.timestamp??t(),reason:e.reason,triggeredBy:e.triggeredBy??("user"===e.actor.actorType?"human":"agent"),audit:r(e.actor,"graph_rollback",e.projectId)}}e.s(["buildBudgetConsumedEvent",()=>o,"buildGateVerificationEvent",()=>n,"buildGraphCreatedEvent",()=>i,"buildNodeStatusEvent",()=>a,"buildReplanEvent",()=>d,"buildRollbackEvent",()=>s],273122);let u={graphCreateCount:0,replanCount:0,rollbackCount:0,migrationFailureCount:0,gatePassCount:0,gateFailCount:0};function p(){u.graphCreateCount+=1}function c(){u.replanCount+=1}function l(){u.rollbackCount+=1}function g(){u.migrationFailureCount+=1}function h(e){if(e){u.gatePassCount+=1;return}u.gateFailCount+=1}e.s(["recordGateVerificationResult",()=>h,"recordGraphCreate",()=>p,"recordMigrationFailure",()=>g,"recordReplan",()=>c,"recordRollback",()=>l],277036)}];
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__6dbe939c._.js.map
|