@mndrk/agx 2.0.32 → 2.0.34
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 +18 -0
- package/cloud-runtime/standalone/.next/build-manifest.json +6 -6
- package/cloud-runtime/standalone/.next/prerender-manifest.json +27 -3
- package/cloud-runtime/standalone/.next/routes-manifest.json +116 -0
- package/cloud-runtime/standalone/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/_global-error.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/_global-error.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/_not-found/page.js.nft.json +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/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/agents/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/agents.segments/agents.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/agent-specs/route.js +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 +4 -5
- 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 +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/[id]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/chat-runs/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/daemon/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/file-search/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/filesystem/pick-folder/route_client-reference-manifest.js +2 -0
- 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/knowledge-notes/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/knowledge-notes/route_client-reference-manifest.js +2 -0
- 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/memories/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/memories/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/messages/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/teams-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/migrate/workspaces-to-projects/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/cancel/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/signal/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/orchestrator/tasks/[taskId]/start/route.js +3 -2
- 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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/participants/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/processes/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/agents/route.js +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]/memory/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/memory/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/projects/[id]/migrate-v1/route.js +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/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/cancel/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/[id]/runs/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js +9 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/agents/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js +12 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/poll/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js +10 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/prompt-jobs/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js +4 -3
- package/cloud-runtime/standalone/.next/server/app/api/queue/complete/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/queue/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/repos/[id]/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/schedules/debug/route.js +4 -5
- 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 +3 -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 +3 -4
- package/cloud-runtime/standalone/.next/server/app/api/schedules/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/assign/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/available/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/detail/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/history/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/learn/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js +8 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/skills/unlearn/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/summarize/route.js +4 -4
- 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 +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/[commentId]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js +2 -2
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/comments/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/costs/route.js +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 +5 -5
- 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/pause/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/pause/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/graph/replan/route.js +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]/heartbeat/route.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/heartbeat/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/history/route.js +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 +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/nodes/[nodeId]/verify/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js +4 -4
- package/cloud-runtime/standalone/.next/server/app/api/tasks/[id]/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/tasks/assign-orphans/route.js +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 +4 -4
- 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 +6 -6
- package/cloud-runtime/standalone/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route/build-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route.js +7 -0
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/api/thread-repos/route_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/knowledge/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js +3 -3
- package/cloud-runtime/standalone/.next/server/app/api/threads/route.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/api/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/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/automations/page/react-loadable-manifest.json +8 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_full.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/automations.segments/_tree.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations/__PAGE__.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/automations.segments/automations.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/board/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/board/page.js.nft.json +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/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/execution-graph.segments/execution-graph.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/index.segments/_full.segment.rsc +5 -5
- package/cloud-runtime/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/index.segments/_tree.segment.rsc +4 -4
- package/cloud-runtime/standalone/.next/server/app/page/build-manifest.json +4 -4
- 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/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/build-manifest.json +18 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/next-font-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/react-loadable-manifest.json +8 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js +16 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/automations/page_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/graph/[taskId]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/knowledge/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/[slug]/thread/[threadId]/page/build-manifest.json +4 -4
- 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/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects/orphans.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/orphans.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/projects/page.js.nft.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/projects.segments/projects.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/settings/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/settings/page.js.nft.json +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 +3 -3
- package/cloud-runtime/standalone/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- 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 +2 -2
- package/cloud-runtime/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/skills/page/app-paths-manifest.json +3 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page/build-manifest.json +18 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page/next-font-manifest.json +11 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page/react-loadable-manifest.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page/server-reference-manifest.json +4 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page.js +15 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page.js.map +5 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page.js.nft.json +1 -0
- package/cloud-runtime/standalone/.next/server/app/skills/page_client-reference-manifest.js +2 -0
- package/cloud-runtime/standalone/.next/server/app/skills.html +21 -0
- package/cloud-runtime/standalone/.next/server/app/skills.meta +15 -0
- package/cloud-runtime/standalone/.next/server/app/skills.rsc +23 -0
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_full.segment.rsc +23 -0
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_head.segment.rsc +5 -0
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_index.segment.rsc +9 -0
- package/cloud-runtime/standalone/.next/server/app/skills.segments/_tree.segment.rsc +5 -0
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills/__PAGE__.segment.rsc +9 -0
- package/cloud-runtime/standalone/.next/server/app/skills.segments/skills.segment.rsc +4 -0
- package/cloud-runtime/standalone/.next/server/app/status/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/status/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/status.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/status.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/status.segments/status.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/thread/[id]/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page/build-manifest.json +4 -4
- package/cloud-runtime/standalone/.next/server/app/welcome/page.js.nft.json +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome/page_client-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.html +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_full.segment.rsc +3 -3
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_head.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_index.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/_tree.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome/__PAGE__.segment.rsc +2 -2
- package/cloud-runtime/standalone/.next/server/app/welcome.segments/welcome.segment.rsc +1 -1
- package/cloud-runtime/standalone/.next/server/app-paths-manifest.json +18 -0
- package/cloud-runtime/standalone/.next/server/chunks/[externals]__cf9f18a6._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c5634f17._.js → [root-of-the-server]__005b3c82._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e446cb39._.js → [root-of-the-server]__056d94e4._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__06634853._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__068b4f08._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0b3b6a47._.js +51 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0bb52353._.js +46 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0f580808._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6c26221d._.js → [root-of-the-server]__1a8e0957._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__1cc2fe7f._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__c08bef05._.js → [root-of-the-server]__23ad03bf._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__29419d66._.js +42 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6c187704._.js → [root-of-the-server]__2948f712._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__86f7d27b._.js → [root-of-the-server]__32ef6623._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__399b2ca9._.js → [root-of-the-server]__34cb1b98._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__1dd062c1._.js → [root-of-the-server]__3c1567b6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__29ce9c60._.js → [root-of-the-server]__3c37453e._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__507a4363._.js → [root-of-the-server]__3faa64cd._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__42497c7b._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__10940c29._.js → [root-of-the-server]__49c03d66._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__b40c7aab._.js → [root-of-the-server]__4a8d14c1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__75bff965._.js → [root-of-the-server]__4c861686._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4d865017._.js +48 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__5031f8d4._.js +30 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__543ba6c4._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__94fa1edc._.js → [root-of-the-server]__588b6ab0._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__ccfcbcd5._.js → [root-of-the-server]__596d0e81._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__9dfaaf72._.js → [root-of-the-server]__61c99680._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__64712846._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__707c32af._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7370bb86._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__749af50f._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__75cedecf._.js +6 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__98535eb3._.js → [root-of-the-server]__7e79d86a._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__dede3dcd._.js → [root-of-the-server]__7ee9b7b6._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__8ac0286e._.js +58 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__13677d96._.js → [root-of-the-server]__8b0ab82f._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f5b93200._.js → [root-of-the-server]__8b461158._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__918f0106._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__922eb7cd._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__927cfc20._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__96ae701e._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__981d92dd._.js +63 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__98b352f7._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a44db634._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a55c16a5._.js +158 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e6ad07c3._.js → [root-of-the-server]__a67cd108._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ab2bf82d._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__d8cedc8a._.js → [root-of-the-server]__abb032c1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__6e59b27c._.js → [root-of-the-server]__b4931ee1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__e122cae2._.js → [root-of-the-server]__b500f1bf._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__5ca87ba0._.js → [root-of-the-server]__b707e701._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f4b70b67._.js → [root-of-the-server]__be4ad4b5._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bf5803eb._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c0a18648._.js +80 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c8b49077._.js +79 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__c99509c2._.js +101 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ccd4846e._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ceb02db8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d4126e05._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__d908c9ea._.js +8 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2388b2b3._.js → [root-of-the-server]__dcdeee3d._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__80655727._.js → [root-of-the-server]__e069c0a3._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__f5a2358a._.js → [root-of-the-server]__e1e51c02._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e3a4fd97._.js +13 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e4a87984._.js +15 -0
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ee6511a0._.js +44 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__12afd8a3._.js → [root-of-the-server]__ef82dda1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__f168c6dc._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/{[root-of-the-server]__2e596cc8._.js → [root-of-the-server]__fee58db1._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/_5462a047._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_5fd6af5d._.js +57 -0
- package/cloud-runtime/standalone/.next/server/chunks/_c965f7b3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_d225c04f._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/{_3e0d34cc._.js → _d22934ab._.js} +24 -24
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_filesystem_pick-folder_route_actions_162664ff.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_knowledge-notes_route_actions_0ddf6109.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_cancel_route_actions_fbd5be89.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_route_actions_774a2e21.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_[id]_runs_route_actions_6e59ee83.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_agents_route_actions_399e1f19.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_poll_route_actions_23fbbfa1.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_prompt-jobs_route_actions_acf03860.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_assign_route_actions_15267be8.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_available_route_actions_24023111.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_detail_route_actions_1148baef.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_history_route_actions_5e5c4757.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_learn_route_actions_d3a37d25.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_route_actions_780e175f.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_skills_unlearn_route_actions_3dfee433.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/_next-internal_server_app_api_thread-repos_route_actions_e95d24ee.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_87c06aeb._.js +25 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_a5adca60._.js +64 -0
- package/cloud-runtime/standalone/.next/server/chunks/lib_db_ts_e06c6085._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_ea45fe73._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_2e721df2._.js +50 -37
- package/cloud-runtime/standalone/.next/server/chunks/lib_history-store_ts_74d1c060._.js +50 -37
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_3ea4d849._.js +38 -11
- package/cloud-runtime/standalone/.next/server/chunks/lib_sqlite-query-adapter_ts_b0b1a9b2._.js +43 -16
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_371d0bff.js +19 -19
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_def8bfbe.js +10 -0
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_55c06268._.js +4 -3
- package/cloud-runtime/standalone/.next/server/chunks/src_graph_executor_ts_a8bc8d58._.js +4 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__096c39a3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__226f8a19._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__47caef59._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__5ffa2883._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__67d5f883._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8b4e7816._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8fe8b9dd._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a37fb1c3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a456581d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__d74022f1._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{[root-of-the-server]__fcbe03e6._.js → [root-of-the-server]__e0c64529._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ea035cd9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__ffbc2e98._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_05c8a494._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0c5c111f._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0ffd2660._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_23656a95._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_23f5fddc._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_24feb541._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_27a789b3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{_508cd32f._.js → _314f4c49._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_36b413cc._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_43472af3._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_46e00a9b._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_478f4991._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_4bfdfb14._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_52fe115d._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_547b6462._.js +4 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_547f19ec._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_85ca101b._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_93914ecd._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_9e07dcac._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a1b966f7._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a68d8f62._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a80e12c8._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_b1e1ef71._.js +95 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_e1349560._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_projects_[slug]_automations_page_actions_9371bc66.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_next-internal_server_app_skills_page_actions_4ac82b1e.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_[id]_page_tsx_9c49d8c8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_page_tsx_f5f08ed8._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_execution-graph_page_tsx_f854185a._.js +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_projects_[slug]_knowledge_page_tsx_e2a55cbd._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_chat-ui_bfeda794._.js +4 -5
- package/cloud-runtime/standalone/.next/server/chunks/ssr/components_thread_WorkspaceSidebar_tsx_e660301b._.js +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{node_modules_lucide-react_dist_esm_e70f9321._.js → node_modules_lucide-react_dist_esm_b82e03da._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_61a87db9._.js +3 -0
- package/cloud-runtime/standalone/.next/server/chunks/ssr/{node_modules_next_920e7746._.js → node_modules_next_f2865b38._.js} +2 -2
- package/cloud-runtime/standalone/.next/server/functions-config-manifest.json +15 -0
- package/cloud-runtime/standalone/.next/server/middleware-build-manifest.js +4 -4
- package/cloud-runtime/standalone/.next/server/middleware-manifest.json +5 -5
- package/cloud-runtime/standalone/.next/server/next-font-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/next-font-manifest.json +8 -0
- package/cloud-runtime/standalone/.next/server/pages/404.html +2 -2
- package/cloud-runtime/standalone/.next/server/pages/500.html +2 -2
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.js +1 -1
- package/cloud-runtime/standalone/.next/server/server-reference-manifest.json +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/01428247f94115a6.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/06cf0ed16bf8aa70.js +28 -0
- package/cloud-runtime/standalone/.next/static/chunks/19dd745b663fdffa.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/1a3298f21d1040e9.js +4 -0
- package/cloud-runtime/standalone/.next/static/chunks/1c8583feefee0765.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/1e3dede69b464364.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/238a28856e739dc9.js +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/24772e179852c73e.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2d1d138d8ea3234c.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/2e011469003993e9.js +28 -0
- package/cloud-runtime/standalone/.next/static/chunks/31a4164e40ca71e5.js +6 -0
- package/cloud-runtime/standalone/.next/static/chunks/3a55441b018d52e4.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/3c202e89da05d9b9.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/3c72becf6dff5597.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/44dafb5e85578e12.js +16 -0
- package/cloud-runtime/standalone/.next/static/chunks/47f22a56011af8d3.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/48e332ac3e9ed56c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/5b567b289ca2273e.css +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/5d52c79d9812d06e.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/617db51b7444f818.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/673bb6094cea9ded.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/787436fad75f5bc6.js +5 -0
- package/cloud-runtime/standalone/.next/static/chunks/8304e8487aa74059.css +2 -0
- package/cloud-runtime/standalone/.next/static/chunks/8a4684388ca0f6de.js +7 -0
- package/cloud-runtime/standalone/.next/static/chunks/9f236cc9572783b9.js +93 -0
- package/cloud-runtime/standalone/.next/static/chunks/a9aaec85125f69b1.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/b4c29a62f9255268.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/bf2bb1662353aff5.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/c1fb885eed94aa8c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/c653186036e56204.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/cb5581d868e78205.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/cbdeb17a36b99000.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/d5cc62984dc4205c.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/d73f1cc3ebc9993b.js +1 -0
- package/cloud-runtime/standalone/.next/static/chunks/{88e24940a5d5d386.js → d78cc7d749043fef.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{8d15ced2dc70090a.js → da2b00558cf32f37.js} +1 -1
- package/cloud-runtime/standalone/.next/static/chunks/{turbopack-97e846241a3a64af.js → turbopack-22475f0dd0c18f92.js} +1 -1
- package/cloud-runtime/standalone/app/agents/[id]/page.tsx +4 -1
- package/cloud-runtime/standalone/app/agents/page.tsx +22 -2
- package/cloud-runtime/standalone/app/api/agent-specs/route.ts +4 -0
- package/cloud-runtime/standalone/app/api/agents/export/route.ts +4 -0
- package/cloud-runtime/standalone/app/api/chat/route.ts +44 -2
- package/cloud-runtime/standalone/app/api/filesystem/pick-folder/route.ts +56 -0
- package/cloud-runtime/standalone/app/api/knowledge-notes/route.ts +53 -0
- package/cloud-runtime/standalone/app/api/participants/route.ts +50 -1
- package/cloud-runtime/standalone/app/api/prompt-jobs/[id]/cancel/route.ts +44 -0
- package/cloud-runtime/standalone/app/api/prompt-jobs/[id]/route.ts +94 -0
- package/cloud-runtime/standalone/app/api/prompt-jobs/[id]/runs/route.ts +30 -0
- package/cloud-runtime/standalone/app/api/prompt-jobs/agents/route.ts +25 -0
- package/cloud-runtime/standalone/app/api/prompt-jobs/poll/route.ts +232 -0
- package/cloud-runtime/standalone/app/api/prompt-jobs/route.ts +125 -0
- package/cloud-runtime/standalone/app/api/skills/assign/route.ts +30 -0
- package/cloud-runtime/standalone/app/api/skills/available/route.ts +20 -0
- package/cloud-runtime/standalone/app/api/skills/detail/route.ts +23 -0
- package/cloud-runtime/standalone/app/api/skills/history/route.ts +18 -0
- package/cloud-runtime/standalone/app/api/skills/learn/route.ts +31 -0
- package/cloud-runtime/standalone/app/api/skills/route.ts +19 -0
- package/cloud-runtime/standalone/app/api/skills/unlearn/route.ts +30 -0
- package/cloud-runtime/standalone/app/api/thread-repos/route.ts +30 -0
- package/cloud-runtime/standalone/app/automations/page.tsx +15 -3
- package/cloud-runtime/standalone/app/execution-graph/page.tsx +2 -2
- package/cloud-runtime/standalone/app/globals.css +2 -0
- package/cloud-runtime/standalone/app/layout.tsx +1 -1
- package/cloud-runtime/standalone/app/projects/[slug]/automations/page.tsx +17 -0
- package/cloud-runtime/standalone/app/projects/[slug]/knowledge/page.tsx +210 -26
- package/cloud-runtime/standalone/app/projects/[slug]/layout.tsx +3 -2
- package/cloud-runtime/standalone/app/projects/[slug]/page.tsx +401 -86
- package/cloud-runtime/standalone/app/projects/orphans/page.tsx +1 -0
- package/cloud-runtime/standalone/app/projects/page.tsx +3 -3
- package/cloud-runtime/standalone/app/skills/page.tsx +399 -0
- package/cloud-runtime/standalone/components/FloatingPanel.tsx +200 -0
- package/cloud-runtime/standalone/components/Layout.tsx +7 -1
- package/cloud-runtime/standalone/components/NowRunningPanel.tsx +86 -76
- package/cloud-runtime/standalone/components/ProjectModal.tsx +29 -12
- package/cloud-runtime/standalone/components/PromptJobBoard.tsx +1434 -0
- package/cloud-runtime/standalone/components/chat-ui/ChatContainer.tsx +147 -57
- package/cloud-runtime/standalone/components/chat-ui/Composer.tsx +215 -19
- package/cloud-runtime/standalone/components/chat-ui/Markdown.tsx +19 -9
- package/cloud-runtime/standalone/components/chat-ui/ParticipantBar.tsx +233 -213
- package/cloud-runtime/standalone/components/thread/WorkspaceSidebar.tsx +131 -68
- package/cloud-runtime/standalone/db/sqlite/001_agx_board_schema.sql +28 -0
- package/cloud-runtime/standalone/db/sqlite/002_prompt_scheduler_schema.sql +45 -0
- package/cloud-runtime/standalone/db/sqlite/003_prompt_scheduler_v2.sql +13 -0
- package/cloud-runtime/standalone/hooks/useAttachments.ts +2 -1
- package/cloud-runtime/standalone/hooks/useGroupChat.ts +8 -1
- package/cloud-runtime/standalone/hooks/useProcessPolling.ts +4 -3
- package/cloud-runtime/standalone/hooks/usePromptJobs.ts +111 -0
- package/cloud-runtime/standalone/hooks/useThreadState.ts +10 -2
- package/cloud-runtime/standalone/lib/agent-participants.ts +7 -0
- package/cloud-runtime/standalone/lib/agent-skill-bindings.ts +118 -0
- package/cloud-runtime/standalone/lib/chat/paste-attachments.ts +152 -0
- package/cloud-runtime/standalone/lib/cli-runner.ts +212 -14
- package/cloud-runtime/standalone/lib/db.ts +6 -1
- package/cloud-runtime/standalone/lib/debug-log.ts +48 -0
- package/cloud-runtime/standalone/lib/history-store.ts +116 -2
- package/cloud-runtime/standalone/lib/orchestrator/chat-processor.ts +51 -0
- package/cloud-runtime/standalone/lib/orchestrator/runtime.ts +6 -0
- package/cloud-runtime/standalone/lib/queue/sqlite-adapter.ts +117 -2
- package/cloud-runtime/standalone/lib/skills-library.ts +450 -0
- package/cloud-runtime/standalone/lib/sqlite-query-adapter.ts +32 -0
- package/cloud-runtime/standalone/lib/stream-multiplexer.ts +59 -11
- package/cloud-runtime/standalone/lib/types.ts +10 -0
- package/cloud-runtime/standalone/migrations/sqlite_schema.sql +28 -0
- package/cloud-runtime/standalone/src/graph/llm-review.ts +19 -2
- package/cloud-runtime/standalone/src/prompt-scheduler/cron.ts +46 -0
- package/cloud-runtime/standalone/src/prompt-scheduler/engine.ts +87 -0
- package/cloud-runtime/standalone/src/prompt-scheduler/get-store.ts +36 -0
- package/cloud-runtime/standalone/src/prompt-scheduler/runner.ts +144 -0
- package/cloud-runtime/standalone/src/prompt-scheduler/store.ts +327 -0
- package/cloud-runtime/standalone/src/prompt-scheduler/types.ts +82 -0
- package/cloud-runtime/standalone/state/floatingPanels.ts +47 -0
- package/cloud-runtime/standalone/styles/composer-pills.css +156 -2
- package/cloud-runtime/standalone/styles/workspaceSidebar.css +5 -3
- package/cloud-runtime/standalone/test/adapters/sqlite.ts +1 -0
- package/cloud-runtime/standalone/update_officeapp.js +36 -0
- package/cloud-runtime/standalone/update_store.js +47 -0
- package/cloud-runtime/standalone/worker/index.js +862 -176
- package/lib/cli/runCli.js +0 -97
- package/lib/commands/update.js +159 -17
- package/package.json +1 -1
- package/cloud-runtime/standalone/.next/server/chunks/[externals]__1f4b15dd._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__0925dd01._.js +0 -46
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__12c7e188._.js +0 -29
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__17c2d68f._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__20b3baea._.js +0 -55
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__254e942f._.js +0 -20
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__3198c5c8._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__36d9edbd._.js +0 -67
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4761dc17._.js +0 -8
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4b1a512c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4c8624cc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4d318eb0._.js +0 -146
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__4dc25d71._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__666f8712._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__7be8f159._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__a189593a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ac3c2f7f._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__bfcedb7c._.js +0 -52
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e1e7dd1e._.js +0 -25
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__e45a2a1d._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__fcd3e3b8._.js +0 -15
- package/cloud-runtime/standalone/.next/server/chunks/[root-of-the-server]__ff9c61da._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/_66e1ddec._.js +0 -57
- package/cloud-runtime/standalone/.next/server/chunks/lib_09aac4e7._.js +0 -57
- package/cloud-runtime/standalone/.next/server/chunks/lib_cli-runner_ts_dfcf3fda._.js +0 -18
- package/cloud-runtime/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_69b6b2e1.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__1322ced8._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__783669c3._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__8973b16a._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__9166c1d6._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/[root-of-the-server]__a8a8afdc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0061ebd8._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_064370bc._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_0f4e70b1._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_16c45024._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_54af99c5._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_5b2b8a85._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_68ac991e._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_6de3f1de._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_6fc3736e._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_a0cc0fe7._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ccb409c5._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_cd5e154b._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_fb292eed._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/_ff5799d6._.js +0 -95
- package/cloud-runtime/standalone/.next/server/chunks/ssr/app_automations_page_tsx_3d732184._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_678fa868._.js +0 -3
- package/cloud-runtime/standalone/.next/server/chunks/ssr/node_modules_next_dist_852965c2._.js +0 -3
- package/cloud-runtime/standalone/.next/static/chunks/010aff7b601302de.js +0 -16
- package/cloud-runtime/standalone/.next/static/chunks/09f9eeea393db0fd.js +0 -4
- package/cloud-runtime/standalone/.next/static/chunks/0c467f54bc78a380.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/10b0642440302e99.css +0 -2
- package/cloud-runtime/standalone/.next/static/chunks/1f415d0ce7ebbd08.js +0 -8
- package/cloud-runtime/standalone/.next/static/chunks/24a6ee21f430da93.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/27129bea5b512ce8.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/3e4e8857f875c964.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/4200b512bdc226bc.js +0 -93
- package/cloud-runtime/standalone/.next/static/chunks/463edf3533d27a56.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/486bf7ff282b91a6.js +0 -5
- package/cloud-runtime/standalone/.next/static/chunks/58025a80caa3629d.js +0 -93
- package/cloud-runtime/standalone/.next/static/chunks/5cb0c885b085ea6c.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/60c054bb8b2cffa6.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/651c7c97d3bd77e0.js +0 -28
- package/cloud-runtime/standalone/.next/static/chunks/6fbe08eab578c7d3.js +0 -93
- package/cloud-runtime/standalone/.next/static/chunks/7d4c1d97169c8522.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/7e2edf97bd6c0874.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/8249f202d33d0d95.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/87f099ea02aa419d.js +0 -93
- package/cloud-runtime/standalone/.next/static/chunks/9048e44ed538b21a.js +0 -2
- package/cloud-runtime/standalone/.next/static/chunks/99174504a201d23e.js +0 -28
- package/cloud-runtime/standalone/.next/static/chunks/9f8f719c4aa25e3d.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/a66e1891e808a664.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/a8e8ef440c4daa5a.css +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/bc727d3d9993e9be.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/cd308f61797939cd.js +0 -6
- package/cloud-runtime/standalone/.next/static/chunks/d5d6be8239e57c56.js +0 -1
- package/cloud-runtime/standalone/.next/static/chunks/e62d5fa120fdf21f.js +0 -1
- package/cloud-runtime/standalone/agx-board.json +0 -264
- package/cloud-runtime/standalone/agx-cli.json +0 -2195
- package/cloud-runtime/standalone/fix-primary.js +0 -30
- package/cloud-runtime/standalone/fix-theme.js +0 -78
- package/cloud-runtime/standalone/test-file +0 -0
- package/cloud-runtime/standalone/testfile +0 -0
- /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → G0Hrt7JKBM1EtMPT0lUIr}/_buildManifest.js +0 -0
- /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → G0Hrt7JKBM1EtMPT0lUIr}/_clientMiddlewareManifest.json +0 -0
- /package/cloud-runtime/standalone/.next/static/{i_9nSHyb52FGkCbRgv7EJ → G0Hrt7JKBM1EtMPT0lUIr}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[41710,a=>{"use strict";let b=(0,a.i(60137).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",()=>b],41710)},69520,a=>{"use strict";let b=(0,a.i(60137).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"}]]);a.s(["RefreshCw",()=>b],69520)},87532,a=>{"use strict";let b=(0,a.i(60137).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);a.s(["Search",()=>b],87532)},34531,a=>{"use strict";let b=(0,a.i(60137).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);a.s(["FolderGit2",()=>b],34531)},81560,a=>{"use strict";let b=(0,a.i(60137).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);a.s(["Trash2",()=>b],81560)},85552,a=>{"use strict";let b=(0,a.i(60137).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"}]]);a.s(["BrainCircuit",()=>b],85552)},44637,a=>{"use strict";var b=a.i(90944),c=a.i(72131);function d({initialPath:a,onSelect:d,onCancel:e}){let[f,g]=(0,c.useState)(a||""),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(!1),[l,m]=(0,c.useState)(null),n=(0,c.useRef)(null),o=(0,c.useCallback)(async a=>{k(!0),m(null);try{let b=a?`?path=${encodeURIComponent(a)}`:"",c=await fetch(`/api/filesystem/browse${b}`),d=await c.json();if(!c.ok)return void m(d.error||"Failed to browse");i(d),g(d.current),n.current?.scrollTo(0,0)}catch{m("Failed to connect")}finally{k(!1)}},[]);return(0,c.useEffect)(()=>{o(a||"")},[]),(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] overflow-hidden shadow-lg",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-[var(--card-border)] bg-[var(--muted)]/30",children:[(0,b.jsx)("input",{value:f,onChange:a=>g(a.target.value),onKeyDown:a=>{"Enter"===a.key&&o(f)},className:"input text-xs flex-1 py-1",placeholder:"Enter path..."}),(0,b.jsx)("button",{type:"button",onClick:()=>o(f),className:"text-[10px] font-bold uppercase tracking-wider text-[var(--primary)] hover:underline px-2 py-1 shrink-0",children:"Go"})]}),(0,b.jsxs)("div",{ref:n,className:"max-h-48 overflow-y-auto",children:[j&&(0,b.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--muted-foreground)] text-center",children:"Loading..."}),l&&(0,b.jsx)("div",{className:"px-3 py-4 text-xs text-[var(--destructive)] text-center",children:l}),!j&&h&&(0,b.jsxs)("div",{className:"py-1",children:[h.parent&&(0,b.jsxs)("button",{type:"button",onClick:()=>o(h.parent),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--muted)]/50 transition-colors flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"↑"}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:".."})]}),0===h.dirs.length&&!h.parent&&(0,b.jsx)("div",{className:"px-3 py-3 text-xs text-[var(--muted-foreground)] text-center",children:"No subdirectories"}),h.dirs.map(a=>(0,b.jsxs)("button",{type:"button",onClick:()=>o(a.path),className:"w-full text-left px-3 py-1.5 text-sm hover:bg-[var(--muted)]/50 transition-colors flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"📁"}),(0,b.jsx)("span",{className:"truncate",children:a.name})]},a.path))]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-t border-[var(--card-border)] bg-[var(--muted)]/30",children:[(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)] truncate max-w-[60%]",children:h?.current||f}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:e,className:"text-xs font-medium text-[var(--muted-foreground)] hover:underline px-2 py-1",children:"Cancel"}),(0,b.jsx)("button",{type:"button",onClick:()=>d(h?.current||f),className:"text-xs font-bold text-[var(--primary)] hover:underline px-2 py-1",children:"Select"})]})]})]})}let e={name:"",description:""},f={name:"",path:"",notes:""};function g(){let[a,b]=(0,c.useState)(e),[d,g]=(0,c.useState)([f]),[h,i]=(0,c.useState)(!1),[j,k]=(0,c.useState)(null),l=(0,c.useCallback)((a,b,c)=>{g(d=>d.map((d,e)=>e===a?{...d,[b]:c}:d))},[]),m=(0,c.useCallback)(()=>{g(a=>[...a,{...f}])},[]),n=(0,c.useCallback)(a=>{g(b=>b.filter((b,c)=>c!==a))},[]),o=(0,c.useCallback)(()=>{b(e),g([f]),k(null)},[]),p=(0,c.useCallback)(a=>{b({name:a.name||"",description:a.description||""}),a.repos&&a.repos.length>0?g(a.repos.map(a=>({id:a.id,name:a.name||"",path:a.path||"",git_url:a.git_url||"",notes:a.notes||""}))):g([f]),k(null)},[]);return{form:a,setForm:b,repos:d,handleRepoChange:l,addRepo:m,removeRepo:n,resetForm:o,hydrateFromProject:p,isSubmitting:h,setIsSubmitting:i,formError:j,setFormError:k}}function h(a,b){let c=b.filter(a=>a.name.trim()&&a.path.trim()).map(a=>({...a.id?{id:a.id}:{},name:a.name.trim(),path:a.path.trim(),...a.git_url?.trim()?{git_url:a.git_url.trim()}:{},notes:a.notes.trim()||void 0}));return{name:a.name.trim(),description:a.description.trim()||void 0,repos:c.length?c:void 0}}function i({form:a,repos:e,isEditingProject:f,isSubmitting:g,onFieldChange:h,onRepoChange:i,onAddRepo:j,onRemoveRepo:k}){let[l,m]=(0,c.useState)([]),[n,o]=(0,c.useState)(null),p=(0,c.useRef)(0);(0,c.useEffect)(()=>{f?m([]):m(e.map((a,b)=>b)),p.current=e.length},[f,e.length]),(0,c.useEffect)(()=>{if(!f){p.current=e.length;return}let a=p.current;m(b=>{let c=b.filter(a=>a<e.length);return e.length>a&&c.push(...Array.from({length:e.length-a},(b,c)=>a+c)),c}),p.current=e.length},[f,e.length]);let q=(0,c.useCallback)(a=>{m(b=>b.includes(a)?b.filter(b=>b!==a):[...b,a])},[]),r=(0,c.useCallback)(a=>!f||l.includes(a),[l,f]);return(0,b.jsxs)("div",{className:"space-y-6",children:[(0,b.jsx)("div",{className:"grid gap-4",children:(0,b.jsxs)("label",{className:"space-y-1.5 block",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Project Name"}),(0,b.jsx)("input",{value:a.name,onChange:a=>h("name",a.target.value),className:"input w-full",placeholder:"e.g. AGX Cloud",disabled:g})]})}),(0,b.jsxs)("label",{className:"space-y-1.5 block",children:[(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Description"}),(0,b.jsx)("textarea",{value:a.description,onChange:a=>h("description",a.target.value),className:"input w-full h-24 resize-none",placeholder:"What is this project about?",disabled:g})]}),(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--card-border)] pb-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-sm font-bold uppercase tracking-widest text-[var(--muted-foreground)]",children:"Folders"}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--muted-foreground)] mt-0.5",children:"Code repos, doc folders, design assets, config directories — any path your team needs access to."})]}),(0,b.jsx)("button",{type:"button",onClick:j,className:"text-xs font-semibold text-[var(--primary)] hover:underline flex-shrink-0",disabled:g,children:"+ Add Folder"})]}),(0,b.jsx)("div",{className:"space-y-4",children:e.map((a,c)=>(0,b.jsxs)("div",{className:"p-4 rounded-2xl border border-[var(--card-border)] bg-[var(--muted)]/20 space-y-3 relative group",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"text-xs font-bold text-[var(--foreground)] uppercase",children:["Folder #",c+1]}),f&&!r(c)?(0,b.jsxs)("div",{className:"mt-1 text-sm text-[var(--muted-foreground)]",children:[(0,b.jsx)("div",{children:a.name||"Unnamed folder"}),(0,b.jsx)("div",{className:"truncate",children:a.path||"No local path set"})]}):null]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[f&&(0,b.jsx)("button",{type:"button",onClick:()=>q(c),className:"text-xs font-semibold text-[var(--primary)] hover:underline",disabled:g,children:r(c)?"Done":"Edit"}),e.length>1&&(0,b.jsx)("button",{type:"button",onClick:()=>k(c),className:"text-xs font-semibold text-[var(--destructive)] hover:underline",disabled:g,children:"Remove"})]})]}),r(c)?(0,b.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,b.jsx)("input",{value:a.name,onChange:a=>i(c,"name",a.target.value),placeholder:"Name (e.g. Frontend, API Docs, Design System)",className:"input text-sm",disabled:g}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{value:a.path,onChange:a=>i(c,"path",a.target.value),placeholder:"Local path to folder",className:"input text-sm flex-1",disabled:g}),(0,b.jsx)("button",{type:"button",onClick:async()=>{try{let a=await fetch("/api/filesystem/pick-folder",{method:"POST"}),b=await a.json();b.path&&i(c,"path",b.path)}catch{o(n===c?null:c)}},className:"px-3 py-2 rounded-xl border border-[var(--card-border)] bg-[var(--muted)]/30 hover:bg-[var(--muted)]/60 transition-colors text-xs font-semibold text-[var(--muted-foreground)] whitespace-nowrap",disabled:g,children:"Browse"})]}),n===c&&(0,b.jsx)("div",{className:"md:col-span-2",children:(0,b.jsx)(d,{initialPath:a.path||"",onSelect:a=>{i(c,"path",a),o(null)},onCancel:()=>o(null)})}),(0,b.jsx)("div",{className:"md:col-span-2",children:(0,b.jsx)("textarea",{value:a.notes,onChange:a=>i(c,"notes",a.target.value),placeholder:"Notes for this folder — e.g. coding conventions, deploy steps, ownership, doc standards...",className:"input text-sm w-full min-h-24 resize-y",disabled:g})})]}):null]},c))})]})]})}function j({isOpen:a,onClose:d,onSubmit:e,editingProject:f,form:g,repos:h,isSubmitting:j,formError:k,onFieldChange:l,onRepoChange:m,onAddRepo:n,onRemoveRepo:o}){let[p,q]=(0,c.useState)([]);return((0,c.useEffect)(()=>{let a=!1;return async function(){if(!f)return q([]);try{let b=await fetch(`/api/projects/${f.id}/memory?producer=system`),c=b.ok?await b.json():{memory:[]};a||q(c.memory??[])}catch{a||q([])}}(),()=>{a=!0}},[f]),a)?(0,b.jsx)("div",{className:"modal-backdrop p-2 sm:p-4 z-50 overflow-y-auto flex items-center justify-center",onClick:a=>a.target===a.currentTarget&&d(),children:(0,b.jsxs)("div",{className:"modal-content w-full max-w-4xl mx-2 sm:mx-auto bg-[var(--card-bg)] rounded-3xl border border-[var(--card-border)] shadow-2xl animate-scale-in flex flex-col max-h-[90vh]",children:[(0,b.jsxs)("div",{className:"px-4 py-4 sm:px-8 sm:py-6 border-b border-[var(--card-border)] flex items-center justify-between flex-shrink-0",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h2",{className:"text-xl font-bold",children:f?"Edit Project":"Create New Project"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-0.5",children:f?"Update your project settings and folders.":"Define a new project and connect folders."})]}),(0,b.jsx)("button",{onClick:d,className:"p-2 rounded-xl hover:bg-[var(--muted)]/50 transition-colors",children:(0,b.jsx)("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 sm:p-8",children:[f&&(0,b.jsx)("div",{className:"mb-6",children:(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--card-border)] bg-[var(--muted)]/20 p-4",children:[(0,b.jsx)("h3",{className:"text-sm font-bold uppercase tracking-widest text-[var(--muted-foreground)]",children:"Living Project Note"}),p.length>0?(0,b.jsx)("div",{className:"mt-3 space-y-2",children:p.slice(0,5).map(a=>(0,b.jsxs)("div",{className:"rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)] px-3 py-2 text-sm text-[var(--foreground)]",children:[(0,b.jsx)("div",{children:a.content}),a.created_at?(0,b.jsx)("div",{className:"mt-1 text-[11px] text-[var(--muted-foreground)]",children:new Date(a.created_at).toLocaleString()}):null]},a.id))}):(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--muted-foreground)]",children:"No project note yet."})]})}),(0,b.jsx)(i,{form:g,repos:h,isEditingProject:!!f,isSubmitting:j,onFieldChange:l,onRepoChange:m,onAddRepo:n,onRemoveRepo:o}),k&&(0,b.jsx)("div",{className:"mt-6 p-4 rounded-xl bg-[var(--destructive-muted)] border border-[var(--destructive)]/20 text-sm text-[var(--destructive)]",children:k})]}),(0,b.jsxs)("div",{className:"px-4 py-4 sm:px-8 sm:py-6 border-t border-[var(--card-border)] flex items-center justify-end gap-3 flex-shrink-0",children:[(0,b.jsx)("button",{onClick:d,className:"px-6 py-2 rounded-xl border border-[var(--card-border)] hover:bg-[var(--muted)]/50 transition-colors text-sm font-medium",children:"Cancel"}),(0,b.jsx)("button",{onClick:e,disabled:j,className:"btn-primary px-8 py-2 shadow-lg shadow-[var(--primary)]/20 min-w-[120px]",children:j?(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"spinner w-3 h-3 border-2 border-white/20 border-t-white"}),"Saving..."]}):f?"Save Changes":"Create Project"})]})]})}):null}a.s(["createProjectPayload",()=>h,"default",()=>j,"useProjectFormState",()=>g],44637)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_e1349560._.js.map
|
package/cloud-runtime/standalone/.next/server/chunks/ssr/app_agents_[id]_page_tsx_9c49d8c8._.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[88204,a=>{"use strict";var b=a.i(90944),c=a.i(72131),d=a.i(50944),e=a.i(38246),f=a.i(60137);let g=(0,f.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 h=a.i(1027),i=a.i(85552),j=a.i(210),k=a.i(60246),l=a.i(2835),m=a.i(63588),n=a.i(53722),o=a.i(8406),p=a.i(69520),q=a.i(50522),r=a.i(41710);let s=(0,f.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 t=a.i(94392),u=a.i(4416);let v=(0,f.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 w=a.i(84505),x=a.i(99464),y=a.i(20138),z=a.i(56196),A=a.i(94125),B=a.i(15682);function C(){let{id:a}=(0,d.useParams)(),[f,C]=(0,c.useState)(null),[D,E]=(0,c.useState)([]),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)([]),[J,K]=(0,c.useState)({total_messages:0,threads_participated:0}),[L,M]=(0,c.useState)(!0),[N,O]=(0,c.useState)("feed"),[P,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)([]),{projects:T}=(0,z.useProjectsWithAgents)();if((0,c.useEffect)(()=>{a&&Promise.all([fetch("/api/participants").then(a=>a.json()),fetch(`/api/agents/${a}/profile`).then(a=>a.ok?a.json():null),fetch(`/api/agents/${a}/messages`).then(a=>a.ok?a.json():null)]).then(([b,c,d])=>{let e=Array.isArray(b)?b:[];E(e),C(e.find(b=>b.id===a)??null),G(c),I(d?.messages??[]),K(d?.stats??{total_messages:0,threads_participated:0}),M(!1)})},[a]),(0,c.useEffect)(()=>{if(!a)return;let b=async()=>{try{let b=await fetch("/api/processes?enrich=1");if(!b.ok)return;let c=await b.json();S(c.filter(b=>b.agentId===a&&("spawning"===b.state||"running"===b.state)))}catch{}};b();let c=setInterval(b,3e3);return()=>clearInterval(c)},[a]),L)return(0,b.jsx)("div",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center",children:(0,b.jsx)("div",{className:"animate-pulse text-[var(--muted-foreground)] text-sm",children:"Loading agent…"})});if(!f)return(0,b.jsxs)("div",{className:"min-h-screen bg-[var(--background)] flex flex-col items-center justify-center gap-4",children:[(0,b.jsx)("p",{className:"text-[var(--muted-foreground)]",children:"Agent not found"}),(0,b.jsx)(e.default,{href:"/agents",className:"text-sm text-blue-600 hover:underline",children:"Back to agents"})]});let U=f.color||"#D97706",V=T.filter(a=>a.agents.some(a=>a.agent_id===f.id)),W=F?.self||"",X=(0,A.stripMarkers)(W),Y=f.identity||"",Z=(0,A.stripMarkers)(Y),$=F?.journal??[],_=$.filter(a=>"reflection"===a.type),aa=F?.inspectability,ab=aa?.knowledge.agent.portableSkills??[],ac=aa?.knowledge.agent.learnedMemories??[],ad=aa?.evidence,ae=H.map(a=>({...a,content:(0,A.stripMarkers)(a.content)})).filter(a=>a.content.length>0),af=new Map;for(let a of D)af.set(a.id,a);let ag=a=>{let b=new Date(a),c=Math.floor((Date.now()-b.getTime())/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);return e<7?`${e}d ago`:new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(b)},ah=a=>{let b=new Date(a);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(b)},ai=[{label:"Messages",value:J.total_messages.toLocaleString(),icon:m.MessageSquare},{label:"Threads",value:String(J.threads_participated),icon:l.Hash},{label:"Journal Entries",value:String($.length),icon:n.BookOpen},{label:"Projects",value:String(V.length),icon:k.Users}];return(0,b.jsxs)("div",{className:"min-h-screen bg-[var(--background)] text-[var(--foreground)] font-sans selection:bg-amber-100/30",children:[(0,b.jsxs)("nav",{className:"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,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(e.default,{href:"/agents",className:"p-2 hover:bg-[var(--muted)] rounded-lg transition-colors group",children:(0,b.jsx)(j.ArrowLeft,{className:"w-5 h-5 text-[var(--muted-foreground)] group-hover:text-[var(--foreground)]"})}),(0,b.jsx)("div",{className:"h-4 w-[1px] bg-[var(--muted)] hidden md:block"}),(0,b.jsxs)("div",{className:"hidden md:flex items-center gap-2 text-sm font-medium text-[var(--muted-foreground)]",children:[(0,b.jsx)(k.Users,{className:"w-4 h-4"}),(0,b.jsx)(e.default,{href:"/agents",className:"hover:text-[var(--foreground)] transition-colors",children:"Agents"}),(0,b.jsx)(q.ChevronRight,{className:"w-4 h-4 text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"text-[var(--foreground)] font-semibold",children:f.name})]})]}),(0,b.jsx)("div",{className:"flex items-center gap-3",children:F?.selfVersion&&(0,b.jsxs)("span",{className:"text-xs font-mono text-[var(--muted-foreground)] bg-[var(--muted)] px-2 py-1 rounded",children:["v",F.selfVersion]})})]}),(0,b.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,b.jsxs)("div",{className:"lg:col-span-4 space-y-6",children:[(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] shadow-xl shadow-black/5 overflow-hidden",children:[(0,b.jsx)("div",{className:"h-32 w-full relative",style:{background:`linear-gradient(135deg, ${U} 0%, ${U}99 100%)`},children:(0,b.jsx)("div",{className:"absolute inset-0 opacity-20 bg-[radial-gradient(#fff_1px,transparent_1px)] [background-size:16px_16px]"})}),(0,b.jsxs)("div",{className:"px-6 pb-6 text-center -mt-16 relative",children:[(0,b.jsxs)("div",{className:"inline-block relative",children:[(0,b.jsx)("img",{alt:f.name,className:"w-32 h-32 rounded-3xl bg-[var(--card-bg)] p-2 border-4 border-[var(--card-bg)] shadow-xl",src:(0,y.agentAvatarUrl)(f.id,128,f.color)}),(0,b.jsx)("div",{className:"absolute bottom-2 right-2 w-6 h-6 bg-green-500 border-4 border-[var(--card-bg)] rounded-full"})]}),(0,b.jsxs)("div",{className:"mt-4 space-y-1",children:[(0,b.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-black tracking-tight",children:f.name}),(0,b.jsx)("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider",style:{backgroundColor:`${U}20`,color:U},children:f.provider})]}),(0,b.jsx)("p",{className:"text-[var(--muted-foreground)] font-mono text-xs",children:f.model})]}),(0,b.jsxs)("div",{className:"flex flex-wrap justify-center gap-2 mt-6",children:[(0,b.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,b.jsx)(t.Cpu,{className:"w-3.5 h-3.5"}),f.model]}),(0,b.jsxs)("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-xs font-medium ${R.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,b.jsx)(g,{className:`w-3.5 h-3.5 ${R.length>0?"animate-pulse":""}`}),R.length>0?"Working":"Idle"]})]}),(0,b.jsx)("div",{className:"grid grid-cols-2 gap-3 mt-8",children:ai.map((a,c)=>(0,b.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,b.jsx)(a.icon,{className:"w-4 h-4 text-[var(--muted-foreground)] mb-1"}),(0,b.jsx)("div",{className:"text-lg font-bold text-[var(--foreground)]",children:a.value}),(0,b.jsx)("div",{className:"text-[10px] uppercase font-bold text-[var(--muted-foreground)] tracking-wider",children:a.label})]},c))})]})]}),(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(h.Zap,{className:"w-3.5 h-3.5"})," Actions"]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>Q(!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,b.jsx)(x.Pencil,{className:"w-3.5 h-3.5"}),"Edit"]}),(0,b.jsxs)("button",{type:"button",onClick:async()=>{let a=await fetch("/api/agents/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:[f.id]})});if(!a.ok)return;let b=await a.json(),c=new Blob([JSON.stringify({version:1,exportedAt:new Date().toISOString(),agents:b.agents,projects:[]},null,2)],{type:"application/json"}),d=URL.createObjectURL(c),e=document.createElement("a");e.href=d,e.download=`${f.name.toLowerCase().replace(/\s+/g,"-")}.agent.json`,e.click(),URL.revokeObjectURL(d)},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,b.jsx)(w.Download,{className:"w-3.5 h-3.5"}),"Export"]})]})]}),R.length>0&&(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-green-200 ring-1 ring-green-100 p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-green-600 uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(g,{className:"w-3.5 h-3.5 animate-pulse"})," Working Now"]}),(0,b.jsx)("div",{className:"flex flex-col gap-2",children:R.map(a=>(0,b.jsxs)(e.default,{href:a.threadId?`/thread/${a.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,b.jsx)("div",{className:"relative shrink-0",children:(0,b.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:a.threadId?(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(l.Hash,{className:"w-3 h-3 text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"truncate",children:a.threadTitle||a.threadId.substring(0,12)+"..."})]}):(0,b.jsx)("span",{children:"Main thread"})}),(0,b.jsx)("div",{className:"text-[10px] text-[var(--muted-foreground)] capitalize",children:a.state})]}),(0,b.jsx)(q.ChevronRight,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] group-hover/work:text-[var(--muted-foreground)]"})]},`${a.workspaceId}-${a.threadId}`))})]}),f.skills&&f.skills.length>0&&(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(i.BrainCircuit,{className:"w-3.5 h-3.5"})," Portable Knowledge"]}),(0,b.jsx)("div",{className:"flex flex-col gap-2",children:f.skills.map((a,c)=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs p-2 hover:bg-[var(--app-shell-subtle)] rounded-lg transition-colors",children:[(0,b.jsx)(h.Zap,{size:10,className:"text-blue-500 shrink-0"}),(0,b.jsx)("span",{className:"text-blue-600 font-mono truncate",title:a.file,children:a.file.split("/").pop()}),a.condition&&(0,b.jsx)("span",{className:"text-[var(--muted-foreground)] text-[10px] ml-auto shrink-0",children:a.condition})]},c))})]}),(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(u.ShieldCheck,{className:"w-3.5 h-3.5"})," Details"]}),(0,b.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"ID"}),(0,b.jsx)("span",{className:"font-mono bg-[var(--app-shell-subtle)] px-1.5 py-0.5 rounded",children:f.id})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Provider"}),(0,b.jsx)("span",{className:"font-medium capitalize",children:f.provider})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Model"}),(0,b.jsx)("span",{className:"font-mono",children:f.model})]}),F?.identity?.voice?(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Voice"}),(0,b.jsx)("span",{className:"font-medium",children:String(F.identity.voice)})]}):null,(0,b.jsxs)("div",{className:"flex justify-between items-center",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Color"}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("div",{className:"w-3 h-3 rounded-full border border-[var(--border)]",style:{backgroundColor:f.color}}),(0,b.jsx)("span",{className:"font-mono",children:f.color})]})]}),F?.selfDerivedAt&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Last Evolved"}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:ag(F.selfDerivedAt)})]})]})]}),V.length>0&&(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(k.Users,{className:"w-3.5 h-3.5"})," Active Projects"]}),(0,b.jsx)("div",{className:"space-y-2",children:V.map(a=>(0,b.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,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.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:a.name[0]}),(0,b.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:a.name})]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[a.agents.length," agent",1!==a.agents.length?"s":""]})]},a.id))})]})]})]}),(0,b.jsxs)("div",{className:"lg:col-span-8 space-y-6",children:[(0,b.jsx)("div",{className:"bg-[var(--card-bg)] p-1 rounded-2xl border border-[var(--border)] flex shadow-sm",children:[{key:"inspect",label:"Inspect",icon:u.ShieldCheck},{key:"feed",label:"Feed",icon:m.MessageSquare},{key:"reflections",label:"Reflections",icon:o.Sparkles}].map(a=>(0,b.jsxs)("button",{onClick:()=>O(a.key),className:`flex-1 flex items-center justify-center gap-2 py-3 rounded-xl text-sm font-bold transition-all ${N===a.key?"bg-[var(--foreground)] text-[var(--background)] shadow-lg shadow-black/5":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(a.icon,{className:"w-4 h-4"}),a.label]},a.key))}),(0,b.jsxs)("div",{className:"min-h-[600px]",children:["inspect"===N&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(n.BookOpen,{className:"w-4 h-4"})," Identity"]}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-emerald-50 text-emerald-700",children:"Human-authored"})]}),(0,b.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,b.jsxs)("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-2 gap-3 text-xs",children:[(0,b.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Voice"}),(0,b.jsx)("p",{className:"mt-1 text-[var(--foreground)]",children:String(F?.identity?.voice??"Not set")})]}),(0,b.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Seed"}),(0,b.jsx)("p",{className:"mt-1 text-[var(--foreground)]",children:String(F?.identity?.seed??"Not set")})]})]}),aa?.identity.sources?.length?(0,b.jsxs)("div",{className:"mt-4",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)] mb-2",children:"Sources"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:aa.identity.sources.map(a=>(0,b.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:a},a))})]}):null]}),(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-amber-100 ring-1 ring-amber-200 p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(o.Sparkles,{className:"w-4 h-4"})," Self-Model"]}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-amber-100 text-amber-700",children:"System-derived"})]}),(0,b.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."}),X?(0,b.jsx)("div",{className:"mt-4 text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:X})}):(0,b.jsx)("p",{className:"mt-4 text-sm text-[var(--muted-foreground)]",children:"No self-model yet."}),(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[F?.selfVersion?(0,b.jsxs)("span",{className:"px-2 py-1 rounded-full bg-amber-50 text-[11px] font-medium text-amber-700",children:["v",F.selfVersion]}):null,F?.selfDerivedAt?(0,b.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:ag(F.selfDerivedAt)}):null,aa?.selfModel.sources?.map(a=>(0,b.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:a},a))]})]})]}),(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(i.BrainCircuit,{className:"w-4 h-4"})," Agent Knowledge"]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[ab.length+ac.length," items"]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Portable Knowledge"}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"Human-authored"})]}),0===ab.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No portable knowledge attached."}):(0,b.jsx)("div",{className:"space-y-2",children:ab.map(a=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{className:"font-mono text-xs text-[var(--foreground)] truncate",title:a.file,children:a.file}),(0,b.jsx)("span",{className:"text-[10px] font-medium text-[var(--muted-foreground)] shrink-0",children:a.form})]}),a.condition?(0,b.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:["Use when: ",a.condition]}):null]},`${a.file}:${a.condition}`))})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Derived Knowledge Candidates"}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"System-derived"})]}),0===ac.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No extracted learnings yet."}):(0,b.jsx)("div",{className:"space-y-2",children:ac.map(a=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:a.type}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:ag(a.createdAt)})]}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--foreground)] leading-relaxed",children:a.content}),(0,b.jsxs)("div",{className:"mt-2 text-[10px] text-[var(--muted-foreground)] font-mono",children:["task ",a.taskId]})]},a.id))})]})]})]}),(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(g,{className:"w-4 h-4"})," Evidence"]}),(0,b.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,b.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,b.jsx)("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-3",children:[{label:"Journal",value:ad?.journalEntries??$.length},{label:"Activity",value:ad?.activityEvents??F?.activity?.length??0},{label:"Reactions",value:ad?.reactions??0},{label:"Comments",value:ad?.comments??0}].map(a=>(0,b.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-4",children:[(0,b.jsx)("div",{className:"text-lg font-bold text-[var(--foreground)]",children:a.value}),(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:a.label})]},a.label))})]})]}),"feed"===N&&(0,b.jsxs)("div",{className:"space-y-4",children:[X||Z||F?.identity?.seed?(0,b.jsx)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:X?(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(s,{className:"w-4 h-4"})," Self-Model"]}),F?.selfDerivedAt&&(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex items-center gap-1",children:[(0,b.jsx)(p.RefreshCw,{className:"w-3 h-3"}),"v",F.selfVersion," — ",ag(F.selfDerivedAt)]})]}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:X})})]}):Z?(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2 mb-4",children:[(0,b.jsx)(s,{className:"w-4 h-4"})," Identity"]}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:Z})})]}):F?.identity?.seed?(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2 mb-4",children:[(0,b.jsx)(s,{className:"w-4 h-4"})," Identity Seed"]}),(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)] italic border-l-4 pl-4",style:{borderColor:U},children:["“",String(F.identity.seed),"”"]})]}):null}):null,(0,b.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(m.MessageSquare,{className:"w-4 h-4"})," Messages"]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[ae.length," messages"]})]}),0===ae.length?(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,b.jsx)(m.MessageSquare,{size:32,className:"mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No messages yet"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Messages will appear here as this agent participates in threads"})]}):ae.map(a=>{var c;let d=a.prevContent?(0,A.stripMarkers)(a.prevContent):null,g=(a=>{if(!a)return"You";let b=af.get(a);return b?.name??a})(a.prevParticipantId),h=(c=a.prevParticipantId)?af.get(c)?.color??"#94a3b8":"#6366f1",i=a.threadTitle?(0,A.stripMarkers)(a.threadTitle):null;return(0,b.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,b.jsxs)("div",{className:"flex items-start gap-4",children:[(0,b.jsx)("img",{src:(0,y.agentAvatarUrl)(f.id,40,f.color),alt:"",className:"w-10 h-10 rounded-2xl shrink-0 mt-0.5 shadow-sm"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"flex items-center justify-between mb-1",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-bold text-[var(--foreground)]",children:f.name}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",ag(a.timestamp)]})]})}),a.rootMessageId&&i&&(0,b.jsxs)(e.default,{href:`/thread/${a.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,b.jsx)(l.Hash,{className:"w-3 h-3 text-[var(--muted-foreground)] group-hover/thread:text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"truncate max-w-[300px]",children:i}),(0,b.jsx)(q.ChevronRight,{className:"w-3 h-3 text-[var(--muted-foreground)] group-hover/thread:text-[var(--muted-foreground)]"})]}),d&&(0,b.jsxs)("div",{className:"mb-3 flex items-start gap-2 pl-1",children:[(0,b.jsx)(v,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] shrink-0 mt-1"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0 p-2.5 rounded-xl bg-[var(--app-shell-subtle)] border border-[var(--border)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[a.prevParticipantId&&(0,b.jsx)("img",{src:(0,y.agentAvatarUrl)(a.prevParticipantId,16,h),alt:"",className:"w-4 h-4 rounded"}),(0,b.jsx)("span",{className:"text-[10px] font-bold",style:{color:h},children:g})]}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed line-clamp-2",children:d})]})]}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,b.jsx)(B.Markdown,{content:a.content})}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-1.5 text-[10px] text-[var(--muted-foreground)] font-medium",children:[(0,b.jsx)(r.Clock,{className:"w-3 h-3"}),ah(a.timestamp)]})]})]})},a.id)})]}),"reflections"===N&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(n.BookOpen,{className:"w-4 h-4"})," Journal Reflections"]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[_.length," reflections"]})]}),0===_.length?(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,b.jsx)(o.Sparkles,{size:32,className:"mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No reflections yet"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Reflections will appear as this agent evolves its self-model"})]}):_.map((a,c)=>{let d=a.body?(0,A.stripMarkers)(a.body):"";return(0,b.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,b.jsxs)("div",{className:"flex items-start gap-4",children:[(0,b.jsxs)("div",{className:"relative shrink-0",children:[(0,b.jsx)("img",{alt:"",className:"w-10 h-10 rounded-2xl shadow-sm",src:(0,y.agentAvatarUrl)(f.id,40,f.color)}),(0,b.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:U},children:(0,b.jsx)(o.Sparkles,{className:"w-2 h-2 text-white"})})]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-bold text-[var(--foreground)]",children:f.name}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-amber-100 text-amber-700",children:"reflection"}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",ag(a.t)]})]}),a.selfVersion&&(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-mono",children:["v",a.selfVersion]})]}),a.observation&&(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mb-3",children:a.observation}),d&&(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:d})}),(a.judgement||a.delta||a.intent)&&(0,b.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:[a.judgement&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Judgment"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:a.judgement})]}),a.delta&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Delta"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:a.delta})]}),a.intent&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Intent"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:a.intent})]})]}),(0,b.jsxs)("div",{className:"mt-4 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-[var(--muted-foreground)] font-medium",children:[(0,b.jsx)(r.Clock,{className:"w-3 h-3"}),ah(a.t)]}),a.thread&&(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-mono flex items-center gap-1",children:[(0,b.jsx)(l.Hash,{className:"w-3 h-3"}),a.thread.substring(0,12),"..."]})]})]})]})},a.id??c)})]})]})]})]}),P&&(0,b.jsx)(y.AgentForm,{title:"Edit agent",initial:{name:f.name,provider:f.provider,model:f.model||"",identity:f.identity||"",color:f.color,skills:f.skills||[]},agentId:f.id,submitLabel:"Save",onSubmit:async a=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f.id,name:a.name,provider:a.provider,model:a.model,color:a.color,...a.identity?{identity:a.identity}:{},skills:a.skills??[]})}),C({...f,name:a.name,provider:a.provider,model:a.model,identity:a.identity,color:a.color??f.color,skills:a.skills??[]}),Q(!1)},onCancel:()=>Q(!1)})]})}a.s(["default",()=>C],88204)}];
|
|
1
|
+
module.exports=[88204,a=>{"use strict";var b=a.i(90944),c=a.i(72131),d=a.i(50944),e=a.i(38246),f=a.i(60137);let g=(0,f.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 h=a.i(1027),i=a.i(85552),j=a.i(210),k=a.i(60246),l=a.i(2835),m=a.i(63588),n=a.i(53722),o=a.i(8406),p=a.i(69520),q=a.i(50522),r=a.i(41710);let s=(0,f.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 t=a.i(94392),u=a.i(4416);let v=(0,f.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 w=a.i(84505),x=a.i(99464),y=a.i(20138),z=a.i(56196),A=a.i(94125),B=a.i(15682);function C(){let{id:a}=(0,d.useParams)(),[f,C]=(0,c.useState)(null),[D,E]=(0,c.useState)([]),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)([]),[J,K]=(0,c.useState)({total_messages:0,threads_participated:0}),[L,M]=(0,c.useState)(!0),[N,O]=(0,c.useState)("feed"),[P,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)([]),{projects:T}=(0,z.useProjectsWithAgents)();if((0,c.useEffect)(()=>{a&&Promise.all([fetch("/api/participants").then(a=>a.json()),fetch(`/api/agents/${a}/profile`).then(a=>a.ok?a.json():null),fetch(`/api/agents/${a}/messages`).then(a=>a.ok?a.json():null)]).then(([b,c,d])=>{let e=Array.isArray(b)?b:[];E(e),C(e.find(b=>b.id===a)??null),G(c),I(d?.messages??[]),K(d?.stats??{total_messages:0,threads_participated:0}),M(!1)})},[a]),(0,c.useEffect)(()=>{if(!a)return;let b=async()=>{try{let b=await fetch("/api/processes?enrich=1");if(!b.ok)return;let c=await b.json();S(c.filter(b=>b.agentId===a&&("spawning"===b.state||"running"===b.state)))}catch{}};b();let c=setInterval(b,3e3);return()=>clearInterval(c)},[a]),L)return(0,b.jsx)("div",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center",children:(0,b.jsx)("div",{className:"animate-pulse text-[var(--muted-foreground)] text-sm",children:"Loading agent…"})});if(!f)return(0,b.jsxs)("div",{className:"min-h-screen bg-[var(--background)] flex flex-col items-center justify-center gap-4",children:[(0,b.jsx)("p",{className:"text-[var(--muted-foreground)]",children:"Agent not found"}),(0,b.jsx)(e.default,{href:"/agents",className:"text-sm text-blue-600 hover:underline",children:"Back to agents"})]});let U=f.color||"#D97706",V=T.filter(a=>a.agents.some(a=>a.agent_id===f.id)),W=F?.self||"",X=(0,A.stripMarkers)(W),Y=f.identity||"",Z=(0,A.stripMarkers)(Y),$=F?.journal??[],_=$.filter(a=>"reflection"===a.type),aa=F?.inspectability,ab=aa?.knowledge.agent.portableSkills??[],ac=aa?.knowledge.agent.learnedMemories??[],ad=aa?.evidence,ae=H.map(a=>({...a,content:(0,A.stripMarkers)(a.content)})).filter(a=>a.content.length>0),af=new Map;for(let a of D)af.set(a.id,a);let ag=a=>{let b=new Date(a),c=Math.floor((Date.now()-b.getTime())/6e4);if(c<1)return"just now";if(c<60)return`${c}m ago`;let d=Math.floor(c/60);if(d<24)return`${d}h ago`;let e=Math.floor(d/24);return e<7?`${e}d ago`:new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(b)},ah=a=>{let b=new Date(a);return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(b)},ai=[{label:"Messages",value:J.total_messages.toLocaleString(),icon:m.MessageSquare},{label:"Threads",value:String(J.threads_participated),icon:l.Hash},{label:"Journal Entries",value:String($.length),icon:n.BookOpen},{label:"Projects",value:String(V.length),icon:k.Users}];return(0,b.jsxs)("div",{className:"min-h-screen bg-[var(--background)] text-[var(--foreground)] font-sans selection:bg-amber-100/30",children:[(0,b.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,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(e.default,{href:"/agents",className:"p-2 hover:bg-[var(--muted)] rounded-lg transition-colors group",children:(0,b.jsx)(j.ArrowLeft,{className:"w-5 h-5 text-[var(--muted-foreground)] group-hover:text-[var(--foreground)]"})}),(0,b.jsx)("div",{className:"h-4 w-[1px] bg-[var(--muted)] hidden md:block"}),(0,b.jsxs)("div",{className:"hidden md:flex items-center gap-2 text-sm font-medium text-[var(--muted-foreground)]",children:[(0,b.jsx)(k.Users,{className:"w-4 h-4"}),(0,b.jsx)(e.default,{href:"/agents",className:"hover:text-[var(--foreground)] transition-colors",children:"Agents"}),(0,b.jsx)(q.ChevronRight,{className:"w-4 h-4 text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"text-[var(--foreground)] font-semibold",children:f.name})]})]}),(0,b.jsx)("div",{className:"flex items-center gap-3",children:F?.selfVersion&&(0,b.jsxs)("span",{className:"text-xs font-mono text-[var(--muted-foreground)] bg-[var(--muted)] px-2 py-1 rounded",children:["v",F.selfVersion]})})]}),(0,b.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,b.jsxs)("div",{className:"lg:col-span-4 space-y-6",children:[(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] shadow-xl shadow-black/5 overflow-hidden",children:[(0,b.jsx)("div",{className:"h-32 w-full relative",style:{background:`linear-gradient(135deg, ${U} 0%, ${U}99 100%)`},children:(0,b.jsx)("div",{className:"absolute inset-0 opacity-20 bg-[radial-gradient(#fff_1px,transparent_1px)] [background-size:16px_16px]"})}),(0,b.jsxs)("div",{className:"px-6 pb-6 text-center -mt-16 relative",children:[(0,b.jsxs)("div",{className:"inline-block relative",children:[(0,b.jsx)("img",{alt:f.name,className:"w-32 h-32 rounded-3xl bg-[var(--card-bg)] p-2 border-4 border-[var(--card-bg)] shadow-xl",src:(0,y.agentAvatarUrl)(f.id,128,f.color)}),(0,b.jsx)("div",{className:"absolute bottom-2 right-2 w-6 h-6 bg-green-500 border-4 border-[var(--card-bg)] rounded-full"})]}),(0,b.jsxs)("div",{className:"mt-4 space-y-1",children:[(0,b.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,b.jsx)("h1",{className:"text-2xl font-black tracking-tight",children:f.name}),(0,b.jsx)("span",{className:"px-2 py-0.5 rounded-full text-[10px] font-bold uppercase tracking-wider",style:{backgroundColor:`${U}20`,color:U},children:f.provider})]}),(0,b.jsx)("p",{className:"text-[var(--muted-foreground)] font-mono text-xs",children:f.model})]}),(0,b.jsxs)("div",{className:"flex flex-wrap justify-center gap-2 mt-6",children:[(0,b.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,b.jsx)(t.Cpu,{className:"w-3.5 h-3.5"}),f.model]}),(0,b.jsxs)("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-xs font-medium ${R.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,b.jsx)(g,{className:`w-3.5 h-3.5 ${R.length>0?"animate-pulse":""}`}),R.length>0?"Working":"Idle"]})]}),(0,b.jsx)("div",{className:"grid grid-cols-2 gap-3 mt-8",children:ai.map((a,c)=>(0,b.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,b.jsx)(a.icon,{className:"w-4 h-4 text-[var(--muted-foreground)] mb-1"}),(0,b.jsx)("div",{className:"text-lg font-bold text-[var(--foreground)]",children:a.value}),(0,b.jsx)("div",{className:"text-[10px] uppercase font-bold text-[var(--muted-foreground)] tracking-wider",children:a.label})]},c))})]})]}),(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(h.Zap,{className:"w-3.5 h-3.5"})," Actions"]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("button",{type:"button",onClick:()=>Q(!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,b.jsx)(x.Pencil,{className:"w-3.5 h-3.5"}),"Edit"]}),(0,b.jsxs)("button",{type:"button",onClick:async()=>{let a=await fetch("/api/agents/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:[f.id]})});if(!a.ok)return;let b=await a.json(),c=new Blob([JSON.stringify({version:1,exportedAt:new Date().toISOString(),agents:b.agents,projects:[]},null,2)],{type:"application/json"}),d=URL.createObjectURL(c),e=document.createElement("a");e.href=d,e.download=`${f.name.toLowerCase().replace(/\s+/g,"-")}.agent.json`,e.click(),URL.revokeObjectURL(d)},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,b.jsx)(w.Download,{className:"w-3.5 h-3.5"}),"Export"]})]})]}),R.length>0&&(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-green-200 ring-1 ring-green-100 p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-green-600 uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(g,{className:"w-3.5 h-3.5 animate-pulse"})," Working Now"]}),(0,b.jsx)("div",{className:"flex flex-col gap-2",children:R.map(a=>(0,b.jsxs)(e.default,{href:a.threadId?`/thread/${a.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,b.jsx)("div",{className:"relative shrink-0",children:(0,b.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-[var(--foreground)] truncate",children:a.threadId?(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(l.Hash,{className:"w-3 h-3 text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"truncate",children:a.threadTitle||a.threadId.substring(0,12)+"..."})]}):(0,b.jsx)("span",{children:"Main thread"})}),(0,b.jsx)("div",{className:"text-[10px] text-[var(--muted-foreground)] capitalize",children:a.state})]}),(0,b.jsx)(q.ChevronRight,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] group-hover/work:text-[var(--muted-foreground)]"})]},`${a.workspaceId}-${a.threadId}`))})]}),f.skills&&f.skills.length>0&&(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(i.BrainCircuit,{className:"w-3.5 h-3.5"})," Portable Knowledge"]}),(0,b.jsx)("div",{className:"flex flex-col gap-2",children:f.skills.map((a,c)=>(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs p-2 hover:bg-[var(--app-shell-subtle)] rounded-lg transition-colors",children:[(0,b.jsx)(h.Zap,{size:10,className:"text-blue-500 shrink-0"}),(0,b.jsx)("span",{className:"text-blue-600 font-mono truncate",title:a.file,children:a.file.split("/").pop()}),a.condition&&(0,b.jsx)("span",{className:"text-[var(--muted-foreground)] text-[10px] ml-auto shrink-0",children:a.condition})]},c))})]}),(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(u.ShieldCheck,{className:"w-3.5 h-3.5"})," Details"]}),(0,b.jsxs)("div",{className:"space-y-3 text-xs",children:[(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"ID"}),(0,b.jsx)("span",{className:"font-mono bg-[var(--app-shell-subtle)] px-1.5 py-0.5 rounded",children:f.id})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Provider"}),(0,b.jsx)("span",{className:"font-medium capitalize",children:f.provider})]}),(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Model"}),(0,b.jsx)("span",{className:"font-mono",children:f.model})]}),F?.identity?.voice?(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Voice"}),(0,b.jsx)("span",{className:"font-medium",children:String(F.identity.voice)})]}):null,(0,b.jsxs)("div",{className:"flex justify-between items-center",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Color"}),(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("div",{className:"w-3 h-3 rounded-full border border-[var(--border)]",style:{backgroundColor:f.color}}),(0,b.jsx)("span",{className:"font-mono",children:f.color})]})]}),F?.selfDerivedAt&&(0,b.jsxs)("div",{className:"flex justify-between",children:[(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:"Last Evolved"}),(0,b.jsx)("span",{className:"text-[var(--muted-foreground)]",children:ag(F.selfDerivedAt)})]})]})]}),V.length>0&&(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-2xl border border-[var(--border)] p-5",children:[(0,b.jsxs)("h3",{className:"text-[11px] font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] mb-4 flex items-center gap-2",children:[(0,b.jsx)(k.Users,{className:"w-3.5 h-3.5"})," Active Projects"]}),(0,b.jsx)("div",{className:"space-y-2",children:V.map(a=>(0,b.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,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.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:a.name[0]}),(0,b.jsx)("span",{className:"text-sm font-medium text-[var(--foreground)]",children:a.name})]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[a.agents.length," agent",1!==a.agents.length?"s":""]})]},a.id))})]})]})]}),(0,b.jsxs)("div",{className:"lg:col-span-8 space-y-6",children:[(0,b.jsx)("div",{className:"bg-[var(--card-bg)] p-1 rounded-2xl border border-[var(--border)] flex shadow-sm",children:[{key:"inspect",label:"Inspect",icon:u.ShieldCheck},{key:"feed",label:"Feed",icon:m.MessageSquare},{key:"reflections",label:"Reflections",icon:o.Sparkles}].map(a=>(0,b.jsxs)("button",{onClick:()=>O(a.key),className:`flex-1 flex items-center justify-center gap-2 py-3 rounded-xl text-sm font-bold transition-all ${N===a.key?"bg-[var(--foreground)] text-[var(--background)] shadow-lg shadow-black/5":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:[(0,b.jsx)(a.icon,{className:"w-4 h-4"}),a.label]},a.key))}),(0,b.jsxs)("div",{className:"min-h-[600px]",children:["inspect"===N&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4",children:[(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(n.BookOpen,{className:"w-4 h-4"})," Identity"]}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-emerald-50 text-emerald-700",children:"Human-authored"})]}),(0,b.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,b.jsxs)("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-2 gap-3 text-xs",children:[(0,b.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Voice"}),(0,b.jsx)("p",{className:"mt-1 text-[var(--foreground)]",children:String(F?.identity?.voice??"Not set")})]}),(0,b.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Seed"}),(0,b.jsx)("p",{className:"mt-1 text-[var(--foreground)]",children:String(F?.identity?.seed??"Not set")})]})]}),aa?.identity.sources?.length?(0,b.jsxs)("div",{className:"mt-4",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)] mb-2",children:"Sources"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:aa.identity.sources.map(a=>(0,b.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:a},a))})]}):null]}),(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-amber-100 ring-1 ring-amber-200 p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(o.Sparkles,{className:"w-4 h-4"})," Self-Model"]}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-amber-100 text-amber-700",children:"System-derived"})]}),(0,b.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."}),X?(0,b.jsx)("div",{className:"mt-4 text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:X})}):(0,b.jsx)("p",{className:"mt-4 text-sm text-[var(--muted-foreground)]",children:"No self-model yet."}),(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[F?.selfVersion?(0,b.jsxs)("span",{className:"px-2 py-1 rounded-full bg-amber-50 text-[11px] font-medium text-amber-700",children:["v",F.selfVersion]}):null,F?.selfDerivedAt?(0,b.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:ag(F.selfDerivedAt)}):null,aa?.selfModel.sources?.map(a=>(0,b.jsx)("span",{className:"px-2 py-1 rounded-full bg-[var(--muted)] text-[11px] font-medium text-[var(--muted-foreground)]",children:a},a))]})]})]}),(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(i.BrainCircuit,{className:"w-4 h-4"})," Agent Knowledge"]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[ab.length+ac.length," items"]})]}),(0,b.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Portable Knowledge"}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"Human-authored"})]}),0===ab.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No portable knowledge attached."}):(0,b.jsx)("div",{className:"space-y-2",children:ab.map(a=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{className:"font-mono text-xs text-[var(--foreground)] truncate",title:a.file,children:a.file}),(0,b.jsx)("span",{className:"text-[10px] font-medium text-[var(--muted-foreground)] shrink-0",children:a.form})]}),a.condition?(0,b.jsxs)("p",{className:"mt-2 text-xs text-[var(--muted-foreground)]",children:["Use when: ",a.condition]}):null]},`${a.file}:${a.condition}`))})]}),(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:"Derived Knowledge Candidates"}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:"System-derived"})]}),0===ac.length?(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No extracted learnings yet."}):(0,b.jsx)("div",{className:"space-y-2",children:ac.map(a=>(0,b.jsxs)("div",{className:"rounded-2xl border border-[var(--border)] bg-[var(--app-shell-subtle)] p-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,b.jsx)("span",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:a.type}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:ag(a.createdAt)})]}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[var(--foreground)] leading-relaxed",children:a.content}),(0,b.jsxs)("div",{className:"mt-2 text-[10px] text-[var(--muted-foreground)] font-mono",children:["task ",a.taskId]})]},a.id))})]})]})]}),(0,b.jsxs)("section",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(g,{className:"w-4 h-4"})," Evidence"]}),(0,b.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,b.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,b.jsx)("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-3",children:[{label:"Journal",value:ad?.journalEntries??$.length},{label:"Activity",value:ad?.activityEvents??F?.activity?.length??0},{label:"Reactions",value:ad?.reactions??0},{label:"Comments",value:ad?.comments??0}].map(a=>(0,b.jsxs)("div",{className:"rounded-2xl bg-[var(--app-shell-subtle)] border border-[var(--border)] p-4",children:[(0,b.jsx)("div",{className:"text-lg font-bold text-[var(--foreground)]",children:a.value}),(0,b.jsx)("div",{className:"text-[10px] font-black uppercase tracking-wider text-[var(--muted-foreground)]",children:a.label})]},a.label))})]})]}),"feed"===N&&(0,b.jsxs)("div",{className:"space-y-4",children:[X||Z||F?.identity?.seed?(0,b.jsx)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-6 shadow-sm",children:X?(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(s,{className:"w-4 h-4"})," Self-Model"]}),F?.selfDerivedAt&&(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex items-center gap-1",children:[(0,b.jsx)(p.RefreshCw,{className:"w-3 h-3"}),"v",F.selfVersion," — ",ag(F.selfDerivedAt)]})]}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:X})})]}):Z?(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2 mb-4",children:[(0,b.jsx)(s,{className:"w-4 h-4"})," Identity"]}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:Z})})]}):F?.identity?.seed?(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2 mb-4",children:[(0,b.jsx)(s,{className:"w-4 h-4"})," Identity Seed"]}),(0,b.jsxs)("p",{className:"text-sm text-[var(--muted-foreground)] italic border-l-4 pl-4",style:{borderColor:U},children:["“",String(F.identity.seed),"”"]})]}):null}):null,(0,b.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(m.MessageSquare,{className:"w-4 h-4"})," Messages"]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[ae.length," messages"]})]}),0===ae.length?(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,b.jsx)(m.MessageSquare,{size:32,className:"mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No messages yet"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Messages will appear here as this agent participates in threads"})]}):ae.map(a=>{var c;let d=a.prevContent?(0,A.stripMarkers)(a.prevContent):null,g=(a=>{if(!a)return"You";let b=af.get(a);return b?.name??a})(a.prevParticipantId),h=(c=a.prevParticipantId)?af.get(c)?.color??"#94a3b8":"#6366f1",i=a.threadTitle?(0,A.stripMarkers)(a.threadTitle):null;return(0,b.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,b.jsxs)("div",{className:"flex items-start gap-4",children:[(0,b.jsx)("img",{src:(0,y.agentAvatarUrl)(f.id,40,f.color),alt:"",className:"w-10 h-10 rounded-2xl shrink-0 mt-0.5 shadow-sm"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"flex items-center justify-between mb-1",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-bold text-[var(--foreground)]",children:f.name}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",ag(a.timestamp)]})]})}),a.rootMessageId&&i&&(0,b.jsxs)(e.default,{href:`/thread/${a.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,b.jsx)(l.Hash,{className:"w-3 h-3 text-[var(--muted-foreground)] group-hover/thread:text-[var(--muted-foreground)]"}),(0,b.jsx)("span",{className:"truncate max-w-[300px]",children:i}),(0,b.jsx)(q.ChevronRight,{className:"w-3 h-3 text-[var(--muted-foreground)] group-hover/thread:text-[var(--muted-foreground)]"})]}),d&&(0,b.jsxs)("div",{className:"mb-3 flex items-start gap-2 pl-1",children:[(0,b.jsx)(v,{className:"w-3.5 h-3.5 text-[var(--muted-foreground)] shrink-0 mt-1"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0 p-2.5 rounded-xl bg-[var(--app-shell-subtle)] border border-[var(--border)]",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 mb-1",children:[a.prevParticipantId&&(0,b.jsx)("img",{src:(0,y.agentAvatarUrl)(a.prevParticipantId,16,h),alt:"",className:"w-4 h-4 rounded"}),(0,b.jsx)("span",{className:"text-[10px] font-bold",style:{color:h},children:g})]}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed line-clamp-2",children:d})]})]}),(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)]",children:(0,b.jsx)(B.Markdown,{content:a.content})}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-1.5 text-[10px] text-[var(--muted-foreground)] font-medium",children:[(0,b.jsx)(r.Clock,{className:"w-3 h-3"}),ah(a.timestamp)]})]})]})},a.id)})]}),"reflections"===N&&(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,b.jsxs)("h2",{className:"text-xs font-black text-[var(--muted-foreground)] uppercase tracking-[0.2em] flex items-center gap-2",children:[(0,b.jsx)(n.BookOpen,{className:"w-4 h-4"})," Journal Reflections"]}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:[_.length," reflections"]})]}),0===_.length?(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-3xl border border-[var(--border)] p-12 text-center",children:[(0,b.jsx)(o.Sparkles,{size:32,className:"mx-auto mb-3 text-[var(--muted-foreground)]"}),(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"No reflections yet"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Reflections will appear as this agent evolves its self-model"})]}):_.map((a,c)=>{let d=a.body?(0,A.stripMarkers)(a.body):"";return(0,b.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,b.jsxs)("div",{className:"flex items-start gap-4",children:[(0,b.jsxs)("div",{className:"relative shrink-0",children:[(0,b.jsx)("img",{alt:"",className:"w-10 h-10 rounded-2xl shadow-sm",src:(0,y.agentAvatarUrl)(f.id,40,f.color)}),(0,b.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:U},children:(0,b.jsx)(o.Sparkles,{className:"w-2 h-2 text-white"})})]}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"font-bold text-[var(--foreground)]",children:f.name}),(0,b.jsx)("span",{className:"text-[10px] font-black uppercase px-2 py-0.5 rounded bg-amber-100 text-amber-700",children:"reflection"}),(0,b.jsxs)("span",{className:"text-xs text-[var(--muted-foreground)]",children:["• ",ag(a.t)]})]}),a.selfVersion&&(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-mono",children:["v",a.selfVersion]})]}),a.observation&&(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] mb-3",children:a.observation}),d&&(0,b.jsx)("div",{className:"text-sm text-[var(--foreground)] leading-relaxed prose prose-sm prose-slate max-w-none",children:(0,b.jsx)(B.Markdown,{content:d})}),(a.judgement||a.delta||a.intent)&&(0,b.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:[a.judgement&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Judgment"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:a.judgement})]}),a.delta&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Delta"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:a.delta})]}),a.intent&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"text-[10px] font-black text-[var(--muted-foreground)] uppercase tracking-wider",children:"Intent"}),(0,b.jsx)("p",{className:"text-xs text-[var(--muted-foreground)] leading-relaxed",children:a.intent})]})]}),(0,b.jsxs)("div",{className:"mt-4 flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-[var(--muted-foreground)] font-medium",children:[(0,b.jsx)(r.Clock,{className:"w-3 h-3"}),ah(a.t)]}),a.thread&&(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)] font-mono flex items-center gap-1",children:[(0,b.jsx)(l.Hash,{className:"w-3 h-3"}),a.thread.substring(0,12),"..."]})]})]})]})},a.id??c)})]})]})]})]}),P&&(0,b.jsx)(y.AgentForm,{title:"Edit agent",initial:{name:f.name,title:f.title||"",provider:f.provider,model:f.model||"",identity:f.identity||"",color:f.color,skills:f.skills||[]},agentId:f.id,submitLabel:"Save",onSubmit:async a=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f.id,name:a.name,title:a.title||null,provider:a.provider,model:a.model,color:a.color,...a.identity?{identity:a.identity}:{},skills:a.skills??[]})}),C({...f,name:a.name,title:a.title||void 0,provider:a.provider,model:a.model,identity:a.identity,color:a.color??f.color,skills:a.skills??[]}),Q(!1)},onCancel:()=>Q(!1)})]})}a.s(["default",()=>C],88204)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_agents_%5Bid%5D_page_tsx_9c49d8c8._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[84712,a=>{"use strict";var b=a.i(90944),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(5784),g=a.i(50522),h=a.i(5151),i=a.i(33441),j=a.i(84505),k=a.i(60137);let l=(0,k.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var m=a.i(2835),n=a.i(99464),o=a.i(15618);let p=(0,k.default)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),q=(0,k.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var r=a.i(60246),s=a.i(33508),t=a.i(56196),u=a.i(20138),v=a.i(89116);function w(a){return a?a.projects??[]:[]}function x(){let[a,k]=(0,c.useState)([]),[x,y]=(0,c.useState)([]),{projects:z,createProject:A,addAgent:B,removeAgent:C,refresh:D}=(0,t.useProjectsWithAgents)(),[E,F]=(0,c.useState)(new Set),[G,H]=(0,c.useState)(null),[I,J]=(0,c.useState)(new Set),[K,L]=(0,c.useState)(!1),[M,N]=(0,c.useState)(null),[O,P]=(0,c.useState)(!1),[Q,R]=(0,c.useState)(new Set),[S,T]=(0,c.useState)(!0),[U,V]=(0,c.useState)(!1),[W,X]=(0,c.useState)(null),[Y,Z]=(0,c.useState)(null),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(!1),[ac,ad]=(0,c.useState)("choice"),[ae,af]=(0,c.useState)(""),[ag,ah]=(0,c.useState)(!1),[ai,aj]=(0,c.useState)(null),[ak,al]=(0,c.useState)(new Set),[am,an]=(0,c.useState)(new Set),[ao,ap]=(0,c.useState)(!1),[aq,ar]=(0,c.useState)(null),as=(0,c.useRef)(null),[at,au]=(0,c.useState)(new Set),av=()=>{fetch("/api/participants").then(a=>a.json()).then(a=>k(Array.isArray(a)?a:[]))},aw=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/processes");if(!a.ok)return;let b=await a.json();au(new Set(b.filter(a=>"spawning"===a.state||"running"===a.state).map(a=>a.agentId)))}catch{}},[]);(0,c.useEffect)(()=>{av(),v.threadService.listThreads().then(y),aw();let a=setInterval(aw,3e3);return()=>clearInterval(a)},[aw]);let ax=new Map(x.map(a=>[a.id,a])),ay=z.filter(a=>!a.is_default),az=async()=>{if(0!==Q.size){V(!0);try{let a=await fetch("/api/agent-specs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:Array.from(Q),includeSelf:S})});if(!a.ok)throw Error("Share failed");let b=await a.json();X(b.code),Z(b.expires_at)}catch(a){console.error("Share error:",a)}finally{V(!1)}}},aA=async()=>{if(0!==Q.size){V(!0);try{let a=Array.from(Q),b=await fetch("/api/agents/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:a})});if(!b.ok)throw Error("Export failed");let c=(await b.json()).agents.map(a=>({...a,self:S?a.self:null})),d={version:1,exportedAt:new Date().toISOString(),agents:c,projects:[]},e=new Blob([JSON.stringify(d,null,2)],{type:"application/json"}),f=URL.createObjectURL(e),g=document.createElement("a");g.href=f,g.download=1===c.length?`${c[0].name.toLowerCase().replace(/\s+/g,"-")}.agent.json`:"agents.bundle.json",g.click(),URL.revokeObjectURL(f),P(!1)}catch(a){console.error("Export error:",a)}finally{V(!1)}}},aB=async()=>{if(0!==ae.trim().length){ah(!0),ar(null),aj(null);try{let a=await fetch(`/api/agent-specs/pull?code=${encodeURIComponent(ae.trim())}`);if(!a.ok){let b=await a.json().catch(()=>({error:"Failed to pull"}));ar(b.error||"Code not found or expired");return}let b=(await a.json()).bundle;aj(b),al(new Set(b.agents.map(a=>a.id))),an(new Set(w(b).map(a=>a.name)))}catch{ar("Failed to connect. Is agx-api running?")}finally{ah(!1)}}},aC=async()=>{if(ai){ap(!0);try{let b=new Set(a.map(a=>a.id));for(let a of ai.agents){if(!ak.has(a.id))continue;let c={name:a.name,provider:a.provider,model:a.model,color:a.color,identity:a.identity||void 0,identityFile:a.identityFile||void 0,skills:a.skills||[],variables:a.variables||{}};b.has(a.id)?(c.id=a.id,await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})):await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})}for(let a of w(ai)){if(!am.has(a.name))continue;let b=await A(a.name);if(b)for(let c of a.agentIds)ak.has(c)&&await B(b.id,c)}av(),await D(),ab(!1),aj(null)}catch(a){console.error("Import error:",a),ar("Import failed. Check console for details.")}finally{ap(!1)}}},aD=G?z.find(a=>a.id===G.projectId):null,aE=new Set(aD?.agents.map(a=>a.agent_id)??[]),aF=G?a.filter(a=>!aE.has(a.id)):[],aG=({checked:a})=>(0,b.jsx)("div",{className:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center ${a?"bg-[var(--foreground)] border-[var(--foreground)]":"border-[var(--app-shell-soft-text)]"}`,children:a&&(0,b.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:(0,b.jsx)("path",{d:"M2 5l2 2 4-4",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})});return(0,b.jsxs)("div",{className:"min-h-screen bg-[var(--secondary)] p-6",children:[(0,b.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-sm text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{size:16}),"Back"]}),(0,b.jsx)("h1",{className:"text-2xl font-semibold text-[var(--foreground)]",children:"Manage Agents"}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-[var(--foreground)] rounded-lg hover:opacity-90 transition-colors",onClick:()=>L(!0),children:[(0,b.jsx)(o.Plus,{size:13}),"New Agent"]}),(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 transition-colors",onClick:()=>{R(new Set(a.map(a=>a.id))),T(!0),X(null),Z(null),_(!1),P(!0)},disabled:0===a.length,children:[(0,b.jsx)(p,{size:13}),"Share"]}),(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-violet-600 bg-violet-50 border border-violet-200 rounded-lg hover:bg-violet-100 transition-colors",onClick:()=>{ad("choice"),af(""),aj(null),al(new Set),an(new Set),ar(null),ab(!0)},children:[(0,b.jsx)(j.Download,{size:13}),"Import"]}),(0,b.jsx)("input",{ref:as,type:"file",accept:".json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(!b)return;ar(null);let c=new FileReader;c.onload=()=>{try{let a=JSON.parse(c.result);if(!a.version||!Array.isArray(a.agents))throw Error("Invalid bundle format");aj(a),al(new Set(a.agents.map(a=>a.id))),an(new Set(w(a).map(a=>a.name)))}catch{ar("Invalid file. Expected an .agent.json bundle.")}},c.readAsText(b),a.target.value=""}})]})]}),aq&&!aa&&(0,b.jsxs)("div",{className:"mb-4 px-4 py-3 rounded-lg bg-red-50 border border-red-200 text-sm text-red-700 flex items-center justify-between",children:[(0,b.jsx)("span",{children:aq}),(0,b.jsx)("button",{type:"button",onClick:()=>ar(null),className:"text-red-400 hover:text-red-600",children:(0,b.jsx)(s.X,{size:14})})]}),0===a.length?(0,b.jsx)("p",{className:"text-[var(--muted-foreground)] text-sm",children:"No agents configured yet."}):(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(a=>(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl border border-[var(--border)] p-4 hover:shadow-md transition-shadow text-left group",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 mb-3",children:[(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(a.id,48,a.color),alt:a.name,className:"w-12 h-12 rounded-full bg-[var(--secondary)]"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h3",{className:"font-medium text-[var(--foreground)] truncate",children:a.name}),(0,b.jsx)("p",{className:"text-xs text-[var(--app-shell-soft-text)] truncate mt-0.5",children:a.model}),at.has(a.id)&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 mt-1 text-[10px] font-medium text-emerald-600",children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Working"]})]})]}),a.skills&&a.skills.length>0&&(0,b.jsxs)("div",{className:"flex flex-wrap gap-1 mb-3",children:[a.skills.slice(0,3).map((a,c)=>(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-blue-50 text-blue-600 truncate max-w-[120px]",children:a.file.split("/").pop()},c)),a.skills.length>3&&(0,b.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--secondary)] text-[var(--app-shell-soft-text)]",children:["+",a.skills.length-3]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-[var(--border)]",children:[(0,b.jsx)("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-[var(--secondary)] text-[var(--muted-foreground)] uppercase tracking-wide",children:a.provider}),(0,b.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)("button",{type:"button",title:"Edit",onClick:()=>N(a),className:"p-1.5 text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] rounded hover:bg-[var(--item-hover-bg)] transition-colors",children:(0,b.jsx)(n.Pencil,{size:13})}),(0,b.jsx)(d.default,{href:`/agents/${a.id}`,title:"View profile",className:"p-1.5 text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] rounded hover:bg-[var(--item-hover-bg)] transition-colors",children:(0,b.jsx)(l,{size:13})})]})]})]},a.id))}),(0,b.jsxs)("div",{className:"mt-10",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Project assignments"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--app-shell-soft-text)]",children:"Assign agents to existing projects."})]}),0===ay.length?(0,b.jsx)("p",{className:"text-sm text-[var(--app-shell-soft-text)]",children:"No projects available for assignment."}):(0,b.jsx)("div",{className:"bg-[var(--card-bg)] rounded-xl border border-[var(--border)] divide-y divide-[var(--border)]",children:ay.map(c=>{let d=E.has(c.id),e=(c.thread_ids??[]).map(a=>ax.get(a)?.title?.trim()||"Untitled").filter(Boolean);return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3.5 group",children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-3 flex-1 min-w-0 text-left",onClick:()=>{var a;return a=c.id,void F(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},children:[d?(0,b.jsx)(f.ChevronDown,{size:16,className:"text-[var(--app-shell-soft-text)] flex-shrink-0"}):(0,b.jsx)(g.ChevronRight,{size:16,className:"text-[var(--app-shell-soft-text)] flex-shrink-0"}),(0,b.jsx)(r.Users,{size:16,className:"text-[var(--app-shell-soft-text)] flex-shrink-0"}),(0,b.jsx)("span",{className:"font-medium text-[var(--foreground)] text-sm",children:c.name}),(0,b.jsxs)("span",{className:"text-xs text-[var(--app-shell-soft-text)]",children:[c.agents.length," ",1===c.agents.length?"agent":"agents",e.length>0&&` \xb7 ${e.length} ${1===e.length?"thread":"threads"}`]})]}),(0,b.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] px-2.5 py-1.5 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--item-hover-bg)] hover:text-[var(--foreground)]",title:"Add agents",onClick:()=>{J(new Set),H({projectId:c.id})},children:[(0,b.jsx)(o.Plus,{size:14}),"Add agents"]})})]}),d&&(0,b.jsxs)("div",{className:"px-5 pb-4 pt-1 ml-9 flex flex-col gap-1",children:[0===c.agents.length&&(0,b.jsx)("p",{className:"text-xs text-[var(--app-shell-soft-text)] py-1",children:"No agents in this project."}),c.agents.map(d=>{let e=a.find(a=>a.id===d.agent_id);return(0,b.jsxs)("div",{className:"flex items-center gap-2.5 py-1.5 group/agent",children:[(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(d.agent_id,24,e?.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsx)("span",{className:"text-sm text-[var(--secondary-foreground)] truncate flex-1",children:e?.name??d.agent_id}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:e?.model}),(0,b.jsx)("button",{type:"button",className:"opacity-0 group-hover/agent:opacity-100 text-[var(--app-shell-soft-text)] hover:text-red-500 transition-opacity",onClick:()=>void C(c.id,d.agent_id),title:"Remove from project",children:(0,b.jsx)(s.X,{size:14})})]},d.agent_id)}),(0,b.jsxs)("button",{type:"button",className:"mt-2 inline-flex items-center gap-1.5 self-start rounded-lg border border-[var(--border)] px-2.5 py-1.5 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--item-hover-bg)] hover:text-[var(--foreground)]",onClick:()=>{J(new Set),H({projectId:c.id})},children:[(0,b.jsx)(o.Plus,{size:12}),"Add agents"]}),e.length>0&&(0,b.jsxs)("div",{className:"mt-2 pt-2 border-t border-[var(--border)]",children:[(0,b.jsx)("p",{className:"text-[10px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide mb-1",children:"Threads"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map((a,c)=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-1 rounded-md bg-indigo-50 text-indigo-600",children:[(0,b.jsx)(m.Hash,{size:11}),a]},c))})]})]})]},c.id)})})]})]}),O&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>P(!1),children:(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-[440px] max-h-[80vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[var(--border)]",children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Share Agents"}),(0,b.jsx)("button",{type:"button",className:"text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>P(!1),children:(0,b.jsx)(s.X,{size:16})})]}),W?(0,b.jsxs)("div",{className:"px-5 py-6 flex flex-col items-center gap-4",children:[(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mb-3",children:"Share this code with the recipient:"}),(0,b.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,b.jsx)("span",{className:"text-3xl font-mono font-bold tracking-[0.3em] text-[var(--foreground)]",children:W}),(0,b.jsx)("button",{type:"button",className:"p-2 text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] transition-colors",onClick:()=>{W&&(navigator.clipboard.writeText(W),_(!0),setTimeout(()=>_(!1),2e3))},children:$?(0,b.jsx)(i.Check,{size:18,className:"text-green-500"}):(0,b.jsx)(h.Copy,{size:18})})]})]}),Y&&(0,b.jsxs)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:["Expires ",new Date(Y).toLocaleTimeString()]}),(0,b.jsx)("button",{type:"button",className:"px-4 py-2 text-xs font-medium text-[var(--muted-foreground)] bg-[var(--secondary)] rounded-lg hover:bg-[var(--item-hover-bg)] transition-colors",onClick:()=>P(!1),children:"Done"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"overflow-y-auto flex-1",children:[ay.length>0&&(0,b.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide mb-2",children:"Select by project"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:ay.map(c=>{let d=c.agents.map(a=>a.agent_id),e=d.length>0&&d.every(a=>Q.has(a)),f=d.some(a=>Q.has(a));return(0,b.jsxs)("button",{type:"button",className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium transition-colors ${e?"bg-[var(--foreground)] text-white":f?"bg-[var(--app-shell-soft-text)] text-[var(--secondary-foreground)]":"bg-[var(--secondary)] text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{R(a=>{let b=new Set(a);return e?d.forEach(a=>b.delete(a)):d.forEach(a=>b.add(a)),b})},title:d.map(b=>a.find(a=>a.id===b)?.name??b).join(", "),children:[(0,b.jsx)(r.Users,{size:10}),c.name,(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:c.agents.length})]},c.id)})})]}),(0,b.jsxs)("div",{className:"border-b border-[var(--border)]",children:[(0,b.jsxs)("div",{className:"px-5 pt-3 pb-1 flex items-center justify-between",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide",children:"Agents"}),(0,b.jsx)("button",{type:"button",className:"text-[11px] text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>{Q.size===a.length?R(new Set):R(new Set(a.map(a=>a.id)))},children:Q.size===a.length?"Deselect all":"Select all"})]}),a.map(a=>{let c=Q.has(a.id);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-5 py-2 text-sm transition-colors ${c?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{R(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c})},children:[(0,b.jsx)(aG,{checked:c}),(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(a.id,24,a.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsx)("span",{className:"truncate text-xs font-medium flex-1",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:a.provider})]},a.id)})]}),(0,b.jsx)("div",{className:"px-5 py-3",children:(0,b.jsxs)("button",{type:"button",className:`flex items-center gap-3 w-full px-3 py-2 rounded-lg text-sm transition-colors ${S?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>T(!S),children:[(0,b.jsx)(aG,{checked:S}),(0,b.jsx)("span",{className:"text-xs font-medium",children:"Include self.md (agent bio)"})]})})]}),(0,b.jsxs)("div",{className:"px-5 py-3 border-t border-[var(--border)] flex items-center justify-between",children:[(0,b.jsxs)("span",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:[Q.size," ",1===Q.size?"agent":"agents"]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("button",{type:"button",disabled:0===Q.size||U,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-[var(--muted-foreground)] bg-[var(--card-bg)] border border-[var(--border)] rounded-lg hover:bg-[var(--item-hover-bg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aA(),children:[(0,b.jsx)(j.Download,{size:12}),U?"Exporting...":"Export to File"]}),(0,b.jsxs)("button",{type:"button",disabled:0===Q.size||U,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void az(),children:[(0,b.jsx)(p,{size:12}),U?"Pushing...":"Push to Hub"]}),(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",onClick:()=>P(!1),children:"Cancel"})]})]})]})]})}),G&&!K&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>H(null),children:(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 max-h-[70vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,b.jsxs)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:["Add to ",aD?.name??"project"]}),(0,b.jsx)("button",{type:"button",className:"text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>H(null),children:(0,b.jsx)(s.X,{size:16})})]}),(0,b.jsxs)("div",{className:"overflow-y-auto py-1 flex-1",children:[(0,b.jsxs)("button",{type:"button",className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-[var(--secondary-foreground)] hover:bg-[var(--item-hover-bg)] transition-colors border-b border-[var(--border)]",onClick:()=>L(!0),children:[(0,b.jsx)(o.Plus,{size:14,className:"text-[var(--app-shell-soft-text)]"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:"Create new agent"})]}),0===aF.length?(0,b.jsx)("p",{className:"px-4 py-6 text-xs text-[var(--app-shell-soft-text)] text-center",children:"All agents are already in this project"}):aF.map(a=>{let c=I.has(a.id);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${c?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--secondary-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{J(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c})},children:[(0,b.jsx)(aG,{checked:c}),(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(a.id,24,a.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsx)("div",{className:"min-w-0 flex-1 text-left",children:(0,b.jsx)("div",{className:"truncate font-medium text-xs",children:a.name})})]},a.id)})]}),aF.length>0&&(0,b.jsxs)("div",{className:"px-4 py-3 border-t border-[var(--border)] flex justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",onClick:()=>H(null),children:"Cancel"}),(0,b.jsxs)("button",{type:"button",disabled:0===I.size,className:"px-3 py-1.5 text-xs font-medium text-white bg-[var(--foreground)] rounded-lg hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>{for(let a of I)B(G.projectId,a);H(null)},children:["Add ",I.size>0?`(${I.size})`:""]})]})]})}),K&&(0,b.jsx)(u.AgentForm,{title:"Create new agent",initial:{name:"",provider:"claude",model:"",identity:"",skills:[]},submitLabel:"Create",projects:ay.map(a=>{let b=(a.thread_ids??[]).map(a=>ax.get(a)?.title?.trim()).filter(Boolean).join(", ")||"No thread";return{id:a.id,name:a.name,label:`${b} › ${a.name}`}}),initialProjectIds:G?[G.projectId]:[],onSubmit:async(b,c)=>{let d=["#D97706","#2563EB","#059669","#DC2626","#7C3AED","#DB2777","#0891B2"],e=d[a.length%d.length],f=b.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),g=c?.[0],h=await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,name:b.name,provider:b.provider,model:b.model,color:b.color??e,...b.identity?{identity:b.identity}:{},skills:b.skills??[],...g?{projectId:g}:{}})});if(h.ok){let a=await h.json().catch(()=>({})),b="string"==typeof a?.id&&a.id.trim()?a.id.trim():f;for(let a of(c??[]).slice(1))await B(a,b);L(!1),H(null),av(),D()}},onCancel:()=>{L(!1)}}),M&&(0,b.jsx)(u.AgentForm,{title:"Edit agent",initial:{name:M.name,provider:M.provider,model:M.model||"",identity:M.identity||"",color:M.color,skills:M.skills||[]},agentId:M.id,submitLabel:"Save",projectMemberships:{current:z.filter(a=>a.agents.some(a=>a.agent_id===M.id)).map(a=>({id:a.id,name:a.name,is_default:!!a.is_default})),available:z.filter(a=>!a.agents.some(a=>a.agent_id===M.id)).map(a=>({id:a.id,name:a.name}))},onAddToProject:a=>B(a,M.id),onRemoveFromProject:a=>C(a,M.id),onSubmit:async a=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:M.id,name:a.name,provider:a.provider,model:a.model,color:a.color,...a.identity?{identity:a.identity}:{},skills:a.skills??[]})}),N(null),av()},onCancel:()=>N(null)}),aa&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ab(!1),children:(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-[440px] max-h-[80vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[var(--border)]",children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Import Agents"}),(0,b.jsx)("button",{type:"button",className:"text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>ab(!1),children:(0,b.jsx)(s.X,{size:16})})]}),"choice"===ac&&!ai&&(0,b.jsxs)("div",{className:"px-5 py-6 flex flex-col gap-3",children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-3 px-4 py-3.5 rounded-lg border border-[var(--border)] hover:border-violet-300 hover:bg-violet-50 transition-colors text-left",onClick:()=>ad("pull"),children:[(0,b.jsx)("div",{className:"w-9 h-9 rounded-lg bg-violet-100 flex items-center justify-center flex-shrink-0",children:(0,b.jsx)(j.Download,{size:16,className:"text-violet-600"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Pull from Hub"}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:"Enter a share code to import agents"})]})]}),(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-3 px-4 py-3.5 rounded-lg border border-[var(--border)] hover:border-[var(--border)] hover:bg-[var(--item-hover-bg)] transition-colors text-left",onClick:()=>{ad("file"),setTimeout(()=>as.current?.click(),100)},children:[(0,b.jsx)("div",{className:"w-9 h-9 rounded-lg bg-[var(--secondary)] flex items-center justify-center flex-shrink-0",children:(0,b.jsx)(q,{size:16,className:"text-[var(--muted-foreground)]"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Upload File"}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:"Import from a .agent.json bundle"})]})]})]}),"pull"===ac&&!ai&&(0,b.jsxs)("div",{className:"px-5 py-5 flex flex-col gap-3",children:[(0,b.jsx)("label",{className:"text-sm text-[var(--muted-foreground)]",children:"Enter share code:"}),(0,b.jsx)("input",{autoFocus:!0,type:"text",value:ae,onChange:a=>af(a.target.value.toUpperCase()),placeholder:"e.g. A3X9K2",maxLength:6,className:"w-full px-3 py-2.5 text-center text-2xl font-mono font-bold tracking-[0.3em] border border-[var(--border)] rounded-lg outline-none focus:border-violet-400 focus:ring-1 focus:ring-violet-200 transition-all bg-[var(--card-bg)] text-[var(--foreground)]",onKeyDown:a=>{"Enter"===a.key&&aB()}}),aq&&(0,b.jsx)("p",{className:"text-xs text-red-500",children:aq}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-1",children:[(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",onClick:()=>{ad("choice"),ar(null)},children:"Back"}),(0,b.jsx)("button",{type:"button",disabled:0===ae.trim().length||ag,className:"px-4 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aB(),children:ag?"Fetching...":"Fetch"})]})]}),"file"===ac&&!ai&&(0,b.jsxs)("div",{className:"px-5 py-6 flex flex-col items-center gap-3",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Select a .agent.json file to import"}),(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-medium text-[var(--muted-foreground)] bg-[var(--secondary)] rounded-lg hover:bg-[var(--item-hover-bg)] transition-colors",onClick:()=>as.current?.click(),children:[(0,b.jsx)(q,{size:13}),"Choose File"]}),aq&&(0,b.jsx)("p",{className:"text-xs text-red-500",children:aq}),(0,b.jsx)("button",{type:"button",className:"text-xs text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] mt-1",onClick:()=>{ad("choice"),ar(null)},children:"Back"})]}),ai&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"overflow-y-auto flex-1",children:[ai.exportedAt&&(0,b.jsx)("div",{className:"px-5 py-3 border-b border-[var(--border)] bg-[var(--secondary)]",children:(0,b.jsxs)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:["Exported ",new Date(ai.exportedAt).toLocaleDateString()," · ",ai.agents.length," agents",w(ai).length>0?`, ${w(ai).length} projects`:""]})}),(0,b.jsxs)("div",{className:"border-b border-[var(--border)]",children:[(0,b.jsxs)("div",{className:"px-5 pt-3 pb-1 flex items-center justify-between",children:[(0,b.jsxs)("p",{className:"text-[11px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide",children:[ai.agents.length," agent",1===ai.agents.length?"":"s"," found"]}),(0,b.jsx)("button",{type:"button",className:"text-[11px] text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>{ak.size===ai.agents.length?al(new Set):al(new Set(ai.agents.map(a=>a.id)))},children:ak.size===ai.agents.length?"Deselect all":"Select all"})]}),ai.agents.map(c=>{let d=ak.has(c.id),e=a.find(a=>a.id===c.id);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${d?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{al(a=>{let b=new Set(a);return b.has(c.id)?b.delete(c.id):b.add(c.id),b})},children:[(0,b.jsx)(aG,{checked:d}),(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(c.id,24,c.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,b.jsx)("div",{className:"truncate text-xs font-medium",children:c.name}),(0,b.jsxs)("div",{className:"truncate text-[10px] text-[var(--app-shell-soft-text)]",children:[c.provider,c.model?` \xb7 ${c.model}`:""]})]}),e&&(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-50 text-amber-600 flex-shrink-0",children:"update"}),!e&&(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-green-50 text-green-600 flex-shrink-0",children:"new"}),c.self&&(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex-shrink-0",children:"+ self.md"})]},c.id)})]}),w(ai).length>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"px-5 pt-3 pb-1",children:(0,b.jsx)("p",{className:"text-[11px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Projects"})}),w(ai).map(a=>{let c=am.has(a.name);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-5 py-2 text-sm transition-colors ${c?"bg-[var(--app-shell-subtle)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--app-shell-subtle)]"}`,onClick:()=>{an(b=>{let c=new Set(b);return c.has(a.name)?c.delete(a.name):c.add(a.name),c})},children:[(0,b.jsx)(aG,{checked:c}),(0,b.jsx)(r.Users,{size:14,className:"text-[var(--muted-foreground)] flex-shrink-0"}),(0,b.jsx)("span",{className:"truncate text-xs font-medium flex-1",children:a.name}),(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:[a.agentIds.length," agents"]})]},a.name)})]})]}),aq&&(0,b.jsx)("div",{className:"px-5 py-2",children:(0,b.jsx)("p",{className:"text-xs text-red-500",children:aq})}),(0,b.jsxs)("div",{className:"px-5 py-3 border-t border-[var(--border)] flex items-center justify-between",children:[(0,b.jsxs)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:[ak.size," ",1===ak.size?"agent":"agents",am.size>0?`, ${am.size} ${1===am.size?"project":"projects"}`:""]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>{aj(null),al(new Set),an(new Set)},children:"Back"}),(0,b.jsxs)("button",{type:"button",disabled:0===ak.size||ao,className:"inline-flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aC(),children:[(0,b.jsx)(q,{size:12}),ao?"Importing...":`Import ${ak.size} agent${1===ak.size?"":"s"}`]})]})]})]})]})})]})}a.s(["default",()=>x],84712)}];
|
|
1
|
+
module.exports=[84712,a=>{"use strict";var b=a.i(90944),c=a.i(72131),d=a.i(38246),e=a.i(210),f=a.i(5784),g=a.i(50522),h=a.i(5151),i=a.i(33441),j=a.i(84505),k=a.i(60137);let l=(0,k.default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var m=a.i(2835),n=a.i(99464),o=a.i(15618);let p=(0,k.default)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),q=(0,k.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var r=a.i(60246),s=a.i(33508),t=a.i(56196),u=a.i(20138),v=a.i(89116);function w(a){return a?a.projects??[]:[]}let x=["Ada","Kai","Sage","Nova","Cleo","Milo","Iris","Juno","Remy","Zara","Arlo","Luna","Ezra","Wren","Nico","Thea","Fern","Orla","Kira","Dax","Lyra","Soren","Vera","Elio"];function y(){let[a,k]=(0,c.useState)([]),[y,z]=(0,c.useState)([]),{projects:A,createProject:B,addAgent:C,removeAgent:D,refresh:E}=(0,t.useProjectsWithAgents)(),[F,G]=(0,c.useState)(new Set),[H,I]=(0,c.useState)(null),[J,K]=(0,c.useState)(new Set),[L,M]=(0,c.useState)(!1),[N,O]=(0,c.useState)(null),[P,Q]=(0,c.useState)(!1),[R,S]=(0,c.useState)(new Set),[T,U]=(0,c.useState)(!0),[V,W]=(0,c.useState)(!1),[X,Y]=(0,c.useState)(null),[Z,$]=(0,c.useState)(null),[_,aa]=(0,c.useState)(!1),[ab,ac]=(0,c.useState)(!1),[ad,ae]=(0,c.useState)("choice"),[af,ag]=(0,c.useState)(""),[ah,ai]=(0,c.useState)(!1),[aj,ak]=(0,c.useState)(null),[al,am]=(0,c.useState)(new Set),[an,ao]=(0,c.useState)(new Set),[ap,aq]=(0,c.useState)(!1),[ar,as]=(0,c.useState)(null),at=(0,c.useRef)(null),[au,av]=(0,c.useState)(new Set),aw=()=>{fetch("/api/participants").then(a=>a.json()).then(a=>k(Array.isArray(a)?a:[]))},ax=(0,c.useCallback)(async()=>{try{let a=await fetch("/api/processes");if(!a.ok)return;let b=await a.json();av(new Set(b.filter(a=>"spawning"===a.state||"running"===a.state).map(a=>a.agentId)))}catch{}},[]);(0,c.useEffect)(()=>{aw(),v.threadService.listThreads().then(z),ax();let a=setInterval(ax,3e3);return()=>clearInterval(a)},[ax]);let ay=new Map(y.map(a=>[a.id,a])),az=A.filter(a=>!a.is_default),aA=async()=>{if(0!==R.size){W(!0);try{let a=await fetch("/api/agent-specs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:Array.from(R),includeSelf:T})});if(!a.ok)throw Error("Share failed");let b=await a.json();Y(b.code),$(b.expires_at)}catch(a){console.error("Share error:",a)}finally{W(!1)}}},aB=async()=>{if(0!==R.size){W(!0);try{let a=Array.from(R),b=await fetch("/api/agents/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:a})});if(!b.ok)throw Error("Export failed");let c=(await b.json()).agents.map(a=>({...a,self:T?a.self:null})),d={version:1,exportedAt:new Date().toISOString(),agents:c,projects:[]},e=new Blob([JSON.stringify(d,null,2)],{type:"application/json"}),f=URL.createObjectURL(e),g=document.createElement("a");g.href=f,g.download=1===c.length?`${c[0].name.toLowerCase().replace(/\s+/g,"-")}.agent.json`:"agents.bundle.json",g.click(),URL.revokeObjectURL(f),Q(!1)}catch(a){console.error("Export error:",a)}finally{W(!1)}}},aC=async()=>{if(0!==af.trim().length){ai(!0),as(null),ak(null);try{let a=await fetch(`/api/agent-specs/pull?code=${encodeURIComponent(af.trim())}`);if(!a.ok){let b=await a.json().catch(()=>({error:"Failed to pull"}));as(b.error||"Code not found or expired");return}let b=(await a.json()).bundle;ak(b),am(new Set(b.agents.map(a=>a.id))),ao(new Set(w(b).map(a=>a.name)))}catch{as("Failed to connect. Is agx-api running?")}finally{ai(!1)}}},aD=async()=>{if(aj){aq(!0);try{let b=new Set(a.map(a=>a.id));for(let a of aj.agents){if(!al.has(a.id))continue;let c={name:a.name,provider:a.provider,model:a.model,color:a.color,identity:a.identity||void 0,voice:a.voice||void 0,seed:a.seed||void 0,identityFile:a.identityFile||void 0,skills:a.skills||[],variables:a.variables||{}};b.has(a.id)?(c.id=a.id,await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})):await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(c)})}for(let a of w(aj)){if(!an.has(a.name))continue;let b=await B(a.name);if(b)for(let c of a.agentIds)al.has(c)&&await C(b.id,c)}aw(),await E(),ac(!1),ak(null)}catch(a){console.error("Import error:",a),as("Import failed. Check console for details.")}finally{aq(!1)}}},aE=H?A.find(a=>a.id===H.projectId):null,aF=new Set(aE?.agents.map(a=>a.agent_id)??[]),aG=H?a.filter(a=>!aF.has(a.id)):[],aH=({checked:a})=>(0,b.jsx)("div",{className:`w-4 h-4 rounded border flex-shrink-0 flex items-center justify-center ${a?"bg-[var(--foreground)] border-[var(--foreground)]":"border-[var(--app-shell-soft-text)]"}`,children:a&&(0,b.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:(0,b.jsx)("path",{d:"M2 5l2 2 4-4",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})});return(0,b.jsxs)("div",{className:"min-h-screen bg-[var(--secondary)] p-6",children:[(0,b.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,b.jsxs)("div",{className:"desktop-titlebar sticky top-0 z-20 -mx-6 mb-6 flex items-center gap-3 border-b border-[var(--border)] bg-[var(--secondary)]/92 px-6 py-4 backdrop-blur-md",children:[(0,b.jsxs)(d.default,{href:"/",className:"inline-flex items-center gap-1 text-sm text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",children:[(0,b.jsx)(e.ArrowLeft,{size:16}),"Back"]}),(0,b.jsx)("h1",{className:"text-2xl font-semibold text-[var(--foreground)]",children:"Manage Agents"}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-[var(--foreground)] rounded-lg hover:opacity-90 transition-colors",onClick:()=>M(!0),children:[(0,b.jsx)(o.Plus,{size:13}),"New Agent"]}),(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 transition-colors",onClick:()=>{S(new Set(a.map(a=>a.id))),U(!0),Y(null),$(null),aa(!1),Q(!0)},disabled:0===a.length,children:[(0,b.jsx)(p,{size:13}),"Share"]}),(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-violet-600 bg-violet-50 border border-violet-200 rounded-lg hover:bg-violet-100 transition-colors",onClick:()=>{ae("choice"),ag(""),ak(null),am(new Set),ao(new Set),as(null),ac(!0)},children:[(0,b.jsx)(j.Download,{size:13}),"Import"]}),(0,b.jsx)("input",{ref:at,type:"file",accept:".json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];if(!b)return;as(null);let c=new FileReader;c.onload=()=>{try{let a=JSON.parse(c.result);if(!a.version||!Array.isArray(a.agents))throw Error("Invalid bundle format");ak(a),am(new Set(a.agents.map(a=>a.id))),ao(new Set(w(a).map(a=>a.name)))}catch{as("Invalid file. Expected an .agent.json bundle.")}},c.readAsText(b),a.target.value=""}})]})]}),ar&&!ab&&(0,b.jsxs)("div",{className:"mb-4 px-4 py-3 rounded-lg bg-red-50 border border-red-200 text-sm text-red-700 flex items-center justify-between",children:[(0,b.jsx)("span",{children:ar}),(0,b.jsx)("button",{type:"button",onClick:()=>as(null),className:"text-red-400 hover:text-red-600",children:(0,b.jsx)(s.X,{size:14})})]}),0===a.length?(0,b.jsx)("p",{className:"text-[var(--muted-foreground)] text-sm",children:"No agents configured yet."}):(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(a=>(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl border border-[var(--border)] p-4 hover:shadow-md transition-shadow text-left group",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 mb-3",children:[(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(a.id,48,a.color),alt:a.name,className:"w-12 h-12 rounded-full bg-[var(--secondary)]"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h3",{className:"font-medium text-[var(--foreground)] truncate",children:a.name}),(0,b.jsx)("p",{className:"text-xs text-[var(--app-shell-soft-text)] truncate mt-0.5",children:a.model}),au.has(a.id)&&(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 mt-1 text-[10px] font-medium text-emerald-600",children:[(0,b.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),"Working"]})]})]}),a.skills&&a.skills.length>0&&(0,b.jsxs)("div",{className:"flex flex-wrap gap-1 mb-3",children:[a.skills.slice(0,3).map((a,c)=>(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-blue-50 text-blue-600 truncate max-w-[120px]",children:a.file.split("/").pop()},c)),a.skills.length>3&&(0,b.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--secondary)] text-[var(--app-shell-soft-text)]",children:["+",a.skills.length-3]})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-[var(--border)]",children:[(0,b.jsx)("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-[var(--secondary)] text-[var(--muted-foreground)] uppercase tracking-wide",children:a.provider}),(0,b.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)("button",{type:"button",title:"Edit",onClick:()=>O(a),className:"p-1.5 text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] rounded hover:bg-[var(--item-hover-bg)] transition-colors",children:(0,b.jsx)(n.Pencil,{size:13})}),(0,b.jsx)(d.default,{href:`/agents/${a.id}`,title:"View profile",className:"p-1.5 text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] rounded hover:bg-[var(--item-hover-bg)] transition-colors",children:(0,b.jsx)(l,{size:13})})]})]})]},a.id))}),(0,b.jsxs)("div",{className:"mt-10",children:[(0,b.jsxs)("div",{className:"mb-4",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold text-[var(--foreground)]",children:"Project assignments"}),(0,b.jsx)("p",{className:"mt-1 text-sm text-[var(--app-shell-soft-text)]",children:"Assign agents to existing projects."})]}),0===az.length?(0,b.jsx)("p",{className:"text-sm text-[var(--app-shell-soft-text)]",children:"No projects available for assignment."}):(0,b.jsx)("div",{className:"bg-[var(--card-bg)] rounded-xl border border-[var(--border)] divide-y divide-[var(--border)]",children:az.map(c=>{let d=F.has(c.id),e=(c.thread_ids??[]).map(a=>ay.get(a)?.title?.trim()||"Untitled").filter(Boolean);return(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3.5 group",children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-3 flex-1 min-w-0 text-left",onClick:()=>{var a;return a=c.id,void G(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},children:[d?(0,b.jsx)(f.ChevronDown,{size:16,className:"text-[var(--app-shell-soft-text)] flex-shrink-0"}):(0,b.jsx)(g.ChevronRight,{size:16,className:"text-[var(--app-shell-soft-text)] flex-shrink-0"}),(0,b.jsx)(r.Users,{size:16,className:"text-[var(--app-shell-soft-text)] flex-shrink-0"}),(0,b.jsx)("span",{className:"font-medium text-[var(--foreground)] text-sm",children:c.name}),(0,b.jsxs)("span",{className:"text-xs text-[var(--app-shell-soft-text)]",children:[c.agents.length," ",1===c.agents.length?"agent":"agents",e.length>0&&` \xb7 ${e.length} ${1===e.length?"thread":"threads"}`]})]}),(0,b.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] px-2.5 py-1.5 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--item-hover-bg)] hover:text-[var(--foreground)]",title:"Add agents",onClick:()=>{K(new Set),I({projectId:c.id})},children:[(0,b.jsx)(o.Plus,{size:14}),"Add agents"]})})]}),d&&(0,b.jsxs)("div",{className:"px-5 pb-4 pt-1 ml-9 flex flex-col gap-1",children:[0===c.agents.length&&(0,b.jsx)("p",{className:"text-xs text-[var(--app-shell-soft-text)] py-1",children:"No agents in this project."}),c.agents.map(d=>{let e=a.find(a=>a.id===d.agent_id);return(0,b.jsxs)("div",{className:"flex items-center gap-2.5 py-1.5 group/agent",children:[(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(d.agent_id,24,e?.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsx)("span",{className:"text-sm text-[var(--secondary-foreground)] truncate flex-1",children:e?.name??d.agent_id}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:e?.model}),(0,b.jsx)("button",{type:"button",className:"opacity-0 group-hover/agent:opacity-100 text-[var(--app-shell-soft-text)] hover:text-red-500 transition-opacity",onClick:()=>void D(c.id,d.agent_id),title:"Remove from project",children:(0,b.jsx)(s.X,{size:14})})]},d.agent_id)}),(0,b.jsxs)("button",{type:"button",className:"mt-2 inline-flex items-center gap-1.5 self-start rounded-lg border border-[var(--border)] px-2.5 py-1.5 text-xs font-medium text-[var(--muted-foreground)] transition-colors hover:bg-[var(--item-hover-bg)] hover:text-[var(--foreground)]",onClick:()=>{K(new Set),I({projectId:c.id})},children:[(0,b.jsx)(o.Plus,{size:12}),"Add agents"]}),e.length>0&&(0,b.jsxs)("div",{className:"mt-2 pt-2 border-t border-[var(--border)]",children:[(0,b.jsx)("p",{className:"text-[10px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide mb-1",children:"Threads"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map((a,c)=>(0,b.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-1 rounded-md bg-indigo-50 text-indigo-600",children:[(0,b.jsx)(m.Hash,{size:11}),a]},c))})]})]})]},c.id)})})]})]}),P&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>Q(!1),children:(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-[440px] max-h-[80vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[var(--border)]",children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Share Agents"}),(0,b.jsx)("button",{type:"button",className:"text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>Q(!1),children:(0,b.jsx)(s.X,{size:16})})]}),X?(0,b.jsxs)("div",{className:"px-5 py-6 flex flex-col items-center gap-4",children:[(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)] mb-3",children:"Share this code with the recipient:"}),(0,b.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,b.jsx)("span",{className:"text-3xl font-mono font-bold tracking-[0.3em] text-[var(--foreground)]",children:X}),(0,b.jsx)("button",{type:"button",className:"p-2 text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] transition-colors",onClick:()=>{X&&(navigator.clipboard.writeText(X),aa(!0),setTimeout(()=>aa(!1),2e3))},children:_?(0,b.jsx)(i.Check,{size:18,className:"text-green-500"}):(0,b.jsx)(h.Copy,{size:18})})]})]}),Z&&(0,b.jsxs)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:["Expires ",new Date(Z).toLocaleTimeString()]}),(0,b.jsx)("button",{type:"button",className:"px-4 py-2 text-xs font-medium text-[var(--muted-foreground)] bg-[var(--secondary)] rounded-lg hover:bg-[var(--item-hover-bg)] transition-colors",onClick:()=>Q(!1),children:"Done"})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"overflow-y-auto flex-1",children:[az.length>0&&(0,b.jsxs)("div",{className:"border-b border-[var(--border)] px-5 py-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide mb-2",children:"Select by project"}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:az.map(c=>{let d=c.agents.map(a=>a.agent_id),e=d.length>0&&d.every(a=>R.has(a)),f=d.some(a=>R.has(a));return(0,b.jsxs)("button",{type:"button",className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium transition-colors ${e?"bg-[var(--foreground)] text-white":f?"bg-[var(--app-shell-soft-text)] text-[var(--secondary-foreground)]":"bg-[var(--secondary)] text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{S(a=>{let b=new Set(a);return e?d.forEach(a=>b.delete(a)):d.forEach(a=>b.add(a)),b})},title:d.map(b=>a.find(a=>a.id===b)?.name??b).join(", "),children:[(0,b.jsx)(r.Users,{size:10}),c.name,(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:c.agents.length})]},c.id)})})]}),(0,b.jsxs)("div",{className:"border-b border-[var(--border)]",children:[(0,b.jsxs)("div",{className:"px-5 pt-3 pb-1 flex items-center justify-between",children:[(0,b.jsx)("p",{className:"text-[11px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide",children:"Agents"}),(0,b.jsx)("button",{type:"button",className:"text-[11px] text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>{R.size===a.length?S(new Set):S(new Set(a.map(a=>a.id)))},children:R.size===a.length?"Deselect all":"Select all"})]}),a.map(a=>{let c=R.has(a.id);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-5 py-2 text-sm transition-colors ${c?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{S(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c})},children:[(0,b.jsx)(aH,{checked:c}),(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(a.id,24,a.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsx)("span",{className:"truncate text-xs font-medium flex-1",children:a.name}),(0,b.jsx)("span",{className:"text-[10px] text-[var(--app-shell-soft-text)]",children:a.provider})]},a.id)})]}),(0,b.jsx)("div",{className:"px-5 py-3",children:(0,b.jsxs)("button",{type:"button",className:`flex items-center gap-3 w-full px-3 py-2 rounded-lg text-sm transition-colors ${T?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>U(!T),children:[(0,b.jsx)(aH,{checked:T}),(0,b.jsx)("span",{className:"text-xs font-medium",children:"Include self.md (agent bio)"})]})})]}),(0,b.jsxs)("div",{className:"px-5 py-3 border-t border-[var(--border)] flex items-center justify-between",children:[(0,b.jsxs)("span",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:[R.size," ",1===R.size?"agent":"agents"]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("button",{type:"button",disabled:0===R.size||V,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-[var(--muted-foreground)] bg-[var(--card-bg)] border border-[var(--border)] rounded-lg hover:bg-[var(--item-hover-bg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aB(),children:[(0,b.jsx)(j.Download,{size:12}),V?"Exporting...":"Export to File"]}),(0,b.jsxs)("button",{type:"button",disabled:0===R.size||V,className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aA(),children:[(0,b.jsx)(p,{size:12}),V?"Pushing...":"Push to Hub"]}),(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",onClick:()=>Q(!1),children:"Cancel"})]})]})]})]})}),H&&!L&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>I(null),children:(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-80 max-h-[70vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[(0,b.jsxs)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:["Add to ",aE?.name??"project"]}),(0,b.jsx)("button",{type:"button",className:"text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>I(null),children:(0,b.jsx)(s.X,{size:16})})]}),(0,b.jsxs)("div",{className:"overflow-y-auto py-1 flex-1",children:[(0,b.jsxs)("button",{type:"button",className:"w-full flex items-center gap-3 px-4 py-2.5 text-sm text-[var(--secondary-foreground)] hover:bg-[var(--item-hover-bg)] transition-colors border-b border-[var(--border)]",onClick:()=>M(!0),children:[(0,b.jsx)(o.Plus,{size:14,className:"text-[var(--app-shell-soft-text)]"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:"Create new agent"})]}),0===aG.length?(0,b.jsx)("p",{className:"px-4 py-6 text-xs text-[var(--app-shell-soft-text)] text-center",children:"All agents are already in this project"}):aG.map(a=>{let c=J.has(a.id);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-4 py-2.5 text-sm transition-colors ${c?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--secondary-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{K(b=>{let c=new Set(b);return c.has(a.id)?c.delete(a.id):c.add(a.id),c})},children:[(0,b.jsx)(aH,{checked:c}),(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(a.id,24,a.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsx)("div",{className:"min-w-0 flex-1 text-left",children:(0,b.jsx)("div",{className:"truncate font-medium text-xs",children:a.name})})]},a.id)})]}),aG.length>0&&(0,b.jsxs)("div",{className:"px-4 py-3 border-t border-[var(--border)] flex justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",onClick:()=>I(null),children:"Cancel"}),(0,b.jsxs)("button",{type:"button",disabled:0===J.size,className:"px-3 py-1.5 text-xs font-medium text-white bg-[var(--foreground)] rounded-lg hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>{for(let a of J)C(H.projectId,a);I(null)},children:["Add ",J.size>0?`(${J.size})`:""]})]})]})}),L&&(0,b.jsx)(u.AgentForm,{title:"Create new agent",initial:{name:x[Math.floor(Math.random()*x.length)],provider:"claude",model:"",identity:"",skills:[],skillBindings:[]},submitLabel:"Create",projects:az.map(a=>{let b=(a.thread_ids??[]).map(a=>ay.get(a)?.title?.trim()).filter(Boolean).join(", ")||"No thread";return{id:a.id,name:a.name,label:`${b} › ${a.name}`}}),initialProjectIds:H?[H.projectId]:[],onSubmit:async(b,c)=>{let d=["#D97706","#2563EB","#059669","#DC2626","#7C3AED","#DB2777","#0891B2"],e=d[a.length%d.length],f=b.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),g=c?.[0],h=await fetch("/api/participants",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f,name:b.name,provider:b.provider,model:b.model,color:b.color??e,...b.title?{title:b.title}:{},...b.identity?{identity:b.identity}:{},skills:b.skills??[],skillBindings:b.skillBindings??[],...g?{projectId:g}:{}})});if(h.ok){let a=await h.json().catch(()=>({})),b="string"==typeof a?.id&&a.id.trim()?a.id.trim():f;for(let a of(c??[]).slice(1))await C(a,b);M(!1),I(null),aw(),E()}},onCancel:()=>{M(!1)}}),N&&(0,b.jsx)(u.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||[],skillBindings:N.skillBindings||[]},agentId:N.id,submitLabel:"Save",projectMemberships:{current:A.filter(a=>a.agents.some(a=>a.agent_id===N.id)).map(a=>({id:a.id,name:a.name,is_default:!!a.is_default})),available:A.filter(a=>!a.agents.some(a=>a.agent_id===N.id)).map(a=>({id:a.id,name:a.name}))},onAddToProject:a=>C(a,N.id),onRemoveFromProject:a=>D(a,N.id),onSubmit:async a=>{await fetch("/api/participants",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:N.id,name:a.name,title:a.title||null,provider:a.provider,model:a.model,color:a.color,...a.identity?{identity:a.identity}:{},skills:a.skills??[],skillBindings:a.skillBindings??[]})}),O(null),aw()},onCancel:()=>O(null)}),ab&&(0,b.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/30",onClick:()=>ac(!1),children:(0,b.jsxs)("div",{className:"bg-[var(--card-bg)] rounded-xl shadow-xl border border-[var(--border)] w-[440px] max-h-[80vh] flex flex-col",onClick:a=>a.stopPropagation(),children:[(0,b.jsxs)("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-[var(--border)]",children:[(0,b.jsx)("h3",{className:"text-sm font-medium text-[var(--foreground)]",children:"Import Agents"}),(0,b.jsx)("button",{type:"button",className:"text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>ac(!1),children:(0,b.jsx)(s.X,{size:16})})]}),"choice"===ad&&!aj&&(0,b.jsxs)("div",{className:"px-5 py-6 flex flex-col gap-3",children:[(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-3 px-4 py-3.5 rounded-lg border border-[var(--border)] hover:border-violet-300 hover:bg-violet-50 transition-colors text-left",onClick:()=>ae("pull"),children:[(0,b.jsx)("div",{className:"w-9 h-9 rounded-lg bg-violet-100 flex items-center justify-center flex-shrink-0",children:(0,b.jsx)(j.Download,{size:16,className:"text-violet-600"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Pull from Hub"}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:"Enter a share code to import agents"})]})]}),(0,b.jsxs)("button",{type:"button",className:"flex items-center gap-3 px-4 py-3.5 rounded-lg border border-[var(--border)] hover:border-[var(--border)] hover:bg-[var(--item-hover-bg)] transition-colors text-left",onClick:()=>{ae("file"),setTimeout(()=>at.current?.click(),100)},children:[(0,b.jsx)("div",{className:"w-9 h-9 rounded-lg bg-[var(--secondary)] flex items-center justify-center flex-shrink-0",children:(0,b.jsx)(q,{size:16,className:"text-[var(--muted-foreground)]"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-medium text-[var(--foreground)]",children:"Upload File"}),(0,b.jsx)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:"Import from a .agent.json bundle"})]})]})]}),"pull"===ad&&!aj&&(0,b.jsxs)("div",{className:"px-5 py-5 flex flex-col gap-3",children:[(0,b.jsx)("label",{className:"text-sm text-[var(--muted-foreground)]",children:"Enter share code:"}),(0,b.jsx)("input",{autoFocus:!0,type:"text",value:af,onChange:a=>ag(a.target.value.toUpperCase()),placeholder:"e.g. A3X9K2",maxLength:6,className:"w-full px-3 py-2.5 text-center text-2xl font-mono font-bold tracking-[0.3em] border border-[var(--border)] rounded-lg outline-none focus:border-violet-400 focus:ring-1 focus:ring-violet-200 transition-all bg-[var(--card-bg)] text-[var(--foreground)]",onKeyDown:a=>{"Enter"===a.key&&aC()}}),ar&&(0,b.jsx)("p",{className:"text-xs text-red-500",children:ar}),(0,b.jsxs)("div",{className:"flex justify-end gap-2 mt-1",children:[(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--secondary-foreground)] transition-colors",onClick:()=>{ae("choice"),as(null)},children:"Back"}),(0,b.jsx)("button",{type:"button",disabled:0===af.trim().length||ah,className:"px-4 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aC(),children:ah?"Fetching...":"Fetch"})]})]}),"file"===ad&&!aj&&(0,b.jsxs)("div",{className:"px-5 py-6 flex flex-col items-center gap-3",children:[(0,b.jsx)("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Select a .agent.json file to import"}),(0,b.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 px-4 py-2 text-xs font-medium text-[var(--muted-foreground)] bg-[var(--secondary)] rounded-lg hover:bg-[var(--item-hover-bg)] transition-colors",onClick:()=>at.current?.click(),children:[(0,b.jsx)(q,{size:13}),"Choose File"]}),ar&&(0,b.jsx)("p",{className:"text-xs text-red-500",children:ar}),(0,b.jsx)("button",{type:"button",className:"text-xs text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)] mt-1",onClick:()=>{ae("choice"),as(null)},children:"Back"})]}),aj&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"overflow-y-auto flex-1",children:[aj.exportedAt&&(0,b.jsx)("div",{className:"px-5 py-3 border-b border-[var(--border)] bg-[var(--secondary)]",children:(0,b.jsxs)("p",{className:"text-[11px] text-[var(--app-shell-soft-text)]",children:["Exported ",new Date(aj.exportedAt).toLocaleDateString()," · ",aj.agents.length," agents",w(aj).length>0?`, ${w(aj).length} projects`:""]})}),(0,b.jsxs)("div",{className:"border-b border-[var(--border)]",children:[(0,b.jsxs)("div",{className:"px-5 pt-3 pb-1 flex items-center justify-between",children:[(0,b.jsxs)("p",{className:"text-[11px] font-medium text-[var(--app-shell-soft-text)] uppercase tracking-wide",children:[aj.agents.length," agent",1===aj.agents.length?"":"s"," found"]}),(0,b.jsx)("button",{type:"button",className:"text-[11px] text-[var(--app-shell-soft-text)] hover:text-[var(--muted-foreground)]",onClick:()=>{al.size===aj.agents.length?am(new Set):am(new Set(aj.agents.map(a=>a.id)))},children:al.size===aj.agents.length?"Deselect all":"Select all"})]}),aj.agents.map(c=>{let d=al.has(c.id),e=a.find(a=>a.id===c.id);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-5 py-2.5 text-sm transition-colors ${d?"bg-[var(--secondary)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--item-hover-bg)]"}`,onClick:()=>{am(a=>{let b=new Set(a);return b.has(c.id)?b.delete(c.id):b.add(c.id),b})},children:[(0,b.jsx)(aH,{checked:d}),(0,b.jsx)("img",{src:(0,u.agentAvatarUrl)(c.id,24,c.color),alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 text-left",children:[(0,b.jsx)("div",{className:"truncate text-xs font-medium",children:c.name}),(0,b.jsxs)("div",{className:"truncate text-[10px] text-[var(--app-shell-soft-text)]",children:[c.provider,c.model?` \xb7 ${c.model}`:""]})]}),e&&(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-50 text-amber-600 flex-shrink-0",children:"update"}),!e&&(0,b.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-green-50 text-green-600 flex-shrink-0",children:"new"}),c.self&&(0,b.jsx)("span",{className:"text-[10px] text-[var(--muted-foreground)] flex-shrink-0",children:"+ self.md"})]},c.id)})]}),w(aj).length>0&&(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"px-5 pt-3 pb-1",children:(0,b.jsx)("p",{className:"text-[11px] font-medium text-[var(--muted-foreground)] uppercase tracking-wide",children:"Projects"})}),w(aj).map(a=>{let c=an.has(a.name);return(0,b.jsxs)("button",{type:"button",className:`w-full flex items-center gap-3 px-5 py-2 text-sm transition-colors ${c?"bg-[var(--app-shell-subtle)] text-[var(--foreground)]":"text-[var(--muted-foreground)] hover:bg-[var(--app-shell-subtle)]"}`,onClick:()=>{ao(b=>{let c=new Set(b);return c.has(a.name)?c.delete(a.name):c.add(a.name),c})},children:[(0,b.jsx)(aH,{checked:c}),(0,b.jsx)(r.Users,{size:14,className:"text-[var(--muted-foreground)] flex-shrink-0"}),(0,b.jsx)("span",{className:"truncate text-xs font-medium flex-1",children:a.name}),(0,b.jsxs)("span",{className:"text-[10px] text-[var(--muted-foreground)]",children:[a.agentIds.length," agents"]})]},a.name)})]})]}),ar&&(0,b.jsx)("div",{className:"px-5 py-2",children:(0,b.jsx)("p",{className:"text-xs text-red-500",children:ar})}),(0,b.jsxs)("div",{className:"px-5 py-3 border-t border-[var(--border)] flex items-center justify-between",children:[(0,b.jsxs)("span",{className:"text-[11px] text-[var(--muted-foreground)]",children:[al.size," ",1===al.size?"agent":"agents",an.size>0?`, ${an.size} ${1===an.size?"project":"projects"}`:""]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsx)("button",{type:"button",className:"px-3 py-1.5 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",onClick:()=>{ak(null),am(new Set),ao(new Set)},children:"Back"}),(0,b.jsxs)("button",{type:"button",disabled:0===al.size||ap,className:"inline-flex items-center gap-1.5 px-4 py-1.5 text-xs font-medium text-white bg-violet-600 rounded-lg hover:bg-violet-700 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",onClick:()=>void aD(),children:[(0,b.jsx)(q,{size:12}),ap?"Importing...":`Import ${al.size} agent${1===al.size?"":"s"}`]})]})]})]})]})})]})}a.s(["default",()=>y],84712)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=app_agents_page_tsx_f5f08ed8._.js.map
|