@mndrk/agx 2.0.42 → 2.0.45
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/.linear-token.json +4 -0
- package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/.next/app-path-routes-manifest.json +12 -2
- package/cloud-runtime/standalone/.next/build-manifest.json +8 -8
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/routes-manifest.json +77 -17
- package/cloud-runtime/standalone/.next/server/app/_global-error/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/_global-error/page.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +7 -7
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/_not-found/page.js +2 -2
- 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 +12 -12
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +8 -8
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- 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/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js +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/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/agents/page.js +2 -2
- 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 +14 -14
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/pull/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +6 -4
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/messages/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +6 -4
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/audit/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +9 -6
- 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 +5 -3
- 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 +10 -7
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/domains/[id]/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/file-read/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/browse/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +5 -2
- 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 +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +6 -4
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/auth/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/cycles/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/mcp-setup/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/[id]/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/runs/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/token/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/logs/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +3 -3
- 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 +3 -3
- 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 +7 -5
- 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 +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +7 -5
- 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 +7 -5
- 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 +5 -3
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +7 -5
- 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 +7 -5
- 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 +7 -5
- 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 +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js +8 -6
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +9 -6
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js +8 -6
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +7 -5
- 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 +10 -8
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +6 -4
- 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 +8 -6
- 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 +9 -6
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/search/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +6 -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 +8 -6
- 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 +7 -5
- 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 +8 -6
- 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 +8 -5
- 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 +9 -6
- 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 +9 -6
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +12 -8
- 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 +7 -5
- 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 +7 -5
- 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 +11 -7
- 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 +13 -9
- 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 +11 -8
- 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 +7 -5
- 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 +3 -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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +7 -5
- 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 +9 -6
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/stream/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +5 -3
- 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 +11 -8
- 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 +11 -8
- 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 +11 -8
- 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 +11 -8
- 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 +11 -8
- 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 +12 -9
- 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 +9 -6
- 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 +7 -5
- 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 +7 -5
- 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 +11 -8
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/thread-export/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +6 -5
- 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 +6 -5
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/upload/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +7 -5
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/userPreferences/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +11 -3
- package/cloud-runtime/standalone/.next/server/app/automations/page.js +2 -2
- 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 +15 -15
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +15 -15
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +8 -8
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/board/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/board/page.js +2 -2
- 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 +12 -12
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +12 -12
- package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +8 -8
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +15 -15
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +8 -8
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/page.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +11 -3
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js +2 -2
- 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/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/build-manifest.json +18 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/next-font-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/react-loadable-manifest.json +10 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js +16 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js +2 -2
- 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/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js +2 -2
- 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/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page.js +2 -2
- 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 +14 -14
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/projects/page.js +2 -2
- 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 +14 -14
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/settings/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/settings/page.js +2 -2
- 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 +14 -14
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/skills/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/skills/page.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +8 -8
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/status/page.js +2 -2
- 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 +14 -14
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js +2 -2
- 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/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/server/app/welcome/page.js +2 -2
- 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 +14 -14
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +14 -14
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +8 -8
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +12 -2
- package/cloud-runtime/standalone/.next/server/chunks/[externals]__31e26905._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[externals]__64355ed1._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[externals]__d6ed3021._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[externals]_node:child_process_261e8bca._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__00fd30c8._.js +39 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0284ea89._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__04c806f4._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c3dd73b._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c4807d1._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0cc3f3b7._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0e98af48._.js +97 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0f6532d7._.js +93 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1154e5b3._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__11c1214e._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__152b2000._.js +61 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__15f3bb96._.js +39 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b96352c._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1dce6c15._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1f53e82e._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20533a2c._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__255b11f2._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__26817611._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__294fceef._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2d776aa6._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__314d5c41._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__352dad6d._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3b1431b6._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3b83b657._.js +147 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3bf516b6._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3fd3c5b1._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42804c1d._.js +110 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42e713f5._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4559476d._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__46947325._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__46ad8e50._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4700e1b3._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__49c04b15._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a4265e0._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4b0b5fe1._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c2d07e0._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c5c536d._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c89c60a._.js +93 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__509b1dd2._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50ddd3ce._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__529a6e1c._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__558389f7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5650bac3._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a1fd688._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5aaf8c25._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5b13e7a5._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5d359afa._.js +21 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__621dcb4a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__628d686b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__635fe0f9._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__68da2825._.js +39 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6921fe3f._.js +44 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6988985c._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6db132e9._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6dbe939c._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6fe5a96f._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7012e83d._.js +66 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__70327010._.js +134 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__748c718f._.js +147 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74a37ca4._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76290829._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76658fd6._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__79fa35e4._.js +101 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7c94b104._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__889996dd._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8a35d73b._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8b5fd676._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c7d1318._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8d205f82._.js +48 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__92924218._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__94bd7f65._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9746d1f5._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9b69f93e._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ffa67b7._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a300f072._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a7e0ac67._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__aad349b4._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad6d6402._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__af7a73fd._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b133856b._.js +61 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b8f4e4a3._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd11b2ad._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c029daab._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ea4921._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ed5d83._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c695a5f2._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8195768._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cb5c7680._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ce2a1672._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__cf6082be._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d2ac93f2._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d4f42f49._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d57e800e._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d8b615bf._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9bd6334._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9f2041b._.js +72 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__db469f1b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dca6026a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ddb3aa76._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de295ef3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de2a1e43._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e20922e8._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e3ecfd17._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e7be56ba._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ebece93b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ef27f8cd._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f13c29c6._.js +39 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f168c6dc._.js +14 -14
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f536cd2f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f9f7f2df._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcdaf6d8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fdb21d1b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_0a767dfe._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_2a5aeb76._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_2f3e5ac1._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_4689976f._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_5462a047._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_65fd2525._.js +10 -0
- package/cloud-runtime/standalone/.next/server/chunks/_682c9d81._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_6e7f0ae4._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_7011db4f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_9b10087f._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/_9dea7192._.js +10 -0
- package/cloud-runtime/standalone/.next/server/chunks/_a32a5cdd._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_a877d34f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_a93e80e8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_af7bd752._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_b0524599._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_c31ca6ab._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_c3c28282._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_c965f7b3._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_d2ea7d84._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_e469c080._.js +10 -0
- package/cloud-runtime/standalone/.next/server/chunks/_ee99a36b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_fe32a267._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agent-specs_pull_route_actions_33fd1f01.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agent-specs_route_actions_3c4fd7d4.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agents_[id]_profile_route_actions_e8d70dac.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_agents_export_route_actions_cc761823.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_attachments_[id]_route_actions_28040395.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_audit_route_actions_9d92fa80.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_automations_create_route_actions_ffb767ae.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_automations_route_actions_0112e2f7.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_[id]_route_actions_033ac330.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_route_actions_0c8cd01c.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat_route_actions_ac0c75e3.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_daemon_route_actions_89f9619f.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_domains_[id]_route_actions_36310215.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_domains_route_actions_8d8cc0aa.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_file-read_route_actions_a562d24d.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_file-search_route_actions_8af77a20.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_browse_route_actions_8e268170.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_pick-folder_route_actions_162664ff.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_health_route_actions_da3433c4.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_history_route_actions_f1813cd2.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_knowledge-notes_route_actions_0ddf6109.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_learnings_route_actions_c32db009.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_auth_route_actions_6bba0ae0.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_callback_route_actions_0fc8695c.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_cycles_route_actions_9cbb85fe.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_issues_context_route_actions_0b2c282c.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_issues_route_actions_8f12f3b7.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_mcp-setup_route_actions_a11b04f4.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_options_route_actions_29764947.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_runs_[id]_route_actions_5c46cc4e.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_runs_route_actions_a99753a8.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_status_route_actions_e43f376f.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_token_route_actions_510583b8.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_logs_route_actions_30a87f47.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_logs_stream_route_actions_92bf6397.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_memories_route_actions_f0712914.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_messages_[id]_route_actions_3ca634d2.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_participants_route_actions_2bae2919.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_processes_route_actions_93e6bd01.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_agents_route_actions_62a7e8e5.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_migrate-v1_route_actions_e28a058d.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_migrate-v2_route_actions_0cfff9eb.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_route_actions_6fd2e5a5.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_skills_route_actions_90fdd1e6.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_threads_route_actions_88ac9ddb.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_variables_route_actions_e646c8d9.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_cancel_route_actions_fbd5be89.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_route_actions_774a2e21.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_runs_route_actions_6e59ee83.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_agents_route_actions_399e1f19.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_poll_route_actions_23fbbfa1.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_route_actions_acf03860.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_providers_route_actions_5388b373.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_queue_complete_route_actions_1350a2ac.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_queue_route_actions_1e9c9b6f.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_reactions_route_actions_e075d50e.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_debug_route_actions_61c03e5e.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_poll_route_actions_dfc6ace4.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_schedules_route_actions_f5db3d09.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_search_route_actions_4244da48.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_assign_route_actions_15267be8.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_available_route_actions_24023111.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_detail_route_actions_1148baef.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_history_route_actions_5e5c4757.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_learn_route_actions_d3a37d25.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_route_actions_780e175f.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_unlearn_route_actions_3dfee433.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_status_route_actions_d551bce0.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_summarize_route_actions_3e77989a.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_system_db-status_route_actions_0f864710.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_task-drafts_route_actions_3b90bec5.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_comments_route_actions_71745d03.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_costs_route_actions_e20adc3f.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_dependencies_route_actions_b85eaa7f.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_events_route_actions_3e2c7edc.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_history_route_actions_debb26dc.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_metrics_route_actions_a82052ba.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_pause_route_actions_1341b4e1.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_replan_route_actions_0d67ebea.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_restart_route_actions_bbd1883b.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_resume_route_actions_745fbaa8.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_rollback_route_actions_77968f37.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_route_actions_766df5f7.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_schedule_route_actions_943bcc22.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_start_route_actions_1d7e784a.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_graph_stop_route_actions_5f5d6ff0.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_heartbeat_route_actions_28915a39.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_history_route_actions_7ecd517e.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_logs_route_actions_e1a486bd.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_logs_stream_route_actions_ed381b79.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_[id]_route_actions_8de83605.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_extract_route_actions_2651c393.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_route_actions_84c37746.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_tasks_stream_route_actions_37a289da.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-export_route_actions_26354edd.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-repos_route_actions_e95d24ee.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_knowledge_route_actions_c139bcf7.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_route_actions_f9ea97f2.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_upload_[id]_route_actions_d9c30458.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_upload_route_actions_f15ed185.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_user-settings_route_actions_553a1208.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_userPreferences_route_actions_178deeb3.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_migrate_workspaces-to-projects_route_actions_cb1e42e0.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_cancel_route_actions_8b9cd080.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_signal_route_actions_5a3d8250.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_start_route_actions_08f1c94e.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_orchestrator_tasks_[taskId]_status_route_actions_4062630f.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_complete_route_actions_c44e3cb4.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_fail_route_actions_7ff931bc.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_resume_route_actions_a9f01d21.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_stop_route_actions_dbea30a3.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ce889_server_app_api_tasks_[id]_nodes_[nodeId]_verify_route_actions_ff371970.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_2492d514._.js +11 -37
- package/cloud-runtime/standalone/.next/server/chunks/lib_3c080873._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_70cd6b4a._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_7f7835f1._.js +68 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_88726721._.js +79 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_98ae187c._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_9f439b27._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_app-config_ts_7f2f30ad._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_check-node-version_ts_ef89bf83._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/lib_orchestrator_chat-processor_ts_4c335719._.js +4 -4
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +5 -5
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +5 -5
- package/cloud-runtime/standalone/.next/server/chunks/lib_vault-store_ts_3718ff79._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_18a495c8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_4223ed10._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_ccc242ec._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_d2858615._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_1402a1da._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0f808fa3.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_19315704.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2aaf71c8.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2bdede98.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +15 -15
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3d31fed0.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_57a073eb.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_63e89275.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_84e28f38.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_9aff0990.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cc6c687d.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_dcaa7800.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_def8bfbe.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_e0cc2bbf.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fce9bc95.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_zod_v4_classic_external_fa90cebf.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_12d46a92._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_138dc200._.js +59 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_914bb19c._.js +59 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_api-route-utils_ts_b7225a0e._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_55c06268._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_a8bc8d58._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_scheduler_ts_d7b7497d._.js +57 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_state-machine_ts_ae1de66e._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_store_ts_d6588a77._.js +56 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_validate_ts_a06b9fab._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__0497a547._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__056cdf7d._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__11e33b9b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__139838ab._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__19cd257e._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__1c4256ce._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__26d669c2._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__351b2cc6._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__38071250._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__4c9d0778._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__4ebf5947._.js +1 -1
- 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]__67d5f883._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__69887882._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__6e83bf83._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__71b6d8a9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__7d279e62._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8fe8b9dd._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a0a1cb74._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a42e4555._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a667191a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__aa28d46f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ba4308c3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bb149a22._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bd4d5430._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__bde5bc78._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__cde88183._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d36dd8bc._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__dac5ab29._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__e0c64529._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__e87ba2b0._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f2c3b7ab._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f59f0dc7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f62d412e._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f63d6594._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fbd1aaff._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__febbd0b8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ff22a10e._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ffbc2e98._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_02c78cac._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_05c8a494._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0b36c9d6._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ff7c687._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ffd2660._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_11ce4c04._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_173da79d._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1c58ab2d._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1d26be78._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_222af282._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_22e99a52._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_23f5fddc._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_24feb541._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_260b10ce._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_32c878b9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_3aa32c11._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_43472af3._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_47e9a061._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_4bfdfb14._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_4d4ba84b._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_50d04b8f._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_52fe115d._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_547b6462._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_60d0bae4._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_629dc55c._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_69164b06._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_77e1407a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_7f7a828a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_84a166cb._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_93914ecd._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a10eb951._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a1b966f7._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_aa5b4886._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ae20456d._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ba5903a7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cb4d8a23._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cee3cf86._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_dc2072e7._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_e04b4053._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1769638._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ed4fece9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_f1465cc8._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_f2a7beb1._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_f51a3112._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fc1aaf9e._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fd0dda03._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_75761787.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_554ec2bf.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_page_actions_45703105.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_agents_page_actions_2bceb931.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_automations_page_actions_415dbaa9.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_board_page_actions_469e0e61.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_execution-graph_page_actions_3eceb5c1.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_page_actions_39d4fc33.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_automations_page_actions_9371bc66.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_graph_[taskId]_page_actions_c1473d77.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_knowledge_page_actions_1037c40a.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_linear_page_actions_0a8dc487.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_orphans_page_actions_6f398ff8.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_page_actions_42ca3f3e.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_settings_page_actions_840229cd.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_status_page_actions_39bbdbbf.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_thread_[id]_page_actions_94774546.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_welcome_page_actions_e32fb27e.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_[id]_page_tsx_9c49d8c8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_layout_tsx_b9360330._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_page_tsx_f5f08ed8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_execution-graph_page_tsx_f854185a._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_global-error_tsx_9170b7a0._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_graph_[taskId]_page_tsx_d8b1d582._.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/app_projects_[slug]_layout_tsx_67c9550a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_linear_page_tsx_971a6ba7._.js +39 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/ce889_server_app_projects_[slug]_thread_[threadId]_page_actions_660a8857.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_PromptJobBoard_tsx_f83f722f._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +10 -6
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_graph_graph-derived_ts_2b94148f._.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_@dnd-kit_core_dist_core_esm_57071f37.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_f76a24fb._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_e8bdedc5._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_03ec2107._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_174ae28d._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_4b63a0e1._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_61a87db9._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_9774470f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_15817684.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_61c49327.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_f2865b38._.js +2 -2
- package/cloud-runtime/standalone/.next/server/edge/chunks/[root-of-the-server]__9491d0b8._.js +2 -2
- package/cloud-runtime/standalone/.next/server/edge/chunks/_52aa5b93._.js +1 -1
- package/cloud-runtime/standalone/.next/server/edge/chunks/node_modules_next_dist_esm_build_templates_edge-wrapper_3b93bb62.js +1 -1
- package/cloud-runtime/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_405b82a5.js +1 -1
- package/cloud-runtime/standalone/.next/server/edge/chunks/turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_cd32efca.js +1 -1
- package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +11 -2
- package/cloud-runtime/standalone/.next/server/instrumentation.js +3 -3
- package/cloud-runtime/standalone/.next/server/middleware-build-manifest.js +6 -6
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/next-font-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/next-font-manifest.json +4 -0
- 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/00716478a3ee55a2.js +37 -0
- package/cloud-runtime/standalone/.next/static/chunks/012b9216c9932478.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/02add5a8d35c53fe.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{8304e8487aa74059.css → 06003b84da346995.css} +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/081fcf3ea160ca2d.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/0c5b9fe15dda4972.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/14922fd23cdc223b.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/1d8496cecfe9a523.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/1fa91c34c99502bf.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2362d5c0dcaa5d64.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2375e3fd2a9b8844.js +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/2618f9566e3788e4.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2730394502dd3664.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2a9c83f8211196e0.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2ac8e643e539b81e.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2e471cd7ac5cd8fb.js +6 -0
- package/cloud-runtime/standalone/.next/static/chunks/3091043e8c282dce.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/335f551791affdd1.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/34dd491bc4ce9561.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/3dc50de1c86e1ce9.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/4ea8f08087116055.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/5607ad702ebb8a4b.js +9 -0
- package/cloud-runtime/standalone/.next/static/chunks/6103b9b5538bba4d.css +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/657c261f623752de.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/68586017f55137e8.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/73e3194f06db260e.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/797fcb0710da3be2.js +4 -0
- package/cloud-runtime/standalone/.next/static/chunks/818fb0f154cee2c5.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/8b40d0636a2ba3b0.js +28 -0
- package/cloud-runtime/standalone/.next/static/chunks/8fc3ed1915e0659b.js +88 -0
- package/cloud-runtime/standalone/.next/static/chunks/961311cbebbffb6d.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/963060cf6e72339b.js +6 -0
- package/cloud-runtime/standalone/.next/static/chunks/98c20da4973991f0.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/a2a98ae5d4a3e5e3.js +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/a72fbac84e32f665.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/a9da98f883ac833b.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/aa4d86855d0a3a55.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/b2127dc67c5ade9f.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/b3377e39d47c71cf.js +3 -0
- package/cloud-runtime/standalone/.next/static/chunks/b553dba1f51e709b.js +16 -0
- package/cloud-runtime/standalone/.next/static/chunks/b93f49b29a473a1d.js +6 -0
- package/cloud-runtime/standalone/.next/static/chunks/bf2a2fafb710e63c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/c0d17e0c37ba8e7a.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/c3784233f00e1ff5.js +12 -0
- package/cloud-runtime/standalone/.next/static/chunks/c48afb0a7fd0423c.js +28 -0
- package/cloud-runtime/standalone/.next/static/chunks/cb6301624094c91e.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{787436fad75f5bc6.js → ccaf68956da192f8.js} +2 -2
- package/cloud-runtime/standalone/.next/static/chunks/d96012bcfc98706a.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/db131a0b6350e416.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/de271f8f22d293b4.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/e51fddf53a6dc1e4.js +9 -0
- package/cloud-runtime/standalone/.next/static/chunks/f4360c3e4089263f.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/f8cfa030ea3cb3c3.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/turbopack-0ace1f53f3e3cf46.js +4 -0
- package/cloud-runtime/standalone/Dockerfile +5 -5
- package/cloud-runtime/standalone/README.md +37 -5
- package/cloud-runtime/standalone/app/api/automations/route.ts +64 -17
- package/cloud-runtime/standalone/app/api/chat/route.ts +29 -3
- package/cloud-runtime/standalone/app/api/linear/auth/route.ts +14 -0
- package/cloud-runtime/standalone/app/api/linear/callback/route.ts +44 -0
- package/cloud-runtime/standalone/app/api/linear/cycles/route.ts +22 -0
- package/cloud-runtime/standalone/app/api/linear/issues/context/route.ts +26 -0
- package/cloud-runtime/standalone/app/api/linear/issues/route.ts +61 -0
- package/cloud-runtime/standalone/app/api/linear/mcp-setup/route.ts +181 -0
- package/cloud-runtime/standalone/app/api/linear/options/route.ts +31 -0
- package/cloud-runtime/standalone/app/api/linear/runs/[id]/route.ts +81 -0
- package/cloud-runtime/standalone/app/api/linear/runs/route.ts +91 -0
- package/cloud-runtime/standalone/app/api/linear/status/route.ts +38 -0
- package/cloud-runtime/standalone/app/api/linear/token/route.ts +59 -0
- package/cloud-runtime/standalone/app/api/prompt-jobs/route.ts +1 -1
- package/cloud-runtime/standalone/app/api/providers/route.ts +1 -14
- package/cloud-runtime/standalone/app/api/status/route.ts +8 -16
- package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +3 -181
- package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +2 -1
- package/cloud-runtime/standalone/app/projects/[slug]/linear/page.tsx +26 -0
- package/cloud-runtime/standalone/components/LinearBoard.tsx +1369 -0
- package/cloud-runtime/standalone/components/LinearSetup.tsx +239 -0
- package/cloud-runtime/standalone/components/ProjectModal.tsx +15 -3
- package/cloud-runtime/standalone/components/PromptJobBoard.tsx +367 -87
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +30 -15
- package/cloud-runtime/standalone/components/chat-ui/Composer.tsx +77 -7
- package/cloud-runtime/standalone/components/chat-ui/MentionPopover.tsx +43 -2
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +53 -48
- package/cloud-runtime/standalone/docs/superpowers/plans/2026-04-07-linear-integration.md +1352 -0
- package/cloud-runtime/standalone/hooks/useGroupChat.ts +4 -1
- package/cloud-runtime/standalone/hooks/useLinearConnection.ts +128 -0
- package/cloud-runtime/standalone/hooks/useLinearIssueMentions.ts +64 -0
- package/cloud-runtime/standalone/hooks/useLinearIssues.ts +98 -0
- package/cloud-runtime/standalone/hooks/useLinearRuns.ts +137 -0
- package/cloud-runtime/standalone/hooks/useMentionAutocomplete.ts +54 -6
- package/cloud-runtime/standalone/hooks/useProjectResources.ts +0 -50
- package/cloud-runtime/standalone/instrumentation.ts +2 -1
- package/cloud-runtime/standalone/lib/app-config.ts +55 -0
- package/cloud-runtime/standalone/lib/chat/composer-routing.ts +128 -0
- package/cloud-runtime/standalone/lib/chat/linear-issue-context.ts +79 -0
- package/cloud-runtime/standalone/lib/cli-runner.ts +15 -15
- package/cloud-runtime/standalone/lib/db.ts +32 -46
- package/cloud-runtime/standalone/lib/knowledge-notes.ts +6 -242
- package/cloud-runtime/standalone/lib/knowledge-store.ts +8 -211
- package/cloud-runtime/standalone/lib/linear-client.ts +427 -0
- package/cloud-runtime/standalone/lib/linear-execution-prompt.ts +153 -0
- package/cloud-runtime/standalone/lib/linear-issue-store.ts +427 -0
- package/cloud-runtime/standalone/lib/linear-issues.ts +360 -0
- package/cloud-runtime/standalone/lib/linear-run-store.ts +374 -0
- package/cloud-runtime/standalone/lib/repo-knowledge.ts +46 -125
- package/cloud-runtime/standalone/lib/security.ts +2 -2
- package/cloud-runtime/standalone/lib/shell-env.ts +71 -0
- package/cloud-runtime/standalone/lib/task-context.ts +3 -13
- package/cloud-runtime/standalone/lib/thread-knowledge.ts +2 -11
- package/cloud-runtime/standalone/lib/tiptap/composer-mentions.ts +38 -0
- package/cloud-runtime/standalone/lib/tiptap/editor-utils.ts +11 -0
- package/cloud-runtime/standalone/lib/tiptap/serialize-composer.ts +10 -0
- package/cloud-runtime/standalone/lib/vault-store.ts +2067 -0
- package/cloud-runtime/standalone/mcp/README.md +22 -11
- package/cloud-runtime/standalone/next.config.ts +2 -1
- package/cloud-runtime/standalone/package-lock.json +7 -0
- package/cloud-runtime/standalone/package.json +3 -0
- package/cloud-runtime/standalone/planning/automation-frontmatter-migration-spec.md +710 -0
- package/cloud-runtime/standalone/scripts/backfill-automations-frontmatter.ts +145 -0
- package/cloud-runtime/standalone/scripts/migrate-vault.ts +13 -0
- package/cloud-runtime/standalone/src/automations/adapters.ts +219 -0
- package/cloud-runtime/standalone/src/automations/index.ts +7 -0
- package/cloud-runtime/standalone/src/automations/parser.ts +33 -0
- package/cloud-runtime/standalone/src/automations/repository.ts +440 -0
- package/cloud-runtime/standalone/src/automations/serializer.ts +94 -0
- package/cloud-runtime/standalone/src/automations/state.ts +166 -0
- package/cloud-runtime/standalone/src/automations/types.ts +134 -0
- package/cloud-runtime/standalone/src/automations/validation.ts +337 -0
- package/cloud-runtime/standalone/src/graph/internal-function-dispatcher.ts +2 -5
- package/cloud-runtime/standalone/src/graph/schedule-runner.ts +45 -7
- package/cloud-runtime/standalone/src/graph/store.ts +174 -5
- package/cloud-runtime/standalone/src/prompt-scheduler/store.ts +522 -162
- package/cloud-runtime/standalone/src/prompt-scheduler/types.ts +1 -0
- package/cloud-runtime/standalone/state/automations/.state/24a6a5db-3b14-49c4-841f-29f10f015fbb.json +8 -0
- package/cloud-runtime/standalone/state/automations/active/24a6a5db-3b14-49c4-841f-29f10f015fbb.md +17 -0
- package/cloud-runtime/standalone/styles/composer-pills.css +13 -0
- package/cloud-runtime/standalone/tsconfig.tsbuildinfo +1 -1
- package/cloud-runtime/standalone/worker/index.js +4547 -366
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route/app-paths-manifest.json +0 -3
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +0 -9
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +0 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route_client-reference-manifest.js +0 -2
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route/app-paths-manifest.json +0 -3
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +0 -8
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +0 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route_client-reference-manifest.js +0 -2
- package/cloud-runtime/standalone/.next/server/chunks/[externals]__bc6c7111._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__01cd082e._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0936925d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__09ca81e1._.js +0 -101
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1017e012._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1ac3236d._.js +0 -25
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1b0bb735._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1c86bf6e._.js +0 -48
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20c58b41._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2126c763._.js +0 -42
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__236c35bb._.js +0 -51
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__277ed37d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2f06f568._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__30bd0c87._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__374cd94c._.js +0 -42
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3785024c._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__379604d4._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c8f1de6._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d0df5a8._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4014ed70._.js +0 -51
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42fcb81c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a3cd6ac._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4e522535._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50c24784._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59d1cdd8._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__644e6285._.js +0 -112
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__65755104._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__73c20995._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8125bbc3._.js +0 -63
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__85275b88._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__89666394._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c0fb154._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8f5cac13._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b22098._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__96ae701e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98ce983b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9a9fd39f._.js +0 -44
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ad4e385._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a01ddd0b._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a099c992._.js +0 -58
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a1e62918._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a9b949c3._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd43017b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf6fb108._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c122c54a._.js +0 -75
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c5b8ceb7._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +0 -79
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dc542063._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dec3e1b7._.js +0 -30
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1147a4a._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5597fea._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f8c94cb3._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa79d53f._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb14cd4a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fc27a898._.js +0 -158
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fce2cdce._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcf0b40a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffb21023._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/_05fa3b89._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_22fe5fd2._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_4190f170._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_42e9c8d5._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_5ca51127._.js +0 -54
- package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +0 -57
- package/cloud-runtime/standalone/.next/server/chunks/_6519418b._.js +0 -59
- package/cloud-runtime/standalone/.next/server/chunks/_6bb93816._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_6bc1b3e1._.js +0 -59
- package/cloud-runtime/standalone/.next/server/chunks/_862895c0._.js +0 -57
- package/cloud-runtime/standalone/.next/server/chunks/_8b9fde82._.js +0 -97
- package/cloud-runtime/standalone/.next/server/chunks/_95ac98db._.js +0 -49
- package/cloud-runtime/standalone/.next/server/chunks/_994414cd._.js +0 -54
- package/cloud-runtime/standalone/.next/server/chunks/_99b78daf._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_affbdbb0._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_d22934ab._.js +0 -97
- package/cloud-runtime/standalone/.next/server/chunks/_efc73784._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_fba13a4a._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_projects_[id]_memory_route_actions_f0c255ef.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_repos_[id]_knowledge_route_actions_993fe4e5.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/lib_281e5787._.js +0 -16
- package/cloud-runtime/standalone/.next/server/chunks/lib_63067e21._.js +0 -16
- package/cloud-runtime/standalone/.next/server/chunks/lib_87c06aeb._.js +0 -25
- package/cloud-runtime/standalone/.next/server/chunks/lib_a5adca60._.js +0 -64
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7f8022ab.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_8ec90680.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_a590fcd6.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_14067235._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_b63e2d39._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__096c39a3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__47caef59._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8b4e7816._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a37fb1c3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a456581d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d74022f1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ea035cd9._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fca7df40._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0c5c111f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_23656a95._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_27a789b3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_36b413cc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_46e00a9b._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_478f4991._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_547f19ec._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_9e07dcac._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a68d8f62._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a80e12c8._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_b1e1ef71._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1349560._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_welcome_page_tsx_6c79bc59._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_b82e03da._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/01428247f94115a6.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/06cf0ed16bf8aa70.js +0 -28
- package/cloud-runtime/standalone/.next/static/chunks/0bd6498bda341889.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/0ec92a111fe969fd.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/19dd745b663fdffa.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/1a3298f21d1040e9.js +0 -4
- package/cloud-runtime/standalone/.next/static/chunks/1c8583feefee0765.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/1e3dede69b464364.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/238a28856e739dc9.js +0 -2
- package/cloud-runtime/standalone/.next/static/chunks/24772e179852c73e.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/2d1d138d8ea3234c.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/2deeba875ec50761.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/2e011469003993e9.js +0 -28
- package/cloud-runtime/standalone/.next/static/chunks/31a4164e40ca71e5.js +0 -6
- package/cloud-runtime/standalone/.next/static/chunks/3a55441b018d52e4.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/3c202e89da05d9b9.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/3c72becf6dff5597.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/44dafb5e85578e12.js +0 -16
- package/cloud-runtime/standalone/.next/static/chunks/48e332ac3e9ed56c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/5c0819dcc4bfec85.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/5d52c79d9812d06e.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/617db51b7444f818.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/673bb6094cea9ded.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/687d09973325dcf8.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/76a50c4abceb3362.js +0 -12
- package/cloud-runtime/standalone/.next/static/chunks/8a4684388ca0f6de.js +0 -7
- package/cloud-runtime/standalone/.next/static/chunks/9f236cc9572783b9.js +0 -93
- package/cloud-runtime/standalone/.next/static/chunks/a9aaec85125f69b1.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/ac9a7d8cf17b5d75.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/b4c29a62f9255268.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/b6bbe747d2b0dddb.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/badc6258750e247d.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/bc3cad3c821b169b.js +0 -2
- package/cloud-runtime/standalone/.next/static/chunks/bf2bb1662353aff5.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/c1fb885eed94aa8c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/c653186036e56204.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/cb5581d868e78205.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/cbdeb17a36b99000.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/d5cc62984dc4205c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/d78cc7d749043fef.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/da2b00558cf32f37.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/ee5f1457fbc593e1.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/ff1a16fafef87110.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/turbopack-e1d640f2fbe4fa5e.js +0 -4
- package/cloud-runtime/standalone/app/api/projects/[id]/memory/route.ts +0 -81
- package/cloud-runtime/standalone/app/api/repos/[id]/knowledge/route.ts +0 -98
- /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route/build-manifest.json +0 -0
- /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route/server-reference-manifest.json +0 -0
- /package/cloud-runtime/standalone/.next/server/app/api/{projects/[id]/memory → linear/auth}/route.js.map +0 -0
- /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route/build-manifest.json +0 -0
- /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route/server-reference-manifest.json +0 -0
- /package/cloud-runtime/standalone/.next/server/app/api/{repos/[id]/knowledge → linear/callback}/route.js.map +0 -0
- /package/cloud-runtime/standalone/.next/static/{PH4cjH9B7XiWyHWYdevbx → Y8QdDdLJI3yzNjkyPjuJ-}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{PH4cjH9B7XiWyHWYdevbx → Y8QdDdLJI3yzNjkyPjuJ-}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{PH4cjH9B7XiWyHWYdevbx → Y8QdDdLJI3yzNjkyPjuJ-}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,2067 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { randomUUID, createHash } from "node:crypto";
|
|
5
|
+
import { dump, load } from "js-yaml";
|
|
6
|
+
import { getSQLiteDb } from "./sqlite-query-adapter";
|
|
7
|
+
import type {
|
|
8
|
+
Learning,
|
|
9
|
+
LearningScope,
|
|
10
|
+
Project,
|
|
11
|
+
ProjectAgent,
|
|
12
|
+
ProjectInput,
|
|
13
|
+
ProjectMemory,
|
|
14
|
+
ProjectRepo,
|
|
15
|
+
ProjectRepoInput,
|
|
16
|
+
ProjectSkill,
|
|
17
|
+
ProjectThread,
|
|
18
|
+
ProjectUpdatePayload,
|
|
19
|
+
ProjectVariable,
|
|
20
|
+
ProjectWithRepos,
|
|
21
|
+
} from "./db";
|
|
22
|
+
|
|
23
|
+
export type VaultKnowledgeScope = "global" | "agent" | "project" | "repo";
|
|
24
|
+
export type VaultKnowledgeSourceType = "reflection" | "thread_transition" | "task_completion" | "manual";
|
|
25
|
+
export type VaultKnowledgeKind =
|
|
26
|
+
| "outcome"
|
|
27
|
+
| "decision"
|
|
28
|
+
| "pattern"
|
|
29
|
+
| "gotcha"
|
|
30
|
+
| "preference"
|
|
31
|
+
| "constraint"
|
|
32
|
+
| "convention"
|
|
33
|
+
| "lesson";
|
|
34
|
+
|
|
35
|
+
export interface VaultKnowledgeEvidence {
|
|
36
|
+
id?: string;
|
|
37
|
+
note: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface VaultKnowledgeEntry {
|
|
41
|
+
id: string;
|
|
42
|
+
scope: VaultKnowledgeScope;
|
|
43
|
+
subjectId: string;
|
|
44
|
+
sourceType: VaultKnowledgeSourceType;
|
|
45
|
+
sourceId: string;
|
|
46
|
+
kind: VaultKnowledgeKind;
|
|
47
|
+
title: string;
|
|
48
|
+
body: string;
|
|
49
|
+
confidence: number | null;
|
|
50
|
+
durability: number | null;
|
|
51
|
+
tags: string[];
|
|
52
|
+
evidence: VaultKnowledgeEvidence[];
|
|
53
|
+
metadata: Record<string, unknown>;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
updatedAt: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface VaultKnowledgeDraft {
|
|
59
|
+
scope: VaultKnowledgeScope;
|
|
60
|
+
subjectId: string;
|
|
61
|
+
sourceType: VaultKnowledgeSourceType;
|
|
62
|
+
sourceId: string;
|
|
63
|
+
kind: VaultKnowledgeKind;
|
|
64
|
+
title: string;
|
|
65
|
+
body: string;
|
|
66
|
+
confidence?: number | null;
|
|
67
|
+
durability?: number | null;
|
|
68
|
+
tags?: string[];
|
|
69
|
+
evidence?: VaultKnowledgeEvidence[];
|
|
70
|
+
metadata?: Record<string, unknown>;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface VaultKnowledgeNote {
|
|
74
|
+
id: string;
|
|
75
|
+
scope: VaultKnowledgeScope;
|
|
76
|
+
subjectId: string;
|
|
77
|
+
content: string;
|
|
78
|
+
changeSummary: string | null;
|
|
79
|
+
sourceType: VaultKnowledgeSourceType;
|
|
80
|
+
sourceId: string;
|
|
81
|
+
metadata: Record<string, unknown>;
|
|
82
|
+
version: number;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface VaultKnowledgeNoteInput {
|
|
88
|
+
scope: VaultKnowledgeScope;
|
|
89
|
+
subjectId: string;
|
|
90
|
+
content: string;
|
|
91
|
+
changeSummary?: string | null;
|
|
92
|
+
sourceType: VaultKnowledgeSourceType;
|
|
93
|
+
sourceId: string;
|
|
94
|
+
metadata?: Record<string, unknown>;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
interface RegistryRepoEntry {
|
|
98
|
+
id: string;
|
|
99
|
+
slug: string;
|
|
100
|
+
name: string;
|
|
101
|
+
path: string | null;
|
|
102
|
+
git_url: string | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface RegistryProjectEntry {
|
|
106
|
+
id: string;
|
|
107
|
+
slug: string;
|
|
108
|
+
name: string;
|
|
109
|
+
path: string;
|
|
110
|
+
created_at: string;
|
|
111
|
+
updated_at: string;
|
|
112
|
+
repos: RegistryRepoEntry[];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface RegistryAgentEntry {
|
|
116
|
+
id: string;
|
|
117
|
+
slug: string;
|
|
118
|
+
name: string;
|
|
119
|
+
path: string;
|
|
120
|
+
created_at: string;
|
|
121
|
+
updated_at: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
interface VaultRegistry {
|
|
125
|
+
version: 1;
|
|
126
|
+
updatedAt: string;
|
|
127
|
+
projects: RegistryProjectEntry[];
|
|
128
|
+
agents: RegistryAgentEntry[];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface ManifestRepoEntry extends ProjectRepo {
|
|
132
|
+
slug: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
interface ProjectManifest {
|
|
136
|
+
version: 1;
|
|
137
|
+
updatedAt: string;
|
|
138
|
+
project: Project;
|
|
139
|
+
repos: ManifestRepoEntry[];
|
|
140
|
+
agents: ProjectAgent[];
|
|
141
|
+
threads: ProjectThread[];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface MarkdownFile<TFrontmatter extends object> {
|
|
145
|
+
frontmatter: TFrontmatter;
|
|
146
|
+
body: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
interface ProjectContextFrontmatter {
|
|
150
|
+
id: string;
|
|
151
|
+
type: "knowledge-note";
|
|
152
|
+
scope: "project";
|
|
153
|
+
subject_id: string;
|
|
154
|
+
project_id: string;
|
|
155
|
+
slug: string;
|
|
156
|
+
title: string;
|
|
157
|
+
created_at: string;
|
|
158
|
+
updated_at: string;
|
|
159
|
+
source_type?: VaultKnowledgeSourceType;
|
|
160
|
+
source_id?: string;
|
|
161
|
+
change_summary?: string | null;
|
|
162
|
+
version?: number;
|
|
163
|
+
metadata?: Record<string, unknown>;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
interface RepoKnowledgeFrontmatter {
|
|
167
|
+
id: string;
|
|
168
|
+
type: "knowledge-note";
|
|
169
|
+
scope: "repo";
|
|
170
|
+
subject_id: string;
|
|
171
|
+
project_id: string;
|
|
172
|
+
repo_id: string;
|
|
173
|
+
slug: string;
|
|
174
|
+
title: string;
|
|
175
|
+
created_at: string;
|
|
176
|
+
updated_at: string;
|
|
177
|
+
source_type?: VaultKnowledgeSourceType;
|
|
178
|
+
source_id?: string;
|
|
179
|
+
change_summary?: string | null;
|
|
180
|
+
version?: number;
|
|
181
|
+
metadata?: Record<string, unknown>;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
interface AgentKnowledgeFrontmatter {
|
|
185
|
+
id: string;
|
|
186
|
+
type: "knowledge-note";
|
|
187
|
+
scope: "agent";
|
|
188
|
+
subject_id: string;
|
|
189
|
+
agent_id: string;
|
|
190
|
+
slug: string;
|
|
191
|
+
title: string;
|
|
192
|
+
created_at: string;
|
|
193
|
+
updated_at: string;
|
|
194
|
+
source_type?: VaultKnowledgeSourceType;
|
|
195
|
+
source_id?: string;
|
|
196
|
+
change_summary?: string | null;
|
|
197
|
+
version?: number;
|
|
198
|
+
metadata?: Record<string, unknown>;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
interface GlobalPlaybookFrontmatter {
|
|
202
|
+
id: string;
|
|
203
|
+
type: "knowledge-note";
|
|
204
|
+
scope: "global";
|
|
205
|
+
subject_id: string;
|
|
206
|
+
slug: string;
|
|
207
|
+
title: string;
|
|
208
|
+
created_at: string;
|
|
209
|
+
updated_at: string;
|
|
210
|
+
source_type?: VaultKnowledgeSourceType;
|
|
211
|
+
source_id?: string;
|
|
212
|
+
change_summary?: string | null;
|
|
213
|
+
version?: number;
|
|
214
|
+
metadata?: Record<string, unknown>;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
interface ProjectAgentsIndexFrontmatter {
|
|
218
|
+
id: string;
|
|
219
|
+
type: "project-agents";
|
|
220
|
+
project_id: string;
|
|
221
|
+
title: string;
|
|
222
|
+
created_at: string;
|
|
223
|
+
updated_at: string;
|
|
224
|
+
agents: ProjectAgent[];
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface ProjectSkillFrontmatter {
|
|
228
|
+
id: string;
|
|
229
|
+
type: "project-skill";
|
|
230
|
+
project_id: string;
|
|
231
|
+
title: string;
|
|
232
|
+
file: string;
|
|
233
|
+
condition?: string | null;
|
|
234
|
+
created_at: string;
|
|
235
|
+
updated_at: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
interface ProjectVariableFrontmatter {
|
|
239
|
+
id: string;
|
|
240
|
+
type: "project-variable";
|
|
241
|
+
project_id: string;
|
|
242
|
+
title: string;
|
|
243
|
+
key: string;
|
|
244
|
+
value: string;
|
|
245
|
+
created_at: string;
|
|
246
|
+
updated_at: string;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
interface ProjectThreadFrontmatter {
|
|
250
|
+
id: string;
|
|
251
|
+
type: "project-thread";
|
|
252
|
+
project_id: string;
|
|
253
|
+
thread_id: string;
|
|
254
|
+
title: string;
|
|
255
|
+
created_at: string;
|
|
256
|
+
updated_at: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface ImportedArtifactFrontmatter {
|
|
260
|
+
id: string;
|
|
261
|
+
type: "imported-artifact";
|
|
262
|
+
source_table: string;
|
|
263
|
+
source_row_id?: string;
|
|
264
|
+
scope?: string;
|
|
265
|
+
project_id?: string;
|
|
266
|
+
repo_id?: string;
|
|
267
|
+
agent_id?: string;
|
|
268
|
+
producer?: string;
|
|
269
|
+
created_at: string;
|
|
270
|
+
updated_at: string;
|
|
271
|
+
metadata?: Record<string, unknown>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
interface EvidenceFrontmatter {
|
|
275
|
+
id: string;
|
|
276
|
+
type: "knowledge-evidence";
|
|
277
|
+
scope: VaultKnowledgeScope;
|
|
278
|
+
subject_id: string;
|
|
279
|
+
source_type: VaultKnowledgeSourceType;
|
|
280
|
+
source_id: string;
|
|
281
|
+
kind: VaultKnowledgeKind;
|
|
282
|
+
title: string;
|
|
283
|
+
confidence?: number | null;
|
|
284
|
+
durability?: number | null;
|
|
285
|
+
tags?: string[];
|
|
286
|
+
evidence?: VaultKnowledgeEvidence[];
|
|
287
|
+
metadata?: Record<string, unknown>;
|
|
288
|
+
content_hash: string;
|
|
289
|
+
created_at: string;
|
|
290
|
+
updated_at: string;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const DEFAULT_VAULT_ROOT = process.env.AGX_VAULT_ROOT || path.join(process.env.AGX_DATA_DIR || path.join(os.homedir(), ".agx"), "vault");
|
|
294
|
+
|
|
295
|
+
function nowIso(): string {
|
|
296
|
+
return new Date().toISOString();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function slugify(value: string, fallback = "item"): string {
|
|
300
|
+
const slug = String(value || "")
|
|
301
|
+
.toLowerCase()
|
|
302
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
303
|
+
.replace(/^-+|-+$/g, "");
|
|
304
|
+
return slug || fallback;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
function clampUnit(value: unknown): number | null {
|
|
308
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return null;
|
|
309
|
+
return Math.max(0, Math.min(1, value));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function ensureDir(dirPath: string): void {
|
|
313
|
+
fs.mkdirSync(dirPath, { recursive: true });
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
function removeDirIfExists(dirPath: string): void {
|
|
317
|
+
if (!fs.existsSync(dirPath)) return;
|
|
318
|
+
fs.rmSync(dirPath, { recursive: true, force: true });
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function readJsonFile<T>(filePath: string, fallback: T): T {
|
|
322
|
+
if (!fs.existsSync(filePath)) return fallback;
|
|
323
|
+
try {
|
|
324
|
+
return JSON.parse(fs.readFileSync(filePath, "utf8")) as T;
|
|
325
|
+
} catch {
|
|
326
|
+
return fallback;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function atomicWriteText(filePath: string, content: string): void {
|
|
331
|
+
ensureDir(path.dirname(filePath));
|
|
332
|
+
const tempPath = `${filePath}.tmp-${process.pid}-${Date.now()}`;
|
|
333
|
+
fs.writeFileSync(tempPath, content, "utf8");
|
|
334
|
+
fs.renameSync(tempPath, filePath);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
function atomicWriteJson(filePath: string, value: unknown): void {
|
|
338
|
+
atomicWriteText(filePath, `${JSON.stringify(value, null, 2)}\n`);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function isPlainObject(value: unknown): value is Record<string, unknown> {
|
|
342
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function normalizeMarkdownBody(content: string): string {
|
|
346
|
+
return String(content || "")
|
|
347
|
+
.replace(/\r\n/g, "\n")
|
|
348
|
+
.split("\n")
|
|
349
|
+
.map((line) => line.replace(/\s+$/g, ""))
|
|
350
|
+
.join("\n")
|
|
351
|
+
.trim();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function writeMarkdownFile(filePath: string, frontmatter: Record<string, unknown>, body: string): void {
|
|
355
|
+
const yaml = dump(frontmatter, { lineWidth: 120, noRefs: true, sortKeys: true }).trimEnd();
|
|
356
|
+
const normalizedBody = normalizeMarkdownBody(body);
|
|
357
|
+
const content = normalizedBody
|
|
358
|
+
? `---\n${yaml}\n---\n${normalizedBody}\n`
|
|
359
|
+
: `---\n${yaml}\n---\n`;
|
|
360
|
+
atomicWriteText(filePath, content);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function readMarkdownFile<TFrontmatter extends object>(filePath: string): MarkdownFile<TFrontmatter> | null {
|
|
364
|
+
if (!fs.existsSync(filePath)) return null;
|
|
365
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
366
|
+
const match = raw.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
|
|
367
|
+
if (!match) {
|
|
368
|
+
return {
|
|
369
|
+
frontmatter: {} as TFrontmatter,
|
|
370
|
+
body: normalizeMarkdownBody(raw),
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
const parsed = load(match[1]);
|
|
374
|
+
return {
|
|
375
|
+
frontmatter: (isPlainObject(parsed) ? parsed : {}) as TFrontmatter,
|
|
376
|
+
body: normalizeMarkdownBody(match[2] ?? ""),
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
function listMarkdownFiles(dirPath: string): string[] {
|
|
381
|
+
if (!fs.existsSync(dirPath)) return [];
|
|
382
|
+
return fs
|
|
383
|
+
.readdirSync(dirPath, { withFileTypes: true })
|
|
384
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith(".md"))
|
|
385
|
+
.map((entry) => path.join(dirPath, entry.name))
|
|
386
|
+
.sort((a, b) => a.localeCompare(b));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
function normalizeTags(tags?: string[]): string[] {
|
|
390
|
+
const seen = new Set<string>();
|
|
391
|
+
const result: string[] = [];
|
|
392
|
+
for (const tag of tags ?? []) {
|
|
393
|
+
const trimmed = String(tag ?? "").trim().toLowerCase();
|
|
394
|
+
if (!trimmed || seen.has(trimmed)) continue;
|
|
395
|
+
seen.add(trimmed);
|
|
396
|
+
result.push(trimmed);
|
|
397
|
+
}
|
|
398
|
+
return result;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
function normalizeEvidence(evidence?: VaultKnowledgeEvidence[]): VaultKnowledgeEvidence[] {
|
|
402
|
+
const result: VaultKnowledgeEvidence[] = [];
|
|
403
|
+
for (const item of evidence ?? []) {
|
|
404
|
+
const note = String(item?.note ?? "").trim();
|
|
405
|
+
const id = typeof item?.id === "string" ? item.id.trim() : "";
|
|
406
|
+
if (!note) continue;
|
|
407
|
+
result.push(id ? { id, note } : { note });
|
|
408
|
+
}
|
|
409
|
+
return result;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function contentHash(scope: VaultKnowledgeScope, subjectId: string, body: string): string {
|
|
413
|
+
return createHash("sha256").update(`${scope}\n${subjectId}\n${body}`).digest("hex");
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
function sortByTimestampDesc<T extends { updatedAt?: string; createdAt?: string }>(items: T[]): T[] {
|
|
417
|
+
return [...items].sort((a, b) => {
|
|
418
|
+
const aKey = a.updatedAt || a.createdAt || "";
|
|
419
|
+
const bKey = b.updatedAt || b.createdAt || "";
|
|
420
|
+
return bKey.localeCompare(aKey);
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export class VaultStore {
|
|
425
|
+
readonly rootDir: string;
|
|
426
|
+
|
|
427
|
+
constructor(rootDir = DEFAULT_VAULT_ROOT) {
|
|
428
|
+
this.rootDir = rootDir;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
getRootDir(): string {
|
|
432
|
+
this.ensureRoot();
|
|
433
|
+
return this.rootDir;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
private registryPath(): string {
|
|
437
|
+
return path.join(this.rootDir, ".agx", "registry.json");
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
private globalDir(): string {
|
|
441
|
+
return path.join(this.rootDir, "_global");
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
private globalAgentsDir(): string {
|
|
445
|
+
return path.join(this.globalDir(), "Agents");
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
private globalImportedLearningsDir(): string {
|
|
449
|
+
return path.join(this.globalDir(), "_generated", "imported", "learnings");
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
private globalEvidenceDir(scope: "agent" | "global"): string {
|
|
453
|
+
return path.join(this.globalDir(), "_generated", "evidence", scope);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
private globalPlaybookPath(): string {
|
|
457
|
+
return path.join(this.globalDir(), "Playbook.md");
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
private projectDir(slug: string): string {
|
|
461
|
+
return path.join(this.rootDir, slug);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
private projectManifestPath(slug: string): string {
|
|
465
|
+
return path.join(this.projectDir(slug), ".agx", "manifest.json");
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
private projectContextPath(slug: string): string {
|
|
469
|
+
return path.join(this.projectDir(slug), "Context", "Project.md");
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
private projectSkillsDir(slug: string): string {
|
|
473
|
+
return path.join(this.projectDir(slug), "Context", "Skills");
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
private projectVariablesDir(slug: string): string {
|
|
477
|
+
return path.join(this.projectDir(slug), "Context", "Variables");
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
private projectAgentsIndexPath(slug: string): string {
|
|
481
|
+
return path.join(this.projectDir(slug), "Context", "Agents", "_index.md");
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
private projectThreadsDir(slug: string): string {
|
|
485
|
+
return path.join(this.projectDir(slug), "Threads");
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
private repoDir(projectSlug: string, repoSlug: string): string {
|
|
489
|
+
return path.join(this.projectDir(projectSlug), "Repos", repoSlug);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
private repoKnowledgePath(projectSlug: string, repoSlug: string): string {
|
|
493
|
+
return path.join(this.repoDir(projectSlug, repoSlug), "Knowledge.md");
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
private projectImportedDir(projectSlug: string, kind: string): string {
|
|
497
|
+
return path.join(this.projectDir(projectSlug), "_generated", "imported", kind);
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
private projectEvidenceDir(projectSlug: string, scope: "project" | "repo" | "agent"): string {
|
|
501
|
+
return path.join(this.projectDir(projectSlug), "_generated", "evidence", scope);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
private ensureRoot(): void {
|
|
505
|
+
ensureDir(path.join(this.rootDir, ".agx"));
|
|
506
|
+
ensureDir(this.globalDir());
|
|
507
|
+
ensureDir(this.globalAgentsDir());
|
|
508
|
+
ensureDir(this.globalImportedLearningsDir());
|
|
509
|
+
ensureDir(this.globalEvidenceDir("agent"));
|
|
510
|
+
ensureDir(this.globalEvidenceDir("global"));
|
|
511
|
+
if (!fs.existsSync(this.registryPath())) {
|
|
512
|
+
this.writeRegistry({ version: 1, updatedAt: nowIso(), projects: [], agents: [] });
|
|
513
|
+
}
|
|
514
|
+
if (!fs.existsSync(path.join(this.globalDir(), "_Index.md"))) {
|
|
515
|
+
atomicWriteText(
|
|
516
|
+
path.join(this.globalDir(), "_Index.md"),
|
|
517
|
+
"# Global Knowledge\n\n- [[Playbook]]\n- [[Agents]]\n",
|
|
518
|
+
);
|
|
519
|
+
}
|
|
520
|
+
if (!fs.existsSync(this.globalPlaybookPath())) {
|
|
521
|
+
writeMarkdownFile(
|
|
522
|
+
this.globalPlaybookPath(),
|
|
523
|
+
{
|
|
524
|
+
id: "global-playbook",
|
|
525
|
+
type: "knowledge-note",
|
|
526
|
+
scope: "global",
|
|
527
|
+
subject_id: "playbook",
|
|
528
|
+
slug: "playbook",
|
|
529
|
+
title: "Playbook",
|
|
530
|
+
created_at: nowIso(),
|
|
531
|
+
updated_at: nowIso(),
|
|
532
|
+
version: 1,
|
|
533
|
+
} satisfies GlobalPlaybookFrontmatter,
|
|
534
|
+
"",
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
private readRegistry(): VaultRegistry {
|
|
540
|
+
this.ensureRoot();
|
|
541
|
+
const fallback: VaultRegistry = { version: 1, updatedAt: nowIso(), projects: [], agents: [] };
|
|
542
|
+
const registry = readJsonFile<VaultRegistry>(this.registryPath(), fallback);
|
|
543
|
+
if (!Array.isArray(registry.projects)) registry.projects = [];
|
|
544
|
+
if (!Array.isArray(registry.agents)) registry.agents = [];
|
|
545
|
+
registry.version = 1;
|
|
546
|
+
return registry;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
private writeRegistry(registry: VaultRegistry): void {
|
|
550
|
+
ensureDir(path.join(this.rootDir, ".agx"));
|
|
551
|
+
atomicWriteJson(this.registryPath(), {
|
|
552
|
+
version: 1,
|
|
553
|
+
updatedAt: nowIso(),
|
|
554
|
+
projects: [...registry.projects].sort((a, b) => a.slug.localeCompare(b.slug)),
|
|
555
|
+
agents: [...registry.agents].sort((a, b) => a.slug.localeCompare(b.slug)),
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
private readManifest(projectSlug: string): ProjectManifest | null {
|
|
560
|
+
return readJsonFile<ProjectManifest | null>(this.projectManifestPath(projectSlug), null);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
private writeManifest(projectSlug: string, manifest: ProjectManifest): void {
|
|
564
|
+
atomicWriteJson(this.projectManifestPath(projectSlug), {
|
|
565
|
+
...manifest,
|
|
566
|
+
version: 1,
|
|
567
|
+
updatedAt: nowIso(),
|
|
568
|
+
repos: [...manifest.repos].sort((a, b) => a.slug.localeCompare(b.slug)),
|
|
569
|
+
agents: [...manifest.agents].sort((a, b) => a.routing_order - b.routing_order),
|
|
570
|
+
threads: [...manifest.threads].sort((a, b) => a.created_at.localeCompare(b.created_at)),
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
private findProjectRegistryEntry(projectIdOrSlug: string): RegistryProjectEntry | null {
|
|
575
|
+
const normalized = projectIdOrSlug.trim();
|
|
576
|
+
if (!normalized) return null;
|
|
577
|
+
const registry = this.readRegistry();
|
|
578
|
+
return registry.projects.find((project) => project.id === normalized || project.slug === normalized) ?? null;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
private findProjectRegistryEntryById(projectId: string): RegistryProjectEntry | null {
|
|
582
|
+
const normalized = projectId.trim();
|
|
583
|
+
if (!normalized) return null;
|
|
584
|
+
const registry = this.readRegistry();
|
|
585
|
+
return registry.projects.find((project) => project.id === normalized) ?? null;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
private findRepoEntry(repoId: string): { project: RegistryProjectEntry; repo: RegistryRepoEntry } | null {
|
|
589
|
+
const normalized = repoId.trim();
|
|
590
|
+
if (!normalized) return null;
|
|
591
|
+
const registry = this.readRegistry();
|
|
592
|
+
for (const project of registry.projects) {
|
|
593
|
+
const repo = project.repos.find((entry) => entry.id === normalized);
|
|
594
|
+
if (repo) return { project, repo };
|
|
595
|
+
}
|
|
596
|
+
return null;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
private findAgentEntry(agentId: string): RegistryAgentEntry | null {
|
|
600
|
+
const normalized = agentId.trim();
|
|
601
|
+
if (!normalized) return null;
|
|
602
|
+
const registry = this.readRegistry();
|
|
603
|
+
return registry.agents.find((agent) => agent.id === normalized || agent.slug === normalized) ?? null;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
private nextProjectSlug(base: string, excludeProjectId?: string): string {
|
|
607
|
+
const registry = this.readRegistry();
|
|
608
|
+
const baseSlug = slugify(base, "project");
|
|
609
|
+
let candidate = baseSlug;
|
|
610
|
+
let index = 1;
|
|
611
|
+
while (
|
|
612
|
+
registry.projects.some((project) => project.slug === candidate && project.id !== excludeProjectId)
|
|
613
|
+
) {
|
|
614
|
+
index += 1;
|
|
615
|
+
candidate = `${baseSlug}-${index}`;
|
|
616
|
+
}
|
|
617
|
+
return candidate;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
private nextRepoSlug(projectSlug: string, base: string, excludeRepoId?: string): string {
|
|
621
|
+
const manifest = this.readManifest(projectSlug);
|
|
622
|
+
const baseSlug = slugify(base, "repo");
|
|
623
|
+
let candidate = baseSlug;
|
|
624
|
+
let index = 1;
|
|
625
|
+
while (
|
|
626
|
+
manifest?.repos.some((repo) => repo.slug === candidate && repo.id !== excludeRepoId)
|
|
627
|
+
) {
|
|
628
|
+
index += 1;
|
|
629
|
+
candidate = `${baseSlug}-${index}`;
|
|
630
|
+
}
|
|
631
|
+
return candidate;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
private ensureProjectScaffold(project: Project, repos: Array<ManifestRepoEntry>): void {
|
|
635
|
+
const projectRoot = this.projectDir(project.slug);
|
|
636
|
+
ensureDir(projectRoot);
|
|
637
|
+
ensureDir(path.join(projectRoot, ".agx"));
|
|
638
|
+
ensureDir(path.join(projectRoot, "Context"));
|
|
639
|
+
ensureDir(this.projectSkillsDir(project.slug));
|
|
640
|
+
ensureDir(this.projectVariablesDir(project.slug));
|
|
641
|
+
ensureDir(path.dirname(this.projectAgentsIndexPath(project.slug)));
|
|
642
|
+
ensureDir(this.projectThreadsDir(project.slug));
|
|
643
|
+
ensureDir(path.join(projectRoot, "Repos"));
|
|
644
|
+
ensureDir(this.projectImportedDir(project.slug, "project-memory"));
|
|
645
|
+
ensureDir(this.projectImportedDir(project.slug, "learnings"));
|
|
646
|
+
ensureDir(this.projectEvidenceDir(project.slug, "project"));
|
|
647
|
+
ensureDir(this.projectEvidenceDir(project.slug, "repo"));
|
|
648
|
+
ensureDir(this.projectEvidenceDir(project.slug, "agent"));
|
|
649
|
+
|
|
650
|
+
for (const repo of repos) {
|
|
651
|
+
ensureDir(this.repoDir(project.slug, repo.slug));
|
|
652
|
+
ensureDir(this.projectImportedDir(project.slug, path.join("repo-knowledge", repo.slug)));
|
|
653
|
+
if (!fs.existsSync(path.join(this.repoDir(project.slug, repo.slug), "_index.md"))) {
|
|
654
|
+
atomicWriteText(
|
|
655
|
+
path.join(this.repoDir(project.slug, repo.slug), "_index.md"),
|
|
656
|
+
`# ${repo.name}\n\n- [[Knowledge]]\n`,
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
if (!fs.existsSync(this.repoKnowledgePath(project.slug, repo.slug))) {
|
|
660
|
+
writeMarkdownFile(
|
|
661
|
+
this.repoKnowledgePath(project.slug, repo.slug),
|
|
662
|
+
{
|
|
663
|
+
id: repo.id,
|
|
664
|
+
type: "knowledge-note",
|
|
665
|
+
scope: "repo",
|
|
666
|
+
subject_id: repo.id,
|
|
667
|
+
project_id: project.id,
|
|
668
|
+
repo_id: repo.id,
|
|
669
|
+
slug: repo.slug,
|
|
670
|
+
title: repo.name,
|
|
671
|
+
created_at: repo.created_at,
|
|
672
|
+
updated_at: repo.updated_at,
|
|
673
|
+
version: 1,
|
|
674
|
+
} satisfies RepoKnowledgeFrontmatter,
|
|
675
|
+
repo.notes ?? "",
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
if (!fs.existsSync(path.join(projectRoot, "_Index.md"))) {
|
|
681
|
+
atomicWriteText(
|
|
682
|
+
path.join(projectRoot, "_Index.md"),
|
|
683
|
+
`# ${project.name}\n\n- [[Overview]]\n- [[Architecture]]\n- [[Active Development]]\n- [[Design Decisions]]\n`,
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
if (!fs.existsSync(path.join(projectRoot, "Overview.md"))) {
|
|
687
|
+
atomicWriteText(path.join(projectRoot, "Overview.md"), `# Overview\n\n${project.description?.trim() || ""}\n`);
|
|
688
|
+
}
|
|
689
|
+
if (!fs.existsSync(path.join(projectRoot, "Architecture.md"))) {
|
|
690
|
+
atomicWriteText(path.join(projectRoot, "Architecture.md"), "# Architecture\n");
|
|
691
|
+
}
|
|
692
|
+
if (!fs.existsSync(path.join(projectRoot, "Active Development.md"))) {
|
|
693
|
+
atomicWriteText(path.join(projectRoot, "Active Development.md"), "# Active Development\n");
|
|
694
|
+
}
|
|
695
|
+
if (!fs.existsSync(path.join(projectRoot, "Design Decisions.md"))) {
|
|
696
|
+
atomicWriteText(path.join(projectRoot, "Design Decisions.md"), "# Design Decisions\n");
|
|
697
|
+
}
|
|
698
|
+
if (!fs.existsSync(this.projectContextPath(project.slug))) {
|
|
699
|
+
writeMarkdownFile(
|
|
700
|
+
this.projectContextPath(project.slug),
|
|
701
|
+
{
|
|
702
|
+
id: project.id,
|
|
703
|
+
type: "knowledge-note",
|
|
704
|
+
scope: "project",
|
|
705
|
+
subject_id: project.id,
|
|
706
|
+
project_id: project.id,
|
|
707
|
+
slug: project.slug,
|
|
708
|
+
title: project.name,
|
|
709
|
+
created_at: project.created_at,
|
|
710
|
+
updated_at: project.updated_at,
|
|
711
|
+
version: 1,
|
|
712
|
+
} satisfies ProjectContextFrontmatter,
|
|
713
|
+
project.description?.trim() || "",
|
|
714
|
+
);
|
|
715
|
+
}
|
|
716
|
+
if (!fs.existsSync(this.projectAgentsIndexPath(project.slug))) {
|
|
717
|
+
writeMarkdownFile(
|
|
718
|
+
this.projectAgentsIndexPath(project.slug),
|
|
719
|
+
{
|
|
720
|
+
id: `project-agents:${project.id}`,
|
|
721
|
+
type: "project-agents",
|
|
722
|
+
project_id: project.id,
|
|
723
|
+
title: `${project.name} Agents`,
|
|
724
|
+
created_at: project.created_at,
|
|
725
|
+
updated_at: project.updated_at,
|
|
726
|
+
agents: [],
|
|
727
|
+
} satisfies ProjectAgentsIndexFrontmatter,
|
|
728
|
+
"# Project Agents\n",
|
|
729
|
+
);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
private toRegistryRepos(repos: ManifestRepoEntry[]): RegistryRepoEntry[] {
|
|
734
|
+
return repos.map((repo) => ({
|
|
735
|
+
id: repo.id,
|
|
736
|
+
slug: repo.slug,
|
|
737
|
+
name: repo.name,
|
|
738
|
+
path: repo.path ?? null,
|
|
739
|
+
git_url: repo.git_url ?? null,
|
|
740
|
+
}));
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
private updateProjectRegistryEntry(project: Project, repos: ManifestRepoEntry[]): void {
|
|
744
|
+
const registry = this.readRegistry();
|
|
745
|
+
const nextEntry: RegistryProjectEntry = {
|
|
746
|
+
id: project.id,
|
|
747
|
+
slug: project.slug,
|
|
748
|
+
name: project.name,
|
|
749
|
+
path: this.projectDir(project.slug),
|
|
750
|
+
created_at: project.created_at,
|
|
751
|
+
updated_at: project.updated_at,
|
|
752
|
+
repos: this.toRegistryRepos(repos),
|
|
753
|
+
};
|
|
754
|
+
const nextProjects = registry.projects.filter((entry) => entry.id !== project.id);
|
|
755
|
+
nextProjects.push(nextEntry);
|
|
756
|
+
this.writeRegistry({ ...registry, projects: nextProjects });
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
private removeProjectRegistryEntry(projectId: string): void {
|
|
760
|
+
const registry = this.readRegistry();
|
|
761
|
+
this.writeRegistry({ ...registry, projects: registry.projects.filter((project) => project.id !== projectId) });
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
private ensureAgentRegistryEntry(agentId: string, name?: string): RegistryAgentEntry {
|
|
765
|
+
const registry = this.readRegistry();
|
|
766
|
+
const existing = registry.agents.find((agent) => agent.id === agentId);
|
|
767
|
+
if (existing) return existing;
|
|
768
|
+
const slug = slugify(name || agentId, "agent");
|
|
769
|
+
const createdAt = nowIso();
|
|
770
|
+
const entry: RegistryAgentEntry = {
|
|
771
|
+
id: agentId,
|
|
772
|
+
slug,
|
|
773
|
+
name: name || agentId,
|
|
774
|
+
path: path.join(this.globalAgentsDir(), `${slug}.md`),
|
|
775
|
+
created_at: createdAt,
|
|
776
|
+
updated_at: createdAt,
|
|
777
|
+
};
|
|
778
|
+
this.writeRegistry({ ...registry, agents: [...registry.agents, entry] });
|
|
779
|
+
return entry;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
private updateAgentRegistryEntry(agentId: string, name: string): RegistryAgentEntry {
|
|
783
|
+
const registry = this.readRegistry();
|
|
784
|
+
const existing = registry.agents.find((agent) => agent.id === agentId);
|
|
785
|
+
if (!existing) return this.ensureAgentRegistryEntry(agentId, name);
|
|
786
|
+
const nextEntry: RegistryAgentEntry = {
|
|
787
|
+
...existing,
|
|
788
|
+
name,
|
|
789
|
+
updated_at: nowIso(),
|
|
790
|
+
};
|
|
791
|
+
this.writeRegistry({
|
|
792
|
+
...registry,
|
|
793
|
+
agents: [...registry.agents.filter((agent) => agent.id !== agentId), nextEntry],
|
|
794
|
+
});
|
|
795
|
+
return nextEntry;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
listProjects(userId?: string): ProjectWithRepos[] {
|
|
799
|
+
const registry = this.readRegistry();
|
|
800
|
+
return registry.projects
|
|
801
|
+
.map((entry) => this.getProjectWithRepos(entry.id, userId))
|
|
802
|
+
.filter((project): project is ProjectWithRepos => Boolean(project));
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
getProjectBySlug(slug: string, userId?: string): Project | null {
|
|
806
|
+
const project = this.getProjectWithRepos(slug, userId);
|
|
807
|
+
return project ? { ...project, repos: undefined } as Project : null;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
getProjectRepos(projectId: string): ProjectRepo[] {
|
|
811
|
+
const project = this.getProjectWithRepos(projectId);
|
|
812
|
+
return project?.repos ?? [];
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
getProjectWithRepos(projectIdOrSlug: string, userId?: string): ProjectWithRepos | null {
|
|
816
|
+
const entry = this.findProjectRegistryEntry(projectIdOrSlug);
|
|
817
|
+
if (!entry) return null;
|
|
818
|
+
const manifest = this.readManifest(entry.slug);
|
|
819
|
+
if (!manifest) return null;
|
|
820
|
+
if (userId && manifest.project.user_id && manifest.project.user_id !== userId) {
|
|
821
|
+
return null;
|
|
822
|
+
}
|
|
823
|
+
const repos = manifest.repos.map((repo) => ({
|
|
824
|
+
id: repo.id,
|
|
825
|
+
project_id: repo.project_id,
|
|
826
|
+
name: repo.name,
|
|
827
|
+
path: repo.path ?? "",
|
|
828
|
+
git_url: repo.git_url ?? undefined,
|
|
829
|
+
notes: this.getKnowledgeNote("repo", repo.id)?.content || "",
|
|
830
|
+
created_at: repo.created_at,
|
|
831
|
+
updated_at: repo.updated_at,
|
|
832
|
+
}));
|
|
833
|
+
return {
|
|
834
|
+
...manifest.project,
|
|
835
|
+
repos,
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
createProject(userId: string, input: ProjectInput): ProjectWithRepos {
|
|
840
|
+
const timestamp = nowIso();
|
|
841
|
+
const slug = this.nextProjectSlug(input.name || "project");
|
|
842
|
+
const project: Project = {
|
|
843
|
+
id: randomUUID(),
|
|
844
|
+
user_id: userId,
|
|
845
|
+
name: input.name.trim(),
|
|
846
|
+
slug,
|
|
847
|
+
description: input.description?.trim() || "",
|
|
848
|
+
metadata: {},
|
|
849
|
+
workflow_id: input.workflow_id ?? null,
|
|
850
|
+
created_at: timestamp,
|
|
851
|
+
updated_at: timestamp,
|
|
852
|
+
};
|
|
853
|
+
const repos: ManifestRepoEntry[] = (input.repos ?? []).map((repo) => {
|
|
854
|
+
const repoSlug = this.nextRepoSlug(project.slug, repo.name || repo.path || "repo");
|
|
855
|
+
const repoId = repo.id?.trim() || randomUUID();
|
|
856
|
+
return {
|
|
857
|
+
id: repoId,
|
|
858
|
+
project_id: project.id,
|
|
859
|
+
name: repo.name.trim(),
|
|
860
|
+
path: repo.path ?? "",
|
|
861
|
+
git_url: repo.git_url ?? undefined,
|
|
862
|
+
notes: repo.notes ?? "",
|
|
863
|
+
created_at: timestamp,
|
|
864
|
+
updated_at: timestamp,
|
|
865
|
+
slug: repoSlug,
|
|
866
|
+
};
|
|
867
|
+
});
|
|
868
|
+
this.ensureProjectScaffold(project, repos);
|
|
869
|
+
this.writeManifest(project.slug, {
|
|
870
|
+
version: 1,
|
|
871
|
+
updatedAt: timestamp,
|
|
872
|
+
project,
|
|
873
|
+
repos,
|
|
874
|
+
agents: [],
|
|
875
|
+
threads: [],
|
|
876
|
+
});
|
|
877
|
+
this.updateProjectRegistryEntry(project, repos);
|
|
878
|
+
for (const repo of repos) {
|
|
879
|
+
if (repo.notes?.trim()) {
|
|
880
|
+
this.upsertKnowledgeNote({
|
|
881
|
+
scope: "repo",
|
|
882
|
+
subjectId: repo.id,
|
|
883
|
+
content: repo.notes,
|
|
884
|
+
changeSummary: "Initial repo note",
|
|
885
|
+
sourceType: "manual",
|
|
886
|
+
sourceId: "project-create",
|
|
887
|
+
metadata: { project_id: project.id },
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
return this.getProjectWithRepos(project.id, userId)!;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
updateProject(projectIdOrSlug: string, userId: string, updates: ProjectUpdatePayload): ProjectWithRepos | null {
|
|
895
|
+
const current = this.getProjectWithRepos(projectIdOrSlug, userId);
|
|
896
|
+
if (!current) return null;
|
|
897
|
+
const currentManifest = this.readManifest(current.slug);
|
|
898
|
+
if (!currentManifest) return null;
|
|
899
|
+
|
|
900
|
+
const nextSlug = updates.slug?.trim()
|
|
901
|
+
? this.nextProjectSlug(updates.slug.trim(), current.id)
|
|
902
|
+
: current.slug;
|
|
903
|
+
const nextUpdatedAt = nowIso();
|
|
904
|
+
const nextProject: Project = {
|
|
905
|
+
...currentManifest.project,
|
|
906
|
+
name: typeof updates.name === "string" && updates.name.trim() ? updates.name.trim() : currentManifest.project.name,
|
|
907
|
+
slug: nextSlug,
|
|
908
|
+
description: updates.description !== undefined ? (updates.description ?? "") : (currentManifest.project.description ?? ""),
|
|
909
|
+
metadata: updates.metadata !== undefined ? (updates.metadata ?? {}) : (currentManifest.project.metadata ?? {}),
|
|
910
|
+
ci_cd_info: updates.ci_cd_info !== undefined ? (updates.ci_cd_info ?? undefined) : currentManifest.project.ci_cd_info,
|
|
911
|
+
workflow_id: updates.workflow_id !== undefined ? (updates.workflow_id ?? null) : currentManifest.project.workflow_id,
|
|
912
|
+
updated_at: nextUpdatedAt,
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
let manifestRepos = currentManifest.repos;
|
|
916
|
+
if (updates.repos) {
|
|
917
|
+
const updatedRepos: ManifestRepoEntry[] = [];
|
|
918
|
+
const byId = new Map(currentManifest.repos.map((repo) => [repo.id, repo]));
|
|
919
|
+
for (const inputRepo of updates.repos) {
|
|
920
|
+
const existing = inputRepo.id ? byId.get(inputRepo.id) : undefined;
|
|
921
|
+
const repoId = existing?.id || inputRepo.id?.trim() || randomUUID();
|
|
922
|
+
const repoSlug = existing?.slug || this.nextRepoSlug(nextProject.slug, inputRepo.name || inputRepo.path || "repo", repoId);
|
|
923
|
+
updatedRepos.push({
|
|
924
|
+
id: repoId,
|
|
925
|
+
project_id: current.id,
|
|
926
|
+
name: inputRepo.name.trim(),
|
|
927
|
+
path: inputRepo.path ?? "",
|
|
928
|
+
git_url: inputRepo.git_url ?? undefined,
|
|
929
|
+
notes: inputRepo.notes ?? "",
|
|
930
|
+
created_at: existing?.created_at || nextUpdatedAt,
|
|
931
|
+
updated_at: nextUpdatedAt,
|
|
932
|
+
slug: repoSlug,
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
for (const repo of currentManifest.repos) {
|
|
937
|
+
if (updatedRepos.some((candidate) => candidate.id === repo.id)) continue;
|
|
938
|
+
removeDirIfExists(this.repoDir(current.slug, repo.slug));
|
|
939
|
+
}
|
|
940
|
+
manifestRepos = updatedRepos;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
if (nextSlug !== current.slug) {
|
|
944
|
+
removeDirIfExists(this.projectDir(nextSlug));
|
|
945
|
+
fs.renameSync(this.projectDir(current.slug), this.projectDir(nextSlug));
|
|
946
|
+
}
|
|
947
|
+
this.ensureProjectScaffold(nextProject, manifestRepos);
|
|
948
|
+
|
|
949
|
+
this.writeManifest(nextProject.slug, {
|
|
950
|
+
version: 1,
|
|
951
|
+
updatedAt: nextUpdatedAt,
|
|
952
|
+
project: nextProject,
|
|
953
|
+
repos: manifestRepos,
|
|
954
|
+
agents: currentManifest.agents,
|
|
955
|
+
threads: currentManifest.threads,
|
|
956
|
+
});
|
|
957
|
+
this.updateProjectRegistryEntry(nextProject, manifestRepos);
|
|
958
|
+
for (const repo of manifestRepos) {
|
|
959
|
+
const noteContent = updates.repos?.find((item) => (item.id || repo.id) === repo.id)?.notes;
|
|
960
|
+
if (typeof noteContent === "string") {
|
|
961
|
+
this.upsertKnowledgeNote({
|
|
962
|
+
scope: "repo",
|
|
963
|
+
subjectId: repo.id,
|
|
964
|
+
content: noteContent,
|
|
965
|
+
changeSummary: "Repo note updated",
|
|
966
|
+
sourceType: "manual",
|
|
967
|
+
sourceId: "project-update",
|
|
968
|
+
metadata: { project_id: nextProject.id },
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return this.getProjectWithRepos(nextProject.id, userId);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
deleteProject(projectId: string, userId?: string): void {
|
|
976
|
+
const project = this.getProjectWithRepos(projectId, userId);
|
|
977
|
+
if (!project) return;
|
|
978
|
+
removeDirIfExists(this.projectDir(project.slug));
|
|
979
|
+
this.removeProjectRegistryEntry(project.id);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
getProjectAgents(projectId: string): ProjectAgent[] {
|
|
983
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
984
|
+
if (!project) return [];
|
|
985
|
+
const indexFile = readMarkdownFile<ProjectAgentsIndexFrontmatter>(this.projectAgentsIndexPath(project.slug));
|
|
986
|
+
const agents = Array.isArray(indexFile?.frontmatter?.agents) ? indexFile!.frontmatter.agents : [];
|
|
987
|
+
return [...agents].sort((a, b) => a.routing_order - b.routing_order);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
addProjectAgent(projectId: string, agentId: string, routingOrder?: number): ProjectAgent {
|
|
991
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
992
|
+
if (!project) {
|
|
993
|
+
throw new Error("Project not found");
|
|
994
|
+
}
|
|
995
|
+
const current = this.getProjectAgents(projectId).filter((entry) => entry.agent_id !== agentId);
|
|
996
|
+
const nextOrder = routingOrder ?? current.length;
|
|
997
|
+
const timestamp = nowIso();
|
|
998
|
+
current.push({
|
|
999
|
+
project_id: projectId,
|
|
1000
|
+
agent_id: agentId,
|
|
1001
|
+
routing_order: nextOrder,
|
|
1002
|
+
created_at: timestamp,
|
|
1003
|
+
});
|
|
1004
|
+
const normalized = current
|
|
1005
|
+
.sort((a, b) => a.routing_order - b.routing_order)
|
|
1006
|
+
.map((entry, index) => ({ ...entry, routing_order: index }));
|
|
1007
|
+
this.writeProjectAgents(project.slug, projectId, normalized);
|
|
1008
|
+
return normalized.find((entry) => entry.agent_id === agentId)!;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
removeProjectAgent(projectId: string, agentId: string): void {
|
|
1012
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1013
|
+
if (!project) return;
|
|
1014
|
+
const remaining = this.getProjectAgents(projectId)
|
|
1015
|
+
.filter((entry) => entry.agent_id !== agentId)
|
|
1016
|
+
.map((entry, index) => ({ ...entry, routing_order: index }));
|
|
1017
|
+
this.writeProjectAgents(project.slug, projectId, remaining);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
reorderProjectAgents(projectId: string, orderedAgentIds: string[]): ProjectAgent[] {
|
|
1021
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1022
|
+
if (!project) return [];
|
|
1023
|
+
const current = this.getProjectAgents(projectId);
|
|
1024
|
+
const byId = new Map(current.map((entry) => [entry.agent_id, entry]));
|
|
1025
|
+
const next = orderedAgentIds
|
|
1026
|
+
.map((agentId, index) => {
|
|
1027
|
+
const entry = byId.get(agentId);
|
|
1028
|
+
if (!entry) return null;
|
|
1029
|
+
return { ...entry, routing_order: index };
|
|
1030
|
+
})
|
|
1031
|
+
.filter((entry): entry is ProjectAgent => Boolean(entry));
|
|
1032
|
+
this.writeProjectAgents(project.slug, projectId, next);
|
|
1033
|
+
return next;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
private writeProjectAgents(projectSlug: string, projectId: string, agents: ProjectAgent[]): void {
|
|
1037
|
+
const indexPath = this.projectAgentsIndexPath(projectSlug);
|
|
1038
|
+
const existing = readMarkdownFile<ProjectAgentsIndexFrontmatter>(indexPath);
|
|
1039
|
+
const createdAt = existing?.frontmatter?.created_at || nowIso();
|
|
1040
|
+
writeMarkdownFile(
|
|
1041
|
+
indexPath,
|
|
1042
|
+
{
|
|
1043
|
+
id: existing?.frontmatter?.id || `project-agents:${projectId}`,
|
|
1044
|
+
type: "project-agents",
|
|
1045
|
+
project_id: projectId,
|
|
1046
|
+
title: "Project Agents",
|
|
1047
|
+
created_at: createdAt,
|
|
1048
|
+
updated_at: nowIso(),
|
|
1049
|
+
agents,
|
|
1050
|
+
} satisfies ProjectAgentsIndexFrontmatter,
|
|
1051
|
+
"# Project Agents\n",
|
|
1052
|
+
);
|
|
1053
|
+
const manifest = this.readManifest(projectSlug);
|
|
1054
|
+
if (manifest) {
|
|
1055
|
+
this.writeManifest(projectSlug, { ...manifest, agents });
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
getProjectSkills(projectId: string): ProjectSkill[] {
|
|
1060
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1061
|
+
if (!project) return [];
|
|
1062
|
+
const skills: Array<ProjectSkill & { updatedAt: string; createdAt: string }> = [];
|
|
1063
|
+
for (const filePath of listMarkdownFiles(this.projectSkillsDir(project.slug))) {
|
|
1064
|
+
const markdown = readMarkdownFile<ProjectSkillFrontmatter>(filePath);
|
|
1065
|
+
if (!markdown) continue;
|
|
1066
|
+
const id = String(markdown.frontmatter.id || "").trim();
|
|
1067
|
+
const file = String(markdown.frontmatter.file || "").trim();
|
|
1068
|
+
const createdAt = String(markdown.frontmatter.created_at || "");
|
|
1069
|
+
if (!id || !file) continue;
|
|
1070
|
+
skills.push({
|
|
1071
|
+
id,
|
|
1072
|
+
project_id: String(markdown.frontmatter.project_id || projectId),
|
|
1073
|
+
file,
|
|
1074
|
+
condition: typeof markdown.frontmatter.condition === "string" ? markdown.frontmatter.condition : undefined,
|
|
1075
|
+
created_at: createdAt,
|
|
1076
|
+
updatedAt: createdAt,
|
|
1077
|
+
createdAt,
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
return sortByTimestampDesc(skills).map(({ updatedAt: _updatedAt, createdAt: _createdAt, ...entry }) => entry);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
addProjectSkill(projectId: string, file: string, condition?: string): ProjectSkill {
|
|
1084
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1085
|
+
if (!project) throw new Error("Project not found");
|
|
1086
|
+
const timestamp = nowIso();
|
|
1087
|
+
const id = randomUUID();
|
|
1088
|
+
const fileSlug = slugify(path.basename(file) || id, "skill");
|
|
1089
|
+
writeMarkdownFile(
|
|
1090
|
+
path.join(this.projectSkillsDir(project.slug), `${fileSlug}-${id.slice(0, 8)}.md`),
|
|
1091
|
+
{
|
|
1092
|
+
id,
|
|
1093
|
+
type: "project-skill",
|
|
1094
|
+
project_id: projectId,
|
|
1095
|
+
title: path.basename(file) || file,
|
|
1096
|
+
file,
|
|
1097
|
+
condition: condition ?? null,
|
|
1098
|
+
created_at: timestamp,
|
|
1099
|
+
updated_at: timestamp,
|
|
1100
|
+
} satisfies ProjectSkillFrontmatter,
|
|
1101
|
+
`# ${path.basename(file) || file}\n`,
|
|
1102
|
+
);
|
|
1103
|
+
return {
|
|
1104
|
+
id,
|
|
1105
|
+
project_id: projectId,
|
|
1106
|
+
file,
|
|
1107
|
+
condition,
|
|
1108
|
+
created_at: timestamp,
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
removeProjectSkill(skillId: string): void {
|
|
1113
|
+
const registry = this.readRegistry();
|
|
1114
|
+
for (const project of registry.projects) {
|
|
1115
|
+
for (const filePath of listMarkdownFiles(this.projectSkillsDir(project.slug))) {
|
|
1116
|
+
const markdown = readMarkdownFile<ProjectSkillFrontmatter>(filePath);
|
|
1117
|
+
if (markdown?.frontmatter?.id === skillId) {
|
|
1118
|
+
fs.unlinkSync(filePath);
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
getProjectVariables(projectId: string): ProjectVariable[] {
|
|
1126
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1127
|
+
if (!project) return [];
|
|
1128
|
+
return listMarkdownFiles(this.projectVariablesDir(project.slug))
|
|
1129
|
+
.map((filePath) => {
|
|
1130
|
+
const markdown = readMarkdownFile<ProjectVariableFrontmatter>(filePath);
|
|
1131
|
+
if (!markdown) return null;
|
|
1132
|
+
return {
|
|
1133
|
+
project_id: String(markdown.frontmatter.project_id || projectId),
|
|
1134
|
+
key: String(markdown.frontmatter.key || ""),
|
|
1135
|
+
value: String(markdown.frontmatter.value || ""),
|
|
1136
|
+
} satisfies ProjectVariable;
|
|
1137
|
+
})
|
|
1138
|
+
.filter((entry): entry is ProjectVariable => Boolean(entry?.key));
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
setProjectVariable(projectId: string, key: string, value: string): ProjectVariable {
|
|
1142
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1143
|
+
if (!project) throw new Error("Project not found");
|
|
1144
|
+
const existingPath = path.join(this.projectVariablesDir(project.slug), `${slugify(key, "var")}.md`);
|
|
1145
|
+
const existing = readMarkdownFile<ProjectVariableFrontmatter>(existingPath);
|
|
1146
|
+
const timestamp = nowIso();
|
|
1147
|
+
writeMarkdownFile(
|
|
1148
|
+
existingPath,
|
|
1149
|
+
{
|
|
1150
|
+
id: existing?.frontmatter?.id || `project-variable:${projectId}:${key}`,
|
|
1151
|
+
type: "project-variable",
|
|
1152
|
+
project_id: projectId,
|
|
1153
|
+
title: key,
|
|
1154
|
+
key,
|
|
1155
|
+
value,
|
|
1156
|
+
created_at: existing?.frontmatter?.created_at || timestamp,
|
|
1157
|
+
updated_at: timestamp,
|
|
1158
|
+
} satisfies ProjectVariableFrontmatter,
|
|
1159
|
+
"",
|
|
1160
|
+
);
|
|
1161
|
+
return { project_id: projectId, key, value };
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
deleteProjectVariable(projectId: string, key: string): void {
|
|
1165
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1166
|
+
if (!project) return;
|
|
1167
|
+
const filePath = path.join(this.projectVariablesDir(project.slug), `${slugify(key, "var")}.md`);
|
|
1168
|
+
if (fs.existsSync(filePath)) {
|
|
1169
|
+
fs.unlinkSync(filePath);
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
getProjectMemory(projectId: string): ProjectMemory[] {
|
|
1174
|
+
const note = this.getKnowledgeNote("project", projectId);
|
|
1175
|
+
if (!note?.content.trim()) return [];
|
|
1176
|
+
return [{
|
|
1177
|
+
id: note.id,
|
|
1178
|
+
project_id: projectId,
|
|
1179
|
+
content: note.content,
|
|
1180
|
+
source: note.sourceType || "vault",
|
|
1181
|
+
producer: "human",
|
|
1182
|
+
created_at: note.updatedAt,
|
|
1183
|
+
}];
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
addProjectMemory(projectId: string, content: string, source?: string, producer: "human" | "system" = "human"): ProjectMemory {
|
|
1187
|
+
const existing = this.getKnowledgeNote("project", projectId)?.content ?? "";
|
|
1188
|
+
const nextContent = existing.trim() ? `${existing.trim()}\n\n- ${content.trim().replace(/^\-\s*/, "")}` : content.trim();
|
|
1189
|
+
const { note } = this.upsertKnowledgeNote({
|
|
1190
|
+
scope: "project",
|
|
1191
|
+
subjectId: projectId,
|
|
1192
|
+
content: nextContent,
|
|
1193
|
+
changeSummary: source || "Project memory updated",
|
|
1194
|
+
sourceType: producer === "system" ? "task_completion" : "manual",
|
|
1195
|
+
sourceId: source || "manual-project-memory",
|
|
1196
|
+
metadata: { producer },
|
|
1197
|
+
});
|
|
1198
|
+
return {
|
|
1199
|
+
id: note.id,
|
|
1200
|
+
project_id: projectId,
|
|
1201
|
+
content: note.content,
|
|
1202
|
+
source: note.changeSummary || undefined,
|
|
1203
|
+
producer,
|
|
1204
|
+
created_at: note.updatedAt,
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
deleteProjectMemory(projectId: string): void {
|
|
1209
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1210
|
+
if (!project) return;
|
|
1211
|
+
const notePath = this.projectContextPath(project.slug);
|
|
1212
|
+
const markdown = readMarkdownFile<ProjectContextFrontmatter>(notePath);
|
|
1213
|
+
if (!markdown) return;
|
|
1214
|
+
writeMarkdownFile(notePath, { ...markdown.frontmatter, updated_at: nowIso() }, "");
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
getProjectThreads(projectId: string): ProjectThread[] {
|
|
1218
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1219
|
+
if (!project) return [];
|
|
1220
|
+
const manifest = this.readManifest(project.slug);
|
|
1221
|
+
return manifest?.threads ?? [];
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
addProjectThread(projectId: string, threadId: string): ProjectThread {
|
|
1225
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1226
|
+
if (!project) throw new Error("Project not found");
|
|
1227
|
+
const manifest = this.readManifest(project.slug);
|
|
1228
|
+
if (!manifest) throw new Error("Project manifest missing");
|
|
1229
|
+
const existing = manifest.threads.find((thread) => thread.thread_id === threadId);
|
|
1230
|
+
if (existing) return existing;
|
|
1231
|
+
const timestamp = nowIso();
|
|
1232
|
+
const thread: ProjectThread = {
|
|
1233
|
+
project_id: projectId,
|
|
1234
|
+
thread_id: threadId,
|
|
1235
|
+
created_at: timestamp,
|
|
1236
|
+
};
|
|
1237
|
+
writeMarkdownFile(
|
|
1238
|
+
path.join(this.projectThreadsDir(project.slug), `${encodeURIComponent(threadId)}.md`),
|
|
1239
|
+
{
|
|
1240
|
+
id: `project-thread:${projectId}:${threadId}`,
|
|
1241
|
+
type: "project-thread",
|
|
1242
|
+
project_id: projectId,
|
|
1243
|
+
thread_id: threadId,
|
|
1244
|
+
title: threadId,
|
|
1245
|
+
created_at: timestamp,
|
|
1246
|
+
updated_at: timestamp,
|
|
1247
|
+
} satisfies ProjectThreadFrontmatter,
|
|
1248
|
+
`# Thread ${threadId}\n`,
|
|
1249
|
+
);
|
|
1250
|
+
this.writeManifest(project.slug, { ...manifest, threads: [...manifest.threads, thread] });
|
|
1251
|
+
return thread;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
removeProjectThread(projectId: string, threadId: string): void {
|
|
1255
|
+
const project = this.findProjectRegistryEntryById(projectId);
|
|
1256
|
+
if (!project) return;
|
|
1257
|
+
const manifest = this.readManifest(project.slug);
|
|
1258
|
+
if (!manifest) return;
|
|
1259
|
+
const filePath = path.join(this.projectThreadsDir(project.slug), `${encodeURIComponent(threadId)}.md`);
|
|
1260
|
+
if (fs.existsSync(filePath)) {
|
|
1261
|
+
fs.unlinkSync(filePath);
|
|
1262
|
+
}
|
|
1263
|
+
this.writeManifest(project.slug, {
|
|
1264
|
+
...manifest,
|
|
1265
|
+
threads: manifest.threads.filter((thread) => thread.thread_id !== threadId),
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
getProjectForThread(threadId: string): string | null {
|
|
1270
|
+
const registry = this.readRegistry();
|
|
1271
|
+
for (const project of registry.projects) {
|
|
1272
|
+
const manifest = this.readManifest(project.slug);
|
|
1273
|
+
if (manifest?.threads.some((thread) => thread.thread_id === threadId)) {
|
|
1274
|
+
return manifest.project.id;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
return null;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
getKnowledgeNote(scope: VaultKnowledgeScope, subjectId: string): VaultKnowledgeNote | null {
|
|
1281
|
+
const resolved = this.resolveKnowledgeNotePath(scope, subjectId);
|
|
1282
|
+
if (!resolved) return null;
|
|
1283
|
+
const markdown = readMarkdownFile<Record<string, unknown>>(resolved.path);
|
|
1284
|
+
if (!markdown) return null;
|
|
1285
|
+
const frontmatter = markdown.frontmatter;
|
|
1286
|
+
return {
|
|
1287
|
+
id: String(frontmatter.id || subjectId),
|
|
1288
|
+
scope,
|
|
1289
|
+
subjectId,
|
|
1290
|
+
content: markdown.body,
|
|
1291
|
+
changeSummary: typeof frontmatter.change_summary === "string" ? frontmatter.change_summary : null,
|
|
1292
|
+
sourceType: (typeof frontmatter.source_type === "string" ? frontmatter.source_type : "manual") as VaultKnowledgeSourceType,
|
|
1293
|
+
sourceId: typeof frontmatter.source_id === "string" ? frontmatter.source_id : "vault",
|
|
1294
|
+
metadata: isPlainObject(frontmatter.metadata) ? frontmatter.metadata : {},
|
|
1295
|
+
version: typeof frontmatter.version === "number" ? frontmatter.version : 1,
|
|
1296
|
+
createdAt: typeof frontmatter.created_at === "string" ? frontmatter.created_at : nowIso(),
|
|
1297
|
+
updatedAt: typeof frontmatter.updated_at === "string" ? frontmatter.updated_at : nowIso(),
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
upsertKnowledgeNote(input: VaultKnowledgeNoteInput): { note: VaultKnowledgeNote; changed: boolean } {
|
|
1302
|
+
const resolved = this.resolveKnowledgeNotePath(input.scope, input.subjectId, { createIfMissing: true });
|
|
1303
|
+
if (!resolved) {
|
|
1304
|
+
throw new Error(`Cannot resolve knowledge note for ${input.scope}:${input.subjectId}`);
|
|
1305
|
+
}
|
|
1306
|
+
const existing = this.getKnowledgeNote(input.scope, input.subjectId);
|
|
1307
|
+
const normalized = normalizeMarkdownBody(input.content);
|
|
1308
|
+
if (existing && normalizeMarkdownBody(existing.content) === normalized) {
|
|
1309
|
+
return { note: existing, changed: false };
|
|
1310
|
+
}
|
|
1311
|
+
const createdAt = existing?.createdAt || nowIso();
|
|
1312
|
+
const version = (existing?.version || 0) + 1;
|
|
1313
|
+
const frontmatter = {
|
|
1314
|
+
...resolved.frontmatter,
|
|
1315
|
+
updated_at: nowIso(),
|
|
1316
|
+
created_at: createdAt,
|
|
1317
|
+
source_type: input.sourceType,
|
|
1318
|
+
source_id: input.sourceId,
|
|
1319
|
+
change_summary: input.changeSummary ?? null,
|
|
1320
|
+
version,
|
|
1321
|
+
metadata: input.metadata ?? {},
|
|
1322
|
+
};
|
|
1323
|
+
writeMarkdownFile(resolved.path, frontmatter, normalized);
|
|
1324
|
+
const note = this.getKnowledgeNote(input.scope, input.subjectId);
|
|
1325
|
+
if (!note) throw new Error("Failed to read knowledge note after write");
|
|
1326
|
+
return { note, changed: true };
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
private resolveKnowledgeNotePath(
|
|
1330
|
+
scope: VaultKnowledgeScope,
|
|
1331
|
+
subjectId: string,
|
|
1332
|
+
options?: { createIfMissing?: boolean },
|
|
1333
|
+
): { path: string; frontmatter: Record<string, unknown> } | null {
|
|
1334
|
+
if (scope === "global") {
|
|
1335
|
+
const timestamp = nowIso();
|
|
1336
|
+
this.ensureRoot();
|
|
1337
|
+
return {
|
|
1338
|
+
path: this.globalPlaybookPath(),
|
|
1339
|
+
frontmatter: {
|
|
1340
|
+
id: "global-playbook",
|
|
1341
|
+
type: "knowledge-note",
|
|
1342
|
+
scope: "global",
|
|
1343
|
+
subject_id: subjectId || "playbook",
|
|
1344
|
+
slug: "playbook",
|
|
1345
|
+
title: "Playbook",
|
|
1346
|
+
created_at: timestamp,
|
|
1347
|
+
updated_at: timestamp,
|
|
1348
|
+
} satisfies GlobalPlaybookFrontmatter,
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
if (scope === "project") {
|
|
1353
|
+
const project = this.findProjectRegistryEntryById(subjectId);
|
|
1354
|
+
if (!project) return null;
|
|
1355
|
+
const timestamp = nowIso();
|
|
1356
|
+
return {
|
|
1357
|
+
path: this.projectContextPath(project.slug),
|
|
1358
|
+
frontmatter: {
|
|
1359
|
+
id: subjectId,
|
|
1360
|
+
type: "knowledge-note",
|
|
1361
|
+
scope: "project",
|
|
1362
|
+
subject_id: subjectId,
|
|
1363
|
+
project_id: subjectId,
|
|
1364
|
+
slug: project.slug,
|
|
1365
|
+
title: project.name,
|
|
1366
|
+
created_at: timestamp,
|
|
1367
|
+
updated_at: timestamp,
|
|
1368
|
+
} satisfies ProjectContextFrontmatter,
|
|
1369
|
+
};
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
if (scope === "repo") {
|
|
1373
|
+
const located = this.findRepoEntry(subjectId);
|
|
1374
|
+
if (!located) return null;
|
|
1375
|
+
const timestamp = nowIso();
|
|
1376
|
+
return {
|
|
1377
|
+
path: this.repoKnowledgePath(located.project.slug, located.repo.slug),
|
|
1378
|
+
frontmatter: {
|
|
1379
|
+
id: subjectId,
|
|
1380
|
+
type: "knowledge-note",
|
|
1381
|
+
scope: "repo",
|
|
1382
|
+
subject_id: subjectId,
|
|
1383
|
+
project_id: located.project.id,
|
|
1384
|
+
repo_id: subjectId,
|
|
1385
|
+
slug: located.repo.slug,
|
|
1386
|
+
title: located.repo.name,
|
|
1387
|
+
created_at: timestamp,
|
|
1388
|
+
updated_at: timestamp,
|
|
1389
|
+
} satisfies RepoKnowledgeFrontmatter,
|
|
1390
|
+
};
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
const agent = this.findAgentEntry(subjectId) ?? (options?.createIfMissing ? this.ensureAgentRegistryEntry(subjectId, subjectId) : null);
|
|
1394
|
+
if (!agent) return null;
|
|
1395
|
+
const timestamp = nowIso();
|
|
1396
|
+
return {
|
|
1397
|
+
path: agent.path,
|
|
1398
|
+
frontmatter: {
|
|
1399
|
+
id: subjectId,
|
|
1400
|
+
type: "knowledge-note",
|
|
1401
|
+
scope: "agent",
|
|
1402
|
+
subject_id: subjectId,
|
|
1403
|
+
agent_id: subjectId,
|
|
1404
|
+
slug: agent.slug,
|
|
1405
|
+
title: agent.name,
|
|
1406
|
+
created_at: timestamp,
|
|
1407
|
+
updated_at: timestamp,
|
|
1408
|
+
} satisfies AgentKnowledgeFrontmatter,
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
listKnowledgeEntries(input: { scope: VaultKnowledgeScope; subjectId: string; limit?: number }): VaultKnowledgeEntry[] {
|
|
1413
|
+
const files = this.knowledgeEntryFilesForScope(input.scope, input.subjectId);
|
|
1414
|
+
const entries = files
|
|
1415
|
+
.map((filePath) => {
|
|
1416
|
+
const markdown = readMarkdownFile<EvidenceFrontmatter>(filePath);
|
|
1417
|
+
if (!markdown) return null;
|
|
1418
|
+
return {
|
|
1419
|
+
id: String(markdown.frontmatter.id || ""),
|
|
1420
|
+
scope: markdown.frontmatter.scope,
|
|
1421
|
+
subjectId: String(markdown.frontmatter.subject_id || input.subjectId),
|
|
1422
|
+
sourceType: markdown.frontmatter.source_type,
|
|
1423
|
+
sourceId: String(markdown.frontmatter.source_id || ""),
|
|
1424
|
+
kind: markdown.frontmatter.kind,
|
|
1425
|
+
title: String(markdown.frontmatter.title || ""),
|
|
1426
|
+
body: markdown.body,
|
|
1427
|
+
confidence: clampUnit(markdown.frontmatter.confidence),
|
|
1428
|
+
durability: clampUnit(markdown.frontmatter.durability),
|
|
1429
|
+
tags: normalizeTags(markdown.frontmatter.tags),
|
|
1430
|
+
evidence: normalizeEvidence(markdown.frontmatter.evidence),
|
|
1431
|
+
metadata: isPlainObject(markdown.frontmatter.metadata) ? markdown.frontmatter.metadata : {},
|
|
1432
|
+
createdAt: String(markdown.frontmatter.created_at || ""),
|
|
1433
|
+
updatedAt: String(markdown.frontmatter.updated_at || ""),
|
|
1434
|
+
} satisfies VaultKnowledgeEntry;
|
|
1435
|
+
})
|
|
1436
|
+
.filter((entry): entry is VaultKnowledgeEntry => Boolean(entry?.id && entry.body));
|
|
1437
|
+
return sortByTimestampDesc(entries).slice(0, input.limit ?? 50);
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
storeKnowledgeEntries(drafts: VaultKnowledgeDraft[]): number {
|
|
1441
|
+
let inserted = 0;
|
|
1442
|
+
for (const draft of drafts) {
|
|
1443
|
+
const subjectId = draft.subjectId.trim();
|
|
1444
|
+
const title = draft.title.trim();
|
|
1445
|
+
const body = draft.body.trim();
|
|
1446
|
+
const sourceId = draft.sourceId.trim();
|
|
1447
|
+
if (!subjectId || !title || !body || !sourceId) continue;
|
|
1448
|
+
const hash = contentHash(draft.scope, subjectId, body);
|
|
1449
|
+
const existing = this.listKnowledgeEntries({ scope: draft.scope, subjectId, limit: 500 })
|
|
1450
|
+
.find((entry) => (entry.metadata?.content_hash as string | undefined) === hash);
|
|
1451
|
+
if (existing) continue;
|
|
1452
|
+
const filePath = this.nextKnowledgeEntryPath(draft.scope, subjectId, title);
|
|
1453
|
+
const timestamp = nowIso();
|
|
1454
|
+
writeMarkdownFile(
|
|
1455
|
+
filePath,
|
|
1456
|
+
{
|
|
1457
|
+
id: randomUUID(),
|
|
1458
|
+
type: "knowledge-evidence",
|
|
1459
|
+
scope: draft.scope,
|
|
1460
|
+
subject_id: subjectId,
|
|
1461
|
+
source_type: draft.sourceType,
|
|
1462
|
+
source_id: sourceId,
|
|
1463
|
+
kind: draft.kind,
|
|
1464
|
+
title,
|
|
1465
|
+
confidence: clampUnit(draft.confidence),
|
|
1466
|
+
durability: clampUnit(draft.durability),
|
|
1467
|
+
tags: normalizeTags(draft.tags),
|
|
1468
|
+
evidence: normalizeEvidence(draft.evidence),
|
|
1469
|
+
metadata: {
|
|
1470
|
+
...(draft.metadata ?? {}),
|
|
1471
|
+
content_hash: hash,
|
|
1472
|
+
},
|
|
1473
|
+
content_hash: hash,
|
|
1474
|
+
created_at: timestamp,
|
|
1475
|
+
updated_at: timestamp,
|
|
1476
|
+
} satisfies EvidenceFrontmatter,
|
|
1477
|
+
body,
|
|
1478
|
+
);
|
|
1479
|
+
inserted += 1;
|
|
1480
|
+
}
|
|
1481
|
+
return inserted;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
private knowledgeEntryFilesForScope(scope: VaultKnowledgeScope, subjectId: string): string[] {
|
|
1485
|
+
if (scope === "global") {
|
|
1486
|
+
return listMarkdownFiles(this.globalEvidenceDir("global"));
|
|
1487
|
+
}
|
|
1488
|
+
if (scope === "agent") {
|
|
1489
|
+
return listMarkdownFiles(this.globalEvidenceDir("agent")).filter((filePath) => {
|
|
1490
|
+
const markdown = readMarkdownFile<EvidenceFrontmatter>(filePath);
|
|
1491
|
+
return markdown?.frontmatter?.subject_id === subjectId;
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
if (scope === "project") {
|
|
1495
|
+
const project = this.findProjectRegistryEntryById(subjectId);
|
|
1496
|
+
if (!project) return [];
|
|
1497
|
+
return listMarkdownFiles(this.projectEvidenceDir(project.slug, "project"));
|
|
1498
|
+
}
|
|
1499
|
+
const located = this.findRepoEntry(subjectId);
|
|
1500
|
+
if (!located) return [];
|
|
1501
|
+
return listMarkdownFiles(this.projectEvidenceDir(located.project.slug, "repo")).filter((filePath) => {
|
|
1502
|
+
const markdown = readMarkdownFile<EvidenceFrontmatter>(filePath);
|
|
1503
|
+
return markdown?.frontmatter?.subject_id === subjectId;
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
private nextKnowledgeEntryPath(scope: VaultKnowledgeScope, subjectId: string, title: string): string {
|
|
1508
|
+
const id = randomUUID();
|
|
1509
|
+
const fileName = `${slugify(title, "entry")}-${id.slice(0, 8)}.md`;
|
|
1510
|
+
if (scope === "global") {
|
|
1511
|
+
return path.join(this.globalEvidenceDir("global"), fileName);
|
|
1512
|
+
}
|
|
1513
|
+
if (scope === "agent") {
|
|
1514
|
+
return path.join(this.globalEvidenceDir("agent"), fileName);
|
|
1515
|
+
}
|
|
1516
|
+
if (scope === "project") {
|
|
1517
|
+
const project = this.findProjectRegistryEntryById(subjectId);
|
|
1518
|
+
if (!project) throw new Error("Project not found for knowledge entry");
|
|
1519
|
+
return path.join(this.projectEvidenceDir(project.slug, "project"), fileName);
|
|
1520
|
+
}
|
|
1521
|
+
const located = this.findRepoEntry(subjectId);
|
|
1522
|
+
if (!located) throw new Error("Repo not found for knowledge entry");
|
|
1523
|
+
return path.join(this.projectEvidenceDir(located.project.slug, "repo"), fileName);
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
getLearnings(scope: LearningScope, scopeId?: string): Learning[] {
|
|
1527
|
+
if (scope === "task") return [];
|
|
1528
|
+
if (scope === "global") {
|
|
1529
|
+
const note = this.getKnowledgeNote("global", "playbook");
|
|
1530
|
+
if (!note?.content.trim()) return [];
|
|
1531
|
+
return [{
|
|
1532
|
+
id: note.id,
|
|
1533
|
+
scope: "global",
|
|
1534
|
+
scope_id: undefined,
|
|
1535
|
+
content: note.content,
|
|
1536
|
+
created_at: note.updatedAt,
|
|
1537
|
+
}];
|
|
1538
|
+
}
|
|
1539
|
+
if (!scopeId) return [];
|
|
1540
|
+
const note = this.getKnowledgeNote("project", scopeId);
|
|
1541
|
+
if (!note?.content.trim()) return [];
|
|
1542
|
+
return [{
|
|
1543
|
+
id: note.id,
|
|
1544
|
+
scope: "project",
|
|
1545
|
+
scope_id: scopeId,
|
|
1546
|
+
content: note.content,
|
|
1547
|
+
created_at: note.updatedAt,
|
|
1548
|
+
}];
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
addLearning(scope: LearningScope, content: string, scopeId?: string): Learning {
|
|
1552
|
+
if (scope === "task") {
|
|
1553
|
+
throw new Error("Task learnings are not handled by VaultStore");
|
|
1554
|
+
}
|
|
1555
|
+
const targetScope: VaultKnowledgeScope = scope === "global" ? "global" : "project";
|
|
1556
|
+
const subjectId = scope === "global" ? "playbook" : String(scopeId || "").trim();
|
|
1557
|
+
if (!subjectId) {
|
|
1558
|
+
throw new Error("scopeId is required for project learnings");
|
|
1559
|
+
}
|
|
1560
|
+
const existing = this.getKnowledgeNote(targetScope, subjectId)?.content ?? "";
|
|
1561
|
+
const addition = `- ${content.trim().replace(/^\-\s*/, "")}`;
|
|
1562
|
+
const nextContent = existing.trim() ? `${existing.trim()}\n${addition}` : addition;
|
|
1563
|
+
const { note } = this.upsertKnowledgeNote({
|
|
1564
|
+
scope: targetScope,
|
|
1565
|
+
subjectId,
|
|
1566
|
+
content: nextContent,
|
|
1567
|
+
changeSummary: "Learning added",
|
|
1568
|
+
sourceType: "manual",
|
|
1569
|
+
sourceId: "manual-learning",
|
|
1570
|
+
metadata: { scope },
|
|
1571
|
+
});
|
|
1572
|
+
return {
|
|
1573
|
+
id: note.id,
|
|
1574
|
+
scope,
|
|
1575
|
+
scope_id: scopeId,
|
|
1576
|
+
content: note.content,
|
|
1577
|
+
created_at: note.updatedAt,
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
deleteLearning(id: string, scope: LearningScope, scopeId?: string): void {
|
|
1582
|
+
if (scope === "task") return;
|
|
1583
|
+
const subjectId = scope === "global" ? "playbook" : String(scopeId || "").trim();
|
|
1584
|
+
if (!subjectId) return;
|
|
1585
|
+
const note = this.getKnowledgeNote(scope === "global" ? "global" : "project", subjectId);
|
|
1586
|
+
if (!note || note.id !== id) return;
|
|
1587
|
+
this.upsertKnowledgeNote({
|
|
1588
|
+
scope: scope === "global" ? "global" : "project",
|
|
1589
|
+
subjectId,
|
|
1590
|
+
content: "",
|
|
1591
|
+
changeSummary: "Learning cleared",
|
|
1592
|
+
sourceType: "manual",
|
|
1593
|
+
sourceId: "manual-learning-delete",
|
|
1594
|
+
metadata: { scope },
|
|
1595
|
+
});
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
migrateFromLegacyDb(): {
|
|
1599
|
+
projects: number;
|
|
1600
|
+
repos: number;
|
|
1601
|
+
agents: number;
|
|
1602
|
+
importedArtifacts: number;
|
|
1603
|
+
evidenceFiles: number;
|
|
1604
|
+
} {
|
|
1605
|
+
this.ensureRoot();
|
|
1606
|
+
const sqlite = getSQLiteDb();
|
|
1607
|
+
const now = nowIso();
|
|
1608
|
+
|
|
1609
|
+
const hasTable = (table: string) => {
|
|
1610
|
+
const row = sqlite.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name = ? LIMIT 1").get(table);
|
|
1611
|
+
return Boolean(row);
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
const readAll = <TRow>(table: string) => {
|
|
1615
|
+
if (!hasTable(table)) return [] as TRow[];
|
|
1616
|
+
return sqlite.prepare(`SELECT * FROM ${table}`).all() as TRow[];
|
|
1617
|
+
};
|
|
1618
|
+
|
|
1619
|
+
const projects = readAll<Project>("projects");
|
|
1620
|
+
const repos = readAll<ProjectRepo>("project_repos");
|
|
1621
|
+
const projectAgents = readAll<ProjectAgent>("project_agents");
|
|
1622
|
+
const projectSkills = readAll<ProjectSkill>("project_skills");
|
|
1623
|
+
const projectVariables = readAll<ProjectVariable>("project_variables");
|
|
1624
|
+
const projectThreads = readAll<ProjectThread>("project_threads");
|
|
1625
|
+
const projectMemoryRows = readAll<ProjectMemory>("project_memory");
|
|
1626
|
+
const repoKnowledgeRows = hasTable("repo_knowledge")
|
|
1627
|
+
? (sqlite.prepare("SELECT id, repo_id, content, producer, created_at FROM repo_knowledge").all() as Array<{
|
|
1628
|
+
id: string;
|
|
1629
|
+
repo_id: string;
|
|
1630
|
+
content: string;
|
|
1631
|
+
producer: "human" | "system";
|
|
1632
|
+
created_at: string;
|
|
1633
|
+
}>)
|
|
1634
|
+
: [];
|
|
1635
|
+
const knowledgeNoteRows = hasTable("knowledge_notes")
|
|
1636
|
+
? (sqlite.prepare("SELECT * FROM knowledge_notes").all() as Array<{
|
|
1637
|
+
id: string;
|
|
1638
|
+
scope: VaultKnowledgeScope;
|
|
1639
|
+
subject_id: string;
|
|
1640
|
+
content: string;
|
|
1641
|
+
change_summary: string | null;
|
|
1642
|
+
source_type: VaultKnowledgeSourceType;
|
|
1643
|
+
source_id: string;
|
|
1644
|
+
metadata: string | null;
|
|
1645
|
+
version: number;
|
|
1646
|
+
created_at: string;
|
|
1647
|
+
updated_at: string;
|
|
1648
|
+
}>)
|
|
1649
|
+
: [];
|
|
1650
|
+
const knowledgeEntries = hasTable("knowledge_entries")
|
|
1651
|
+
? (sqlite.prepare("SELECT * FROM knowledge_entries").all() as Array<{
|
|
1652
|
+
id: string;
|
|
1653
|
+
scope: VaultKnowledgeScope;
|
|
1654
|
+
subject_id: string;
|
|
1655
|
+
source_type: VaultKnowledgeSourceType;
|
|
1656
|
+
source_id: string;
|
|
1657
|
+
kind: VaultKnowledgeKind;
|
|
1658
|
+
title: string;
|
|
1659
|
+
body: string;
|
|
1660
|
+
confidence: number | null;
|
|
1661
|
+
durability: number | null;
|
|
1662
|
+
tags: string | null;
|
|
1663
|
+
evidence: string | null;
|
|
1664
|
+
metadata: string | null;
|
|
1665
|
+
content_hash?: string | null;
|
|
1666
|
+
created_at: string;
|
|
1667
|
+
updated_at: string;
|
|
1668
|
+
}>)
|
|
1669
|
+
: [];
|
|
1670
|
+
const learnings = readAll<Learning>("learnings");
|
|
1671
|
+
const agents = readAll<{ id: string; name: string; description?: string; created_at?: string; updated_at?: string }>("agents");
|
|
1672
|
+
const agentMemoryRows = hasTable("agent_memory")
|
|
1673
|
+
? (sqlite.prepare("SELECT * FROM agent_memory").all() as Array<{
|
|
1674
|
+
id: string;
|
|
1675
|
+
agent_id: string;
|
|
1676
|
+
content: string;
|
|
1677
|
+
created_at: string;
|
|
1678
|
+
}>)
|
|
1679
|
+
: [];
|
|
1680
|
+
|
|
1681
|
+
removeDirIfExists(this.rootDir);
|
|
1682
|
+
this.ensureRoot();
|
|
1683
|
+
|
|
1684
|
+
const globalLearnings = learnings.filter((learning) => learning.scope === "global");
|
|
1685
|
+
const playbookContent = globalLearnings.map((learning) => `- ${learning.content.trim().replace(/^\-\s*/, "")}`).join("\n");
|
|
1686
|
+
this.upsertKnowledgeNote({
|
|
1687
|
+
scope: "global",
|
|
1688
|
+
subjectId: "playbook",
|
|
1689
|
+
content: playbookContent,
|
|
1690
|
+
changeSummary: "Imported from legacy learnings",
|
|
1691
|
+
sourceType: "task_completion",
|
|
1692
|
+
sourceId: "vault-import",
|
|
1693
|
+
metadata: { imported_at: now },
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
let importedArtifacts = 0;
|
|
1697
|
+
let evidenceFiles = 0;
|
|
1698
|
+
|
|
1699
|
+
for (const learning of globalLearnings) {
|
|
1700
|
+
writeMarkdownFile(
|
|
1701
|
+
path.join(this.globalImportedLearningsDir(), `${slugify(learning.id, "learning")}.md`),
|
|
1702
|
+
{
|
|
1703
|
+
id: learning.id,
|
|
1704
|
+
type: "imported-artifact",
|
|
1705
|
+
source_table: "learnings",
|
|
1706
|
+
scope: learning.scope,
|
|
1707
|
+
created_at: learning.created_at || now,
|
|
1708
|
+
updated_at: learning.created_at || now,
|
|
1709
|
+
metadata: { scope_id: learning.scope_id, user_id: learning.user_id },
|
|
1710
|
+
} satisfies ImportedArtifactFrontmatter,
|
|
1711
|
+
learning.content,
|
|
1712
|
+
);
|
|
1713
|
+
importedArtifacts += 1;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
for (const agent of agents) {
|
|
1717
|
+
const noteRow = knowledgeNoteRows.find((row) => row.scope === "agent" && row.subject_id === agent.id);
|
|
1718
|
+
const synthesized = noteRow?.content?.trim() || this.synthesizeAgentNote(agent.id, agentMemoryRows, knowledgeEntries);
|
|
1719
|
+
const entry = this.updateAgentRegistryEntry(agent.id, agent.name);
|
|
1720
|
+
writeMarkdownFile(
|
|
1721
|
+
entry.path,
|
|
1722
|
+
{
|
|
1723
|
+
id: agent.id,
|
|
1724
|
+
type: "knowledge-note",
|
|
1725
|
+
scope: "agent",
|
|
1726
|
+
subject_id: agent.id,
|
|
1727
|
+
agent_id: agent.id,
|
|
1728
|
+
slug: entry.slug,
|
|
1729
|
+
title: agent.name,
|
|
1730
|
+
created_at: noteRow?.created_at || agent.created_at || now,
|
|
1731
|
+
updated_at: noteRow?.updated_at || agent.updated_at || now,
|
|
1732
|
+
source_type: noteRow?.source_type || "task_completion",
|
|
1733
|
+
source_id: noteRow?.source_id || "vault-import",
|
|
1734
|
+
change_summary: noteRow?.change_summary || "Imported from legacy agent knowledge",
|
|
1735
|
+
version: noteRow?.version || 1,
|
|
1736
|
+
metadata: noteRow?.metadata ? JSON.parse(noteRow.metadata) : {},
|
|
1737
|
+
} satisfies AgentKnowledgeFrontmatter,
|
|
1738
|
+
this.composeAgentNoteBody(agent.name, agent.description, synthesized),
|
|
1739
|
+
);
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
for (const legacyProject of projects) {
|
|
1743
|
+
const project: Project = {
|
|
1744
|
+
id: legacyProject.id,
|
|
1745
|
+
user_id: legacyProject.user_id,
|
|
1746
|
+
name: legacyProject.name,
|
|
1747
|
+
slug: legacyProject.slug || this.nextProjectSlug(legacyProject.name || legacyProject.id, legacyProject.id),
|
|
1748
|
+
description: legacyProject.description ?? "",
|
|
1749
|
+
metadata: legacyProject.metadata ?? {},
|
|
1750
|
+
ci_cd_info: legacyProject.ci_cd_info ?? undefined,
|
|
1751
|
+
workflow_id: legacyProject.workflow_id ?? null,
|
|
1752
|
+
created_at: legacyProject.created_at || now,
|
|
1753
|
+
updated_at: legacyProject.updated_at || now,
|
|
1754
|
+
};
|
|
1755
|
+
const projectRepos = repos
|
|
1756
|
+
.filter((repo) => repo.project_id === legacyProject.id)
|
|
1757
|
+
.map((repo) => ({
|
|
1758
|
+
...repo,
|
|
1759
|
+
slug: this.nextRepoSlug(project.slug, repo.name || repo.path || repo.id, repo.id),
|
|
1760
|
+
}));
|
|
1761
|
+
this.ensureProjectScaffold(project, projectRepos);
|
|
1762
|
+
this.writeManifest(project.slug, {
|
|
1763
|
+
version: 1,
|
|
1764
|
+
updatedAt: now,
|
|
1765
|
+
project,
|
|
1766
|
+
repos: projectRepos,
|
|
1767
|
+
agents: projectAgents.filter((entry) => entry.project_id === project.id).sort((a, b) => a.routing_order - b.routing_order),
|
|
1768
|
+
threads: projectThreads.filter((entry) => entry.project_id === project.id),
|
|
1769
|
+
});
|
|
1770
|
+
this.updateProjectRegistryEntry(project, projectRepos);
|
|
1771
|
+
|
|
1772
|
+
const projectNoteRow = knowledgeNoteRows.find((row) => row.scope === "project" && row.subject_id === project.id);
|
|
1773
|
+
const projectNoteContent = projectNoteRow?.content?.trim() || this.synthesizeProjectNote(project.id, projectMemoryRows, knowledgeEntries);
|
|
1774
|
+
this.upsertKnowledgeNote({
|
|
1775
|
+
scope: "project",
|
|
1776
|
+
subjectId: project.id,
|
|
1777
|
+
content: projectNoteContent,
|
|
1778
|
+
changeSummary: projectNoteRow?.change_summary || "Imported from legacy project knowledge",
|
|
1779
|
+
sourceType: projectNoteRow?.source_type || "task_completion",
|
|
1780
|
+
sourceId: projectNoteRow?.source_id || "vault-import",
|
|
1781
|
+
metadata: projectNoteRow?.metadata ? JSON.parse(projectNoteRow.metadata) : { imported_at: now },
|
|
1782
|
+
});
|
|
1783
|
+
|
|
1784
|
+
writeMarkdownFile(
|
|
1785
|
+
this.projectContextPath(project.slug),
|
|
1786
|
+
{
|
|
1787
|
+
id: project.id,
|
|
1788
|
+
type: "knowledge-note",
|
|
1789
|
+
scope: "project",
|
|
1790
|
+
subject_id: project.id,
|
|
1791
|
+
project_id: project.id,
|
|
1792
|
+
slug: project.slug,
|
|
1793
|
+
title: project.name,
|
|
1794
|
+
created_at: projectNoteRow?.created_at || project.created_at,
|
|
1795
|
+
updated_at: projectNoteRow?.updated_at || project.updated_at,
|
|
1796
|
+
source_type: projectNoteRow?.source_type || "task_completion",
|
|
1797
|
+
source_id: projectNoteRow?.source_id || "vault-import",
|
|
1798
|
+
change_summary: projectNoteRow?.change_summary || "Imported from legacy project knowledge",
|
|
1799
|
+
version: projectNoteRow?.version || 1,
|
|
1800
|
+
metadata: projectNoteRow?.metadata ? JSON.parse(projectNoteRow.metadata) : {},
|
|
1801
|
+
} satisfies ProjectContextFrontmatter,
|
|
1802
|
+
projectNoteContent,
|
|
1803
|
+
);
|
|
1804
|
+
|
|
1805
|
+
const projectLearningRows = learnings.filter((learning) => learning.scope === "project" && learning.scope_id === project.id);
|
|
1806
|
+
for (const learning of projectLearningRows) {
|
|
1807
|
+
writeMarkdownFile(
|
|
1808
|
+
path.join(this.projectImportedDir(project.slug, "learnings"), `${slugify(learning.id, "learning")}.md`),
|
|
1809
|
+
{
|
|
1810
|
+
id: learning.id,
|
|
1811
|
+
type: "imported-artifact",
|
|
1812
|
+
source_table: "learnings",
|
|
1813
|
+
scope: learning.scope,
|
|
1814
|
+
project_id: project.id,
|
|
1815
|
+
created_at: learning.created_at || now,
|
|
1816
|
+
updated_at: learning.created_at || now,
|
|
1817
|
+
metadata: { scope_id: learning.scope_id, user_id: learning.user_id },
|
|
1818
|
+
} satisfies ImportedArtifactFrontmatter,
|
|
1819
|
+
learning.content,
|
|
1820
|
+
);
|
|
1821
|
+
importedArtifacts += 1;
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
for (const memoryRow of projectMemoryRows.filter((row) => row.project_id === project.id)) {
|
|
1825
|
+
writeMarkdownFile(
|
|
1826
|
+
path.join(this.projectImportedDir(project.slug, "project-memory"), `${slugify(memoryRow.id, "memory")}.md`),
|
|
1827
|
+
{
|
|
1828
|
+
id: memoryRow.id,
|
|
1829
|
+
type: "imported-artifact",
|
|
1830
|
+
source_table: "project_memory",
|
|
1831
|
+
source_row_id: memoryRow.id,
|
|
1832
|
+
project_id: project.id,
|
|
1833
|
+
producer: memoryRow.producer,
|
|
1834
|
+
created_at: memoryRow.created_at || now,
|
|
1835
|
+
updated_at: memoryRow.created_at || now,
|
|
1836
|
+
metadata: { source: memoryRow.source ?? null },
|
|
1837
|
+
} satisfies ImportedArtifactFrontmatter,
|
|
1838
|
+
memoryRow.content,
|
|
1839
|
+
);
|
|
1840
|
+
importedArtifacts += 1;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
for (const repo of projectRepos) {
|
|
1844
|
+
const repoNoteRow = knowledgeNoteRows.find((row) => row.scope === "repo" && row.subject_id === repo.id);
|
|
1845
|
+
const repoContent = repoNoteRow?.content?.trim() || this.synthesizeRepoNote(repo.id, repoKnowledgeRows, knowledgeEntries);
|
|
1846
|
+
writeMarkdownFile(
|
|
1847
|
+
this.repoKnowledgePath(project.slug, repo.slug),
|
|
1848
|
+
{
|
|
1849
|
+
id: repo.id,
|
|
1850
|
+
type: "knowledge-note",
|
|
1851
|
+
scope: "repo",
|
|
1852
|
+
subject_id: repo.id,
|
|
1853
|
+
project_id: project.id,
|
|
1854
|
+
repo_id: repo.id,
|
|
1855
|
+
slug: repo.slug,
|
|
1856
|
+
title: repo.name,
|
|
1857
|
+
created_at: repoNoteRow?.created_at || repo.created_at,
|
|
1858
|
+
updated_at: repoNoteRow?.updated_at || repo.updated_at,
|
|
1859
|
+
source_type: repoNoteRow?.source_type || "task_completion",
|
|
1860
|
+
source_id: repoNoteRow?.source_id || "vault-import",
|
|
1861
|
+
change_summary: repoNoteRow?.change_summary || "Imported from legacy repo knowledge",
|
|
1862
|
+
version: repoNoteRow?.version || 1,
|
|
1863
|
+
metadata: repoNoteRow?.metadata ? JSON.parse(repoNoteRow.metadata) : {},
|
|
1864
|
+
} satisfies RepoKnowledgeFrontmatter,
|
|
1865
|
+
repoContent,
|
|
1866
|
+
);
|
|
1867
|
+
|
|
1868
|
+
if (repo.notes?.trim()) {
|
|
1869
|
+
writeMarkdownFile(
|
|
1870
|
+
path.join(this.projectImportedDir(project.slug, path.join("repo-knowledge", repo.slug)), `${slugify(repo.id, "repo-notes")}-project-repos-notes.md`),
|
|
1871
|
+
{
|
|
1872
|
+
id: `${repo.id}:project_repos.notes`,
|
|
1873
|
+
type: "imported-artifact",
|
|
1874
|
+
source_table: "project_repos",
|
|
1875
|
+
source_row_id: repo.id,
|
|
1876
|
+
project_id: project.id,
|
|
1877
|
+
repo_id: repo.id,
|
|
1878
|
+
created_at: repo.updated_at || repo.created_at || now,
|
|
1879
|
+
updated_at: repo.updated_at || repo.created_at || now,
|
|
1880
|
+
} satisfies ImportedArtifactFrontmatter,
|
|
1881
|
+
repo.notes,
|
|
1882
|
+
);
|
|
1883
|
+
importedArtifacts += 1;
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
for (const row of repoKnowledgeRows.filter((entry) => entry.repo_id === repo.id)) {
|
|
1887
|
+
writeMarkdownFile(
|
|
1888
|
+
path.join(this.projectImportedDir(project.slug, path.join("repo-knowledge", repo.slug)), `${slugify(row.id, "repo-knowledge")}.md`),
|
|
1889
|
+
{
|
|
1890
|
+
id: row.id,
|
|
1891
|
+
type: "imported-artifact",
|
|
1892
|
+
source_table: "repo_knowledge",
|
|
1893
|
+
source_row_id: row.id,
|
|
1894
|
+
project_id: project.id,
|
|
1895
|
+
repo_id: repo.id,
|
|
1896
|
+
producer: row.producer,
|
|
1897
|
+
created_at: row.created_at || now,
|
|
1898
|
+
updated_at: row.created_at || now,
|
|
1899
|
+
} satisfies ImportedArtifactFrontmatter,
|
|
1900
|
+
row.content,
|
|
1901
|
+
);
|
|
1902
|
+
importedArtifacts += 1;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
for (const skill of projectSkills.filter((entry) => entry.project_id === project.id)) {
|
|
1907
|
+
writeMarkdownFile(
|
|
1908
|
+
path.join(this.projectSkillsDir(project.slug), `${slugify(path.basename(skill.file) || skill.id, "skill")}-${skill.id.slice(0, 8)}.md`),
|
|
1909
|
+
{
|
|
1910
|
+
id: skill.id,
|
|
1911
|
+
type: "project-skill",
|
|
1912
|
+
project_id: project.id,
|
|
1913
|
+
title: path.basename(skill.file) || skill.file,
|
|
1914
|
+
file: skill.file,
|
|
1915
|
+
condition: skill.condition ?? null,
|
|
1916
|
+
created_at: skill.created_at || now,
|
|
1917
|
+
updated_at: skill.created_at || now,
|
|
1918
|
+
} satisfies ProjectSkillFrontmatter,
|
|
1919
|
+
`# ${path.basename(skill.file) || skill.file}\n`,
|
|
1920
|
+
);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
for (const variable of projectVariables.filter((entry) => entry.project_id === project.id)) {
|
|
1924
|
+
writeMarkdownFile(
|
|
1925
|
+
path.join(this.projectVariablesDir(project.slug), `${slugify(variable.key, "var")}.md`),
|
|
1926
|
+
{
|
|
1927
|
+
id: `project-variable:${project.id}:${variable.key}`,
|
|
1928
|
+
type: "project-variable",
|
|
1929
|
+
project_id: project.id,
|
|
1930
|
+
title: variable.key,
|
|
1931
|
+
key: variable.key,
|
|
1932
|
+
value: variable.value,
|
|
1933
|
+
created_at: now,
|
|
1934
|
+
updated_at: now,
|
|
1935
|
+
} satisfies ProjectVariableFrontmatter,
|
|
1936
|
+
"",
|
|
1937
|
+
);
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
writeMarkdownFile(
|
|
1941
|
+
this.projectAgentsIndexPath(project.slug),
|
|
1942
|
+
{
|
|
1943
|
+
id: `project-agents:${project.id}`,
|
|
1944
|
+
type: "project-agents",
|
|
1945
|
+
project_id: project.id,
|
|
1946
|
+
title: "Project Agents",
|
|
1947
|
+
created_at: project.created_at,
|
|
1948
|
+
updated_at: project.updated_at,
|
|
1949
|
+
agents: projectAgents.filter((entry) => entry.project_id === project.id).sort((a, b) => a.routing_order - b.routing_order),
|
|
1950
|
+
} satisfies ProjectAgentsIndexFrontmatter,
|
|
1951
|
+
"# Project Agents\n",
|
|
1952
|
+
);
|
|
1953
|
+
|
|
1954
|
+
for (const thread of projectThreads.filter((entry) => entry.project_id === project.id)) {
|
|
1955
|
+
writeMarkdownFile(
|
|
1956
|
+
path.join(this.projectThreadsDir(project.slug), `${encodeURIComponent(thread.thread_id)}.md`),
|
|
1957
|
+
{
|
|
1958
|
+
id: `project-thread:${project.id}:${thread.thread_id}`,
|
|
1959
|
+
type: "project-thread",
|
|
1960
|
+
project_id: project.id,
|
|
1961
|
+
thread_id: thread.thread_id,
|
|
1962
|
+
title: thread.thread_id,
|
|
1963
|
+
created_at: thread.created_at || now,
|
|
1964
|
+
updated_at: thread.created_at || now,
|
|
1965
|
+
} satisfies ProjectThreadFrontmatter,
|
|
1966
|
+
`# Thread ${thread.thread_id}\n`,
|
|
1967
|
+
);
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
for (const entry of knowledgeEntries) {
|
|
1972
|
+
const filePath = this.nextKnowledgeEntryPath(entry.scope, entry.subject_id, entry.title || entry.id);
|
|
1973
|
+
writeMarkdownFile(
|
|
1974
|
+
filePath,
|
|
1975
|
+
{
|
|
1976
|
+
id: entry.id,
|
|
1977
|
+
type: "knowledge-evidence",
|
|
1978
|
+
scope: entry.scope,
|
|
1979
|
+
subject_id: entry.subject_id,
|
|
1980
|
+
source_type: entry.source_type,
|
|
1981
|
+
source_id: entry.source_id,
|
|
1982
|
+
kind: entry.kind,
|
|
1983
|
+
title: entry.title,
|
|
1984
|
+
confidence: entry.confidence,
|
|
1985
|
+
durability: entry.durability,
|
|
1986
|
+
tags: entry.tags ? JSON.parse(entry.tags) : [],
|
|
1987
|
+
evidence: entry.evidence ? JSON.parse(entry.evidence) : [],
|
|
1988
|
+
metadata: entry.metadata ? JSON.parse(entry.metadata) : {},
|
|
1989
|
+
content_hash: entry.content_hash || contentHash(entry.scope, entry.subject_id, entry.body),
|
|
1990
|
+
created_at: entry.created_at || now,
|
|
1991
|
+
updated_at: entry.updated_at || entry.created_at || now,
|
|
1992
|
+
} satisfies EvidenceFrontmatter,
|
|
1993
|
+
entry.body,
|
|
1994
|
+
);
|
|
1995
|
+
evidenceFiles += 1;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
return {
|
|
1999
|
+
projects: projects.length,
|
|
2000
|
+
repos: repos.length,
|
|
2001
|
+
agents: agents.length,
|
|
2002
|
+
importedArtifacts,
|
|
2003
|
+
evidenceFiles,
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
private composeAgentNoteBody(name: string, identity: string | undefined, portableKnowledge: string): string {
|
|
2008
|
+
const sections = [`# ${name}`];
|
|
2009
|
+
if (identity?.trim()) {
|
|
2010
|
+
sections.push(`## Identity\n${identity.trim()}`);
|
|
2011
|
+
}
|
|
2012
|
+
if (portableKnowledge.trim()) {
|
|
2013
|
+
sections.push(`## Portable Knowledge\n${portableKnowledge.trim()}`);
|
|
2014
|
+
}
|
|
2015
|
+
return sections.join("\n\n");
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
private synthesizeProjectNote(
|
|
2019
|
+
projectId: string,
|
|
2020
|
+
projectMemoryRows: ProjectMemory[],
|
|
2021
|
+
knowledgeEntries: Array<{ scope: VaultKnowledgeScope; subject_id: string; body: string }>,
|
|
2022
|
+
): string {
|
|
2023
|
+
const lines = [
|
|
2024
|
+
...projectMemoryRows
|
|
2025
|
+
.filter((row) => row.project_id === projectId && row.producer === "system")
|
|
2026
|
+
.map((row) => row.content.trim()),
|
|
2027
|
+
...knowledgeEntries
|
|
2028
|
+
.filter((row) => row.scope === "project" && row.subject_id === projectId)
|
|
2029
|
+
.map((row) => row.body.trim()),
|
|
2030
|
+
].filter(Boolean);
|
|
2031
|
+
return Array.from(new Set(lines)).map((line) => `- ${line.replace(/^\-\s*/, "")}`).join("\n");
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
private synthesizeRepoNote(
|
|
2035
|
+
repoId: string,
|
|
2036
|
+
repoKnowledgeRows: Array<{ repo_id: string; content: string; producer: "human" | "system" }>,
|
|
2037
|
+
knowledgeEntries: Array<{ scope: VaultKnowledgeScope; subject_id: string; body: string }>,
|
|
2038
|
+
): string {
|
|
2039
|
+
const lines = [
|
|
2040
|
+
...repoKnowledgeRows
|
|
2041
|
+
.filter((row) => row.repo_id === repoId && row.producer === "system")
|
|
2042
|
+
.map((row) => row.content.trim()),
|
|
2043
|
+
...knowledgeEntries
|
|
2044
|
+
.filter((row) => row.scope === "repo" && row.subject_id === repoId)
|
|
2045
|
+
.map((row) => row.body.trim()),
|
|
2046
|
+
].filter(Boolean);
|
|
2047
|
+
return Array.from(new Set(lines)).map((line) => `- ${line.replace(/^\-\s*/, "")}`).join("\n");
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
private synthesizeAgentNote(
|
|
2051
|
+
agentId: string,
|
|
2052
|
+
agentMemoryRows: Array<{ agent_id: string; content: string }>,
|
|
2053
|
+
knowledgeEntries: Array<{ scope: VaultKnowledgeScope; subject_id: string; body: string }>,
|
|
2054
|
+
): string {
|
|
2055
|
+
const lines = [
|
|
2056
|
+
...agentMemoryRows
|
|
2057
|
+
.filter((row) => row.agent_id === agentId)
|
|
2058
|
+
.map((row) => row.content.trim()),
|
|
2059
|
+
...knowledgeEntries
|
|
2060
|
+
.filter((row) => row.scope === "agent" && row.subject_id === agentId)
|
|
2061
|
+
.map((row) => row.body.trim()),
|
|
2062
|
+
].filter(Boolean);
|
|
2063
|
+
return Array.from(new Set(lines)).map((line) => `- ${line.replace(/^\-\s*/, "")}`).join("\n");
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
export const vaultStore = new VaultStore();
|