@mndrk/agx 2.0.32 → 2.0.33
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/app-path-routes-manifest.json +1 -0
- 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/routes-manifest.json +6 -0
- 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/automations/create/route.js +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js +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/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route_client-reference-manifest.js +2 -0
- 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/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/messages/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +3 -2
- 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/processes/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +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/queue/complete/route.js +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +2 -3
- 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 +2 -3
- 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 +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +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 +5 -5
- 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/pause/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +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]/heartbeat/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +6 -6
- 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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/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.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_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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +2 -2
- 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 +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +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]/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]/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/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/app-paths-manifest.json +1 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__06634853._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0b3b6a47._.js +51 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__86f7d27b._.js → [root-of-the-server]__18423486._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__dede3dcd._.js → [root-of-the-server]__19520d85._.js} +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__399b2ca9._.js → [root-of-the-server]__1c18c0d1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1cc2fe7f._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__29419d66._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6e59b27c._.js → [root-of-the-server]__32b13ba9._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__1dd062c1._.js → [root-of-the-server]__3c1567b6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__29ce9c60._.js → [root-of-the-server]__3c37453e._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__507a4363._.js → [root-of-the-server]__3faa64cd._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42497c7b._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e446cb39._.js → [root-of-the-server]__4837d72a._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__10940c29._.js → [root-of-the-server]__49c03d66._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b40c7aab._.js → [root-of-the-server]__4a8d14c1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__75bff965._.js → [root-of-the-server]__4c861686._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4d8c6e3d._.js +58 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__543ba6c4._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__94fa1edc._.js → [root-of-the-server]__588b6ab0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ccfcbcd5._.js → [root-of-the-server]__5a348fba._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__9dfaaf72._.js → [root-of-the-server]__61c99680._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c08bef05._.js → [root-of-the-server]__6acb940d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__98535eb3._.js → [root-of-the-server]__7e79d86a._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6c187704._.js → [root-of-the-server]__7ffcc20c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c5634f17._.js → [root-of-the-server]__875279cb._.js} +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__13677d96._.js → [root-of-the-server]__8b0ab82f._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f5b93200._.js → [root-of-the-server]__8b461158._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__918f0106._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__922eb7cd._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e6ad07c3._.js → [root-of-the-server]__a67cd108._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d8cedc8a._.js → [root-of-the-server]__abb032c1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b3ed0a00._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b63cb741._.js +63 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2388b2b3._.js → [root-of-the-server]__b9b3fde6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f4b70b67._.js → [root-of-the-server]__be4ad4b5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5ca87ba0._.js → [root-of-the-server]__c480c9c2._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +79 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c99509c2._.js +101 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ceb02db8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d6e1ee6e._.js +32 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__80655727._.js → [root-of-the-server]__e069c0a3._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f5a2358a._.js → [root-of-the-server]__e1e51c02._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__12afd8a3._.js → [root-of-the-server]__ef82dda1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f168c6dc._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1b7932f._.js +36 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__4d318eb0._.js → [root-of-the-server]__f701b208._.js} +24 -24
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2e596cc8._.js → [root-of-the-server]__fee58db1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffffceac._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_5462a047._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +57 -0
- package/cloud-runtime/standalone/.next/server/chunks/_c965f7b3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_d225c04f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{_3e0d34cc._.js → _d22934ab._.js} +24 -24
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_knowledge-notes_route_actions_0ddf6109.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_7cad5c77._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_87c06aeb._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +45 -37
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +45 -37
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +12 -12
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__a8a8afdc._.js → [root-of-the-server]__04d1aa70._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__9166c1d6._.js → [root-of-the-server]__2d80540b._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ffa2883._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8973b16a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__1322ced8._.js → [root-of-the-server]__a416df95._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__783669c3._.js → [root-of-the-server]__c108f06c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_064370bc._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_0f4e70b1._.js → _41f60c52._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_6b14826d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_6fc3736e._.js → _84879a01._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_ff5799d6._.js → _9eeb2fa0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_68ac991e._.js → _a1d30b20._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_5b2b8a85._.js → _c87c359c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_fb292eed._.js → _dd31b6e0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_6de3f1de._.js → _f0ce6183._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_knowledge_page_tsx_e2a55cbd._.js +1 -1
- 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_icons_bf855424._.js +3 -0
- package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +1 -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/{a66e1891e808a664.js → 012e3e9699415997.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/031d99fbe758545a.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{87f099ea02aa419d.js → 116985039c24f1f8.js} +9 -9
- package/cloud-runtime/standalone/.next/static/chunks/2ee8d24314eec47c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/3a55441b018d52e4.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{cd308f61797939cd.js → 43f6157bc3db9c52.js} +2 -2
- package/cloud-runtime/standalone/.next/static/chunks/{58025a80caa3629d.js → 56a01238098d495d.js} +9 -9
- package/cloud-runtime/standalone/.next/static/chunks/{6fbe08eab578c7d3.js → 601996727991149e.js} +9 -9
- package/cloud-runtime/standalone/.next/static/chunks/851b1d97179bd39b.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/90b581e9631d8cea.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/b22947e6df238fd5.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{4200b512bdc226bc.js → b2dcd19ebe3af3f6.js} +9 -9
- package/cloud-runtime/standalone/.next/static/chunks/{e62d5fa120fdf21f.js → bc06988336ffd261.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{1f415d0ce7ebbd08.js → c93b9643c81c134e.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{88e24940a5d5d386.js → d78cc7d749043fef.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/ebaf4e8f04bae7b6.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/f4909e7ae8229b1c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/fd221a50082e5128.js +1 -0
- package/cloud-runtime/standalone/app/api/chat/route.ts +36 -0
- package/cloud-runtime/standalone/app/api/knowledge-notes/route.ts +53 -0
- package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +210 -26
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +62 -41
- package/cloud-runtime/standalone/components/chat-ui/Markdown.tsx +19 -9
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +33 -28
- package/cloud-runtime/standalone/hooks/useGroupChat.ts +4 -0
- package/cloud-runtime/standalone/hooks/useProcessPolling.ts +4 -3
- package/cloud-runtime/standalone/hooks/useThreadState.ts +10 -2
- package/cloud-runtime/standalone/lib/cli-runner.ts +212 -14
- package/cloud-runtime/standalone/lib/db.ts +1 -1
- package/cloud-runtime/standalone/lib/debug-log.ts +48 -0
- package/cloud-runtime/standalone/lib/history-store.ts +78 -2
- package/cloud-runtime/standalone/lib/orchestrator/chat-processor.ts +51 -0
- package/cloud-runtime/standalone/lib/orchestrator/runtime.ts +6 -0
- package/cloud-runtime/standalone/lib/queue/sqlite-adapter.ts +117 -2
- package/cloud-runtime/standalone/transcri +0 -0
- package/cloud-runtime/standalone/worker/index.js +604 -165
- package/lib/cli/runCli.js +0 -97
- package/lib/commands/update.js +159 -17
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0925dd01._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__12c7e188._.js +0 -29
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__17c2d68f._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20b3baea._.js +0 -55
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__254e942f._.js +0 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3198c5c8._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__36d9edbd._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4761dc17._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4b1a512c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4dc25d71._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7be8f159._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ac3c2f7f._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bfcedb7c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e1e7dd1e._.js +0 -25
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e45a2a1d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcd3e3b8._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff9c61da._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_66e1ddec._.js +0 -57
- package/cloud-runtime/standalone/.next/server/chunks/lib_09aac4e7._.js +0 -57
- package/cloud-runtime/standalone/.next/server/chunks/lib_cli-runner_ts_dfcf3fda._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_69b6b2e1.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_16c45024._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_678fa868._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/24a6ee21f430da93.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/27129bea5b512ce8.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/463edf3533d27a56.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/5cb0c885b085ea6c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/60c054bb8b2cffa6.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/7e2edf97bd6c0874.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/8249f202d33d0d95.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/9f8f719c4aa25e3d.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/bc727d3d9993e9be.js +0 -1
- /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → 68nLQxEpwR_feFvB8T4tR}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → 68nLQxEpwR_feFvB8T4tR}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → 68nLQxEpwR_feFvB8T4tR}/_ssgManifest.js +0 -0
|
@@ -86,20 +86,20 @@ var require_file_uri_to_path = __commonJS({
|
|
|
86
86
|
var rest = decodeURI(uri.substring(7));
|
|
87
87
|
var firstSlash = rest.indexOf("/");
|
|
88
88
|
var host = rest.substring(0, firstSlash);
|
|
89
|
-
var
|
|
89
|
+
var path10 = rest.substring(firstSlash + 1);
|
|
90
90
|
if ("localhost" == host) host = "";
|
|
91
91
|
if (host) {
|
|
92
92
|
host = sep + sep + host;
|
|
93
93
|
}
|
|
94
|
-
|
|
94
|
+
path10 = path10.replace(/^(.+)\|/, "$1:");
|
|
95
95
|
if (sep == "\\") {
|
|
96
|
-
|
|
96
|
+
path10 = path10.replace(/\//g, "\\");
|
|
97
97
|
}
|
|
98
|
-
if (/^.+\:/.test(
|
|
98
|
+
if (/^.+\:/.test(path10)) {
|
|
99
99
|
} else {
|
|
100
|
-
|
|
100
|
+
path10 = sep + path10;
|
|
101
101
|
}
|
|
102
|
-
return host +
|
|
102
|
+
return host + path10;
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
});
|
|
@@ -107,19 +107,19 @@ var require_file_uri_to_path = __commonJS({
|
|
|
107
107
|
// ../agx-cloud/node_modules/bindings/bindings.js
|
|
108
108
|
var require_bindings = __commonJS({
|
|
109
109
|
"../agx-cloud/node_modules/bindings/bindings.js"(exports2, module2) {
|
|
110
|
-
var
|
|
111
|
-
var
|
|
110
|
+
var fs7 = require("fs");
|
|
111
|
+
var path10 = require("path");
|
|
112
112
|
var fileURLToPath = require_file_uri_to_path();
|
|
113
|
-
var join6 =
|
|
114
|
-
var dirname =
|
|
115
|
-
var exists =
|
|
113
|
+
var join6 = path10.join;
|
|
114
|
+
var dirname = path10.dirname;
|
|
115
|
+
var exists = fs7.accessSync && function(path11) {
|
|
116
116
|
try {
|
|
117
|
-
|
|
117
|
+
fs7.accessSync(path11);
|
|
118
118
|
} catch (e) {
|
|
119
119
|
return false;
|
|
120
120
|
}
|
|
121
121
|
return true;
|
|
122
|
-
} ||
|
|
122
|
+
} || fs7.existsSync || path10.existsSync;
|
|
123
123
|
var defaults = {
|
|
124
124
|
arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
|
|
125
125
|
compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
|
|
@@ -164,7 +164,7 @@ var require_bindings = __commonJS({
|
|
|
164
164
|
if (!opts.module_root) {
|
|
165
165
|
opts.module_root = exports2.getRoot(exports2.getFileName());
|
|
166
166
|
}
|
|
167
|
-
if (
|
|
167
|
+
if (path10.extname(opts.bindings) != ".node") {
|
|
168
168
|
opts.bindings += ".node";
|
|
169
169
|
}
|
|
170
170
|
var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
|
|
@@ -402,11 +402,11 @@ var require_pragma = __commonJS({
|
|
|
402
402
|
var require_backup = __commonJS({
|
|
403
403
|
"../agx-cloud/node_modules/better-sqlite3/lib/methods/backup.js"(exports2, module2) {
|
|
404
404
|
"use strict";
|
|
405
|
-
var
|
|
406
|
-
var
|
|
405
|
+
var fs7 = require("fs");
|
|
406
|
+
var path10 = require("path");
|
|
407
407
|
var { promisify } = require("util");
|
|
408
408
|
var { cppdb } = require_util();
|
|
409
|
-
var fsAccess = promisify(
|
|
409
|
+
var fsAccess = promisify(fs7.access);
|
|
410
410
|
module2.exports = async function backup(filename, options) {
|
|
411
411
|
if (options == null) options = {};
|
|
412
412
|
if (typeof filename !== "string") throw new TypeError("Expected first argument to be a string");
|
|
@@ -419,7 +419,7 @@ var require_backup = __commonJS({
|
|
|
419
419
|
if (typeof attachedName !== "string") throw new TypeError('Expected the "attached" option to be a string');
|
|
420
420
|
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
421
421
|
if (handler != null && typeof handler !== "function") throw new TypeError('Expected the "progress" option to be a function');
|
|
422
|
-
await fsAccess(
|
|
422
|
+
await fsAccess(path10.dirname(filename)).catch(() => {
|
|
423
423
|
throw new TypeError("Cannot save backup because the directory does not exist");
|
|
424
424
|
});
|
|
425
425
|
const isNewFile = await fsAccess(filename).then(() => false, () => true);
|
|
@@ -724,8 +724,8 @@ var require_inspect = __commonJS({
|
|
|
724
724
|
var require_database = __commonJS({
|
|
725
725
|
"../agx-cloud/node_modules/better-sqlite3/lib/database.js"(exports2, module2) {
|
|
726
726
|
"use strict";
|
|
727
|
-
var
|
|
728
|
-
var
|
|
727
|
+
var fs7 = require("fs");
|
|
728
|
+
var path10 = require("path");
|
|
729
729
|
var util = require_util();
|
|
730
730
|
var SqliteError = require_sqlite_error();
|
|
731
731
|
var DEFAULT_ADDON;
|
|
@@ -761,7 +761,7 @@ var require_database = __commonJS({
|
|
|
761
761
|
addon = DEFAULT_ADDON || (DEFAULT_ADDON = require_bindings()("better_sqlite3.node"));
|
|
762
762
|
} else if (typeof nativeBinding === "string") {
|
|
763
763
|
const requireFunc = typeof __non_webpack_require__ === "function" ? __non_webpack_require__ : require;
|
|
764
|
-
addon = requireFunc(
|
|
764
|
+
addon = requireFunc(path10.resolve(nativeBinding).replace(/(\.node)?$/, ".node"));
|
|
765
765
|
} else {
|
|
766
766
|
addon = nativeBinding;
|
|
767
767
|
}
|
|
@@ -769,7 +769,7 @@ var require_database = __commonJS({
|
|
|
769
769
|
addon.setErrorConstructor(SqliteError);
|
|
770
770
|
addon.isInitialized = true;
|
|
771
771
|
}
|
|
772
|
-
if (!anonymous && !filename.startsWith("file:") && !
|
|
772
|
+
if (!anonymous && !filename.startsWith("file:") && !fs7.existsSync(path10.dirname(filename))) {
|
|
773
773
|
throw new TypeError("Cannot open database because the directory does not exist");
|
|
774
774
|
}
|
|
775
775
|
Object.defineProperties(this, {
|
|
@@ -977,11 +977,11 @@ var init_auth_mode = __esm({
|
|
|
977
977
|
|
|
978
978
|
// ../agx-cloud/lib/mesh-core/activity.ts
|
|
979
979
|
function activityPath(agentId) {
|
|
980
|
-
return (0,
|
|
980
|
+
return (0, import_path4.join)(AGENTS_DIR, agentId, "activity.jsonl");
|
|
981
981
|
}
|
|
982
982
|
function ensureDir(agentId) {
|
|
983
|
-
const dir = (0,
|
|
984
|
-
if (!(0,
|
|
983
|
+
const dir = (0, import_path4.join)(AGENTS_DIR, agentId);
|
|
984
|
+
if (!(0, import_fs4.existsSync)(dir)) (0, import_fs4.mkdirSync)(dir, { recursive: true });
|
|
985
985
|
}
|
|
986
986
|
function logActivity(agentId, action, data) {
|
|
987
987
|
try {
|
|
@@ -992,32 +992,32 @@ function logActivity(agentId, action, data) {
|
|
|
992
992
|
action,
|
|
993
993
|
...data
|
|
994
994
|
};
|
|
995
|
-
(0,
|
|
995
|
+
(0, import_fs4.appendFileSync)(activityPath(agentId), JSON.stringify(event) + "\n", "utf-8");
|
|
996
996
|
} catch {
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
var
|
|
999
|
+
var import_fs4, import_path4, import_os4, AGENTS_DIR;
|
|
1000
1000
|
var init_activity = __esm({
|
|
1001
1001
|
"../agx-cloud/lib/mesh-core/activity.ts"() {
|
|
1002
1002
|
"use strict";
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
AGENTS_DIR = (0,
|
|
1003
|
+
import_fs4 = require("fs");
|
|
1004
|
+
import_path4 = require("path");
|
|
1005
|
+
import_os4 = require("os");
|
|
1006
|
+
AGENTS_DIR = (0, import_path4.join)((0, import_os4.homedir)(), ".agx", "agents");
|
|
1007
1007
|
}
|
|
1008
1008
|
});
|
|
1009
1009
|
|
|
1010
1010
|
// ../agx-cloud/lib/mesh-core/self.ts
|
|
1011
1011
|
function selfPath(agentId) {
|
|
1012
|
-
return (0,
|
|
1012
|
+
return (0, import_path5.join)(AGENTS_DIR2, agentId, "self.md");
|
|
1013
1013
|
}
|
|
1014
1014
|
function reflectionStatePath(agentId) {
|
|
1015
|
-
return (0,
|
|
1015
|
+
return (0, import_path5.join)(AGENTS_DIR2, agentId, "reflection-state.json");
|
|
1016
1016
|
}
|
|
1017
1017
|
function readSelf(agentId) {
|
|
1018
|
-
const
|
|
1019
|
-
if (!(0,
|
|
1020
|
-
const raw = (0,
|
|
1018
|
+
const path10 = selfPath(agentId);
|
|
1019
|
+
if (!(0, import_fs5.existsSync)(path10)) return null;
|
|
1020
|
+
const raw = (0, import_fs5.readFileSync)(path10, "utf-8");
|
|
1021
1021
|
if (!raw.trim()) return null;
|
|
1022
1022
|
const lines = raw.split("\n");
|
|
1023
1023
|
let version = 0;
|
|
@@ -1043,8 +1043,8 @@ function readSelf(agentId) {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
1045
|
function writeSelf(agentId, content, version) {
|
|
1046
|
-
const dir = (0,
|
|
1047
|
-
if (!(0,
|
|
1046
|
+
const dir = (0, import_path5.join)(AGENTS_DIR2, agentId);
|
|
1047
|
+
if (!(0, import_fs5.existsSync)(dir)) (0, import_fs5.mkdirSync)(dir, { recursive: true });
|
|
1048
1048
|
const derivedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1049
1049
|
const full = `---
|
|
1050
1050
|
version: ${version}
|
|
@@ -1053,15 +1053,15 @@ derivedAt: ${derivedAt}
|
|
|
1053
1053
|
${content}
|
|
1054
1054
|
`;
|
|
1055
1055
|
const tmp = selfPath(agentId) + ".tmp";
|
|
1056
|
-
(0,
|
|
1057
|
-
(0,
|
|
1056
|
+
(0, import_fs5.writeFileSync)(tmp, full, "utf-8");
|
|
1057
|
+
(0, import_fs5.renameSync)(tmp, selfPath(agentId));
|
|
1058
1058
|
logActivity(agentId, "self-updated", { meta: { version } });
|
|
1059
1059
|
}
|
|
1060
1060
|
function readReflectionState(agentId) {
|
|
1061
|
-
const
|
|
1062
|
-
if (!(0,
|
|
1061
|
+
const path10 = reflectionStatePath(agentId);
|
|
1062
|
+
if (!(0, import_fs5.existsSync)(path10)) return null;
|
|
1063
1063
|
try {
|
|
1064
|
-
const parsed = JSON.parse((0,
|
|
1064
|
+
const parsed = JSON.parse((0, import_fs5.readFileSync)(path10, "utf-8"));
|
|
1065
1065
|
const lastProcessedJournalId = typeof parsed?.lastProcessedJournalId === "string" && parsed.lastProcessedJournalId.trim() ? parsed.lastProcessedJournalId.trim() : null;
|
|
1066
1066
|
const updatedAt = typeof parsed?.updatedAt === "string" && parsed.updatedAt.trim() ? parsed.updatedAt : (/* @__PURE__ */ new Date()).toISOString();
|
|
1067
1067
|
return { lastProcessedJournalId, updatedAt };
|
|
@@ -1070,11 +1070,11 @@ function readReflectionState(agentId) {
|
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
function writeReflectionState(agentId, state) {
|
|
1073
|
-
const dir = (0,
|
|
1074
|
-
if (!(0,
|
|
1073
|
+
const dir = (0, import_path5.join)(AGENTS_DIR2, agentId);
|
|
1074
|
+
if (!(0, import_fs5.existsSync)(dir)) (0, import_fs5.mkdirSync)(dir, { recursive: true });
|
|
1075
1075
|
const tmp = reflectionStatePath(agentId) + ".tmp";
|
|
1076
|
-
(0,
|
|
1077
|
-
(0,
|
|
1076
|
+
(0, import_fs5.writeFileSync)(tmp, JSON.stringify(state, null, 2), "utf-8");
|
|
1077
|
+
(0, import_fs5.renameSync)(tmp, reflectionStatePath(agentId));
|
|
1078
1078
|
}
|
|
1079
1079
|
function buildReflectionPrompt(identity, currentSelf, recentJournal, teamSelves) {
|
|
1080
1080
|
const selfText = currentSelf?.content || `I am ${identity.name}. ${identity.seed}`;
|
|
@@ -1153,35 +1153,35 @@ Rules:
|
|
|
1153
1153
|
- If nothing genuinely new was learned, return an empty memories array.
|
|
1154
1154
|
- Do not wrap the JSON in markdown fences.`;
|
|
1155
1155
|
}
|
|
1156
|
-
var
|
|
1156
|
+
var import_fs5, import_path5, import_os5, AGENTS_DIR2;
|
|
1157
1157
|
var init_self = __esm({
|
|
1158
1158
|
"../agx-cloud/lib/mesh-core/self.ts"() {
|
|
1159
1159
|
"use strict";
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1160
|
+
import_fs5 = require("fs");
|
|
1161
|
+
import_path5 = require("path");
|
|
1162
|
+
import_os5 = require("os");
|
|
1163
1163
|
init_activity();
|
|
1164
|
-
AGENTS_DIR2 = (0,
|
|
1164
|
+
AGENTS_DIR2 = (0, import_path5.join)((0, import_os5.homedir)(), ".agx", "agents");
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
1167
|
|
|
1168
1168
|
// ../agx-cloud/lib/mesh-core/journal.ts
|
|
1169
1169
|
function agentDir(agentId) {
|
|
1170
|
-
return (0,
|
|
1170
|
+
return (0, import_path6.join)(AGENTS_DIR3, agentId);
|
|
1171
1171
|
}
|
|
1172
1172
|
function journalPath(agentId) {
|
|
1173
|
-
return (0,
|
|
1173
|
+
return (0, import_path6.join)(agentDir(agentId), "journal.jsonl");
|
|
1174
1174
|
}
|
|
1175
1175
|
function ensureAgentDir(agentId) {
|
|
1176
1176
|
const dir = agentDir(agentId);
|
|
1177
|
-
if (!(0,
|
|
1178
|
-
(0,
|
|
1177
|
+
if (!(0, import_fs6.existsSync)(dir)) {
|
|
1178
|
+
(0, import_fs6.mkdirSync)(dir, { recursive: true });
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
1181
|
function readJournalLines(agentId) {
|
|
1182
|
-
const
|
|
1183
|
-
if (!(0,
|
|
1184
|
-
return (0,
|
|
1182
|
+
const path10 = journalPath(agentId);
|
|
1183
|
+
if (!(0, import_fs6.existsSync)(path10)) return [];
|
|
1184
|
+
return (0, import_fs6.readFileSync)(path10, "utf-8").split("\n").filter((l) => l.trim());
|
|
1185
1185
|
}
|
|
1186
1186
|
function parseMaxSeq(agentId, lines) {
|
|
1187
1187
|
let maxSeq = 0;
|
|
@@ -1210,7 +1210,7 @@ function appendJournal(agentId, entry) {
|
|
|
1210
1210
|
const nextId = `${agentId}:${maxSeq + 1}`;
|
|
1211
1211
|
const normalized = { ...entry, id: entry.id?.trim() || nextId };
|
|
1212
1212
|
const line = JSON.stringify(normalized) + "\n";
|
|
1213
|
-
(0,
|
|
1213
|
+
(0, import_fs6.appendFileSync)(journalPath(agentId), line, "utf-8");
|
|
1214
1214
|
logActivity(agentId, entry.type === "reflection" ? "reflection" : "journal-post", {
|
|
1215
1215
|
thread: normalized.thread,
|
|
1216
1216
|
meta: { entryId: normalized.id }
|
|
@@ -1244,42 +1244,42 @@ function readJournalSince(agentId, afterEntryId) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
return entries;
|
|
1246
1246
|
}
|
|
1247
|
-
var
|
|
1247
|
+
var import_fs6, import_path6, import_os6, AGENTS_DIR3;
|
|
1248
1248
|
var init_journal = __esm({
|
|
1249
1249
|
"../agx-cloud/lib/mesh-core/journal.ts"() {
|
|
1250
1250
|
"use strict";
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1251
|
+
import_fs6 = require("fs");
|
|
1252
|
+
import_path6 = require("path");
|
|
1253
|
+
import_os6 = require("os");
|
|
1254
1254
|
init_activity();
|
|
1255
|
-
AGENTS_DIR3 = (0,
|
|
1255
|
+
AGENTS_DIR3 = (0, import_path6.join)((0, import_os6.homedir)(), ".agx", "agents");
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
1258
|
|
|
1259
1259
|
// ../agx-cloud/lib/mesh-core/agent.ts
|
|
1260
1260
|
function ensureAgent(agentId, options) {
|
|
1261
|
-
const dir = (0,
|
|
1262
|
-
if (!(0,
|
|
1263
|
-
(0,
|
|
1261
|
+
const dir = (0, import_path7.join)(AGENTS_DIR4, agentId);
|
|
1262
|
+
if (!(0, import_fs7.existsSync)(dir)) {
|
|
1263
|
+
(0, import_fs7.mkdirSync)(dir, { recursive: true });
|
|
1264
1264
|
}
|
|
1265
1265
|
const voice = options?.voice?.trim() || DEFAULT_VOICE;
|
|
1266
1266
|
const seed = options?.seed?.trim() || DEFAULT_SEED;
|
|
1267
|
-
const identityPath = (0,
|
|
1268
|
-
if (!(0,
|
|
1267
|
+
const identityPath = (0, import_path7.join)(dir, "identity.json");
|
|
1268
|
+
if (!(0, import_fs7.existsSync)(identityPath)) {
|
|
1269
1269
|
const identity = { name: agentId, voice, seed };
|
|
1270
|
-
(0,
|
|
1271
|
-
}
|
|
1272
|
-
const journal = (0,
|
|
1273
|
-
const reactions = (0,
|
|
1274
|
-
const comments = (0,
|
|
1275
|
-
const activity = (0,
|
|
1276
|
-
const self = (0,
|
|
1277
|
-
if (!(0,
|
|
1278
|
-
if (!(0,
|
|
1279
|
-
if (!(0,
|
|
1280
|
-
if (!(0,
|
|
1281
|
-
if (!(0,
|
|
1282
|
-
(0,
|
|
1270
|
+
(0, import_fs7.writeFileSync)(identityPath, JSON.stringify(identity, null, 2) + "\n", "utf-8");
|
|
1271
|
+
}
|
|
1272
|
+
const journal = (0, import_path7.join)(dir, "journal.jsonl");
|
|
1273
|
+
const reactions = (0, import_path7.join)(dir, "reactions.jsonl");
|
|
1274
|
+
const comments = (0, import_path7.join)(dir, "comments.jsonl");
|
|
1275
|
+
const activity = (0, import_path7.join)(dir, "activity.jsonl");
|
|
1276
|
+
const self = (0, import_path7.join)(dir, "self.md");
|
|
1277
|
+
if (!(0, import_fs7.existsSync)(journal)) (0, import_fs7.writeFileSync)(journal, "", "utf-8");
|
|
1278
|
+
if (!(0, import_fs7.existsSync)(reactions)) (0, import_fs7.writeFileSync)(reactions, "", "utf-8");
|
|
1279
|
+
if (!(0, import_fs7.existsSync)(comments)) (0, import_fs7.writeFileSync)(comments, "", "utf-8");
|
|
1280
|
+
if (!(0, import_fs7.existsSync)(activity)) (0, import_fs7.writeFileSync)(activity, "", "utf-8");
|
|
1281
|
+
if (!(0, import_fs7.existsSync)(self)) {
|
|
1282
|
+
(0, import_fs7.writeFileSync)(
|
|
1283
1283
|
self,
|
|
1284
1284
|
`---
|
|
1285
1285
|
version: 0
|
|
@@ -1292,31 +1292,31 @@ I am ${agentId}. ${seed}
|
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
function readIdentity(agentId) {
|
|
1295
|
-
const
|
|
1296
|
-
if (!(0,
|
|
1295
|
+
const path10 = (0, import_path7.join)(AGENTS_DIR4, agentId, "identity.json");
|
|
1296
|
+
if (!(0, import_fs7.existsSync)(path10)) return null;
|
|
1297
1297
|
try {
|
|
1298
|
-
return JSON.parse((0,
|
|
1298
|
+
return JSON.parse((0, import_fs7.readFileSync)(path10, "utf-8"));
|
|
1299
1299
|
} catch {
|
|
1300
1300
|
return null;
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
1303
|
function listAgents() {
|
|
1304
|
-
if (!(0,
|
|
1305
|
-
return (0,
|
|
1304
|
+
if (!(0, import_fs7.existsSync)(AGENTS_DIR4)) return [];
|
|
1305
|
+
return (0, import_fs7.readdirSync)(AGENTS_DIR4, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name);
|
|
1306
1306
|
}
|
|
1307
1307
|
function getTeamSelves(excludeAgent) {
|
|
1308
1308
|
return listAgents().filter((id) => id !== excludeAgent).map((id) => readSelf(id)).filter((s) => s !== null);
|
|
1309
1309
|
}
|
|
1310
|
-
var
|
|
1310
|
+
var import_fs7, import_path7, import_os7, AGENTS_DIR4, DEFAULT_VOICE, DEFAULT_SEED;
|
|
1311
1311
|
var init_agent = __esm({
|
|
1312
1312
|
"../agx-cloud/lib/mesh-core/agent.ts"() {
|
|
1313
1313
|
"use strict";
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1314
|
+
import_fs7 = require("fs");
|
|
1315
|
+
import_path7 = require("path");
|
|
1316
|
+
import_os7 = require("os");
|
|
1317
1317
|
init_self();
|
|
1318
1318
|
init_journal();
|
|
1319
|
-
AGENTS_DIR4 = (0,
|
|
1319
|
+
AGENTS_DIR4 = (0, import_path7.join)((0, import_os7.homedir)(), ".agx", "agents");
|
|
1320
1320
|
DEFAULT_VOICE = "conversational, concise, practical";
|
|
1321
1321
|
DEFAULT_SEED = "I evolve through experience and collaboration.";
|
|
1322
1322
|
}
|
|
@@ -1338,20 +1338,20 @@ function nextUniqueId(base, used) {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
function migrateAgentDirectory(oldId, newId, displayName) {
|
|
1340
1340
|
if (!oldId || !newId || oldId === newId) return;
|
|
1341
|
-
const oldDir =
|
|
1342
|
-
const newDir =
|
|
1343
|
-
if (!(0,
|
|
1344
|
-
(0,
|
|
1345
|
-
(0,
|
|
1346
|
-
const identityPath =
|
|
1347
|
-
if (!(0,
|
|
1341
|
+
const oldDir = import_path8.default.join(AGENTS_DIR5, oldId);
|
|
1342
|
+
const newDir = import_path8.default.join(AGENTS_DIR5, newId);
|
|
1343
|
+
if (!(0, import_fs8.existsSync)(oldDir) || (0, import_fs8.existsSync)(newDir)) return;
|
|
1344
|
+
(0, import_fs8.mkdirSync)(AGENTS_DIR5, { recursive: true });
|
|
1345
|
+
(0, import_fs8.renameSync)(oldDir, newDir);
|
|
1346
|
+
const identityPath = import_path8.default.join(newDir, "identity.json");
|
|
1347
|
+
if (!(0, import_fs8.existsSync)(identityPath)) return;
|
|
1348
1348
|
try {
|
|
1349
|
-
const parsed = JSON.parse((0,
|
|
1349
|
+
const parsed = JSON.parse((0, import_fs8.readFileSync)(identityPath, "utf8"));
|
|
1350
1350
|
const updated = {
|
|
1351
1351
|
...parsed,
|
|
1352
1352
|
name: typeof displayName === "string" && displayName.trim() ? displayName.trim() : newId
|
|
1353
1353
|
};
|
|
1354
|
-
(0,
|
|
1354
|
+
(0, import_fs8.writeFileSync)(identityPath, `${JSON.stringify(updated, null, 2)}
|
|
1355
1355
|
`, "utf8");
|
|
1356
1356
|
} catch {
|
|
1357
1357
|
}
|
|
@@ -1429,7 +1429,7 @@ function migrateLegacyParticipantIds(db2) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
1431
|
function getDb() {
|
|
1432
|
-
(0,
|
|
1432
|
+
(0, import_fs8.mkdirSync)(STORE_DIR, { recursive: true });
|
|
1433
1433
|
const db2 = new import_better_sqlite32.default(DB_PATH);
|
|
1434
1434
|
db2.pragma("journal_mode = WAL");
|
|
1435
1435
|
db2.exec(`
|
|
@@ -1507,17 +1507,17 @@ function loadParticipants() {
|
|
|
1507
1507
|
db2.close();
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
var import_better_sqlite32,
|
|
1510
|
+
var import_better_sqlite32, import_fs8, import_path8, import_os8, STORE_DIR, DB_PATH, AGENTS_DIR5;
|
|
1511
1511
|
var init_participants_store = __esm({
|
|
1512
1512
|
"../agx-cloud/lib/participants-store.ts"() {
|
|
1513
1513
|
"use strict";
|
|
1514
1514
|
import_better_sqlite32 = __toESM(require_lib());
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
STORE_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() ||
|
|
1519
|
-
DB_PATH =
|
|
1520
|
-
AGENTS_DIR5 = process.env.AGX_AGENTS_DIR?.trim() ||
|
|
1515
|
+
import_fs8 = require("fs");
|
|
1516
|
+
import_path8 = __toESM(require("path"));
|
|
1517
|
+
import_os8 = __toESM(require("os"));
|
|
1518
|
+
STORE_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path8.default.join(import_os8.default.homedir(), ".agx", "group-chat");
|
|
1519
|
+
DB_PATH = import_path8.default.join(STORE_DIR, "history.sqlite");
|
|
1520
|
+
AGENTS_DIR5 = process.env.AGX_AGENTS_DIR?.trim() || import_path8.default.join(import_os8.default.homedir(), ".agx", "agents");
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
1523
1523
|
|
|
@@ -1811,7 +1811,7 @@ function sqlExpr(expr) {
|
|
|
1811
1811
|
}
|
|
1812
1812
|
function getSQLiteDb() {
|
|
1813
1813
|
if (_db) return _db;
|
|
1814
|
-
const dbPath = process.env.SQLITE_DB_PATH ||
|
|
1814
|
+
const dbPath = process.env.SQLITE_DB_PATH || import_path9.default.join(AGX_DATA_DIR3, "agx-board.db");
|
|
1815
1815
|
_db = new import_better_sqlite33.default(dbPath);
|
|
1816
1816
|
const errors = validateSQLiteEnvironment(_db, dbPath);
|
|
1817
1817
|
if (errors.length > 0) {
|
|
@@ -1837,12 +1837,12 @@ ${msgs.join("\n")}`);
|
|
|
1837
1837
|
return _db;
|
|
1838
1838
|
}
|
|
1839
1839
|
function initSQLiteSchema(db2) {
|
|
1840
|
-
const ddlPath =
|
|
1841
|
-
if (!
|
|
1840
|
+
const ddlPath = import_path9.default.join(process.cwd(), "db", "sqlite", "001_agx_board_schema.sql");
|
|
1841
|
+
if (!import_fs9.default.existsSync(ddlPath)) {
|
|
1842
1842
|
console.warn(`[sqlite] DDL not found at ${ddlPath}, skipping schema init`);
|
|
1843
1843
|
return;
|
|
1844
1844
|
}
|
|
1845
|
-
const ddl =
|
|
1845
|
+
const ddl = import_fs9.default.readFileSync(ddlPath, "utf-8");
|
|
1846
1846
|
db2.exec(ddl);
|
|
1847
1847
|
}
|
|
1848
1848
|
function dropLegacyTeamsTables(db2) {
|
|
@@ -2244,20 +2244,20 @@ function createAdminDbClientSQLite() {
|
|
|
2244
2244
|
}
|
|
2245
2245
|
};
|
|
2246
2246
|
}
|
|
2247
|
-
var import_better_sqlite33,
|
|
2247
|
+
var import_better_sqlite33, import_fs9, import_path9, import_os9, AGX_DATA_DIR3, SqlExpression, _db, JSON_COLUMNS, SQLiteQueryBuilder, KNOWN_JSON_COLUMNS;
|
|
2248
2248
|
var init_sqlite_query_adapter = __esm({
|
|
2249
2249
|
"../agx-cloud/lib/sqlite-query-adapter.ts"() {
|
|
2250
2250
|
"use strict";
|
|
2251
2251
|
import_better_sqlite33 = __toESM(require_lib());
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2252
|
+
import_fs9 = __toESM(require("fs"));
|
|
2253
|
+
import_path9 = __toESM(require("path"));
|
|
2254
|
+
import_os9 = __toESM(require("os"));
|
|
2255
2255
|
init_auth_mode();
|
|
2256
2256
|
init_agent();
|
|
2257
2257
|
init_participants_store();
|
|
2258
2258
|
init_startup();
|
|
2259
2259
|
init_workspaces_to_projects_migration();
|
|
2260
|
-
|
|
2260
|
+
AGX_DATA_DIR3 = process.env.AGX_DATA_DIR || import_path9.default.join(import_os9.default.homedir(), ".agx");
|
|
2261
2261
|
SqlExpression = class {
|
|
2262
2262
|
constructor(expr) {
|
|
2263
2263
|
this.expr = expr;
|
|
@@ -4061,7 +4061,7 @@ async function deleteProjectMemory(memoryId) {
|
|
|
4061
4061
|
}
|
|
4062
4062
|
async function getProjectThreads(projectId) {
|
|
4063
4063
|
const db2 = createAdminDbClient();
|
|
4064
|
-
const { data, error } = await db2.from("project_threads").select("*").eq("project_id", projectId).order("created_at", { ascending:
|
|
4064
|
+
const { data, error } = await db2.from("project_threads").select("*").eq("project_id", projectId).order("created_at", { ascending: true });
|
|
4065
4065
|
if (error) {
|
|
4066
4066
|
if (isMissingRelationError2(error, "project_threads")) return [];
|
|
4067
4067
|
throw error;
|
|
@@ -4527,9 +4527,9 @@ function v4(options, buf, offset) {
|
|
|
4527
4527
|
var v4_default = v4;
|
|
4528
4528
|
|
|
4529
4529
|
// ../agx-cloud/lib/queue/sqlite-adapter.ts
|
|
4530
|
-
var
|
|
4531
|
-
var
|
|
4532
|
-
var
|
|
4530
|
+
var import_path3 = __toESM(require("path"));
|
|
4531
|
+
var import_fs3 = __toESM(require("fs"));
|
|
4532
|
+
var import_os3 = __toESM(require("os"));
|
|
4533
4533
|
init_startup();
|
|
4534
4534
|
|
|
4535
4535
|
// ../agx-cloud/lib/limits.ts
|
|
@@ -4570,8 +4570,53 @@ var WriteRateMonitor = class {
|
|
|
4570
4570
|
}
|
|
4571
4571
|
};
|
|
4572
4572
|
|
|
4573
|
-
// ../agx-cloud/lib/
|
|
4573
|
+
// ../agx-cloud/lib/debug-log.ts
|
|
4574
|
+
var import_fs2 = __toESM(require("fs"));
|
|
4575
|
+
var import_os2 = __toESM(require("os"));
|
|
4576
|
+
var import_path2 = __toESM(require("path"));
|
|
4574
4577
|
var AGX_DATA_DIR = process.env.AGX_DATA_DIR || import_path2.default.join(import_os2.default.homedir(), ".agx");
|
|
4578
|
+
var DEBUG_LOG_PATH = process.env.AGX_DEBUG_LOG_PATH || import_path2.default.join(AGX_DATA_DIR, "logs", "desktop-chat-debug.log");
|
|
4579
|
+
function ensureLogDir() {
|
|
4580
|
+
import_fs2.default.mkdirSync(import_path2.default.dirname(DEBUG_LOG_PATH), { recursive: true });
|
|
4581
|
+
}
|
|
4582
|
+
function safeReplacer(_key, value) {
|
|
4583
|
+
if (value instanceof Error) {
|
|
4584
|
+
return {
|
|
4585
|
+
name: value.name,
|
|
4586
|
+
message: value.message,
|
|
4587
|
+
stack: value.stack
|
|
4588
|
+
};
|
|
4589
|
+
}
|
|
4590
|
+
if (typeof value === "string" && value.length > 2e3) {
|
|
4591
|
+
return `${value.slice(0, 2e3)}...<truncated>`;
|
|
4592
|
+
}
|
|
4593
|
+
return value;
|
|
4594
|
+
}
|
|
4595
|
+
function writeDebugLog(event, payload) {
|
|
4596
|
+
try {
|
|
4597
|
+
ensureLogDir();
|
|
4598
|
+
const line = JSON.stringify(
|
|
4599
|
+
{
|
|
4600
|
+
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4601
|
+
pid: process.pid,
|
|
4602
|
+
event,
|
|
4603
|
+
...payload ? { payload } : {}
|
|
4604
|
+
},
|
|
4605
|
+
safeReplacer
|
|
4606
|
+
);
|
|
4607
|
+
import_fs2.default.appendFileSync(DEBUG_LOG_PATH, `${line}
|
|
4608
|
+
`, "utf8");
|
|
4609
|
+
} catch {
|
|
4610
|
+
}
|
|
4611
|
+
}
|
|
4612
|
+
|
|
4613
|
+
// ../agx-cloud/lib/queue/sqlite-adapter.ts
|
|
4614
|
+
var AGX_DATA_DIR2 = process.env.AGX_DATA_DIR || import_path3.default.join(import_os3.default.homedir(), ".agx");
|
|
4615
|
+
var DEFAULT_STALE_JOB_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
4616
|
+
function getStaleJobTimeoutMs() {
|
|
4617
|
+
const raw = Number(process.env.AGX_QUEUE_STALE_MS);
|
|
4618
|
+
return Number.isFinite(raw) && raw > 0 ? raw : DEFAULT_STALE_JOB_TIMEOUT_MS;
|
|
4619
|
+
}
|
|
4575
4620
|
var SQLiteQueueAdapter = class {
|
|
4576
4621
|
constructor(dbPath) {
|
|
4577
4622
|
this.workers = /* @__PURE__ */ new Map();
|
|
@@ -4579,10 +4624,10 @@ var SQLiteQueueAdapter = class {
|
|
|
4579
4624
|
this.writeRateInterval = null;
|
|
4580
4625
|
this.writeMonitor = new WriteRateMonitor();
|
|
4581
4626
|
this.workerId = v4_default();
|
|
4582
|
-
const finalPath = dbPath || process.env.SQLITE_QUEUE_PATH ||
|
|
4583
|
-
const dir =
|
|
4584
|
-
if (!
|
|
4585
|
-
|
|
4627
|
+
const finalPath = dbPath || process.env.SQLITE_QUEUE_PATH || import_path3.default.join(AGX_DATA_DIR2, "agx-queue.db");
|
|
4628
|
+
const dir = import_path3.default.dirname(finalPath);
|
|
4629
|
+
if (!import_fs3.default.existsSync(dir)) {
|
|
4630
|
+
import_fs3.default.mkdirSync(dir, { recursive: true });
|
|
4586
4631
|
}
|
|
4587
4632
|
this.db = new import_better_sqlite3.default(finalPath);
|
|
4588
4633
|
const errors = validateSQLiteEnvironment(this.db, finalPath);
|
|
@@ -4647,9 +4692,23 @@ var SQLiteQueueAdapter = class {
|
|
|
4647
4692
|
options?.priority ?? 0
|
|
4648
4693
|
);
|
|
4649
4694
|
this.writeMonitor.record();
|
|
4695
|
+
writeDebugLog("queue.send", {
|
|
4696
|
+
queue: queue2,
|
|
4697
|
+
jobId: id,
|
|
4698
|
+
startAfter,
|
|
4699
|
+
retryLimit: options?.retryLimit ?? 3,
|
|
4700
|
+
priority: options?.priority ?? 0,
|
|
4701
|
+
data
|
|
4702
|
+
});
|
|
4650
4703
|
return id;
|
|
4651
4704
|
}
|
|
4652
4705
|
async work(queue2, handler, options) {
|
|
4706
|
+
writeDebugLog("queue.worker.register", {
|
|
4707
|
+
queue: queue2,
|
|
4708
|
+
batchSize: options?.batchSize ?? 1,
|
|
4709
|
+
pollInterval: options?.pollInterval ?? null,
|
|
4710
|
+
workerId: this.workerId
|
|
4711
|
+
});
|
|
4653
4712
|
this.workers.set(queue2, {
|
|
4654
4713
|
handler,
|
|
4655
4714
|
options: options || {},
|
|
@@ -4680,7 +4739,17 @@ var SQLiteQueueAdapter = class {
|
|
|
4680
4739
|
processQueue(queue2, worker) {
|
|
4681
4740
|
const batchSize = worker.options.batchSize || 1;
|
|
4682
4741
|
const now = Date.now();
|
|
4742
|
+
const staleBefore = now - getStaleJobTimeoutMs();
|
|
4683
4743
|
const jobs = this.db.transaction(() => {
|
|
4744
|
+
const reapedJobs = this.reapStaleJobs(queue2, now, staleBefore);
|
|
4745
|
+
if (reapedJobs.length > 0) {
|
|
4746
|
+
writeDebugLog("queue.reap_stale", {
|
|
4747
|
+
queue: queue2,
|
|
4748
|
+
workerId: this.workerId,
|
|
4749
|
+
staleBefore,
|
|
4750
|
+
jobs: reapedJobs
|
|
4751
|
+
});
|
|
4752
|
+
}
|
|
4684
4753
|
const candidates = this.db.prepare(`
|
|
4685
4754
|
SELECT id, data FROM agx_jobs
|
|
4686
4755
|
WHERE queue = ?
|
|
@@ -4706,6 +4775,11 @@ var SQLiteQueueAdapter = class {
|
|
|
4706
4775
|
}));
|
|
4707
4776
|
})();
|
|
4708
4777
|
if (jobs.length > 0) {
|
|
4778
|
+
writeDebugLog("queue.claim", {
|
|
4779
|
+
queue: queue2,
|
|
4780
|
+
workerId: this.workerId,
|
|
4781
|
+
jobIds: jobs.map((job) => job.id)
|
|
4782
|
+
});
|
|
4709
4783
|
this.executeJobs(jobs, worker.handler);
|
|
4710
4784
|
}
|
|
4711
4785
|
}
|
|
@@ -4713,15 +4787,22 @@ var SQLiteQueueAdapter = class {
|
|
|
4713
4787
|
try {
|
|
4714
4788
|
await handler(jobs);
|
|
4715
4789
|
this.completeJobs(jobs.map((j) => j.id));
|
|
4790
|
+
writeDebugLog("queue.complete", {
|
|
4791
|
+
jobIds: jobs.map((job) => job.id)
|
|
4792
|
+
});
|
|
4716
4793
|
} catch (err) {
|
|
4717
4794
|
this.failJobs(jobs.map((j) => j.id), err.message || String(err));
|
|
4795
|
+
writeDebugLog("queue.fail", {
|
|
4796
|
+
jobIds: jobs.map((job) => job.id),
|
|
4797
|
+
error: err
|
|
4798
|
+
});
|
|
4718
4799
|
}
|
|
4719
4800
|
}
|
|
4720
4801
|
completeJobs(ids) {
|
|
4721
4802
|
const now = Date.now();
|
|
4722
4803
|
const stmt = this.db.prepare(`
|
|
4723
4804
|
UPDATE agx_jobs
|
|
4724
|
-
SET status = 'completed', completed_at =
|
|
4805
|
+
SET status = 'completed', completed_at = ?, worker_id = NULL
|
|
4725
4806
|
WHERE id = ?
|
|
4726
4807
|
`);
|
|
4727
4808
|
this.db.transaction(() => {
|
|
@@ -4737,12 +4818,14 @@ var SQLiteQueueAdapter = class {
|
|
|
4737
4818
|
UPDATE agx_jobs
|
|
4738
4819
|
SET status = 'retry', retry_count = retry_count + 1,
|
|
4739
4820
|
start_after = ? + (retry_count * 1000 * 2), -- Exponential backoff (kinda)
|
|
4821
|
+
started_at = NULL,
|
|
4822
|
+
worker_id = NULL,
|
|
4740
4823
|
error = ?
|
|
4741
4824
|
WHERE id = ?
|
|
4742
4825
|
`);
|
|
4743
4826
|
const updateFailed = this.db.prepare(`
|
|
4744
4827
|
UPDATE agx_jobs
|
|
4745
|
-
SET status = 'failed', failed_at = ?, error = ?
|
|
4828
|
+
SET status = 'failed', failed_at = ?, started_at = NULL, worker_id = NULL, error = ?
|
|
4746
4829
|
WHERE id = ?
|
|
4747
4830
|
`);
|
|
4748
4831
|
this.db.transaction(() => {
|
|
@@ -4757,6 +4840,59 @@ var SQLiteQueueAdapter = class {
|
|
|
4757
4840
|
}
|
|
4758
4841
|
})();
|
|
4759
4842
|
}
|
|
4843
|
+
reapStaleJobs(queue2, now, staleBefore) {
|
|
4844
|
+
const staleJobs = this.db.prepare(`
|
|
4845
|
+
SELECT id, retry_count, retry_limit
|
|
4846
|
+
FROM agx_jobs
|
|
4847
|
+
WHERE queue = ?
|
|
4848
|
+
AND status = 'active'
|
|
4849
|
+
AND started_at IS NOT NULL
|
|
4850
|
+
AND started_at <= ?
|
|
4851
|
+
ORDER BY started_at ASC
|
|
4852
|
+
`).all(queue2, staleBefore);
|
|
4853
|
+
if (staleJobs.length === 0) return [];
|
|
4854
|
+
const updateRetry = this.db.prepare(`
|
|
4855
|
+
UPDATE agx_jobs
|
|
4856
|
+
SET status = 'retry',
|
|
4857
|
+
retry_count = retry_count + 1,
|
|
4858
|
+
start_after = ?,
|
|
4859
|
+
started_at = NULL,
|
|
4860
|
+
worker_id = NULL,
|
|
4861
|
+
error = ?
|
|
4862
|
+
WHERE id = ?
|
|
4863
|
+
`);
|
|
4864
|
+
const updateFailed = this.db.prepare(`
|
|
4865
|
+
UPDATE agx_jobs
|
|
4866
|
+
SET status = 'failed',
|
|
4867
|
+
failed_at = ?,
|
|
4868
|
+
started_at = NULL,
|
|
4869
|
+
worker_id = NULL,
|
|
4870
|
+
error = ?
|
|
4871
|
+
WHERE id = ?
|
|
4872
|
+
`);
|
|
4873
|
+
const reaped = [];
|
|
4874
|
+
for (const job of staleJobs) {
|
|
4875
|
+
const error = `Job exceeded active timeout of ${getStaleJobTimeoutMs()}ms`;
|
|
4876
|
+
if (job.retry_count < job.retry_limit) {
|
|
4877
|
+
updateRetry.run(now, error, job.id);
|
|
4878
|
+
reaped.push({
|
|
4879
|
+
id: job.id,
|
|
4880
|
+
fromStatus: "active",
|
|
4881
|
+
toStatus: "retry",
|
|
4882
|
+
retryCount: job.retry_count + 1
|
|
4883
|
+
});
|
|
4884
|
+
} else {
|
|
4885
|
+
updateFailed.run(now, error, job.id);
|
|
4886
|
+
reaped.push({
|
|
4887
|
+
id: job.id,
|
|
4888
|
+
fromStatus: "active",
|
|
4889
|
+
toStatus: "failed",
|
|
4890
|
+
retryCount: job.retry_count
|
|
4891
|
+
});
|
|
4892
|
+
}
|
|
4893
|
+
}
|
|
4894
|
+
return reaped;
|
|
4895
|
+
}
|
|
4760
4896
|
};
|
|
4761
4897
|
|
|
4762
4898
|
// ../agx-cloud/lib/queue/boss.ts
|
|
@@ -5018,6 +5154,8 @@ var import_crypto4 = require("crypto");
|
|
|
5018
5154
|
|
|
5019
5155
|
// ../agx-cloud/lib/cli-runner.ts
|
|
5020
5156
|
var import_child_process = require("child_process");
|
|
5157
|
+
var import_fs10 = __toESM(require("fs"));
|
|
5158
|
+
var import_path10 = __toESM(require("path"));
|
|
5021
5159
|
|
|
5022
5160
|
// ../agx-cloud/lib/sanitize.ts
|
|
5023
5161
|
function createCliChunkSanitizer() {
|
|
@@ -5296,15 +5434,177 @@ var createThoughtFilterParser = (inner) => {
|
|
|
5296
5434
|
}
|
|
5297
5435
|
};
|
|
5298
5436
|
};
|
|
5437
|
+
var AGX_WRAPPED_PROVIDERS = /* @__PURE__ */ new Set([
|
|
5438
|
+
"claude",
|
|
5439
|
+
"gemini",
|
|
5440
|
+
"ollama",
|
|
5441
|
+
"codex"
|
|
5442
|
+
]);
|
|
5443
|
+
function providerNativeCommand({
|
|
5444
|
+
provider,
|
|
5445
|
+
model,
|
|
5446
|
+
prompt,
|
|
5447
|
+
systemPrompt
|
|
5448
|
+
}) {
|
|
5449
|
+
switch (provider) {
|
|
5450
|
+
case "claude": {
|
|
5451
|
+
const args = [
|
|
5452
|
+
"-p",
|
|
5453
|
+
"--verbose",
|
|
5454
|
+
"--output-format",
|
|
5455
|
+
"stream-json",
|
|
5456
|
+
"--include-partial-messages"
|
|
5457
|
+
];
|
|
5458
|
+
if (model) args.push("--model", model);
|
|
5459
|
+
if (systemPrompt) args.push("--system-prompt", systemPrompt);
|
|
5460
|
+
args.push(prompt);
|
|
5461
|
+
return { command: "claude", args, parser: "claude-stream-json" };
|
|
5462
|
+
}
|
|
5463
|
+
case "gemini":
|
|
5464
|
+
return {
|
|
5465
|
+
command: "gemini",
|
|
5466
|
+
args: ["--yolo", "-p", systemPrompt ? `${systemPrompt}
|
|
5467
|
+
|
|
5468
|
+
${prompt}` : prompt, "-o", "stream-json"],
|
|
5469
|
+
parser: "gemini-stream-json"
|
|
5470
|
+
};
|
|
5471
|
+
case "ollama":
|
|
5472
|
+
return {
|
|
5473
|
+
command: "ollama",
|
|
5474
|
+
args: ["run", model || "llama3.2", systemPrompt ? `${systemPrompt}
|
|
5475
|
+
|
|
5476
|
+
${prompt}` : prompt],
|
|
5477
|
+
parser: "raw"
|
|
5478
|
+
};
|
|
5479
|
+
case "codex": {
|
|
5480
|
+
const codexArgs = ["exec", "--json"];
|
|
5481
|
+
if (model) codexArgs.push("--model", model);
|
|
5482
|
+
codexArgs.push(systemPrompt ? `${systemPrompt}
|
|
5483
|
+
|
|
5484
|
+
${prompt}` : prompt);
|
|
5485
|
+
return {
|
|
5486
|
+
command: "codex",
|
|
5487
|
+
args: codexArgs,
|
|
5488
|
+
parser: "codex-json"
|
|
5489
|
+
};
|
|
5490
|
+
}
|
|
5491
|
+
case "zai": {
|
|
5492
|
+
const zaiApiKey = process.env.ZAI_API_KEY?.trim();
|
|
5493
|
+
const zaiArgs = [
|
|
5494
|
+
"-p",
|
|
5495
|
+
"--verbose",
|
|
5496
|
+
"--output-format",
|
|
5497
|
+
"stream-json",
|
|
5498
|
+
"--include-partial-messages"
|
|
5499
|
+
];
|
|
5500
|
+
if (model) zaiArgs.push("--model", model);
|
|
5501
|
+
if (systemPrompt) zaiArgs.push("--system-prompt", systemPrompt);
|
|
5502
|
+
zaiArgs.push(prompt);
|
|
5503
|
+
return {
|
|
5504
|
+
command: "claude",
|
|
5505
|
+
args: zaiArgs,
|
|
5506
|
+
parser: "claude-stream-json",
|
|
5507
|
+
env: {
|
|
5508
|
+
ANTHROPIC_BASE_URL: "https://api.z.ai/api/anthropic",
|
|
5509
|
+
...zaiApiKey ? { ANTHROPIC_AUTH_TOKEN: zaiApiKey } : {}
|
|
5510
|
+
}
|
|
5511
|
+
};
|
|
5512
|
+
}
|
|
5513
|
+
default:
|
|
5514
|
+
return null;
|
|
5515
|
+
}
|
|
5516
|
+
}
|
|
5299
5517
|
function agxCommandForProvider({
|
|
5300
5518
|
provider,
|
|
5301
5519
|
model,
|
|
5302
|
-
prompt
|
|
5520
|
+
prompt,
|
|
5521
|
+
passthroughArgs
|
|
5303
5522
|
}) {
|
|
5304
5523
|
const args = [provider, "-y", "--print", "--prompt", prompt];
|
|
5305
5524
|
if (model) args.push("--model", model);
|
|
5525
|
+
if (passthroughArgs && passthroughArgs.length > 0) {
|
|
5526
|
+
args.push("--", ...passthroughArgs);
|
|
5527
|
+
}
|
|
5306
5528
|
return { command: "agx", args, parser: "raw" };
|
|
5307
5529
|
}
|
|
5530
|
+
function resolveBundledCliPath() {
|
|
5531
|
+
const explicit = process.env.AGX_CLI_PATH?.trim();
|
|
5532
|
+
if (explicit && import_fs10.default.existsSync(explicit)) return explicit;
|
|
5533
|
+
const candidates = [
|
|
5534
|
+
import_path10.default.resolve(process.cwd(), "..", "cli", "index.js"),
|
|
5535
|
+
import_path10.default.resolve(__dirname, "..", "cli", "index.js"),
|
|
5536
|
+
import_path10.default.resolve(process.execPath, "..", "..", "Resources", "cli", "index.js")
|
|
5537
|
+
];
|
|
5538
|
+
for (const candidate of candidates) {
|
|
5539
|
+
if (import_fs10.default.existsSync(candidate)) {
|
|
5540
|
+
return candidate;
|
|
5541
|
+
}
|
|
5542
|
+
}
|
|
5543
|
+
return null;
|
|
5544
|
+
}
|
|
5545
|
+
function buildCliAttempts({
|
|
5546
|
+
provider,
|
|
5547
|
+
model,
|
|
5548
|
+
prompt,
|
|
5549
|
+
systemPrompt,
|
|
5550
|
+
passthroughArgs
|
|
5551
|
+
}, deps = {}) {
|
|
5552
|
+
const exists = deps.commandExists ?? commandExists;
|
|
5553
|
+
const bundledCliPath = deps.bundledCliPath === void 0 ? resolveBundledCliPath() : deps.bundledCliPath;
|
|
5554
|
+
const attempts = [];
|
|
5555
|
+
const agxPrompt = systemPrompt ? `${systemPrompt}
|
|
5556
|
+
|
|
5557
|
+
${prompt}` : prompt;
|
|
5558
|
+
if (AGX_WRAPPED_PROVIDERS.has(provider)) {
|
|
5559
|
+
const bundledAgx = bundledAgxCommandForProvider({
|
|
5560
|
+
provider,
|
|
5561
|
+
model,
|
|
5562
|
+
prompt: agxPrompt,
|
|
5563
|
+
cliPath: bundledCliPath,
|
|
5564
|
+
passthroughArgs
|
|
5565
|
+
});
|
|
5566
|
+
if (bundledAgx) {
|
|
5567
|
+
attempts.push(bundledAgx);
|
|
5568
|
+
}
|
|
5569
|
+
if (exists("agx")) {
|
|
5570
|
+
attempts.push(
|
|
5571
|
+
agxCommandForProvider({
|
|
5572
|
+
provider,
|
|
5573
|
+
model,
|
|
5574
|
+
prompt: agxPrompt,
|
|
5575
|
+
passthroughArgs
|
|
5576
|
+
})
|
|
5577
|
+
);
|
|
5578
|
+
}
|
|
5579
|
+
return attempts;
|
|
5580
|
+
}
|
|
5581
|
+
const nativeAttempt = providerNativeCommand({
|
|
5582
|
+
provider,
|
|
5583
|
+
model,
|
|
5584
|
+
prompt,
|
|
5585
|
+
systemPrompt
|
|
5586
|
+
});
|
|
5587
|
+
if (nativeAttempt && exists(nativeAttempt.command)) {
|
|
5588
|
+
attempts.push(nativeAttempt);
|
|
5589
|
+
}
|
|
5590
|
+
return attempts;
|
|
5591
|
+
}
|
|
5592
|
+
function bundledAgxCommandForProvider({
|
|
5593
|
+
provider,
|
|
5594
|
+
model,
|
|
5595
|
+
prompt,
|
|
5596
|
+
cliPath,
|
|
5597
|
+
passthroughArgs
|
|
5598
|
+
}) {
|
|
5599
|
+
const resolvedCliPath = cliPath === void 0 ? resolveBundledCliPath() : cliPath;
|
|
5600
|
+
if (!resolvedCliPath) return null;
|
|
5601
|
+
const args = [resolvedCliPath, provider, "-y", "--print", "--prompt", prompt];
|
|
5602
|
+
if (model) args.push("--model", model);
|
|
5603
|
+
if (passthroughArgs && passthroughArgs.length > 0) {
|
|
5604
|
+
args.push("--", ...passthroughArgs);
|
|
5605
|
+
}
|
|
5606
|
+
return { command: process.execPath, args, parser: "raw" };
|
|
5607
|
+
}
|
|
5308
5608
|
async function runCommandStreamed({
|
|
5309
5609
|
command,
|
|
5310
5610
|
args,
|
|
@@ -5316,6 +5616,13 @@ async function runCommandStreamed({
|
|
|
5316
5616
|
env: extraEnv
|
|
5317
5617
|
}) {
|
|
5318
5618
|
await new Promise((resolve, reject) => {
|
|
5619
|
+
writeDebugLog("cli-runner.spawn", {
|
|
5620
|
+
command,
|
|
5621
|
+
args,
|
|
5622
|
+
timeoutMs,
|
|
5623
|
+
bundledCliPath: resolveBundledCliPath(),
|
|
5624
|
+
isElectron: process.env.AGX_ELECTRON || null
|
|
5625
|
+
});
|
|
5319
5626
|
if (onLog) onLog("stderr", `$ ${command} ${args.map((a) => a.length > 80 ? a.slice(0, 80) + "\u2026" : a).join(" ")}
|
|
5320
5627
|
`);
|
|
5321
5628
|
const child = (0, import_child_process.spawn)(command, args, {
|
|
@@ -5334,13 +5641,29 @@ async function runCommandStreamed({
|
|
|
5334
5641
|
else resolve();
|
|
5335
5642
|
};
|
|
5336
5643
|
const onAbort = () => {
|
|
5644
|
+
writeDebugLog("cli-runner.abort", {
|
|
5645
|
+
command,
|
|
5646
|
+
args,
|
|
5647
|
+
pid: child.pid ?? null
|
|
5648
|
+
});
|
|
5337
5649
|
child.kill("SIGTERM");
|
|
5338
5650
|
finalize(new Error("Chat request aborted."));
|
|
5339
5651
|
};
|
|
5340
5652
|
if (signal) signal.addEventListener("abort", onAbort, { once: true });
|
|
5341
5653
|
if (onSpawn && child.pid) onSpawn(child.pid);
|
|
5654
|
+
writeDebugLog("cli-runner.spawned", {
|
|
5655
|
+
command,
|
|
5656
|
+
args,
|
|
5657
|
+
pid: child.pid ?? null
|
|
5658
|
+
});
|
|
5342
5659
|
const timer = setTimeout(() => {
|
|
5343
5660
|
timedOut = true;
|
|
5661
|
+
writeDebugLog("cli-runner.timeout", {
|
|
5662
|
+
command,
|
|
5663
|
+
args,
|
|
5664
|
+
pid: child.pid ?? null,
|
|
5665
|
+
timeoutMs
|
|
5666
|
+
});
|
|
5344
5667
|
child.kill("SIGKILL");
|
|
5345
5668
|
finalize(new Error(`CLI request timed out after ${timeoutMs}ms.`));
|
|
5346
5669
|
}, timeoutMs);
|
|
@@ -5355,9 +5678,24 @@ async function runCommandStreamed({
|
|
|
5355
5678
|
combinedOutput += str;
|
|
5356
5679
|
if (onLog) onLog("stderr", str);
|
|
5357
5680
|
});
|
|
5358
|
-
child.on("error", (error) =>
|
|
5681
|
+
child.on("error", (error) => {
|
|
5682
|
+
writeDebugLog("cli-runner.process_error", {
|
|
5683
|
+
command,
|
|
5684
|
+
args,
|
|
5685
|
+
pid: child.pid ?? null,
|
|
5686
|
+
error
|
|
5687
|
+
});
|
|
5688
|
+
finalize(error);
|
|
5689
|
+
});
|
|
5359
5690
|
child.on("close", (code, childSignal) => {
|
|
5360
5691
|
if (done || timedOut) return;
|
|
5692
|
+
writeDebugLog("cli-runner.close", {
|
|
5693
|
+
command,
|
|
5694
|
+
args,
|
|
5695
|
+
pid: child.pid ?? null,
|
|
5696
|
+
code: code ?? null,
|
|
5697
|
+
signal: childSignal ?? null
|
|
5698
|
+
});
|
|
5361
5699
|
if (code === 0) {
|
|
5362
5700
|
finalize();
|
|
5363
5701
|
return;
|
|
@@ -5378,6 +5716,7 @@ async function runCliResponse({
|
|
|
5378
5716
|
self,
|
|
5379
5717
|
skills,
|
|
5380
5718
|
systemContext,
|
|
5719
|
+
passthroughArgs,
|
|
5381
5720
|
signal,
|
|
5382
5721
|
onDelta,
|
|
5383
5722
|
onLog,
|
|
@@ -5389,7 +5728,6 @@ async function runCliResponse({
|
|
|
5389
5728
|
const cleaned = sanitize(chunk);
|
|
5390
5729
|
if (cleaned) onDelta(cleaned);
|
|
5391
5730
|
};
|
|
5392
|
-
const attempts = [];
|
|
5393
5731
|
const systemParts = [];
|
|
5394
5732
|
if (systemContext) systemParts.push(systemContext);
|
|
5395
5733
|
if (identity) systemParts.push(`<identity>
|
|
@@ -5402,19 +5740,33 @@ ${self}
|
|
|
5402
5740
|
${skills}
|
|
5403
5741
|
</skills>`);
|
|
5404
5742
|
const systemPrompt = systemParts.length > 0 ? systemParts.join("\n\n") : void 0;
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5743
|
+
const attempts = buildCliAttempts({
|
|
5744
|
+
provider,
|
|
5745
|
+
model,
|
|
5746
|
+
prompt,
|
|
5747
|
+
systemPrompt,
|
|
5748
|
+
passthroughArgs
|
|
5749
|
+
});
|
|
5411
5750
|
if (attempts.length === 0) {
|
|
5751
|
+
writeDebugLog("cli-runner.no_attempts", {
|
|
5752
|
+
provider,
|
|
5753
|
+
model,
|
|
5754
|
+
bundledCliPath: resolveBundledCliPath(),
|
|
5755
|
+
isElectron: process.env.AGX_ELECTRON || null
|
|
5756
|
+
});
|
|
5412
5757
|
throw new Error(
|
|
5413
5758
|
`No CLI runner available for provider "${provider}". Install agx or provider CLI.`
|
|
5414
5759
|
);
|
|
5415
5760
|
}
|
|
5416
5761
|
let lastError = null;
|
|
5417
5762
|
for (const attempt of attempts) {
|
|
5763
|
+
writeDebugLog("cli-runner.attempt", {
|
|
5764
|
+
provider,
|
|
5765
|
+
model,
|
|
5766
|
+
command: attempt.command,
|
|
5767
|
+
args: attempt.args,
|
|
5768
|
+
parser: attempt.parser
|
|
5769
|
+
});
|
|
5418
5770
|
const baseParser = attempt.parser === "claude-stream-json" ? createClaudeStreamJsonParser(wrappedOnDelta) : attempt.parser === "codex-json" ? createCodexJsonParser(wrappedOnDelta) : attempt.parser === "gemini-stream-json" ? createGeminiStreamJsonParser(wrappedOnDelta) : createRawParser(wrappedOnDelta);
|
|
5419
5771
|
const parser = attempt.filterThoughts ? createThoughtFilterParser(baseParser) : baseParser;
|
|
5420
5772
|
try {
|
|
@@ -5429,9 +5781,20 @@ ${prompt}` : prompt;
|
|
|
5429
5781
|
env: attempt.env
|
|
5430
5782
|
});
|
|
5431
5783
|
parser.flush();
|
|
5784
|
+
writeDebugLog("cli-runner.success", {
|
|
5785
|
+
provider,
|
|
5786
|
+
model,
|
|
5787
|
+
command: attempt.command
|
|
5788
|
+
});
|
|
5432
5789
|
return;
|
|
5433
5790
|
} catch (error) {
|
|
5434
5791
|
lastError = error instanceof Error ? error : new Error(String(error));
|
|
5792
|
+
writeDebugLog("cli-runner.failure", {
|
|
5793
|
+
provider,
|
|
5794
|
+
model,
|
|
5795
|
+
command: attempt.command,
|
|
5796
|
+
error: lastError
|
|
5797
|
+
});
|
|
5435
5798
|
}
|
|
5436
5799
|
}
|
|
5437
5800
|
throw lastError || new Error("CLI execution failed.");
|
|
@@ -6497,11 +6860,11 @@ var import_promises = require("fs/promises");
|
|
|
6497
6860
|
|
|
6498
6861
|
// ../agx-cloud/lib/agent-process-registry.ts
|
|
6499
6862
|
var import_better_sqlite34 = __toESM(require_lib());
|
|
6500
|
-
var
|
|
6501
|
-
var
|
|
6502
|
-
var
|
|
6503
|
-
var HISTORY_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() ||
|
|
6504
|
-
var DB_PATH2 =
|
|
6863
|
+
var import_path11 = __toESM(require("path"));
|
|
6864
|
+
var import_os10 = __toESM(require("os"));
|
|
6865
|
+
var import_fs11 = require("fs");
|
|
6866
|
+
var HISTORY_DIR = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path11.default.join(import_os10.default.homedir(), ".agx", "group-chat");
|
|
6867
|
+
var DB_PATH2 = import_path11.default.join(HISTORY_DIR, "history.sqlite");
|
|
6505
6868
|
function toEntry(row) {
|
|
6506
6869
|
return {
|
|
6507
6870
|
id: row.id,
|
|
@@ -6518,7 +6881,7 @@ function toEntry(row) {
|
|
|
6518
6881
|
};
|
|
6519
6882
|
}
|
|
6520
6883
|
function getDb2() {
|
|
6521
|
-
(0,
|
|
6884
|
+
(0, import_fs11.mkdirSync)(HISTORY_DIR, { recursive: true });
|
|
6522
6885
|
const db2 = new import_better_sqlite34.default(DB_PATH2);
|
|
6523
6886
|
db2.pragma("journal_mode = WAL");
|
|
6524
6887
|
db2.exec(`
|
|
@@ -6673,11 +7036,11 @@ function killByWorkspace(workspaceId) {
|
|
|
6673
7036
|
|
|
6674
7037
|
// ../agx-cloud/lib/history-store.ts
|
|
6675
7038
|
var import_better_sqlite35 = __toESM(require_lib());
|
|
6676
|
-
var
|
|
6677
|
-
var
|
|
6678
|
-
var
|
|
6679
|
-
var HISTORY_DIR2 = process.env.AGX_GROUP_CHAT_DIR?.trim() ||
|
|
6680
|
-
var DB_PATH3 =
|
|
7039
|
+
var import_fs12 = require("fs");
|
|
7040
|
+
var import_path12 = __toESM(require("path"));
|
|
7041
|
+
var import_os11 = __toESM(require("os"));
|
|
7042
|
+
var HISTORY_DIR2 = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path12.default.join(import_os11.default.homedir(), ".agx", "group-chat");
|
|
7043
|
+
var DB_PATH3 = import_path12.default.join(HISTORY_DIR2, "history.sqlite");
|
|
6681
7044
|
var LEGACY_THREAD_ID = "global";
|
|
6682
7045
|
var REACTION_TYPES = /* @__PURE__ */ new Set([
|
|
6683
7046
|
"ack",
|
|
@@ -6686,6 +7049,8 @@ var REACTION_TYPES = /* @__PURE__ */ new Set([
|
|
|
6686
7049
|
"clarify",
|
|
6687
7050
|
"blocked"
|
|
6688
7051
|
]);
|
|
7052
|
+
var ACTIVE_AGENT_PROCESS_STALE_MS = 10 * 60 * 1e3;
|
|
7053
|
+
var ACTIVE_CHAT_RUN_STALE_MS = 10 * 60 * 1e3;
|
|
6689
7054
|
var ALLOWED_TRANSITIONS = {
|
|
6690
7055
|
ack: /* @__PURE__ */ new Set(["ack", "working"]),
|
|
6691
7056
|
working: /* @__PURE__ */ new Set(["ack", "working", "done", "clarify", "blocked"]),
|
|
@@ -6906,7 +7271,7 @@ function migrateLegacyTables(db2) {
|
|
|
6906
7271
|
migrateLogsToAgentProcessId(db2);
|
|
6907
7272
|
}
|
|
6908
7273
|
var withDatabase = async (run) => {
|
|
6909
|
-
await
|
|
7274
|
+
await import_fs12.promises.mkdir(HISTORY_DIR2, { recursive: true });
|
|
6910
7275
|
const db2 = new import_better_sqlite35.default(DB_PATH3);
|
|
6911
7276
|
db2.pragma("journal_mode = WAL");
|
|
6912
7277
|
try {
|
|
@@ -7088,7 +7453,31 @@ async function saveMessages(threadId, messages) {
|
|
|
7088
7453
|
insertMany(messages);
|
|
7089
7454
|
});
|
|
7090
7455
|
}
|
|
7456
|
+
async function sweepStaleChatRuns(input) {
|
|
7457
|
+
const normalizedThreadId = normalizeOptionalText(input?.threadId ?? null);
|
|
7458
|
+
const thresholdMs = Number.isFinite(input?.olderThanMs) ? Math.max(input.olderThanMs, 1) : ACTIVE_CHAT_RUN_STALE_MS;
|
|
7459
|
+
const now = Date.now();
|
|
7460
|
+
const cutoff = now - thresholdMs;
|
|
7461
|
+
return withDatabase((db2) => {
|
|
7462
|
+
const clauses = ["status = 'running'", "updated_at <= ?"];
|
|
7463
|
+
const params = [cutoff];
|
|
7464
|
+
if (normalizedThreadId) {
|
|
7465
|
+
clauses.push("thread_id = ?");
|
|
7466
|
+
params.push(normalizedThreadId);
|
|
7467
|
+
}
|
|
7468
|
+
const result = db2.prepare(
|
|
7469
|
+
`UPDATE chat_runs
|
|
7470
|
+
SET status = 'failed',
|
|
7471
|
+
last_error = COALESCE(NULLIF(last_error, ''), 'Worker process died mid-execution'),
|
|
7472
|
+
updated_at = ?,
|
|
7473
|
+
completed_at = COALESCE(completed_at, ?)
|
|
7474
|
+
WHERE ${clauses.join(" AND ")}`
|
|
7475
|
+
).run(now, now, ...params);
|
|
7476
|
+
return result.changes;
|
|
7477
|
+
});
|
|
7478
|
+
}
|
|
7091
7479
|
async function getChatRun(chatRunId) {
|
|
7480
|
+
await sweepStaleChatRuns();
|
|
7092
7481
|
return withDatabase((db2) => {
|
|
7093
7482
|
const row = db2.prepare("SELECT * FROM chat_runs WHERE id = ? LIMIT 1").get(chatRunId);
|
|
7094
7483
|
return row ? toChatRunRecord(row) : null;
|
|
@@ -7336,11 +7725,11 @@ function parseReactionSignals(content) {
|
|
|
7336
7725
|
|
|
7337
7726
|
// ../agx-cloud/lib/attachment-store.ts
|
|
7338
7727
|
var import_better_sqlite36 = __toESM(require_lib());
|
|
7339
|
-
var
|
|
7340
|
-
var
|
|
7341
|
-
var HISTORY_DIR3 = process.env.AGX_GROUP_CHAT_DIR?.trim() ||
|
|
7342
|
-
var DB_PATH4 =
|
|
7343
|
-
var UPLOADS_DIR =
|
|
7728
|
+
var import_path13 = __toESM(require("path"));
|
|
7729
|
+
var import_os12 = __toESM(require("os"));
|
|
7730
|
+
var HISTORY_DIR3 = process.env.AGX_GROUP_CHAT_DIR?.trim() || import_path13.default.join(import_os12.default.homedir(), ".agx", "group-chat");
|
|
7731
|
+
var DB_PATH4 = import_path13.default.join(HISTORY_DIR3, "history.sqlite");
|
|
7732
|
+
var UPLOADS_DIR = import_path13.default.join(HISTORY_DIR3, "uploads");
|
|
7344
7733
|
function getDb3() {
|
|
7345
7734
|
const db2 = new import_better_sqlite36.default(DB_PATH4);
|
|
7346
7735
|
db2.pragma("journal_mode = WAL");
|
|
@@ -7380,7 +7769,7 @@ async function getAttachmentMeta(id) {
|
|
|
7380
7769
|
).get(id);
|
|
7381
7770
|
if (!row) return null;
|
|
7382
7771
|
const diskName = row.disk_name || id;
|
|
7383
|
-
return { filename: row.filename, mimeType: row.mime_type, size: row.size, diskPath:
|
|
7772
|
+
return { filename: row.filename, mimeType: row.mime_type, size: row.size, diskPath: import_path13.default.join(UPLOADS_DIR, diskName) };
|
|
7384
7773
|
} finally {
|
|
7385
7774
|
db2.close();
|
|
7386
7775
|
}
|
|
@@ -7393,18 +7782,18 @@ init_journal();
|
|
|
7393
7782
|
init_agent();
|
|
7394
7783
|
|
|
7395
7784
|
// ../agx-cloud/lib/mesh-core/reactions.ts
|
|
7396
|
-
var
|
|
7397
|
-
var
|
|
7398
|
-
var
|
|
7785
|
+
var import_fs13 = require("fs");
|
|
7786
|
+
var import_path14 = require("path");
|
|
7787
|
+
var import_os13 = require("os");
|
|
7399
7788
|
init_journal();
|
|
7400
7789
|
init_activity();
|
|
7401
|
-
var AGENTS_DIR6 = (0,
|
|
7790
|
+
var AGENTS_DIR6 = (0, import_path14.join)((0, import_os13.homedir)(), ".agx", "agents");
|
|
7402
7791
|
function reactionsPath(agentId) {
|
|
7403
|
-
return (0,
|
|
7792
|
+
return (0, import_path14.join)(AGENTS_DIR6, agentId, "reactions.jsonl");
|
|
7404
7793
|
}
|
|
7405
7794
|
function ensureDir2(agentId) {
|
|
7406
|
-
const dir = (0,
|
|
7407
|
-
if (!(0,
|
|
7795
|
+
const dir = (0, import_path14.join)(AGENTS_DIR6, agentId);
|
|
7796
|
+
if (!(0, import_fs13.existsSync)(dir)) (0, import_fs13.mkdirSync)(dir, { recursive: true });
|
|
7408
7797
|
}
|
|
7409
7798
|
function targetEntryExists(targetEntry) {
|
|
7410
7799
|
const [targetAgent] = targetEntry.split(":");
|
|
@@ -7423,7 +7812,7 @@ function appendReaction(agentId, targetEntry, type) {
|
|
|
7423
7812
|
targetEntry,
|
|
7424
7813
|
type
|
|
7425
7814
|
};
|
|
7426
|
-
(0,
|
|
7815
|
+
(0, import_fs13.appendFileSync)(reactionsPath(agentId), JSON.stringify(reaction) + "\n", "utf-8");
|
|
7427
7816
|
logActivity(agentId, "mesh-reaction", { meta: { target: targetEntry, type } });
|
|
7428
7817
|
}
|
|
7429
7818
|
|
|
@@ -8501,15 +8890,31 @@ function isChatRunPayload(value) {
|
|
|
8501
8890
|
);
|
|
8502
8891
|
}
|
|
8503
8892
|
async function handleStart2(job) {
|
|
8893
|
+
writeDebugLog("chat-processor.start.received", {
|
|
8894
|
+
jobId: job.id,
|
|
8895
|
+
chatRunId: job.data.chatRunId,
|
|
8896
|
+
signal: job.data.signal
|
|
8897
|
+
});
|
|
8504
8898
|
const chatRun = await loadChatRunActivity(job.data.chatRunId);
|
|
8505
8899
|
if (!chatRun) {
|
|
8900
|
+
writeDebugLog("chat-processor.start.missing", {
|
|
8901
|
+
chatRunId: job.data.chatRunId,
|
|
8902
|
+
jobId: job.id
|
|
8903
|
+
});
|
|
8506
8904
|
console.warn(`[chat-processor] Chat run ${job.data.chatRunId} not found, skipping`);
|
|
8507
8905
|
return;
|
|
8508
8906
|
}
|
|
8509
8907
|
if (chatRun.status === "completed" || chatRun.status === "failed" || chatRun.status === "cancelled") {
|
|
8908
|
+
writeDebugLog("chat-processor.start.skip_terminal", {
|
|
8909
|
+
chatRunId: chatRun.id,
|
|
8910
|
+
status: chatRun.status
|
|
8911
|
+
});
|
|
8510
8912
|
return;
|
|
8511
8913
|
}
|
|
8512
8914
|
if (!isChatRunPayload(chatRun.payload)) {
|
|
8915
|
+
writeDebugLog("chat-processor.start.invalid_payload", {
|
|
8916
|
+
chatRunId: chatRun.id
|
|
8917
|
+
});
|
|
8513
8918
|
await updateChatRunActivity({
|
|
8514
8919
|
id: chatRun.id,
|
|
8515
8920
|
status: "failed",
|
|
@@ -8536,10 +8941,20 @@ async function handleStart2(job) {
|
|
|
8536
8941
|
lastError: null
|
|
8537
8942
|
});
|
|
8538
8943
|
try {
|
|
8944
|
+
writeDebugLog("chat-processor.start.running", {
|
|
8945
|
+
chatRunId: chatRun.id,
|
|
8946
|
+
threadId: chatRun.threadId,
|
|
8947
|
+
rootMessageId: chatRun.rootMessageId,
|
|
8948
|
+
participantIds: chatRun.payload.participantIds
|
|
8949
|
+
});
|
|
8539
8950
|
const library = await loadDbParticipants();
|
|
8540
8951
|
const participantIdSet = new Set(chatRun.payload.participantIds);
|
|
8541
8952
|
const participants = chatRun.payload.participantIds.map((participantId) => library.find((participant) => participant.id === participantId)).filter((participant) => Boolean(participant));
|
|
8542
8953
|
if (participants.length === 0) {
|
|
8954
|
+
writeDebugLog("chat-processor.start.no_participants_resolved", {
|
|
8955
|
+
chatRunId: chatRun.id,
|
|
8956
|
+
participantIds: chatRun.payload.participantIds
|
|
8957
|
+
});
|
|
8543
8958
|
throw new Error("No participants resolved for chat run");
|
|
8544
8959
|
}
|
|
8545
8960
|
const mentioned = new Set(
|
|
@@ -8561,10 +8976,17 @@ async function handleStart2(job) {
|
|
|
8561
8976
|
rootMessageId: chatRun.payload.rootMessageId
|
|
8562
8977
|
});
|
|
8563
8978
|
const reader = stream.getReader();
|
|
8979
|
+
writeDebugLog("chat-processor.stream.open", {
|
|
8980
|
+
chatRunId: chatRun.id,
|
|
8981
|
+
participantCount: participants.length
|
|
8982
|
+
});
|
|
8564
8983
|
while (true) {
|
|
8565
8984
|
const { done } = await reader.read();
|
|
8566
8985
|
if (done) break;
|
|
8567
8986
|
}
|
|
8987
|
+
writeDebugLog("chat-processor.stream.complete", {
|
|
8988
|
+
chatRunId: chatRun.id
|
|
8989
|
+
});
|
|
8568
8990
|
await completeChatRunStepActivity({
|
|
8569
8991
|
stepId: step.id,
|
|
8570
8992
|
status: "completed",
|
|
@@ -8582,8 +9004,17 @@ async function handleStart2(job) {
|
|
|
8582
9004
|
rootMessageId: chatRun.payload.rootMessageId
|
|
8583
9005
|
}
|
|
8584
9006
|
});
|
|
9007
|
+
writeDebugLog("chat-processor.complete", {
|
|
9008
|
+
chatRunId: chatRun.id,
|
|
9009
|
+
rootMessageId: chatRun.payload.rootMessageId
|
|
9010
|
+
});
|
|
8585
9011
|
} catch (error) {
|
|
8586
9012
|
const message = error instanceof Error ? error.message : String(error);
|
|
9013
|
+
writeDebugLog("chat-processor.error", {
|
|
9014
|
+
chatRunId: chatRun.id,
|
|
9015
|
+
error,
|
|
9016
|
+
message
|
|
9017
|
+
});
|
|
8587
9018
|
await completeChatRunStepActivity({
|
|
8588
9019
|
stepId: step.id,
|
|
8589
9020
|
status: "failed",
|
|
@@ -8599,6 +9030,10 @@ async function handleStart2(job) {
|
|
|
8599
9030
|
}
|
|
8600
9031
|
}
|
|
8601
9032
|
async function handleCancel2(job) {
|
|
9033
|
+
writeDebugLog("chat-processor.cancel.received", {
|
|
9034
|
+
jobId: job.id,
|
|
9035
|
+
chatRunId: job.data.chatRunId
|
|
9036
|
+
});
|
|
8602
9037
|
const chatRun = await loadChatRunActivity(job.data.chatRunId);
|
|
8603
9038
|
if (!chatRun) return;
|
|
8604
9039
|
if (chatRun.rootMessageId) {
|
|
@@ -8613,6 +9048,10 @@ async function handleCancel2(job) {
|
|
|
8613
9048
|
completedAt: Date.now(),
|
|
8614
9049
|
result: { cancelled: true }
|
|
8615
9050
|
});
|
|
9051
|
+
writeDebugLog("chat-processor.cancel.complete", {
|
|
9052
|
+
chatRunId: chatRun.id,
|
|
9053
|
+
threadId: chatRun.threadId
|
|
9054
|
+
});
|
|
8616
9055
|
}
|
|
8617
9056
|
async function processSingleJob2(job) {
|
|
8618
9057
|
switch (job.data.signal) {
|