@mndrk/agx 2.0.25 → 2.0.32
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/README.md +4 -6
- package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/.next/app-path-routes-manifest.json +6 -0
- package/cloud-runtime/standalone/.next/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/required-server-files.json +4 -4
- package/cloud-runtime/standalone/.next/routes-manifest.json +45 -0
- package/cloud-runtime/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page/build-manifest.json +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 +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +2 -2
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +3 -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 +7 -4
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +2 -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 +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
- 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/teams-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +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 +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +4 -4
- 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 +4 -4
- 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 +4 -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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +5 -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 +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +6 -5
- 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 +6 -5
- 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 +5 -4
- 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 +4 -3
- 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 +4 -4
- 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 +5 -5
- 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 +5 -5
- 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/pause/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +5 -5
- 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 +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +5 -5
- 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 +6 -5
- 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 +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +2 -2
- 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]/heartbeat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +4 -3
- 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]/logs/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +3 -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 +7 -6
- 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 +7 -6
- 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 +6 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +6 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +7 -6
- 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 +8 -6
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +4 -3
- 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 +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +5 -2
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +5 -4
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations/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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page/build-manifest.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +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/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/build-manifest.json +18 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/next-font-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/react-loadable-manifest.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js +16 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +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/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/build-manifest.json +18 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/next-font-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/react-loadable-manifest.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js +16 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page/build-manifest.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page/build-manifest.json +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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/status/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page/build-manifest.json +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 +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__017f03c3._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0925dd01._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__10940c29._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__12afd8a3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__12c7e188._.js +29 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__16dd1fd7._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__17c2d68f._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1dd062c1._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20b3baea._.js +55 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2388b2b3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__241a8bcf._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__254e942f._.js +20 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__29ce9c60._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2e596cc8._.js +4 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3198c5c8._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__36d9edbd._.js +14 -14
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__399b2ca9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4761dc17._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4b1a512c._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c50f159._.js +4 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c8624cc._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4d318eb0._.js +146 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__507a4363._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50ddd3ce._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__543ba6c4._.js +5 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59b5d4e5._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5ca87ba0._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5d359afa._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__666f8712._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6c187704._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6c26221d._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6e59b27c._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74b97f0a._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__75bff965._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7be8f159._.js +8 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__80655727._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__86f7d27b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__94fa1edc._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98535eb3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9dfaaf72._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a189593a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ac3c2f7f._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b40c7aab._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b4d05543._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bfcedb7c._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c08bef05._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c5634f17._.js +112 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c5b8ceb7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ccfcbcd5._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ceb02db8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__da20a0aa._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dede3dcd._.js +75 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e122cae2._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e1e7dd1e._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e446cb39._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e6ad07c3._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f4b70b67._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5a2358a._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5b93200._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa0ebee3._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcd3e3b8._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fce2cdce._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff9c61da._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_05fa3b89._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/_0a767dfe._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_2f3e5ac1._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_3e0d34cc._.js +97 -0
- package/cloud-runtime/standalone/.next/server/chunks/_4190f170._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a104cda8._.js → _42e9c8d5._.js} +7 -7
- package/cloud-runtime/standalone/.next/server/chunks/_5ca51127._.js +54 -0
- package/cloud-runtime/standalone/.next/server/chunks/_66e1ddec._.js +57 -0
- package/cloud-runtime/standalone/.next/server/chunks/_6bb93816._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_7011db4f._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_8b9fde82._.js +97 -0
- package/cloud-runtime/standalone/.next/server/chunks/_95ac98db._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/_994414cd._.js +54 -0
- package/cloud-runtime/standalone/.next/server/chunks/_99b78daf._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/_a877d34f._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_affbdbb0._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/_c31ca6ab._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_d225c04f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/_ee99a36b._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_efc73784._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/_fba13a4a._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_[id]_route_actions_033ac330.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_[id]_signal_route_actions_4b56f1cd.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_chat-runs_route_actions_0c8cd01c.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_threads_knowledge_route_actions_c139bcf7.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_09aac4e7._.js +57 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_cli-runner_ts_dfcf3fda._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +68 -23
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +74 -30
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +70 -31
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +87 -17
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +294 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0f808fa3.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_2bdede98.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +50 -43
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3d31fed0.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_57a073eb.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_69b6b2e1.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_7f8022ab.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_84e28f38.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_8ec90680.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_a590fcd6.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cc6c687d.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_14067235._.js +46 -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_b63e2d39._.js +46 -0
- 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 +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__1322ced8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__47caef59._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__6e83bf83._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__783669c3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8973b16a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__9166c1d6._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a0a1cb74._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a8a8afdc._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__fca7df40._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ffbc2e98._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_27f9c020._.js → _0061ebd8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_064370bc._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0f4e70b1._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ff7c687._.js +2 -4
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_16c45024._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_27cb3359._.js → _5b2b8a85._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_a696e9b3._.js → _68ac991e._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_6de3f1de._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_c838f593._.js → _6fc3736e._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a0cc0fe7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a10eb951._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cb4d8a23._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_6a367524._.js → _ccb409c5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cd5e154b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1769638._.js +2 -4
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_d021529a._.js → _fb292eed._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_4b5d7c9b._.js → _ff5799d6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_knowledge_page_actions_1037c40a.js +3 -0
- 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_projects_[slug]_graph_[taskId]_page_tsx_d8b1d582._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_knowledge_page_tsx_e2a55cbd._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_welcome_page_tsx_6c79bc59._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/ce889_server_app_projects_[slug]_thread_[threadId]_page_actions_660a8857.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +5 -5
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_e70f9321._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_678fa868._.js +3 -0
- package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/next-font-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/next-font-manifest.json +8 -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/010aff7b601302de.js +16 -0
- package/cloud-runtime/standalone/.next/static/chunks/0c467f54bc78a380.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/10b0642440302e99.css +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/1f415d0ce7ebbd08.js +8 -0
- package/cloud-runtime/standalone/.next/static/chunks/24a6ee21f430da93.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/27129bea5b512ce8.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{e44264686aa5ecbf.js → 4200b512bdc226bc.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/463edf3533d27a56.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/486bf7ff282b91a6.js +5 -0
- package/cloud-runtime/standalone/.next/static/chunks/{616d66dbec9e4b8b.js → 58025a80caa3629d.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/5cb0c885b085ea6c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/60c054bb8b2cffa6.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{da434b1ad885d636.js → 651c7c97d3bd77e0.js} +2 -4
- package/cloud-runtime/standalone/.next/static/chunks/{45b4d0ee5c92d45b.js → 6fbe08eab578c7d3.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/7e2edf97bd6c0874.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/8249f202d33d0d95.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{b4e298542d366e31.js → 87f099ea02aa419d.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/8d15ced2dc70090a.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{2acd153dc5252e88.js → 99174504a201d23e.js} +2 -4
- package/cloud-runtime/standalone/.next/static/chunks/9f8f719c4aa25e3d.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/a66e1891e808a664.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{3344004561eabdf8.js → bc3cad3c821b169b.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/bc727d3d9993e9be.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/cd308f61797939cd.js +6 -0
- package/cloud-runtime/standalone/.next/static/chunks/d5d6be8239e57c56.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{ee5f1457fbc593e1.js → dfff51033c303fc7.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/e62d5fa120fdf21f.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{turbopack-5b5918f610666d2d.js → turbopack-97e846241a3a64af.js} +1 -1
- package/cloud-runtime/standalone/README.md +3 -3
- package/cloud-runtime/standalone/app/api/chat/route.ts +38 -28
- package/cloud-runtime/standalone/app/api/chat-runs/[id]/route.ts +19 -0
- package/cloud-runtime/standalone/app/api/chat-runs/[id]/signal/route.ts +32 -0
- package/cloud-runtime/standalone/app/api/chat-runs/route.ts +37 -0
- package/cloud-runtime/standalone/app/api/history/route.ts +6 -0
- package/cloud-runtime/standalone/app/api/projects/[id]/memory/route.ts +17 -0
- package/cloud-runtime/standalone/app/api/providers/route.ts +9 -13
- package/cloud-runtime/standalone/app/api/schedules/debug/route.ts +23 -3
- package/cloud-runtime/standalone/app/api/schedules/poll/route.ts +5 -3
- package/cloud-runtime/standalone/app/api/schedules/route.ts +12 -17
- package/cloud-runtime/standalone/app/api/status/route.ts +6 -5
- package/cloud-runtime/standalone/app/api/threads/knowledge/route.ts +91 -0
- package/cloud-runtime/standalone/app/api/threads/route.ts +18 -1
- package/cloud-runtime/standalone/app/globals.css +22 -22
- package/cloud-runtime/standalone/app/projects/[slug]/graph/[taskId]/page.tsx +0 -21
- package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +608 -0
- package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +18 -2
- package/cloud-runtime/standalone/app/projects/[slug]/page.tsx +1 -455
- package/cloud-runtime/standalone/app/projects/[slug]/thread/[threadId]/page.tsx +14 -0
- package/cloud-runtime/standalone/app/welcome/page.tsx +329 -107
- package/cloud-runtime/standalone/components/ActionToolbar.tsx +25 -0
- package/cloud-runtime/standalone/components/ConfirmDialog.tsx +133 -0
- package/cloud-runtime/standalone/components/IconButton.tsx +35 -0
- package/cloud-runtime/standalone/components/ProjectCard.tsx +2 -2
- package/cloud-runtime/standalone/components/ProjectModal.tsx +2 -2
- package/cloud-runtime/standalone/components/TaskCard.tsx +2 -4
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +415 -76
- package/cloud-runtime/standalone/components/chat-ui/Composer.tsx +152 -101
- package/cloud-runtime/standalone/components/chat-ui/FileMentionPopoverItem.tsx +2 -2
- package/cloud-runtime/standalone/components/chat-ui/MessageList.tsx +46 -43
- package/cloud-runtime/standalone/components/chat-ui/ThreadView.tsx +73 -34
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +51 -23
- package/cloud-runtime/standalone/hooks/useComposerHistory.ts +130 -0
- package/cloud-runtime/standalone/hooks/useGroupChat.ts +24 -1
- package/cloud-runtime/standalone/hooks/useProcessPolling.ts +69 -6
- package/cloud-runtime/standalone/lib/history-store.ts +532 -38
- package/cloud-runtime/standalone/lib/knowledge-notes.ts +251 -0
- package/cloud-runtime/standalone/lib/knowledge-store.ts +233 -0
- package/cloud-runtime/standalone/lib/memory-extractor.ts +76 -60
- package/cloud-runtime/standalone/lib/mesh-core/journal.ts +30 -0
- package/cloud-runtime/standalone/lib/mesh-core/self.ts +94 -0
- package/cloud-runtime/standalone/lib/orchestrator/chat-activities.ts +60 -0
- package/cloud-runtime/standalone/lib/orchestrator/chat-processor.ts +168 -0
- package/cloud-runtime/standalone/lib/orchestrator/chat-types.ts +29 -0
- package/cloud-runtime/standalone/lib/orchestrator/runtime.ts +20 -0
- package/cloud-runtime/standalone/lib/provider-clis.ts +63 -0
- package/cloud-runtime/standalone/lib/queue/boss.ts +2 -1
- package/cloud-runtime/standalone/lib/repo-knowledge.ts +19 -2
- package/cloud-runtime/standalone/lib/sqlite-query-adapter.ts +78 -0
- package/cloud-runtime/standalone/lib/stream-multiplexer.ts +101 -14
- package/cloud-runtime/standalone/lib/task-context.ts +7 -4
- package/cloud-runtime/standalone/lib/thread-knowledge-runs.ts +227 -0
- package/cloud-runtime/standalone/lib/thread-knowledge.ts +419 -0
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/README.md +2 -2
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/glib-2.0/include/glibconfig.h +9 -8
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib → sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3} +0 -0
- package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/package.json +11 -5
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/cloud-runtime/standalone/node_modules/@img/{sharp-darwin-arm64 → sharp-linux-x64}/package.json +13 -7
- package/cloud-runtime/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/cloud-runtime/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/cloud-runtime/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/build/Release/better_sqlite3.node +0 -0
- package/cloud-runtime/standalone/package-lock.json +13 -0
- package/cloud-runtime/standalone/package.json +1 -0
- package/cloud-runtime/standalone/server.js +1 -1
- package/cloud-runtime/standalone/src/graph/api-schemas.ts +2 -2
- package/cloud-runtime/standalone/src/graph/executor.ts +9 -7
- package/cloud-runtime/standalone/src/graph/function-executor.ts +4 -1
- package/cloud-runtime/standalone/src/graph/internal-function-dispatcher.ts +174 -0
- package/cloud-runtime/standalone/src/graph/types.ts +3 -3
- package/cloud-runtime/standalone/src/graph/work-dispatcher.ts +5 -1
- package/cloud-runtime/standalone/styles/workspaceSidebar.css +2 -0
- package/cloud-runtime/standalone/tsconfig.json +3 -1
- package/cloud-runtime/standalone/worker/index.js +2930 -137
- package/cloud-runtime/standalone/worker/index.ts +8 -1
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[externals]_child_process_964038fc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__03a1bf91._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__065c5114._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__07dce481._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__09f46c85._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__149bcf6d._.js +0 -115
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__14bad16e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__14e3bf74._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1632828c._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__24b8ccd3._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__284e1cbe._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__28d6e806._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2bcb75a7._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__32e5f341._.js +0 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3b4a126a._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c7464e8._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d82dc78._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__406bdd54._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__40d6458a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__47ca4946._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__49fb4a12._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5327e395._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__55d75c3a._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__592e81f9._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a6a194c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5af16b4f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__60ba5058._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6716441c._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__673aedc6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6a44c891._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__6b680112._.js +0 -55
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7312fad4._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7456196c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74d26856._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__772c6fae._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__787ba54b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__79157eef._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__82d76712._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8311f060._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__84e90655._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__90a887dc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9345d703._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98294450._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__985f0d9f._.js +0 -51
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9b32295e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a64d978e._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__babcd1af._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c16f03fb._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c2767ca5._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c72c6d4a._.js +0 -25
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ca851b15._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d25227df._.js +0 -29
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e06820c3._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e429a0bc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e4397d43._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ec8735f4._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ef09ab99._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f366a937._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fdaa8a27._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fddde532._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff53f445._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_1111d342._.js +0 -101
- package/cloud-runtime/standalone/.next/server/chunks/_4b60ba15._.js +0 -49
- package/cloud-runtime/standalone/.next/server/chunks/_54252651._.js +0 -49
- package/cloud-runtime/standalone/.next/server/chunks/_818a89c4._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_a4a21d4f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_a759d52b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_e6b28eae._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_e868e7c1._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/lib_23509137._.js +0 -196
- package/cloud-runtime/standalone/.next/server/chunks/lib_3273d5f9._.js +0 -196
- package/cloud-runtime/standalone/.next/server/chunks/lib_50ba0b4c._.js +0 -63
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_33963d95.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_56c5acb3.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_888b3578.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_e3bb4da8._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__113d6767._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__6a9d3855._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__942ca438._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ce3b51aa._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1ec61dee._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_27904584._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_43472af3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_94effa0f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_d458d1eb._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fbced30b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_page_tsx_e0fabf6e._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_a8f86889._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_play_6595a532.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/1184bf1bfdf97666.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/5ace4b4f4475962a.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/64f812259cf8c243.js +0 -18
- package/cloud-runtime/standalone/.next/static/chunks/6509f7fecbf44493.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/6dbf5940e30fa9c7.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/7e91f395ace1dd2c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/7f13efe9329d3f97.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/80219bbddcf65109.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/86ace6febb11ad71.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/9d50c2514f72d926.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/b079c677d9b39f98.js +0 -5
- package/cloud-runtime/standalone/.next/static/chunks/b88352740262931f.js +0 -6
- package/cloud-runtime/standalone/.next/static/chunks/bd6c5b5b4fbd6413.css +0 -2
- package/cloud-runtime/standalone/.next/static/chunks/c5609fd2abb65850.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/d95cd010361834be.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/eab1c7d0246592f8.js +0 -8
- package/cloud-runtime/standalone/.next/static/chunks/f7bbf5cfcfed8ba9.js +0 -1
- package/cloud-runtime/standalone/coverage/clover.xml +0 -1208
- package/cloud-runtime/standalone/coverage/coverage-final.json +0 -29
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/audit/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/audit/route.ts.html +0 -208
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/[...nextauth]/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/[...nextauth]/route.ts.html +0 -166
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/daemon-secret/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/daemon-secret/route.ts.html +0 -532
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/status/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/status/route.ts.html +0 -178
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/learnings/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/learnings/route.ts.html +0 -262
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/logs/stream/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/logs/stream/route.ts.html +0 -448
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/complete/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/complete/route.ts.html +0 -331
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/route.ts.html +0 -505
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/stage-prompts/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/stage-prompts/route.ts.html +0 -412
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/advance/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/advance/route.ts.html +0 -304
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/logs/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/logs/route.ts.html +0 -202
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/route.ts.html +0 -373
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/route.ts.html +0 -499
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/stream/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/stream/route.ts.html +0 -349
- package/cloud-runtime/standalone/coverage/lcov-report/base.css +0 -224
- package/cloud-runtime/standalone/coverage/lcov-report/block-navigation.js +0 -87
- package/cloud-runtime/standalone/coverage/lcov-report/components/AuthProvider.tsx.html +0 -259
- package/cloud-runtime/standalone/coverage/lcov-report/components/ChatInterface.tsx.html +0 -1228
- package/cloud-runtime/standalone/coverage/lcov-report/components/KanbanBoard.tsx.html +0 -1024
- package/cloud-runtime/standalone/coverage/lcov-report/components/Layout.tsx.html +0 -211
- package/cloud-runtime/standalone/coverage/lcov-report/components/LearningsPanel.tsx.html +0 -535
- package/cloud-runtime/standalone/coverage/lcov-report/components/LogTimeline.tsx.html +0 -415
- package/cloud-runtime/standalone/coverage/lcov-report/components/SortableTaskCard.tsx.html +0 -358
- package/cloud-runtime/standalone/coverage/lcov-report/components/StagePills.tsx.html +0 -439
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskCard.tsx.html +0 -514
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskCardOverlay.tsx.html +0 -256
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskDetail.tsx.html +0 -622
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskList.tsx.html +0 -253
- package/cloud-runtime/standalone/coverage/lcov-report/components/index.html +0 -281
- package/cloud-runtime/standalone/coverage/lcov-report/favicon.png +0 -0
- package/cloud-runtime/standalone/coverage/lcov-report/hooks/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/hooks/useTasks.ts.html +0 -1042
- package/cloud-runtime/standalone/coverage/lcov-report/index.html +0 -341
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth-client.ts.html +0 -202
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth-server.ts.html +0 -172
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth.ts.html +0 -265
- package/cloud-runtime/standalone/coverage/lcov-report/lib/db.ts.html +0 -1252
- package/cloud-runtime/standalone/coverage/lcov-report/lib/index.html +0 -131
- package/cloud-runtime/standalone/coverage/lcov-report/lib/orchestrator.ts.html +0 -409
- package/cloud-runtime/standalone/coverage/lcov-report/lib/security.ts.html +0 -1165
- package/cloud-runtime/standalone/coverage/lcov-report/lib/supabase-server.ts.html +0 -175
- package/cloud-runtime/standalone/coverage/lcov-report/lib/supabase.ts.html +0 -157
- package/cloud-runtime/standalone/coverage/lcov-report/prettify.css +0 -1
- package/cloud-runtime/standalone/coverage/lcov-report/prettify.js +0 -2
- package/cloud-runtime/standalone/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/cloud-runtime/standalone/coverage/lcov-report/sorter.js +0 -210
- package/cloud-runtime/standalone/coverage/lcov.info +0 -2386
- package/cloud-runtime/standalone/docs/LIMITS.md +0 -63
- package/cloud-runtime/standalone/docs/architecture/ADR-001-hybrid-to-full-sqlite.md +0 -345
- package/cloud-runtime/standalone/docs/baseline/baseline-report.json +0 -1009
- package/cloud-runtime/standalone/docs/baseline/critical-queries.md +0 -105
- package/cloud-runtime/standalone/docs/baseline/lock-metrics.json +0 -21
- package/cloud-runtime/standalone/docs/baseline/read-latency.json +0 -146
- package/cloud-runtime/standalone/docs/baseline/restore-time.json +0 -10
- package/cloud-runtime/standalone/docs/baseline/write-metrics.json +0 -803
- package/cloud-runtime/standalone/docs/decisions/sqlite-migration-adr.md +0 -327
- package/cloud-runtime/standalone/docs/error-code-mapping.md +0 -74
- package/cloud-runtime/standalone/docs/migration-plan.md +0 -120
- package/cloud-runtime/standalone/docs/migration-spec.md +0 -345
- package/cloud-runtime/standalone/docs/pg-sqlite-compatibility-matrix.md +0 -554
- package/cloud-runtime/standalone/docs/project-agent-migration-status.md +0 -229
- package/cloud-runtime/standalone/docs/runbook-shadow-read.md +0 -66
- package/cloud-runtime/standalone/docs/runbook.md +0 -155
- package/cloud-runtime/standalone/docs/specs/cli-postgres-removal.md +0 -69
- package/cloud-runtime/standalone/docs/specs/thread-mentions.md +0 -53
- package/cloud-runtime/standalone/docs/ux/GlobalChatFlow.storyboard +0 -23
- package/cloud-runtime/standalone/docs/ux/assistant-chat-cli.md +0 -32
- package/cloud-runtime/standalone/mcp/dist/constants.js +0 -66
- package/cloud-runtime/standalone/mcp/dist/db.js +0 -220
- package/cloud-runtime/standalone/mcp/dist/index.js +0 -7
- package/cloud-runtime/standalone/mcp/dist/security.js +0 -18
- package/cloud-runtime/standalone/mcp/dist/server.js +0 -240
- package/cloud-runtime/standalone/mcp/dist/task-context.js +0 -287
- package/cloud-runtime/standalone/mcp/dist/test-client.js +0 -82
- package/cloud-runtime/standalone/mcp/dist/tools/audit.js +0 -69
- package/cloud-runtime/standalone/mcp/dist/tools/learnings.js +0 -88
- package/cloud-runtime/standalone/mcp/dist/tools/queue.js +0 -312
- package/cloud-runtime/standalone/mcp/dist/tools/tasks.js +0 -244
- package/cloud-runtime/standalone/mcp/dist/types.js +0 -74
- package/cloud-runtime/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/cloud-runtime/standalone/notes/comments-context-demo.md +0 -141
- package/cloud-runtime/standalone/notes/comments-context-plan.md +0 -119
- package/cloud-runtime/standalone/notes/context-audit.md +0 -21
- package/cloud-runtime/standalone/notes/project-layer-plan.md +0 -30
- package/cloud-runtime/standalone/notes/project-layer.md +0 -123
- package/cloud-runtime/standalone/notes/temporal-migration-design.md +0 -199
- package/cloud-runtime/standalone/playwright-report/data/00d55996f37c1506b90144c85493dd85032c13e5.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/0b9d409e57237ae111d7ba258d3dfe64dc368456.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/b33d5e80a15bd1deda4415b9d318ef73f581c950.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/b55684161aa440d0614595e13c91338f0420abbb.md +0 -131
- package/cloud-runtime/standalone/playwright-report/data/b9913957ae07e7565c38ddd71215be79b1ceb017.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/c3538be8ebbebc9fe4a7df8f12f04483af4a0d91.png +0 -0
- package/cloud-runtime/standalone/playwright-report/data/fe638f64ff5e36f1c30325564565662d3f57da87.md +0 -180
- package/cloud-runtime/standalone/playwright-report/index.html +0 -85
- package/cloud-runtime/standalone/test-results/auth-Authentication-Flow-S-aff25-sion-across-page-navigation-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/comments-Task-comments-add-4dc59-nd-persists-it-for-the-task-chromium/error-context.md +0 -131
- package/cloud-runtime/standalone/test-results/comments-Task-comments-add-4dc59-nd-persists-it-for-the-task-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage--4082a-er-planning-after-ideation--chromium/error-context.md +0 -180
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage--4082a-er-planning-after-ideation--chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage-Columns-displays-all-9-SDLC-stages-chromium/error-context.md +0 -180
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Stage-Columns-displays-all-9-SDLC-stages-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Task-D-b6d98-ys-tasks-in-correct-columns-chromium/error-context.md +0 -180
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Task-D-b6d98-ys-tasks-in-correct-columns-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Kanban-Board-Task-Display-shows-task-count-per-column-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/test-results/kanban-Task-Lifecycle-can-advance-task-through-all-stages-chromium/test-failed-1.png +0 -0
- package/cloud-runtime/standalone/tsconfig.tsbuildinfo +0 -1
- /package/cloud-runtime/standalone/.next/static/{HOfhTqGoYN6GjsW9CCf3t → i_9nSHyb52FGkCbRgv7EJ}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{HOfhTqGoYN6GjsW9CCf3t → i_9nSHyb52FGkCbRgv7EJ}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{HOfhTqGoYN6GjsW9CCf3t → i_9nSHyb52FGkCbRgv7EJ}/_ssgManifest.js +0 -0
- /package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/lib/index.js +0 -0
- /package/cloud-runtime/standalone/node_modules/@img/{sharp-libvips-darwin-arm64 → sharp-libvips-linux-x64}/versions.json +0 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { randomUUID } from "crypto";
|
|
2
|
+
import { getSQLiteDb } from "./sqlite-query-adapter";
|
|
3
|
+
import { listKnowledgeEntries, type KnowledgeScope, type KnowledgeSourceType } from "./knowledge-store";
|
|
4
|
+
|
|
5
|
+
export type KnowledgeNoteScope = KnowledgeScope;
|
|
6
|
+
|
|
7
|
+
export interface KnowledgeNote {
|
|
8
|
+
id: string;
|
|
9
|
+
scope: KnowledgeNoteScope;
|
|
10
|
+
subjectId: string;
|
|
11
|
+
content: string;
|
|
12
|
+
changeSummary: string | null;
|
|
13
|
+
sourceType: KnowledgeSourceType;
|
|
14
|
+
sourceId: string;
|
|
15
|
+
metadata: Record<string, unknown>;
|
|
16
|
+
version: number;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface UpsertKnowledgeNoteInput {
|
|
22
|
+
scope: KnowledgeNoteScope;
|
|
23
|
+
subjectId: string;
|
|
24
|
+
content: string;
|
|
25
|
+
changeSummary?: string | null;
|
|
26
|
+
sourceType: KnowledgeSourceType;
|
|
27
|
+
sourceId: string;
|
|
28
|
+
metadata?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function parseJsonObject(raw: string | null): Record<string, unknown> {
|
|
32
|
+
if (!raw) return {};
|
|
33
|
+
try {
|
|
34
|
+
const parsed = JSON.parse(raw);
|
|
35
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed)
|
|
36
|
+
? (parsed as Record<string, unknown>)
|
|
37
|
+
: {};
|
|
38
|
+
} catch {
|
|
39
|
+
return {};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function normalizeContent(content: string): string {
|
|
44
|
+
return content
|
|
45
|
+
.replace(/\r\n/g, "\n")
|
|
46
|
+
.split("\n")
|
|
47
|
+
.map((line) => line.replace(/\s+$/g, ""))
|
|
48
|
+
.join("\n")
|
|
49
|
+
.trim();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function mapRow(row: {
|
|
53
|
+
id: string;
|
|
54
|
+
scope: KnowledgeNoteScope;
|
|
55
|
+
subject_id: string;
|
|
56
|
+
content: string;
|
|
57
|
+
change_summary: string | null;
|
|
58
|
+
source_type: KnowledgeSourceType;
|
|
59
|
+
source_id: string;
|
|
60
|
+
metadata: string | null;
|
|
61
|
+
version: number;
|
|
62
|
+
created_at: string;
|
|
63
|
+
updated_at: string;
|
|
64
|
+
}): KnowledgeNote {
|
|
65
|
+
return {
|
|
66
|
+
id: row.id,
|
|
67
|
+
scope: row.scope,
|
|
68
|
+
subjectId: row.subject_id,
|
|
69
|
+
content: row.content,
|
|
70
|
+
changeSummary: row.change_summary ?? null,
|
|
71
|
+
sourceType: row.source_type,
|
|
72
|
+
sourceId: row.source_id,
|
|
73
|
+
metadata: parseJsonObject(row.metadata),
|
|
74
|
+
version: Number(row.version ?? 1),
|
|
75
|
+
createdAt: row.created_at,
|
|
76
|
+
updatedAt: row.updated_at,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getKnowledgeNoteRow(scope: KnowledgeNoteScope, subjectId: string) {
|
|
81
|
+
const db = getSQLiteDb();
|
|
82
|
+
return db
|
|
83
|
+
.prepare(
|
|
84
|
+
`SELECT id, scope, subject_id, content, change_summary, source_type, source_id,
|
|
85
|
+
metadata, version, created_at, updated_at
|
|
86
|
+
FROM knowledge_notes
|
|
87
|
+
WHERE scope = ? AND subject_id = ?
|
|
88
|
+
LIMIT 1`
|
|
89
|
+
)
|
|
90
|
+
.get(scope, subjectId) as {
|
|
91
|
+
id: string;
|
|
92
|
+
scope: KnowledgeNoteScope;
|
|
93
|
+
subject_id: string;
|
|
94
|
+
content: string;
|
|
95
|
+
change_summary: string | null;
|
|
96
|
+
source_type: KnowledgeSourceType;
|
|
97
|
+
source_id: string;
|
|
98
|
+
metadata: string | null;
|
|
99
|
+
version: number;
|
|
100
|
+
created_at: string;
|
|
101
|
+
updated_at: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function listLegacySystemStatements(scope: KnowledgeNoteScope, subjectId: string): string[] {
|
|
106
|
+
const db = getSQLiteDb();
|
|
107
|
+
if (scope === "repo") {
|
|
108
|
+
const systemRepoRows = db
|
|
109
|
+
.prepare(
|
|
110
|
+
`SELECT content
|
|
111
|
+
FROM repo_knowledge
|
|
112
|
+
WHERE repo_id = ? AND producer = 'system'
|
|
113
|
+
ORDER BY created_at ASC`
|
|
114
|
+
)
|
|
115
|
+
.all(subjectId) as Array<{ content: string }>;
|
|
116
|
+
const entryBodies = listKnowledgeEntries({ scope: "repo", subjectId, limit: 100 })
|
|
117
|
+
.map((entry) => entry.body.trim());
|
|
118
|
+
return [...systemRepoRows.map((row) => row.content.trim()), ...entryBodies].filter(Boolean);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (scope === "project") {
|
|
122
|
+
const systemProjectRows = db
|
|
123
|
+
.prepare(
|
|
124
|
+
`SELECT content
|
|
125
|
+
FROM project_memory
|
|
126
|
+
WHERE project_id = ? AND producer = 'system'
|
|
127
|
+
ORDER BY created_at ASC`
|
|
128
|
+
)
|
|
129
|
+
.all(subjectId) as Array<{ content: string }>;
|
|
130
|
+
const entryBodies = listKnowledgeEntries({ scope: "project", subjectId, limit: 100 })
|
|
131
|
+
.map((entry) => entry.body.trim());
|
|
132
|
+
return [...systemProjectRows.map((row) => row.content.trim()), ...entryBodies].filter(Boolean);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const agentRows = db
|
|
136
|
+
.prepare(
|
|
137
|
+
`SELECT content
|
|
138
|
+
FROM agent_memory
|
|
139
|
+
WHERE agent_id = ?
|
|
140
|
+
ORDER BY created_at ASC
|
|
141
|
+
LIMIT 100`
|
|
142
|
+
)
|
|
143
|
+
.all(subjectId) as Array<{ content: string }>;
|
|
144
|
+
const entryBodies = listKnowledgeEntries({ scope: "agent", subjectId, limit: 100 })
|
|
145
|
+
.map((entry) => entry.body.trim());
|
|
146
|
+
return [...agentRows.map((row) => row.content.trim()), ...entryBodies].filter(Boolean);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function synthesizeLegacyNoteContent(scope: KnowledgeNoteScope, subjectId: string): string {
|
|
150
|
+
const unique = Array.from(new Set(listLegacySystemStatements(scope, subjectId)));
|
|
151
|
+
if (unique.length === 0) return "";
|
|
152
|
+
return unique.map((line) => `- ${line.replace(/^\-\s*/, "")}`).join("\n");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function ensureKnowledgeNote(scope: KnowledgeNoteScope, subjectId: string): KnowledgeNote | null {
|
|
156
|
+
const existing = getKnowledgeNoteRow(scope, subjectId);
|
|
157
|
+
if (existing) return mapRow(existing);
|
|
158
|
+
|
|
159
|
+
const synthesized = synthesizeLegacyNoteContent(scope, subjectId);
|
|
160
|
+
if (!synthesized) return null;
|
|
161
|
+
|
|
162
|
+
const db = getSQLiteDb();
|
|
163
|
+
const now = new Date().toISOString();
|
|
164
|
+
const id = randomUUID();
|
|
165
|
+
db.prepare(
|
|
166
|
+
`INSERT INTO knowledge_notes (
|
|
167
|
+
id, scope, subject_id, content, change_summary, source_type, source_id, metadata, version, created_at, updated_at
|
|
168
|
+
) VALUES (?, ?, ?, ?, ?, 'task_completion', 'legacy-synthesis', ?, 1, ?, ?)`
|
|
169
|
+
).run(
|
|
170
|
+
id,
|
|
171
|
+
scope,
|
|
172
|
+
subjectId,
|
|
173
|
+
synthesized,
|
|
174
|
+
"Initial note synthesized from existing system knowledge",
|
|
175
|
+
JSON.stringify({ synthesized_from_legacy: true }),
|
|
176
|
+
now,
|
|
177
|
+
now,
|
|
178
|
+
);
|
|
179
|
+
db.prepare(
|
|
180
|
+
`INSERT INTO knowledge_note_versions (
|
|
181
|
+
id, note_id, version, content, change_summary, source_type, source_id, metadata, created_at
|
|
182
|
+
) VALUES (?, ?, 1, ?, ?, 'task_completion', 'legacy-synthesis', ?, ?)`
|
|
183
|
+
).run(
|
|
184
|
+
randomUUID(),
|
|
185
|
+
id,
|
|
186
|
+
synthesized,
|
|
187
|
+
"Initial note synthesized from existing system knowledge",
|
|
188
|
+
JSON.stringify({ synthesized_from_legacy: true }),
|
|
189
|
+
now,
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
const created = getKnowledgeNoteRow(scope, subjectId);
|
|
193
|
+
return created ? mapRow(created) : null;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function getKnowledgeNote(scope: KnowledgeNoteScope, subjectId: string): KnowledgeNote | null {
|
|
197
|
+
const trimmedSubjectId = subjectId.trim();
|
|
198
|
+
if (!trimmedSubjectId) return null;
|
|
199
|
+
return ensureKnowledgeNote(scope, trimmedSubjectId);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function upsertKnowledgeNote(input: UpsertKnowledgeNoteInput): { note: KnowledgeNote; changed: boolean } {
|
|
203
|
+
const db = getSQLiteDb();
|
|
204
|
+
const subjectId = input.subjectId.trim();
|
|
205
|
+
const sourceId = input.sourceId.trim();
|
|
206
|
+
const content = normalizeContent(input.content);
|
|
207
|
+
const changeSummary = input.changeSummary?.trim() || null;
|
|
208
|
+
if (!subjectId || !sourceId) {
|
|
209
|
+
throw new Error("subjectId and sourceId are required");
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const existing = ensureKnowledgeNote(input.scope, subjectId);
|
|
213
|
+
if (existing && normalizeContent(existing.content) === content) {
|
|
214
|
+
return { note: existing, changed: false };
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const now = new Date().toISOString();
|
|
218
|
+
const metadata = JSON.stringify(input.metadata ?? {});
|
|
219
|
+
|
|
220
|
+
if (!existing) {
|
|
221
|
+
const id = randomUUID();
|
|
222
|
+
db.prepare(
|
|
223
|
+
`INSERT INTO knowledge_notes (
|
|
224
|
+
id, scope, subject_id, content, change_summary, source_type, source_id, metadata, version, created_at, updated_at
|
|
225
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, 1, ?, ?)`
|
|
226
|
+
).run(id, input.scope, subjectId, content, changeSummary, input.sourceType, sourceId, metadata, now, now);
|
|
227
|
+
db.prepare(
|
|
228
|
+
`INSERT INTO knowledge_note_versions (
|
|
229
|
+
id, note_id, version, content, change_summary, source_type, source_id, metadata, created_at
|
|
230
|
+
) VALUES (?, ?, 1, ?, ?, ?, ?, ?, ?)`
|
|
231
|
+
).run(randomUUID(), id, content, changeSummary, input.sourceType, sourceId, metadata, now);
|
|
232
|
+
const created = getKnowledgeNote(input.scope, subjectId);
|
|
233
|
+
if (!created) throw new Error("Failed to read created knowledge note");
|
|
234
|
+
return { note: created, changed: true };
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const nextVersion = existing.version + 1;
|
|
238
|
+
db.prepare(
|
|
239
|
+
`UPDATE knowledge_notes
|
|
240
|
+
SET content = ?, change_summary = ?, source_type = ?, source_id = ?, metadata = ?, version = ?, updated_at = ?
|
|
241
|
+
WHERE id = ?`
|
|
242
|
+
).run(content, changeSummary, input.sourceType, sourceId, metadata, nextVersion, now, existing.id);
|
|
243
|
+
db.prepare(
|
|
244
|
+
`INSERT INTO knowledge_note_versions (
|
|
245
|
+
id, note_id, version, content, change_summary, source_type, source_id, metadata, created_at
|
|
246
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
|
247
|
+
).run(randomUUID(), existing.id, nextVersion, content, changeSummary, input.sourceType, sourceId, metadata, now);
|
|
248
|
+
const updated = getKnowledgeNote(input.scope, subjectId);
|
|
249
|
+
if (!updated) throw new Error("Failed to read updated knowledge note");
|
|
250
|
+
return { note: updated, changed: true };
|
|
251
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "crypto";
|
|
2
|
+
import { getSQLiteDb } from "./sqlite-query-adapter";
|
|
3
|
+
|
|
4
|
+
export type KnowledgeScope = "agent" | "repo" | "project";
|
|
5
|
+
export type KnowledgeSourceType = "reflection" | "thread_transition" | "task_completion";
|
|
6
|
+
export type KnowledgeKind =
|
|
7
|
+
| "outcome"
|
|
8
|
+
| "decision"
|
|
9
|
+
| "pattern"
|
|
10
|
+
| "gotcha"
|
|
11
|
+
| "preference"
|
|
12
|
+
| "constraint"
|
|
13
|
+
| "convention"
|
|
14
|
+
| "lesson";
|
|
15
|
+
|
|
16
|
+
export interface KnowledgeEvidence {
|
|
17
|
+
id?: string;
|
|
18
|
+
note: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface KnowledgeEntry {
|
|
22
|
+
id: string;
|
|
23
|
+
scope: KnowledgeScope;
|
|
24
|
+
subjectId: string;
|
|
25
|
+
sourceType: KnowledgeSourceType;
|
|
26
|
+
sourceId: string;
|
|
27
|
+
kind: KnowledgeKind;
|
|
28
|
+
title: string;
|
|
29
|
+
body: string;
|
|
30
|
+
confidence: number | null;
|
|
31
|
+
durability: number | null;
|
|
32
|
+
tags: string[];
|
|
33
|
+
evidence: KnowledgeEvidence[];
|
|
34
|
+
metadata: Record<string, unknown>;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface KnowledgeDraft {
|
|
40
|
+
scope: KnowledgeScope;
|
|
41
|
+
subjectId: string;
|
|
42
|
+
sourceType: KnowledgeSourceType;
|
|
43
|
+
sourceId: string;
|
|
44
|
+
kind: KnowledgeKind;
|
|
45
|
+
title: string;
|
|
46
|
+
body: string;
|
|
47
|
+
confidence?: number | null;
|
|
48
|
+
durability?: number | null;
|
|
49
|
+
tags?: string[];
|
|
50
|
+
evidence?: KnowledgeEvidence[];
|
|
51
|
+
metadata?: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function clampUnitNumber(value: unknown): number | null {
|
|
55
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return null;
|
|
56
|
+
return Math.max(0, Math.min(1, value));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function parseJsonArray<T>(raw: string | null): T[] {
|
|
60
|
+
if (!raw) return [];
|
|
61
|
+
try {
|
|
62
|
+
const parsed = JSON.parse(raw);
|
|
63
|
+
return Array.isArray(parsed) ? (parsed as T[]) : [];
|
|
64
|
+
} catch {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function parseJsonObject(raw: string | null): Record<string, unknown> {
|
|
70
|
+
if (!raw) return {};
|
|
71
|
+
try {
|
|
72
|
+
const parsed = JSON.parse(raw);
|
|
73
|
+
return parsed && typeof parsed === "object" && !Array.isArray(parsed)
|
|
74
|
+
? (parsed as Record<string, unknown>)
|
|
75
|
+
: {};
|
|
76
|
+
} catch {
|
|
77
|
+
return {};
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function normalizeTags(tags?: string[]): string[] {
|
|
82
|
+
const seen = new Set<string>();
|
|
83
|
+
const result: string[] = [];
|
|
84
|
+
for (const tag of tags ?? []) {
|
|
85
|
+
const trimmed = String(tag ?? "").trim().toLowerCase();
|
|
86
|
+
if (!trimmed || seen.has(trimmed)) continue;
|
|
87
|
+
seen.add(trimmed);
|
|
88
|
+
result.push(trimmed);
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function normalizeEvidence(evidence?: KnowledgeEvidence[]): KnowledgeEvidence[] {
|
|
94
|
+
const result: KnowledgeEvidence[] = [];
|
|
95
|
+
for (const item of evidence ?? []) {
|
|
96
|
+
const note = String(item?.note ?? "").trim();
|
|
97
|
+
const id = typeof item?.id === "string" ? item.id.trim() : "";
|
|
98
|
+
if (!note) continue;
|
|
99
|
+
result.push(id ? { id, note } : { note });
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function mapRow(row: {
|
|
105
|
+
id: string;
|
|
106
|
+
scope: KnowledgeScope;
|
|
107
|
+
subject_id: string;
|
|
108
|
+
source_type: KnowledgeSourceType;
|
|
109
|
+
source_id: string;
|
|
110
|
+
kind: KnowledgeKind;
|
|
111
|
+
title: string;
|
|
112
|
+
body: string;
|
|
113
|
+
confidence: number | null;
|
|
114
|
+
durability: number | null;
|
|
115
|
+
tags: string | null;
|
|
116
|
+
evidence: string | null;
|
|
117
|
+
metadata: string | null;
|
|
118
|
+
created_at: string;
|
|
119
|
+
updated_at: string;
|
|
120
|
+
}): KnowledgeEntry {
|
|
121
|
+
return {
|
|
122
|
+
id: row.id,
|
|
123
|
+
scope: row.scope,
|
|
124
|
+
subjectId: row.subject_id,
|
|
125
|
+
sourceType: row.source_type,
|
|
126
|
+
sourceId: row.source_id,
|
|
127
|
+
kind: row.kind,
|
|
128
|
+
title: row.title,
|
|
129
|
+
body: row.body,
|
|
130
|
+
confidence: clampUnitNumber(row.confidence),
|
|
131
|
+
durability: clampUnitNumber(row.durability),
|
|
132
|
+
tags: parseJsonArray<string>(row.tags),
|
|
133
|
+
evidence: parseJsonArray<KnowledgeEvidence>(row.evidence),
|
|
134
|
+
metadata: parseJsonObject(row.metadata),
|
|
135
|
+
createdAt: row.created_at,
|
|
136
|
+
updatedAt: row.updated_at,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function listKnowledgeEntries(input: {
|
|
141
|
+
scope: KnowledgeScope;
|
|
142
|
+
subjectId: string;
|
|
143
|
+
limit?: number;
|
|
144
|
+
}): KnowledgeEntry[] {
|
|
145
|
+
const db = getSQLiteDb();
|
|
146
|
+
const rows = db
|
|
147
|
+
.prepare(
|
|
148
|
+
`SELECT id, scope, subject_id, source_type, source_id, kind, title, body,
|
|
149
|
+
confidence, durability, tags, evidence, metadata, created_at, updated_at
|
|
150
|
+
FROM knowledge_entries
|
|
151
|
+
WHERE scope = ? AND subject_id = ?
|
|
152
|
+
ORDER BY updated_at DESC, created_at DESC
|
|
153
|
+
LIMIT ?`
|
|
154
|
+
)
|
|
155
|
+
.all(input.scope, input.subjectId, input.limit ?? 50) as Array<{
|
|
156
|
+
id: string;
|
|
157
|
+
scope: KnowledgeScope;
|
|
158
|
+
subject_id: string;
|
|
159
|
+
source_type: KnowledgeSourceType;
|
|
160
|
+
source_id: string;
|
|
161
|
+
kind: KnowledgeKind;
|
|
162
|
+
title: string;
|
|
163
|
+
body: string;
|
|
164
|
+
confidence: number | null;
|
|
165
|
+
durability: number | null;
|
|
166
|
+
tags: string | null;
|
|
167
|
+
evidence: string | null;
|
|
168
|
+
metadata: string | null;
|
|
169
|
+
created_at: string;
|
|
170
|
+
updated_at: string;
|
|
171
|
+
}>;
|
|
172
|
+
return rows.map(mapRow);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export function storeKnowledgeEntries(drafts: KnowledgeDraft[]): number {
|
|
176
|
+
if (drafts.length === 0) return 0;
|
|
177
|
+
|
|
178
|
+
const db = getSQLiteDb();
|
|
179
|
+
const now = new Date().toISOString();
|
|
180
|
+
const existingStmt = db.prepare(
|
|
181
|
+
`SELECT id
|
|
182
|
+
FROM knowledge_entries
|
|
183
|
+
WHERE scope = ? AND subject_id = ? AND content_hash = ?
|
|
184
|
+
LIMIT 1`
|
|
185
|
+
);
|
|
186
|
+
const insertStmt = db.prepare(
|
|
187
|
+
`INSERT INTO knowledge_entries (
|
|
188
|
+
id, scope, subject_id, source_type, source_id, kind, title, body,
|
|
189
|
+
confidence, durability, tags, evidence, metadata, content_hash, created_at, updated_at
|
|
190
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
let inserted = 0;
|
|
194
|
+
const tx = db.transaction((entries: KnowledgeDraft[]) => {
|
|
195
|
+
for (const draft of entries) {
|
|
196
|
+
const subjectId = draft.subjectId.trim();
|
|
197
|
+
const title = draft.title.trim();
|
|
198
|
+
const body = draft.body.trim();
|
|
199
|
+
const sourceId = draft.sourceId.trim();
|
|
200
|
+
if (!subjectId || !title || !body || !sourceId) continue;
|
|
201
|
+
|
|
202
|
+
const contentHash = createHash("sha256")
|
|
203
|
+
.update(`${draft.scope}\n${subjectId}\n${body}`)
|
|
204
|
+
.digest("hex");
|
|
205
|
+
|
|
206
|
+
const existing = existingStmt.get(draft.scope, subjectId, contentHash) as { id: string } | undefined;
|
|
207
|
+
if (existing) continue;
|
|
208
|
+
|
|
209
|
+
insertStmt.run(
|
|
210
|
+
randomUUID(),
|
|
211
|
+
draft.scope,
|
|
212
|
+
subjectId,
|
|
213
|
+
draft.sourceType,
|
|
214
|
+
sourceId,
|
|
215
|
+
draft.kind,
|
|
216
|
+
title,
|
|
217
|
+
body,
|
|
218
|
+
clampUnitNumber(draft.confidence),
|
|
219
|
+
clampUnitNumber(draft.durability),
|
|
220
|
+
JSON.stringify(normalizeTags(draft.tags)),
|
|
221
|
+
JSON.stringify(normalizeEvidence(draft.evidence)),
|
|
222
|
+
JSON.stringify(draft.metadata ?? {}),
|
|
223
|
+
contentHash,
|
|
224
|
+
now,
|
|
225
|
+
now,
|
|
226
|
+
);
|
|
227
|
+
inserted += 1;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
tx(drafts);
|
|
232
|
+
return inserted;
|
|
233
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createHash, randomUUID } from "crypto";
|
|
2
2
|
import { runCliResponse } from "./cli-runner";
|
|
3
3
|
import { getSQLiteDb } from "./sqlite-query-adapter";
|
|
4
|
+
import { storeKnowledgeEntries } from "./knowledge-store";
|
|
5
|
+
import { getKnowledgeNote, upsertKnowledgeNote } from "./knowledge-notes";
|
|
4
6
|
|
|
5
7
|
export interface ExtractedMemory {
|
|
6
8
|
memory_type: "outcome" | "decision" | "pattern" | "gotcha";
|
|
@@ -14,7 +16,9 @@ interface TaskContext {
|
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export interface ExtractedProjectKnowledge {
|
|
17
|
-
|
|
19
|
+
updated_note: string;
|
|
20
|
+
change_summary?: string;
|
|
21
|
+
no_change?: boolean;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
interface ResolveMemoryAgentIdInput {
|
|
@@ -39,24 +43,28 @@ Each memory must be:
|
|
|
39
43
|
Return ONLY a JSON array. Return [] if nothing worth remembering.
|
|
40
44
|
Do not wrap in markdown code blocks. Just raw JSON.`;
|
|
41
45
|
|
|
42
|
-
const PROJECT_KNOWLEDGE_PROMPT = `You are a project knowledge
|
|
43
|
-
Given a completed or failed task,
|
|
44
|
-
|
|
45
|
-
Each entry must be:
|
|
46
|
-
{ "content": "one concise sentence" }
|
|
47
|
-
|
|
48
|
-
Only include information that is likely useful across future work in the same project:
|
|
49
|
-
- workflows, conventions, recurring constraints
|
|
50
|
-
- stable gotchas or environment realities
|
|
51
|
-
- reusable project-specific practices
|
|
46
|
+
const PROJECT_KNOWLEDGE_PROMPT = `You are maintaining a living project knowledge note for a task execution system.
|
|
47
|
+
Given the current project note and a completed or failed task, decide whether the note should change.
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
Return ONLY a JSON object:
|
|
50
|
+
{
|
|
51
|
+
"updated_note": "full revised note in concise markdown",
|
|
52
|
+
"change_summary": "short summary of what changed",
|
|
53
|
+
"no_change": false
|
|
54
|
+
}
|
|
57
55
|
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
Rules:
|
|
57
|
+
- Revise the current note instead of appending isolated bullets.
|
|
58
|
+
- Write like a person's living project notes, not an extracted fact list.
|
|
59
|
+
- The note should help someone understand what the project is, what it does, what has been decided, and what lessons now shape future work.
|
|
60
|
+
- Prefer short sections and narrative paragraphs in markdown. Bullets are fine only when they genuinely improve clarity.
|
|
61
|
+
- Preserve strong existing content when still valid.
|
|
62
|
+
- Merge duplicate ideas, sharpen wording, and remove stale or unsupported claims.
|
|
63
|
+
- Only include project-scoped knowledge likely useful across future work in the same project.
|
|
64
|
+
- Do not include repo-specific durable truths that belong in repo knowledge.
|
|
65
|
+
- Avoid generic filler and avoid sounding like an audit log.
|
|
66
|
+
- If nothing project-scoped changed, return {"no_change": true}.
|
|
67
|
+
- Do not wrap in markdown code blocks. Just raw JSON.`;
|
|
60
68
|
|
|
61
69
|
export async function extractMemories(ctx: TaskContext): Promise<ExtractedMemory[]> {
|
|
62
70
|
const taskDescription = [
|
|
@@ -125,21 +133,22 @@ function parseProjectKnowledgeResponse(raw: string): ExtractedProjectKnowledge[]
|
|
|
125
133
|
|
|
126
134
|
try {
|
|
127
135
|
const parsed = JSON.parse(cleaned);
|
|
128
|
-
if (!Array.isArray(parsed)) return [];
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return [];
|
|
137
|
+
const updatedNote =
|
|
138
|
+
typeof (parsed as any).updated_note === "string"
|
|
139
|
+
? (parsed as any).updated_note.trim()
|
|
140
|
+
: "";
|
|
141
|
+
const noChange = Boolean((parsed as any).no_change);
|
|
142
|
+
if (noChange) return [];
|
|
143
|
+
if (!updatedNote) return [];
|
|
144
|
+
return [{
|
|
145
|
+
updated_note: updatedNote,
|
|
146
|
+
change_summary:
|
|
147
|
+
typeof (parsed as any).change_summary === "string"
|
|
148
|
+
? (parsed as any).change_summary.trim()
|
|
149
|
+
: undefined,
|
|
150
|
+
no_change: false,
|
|
151
|
+
}];
|
|
143
152
|
} catch {
|
|
144
153
|
console.warn("[project-knowledge] Failed to parse LLM response:", cleaned.slice(0, 200));
|
|
145
154
|
return [];
|
|
@@ -201,6 +210,23 @@ export async function storeMemories(
|
|
|
201
210
|
if (result.changes > 0) inserted++;
|
|
202
211
|
}
|
|
203
212
|
|
|
213
|
+
if (inserted > 0) {
|
|
214
|
+
storeKnowledgeEntries(
|
|
215
|
+
memories.map((mem) => ({
|
|
216
|
+
scope: "agent",
|
|
217
|
+
subjectId: agentId,
|
|
218
|
+
sourceType: "task_completion",
|
|
219
|
+
sourceId: taskId,
|
|
220
|
+
kind: mem.memory_type,
|
|
221
|
+
title: mem.content.trim().slice(0, 80),
|
|
222
|
+
body: mem.content.trim(),
|
|
223
|
+
confidence: 0.7,
|
|
224
|
+
durability: 0.6,
|
|
225
|
+
metadata: { task_id: taskId },
|
|
226
|
+
}))
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
|
|
204
230
|
return inserted;
|
|
205
231
|
}
|
|
206
232
|
|
|
@@ -231,7 +257,10 @@ async function resolveProjectId(projectIdOrSlug?: string | null): Promise<string
|
|
|
231
257
|
return project?.id ?? null;
|
|
232
258
|
}
|
|
233
259
|
|
|
234
|
-
export async function extractProjectKnowledge(
|
|
260
|
+
export async function extractProjectKnowledge(
|
|
261
|
+
ctx: TaskContext,
|
|
262
|
+
currentNote: string,
|
|
263
|
+
): Promise<ExtractedProjectKnowledge[]> {
|
|
235
264
|
const taskDescription = [
|
|
236
265
|
`Goal: ${ctx.goal}`,
|
|
237
266
|
`Status: ${ctx.status}`,
|
|
@@ -242,7 +271,7 @@ export async function extractProjectKnowledge(ctx: TaskContext): Promise<Extract
|
|
|
242
271
|
.filter(Boolean)
|
|
243
272
|
.join("\n");
|
|
244
273
|
|
|
245
|
-
const prompt = `${PROJECT_KNOWLEDGE_PROMPT}\n\nTask:\n${taskDescription}`;
|
|
274
|
+
const prompt = `${PROJECT_KNOWLEDGE_PROMPT}\n\nCurrent note:\n${currentNote || "(empty)"}\n\nTask:\n${taskDescription}`;
|
|
246
275
|
|
|
247
276
|
let raw = "";
|
|
248
277
|
try {
|
|
@@ -268,31 +297,18 @@ export async function storeProjectKnowledge(
|
|
|
268
297
|
entries: ExtractedProjectKnowledge[],
|
|
269
298
|
): Promise<number> {
|
|
270
299
|
if (entries.length === 0) return 0;
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
const
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
);
|
|
284
|
-
|
|
285
|
-
let inserted = 0;
|
|
286
|
-
const now = new Date().toISOString();
|
|
287
|
-
for (const entry of entries) {
|
|
288
|
-
const content = entry.content.trim();
|
|
289
|
-
if (!content || existingContents.has(content)) continue;
|
|
290
|
-
insert.run(randomUUID(), projectId, content, `task:${taskId}`, now);
|
|
291
|
-
existingContents.add(content);
|
|
292
|
-
inserted++;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
return inserted;
|
|
300
|
+
const entry = entries[0];
|
|
301
|
+
if (!entry || !entry.updated_note?.trim()) return 0;
|
|
302
|
+
const result = upsertKnowledgeNote({
|
|
303
|
+
scope: "project",
|
|
304
|
+
subjectId: projectId,
|
|
305
|
+
content: entry.updated_note.trim(),
|
|
306
|
+
changeSummary: entry.change_summary,
|
|
307
|
+
sourceType: "task_completion",
|
|
308
|
+
sourceId: taskId,
|
|
309
|
+
metadata: { task_id: taskId },
|
|
310
|
+
});
|
|
311
|
+
return result.changed ? 1 : 0;
|
|
296
312
|
}
|
|
297
313
|
|
|
298
314
|
export async function extractAndStoreProjectKnowledge(
|
|
@@ -303,7 +319,7 @@ export async function extractAndStoreProjectKnowledge(
|
|
|
303
319
|
const projectId = await resolveProjectId(projectIdOrSlug);
|
|
304
320
|
if (!projectId) return;
|
|
305
321
|
|
|
306
|
-
const knowledge = await extractProjectKnowledge(ctx);
|
|
322
|
+
const knowledge = await extractProjectKnowledge(ctx, getKnowledgeNote("project", projectId)?.content ?? "");
|
|
307
323
|
if (knowledge.length === 0) return;
|
|
308
324
|
|
|
309
325
|
const inserted = await storeProjectKnowledge(projectId, taskId, knowledge);
|