@mndrk/agx 2.0.44 → 2.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cloud-runtime/standalone/.next/BUILD_ID +1 -1
- package/cloud-runtime/standalone/.next/app-path-routes-manifest.json +2 -0
- package/cloud-runtime/standalone/.next/build-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/prerender-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/routes-manifest.json +13 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/[id]/profile/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agents/export/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/create/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/automations/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/graphs/[graphId]/nodes/[nodeId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/learnings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/callback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/context/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js +5 -2
- package/cloud-runtime/standalone/.next/server/app/api/linear/issues/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/options/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/linear/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v2/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/skills/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/variables/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/schedules/poll/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/status/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/dependencies/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/events/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/metrics/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/restart/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/rollback/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/schedule/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/logs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/fail/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/resume/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/start/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/stop/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/extract/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/user-settings/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/board.segments/board/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board.segments/board.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page/react-loadable-manifest.json +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/linear/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +2 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[externals]__29a2424c._.js → [externals]__31e26905._.js} +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__fb1f7e58._.js → [root-of-the-server]__00fd30c8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e4f01b5c._.js → [root-of-the-server]__0e98af48._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1154e5b3._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__44ef900b._.js → [root-of-the-server]__11c1214e._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5e5eb809._.js → [root-of-the-server]__152b2000._.js} +10 -10
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f21849ad._.js → [root-of-the-server]__15f3bb96._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__7cade6c6._.js → [root-of-the-server]__1f53e82e._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c77efd85._.js → [root-of-the-server]__20533a2c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e0994be2._.js → [root-of-the-server]__3b1431b6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3b83b657._.js +147 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d3945cae._.js → [root-of-the-server]__3bf516b6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2d15af44._.js → [root-of-the-server]__3fd3c5b1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__13fe776f._.js → [root-of-the-server]__42e713f5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__1be9b30e._.js → [root-of-the-server]__4b0b5fe1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__558389f7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5a042505._.js → [root-of-the-server]__5aaf8c25._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__22b7bf38._.js → [root-of-the-server]__5b13e7a5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__34efe92e._.js → [root-of-the-server]__635fe0f9._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c9550a93._.js → [root-of-the-server]__68da2825._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e5bad635._.js → [root-of-the-server]__6921fe3f._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__dc542063._.js → [root-of-the-server]__6988985c._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c5025f86._.js → [root-of-the-server]__7012e83d._.js} +7 -7
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__9d3a2caa._.js → [root-of-the-server]__70327010._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__748c718f._.js +147 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__76290829._.js +46 -8
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c0919d7d._.js → [root-of-the-server]__79fa35e4._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ac9b93fd._.js → [root-of-the-server]__8d205f82._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__0281ad06._.js → [root-of-the-server]__9ffa67b7._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__dd1cb250._.js → [root-of-the-server]__a300f072._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5fbc700c._.js → [root-of-the-server]__a7e0ac67._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__91b51f33._.js → [root-of-the-server]__aad349b4._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ad6d6402._.js +46 -8
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__349d67e7._.js → [root-of-the-server]__b133856b._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__45a50de9._.js → [root-of-the-server]__c029daab._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a1e62918._.js → [root-of-the-server]__c8195768._.js} +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ce2a1672._.js +67 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__a2e17f69._.js → [root-of-the-server]__d4f42f49._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d9f2041b._.js +47 -9
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ad4cb055._.js → [root-of-the-server]__dca6026a._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__bacb0193._.js → [root-of-the-server]__ddb3aa76._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__de295ef3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__7d4fa0fd._.js → [root-of-the-server]__e7be56ba._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__73b17f49._.js → [root-of-the-server]__ebece93b._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ef27f8cd._.js +49 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__56dbe1a4._.js → [root-of-the-server]__f13c29c6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__98d58423._.js → [root-of-the-server]__fcdaf6d8._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/_6e7f0ae4._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/_a93e80e8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_issues_context_route_actions_0b2c282c.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_linear_options_route_actions_29764947.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_app-config_ts_7f2f30ad._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__1c4256ce._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__4c9d0778._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__69887882._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__f59f0dc7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_95434d70._.js → _1d26be78._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_32c878b9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_60d0bae4._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_77e1407a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_7f7a828a._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ba5903a7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ed4fece9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_f51a3112._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_linear_page_tsx_971a6ba7._.js +3 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +7 -3
- package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +2 -0
- package/cloud-runtime/standalone/.next/server/instrumentation.js +1 -1
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/02add5a8d35c53fe.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2362d5c0dcaa5d64.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2730394502dd3664.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/37f07896b044d69f.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/3dc50de1c86e1ce9.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/4ea8f08087116055.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/5607ad702ebb8a4b.js +9 -0
- package/cloud-runtime/standalone/.next/static/chunks/6103b9b5538bba4d.css +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/98c20da4973991f0.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/a9da98f883ac833b.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{da12f313213a5615.js → b2127dc67c5ade9f.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{76229fb555232113.js → b3377e39d47c71cf.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/bf2a2fafb710e63c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/c0d17e0c37ba8e7a.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/cca7c8e4ade050f0.js +37 -0
- package/cloud-runtime/standalone/.next/static/chunks/db131a0b6350e416.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/e51fddf53a6dc1e4.js +9 -0
- package/cloud-runtime/standalone/.next/static/chunks/{66769c2bf128027d.js → f4360c3e4089263f.js} +1 -1
- package/cloud-runtime/standalone/Dockerfile +5 -5
- package/cloud-runtime/standalone/app/api/linear/callback/route.ts +2 -1
- package/cloud-runtime/standalone/app/api/linear/issues/context/route.ts +26 -0
- package/cloud-runtime/standalone/app/api/linear/issues/route.ts +44 -42
- package/cloud-runtime/standalone/app/api/linear/options/route.ts +31 -0
- package/cloud-runtime/standalone/app/api/status/route.ts +2 -2
- package/cloud-runtime/standalone/components/LinearBoard.tsx +411 -117
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +3 -1
- package/cloud-runtime/standalone/components/chat-ui/Composer.tsx +54 -2
- package/cloud-runtime/standalone/components/chat-ui/MentionPopover.tsx +43 -2
- package/cloud-runtime/standalone/hooks/useLinearIssueMentions.ts +64 -0
- package/cloud-runtime/standalone/hooks/useLinearIssues.ts +30 -6
- package/cloud-runtime/standalone/hooks/useMentionAutocomplete.ts +54 -6
- package/cloud-runtime/standalone/instrumentation.ts +2 -1
- package/cloud-runtime/standalone/lib/app-config.ts +55 -0
- package/cloud-runtime/standalone/lib/chat/linear-issue-context.ts +79 -0
- package/cloud-runtime/standalone/lib/linear-client.ts +166 -15
- package/cloud-runtime/standalone/lib/linear-issue-store.ts +433 -0
- package/cloud-runtime/standalone/lib/linear-issues.ts +360 -0
- package/cloud-runtime/standalone/lib/security.ts +2 -2
- package/cloud-runtime/standalone/lib/tiptap/composer-mentions.ts +38 -0
- package/cloud-runtime/standalone/lib/tiptap/editor-utils.ts +11 -0
- package/cloud-runtime/standalone/lib/tiptap/serialize-composer.ts +10 -0
- package/cloud-runtime/standalone/next.config.ts +2 -1
- package/cloud-runtime/standalone/src/graph/internal-function-dispatcher.ts +2 -5
- package/cloud-runtime/standalone/state/automations/.state/24a6a5db-3b14-49c4-841f-29f10f015fbb.json +3 -3
- package/cloud-runtime/standalone/styles/composer-pills.css +13 -0
- package/package.json +1 -1
- package/cloud-runtime/standalone/.linear-token.json +0 -4
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__05243927._.js +0 -29
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1017e012._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__28524c6a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c1b28690._.js +0 -49
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__dffa5183._.js +0 -29
- package/cloud-runtime/standalone/.next/server/chunks/_110bf46e._.js +0 -6
- package/cloud-runtime/standalone/.next/server/chunks/_22fe5fd2._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__35f9b4a6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__43a0398d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__7e7d6790._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__b6598a70._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_087a5b2b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_1e5aee62._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_45f91a8f._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fb404ac0._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/0010f3df27ae53b8.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/09c637be82a06122.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/0fe219bd73492107.js +0 -5
- package/cloud-runtime/standalone/.next/static/chunks/2dbfd095c1e1d01f.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/360fde144fd22461.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/416cf5039e669b5d.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/95b85b1cb6868d27.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/966278eaefc0aa32.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/ab74849aeb87503e.js +0 -5
- package/cloud-runtime/standalone/.next/static/chunks/c5661b1d4c5abd6a.css +0 -2
- package/cloud-runtime/standalone/.next/static/chunks/d522224ad5c8d724.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/e2fa3c18dd56dc25.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/e910386016ceacad.js +0 -37
- package/cloud-runtime/standalone/.next/static/chunks/f2fe77583374541b.js +0 -1
- package/cloud-runtime/standalone/coverage/clover.xml +0 -1208
- package/cloud-runtime/standalone/coverage/coverage-final.json +0 -29
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/audit/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/audit/route.ts.html +0 -208
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/[...nextauth]/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/[...nextauth]/route.ts.html +0 -166
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/daemon-secret/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/daemon-secret/route.ts.html +0 -532
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/status/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/auth/status/route.ts.html +0 -178
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/learnings/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/learnings/route.ts.html +0 -262
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/logs/stream/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/logs/stream/route.ts.html +0 -448
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/complete/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/complete/route.ts.html +0 -331
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/queue/route.ts.html +0 -505
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/stage-prompts/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/stage-prompts/route.ts.html +0 -412
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/advance/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/advance/route.ts.html +0 -304
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/logs/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/logs/route.ts.html +0 -202
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/[id]/route.ts.html +0 -373
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/route.ts.html +0 -499
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/stream/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/app/api/tasks/stream/route.ts.html +0 -349
- package/cloud-runtime/standalone/coverage/lcov-report/base.css +0 -224
- package/cloud-runtime/standalone/coverage/lcov-report/block-navigation.js +0 -87
- package/cloud-runtime/standalone/coverage/lcov-report/components/AuthProvider.tsx.html +0 -259
- package/cloud-runtime/standalone/coverage/lcov-report/components/ChatInterface.tsx.html +0 -1228
- package/cloud-runtime/standalone/coverage/lcov-report/components/KanbanBoard.tsx.html +0 -1024
- package/cloud-runtime/standalone/coverage/lcov-report/components/Layout.tsx.html +0 -211
- package/cloud-runtime/standalone/coverage/lcov-report/components/LearningsPanel.tsx.html +0 -535
- package/cloud-runtime/standalone/coverage/lcov-report/components/LogTimeline.tsx.html +0 -415
- package/cloud-runtime/standalone/coverage/lcov-report/components/SortableTaskCard.tsx.html +0 -358
- package/cloud-runtime/standalone/coverage/lcov-report/components/StagePills.tsx.html +0 -439
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskCard.tsx.html +0 -514
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskCardOverlay.tsx.html +0 -256
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskDetail.tsx.html +0 -622
- package/cloud-runtime/standalone/coverage/lcov-report/components/TaskList.tsx.html +0 -253
- package/cloud-runtime/standalone/coverage/lcov-report/components/index.html +0 -281
- package/cloud-runtime/standalone/coverage/lcov-report/favicon.png +0 -0
- package/cloud-runtime/standalone/coverage/lcov-report/hooks/index.html +0 -116
- package/cloud-runtime/standalone/coverage/lcov-report/hooks/useTasks.ts.html +0 -1042
- package/cloud-runtime/standalone/coverage/lcov-report/index.html +0 -341
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth-client.ts.html +0 -202
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth-server.ts.html +0 -172
- package/cloud-runtime/standalone/coverage/lcov-report/lib/auth.ts.html +0 -265
- package/cloud-runtime/standalone/coverage/lcov-report/lib/db.ts.html +0 -1252
- package/cloud-runtime/standalone/coverage/lcov-report/lib/index.html +0 -131
- package/cloud-runtime/standalone/coverage/lcov-report/lib/orchestrator.ts.html +0 -409
- package/cloud-runtime/standalone/coverage/lcov-report/lib/security.ts.html +0 -1165
- package/cloud-runtime/standalone/coverage/lcov-report/lib/supabase-server.ts.html +0 -175
- package/cloud-runtime/standalone/coverage/lcov-report/lib/supabase.ts.html +0 -157
- package/cloud-runtime/standalone/coverage/lcov-report/prettify.css +0 -1
- package/cloud-runtime/standalone/coverage/lcov-report/prettify.js +0 -2
- package/cloud-runtime/standalone/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/cloud-runtime/standalone/coverage/lcov-report/sorter.js +0 -210
- package/cloud-runtime/standalone/coverage/lcov.info +0 -2386
- /package/cloud-runtime/standalone/.next/static/{1ixi4WIJBgIPp7LJeYeKs → 1Q0q2lXllTpqCvmNQYtpD}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{1ixi4WIJBgIPp7LJeYeKs → 1Q0q2lXllTpqCvmNQYtpD}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{1ixi4WIJBgIPp7LJeYeKs → 1Q0q2lXllTpqCvmNQYtpD}/_ssgManifest.js +0 -0
package/cloud-runtime/standalone/.next/static/chunks/{66769c2bf128027d.js → f4360c3e4089263f.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,871689,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],871689)},274049,e=>{"use strict";var t=e.i(271645);function r(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!1),[n,l]=(0,t.useState)(null),o=(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)(()=>{o()},[o]);let i=(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:o,createProject:i,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))},[])}}function a(){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:o}=await l.json(),i=Array.isArray(t)?t:t?[t]:[];for(let e of i)await fetch(`/api/projects/${o.id}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:e})}).catch(()=>{});let d={...o,repos:o.repos??[],agents:[],thread_ids:i,workspace_ids:i};return r(e=>[...e,d].sort((e,t)=>e.name.localeCompare(t.name))),d}catch{return null}},[]),o=(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{}},[]),i=(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{}},[]),d=(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:d,renameProject:o,deleteProject:i,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}}e.s(["useProjects",()=>r,"useProjectsWithAgents",()=>a])},618566,(e,t,r)=>{t.exports=e.r(976562)},829415,e=>{"use strict";function t(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()}e.s(["stripMarkers",()=>t])},503116,e=>{"use strict";let t=(0,e.i(475254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],503116)},16715,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],16715)},788699,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],788699)},39312,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],39312)},75505,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],75505)},643531,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],643531)},284614,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],284614)},283086,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],283086)},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},664659,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],664659)},475254,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:o="",children:i,iconNode:d,...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",o),...!i&&!(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,r])=>(0,t.createElement)(e,r)),...Array.isArray(i)?i:[i]])),l=(e,s)=>{let l=(0,t.forwardRef)(({className:l,...o},i)=>(0,t.createElement)(n,{ref:i,iconNode:s,className:r(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=a(e),l};e.s(["default",()=>l],475254)},37727,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},233525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return i},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});function n(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,l(e));else t.set(r,l(a));return t}function i(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return i}};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 o(e){let{auth:t,hostname:r}=e,a=e.protocol||"",s=e.pathname||"",o=e.hash||"",i=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),i&&"object"==typeof i&&(i=String(n.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==d?(d="//"+(d||""),s&&"/"!==s[0]&&(s="/"+s)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${s}${c}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(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)},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return j},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return l},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return i},isResSent:function(){return m},loadGetInitialProps:function(){return x},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return N}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=e=>o.test(e);function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function m(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function x(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await x(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&m(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}let f="u">typeof performance,h=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function N(e){return JSON.stringify({message:e.message,stack:e.stack})}},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),o=n._(e.r(271645)),i=e.r(195057),d=e.r(8372),c=e.r(818581),u=e.r(718967),m=e.r(405550);e.r(233525);let p=e.r(91949),x=e.r(573668),f=e.r(509396);function h(e){return"string"==typeof e?e:(0,i.formatUrl)(e)}function g(t){var r;let a,s,n,[i,g]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,o.useRef)(null),{href:j,as:y,children:N,prefetch:k=null,passHref:w,replace:S,shallow:C,scroll:M,onClick:_,onMouseEnter:E,onTouchStart:P,legacyBehavior:O=!1,onNavigate:A,ref:T,unstable_dynamicOnHover:$,...I}=t;a=N,O&&("string"==typeof a||"number"==typeof a)&&(a=(0,l.jsx)("a",{children:a}));let L=o.default.useContext(d.AppRouterContext),R=!1!==k,U=!1!==k?null===(r=k)||"auto"===r?f.FetchStrategy.PPR:f.FetchStrategy.Full:f.FetchStrategy.PPR,{href:D,as:z}=o.default.useMemo(()=>{let e=h(j);return{href:e,as:y?h(y):e}},[j,y]);if(O){if(a?.$$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});s=o.default.Children.only(a)}let F=O?s&&"object"==typeof s&&s.ref:T,H=o.default.useCallback(e=>(null!==L&&(b.current=(0,p.mountLinkInstance)(e,D,L,U,R,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[R,D,L,U,g]),V={ref:(0,c.useMergedRef)(H,F),onClick(t){O||"function"!=typeof _||_(t),O&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!L||t.defaultPrevented||function(t,r,a,s,n,l,i){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,x.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(699781);o.default.startTransition(()=>{u(a||r,n?"replace":"push",l??!0,s.current)})}}(t,D,z,b,S,M,A)},onMouseEnter(e){O||"function"!=typeof E||E(e),O&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),L&&R&&(0,p.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){O||"function"!=typeof P||P(e),O&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),L&&R&&(0,p.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,u.isAbsoluteUrl)(z)?V.href=z:O&&!w&&("a"!==s.type||"href"in s.props)||(V.href=(0,m.addBasePath)(z)),n=O?o.default.cloneElement(s,V):(0,l.jsx)("a",{...I,...V,children:a}),(0,l.jsx)(v.Provider,{value:i,children:n})}e.r(284508);let v=(0,o.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,o.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)},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,o=a.useLayoutEffect,i=a.useDebugValue;function d(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 o(function(){s.value=r,s.getSnapshot=t,d(s)&&c({inst:s})},[e,r,t]),l(function(){return d(s)&&c({inst:s}),e(function(){d(s)&&c({inst:s})})},[e]),i(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,o=a.useRef,i=a.useEffect,d=a.useMemo,c=a.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,a,s){var u=o(null);if(null===u.current){var m={hasValue:!1,value:null};u.current=m}else m=u.current;var p=l(e,(u=d(function(){function e(e){if(!i){if(i=!0,l=e,e=a(e),void 0!==s&&m.hasValue){var t=m.value;if(s(t,e))return o=t}return o=e}if(t=o,n(l,e))return t;var r=a(e);return void 0!==s&&s(t,r)?(l=e,t):(l=e,o=r)}var l,o,i=!1,d=void 0===r?null:r;return[function(){return e(t())},null===d?void 0:function(){return e(d())}]},[t,r,a,s]))[0],u[1]);return i(function(){m.hasValue=!0,m.value=p},[p]),c(p),p}},430224,(e,t,r)=>{"use strict";t.exports=e.r(752822)},88081,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],88081)},463059,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],463059)},440160,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],440160)},761911,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],761911)},686311,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],686311)},581418,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],581418)},623385,e=>{"use strict";let t=(0,e.i(475254).default)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);e.s(["BrainCircuit",()=>t],623385)},65143,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(522016),n=e.i(475254);let l=(0,n.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"}]]);var o=e.i(39312),i=e.i(623385),d=e.i(871689),c=e.i(761911),u=e.i(88081),m=e.i(686311),p=e.i(810980),x=e.i(283086),f=e.i(16715),h=e.i(463059),g=e.i(503116);let v=(0,n.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"}]]);var b=e.i(966992),j=e.i(581418);let y=(0,n.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"}]]);var N=e.i(440160),k=e.i(788699),w=e.i(325459),S=e.i(274049),C=e.i(829415),M=e.i(514065);function _(){let{id:e}=(0,a.useParams)(),[n,_]=(0,r.useState)(null),[E,P]=(0,r.useState)([]),[O,A]=(0,r.useState)(null),[T,$]=(0,r.useState)([]),[I,L]=(0,r.useState)({total_messages:0,threads_participated:0}),[R,U]=(0,r.useState)(!0),[D,z]=(0,r.useState)("feed"),[F,H]=(0,r.useState)(!1),[V,B]=(0,r.useState)([]),{projects:q}=(0,S.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:[];P(s),_(s.find(t=>t.id===e)??null),A(r),$(a?.messages??[]),L(a?.stats??{total_messages:0,threads_participated:0}),U(!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();B(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(!n)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 J=n.color||"#D97706",K=q.filter(e=>e.agents.some(e=>e.agent_id===n.id)),W=O?.self||"",Z=(0,C.stripMarkers)(W),X=n.identity||"",Q=(0,C.stripMarkers)(X),G=O?.journal??[],Y=G.filter(e=>"reflection"===e.type),ee=O?.inspectability,et=ee?.knowledge.agent.portableSkills??[],er=ee?.knowledge.agent.learnedMemories??[],ea=ee?.evidence,es=T.map(e=>({...e,content:(0,C.stripMarkers)(e.content)})).filter(e=>e.content.length>0),en=new Map;for(let e of E)en.set(e.id,e);let el=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)},eo=e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t)},ei=[{label:"Messages",value:I.total_messages.toLocaleString(),icon:m.MessageSquare},{label:"Threads",value:String(I.threads_participated),icon:u.Hash},{label:"Journal Entries",value:String(G.length),icon:p.BookOpen},{label:"Projects",value:String(K.length),icon:c.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)(c.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:n.name})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:O?.selfVersion&&(0,t.jsxs)("span",{className:"text-xs font-mono text-[var(--muted-foreground)] bg-[var(--muted)] px-2 py-1 rounded",children:["v",O.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, ${J} 0%, ${J}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:n.name,className:"w-32 h-32 rounded-3xl bg-[var(--card-bg)] p-2 border-4 border-[var(--card-bg)] shadow-xl",src:(0,w.agentAvatarUrl)(n.id,128,n.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:n.name}),(0,t.jsx)("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider",style:{backgroundColor:`${J}20`,color:J},children:n.provider})]}),(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] font-mono text-xs",children:n.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)(b.Cpu,{className:"w-3.5 h-3.5"}),n.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)(l,{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:ei.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)(o.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:()=>H(!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)(k.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:[n.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=`${n.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)(N.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)(l,{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)(u.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}`))})]}),n.skills&&n.skills.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.jsx)("div",{className:"flex flex-col gap-2",children:n.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)(o.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})]},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)(j.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:n.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:n.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:n.model})]}),O?.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(O.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:n.color}}),(0,t.jsx)("span",{className:"font-mono",children:n.color})]})]}),O?.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:el(O.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)(c.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:j.ShieldCheck},{key:"feed",label:"Feed",icon:m.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 ${D===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"===D&&(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)(p.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(O?.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(O?.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)(M.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:[O?.selfVersion?(0,t.jsxs)("span",{className:"px-2 py-1 rounded-full bg-amber-50 text-[11px] font-medium text-amber-700",children:["v",O.selfVersion]}):null,O?.selfDerivedAt?(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:el(O.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," 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,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No portable knowledge attached."}):(0,t.jsx)("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}`))})]}),(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===er.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: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:"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:el(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)(l,{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:ea?.journalEntries??G.length},{label:"Activity",value:ea?.activityEvents??O?.activity?.length??0},{label:"Reactions",value:ea?.reactions??0},{label:"Comments",value:ea?.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"===D&&(0,t.jsxs)("div",{className:"space-y-4",children:[Z||Q||O?.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)(v,{className:"w-4 h-4"})," Self-Model"]}),O?.selfDerivedAt&&(0,t.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex items-center gap-1",children:[(0,t.jsx)(f.RefreshCw,{className:"w-3 h-3"}),"v",O.selfVersion," — ",el(O.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)(M.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)(v,{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)(M.Markdown,{content:Q})})]}):O?.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)(v,{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:J},children:["“",String(O.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)(m.MessageSquare,{className:"w-4 h-4"})," Messages"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[es.length," messages"]})]}),0===es.length?(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,t.jsx)(m.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"})]}):es.map(e=>{var r;let a=e.prevContent?(0,C.stripMarkers)(e.prevContent):null,l=(e=>{if(!e)return"You";let t=en.get(e);return t?.name??e})(e.prevParticipantId),o=(r=e.prevParticipantId)?en.get(r)?.color??"#94a3b8":"#6366f1",i=e.threadTitle?(0,C.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,w.agentAvatarUrl)(n.id,40,n.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:n.name}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",el(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)(u.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)(y,{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,w.agentAvatarUrl)(e.prevParticipantId,16,o),alt:"",className:"w-4 h-4 rounded"}),(0,t.jsx)("span",{className:"text-[10px] font-bold",style:{color:o},children:l})]}),(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)(M.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)(g.Clock,{className:"w-3 h-3"}),eo(e.timestamp)]})]})]})},e.id)})]}),"reflections"===D&&(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)(p.BookOpen,{className:"w-4 h-4"})," Journal Reflections"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[Y.length," reflections"]})]}),0===Y.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"})]}):Y.map((e,r)=>{let a=e.body?(0,C.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,w.agentAvatarUrl)(n.id,40,n.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:J},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:n.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:["• ",el(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)(M.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)(g.Clock,{className:"w-3 h-3"}),eo(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)(u.Hash,{className:"w-3 h-3"}),e.thread.substring(0,12),"..."]})]})]})]})},e.id??r)})]})]})]})]}),F&&(0,t.jsx)(w.AgentForm,{title:"Edit agent",initial:{name:n.name,title:n.title||"",provider:n.provider,model:n.model||"",identity:n.identity||"",color:n.color,skills:n.skills||[]},agentId:n.id,submitLabel:"Save",onSubmit:async e=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:n.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??[]})}),_({...n,name:e.name,title:e.title||void 0,provider:e.provider,model:e.model,identity:e.identity,color:e.color??n.color,skills:e.skills??[]}),H(!1)},onCancel:()=>H(!1)})]})}e.s(["default",()=>_],65143)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,871689,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],871689)},274049,e=>{"use strict";var t=e.i(271645);function r(){let[e,r]=(0,t.useState)([]),[a,s]=(0,t.useState)(!1),[n,l]=(0,t.useState)(null),o=(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)(()=>{o()},[o]);let i=(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:o,createProject:i,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))},[])}}function a(){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:o}=await l.json(),i=Array.isArray(t)?t:t?[t]:[];for(let e of i)await fetch(`/api/projects/${o.id}/threads`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({threadId:e})}).catch(()=>{});let d={...o,repos:o.repos??[],agents:[],thread_ids:i,workspace_ids:i};return r(e=>[...e,d].sort((e,t)=>e.name.localeCompare(t.name))),d}catch{return null}},[]),o=(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{}},[]),i=(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{}},[]),d=(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:d,renameProject:o,deleteProject:i,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}}e.s(["useProjects",()=>r,"useProjectsWithAgents",()=>a])},618566,(e,t,r)=>{t.exports=e.r(976562)},39312,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],39312)},788699,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],788699)},503116,e=>{"use strict";let t=(0,e.i(475254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],503116)},16715,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],16715)},829415,e=>{"use strict";function t(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()}e.s(["stripMarkers",()=>t])},686311,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],686311)},440160,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],440160)},75505,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],75505)},643531,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],643531)},284614,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],284614)},283086,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],283086)},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},664659,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],664659)},475254,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:o="",children:i,iconNode:d,...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",o),...!i&&!(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,r])=>(0,t.createElement)(e,r)),...Array.isArray(i)?i:[i]])),l=(e,s)=>{let l=(0,t.forwardRef)(({className:l,...o},i)=>(0,t.createElement)(n,{ref:i,iconNode:s,className:r(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...o}));return l.displayName=a(e),l};e.s(["default",()=>l],475254)},37727,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},233525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return i},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});function n(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function l(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,l(e));else t.set(r,l(a));return t}function i(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return i}};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 o(e){let{auth:t,hostname:r}=e,a=e.protocol||"",s=e.pathname||"",o=e.hash||"",i=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:r&&(d=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(d+=":"+e.port)),i&&"object"==typeof i&&(i=String(n.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||l.test(a))&&!1!==d?(d="//"+(d||""),s&&"/"!==s[0]&&(s="/"+s)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),s=s.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${a}${d}${s}${c}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(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)},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return j},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return f},ST:function(){return h},WEB_VITALS:function(){return n},execOnce:function(){return l},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return i},isResSent:function(){return m},loadGetInitialProps:function(){return x},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return N}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function l(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,i=e=>o.test(e);function d(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function m(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function x(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await x(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&m(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return a}let f="u">typeof performance,h=f&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function N(e){return JSON.stringify({message:e.message,stack:e.stack})}},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),o=n._(e.r(271645)),i=e.r(195057),d=e.r(8372),c=e.r(818581),u=e.r(718967),m=e.r(405550);e.r(233525);let p=e.r(91949),x=e.r(573668),f=e.r(509396);function h(e){return"string"==typeof e?e:(0,i.formatUrl)(e)}function g(t){var r;let a,s,n,[i,g]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,o.useRef)(null),{href:j,as:y,children:N,prefetch:k=null,passHref:w,replace:S,shallow:C,scroll:M,onClick:_,onMouseEnter:E,onTouchStart:P,legacyBehavior:O=!1,onNavigate:A,ref:T,unstable_dynamicOnHover:$,...I}=t;a=N,O&&("string"==typeof a||"number"==typeof a)&&(a=(0,l.jsx)("a",{children:a}));let L=o.default.useContext(d.AppRouterContext),R=!1!==k,U=!1!==k?null===(r=k)||"auto"===r?f.FetchStrategy.PPR:f.FetchStrategy.Full:f.FetchStrategy.PPR,{href:D,as:z}=o.default.useMemo(()=>{let e=h(j);return{href:e,as:y?h(y):e}},[j,y]);if(O){if(a?.$$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});s=o.default.Children.only(a)}let F=O?s&&"object"==typeof s&&s.ref:T,H=o.default.useCallback(e=>(null!==L&&(b.current=(0,p.mountLinkInstance)(e,D,L,U,R,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[R,D,L,U,g]),V={ref:(0,c.useMergedRef)(H,F),onClick(t){O||"function"!=typeof _||_(t),O&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!L||t.defaultPrevented||function(t,r,a,s,n,l,i){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,x.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(699781);o.default.startTransition(()=>{u(a||r,n?"replace":"push",l??!0,s.current)})}}(t,D,z,b,S,M,A)},onMouseEnter(e){O||"function"!=typeof E||E(e),O&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),L&&R&&(0,p.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){O||"function"!=typeof P||P(e),O&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),L&&R&&(0,p.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,u.isAbsoluteUrl)(z)?V.href=z:O&&!w&&("a"!==s.type||"href"in s.props)||(V.href=(0,m.addBasePath)(z)),n=O?o.default.cloneElement(s,V):(0,l.jsx)("a",{...I,...V,children:a}),(0,l.jsx)(v.Provider,{value:i,children:n})}e.r(284508);let v=(0,o.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,o.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)},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,o=a.useLayoutEffect,i=a.useDebugValue;function d(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 o(function(){s.value=r,s.getSnapshot=t,d(s)&&c({inst:s})},[e,r,t]),l(function(){return d(s)&&c({inst:s}),e(function(){d(s)&&c({inst:s})})},[e]),i(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,o=a.useRef,i=a.useEffect,d=a.useMemo,c=a.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,a,s){var u=o(null);if(null===u.current){var m={hasValue:!1,value:null};u.current=m}else m=u.current;var p=l(e,(u=d(function(){function e(e){if(!i){if(i=!0,l=e,e=a(e),void 0!==s&&m.hasValue){var t=m.value;if(s(t,e))return o=t}return o=e}if(t=o,n(l,e))return t;var r=a(e);return void 0!==s&&s(t,r)?(l=e,t):(l=e,o=r)}var l,o,i=!1,d=void 0===r?null:r;return[function(){return e(t())},null===d?void 0:function(){return e(d())}]},[t,r,a,s]))[0],u[1]);return i(function(){m.hasValue=!0,m.value=p},[p]),c(p),p}},430224,(e,t,r)=>{"use strict";t.exports=e.r(752822)},88081,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],88081)},463059,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],463059)},761911,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],761911)},581418,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],581418)},623385,e=>{"use strict";let t=(0,e.i(475254).default)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);e.s(["BrainCircuit",()=>t],623385)},65143,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e.i(522016),n=e.i(475254);let l=(0,n.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"}]]);var o=e.i(39312),i=e.i(623385),d=e.i(871689),c=e.i(761911),u=e.i(88081),m=e.i(686311),p=e.i(810980),x=e.i(283086),f=e.i(16715),h=e.i(463059),g=e.i(503116);let v=(0,n.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"}]]);var b=e.i(966992),j=e.i(581418);let y=(0,n.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"}]]);var N=e.i(440160),k=e.i(788699),w=e.i(325459),S=e.i(274049),C=e.i(829415),M=e.i(514065);function _(){let{id:e}=(0,a.useParams)(),[n,_]=(0,r.useState)(null),[E,P]=(0,r.useState)([]),[O,A]=(0,r.useState)(null),[T,$]=(0,r.useState)([]),[I,L]=(0,r.useState)({total_messages:0,threads_participated:0}),[R,U]=(0,r.useState)(!0),[D,z]=(0,r.useState)("feed"),[F,H]=(0,r.useState)(!1),[V,B]=(0,r.useState)([]),{projects:q}=(0,S.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:[];P(s),_(s.find(t=>t.id===e)??null),A(r),$(a?.messages??[]),L(a?.stats??{total_messages:0,threads_participated:0}),U(!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();B(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(!n)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 J=n.color||"#D97706",K=q.filter(e=>e.agents.some(e=>e.agent_id===n.id)),W=O?.self||"",Z=(0,C.stripMarkers)(W),X=n.identity||"",Q=(0,C.stripMarkers)(X),G=O?.journal??[],Y=G.filter(e=>"reflection"===e.type),ee=O?.inspectability,et=ee?.knowledge.agent.portableSkills??[],er=ee?.knowledge.agent.learnedMemories??[],ea=ee?.evidence,es=T.map(e=>({...e,content:(0,C.stripMarkers)(e.content)})).filter(e=>e.content.length>0),en=new Map;for(let e of E)en.set(e.id,e);let el=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)},eo=e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(t)},ei=[{label:"Messages",value:I.total_messages.toLocaleString(),icon:m.MessageSquare},{label:"Threads",value:String(I.threads_participated),icon:u.Hash},{label:"Journal Entries",value:String(G.length),icon:p.BookOpen},{label:"Projects",value:String(K.length),icon:c.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)(c.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:n.name})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:O?.selfVersion&&(0,t.jsxs)("span",{className:"text-xs font-mono text-[var(--muted-foreground)] bg-[var(--muted)] px-2 py-1 rounded",children:["v",O.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, ${J} 0%, ${J}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:n.name,className:"w-32 h-32 rounded-3xl bg-[var(--card-bg)] p-2 border-4 border-[var(--card-bg)] shadow-xl",src:(0,w.agentAvatarUrl)(n.id,128,n.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:n.name}),(0,t.jsx)("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider",style:{backgroundColor:`${J}20`,color:J},children:n.provider})]}),(0,t.jsx)("p",{className:"text-[var(--muted-foreground)] font-mono text-xs",children:n.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)(b.Cpu,{className:"w-3.5 h-3.5"}),n.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)(l,{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:ei.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)(o.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:()=>H(!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)(k.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:[n.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=`${n.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)(N.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)(l,{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)(u.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}`))})]}),n.skills&&n.skills.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.jsx)("div",{className:"flex flex-col gap-2",children:n.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)(o.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})]},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)(j.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:n.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:n.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:n.model})]}),O?.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(O.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:n.color}}),(0,t.jsx)("span",{className:"font-mono",children:n.color})]})]}),O?.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:el(O.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)(c.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:j.ShieldCheck},{key:"feed",label:"Feed",icon:m.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 ${D===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"===D&&(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)(p.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(O?.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(O?.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)(M.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:[O?.selfVersion?(0,t.jsxs)("span",{className:"px-2 py-1 rounded-full bg-amber-50 text-[11px] font-medium text-amber-700",children:["v",O.selfVersion]}):null,O?.selfDerivedAt?(0,t.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:el(O.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," 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,t.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No portable knowledge attached."}):(0,t.jsx)("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}`))})]}),(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===er.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: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:"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:el(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)(l,{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:ea?.journalEntries??G.length},{label:"Activity",value:ea?.activityEvents??O?.activity?.length??0},{label:"Reactions",value:ea?.reactions??0},{label:"Comments",value:ea?.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"===D&&(0,t.jsxs)("div",{className:"space-y-4",children:[Z||Q||O?.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)(v,{className:"w-4 h-4"})," Self-Model"]}),O?.selfDerivedAt&&(0,t.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex items-center gap-1",children:[(0,t.jsx)(f.RefreshCw,{className:"w-3 h-3"}),"v",O.selfVersion," — ",el(O.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)(M.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)(v,{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)(M.Markdown,{content:Q})})]}):O?.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)(v,{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:J},children:["“",String(O.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)(m.MessageSquare,{className:"w-4 h-4"})," Messages"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[es.length," messages"]})]}),0===es.length?(0,t.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,t.jsx)(m.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"})]}):es.map(e=>{var r;let a=e.prevContent?(0,C.stripMarkers)(e.prevContent):null,l=(e=>{if(!e)return"You";let t=en.get(e);return t?.name??e})(e.prevParticipantId),o=(r=e.prevParticipantId)?en.get(r)?.color??"#94a3b8":"#6366f1",i=e.threadTitle?(0,C.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,w.agentAvatarUrl)(n.id,40,n.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:n.name}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",el(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)(u.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)(y,{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,w.agentAvatarUrl)(e.prevParticipantId,16,o),alt:"",className:"w-4 h-4 rounded"}),(0,t.jsx)("span",{className:"text-[10px] font-bold",style:{color:o},children:l})]}),(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)(M.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)(g.Clock,{className:"w-3 h-3"}),eo(e.timestamp)]})]})]})},e.id)})]}),"reflections"===D&&(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)(p.BookOpen,{className:"w-4 h-4"})," Journal Reflections"]}),(0,t.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[Y.length," reflections"]})]}),0===Y.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"})]}):Y.map((e,r)=>{let a=e.body?(0,C.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,w.agentAvatarUrl)(n.id,40,n.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:J},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:n.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:["• ",el(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)(M.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)(g.Clock,{className:"w-3 h-3"}),eo(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)(u.Hash,{className:"w-3 h-3"}),e.thread.substring(0,12),"..."]})]})]})]})},e.id??r)})]})]})]})]}),F&&(0,t.jsx)(w.AgentForm,{title:"Edit agent",initial:{name:n.name,title:n.title||"",provider:n.provider,model:n.model||"",identity:n.identity||"",color:n.color,skills:n.skills||[]},agentId:n.id,submitLabel:"Save",onSubmit:async e=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:n.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??[]})}),_({...n,name:e.name,title:e.title||void 0,provider:e.provider,model:e.model,identity:e.identity,color:e.color??n.color,skills:e.skills??[]}),H(!1)},onCancel:()=>H(!1)})]})}e.s(["default",()=>_],65143)}]);
|
|
@@ -30,12 +30,12 @@ RUN chown -R nextjs:nodejs /app
|
|
|
30
30
|
|
|
31
31
|
USER nextjs
|
|
32
32
|
|
|
33
|
-
EXPOSE
|
|
33
|
+
EXPOSE 41741
|
|
34
34
|
|
|
35
|
-
ENV PORT=
|
|
35
|
+
ENV PORT=41741
|
|
36
36
|
ENV HOSTNAME="0.0.0.0"
|
|
37
37
|
|
|
38
|
-
CMD ["npm", "run", "dev"]
|
|
38
|
+
CMD ["npm", "run", "dev", "--", "--hostname", "0.0.0.0"]
|
|
39
39
|
|
|
40
40
|
# Production builder
|
|
41
41
|
FROM base AS builder
|
|
@@ -66,9 +66,9 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
|
|
66
66
|
|
|
67
67
|
USER nextjs
|
|
68
68
|
|
|
69
|
-
EXPOSE
|
|
69
|
+
EXPOSE 41741
|
|
70
70
|
|
|
71
|
-
ENV PORT=
|
|
71
|
+
ENV PORT=41741
|
|
72
72
|
ENV HOSTNAME="0.0.0.0"
|
|
73
73
|
|
|
74
74
|
CMD ["node", "server.js"]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import { getConfiguredAppBaseUrl } from "@/lib/app-config";
|
|
2
3
|
import { saveLinearToken } from "@/lib/linear-client";
|
|
3
4
|
|
|
4
5
|
export const runtime = "nodejs";
|
|
@@ -12,7 +13,7 @@ export async function GET(req: NextRequest) {
|
|
|
12
13
|
|
|
13
14
|
const clientId = process.env.LINEAR_CLIENT_ID;
|
|
14
15
|
const clientSecret = process.env.LINEAR_CLIENT_SECRET;
|
|
15
|
-
const redirectUri = `${
|
|
16
|
+
const redirectUri = `${getConfiguredAppBaseUrl()}/api/linear/callback`;
|
|
16
17
|
|
|
17
18
|
const tokenRes = await fetch("https://api.linear.app/oauth/token", {
|
|
18
19
|
method: "POST",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import { getLinearIssueContexts } from "@/lib/linear-issues";
|
|
3
|
+
|
|
4
|
+
export const runtime = "nodejs";
|
|
5
|
+
export const dynamic = "force-dynamic";
|
|
6
|
+
|
|
7
|
+
interface LinearIssueContextBody {
|
|
8
|
+
issueIds?: unknown;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export async function POST(request: NextRequest) {
|
|
12
|
+
try {
|
|
13
|
+
const body = (await request.json().catch(() => ({}))) as LinearIssueContextBody;
|
|
14
|
+
const issueIds = Array.isArray(body.issueIds)
|
|
15
|
+
? body.issueIds.filter((value): value is string => typeof value === "string" && value.trim().length > 0)
|
|
16
|
+
: [];
|
|
17
|
+
|
|
18
|
+
const issues = await getLinearIssueContexts(issueIds);
|
|
19
|
+
return NextResponse.json({ issues });
|
|
20
|
+
} catch (error: any) {
|
|
21
|
+
return NextResponse.json(
|
|
22
|
+
{ error: error?.message ?? "Failed to load issue context" },
|
|
23
|
+
{ status: 500 }
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,61 +1,63 @@
|
|
|
1
1
|
import { NextRequest, NextResponse } from "next/server";
|
|
2
|
+
import {
|
|
3
|
+
ensureLinearIssueCache,
|
|
4
|
+
listLinearIssueSummaries,
|
|
5
|
+
} from "@/lib/linear-issues";
|
|
2
6
|
import { getLinearClient } from "@/lib/linear-client";
|
|
3
7
|
|
|
4
8
|
export const runtime = "nodejs";
|
|
5
9
|
export const dynamic = "force-dynamic";
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
11
|
+
function toOptionalString(value: string | null): string | undefined {
|
|
12
|
+
const trimmed = value?.trim();
|
|
13
|
+
return trimmed ? trimmed : undefined;
|
|
14
|
+
}
|
|
12
15
|
|
|
16
|
+
export async function GET(req: NextRequest) {
|
|
13
17
|
const params = req.nextUrl.searchParams;
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
+
const status = toOptionalString(params.get("status"));
|
|
19
|
+
const search = toOptionalString(params.get("search"));
|
|
20
|
+
const teamId = toOptionalString(params.get("teamId"));
|
|
21
|
+
const assigneeIds = Array.from(
|
|
22
|
+
new Set(
|
|
23
|
+
params
|
|
24
|
+
.getAll("assigneeId")
|
|
25
|
+
.map((value) => value.trim())
|
|
26
|
+
.filter(Boolean)
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
const cursor = toOptionalString(params.get("cursor"));
|
|
30
|
+
const cycleId = toOptionalString(params.get("cycleId"));
|
|
31
|
+
const projectSlug = toOptionalString(params.get("projectSlug"));
|
|
18
32
|
const assignedToMe = params.get("assignedToMe") === "true";
|
|
19
|
-
const
|
|
33
|
+
const refresh = params.get("refresh") === "true";
|
|
20
34
|
const limit = Number(params.get("limit") ?? "50");
|
|
21
35
|
|
|
22
36
|
try {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
const pullResult = await ensureLinearIssueCache({
|
|
38
|
+
refresh,
|
|
39
|
+
projectSlug,
|
|
40
|
+
});
|
|
41
|
+
const data = await listLinearIssueSummaries({
|
|
42
|
+
status,
|
|
43
|
+
search,
|
|
44
|
+
assigneeIds,
|
|
45
|
+
assignedToMe,
|
|
46
|
+
teamId,
|
|
47
|
+
cycleId,
|
|
48
|
+
cursor,
|
|
49
|
+
limit,
|
|
35
50
|
});
|
|
36
51
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const assignee = await issue.assignee;
|
|
41
|
-
return {
|
|
42
|
-
id: issue.id,
|
|
43
|
-
identifier: issue.identifier,
|
|
44
|
-
title: issue.title,
|
|
45
|
-
url: issue.url,
|
|
46
|
-
status: state?.name ?? "Unknown",
|
|
47
|
-
assignee: assignee?.name ?? null,
|
|
48
|
-
updatedAt: issue.updatedAt,
|
|
49
|
-
};
|
|
50
|
-
}),
|
|
51
|
-
);
|
|
52
|
+
if (!data.syncState.lastPulledAt && !pullResult && !getLinearClient()) {
|
|
53
|
+
return NextResponse.json({ error: "Not connected" }, { status: 401 });
|
|
54
|
+
}
|
|
52
55
|
|
|
53
56
|
return NextResponse.json({
|
|
54
|
-
issues,
|
|
55
|
-
pageInfo:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
57
|
+
issues: data.issues,
|
|
58
|
+
pageInfo: data.pageInfo,
|
|
59
|
+
syncState: data.syncState,
|
|
60
|
+
refreshedAt: pullResult?.pulledAt ?? null,
|
|
59
61
|
});
|
|
60
62
|
} catch (err: any) {
|
|
61
63
|
return NextResponse.json(
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { NextResponse } from "next/server";
|
|
2
|
+
import { getLinearClient } from "@/lib/linear-client";
|
|
3
|
+
|
|
4
|
+
export const runtime = "nodejs";
|
|
5
|
+
export const dynamic = "force-dynamic";
|
|
6
|
+
|
|
7
|
+
export async function GET() {
|
|
8
|
+
const client = getLinearClient();
|
|
9
|
+
if (!client) {
|
|
10
|
+
return NextResponse.json({ error: "Not connected" }, { status: 401 });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
try {
|
|
14
|
+
const [assigneesResult, teamsResult, cyclesResult] = await Promise.allSettled([
|
|
15
|
+
client.users(),
|
|
16
|
+
client.teams(),
|
|
17
|
+
client.cycles(),
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
const assignees = assigneesResult.status === "fulfilled" ? assigneesResult.value : [];
|
|
21
|
+
const teams = teamsResult.status === "fulfilled" ? teamsResult.value : [];
|
|
22
|
+
const cycles = cyclesResult.status === "fulfilled" ? cyclesResult.value : [];
|
|
23
|
+
|
|
24
|
+
return NextResponse.json({ assignees, teams, cycles });
|
|
25
|
+
} catch (err: any) {
|
|
26
|
+
return NextResponse.json(
|
|
27
|
+
{ error: err.message ?? "Failed to fetch Linear filter options" },
|
|
28
|
+
{ status: 500 },
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -2,6 +2,7 @@ import { NextResponse } from "next/server";
|
|
|
2
2
|
import { spawnSync } from "child_process";
|
|
3
3
|
import { MAX_WORKERS, WRITE_QPS_CEILING } from "@/lib/limits";
|
|
4
4
|
import { PROVIDER_CLIS } from "@/lib/provider-clis";
|
|
5
|
+
import { getConfiguredBoardBaseUrl } from "@/lib/app-config";
|
|
5
6
|
import { buildSpawnEnv, commandExists } from "@/lib/shell-env";
|
|
6
7
|
|
|
7
8
|
export const runtime = "nodejs";
|
|
@@ -14,8 +15,7 @@ interface ServiceStatus {
|
|
|
14
15
|
detail?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
const AGX_BOARD_URL =
|
|
18
|
-
process.env.NEXT_PUBLIC_AGX_BOARD_URL || "http://localhost:41741";
|
|
18
|
+
const AGX_BOARD_URL = getConfiguredBoardBaseUrl();
|
|
19
19
|
|
|
20
20
|
async function checkUrl(url: string, timeoutMs = 5000): Promise<{ ok: boolean; latencyMs: number; detail?: string }> {
|
|
21
21
|
const start = Date.now();
|