@mndrk/agx 2.0.36 → 2.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/required-server-files.json +0 -3
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/messages/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/messages/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/attachments/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/history/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/reactions/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/search/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/system/db-status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/task-drafts/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/stream/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +5 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +5 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +5 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +5 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +5 -5
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/stream/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/upload/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[externals]__cf9f18a6._.js → [externals]__986fcdb7._.js} +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__01cd082e._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b500f1bf._.js → [root-of-the-server]__0936925d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0c3dd73b._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0cc3f3b7._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d4126e05._.js → [root-of-the-server]__1b0bb735._.js} +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__4d865017._.js → [root-of-the-server]__1c86bf6e._.js} +6 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1dce6c15._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__0bb52353._.js → [root-of-the-server]__20c58b41._.js} +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2126c763._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__255b11f2._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__26817611._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__277ed37d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__294fceef._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2f06f568._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__30bd0c87._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__314d5c41._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__352dad6d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__374cd94c._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3785024c._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__379604d4._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c8f1de6._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3d0df5a8._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__0b3b6a47._.js → [root-of-the-server]__4014ed70._.js} +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42fcb81c._.js +52 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a3cd6ac._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a4265e0._.js +22 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c99509c2._.js → [root-of-the-server]__4bce7db7._.js} +17 -17
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c5c536d._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4e522535._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50c24784._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__50ddd3ce._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__529a6e1c._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59d1cdd8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5a1fd688._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5d359afa._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__628d686b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__005b3c82._.js → [root-of-the-server]__644e6285._.js} +8 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__65755104._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__068b4f08._.js → [root-of-the-server]__73c20995._.js} +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__762ab29c._.js +51 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__981d92dd._.js → [root-of-the-server]__8125bbc3._.js} +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__85275b88._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__89666394._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8c0fb154._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8f5cac13._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__91b22098._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__92924218._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__94bd7f65._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9746d1f5._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98ce983b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ee6511a0._.js → [root-of-the-server]__9a9fd39f._.js} +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9ad4e385._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__9b69f93e._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a01ddd0b._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__8ac0286e._.js → [root-of-the-server]__a099c992._.js} +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a9b949c3._.js +7 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ab7343c8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__af7a73fd._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bd43017b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf6fb108._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__7ee9b7b6._.js → [root-of-the-server]__c122c54a._.js} +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c4ea4921._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__8b0ab82f._.js → [root-of-the-server]__c4ed5d83._.js} +7 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c695a5f2._.js +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d57e800e._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d8b615bf._.js +34 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9bd6334._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__543ba6c4._.js → [root-of-the-server]__da3a1ce7._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__db469f1b._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de2a1e43._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5031f8d4._.js → [root-of-the-server]__dec3e1b7._.js} +11 -11
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f1147a4a._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f5597fea._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f8c94cb3._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ceb02db8._.js → [root-of-the-server]__f9cff4b0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f9f7f2df._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa79d53f._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fb14cd4a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a55c16a5._.js → [root-of-the-server]__fc27a898._.js} +31 -31
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcf0b40a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ffb21023._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/_05fa3b89._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_17e53c87._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_4190f170._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_42e9c8d5._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_5ca51127._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/_8b9fde82._.js +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/_994414cd._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/_99b78daf._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_affbdbb0._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/_d22934ab._.js +20 -20
- package/cloud-runtime/standalone/.next/server/chunks/_efc73784._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/lib_a5adca60._.js +15 -15
- package/cloud-runtime/standalone/.next/server/chunks/lib_check-node-version_ts_ef89bf83._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +39 -39
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +39 -39
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +19 -19
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_14067235._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_b63e2d39._.js +18 -18
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0c5c111f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_314f4c49._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/instrumentation.js +1 -1
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{47f22a56011af8d3.js → 5c0819dcc4bfec85.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{25c9ac515cfe5635.js → 9bde80696400d2ff.js} +2 -2
- package/cloud-runtime/standalone/.next/static/chunks/ac9a7d8cf17b5d75.js +1 -0
- package/cloud-runtime/standalone/app/api/agents/[id]/messages/route.ts +4 -3
- package/cloud-runtime/standalone/app/api/agents/[id]/profile/route.ts +1 -1
- package/cloud-runtime/standalone/app/api/automations/route.ts +1 -1
- package/cloud-runtime/standalone/app/api/chat/route.ts +2 -2
- package/cloud-runtime/standalone/app/api/memories/route.ts +2 -2
- package/cloud-runtime/standalone/app/api/prompt-jobs/[id]/route.ts +9 -1
- package/cloud-runtime/standalone/app/api/system/db-status/route.ts +12 -11
- package/cloud-runtime/standalone/components/PromptJobBoard.tsx +12 -1
- package/cloud-runtime/standalone/components/errors/StartupGuard.tsx +1 -1
- package/cloud-runtime/standalone/components/errors/StartupGuardWrapper.tsx +1 -1
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +1 -1
- package/cloud-runtime/standalone/hooks/usePromptJobs.ts +9 -18
- package/cloud-runtime/standalone/instrumentation.ts +1 -0
- package/cloud-runtime/standalone/lib/agent-process-registry.ts +10 -9
- package/cloud-runtime/standalone/lib/attachment-store.ts +6 -5
- package/cloud-runtime/standalone/lib/check-node-version.ts +12 -0
- package/cloud-runtime/standalone/lib/db-adapter.interface.ts +1 -1
- package/cloud-runtime/standalone/lib/history-store.ts +46 -46
- package/cloud-runtime/standalone/lib/knowledge-store.ts +2 -1
- package/cloud-runtime/standalone/lib/participants-store.ts +9 -8
- package/cloud-runtime/standalone/lib/queue/sqlite-adapter.ts +12 -11
- package/cloud-runtime/standalone/lib/repo-knowledge.ts +6 -5
- package/cloud-runtime/standalone/lib/sqlite-compat.ts +75 -0
- package/cloud-runtime/standalone/lib/sqlite-query-adapter.ts +15 -14
- package/cloud-runtime/standalone/lib/sqlite_writer.ts +10 -9
- package/cloud-runtime/standalone/lib/startup.ts +18 -19
- package/cloud-runtime/standalone/lib/thread-knowledge-runs.ts +2 -1
- package/cloud-runtime/standalone/lib/workspaces-to-projects-migration.ts +19 -18
- package/cloud-runtime/standalone/mcp/package-lock.json +3 -147
- package/cloud-runtime/standalone/mcp/package.json +1 -1
- package/cloud-runtime/standalone/mcp/src/check-node-version.ts +8 -0
- package/cloud-runtime/standalone/mcp/src/db.ts +4 -5
- package/cloud-runtime/standalone/mcp/src/index.ts +1 -0
- package/cloud-runtime/standalone/next.config.ts +0 -1
- package/cloud-runtime/standalone/package-lock.json +9 -413
- package/cloud-runtime/standalone/package.json +3 -2
- package/cloud-runtime/standalone/scripts/bench-queue.ts +5 -4
- package/cloud-runtime/standalone/server.js +1 -1
- package/cloud-runtime/standalone/src/db/backup.ts +12 -11
- package/cloud-runtime/standalone/src/db/checks.ts +3 -3
- package/cloud-runtime/standalone/src/db/init.ts +13 -12
- package/cloud-runtime/standalone/src/graph/schedule-runner.ts +1 -1
- package/cloud-runtime/standalone/src/graph/store.ts +14 -13
- package/cloud-runtime/standalone/src/prompt-scheduler/get-store.ts +19 -3
- package/cloud-runtime/standalone/src/prompt-scheduler/store.ts +9 -9
- package/cloud-runtime/standalone/test/adapters/sqlite.ts +7 -6
- package/cloud-runtime/standalone/worker/index.js +110 -823
- package/cloud-runtime/standalone/worker/index.ts +1 -0
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__017f03c3._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__056d94e4._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__06634853._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0f580808._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__164a80ba._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__16dd1fd7._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1a8e0957._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1cc2fe7f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__23ad03bf._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__241a8bcf._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__29419d66._.js +0 -42
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__2948f712._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__32ef6623._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__34cb1b98._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c1567b6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3c37453e._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3faa64cd._.js +0 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4041bb93._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42497c7b._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__49c03d66._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4a8d14c1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c50f159._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c861686._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__588b6ab0._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__596d0e81._.js +0 -42
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__59b5d4e5._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__61c99680._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__64712846._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__707c32af._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7370bb86._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__749af50f._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__74b97f0a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__75cedecf._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7e79d86a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8b461158._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__918f0106._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__922eb7cd._.js +0 -80
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__927cfc20._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__952af4b3._.js +0 -22
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98b352f7._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a44db634._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a67cd108._.js +0 -51
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ab2bf82d._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__abb032c1._.js +0 -34
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b4931ee1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b4d05543._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b707e701._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__b9e41767._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__be4ad4b5._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf5803eb._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ccd4846e._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d7e839a8._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d908c9ea._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__da20a0aa._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dcdeee3d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e069c0a3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e1e51c02._.js +0 -7
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e3a4fd97._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e4a87984._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ef82dda1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fa0ebee3._.js +0 -13
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fee58db1._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/_d225c04f._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/d73f1cc3ebc9993b.js +0 -1
- package/cloud-runtime/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/database.js +0 -90
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/index.js +0 -3
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/cloud-runtime/standalone/node_modules/better-sqlite3/lib/util.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3/package.json +0 -59
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/build/Release/better_sqlite3.node +0 -0
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/database.js +0 -90
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/index.js +0 -3
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/aggregate.js +0 -43
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/backup.js +0 -67
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/function.js +0 -31
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/inspect.js +0 -7
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/pragma.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/serialize.js +0 -16
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/table.js +0 -189
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/transaction.js +0 -78
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/methods/wrappers.js +0 -54
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/sqlite-error.js +0 -20
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/lib/util.js +0 -12
- package/cloud-runtime/standalone/node_modules/better-sqlite3-90e2652d1716b047/package.json +0 -59
- package/cloud-runtime/standalone/node_modules/bindings/bindings.js +0 -221
- package/cloud-runtime/standalone/node_modules/bindings/package.json +0 -28
- package/cloud-runtime/standalone/node_modules/file-uri-to-path/index.js +0 -66
- package/cloud-runtime/standalone/node_modules/file-uri-to-path/package.json +0 -32
- package/cloud-runtime/standalone/scripts/fix-turbopack-externals.mjs +0 -87
- /package/cloud-runtime/standalone/.next/static/{15nzSRnot8KsYYP8yMBe- → V5ruh627UpcC-LTWDgYk8}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{15nzSRnot8KsYYP8yMBe- → V5ruh627UpcC-LTWDgYk8}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{15nzSRnot8KsYYP8yMBe- → V5ruh627UpcC-LTWDgYk8}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55436,e=>{"use strict";let t=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],55436)},90272,e=>{"use strict";let t=(0,e.i(75254).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);e.s(["FolderGit2",()=>t],90272)},27612,e=>{"use strict";let t=(0,e.i(75254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],27612)},23385,e=>{"use strict";let t=(0,e.i(75254).default)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);e.s(["BrainCircuit",()=>t],23385)},11132,e=>{"use strict";var t=e.i(18050),r=e.i(71645);function a({initialPath:e,onSelect:a,onCancel:s}){let[i,o]=(0,r.useState)(e||""),[n,l]=(0,r.useState)(null),[d,c]=(0,r.useState)(!1),[u,p]=(0,r.useState)(null),m=(0,r.useRef)(null),x=(0,r.useCallback)(async e=>{c(!0),p(null);try{let t=e?`?path=${encodeURIComponent(e)}`:"",r=await fetch(`/api/filesystem/browse${t}`),a=await r.json();if(!r.ok)return void p(a.error||"Failed to browse");l(a),o(a.current),m.current?.scrollTo(0,0)}catch{p("Failed to connect")}finally{c(!1)}},[]);return(0,r.useEffect)(()=>{x(e||"")},[]),(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] overflow-hidden shadow-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-[var(--card-border)] bg-[var(--muted)]/30",children:[(0,t.jsx)("input",{value:i,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&x(i)},className:"input text-xs flex-1 py-1",placeholder:"Enter path..."}),(0,t.jsx)("button",{type:"button",onClick:()=>x(i),className:"text-[10px] font-bold uppercase tracking-wider text-[var(--primary)] hover:underline px-2 py-1 shrink-0",children:"Go"})]}),(0,t.jsxs)("div",{ref:m,className:"max-h-48 overflow-y-auto",children:[d&&(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)] text-center",children:"Loading..."}),u&&(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--destructive)] text-center",children:u}),!d&&n&&(0,t.jsxs)("div",{className:"py-1",children:[n.parent&&(0,t.jsxs)("button",{type:"button",onClick:()=>x(n.parent),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--muted)]/50 transition-colors flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"↑"}),(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:".."})]}),0===n.dirs.length&&!n.parent&&(0,t.jsx)("div",{className:"px-3 py-3 text-xs text-[var(--muted-foreground)] text-center",children:"No subdirectories"}),n.dirs.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>x(e.path),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--muted)]/50 transition-colors flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"📁"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.path))]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-t border-[var(--card-border)] bg-[var(--muted)]/30",children:[(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)] truncate max-w-[60%]",children:n?.current||i}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"text-xs font-medium text-[var(--muted-foreground)] hover:underline px-2 py-1",children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>a(n?.current||i),className:"text-xs font-bold text-[var(--primary)] hover:underline px-2 py-1",children:"Select"})]})]})]})}let s={name:"",description:""},i={name:"",path:"",notes:""};function o(){let[e,t]=(0,r.useState)(s),[a,o]=(0,r.useState)([i]),[n,l]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),u=(0,r.useCallback)((e,t,r)=>{o(a=>a.map((a,s)=>s===e?{...a,[t]:r}:a))},[]),p=(0,r.useCallback)(()=>{o(e=>[...e,{...i}])},[]),m=(0,r.useCallback)(e=>{o(t=>t.filter((t,r)=>r!==e))},[]),x=(0,r.useCallback)(()=>{t(s),o([i]),c(null)},[]),h=(0,r.useCallback)(e=>{t({name:e.name||"",description:e.description||""}),e.repos&&e.repos.length>0?o(e.repos.map(e=>({id:e.id,name:e.name||"",path:e.path||"",git_url:e.git_url||"",notes:e.notes||""}))):o([i]),c(null)},[]);return{form:e,setForm:t,repos:a,handleRepoChange:u,addRepo:p,removeRepo:m,resetForm:x,hydrateFromProject:h,isSubmitting:n,setIsSubmitting:l,formError:d,setFormError:c}}function n(e,t){let r=t.filter(e=>e.name.trim()&&e.path.trim()).map(e=>({...e.id?{id:e.id}:{},name:e.name.trim(),path:e.path.trim(),...e.git_url?.trim()?{git_url:e.git_url.trim()}:{},notes:e.notes.trim()||void 0}));return{name:e.name.trim(),description:e.description.trim()||void 0,repos:r.length?r:void 0}}function l({form:e,repos:s,isEditingProject:i,isSubmitting:o,onFieldChange:n,onRepoChange:l,onAddRepo:d,onRemoveRepo:c}){let[u,p]=(0,r.useState)([]),[m,x]=(0,r.useState)(null),h=(0,r.useRef)(0);(0,r.useEffect)(()=>{i?p([]):p(s.map((e,t)=>t)),h.current=s.length},[i,s.length]),(0,r.useEffect)(()=>{if(!i){h.current=s.length;return}let e=h.current;p(t=>{let r=t.filter(e=>e<s.length);return s.length>e&&r.push(...Array.from({length:s.length-e},(t,r)=>e+r)),r}),h.current=s.length},[i,s.length]);let b=(0,r.useCallback)(e=>{p(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),v=(0,r.useCallback)(e=>!i||u.includes(e),[u,i]);return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"grid gap-4",children:(0,t.jsxs)("label",{className:"space-y-1.5 block",children:[(0,t.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Project Name"}),(0,t.jsx)("input",{value:e.name,onChange:e=>n("name",e.target.value),className:"input w-full",placeholder:"e.g. AGX Cloud",disabled:o})]})}),(0,t.jsxs)("label",{className:"space-y-1.5 block",children:[(0,t.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Description"}),(0,t.jsx)("textarea",{value:e.description,onChange:e=>n("description",e.target.value),className:"input w-full h-24 resize-none",placeholder:"What is this project about?",disabled:o})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--card-border)] pb-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-sm font-bold uppercase tracking-widest text-[var(--muted-foreground)]",children:"Folders"}),(0,t.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)] mt-0.5",children:"Code repos, doc folders, design assets, config directories — any path your team needs access to."})]}),(0,t.jsx)("button",{type:"button",onClick:d,className:"text-xs font-semibold text-[var(--primary)] hover:underline flex-shrink-0",disabled:o,children:"+ Add Folder"})]}),(0,t.jsx)("div",{className:"space-y-4",children:s.map((e,r)=>(0,t.jsxs)("div",{className:"p-4 rounded-2xl border border-[var(--card-border)] bg-[var(--muted)]/20 space-y-3 relative group",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"text-xs font-bold text-[var(--foreground)] uppercase",children:["Folder #",r+1]}),i&&!v(r)?(0,t.jsxs)("div",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)("div",{children:e.name||"Unnamed folder"}),(0,t.jsx)("div",{className:"truncate",children:e.path||"No local path set"})]}):null]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,t.jsx)("button",{type:"button",onClick:()=>b(r),className:"text-xs font-semibold text-[var(--primary)] hover:underline",disabled:o,children:v(r)?"Done":"Edit"}),s.length>1&&(0,t.jsx)("button",{type:"button",onClick:()=>c(r),className:"text-xs font-semibold text-[var(--destructive)] hover:underline",disabled:o,children:"Remove"})]})]}),v(r)?(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)("input",{value:e.name,onChange:e=>l(r,"name",e.target.value),placeholder:"Name (e.g. Frontend, API Docs, Design System)",className:"input text-sm",disabled:o}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{value:e.path,onChange:e=>l(r,"path",e.target.value),placeholder:"Local path to folder",className:"input text-sm flex-1",disabled:o}),(0,t.jsx)("button",{type:"button",onClick:async()=>{try{let e=await fetch("/api/filesystem/pick-folder",{method:"POST"}),t=await e.json();t.path&&l(r,"path",t.path)}catch{x(m===r?null:r)}},className:"px-3 py-2 rounded-xl border border-[var(--card-border)] bg-[var(--muted)]/30 hover:bg-[var(--muted)]/60 transition-colors text-xs font-semibold text-[var(--muted-foreground)] whitespace-nowrap",disabled:o,children:"Browse"})]}),m===r&&(0,t.jsx)("div",{className:"md:col-span-2",children:(0,t.jsx)(a,{initialPath:e.path||"",onSelect:e=>{l(r,"path",e),x(null)},onCancel:()=>x(null)})}),(0,t.jsx)("div",{className:"md:col-span-2",children:(0,t.jsx)("textarea",{value:e.notes,onChange:e=>l(r,"notes",e.target.value),placeholder:"Notes for this folder — e.g. coding conventions, deploy steps, ownership, doc standards...",className:"input text-sm w-full min-h-24 resize-y",disabled:o})})]}):null]},r))})]})]})}function d({isOpen:e,onClose:a,onSubmit:s,editingProject:i,form:o,repos:n,isSubmitting:d,formError:c,onFieldChange:u,onRepoChange:p,onAddRepo:m,onRemoveRepo:x}){let[h,b]=(0,r.useState)([]);return((0,r.useEffect)(()=>{let e=!1;return async function(){if(!i)return b([]);try{let t=await fetch(`/api/projects/${i.id}/memory?producer=system`),r=t.ok?await t.json():{memory:[]};e||b(r.memory??[])}catch{e||b([])}}(),()=>{e=!0}},[i]),e)?(0,t.jsx)("div",{className:"modal-backdrop p-2 sm:p-4 z-50 overflow-y-auto flex items-center justify-center",onClick:e=>e.target===e.currentTarget&&a(),children:(0,t.jsxs)("div",{className:"modal-content w-full max-w-4xl mx-2 sm:mx-auto bg-[var(--card-bg)] rounded-3xl border border-[var(--card-border)] shadow-2xl animate-scale-in flex flex-col max-h-[90vh]",children:[(0,t.jsxs)("div",{className:"px-4 py-4 sm:px-8 sm:py-6 border-b border-[var(--card-border)] flex items-center justify-between flex-shrink-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-bold",children:i?"Edit Project":"Create New Project"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5",children:i?"Update your project settings and folders.":"Define a new project and connect folders."})]}),(0,t.jsx)("button",{onClick:a,className:"p-2 rounded-xl hover:bg-[var(--muted)]/50 transition-colors",children:(0,t.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 sm:p-8",children:[i&&(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--card-border)] bg-[var(--muted)]/20 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-bold uppercase tracking-widest text-[var(--muted-foreground)]",children:"Living Project Note"}),h.length>0?(0,t.jsx)("div",{className:"mt-3 space-y-2",children:h.slice(0,5).map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] px-3 py-2 text-sm text-[var(--foreground)]",children:[(0,t.jsx)("div",{children:e.content}),e.created_at?(0,t.jsx)("div",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:new Date(e.created_at).toLocaleString()}):null]},e.id))}):(0,t.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"No project note yet."})]})}),(0,t.jsx)(l,{form:o,repos:n,isEditingProject:!!i,isSubmitting:d,onFieldChange:u,onRepoChange:p,onAddRepo:m,onRemoveRepo:x}),c&&(0,t.jsx)("div",{className:"mt-6 p-4 rounded-xl bg-[var(--destructive-muted)] border border-[var(--destructive)]/20 text-sm text-[var(--destructive)]",children:c})]}),(0,t.jsxs)("div",{className:"px-4 py-4 sm:px-8 sm:py-6 border-t border-[var(--card-border)] flex items-center justify-end gap-3 flex-shrink-0",children:[(0,t.jsx)("button",{onClick:a,className:"px-6 py-2 rounded-xl border border-[var(--card-border)] hover:bg-[var(--muted)]/50 transition-colors text-sm font-medium",children:"Cancel"}),(0,t.jsx)("button",{onClick:s,disabled:d,className:"btn-primary px-8 py-2 shadow-lg shadow-[var(--primary)]/20 min-w-[120px]",children:d?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"spinner w-3 h-3 border-2 border-white/20 border-t-white"}),"Saving..."]}):i?"Save Changes":"Create Project"})]})]})}):null}e.s(["createProjectPayload",()=>n,"default",()=>d,"useProjectFormState",()=>o],11132)},68542,31245,27025,54238,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(74080),s=e.i(64659),i=e.i(63059),o=e.i(88081),n=e.i(75254);let l=(0,n.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",()=>l],31245);var d=e.i(39312);let c=(0,n.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",()=>c],27025);var u=e.i(90272);let p=(0,n.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var m=e.i(88699),x=e.i(23385);let h=(0,n.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);var b=e.i(7233),v=e.i(55436),g=e.i(27612),f=e.i(37727),j=e.i(22016),y=e.i(25459),k=e.i(11132);function w({threads:e,participants:n=[],activeThreadId:w,isLoading:N,isCreating:_,onSelectThread:C,onCreateThread:S,onRenameThread:P,onDeleteThread:z,deletingThreadId:I=null,renamingThreadId:A=null,activeParticipantIds:F=[],onToggleParticipantActive:M,visible:D=!1,isRestoringActiveThread:$=!1,onToggle:E,onSearch:L,projects:B=[],onCreateProject:T,onUpdateProject:K,onDeleteProject:R,onAddAgentToProject:V,onRemoveAgentFromProject:U,onAddAgentViaForm:O,onReorderProjectAgents:H,onUpdateParticipant:W,onSelectProject:q,getProjectBoardHref:G,activeProjectId:X=null,activeProjectView:J=null}){let Y,Z,Q=(0,r.useRef)(null),[ee,et]=(0,r.useState)(!1),[er,ea]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{if(er.size>0||!B?.length)return;let e=B.find(e=>window.location.pathname.includes(`/projects/${e.slug}`));ea(new Set([e?.id??B[0].id]))},[B]);let[es,ei]=(0,r.useState)(null),[eo,en]=(0,r.useState)(new Set),[el,ed]=(0,r.useState)(!1),[ec,eu]=(0,r.useState)(null),[ep,em]=(0,r.useState)(null),ex=(0,k.useProjectFormState)(),[eh,eb]=(0,r.useState)(null),ev=(0,r.useCallback)(e=>{e&&(e.focus(),e.select())},[]),[eg,ef]=(0,r.useState)(null),[ej,ey]=(0,r.useState)(null),ek=ej?n.find(e=>e.id===ej)??null:null,[ew,eN]=(0,r.useState)(null),[e_,eC]=(0,r.useState)(null),eS=async()=>{if(!ec&&!ep)return;if(!ex.form.name.trim())return void ex.setFormError("Project name is required");let e=ex.repos.find(e=>e.name.trim()&&!e.path.trim());if(e)return void ex.setFormError(`Local path is required for folder "${e.name}"`);ex.setFormError(null),ex.setIsSubmitting(!0);let t=(0,k.createProjectPayload)(ex.form,ex.repos);ep?await K?.(ep.id,t):await T?.(t,ec?.threadId),ex.setIsSubmitting(!1),eu(null),em(null)},eP=async e=>{ex.resetForm();try{let t=await fetch(`/api/projects/${e}`);if(!t.ok)throw Error("Failed to load project");let r=(await t.json()).project;em(r),ex.hydrateFromProject(r)}catch(e){console.error("Failed to load project settings",e)}};(0,r.useEffect)(()=>{et(!0)},[]),(0,r.useEffect)(()=>{let e=!1;async function t(){if(ew?.repoId)try{let t=await fetch(`/api/repos/${ew.repoId}/knowledge?producer=system`),r=t.ok?await t.json():{knowledge:[]};e||eN(e=>e&&e.repoId===ew.repoId?{...e,generatedKnowledge:r.knowledge??[],isLoadingKnowledge:!1}:e)}catch{e||eN(e=>e&&e.repoId===ew.repoId?{...e,generatedKnowledge:[],isLoadingKnowledge:!1}:e)}}return ew?.repoId&&t(),()=>{e=!0}},[ew?.repoId]);let ez=e=>{O?O(e):(en(new Set),ei({projectId:e}))},eI=es?B.find(e=>e.id===es.projectId):null,eA=new Set(eI?.agents.map(e=>e.agent_id)??[]),eF=es?n.filter(e=>!eA.has(e.id)):[],eM=e.length>0,eD=!!D,e$=[...e].sort((e,t)=>(e.title??"").localeCompare(t.title??"")),eE=new Map(e.map(e=>[e.id,e])),eL=B.filter(e=>!e.is_default),eB=e$.filter(e=>!eL.some(t=>t.thread_ids?.includes(e.id))),eT=(0,r.useCallback)(e=>G?.(e)??`/projects/${e.slug}`,[G]);!function({focusTarget:e,shouldFocus:t}){(0,r.useEffect)(()=>{if(!t||"u"<typeof document)return;let r=e.current;if(!r||r instanceof HTMLButtonElement&&r.disabled)return;let a=document.activeElement;if(!(a&&(r===a||r.contains(a))))try{r.focus({preventScroll:!0})}catch{r.focus()}},[e,t])}({focusTarget:Q,shouldFocus:eD&&!(N&&!eM||$&&eM)&&!eM&&!_});let eK=()=>{eb({title:"Create discussion",placeholder:"Discussion title",defaultValue:"",onSubmit:e=>void S({title:e})})};return eD?(0,t.jsxs)("aside",{id:"workspace-sidebar",className:"workspace-sidebar","aria-label":"Workspace sidebar","aria-busy":N?"true":void 0,children:[(0,t.jsxs)("div",{className:"workspace-sidebar__brand",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__brand-content flex items-center gap-2 px-1",children:[(0,t.jsx)("div",{className:"workspace-sidebar__brand-icon","aria-hidden":"true",children:(0,t.jsx)("span",{className:"text-[10px]",children:"AGX"})}),(0,t.jsx)("span",{className:"workspace-sidebar__brand-title",children:"Workspace"})]}),E&&(0,t.jsx)("button",{type:"button",onClick:E,"aria-label":"Hide discussions",title:"Hide discussions",className:"workspace-sidebar__brand-toggle ml-auto inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--app-shell-soft-text)] transition-all hover:bg-[var(--app-shell-subtle)] hover:text-[var(--foreground)]",children:(0,t.jsx)(p,{className:"h-4 w-4",strokeWidth:1.75})})]}),(0,t.jsxs)("div",{className:"workspace-sidebar__content",children:[L&&(0,t.jsx)("div",{className:"px-3 pt-2 pb-1",children:(0,t.jsxs)("button",{type:"button",onClick:L,className:"flex h-8 w-full items-center gap-2 rounded-lg border border-[var(--app-shell-border)] bg-[var(--app-shell-elevated)] px-2.5 text-xs text-[var(--app-shell-soft-text)] transition-all hover:border-[var(--app-shell-border-strong)] hover:text-[var(--app-shell-muted)]",children:[(0,t.jsx)(v.Search,{className:"h-3.5 w-3.5 shrink-0",strokeWidth:1.75}),(0,t.jsx)("span",{children:"Search..."}),(0,t.jsx)("kbd",{className:"ml-auto rounded border border-[var(--app-shell-border)] bg-[var(--app-shell-subtle)] px-1 py-0.5 font-sans text-[10px] font-medium text-[var(--app-shell-soft-text)]",children:"⌘K"})]})}),(0,t.jsx)("nav",{className:"workspace-sidebar__section",style:{gap:0},children:(0,t.jsxs)(j.default,{href:"/agents",className:"workspace-sidebar__nav-item",children:[(0,t.jsx)(l,{size:14,className:"flex-shrink-0"}),"Manage Agents"]})}),(0,t.jsxs)("nav",{className:"workspace-sidebar__section",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__section-header group/projects-header",children:[(0,t.jsx)("p",{className:"workspace-sidebar__section-label",children:"Projects"}),(0,t.jsx)("div",{className:"workspace-sidebar__header-actions",children:(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/projects-header:opacity-100",onClick:()=>{ex.resetForm(),em(null),eu({})},"aria-label":"Create project",title:"Create project",children:(0,t.jsx)(b.Plus,{size:14})})})]}),eL.map(e=>{let r=er.has(e.id),a=e$.filter(t=>e.thread_ids?.includes(t.id)),l=e.id===X,p=e.thread_ids?.find(e=>eE.has(e))??e.thread_ids?.[0]??a[0]?.id??null,v=l&&"thread"===J&&p===w,f=l&&"board"===J,k=l&&"knowledge"===J,N=l&&"automations"===J;return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-item group",children:[(0,t.jsxs)("div",{className:"workspace-sidebar__nav-item workspace-sidebar__workspace-nav-item",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex items-center justify-center rounded-sm text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",onClick:()=>{var t;return t=e.id,void ea(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})},"aria-label":r?`Collapse ${e.name}`:`Expand ${e.name}`,title:r?"Collapse project":"Expand project",children:r?(0,t.jsx)(s.ChevronDown,{size:14,className:"flex-shrink-0"}):(0,t.jsx)(i.ChevronRight,{size:14,className:"flex-shrink-0"})}),(0,t.jsx)(c,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title",children:e.name})]}),(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-actions",children:[(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__workspace-action",onClick:()=>void eP(e.id),"aria-label":`Open project settings for ${e.name}`,title:"Project settings",children:(0,t.jsx)(m.Pencil,{size:12})}),(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__workspace-action workspace-sidebar__workspace-action--delete",onClick:()=>{var t;let r;return t=e.id,r=B.find(e=>e.id===t),void ef({title:"Delete project",message:`Delete "${r?.name??"project"}"? Its agents will move to the Default project.`,onConfirm:()=>void R?.(t)})},"aria-label":`Delete project ${e.name}`,title:`Delete project ${e.name}`,children:(0,t.jsx)(g.Trash2,{size:12})})]})]}),r&&(0,t.jsxs)("div",{className:"ml-4 my-1 flex flex-col gap-0.5 border-l border-[var(--app-shell-border)] pl-3",children:[(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,t.jsxs)(j.default,{href:`/projects/${e.slug}/automations`,className:`workspace-sidebar__nav-item ${N?"workspace-sidebar__nav-item--active":""}`,"aria-current":N?"page":void 0,children:[(0,t.jsx)(d.Zap,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Automations"})]})}),(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item",children:p?(0,t.jsxs)("button",{type:"button",className:`workspace-sidebar__nav-item ${v?"workspace-sidebar__nav-item--active":""}`,onClick:()=>C(p),"aria-current":v?"page":void 0,children:[(0,t.jsx)(o.Hash,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Discussion"})]}):(0,t.jsxs)("button",{type:"button",className:"workspace-sidebar__nav-item",onClick:eK,children:[(0,t.jsx)(o.Hash,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Discussion"})]})}),(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,t.jsxs)(j.default,{href:eT(e),className:`workspace-sidebar__nav-item ${f?"workspace-sidebar__nav-item--active":""}`,"aria-current":f?"page":void 0,children:[(0,t.jsx)(h,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Board"})]})}),(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,t.jsxs)(j.default,{href:`/projects/${e.slug}/knowledge`,className:`workspace-sidebar__nav-item ${k?"workspace-sidebar__nav-item--active":""}`,"aria-current":k?"page":void 0,children:[(0,t.jsx)(x.BrainCircuit,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs",children:"Knowledge"})]})}),(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsxs)("div",{className:"group/repos-header flex items-center justify-between px-3 py-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Folders"}),(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/repos-header:opacity-100 text-[var(--muted-foreground)] hover:text-white",onClick:()=>eN({projectId:e.id,projectName:e.name,repoId:null,name:"",path:"",gitUrl:"",notes:"",generatedKnowledge:[],isLoadingKnowledge:!1,isSaving:!1,error:null}),"aria-label":"Add folder",title:"Add folder",children:(0,t.jsx)(b.Plus,{size:12})})]}),e.repos.length>0?e.repos.map(r=>(0,t.jsxs)("div",{className:"workspace-sidebar__workspace-item group/repo flex items-center",children:[(0,t.jsxs)("button",{type:"button",className:"workspace-sidebar__nav-item min-w-0 flex-1 text-left",onClick:()=>eN({projectId:e.id,projectName:e.name,repoId:r.id,name:r.name,path:r.path||"",gitUrl:r.git_url||"",notes:r.notes||"",generatedKnowledge:[],isLoadingKnowledge:!0,isSaving:!1,error:null}),children:[(0,t.jsx)(u.FolderGit2,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)] ml-2"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs truncate",children:r.name})]}),(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 group-hover/repo:opacity-100 transition-opacity flex-shrink-0 text-[var(--muted-foreground)] hover:text-red-400",onClick:async t=>{t.stopPropagation();let a=e.repos.filter(e=>e.id!==r.id).map(e=>({id:e.id,name:e.name,path:e.path,git_url:e.git_url,notes:e.notes}));await K?.(e.id,{repos:a})},"aria-label":"Delete folder",title:"Delete folder",children:(0,t.jsx)(g.Trash2,{size:12})})]},`${e.id}:${r.name}:${r.path??""}`)):(0,t.jsx)("p",{className:"px-3 py-1 text-[11px] text-[var(--muted-foreground)]",children:"No folders"})]}),(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsxs)("div",{className:"group/agents-header flex items-center justify-between px-3 py-1",children:[(0,t.jsx)("p",{className:"text-[10px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Agents"}),e.agents.length>0&&(0,t.jsx)("button",{type:"button",className:"workspace-sidebar__action opacity-0 transition-opacity group-hover/agents-header:opacity-100 text-[var(--muted-foreground)] hover:text-white",onClick:()=>ez(e.id),"aria-label":"Add agents",title:"Add agents",children:(0,t.jsx)(b.Plus,{size:12})})]}),e.agents.length>0?(0,t.jsx)(t.Fragment,{children:e.agents.map((r,a)=>{let s=n.find(e=>e.id===r.agent_id),i=e_?.projectId===e.id&&e_?.agentId===r.agent_id,o=e_?.projectId===e.id&&e_?.overIndex===a&&!i;return(0,t.jsx)("div",{draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed="move",eC({projectId:e.id,agentId:r.agent_id,overIndex:a})},onDragOver:t=>{t.preventDefault(),e_&&e_.projectId===e.id&&eC(e=>e?{...e,overIndex:a}:null)},onDragEnd:()=>{if(e_&&e_.projectId===e.id&&H){let t=e.agents.map(e=>e.agent_id),r=t.indexOf(e_.agentId),a=e_.overIndex;if(-1!==r&&r!==a){let s=[...t],[i]=s.splice(r,1);s.splice(a,0,i),H(e.id,s)}}eC(null)},className:`group/agent flex items-center ${o?"border-t-2 border-[var(--border)]":"border-t-2 border-transparent"} ${i?"opacity-40":""}`,children:(0,t.jsxs)("button",{type:"button",className:"workspace-sidebar__nav-item flex-1 min-w-0 !py-1",onClick:()=>ey(r.agent_id),children:[(0,t.jsx)("span",{className:`cursor-grab text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)] flex-shrink-0 mr-0.5 transition-opacity ${0===a?"opacity-100":"opacity-0 group-hover/agent:opacity-100"}`,title:"Drag to reorder",children:"⠿"}),(0,t.jsx)("img",{src:(0,y.agentAvatarUrl)(r.agent_id,16,s?.color),alt:"",className:"w-4 h-4 rounded-full flex-shrink-0"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title text-xs truncate",children:s?.name??r.agent_id}),0===a&&(0,t.jsx)("span",{className:"ml-auto text-[9px] text-[var(--muted-foreground)] font-medium flex-shrink-0",title:"Default responder (top agent responds first)",children:"DEFAULT"})]})},r.agent_id)})}):(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 px-3 py-1 text-[11px] font-medium text-[var(--muted-foreground)] transition-colors hover:text-[var(--foreground)]",onClick:()=>ez(e.id),children:[(0,t.jsx)(b.Plus,{size:10}),(0,t.jsx)("span",{children:"Add agents"})]})]})]})]},e.id)}),eB.length>0&&(0,t.jsxs)("div",{className:"pt-3",children:[(0,t.jsx)("p",{className:"px-1 py-1 text-[10px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Unassigned Threads"}),eB.map(e=>{let r=e.id===w,a=e.title?.trim()||"Untitled thread";return(0,t.jsx)("div",{className:"workspace-sidebar__workspace-item group",children:(0,t.jsxs)("button",{type:"button",className:`workspace-sidebar__nav-item workspace-sidebar__workspace-nav-item ${r?"workspace-sidebar__nav-item--active workspace-sidebar__workspace-nav-item--active":""}`,onClick:()=>C(e.id),"aria-current":r?"page":void 0,children:[(0,t.jsx)(o.Hash,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"workspace-sidebar__workspace-title",children:a})]})},e.id)})]})]})]}),(0,t.jsx)("div",{className:"mt-auto px-3 pb-3",children:(0,t.jsxs)("a",{href:"https://discord.gg/G9afUYKKY3",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 w-full py-2 rounded-lg text-white text-sm font-medium transition-colors",style:{backgroundColor:"#5865F2"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#4752C4",onMouseLeave:e=>e.currentTarget.style.backgroundColor="#5865F2",children:[(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 71 55",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M60.1 4.9A58.5 58.5 0 0045.4.2a.2.2 0 00-.2.1 40.8 40.8 0 00-1.8 3.7 54 54 0 00-16.2 0A37.4 37.4 0 0025.4.3a.2.2 0 00-.2-.1A58.4 58.4 0 0010.5 4.9a.2.2 0 00-.1.1C1.5 18.7-.9 32.2.3 45.5v.1a58.8 58.8 0 0017.7 9a.2.2 0 00.3-.1 42 42 0 003.6-5.9.2.2 0 00-.1-.3 38.8 38.8 0 01-5.5-2.6.2.2 0 01 0-.4l1.1-.9a.2.2 0 01.2 0 42 42 0 0035.6 0 .2.2 0 01.2 0l1.1.9a.2.2 0 010 .4 36.4 36.4 0 01-5.5 2.6.2.2 0 00-.1.3 47.2 47.2 0 003.6 5.9.2.2 0 00.3.1 58.6 58.6 0 0017.7-9v-.1c1.4-15.2-2.4-28.4-10-40.1a.2.2 0 00-.1-.1zM23.7 37.3c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7zm23.3 0c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7z"})}),"Join Discord"]})}),ee&&ew&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-4",onClick:()=>{ew.isSaving||eN(null)},children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-[var(--border)] bg-[var(--card-bg)] shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-[var(--border)] px-5 py-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:ew.projectName}),(0,t.jsx)("h3",{className:"truncate text-base font-semibold text-[var(--foreground)]",children:ew.repoId?ew.name||"Folder":"Add Folder"})]}),(0,t.jsx)("button",{type:"button",className:"rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--muted-foreground)]",onClick:()=>{ew.isSaving||eN(null)},"aria-label":"Close folder details",disabled:ew.isSaving,children:(0,t.jsx)(f.X,{size:16})})]}),(0,t.jsxs)("div",{className:"space-y-4 px-5 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Name"}),(0,t.jsx)("input",{value:ew.name,onChange:e=>eN(t=>t?{...t,name:e.target.value,error:null}:t),className:"w-full rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-sm text-[var(--foreground)]",disabled:ew.isSaving,placeholder:"e.g. Frontend, API Docs, Design System"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Path"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{value:ew.path,onChange:e=>eN(t=>t?{...t,path:e.target.value,error:null}:t),className:"flex-1 rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 font-mono text-xs text-[var(--foreground)]",disabled:ew.isSaving,placeholder:"Local path to folder"}),(0,t.jsx)("button",{type:"button",className:"rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]",disabled:ew.isSaving,onClick:async()=>{try{let e=await fetch("/api/filesystem/pick-folder",{method:"POST"}),t=await e.json();t.path&&eN(e=>e?{...e,path:t.path,error:null}:e)}catch{}},children:"Browse"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Notes"}),(0,t.jsx)("textarea",{value:ew.notes,onChange:e=>eN(t=>t?{...t,notes:e.target.value,error:null}:t),className:"min-h-28 w-full rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-3 text-sm text-[var(--foreground)] whitespace-pre-wrap",disabled:ew.isSaving,placeholder:"Coding conventions, deploy steps, doc standards, ownership rules..."})]}),ew.repoId?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Living Note"}),ew.isLoadingKnowledge?(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading note…"}):ew.generatedKnowledge.length>0?(0,t.jsx)("div",{className:"space-y-2",children:ew.generatedKnowledge.slice(0,5).map(e=>(0,t.jsxs)("div",{className:"rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-sm text-[var(--foreground)]",children:[(0,t.jsx)("div",{children:e.content}),e.created_at?(0,t.jsx)("div",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:new Date(e.created_at).toLocaleString()}):null]},e.id))}):(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No note yet."})]}):null,ew.error?(0,t.jsx)("p",{className:"text-xs text-red-600",children:ew.error}):null,(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] pt-4",children:[(0,t.jsx)("button",{type:"button",className:"rounded-lg px-3 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]",onClick:()=>eN(null),disabled:ew.isSaving,children:"Cancel"}),(0,t.jsx)("button",{type:"button",className:"rounded-lg bg-[var(--foreground)] px-3 py-2 text-sm font-medium text-[var(--card-bg)] transition-colors hover:bg-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-60",disabled:ew.isSaving||!K,onClick:async()=>{let e=B.find(e=>e.id===ew.projectId);if(!e)return void eN(e=>e?{...e,error:"Project not found."}:e);let t=ew.name.trim(),r=ew.path.trim();if(!t)return void eN(e=>e?{...e,error:"Folder name is required."}:e);if(!r)return void eN(e=>e?{...e,error:"Folder path is required."}:e);eN(e=>e?{...e,isSaving:!0,error:null}:e);try{let a=ew.repoId?e.repos.map(e=>e.id===ew.repoId?{id:e.id,name:t,path:r,git_url:ew.gitUrl.trim()||void 0,notes:ew.notes.trim()||void 0}:{id:e.id,name:e.name,path:e.path,git_url:e.git_url,notes:e.notes}):[...e.repos.map(e=>({id:e.id,name:e.name,path:e.path,git_url:e.git_url,notes:e.notes})),{name:t,path:r,git_url:ew.gitUrl.trim()||void 0,notes:ew.notes.trim()||void 0}];await K?.(e.id,{repos:a}),eN(null)}catch(e){eN(t=>t?{...t,isSaving:!1,error:e instanceof Error?e.message:"Failed to save folder details."}:t)}},children:ew.isSaving?"Saving...":ew.repoId?"Save":"Add Folder"})]})]})]})}),document.body),ee&&es&&!el&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ei(null),children:(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 max-h-[70vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,t.jsxs)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:["Add to ",eI?.name??"project"]}),(0,t.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>ei(null),children:(0,t.jsx)(f.X,{size:16})})]}),(0,t.jsxs)("div",{className:"overflow-y-auto py-1 flex-1",children:[(0,t.jsxs)("button",{type:"button",className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-[var(--foreground)] hover:bg-[var(--app-shell-subtle)] transition-colors border-b border-[var(--border)]",onClick:()=>ed(!0),children:[(0,t.jsx)(b.Plus,{size:14,className:"text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"text-xs font-medium",children:"Create new agent"})]}),0===eF.length?(0,t.jsx)("p",{className:"px-4 py-6 text-xs text-[var(--muted-foreground)] text-center",children:"All agents are already in this project"}):eF.map(e=>{let r=eo.has(e.id);return(0,t.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${r?"bg-[var(--muted)] text-[var(--foreground)]":"text-[var(--foreground)] hover:bg-[var(--app-shell-subtle)]"}`,onClick:()=>{en(t=>{let r=new Set(t);return r.has(e.id)?r.delete(e.id):r.add(e.id),r})},children:[(0,t.jsx)("div",{className:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center ${r?"bg-[var(--foreground)] border-[var(--foreground)]":"border-[var(--border)]"}`,children:r&&(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:(0,t.jsx)("path",{d:"M2 5l2 2 4-4",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsx)("img",{src:(0,y.agentAvatarUrl)(e.id,24,e.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,t.jsx)("div",{className:"truncate font-medium text-xs",children:e.name}),(0,t.jsx)("div",{className:"truncate text-[11px] text-[var(--muted-foreground)]",children:e.model})]})]},e.id)})]}),eF.length>0&&(0,t.jsxs)("div",{className:"px-4 py-3 border-t border-[var(--border)] flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>ei(null),children:"Cancel"}),(0,t.jsxs)("button",{type:"button",disabled:0===eo.size,className:"px-3 py-1.5 text-xs font-medium text-[var(--card-bg)] bg-[var(--foreground)] rounded-lg hover:bg-[var(--foreground)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>{for(let e of eo)V?.(es.projectId,e);ei(null)},children:["Add ",eo.size>0?`(${eo.size})`:""]})]})]})}),document.body),ee&&el&&(0,a.createPortal)((0,t.jsx)(y.AgentForm,{title:"Create new agent",initial:{name:"",provider:"claude",model:"",identity:"",skills:[],skillBindings:[]},submitLabel:"Create & Add",projects:B?.filter(e=>!e.is_default).map(t=>{let r=(t.thread_ids??[]).map(t=>e.find(e=>e.id===t)?.title?.trim()).filter(Boolean).join(", ")||"No discussion";return{id:t.id,name:t.name,label:`${r} › ${t.name}`}}),initialProjectIds:es?[es.projectId]:[],onSubmit:async(e,t)=>{let r=["#D97706","#2563EB","#059669","#DC2626","#7C3AED","#DB2777","#0891B2"],a=r[n.length%r.length],s=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),i=t?.[0],o=await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:s,name:e.name,provider:e.provider,model:e.model,color:e.color??a,...e.title?{title:e.title}:{},...e.identity?{identity:e.identity}:{},skills:e.skills??[],skillBindings:e.skillBindings??[],...i?{projectId:i}:{}})});if(o.ok){let e=await o.json().catch(()=>({})),r="string"==typeof e?.id&&e.id.trim()?e.id.trim():s;for(let e of(t??[]).slice(1))V?.(e,r);ed(!1),ei(null)}},onCancel:()=>{ed(!1)}}),document.body),ee&&eh&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>eb(null),children:(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:eh.title}),(0,t.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>eb(null),children:(0,t.jsx)(f.X,{size:16})})]}),(0,t.jsxs)("form",{className:"px-4 py-4 flex flex-col gap-3",onSubmit:e=>{e.preventDefault();let t=new FormData(e.currentTarget),r=t.get("value")?.trim();r&&(eh.onSubmit(r),eb(null))},children:[(0,t.jsx)("input",{ref:ev,name:"value",type:"text",defaultValue:eh.defaultValue,placeholder:eh.placeholder,className:"w-full px-3 py-2 text-sm border border-[var(--border)] rounded-lg outline-none focus:border-[var(--border)] focus:ring-1 focus:ring-[var(--border)] transition-all"}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>eb(null),children:"Cancel"}),(0,t.jsx)("button",{type:"submit",className:"px-3 py-1.5 text-xs font-medium text-[var(--card-bg)] bg-[var(--foreground)] rounded-lg hover:bg-[var(--foreground)] transition-colors",children:eh.defaultValue?"Save":"Create"})]})]})]})}),document.body),ee&&eg&&(0,a.createPortal)((0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ef(null),children:(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:eg.title}),(0,t.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>ef(null),children:(0,t.jsx)(f.X,{size:16})})]}),(0,t.jsxs)("div",{className:"px-4 py-4 flex flex-col gap-4",children:[(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:eg.message}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>ef(null),children:"Cancel"}),(0,t.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs font-medium text-white bg-red-600 rounded-lg hover:bg-red-700 transition-colors",onClick:()=>{eg.onConfirm(),ef(null)},children:"Delete"})]})]})]})}),document.body),ee&&(ec||ep)&&(0,a.createPortal)((0,t.jsx)(k.default,{isOpen:!0,onClose:()=>{ex.resetForm(),eu(null),em(null)},onSubmit:()=>void eS(),editingProject:ep,form:ex.form,repos:ex.repos,isSubmitting:ex.isSubmitting,formError:ex.formError,onFieldChange:(e,t)=>ex.setForm(r=>({...r,[e]:t})),onRepoChange:ex.handleRepoChange,onAddRepo:ex.addRepo,onRemoveRepo:ex.removeRepo}),document.body),ee&&ek&&(0,a.createPortal)((Y=B.filter(e=>e.agents.some(e=>e.agent_id===ek.id)),Z=B.filter(e=>!e.agents.some(e=>e.agent_id===ek.id)),(0,t.jsx)(y.AgentForm,{title:"Edit agent",initial:{name:ek.name,title:ek.title||"",provider:ek.provider,model:ek.model||"",identity:ek.identity||"",color:ek.color,skills:ek.skills||[],skillBindings:ek.skillBindings||[]},agentId:ek.id,submitLabel:"Save",projectMemberships:{current:Y.map(e=>({id:e.id,name:e.name,is_default:!!e.is_default})),available:Z.map(e=>({id:e.id,name:e.name}))},onAddToProject:V?e=>V(e,ek.id):void 0,onRemoveFromProject:U?e=>U(e,ek.id):void 0,onSubmit:async e=>{W&&await W({...ek,name:e.name,title:e.title||void 0,provider:e.provider,model:e.model,color:e.color??ek.color,...e.identity?{identity:e.identity}:{},skills:e.skills??[],skillBindings:e.skillBindings??[]}),ey(null)},onCancel:()=>ey(null)})),document.body)]}):(0,t.jsxs)("aside",{id:"workspace-sidebar",className:"workspace-sidebar workspace-sidebar--collapsed","aria-label":"Workspace sidebar",children:[(0,t.jsx)("div",{className:"workspace-sidebar__brand",children:(0,t.jsx)("button",{type:"button",onClick:E,className:"workspace-sidebar__brand-icon border-none outline-none cursor-pointer","aria-label":"Show discussions",title:"Show discussions",children:(0,t.jsx)("span",{className:"text-[10px]",children:"AGX"})})}),(0,t.jsx)("div",{className:"mt-auto p-2",children:(0,t.jsx)("a",{href:"https://discord.gg/G9afUYKKY3",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-lg text-white transition-colors",style:{backgroundColor:"#5865F2"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#4752C4",onMouseLeave:e=>e.currentTarget.style.backgroundColor="#5865F2",title:"Join Discord",children:(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 71 55",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M60.1 4.9A58.5 58.5 0 0045.4.2a.2.2 0 00-.2.1 40.8 40.8 0 00-1.8 3.7 54 54 0 00-16.2 0A37.4 37.4 0 0025.4.3a.2.2 0 00-.2-.1A58.4 58.4 0 0010.5 4.9a.2.2 0 00-.1.1C1.5 18.7-.9 32.2.3 45.5v.1a58.8 58.8 0 0017.7 9a.2.2 0 00.3-.1 42 42 0 003.6-5.9.2.2 0 00-.1-.3 38.8 38.8 0 01-5.5-2.6.2.2 0 01 0-.4l1.1-.9a.2.2 0 01.2 0 42 42 0 0035.6 0 .2.2 0 01.2 0l1.1.9a.2.2 0 010 .4 36.4 36.4 0 01-5.5 2.6.2.2 0 00-.1.3 47.2 47.2 0 003.6 5.9.2.2 0 00.3.1 58.6 58.6 0 0017.7-9v-.1c1.4-15.2-2.4-28.4-10-40.1a.2.2 0 00-.1-.1zM23.7 37.3c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7zm23.3 0c-3.5 0-6.3-3.2-6.3-7s2.8-7 6.3-7 6.4 3.2 6.3 7-2.8 7-6.3 7z"})})})})]})}e.s(["WorkspaceSidebar",()=>w],68542);let N="agx-chat:uiSettings",_={threadSidebarVisible:!1};function C(){return void 0!==window.localStorage}function S(){if(!C())return{..._};let e=window.localStorage.getItem(N);if(!e)return{..._};try{let t=JSON.parse(e);return{..._,threadSidebarVisible:"boolean"==typeof t.threadSidebarVisible&&t.threadSidebarVisible}}catch{return{..._}}}function P(){return S().threadSidebarVisible}function z(e){var t={...S(),threadSidebarVisible:e};if(C())try{window.localStorage.setItem(N,JSON.stringify(t))}catch{}}e.s(["loadWorkspaceSidebarVisible",()=>P,"persistWorkspaceSidebarVisible",()=>z],54238)}]);
|
package/cloud-runtime/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node
DELETED
|
Binary file
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const util = require('./util');
|
|
5
|
-
const SqliteError = require('./sqlite-error');
|
|
6
|
-
|
|
7
|
-
let DEFAULT_ADDON;
|
|
8
|
-
|
|
9
|
-
function Database(filenameGiven, options) {
|
|
10
|
-
if (new.target == null) {
|
|
11
|
-
return new Database(filenameGiven, options);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Apply defaults
|
|
15
|
-
let buffer;
|
|
16
|
-
if (Buffer.isBuffer(filenameGiven)) {
|
|
17
|
-
buffer = filenameGiven;
|
|
18
|
-
filenameGiven = ':memory:';
|
|
19
|
-
}
|
|
20
|
-
if (filenameGiven == null) filenameGiven = '';
|
|
21
|
-
if (options == null) options = {};
|
|
22
|
-
|
|
23
|
-
// Validate arguments
|
|
24
|
-
if (typeof filenameGiven !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
25
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
26
|
-
if ('readOnly' in options) throw new TypeError('Misspelled option "readOnly" should be "readonly"');
|
|
27
|
-
if ('memory' in options) throw new TypeError('Option "memory" was removed in v7.0.0 (use ":memory:" filename instead)');
|
|
28
|
-
|
|
29
|
-
// Interpret options
|
|
30
|
-
const filename = filenameGiven.trim();
|
|
31
|
-
const anonymous = filename === '' || filename === ':memory:';
|
|
32
|
-
const readonly = util.getBooleanOption(options, 'readonly');
|
|
33
|
-
const fileMustExist = util.getBooleanOption(options, 'fileMustExist');
|
|
34
|
-
const timeout = 'timeout' in options ? options.timeout : 5000;
|
|
35
|
-
const verbose = 'verbose' in options ? options.verbose : null;
|
|
36
|
-
const nativeBinding = 'nativeBinding' in options ? options.nativeBinding : null;
|
|
37
|
-
|
|
38
|
-
// Validate interpreted options
|
|
39
|
-
if (readonly && anonymous && !buffer) throw new TypeError('In-memory/temporary databases cannot be readonly');
|
|
40
|
-
if (!Number.isInteger(timeout) || timeout < 0) throw new TypeError('Expected the "timeout" option to be a positive integer');
|
|
41
|
-
if (timeout > 0x7fffffff) throw new RangeError('Option "timeout" cannot be greater than 2147483647');
|
|
42
|
-
if (verbose != null && typeof verbose !== 'function') throw new TypeError('Expected the "verbose" option to be a function');
|
|
43
|
-
if (nativeBinding != null && typeof nativeBinding !== 'string' && typeof nativeBinding !== 'object') throw new TypeError('Expected the "nativeBinding" option to be a string or addon object');
|
|
44
|
-
|
|
45
|
-
// Load the native addon
|
|
46
|
-
let addon;
|
|
47
|
-
if (nativeBinding == null) {
|
|
48
|
-
addon = DEFAULT_ADDON || (DEFAULT_ADDON = require('bindings')('better_sqlite3.node'));
|
|
49
|
-
} else if (typeof nativeBinding === 'string') {
|
|
50
|
-
// See <https://webpack.js.org/api/module-variables/#__non_webpack_require__-webpack-specific>
|
|
51
|
-
const requireFunc = typeof __non_webpack_require__ === 'function' ? __non_webpack_require__ : require;
|
|
52
|
-
addon = requireFunc(path.resolve(nativeBinding).replace(/(\.node)?$/, '.node'));
|
|
53
|
-
} else {
|
|
54
|
-
// See <https://github.com/WiseLibs/better-sqlite3/issues/972>
|
|
55
|
-
addon = nativeBinding;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (!addon.isInitialized) {
|
|
59
|
-
addon.setErrorConstructor(SqliteError);
|
|
60
|
-
addon.isInitialized = true;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Make sure the specified directory exists
|
|
64
|
-
if (!anonymous && !filename.startsWith('file:') && !fs.existsSync(path.dirname(filename))) {
|
|
65
|
-
throw new TypeError('Cannot open database because the directory does not exist');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
Object.defineProperties(this, {
|
|
69
|
-
[util.cppdb]: { value: new addon.Database(filename, filenameGiven, anonymous, readonly, fileMustExist, timeout, verbose || null, buffer || null) },
|
|
70
|
-
...wrappers.getters,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const wrappers = require('./methods/wrappers');
|
|
75
|
-
Database.prototype.prepare = wrappers.prepare;
|
|
76
|
-
Database.prototype.transaction = require('./methods/transaction');
|
|
77
|
-
Database.prototype.pragma = require('./methods/pragma');
|
|
78
|
-
Database.prototype.backup = require('./methods/backup');
|
|
79
|
-
Database.prototype.serialize = require('./methods/serialize');
|
|
80
|
-
Database.prototype.function = require('./methods/function');
|
|
81
|
-
Database.prototype.aggregate = require('./methods/aggregate');
|
|
82
|
-
Database.prototype.table = require('./methods/table');
|
|
83
|
-
Database.prototype.loadExtension = wrappers.loadExtension;
|
|
84
|
-
Database.prototype.exec = wrappers.exec;
|
|
85
|
-
Database.prototype.close = wrappers.close;
|
|
86
|
-
Database.prototype.defaultSafeIntegers = wrappers.defaultSafeIntegers;
|
|
87
|
-
Database.prototype.unsafeMode = wrappers.unsafeMode;
|
|
88
|
-
Database.prototype[util.inspect] = require('./methods/inspect');
|
|
89
|
-
|
|
90
|
-
module.exports = Database;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { getBooleanOption, cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineAggregate(name, options) {
|
|
5
|
-
// Validate arguments
|
|
6
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (typeof options !== 'object' || options === null) throw new TypeError('Expected second argument to be an options object');
|
|
8
|
-
if (!name) throw new TypeError('User-defined function name cannot be an empty string');
|
|
9
|
-
|
|
10
|
-
// Interpret options
|
|
11
|
-
const start = 'start' in options ? options.start : null;
|
|
12
|
-
const step = getFunctionOption(options, 'step', true);
|
|
13
|
-
const inverse = getFunctionOption(options, 'inverse', false);
|
|
14
|
-
const result = getFunctionOption(options, 'result', false);
|
|
15
|
-
const safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;
|
|
16
|
-
const deterministic = getBooleanOption(options, 'deterministic');
|
|
17
|
-
const directOnly = getBooleanOption(options, 'directOnly');
|
|
18
|
-
const varargs = getBooleanOption(options, 'varargs');
|
|
19
|
-
let argCount = -1;
|
|
20
|
-
|
|
21
|
-
// Determine argument count
|
|
22
|
-
if (!varargs) {
|
|
23
|
-
argCount = Math.max(getLength(step), inverse ? getLength(inverse) : 0);
|
|
24
|
-
if (argCount > 0) argCount -= 1;
|
|
25
|
-
if (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
this[cppdb].aggregate(start, step, inverse, result, name, argCount, safeIntegers, deterministic, directOnly);
|
|
29
|
-
return this;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const getFunctionOption = (options, key, required) => {
|
|
33
|
-
const value = key in options ? options[key] : null;
|
|
34
|
-
if (typeof value === 'function') return value;
|
|
35
|
-
if (value != null) throw new TypeError(`Expected the "${key}" option to be a function`);
|
|
36
|
-
if (required) throw new TypeError(`Missing required option "${key}"`);
|
|
37
|
-
return null;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getLength = ({ length }) => {
|
|
41
|
-
if (Number.isInteger(length) && length >= 0) return length;
|
|
42
|
-
throw new TypeError('Expected function.length to be a positive integer');
|
|
43
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const { promisify } = require('util');
|
|
5
|
-
const { cppdb } = require('../util');
|
|
6
|
-
const fsAccess = promisify(fs.access);
|
|
7
|
-
|
|
8
|
-
module.exports = async function backup(filename, options) {
|
|
9
|
-
if (options == null) options = {};
|
|
10
|
-
|
|
11
|
-
// Validate arguments
|
|
12
|
-
if (typeof filename !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
13
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
14
|
-
|
|
15
|
-
// Interpret options
|
|
16
|
-
filename = filename.trim();
|
|
17
|
-
const attachedName = 'attached' in options ? options.attached : 'main';
|
|
18
|
-
const handler = 'progress' in options ? options.progress : null;
|
|
19
|
-
|
|
20
|
-
// Validate interpreted options
|
|
21
|
-
if (!filename) throw new TypeError('Backup filename cannot be an empty string');
|
|
22
|
-
if (filename === ':memory:') throw new TypeError('Invalid backup filename ":memory:"');
|
|
23
|
-
if (typeof attachedName !== 'string') throw new TypeError('Expected the "attached" option to be a string');
|
|
24
|
-
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
25
|
-
if (handler != null && typeof handler !== 'function') throw new TypeError('Expected the "progress" option to be a function');
|
|
26
|
-
|
|
27
|
-
// Make sure the specified directory exists
|
|
28
|
-
await fsAccess(path.dirname(filename)).catch(() => {
|
|
29
|
-
throw new TypeError('Cannot save backup because the directory does not exist');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
const isNewFile = await fsAccess(filename).then(() => false, () => true);
|
|
33
|
-
return runBackup(this[cppdb].backup(this, attachedName, filename, isNewFile), handler || null);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const runBackup = (backup, handler) => {
|
|
37
|
-
let rate = 0;
|
|
38
|
-
let useDefault = true;
|
|
39
|
-
|
|
40
|
-
return new Promise((resolve, reject) => {
|
|
41
|
-
setImmediate(function step() {
|
|
42
|
-
try {
|
|
43
|
-
const progress = backup.transfer(rate);
|
|
44
|
-
if (!progress.remainingPages) {
|
|
45
|
-
backup.close();
|
|
46
|
-
resolve(progress);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (useDefault) {
|
|
50
|
-
useDefault = false;
|
|
51
|
-
rate = 100;
|
|
52
|
-
}
|
|
53
|
-
if (handler) {
|
|
54
|
-
const ret = handler(progress);
|
|
55
|
-
if (ret !== undefined) {
|
|
56
|
-
if (typeof ret === 'number' && ret === ret) rate = Math.max(0, Math.min(0x7fffffff, Math.round(ret)));
|
|
57
|
-
else throw new TypeError('Expected progress callback to return a number or undefined');
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
setImmediate(step);
|
|
61
|
-
} catch (err) {
|
|
62
|
-
backup.close();
|
|
63
|
-
reject(err);
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { getBooleanOption, cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineFunction(name, options, fn) {
|
|
5
|
-
// Apply defaults
|
|
6
|
-
if (options == null) options = {};
|
|
7
|
-
if (typeof options === 'function') { fn = options; options = {}; }
|
|
8
|
-
|
|
9
|
-
// Validate arguments
|
|
10
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
11
|
-
if (typeof fn !== 'function') throw new TypeError('Expected last argument to be a function');
|
|
12
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
13
|
-
if (!name) throw new TypeError('User-defined function name cannot be an empty string');
|
|
14
|
-
|
|
15
|
-
// Interpret options
|
|
16
|
-
const safeIntegers = 'safeIntegers' in options ? +getBooleanOption(options, 'safeIntegers') : 2;
|
|
17
|
-
const deterministic = getBooleanOption(options, 'deterministic');
|
|
18
|
-
const directOnly = getBooleanOption(options, 'directOnly');
|
|
19
|
-
const varargs = getBooleanOption(options, 'varargs');
|
|
20
|
-
let argCount = -1;
|
|
21
|
-
|
|
22
|
-
// Determine argument count
|
|
23
|
-
if (!varargs) {
|
|
24
|
-
argCount = fn.length;
|
|
25
|
-
if (!Number.isInteger(argCount) || argCount < 0) throw new TypeError('Expected function.length to be a positive integer');
|
|
26
|
-
if (argCount > 100) throw new RangeError('User-defined functions cannot have more than 100 arguments');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
this[cppdb].function(fn, name, argCount, safeIntegers, deterministic, directOnly);
|
|
30
|
-
return this;
|
|
31
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { getBooleanOption, cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function pragma(source, options) {
|
|
5
|
-
if (options == null) options = {};
|
|
6
|
-
if (typeof source !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (typeof options !== 'object') throw new TypeError('Expected second argument to be an options object');
|
|
8
|
-
const simple = getBooleanOption(options, 'simple');
|
|
9
|
-
|
|
10
|
-
const stmt = this[cppdb].prepare(`PRAGMA ${source}`, this, true);
|
|
11
|
-
return simple ? stmt.pluck().get() : stmt.all();
|
|
12
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function serialize(options) {
|
|
5
|
-
if (options == null) options = {};
|
|
6
|
-
|
|
7
|
-
// Validate arguments
|
|
8
|
-
if (typeof options !== 'object') throw new TypeError('Expected first argument to be an options object');
|
|
9
|
-
|
|
10
|
-
// Interpret and validate options
|
|
11
|
-
const attachedName = 'attached' in options ? options.attached : 'main';
|
|
12
|
-
if (typeof attachedName !== 'string') throw new TypeError('Expected the "attached" option to be a string');
|
|
13
|
-
if (!attachedName) throw new TypeError('The "attached" option cannot be an empty string');
|
|
14
|
-
|
|
15
|
-
return this[cppdb].serialize(attachedName);
|
|
16
|
-
};
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const { cppdb } = require('../util');
|
|
3
|
-
|
|
4
|
-
module.exports = function defineTable(name, factory) {
|
|
5
|
-
// Validate arguments
|
|
6
|
-
if (typeof name !== 'string') throw new TypeError('Expected first argument to be a string');
|
|
7
|
-
if (!name) throw new TypeError('Virtual table module name cannot be an empty string');
|
|
8
|
-
|
|
9
|
-
// Determine whether the module is eponymous-only or not
|
|
10
|
-
let eponymous = false;
|
|
11
|
-
if (typeof factory === 'object' && factory !== null) {
|
|
12
|
-
eponymous = true;
|
|
13
|
-
factory = defer(parseTableDefinition(factory, 'used', name));
|
|
14
|
-
} else {
|
|
15
|
-
if (typeof factory !== 'function') throw new TypeError('Expected second argument to be a function or a table definition object');
|
|
16
|
-
factory = wrapFactory(factory);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
this[cppdb].table(factory, name, eponymous);
|
|
20
|
-
return this;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function wrapFactory(factory) {
|
|
24
|
-
return function virtualTableFactory(moduleName, databaseName, tableName, ...args) {
|
|
25
|
-
const thisObject = {
|
|
26
|
-
module: moduleName,
|
|
27
|
-
database: databaseName,
|
|
28
|
-
table: tableName,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
// Generate a new table definition by invoking the factory
|
|
32
|
-
const def = apply.call(factory, thisObject, args);
|
|
33
|
-
if (typeof def !== 'object' || def === null) {
|
|
34
|
-
throw new TypeError(`Virtual table module "${moduleName}" did not return a table definition object`);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return parseTableDefinition(def, 'returned', moduleName);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function parseTableDefinition(def, verb, moduleName) {
|
|
42
|
-
// Validate required properties
|
|
43
|
-
if (!hasOwnProperty.call(def, 'rows')) {
|
|
44
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "rows" property`);
|
|
45
|
-
}
|
|
46
|
-
if (!hasOwnProperty.call(def, 'columns')) {
|
|
47
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition without a "columns" property`);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Validate "rows" property
|
|
51
|
-
const rows = def.rows;
|
|
52
|
-
if (typeof rows !== 'function' || Object.getPrototypeOf(rows) !== GeneratorFunctionPrototype) {
|
|
53
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "rows" property (should be a generator function)`);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Validate "columns" property
|
|
57
|
-
let columns = def.columns;
|
|
58
|
-
if (!Array.isArray(columns) || !(columns = [...columns]).every(x => typeof x === 'string')) {
|
|
59
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "columns" property (should be an array of strings)`);
|
|
60
|
-
}
|
|
61
|
-
if (columns.length !== new Set(columns).size) {
|
|
62
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate column names`);
|
|
63
|
-
}
|
|
64
|
-
if (!columns.length) {
|
|
65
|
-
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with zero columns`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Validate "parameters" property
|
|
69
|
-
let parameters;
|
|
70
|
-
if (hasOwnProperty.call(def, 'parameters')) {
|
|
71
|
-
parameters = def.parameters;
|
|
72
|
-
if (!Array.isArray(parameters) || !(parameters = [...parameters]).every(x => typeof x === 'string')) {
|
|
73
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "parameters" property (should be an array of strings)`);
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
parameters = inferParameters(rows);
|
|
77
|
-
}
|
|
78
|
-
if (parameters.length !== new Set(parameters).size) {
|
|
79
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with duplicate parameter names`);
|
|
80
|
-
}
|
|
81
|
-
if (parameters.length > 32) {
|
|
82
|
-
throw new RangeError(`Virtual table module "${moduleName}" ${verb} a table definition with more than the maximum number of 32 parameters`);
|
|
83
|
-
}
|
|
84
|
-
for (const parameter of parameters) {
|
|
85
|
-
if (columns.includes(parameter)) {
|
|
86
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with column "${parameter}" which was ambiguously defined as both a column and parameter`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Validate "safeIntegers" option
|
|
91
|
-
let safeIntegers = 2;
|
|
92
|
-
if (hasOwnProperty.call(def, 'safeIntegers')) {
|
|
93
|
-
const bool = def.safeIntegers;
|
|
94
|
-
if (typeof bool !== 'boolean') {
|
|
95
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "safeIntegers" property (should be a boolean)`);
|
|
96
|
-
}
|
|
97
|
-
safeIntegers = +bool;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Validate "directOnly" option
|
|
101
|
-
let directOnly = false;
|
|
102
|
-
if (hasOwnProperty.call(def, 'directOnly')) {
|
|
103
|
-
directOnly = def.directOnly;
|
|
104
|
-
if (typeof directOnly !== 'boolean') {
|
|
105
|
-
throw new TypeError(`Virtual table module "${moduleName}" ${verb} a table definition with an invalid "directOnly" property (should be a boolean)`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Generate SQL for the virtual table definition
|
|
110
|
-
const columnDefinitions = [
|
|
111
|
-
...parameters.map(identifier).map(str => `${str} HIDDEN`),
|
|
112
|
-
...columns.map(identifier),
|
|
113
|
-
];
|
|
114
|
-
return [
|
|
115
|
-
`CREATE TABLE x(${columnDefinitions.join(', ')});`,
|
|
116
|
-
wrapGenerator(rows, new Map(columns.map((x, i) => [x, parameters.length + i])), moduleName),
|
|
117
|
-
parameters,
|
|
118
|
-
safeIntegers,
|
|
119
|
-
directOnly,
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function wrapGenerator(generator, columnMap, moduleName) {
|
|
124
|
-
return function* virtualTable(...args) {
|
|
125
|
-
/*
|
|
126
|
-
We must defensively clone any buffers in the arguments, because
|
|
127
|
-
otherwise the generator could mutate one of them, which would cause
|
|
128
|
-
us to return incorrect values for hidden columns, potentially
|
|
129
|
-
corrupting the database.
|
|
130
|
-
*/
|
|
131
|
-
const output = args.map(x => Buffer.isBuffer(x) ? Buffer.from(x) : x);
|
|
132
|
-
for (let i = 0; i < columnMap.size; ++i) {
|
|
133
|
-
output.push(null); // Fill with nulls to prevent gaps in array (v8 optimization)
|
|
134
|
-
}
|
|
135
|
-
for (const row of generator(...args)) {
|
|
136
|
-
if (Array.isArray(row)) {
|
|
137
|
-
extractRowArray(row, output, columnMap.size, moduleName);
|
|
138
|
-
yield output;
|
|
139
|
-
} else if (typeof row === 'object' && row !== null) {
|
|
140
|
-
extractRowObject(row, output, columnMap, moduleName);
|
|
141
|
-
yield output;
|
|
142
|
-
} else {
|
|
143
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded something that isn't a valid row object`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function extractRowArray(row, output, columnCount, moduleName) {
|
|
150
|
-
if (row.length !== columnCount) {
|
|
151
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an incorrect number of columns`);
|
|
152
|
-
}
|
|
153
|
-
const offset = output.length - columnCount;
|
|
154
|
-
for (let i = 0; i < columnCount; ++i) {
|
|
155
|
-
output[i + offset] = row[i];
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
function extractRowObject(row, output, columnMap, moduleName) {
|
|
160
|
-
let count = 0;
|
|
161
|
-
for (const key of Object.keys(row)) {
|
|
162
|
-
const index = columnMap.get(key);
|
|
163
|
-
if (index === undefined) {
|
|
164
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with an undeclared column "${key}"`);
|
|
165
|
-
}
|
|
166
|
-
output[index] = row[key];
|
|
167
|
-
count += 1;
|
|
168
|
-
}
|
|
169
|
-
if (count !== columnMap.size) {
|
|
170
|
-
throw new TypeError(`Virtual table module "${moduleName}" yielded a row with missing columns`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function inferParameters({ length }) {
|
|
175
|
-
if (!Number.isInteger(length) || length < 0) {
|
|
176
|
-
throw new TypeError('Expected function.length to be a positive integer');
|
|
177
|
-
}
|
|
178
|
-
const params = [];
|
|
179
|
-
for (let i = 0; i < length; ++i) {
|
|
180
|
-
params.push(`$${i + 1}`);
|
|
181
|
-
}
|
|
182
|
-
return params;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const { hasOwnProperty } = Object.prototype;
|
|
186
|
-
const { apply } = Function.prototype;
|
|
187
|
-
const GeneratorFunctionPrototype = Object.getPrototypeOf(function*(){});
|
|
188
|
-
const identifier = str => `"${str.replace(/"/g, '""')}"`;
|
|
189
|
-
const defer = x => () => x;
|