@mndrk/agx 2.2.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -105
- package/cloud-runtime/standalone/apps/local/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/apps/local/.next/build-manifest.json +3 -3
- package/cloud-runtime/standalone/apps/local/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.html +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/linear/issues/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/linear/issues/context/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/linear/issues/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/linear/options/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/linear/runs/scripted/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/linear/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/linear-issues/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/scheduled-tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/objectives/[objectiveId]/worker/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/projects/[id]/teams/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/check/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/assign/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/detail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/learn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations/page/react-loadable-manifest.json +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.rsc +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/board/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.segments/folders/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/folders.segments/folders.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/env-vars/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/folders/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/linear/page/react-loadable-manifest.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/[objectiveId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/objectives/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/settings/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/adopt/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/new/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/teams/replace/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/terminal/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.rsc +4 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_full.segment.rsc +4 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/_tree.segment.rsc +3 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +3 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/setup.segments/setup.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0-zk9w8._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0.01bfe._.js +13 -8
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__00c~p6z._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__019dflu._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__02t.3rm._.js +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__06zr0ph._.js +6 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__07d._0s._.js +15 -10
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__08xj~a3._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0a0cq38._.js +34 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0asvfdo._.js +35 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0bt7ejs._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0f.~98d._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0g-~-.q._.js +6 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0g7p6pw._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0gj~dap._.js +40 -9
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0hkcw03._.js +8 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0hyu3en._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0i5aw03._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0ke4z91._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0l53ok5._.js +41 -10
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0ll-~cx._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0mh6p.0._.js +7 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0nc-lbr._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0p9rl6.._.js +8 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0q~pnp0._.js +6 -6
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0ue0bu5._.js +6 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0unwwyx._.js +12 -7
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0vtkl3q._.js +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0x6w64i._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0z82z0-._.js +6 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0zrv3p3._.js +16 -11
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__0~iknwz._.js +12 -7
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__10d.dhd._.js +46 -15
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__10sw5ia._.js +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__11yx.ud._.js +33 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__13-nlgu._.js +5 -5
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/[root-of-the-server]__13960a8._.js +14 -9
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_06qet8g._.js +14 -9
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_0_0m2ly._.js +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_0a15wtk._.js +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_0fr1qq6._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_0g.q2r6._.js +6 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_0i7fs.i._.js +4 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_01pvj2g._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_agent-participants_ts_0cq15u5._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_db_ts_0twf-w5._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_orchestrator_chat-processor_ts_0c2l_oh._.js +43 -12
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_sqlite-query-adapter_ts_0l95hik._.js +15 -15
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_lib_sqlite-query-adapter_ts_0s5xprd._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_graph_082u-ls._.js +19 -14
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/apps_local_src_graph_schedule-runner_ts_07-ozf_._.js +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0_l0fpi.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0gips_c.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0rszt9p.js +10 -6
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0u_5kfo.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/0rhn_lucide-react_dist_esm_06fnblz._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0140-84._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_03fckp4._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{_0tcjapj._.js → _0ip6k6n._.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0jensz1._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0t0p8q5._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0yeuuy1._.js +1 -23
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_03z24q2._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0_ac-.f._.js +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0a-8i4p._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0k4~c1x._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0ld1uug._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0ms1d6i._.js +4 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0p_v0ri._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0x.xj52._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0~g2ijr._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_11k_-8~._.js +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_agents_[id]_page_tsx_06n47n~._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_agents_page_tsx_078reb_._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_linear_page_tsx_0a~n5y8._.js +25 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_page_tsx_0kcaeqi._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_teams_[teamId]_agents_[agentId]_page_tsx_0wm~_~t._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_teams_[teamId]_page_tsx_0iyozfl._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_teams_new_page_tsx_0yqd0a5._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_projects_[slug]_terminal_page_tsx_01n9qk.._.js +1 -20
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_app_setup_page_tsx_0ql2qmr._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_PromptJobBoard_tsx_06zob36._.js +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_projects_ProjectObjectivesWorkspace_tsx_0k4tfip._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_terminal_TerminalPane_tsx_0l17vs_._.js +22 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_components_thread_WorkspaceSidebar_tsx_0unv2xp._.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/middleware-build-manifest.js +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/apps/local/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/pages/500.html +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{1011~1x9nj4ny.js → 0-k2m1ncx7hwx.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0dnw31436wd~..js → 0-pkmgle2s8u8.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/064jfmraty.9h.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/06kru5m9q~r.j.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/06kyg1q0bcz6p.js +5 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0_cjth28_11b2.js → 08bdyjcnamzep.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0-olq~7zw3wjy.js → 08xq~uyr6.eqw.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0gj98094p~zn4.js → 0cku81z~3oe6..js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0e7jhy0-52_4k.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0wh6p5~ft5rma.js → 0htc.sqrk_0.c.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0ju4xmxwqddw6.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0mm978wb-ueg-.js +6 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0musu8f.4wvxz.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0bchtyu6m.2yv.js → 0muti0yiyhu0t.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0rhps884e-bzu.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0rr3fvwc5ind~.js +5 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0sbkkjowkksa6.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0sjz0.o9_33qy.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0srzmg8ivve1g.css +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0fonouj2i9qnb.js → 0swo3_e8.4s7j.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0sysrf3~l~r35.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0t69h-kc701fn.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0v67lnh..wj4z.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{013gtut17~fne.js → 0wb45ol1xrqe~.js} +1 -23
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{00po4v2x~0x_z.js → 0wiw2v8gm-k_-.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0jq0t4zip38wt.js → 0wopevh0s7.8c.js} +1 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0xm2~gxlt1npd.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{1503vb7lb6.g1.js → 0ya124ushze_f.js} +4 -4
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{00e1ihnb6ap3t.js → 0zt2o58c5gytn.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0~idsggr8vqf5.js +59 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0xu_doej_wc-3.js → 0~mcfx41q4znh.js} +3 -3
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/116j4mjz~y42t.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0-vo_x2cxmjm3.js → 12b62py0mq1gm.js} +4 -4
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/12y5i0lh6s73o.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/148.mt80civoz.js +20 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/14m5d270euu_s.js +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/16h9208kl5~xa.js +16 -0
- package/cloud-runtime/standalone/apps/local/app/agents/[id]/page.tsx +6 -3
- package/cloud-runtime/standalone/apps/local/app/agents/page.tsx +3 -3
- package/cloud-runtime/standalone/apps/local/app/api/chat/route.ts +7 -1
- package/cloud-runtime/standalone/apps/local/app/api/participants/route.ts +9 -9
- package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/search/route.ts +6 -6
- package/cloud-runtime/standalone/apps/local/app/api/projects/[id]/teams/route.ts +3 -3
- package/cloud-runtime/standalone/apps/local/app/api/prompt-jobs/agents/route.ts +1 -1
- package/cloud-runtime/standalone/apps/local/app/api/schedules/poll/route.ts +11 -2
- package/cloud-runtime/standalone/apps/local/app/page.tsx +72 -14
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/page.tsx +34 -1
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/teams/[teamId]/agents/[agentId]/page.tsx +6 -3
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/teams/[teamId]/page.tsx +6 -3
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/teams/new/page.tsx +8 -17
- package/cloud-runtime/standalone/apps/local/app/projects/[slug]/teams/replace/page.tsx +1 -1
- package/cloud-runtime/standalone/apps/local/app/projects/page.tsx +7 -0
- package/cloud-runtime/standalone/apps/local/app/setup/page.tsx +1 -38
- package/cloud-runtime/standalone/apps/local/components/AutomationsBoard.tsx +8 -4
- package/cloud-runtime/standalone/apps/local/components/EmptyStateCard.tsx +37 -0
- package/cloud-runtime/standalone/apps/local/components/LinearBoard.tsx +103 -770
- package/cloud-runtime/standalone/apps/local/components/PromptJobBoard.tsx +5 -37
- package/cloud-runtime/standalone/apps/local/components/TeamPickerModal.tsx +3 -3
- package/cloud-runtime/standalone/apps/local/components/chat-ui/Composer.tsx +28 -32
- package/cloud-runtime/standalone/apps/local/components/chat-ui/ParticipantBar.tsx +24 -39
- package/cloud-runtime/standalone/apps/local/components/linear/LinearBoardFilters.tsx +343 -0
- package/cloud-runtime/standalone/apps/local/components/linear/TicketRow.tsx +158 -0
- package/cloud-runtime/standalone/apps/local/components/projects/ObjectiveHealthTrend.tsx +45 -61
- package/cloud-runtime/standalone/apps/local/components/projects/RecentlyCompletedCard.tsx +0 -16
- package/cloud-runtime/standalone/apps/local/components/projects/ReplaceAgentsModal.tsx +2 -2
- package/cloud-runtime/standalone/apps/local/components/setup/McpSetupStep.tsx +155 -120
- package/cloud-runtime/standalone/apps/local/components/setup/ProviderStep.tsx +85 -88
- package/cloud-runtime/standalone/apps/local/components/setup/SetupLayout.tsx +6 -4
- package/cloud-runtime/standalone/apps/local/components/terminal/ProjectTerminal.tsx +18 -193
- package/cloud-runtime/standalone/apps/local/components/terminal/TerminalPane.tsx +40 -4
- package/cloud-runtime/standalone/apps/local/components/thread/WorkspaceSidebar.tsx +4 -4
- package/cloud-runtime/standalone/apps/local/components/ui/ResizeHandle.tsx +52 -0
- package/cloud-runtime/standalone/apps/local/hooks/useAutomations.ts +8 -3
- package/cloud-runtime/standalone/apps/local/hooks/useLinearActiveAgents.ts +38 -0
- package/cloud-runtime/standalone/apps/local/hooks/useLinearParticipants.ts +118 -0
- package/cloud-runtime/standalone/apps/local/hooks/usePromptJobs.ts +5 -3
- package/cloud-runtime/standalone/apps/local/hooks/useSetupFlow.ts +6 -81
- package/cloud-runtime/standalone/apps/local/lib/agent-participants.ts +1 -1
- package/cloud-runtime/standalone/apps/local/lib/agent-process-registry.ts +34 -0
- package/cloud-runtime/standalone/apps/local/lib/db.ts +5 -5
- package/cloud-runtime/standalone/apps/local/lib/linear-board-utils.ts +9 -0
- package/cloud-runtime/standalone/apps/local/lib/linear-run-status.ts +88 -0
- package/cloud-runtime/standalone/apps/local/lib/linear-run-store.ts +4 -4
- package/cloud-runtime/standalone/apps/local/lib/sqlite-query-adapter.ts +5 -1
- package/cloud-runtime/standalone/apps/local/lib/team-catalog.ts +60 -60
- package/cloud-runtime/standalone/apps/local/lib/types.ts +1 -1
- package/cloud-runtime/standalone/apps/local/migrations/sqlite_schema.sql +1 -1
- package/cloud-runtime/standalone/apps/local/skills-lock.json +5 -0
- package/cloud-runtime/standalone/apps/local/src/graph/schedule-runner.ts +26 -1
- package/cloud-runtime/standalone/apps/local/src/graph/store.ts +13 -0
- package/cloud-runtime/standalone/apps/local/state/linearBoardPins.ts +45 -0
- package/cloud-runtime/standalone/apps/local/worker/index.js +56 -5
- package/lib/cli/onboarding.js +8 -5
- package/package.json +1 -1
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/0rhn_lucide-react_dist_esm_067eb..._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_00trrg8._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0ejzn1e._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0sjchy6._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0w4gpvr._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/_0x6hh0t._.js +0 -4
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/apps_local_0t6p.qm._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0-wlbe.ripd2w.css +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/014z_yruiincl.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/041-dhls9zkl1.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/069yt_7prdxsp.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0e6rxcxy.l5c8.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0ime4btrg-g4l.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0j-nhn61e~nnj.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0jglardpw~5uc.js +0 -37
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0l3v45kd.9is_.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0ng6wy4ak35jg.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0n~jhoq~op4e5.js +0 -16
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0p-rdas54yo~w.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0pdrpsy-zdxp0.js +0 -5
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0p~l5ap6qqx2o.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0tm20~ec~occu.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0w94x-v00osq0.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0xwny92a.ad_i.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/11l2tww5f0hsk.js +0 -20
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/12qohmk-~yrtg.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/14v~9vx3tdv85.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/16fyhcmwlw3th.js +0 -6
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/18e8w~~mvoh5o.js +0 -1
- package/cloud-runtime/standalone/apps/local/components/setup/ProjectStep.tsx +0 -189
- package/cloud-runtime/standalone/apps/local/components/setup/TeamsStep.tsx +0 -500
- /package/cloud-runtime/standalone/apps/local/.next/static/{qPuactsz6OYimwT6dSdHn → 438GF86gZtccU2fS12URB}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{qPuactsz6OYimwT6dSdHn → 438GF86gZtccU2fS12URB}/_clientMiddlewareManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{qPuactsz6OYimwT6dSdHn → 438GF86gZtccU2fS12URB}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,318634,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function a(e){return null===e.installed?"checking":e.installed?!e.authenticated&&e.authCmd?"needs-auth":"ready":"not-installed"}let s=[{id:"claude",label:"Claude Code",bin:"claude",description:"Recommended for the fastest AGX setup.",installCmd:"npm install -g @anthropic-ai/claude-code",docsUrl:"https://docs.anthropic.com/en/docs/claude-code/quickstart",recommended:!0,statusLabel:"Installed",authCheck:{cmd:'claude -p "say yes" 2>/dev/null',timeout:15e3},authCmd:{cmd:"claude",description:"Opens browser for Anthropic login"}},{id:"codex",label:"Codex",bin:"codex",description:"OpenAI's terminal coding agent.",installCmd:"npm install -g @openai/codex",docsUrl:"https://github.com/openai/codex",statusLabel:"Installed",authCheck:{cmd:"codex --version 2>/dev/null",timeout:5e3},authCmd:{cmd:"codex login --device-auth",description:"Device auth flow for OpenAI"}},{id:"gemini",label:"Gemini CLI",bin:"gemini",description:"Google's CLI for Gemini workflows.",installCmd:"npm install -g @google/gemini-cli",docsUrl:"https://github.com/google-gemini/gemini-cli",statusLabel:"Installed",authCheck:{cmd:'echo "hi" | gemini 2>/dev/null',timeout:15e3},authCmd:{cmd:"gemini",description:"Opens browser for Google login"}},{id:"ollama",label:"Ollama",bin:"ollama",description:"Run local models on your machine.",installCmd:"curl -fsSL https://ollama.com/install.sh | sh",docsUrl:"https://ollama.com/download",statusLabel:"Installed",authCheck:{cmd:"ollama list 2>/dev/null",timeout:5e3}},{id:"zai",label:"Z.AI",bin:"claude",description:"Use the Claude CLI with your Z.AI API key.",installCmd:"npm install -g @anthropic-ai/claude-code",docsUrl:"https://z.ai/",installNote:"Requires Claude Code plus a configured Z.AI API key.",statusLabel:"Via Claude CLI",authCheck:{cmd:'test -n "$ANTHROPIC_API_KEY"',timeout:5e3},authCmd:{cmd:"export ANTHROPIC_API_KEY=<your-key>",description:"Set your Z.AI API key"}}].map(e=>({id:e.id,name:e.label,description:e.description,installCmd:e.installCmd,docsUrl:e.docsUrl,installNote:e.installNote,recommended:e.recommended,authCmd:e.authCmd}));var n=e.i(618566),d=e.i(529471),l=e.i(211464),o=e.i(19035),i=e.i(498027),c=e.i(245110),m=e.i(558201),u=e.i(906724);function x({currentStep:e,totalSteps:r}){return(0,t.jsx)("div",{className:"flex items-center gap-0",role:"progressbar","aria-valuenow":e,"aria-valuemin":1,"aria-valuemax":r,"aria-label":`Step ${e} of ${r}`,children:Array.from({length:r},(r,a)=>{let s=a+1,n=s===e,d=s<e;return(0,t.jsxs)("div",{className:"flex items-center",children:[a>0&&(0,t.jsx)("div",{className:`w-8 h-[2px] ${d?"bg-[var(--foreground)]":"bg-[var(--border)]"}`}),(0,t.jsx)("div",{className:`w-2.5 h-2.5 rounded-full transition-colors ${n?"bg-[var(--foreground)] ring-4 ring-[var(--foreground)]/10":d?"bg-[var(--foreground)]":"bg-[var(--border)]"}`})]},s)})})}function p({currentStep:e,totalSteps:r,children:a,footer:s}){return(0,t.jsxs)("div",{className:"h-screen w-full flex flex-col bg-[var(--background)]",children:[(0,t.jsx)("div",{className:"flex items-center justify-center pt-8 pb-4",children:(0,t.jsx)(x,{currentStep:e,totalSteps:r})}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto px-4",children:(0,t.jsx)("div",{className:"max-w-2xl mx-auto w-full py-6",children:a})}),s&&(0,t.jsx)("div",{className:"border-t border-[var(--border)] bg-[var(--background)] px-4 py-4",children:(0,t.jsx)("div",{className:"max-w-2xl mx-auto w-full",children:s})})]})}function h({text:e}){let[a,s]=(0,r.useState)(!1),n=(0,r.useCallback)(()=>{navigator.clipboard.writeText(e).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})},[e]);return(0,t.jsx)("button",{type:"button",onClick:n,className:"p-1.5 rounded-md hover:bg-[var(--muted)] transition-colors text-[var(--muted-foreground)] hover:text-[var(--foreground)]",title:"Copy command",children:a?(0,t.jsx)(d.Check,{className:"w-3.5 h-3.5 text-emerald-500"}):(0,t.jsx)(o.Copy,{className:"w-3.5 h-3.5"})})}function g({cli:e,onVerify:s}){let n=a(e),[o,x]=(0,r.useState)("needs-auth"===n),[p,f]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),j="not-installed"===n||"needs-auth"===n,N=(0,r.useCallback)(async()=>{f(!0),b(null);try{let t=await fetch(`/api/providers/check/${e.id}`,{cache:"no-store"});if(!t.ok)return void b("Check failed");(await t.json()).authenticated?s?.(e.id):b("Not authenticated yet")}catch{b("Check failed")}finally{f(!1)}},[e.id,s]);return(0,t.jsxs)("div",{className:"border border-[var(--card-border)] rounded-lg overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>j&&x(!o),className:`w-full flex items-center gap-3 px-4 py-3 transition-colors text-left ${j?"hover:bg-[var(--item-hover-bg)] cursor-pointer":"cursor-default"}`,children:[(0,t.jsx)("div",{className:"shrink-0",children:"checking"===n?(0,t.jsx)(l.Circle,{className:"w-4 h-4 text-[var(--muted-foreground)] animate-pulse"}):"ready"===n?(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-emerald-100 dark:bg-emerald-900/30 flex items-center justify-center",children:(0,t.jsx)(d.Check,{className:"w-3 h-3 text-emerald-600 dark:text-emerald-400"})}):"needs-auth"===n?(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-amber-100 dark:bg-amber-900/30 flex items-center justify-center",children:(0,t.jsx)(l.Circle,{className:"w-3 h-3 text-amber-600 dark:text-amber-400"})}):(0,t.jsx)(l.Circle,{className:"w-4 h-4 text-[var(--muted-foreground)]"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[14px] font-semibold text-[var(--foreground)]",children:e.name}),e.recommended&&"not-installed"===n&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-[var(--foreground)] bg-[var(--secondary)] px-1.5 py-0.5 rounded",children:"Recommended"}),"ready"===n&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-900/20 px-1.5 py-0.5 rounded",children:"Ready"}),"needs-auth"===n&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 px-1.5 py-0.5 rounded",children:"Needs auth"})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--muted-foreground)]",children:e.description})]}),j&&(0,t.jsx)(i.ChevronDown,{className:`w-4 h-4 text-[var(--muted-foreground)] transition-transform ${o?"rotate-180":""}`})]}),o&&"not-installed"===n&&(0,t.jsxs)("div",{className:"px-4 pb-3 border-t border-[var(--card-border)]",children:[(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2 bg-[var(--secondary)] rounded-md px-3 py-2 font-mono text-[13px] text-[var(--foreground)]",children:[(0,t.jsx)(m.Terminal,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] shrink-0"}),(0,t.jsx)("code",{className:"flex-1 overflow-x-auto whitespace-nowrap",children:e.installCmd}),(0,t.jsx)(h,{text:e.installCmd})]}),(0,t.jsxs)("a",{href:e.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 mt-2 text-[12px] text-[var(--primary)] hover:underline",children:["Documentation ",(0,t.jsx)(c.ExternalLink,{className:"w-3 h-3"})]}),e.installNote&&(0,t.jsx)("p",{className:"mt-2 text-[12px] text-[var(--muted-foreground)]",children:e.installNote})]}),o&&"needs-auth"===n&&e.authCmd&&(0,t.jsxs)("div",{className:"px-4 pb-3 border-t border-[var(--card-border)]",children:[(0,t.jsx)("p",{className:"mt-3 text-[12px] text-[var(--muted-foreground)]",children:e.authCmd.description}),(0,t.jsxs)("div",{className:"mt-2 flex items-center gap-2 bg-[var(--secondary)] rounded-md px-3 py-2 font-mono text-[13px] text-[var(--foreground)]",children:[(0,t.jsx)(m.Terminal,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] shrink-0"}),(0,t.jsx)("code",{className:"flex-1 overflow-x-auto whitespace-nowrap",children:e.authCmd.cmd}),(0,t.jsx)(h,{text:e.authCmd.cmd})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:N,disabled:p,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-[12px] font-medium rounded-md bg-[var(--foreground)] text-[var(--background)] hover:opacity-90 transition-colors disabled:opacity-60",children:[p&&(0,t.jsx)(u.Loader2,{className:"w-3 h-3 animate-spin"}),p?"Checking...":"Verify"]}),v&&(0,t.jsx)("span",{className:"text-[12px] text-amber-600 dark:text-amber-400",children:v})]})]})]})}function f({clis:e,readyState:r,authenticatedCount:a,totalCount:s,onVerifySuccess:n,onNext:d}){let l="ready"===r,o=e.find(e=>e.recommended)??e[0]??null,i=e.filter(e=>!e.recommended);return(0,t.jsxs)(p,{currentStep:1,totalSteps:4,footer:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[13px] text-[var(--muted-foreground)]",children:(0,t.jsxs)("span",{className:l?"text-emerald-600 dark:text-emerald-400":"",children:[a,"/",s," providers ready"]})}),(0,t.jsx)("button",{type:"button",onClick:d,disabled:!l,className:"inline-flex items-center gap-2 px-6 py-2.5 bg-[var(--foreground)] text-[var(--background)] text-[14px] font-semibold rounded-lg hover:opacity-90 transition-all disabled:opacity-40 disabled:cursor-not-allowed",children:"Next"})]}),children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h1",{className:"text-[24px] font-bold text-[var(--foreground)] tracking-tight",children:"Connect a Provider"}),(0,t.jsxs)("p",{className:"mt-2 text-[14px] text-[var(--muted-foreground)] leading-relaxed",children:["AGX orchestrates AI agents across multiple providers.",(0,t.jsx)("br",{}),"Connect at least one to get started."]})]}),"checking"===r&&(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)(u.Loader2,{className:"w-6 h-6 animate-spin text-[var(--muted-foreground)] mx-auto"}),(0,t.jsx)("p",{className:"mt-3 text-[13px] text-[var(--muted-foreground)]",children:"Detecting installed providers..."})]}),"error"===r&&(0,t.jsx)("div",{className:"text-center py-8",children:(0,t.jsx)("p",{className:"text-[14px] text-[var(--muted-foreground)]",children:"Could not detect providers. Please reload."})}),("needs-setup"===r||"ready"===r)&&(0,t.jsxs)("div",{className:"space-y-4",children:[!e.some(e=>e.installed)&&o&&(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--secondary)] p-4 mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-[var(--muted-foreground)]",children:"Start Here"}),(0,t.jsx)("span",{className:"rounded bg-[var(--background)] px-2 py-0.5 text-[11px] font-medium text-[var(--foreground)]",children:o.name})]}),(0,t.jsx)("p",{className:"mt-2 text-[13px] text-[var(--foreground)]",children:"Install Claude Code first if you want the shortest path into AGX."})]}),(0,t.jsx)("div",{className:"space-y-2",children:o&&(0,t.jsx)(g,{cli:o,onVerify:n})}),i.length>0&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("h3",{className:"mb-2 text-[12px] font-semibold uppercase tracking-wide text-[var(--muted-foreground)]",children:"Other Options"}),(0,t.jsx)("div",{className:"space-y-2",children:i.map(e=>(0,t.jsx)(g,{cli:e,onVerify:n},e.id))})]})]})]})}var v=e.i(363732);let b=(0,v.default)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]),j=[{id:"linear",name:"Linear",description:"Read and update tickets so agents can track work in Linear during execution.",docsUrl:"https://linear.app/docs/mcp"}],N=[{id:"claude",label:"Claude Code"},{id:"codex",label:"Codex"},{id:"gemini",label:"Gemini CLI"}];function y({onNext:e,onBack:a}){let[s,n]=(0,r.useState)(!0),[l,o]=(0,r.useState)({}),[i,m]=(0,r.useState)({}),[x,h]=(0,r.useState)(null),[g,f]=(0,r.useState)(null),v=(0,r.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/linear/status"),fetch("/api/linear/mcp-setup")]),r=await e.json(),a=await t.json();o(r.clis??{}),m(a.configured??{})}catch{}finally{n(!1)}},[]);(0,r.useEffect)(()=>{v()},[v]);let k=(0,r.useCallback)(async e=>{h(e),f(null);try{let t=await fetch("/api/linear/mcp-setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cli:e})});if(t.ok)await v();else{let e=await t.json().catch(()=>({}));f(e.error||"Failed to configure MCP")}}catch{f("Failed to configure MCP")}finally{h(null)}},[v]),C=N.filter(e=>l[e.id]),w=C.some(e=>i[e.id]);return(0,t.jsxs)(p,{currentStep:2,totalSteps:4,footer:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("button",{type:"button",onClick:a,className:"text-[14px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Back"}),(0,t.jsx)("button",{type:"button",onClick:e,className:"inline-flex items-center gap-2 px-6 py-2.5 bg-[var(--foreground)] text-[var(--background)] text-[14px] font-semibold rounded-lg hover:opacity-90 transition-all",children:w?"Next":"Skip"})]}),children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h1",{className:"text-[24px] font-bold text-[var(--foreground)] tracking-tight",children:"Configure MCP Servers"}),(0,t.jsxs)("p",{className:"mt-2 text-[14px] text-[var(--muted-foreground)] leading-relaxed",children:["MCP servers let your agents interact with external tools.",(0,t.jsx)("br",{}),"Set them up so agents can read and update tickets automatically."]})]}),s?(0,t.jsxs)("div",{className:"text-center py-8",children:[(0,t.jsx)(u.Loader2,{className:"w-6 h-6 animate-spin text-[var(--muted-foreground)] mx-auto"}),(0,t.jsx)("p",{className:"mt-3 text-[13px] text-[var(--muted-foreground)]",children:"Checking MCP configuration..."})]}):(0,t.jsxs)("div",{className:"space-y-6",children:[j.map(e=>(0,t.jsxs)("div",{className:"border border-[var(--card-border)] rounded-lg overflow-hidden",children:[(0,t.jsxs)("div",{className:"px-4 py-3 flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[var(--secondary)] flex items-center justify-center",children:(0,t.jsx)(b,{className:"w-4 h-4 text-[var(--foreground)]"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[14px] font-semibold text-[var(--foreground)]",children:e.name}),w&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-emerald-600 dark:text-emerald-400 bg-emerald-50 dark:bg-emerald-900/20 px-1.5 py-0.5 rounded",children:"Configured"})]}),(0,t.jsx)("p",{className:"text-[12px] text-[var(--muted-foreground)]",children:e.description})]})]}),(0,t.jsxs)("div",{className:"border-t border-[var(--card-border)] px-4 py-3 space-y-2",children:[(0,t.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-[var(--muted-foreground)] mb-2",children:"Configure for your CLI"}),N.map(e=>{let r=l[e.id],a=i[e.id],s=x===e.id;return(0,t.jsxs)("div",{className:`flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2.5 ${!r?"opacity-40":""}`,children:[(0,t.jsx)("span",{className:"text-[13px] text-[var(--foreground)]",children:e.label}),r?a?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[11px] text-emerald-600 dark:text-emerald-400",children:[(0,t.jsx)(d.Check,{className:"w-3.5 h-3.5"}),"Configured"]}):(0,t.jsx)("button",{type:"button",onClick:()=>k(e.id),disabled:s,className:"inline-flex items-center gap-1.5 px-3 py-1 text-[12px] font-medium rounded-md border border-[var(--card-border)] hover:bg-[var(--secondary)] transition-colors disabled:opacity-50",children:s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Loader2,{className:"w-3 h-3 animate-spin"}),"Setting up..."]}):"Set up"}):(0,t.jsx)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:"Not installed"})]},e.id)}),g&&(0,t.jsx)("p",{className:"text-[12px] text-red-500 dark:text-red-400 mt-1",children:g})]}),(0,t.jsx)("div",{className:"border-t border-[var(--card-border)] px-4 py-2.5",children:(0,t.jsxs)("a",{href:e.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[12px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:["Learn more about ",e.name," MCP",(0,t.jsx)(c.ExternalLink,{className:"w-3 h-3"})]})})]},e.id)),0===C.length&&(0,t.jsx)("div",{className:"text-center py-4",children:(0,t.jsx)("p",{className:"text-[13px] text-[var(--muted-foreground)]",children:"No CLI providers detected. Go back and install a provider first, or skip this step."})})]})]})}var k=e.i(55236),C=e.i(129463);let w=(0,v.default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);var S=e.i(797167);function I({folderPath:e}){let{analysis:a,loading:s}=function(e){let[t,a]=(0,r.useState)(null),[s,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!e)return void a(null);let t=!1;return n(!0),(async()=>{try{let r=await fetch("/api/filesystem/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(t)return;if(r.ok){let e=await r.json();a(e.analysis)}}catch{}finally{t||n(!1)}})(),()=>{t=!0}},[e]),{analysis:t,loading:s}}(e);if(s)return(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2 text-[12px] text-[var(--muted-foreground)]",children:[(0,t.jsx)(u.Loader2,{className:"w-3 h-3 animate-spin"})," Analyzing..."]});if(!a)return null;let n=Object.entries(a.languages).sort(([,e],[,t])=>t-e).slice(0,5);return(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[12px] text-[var(--muted-foreground)]",children:[a.isGit&&a.branch&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)(C.GitBranch,{className:"w-3 h-3"})," ",a.branch]}),a.isGit&&a.status&&(0,t.jsxs)("span",{children:[a.status.modified,"M ",a.status.untracked,"? ",a.status.staged,"S"]}),n.map(([e,r])=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)(w,{className:"w-3 h-3"})," ",e," (",r,")"]},e))]})}function P({data:e,onChange:a,onNext:s,onBack:n}){let[d,l]=(0,r.useState)(!1),o=(0,r.useCallback)(async()=>{l(!0);try{let t=await fetch("/api/filesystem/pick-folder",{method:"POST"});if(!t.ok)return;let r=await t.json();if(r.cancelled||!r.path)return;let s=r.path.split("/").filter(Boolean).pop()||r.path;if(e.folders.some(e=>e.path===r.path))return;a({...e,name:e.name||s,folders:[...e.folders,{name:s,path:r.path}]})}catch{}finally{l(!1)}},[e,a]),i=(0,r.useCallback)(t=>{a({...e,folders:e.folders.filter(e=>e.path!==t)})},[e,a]),c=e.name.trim().length>0;return(0,t.jsxs)(p,{currentStep:3,totalSteps:4,footer:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"text-[14px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Back"}),(0,t.jsx)("button",{type:"button",onClick:s,disabled:!c,className:"inline-flex items-center gap-2 px-6 py-2.5 bg-[var(--foreground)] text-[var(--background)] text-[14px] font-semibold rounded-lg hover:opacity-90 transition-all disabled:opacity-40 disabled:cursor-not-allowed",children:"Next"})]}),children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h1",{className:"text-[24px] font-bold text-[var(--foreground)] tracking-tight",children:"Create Your Project"}),(0,t.jsx)("p",{className:"mt-2 text-[14px] text-[var(--muted-foreground)]",children:"Name your project and attach folders your agents will work in."})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"project-name",className:"block text-[13px] font-medium text-[var(--foreground)] mb-1.5",children:"Project name"}),(0,t.jsx)("input",{id:"project-name",type:"text",value:e.name,onChange:t=>a({...e,name:t.target.value}),placeholder:"My Project",className:"w-full px-3 py-2.5 rounded-lg border border-[var(--border)] bg-[var(--background)] text-[14px] text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:ring-2 focus:ring-[var(--foreground)]/20",autoFocus:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"project-desc",className:"block text-[13px] font-medium text-[var(--foreground)] mb-1.5",children:["Description ",(0,t.jsx)("span",{className:"text-[var(--muted-foreground)] font-normal",children:"(optional)"})]}),(0,t.jsx)("input",{id:"project-desc",type:"text",value:e.description,onChange:t=>a({...e,description:t.target.value}),placeholder:"What this project is about",className:"w-full px-3 py-2.5 rounded-lg border border-[var(--border)] bg-[var(--background)] text-[14px] text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:ring-2 focus:ring-[var(--foreground)]/20"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsx)("label",{className:"text-[13px] font-medium text-[var(--foreground)]",children:"Folders"}),(0,t.jsxs)("button",{type:"button",onClick:o,disabled:d,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-[12px] font-medium rounded-md border border-[var(--border)] hover:bg-[var(--secondary)] transition-colors disabled:opacity-60",children:[d?(0,t.jsx)(u.Loader2,{className:"w-3 h-3 animate-spin"}):(0,t.jsx)(k.Folder,{className:"w-3 h-3"}),"Browse"]})]}),0===e.folders.length?(0,t.jsx)("p",{className:"text-[13px] text-[var(--muted-foreground)] py-4 text-center border border-dashed border-[var(--border)] rounded-lg",children:"No folders attached yet. Click Browse to add one."}):(0,t.jsx)("div",{className:"space-y-2",children:e.folders.map(e=>(0,t.jsxs)("div",{className:"border border-[var(--card-border)] rounded-lg px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(k.Folder,{className:"w-4 h-4 text-[var(--muted-foreground)] shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"text-[13px] font-medium text-[var(--foreground)] truncate",children:e.name}),(0,t.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)] truncate",children:e.path})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>i(e.path),className:"p-1 rounded hover:bg-[var(--secondary)] text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:(0,t.jsx)(S.X,{className:"w-3.5 h-3.5"})})]}),(0,t.jsx)(I,{folderPath:e.path})]},e.path))})]})]})]})}var A=e.i(367859),L=e.i(572665),O=e.i(780004);let T=[{id:"gemini",label:"Gemini"},{id:"claude",label:"Claude"},{id:"ollama",label:"Ollama"},{id:"codex",label:"Codex"},{id:"zai",label:"Z.AI"}],M={claude:["claude-opus-4-20250514","claude-sonnet-4-20250514","claude-haiku-4-20250514"],codex:["o4-mini","o3","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano"],gemini:["gemini-2.5-pro","gemini-2.5-flash","gemini-2.0-flash"],ollama:["qwen3:8b","devstral","qwen2.5-coder:14b","llama3.3:70b","deepseek-coder-v2:16b"],zai:["claude-opus-4-20250514","claude-sonnet-4-20250514"]},E={balanced:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",specialist:"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300",creative:"bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300",analytical:"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300"};function $({value:e,onChange:a,suggestions:s,placeholder:n="Model name..."}){let[d,l]=(0,r.useState)(!1),[o,i]=(0,r.useState)(""),c=(0,r.useRef)(null);(0,r.useEffect)(()=>{function e(e){c.current&&!c.current.contains(e.target)&&l(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let m=s.filter(t=>t.toLowerCase().includes((o||e).toLowerCase()));return(0,t.jsxs)("div",{ref:c,className:"relative flex-1",children:[(0,t.jsx)("input",{type:"text",value:e,placeholder:n,onChange:e=>{a(e.target.value),i(e.target.value),l(!0)},onFocus:()=>l(!0),className:"w-full h-8 px-2.5 text-[12px] rounded-md border border-[var(--card-border)] bg-[var(--background)] text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:border-[var(--foreground)]/40 transition-colors"}),d&&m.length>0&&(0,t.jsx)("div",{className:"absolute z-50 top-full left-0 right-0 mt-1 max-h-[160px] overflow-y-auto rounded-md border border-[var(--card-border)] bg-[var(--background)] shadow-lg",children:m.map(r=>(0,t.jsx)("button",{type:"button",onClick:()=>{a(r),i(""),l(!1)},className:`w-full text-left px-2.5 py-1.5 text-[12px] transition-colors hover:bg-[var(--secondary)] ${r===e?"text-[var(--foreground)] font-medium":"text-[var(--muted-foreground)]"}`,children:r},r))})]})}function B({provider:e,model:r,onProviderChange:a,onModelChange:s,providers:n,label:d}){let l=M[e]??[];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[d&&(0,t.jsx)("span",{className:"text-[11px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:d}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("select",{value:e,onChange:e=>{a(e.target.value),s("")},className:"h-8 px-2 text-[12px] rounded-md border border-[var(--card-border)] bg-[var(--background)] text-[var(--foreground)] focus:outline-none focus:border-[var(--foreground)]/40 transition-colors appearance-none cursor-pointer pr-6",style:{backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 6px center"},children:[(0,t.jsx)("option",{value:"",children:"Provider..."}),n.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,t.jsx)($,{value:r,onChange:s,suggestions:l,placeholder:e?"Select or type model...":"Select a provider first"})]})]})}function R({agent:e,override:a,teamProvider:s,teamModel:n,providers:d,onOverrideChange:l}){let o=E[e.style]??E.balanced,i=a&&(a.provider||a.model),[c,m]=(0,r.useState)(!!i);a?.provider;let u=a?.model||n||"";return(0,t.jsxs)("div",{className:"py-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-7 h-7 rounded-full bg-[var(--secondary)] flex items-center justify-center text-[12px] font-semibold text-[var(--foreground)]",children:e.name.charAt(0)}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-[13px] font-medium text-[var(--foreground)]",children:e.name}),(0,t.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-medium ${o}`,children:e.style}),i&&(0,t.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded font-medium bg-violet-100 dark:bg-violet-900/30 text-violet-700 dark:text-violet-300",children:"custom"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)] truncate",children:e.title}),(s||n)&&!i&&u&&(0,t.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] opacity-60 shrink-0",children:["(",u,")"]})]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{c?(l(e.id,void 0),m(!1)):m(!0)},className:"p-1 rounded hover:bg-[var(--background)] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",title:c?"Remove override":"Override provider/model",children:(0,t.jsx)(A.ChevronRight,{className:`w-3 h-3 transition-transform ${c?"rotate-90":""}`})})]}),c&&(0,t.jsx)("div",{className:"mt-1.5 ml-9",children:(0,t.jsx)(B,{provider:a?.provider||"",model:a?.model||"",onProviderChange:t=>l(e.id,{agentId:e.id,provider:t||void 0,model:a?.model}),onModelChange:t=>l(e.id,{agentId:e.id,provider:a?.provider,model:t||void 0}),providers:d})})]})}function U({template:e,isSelected:r,onSelect:a}){return(0,t.jsxs)("button",{type:"button",onClick:()=>a(e),className:`w-full text-left p-4 rounded-lg border transition-all ${r?"border-[var(--foreground)] bg-[var(--secondary)]":"border-[var(--card-border)] hover:border-[var(--foreground)]/30 hover:bg-[var(--secondary)]/50"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-lg",children:e.icon}),(0,t.jsx)("span",{className:"text-[14px] font-semibold text-[var(--foreground)]",children:e.name})]}),r&&(0,t.jsx)("div",{className:"w-5 h-5 rounded-full bg-[var(--foreground)] flex items-center justify-center",children:(0,t.jsx)(d.Check,{className:"w-3 h-3 text-[var(--background)]"})})]}),(0,t.jsx)("p",{className:"mt-1 text-[12px] text-[var(--muted-foreground)]",children:e.description}),(0,t.jsxs)("p",{className:"mt-2 text-[11px] text-[var(--muted-foreground)]",children:[e.agents.length," agent",1!==e.agents.length?"s":"",e.variants&&e.variants.length>0?` \xb7 ${e.variants.length} variants`:""]})]})}function z({selectedTeams:e,onChange:a,onNext:s,onBack:n}){let d=(0,O.listTeamTemplates)(),{providers:l}=function(){let[e,t]=(0,r.useState)(T),[a,s]=(0,r.useState)(!0);(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{let r=await fetch("/api/providers"),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a?.error||`HTTP ${r.status}`);let s=(Array.isArray(a?.providers)?a.providers:[]).filter(e=>e&&"string"==typeof e.id&&"string"==typeof e.label&&!1!==e.installed).map(e=>({id:e.id,label:e.label}));!e&&s.length>0&&t(s)}catch{}finally{e||s(!1)}})(),()=>{e=!0}},[]);let n=(0,r.useMemo)(()=>e.map(e=>e.id),[e]);return{providers:e,providerIds:n,loading:a}}(),[o,i]=(0,r.useState)(null),[c,m]=(0,r.useState)({}),u=(0,r.useCallback)(t=>e.some(e=>e.templateId===t),[e]),x=(0,r.useCallback)(t=>{if(u(t.id)){a(e.filter(e=>e.templateId!==t.id)),i(null);return}t.variants&&t.variants.length>0?i(o===t.id?null:t.id):a([...e,{templateId:t.id,name:t.name,agents:t.agents}])},[e,a,o,u]),h=(0,r.useCallback)((t,r)=>{m(e=>({...e,[t]:r.id})),a([...e.filter(e=>e.templateId!==t),{templateId:t,variantId:r.id,name:r.name,agents:r.agents}]),i(null)},[e,a]),g=(0,r.useCallback)(t=>{a(e.filter(e=>e.templateId!==t))},[e,a]),f=(0,r.useCallback)((t,r)=>{a(e.map(e=>e.templateId===t?{...e,provider:r||void 0}:e))},[e,a]),v=(0,r.useCallback)((t,r)=>{a(e.map(e=>e.templateId===t?{...e,model:r||void 0}:e))},[e,a]),b=(0,r.useCallback)((t,r,s)=>{a(e.map(e=>{if(e.templateId!==t)return e;let a=(e.agentOverrides??[]).filter(e=>e.agentId!==r);return s&&(s.provider||s.model)&&a.push(s),{...e,agentOverrides:a.length>0?a:void 0}}))},[e,a]);return(0,t.jsxs)(p,{currentStep:4,totalSteps:4,footer:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("button",{type:"button",onClick:n,className:"text-[14px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Back"}),(0,t.jsx)("button",{type:"button",onClick:s,className:"inline-flex items-center gap-2 px-6 py-2.5 bg-[var(--foreground)] text-[var(--background)] text-[14px] font-semibold rounded-lg hover:opacity-90 transition-all",children:e.length>0?"Create Project":"Skip & Create Project"})]}),children:[(0,t.jsxs)("div",{className:"text-center mb-8",children:[(0,t.jsx)("h1",{className:"text-[24px] font-bold text-[var(--foreground)] tracking-tight",children:"Add Teams"}),(0,t.jsx)("p",{className:"mt-2 text-[14px] text-[var(--muted-foreground)]",children:"Pick team templates to populate your project with agents. You can customize them later."})]}),e.length>0&&(0,t.jsx)("div",{className:"mb-6 space-y-2",children:e.map(e=>(0,t.jsxs)("div",{className:"border border-[var(--foreground)]/20 bg-[var(--secondary)] rounded-lg p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(L.Users,{className:"w-4 h-4 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold text-[var(--foreground)]",children:e.name}),(0,t.jsxs)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:[e.agents.length," agents"]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>g(e.templateId),className:"p-1 rounded hover:bg-[var(--background)] text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:(0,t.jsx)(S.X,{className:"w-3.5 h-3.5"})})]}),(0,t.jsx)("div",{className:"pl-6 mb-2",children:(0,t.jsx)(B,{provider:e.provider||"",model:e.model||"",onProviderChange:t=>f(e.templateId,t),onModelChange:t=>v(e.templateId,t),providers:l,label:"Default provider & model"})}),(0,t.jsx)("div",{className:"pl-6 space-y-0.5",children:e.agents.map(r=>(0,t.jsx)(R,{agent:r,override:e.agentOverrides?.find(e=>e.agentId===r.id),teamProvider:e.provider,teamModel:e.model,providers:l,onOverrideChange:(t,r)=>b(e.templateId,t,r)},r.id))})]},e.templateId))}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3",children:d.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsx)(U,{template:e,isSelected:u(e.id),onSelect:x}),o===e.id&&e.variants&&e.variants.length>0&&(0,t.jsx)("div",{className:"mt-2 ml-2 border-l-2 border-[var(--border)] pl-3 space-y-1",children:e.variants.map(r=>(0,t.jsxs)("button",{type:"button",onClick:()=>h(e.id,r),className:`w-full text-left px-3 py-2 rounded-md text-[13px] transition-colors ${c[e.id]===r.id?"bg-[var(--secondary)] font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--secondary)]/50 hover:text-[var(--foreground)]"}`,children:[r.name,(0,t.jsxs)("span",{className:"ml-2 text-[11px] text-[var(--muted-foreground)]",children:[r.agents.length," agents"]})]},r.id))})]},e.id))})]})}var G=e.i(741746);e.s(["default",0,function(){let e=function(){let[e,t]=(0,r.useState)("checking"),[n,d]=(0,r.useState)(s.map(e=>({...e,installed:null,authenticated:null})));(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{let r=await fetch("/api/providers",{cache:"no-store"});if(e)return;if(!r.ok)return void t("error");let n=await r.json(),l=Array.isArray(n?.providers)?n.providers:[],o=s.map(e=>{let t=l.find(t=>t?.id===e.id);return{...e,installed:t?.installed??!1,authenticated:t?.authenticated??!1}});e||(d(o),t(o.some(e=>"ready"===a(e))?"ready":"needs-setup"))}catch{e||t("error")}})(),()=>{e=!0}},[]);let l=(0,r.useCallback)(e=>{d(r=>{let s=r.map(t=>t.id===e?{...t,authenticated:!0}:t);return s.some(e=>"ready"===a(e))&&t("ready"),s})},[]),o=(0,r.useMemo)(()=>n.filter(e=>"needs-auth"===a(e)).map(e=>e.id),[n]),i=o.join(",");(0,r.useEffect)(()=>{if("checking"===e||0===o.length)return;let t=new AbortController,r=new Map;return o.forEach(function e(a){if(t.signal.aborted)return;let s=setTimeout(async()=>{if(!t.signal.aborted){try{let e=await fetch(`/api/providers/check/${a}`,{cache:"no-store",signal:t.signal});if(t.signal.aborted)return;if(e.ok){let t=await e.json();if(t.authenticated)return void l(a);if(!t.installed)return void d(e=>e.map(e=>e.id===a?{...e,installed:!1,authenticated:!1}:e))}}catch{if(t.signal.aborted)return}t.signal.aborted||e(a)}},5e3);r.set(a,s)}),()=>{t.abort(),r.forEach(e=>clearTimeout(e))}},[e,i,l]);let c=n.filter(e=>"ready"===a(e)).length;return{readyState:e,clis:n,authenticatedCount:c,totalCount:n.length,handleVerifySuccess:l}}(),d=function(){let e=(0,n.useRouter)(),[t,a]=(0,r.useState)(1),[s,d]=(0,r.useState)({name:"",description:"",folders:[]}),[l,o]=(0,r.useState)([]),[i,c]=(0,r.useState)(!1),[m,u]=(0,r.useState)(null),x=(0,r.useCallback)(()=>{a(e=>Math.min(e+1,4))},[]),p=(0,r.useCallback)(()=>{a(e=>Math.max(e-1,1))},[]),h=(0,r.useCallback)(async()=>{c(!0),u(null);try{let t=s.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"project",r=s.folders.map(e=>({name:e.name,path:e.path})),a=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,description:s.description||void 0,repos:r})});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||"Failed to create project")}let{project:n}=await a.json(),d=n.id;for(let e of l){let t=e.agents.map(t=>{let r=e.agentOverrides?.find(e=>e.agentId===t.id);return{roleId:t.id,provider:r?.provider||e.provider||void 0,model:r?.model||e.model||void 0}}),r=t.some(e=>e.provider||e.model);await fetch(`/api/projects/${d}/teams`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({templateId:e.templateId,variantId:e.variantId,name:e.name,...r?{agents:t}:{}})})}e.push(`/projects/${n.slug||t}`)}catch(e){u(e instanceof Error?e.message:"Setup failed")}finally{c(!1)}},[s,l,e]);return{step:t,project:s,teams:l,completing:i,error:m,setProject:d,setTeams:o,goNext:x,goBack:p,complete:h}}();return d.completing?(0,t.jsxs)("div",{className:"h-screen w-full flex flex-col items-center justify-center gap-4 bg-[var(--background)]",children:[(0,t.jsx)(u.Loader2,{className:"w-8 h-8 animate-spin text-[var(--muted-foreground)]"}),(0,t.jsx)("p",{className:"text-[14px] text-[var(--muted-foreground)]",children:"Creating your project..."})]}):(0,t.jsxs)(t.Fragment,{children:[d.error&&(0,t.jsxs)("div",{className:"fixed top-4 left-1/2 -translate-x-1/2 z-50 inline-flex items-center gap-2 rounded-lg border border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950 px-4 py-2 text-[13px] text-red-800 dark:text-red-200 shadow-lg",children:[(0,t.jsx)(G.AlertCircle,{className:"h-4 w-4 shrink-0"}),d.error]}),1===d.step&&(0,t.jsx)(f,{clis:e.clis,readyState:e.readyState,authenticatedCount:e.authenticatedCount,totalCount:e.totalCount,onVerifySuccess:e.handleVerifySuccess,onNext:d.goNext}),2===d.step&&(0,t.jsx)(y,{onNext:d.goNext,onBack:d.goBack}),3===d.step&&(0,t.jsx)(P,{data:d.project,onChange:d.setProject,onNext:d.goNext,onBack:d.goBack}),4===d.step&&(0,t.jsx)(z,{selectedTeams:d.teams,onChange:d.setTeams,onNext:d.complete,onBack:d.goBack})]})}],318634)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,794731,e=>{"use strict";let t=(0,e.i(363732).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",0,t],794731)},640481,e=>{"use strict";let t=(0,e.i(363732).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],640481)},367859,e=>{"use strict";let t=(0,e.i(363732).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],367859)},958164,e=>{"use strict";let t=(0,e.i(363732).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],958164)},780004,e=>{"use strict";let t="obra/superpowers",n="vercel/next-skills";function i(e,t,n){return n?{repo:e,skillId:t,condition:n}:{repo:e,skillId:t}}function a(e){return e.condition?{...e}:{repo:e.repo,skillId:e.skillId}}function r(e){let t={...e};return t.extraSkills&&(t.extraSkills=t.extraSkills.map(a)),t}function s(e){return{...e,agents:e.agents.map(r)}}function l(e){let t={...e,agents:e.agents.map(r)};return t.variants&&(t.variants=t.variants.map(s)),t}let o={"strategist-lead":[i(t,"brainstorming"),i(t,"writing-plans"),i(t,"dispatching-parallel-agents"),i(t,"requesting-code-review"),i(t,"verification-before-completion")],"senior-builder":[i(t,"test-driven-development"),i(t,"systematic-debugging"),i(t,"subagent-driven-development"),i(t,"requesting-code-review"),i(t,"verification-before-completion"),i(t,"finishing-a-development-branch")],builder:[i(t,"test-driven-development"),i(t,"systematic-debugging"),i(t,"verification-before-completion"),i(t,"finishing-a-development-branch")],planner:[i(t,"brainstorming"),i(t,"writing-plans"),i(t,"verification-before-completion")],researcher:[i(t,"brainstorming"),i(t,"writing-plans"),i(t,"systematic-debugging"),i(t,"verification-before-completion")],reviewer:[i(t,"systematic-debugging"),i(t,"test-driven-development"),i(t,"requesting-code-review"),i(t,"verification-before-completion")]},d=["strategist-lead","senior-builder","builder","planner","researcher","reviewer"].map(e=>({id:e,skills:o[e].map(a)})),c=[i(n,"api-routes","next.js app router, route handlers, api endpoints"),i(n,"nextjs-patterns","next.js app structure, routing, layouts, data fetching"),i(n,"react-server-components","react server components, server client boundaries, next.js rendering")],m={"team-lead":{name:"Team Lead",title:"Team Lead",style:"balanced",skillProfileId:"strategist-lead",identity:"Own technical direction, break ambiguous work into executable plans, and keep the squad aligned on delivery."},"fullstack-engineer":{name:"Fullstack Engineer",title:"Senior Fullstack Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Ship features end-to-end across frontend and backend with pragmatic tradeoffs and clean boundaries.",extraSkills:c},"backend-engineer":{name:"Backend Engineer",title:"Senior Backend Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Own backend contracts, data integrity, and safe delivery under real production constraints."},"frontend-engineer":{name:"Frontend Engineer",title:"Senior Frontend Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Own product-facing UI quality, interaction design fidelity, and maintainable front-end architecture.",extraSkills:c},"data-engineer":{name:"Data Engineer",title:"Data Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Build reliable data pipelines, schemas, and transformations with a bias toward traceability."},"ml-engineer":{name:"ML Engineer",title:"ML Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Ship model-backed systems pragmatically, with evaluation, rollback paths, and tight production feedback."},"devops-engineer":{name:"DevOps Engineer",title:"DevOps Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Own delivery automation, deployment safety, and infrastructure changes that must fail predictably."},"security-engineer":{name:"Security Engineer",title:"Security Engineer",style:"conservative",skillProfileId:"senior-builder",identity:"Harden trust boundaries, implement secure defaults, and turn vague risk into concrete engineering requirements."},"ui-designer":{name:"UI Designer",title:"UI Designer",style:"specialist",skillProfileId:"builder",identity:"Refine interfaces into consistent, high-signal UI systems that are practical to build and maintain.",extraSkills:[i(n,"nextjs-patterns","next.js ui flows, routing, layouts, app router"),i(n,"react-server-components","react server components, server client boundaries, data fetching placement")]},"qa-engineer":{name:"QA Engineer",title:"QA Engineer",style:"conservative",skillProfileId:"reviewer",identity:"Find regressions early, tighten acceptance boundaries, and force evidence before release claims."},sre:{name:"SRE",title:"Site Reliability Engineer",style:"conservative",skillProfileId:"reviewer",identity:"Guard uptime, incident readiness, and operational correctness by challenging risky assumptions early."},"pen-tester":{name:"Pen Tester",title:"Penetration Tester",style:"specialist",skillProfileId:"reviewer",identity:"Probe the system as an adversary, find exploit paths, and make the attack surface legible to builders."},"product-manager":{name:"Product Manager",title:"Product Manager",style:"balanced",skillProfileId:"planner",identity:"Turn ambiguous requests into scoped bets, crisp plans, and explicit tradeoffs the team can execute."},"ux-designer":{name:"UX Designer",title:"UX Designer",style:"balanced",skillProfileId:"planner",identity:"Clarify user intent, reduce friction in flows, and turn product goals into coherent interaction design."},"technical-writer":{name:"Technical Writer",title:"Technical Writer",style:"balanced",skillProfileId:"planner",identity:"Turn complex implementation detail into clear docs, rollout notes, and operational guidance."},"growth-marketer":{name:"Growth Marketer",title:"Growth Marketer",style:"balanced",skillProfileId:"strategist-lead",identity:"Design growth experiments with clear hypotheses, sequencing, and measurable outcomes."},analyst:{name:"Analyst",title:"Product Analyst",style:"specialist",skillProfileId:"researcher",identity:"Ground decisions in evidence, identify gaps in the brief, and surface the signal behind user behavior."},"content-writer":{name:"Content Writer",title:"Content Strategist",style:"balanced",skillProfileId:"researcher",identity:"Translate product and audience insight into clear narratives, launch copy, and feedback loops."},researcher:{name:"Researcher",title:"Researcher",style:"balanced",skillProfileId:"researcher",identity:"Map fast-changing domains, synthesize evidence, and surface the governing model behind decisions."},"marketing-strategist":{name:"Marketing Strategist",title:"Marketing Strategist",style:"balanced",skillProfileId:"strategist-lead",identity:"Own brand positioning, campaign strategy, and channel mix with measurable conversion targets."},copywriter:{name:"Copywriter",title:"Copywriter",style:"balanced",skillProfileId:"researcher",identity:"Craft clear, persuasive copy that serves both the reader and the business goal."},"support-engineer":{name:"Support Engineer",title:"Support Engineer",style:"balanced",skillProfileId:"builder",identity:"Diagnose customer issues fast, escalate with precision, and turn patterns into preventive fixes."},"support-lead":{name:"Support Lead",title:"Support Lead",style:"balanced",skillProfileId:"planner",identity:"Triage incoming issues, route to the right responder, and track resolution quality."},"devrel-engineer":{name:"DevRel Engineer",title:"Developer Relations Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Build sample apps, integrations, and tooling that make the platform easy to adopt."},"community-manager":{name:"Community Manager",title:"Community Manager",style:"balanced",skillProfileId:"planner",identity:"Grow and engage the developer community through events, content, and feedback loops."},"ops-engineer":{name:"Ops Engineer",title:"Operations Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Automate operational workflows, reduce toil, and keep internal tooling reliable."},"project-manager":{name:"Project Manager",title:"Project Manager",style:"balanced",skillProfileId:"planner",identity:"Track milestones, remove blockers, and keep cross-team delivery on schedule."},"solutions-architect":{name:"Solutions Architect",title:"Solutions Architect",style:"balanced",skillProfileId:"strategist-lead",identity:"Design system-level architectures, evaluate tradeoffs, and guide teams through technical decisions."},"mobile-engineer":{name:"Mobile Engineer",title:"Senior Mobile Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Ship native and cross-platform mobile experiences with attention to performance and platform conventions."}},u=["team-lead","fullstack-engineer","backend-engineer","frontend-engineer","qa-engineer","product-manager","analyst","growth-marketer","content-writer","data-engineer","ml-engineer","ux-designer","ui-designer","devops-engineer","sre","security-engineer","pen-tester","researcher","technical-writer","marketing-strategist","copywriter","support-engineer","support-lead","devrel-engineer","community-manager","ops-engineer","project-manager","solutions-architect","mobile-engineer"].map(e=>r({id:e,...m[e]}));function g(e){return r({id:e,...m[e]})}let p=[{id:"engineering",name:"Engineering",description:"Software engineering teams across all domains — pick a specialization or build your own.",icon:"hammer",agents:[g("team-lead"),g("backend-engineer"),g("frontend-engineer"),g("fullstack-engineer"),g("qa-engineer")],variants:[{id:"general",name:"General",description:"Product engineering with leadership, builders across the stack, and quality gates.",agents:[g("team-lead"),g("backend-engineer"),g("frontend-engineer"),g("fullstack-engineer"),g("qa-engineer")]},{id:"ai",name:"AI",description:"Applied AI and ML engineering for models, evaluation, and production inference.",agents:[g("team-lead"),g("ml-engineer"),g("data-engineer"),g("researcher"),g("qa-engineer")]},{id:"data",name:"Data",description:"Data platform engineering for pipelines, warehousing, and transformation reliability.",agents:[g("team-lead"),g("data-engineer"),g("qa-engineer")]},{id:"mobile",name:"Mobile",description:"Native and cross-platform mobile engineering with fullstack support.",agents:[g("team-lead"),g("mobile-engineer"),g("fullstack-engineer"),g("qa-engineer")]},{id:"infra",name:"Infrastructure",description:"Platform reliability for delivery pipelines, runtime stability, and operational safety.",agents:[g("team-lead"),g("devops-engineer"),g("sre")]},{id:"security",name:"Security",description:"Security engineering for secure defaults, hardening, and adversarial validation.",agents:[g("team-lead"),g("security-engineer"),g("pen-tester")]},{id:"solutions",name:"Solutions",description:"Architecture and integration work across systems and customer deployments.",agents:[g("team-lead"),g("solutions-architect"),g("backend-engineer"),g("devops-engineer")]}]},{id:"product",name:"Product",description:"Discovery and prioritization for product direction, scope, and validation.",icon:"clipboard-list",agents:[g("team-lead"),g("product-manager"),g("analyst")]},{id:"design",name:"Design",description:"UX and UI pairing for flows, interaction models, and polished product surfaces.",icon:"palette",agents:[g("team-lead"),g("ux-designer"),g("ui-designer")]},{id:"growth",name:"Growth",description:"Experiment and content team for acquisition, activation, and learning loops.",icon:"megaphone",agents:[g("team-lead"),g("growth-marketer"),g("content-writer")]},{id:"research",name:"Research",description:"Research and synthesis pair for investigations, briefs, and decision support.",icon:"flask-conical",agents:[g("team-lead"),g("researcher"),g("technical-writer")]},{id:"marketing",name:"Marketing",description:"Brand strategy, campaign execution, and content production.",icon:"megaphone",agents:[g("team-lead"),g("marketing-strategist"),g("copywriter"),g("content-writer")]},{id:"support",name:"Support",description:"Customer-facing support with triage, diagnosis, and escalation.",icon:"life-buoy",agents:[g("team-lead"),g("support-lead"),g("support-engineer")]},{id:"devrel",name:"Developer Relations",description:"Developer advocacy through tooling, content, and community engagement.",icon:"users",agents:[g("team-lead"),g("devrel-engineer"),g("community-manager"),g("technical-writer")]},{id:"operations",name:"Operations",description:"Internal tooling, project delivery, and cross-team coordination.",icon:"settings",agents:[g("team-lead"),g("project-manager"),g("ops-engineer")]}].map(l),h=new Map(d.map(e=>[e.id,e])),f=new Map(u.map(e=>[e.id,e]));p.map(e=>[e.id,e]),e.s(["getAgentPresetBindings",0,function(e){let t,n="string"==typeof e?function(e){if(!e)return null;let t=f.get(e);return t?r(t):null}(e):e;return n?[...(t=function(e){if(!e)return null;let t=h.get(e);return t?{id:t.id,skills:t.skills.map(a)}:null}(n.skillProfileId))?t.skills:[],...n.extraSkills?n.extraSkills.map(a):[]]:[]},"listAgentPresets",0,function(){return u.map(r)},"listTeamTemplates",0,function(){return p.map(l)}])},10229,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(174080),a=e.i(618566),r=e.i(367859),s=e.i(812549),l=e.i(906724),o=e.i(640481),d=e.i(929870),c=e.i(794731),m=e.i(572665),u=e.i(797167),g=e.i(997626),p=e.i(958164),h=e.i(524123),f=e.i(780004),x=e.i(378764),y=e.i(884564);e.s(["default",0,function({params:e}){let{slug:v,teamId:b}=(0,n.use)(e),k=(0,a.useRouter)(),{projects:w}=(0,h.useProjectsWithAgents)(),j=w.find(e=>e.slug===v),[N,P]=(0,n.useState)(null),[S,C]=(0,n.useState)([]),[E,I]=(0,n.useState)(!0),[T,M]=(0,n.useState)(null),[A,D]=(0,n.useState)(!1),[$,_]=(0,n.useState)(""),[O,R]=(0,n.useState)(!1),q=(0,n.useRef)(null),[L,U]=(0,n.useState)(!1),[F,B]=(0,n.useState)(!1),[G,J]=(0,n.useState)(null),[z,K]=(0,n.useState)(!1),[H,W]=(0,n.useState)("existing"),[X,Q]=(0,n.useState)(null),[V,Z]=(0,n.useState)(null),[Y,ee]=(0,n.useState)(!1),[et,en]=(0,n.useState)(null),[ei,ea]=(0,n.useState)(null),er=(0,n.useCallback)(async()=>{if(j){I(!0),M(null);try{let e=await fetch(`/api/projects/${j.id}/teams/${b}`);if(!e.ok)throw Error(`Failed to load team (${e.status})`);let t=await e.json();P(t.team),_(t.team.name)}catch(e){M(e instanceof Error?e.message:"Unknown error")}finally{I(!1)}}},[j,b]),es=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/participants");if(!e.ok)return;let t=await e.json();C(Array.isArray(t)?t:t.participants??[])}catch{}},[]);(0,n.useEffect)(()=>{er(),es()},[er,es]);let[el,eo]=(0,n.useState)(null);(0,n.useEffect)(()=>{eo(document.getElementById("topbar-breadcrumb"))},[]),(0,n.useEffect)(()=>{A&&q.current&&(q.current.focus(),q.current.select())},[A]);let ed=(0,n.useMemo)(()=>new Map(S.map(e=>[e.id,e])),[S]),ec=(0,n.useMemo)(()=>(0,f.listAgentPresets)(),[]),em=(0,n.useMemo)(()=>ec.map(e=>({id:e.id,label:e.name,meta:e.skillProfileId})),[ec]),eu=(0,n.useMemo)(()=>ec.map(e=>({id:e.id,label:e.name,meta:e.skillProfileId})),[ec]),eg=(0,n.useMemo)(()=>new Set(N?.agents.map(e=>e.agent_id)??[]),[N]),ep=(0,n.useMemo)(()=>j?j.agents.filter(e=>!eg.has(e.agent_id)).map(e=>{let t=ed.get(e.agent_id);return{id:e.agent_id,name:t?.name??e.agent_id.slice(0,8),provider:t?.provider??"claude",model:t?.model??null,color:t?.color??"#6B7280"}}):[],[j,eg,ed]),eh=(0,n.useMemo)(()=>ep.map(e=>({id:e.id,label:e.name,meta:e.provider})),[ep]);async function ef(){if(!N||!j||$.trim()===N.name)return void D(!1);if(!$.trim()){_(N.name),D(!1);return}R(!0);try{if(!(await fetch(`/api/projects/${j.id}/teams/${b}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:$.trim()})})).ok)throw Error("Failed to update team name");P(e=>e?{...e,name:$.trim()}:e)}catch{N&&_(N.name)}finally{R(!1),D(!1)}}async function ex(e){if(j){J(e);try{if(!(await fetch(`/api/projects/${j.id}/teams/${b}/agents?agentId=${encodeURIComponent(e)}`,{method:"DELETE"})).ok)throw Error("Failed to remove agent");P(t=>t?{...t,agents:t.agents.filter(t=>t.agent_id!==e)}:t)}catch{}finally{J(null)}}}async function ey(){if(j){B(!0);try{if(!(await fetch(`/api/projects/${j.id}/teams/${b}`,{method:"DELETE"})).ok)throw Error("Failed to delete team");k.push(`/projects/${v}/teams`)}catch{B(!1),U(!1)}}}async function ev(){if(j&&V){ee(!0);try{if(!(await fetch(`/api/projects/${j.id}/teams/${b}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:V,roleKey:"member"})})).ok)throw Error("Failed to add agent");Z(null),K(!1),await er()}catch{}finally{ee(!1)}}}async function eb(){if(j&&X){ee(!0);try{let e=ec.find(e=>e.id===X);if(!e)return;let t=(0,f.getAgentPresetBindings)(e),n=await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,provider:"claude",model:null,identity:"",skills:t.map(e=>({file:`${e.repo}/${e.skillId}`,...e.condition?{condition:e.condition}:{}}))})});if(!n.ok)throw Error("Failed to create agent");let i=await n.json(),a=i.id??i.participant?.id;await fetch(`/api/projects/${j.id}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:a})}),await fetch(`/api/projects/${j.id}/teams/${b}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:a,roleKey:e.id})}),Q(null),K(!1),await Promise.all([er(),es()])}catch{}finally{ee(!1)}}}if(!j||E)return(0,t.jsxs)("div",{className:"flex items-center justify-center h-full text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)(l.Loader2,{className:"w-5 h-5 animate-spin mr-2"}),"Loading team..."]});if(T||!N)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-3 text-[var(--muted-foreground)]",children:[(0,t.jsx)(p.AlertTriangle,{className:"w-5 h-5 text-[var(--destructive)]"}),(0,t.jsx)("p",{className:"text-sm text-[var(--destructive)]",children:T??"Team not found"}),(0,t.jsx)("button",{onClick:er,className:"text-xs underline hover:text-[var(--foreground)]",children:"Retry"})]});let ek=N.metadata?.variantId;return(0,t.jsxs)("div",{className:"h-full overflow-y-auto",children:[el&&(0,i.createPortal)((0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:"\\"}),(0,t.jsx)("span",{className:"text-xs text-[var(--foreground)]",children:N.name})]}),el),(0,t.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-8 space-y-8",children:[(0,t.jsx)("div",{className:"flex items-start justify-between gap-4",children:(0,t.jsxs)("div",{className:"min-w-0",children:[A?(0,t.jsx)("input",{ref:q,value:$,onChange:e=>_(e.target.value),onBlur:ef,onKeyDown:e=>{"Enter"===e.key&&ef(),"Escape"===e.key&&(_(N.name),D(!1))},disabled:O,className:"input text-lg font-bold w-full"}):(0,t.jsxs)("button",{onClick:()=>D(!0),className:"flex items-center gap-2 group text-left",children:[(0,t.jsx)("h1",{className:"text-lg font-bold truncate",children:N.name}),(0,t.jsx)(o.Pencil,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[N.template_id&&(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wider px-2 py-0.5 rounded-full bg-[var(--muted)] text-[var(--muted-foreground)] border border-[var(--border)]",children:N.template_id}),ek&&(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase tracking-wider px-2 py-0.5 rounded-full bg-[var(--muted)] text-[var(--muted-foreground)] border border-[var(--border)]",children:ek}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[N.agents.length," agent",1!==N.agents.length?"s":""]})]})]})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsxs)("h2",{className:"text-xs font-medium text-[var(--muted-foreground)] uppercase tracking-wider",children:["Agents (",N.agents.length,")"]}),(0,t.jsxs)("button",{onClick:()=>{K(!z),W("existing"),Z(null),Q(null)},className:"flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded-xl border border-[var(--border)] hover:bg-[var(--muted)]/50 transition-colors",children:[(0,t.jsx)(d.Plus,{className:"w-3.5 h-3.5"}),"Add Agent"]})]}),z&&(0,t.jsxs)("div",{className:"mb-4 p-4 rounded-2xl space-y-4",style:{background:"var(--muted)",border:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:()=>W("existing"),className:`text-xs font-medium px-3 py-1.5 rounded-lg transition-colors ${"existing"===H?"bg-[var(--primary)] text-white":"bg-[var(--card-bg)] border border-[var(--border)] text-[var(--muted-foreground)]"}`,children:"Existing Agent"}),(0,t.jsx)("button",{onClick:()=>W("preset"),className:`text-xs font-medium px-3 py-1.5 rounded-lg transition-colors ${"preset"===H?"bg-[var(--primary)] text-white":"bg-[var(--card-bg)] border border-[var(--border)] text-[var(--muted-foreground)]"}`,children:"From Preset"})]}),"existing"===H?(0,t.jsxs)("div",{className:"space-y-3",children:[0===eh.length?(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)]",children:"No unassigned agents in this project."}):(0,t.jsx)(x.default,{options:eh,value:V,onChange:Z,placeholder:"Select an agent..."}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{onClick:ev,disabled:!V||Y,className:"btn-primary px-4 py-1.5 text-xs flex items-center gap-1.5",children:[Y?(0,t.jsx)(l.Loader2,{className:"w-3.5 h-3.5 animate-spin"}):(0,t.jsx)(d.Plus,{className:"w-3.5 h-3.5"}),"Add"]}),(0,t.jsx)("button",{onClick:()=>K(!1),className:"text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:"Cancel"})]})]}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(x.default,{options:em,value:X,onChange:Q,placeholder:"Select a role preset..."}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{onClick:eb,disabled:!X||Y,className:"btn-primary px-4 py-1.5 text-xs flex items-center gap-1.5",children:[Y?(0,t.jsx)(l.Loader2,{className:"w-3.5 h-3.5 animate-spin"}):(0,t.jsx)(d.Plus,{className:"w-3.5 h-3.5"}),"Create & Add"]}),(0,t.jsx)("button",{onClick:()=>K(!1),className:"text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:"Cancel"})]})]})]}),0===N.agents.length?(0,t.jsxs)("div",{className:"rounded-2xl p-8 text-center",style:{background:"var(--muted)",border:"1px solid var(--border)"},children:[(0,t.jsx)(m.Users,{className:"w-8 h-8 mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No agents in this team yet"})]}):(0,t.jsx)("div",{className:"space-y-2",children:N.agents.sort((e,t)=>e.routing_order-t.routing_order).map(e=>{let n=ed.get(e.agent_id),i=n?.name??e.agent_id.slice(0,8),a=n?.color??"#6B7280",d=n?.provider??"claude",c=n?.model??null,m=n?.skills?.length??0;return(0,t.jsx)("div",{className:"group rounded-2xl p-4 transition-colors hover:bg-[var(--muted)]/60 cursor-pointer",style:{background:"var(--card-bg)",border:"1px solid var(--border)"},onClick:()=>k.push(`/projects/${v}/teams/${b}/agents/${e.agent_id}`),children:(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("img",{src:(0,y.agentAvatarUrl)(e.agent_id,40,a),alt:i,className:"w-10 h-10 rounded-xl flex-shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium truncate",children:i}),(0,t.jsxs)("span",{className:"text-[10px] font-mono text-[var(--muted-foreground)]",children:["#",e.routing_order]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[et===e.agent_id?(0,t.jsx)("div",{className:"w-36",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(x.default,{options:eu,value:e.role_key,onChange:async t=>{j&&(await fetch(`/api/projects/${j.id}/teams/${b}/agents?agentId=${encodeURIComponent(e.agent_id)}`,{method:"DELETE"}),await fetch(`/api/projects/${j.id}/teams/${b}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e.agent_id,roleKey:t,routingOrder:e.routing_order})}),en(null),await er())},placeholder:"Role..."})}):(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),en(e.agent_id)},className:"text-[10px] px-1.5 py-0.5 rounded-md bg-[var(--muted)] text-[var(--muted-foreground)] border border-[var(--border)] hover:border-[var(--primary)] transition-colors",title:"Click to change role",children:e.role_key}),(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-[var(--muted-foreground)]",children:[(0,t.jsx)(s.Cpu,{className:"w-3 h-3"}),d,c&&(0,t.jsxs)("span",{className:"font-mono",children:["/ ",c]})]}),m>0&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-[var(--muted-foreground)]",children:[(0,t.jsx)(g.Zap,{className:"w-3 h-3"}),m]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("button",{onClick:()=>ea(e.agent_id),className:"p-1.5 rounded-lg hover:bg-[var(--muted)] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",title:"Edit agent",children:(0,t.jsx)(o.Pencil,{className:"w-3.5 h-3.5"})}),(0,t.jsx)("button",{onClick:()=>ex(e.agent_id),disabled:G===e.agent_id,className:"p-1.5 rounded-lg hover:bg-red-500/15 text-[var(--muted-foreground)] hover:text-red-400 transition-colors",title:"Remove from team",children:G===e.agent_id?(0,t.jsx)(l.Loader2,{className:"w-3.5 h-3.5 animate-spin"}):(0,t.jsx)(u.X,{className:"w-3.5 h-3.5"})})]}),(0,t.jsx)(r.ChevronRight,{className:"w-4 h-4 text-[var(--muted-foreground)] opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})},e.agent_id)})})]}),(0,t.jsxs)("div",{className:"pt-6 border-t",style:{borderColor:"var(--border)"},children:[(0,t.jsx)("h2",{className:"text-xs font-medium text-[var(--muted-foreground)] uppercase tracking-wider mb-3",children:"Danger Zone"}),L?(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4 rounded-2xl bg-red-500/5 border border-red-500/20",children:[(0,t.jsx)(p.AlertTriangle,{className:"w-4 h-4 text-red-400 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm text-red-400 flex-1",children:"Delete this team? This cannot be undone."}),(0,t.jsx)("button",{onClick:ey,disabled:F,className:"px-3 py-1.5 text-xs font-medium rounded-lg bg-red-600 hover:bg-red-700 text-white transition-colors disabled:opacity-50",children:F?"Deleting...":"Confirm Delete"}),(0,t.jsx)("button",{onClick:()=>U(!1),disabled:F,className:"px-3 py-1.5 text-xs rounded-lg border border-[var(--border)] hover:bg-[var(--muted)]/50 transition-colors",children:"Cancel"})]}):(0,t.jsxs)("button",{onClick:()=>U(!0),className:"flex items-center gap-2 text-xs text-[var(--muted-foreground)] hover:text-red-400 transition-colors",children:[(0,t.jsx)(c.Trash2,{className:"w-3.5 h-3.5"}),"Delete Team"]})]})]}),ei&&ed.get(ei)&&(0,t.jsx)(y.AgentForm,{title:"Edit agent",initial:{name:ed.get(ei).name,title:ed.get(ei).title||"",provider:ed.get(ei).provider,model:ed.get(ei).model||"",identity:ed.get(ei).identity||"",color:ed.get(ei).color,skills:ed.get(ei).skills||[]},agentId:ei,submitLabel:"Save",onSubmit:async e=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:ei,name:e.name,title:e.title||null,provider:e.provider,model:e.model,color:e.color,...e.identity?{identity:e.identity}:{},skills:e.skills??[]})}),ea(null),await es()},onCancel:()=>ea(null)})]})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,640481,e=>{"use strict";let t=(0,e.i(363732).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],640481)},958164,e=>{"use strict";let t=(0,e.i(363732).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["AlertTriangle",0,t],958164)},741746,e=>{"use strict";let t=(0,e.i(363732).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],741746)},367859,e=>{"use strict";let t=(0,e.i(363732).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",0,t],367859)},437307,e=>{"use strict";let t=(0,e.i(363732).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],437307)},794731,e=>{"use strict";let t=(0,e.i(363732).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",0,t],794731)},580873,e=>{"use strict";let t=(0,e.i(363732).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",0,t],580873)},203096,e=>{"use strict";let t=(0,e.i(363732).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],203096)},423709,e=>{"use strict";e.s(["stripMarkers",0,function(e){return e.replace(/\[reaction\s+[^\]]*\]/gi,"").replace(/\[agx:[^\]]*\]/g,"").replace(/\[checkpoint\]/g,"").replace(/\[criteria:\s*[^\]]*\]/g,"").replace(/\[done\]/g,"").replace(/\[blocked[^\]]*\]/g,"").replace(/^\[SKIP\]$/gm,"").trim()}])},990933,e=>{"use strict";function t(e){if("string"==typeof e)return e.trim()||void 0}e.s(["extractComposerRouting",0,function(e,r){let a=new Set,s=new Set;!function e(t,r){if(t)for(let a of t)r(a),e(a.content,r)}(e.content,e=>{if("participantMention"!==e.type)return;let t=e.attrs??{},r="string"==typeof t.id?t.id.trim():"",n="string"==typeof t.kind?t.kind:"agent";r&&"agent"===n&&(a.add(r),"parallel"===t.mode&&s.add(r))});let n=t(r);return{...n?{pinnedParticipantId:n}:{},mentionedParticipantIds:Array.from(a),parallelParticipantIds:Array.from(s)}},"orderParticipantIds",0,function(e,r){let a=function(e){if(!Array.isArray(e))return[];let t=new Set,r=[];for(let a of e){if("string"!=typeof a)continue;let e=a.trim();!e||t.has(e)||(t.add(e),r.push(e))}return r}(e),s=t(r);return s&&a.includes(s)?[s,...a.filter(e=>e!==s)]:a}])},66386,e=>{"use strict";var t=e.i(271645),r=e.i(618566);function a(e){return"string"!=typeof e?null:e.trim()||null}function s(e,t){return(e.get(t)?.trim()??"")||null}e.s(["useUrlSelection",0,function(){let e=(0,r.useRouter)(),n=(0,r.usePathname)(),i=(0,r.useSearchParams)(),l=(0,t.useCallback)(e=>s(i,e),[i]),c=(0,t.useCallback)((e,t)=>(function(e,t,r){let n=function(e,t){let r={...t},n=e=>Object.prototype.hasOwnProperty.call(t,e);if(n("issue")&&!n("run")){let n=s(e,"issue");a(t.issue)!==n&&(r.run=null)}if(n("job")&&!n("run")){let n=s(e,"job");a(t.job)!==n&&(r.run=null)}if(n("open")&&!n("message")){let n=s(e,"open");a(t.open)!==n&&(r.message=null)}return r}(t,r),i=new URLSearchParams(t.toString());for(let[e,t]of Object.entries(n)){let r=a(t);r?i.set(e,r):i.delete(e)}let l=i.toString();return l?`${e}?${l}`:e})(t??n,i,e),[n,i]),u=(0,t.useCallback)((t,r)=>{e.push(c(t,r))},[c,e]),o=(0,t.useCallback)((t,r)=>{e.replace(c(t,r))},[c,e]);return{pathname:n,searchParams:i,getSelection:l,buildHref:c,pushSelection:u,replaceSelection:o}}])},945028,490011,e=>{"use strict";var t=e.i(271645);function r(e){return`threadId=${encodeURIComponent(e)}`}function a(e){return`workspaceId=${encodeURIComponent(e)}`}e.s(["useGroupChat",0,function(e){let[s,n]=(0,t.useState)([]),[i,l]=(0,t.useState)([]),[c,u]=(0,t.useState)([]),o=(0,t.useRef)(e),d=(0,t.useRef)(e);o.current=e,d.current!==e&&(d.current=e,n([]),l([]),u([]));let p=(0,t.useCallback)(async e=>{let t=e?.trim()||o.current?.trim();if(!t){n([]),l([]);return}let s=r(t);try{let[e,r]=await Promise.all([fetch(`/api/history?${s}`),fetch(`/api/logs?${a(t)}`)]);if(o.current!==t)return;e.ok&&n(await e.json()),r.ok&&l(await r.json())}catch{}},[]),h=(0,t.useCallback)(async e=>{let t=e?.trim()||o.current?.trim();if(!t){n([]),l([]);return}let s=r(t);await Promise.all([fetch(`/api/history?${s}`,{method:"DELETE"}),fetch(`/api/logs?${a(t)}`,{method:"DELETE"})]),o.current===t&&(n([]),l([]))},[]),f=(0,t.useCallback)(async(e,t=10,r,a,s,i,l,c,d,p)=>{let h=r?.trim()||o.current?.trim();if(!h)return;let f=Date.now(),m=crypto.randomUUID(),y={id:m,role:"user",participantId:null,content:e,timestamp:f,rootMessageId:a||null,parentMessageId:a||null,depth:+!!a,...i&&i.length>0?{attachments:i}:{}};n(e=>[...e,y]);try{let r=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:h,prompt:e,promptPrefix:d||void 0,maxRounds:t,userMessageId:m,rootMessageId:a||void 0,attachmentIds:s?.length?s:void 0,activeParticipantIds:Array.isArray(l)?l:void 0,projectSlug:c?.trim()||void 0,routing:p})}),i=await r.json().catch(e=>(console.warn("[useGroupChat] failed to parse run response:",e),null));r.ok&&i?.chatRunId?u(e=>[{chatRunId:i.chatRunId,threadId:h,rootMessageId:a||m,status:"queued",optimistic:!0,enqueuedAt:Date.now()},...e.filter(e=>e.chatRunId!==i.chatRunId)]):r.ok||(console.error(`[useGroupChat] POST /api/chat failed (${r.status}):`,i?.error||r.statusText),n(e=>e.map(e=>e.id===m?{...e,sendFailed:!0}:e)))}catch(e){console.error("[useGroupChat] network error sending message:",e),n(e=>e.map(e=>e.id===m?{...e,sendFailed:!0}:e))}return m},[]),m=(0,t.useCallback)(async()=>{let e=o.current?.trim();if(e)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(e)}`,{method:"DELETE"})}catch{}},[]),y=(0,t.useCallback)(async e=>{let t=o.current?.trim();if(t)try{await fetch(`/api/processes?workspaceId=${encodeURIComponent(t)}&threadId=${encodeURIComponent(e)}`,{method:"DELETE"})}catch{}},[]);return{messages:s,setMessages:n,logs:i,sendMessage:f,loadHistory:p,clearHistory:h,clearLogs:(0,t.useCallback)(async e=>{let t=e?.trim()||o.current?.trim();t?(await fetch(`/api/logs?${a(t)}`,{method:"DELETE"}).catch(e=>console.warn("[useGroupChat] delete logs failed:",e)),o.current===t&&l([])):l([])},[]),chatRuns:c,setChatRuns:u,stop:m,stopThread:y}}],945028);let s=new Set(["spawning","running"]);e.s(["useProcessPolling",0,function(e,r){let a=r?.intervalMs??1500,n=r?.idleIntervalMs??1e4,[i,l]=(0,t.useState)(new Set),[c,u]=(0,t.useState)([]),[o,d]=(0,t.useState)({}),[p,h]=(0,t.useState)([]),f=(0,t.useRef)(e);f.current=e;let m=(0,t.useRef)(r?.messages??[]);m.current=r?.messages??[];let y=(0,t.useRef)(r?.setMessages);y.current=r?.setMessages;let g=(0,t.useRef)(0);(0,t.useEffect)(()=>{let e=r?.messages??[];if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>g.current&&(g.current=t)}},[r?.messages]);let k=(0,t.useCallback)(async()=>{let e=f.current;if(!e){l(new Set),u([]),d({}),h([]);return}let t=null;if(e.threadId?t=`/api/processes?threadId=${encodeURIComponent(e.threadId)}`:e.workspaceId&&(t=`/api/processes?workspaceId=${encodeURIComponent(e.workspaceId)}`),!t){l(new Set),u([]),d({}),h([]);return}try{let a=e.workspaceId||e.threadId,n=a?`/api/history?threadId=${encodeURIComponent(a)}&since=${g.current}`:null,i=a?`/api/chat-runs?threadId=${encodeURIComponent(a)}&limit=20`:null,c=[fetch(t)];n&&c.push(fetch(n)),i&&c.push(fetch(i));let[o,p,k]=await Promise.all(c),I=f.current;if(I?.threadId!==e.threadId||I?.workspaceId!==e.workspaceId)return;if(o.ok){let e=await o.json();u(e);let t=new Set(e.filter(e=>s.has(e.state)).map(e=>e.agentId));l(t);let r={};for(let t of e){if(!s.has(t.state))continue;let e=m.current.find(e=>e.id===t.sinceMessageId),a=e?.rootMessageId??t.sinceMessageId;r[t.agentId]={content:"",rootMessageId:a}}d(r)}if(k?.ok){var r;let e=(r=await k.json(),Array.isArray(r)?r.map(e=>{if(!e||"object"!=typeof e)return null;let t="string"==typeof e.chatRunId?e.chatRunId:"string"==typeof e.id?e.id:null,r="string"==typeof e.threadId?e.threadId:null,a="string"==typeof e.status?e.status:null,s="string"==typeof e.rootMessageId?e.rootMessageId:(e.rootMessageId,null);return t&&r&&a&&("queued"===a||"running"===a||"awaiting_user"===a||"blocked"===a||"completed"===a||"failed"===a||"cancelled"===a)?{chatRunId:t,threadId:r,rootMessageId:s,status:a,optimistic:!1}:null}).filter(e=>!!e):[]);h(e)}if(p?.ok&&y.current){let e=await p.json();if(e.length>0){let t=Math.max(...e.map(e=>e.timestamp));t>g.current&&(g.current=t),y.current(t=>{let r=new Set(t.map(e=>e.id)),a=e.filter(e=>!r.has(e.id)),s=t.map(t=>e.find(e=>e.id===t.id)??t);return 0===a.length?s:[...s,...a].sort((e,t)=>e.timestamp-t.timestamp)})}}}catch{}},[]),I=e?.threadId||e?.workspaceId||null,w=p.some(e=>"queued"===e.status||"running"===e.status),v=c.some(e=>s.has(e.state)),M=w||v?a:n;return(0,t.useEffect)(()=>{if(!I){l(new Set),u([]),d({}),h([]);return}k();let e=setInterval(k,M);return()=>clearInterval(e)},[I,M,k]),{activeAgents:i,processes:c,streaming:o,chatRuns:p,poll:k}}],490011)},417442,e=>{"use strict";let t=(0,e.i(363732).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],417442)},558201,e=>{"use strict";let t=(0,e.i(363732).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],558201)},245900,e=>{"use strict";let t=(0,e.i(363732).default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);e.s(["Play",0,t],245900)},248004,e=>{"use strict";let t=(0,e.i(363732).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],248004)},524507,e=>{"use strict";let t=(0,e.i(363732).default)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]);e.s(["Pause",0,t],524507)},790034,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(568656);e.s(["default",0,function({params:e}){let{slug:s,objectiveId:n}=(0,r.use)(e);return(0,t.jsx)(a.ProjectObjectivesOverview,{projectSlug:s,initialObjectiveId:n})}])},501223,e=>{e.v(t=>Promise.all(["static/chunks/0qhyo1udst01v.js"].map(t=>e.l(t))).then(()=>t(844118)))},469612,e=>{e.v(t=>Promise.all(["static/chunks/0il_ov6232avr.js"].map(t=>e.l(t))).then(()=>t(668610)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,749410,481248,e=>{"use strict";var r=e.i(843476),t=e.i(271645),a=e.i(174080),s=e.i(498027),i=e.i(997626),l=e.i(55236),o=e.i(196630),n=e.i(363732);let d=(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 c=e.i(929870),u=e.i(8707),p=e.i(797167),m=e.i(257587),x=e.i(938201),h=e.i(572665);let b=(0,n.default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);var f=e.i(597628),v=e.i(99296);let g=(0,n.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);var j=e.i(522016),w=e.i(44054),k=e.i(884564),_=e.i(535208),N=e.i(902572),y=e.i(644660);function S({compact:e=!1}){return(0,r.jsxs)("span",{className:`workspace-sidebar__brand-logo${e?" workspace-sidebar__brand-logo--compact":""}`,"aria-hidden":"true",children:[(0,r.jsxs)("span",{className:"workspace-sidebar__brand-grid",children:[(0,r.jsx)("span",{className:"workspace-sidebar__brand-dot workspace-sidebar__brand-dot--blue"}),(0,r.jsx)("span",{className:"workspace-sidebar__brand-dot workspace-sidebar__brand-dot--yellow"}),(0,r.jsx)("span",{className:"workspace-sidebar__brand-dot workspace-sidebar__brand-dot--mint"}),(0,r.jsx)("span",{className:"workspace-sidebar__brand-dot workspace-sidebar__brand-dot--red"})]}),(0,r.jsx)("span",{className:"workspace-sidebar__brand-text",children:"AGX"})]})}function C({label:e,children:s}){let i=(0,t.useRef)(null),[l,o]=(0,t.useState)(null);return(0,r.jsxs)("div",{ref:i,onMouseEnter:()=>{let e=i.current;if(!e)return;let r=e.getBoundingClientRect();o({top:r.top+r.height/2,left:r.right+8})},onMouseLeave:()=>o(null),style:{display:"contents"},children:[s,l&&(0,a.createPortal)((0,r.jsx)("div",{className:"workspace-sidebar__rail-tooltip",style:{top:l.top,left:l.left,transform:"translateY(-50%)"},children:e}),document.body)]})}function I({projects:e,activeProjectId:a,onSelectProject:i,onCreateProject:o}){let[n,d]=(0,t.useState)(!1),[m,x]=(0,t.useState)(""),h=(0,t.useRef)(null),b=(0,t.useRef)(null),f=e.find(e=>e.id===a)??e[0],v=m.trim()?e.filter(e=>e.name.toLowerCase().includes(m.toLowerCase())):e;return(0,t.useEffect)(()=>{if(!n)return;let e=e=>{h.current&&!h.current.contains(e.target)&&(d(!1),x(""))};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[n]),(0,t.useEffect)(()=>{n&&b.current&&b.current.focus()},[n]),(0,r.jsxs)("div",{className:"relative px-3 pt-3 pb-2",ref:h,children:[(0,r.jsxs)("button",{type:"button",onClick:()=>d(!n),className:"flex w-full items-center gap-2 rounded-lg border border-[var(--app-shell-border)] bg-[var(--app-shell-elevated)] px-2.5 py-2 text-sm text-[var(--foreground)] transition-all hover:border-[var(--app-shell-border-strong)]",children:[(0,r.jsx)(l.Folder,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"flex-1 truncate text-left font-medium",children:f?.name??"Select project"}),(0,r.jsx)(s.ChevronDown,{size:14,className:`flex-shrink-0 text-[var(--muted-foreground)] transition-transform ${n?"rotate-180":""}`})]}),n&&(0,r.jsxs)("div",{className:"absolute left-3 right-3 z-50 mt-1 rounded-lg border border-[var(--app-shell-border)] bg-[var(--app-shell-elevated)] shadow-lg overflow-hidden",children:[(0,r.jsx)("div",{className:"p-2 border-b border-[var(--app-shell-border)]",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-md border border-[var(--app-shell-border)] bg-[var(--app-shell-subtle)] px-2 py-1.5",children:[(0,r.jsx)(u.Search,{size:12,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("input",{ref:b,type:"text",value:m,onChange:e=>x(e.target.value),placeholder:"Search projects...",className:"flex-1 bg-transparent text-xs text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] outline-none"}),m&&(0,r.jsx)("button",{type:"button",onClick:()=>x(""),className:"text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:(0,r.jsx)(p.X,{size:10})})]})}),(0,r.jsxs)("div",{className:"max-h-52 overflow-y-auto py-1",children:[v.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{i?.(e.id),d(!1),x("")},className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm transition-colors hover:bg-[var(--app-shell-subtle)] ${e.id===f?.id?"text-[var(--foreground)] font-medium":"text-[var(--muted-foreground)]"}`,children:[(0,r.jsx)(l.Folder,{size:12,className:"flex-shrink-0"}),(0,r.jsx)("span",{className:"truncate",children:e.name})]},e.id)),0===v.length&&(0,r.jsx)("p",{className:"px-3 py-2 text-xs text-[var(--muted-foreground)]",children:"No projects found"})]}),(0,r.jsx)("div",{className:"border-t border-[var(--app-shell-border)] p-1",children:(0,r.jsxs)("button",{type:"button",onClick:()=>{d(!1),x(""),o()},className:"flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-xs text-[var(--muted-foreground)] transition-colors hover:bg-[var(--app-shell-subtle)] hover:text-[var(--foreground)]",children:[(0,r.jsx)(c.Plus,{size:12}),(0,r.jsx)("span",{children:"New project"})]})})]})]})}e.s(["WorkspaceSidebar",0,function({threads:e,participants:s=[],activeThreadId:l,isLoading:n,isCreating:u,onSelectThread:$,onCreateThread:z,onRenameThread:P,onDeleteThread:F,deletingThreadId:L=null,renamingThreadId:A=null,activeParticipantIds:E=[],onToggleParticipantActive:T,visible:M=!1,isRestoringActiveThread:B=!1,onToggle:R,onSearch:D,projects:V=[],onCreateProject:W,onUpdateProject:K,onDeleteProject:O,onAddAgentToProject:U,onRemoveAgentFromProject:q,onAddAgentViaForm:X,onReorderProjectAgents:H,onUpdateParticipant:J,onSelectProject:G,activeProjectId:Y=null,activeProjectView:Z=null,width:Q,onWidthChange:ee,onAddTeam:er}){let et,ea,{isTouchLayout:es,isPhone:ei}=(0,w.useInputCapabilities)(),el=(0,t.useRef)(!1);(0,t.useRef)(0);let eo=(0,t.useRef)(null),[en,ed]=(0,t.useState)(!1),[ec,eu]=(0,t.useState)(new Set);(0,t.useEffect)(()=>{if(ec.size>0||!V?.length)return;let e=V.find(e=>window.location.pathname.includes(`/projects/${e.slug}`));eu(new Set([e?.id??V[0].id]))},[V]);let[ep,em]=(0,t.useState)(null),[ex,eh]=(0,t.useState)(new Set),[eb,ef]=(0,t.useState)(!1),[ev,eg]=(0,t.useState)(null),[ej,ew]=(0,t.useState)(null),ek=(0,_.useProjectFormState)(),[e_,eN]=(0,t.useState)(null),ey=(0,t.useCallback)(e=>{e&&(e.focus(),e.select())},[]),[eS,eC]=(0,t.useState)(null),[eI,e$]=(0,t.useState)(null),ez=eI?s.find(e=>e.id===eI)??null:null,[eP,eF]=(0,t.useState)(null),[eL,eA]=(0,t.useState)({});(0,t.useEffect)(()=>{if(!V?.length)return;let e=!1,r=async()=>{try{let r=await fetch("/api/processes?enrich=1");if(!r.ok||e)return;let t=await r.json();if(e)return;let a=t.filter(e=>"spawning"===e.state||"running"===e.state),i={};for(let e of V){let r=e.slug.trim().toLowerCase(),t=new Set((e.thread_ids??[]).map(e=>e.trim()).filter(Boolean)),l=[],o=[],n=[],d=new Set,c=new Set,u=new Set;for(let e of a){let a=e.projectSlug?.trim().toLowerCase();if(!(a&&a===r||t.has(e.workspaceId)||t.has(e.threadId)))continue;let i=s.find(r=>r.id===e.agentId),p={agentId:e.agentId,color:i?.color??"#10b981"};e.linearIssueId?c.has(e.agentId)||(c.add(e.agentId),o.push(p)):e.threadId?.startsWith("objective-chat:")||e.workspaceId?.startsWith("objective-chat:")?d.has(e.agentId)||(d.add(e.agentId),l.push(p)):u.has(e.agentId)||(u.add(e.agentId),n.push(p))}(l.length||o.length||n.length)&&(i[e.id]={objectives:l,linear:o,chat:n})}eA(i)}catch{}};r();let t=setInterval(r,3e3);return()=>{e=!0,clearInterval(t)}},[V,s]);let[eE,eT]=(0,t.useState)({}),[eM,eB]=(0,t.useState)(new Set),[eR,eD]=(0,t.useState)(new Set),eV=(0,t.useRef)(new Set);(0,t.useEffect)(()=>{Array.from(ec).forEach(e=>{eR.has(e)||(eD(r=>new Set(r).add(e)),(async()=>{try{let r=await fetch(`/api/projects/${e}/teams`);if(!r.ok)return;let t=await r.json();eT(r=>({...r,[e]:t.teams??[]}))}catch{}})())})},[ec,eR]);let[eW,eK]=(0,t.useState)(null),eO=async()=>{if(!ev&&!ej)return;if(!ek.form.name.trim())return void ek.setFormError("Project name is required");let e=ek.repos.find(e=>e.name.trim()&&!e.path.trim());if(e)return void ek.setFormError(`Local path is required for folder "${e.name}"`);ek.setFormError(null),ek.setIsSubmitting(!0);let r=(0,_.createProjectPayload)(ek.form,ek.repos);ej?await K?.(ej.id,r):await W?.(r,ev?.threadId),ek.setIsSubmitting(!1),eg(null),ew(null)};(0,t.useEffect)(()=>{ed(!0)},[]),(0,t.useEffect)(()=>{let e=!1;async function r(){if(eP?.repoId)try{let r=await fetch(`/api/knowledge-notes?scope=repo&subjectId=${encodeURIComponent(eP.repoId)}`),t=(r.ok?await r.json():{note:null}).note;e||eF(e=>e&&e.repoId===eP.repoId?{...e,generatedKnowledge:t?.content?[{id:t.id,content:t.content,created_at:t.updatedAt??t.createdAt}]:[],isLoadingKnowledge:!1}:e)}catch{e||eF(e=>e&&e.repoId===eP.repoId?{...e,generatedKnowledge:[],isLoadingKnowledge:!1}:e)}}return eP?.repoId&&r(),()=>{e=!0}},[eP?.repoId]);let eU=ep?V.find(e=>e.id===ep.projectId):null,eq=new Set(eU?.agents.map(e=>e.agent_id)??[]),eX=ep?s.filter(e=>!eq.has(e.id)):[],eH=e.length>0,eJ=!!M,eG=(0,t.useCallback)(()=>{es&&R?.()},[es,R]),eY=[...e].sort((e,r)=>(e.title??"").localeCompare(r.title??"")),eZ=new Map(e.map(e=>[e.id,e])),eQ=V.filter(e=>!e.is_default);if((0,t.useEffect)(()=>{if(0===eQ.length)return;let r=new Map,t=new Set,a=new Map;for(let e of eQ){for(let r of e.thread_ids??[])"string"==typeof r&&r.trim()&&t.add(r);for(let t of(0,N.readProjectObjectivesWorkspace)(e.metadata).objectives){let a=t.id.trim();a&&r.set(a,{projectId:e.id,canonicalThreadId:t.threadId?.trim()||`objective-chat:${a}`})}}for(let r of e){let e=r.metadata&&"object"==typeof r.metadata?r.metadata:null,t="objective"===("string"==typeof e?.scope?e.scope:"")||r.id.startsWith("objective-chat:"),s=r.title?.trim().toLowerCase()??"";if(!t||!s)continue;let i=a.get(s)??[];i.push(r),a.set(s,i)}for(let[e,r]of a)a.set(e,[...r].sort((e,r)=>r.updatedAt-e.updatedAt));for(let s of e){let e=s.metadata&&"object"==typeof s.metadata?s.metadata:null,i="string"==typeof e?.scope?e.scope:"",l="string"==typeof e?.objectiveId?e.objectiveId.trim():"",o=s.id.startsWith("objective-chat:")?s.id.slice(15).trim():"",n=l||o,d="objective"===i||!!o,c=s.title?.trim().toLowerCase()??"",u=0===s.messages.length&&s.updatedAt<Date.now()-3e5;if(!d)continue;let p=n?r.get(n):void 0;if(p){if(s.id!==p.canonicalThreadId&&u){let e=`delete:${s.id}`;if(eV.current.has(e))continue;eV.current.add(e),Promise.resolve(F(s.id)).catch(r=>{eV.current.delete(e),console.warn("Failed to delete legacy objective thread",r)});continue}if(!t.has(s.id)){let e=`link:${s.id}`;if(eV.current.has(e))continue;eV.current.add(e),fetch(`/api/projects/${p.projectId}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:s.id})}).then(e=>{if(!e.ok)throw Error(`Request failed with status ${e.status}`)}).catch(r=>{eV.current.delete(e),console.warn("Failed to re-link objective thread",r)})}continue}if(!u)continue;let m=c?a.get(c)??[]:[];if(m.length<2||m[0]?.id===s.id)continue;let x=`delete:${s.id}`;eV.current.has(x)||(eV.current.add(x),Promise.resolve(F(s.id)).catch(e=>{eV.current.delete(x),console.warn("Failed to delete orphan objective thread",e)}))}},[eQ,F,e]),!function({focusTarget:e,shouldFocus:r}){(0,t.useEffect)(()=>{if(!r||"u"<typeof document)return;let t=e.current;if(!t||t instanceof HTMLButtonElement&&t.disabled)return;let a=document.activeElement;if(!(a&&(t===a||t.contains(a))))try{t.focus({preventScroll:!0})}catch{t.focus()}},[e,r])}({focusTarget:eo,shouldFocus:eJ&&!(n&&!eH||B&&eH)&&!eH&&!u}),!eJ){if(es)return null;let t=eQ.find(e=>e.id===Y)??eQ[0],a=t?.slug;return(0,r.jsxs)("aside",{id:"workspace-sidebar",className:"workspace-sidebar workspace-sidebar--collapsed","aria-label":"Workspace sidebar",children:[(0,r.jsx)("div",{className:"workspace-sidebar__brand",children:(0,r.jsx)("button",{type:"button",onClick:R,className:"workspace-sidebar__brand-trigger border-none outline-none cursor-pointer","aria-label":"Show chats",title:"Show chats",children:(0,r.jsx)(S,{compact:!0})})}),a&&(0,r.jsxs)("nav",{className:"workspace-sidebar__collapsed-rail",children:[(0,r.jsx)(C,{label:"Home",children:(0,r.jsx)(j.default,{href:`/projects/${a}`,className:`workspace-sidebar__rail-icon${"home"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(b,{size:16})})}),(0,r.jsx)("div",{className:"workspace-sidebar__rail-separator"}),(0,r.jsx)(C,{label:"Objectives",children:(0,r.jsx)(j.default,{href:`/projects/${a}/objectives`,className:`workspace-sidebar__rail-icon${"objectives"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(x.Target,{size:16})})}),(0,r.jsx)(C,{label:"Linear",children:(0,r.jsx)(j.default,{href:`/projects/${a}/linear`,className:`workspace-sidebar__rail-icon${"linear"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(y.LinearIcon,{size:16})})}),(0,r.jsx)(C,{label:"Scheduled Tasks",children:(0,r.jsx)(j.default,{href:`/projects/${a}/automations`,className:`workspace-sidebar__rail-icon${"automations"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(i.Zap,{size:16})})}),(0,r.jsx)("div",{className:"workspace-sidebar__rail-separator"}),(0,r.jsx)(C,{label:"Terminal",children:(0,r.jsx)(j.default,{href:`/projects/${a}/terminal`,className:`workspace-sidebar__rail-icon${"terminal"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(v.TerminalSquare,{size:16})})}),(0,r.jsx)(C,{label:"Chat",children:(0,r.jsx)("button",{type:"button",className:`workspace-sidebar__rail-icon${"thread"===Z?" workspace-sidebar__rail-icon--active":""}`,onClick:()=>{let r=eY.filter(e=>t.thread_ids?.includes(e.id)),a=t.thread_ids?.find(r=>e.some(e=>e.id===r))??r[0]?.id;a&&$(a)},children:(0,r.jsx)(f.MessageSquare,{size:16})})}),(0,r.jsx)("div",{className:"workspace-sidebar__rail-separator"}),(0,r.jsx)(C,{label:"Teams",children:(0,r.jsx)(j.default,{href:`/projects/${a}/teams`,className:`workspace-sidebar__rail-icon${"teams"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(h.Users,{size:16})})}),(0,r.jsx)(C,{label:"Folders",children:(0,r.jsx)(j.default,{href:`/projects/${a}/folders`,className:`workspace-sidebar__rail-icon${"folders"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(o.FolderGit2,{size:16})})}),(0,r.jsx)(C,{label:"Env Variables",children:(0,r.jsx)(j.default,{href:`/projects/${a}/env-vars`,className:`workspace-sidebar__rail-icon${"env-vars"===Z?" workspace-sidebar__rail-icon--active":""}`,children:(0,r.jsx)(g,{size:16})})})]}),(0,r.jsx)("div",{className:"mt-auto p-2",children:(0,r.jsx)(C,{label:"Join Discord",children:(0,r.jsx)("a",{href:"https://discord.gg/G9afUYKKY3",target:"_blank",rel:"noopener noreferrer",className:"workspace-sidebar__rail-icon",style:{backgroundColor:"#5865F2",color:"white"},onMouseEnter:e=>e.currentTarget.style.backgroundColor="#4752C4",onMouseLeave:e=>e.currentTarget.style.backgroundColor="#5865F2",children:(0,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 71 55",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.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"})})})})})]})}return(0,r.jsxs)(r.Fragment,{children:[es?(0,r.jsx)("button",{type:"button",className:"workspace-sidebar__backdrop",onClick:R,"aria-label":"Close sidebar"}):null,(0,r.jsxs)("aside",{id:"workspace-sidebar",className:`workspace-sidebar${es?" workspace-sidebar--drawer":""}${es&&ei?" workspace-sidebar--drawer-phone":""}`,"aria-label":"Workspace sidebar","aria-busy":n?"true":void 0,"aria-modal":es?"true":void 0,role:es?"dialog":void 0,style:!es&&Q?{width:`${Q}px`,minWidth:`${Q}px`}:void 0,children:[(0,r.jsxs)("div",{className:"workspace-sidebar__brand",children:[(0,r.jsx)("div",{className:"workspace-sidebar__brand-content",children:(0,r.jsx)(S,{})}),R&&(0,r.jsx)("button",{type:"button",onClick:R,"aria-label":"Hide chats",title:"Hide chats",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,r.jsx)(d,{className:"h-4 w-4",strokeWidth:1.75})})]}),(0,r.jsxs)("div",{className:"workspace-sidebar__content",children:[(0,r.jsx)(I,{projects:eQ,activeProjectId:Y,onSelectProject:e=>{G?.(e),eG()},onCreateProject:()=>{ek.resetForm(),ew(null),eg({})}}),(()=>{let e=eQ.find(e=>e.id===Y)??eQ[0];if(!e)return null;let t=eY.filter(r=>e.thread_ids?.includes(r.id)),a=e.thread_ids?.find(e=>eZ.has(e))??e.thread_ids?.[0]??t[0]?.id??null,n=e.id===Y,d=n&&"home"===Z,c=n&&"objectives"===Z,u=n&&"linear"===Z,p=n&&"automations"===Z,w=n&&"terminal"===Z,_=n&&"thread"===Z&&a===l,N=n&&"teams"===Z,S=n&&"folders"===Z,C=n&&"env-vars"===Z,I=eL[e.id];return(0,r.jsxs)("nav",{className:"workspace-sidebar__section",children:[(0,r.jsx)("div",{className:"px-2 mt-2 mb-3",children:(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}`,onClick:eG,className:`workspace-sidebar__nav-item ${d?"workspace-sidebar__nav-item--active":""}`,"aria-current":d?"page":void 0,children:[(0,r.jsx)(b,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Home"})]})})}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsx)("div",{className:"workspace-sidebar__section-header",children:(0,r.jsx)("p",{className:"workspace-sidebar__section-label",children:"Work"})}),(0,r.jsxs)("div",{className:"px-2 flex flex-col gap-0.5",children:[(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/objectives`,onClick:eG,className:`workspace-sidebar__nav-item ${c?"workspace-sidebar__nav-item--active":""}`,"aria-current":c?"page":void 0,children:[(0,r.jsx)(x.Target,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Objectives"}),I?.objectives.length>0&&(0,r.jsx)("span",{className:"inline-flex items-center -space-x-1 ml-auto shrink-0",children:I.objectives.slice(0,3).map(e=>{let t=s.find(r=>r.id===e.agentId);return(0,r.jsxs)("span",{className:"relative inline-block",title:t?.name,children:[(0,r.jsx)("img",{src:(0,k.agentAvatarUrl)(t?.id??e.agentId,16,e.color),alt:t?.name??"",className:"h-3.5 w-3.5 rounded-full ring-[1.5px] ring-[var(--app-shell-pane)]"}),(0,r.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--app-shell-pane)]"})]},e.agentId)})})]})}),(0,r.jsxs)("div",{className:"workspace-sidebar__workspace-item group/linear flex items-center",children:[(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/linear`,onClick:eG,className:`workspace-sidebar__nav-item flex-1 ${u?"workspace-sidebar__nav-item--active":""}`,"aria-current":u?"page":void 0,children:[(0,r.jsx)(y.LinearIcon,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Linear"}),I?.linear.length>0&&(0,r.jsx)("span",{className:"inline-flex items-center -space-x-1 ml-auto shrink-0",children:I.linear.slice(0,3).map(e=>{let t=s.find(r=>r.id===e.agentId);return(0,r.jsxs)("span",{className:"relative inline-block",title:t?.name,children:[(0,r.jsx)("img",{src:(0,k.agentAvatarUrl)(t?.id??e.agentId,16,e.color),alt:t?.name??"",className:"h-3.5 w-3.5 rounded-full ring-[1.5px] ring-[var(--app-shell-pane)]"}),(0,r.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--app-shell-pane)]"})]},e.agentId)})})]}),(0,r.jsx)(j.default,{href:`/projects/${e.slug}/linear?settings=true`,onClick:eG,className:"flex h-5 w-5 items-center justify-center rounded opacity-0 group-hover/linear:opacity-100 hover:bg-[var(--sidebar-hover)] transition-opacity",title:"Linear settings",children:(0,r.jsx)(m.Settings,{size:11,className:"text-[var(--muted-foreground)]"})})]}),(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/automations`,onClick:eG,className:`workspace-sidebar__nav-item ${p?"workspace-sidebar__nav-item--active":""}`,"aria-current":p?"page":void 0,children:[(0,r.jsx)(i.Zap,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Scheduled Tasks"})]})})]})]}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsx)("div",{className:"workspace-sidebar__section-header",children:(0,r.jsx)("p",{className:"workspace-sidebar__section-label",children:"Tools"})}),(0,r.jsxs)("div",{className:"px-2 flex flex-col gap-0.5",children:[(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/terminal`,onClick:eG,className:`workspace-sidebar__nav-item ${w?"workspace-sidebar__nav-item--active":""}`,"aria-current":w?"page":void 0,children:[(0,r.jsx)(v.TerminalSquare,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Terminal"})]})}),(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:a?(0,r.jsxs)("button",{type:"button",className:`workspace-sidebar__nav-item ${_?"workspace-sidebar__nav-item--active":""}`,onClick:()=>{$(a),eG()},"aria-current":_?"page":void 0,children:[(0,r.jsx)(f.MessageSquare,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Chat"}),I?.chat.length>0&&(0,r.jsx)("span",{className:"inline-flex items-center -space-x-1 ml-auto shrink-0",children:I.chat.slice(0,3).map(e=>{let t=s.find(r=>r.id===e.agentId);return(0,r.jsxs)("span",{className:"relative inline-block",title:t?.name,children:[(0,r.jsx)("img",{src:(0,k.agentAvatarUrl)(t?.id??e.agentId,16,e.color),alt:t?.name??"",className:"h-3.5 w-3.5 rounded-full ring-[1.5px] ring-[var(--app-shell-pane)]"}),(0,r.jsx)("span",{className:"absolute -bottom-px -right-px h-1.5 w-1.5 rounded-full bg-green-500 ring-[1px] ring-[var(--app-shell-pane)]"})]},e.agentId)})})]}):null})]})]}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsx)("div",{className:"workspace-sidebar__section-header",children:(0,r.jsx)("p",{className:"workspace-sidebar__section-label",children:"Settings"})}),(0,r.jsxs)("div",{className:"px-2 flex flex-col gap-0.5",children:[(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/teams`,onClick:eG,className:`workspace-sidebar__nav-item ${N?"workspace-sidebar__nav-item--active":""}`,"aria-current":N?"page":void 0,children:[(0,r.jsx)(h.Users,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Teams"})]})}),(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/folders`,onClick:eG,className:`workspace-sidebar__nav-item ${S?"workspace-sidebar__nav-item--active":""}`,"aria-current":S?"page":void 0,children:[(0,r.jsx)(o.FolderGit2,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Folders"})]})}),(0,r.jsx)("div",{className:"workspace-sidebar__workspace-item",children:(0,r.jsxs)(j.default,{href:`/projects/${e.slug}/env-vars`,onClick:eG,className:`workspace-sidebar__nav-item ${C?"workspace-sidebar__nav-item--active":""}`,"aria-current":C?"page":void 0,children:[(0,r.jsx)(g,{size:14,className:"flex-shrink-0 text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"workspace-sidebar__workspace-title text-sm",children:"Environment Variables"})]})})]})]})]})})()]}),(0,r.jsx)("div",{className:"mt-auto px-3 pb-3",children:(0,r.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,r.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 71 55",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:(0,r.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"]})}),en&&eP&&(0,a.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30 p-4",onClick:()=>{eP.isSaving||eF(null)},children:(0,r.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,r.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-[var(--border)] px-5 py-4",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:eP.projectName}),(0,r.jsx)("h3",{className:"truncate text-base font-semibold text-[var(--foreground)]",children:eP.repoId?eP.name||"Folder":"Add Folder"})]}),(0,r.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:()=>{eP.isSaving||eF(null)},"aria-label":"Close folder details",disabled:eP.isSaving,children:(0,r.jsx)(p.X,{size:16})})]}),(0,r.jsxs)("div",{className:"space-y-4 px-5 py-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Name"}),(0,r.jsx)("input",{value:eP.name,onChange:e=>eF(r=>r?{...r,name:e.target.value,error:null}:r),className:"w-full rounded-lg border border-[var(--border)] bg-[var(--app-shell-subtle)] px-3 py-2 text-sm text-[var(--foreground)]",disabled:eP.isSaving,placeholder:"e.g. Frontend, API Docs, Design System"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Path"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{value:eP.path,onChange:e=>eF(r=>r?{...r,path:e.target.value,error:null}:r),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:eP.isSaving,placeholder:"Local path to folder"}),(0,r.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:eP.isSaving,onClick:async()=>{try{let e=await fetch("/api/filesystem/pick-folder",{method:"POST"}),r=await e.json();r.path&&eF(e=>e?{...e,path:r.path,error:null}:e)}catch{}},children:"Browse"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Notes"}),(0,r.jsx)("textarea",{value:eP.notes,onChange:e=>eF(r=>r?{...r,notes:e.target.value,error:null}:r),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:eP.isSaving,placeholder:"Coding conventions, deploy steps, doc standards, ownership rules..."})]}),eP.repoId?(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-[var(--muted-foreground)]",children:"Living Note"}),eP.isLoadingKnowledge?(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Loading note…"}):eP.generatedKnowledge.length>0?(0,r.jsx)("div",{className:"space-y-2",children:eP.generatedKnowledge.slice(0,5).map(e=>(0,r.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,r.jsx)("div",{children:e.content}),e.created_at?(0,r.jsx)("div",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:new Date(e.created_at).toLocaleString()}):null]},e.id))}):(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No note yet."})]}):null,eP.error?(0,r.jsx)("p",{className:"text-xs text-red-600",children:eP.error}):null,(0,r.jsxs)("div",{className:"flex justify-end gap-2 border-t border-[var(--border)] pt-4",children:[(0,r.jsx)("button",{type:"button",className:"rounded-lg px-3 py-2 text-sm text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]",onClick:()=>eF(null),disabled:eP.isSaving,children:"Cancel"}),(0,r.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:eP.isSaving||!K,onClick:async()=>{let e=V.find(e=>e.id===eP.projectId);if(!e)return void eF(e=>e?{...e,error:"Project not found."}:e);let r=eP.name.trim(),t=eP.path.trim();if(!r)return void eF(e=>e?{...e,error:"Folder name is required."}:e);if(!t)return void eF(e=>e?{...e,error:"Folder path is required."}:e);eF(e=>e?{...e,isSaving:!0,error:null}:e);try{let a=eP.repoId?e.repos.map(e=>e.id===eP.repoId?{id:e.id,name:r,path:t,git_url:eP.gitUrl.trim()||void 0,notes:eP.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:r,path:t,git_url:eP.gitUrl.trim()||void 0,notes:eP.notes.trim()||void 0}];await K?.(e.id,{repos:a}),eF(null)}catch(e){eF(r=>r?{...r,isSaving:!1,error:e instanceof Error?e.message:"Failed to save folder details."}:r)}},children:eP.isSaving?"Saving...":eP.repoId?"Save":"Add Folder"})]})]})]})}),document.body),en&&ep&&!eb&&(0,a.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>em(null),children:(0,r.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,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,r.jsxs)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:["Add to ",eU?.name??"project"]}),(0,r.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>em(null),children:(0,r.jsx)(p.X,{size:16})})]}),(0,r.jsxs)("div",{className:"overflow-y-auto py-1 flex-1",children:[(0,r.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:()=>ef(!0),children:[(0,r.jsx)(c.Plus,{size:14,className:"text-[var(--muted-foreground)]"}),(0,r.jsx)("span",{className:"text-xs font-medium",children:"Create new agent"})]}),0===eX.length?(0,r.jsx)("p",{className:"px-4 py-6 text-xs text-[var(--muted-foreground)] text-center",children:"All agents are already in this project"}):eX.map(e=>{let t=ex.has(e.id);return(0,r.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${t?"bg-[var(--muted)] text-[var(--foreground)]":"text-[var(--foreground)] hover:bg-[var(--app-shell-subtle)]"}`,onClick:()=>{eh(r=>{let t=new Set(r);return t.has(e.id)?t.delete(e.id):t.add(e.id),t})},children:[(0,r.jsx)("div",{className:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center ${t?"bg-[var(--foreground)] border-[var(--foreground)]":"border-[var(--border)]"}`,children:t&&(0,r.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:(0,r.jsx)("path",{d:"M2 5l2 2 4-4",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,r.jsx)("img",{src:(0,k.agentAvatarUrl)(e.id,24,e.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,r.jsx)("div",{className:"truncate font-medium text-xs",children:e.name}),(0,r.jsx)("div",{className:"truncate text-[11px] text-[var(--muted-foreground)]",children:e.model})]})]},e.id)})]}),eX.length>0&&(0,r.jsxs)("div",{className:"px-4 py-3 border-t border-[var(--border)] flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>em(null),children:"Cancel"}),(0,r.jsxs)("button",{type:"button",disabled:0===ex.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 ex)U?.(ep.projectId,e);em(null)},children:["Add ",ex.size>0?`(${ex.size})`:""]})]})]})}),document.body),en&&eb&&(0,a.createPortal)((0,r.jsx)(k.AgentForm,{title:"Create new agent",initial:{name:"",provider:"claude",model:"",identity:"",skills:[],skillBindings:[]},submitLabel:"Create & Add",projects:V?.filter(e=>!e.is_default).map(r=>{let t=(r.thread_ids??[]).map(r=>e.find(e=>e.id===r)?.title?.trim()).filter(Boolean).join(", ")||"No chat";return{id:r.id,name:r.name,label:`${t} › ${r.name}`}}),initialProjectIds:ep?[ep.projectId]:[],onSubmit:async(e,r)=>{let t=["#D97706","#2563EB","#059669","#DC2626","#7C3AED","#DB2777","#0891B2"],a=t[s.length%t.length],i=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),l=r?.[0],o=await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:i,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??[],...l?{projectId:l}:{}})});if(o.ok){let e=await o.json().catch(()=>({})),t="string"==typeof e?.id&&e.id.trim()?e.id.trim():i;for(let e of(r??[]).slice(1))U?.(e,t);ef(!1),em(null)}},onCancel:()=>{ef(!1)}}),document.body),en&&e_&&(0,a.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>eN(null),children:(0,r.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,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:e_.title}),(0,r.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>eN(null),children:(0,r.jsx)(p.X,{size:16})})]}),(0,r.jsxs)("form",{className:"px-4 py-4 flex flex-col gap-3",onSubmit:e=>{e.preventDefault();let r=new FormData(e.currentTarget),t=r.get("value")?.trim();t&&(e_.onSubmit(t),eN(null))},children:[(0,r.jsx)("input",{ref:ey,name:"value",type:"text",defaultValue:e_.defaultValue,placeholder:e_.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,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>eN(null),children:"Cancel"}),(0,r.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:e_.defaultValue?"Save":"Create"})]})]})]})}),document.body),en&&eS&&(0,a.createPortal)((0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>eC(null),children:(0,r.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,r.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,r.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:eS.title}),(0,r.jsx)("button",{type:"button",className:"text-[var(--muted-foreground)] hover:text-[var(--muted-foreground)]",onClick:()=>eC(null),children:(0,r.jsx)(p.X,{size:16})})]}),(0,r.jsxs)("div",{className:"px-4 py-4 flex flex-col gap-4",children:[(0,r.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:eS.message}),(0,r.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>eC(null),children:"Cancel"}),(0,r.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:()=>{eS.onConfirm(),eC(null)},children:"Delete"})]})]})]})}),document.body),en&&(ev||ej)&&(0,a.createPortal)((0,r.jsx)(_.default,{isOpen:!0,onClose:()=>{ek.resetForm(),eg(null),ew(null)},onSubmit:()=>void eO(),editingProject:ej,form:ek.form,repos:ek.repos,isSubmitting:ek.isSubmitting,formError:ek.formError,onFieldChange:(e,r)=>ek.setForm(t=>({...t,[e]:r})),onRepoChange:ek.handleRepoChange,onAddRepo:ek.addRepo,onRemoveRepo:ek.removeRepo}),document.body),en&&ez&&(0,a.createPortal)((et=V.filter(e=>e.agents.some(e=>e.agent_id===ez.id)),ea=V.filter(e=>!e.agents.some(e=>e.agent_id===ez.id)),(0,r.jsx)(k.AgentForm,{title:"Edit agent",initial:{name:ez.name,title:ez.title||"",provider:ez.provider,model:ez.model||"",identity:ez.identity||"",color:ez.color,skills:ez.skills||[],skillBindings:ez.skillBindings||[]},agentId:ez.id,submitLabel:"Save",projectMemberships:{current:et.map(e=>({id:e.id,name:e.name,is_default:!!e.is_default})),available:ea.map(e=>({id:e.id,name:e.name}))},onAddToProject:U?e=>U(e,ez.id):void 0,onRemoveFromProject:q?e=>q(e,ez.id):void 0,onSubmit:async e=>{J&&await J({...ez,name:e.name,title:e.title||void 0,provider:e.provider,model:e.model,color:e.color??ez.color,...e.identity?{identity:e.identity}:{},skills:e.skills??[],skillBindings:e.skillBindings??[]}),e$(null)},onCancel:()=>e$(null)})),document.body),ee&&!es&&(0,r.jsx)("div",{className:"absolute right-0 top-0 bottom-0 z-20 w-1 cursor-col-resize group",onMouseDown:e=>{e.preventDefault(),el.current=!0;let r=e.clientX,t=Q??368;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let a=e=>{ee(Math.max(200,Math.min(600,t+e.clientX-r)))},s=()=>{el.current=!1,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",s)};window.addEventListener("mousemove",a),window.addEventListener("mouseup",s)},children:(0,r.jsx)("div",{className:"absolute inset-y-0 right-0 w-1 transition-colors hover:bg-[var(--primary)]/40 group-hover:bg-[var(--primary)]/40"})})]})]})}],749410);let $="agx-chat:uiSettings",z={threadSidebarVisible:!1};function P(){return void 0!==window.localStorage}function F(){if(!P())return{...z};let e=window.localStorage.getItem($);if(!e)return{...z};try{let r=JSON.parse(e);return{...z,threadSidebarVisible:"boolean"==typeof r.threadSidebarVisible&&r.threadSidebarVisible}}catch{return{...z}}}e.s(["loadWorkspaceSidebarVisible",0,function(){return F().threadSidebarVisible},"persistWorkspaceSidebarVisible",0,function(e){var r={...F(),threadSidebarVisible:e};if(P())try{window.localStorage.setItem($,JSON.stringify(r))}catch{}}],481248)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,741746,e=>{"use strict";let t=(0,e.i(363732).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],741746)},780004,e=>{"use strict";let t="obra/superpowers",n="vercel/next-skills";function i(e,t,n){return n?{repo:e,skillId:t,condition:n}:{repo:e,skillId:t}}function a(e){return e.condition?{...e}:{repo:e.repo,skillId:e.skillId}}function r(e){let t={...e};return t.extraSkills&&(t.extraSkills=t.extraSkills.map(a)),t}function s(e){return{...e,agents:e.agents.map(r)}}function l(e){let t={...e,agents:e.agents.map(r)};return t.variants&&(t.variants=t.variants.map(s)),t}let o={"strategist-lead":[i(t,"brainstorming"),i(t,"writing-plans"),i(t,"dispatching-parallel-agents"),i(t,"requesting-code-review"),i(t,"verification-before-completion")],"senior-builder":[i(t,"test-driven-development"),i(t,"systematic-debugging"),i(t,"subagent-driven-development"),i(t,"requesting-code-review"),i(t,"verification-before-completion"),i(t,"finishing-a-development-branch")],builder:[i(t,"test-driven-development"),i(t,"systematic-debugging"),i(t,"verification-before-completion"),i(t,"finishing-a-development-branch")],planner:[i(t,"brainstorming"),i(t,"writing-plans"),i(t,"verification-before-completion")],researcher:[i(t,"brainstorming"),i(t,"writing-plans"),i(t,"systematic-debugging"),i(t,"verification-before-completion")],reviewer:[i(t,"systematic-debugging"),i(t,"test-driven-development"),i(t,"requesting-code-review"),i(t,"verification-before-completion")]},d=["strategist-lead","senior-builder","builder","planner","researcher","reviewer"].map(e=>({id:e,skills:o[e].map(a)})),c=[i(n,"api-routes","next.js app router, route handlers, api endpoints"),i(n,"nextjs-patterns","next.js app structure, routing, layouts, data fetching"),i(n,"react-server-components","react server components, server client boundaries, next.js rendering")],m={"team-lead":{name:"Team Lead",title:"Team Lead",style:"balanced",skillProfileId:"strategist-lead",identity:"Own technical direction, break ambiguous work into executable plans, and keep the squad aligned on delivery."},"fullstack-engineer":{name:"Fullstack Engineer",title:"Senior Fullstack Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Ship features end-to-end across frontend and backend with pragmatic tradeoffs and clean boundaries.",extraSkills:c},"backend-engineer":{name:"Backend Engineer",title:"Senior Backend Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Own backend contracts, data integrity, and safe delivery under real production constraints."},"frontend-engineer":{name:"Frontend Engineer",title:"Senior Frontend Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Own product-facing UI quality, interaction design fidelity, and maintainable front-end architecture.",extraSkills:c},"data-engineer":{name:"Data Engineer",title:"Data Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Build reliable data pipelines, schemas, and transformations with a bias toward traceability."},"ml-engineer":{name:"ML Engineer",title:"ML Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Ship model-backed systems pragmatically, with evaluation, rollback paths, and tight production feedback."},"devops-engineer":{name:"DevOps Engineer",title:"DevOps Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Own delivery automation, deployment safety, and infrastructure changes that must fail predictably."},"security-engineer":{name:"Security Engineer",title:"Security Engineer",style:"conservative",skillProfileId:"senior-builder",identity:"Harden trust boundaries, implement secure defaults, and turn vague risk into concrete engineering requirements."},"ui-designer":{name:"UI Designer",title:"UI Designer",style:"specialist",skillProfileId:"builder",identity:"Refine interfaces into consistent, high-signal UI systems that are practical to build and maintain.",extraSkills:[i(n,"nextjs-patterns","next.js ui flows, routing, layouts, app router"),i(n,"react-server-components","react server components, server client boundaries, data fetching placement")]},"qa-engineer":{name:"QA Engineer",title:"QA Engineer",style:"conservative",skillProfileId:"reviewer",identity:"Find regressions early, tighten acceptance boundaries, and force evidence before release claims."},sre:{name:"SRE",title:"Site Reliability Engineer",style:"conservative",skillProfileId:"reviewer",identity:"Guard uptime, incident readiness, and operational correctness by challenging risky assumptions early."},"pen-tester":{name:"Pen Tester",title:"Penetration Tester",style:"specialist",skillProfileId:"reviewer",identity:"Probe the system as an adversary, find exploit paths, and make the attack surface legible to builders."},"product-manager":{name:"Product Manager",title:"Product Manager",style:"balanced",skillProfileId:"planner",identity:"Turn ambiguous requests into scoped bets, crisp plans, and explicit tradeoffs the team can execute."},"ux-designer":{name:"UX Designer",title:"UX Designer",style:"balanced",skillProfileId:"planner",identity:"Clarify user intent, reduce friction in flows, and turn product goals into coherent interaction design."},"technical-writer":{name:"Technical Writer",title:"Technical Writer",style:"balanced",skillProfileId:"planner",identity:"Turn complex implementation detail into clear docs, rollout notes, and operational guidance."},"growth-marketer":{name:"Growth Marketer",title:"Growth Marketer",style:"balanced",skillProfileId:"strategist-lead",identity:"Design growth experiments with clear hypotheses, sequencing, and measurable outcomes."},analyst:{name:"Analyst",title:"Product Analyst",style:"specialist",skillProfileId:"researcher",identity:"Ground decisions in evidence, identify gaps in the brief, and surface the signal behind user behavior."},"content-writer":{name:"Content Writer",title:"Content Strategist",style:"balanced",skillProfileId:"researcher",identity:"Translate product and audience insight into clear narratives, launch copy, and feedback loops."},researcher:{name:"Researcher",title:"Researcher",style:"balanced",skillProfileId:"researcher",identity:"Map fast-changing domains, synthesize evidence, and surface the governing model behind decisions."},"marketing-strategist":{name:"Marketing Strategist",title:"Marketing Strategist",style:"balanced",skillProfileId:"strategist-lead",identity:"Own brand positioning, campaign strategy, and channel mix with measurable conversion targets."},copywriter:{name:"Copywriter",title:"Copywriter",style:"balanced",skillProfileId:"researcher",identity:"Craft clear, persuasive copy that serves both the reader and the business goal."},"support-engineer":{name:"Support Engineer",title:"Support Engineer",style:"balanced",skillProfileId:"builder",identity:"Diagnose customer issues fast, escalate with precision, and turn patterns into preventive fixes."},"support-lead":{name:"Support Lead",title:"Support Lead",style:"balanced",skillProfileId:"planner",identity:"Triage incoming issues, route to the right responder, and track resolution quality."},"devrel-engineer":{name:"DevRel Engineer",title:"Developer Relations Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Build sample apps, integrations, and tooling that make the platform easy to adopt."},"community-manager":{name:"Community Manager",title:"Community Manager",style:"balanced",skillProfileId:"planner",identity:"Grow and engage the developer community through events, content, and feedback loops."},"ops-engineer":{name:"Ops Engineer",title:"Operations Engineer",style:"specialist",skillProfileId:"senior-builder",identity:"Automate operational workflows, reduce toil, and keep internal tooling reliable."},"project-manager":{name:"Project Manager",title:"Project Manager",style:"balanced",skillProfileId:"planner",identity:"Track milestones, remove blockers, and keep cross-team delivery on schedule."},"solutions-architect":{name:"Solutions Architect",title:"Solutions Architect",style:"balanced",skillProfileId:"strategist-lead",identity:"Design system-level architectures, evaluate tradeoffs, and guide teams through technical decisions."},"mobile-engineer":{name:"Mobile Engineer",title:"Senior Mobile Engineer",style:"balanced",skillProfileId:"senior-builder",identity:"Ship native and cross-platform mobile experiences with attention to performance and platform conventions."}},g=["team-lead","fullstack-engineer","backend-engineer","frontend-engineer","qa-engineer","product-manager","analyst","growth-marketer","content-writer","data-engineer","ml-engineer","ux-designer","ui-designer","devops-engineer","sre","security-engineer","pen-tester","researcher","technical-writer","marketing-strategist","copywriter","support-engineer","support-lead","devrel-engineer","community-manager","ops-engineer","project-manager","solutions-architect","mobile-engineer"].map(e=>r({id:e,...m[e]}));function p(e){return r({id:e,...m[e]})}let u=[{id:"engineering",name:"Engineering",description:"Software engineering teams across all domains — pick a specialization or build your own.",icon:"hammer",agents:[p("team-lead"),p("backend-engineer"),p("frontend-engineer"),p("fullstack-engineer"),p("qa-engineer")],variants:[{id:"general",name:"General",description:"Product engineering with leadership, builders across the stack, and quality gates.",agents:[p("team-lead"),p("backend-engineer"),p("frontend-engineer"),p("fullstack-engineer"),p("qa-engineer")]},{id:"ai",name:"AI",description:"Applied AI and ML engineering for models, evaluation, and production inference.",agents:[p("team-lead"),p("ml-engineer"),p("data-engineer"),p("researcher"),p("qa-engineer")]},{id:"data",name:"Data",description:"Data platform engineering for pipelines, warehousing, and transformation reliability.",agents:[p("team-lead"),p("data-engineer"),p("qa-engineer")]},{id:"mobile",name:"Mobile",description:"Native and cross-platform mobile engineering with fullstack support.",agents:[p("team-lead"),p("mobile-engineer"),p("fullstack-engineer"),p("qa-engineer")]},{id:"infra",name:"Infrastructure",description:"Platform reliability for delivery pipelines, runtime stability, and operational safety.",agents:[p("team-lead"),p("devops-engineer"),p("sre")]},{id:"security",name:"Security",description:"Security engineering for secure defaults, hardening, and adversarial validation.",agents:[p("team-lead"),p("security-engineer"),p("pen-tester")]},{id:"solutions",name:"Solutions",description:"Architecture and integration work across systems and customer deployments.",agents:[p("team-lead"),p("solutions-architect"),p("backend-engineer"),p("devops-engineer")]}]},{id:"product",name:"Product",description:"Discovery and prioritization for product direction, scope, and validation.",icon:"clipboard-list",agents:[p("team-lead"),p("product-manager"),p("analyst")]},{id:"design",name:"Design",description:"UX and UI pairing for flows, interaction models, and polished product surfaces.",icon:"palette",agents:[p("team-lead"),p("ux-designer"),p("ui-designer")]},{id:"growth",name:"Growth",description:"Experiment and content team for acquisition, activation, and learning loops.",icon:"megaphone",agents:[p("team-lead"),p("growth-marketer"),p("content-writer")]},{id:"research",name:"Research",description:"Research and synthesis pair for investigations, briefs, and decision support.",icon:"flask-conical",agents:[p("team-lead"),p("researcher"),p("technical-writer")]},{id:"marketing",name:"Marketing",description:"Brand strategy, campaign execution, and content production.",icon:"megaphone",agents:[p("team-lead"),p("marketing-strategist"),p("copywriter"),p("content-writer")]},{id:"support",name:"Support",description:"Customer-facing support with triage, diagnosis, and escalation.",icon:"life-buoy",agents:[p("team-lead"),p("support-lead"),p("support-engineer")]},{id:"devrel",name:"Developer Relations",description:"Developer advocacy through tooling, content, and community engagement.",icon:"users",agents:[p("team-lead"),p("devrel-engineer"),p("community-manager"),p("technical-writer")]},{id:"operations",name:"Operations",description:"Internal tooling, project delivery, and cross-team coordination.",icon:"settings",agents:[p("team-lead"),p("project-manager"),p("ops-engineer")]}].map(l),f=new Map(d.map(e=>[e.id,e])),h=new Map(g.map(e=>[e.id,e]));u.map(e=>[e.id,e]),e.s(["getAgentPresetBindings",0,function(e){let t,n="string"==typeof e?function(e){if(!e)return null;let t=h.get(e);return t?r(t):null}(e):e;return n?[...(t=function(e){if(!e)return null;let t=f.get(e);return t?{id:t.id,skills:t.skills.map(a)}:null}(n.skillProfileId))?t.skills:[],...n.extraSkills?n.extraSkills.map(a):[]]:[]},"listAgentPresets",0,function(){return g.map(r)},"listTeamTemplates",0,function(){return u.map(l)}])},331160,e=>{"use strict";var t=e.i(843476),n=e.i(271645),i=e.i(618566),a=e.i(780004),r=e.i(378764),s=e.i(524123),l=e.i(572665),o=e.i(906724),d=e.i(529471),c=e.i(741746);function m(e,t){let n=(0,a.getAgentPresetBindings)(t).map(e=>`${e.repo}/${e.skillId}`),i=new Set(e);return{overlap:n.filter(e=>i.has(e)),missing:n.filter(e=>!i.has(e))}}e.s(["default",0,function({params:e}){let{slug:g}=(0,n.use)(e),p=(0,i.useRouter)(),{projects:u}=(0,s.useProjectsWithAgents)(),f=u.find(e=>e.slug===g),[h,y]=(0,n.useState)([]),[b,v]=(0,n.useState)(!0),[x,k]=(0,n.useState)(""),[w,j]=(0,n.useState)(null),[P,S]=(0,n.useState)(null),[I,N]=(0,n.useState)(!1),[E,C]=(0,n.useState)(!1),[M,T]=(0,n.useState)(null),[A,q]=(0,n.useState)({}),D=(0,n.useMemo)(()=>(0,a.listTeamTemplates)(),[]),O=(0,n.useMemo)(()=>(0,a.listAgentPresets)(),[]),$=(0,n.useMemo)(()=>D.find(e=>e.id===w)??null,[D,w]),_=(0,n.useMemo)(()=>$?.variants&&P?$.variants.find(e=>e.id===P)??null:null,[$,P]),R=(0,n.useMemo)(()=>_?_.agents:$?$.agents:[],[$,_]),U=(0,n.useCallback)(async()=>{if(f){try{let e=await fetch(`/api/projects/${f.id}/agents/unassigned`);if(e.ok){let t=await e.json();y(t.agents??[])}}catch{}v(!1)}},[f]);(0,n.useEffect)(()=>{U()},[U]);let B=(0,n.useMemo)(()=>D.map(e=>({id:e.id,label:e.name,description:e.description,meta:e.variants?`${e.variants.length} specializations`:`${e.agents.length} roles`})),[D]),F=(0,n.useMemo)(()=>$?.variants?$.variants.map(e=>({id:e.id,label:e.name,description:e.description,meta:`${e.agents.length} roles`})):[],[$]),L=(0,n.useMemo)(()=>[{id:"__auto__",label:"Auto",description:"Best match based on skills"},...(R.length>0?R:O).map(e=>({id:e.id,label:e.name,meta:e.skillProfileId}))],[R,O]),G=(0,n.useMemo)(()=>0===R.length?h.map(e=>({agent:e,matchedPreset:null,overlap:[],missing:[]})):h.map(e=>{let t=A[e.id];if(t&&"__auto__"!==t){let n=R.find(e=>e.id===t)??O.find(e=>e.id===t)??null;if(n){let{overlap:t,missing:i}=m(e.skills.map(e=>e.file),n);return{agent:e,matchedPreset:n,overlap:t,missing:i}}}let{preset:n,overlap:i,missing:a}=function(e,t){let n=e.skills.map(e=>e.file),i={preset:null,overlap:[],missing:[]},a=-1;for(let e of t){let{overlap:t,missing:r}=m(n,e);t.length>a&&(a=t.length,i={preset:e,overlap:t,missing:r})}return i}(e,R);return{agent:e,matchedPreset:n,overlap:i,missing:a}}),[h,R,A,O]);async function z(){if(x.trim()&&f){C(!0),T(null);try{let e=await fetch(`/api/projects/${f.id}/teams`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:x.trim()})});if(!e.ok)throw Error((await e.json().catch(()=>({}))).error||"Failed to create team");let{team:t}=await e.json();for(let e of G){let n=e.matchedPreset?.id??"member";await fetch(`/api/projects/${f.id}/teams/${t.id}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e.agent.id,roleKey:n})})}if(I){for(let e of G)if(e.missing.length>0&&e.matchedPreset){let t=(0,a.getAgentPresetBindings)(e.matchedPreset),n=new Set(e.missing),i=t.filter(e=>n.has(`${e.repo}/${e.skillId}`)).map(e=>({file:`${e.repo}/${e.skillId}`,...e.condition?{condition:e.condition}:{}}));i.length>0&&await fetch(`/api/agents/${e.agent.id}/skills`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({skills:[...e.agent.skills.map(e=>({file:e.file})),...i]})})}}p.push(`/projects/${g}/teams`)}catch(e){T(e instanceof Error?e.message:"Failed to adopt agents"),C(!1)}}}if(!f||b)return(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-zinc-500",children:"Loading..."});let W=!!$?.variants;return(0,t.jsx)("div",{className:"h-full overflow-y-auto",children:(0,t.jsxs)("div",{className:"max-w-2xl mx-auto px-6 py-8 space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-lg font-bold",children:"Adopt Unassigned Agents"}),(0,t.jsxs)("p",{className:"text-xs text-[var(--muted-foreground)]",children:["Group ",h.length," unassigned agent",1!==h.length?"s":""," into a team."]})]}),M&&(0,t.jsx)("div",{className:"p-3 rounded-xl bg-[var(--destructive-muted)] border border-[var(--destructive)]/20 text-sm text-[var(--destructive)]",children:M}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[var(--muted-foreground)] mb-1.5",children:"Team name"}),(0,t.jsx)("input",{value:x,onChange:e=>k(e.target.value),placeholder:"e.g. Core Engineering",className:"input w-full text-sm",disabled:E,autoFocus:!0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[var(--muted-foreground)] mb-1.5",children:"Template (optional — for role matching)"}),(0,t.jsx)(r.default,{options:B,value:w,onChange:function(e){j(e),S(null),q({});let t=D.find(t=>t.id===e);t&&!x&&k(t.name)},placeholder:"Select a template...",disabled:E})]}),W&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[var(--muted-foreground)] mb-1.5",children:"Specialization"}),(0,t.jsx)(r.default,{options:F,value:P,onChange:function(e){S(e),q({})},placeholder:"Select a specialization...",disabled:E})]}),R.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[var(--muted-foreground)] mb-2",children:"Role matching"}),(0,t.jsx)("div",{className:"space-y-1.5",children:G.map(e=>(0,t.jsxs)("div",{className:"p-2.5 rounded-xl",style:{background:"var(--muted)",border:"1px solid var(--border)"},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(l.Users,{className:"w-4 h-4 text-[var(--muted-foreground)] flex-shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium truncate",children:e.agent.name})]}),(0,t.jsx)("div",{className:"flex-shrink-0 w-48",children:(0,t.jsx)(r.default,{options:L,value:A[e.agent.id]??e.matchedPreset?.id??"__auto__",onChange:t=>q(n=>({...n,[e.agent.id]:"__auto__"===t?null:t})),placeholder:"Select role...",disabled:E})})]}),e.matchedPreset&&(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[e.overlap.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,t.jsx)(d.Check,{className:"w-2.5 h-2.5"}),e.split("/").pop()]},e)),e.missing.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,t.jsx)(c.AlertCircle,{className:"w-2.5 h-2.5"}),e.split("/").pop()]},e))]})]},e.agent.id))})]}),G.some(e=>e.missing.length>0)&&(0,t.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer py-1",children:[(0,t.jsx)("input",{type:"checkbox",checked:I,onChange:e=>N(e.target.checked),disabled:E,className:"rounded",style:{borderColor:"var(--border)"}}),(0,t.jsx)("span",{className:"text-sm",children:"Add missing skills from template"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 pt-4 border-t",style:{borderColor:"var(--border)"},children:[(0,t.jsx)("button",{onClick:()=>p.push(`/projects/${g}/teams`),disabled:E,className:"px-4 py-2 rounded-xl border hover:bg-[var(--muted)]/50 transition-colors text-sm",style:{borderColor:"var(--border)"},children:"Cancel"}),(0,t.jsx)("button",{onClick:z,disabled:!x.trim()||E,className:"btn-primary px-5 py-2 text-sm min-w-[120px] flex items-center justify-center gap-2",children:E?(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Users,{className:"w-4 h-4"}),"Adopt (",h.length,")"]})})]})]})})}])}]);
|