@mndrk/agx 2.1.0 → 2.3.0
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 +5 -5
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- package/cloud-runtime/standalone/apps/local/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +3 -3
- 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.js.nft.json +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.js.nft.json +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/[root-of-the-server]__039h7r.._.js +18 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__0lno3km._.js +3 -0
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{[root-of-the-server]__0fl7_-o._.js → [root-of-the-server]__0nqqk26._.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/{[root-of-the-server]__0j9m72.._.js → [root-of-the-server]__0tqn-o5._.js} +2 -2
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__0~nm7b6._.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/{_064h43p._.js → _05xj_bp._.js} +2 -2
- 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_0nvzo3y._.js → apps_local_04dh2yh._.js} +2 -2
- 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]_layout_tsx_0aaa3~t._.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_chat-ui_ChatContainer_tsx_0c9fjtl._.js +1 -1
- 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/{0e307b-0c2jbx.js → 0-cets4_axpvm.js} +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/{119v0-idpg-cv.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/0kn66yvx08813.css +1 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{07646a0h94826.js → 0l89kxqcf86on.js} +2 -2
- 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/{0tt1oh112yv-l.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/0zt2o58c5gytn.js +16 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0~idsggr8vqf5.js +59 -0
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/{0stvi5btlxl4m.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/{0-_ukhpeg429c.js → 16h9208kl5~xa.js} +1 -1
- 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]/layout.tsx +1 -1
- 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 +8 -39
- 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/LinearSettingsModal.tsx +9 -3
- package/cloud-runtime/standalone/apps/local/components/linear/LinearWorkerConfig.tsx +65 -30
- package/cloud-runtime/standalone/apps/local/components/linear/LinearWorkerRunLog.tsx +190 -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/ObjectiveScheduledTasksPanel.tsx +38 -34
- 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 +121 -20
- 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/styles/workspaceSidebar.css +71 -2
- package/cloud-runtime/standalone/apps/local/worker/index.js +56 -4
- 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_0tvwux2._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__006vr7.._.js +0 -3
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__0d18x53._.js +0 -18
- package/cloud-runtime/standalone/apps/local/.next/server/chunks/ssr/[root-of-the-server]__0z7nw_r._.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/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/04yoml2rqnuot.js +0 -16
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/069yt_7prdxsp.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0_mrpyqcoyb_5.js +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0edewt9l~cs~k.css +0 -1
- package/cloud-runtime/standalone/apps/local/.next/static/chunks/0f7i3ae1ynhf3.css +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/0jrkacz_dyem6.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/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/0r0c9y6.8.m5p.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/0uve8xrt~0a2e.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/0zw85-xl9ysjs.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/16d~es6h6k~rj.js +0 -6
- 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/{RnYHmEXBwXJjVrVVx2CuP → ROMPfjQqFXqGHmbybq1eC}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{RnYHmEXBwXJjVrVVx2CuP → ROMPfjQqFXqGHmbybq1eC}/_clientMiddlewareManifest.js +0 -0
- /package/cloud-runtime/standalone/apps/local/.next/static/{RnYHmEXBwXJjVrVVx2CuP → ROMPfjQqFXqGHmbybq1eC}/_ssgManifest.js +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,628822,e=>{"use strict";var t=e.i(843476),r=e.i(271645),s=e.i(618566),a=e.i(524123),n=e.i(770703),i=e.i(363732);let o=(0,i.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),l=(0,i.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var d=e.i(529471),c=e.i(498027),u=e.i(580873),x=e.i(245110),m=e.i(575479);let p=(0,i.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var f=e.i(245900),g=e.i(929870),h=e.i(203096),b=e.i(8707),v=e.i(257587),j=e.i(169610),y=e.i(797167),w=e.i(66386),N=e.i(33887);let k="agx-linear:runScripts",S={activeScriptId:null,scripts:[]};function C(){return void 0!==window.localStorage}function I(e){if(!e||"object"!=typeof e)return{...S};let t=Array.isArray(e.scripts)?[...e.scripts.map(e=>(function(e){if(!e||"object"!=typeof e)return null;let t="string"==typeof e.id?e.id.trim():"",r="string"==typeof e.name?e.name.trim():"",s="string"==typeof e.prompt?e.prompt.trim():"",a="string"==typeof e.createdAt&&e.createdAt.trim()?e.createdAt.trim():"",n="string"==typeof e.updatedAt&&e.updatedAt.trim()?e.updatedAt.trim():a;return t&&r&&s&&a&&n?{id:t,name:r,prompt:s,createdAt:a,updatedAt:n}:null})(e)).filter(e=>!!e)].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)):[],r="string"==typeof e.activeScriptId&&e.activeScriptId.trim()?e.activeScriptId.trim():null;return{activeScriptId:r&&t.some(e=>e.id===r)?r:null,scripts:t}}function A(e){let t=String(e??"").trim().toLowerCase();return t?`${k}:${t}`:`${k}:global`}var R=e.i(945028),L=e.i(490011),$=e.i(208343),E=e.i(693646),M=e.i(794731),P=e.i(352687),T=e.i(40527);function z({projectSlug:e,scripts:s,activeScriptId:a,onSetActiveScriptId:n,onSaveScript:i,onDeleteScript:o}){let l=(0,r.useMemo)(()=>s.find(e=>e.id===a)??null,[a,s]),[c,u]=(0,r.useState)(()=>a?{type:"edit",scriptId:a}:{type:"new"}),[x,m]=(0,r.useState)(""),[p,f]=(0,r.useState)(""),[h,b]=(0,r.useState)(null),[v,j]=(0,r.useState)(null),y="edit"===c.type?c.scriptId:null;(0,r.useEffect)(()=>{if("edit"===c.type){let e=s.find(e=>e.id===c.scriptId);if(e){m(e.name),f(e.prompt);return}}if(l&&"new"!==c.type){("edit"!==c.type||c.scriptId!==l.id)&&u({type:"edit",scriptId:l.id}),m(l.name),f(l.prompt);return}0===s.length&&"new"!==c.type&&(u({type:"new"}),m(""),f(""))},[l,y,c,s]);let w=()=>{u({type:"new"}),m(""),f(""),b(null)},N=()=>{try{let e=i({name:x,prompt:p});u({type:"edit",scriptId:e.id}),b(null)}catch(e){b(e instanceof Error?e.message:"Failed to save session script.")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Session Scripts"}),(0,t.jsxs)("p",{className:"text-xs leading-relaxed text-[var(--muted-foreground)]",children:["Save reusable kickoff prompts for the ",String(e??"").trim()||"global Linear board",". These scripts stay on this device and layer on top of the built-in ticket context whenever you start a scripted session."]})]}),(0,t.jsxs)("div",{className:"grid gap-5 md:grid-cols-[240px_minmax(0,1fr)]",children:[(0,t.jsxs)("aside",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] p-3",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--muted-foreground)]",children:"Library"}),(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1 rounded-md border border-[var(--card-border)] px-2 py-1 text-[11px] font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--background)]",onClick:w,children:[(0,t.jsx)(g.Plus,{size:12}),"New"]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsxs)("button",{type:"button",className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors ${null===a?"bg-[var(--background)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--background)] hover:text-[var(--foreground)]"}`,onClick:()=>n(null),children:[(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${null===a?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:null===a?(0,t.jsx)(d.Check,{size:10}):null}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium",children:"AGX default"})]}),0===s.length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed border-[var(--card-border)] px-3 py-4 text-xs leading-relaxed text-[var(--muted-foreground)]",children:"No saved scripts yet. Create one to reuse your preferred scripted session prompt."}):s.map(e=>{let r=e.id===a,s="edit"===c.type&&c.scriptId===e.id;return(0,t.jsx)("button",{type:"button",className:`rounded-lg border px-3 py-2 text-left transition-colors ${s?"border-blue-500/50 bg-[var(--background)]":"border-transparent hover:border-[var(--card-border)] hover:bg-[var(--background)]"}`,onClick:()=>{u({type:"edit",scriptId:e.id}),m(e.name),f(e.prompt),b(null),n(e.id)},children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("span",{className:`mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${r?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:r?(0,t.jsx)(d.Check,{size:10}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate text-xs font-medium text-[var(--foreground)]",children:e.name}),(0,t.jsx)("div",{className:"mt-1 line-clamp-2 text-[11px] leading-relaxed text-[var(--muted-foreground)]",children:e.prompt}),(0,t.jsxs)("div",{className:"mt-2 text-[10px] uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:["Updated ",function(e){try{return new Date(e).toLocaleString([],{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}(e.updatedAt)]})]})]})},e.id)})]})]}),(0,t.jsxs)("section",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] p-4",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-semibold text-[var(--foreground)]",children:"edit"===c.type?"Edit Session Script":"New Session Script"}),(0,t.jsxs)("p",{className:"mt-1 text-xs leading-relaxed text-[var(--muted-foreground)]",children:["Use placeholders like ",(0,t.jsx)("code",{children:"{{ticket.identifier}}"}),", ",(0,t.jsx)("code",{children:"{{ticket.title}}"}),", ",(0,t.jsx)("code",{children:"{{ticket.status}}"}),", ",(0,t.jsx)("code",{children:"{{ticket.assignee}}"}),", ",(0,t.jsx)("code",{children:"{{project.slug}}"}),", ",(0,t.jsx)("code",{children:"{{knowledge_base.root}}"}),", ",(0,t.jsx)("code",{children:"{{knowledge_base.issue_path}}"}),", and ",(0,t.jsx)("code",{children:"{{worktree.path}}"}),"."]})]}),l?(0,t.jsxs)("span",{className:"rounded-full border border-blue-500/30 bg-blue-500/10 px-2.5 py-1 text-[11px] font-medium text-blue-400",children:["Active: ",l.name]}):(0,t.jsx)("span",{className:"rounded-full border border-[var(--card-border)] px-2.5 py-1 text-[11px] font-medium text-[var(--muted-foreground)]",children:"Active: AGX default"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:"Name"}),(0,t.jsx)("input",{type:"text",className:"rounded-lg border border-[var(--card-border)] bg-[var(--background)] px-3 py-2 text-sm text-[var(--foreground)] outline-none transition-colors focus:border-blue-500",placeholder:"Investigation-first",value:x,onChange:e=>m(e.target.value)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:"Prompt"}),(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-[var(--card-border)] bg-[var(--background)] transition-colors focus-within:border-blue-500 [&_.rich-text-editor_.ProseMirror]:min-h-[220px]",children:(0,t.jsx)(T.default,{content:p,onChange:f,placeholder:"Read {{ticket.identifier}} and the full comment thread in Linear before changing code.\nWrite your investigation to {{knowledge_base.issue_path}} and stop after posting a plan unless the issue is already approved for implementation."})})]}),h?(0,t.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-300",children:h}):null,(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg bg-blue-500 px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-600",onClick:N,children:[(0,t.jsx)(E.Save,{size:14}),"Save as new"]}),"edit"===c.type?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--card-border)] px-3 py-2 text-sm font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--background)]",onClick:()=>{if("edit"!==c.type)return void N();try{let e=i({id:c.scriptId,name:x,prompt:p});u({type:"edit",scriptId:e.id}),b(null)}catch(e){b(e instanceof Error?e.message:"Failed to update session script.")}},children:[(0,t.jsx)(E.Save,{size:14}),"Update"]}):null,"edit"===c.type?(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-red-500/30 px-3 py-2 text-sm font-medium text-red-300 transition-colors hover:bg-red-500/10",onClick:()=>{j(s.find(e=>e.id===c.scriptId)??null)},children:[(0,t.jsx)(M.Trash2,{size:14}),"Delete"]}):null,(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--card-border)] px-3 py-2 text-sm font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--background)] hover:text-[var(--foreground)]",onClick:w,children:[(0,t.jsx)(g.Plus,{size:14}),"Clear editor"]})]})]})]})]}),(0,t.jsx)(P.default,{isOpen:!!v,title:"Delete session script?",message:"This removes the saved script from this device for the current project.",preview:v?.name,confirmLabel:"Delete",variant:"danger",onConfirm:()=>{v&&(o(v.id),"edit"===c.type&&c.scriptId===v.id&&(u({type:"new"}),m(""),f("")),j(null),b(null))},onCancel:()=>j(null)})]})}var O=e.i(423709),U=e.i(44054);let D="agx-linear:boardFilters",F={search:"",assigneeIds:[],statuses:[],teamId:"",cycleId:"",sortBy:"activity",sortDir:"desc",hasActivity:!1};function _(){return void 0!==window.localStorage}function W(e){return Array.isArray(e)?Array.from(new Set(e.map(e=>"string"==typeof e?e.trim():"").filter(Boolean))):[]}function q(e){let t=String(e??"").trim().toLowerCase();return t?`${D}:${t}`:`${D}:global`}var B=e.i(169433),K=e.i(990933);function X(e,t){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||t}var G=e.i(906724);let J=[{id:"claude",label:"Claude Code",icon:"🟣"},{id:"codex",label:"Codex",icon:"⚫"},{id:"gemini",label:"Gemini CLI",icon:"🔵"}];function H({connected:e,user:s,clis:a,mcpConfigured:n,onConnect:i,onConnectWithKey:o,onDisconnect:l,onConfigureMcp:c,onContinue:u}){let[m,p]=(0,r.useState)(""),[f,g]=(0,r.useState)(null),[h,b]=(0,r.useState)(!1),[v,j]=(0,r.useState)(null),[y,w]=(0,r.useState)(null),N=async()=>{if(!m.trim())return;b(!0),g(null);let e=await o(m.trim());b(!1),e.ok||g(e.error||"Failed to connect")},k=async e=>{j(e),w(null);let t=await c(e);j(null),t.ok||w(t.error||"Failed to configure")},S=J.filter(e=>a[e.id]).some(e=>n[e.id]);return(0,t.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,t.jsxs)("div",{className:"w-full max-w-md space-y-6 px-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[e&&(0,t.jsx)("div",{className:"flex h-4 w-4 items-center justify-center rounded-full bg-green-500/20",children:(0,t.jsx)(d.Check,{size:10,className:"text-green-500"})}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Connect to Linear"})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Connect your workspace to browse tickets and execute them with agents."}),(0,t.jsx)("div",{className:"mt-3 space-y-3",children:e?(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2",children:[(0,t.jsxs)("div",{className:"text-xs text-[var(--foreground)]",children:["Connected as"," ",(0,t.jsx)("span",{className:"font-medium",children:s?.name})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:"text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:"Disconnect"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",onClick:i,className:"w-full rounded-md bg-[var(--foreground)] px-4 py-2 text-xs font-medium text-[var(--card-bg)] transition-opacity hover:opacity-90",children:"Connect with Linear"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-[var(--muted-foreground)]",children:[(0,t.jsx)("div",{className:"flex-1 border-t border-[var(--card-border)]"}),"or",(0,t.jsx)("div",{className:"flex-1 border-t border-[var(--card-border)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[10px] text-[var(--muted-foreground)] block mb-1",children:"Personal API key"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("input",{type:"password",value:m,onChange:e=>{p(e.target.value),g(null)},onKeyDown:e=>{"Enter"===e.key&&N()},placeholder:"lin_api_...",className:"flex-1 rounded-md border border-[var(--card-border)] bg-transparent px-3 py-1.5 text-xs text-[var(--foreground)] placeholder:text-[var(--muted-foreground)] focus:outline-none focus:ring-1 focus:ring-[var(--foreground)]"}),(0,t.jsx)("button",{type:"button",onClick:N,disabled:!m.trim()||h,className:"rounded-md border border-[var(--card-border)] px-3 py-1.5 text-xs text-[var(--foreground)] transition-colors hover:bg-[var(--card-border)] disabled:opacity-40",children:h?"...":"Save"})]}),f&&(0,t.jsx)("p",{className:"mt-1 text-[10px] text-red-400",children:f}),(0,t.jsxs)("a",{href:"https://linear.app/settings/api",target:"_blank",rel:"noopener noreferrer",className:"mt-1 inline-flex items-center gap-1 text-[10px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:["Generate at linear.app/settings/api",(0,t.jsx)(x.ExternalLink,{size:8})]})]})]})})]}),e&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-[var(--foreground)]",children:"Configure MCP"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:"Add the Linear MCP server to your AI tools so agents can read and update tickets during execution."}),(0,t.jsxs)("div",{className:"mt-3 space-y-1",children:[J.map(e=>{let r=a[e.id],s=n[e.id],i=v===e.id;return(0,t.jsxs)("div",{className:`flex items-center justify-between rounded-md border border-[var(--card-border)] px-3 py-2 ${!r?"opacity-40":""}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)("span",{children:e.icon}),(0,t.jsx)("span",{className:"text-[var(--foreground)]",children:e.label})]}),r?s?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-[10px] text-green-500",children:[(0,t.jsx)(d.Check,{size:10}),"Configured"]}):(0,t.jsx)("button",{type:"button",onClick:()=>k(e.id),disabled:i,className:"flex items-center gap-1 rounded px-2 py-0.5 text-[10px] text-[var(--foreground)] border border-[var(--card-border)] hover:bg-[var(--card-border)] transition-colors disabled:opacity-50",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(G.Loader2,{size:10,className:"animate-spin"}),"Configuring..."]}):"Configure"}):(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"Not installed"})]},e.id)}),y&&(0,t.jsx)("p",{className:"mt-1 text-[10px] text-red-400",children:y})]}),(0,t.jsx)("button",{type:"button",onClick:u,className:"mt-4 w-full rounded-md bg-[var(--foreground)] px-4 py-2 text-xs font-medium text-[var(--card-bg)] transition-opacity hover:opacity-90",children:S?"Continue":"Skip for now"})]})]})})}var Y=e.i(51297),V=e.i(367859),Q=e.i(524507),Z=e.i(667480),ee=e.i(154248);let et=(0,n.default)(()=>e.A(469612),{loadableGenerated:{modules:[668610]},ssr:!1});function er({children:e}){return(0,t.jsx)("label",{className:"block text-[10px] font-semibold text-[var(--muted-foreground)] uppercase tracking-widest mb-2",children:e})}function es({title:e,expanded:r,onToggle:s,children:a}){return(0,t.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] overflow-hidden",children:[(0,t.jsxs)("button",{type:"button",onClick:s,className:"flex w-full items-center gap-2 px-4 py-3 text-left text-xs font-semibold text-[var(--muted-foreground)] uppercase tracking-widest hover:text-[var(--foreground)] transition-colors",children:[r?(0,t.jsx)(c.ChevronDown,{size:12}):(0,t.jsx)(V.ChevronRight,{size:12}),e]}),r&&(0,t.jsx)("div",{className:"border-t border-[var(--card-border)]",children:a})]})}function ea({projectId:e}){let[s,a]=(0,r.useState)(null),[n,i]=(0,r.useState)([]),[o,l]=(0,r.useState)(!0),[d,c]=(0,r.useState)(!1),[u,x]=(0,r.useState)(ee.LINEAR_WORKER_DEFAULT_PROMPT),[m,p]=(0,r.useState)(ee.LINEAR_WORKER_DEFAULT_SCRIPT_PROMPT),[g,b]=(0,r.useState)("*/30 * * * *"),[v,j]=(0,r.useState)(""),[y,w]=(0,r.useState)(""),[N,k]=(0,r.useState)(!1),[S,C]=(0,r.useState)(!0),I=(0,r.useRef)(!1),A=(0,r.useCallback)(async()=>{try{let t=new URLSearchParams;e&&t.set("projectId",e);let r=await fetch(`/api/linear/worker?${t}`);if(!r.ok)return;let s=await r.json();s.job&&(a(s.job),x(s.job.prompt||ee.LINEAR_WORKER_DEFAULT_PROMPT),p(s.job.scriptPrompt||ee.LINEAR_WORKER_DEFAULT_SCRIPT_PROMPT),b(s.job.cronExpr||s.job.cadence||"*/30 * * * *"),j(s.job.condition||""),w(s.job.teamId||""))}catch{}finally{l(!1)}},[e]),R=(0,r.useCallback)(async()=>{if(e)try{let t=await fetch(`/api/projects/${e}/teams`);if(!t.ok)return;let r=((await t.json()).teams??[]).map(e=>({id:e.id,name:e.name}));i(r)}catch{}},[e]);(0,r.useEffect)(()=>{I.current||(I.current=!0,A(),R())},[A,R]),(0,r.useEffect)(()=>{let e=setInterval(A,15e3);return()=>clearInterval(e)},[A]);let L=(0,r.useCallback)(async()=>{c(!0);try{let t={prompt:u,scriptPrompt:m,cadence:g,condition:v,teamId:y};e&&(t.projectId=e);let r=await fetch("/api/linear/worker",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(r.ok){let e=await r.json();a(e.job)}}catch{}finally{c(!1)}},[u,m,g,v,y,e]),$=(0,r.useCallback)(async()=>{if(!s)return void await L();c(!0);try{let t="active"===s.state?"paused":"active",r=await fetch("/api/linear/worker",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:e,state:t})});if(r.ok){let e=await r.json();a(e.job)}}catch{}finally{c(!1)}},[s,e,L]);if(o)return(0,t.jsxs)("div",{className:"flex items-center gap-2 py-12 justify-center text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)(h.RefreshCw,{size:14,className:"animate-spin"}),"Loading Linear Worker..."]});let E=s?.state==="active";return(0,t.jsxs)("div",{className:"flex flex-col gap-4 h-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-4 text-xs text-[var(--muted-foreground)]",children:s&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:`rounded-full border px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.16em] ${E?"border-emerald-500/30 bg-emerald-500/10 text-emerald-400":"border-yellow-500/30 bg-yellow-500/10 text-yellow-400"}`,children:s.state}),(0,t.jsxs)("span",{children:["Next: ",(0,t.jsx)("span",{className:"text-[var(--foreground)]",children:function(e,t){if("paused"===t)return"Paused";if("stopped"===t)return"Stopped";if(null===e)return"Pending";let r=e-Date.now();return r<0?"Overdue":r<6e4?`in ${Math.round(r/1e3)}s`:r<36e5?`in ${Math.round(r/6e4)}m`:r<864e5?`in ${Math.round(r/36e5)}h`:`in ${Math.round(r/864e5)}d`}(s.nextRunAt,s.state)})]}),(0,t.jsxs)("span",{children:["Last: ",(0,t.jsx)("span",{className:"text-[var(--foreground)]",children:function(e){if(!e)return"Never";let t=Date.now()-e;return t<6e4?"Just now":t<36e5?`${Math.round(t/6e4)}m ago`:t<864e5?`${Math.round(t/36e5)}h ago`:`${Math.round(t/864e5)}d ago`}(s.lastRunAt)})]}),s.lastOutcome&&(0,t.jsxs)("span",{children:["Outcome:"," ",(0,t.jsx)("span",{className:"success"===s.lastOutcome?"text-emerald-400":"failed"===s.lastOutcome?"text-red-400":"text-[var(--foreground)]",children:s.lastOutcome})]})]})}),(0,t.jsx)("button",{type:"button",disabled:d,onClick:$,className:`flex items-center gap-1.5 rounded-lg border px-3 py-1.5 text-xs font-medium transition-colors ${E?"border-yellow-500/30 bg-yellow-500/10 text-yellow-400 hover:bg-yellow-500/20":"border-emerald-500/30 bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20"}`,children:E?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Q.Pause,{size:12})," Pause"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Play,{size:12})," ",s?"Resume":"Enable"]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-6 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"flex flex-1 min-w-0 flex-col gap-4",children:[(0,t.jsx)(es,{title:"How to pick a ticket",expanded:N,onToggle:()=>k(!N),children:(0,t.jsx)("div",{className:"min-h-[120px] overflow-y-auto resize-y",style:{height:320},children:(0,t.jsx)(et,{content:u,onChange:e=>x(e),placeholder:"Describe how to pick which ticket to work on..."})})}),(0,t.jsx)(es,{title:"How to work a ticket",expanded:S,onToggle:()=>C(!S),children:(0,t.jsx)("div",{className:"min-h-[300px] max-h-[50vh] overflow-y-auto",children:(0,t.jsx)(et,{content:m,onChange:e=>p(e),placeholder:"Instructions injected into the agent session when working a ticket..."})})})]}),(0,t.jsxs)("div",{className:"w-[340px] shrink-0 space-y-6",children:[n.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)(er,{children:"Team"}),(0,t.jsx)(Z.SimpleDropdown,{value:y||"",options:[{value:"",label:"Select a team"},...n.map(e=>({value:e.id,label:e.name}))],onChange:e=>w(e),ariaLabel:"Select team"}),(0,t.jsx)("p",{className:"mt-1.5 text-[10px] text-[var(--muted-foreground)]",children:"Agents in this team become default participants of the linear chat."})]}),(0,t.jsx)(Z.ScheduleConditionPicker,{value:{cadence:g,condition:v},onChange:e=>{b(e.cadence),j(e.condition)},scheduleLabel:"Schedule",conditionLabel:"Condition"})]})]}),(0,t.jsx)("div",{className:"flex shrink-0 justify-end pt-2",children:(0,t.jsx)("button",{type:"button",disabled:d,onClick:L,className:"rounded-lg bg-[var(--foreground)] px-5 py-2 text-sm font-medium text-[var(--background)] transition-opacity hover:opacity-90 disabled:opacity-40",children:d?"Saving...":"Save configuration"})})]})}function en({connected:e,user:s,clis:a,mcpConfigured:n,onConnect:i,onConnectWithKey:o,onDisconnect:l,onConfigureMcp:d,onClose:c,projectId:u}){let[x,m]=(0,r.useState)(e?"worker":"connection"),f=[{id:"connection",label:"Connection",icon:(0,t.jsx)(p,{size:14})},{id:"worker",label:"Linear Worker",icon:(0,t.jsx)(Y.Bot,{size:14}),disabled:!e}];return(0,t.jsx)("div",{className:"absolute inset-0 z-30 flex items-center justify-center bg-black/50",children:(0,t.jsxs)("div",{className:"relative flex w-full max-w-6xl flex-col rounded-lg border border-[var(--card-border)] bg-[var(--background)] shadow-xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,t.jsx)("div",{className:"flex items-center gap-6",children:f.map(e=>{let r=x===e.id;return(0,t.jsxs)("button",{onClick:()=>!e.disabled&&m(e.id),disabled:e.disabled,className:`relative flex items-center gap-2 py-4 text-sm font-semibold transition-colors ${r?"text-[var(--foreground)]":e.disabled?"cursor-not-allowed text-[var(--muted-foreground)]/40":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[e.icon,e.label,r&&(0,t.jsx)("span",{className:"absolute bottom-0 left-0 right-0 h-[2px] rounded-full bg-[var(--foreground)]"})]},e.id)})}),(0,t.jsx)("button",{type:"button",className:"rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:c,children:(0,t.jsx)(y.X,{size:18})})]}),(0,t.jsxs)("div",{className:"flex-1 min-h-0 max-h-[80vh] overflow-y-auto p-6",children:["connection"===x&&(0,t.jsx)(H,{connected:e,user:s,clis:a,mcpConfigured:n,onConnect:i,onConnectWithKey:o,onDisconnect:l,onConfigureMcp:d,onContinue:c}),"worker"===x&&e&&(0,t.jsx)(ea,{projectId:u})]})]})})}let ei=(0,n.default)(()=>e.A(501223).then(e=>e.Composer),{loadableGenerated:{modules:[844118]},ssr:!1});function eo({onResize:e}){let s=(0,r.useRef)(!1),a=(0,r.useRef)(0);return(0,r.useEffect)(()=>{if(!s.current)return;let t=t=>{let r=t.clientX-a.current;a.current=t.clientX,e(r)},r=()=>{s.current=!1,document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",r)};return window.addEventListener("mousemove",t),window.addEventListener("mouseup",r),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",r)}}),(0,t.jsx)("div",{className:"group relative z-10 w-0 shrink-0 cursor-col-resize",onMouseDown:e=>{e.preventDefault(),s.current=!0,a.current=e.clientX,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},children:(0,t.jsx)("div",{className:"absolute inset-y-0 -left-0.5 w-1 transition-colors group-hover:bg-[var(--primary)]/40"})})}function el(e,t,r=20){let s=t?t.replace("#",""):"e2e8f0";return`https://api.dicebear.com/9.x/bottts-neutral/svg?seed=${encodeURIComponent(e)}&size=${r}&backgroundColor=${s}`}function ed(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function ec(e){if("chat"===e.mode)switch(e.status){case"queued":return{label:"starting",tone:"queued"};case"running":return{label:"thinking",tone:"running"};case"success":return{label:"ready",tone:"ready"};case"failed":return{label:"error",tone:"failed"};case"cancelled":return{label:"stopped",tone:"cancelled"}}return{label:function(e){switch(e){case"queued":return"queued";case"running":return"running";case"success":return"success";case"failed":return"failed";case"cancelled":return"cancelled";default:return e}}(e.status),tone:e.status}}function eu(e){let t=e.sessionTitle?.trim();return t||("scripted"===e.mode?"Scripted session":"Chat session")}let ex={"In Progress":"In Prog","In Review":"Review",Backlog:"Backlog",Todo:"Todo",Done:"Done",Cancelled:"Cancl."},em={queued:"bg-amber-500/10 border-amber-500/20 text-amber-400",running:"bg-yellow-500/10 border-yellow-500/20 text-yellow-400",ready:"bg-sky-500/10 border-sky-500/20 text-sky-400",success:"bg-emerald-500/10 border-emerald-500/20 text-emerald-400",failed:"bg-red-500/10 border-red-500/20 text-red-400",cancelled:"bg-zinc-500/10 border-zinc-500/20 text-zinc-400"},ep={queued:"bg-amber-400",running:"bg-yellow-400",ready:"bg-sky-400",success:"bg-emerald-400",failed:"bg-red-400",cancelled:"bg-zinc-400"},ef={queued:"text-amber-500",running:"text-yellow-500",ready:"text-sky-500",success:"text-green-500",failed:"text-red-500",cancelled:"text-[var(--muted-foreground)]"};function eg({label:e,value:r,options:s,activeClasses:a,onChange:n,disabled:i=!1}){let o=r.trim().length>0;return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("select",{"aria-label":e,className:`max-w-[160px] appearance-none rounded-full border bg-transparent px-2.5 py-0.5 pr-6 text-[11px] font-medium outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${o?a:"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,value:r,disabled:i,onChange:e=>n(e.target.value),children:s.map(r=>(0,t.jsx)("option",{value:r.value,children:r.label},`${e}-${r.value||"all"}`))}),(0,t.jsx)(c.ChevronDown,{size:12,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-current"})]})}function eh({status:e,options:r,onChange:s,disabled:a=!1,updating:n=!1}){return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("select",{"aria-label":"Ticket status",className:"max-w-[160px] appearance-none rounded-md border border-[var(--card-border)] bg-[var(--card-bg)] px-2.5 py-1 pr-8 text-xs font-medium text-[var(--foreground)] outline-none transition-colors hover:border-[var(--muted-foreground)] disabled:cursor-not-allowed disabled:opacity-60",value:e,disabled:a||n,onChange:e=>s(e.target.value),children:r.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},`ticket-status-${e.value}`))}),n?(0,t.jsx)(h.RefreshCw,{size:12,className:"pointer-events-none absolute right-6 top-1/2 -translate-y-1/2 animate-spin text-[var(--muted-foreground)]"}):null,(0,t.jsx)(c.ChevronDown,{size:12,className:"pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)]"})]})}function eb({label:e,values:s,options:a,activeClasses:n,onChange:i,emptyLabel:o}){let[l,u]=(0,r.useState)(!1),x=(0,r.useRef)(null),m=a.filter(e=>e.value&&s.includes(e.value)),p=m.length>0,f=(()=>{if(0===m.length||m.length===a.length)return o??e;if(1===m.length)return m[0]?.label??o??e;let t=e.toLowerCase();return`${m.length} ${t}${t.endsWith("s")?"es":"s"}`})();(0,r.useEffect)(()=>{if(!l)return;let e=e=>{x.current&&!x.current.contains(e.target)&&u(!1)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[l]);let g=(0,r.useCallback)(e=>{e?i(s.includes(e)?s.filter(t=>t!==e):[...s,e]):i([])},[i,s]);return(0,t.jsxs)("div",{className:"relative",ref:x,children:[(0,t.jsxs)("button",{type:"button","aria-label":e,"aria-haspopup":"listbox","aria-expanded":l,className:`flex max-w-[180px] items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] font-medium transition-colors ${p?n:"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,onClick:()=>u(e=>!e),children:[(0,t.jsx)("span",{className:"max-w-[132px] truncate",children:f}),(0,t.jsx)(c.ChevronDown,{size:12,className:`shrink-0 transition-transform ${l?"rotate-180":""}`})]}),l?(0,t.jsxs)("div",{role:"listbox","aria-label":`${e} options`,"aria-multiselectable":"true",className:"absolute left-0 top-full z-50 mt-1 min-w-[240px] overflow-hidden rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!p,className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors ${!p?"bg-[var(--background)] font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--background)] hover:text-[var(--foreground)]"}`,onClick:()=>i([]),children:[(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${!p?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:p?null:(0,t.jsx)(d.Check,{size:10})}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:o??e})]}),m.length>0?(0,t.jsx)("div",{className:"px-3 pb-1 pt-2 text-[10px] font-medium uppercase tracking-[0.12em] text-[var(--muted-foreground)]",children:"Selected"}):null,a.filter(e=>e.value).map(r=>{let a=s.includes(r.value);return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":a,className:`flex w-full items-center gap-2 rounded-lg px-3 py-2 text-left text-xs transition-colors ${a?"bg-[var(--background)] font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--background)] hover:text-[var(--foreground)]"}`,onClick:()=>g(r.value),children:[(0,t.jsx)("span",{className:`flex h-4 w-4 shrink-0 items-center justify-center rounded border ${a?"border-blue-500 bg-blue-500 text-white":"border-[var(--card-border)]"}`,children:a?(0,t.jsx)(d.Check,{size:10}):null}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r.label})]},`${e}-${r.value}`)})]}):null]})}function ev({issue:e,participants:s,projectId:a,projectSlug:n,issueStatusOptions:i,issueStatusUpdating:o,onIssueStatusChange:l,activeSessionScriptLabel:d,onOpenSessionScripts:c,onStartScriptedSession:u,createRun:x,updateRun:p,onRunCreated:g}){let h=s[0],b=(0,r.useRef)(null);b.current||(b.current=globalThis.crypto?.randomUUID?.()??`thread-${Date.now()}-${Math.random().toString(36).slice(2)}`);let{messages:v,setMessages:y,sendMessage:w,chatRuns:N}=(0,R.useGroupChat)(b.current),{processes:k,streaming:S}=(0,L.useProcessPolling)({workspaceId:b.current},{messages:v,setMessages:y}),C=new Set(["queued","running","awaiting_user","blocked"]),I=N.some(e=>C.has(e.status))||k.some(e=>"spawning"===e.state||"running"===e.state)?N.some(e=>"queued"===e.status)?"queued":"working":"ready",A=(0,r.useMemo)(()=>new Map(s.map(e=>[e.id,e])),[s]),E=(0,r.useRef)(!1),M=(0,r.useCallback)(async(t,r,i,o,l,d,c)=>{if(E.current)return;E.current=!0;let u=(l?s.find(e=>e.id===l):null)??h;if(u)try{var m,f,b;let r,s,i,o,l,h,v,j,y,w,N,k,S,C,I,A,R,L,$,E,{promptPrefix:M}=(i=(f={issue:{identifier:e.identifier,title:e.title,status:e.status,assignee:e.assignee},project:n?{slug:n}:null}).issue.identifier.trim()||"TICKET-ID",o=f.issue.title.trim()||"Untitled ticket",l=String(f.issue.status??"").trim()||"Unknown",h=String(f.issue.assignee??"").trim()||"Unassigned",v=function(e){let t=String(e?.slug??"").trim();if(t)return X(t,"project");let r=String(e?.name??"").trim();return r?X(r,"project"):"project"}(f.project),j=String(f.project?.name??"").trim()||v,y=String(f.runtime?.knowledgeBaseRoot??"").trim()||`~/.agx/vault/${v}`,w=String(f.runtime?.issueKnowledgePath??"").trim()||`${y}/issues/${i}/`,N=String(f.runtime?.isolatedWorktreePath??"").trim()||`/tmp/agx-${X(i,"ticket")}`,S=(k={issue:{identifier:i,title:o,status:l,assignee:h},project:{name:j,slug:v,label:(b=f.project,r=String(b?.name??"").trim(),s=String(b?.slug??"").trim(),r&&s?`${r} (${s})`:r||s||"current project"),repos:f.project?.repos?[...f.project.repos]:[]},runtime:{knowledgeBaseRoot:y,issueKnowledgePath:w,isolatedWorktreePath:N}}).issue.identifier,C=k.issue.title,I=k.issue.status,A=k.issue.assignee,R=k.runtime.knowledgeBaseRoot,L=k.runtime.issueKnowledgePath,$=k.runtime.isolatedWorktreePath,E=`LINEAR TASK EXECUTION
|
|
2
|
-
|
|
3
|
-
You are an engineer working through a single Linear ticket. Work like a careful teammate: continue existing work when present, investigate before coding, present a plan before implementation, ask clarifying questions when requirements are ambiguous, and stop cleanly when blocked instead of guessing.
|
|
4
|
-
|
|
5
|
-
INJECTED CONTEXT
|
|
6
|
-
- Ticket: ${S}
|
|
7
|
-
- Title: ${C}
|
|
8
|
-
- Current status: ${I}
|
|
9
|
-
- Current assignee: ${A}
|
|
10
|
-
- Project: ${k.project.label}
|
|
11
|
-
- Knowledge base root: ${R}
|
|
12
|
-
- Issue knowledge path: ${L}
|
|
13
|
-
- Suggested isolated worktree: ${$}
|
|
14
|
-
- Additional project resources such as repo knowledge, project memory, and project variables are injected separately by the active project context.
|
|
15
|
-
|
|
16
|
-
SOURCE REPOSITORIES
|
|
17
|
-
${!(m=k.project.repos)||0===m.length?"- Use the active project context to discover the right repository or workspace; do not hardcode paths.":m.map(e=>{let t=[e.name.trim()||"repository"],r=String(e.path??"").trim(),s=String(e.notes??"").trim();return r&&t.push(`path: ${r}`),s&&t.push(`notes: ${s}`),`- ${t.join(" | ")}`}).join("\n")}
|
|
18
|
-
|
|
19
|
-
WORKFLOW
|
|
20
|
-
1. Read the full Linear issue and comment thread before acting. Use Linear MCP for issue details, comments, state changes, and follow-up.
|
|
21
|
-
2. Prefer resuming existing work: existing knowledge-base notes, branches, PRs, or prior discussion.
|
|
22
|
-
3. If requirements are unclear, ask specific clarifying questions in Linear and stop.
|
|
23
|
-
4. If the ticket is fresh, investigate first, capture findings in the knowledge base, write a plan, and share the plan before implementation.
|
|
24
|
-
5. If a reviewed plan already exists or the ticket is explicitly ready for implementation, implement in an isolated worktree or equivalent isolated workspace rather than a shared checkout.
|
|
25
|
-
6. Validate with the appropriate tests, linting, type checks, and manual verification for the change.
|
|
26
|
-
7. Keep Linear accurate: comments, links, statuses, blockers, and PR references should match reality.
|
|
27
|
-
8. Keep the knowledge base current with what you learned, what changed, and what remains.
|
|
28
|
-
9. Work on exactly this ticket during this session.
|
|
29
|
-
|
|
30
|
-
RULES
|
|
31
|
-
- Use the injected project context instead of hardcoded repo-specific paths or conventions.
|
|
32
|
-
- Use knowledge base terminology; the filesystem path above is the storage location.
|
|
33
|
-
- If a PR already exists, focus on CI failures, reviewer feedback, merge status, or ticket follow-up instead of starting over.
|
|
34
|
-
- Leave the ticket and the knowledge base in a resumable state at the end of the session. Clean up temporary worktrees or session claims if your workflow created them.
|
|
35
|
-
|
|
36
|
-
`,{prompt:`Work on this Linear ticket: ${S} - ${C}`,promptPrefix:E}),P=M+(d?`
|
|
37
|
-
${d}`:""),T=await x({projectId:a??null,projectSlug:n??null,issueId:e.id,issueIdentifier:e.identifier,issueTitle:e.title,issueStatus:e.status,issueAssignee:e.assignee??null,agentId:u.id,agentName:u.name,mode:"chat"}),z=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:t,promptPrefix:P,threadId:T.threadId,activeParticipantIds:[u.id],projectSlug:n??void 0,routing:c})}),O=await z.json().catch(()=>({}));if(!z.ok||!O.chatRunId||!O.userMessageId)throw Error(O.error||"Failed to start chat session");await p(T.id,{chatRunId:O.chatRunId,rootMessageId:O.userMessageId}),g(T.id)}catch(e){console.error("Failed to create chat session:",e),E.current=!1,e instanceof Error&&window.alert(e.message)}},[e,s,h,a,n,x,p,g]);return(0,t.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,t.jsxs)("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)("span",{className:"shrink-0 font-mono text-sm text-[var(--muted-foreground)]",children:e.identifier}),(0,t.jsx)("div",{className:"h-1 w-1 shrink-0 rounded-full bg-[var(--card-border)]"}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:e.title})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(eh,{status:e.status,options:i,disabled:0===i.length,updating:o,onChange:t=>l(e,t)}),(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1 rounded-md border border-[var(--card-border)] px-2 py-1 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:c,title:`Session script: ${d}. Choose or edit the kickoff prompt for this ticket.`,children:[(0,t.jsx)(m.FileText,{size:12}),(0,t.jsx)("span",{className:"max-w-[120px] truncate",children:"AGX default"===d?"Session script":d})]}),(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-md bg-blue-500 px-2.5 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600",onClick:u,children:[(0,t.jsx)(f.Play,{size:12}),(0,t.jsx)("span",{children:"Start scripted session"})]})]})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 pb-64",children:0===v.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-[var(--muted-foreground)]",children:[(0,t.jsx)("span",{className:"text-sm",children:"Start a new session for this ticket"}),(0,t.jsx)("span",{className:"text-xs",children:"Type a message to open a chat, or launch the active session script."})]}):(0,t.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8",children:[v.map(e=>{let r=e.participantId?A.get(e.participantId):null,s=(0,O.stripMarkers)(e.content);return s.trim()?(0,t.jsxs)("div",{className:"flex gap-3",children:["user"===e.role?(0,t.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--app-shell-subtle,var(--card-bg))]",children:(0,t.jsx)(j.User,{className:"h-3.5 w-3.5 text-[var(--muted-foreground)]"})}):(0,t.jsx)("img",{src:el(e.participantId??"",r?.color),alt:r?.name??"Agent",className:"h-7 w-7 shrink-0 rounded-full object-cover"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-[var(--foreground)]",children:"user"===e.role?"You":r?.name??"Agent"}),(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,t.jsx)($.Markdown,{content:s,isUser:"user"===e.role})})]})]},e.id):null}),Object.entries(S).map(([e])=>{let r=A.get(e);return(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)("img",{src:el(e,r?.color),alt:r?.name??"Agent",className:"h-7 w-7 shrink-0 rounded-full object-cover"}),r?.name??"Agent"," is thinking..."]},`stream-${e}`)})]})}),(0,t.jsx)("div",{className:"absolute bottom-3 left-3 right-3 p-2",children:(0,t.jsx)(ei,{onSend:M,onStop:()=>{},participants:s,projectSlug:n??void 0,loading:"ready"!==I,commands:[],activityStatus:I,placeholder:`Ask about ${e.identifier}...`,initialPinnedParticipantId:h?.id})})]})}function ej({issue:e,run:s,participants:a,issueStatusOptions:n,issueStatusUpdating:i,onIssueStatusChange:o}){let{messages:l,setMessages:d,sendMessage:c,loadHistory:x,stop:m}=(0,R.useGroupChat)(s.threadId),{processes:p,streaming:f,chatRuns:g}=(0,L.useProcessPolling)(s.rootMessageId?{workspaceId:s.threadId,threadId:s.rootMessageId}:{workspaceId:s.threadId},{messages:l,setMessages:d}),h=(0,r.useMemo)(()=>{let e=g[0];if(!e)return ec(s);let t={queued:"queued",running:"running",awaiting_user:"running",blocked:"running",completed:"success",failed:"failed",cancelled:"cancelled"}[e.status]??s.status;return ec({...s,status:t})},[g,s]);(0,r.useEffect)(()=>{x()},[x,s.threadId]);let b=(0,r.useMemo)(()=>new Map(a.map(e=>[e.id,e])),[a]),v=new Set(["queued","running","awaiting_user","blocked"]),y=g.some(e=>v.has(e.status))||p.some(e=>"spawning"===e.state||"running"===e.state)?g.some(e=>"queued"===e.status)?"queued":"working":"ready",w=(0,r.useCallback)((e,t,r,n,i,o,l)=>{s.rootMessageId&&c(e,t,void 0,s.rootMessageId,r,void 0,(0,K.orderParticipantIds)(a.map(e=>e.id),i),s.projectSlug??void 0,o,l)},[a,s.projectSlug,s.rootMessageId,c]);return(0,t.jsxs)("div",{className:"relative flex min-w-0 flex-1 flex-col overflow-hidden",children:[(0,t.jsxs)("header",{className:"flex h-12 shrink-0 items-center justify-between border-b border-[var(--card-border)] px-6",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)("span",{className:"shrink-0 font-mono text-sm text-[var(--muted-foreground)]",children:e.identifier}),(0,t.jsx)("div",{className:"h-1 w-1 shrink-0 rounded-full bg-[var(--card-border)]"}),(0,t.jsx)("span",{className:"truncate text-sm font-medium text-[var(--foreground)]",children:eu(s)})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-4",children:[(0,t.jsx)(eh,{status:e.status,options:n,disabled:0===n.length,updating:i,onChange:t=>o(e,t)}),(0,t.jsxs)("div",{className:`flex items-center gap-2 rounded-md border px-2.5 py-1 ${em[h.tone]}`,children:[(0,t.jsx)("div",{className:`h-1.5 w-1.5 rounded-full ${ep[h.tone]}`}),(0,t.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:h.label})]}),null!=s.durationMs&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)(u.Clock,{size:14}),(0,t.jsxs)("span",{children:[(s.durationMs/1e3).toFixed(1),"s"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-[var(--card-border)] bg-[var(--card-bg)] px-2 py-1",children:[(0,t.jsx)("img",{src:el(s.agentId,b.get(s.agentId)?.color),alt:s.agentName,className:"h-5 w-5 rounded-full object-cover"}),(0,t.jsx)("span",{className:"pr-1 text-xs font-medium",children:s.agentName})]})]})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-6 py-6 pb-64",children:0===l.length?(0,t.jsx)("div",{className:"py-8 text-center text-xs text-[var(--muted-foreground)]",children:"queued"===s.status||"running"===s.status?"Starting session...":"No thread messages yet."}):(0,t.jsxs)("div",{className:"mx-auto max-w-4xl space-y-8",children:[l.map(e=>{let r=e.participantId?b.get(e.participantId):null,a=(0,O.stripMarkers)(e.content);if(!a.trim())return null;let n=e.participantId??s.agentId;return(0,t.jsxs)("div",{className:"flex gap-3",children:["user"===e.role?(0,t.jsx)("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-[var(--app-shell-subtle,var(--card-bg))]",children:(0,t.jsx)(j.User,{className:"h-3.5 w-3.5 text-[var(--muted-foreground)]"})}):(0,t.jsx)("img",{src:el(n,r?.color),alt:r?.name??s.agentName,className:"h-7 w-7 shrink-0 rounded-full object-cover"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 flex flex-col gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:"user"===e.role?(0,t.jsx)("span",{className:"text-sm font-semibold text-[var(--foreground)]",children:"You"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-sm font-semibold",style:{color:r?.color??"var(--foreground)"},children:r?.name??s.agentName}),(0,t.jsx)("span",{className:"rounded bg-[var(--card-bg)] px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Agent"})]})}),(0,t.jsx)("span",{className:"text-xs text-[var(--muted-foreground)]",children:new Date(e.timestamp).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})})]}),"user"===e.role?(0,t.jsx)("div",{className:"w-fit max-w-[85%] rounded-xl rounded-tl-sm border border-[var(--card-border)] bg-[var(--card-bg)] px-4 py-3 text-sm text-[var(--foreground)]",children:(0,t.jsx)($.Markdown,{content:a,isUser:!0})}):(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,t.jsx)($.Markdown,{content:a,isUser:!1})})]})]},e.id)}),Object.entries(f).filter(([,e])=>!s.rootMessageId||e.rootMessageId===s.rootMessageId).map(([e])=>{let r=b.get(e);return(0,t.jsxs)("div",{className:"flex items-center gap-3 text-sm text-[var(--muted-foreground)]",children:[(0,t.jsx)("img",{src:el(e,r?.color),alt:r?.name??s.agentName,className:"h-7 w-7 shrink-0 rounded-full object-cover"}),r?.name??s.agentName," is thinking..."]},`stream-${e}`)})]})}),(0,t.jsx)("div",{className:"absolute bottom-3 left-3 right-3 p-2",children:s.rootMessageId?(0,t.jsx)(ei,{onSend:w,onStop:m,participants:a,projectSlug:s.projectSlug??void 0,loading:"ready"!==y,commands:[],activityStatus:y,placeholder:"Continue this session...",initialPinnedParticipantId:s.agentId}):(0,t.jsx)("div",{className:"px-2 py-1 text-xs text-[var(--muted-foreground)]",children:"Waiting for the session to start..."})})]})}function ey({issue:e,selected:s,onSelect:a,activeAgents:n,participants:i}){let[o,l]=(0,r.useState)(!1),c=(0,r.useRef)(null);(0,r.useEffect)(()=>()=>{c.current&&window.clearTimeout(c.current)},[]);let u=(0,r.useCallback)(async t=>{if(t.stopPropagation(),e.url)try{await navigator.clipboard.writeText(e.url),l(!0),c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{l(!1)},1500)}catch(e){console.error("Failed to copy Linear issue URL:",e),l(!1)}},[e.url]),m=(0,r.useCallback)(t=>{if(t.stopPropagation(),e.url){var r;let t;r=e.url,t=window.open(r,"_blank","noopener,noreferrer"),t?.focus()}},[e.url]),f=ex[e.status]??e.status.slice(0,6);return(0,t.jsxs)("div",{className:`group relative flex cursor-pointer items-center gap-3 px-4 py-2.5 text-sm transition-colors ${s?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]/50"}`,onClick:a,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),a())},children:[s&&(0,t.jsx)("div",{className:"absolute left-0 top-0 bottom-0 w-[3px] rounded-r-full bg-blue-500"}),(0,t.jsx)("span",{className:"w-24 shrink-0 whitespace-nowrap font-mono text-xs text-[var(--muted-foreground)]",children:e.identifier}),(0,t.jsx)("span",{className:`min-w-0 flex-1 truncate text-xs ${s?"font-medium text-[var(--foreground)]":"text-[var(--muted-foreground)]"}`,children:e.title}),(0,t.jsx)("span",{className:"shrink-0 text-xs text-[var(--muted-foreground)]",children:f}),n&&n.length>0&&(0,t.jsx)("span",{className:"inline-flex items-center -space-x-1 shrink-0",children:n.slice(0,3).map(e=>{let r=i?.find(t=>t.id===e.agentId);return(0,t.jsxs)("span",{className:"relative inline-block",title:r?.name??e.agentName,children:[(0,t.jsx)("img",{src:el(e.agentId,r?.color,16),alt:r?.name??e.agentName,className:"h-3 w-3 rounded-full ring-[1.5px] ring-[var(--app-shell-pane)]"}),(0,t.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,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,t.jsx)("button",{type:"button",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-[var(--muted-foreground)] transition-all hover:bg-zinc-700 hover:text-[var(--foreground)] ${s?"opacity-100":"opacity-0 group-hover:opacity-100"} ${e.url?"":"cursor-not-allowed opacity-40 hover:bg-transparent hover:text-[var(--muted-foreground)]"}`,onClick:e=>{u(e)},title:o?"Copied ticket URL":"Copy ticket URL","aria-label":o?"Copied ticket URL":"Copy ticket URL",disabled:!e.url,children:o?(0,t.jsx)(d.Check,{size:10,className:"text-emerald-400"}):(0,t.jsx)(p,{size:10})}),(0,t.jsx)("button",{type:"button",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded text-[var(--muted-foreground)] transition-all hover:bg-zinc-700 hover:text-[var(--foreground)] ${s?"opacity-100":"opacity-0 group-hover:opacity-100"} ${e.url?"":"cursor-not-allowed opacity-40 hover:bg-transparent hover:text-[var(--muted-foreground)]"}`,onClick:m,title:e.url?"Open this Linear ticket in a new tab":"This ticket does not have a Linear URL","aria-label":e.url?"Open this Linear ticket in a new tab":"This ticket does not have a Linear URL",disabled:!e.url,children:(0,t.jsx)(x.ExternalLink,{size:10})})]})]})}function ew({projectId:e,projectSlug:s,initialShowSettings:a}){let{isTouchLayout:n}=(0,U.useInputCapabilities)(),{connected:i,loading:d,user:c,clis:u,mcpConfigured:x,connect:m,connectWithKey:p,disconnect:f,configureMcp:j}=(0,N.useLinearConnection)(),[k,R]=(0,r.useState)(!1),[L,$]=(0,r.useState)(a??!1),[E,M]=(0,r.useState)(!1),[P,T]=(0,r.useState)(()=>(0,B.loadLinearTicketPanelWidth)()||576),[O,D]=(0,r.useState)(()=>(0,B.loadLinearRunsPanelWidth)()||224),[K,X]=(0,r.useState)(""),[G,J]=(0,r.useState)(""),[Y,V]=(0,r.useState)(!1),[Q,Z]=(0,r.useState)([]),[ee,et]=(0,r.useState)([]),[er,es]=(0,r.useState)([]),[ea,ei]=(0,r.useState)([]),[ex,em]=(0,r.useState)([]),[ep,eh]=(0,r.useState)([]),[eN,ek]=(0,r.useState)(""),[eS,eC]=(0,r.useState)(""),[eI,eA]=(0,r.useState)("activity"),[eR,eL]=(0,r.useState)("desc"),[e$,eE]=(0,r.useState)(!1),[eM,eP]=(0,r.useState)(null),[eT,ez]=(0,r.useState)(null),[eO,eU]=(0,r.useState)([]),[eD,eF]=(0,r.useState)(new Map),[e_,eW]=(0,r.useState)(null),[eq,eB]=(0,r.useState)(null),[eK,eX]=(0,r.useState)("runs"),eG=(0,r.useRef)(null),eJ=(0,r.useRef)(!0),eH=(0,r.useRef)(null),eY=(0,r.useRef)(null),{getSelection:eV,pushSelection:eQ,replaceSelection:eZ}=(0,w.useUrlSelection)(),e0=eV("issue"),e1=eV("run"),e5=(0,r.useCallback)(e=>{X(e),eG.current&&clearTimeout(eG.current),eG.current=setTimeout(()=>J(e),300)},[]);(0,r.useEffect)(()=>()=>{eG.current&&clearTimeout(eG.current)},[]),(0,r.useEffect)(()=>{let e=function(e){if(!_())return{...F};let t=window.localStorage.getItem(q(e));if(!t)return{...F};try{let e=JSON.parse(t);return{search:"string"==typeof e.search?e.search:F.search,assigneeIds:W(e.assigneeIds),statuses:W(e.statuses),teamId:"string"==typeof e.teamId?e.teamId:F.teamId,cycleId:"string"==typeof e.cycleId?e.cycleId:F.cycleId,sortBy:["activity","identifier","status","created"].includes(e.sortBy)?e.sortBy:F.sortBy,sortDir:["asc","desc"].includes(e.sortDir)?e.sortDir:F.sortDir,hasActivity:"boolean"==typeof e.hasActivity?e.hasActivity:F.hasActivity}}catch{return{...F}}}(s);eJ.current=!0,X(e.search),J(e.search),ei(e.assigneeIds),em(e.statuses),eC(e.teamId),ek(e.cycleId),eA(e.sortBy),eL(e.sortDir),eE(e.hasActivity)},[s]),(0,r.useEffect)(()=>{if(eJ.current){eJ.current=!1;return}var e=K,t=ea,r=ex,a=eS,n=eN,i=eI,o=eR,l=e$;if(_())try{window.localStorage.setItem(q(s),JSON.stringify({search:e,assigneeIds:W(t),statuses:W(r),teamId:String(a||""),cycleId:String(n||""),sortBy:i||"activity",sortDir:o||"desc",hasActivity:!!l}))}catch{}},[s,K,ea,ex,eS,eN,eI,eR,e$]),(0,r.useEffect)(()=>{if(!i)return;let e=!1;V(!1);let t=new URLSearchParams;s&&t.set("projectSlug",s);let r=t.toString();return fetch(r?`/api/linear/options?${r}`:"/api/linear/options").then(e=>e.json()).then(t=>{e||(Z(Array.isArray(t.assignees)?t.assignees:[]),et(Array.isArray(t.statuses)?t.statuses:[]),es(Array.isArray(t.teams)?t.teams:[]),eh(Array.isArray(t.cycles)?t.cycles:[]),V(!0))}).catch(()=>{e||(Z([]),et([]),es([]),eh([]),V(!0))}),()=>{e=!0}},[i,s]),(0,r.useEffect)(()=>{if(!Y)return;let e=ea.filter(e=>Q.some(t=>t.id===e));e.length!==ea.length&&ei(e)},[Q,Y,ea]),(0,r.useEffect)(()=>{if(!Y)return;let e=ex.filter(e=>ee.includes(e));e.length!==ex.length&&em(e)},[Y,ex,ee]),(0,r.useEffect)(()=>{if(Y){if(er.length<=1&&eS)return void eC("");eS&&!er.some(e=>e.id===eS)&&eC("")}},[Y,eS,er]),(0,r.useEffect)(()=>{Y&&eN&&!ep.some(e=>e.id===eN)&&ek("")},[ep,Y,eN]);let{issues:e2,loading:e3,hasMore:e4,loadMore:e6,refresh:e7,updateIssue:e8}=function(e,t=!0,s={}){let[a,n]=(0,r.useState)([]),[i,o]=(0,r.useState)(!0),[l,d]=(0,r.useState)(null),[c,u]=(0,r.useState)(!1),x=(0,r.useRef)(l),m=(0,r.useRef)(!1);x.current=l,(0,r.useEffect)(()=>{m.current=!1},[s.projectSlug]);let p=(0,r.useCallback)(async(r,a=!1)=>{if(t){o(!0);try{let t=new URLSearchParams;if(e.teamId&&t.set("teamId",e.teamId),e.statuses?.length)for(let r of e.statuses)t.append("status",r);if(e.search&&t.set("search",e.search),e.assigneeIds?.length)for(let r of e.assigneeIds)t.append("assigneeId",r);else e.assignedToMe&&t.set("assignedToMe","true");e.cycleId&&t.set("cycleId",e.cycleId),e.sortBy&&t.set("sortBy",e.sortBy),e.sortDir&&t.set("sortDir",e.sortDir),e.hasActivity&&t.set("hasActivity","true"),r&&x.current&&t.set("cursor",x.current),s.projectSlug&&t.set("projectSlug",s.projectSlug),s.limit&&t.set("limit",String(s.limit)),a&&t.set("refresh","true");let i=await fetch(`/api/linear/issues?${t.toString()}`),o=await i.json(),l=o.issues??[];n(e=>r?[...e,...l]:l),d(o.pageInfo?.endCursor??null),u(o.pageInfo?.hasNextPage??!1),m.current=!0}catch{r||n([])}finally{o(!1)}}},[e.teamId,e.statuses,e.search,e.assigneeIds,e.assignedToMe,e.cycleId,e.sortBy,e.sortDir,e.hasActivity,t,s.projectSlug,s.limit]);(0,r.useEffect)(()=>{d(null),p(!1,!m.current)},[p]);let f=(0,r.useCallback)(()=>p(!0),[p]);return{issues:a,loading:i,hasMore:c,loadMore:f,refresh:(0,r.useCallback)(()=>(d(null),p(!1,!0)),[p]),updateIssue:(0,r.useCallback)(e=>{n(t=>t.map(t=>t.id===e.id?e:t))},[])}}((0,r.useMemo)(()=>({search:G||void 0,statuses:ex.length>0&&ex.length<ee.length?ex:void 0,assigneeIds:ea.length>0?ea:void 0,teamId:eS||void 0,cycleId:eN||void 0,sortBy:eI,sortDir:eR,hasActivity:e$||void 0}),[G,ea,eN,ex,eS,ee.length,eI,eR,e$]),i,{projectSlug:s}),e9=(0,r.useMemo)(()=>e0?e2.find(e=>e.id===e0)??null:null,[e2,e0]),te=e9??(eM?.id===e0?eM:null),{runs:tt,loading:tr,createRun:ts,updateRun:ta}=function(e,t){let[s,a]=(0,r.useState)([]),[n,i]=(0,r.useState)(!1),o=(0,r.useRef)(e??null);o.current=e??null;let l=(0,r.useCallback)(async()=>{let e=o.current?.trim();if(!e)return a([]),[];i(!0);try{let r=new URLSearchParams({issueId:e});t&&r.set("projectId",t);let s=await fetch(`/api/linear/runs?${r.toString()}`);if(!s.ok)throw Error(`Failed to fetch Linear runs: ${s.status}`);let n=await s.json(),i=Array.isArray(n.runs)?n.runs:[];return a(i),i}finally{i(!1)}},[t]);return(0,r.useEffect)(()=>{a([]),l()},[l,e]),(0,r.useEffect)(()=>{if(!e)return;let t=window.setInterval(()=>{l()},3e3);return()=>window.clearInterval(t)},[e,l]),{runs:s,loading:n,refresh:l,createRun:(0,r.useCallback)(async e=>{let t=await fetch("/api/linear/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||`Failed to create Linear run: ${t.status}`);let r=(await t.json()).run;return a(e=>[r,...e.filter(e=>e.id!==r.id)]),r},[]),updateRun:(0,r.useCallback)(async(e,t)=>{let r=await fetch(`/api/linear/runs/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok)throw Error((await r.json().catch(()=>({}))).error||`Failed to update Linear run: ${r.status}`);let s=(await r.json()).run;return a(e=>e.map(e=>e.id===s.id?s:e)),s},[])}}(te?.id,e??null),{scripts:tn,activeScriptId:ti,activeScript:to,setActiveScriptId:tl,saveScript:td,deleteScript:tc}=function(e){let[t,s]=(0,r.useState)([]),[a,n]=(0,r.useState)(null);(0,r.useEffect)(()=>{let t=function(e){if(!C())return{...S};let t=window.localStorage.getItem(A(e));if(!t)return{...S};try{return I(JSON.parse(t))}catch{return{...S}}}(e);s(t.scripts),n(t.activeScriptId)},[e]);let i=(0,r.useCallback)((t,r)=>{s(t),n(r);if(C())try{let s=I({scripts:t,activeScriptId:r});window.localStorage.setItem(A(e),JSON.stringify(s))}catch{}},[e]),o=(0,r.useCallback)(e=>{let r=e&&t.some(t=>t.id===e)?e:null;i(t,r)},[i,t]),l=(0,r.useCallback)(e=>{let r=new Date().toISOString(),s=e.name.trim(),a=e.prompt.trim();if(!s||!a)throw Error("Run script name and prompt are required.");let n=e.id?t.find(t=>t.id===e.id):null,o=n?{...n,name:s,prompt:a,updatedAt:r}:{id:crypto.randomUUID(),name:s,prompt:a,createdAt:r,updatedAt:r};return i([...n?t.map(e=>e.id===n.id?o:e):[o,...t]].sort((e,t)=>t.updatedAt.localeCompare(e.updatedAt)),o.id),o},[i,t]),d=(0,r.useCallback)(e=>{i(t.filter(t=>t.id!==e),a===e?null:a)},[a,i,t]),c=(0,r.useMemo)(()=>t.find(e=>e.id===a)??null,[a,t]);return{scripts:t,activeScriptId:a,activeScript:c,setActiveScriptId:o,saveScript:l,deleteScript:d}}(s),tu=e1&&"new"!==e1?tt.find(e=>e.id===e1)??null:null,tx=(0,r.useMemo)(()=>Q.map(e=>({value:e.id,label:e.name})),[Q]),tm=(0,r.useMemo)(()=>ee.map(e=>({value:e,label:e})),[ee]),tp=(0,r.useMemo)(()=>Array.from(new Set([te?.status??"",...ee].map(e=>e.trim()).filter(Boolean))).map(e=>({value:e,label:e})),[te?.status,ee]),tf=(0,r.useMemo)(()=>[{value:"",label:"Workspace"},...er.map(e=>({value:e.id,label:e.name}))],[er]),tg=(0,r.useMemo)(()=>[{value:"",label:"Cycle"},...ep.map(e=>({value:e.id,label:e.name||`Cycle ${e.number}`}))],[ep]),th=tm.length>0,tb=tg.length>1,tv=tf.length>2,tj=to?.name??"AGX default",ty=(0,r.useCallback)(async(e,t)=>{let r=t.trim();if(r&&r!==e.status){ez(e.id);try{let t=await fetch(`/api/linear/issues/${encodeURIComponent(e.id)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:r})}),s=await t.json().catch(()=>({}));if(!t.ok||!s.issue)throw Error(s.error||"Failed to update ticket status");let a=s.issue;e8(a),e0===a.id&&eP(a),await e7()}catch(e){e instanceof Error&&window.alert(e.message)}finally{ez(t=>t===e.id?null:t)}}},[e7,e0,e8]);(0,r.useEffect)(()=>{if(!e0)return void eP(null);if(e9)return void eP(e=>e?.id===e0?e9:null);let e=!1;return(async()=>{try{let t=await fetch(`/api/linear/issues/${encodeURIComponent(e0)}`);if(e)return;if(404===t.status)return void eZ({issue:null,run:null});if(!t.ok)throw Error(`Failed to fetch selected Linear ticket: ${t.status}`);let r=await t.json().catch(()=>({}));if(!r.issue?.id)return void eZ({issue:null,run:null});eP(r.issue)}catch(t){e||console.error("Failed to hydrate selected Linear issue",t)}})(),()=>{e=!0}},[eZ,e9,e0]),(0,r.useEffect)(()=>{if(!e0){e1&&eZ({run:null});return}},[eZ,e0,e1]),(0,r.useEffect)(()=>{te&&e1&&"new"!==e1&&!tr&&(tt.some(e=>e.id===e1)||eZ({run:null}))},[eZ,tt,tr,te,e1]),(0,r.useEffect)(()=>{if(n){if(!te)return void eX("runs");if("new"===e1||tu||0===tt.length)return void eX("ticket");eX("runs")}},[n,tt.length,te,tu,e1]),(0,r.useEffect)(()=>{let t=!1;return async function(){try{let r=await fetch("/api/participants"),s=r.ok?await r.json():[];if(!e){t||eU(s);return}let a=new URLSearchParams;a.set("projectId",e);let n=await fetch(`/api/linear/worker?${a}`).catch(()=>null),i=n?.ok?await n.json().catch(()=>null):null,o=i?.job?.teamId||void 0;if(o){let r=await fetch(`/api/projects/${encodeURIComponent(e)}/teams/${encodeURIComponent(o)}/agents`);if(r.ok){let e=await r.json(),a=Array.isArray(e.agents)?e.agents.sort((e,t)=>(e.routing_order??0)-(t.routing_order??0)).map(e=>e.agent_id).filter(e=>"string"==typeof e&&e.trim().length>0):[];if(a.length>0){let e=new Map(a.map((e,t)=>[e,t])),r=s.filter(t=>e.has(t.id)).sort((t,r)=>(e.get(t.id)??Number.MAX_SAFE_INTEGER)-(e.get(r.id)??Number.MAX_SAFE_INTEGER));if(!t&&r.length>0)return void eU(r)}}}let l=await fetch(`/api/projects/${encodeURIComponent(e)}/agents`);if(!l.ok){t||eU(s);return}let d=await l.json(),c=Array.isArray(d.agents)?d.agents.map(e=>e.agent_id).filter(e=>"string"==typeof e&&e.trim().length>0):[],u=new Map(c.map((e,t)=>[e,t])),x=s.filter(e=>u.has(e.id)).sort((e,t)=>(u.get(e.id)??Number.MAX_SAFE_INTEGER)-(u.get(t.id)??Number.MAX_SAFE_INTEGER));t||eU(x)}catch{t||eU([])}}(),()=>{t=!0}},[e]),(0,r.useEffect)(()=>{let t=!1;async function r(){try{let r=new URLSearchParams;e&&r.set("projectId",e);let s=await fetch(`/api/linear/issues/active-agents?${r}`);if(!s.ok||t)return;let a=await s.json(),n=new Map;for(let e of a.agents??[]){let t=n.get(e.issueId)??[];t.push({agentId:e.agentId,agentName:e.agentName}),n.set(e.issueId,t)}t||eF(n)}catch{}}r();let s=setInterval(()=>void r(),5e3);return()=>{t=!0,clearInterval(s)}},[e]),(0,r.useEffect)(()=>{if(!E)return;let e=e=>{let t=e.target;eY.current?.contains(t)||eH.current?.contains(t)||M(!1)},t=e=>{"Escape"===e.key&&M(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}},[E]);let tw=(0,r.useCallback)(async(t,r)=>{eW(null),eB(null);try{let a=await fetch("/api/linear/runs/scripted",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:e??void 0,projectSlug:s??void 0,issueId:t.id,issueIdentifier:t.identifier,issueTitle:t.title,issueStatus:t.status,issueAssignee:t.assignee,agentId:r.id,scriptName:to?.name,scriptPrompt:to?.prompt})}),n=await a.json().catch(()=>({}));if(!a.ok||!n.run||!n.chatRunId||!n.userMessageId)throw Error(n.error||"Failed to start scripted session");eQ({issue:t.id,run:n.run.id})}catch(e){console.error("Failed to start scripted Linear session:",e),e instanceof Error&&window.alert(e.message)}},[to,e,s,eQ]),tN=(0,r.useCallback)((e,t)=>{if(M(!1),0===eO.length)return void window.alert("Add at least one agent to this project before starting a scripted session.");if(1===eO.length)return void tw(e,eO[0]);let r=t?.currentTarget?.getBoundingClientRect();eW(e),eB(r?{top:r.bottom+4,left:r.left}:{top:200,left:200})},[tw,eO]),tk=(0,r.useRef)(null);if((0,r.useEffect)(()=>{let e=tk.current;if(!e||!e4)return;let t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&e6()},{threshold:.1});return t.observe(e),()=>t.disconnect()},[e4,e6]),d)return(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:"Loading..."});let tS=i&&!k&&!Object.values(x).some(Boolean);return!i||tS?(0,t.jsx)(H,{connected:i,user:c,clis:u,mcpConfigured:x,onConnect:m,onConnectWithKey:p,onDisconnect:f,onConfigureMcp:j,onContinue:()=>R(!0)}):(0,t.jsxs)("div",{className:"relative flex h-full overflow-hidden",children:[n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"shrink-0 border-b border-[var(--card-border)]",children:[(0,t.jsxs)("div",{className:"flex h-12 items-center gap-2 px-3",children:[(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-2 rounded-md border border-[var(--card-border)] bg-[var(--background)] px-2.5 py-1.5 transition-all focus-within:border-[var(--muted-foreground)] focus-within:ring-1 focus-within:ring-[var(--muted-foreground)]",children:[(0,t.jsx)(b.Search,{size:14,className:"shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("input",{type:"text",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--muted-foreground)]",placeholder:"Search tickets...",value:K,onChange:e=>e5(e.target.value)})]}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-2 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>void e7(),title:"Refresh tickets","aria-label":"Refresh tickets",disabled:e3,children:(0,t.jsx)(h.RefreshCw,{size:16,className:e3?"animate-spin":void 0})}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-2 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>{M(!1),$(!0)},title:"Linear settings",children:(0,t.jsx)(v.Settings,{size:16})})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 px-3 pb-2",children:[th?(0,t.jsx)(eb,{label:"Status",values:ex,options:tm,activeClasses:"border-amber-500/30 bg-amber-500/10 text-amber-300",onChange:em,emptyLabel:"All statuses"}):null,(0,t.jsx)(eb,{label:"Assignee",values:ea,options:tx,activeClasses:"border-blue-500/30 bg-blue-500/10 text-blue-400",onChange:ei,emptyLabel:"All assignees"}),tv?(0,t.jsx)(eg,{label:"Workspace",value:eS,options:tf,activeClasses:"border-emerald-500/30 bg-emerald-500/10 text-emerald-400",onChange:eC}):null,tb?(0,t.jsx)(eg,{label:"Cycle",value:eN,options:tg,activeClasses:"border-purple-500/30 bg-purple-500/10 text-purple-400",onChange:ek}):null,(0,t.jsx)(eg,{label:"Sort",value:eI,options:[{value:"activity",label:"Activity"},{value:"identifier",label:"Ticket ID"},{value:"status",label:"Status"},{value:"created",label:"Created"}],activeClasses:"border-sky-500/30 bg-sky-500/10 text-sky-400",onChange:e=>eA(e)}),(0,t.jsx)("button",{type:"button",className:"rounded-full border border-[var(--card-border)] p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",title:"desc"===eR?"Descending":"Ascending",onClick:()=>eL(e=>"desc"===e?"asc":"desc"),children:"desc"===eR?(0,t.jsx)(o,{size:12}):(0,t.jsx)(l,{size:12})}),(0,t.jsx)("button",{type:"button",className:`flex items-center gap-1 rounded-full border px-2.5 py-1 text-[11px] font-medium transition-colors ${e$?"border-orange-500/30 bg-orange-500/10 text-orange-400":"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,onClick:()=>eE(e=>!e),children:"My activity"})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:e3&&0===e2.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading tickets..."}):0===e2.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"No tickets found."}):(0,t.jsxs)(t.Fragment,{children:[e2.map(e=>(0,t.jsx)(ey,{issue:e,selected:te?.id===e.id,activeAgents:eD.get(e.id),participants:eO,onSelect:()=>{eX("runs"),eQ({issue:e.id,run:null})}},e.id)),e4?(0,t.jsx)("div",{ref:tk,className:"py-2 text-center text-xs text-[var(--muted-foreground)]",children:e3?"Loading...":"Load more"}):null]})})]}),te?(0,t.jsxs)("div",{className:"absolute inset-0 z-20 flex flex-col bg-[var(--background)]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-[var(--card-border)] px-4 py-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-[0.14em] text-[var(--muted-foreground)]",children:te.identifier}),(0,t.jsx)("div",{className:"truncate text-sm font-semibold text-[var(--foreground)]",children:te.title})]}),(0,t.jsx)("button",{type:"button",className:"rounded p-2 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>eZ({issue:null,run:null}),"aria-label":"Close ticket panel",children:(0,t.jsx)(y.X,{size:16})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-[var(--card-border)] px-3 py-2",children:[(0,t.jsx)("button",{type:"button",className:`rounded-full px-3 py-1.5 text-xs font-medium transition-colors ${"runs"===eK?"bg-[var(--card-bg)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]"}`,onClick:()=>eX("runs"),children:"Runs"}),(0,t.jsx)("button",{type:"button",className:`rounded-full px-3 py-1.5 text-xs font-medium transition-colors ${"ticket"===eK?"bg-[var(--card-bg)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]"}`,onClick:()=>eX("ticket"),children:"Ticket"})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:"runs"===eK?(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,t.jsxs)("div",{className:"relative flex items-center justify-between border-b border-[var(--card-border)] px-3 py-2",children:[(0,t.jsx)("h3",{className:"text-xs font-semibold text-[var(--foreground)]",children:"Sessions"}),(0,t.jsxs)("button",{ref:eH,type:"button",className:"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-40",onClick:()=>{M(!1),eX("ticket"),eQ({run:"new"})},title:"Open a fresh chat for this ticket. You can choose or edit the session script in the ticket tab.","aria-label":"New session",disabled:!te,children:[(0,t.jsx)(g.Plus,{size:12}),"New session"]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:tr&&0===tt.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading sessions..."}):0===tt.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"No previous sessions yet."}):tt.map(e=>{let r=ec(e);return(0,t.jsxs)("button",{type:"button",className:`w-full px-3 py-2 text-left text-xs transition-colors ${tu?.id===e.id?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]"}`,onClick:()=>{eX("ticket"),eQ({run:e.id})},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] font-medium text-[var(--foreground)]",children:eu(e)}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:ed(e.startedAt)})]}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 text-[10px]",children:[(0,t.jsx)("span",{className:`font-medium ${ef[r.tone]}`,children:r.label}),(0,t.jsx)("span",{className:"truncate text-[var(--muted-foreground)]",children:e.agentName})]}),null!=e.durationMs?(0,t.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null]},e.id)})})]}):tu?(0,t.jsx)(ej,{issue:te??{id:tu.issueId,identifier:tu.issueIdentifier,title:tu.issueTitle,url:null,status:tu.issueStatus,assignee:tu.issueAssignee,updatedAt:tu.updatedAt},run:tu,participants:eO,issueStatusOptions:tp,issueStatusUpdating:eT===tu.issueId,onIssueStatusChange:ty}):0===eO.length?(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:"Add at least one agent to this project to start a session."}):"new"===e1||0===tt.length?(0,t.jsx)(ev,{issue:te,participants:eO,projectId:e,projectSlug:s,issueStatusOptions:tp,issueStatusUpdating:eT===te.id,onIssueStatusChange:ty,activeSessionScriptLabel:tj,onOpenSessionScripts:()=>M(!0),onStartScriptedSession:e=>tN(te,e),createRun:ts,updateRun:ta,onRunCreated:e=>eQ({run:e})},te.id):(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:tr?"Loading sessions...":"Select a session to continue."})})]}):null]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 flex-col border-r border-[var(--card-border)]",style:{width:P},children:[(0,t.jsxs)("div",{className:"shrink-0 border-b border-[var(--card-border)]",children:[(0,t.jsxs)("div",{className:"flex h-12 items-center gap-2 px-3",children:[(0,t.jsxs)("div",{className:"flex flex-1 items-center gap-2 rounded-md border border-[var(--card-border)] bg-[var(--background)] px-2.5 py-1.5 transition-all focus-within:border-[var(--muted-foreground)] focus-within:ring-1 focus-within:ring-[var(--muted-foreground)]",children:[(0,t.jsx)(b.Search,{size:14,className:"shrink-0 text-[var(--muted-foreground)]"}),(0,t.jsx)("input",{type:"text",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--muted-foreground)]",placeholder:"Search tickets...",value:K,onChange:e=>e5(e.target.value)})]}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>void e7(),title:"Refresh tickets","aria-label":"Refresh tickets",disabled:e3,children:(0,t.jsx)(h.RefreshCw,{size:16,className:e3?"animate-spin":void 0})}),(0,t.jsx)("button",{type:"button",className:"shrink-0 rounded p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",onClick:()=>{M(!1),$(!0)},title:"Linear settings",children:(0,t.jsx)(v.Settings,{size:16})})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 pb-2",children:[th?(0,t.jsx)(eb,{label:"Status",values:ex,options:tm,activeClasses:"border-amber-500/30 bg-amber-500/10 text-amber-300",onChange:em,emptyLabel:"All statuses"}):null,(0,t.jsx)(eb,{label:"Assignee",values:ea,options:tx,activeClasses:"border-blue-500/30 bg-blue-500/10 text-blue-400",onChange:ei,emptyLabel:"All assignees"}),tv?(0,t.jsx)(eg,{label:"Workspace",value:eS,options:tf,activeClasses:"border-emerald-500/30 bg-emerald-500/10 text-emerald-400",onChange:eC}):null,tb?(0,t.jsx)(eg,{label:"Cycle",value:eN,options:tg,activeClasses:"border-purple-500/30 bg-purple-500/10 text-purple-400",onChange:ek}):null,(0,t.jsx)(eg,{label:"Sort",value:eI,options:[{value:"activity",label:"Activity"},{value:"identifier",label:"Ticket ID"},{value:"status",label:"Status"},{value:"created",label:"Created"}],activeClasses:"border-sky-500/30 bg-sky-500/10 text-sky-400",onChange:e=>eA(e)}),(0,t.jsx)("button",{type:"button",className:"rounded-full border border-[var(--card-border)] p-0.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)]",title:"desc"===eR?"Descending":"Ascending",onClick:()=>eL(e=>"desc"===e?"asc":"desc"),children:"desc"===eR?(0,t.jsx)(o,{size:12}):(0,t.jsx)(l,{size:12})}),(0,t.jsx)("button",{type:"button",className:`flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-[11px] font-medium transition-colors ${e$?"border-orange-500/30 bg-orange-500/10 text-orange-400":"border-[var(--card-border)] text-[var(--muted-foreground)] hover:bg-[var(--card-bg)]"}`,onClick:()=>eE(e=>!e),children:"My activity"})]})]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:e3&&0===e2.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading tickets..."}):0===e2.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"No tickets found."}):(0,t.jsxs)(t.Fragment,{children:[e2.map(e=>(0,t.jsx)(ey,{issue:e,selected:te?.id===e.id,activeAgents:eD.get(e.id),participants:eO,onSelect:()=>eQ({issue:e.id,run:null})},e.id)),e4?(0,t.jsx)("div",{ref:tk,className:"py-2 text-center text-xs text-[var(--muted-foreground)]",children:e3?"Loading...":"Load more"}):null]})})]}),(0,t.jsx)(eo,{onResize:e=>T(t=>{let r=Math.max(180,Math.min(600,t+e));return(0,B.persistLinearTicketPanelWidth)(r),r})}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col border-r border-[var(--card-border)]",style:{width:O},children:[(0,t.jsxs)("div",{className:"relative flex items-center justify-between border-b border-[var(--card-border)] px-3 py-2",children:[(0,t.jsx)("h3",{className:"text-xs font-semibold text-[var(--foreground)]",children:"Sessions"}),(0,t.jsxs)("button",{ref:eH,type:"button",className:"inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--card-bg)] hover:text-[var(--foreground)] disabled:cursor-not-allowed disabled:opacity-40",onClick:()=>{M(!1),eQ({run:"new"})},title:"Open a fresh chat for this ticket. You can choose or edit the session script in the session details pane.","aria-label":"New session",disabled:!te,children:[(0,t.jsx)(g.Plus,{size:12}),"New session"]}),E?(0,t.jsx)("div",{ref:eY,className:"absolute right-3 top-full z-20 mt-2 max-h-[80vh] overflow-y-auto rounded-2xl border border-[var(--card-border)] bg-[var(--background)] p-4 shadow-2xl",style:{width:"min(760px, calc(100vw - 32px))"},children:(0,t.jsx)(z,{projectSlug:s,scripts:tn,activeScriptId:ti,onSetActiveScriptId:tl,onSaveScript:td,onDeleteScript:tc})}):null]}),(0,t.jsx)("div",{className:"flex-1 overflow-y-auto",children:te?(0,t.jsx)(t.Fragment,{children:tr&&0===tt.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Loading sessions..."}):0===tt.length?(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"No previous sessions yet."}):tt.map(e=>{let r=ec(e);return(0,t.jsxs)("button",{type:"button",className:`w-full px-3 py-2 text-left text-xs transition-colors ${tu?.id===e.id?"bg-[var(--card-bg)]":"hover:bg-[var(--card-bg)]"}`,onClick:()=>eQ({run:e.id}),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] font-medium text-[var(--foreground)]",children:eu(e)}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:ed(e.startedAt)})]}),(0,t.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 text-[10px]",children:[(0,t.jsx)("span",{className:`font-medium ${ef[r.tone]}`,children:r.label}),(0,t.jsx)("span",{className:"truncate text-[var(--muted-foreground)]",children:e.agentName})]}),null!=e.durationMs?(0,t.jsxs)("div",{className:"text-[10px] text-[var(--muted-foreground)]",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null]},e.id)})}):(0,t.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)]",children:"Select a ticket to see sessions."})})]}),(0,t.jsx)(eo,{onResize:e=>D(t=>{let r=Math.max(140,Math.min(500,t+e));return(0,B.persistLinearRunsPanelWidth)(r),r})}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:tu?(0,t.jsx)(ej,{issue:te??{id:tu.issueId,identifier:tu.issueIdentifier,title:tu.issueTitle,url:null,status:tu.issueStatus,assignee:tu.issueAssignee,updatedAt:tu.updatedAt},run:tu,participants:eO,issueStatusOptions:tp,issueStatusUpdating:eT===tu.issueId,onIssueStatusChange:ty}):te?0===eO.length?(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:"Add at least one agent to this project to start a session."}):"new"===e1||0===tt.length?(0,t.jsx)(ev,{issue:te,participants:eO,projectId:e,projectSlug:s,issueStatusOptions:tp,issueStatusUpdating:eT===te.id,onIssueStatusChange:ty,activeSessionScriptLabel:tj,onOpenSessionScripts:()=>M(!0),onStartScriptedSession:e=>tN(te,e),createRun:ts,updateRun:ta,onRunCreated:e=>eQ({run:e})},te.id):(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:tr?"Loading sessions...":"Select a session to continue."}):(0,t.jsx)("div",{className:"flex h-full items-center justify-center text-xs text-[var(--muted-foreground)]",children:"Select a ticket from the list."})})]}),L&&(0,t.jsx)(en,{connected:i,user:c,clis:u,mcpConfigured:x,onConnect:m,onConnectWithKey:p,onDisconnect:f,onConfigureMcp:j,onClose:()=>$(!1),projectId:e}),E&&n?(0,t.jsx)("div",{className:"absolute inset-0 z-30 flex items-center justify-center bg-black/50 p-4",children:(0,t.jsx)("div",{ref:eY,className:"max-h-[85vh] w-full max-w-3xl overflow-y-auto rounded-2xl border border-[var(--card-border)] bg-[var(--background)] p-4 shadow-2xl",children:(0,t.jsx)(z,{projectSlug:s,scripts:tn,activeScriptId:ti,onSetActiveScriptId:tl,onSaveScript:td,onDeleteScript:tc})})}):null,e_&&eq&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>{eW(null),eB(null)}}),(0,t.jsxs)("div",{className:"fixed z-50 min-w-[180px] rounded border border-[var(--card-border)] bg-[var(--card-bg)] py-1 shadow-lg",style:{top:eq.top,left:eq.left},children:[(0,t.jsx)("div",{className:"px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Pick an agent"}),eO.map(e=>(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors hover:bg-[var(--card-bg)]",onClick:()=>void tw(e_,e),children:[(0,t.jsx)("img",{src:el(e.id,e.color,20),alt:"",className:"h-5 w-5 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-medium text-[var(--foreground)]",children:e.name}),e.title?(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:e.title}):null]})]},e.id))]})]})]})}e.s(["default",0,function({params:e}){let{slug:n}=(0,r.use)(e),i=(0,s.useSearchParams)(),{projects:o}=(0,a.useProjects)(),l=o.find(e=>e.slug===n),d="true"===i.get("settings");return(0,t.jsx)(ew,{projectId:l?.id,projectSlug:l?.slug??n,initialShowSettings:d})}],628822)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,575479,e=>{"use strict";let t=(0,e.i(363732).default)("file-text",[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],575479)},906724,595807,e=>{"use strict";let t=(0,e.i(363732).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t],595807),e.s(["Loader2",0,t],906724)},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)},844118,e=>{e.n(e.i(984242))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,363732,e=>{"use strict";var r=e.i(271645);let t=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),a=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:c,iconNode:n,...u},d)=>(0,r.createElement)("svg",{ref:d,...s,width:a,height:a,stroke:e,strokeWidth:l?24*Number(i)/Number(a):i,className:t("lucide",o),...!c&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...n.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(c)?c:[c]]));e.s(["default",0,(e,s)=>{let l=(0,r.forwardRef)(({className:l,...o},c)=>(0,r.createElement)(i,{ref:c,iconNode:s,className:t(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=a(e),l}],363732)},618566,(e,r,t)=>{r.exports=e.r(976562)},906724,595807,e=>{"use strict";let r=(0,e.i(363732).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,r],595807),e.s(["Loader2",0,r],906724)},649582,e=>{"use strict";var r=e.i(843476),t=e.i(271645),a=e.i(618566),s=e.i(906724);e.s(["default",0,function(){let e=(0,a.useRouter)(),[i,l]=(0,t.useState)(!0);return((0,t.useEffect)(()=>{let r=!1;return(async()=>{try{let t=await fetch("/api/projects",{cache:"no-store"});if(r)return;if(t.ok){let r=await t.json(),a=Array.isArray(r?.projects)?r.projects:[];0===a.length?e.replace("/setup"):e.replace(`/projects/${a[0].slug}`);return}}catch{}r||e.replace("/setup")})(),()=>{r=!0}},[e]),i)?(0,r.jsx)("div",{className:"h-screen w-full flex items-center justify-center bg-[var(--background)]",children:(0,r.jsx)(s.Loader2,{className:"w-6 h-6 animate-spin text-[var(--muted-foreground)]"})}):null}])}]);
|
|
@@ -1,5 +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)},429056,e=>{"use strict";let t=(0,e.i(363732).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],429056)},716436,e=>{"use strict";let t=(0,e.i(363732).default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",0,t],716436)},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)},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()}])},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return i},formatWithValidation:function(){return o},urlObjectKeys:function(){return d}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=e.r(190809)._(e.r(998183)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,a=e.protocol||"",s=e.pathname||"",i=e.hash||"",d=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:r&&(o=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(o+=":"+e.port)),d&&"object"==typeof d&&(d=String(n.urlQueryToSearchParams(d)));let c=e.search||d&&`?${d}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==o?(o="//"+(o||""),s&&"/"!==s[0]&&(s="/"+s)):o||(o=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${o}${s}${c}${i}`}let d=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function o(e){return i(e)}},818581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let a=e.r(271645);function s(e,t){let r=(0,a.useRef)(null),s=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=n(e,a)),t&&(s.current=n(t,a))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return n}});let a=e.r(718967),s=e.r(652817);function n(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return g},useLinkStatus:function(){return b}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=e.r(190809),l=e.r(843476),i=n._(e.r(271645)),d=e.r(195057),o=e.r(8372),c=e.r(818581),u=e.r(718967),m=e.r(405550);e.r(233525);let x=e.r(388540),p=e.r(91949),h=e.r(573668),f=e.r(509396);function g(t){var r,a;let s,n,g,[b,j]=(0,i.useOptimistic)(p.IDLE_LINK_STATUS),y=(0,i.useRef)(null),{href:N,as:k,children:w,prefetch:S=null,passHref:C,replace:M,shallow:_,scroll:E,onClick:T,onMouseEnter:P,onTouchStart:A,legacyBehavior:$=!1,onNavigate:O,transitionTypes:L,ref:I,unstable_dynamicOnHover:R,...D}=t;s=w,$&&("string"==typeof s||"number"==typeof s)&&(s=(0,l.jsx)("a",{children:s}));let U=i.default.useContext(o.AppRouterContext),z=!1!==S,H=!1!==S?null===(a=S)||"auto"===a?f.FetchStrategy.PPR:f.FetchStrategy.Full:f.FetchStrategy.PPR,B="string"==typeof(r=k||N)?r:(0,d.formatUrl)(r);if($){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=i.default.Children.only(s)}let V=$?n&&"object"==typeof n&&n.ref:I,q=i.default.useCallback(e=>(null!==U&&(y.current=(0,p.mountLinkInstance)(e,B,U,H,z,j)),()=>{y.current&&((0,p.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,p.unmountPrefetchableInstance)(e)}),[z,B,U,H,j]),J={ref:(0,c.useMergedRef)(q,V),onClick(t){$||"function"!=typeof T||T(t),$&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!U||t.defaultPrevented||function(t,r,a,s,n,l,d){if("u">typeof window){let o,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((o=t.currentTarget.getAttribute("target"))&&"_self"!==o||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(699781);i.default.startTransition(()=>{u(r,s?"replace":"push",!1===n?x.ScrollBehavior.NoScroll:x.ScrollBehavior.Default,a.current,d)})}}(t,B,y,M,E,O,L)},onMouseEnter(e){$||"function"!=typeof P||P(e),$&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),U&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){$||"function"!=typeof A||A(e),$&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),U&&z&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,u.isAbsoluteUrl)(B)?J.href=B:$&&!C&&("a"!==n.type||"href"in n.props)||(J.href=(0,m.addBasePath)(B)),g=$?i.default.cloneElement(n,J):(0,l.jsx)("a",{...D,...J,children:s}),(0,l.jsx)(v.Provider,{value:b,children:g})}e.r(284508);let v=(0,i.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,i.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},597628,e=>{"use strict";let t=(0,e.i(363732).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",0,t],597628)},618566,(e,t,r)=>{t.exports=e.r(976562)},572665,e=>{"use strict";let t=(0,e.i(363732).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["Users",0,t],572665)},8707,e=>{"use strict";let t=(0,e.i(363732).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",0,t],8707)},529471,e=>{"use strict";let t=(0,e.i(363732).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],529471)},498027,e=>{"use strict";let t=(0,e.i(363732).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],498027)},378764,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(498027),s=e.i(8707),n=e.i(529471),l=e.i(797167);e.s(["default",0,function({options:e,value:i,onChange:d,placeholder:o,disabled:c}){let[u,m]=(0,r.useState)(!1),[x,p]=(0,r.useState)(""),h=(0,r.useRef)(null),f=(0,r.useRef)(null),g=(0,r.useMemo)(()=>{if(!x)return e;let t=x.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.meta?.toLowerCase().includes(t))},[e,x]),v=(0,r.useMemo)(()=>e.find(e=>e.id===i),[e,i]),b=(0,r.useCallback)(e=>{h.current&&!h.current.contains(e.target)&&m(!1)},[]);return(0,r.useEffect)(()=>(document.addEventListener("pointerdown",b),()=>document.removeEventListener("pointerdown",b)),[b]),(0,t.jsxs)("div",{ref:h,className:"relative",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{c||(m(!u),p(""),setTimeout(()=>f.current?.focus(),0))},disabled:c,className:"input w-full flex items-center justify-between gap-2 text-left cursor-pointer",children:[v?(0,t.jsx)("span",{className:"truncate",children:v.label}):(0,t.jsx)("span",{className:"text-[var(--muted-foreground)] truncate",children:o}),(0,t.jsx)(a.ChevronDown,{className:`w-4 h-4 text-[var(--muted-foreground)] flex-shrink-0 transition-transform ${u?"rotate-180":""}`})]}),u&&(0,t.jsxs)("div",{className:"absolute z-50 mt-2 min-w-full w-max max-w-[28rem] rounded-2xl overflow-hidden right-0",style:{background:"var(--card-bg)",border:"1px solid var(--border)",boxShadow:"0 8px 30px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05)"},children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5 px-3.5 py-3 border-b",style:{borderColor:"var(--border)"},children:[(0,t.jsx)(s.Search,{className:"w-4 h-4 text-[var(--muted-foreground)] flex-shrink-0"}),(0,t.jsx)("input",{ref:f,value:x,onChange:e=>p(e.target.value),placeholder:"Search...",className:"flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--muted-foreground)]"}),x&&(0,t.jsx)("button",{onClick:()=>p(""),className:"text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:(0,t.jsx)(l.X,{className:"w-3.5 h-3.5"})})]}),(0,t.jsxs)("div",{className:"max-h-72 overflow-y-auto py-1",children:[0===g.length&&(0,t.jsx)("div",{className:"px-4 py-6 text-xs text-[var(--muted-foreground)] text-center",children:"No matches"}),g.map(e=>{let r=e.id===i;return(0,t.jsxs)("button",{onClick:()=>{e.disabled||(d(e.id),m(!1),p(""))},disabled:e.disabled,className:`
|
|
2
|
-
w-full text-left px-3.5 py-2.5 flex items-center gap-3 transition-colors
|
|
3
|
-
${e.disabled?"opacity-35 cursor-not-allowed":""}
|
|
4
|
-
${r?"bg-[var(--primary)]/10":"hover:bg-[var(--muted)]/40"}
|
|
5
|
-
`,children:[(0,t.jsx)("div",{className:`w-5 h-5 rounded-md flex items-center justify-center flex-shrink-0 border ${r?"bg-[var(--primary)] border-[var(--primary)]":"border-[var(--border)]"}`,children:r&&(0,t.jsx)(n.Check,{className:"w-3 h-3 text-white"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.label}),e.meta&&(0,t.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded-full bg-[var(--muted)]/50 text-[var(--muted-foreground)]",children:e.meta})]}),e.description&&(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5 line-clamp-1",children:e.description})]})]},e.id)})]})]})]})}])},44054,e=>{"use strict";var t=e.i(271645);let r="(pointer: coarse)",a="(hover: hover)",s="(max-width: 767px)",n="(min-width: 768px)";function l(){if("function"!=typeof window.matchMedia)return{isCoarsePointer:!1,canHover:!0,isPhone:!1,isTablet:!1,isTouchLayout:!1};let e=window.matchMedia(r).matches,t=window.matchMedia(a).matches,l=window.matchMedia(s).matches,i=!l&&window.matchMedia(n).matches,d=e||!t;return{isCoarsePointer:e,canHover:t,isPhone:d&&l,isTablet:d&&i,isTouchLayout:d}}e.s(["useInputCapabilities",0,function(){let[e,i]=(0,t.useState)(l);return(0,t.useEffect)(()=>{if("function"!=typeof window.matchMedia)return;let e=[window.matchMedia(r),window.matchMedia(a),window.matchMedia(s),window.matchMedia(n)],t=()=>{i(l())};return e.forEach(e=>e.addEventListener("change",t)),window.addEventListener("resize",t),t(),()=>{e.forEach(e=>e.removeEventListener("change",t)),window.removeEventListener("resize",t)}},[]),e}])},755838,(e,t,r)=>{"use strict";var a=e.r(271645),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=a.useState,l=a.useEffect,i=a.useLayoutEffect,d=a.useDebugValue;function o(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!s(e,r)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),a=n({inst:{value:r,getSnapshot:t}}),s=a[0].inst,c=a[1];return i(function(){s.value=r,s.getSnapshot=t,o(s)&&c({inst:s})},[e,r,t]),l(function(){return o(s)&&c({inst:s}),e(function(){o(s)&&c({inst:s})})},[e]),d(r),r};r.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:c},802239,(e,t,r)=>{"use strict";t.exports=e.r(755838)},752822,(e,t,r)=>{"use strict";var a=e.r(271645),s=e.r(802239),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=s.useSyncExternalStore,i=a.useRef,d=a.useEffect,o=a.useMemo,c=a.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,a,s){var u=i(null);if(null===u.current){var m={hasValue:!1,value:null};u.current=m}else m=u.current;var x=l(e,(u=o(function(){function e(e){if(!d){if(d=!0,l=e,e=a(e),void 0!==s&&m.hasValue){var t=m.value;if(s(t,e))return i=t}return i=e}if(t=i,n(l,e))return t;var r=a(e);return void 0!==s&&s(t,r)?(l=e,t):(l=e,i=r)}var l,i,d=!1,o=void 0===r?null:r;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,r,a,s]))[0],u[1]);return d(function(){m.hasValue=!0,m.value=x},[x]),c(x),x}},430224,(e,t,r)=>{"use strict";t.exports=e.r(752822)},538292,e=>{"use strict";let t=(0,e.i(363732).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],538292)},19035,e=>{"use strict";let t=(0,e.i(363732).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],19035)},363732,e=>{"use strict";var t=e.i(271645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let n=(0,t.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:n=2,absoluteStrokeWidth:l,className:i="",children:d,iconNode:o,...c},u)=>(0,t.createElement)("svg",{ref:u,...s,width:a,height:a,stroke:e,strokeWidth:l?24*Number(n)/Number(a):n,className:r("lucide",i),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...o.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(d)?d:[d]]));e.s(["default",0,(e,s)=>{let l=(0,t.forwardRef)(({className:l,...i},d)=>(0,t.createElement)(n,{ref:d,iconNode:s,className:r(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...i}));return l.displayName=a(e),l}],363732)},797167,e=>{"use strict";let t=(0,e.i(363732).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],797167)},929870,e=>{"use strict";let t=(0,e.i(363732).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],929870)},524123,e=>{"use strict";var t=e.i(271645);e.s(["useProjects",0,function(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!1),[n,l]=(0,t.useState)(null),i=(0,t.useCallback)(async()=>{s(!0);try{let e=await fetch("/api/projects");if(!e.ok)throw Error("Failed to fetch projects");let t=await e.json();r(t.projects??[]),l(null)}catch(e){l(e instanceof Error?e:Error("Unknown error"))}finally{s(!1)}},[]);(0,t.useEffect)(()=>{i()},[i]);let d=(0,t.useCallback)(async e=>{let t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to create project");let a=(await t.json()).project;return r(e=>[a,...e]),a},[]);return{projects:e,isLoading:a,error:n,refetch:i,createProject:d,updateProject:(0,t.useCallback)(async(e,t)=>{let a=await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||"Failed to update project");let s=(await a.json()).project;return r(t=>t.map(t=>t.id===e?s:t)),s},[]),deleteProject:(0,t.useCallback)(async e=>{let t=await fetch(`/api/projects/${e}`,{method:"DELETE"});if(!t.ok)throw Error((await t.json().catch(()=>({}))).error||"Failed to delete project");r(t=>t.filter(t=>t.id!==e))},[])}},"useProjectsWithAgents",0,function(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!0),n=(0,t.useCallback)(async()=>{try{let e=await fetch("/api/projects");if(!e.ok)return;let{projects:t}=await e.json(),a=await Promise.all((t??[]).map(async e=>{let t=[],r=[];try{let[a,s]=await Promise.all([fetch(`/api/projects/${e.id}/agents`),fetch(`/api/projects/${e.id}/threads`)]);a.ok&&(t=(await a.json()).agents??[]),s.ok&&(r=((await s.json()).threads??[]).map(e=>e.thread_id))}catch{}return{...e,repos:e.repos??[],agents:t.map(t=>({project_id:e.id,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at})),thread_ids:r,workspace_ids:r}}));r(a)}catch{}finally{s(!1)}},[]);(0,t.useEffect)(()=>{n()},[n]);let l=(0,t.useCallback)(async(e,t)=>{try{let a="string"==typeof e?{name:e}:e,s=a.name.trim(),n=(a.slug||s.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")).trim(),l=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,name:s,slug:n})});if(!l.ok)return null;let{project:i}=await l.json(),d=Array.isArray(t)?t:t?[t]:[];for(let e of d)await fetch(`/api/projects/${i.id}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:e})}).catch(e=>console.warn("[useProjects] link thread failed:",e));let o={...i,repos:i.repos??[],agents:[],thread_ids:d,workspace_ids:d};return r(e=>[...e,o].sort((e,t)=>e.name.localeCompare(t.name))),o}catch{return null}},[]),i=(0,t.useCallback)(async(e,t)=>{try{if(!(await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})})).ok)return;r(r=>r.map(r=>r.id===e?{...r,name:t}:r).sort((e,t)=>e.name.localeCompare(t.name)))}catch{}},[]),d=(0,t.useCallback)(async e=>{try{if(!(await fetch(`/api/projects/${e}`,{method:"DELETE"})).ok)return;r(t=>t.filter(t=>t.id!==e))}catch{}},[]),o=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||"Failed to update project")}let s=(await a.json()).project;return r(t=>t.map(t=>t.id===e?{...t,...s,repos:s.repos??t.repos}:t)),s}catch{return null}},[]),c=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:t})});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]),u=(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents?agentId=${t}`,{method:"DELETE"});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]);return{projects:e,isLoading:a,createProject:l,updateProject:o,renameProject:i,deleteProject:d,addAgent:c,removeAgent:u,reorderAgents:(0,t.useCallback)(async(e,t)=>{try{let a=await fetch(`/api/projects/${e}/agents`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderedAgentIds:t})});if(!a.ok)return;let s=((await a.json()).agents??[]).map(t=>({project_id:e,agent_id:t.agent_id,routing_order:t.routing_order,created_at:t.created_at}));r(t=>t.map(t=>t.id===e?{...t,agents:s}:t))}catch{}},[]),moveAgent:(0,t.useCallback)(async(e,t,r)=>{try{await fetch(`/api/projects/${t}/agents?agentId=${e}`,{method:"DELETE"}),await fetch(`/api/projects/${r}/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e})}),await n()}catch{}},[n]),refresh:n}}])},169610,e=>{"use strict";let t=(0,e.i(363732).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,t],169610)},519132,e=>{"use strict";let t=(0,e.i(363732).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],519132)},997626,e=>{"use strict";let t=(0,e.i(363732).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",0,t],997626)},938201,e=>{"use strict";let t=(0,e.i(363732).default)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["Target",0,t],938201)},80673,e=>{"use strict";let t=(0,e.i(363732).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],80673)},629155,e=>{"use strict";let t=(0,e.i(363732).default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);e.s(["Hash",0,t],629155)},564957,e=>{"use strict";let t=(0,e.i(363732).default)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);e.s(["BrainCircuit",0,t],564957)},906772,e=>{"use strict";let t=(0,e.i(363732).default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["ShieldCheck",0,t],906772)},791210,e=>{"use strict";let t=(0,e.i(363732).default)("corner-down-right",[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]);e.s(["CornerDownRight",0,t],791210)},416865,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(522016),n=e.i(716436),l=e.i(997626),i=e.i(564957),d=e.i(429056),o=e.i(572665),c=e.i(629155),u=e.i(597628),m=e.i(837958),x=e.i(519132),p=e.i(203096),h=e.i(367859),f=e.i(580873),g=e.i(938201),v=e.i(812549),b=e.i(906772),j=e.i(791210),y=e.i(80673),N=e.i(640481),k=e.i(884564),w=e.i(524123),S=e.i(423709),C=e.i(208343);e.s(["default",0,function(){let{id:e}=(0,a.useParams)(),[M,_]=(0,r.useState)(null),[E,T]=(0,r.useState)([]),[P,A]=(0,r.useState)(null),[$,O]=(0,r.useState)([]),[L,I]=(0,r.useState)({total_messages:0,threads_participated:0}),[R,D]=(0,r.useState)(!0),[U,z]=(0,r.useState)("feed"),[H,B]=(0,r.useState)(!1),[V,q]=(0,r.useState)([]),{projects:J}=(0,w.useProjectsWithAgents)();if((0,r.useEffect)(()=>{e&&Promise.all([fetch("/api/participants").then(e=>e.json()),fetch(`/api/agents/${e}/profile`).then(e=>e.ok?e.json():null),fetch(`/api/agents/${e}/messages`).then(e=>e.ok?e.json():null)]).then(([t,r,a])=>{let s=Array.isArray(t)?t:[];T(s),_(s.find(t=>t.id===e)??null),A(r),O(a?.messages??[]),I(a?.stats??{total_messages:0,threads_participated:0}),D(!1)})},[e]),(0,r.useEffect)(()=>{if(!e)return;let t=async()=>{try{let t=await fetch("/api/processes?enrich=1");if(!t.ok)return;let r=await t.json();q(r.filter(t=>t.agentId===e&&("spawning"===t.state||"running"===t.state)))}catch{}};t();let r=setInterval(t,3e3);return()=>clearInterval(r)},[e]),R)return(0,t.jsx)("div",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center",children:(0,t.jsx)("div",{className:"animate-pulse text-[var(--muted-foreground)] text-sm",children:"Loading agent…"})});if(!M)return(0,t.jsxs)("div",{className:"min-h-screen bg-[var(--background)] flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-[var(--muted-foreground)]",children:"Agent not found"}),(0,t.jsx)(s.default,{href:"/agents",className:"text-sm text-blue-600 hover:underline",children:"Back to agents"})]});let F=M.color||"#D97706",K=J.filter(e=>e.agents.some(e=>e.agent_id===M.id)),W=P?.self||"",Z=(0,S.stripMarkers)(W),X=M.identity||"",Q=(0,S.stripMarkers)(X),Y=P?.journal??[],G=Y.filter(e=>"reflection"===e.type),ee=P?.inspectability,et=ee?.knowledge.agent.portableSkills??[],er=ee?.knowledge.agent.skillBindings??[],ea=ee?.knowledge.agent.learnedMemories??[],es=ee?.evidence,en=$.map(e=>({...e,content:(0,S.stripMarkers)(e.content)})).filter(e=>e.content.length>0),el=new Map;for(let e of E)el.set(e.id,e);let ei=e=>{let t=new Date(e),r=Math.floor((Date.now()-t.getTime())/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;let a=Math.floor(r/60);if(a<24)return`${a}h ago`;let s=Math.floor(a/24);return s<7?`${s}d ago`:new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(t)},ed=e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t)},eo=[{label:"Messages",value:L.total_messages.toLocaleString(),icon:u.MessageSquare},{label:"Threads",value:String(L.threads_participated),icon:c.Hash},{label:"Journal Entries",value:String(Y.length),icon:m.BookOpen},{label:"Projects",value:String(K.length),icon:o.Users}];return(0,t.jsxs)("div",{className:"min-h-screen bg-[var(--background)] text-[var(--foreground)] font-sans selection:bg-amber-100/30",children:[(0,t.jsxs)("nav",{className:"desktop-titlebar sticky top-0 z-50 bg-[var(--card-bg)]/80 backdrop-blur-md border-b border-[var(--border)] px-4 md:px-8 h-14 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(s.default,{href:"/agents",className:"p-2 hover:bg-[var(--muted)] rounded-lg transition-colors group",children:(0,t.jsx)(d.ArrowLeft,{className:"w-5 h-5 text-[var(--muted-foreground)] group-hover:text-[var(--foreground)]"})}),(0,t.jsx)("div",{className:"h-4 w-[1px] bg-[var(--muted)] hidden md:block"}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-2 text-sm font-medium text-[var(--muted-foreground)]",children:[(0,t.jsx)(o.Users,{className:"w-4 h-4"}),(0,t.jsx)(s.default,{href:"/agents",className:"hover:text-[var(--foreground)] transition-colors",children:"Agents"}),(0,t.jsx)(h.ChevronRight,{className:"w-4 h-4 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"text-[var(--foreground)] font-semibold",children:M.name})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:P?.selfVersion&&(0,t.jsxs)("span",{className:"text-xs font-mono text-[var(--muted-foreground)] bg-[var(--muted)] px-2 py-1 rounded",children:["v",P.selfVersion]})})]}),(0,t.jsxs)("main",{className:"max-w-7xl mx-auto p-4 md:p-8 grid grid-cols-1 lg:grid-cols-12 gap-8",children:[(0,t.jsxs)("div",{className:"lg:col-span-4 space-y-6",children:[(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] shadow-xl shadow-black/5 overflow-hidden",children:[(0,t.jsx)("div",{className:"h-32 w-full relative",style:{background:`linear-gradient(135deg, ${F} 0%, ${F}99 100%)`},children:(0,t.jsx)("div",{className:"absolute inset-0 opacity-20 bg-[radial-gradient(#fff_1px,transparent_1px)] [background-size:16px_16px]"})}),(0,t.jsxs)("div",{className:"px-6 pb-6 text-center -mt-16 relative",children:[(0,t.jsxs)("div",{className:"inline-block relative",children:[(0,t.jsx)("img",{alt:M.name,className:"w-32 h-32 rounded-3xl bg-[var(--card-bg)] p-2 border-4 border-[var(--card-bg)] shadow-xl",src:(0,k.agentAvatarUrl)(M.id,128,M.color)}),(0,t.jsx)("div",{className:"absolute bottom-2 right-2 w-6 h-6 bg-green-500 border-4 border-[var(--card-bg)] rounded-full"})]}),(0,t.jsxs)("div",{className:"mt-4 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-black tracking-tight",children:M.name}),(0,t.jsx)("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider",style:{backgroundColor:`${F}20`,color:F},children:M.provider})]}),(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] font-mono text-xs",children:M.model})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-2 mt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-[var(--app-shell-subtle)] border border-[var(--border)] text-xs font-medium text-[var(--muted-foreground)]",children:[(0,t.jsx)(v.Cpu,{className:"w-3.5 h-3.5"}),M.model]}),(0,t.jsxs)("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-xs font-medium ${V.length>0?"bg-green-50 border-green-200 text-green-700":"bg-[var(--app-shell-subtle)] border-[var(--border)] text-[var(--muted-foreground)]"}`,children:[(0,t.jsx)(n.Activity,{className:`w-3.5 h-3.5 ${V.length>0?"animate-pulse":""}`}),V.length>0?"Working":"Idle"]})]}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 mt-8",children:eo.map((e,r)=>(0,t.jsxs)("div",{className:"bg-[var(--app-shell-subtle)] p-3 rounded-2xl border border-[var(--border)] text-left hover:border-[var(--border)] transition-colors cursor-default",children:[(0,t.jsx)(e.icon,{className:"w-4 h-4 text-[var(--muted-foreground)] mb-1"}),(0,t.jsx)("div",{className:"text-lg font-bold text-[var(--foreground)]",children:e.value}),(0,t.jsx)("div",{className:"text-[10px] uppercase font-bold text-[var(--muted-foreground)] tracking-wider",children:e.label})]},r))})]})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,t.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,t.jsx)(l.Zap,{className:"w-3.5 h-3.5"})," Actions"]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>B(!0),className:"flex-1 flex items-center justify-center gap-2 px-3 py-2.5 text-sm font-medium text-[var(--foreground)] bg-[var(--app-shell-subtle)] border border-[var(--border)] rounded-xl hover:bg-[var(--muted)] hover:border-[var(--border)] transition-all",children:[(0,t.jsx)(N.Pencil,{className:"w-3.5 h-3.5"}),"Edit"]}),(0,t.jsxs)("button",{type:"button",onClick:async()=>{let e=await fetch("/api/agents/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:[M.id]})});if(!e.ok)return;let t=await e.json(),r=new Blob([JSON.stringify({version:1,exportedAt:new Date().toISOString(),agents:t.agents,projects:[]},null,2)],{type:"application/json"}),a=URL.createObjectURL(r),s=document.createElement("a");s.href=a,s.download=`${M.name.toLowerCase().replace(/\s+/g,"-")}.agent.json`,s.click(),URL.revokeObjectURL(a)},className:"flex-1 flex items-center justify-center gap-2 px-3 py-2.5 text-sm font-medium text-[var(--foreground)] bg-[var(--app-shell-subtle)] border border-[var(--border)] rounded-xl hover:bg-[var(--muted)] hover:border-[var(--border)] transition-all",children:[(0,t.jsx)(y.Download,{className:"w-3.5 h-3.5"}),"Export"]})]})]}),V.length>0&&(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-green-200 ring-1 ring-green-100 p-5",children:[(0,t.jsxs)("h3",{className:"text-[11px] font-black text-green-600 uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,t.jsx)(n.Activity,{className:"w-3.5 h-3.5 animate-pulse"})," Working Now"]}),(0,t.jsx)("div",{className:"flex flex-col gap-2",children:V.map(e=>(0,t.jsxs)(s.default,{href:e.threadId?`/thread/${e.threadId}`:"#",className:"flex items-center gap-3 p-2.5 rounded-xl bg-green-50 border border-green-100 hover:border-green-300 hover:bg-green-100 transition-all group/work",children:[(0,t.jsx)("div",{className:"relative shrink-0",children:(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:e.threadId?(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(c.Hash,{className:"w-3 h-3 text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"truncate",children:e.threadTitle||e.threadId.substring(0,12)+"..."})]}):(0,t.jsx)("span",{children:"Main thread"})}),(0,t.jsx)("div",{className:"text-[10px] text-[var(--muted-foreground)] capitalize",children:e.state})]}),(0,t.jsx)(h.ChevronRight,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] group-hover/work:text-[var(--muted-foreground)]"})]},`${e.workspaceId}-${e.threadId}`))})]}),(M.skills&&M.skills.length>0||M.skillBindings&&M.skillBindings.length>0)&&(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,t.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,t.jsx)(i.BrainCircuit,{className:"w-3.5 h-3.5"})," Portable Knowledge"]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[M.skills?.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs p-2 hover:bg-[var(--app-shell-subtle)] rounded-lg transition-colors",children:[(0,t.jsx)(l.Zap,{size:10,className:"text-blue-500 shrink-0"}),(0,t.jsx)("span",{className:"text-blue-600 font-mono truncate",title:e.file,children:e.file.split("/").pop()}),e.condition&&(0,t.jsx)("span",{className:"text-[var(--muted-foreground)] text-[10px] ml-auto shrink-0",children:e.condition})]},`skill-${r}`)),M.skillBindings?.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs p-2 hover:bg-[var(--app-shell-subtle)] rounded-lg transition-colors",children:[(0,t.jsx)(m.BookOpen,{size:10,className:"text-emerald-500 shrink-0"}),(0,t.jsx)("span",{className:"text-emerald-600 font-mono truncate",title:`${e.repo}/${e.skillId}`,children:e.skillId}),e.condition&&(0,t.jsx)("span",{className:"text-[var(--muted-foreground)] text-[10px] ml-auto shrink-0",children:e.condition})]},`binding-${r}`))]})]}),(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,t.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,t.jsx)(b.ShieldCheck,{className:"w-3.5 h-3.5"})," Details"]}),(0,t.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"ID"}),(0,t.jsx)("span",{className:"font-mono bg-[var(--app-shell-subtle)] px-1.5 py-0.5 rounded",children:M.id})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Provider"}),(0,t.jsx)("span",{className:"font-medium capitalize",children:M.provider})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Model"}),(0,t.jsx)("span",{className:"font-mono",children:M.model})]}),P?.identity?.voice?(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Voice"}),(0,t.jsx)("span",{className:"font-medium",children:String(P.identity.voice)})]}):null,(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Color"}),(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("div",{className:"w-3 h-3 rounded-full border border-[var(--border)]",style:{backgroundColor:M.color}}),(0,t.jsx)("span",{className:"font-mono",children:M.color})]})]}),P?.selfDerivedAt&&(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Last Evolved"}),(0,t.jsx)("span",{className:"text-[var(--muted-foreground)]",children:ei(P.selfDerivedAt)})]})]})]}),K.length>0&&(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,t.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,t.jsx)(o.Users,{className:"w-3.5 h-3.5"})," Active Projects"]}),(0,t.jsx)("div",{className:"space-y-2",children:K.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-2 hover:bg-[var(--app-shell-subtle)] rounded-lg transition-colors group cursor-pointer",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[var(--muted)] flex items-center justify-center text-xs font-bold text-[var(--muted-foreground)] group-hover:bg-[var(--card-bg)] group-hover:shadow-sm",children:e.name[0]}),(0,t.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:e.name})]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[e.agents.length," agent",1!==e.agents.length?"s":""]})]},e.id))})]})]})]}),(0,t.jsxs)("div",{className:"lg:col-span-8 space-y-6",children:[(0,t.jsx)("div",{className:"bg-[var(--card-bg)] p-1 rounded-2xl border border-[var(--border)] flex shadow-sm",children:[{key:"inspect",label:"Inspect",icon:b.ShieldCheck},{key:"feed",label:"Feed",icon:u.MessageSquare},{key:"reflections",label:"Reflections",icon:x.Sparkles}].map(e=>(0,t.jsxs)("button",{onClick:()=>z(e.key),className:`flex-1 flex items-center justify-center gap-2 py-3 rounded-xl text-sm font-bold transition-all ${U===e.key?"bg-[var(--foreground)] text-[var(--background)] shadow-lg shadow-black/5":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[(0,t.jsx)(e.icon,{className:"w-4 h-4"}),e.label]},e.key))}),(0,t.jsxs)("div",{className:"min-h-[600px]",children:["inspect"===U&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[(0,t.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(m.BookOpen,{className:"w-4 h-4"})," Identity"]}),(0,t.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-emerald-50 text-emerald-700",children:"Human-authored"})]}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] leading-relaxed",children:"Canonical self-definition. The system can read this, but should not edit it."}),(0,t.jsxs)("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-2 gap-3 text-xs",children:[(0,t.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-3",children:[(0,t.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Voice"}),(0,t.jsx)("p",{className:"mt-1 text-[var(--foreground)]",children:String(P?.identity?.voice??"Not set")})]}),(0,t.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-3",children:[(0,t.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Seed"}),(0,t.jsx)("p",{className:"mt-1 text-[var(--foreground)]",children:String(P?.identity?.seed??"Not set")})]})]}),ee?.identity.sources?.length?(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)] mb-2",children:"Sources"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:ee.identity.sources.map(e=>(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:e},e))})]}):null]}),(0,t.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-amber-100 ring-1 ring-amber-200 p-6 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(x.Sparkles,{className:"w-4 h-4"})," Self-Model"]}),(0,t.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-amber-100 text-amber-700",children:"System-derived"})]}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] leading-relaxed",children:"Reflective specialization model: how this agent currently understands its fit, strengths, and direction."}),Z?(0,t.jsx)("div",{className:"mt-4 text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,t.jsx)(C.Markdown,{content:Z})}):(0,t.jsx)("p",{className:"mt-4 text-sm text-[var(--muted-foreground)]",children:"No self-model yet."}),(0,t.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[P?.selfVersion?(0,t.jsxs)("span",{className:"px-2 py-1 rounded-full bg-amber-50 text-[11px] font-medium text-amber-700",children:["v",P.selfVersion]}):null,P?.selfDerivedAt?(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:ei(P.selfDerivedAt)}):null,ee?.selfModel.sources?.map(e=>(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:e},e))]})]})]}),(0,t.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(i.BrainCircuit,{className:"w-4 h-4"})," Agent Knowledge"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[et.length+er.length+ea.length," items"]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Portable Knowledge"}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"Human-authored"})]}),0===et.length&&0===er.length?(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No portable knowledge attached."}):(0,t.jsxs)("div",{className:"space-y-2",children:[et.map(e=>(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-[var(--foreground)] truncate",title:e.file,children:e.file}),(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--muted-foreground)] shrink-0",children:e.form})]}),e.condition?(0,t.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:["Use when: ",e.condition]}):null]},`${e.file}:${e.condition}`)),er.map(e=>(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-[var(--foreground)] truncate",title:`${e.repo}/${e.skillId}`,children:e.skillId}),(0,t.jsx)("span",{className:"text-[10px] font-medium text-[var(--muted-foreground)] shrink-0",children:e.form})]}),(0,t.jsx)("p",{className:"mt-1 text-[10px] text-[var(--muted-foreground)] font-mono truncate",title:e.repo,children:e.repo}),e.condition?(0,t.jsxs)("p",{className:"mt-1 text-xs text-[var(--muted-foreground)]",children:["Use when: ",e.condition]}):null]},`${e.repo}:${e.skillId}`))]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Derived Knowledge Candidates"}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"System-derived"})]}),0===ea.length?(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No extracted learnings yet."}):(0,t.jsx)("div",{className:"space-y-2",children:ea.map(e=>(0,t.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:e.type}),(0,t.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:ei(e.createdAt)})]}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[var(--foreground)] leading-relaxed",children:e.content}),(0,t.jsxs)("div",{className:"mt-2 text-[10px] text-[var(--muted-foreground)] font-mono",children:["task ",e.taskId]})]},e.id))})]})]})]}),(0,t.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(n.Activity,{className:"w-4 h-4"})," Evidence"]}),(0,t.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-[var(--muted)] text-[var(--muted-foreground)]",children:"Non-canonical"})]}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] leading-relaxed mb-4",children:"Raw and semi-structured traces that support reflection and learning. These should be inspectable, but not treated as canonical truth."}),(0,t.jsx)("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-3",children:[{label:"Journal",value:es?.journalEntries??Y.length},{label:"Activity",value:es?.activityEvents??P?.activity?.length??0},{label:"Reactions",value:es?.reactions??0},{label:"Comments",value:es?.comments??0}].map(e=>(0,t.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-4",children:[(0,t.jsx)("div",{className:"text-lg font-bold text-[var(--foreground)]",children:e.value}),(0,t.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:e.label})]},e.label))})]})]}),"feed"===U&&(0,t.jsxs)("div",{className:"space-y-4",children:[Z||Q||P?.identity?.seed?(0,t.jsx)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:Z?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(g.Target,{className:"w-4 h-4"})," Self-Model"]}),P?.selfDerivedAt&&(0,t.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex items-center gap-1",children:[(0,t.jsx)(p.RefreshCw,{className:"w-3 h-3"}),"v",P.selfVersion," — ",ei(P.selfDerivedAt)]})]}),(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,t.jsx)(C.Markdown,{content:Z})})]}):Q?(0,t.jsxs)("div",{children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2 mb-4",children:[(0,t.jsx)(g.Target,{className:"w-4 h-4"})," Identity"]}),(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,t.jsx)(C.Markdown,{content:Q})})]}):P?.identity?.seed?(0,t.jsxs)("div",{children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2 mb-4",children:[(0,t.jsx)(g.Target,{className:"w-4 h-4"})," Identity Seed"]}),(0,t.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)] italic border-l-4 pl-4",style:{borderColor:F},children:["“",String(P.identity.seed),"”"]})]}):null}):null,(0,t.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(u.MessageSquare,{className:"w-4 h-4"})," Messages"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[en.length," messages"]})]}),0===en.length?(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,t.jsx)(u.MessageSquare,{size:32,className:"mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No messages yet"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Messages will appear here as this agent participates in threads"})]}):en.map(e=>{var r;let a=e.prevContent?(0,S.stripMarkers)(e.prevContent):null,n=(e=>{if(!e)return"You";let t=el.get(e);return t?.name??e})(e.prevParticipantId),l=(r=e.prevParticipantId)?el.get(r)?.color??"#94a3b8":"#6366f1",i=e.threadTitle?(0,S.stripMarkers)(e.threadTitle):null;return(0,t.jsx)("article",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 hover:shadow-xl hover:shadow-black/5 transition-all group",children:(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsx)("img",{src:(0,k.agentAvatarUrl)(M.id,40,M.color),alt:"",className:"w-10 h-10 rounded-2xl shrink-0 mt-0.5 shadow-sm"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-1",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-bold text-[var(--foreground)]",children:M.name}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",ei(e.timestamp)]})]})}),e.rootMessageId&&i&&(0,t.jsxs)(s.default,{href:`/thread/${e.threadId}`,className:"inline-flex items-center gap-1.5 mb-3 px-2.5 py-1 rounded-lg bg-[var(--app-shell-subtle)] border border-[var(--border)] hover:border-[var(--border)] hover:bg-[var(--muted)] transition-colors text-[11px] font-medium text-[var(--muted-foreground)] hover:text-[var(--foreground)] group/thread",children:[(0,t.jsx)(c.Hash,{className:"w-3 h-3 text-[var(--muted-foreground)] group-hover/thread:text-[var(--muted-foreground)]"}),(0,t.jsx)("span",{className:"truncate max-w-[300px]",children:i}),(0,t.jsx)(h.ChevronRight,{className:"w-3 h-3 text-[var(--muted-foreground)] group-hover/thread:text-[var(--muted-foreground)]"})]}),a&&(0,t.jsxs)("div",{className:"mb-3 flex items-start gap-2 pl-1",children:[(0,t.jsx)(j.CornerDownRight,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] shrink-0 mt-1"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 p-2.5 rounded-xl bg-[var(--app-shell-subtle)] border border-[var(--border)]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[e.prevParticipantId&&(0,t.jsx)("img",{src:(0,k.agentAvatarUrl)(e.prevParticipantId,16,l),alt:"",className:"w-4 h-4 rounded"}),(0,t.jsx)("span",{className:"text-[10px] font-bold",style:{color:l},children:n})]}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed line-clamp-2",children:a})]})]}),(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,t.jsx)(C.Markdown,{content:e.content})}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-1.5 text-[10px] text-[var(--muted-foreground)] font-medium",children:[(0,t.jsx)(f.Clock,{className:"w-3 h-3"}),ed(e.timestamp)]})]})]})},e.id)})]}),"reflections"===U&&(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,t.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,t.jsx)(m.BookOpen,{className:"w-4 h-4"})," Journal Reflections"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[G.length," reflections"]})]}),0===G.length?(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,t.jsx)(x.Sparkles,{size:32,className:"mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No reflections yet"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Reflections will appear as this agent evolves its self-model"})]}):G.map((e,r)=>{let a=e.body?(0,S.stripMarkers)(e.body):"";return(0,t.jsx)("article",{className:"bg-[var(--card-bg)] rounded-3xl border border-amber-100 ring-1 ring-amber-200 p-6 hover:shadow-xl hover:shadow-black/5 transition-all group",children:(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)("img",{alt:"",className:"w-10 h-10 rounded-2xl shadow-sm",src:(0,k.agentAvatarUrl)(M.id,40,M.color)}),(0,t.jsx)("div",{className:"absolute -top-1 -right-1 w-4 h-4 rounded-full flex items-center justify-center border-2 border-[var(--card-bg)]",style:{backgroundColor:F},children:(0,t.jsx)(x.Sparkles,{className:"w-2 h-2 text-white"})})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-bold text-[var(--foreground)]",children:M.name}),(0,t.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-amber-100 text-amber-700",children:"reflection"}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",ei(e.t)]})]}),e.selfVersion&&(0,t.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-mono",children:["v",e.selfVersion]})]}),e.observation&&(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mb-3",children:e.observation}),a&&(0,t.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,t.jsx)(C.Markdown,{content:a})}),(e.judgement||e.delta||e.intent)&&(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mt-4 pt-4 border-t border-[var(--border)] group-hover:border-[var(--border)] transition-colors",children:[e.judgement&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Judgment"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:e.judgement})]}),e.delta&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Delta"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:e.delta})]}),e.intent&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Intent"}),(0,t.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:e.intent})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-[var(--muted-foreground)] font-medium",children:[(0,t.jsx)(f.Clock,{className:"w-3 h-3"}),ed(e.t)]}),e.thread&&(0,t.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-mono flex items-center gap-1",children:[(0,t.jsx)(c.Hash,{className:"w-3 h-3"}),e.thread.substring(0,12),"..."]})]})]})]})},e.id??r)})]})]})]})]}),H&&(0,t.jsx)(k.AgentForm,{title:"Edit agent",initial:{name:M.name,title:M.title||"",provider:M.provider,model:M.model||"",identity:M.identity||"",color:M.color,skills:M.skills||[]},agentId:M.id,submitLabel:"Save",onSubmit:async e=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:M.id,name:e.name,title:e.title||null,provider:e.provider,model:e.model,color:e.color,...e.identity?{identity:e.identity}:{},skills:e.skills??[]})}),_({...M,name:e.name,title:e.title||void 0,provider:e.provider,model:e.model,identity:e.identity,color:e.color??M.color,skills:e.skills??[]}),B(!1)},onCancel:()=>B(!1)})]})}])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)},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)},618566,(e,t,i)=>{t.exports=e.r(976562)},529471,e=>{"use strict";let t=(0,e.i(363732).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",0,t],529471)},363732,e=>{"use strict";var t=e.i(271645);let i=(...e)=>e.filter((e,t,i)=>!!e&&""!==e.trim()&&i.indexOf(e)===t).join(" ").trim(),n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,i)=>i?i.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let a=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:l="",children:o,iconNode:d,...c},g)=>(0,t.createElement)("svg",{ref:g,...r,width:n,height:n,stroke:e,strokeWidth:s?24*Number(a)/Number(n):a,className:i("lucide",l),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...d.map(([e,i])=>(0,t.createElement)(e,i)),...Array.isArray(o)?o:[o]]));e.s(["default",0,(e,r)=>{let s=(0,t.forwardRef)(({className:s,...l},o)=>(0,t.createElement)(a,{ref:o,iconNode:r,className:i(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,s),...l}));return s.displayName=n(e),s}],363732)},797167,e=>{"use strict";let t=(0,e.i(363732).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",0,t],797167)},498027,e=>{"use strict";let t=(0,e.i(363732).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",0,t],498027)},572665,e=>{"use strict";let t=(0,e.i(363732).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["Users",0,t],572665)},19035,e=>{"use strict";let t=(0,e.i(363732).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],19035)},55236,e=>{"use strict";let t=(0,e.i(363732).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["Folder",0,t],55236)},906724,595807,e=>{"use strict";let t=(0,e.i(363732).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["default",0,t],595807),e.s(["Loader2",0,t],906724)},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",i="vercel/next-skills";function n(e,t,i){return i?{repo:e,skillId:t,condition:i}:{repo:e,skillId:t}}function r(e){return e.condition?{...e}:{repo:e.repo,skillId:e.skillId}}function a(e){let t={...e};return t.extraSkills&&(t.extraSkills=t.extraSkills.map(r)),t}function s(e){return{...e,agents:e.agents.map(a)}}function l(e){let t={...e,agents:e.agents.map(a)};return t.variants&&(t.variants=t.variants.map(s)),t}let o={"strategist-lead":[n(t,"brainstorming"),n(t,"writing-plans"),n(t,"dispatching-parallel-agents"),n(t,"requesting-code-review"),n(t,"verification-before-completion")],"senior-builder":[n(t,"test-driven-development"),n(t,"systematic-debugging"),n(t,"subagent-driven-development"),n(t,"requesting-code-review"),n(t,"verification-before-completion"),n(t,"finishing-a-development-branch")],builder:[n(t,"test-driven-development"),n(t,"systematic-debugging"),n(t,"verification-before-completion"),n(t,"finishing-a-development-branch")],planner:[n(t,"brainstorming"),n(t,"writing-plans"),n(t,"verification-before-completion")],researcher:[n(t,"brainstorming"),n(t,"writing-plans"),n(t,"systematic-debugging"),n(t,"verification-before-completion")],reviewer:[n(t,"systematic-debugging"),n(t,"test-driven-development"),n(t,"requesting-code-review"),n(t,"verification-before-completion")]},d=["strategist-lead","senior-builder","builder","planner","researcher","reviewer"].map(e=>({id:e,skills:o[e].map(r)})),c=[n(i,"api-routes","next.js app router, route handlers, api endpoints"),n(i,"nextjs-patterns","next.js app structure, routing, layouts, data fetching"),n(i,"react-server-components","react server components, server client boundaries, next.js rendering")],g={"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:[n(i,"nextjs-patterns","next.js ui flows, routing, layouts, app router"),n(i,"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=>a({id:e,...g[e]}));function p(e){return a({id:e,...g[e]})}let m=[{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),y=new Map(d.map(e=>[e.id,e])),f=new Map(u.map(e=>[e.id,e]));m.map(e=>[e.id,e]),e.s(["getAgentPresetBindings",0,function(e){let t,i="string"==typeof e?function(e){if(!e)return null;let t=f.get(e);return t?a(t):null}(e):e;return i?[...(t=function(e){if(!e)return null;let t=y.get(e);return t?{id:t.id,skills:t.skills.map(r)}:null}(i.skillProfileId))?t.skills:[],...i.extraSkills?i.extraSkills.map(r):[]]:[]},"listAgentPresets",0,function(){return u.map(a)},"listTeamTemplates",0,function(){return m.map(l)}])},211464,e=>{"use strict";let t=(0,e.i(363732).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",0,t],211464)},129463,e=>{"use strict";let t=(0,e.i(363732).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],129463)},245110,e=>{"use strict";let t=(0,e.i(363732).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],245110)}]);
|