@jiggai/kitchen 0.3.28 → 0.3.30
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +11 -0
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +76 -0
- package/.next/server/app/_global-error/page/build-manifest.json +3 -3
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +8 -8
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_full.segment.rsc +8 -8
- package/.next/server/app/_global-error.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/build-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +11 -11
- package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/agents/[agentId]/page/build-manifest.json +3 -3
- package/.next/server/app/agents/[agentId]/page.js +2 -2
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[id]/route.js +1 -1
- package/.next/server/app/api/agents/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/add/route.js +1 -1
- package/.next/server/app/api/agents/add/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/file/route.js +1 -1
- package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/files/route.js +1 -1
- package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/route.js +1 -1
- package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/update/route.js +1 -1
- package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
- package/.next/server/app/api/channels/bindings/route.js +1 -1
- package/.next/server/app/api/channels/bindings/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/add/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/cron/add/route/build-manifest.json +11 -0
- package/.next/server/app/api/cron/add/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/cron/add/route.js +6 -0
- package/.next/server/app/api/cron/add/route.js.map +5 -0
- package/.next/server/app/api/cron/add/route.js.nft.json +1 -0
- package/.next/server/app/api/cron/add/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/cron/delete/route.js +1 -1
- package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/edit/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/cron/edit/route/build-manifest.json +11 -0
- package/.next/server/app/api/cron/edit/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/cron/edit/route.js +6 -0
- package/.next/server/app/api/cron/edit/route.js.map +5 -0
- package/.next/server/app/api/cron/edit/route.js.nft.json +1 -0
- package/.next/server/app/api/cron/edit/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/worker/route.js +1 -1
- package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/promote/route.js +1 -1
- package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/route.js +1 -1
- package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/route.js +1 -1
- package/.next/server/app/api/goals/route.js.nft.json +1 -1
- package/.next/server/app/api/ids/check/route.js +1 -1
- package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
- package/.next/server/app/api/marketplace/recipes/[slug]/route.js +1 -1
- package/.next/server/app/api/marketplace/recipes/[slug]/route.js.nft.json +1 -1
- package/.next/server/app/api/marketplace/recipes/route.js +1 -1
- package/.next/server/app/api/marketplace/recipes/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js +7 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.map +5 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js +7 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.map +5 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/plugins/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/route.js +7 -0
- package/.next/server/app/api/plugins/route.js.map +5 -0
- package/.next/server/app/api/plugins/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/plugins/test/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/test/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/test/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/test/route.js +7 -0
- package/.next/server/app/api/plugins/test/route.js.map +5 -0
- package/.next/server/app/api/plugins/test/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/test/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/recipes/[id]/route.js +1 -1
- package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/clone/route.js +1 -1
- package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/custom-team/route.js +1 -1
- package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/local-agent-catalog/route.js +1 -1
- package/.next/server/app/api/recipes/local-agent-catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/scaffold/route.js +1 -1
- package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/cron-installation/route.js +1 -1
- package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/model-options/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/settings/model-options/route/build-manifest.json +11 -0
- package/.next/server/app/api/settings/model-options/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/settings/model-options/route.js +6 -0
- package/.next/server/app/api/settings/model-options/route.js.map +5 -0
- package/.next/server/app/api/settings/model-options/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/model-options/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/skills/available/route.js +1 -1
- package/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/.next/server/app/api/swarms/start/route.js +3 -3
- package/.next/server/app/api/swarms/start/route.js.nft.json +1 -1
- package/.next/server/app/api/swarms/status/route.js +1 -1
- package/.next/server/app/api/swarms/status/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/media-providers/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js +3 -3
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/file/route.js +1 -1
- package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/files/route.js +1 -1
- package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/memory/route.js +2 -1
- package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/meta/route.js +1 -1
- package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/orchestrator/install/route.js +1 -1
- package/.next/server/app/api/teams/orchestrator/install/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/orchestrator/route.js +1 -1
- package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/remove-team/route.js +1 -1
- package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/install/route.js +1 -1
- package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/route.js +1 -1
- package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-deliverables/file/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js +6 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js.map +5 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/workflow-deliverables/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflow-deliverables/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflow-deliverables/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflow-deliverables/route.js +6 -0
- package/.next/server/app/api/teams/workflow-deliverables/route.js.map +5 -0
- package/.next/server/app/api/teams/workflow-deliverables/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflow-deliverables/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/workflow-runs/route.js +1 -1
- package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-templates/route.js +1 -1
- package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflows/route.js +1 -1
- package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assign/route.js +1 -1
- package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assignees/route.js +1 -1
- package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/move/route.js +1 -1
- package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
- package/.next/server/app/channels/page/build-manifest.json +3 -3
- package/.next/server/app/channels/page.js +2 -2
- package/.next/server/app/channels/page.js.nft.json +1 -1
- package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
- package/.next/server/app/channels.html +2 -2
- package/.next/server/app/channels.rsc +12 -12
- package/.next/server/app/channels.segments/_full.segment.rsc +12 -12
- package/.next/server/app/channels.segments/_head.segment.rsc +4 -4
- package/.next/server/app/channels.segments/_index.segment.rsc +5 -5
- package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/channels.segments/channels.segment.rsc +3 -3
- package/.next/server/app/cron-jobs/page/build-manifest.json +3 -3
- package/.next/server/app/cron-jobs/page.js +2 -2
- package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
- package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/[id]/page/build-manifest.json +3 -3
- package/.next/server/app/goals/[id]/page.js +2 -2
- package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
- package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/new/page/build-manifest.json +3 -3
- package/.next/server/app/goals/new/page.js +2 -2
- package/.next/server/app/goals/new/page.js.nft.json +1 -1
- package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/new.html +2 -2
- package/.next/server/app/goals/new.rsc +13 -13
- package/.next/server/app/goals/new.segments/_full.segment.rsc +13 -13
- package/.next/server/app/goals/new.segments/_head.segment.rsc +4 -4
- package/.next/server/app/goals/new.segments/_index.segment.rsc +5 -5
- package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/goals/new.segments/goals/new.segment.rsc +3 -3
- package/.next/server/app/goals/new.segments/goals.segment.rsc +3 -3
- package/.next/server/app/goals/page/build-manifest.json +3 -3
- package/.next/server/app/goals/page.js +2 -2
- package/.next/server/app/goals/page.js.nft.json +1 -1
- package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals.html +1 -1
- package/.next/server/app/goals.rsc +12 -12
- package/.next/server/app/goals.segments/_full.segment.rsc +12 -12
- package/.next/server/app/goals.segments/_head.segment.rsc +4 -4
- package/.next/server/app/goals.segments/_index.segment.rsc +5 -5
- package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/goals.segments/goals.segment.rsc +3 -3
- package/.next/server/app/page/build-manifest.json +3 -3
- package/.next/server/app/page.js +4 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recipes/[id]/page/build-manifest.json +3 -3
- package/.next/server/app/recipes/[id]/page.js +4 -4
- package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
- package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recipes/page/build-manifest.json +3 -3
- package/.next/server/app/recipes/page.js +2 -2
- package/.next/server/app/recipes/page.js.nft.json +1 -1
- package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/runs/page/build-manifest.json +3 -3
- package/.next/server/app/runs/page.js +6 -5
- package/.next/server/app/runs/page.js.nft.json +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page/build-manifest.json +3 -3
- package/.next/server/app/settings/page.js +2 -2
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +12 -12
- package/.next/server/app/settings.segments/_full.segment.rsc +12 -12
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +5 -5
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/teams/[teamId]/deliverables/page/app-paths-manifest.json +3 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/build-manifest.json +17 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/next-font-manifest.json +11 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/server-reference-manifest.json +4 -0
- package/.next/server/app/teams/[teamId]/deliverables/page.js +21 -0
- package/.next/server/app/teams/[teamId]/deliverables/page.js.map +5 -0
- package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -0
- package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +2 -0
- package/.next/server/app/teams/[teamId]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/page.js +4 -4
- package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +6 -5
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/runs/page.js +2 -2
- package/.next/server/app/teams/[teamId]/runs/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +3 -3
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/tickets/page.js +3 -3
- package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +2 -2
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/workflows/page.js +4 -4
- package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tickets/[ticket]/page/build-manifest.json +3 -3
- package/.next/server/app/tickets/[ticket]/page.js +3 -3
- package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
- package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tickets/page/build-manifest.json +3 -3
- package/.next/server/app/tickets/page.js +3 -3
- package/.next/server/app/tickets/page.js.nft.json +1 -1
- package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +11 -0
- package/.next/server/chunks/[root-of-the-server]__00a30f40._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00a30f40._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__04f289da._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__04f289da._.js.map +1 -1
- package/.next/server/chunks/{[root-of-the-server]__26c618a3._.js → [root-of-the-server]__0883634a._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0bea0f71._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bea0f71._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__fef7183d._.js → [root-of-the-server]__0f55461f._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__1480ffda._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1480ffda._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__17124952._.js +4 -0
- package/.next/server/chunks/[root-of-the-server]__17124952._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__18423bab._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__18423bab._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__1873f417._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1873f417._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__05f5e243._.js → [root-of-the-server]__1f1e62ac._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__864a08dd._.js → [root-of-the-server]__20b1f42d._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__2c207e60._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__2c207e60._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__69be1758._.js → [root-of-the-server]__2dd1afff._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__3021a250._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3021a250._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__343776df._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__343776df._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__35ec765d._.js +13 -0
- package/.next/server/chunks/[root-of-the-server]__35ec765d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__392e585d._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__3b2d0020._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3b2d0020._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3bfad714._.js +6 -0
- package/.next/server/chunks/[root-of-the-server]__3bfad714._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3d15e850._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3d15e850._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__482575d2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__482575d2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__4898071c._.js +4 -4
- package/.next/server/chunks/{[root-of-the-server]__bbdb6dcb._.js → [root-of-the-server]__4ee12514._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__4ee12514._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__55defc7c._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__698cf062._.js → [root-of-the-server]__5aa1dc93._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__b002764e._.js → [root-of-the-server]__5c5990a6._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__7a331e51._.js → [root-of-the-server]__603cb0fa._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__d924e5ac._.js → [root-of-the-server]__636919a0._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__663e79ff._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__663e79ff._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__69c065ce._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__c63a9f28._.js → [root-of-the-server]__74b80ca4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__813dd669._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__813dd669._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__5ceff0f3._.js → [root-of-the-server]__87875179._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__87875179._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__5ea38a67._.js → [root-of-the-server]__8f8e110f._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__e40409a2._.js → [root-of-the-server]__9853b72d._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__95ddb81a._.js → [root-of-the-server]__9dba20b3._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__ff69832c._.js → [root-of-the-server]__9e96d37b._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__8e27e9f7._.js → [root-of-the-server]__aba68368._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__b457b884._.js +22 -0
- package/.next/server/chunks/[root-of-the-server]__b457b884._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__bf608f29._.js → [root-of-the-server]__be5f57b2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__c15c5141._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c15c5141._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c1b0d50e._.js +4 -0
- package/.next/server/chunks/[root-of-the-server]__c1b0d50e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__8ea22d0a._.js → [root-of-the-server]__d302afb4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__da7df58d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__da7df58d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__47eb3111._.js → [root-of-the-server]__e9d9d570._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__f408c708._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__59a6cf09._.js → [root-of-the-server]__f45ceefb._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__3cfdf0b3._.js → [root-of-the-server]__f994dc62._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__f994dc62._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_add_route_actions_f9053a93.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_add_route_actions_f9053a93.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_edit_route_actions_3b551424.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_edit_route_actions_3b551424.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_route_actions_0aabd6b3.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_route_actions_0aabd6b3.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_test_route_actions_8babbe5c.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_test_route_actions_8babbe5c.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_settings_model-options_route_actions_bccf115a.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_settings_model-options_route_actions_bccf115a.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-deliverables_route_actions_9de4298b.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-deliverables_route_actions_9de4298b.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_[___path]_route_actions_471be8ce.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_[___path]_route_actions_471be8ce.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_tabs_[tabId]_route_actions_9420efec.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_tabs_[tabId]_route_actions_9420efec.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_media-providers_route_actions_1ea823f1.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_media-providers_route_actions_1ea823f1.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_workflow-deliverables_file_route_actions_332fd6ea.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_workflow-deliverables_file_route_actions_332fd6ea.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f5680d9e.js +1 -1
- package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js +4 -4
- package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js +12 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__17b046ea._.js → [root-of-the-server]__388bae11._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__51e26a01._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__4c66998a._.js.map → [root-of-the-server]__51e26a01._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__2db9d262._.js → [root-of-the-server]__8f9585b9._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__2db9d262._.js.map → [root-of-the-server]__8f9585b9._.js.map} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__9a7d79aa._.js → [root-of-the-server]__997aa62c._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0df430db._.js → [root-of-the-server]__9e400864._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__8a588fad._.js → [root-of-the-server]__a6348eaa._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__49281b4c._.js → [root-of-the-server]__af792402._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__68c20e8e._.js → [root-of-the-server]__b5aa14b8._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__68c20e8e._.js.map → [root-of-the-server]__b5aa14b8._.js.map} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__8756d76d._.js → [root-of-the-server]__b8998a21._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__c777e326._.js → [root-of-the-server]__df23886e._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__02e6ccaa._.js → [root-of-the-server]__e9bd9b71._.js} +2 -2
- package/.next/server/chunks/ssr/_018dfe6b._.js +2 -2
- package/.next/server/chunks/ssr/_2d8d7232._.js +3 -0
- package/.next/server/chunks/ssr/_2d8d7232._.js.map +1 -0
- package/.next/server/chunks/ssr/_7f9e89d2._.js +1 -1
- package/.next/server/chunks/ssr/_7f9e89d2._.js.map +1 -1
- package/.next/server/chunks/ssr/_8538617d._.js +3 -0
- package/.next/server/chunks/ssr/_8538617d._.js.map +1 -0
- package/.next/server/chunks/ssr/_a506fcf8._.js +3 -0
- package/.next/server/chunks/ssr/_a506fcf8._.js.map +1 -0
- package/.next/server/chunks/ssr/_deb7a691._.js +5 -0
- package/.next/server/chunks/ssr/_deb7a691._.js.map +1 -0
- package/.next/server/chunks/ssr/_ec0b0b83._.js +4 -0
- package/.next/server/chunks/ssr/_ec0b0b83._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_deliverables_page_actions_f44ae7c7.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_deliverables_page_actions_f44ae7c7.js.map +1 -0
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
- package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js +3 -0
- package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1038a5b9._.js +10 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__4fd003c7._.js.map → node_modules_next_dist_1038a5b9._.js.map} +1 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js +1 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js.map +1 -1
- package/.next/server/chunks/ssr/node_modules_yaml_dist_18db9ed7._.js +2 -2
- package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js +3 -0
- package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +4 -0
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{d2be314c3ece3fbe.js → 0bd6498bda341889.js} +1 -1
- package/.next/static/chunks/{c27f767f683b017a.js → 410dc851d0e3033d.js} +1 -1
- package/.next/static/chunks/{2ad8e6acac0ede2c.js → 4e38b3f280ced64c.js} +1 -1
- package/.next/static/chunks/{236ef28eb649c432.js → 4f2b8a07ace7e02b.js} +1 -1
- package/.next/static/chunks/57ad5290f7e92ffd.css +3 -0
- package/.next/static/chunks/{e854e56ea8cb6236.js → 87879d67a1601ee0.js} +1 -1
- package/.next/static/chunks/8a919077b73862da.js +1 -0
- package/.next/static/chunks/9906444fb1191bb4.js +1 -0
- package/.next/static/chunks/{43d0024279c6160e.js → a625725b4cd85ea3.js} +1 -1
- package/.next/static/chunks/{3e1fe6be993c61fb.js → ac32974713c57cb3.js} +1 -1
- package/.next/static/chunks/{f2f58a7e93290fbb.js → aebc3b6d791f68d2.js} +1 -1
- package/.next/static/chunks/{e083bcf4a197beae.js → b83c1ca03c3b8c6d.js} +1 -1
- package/.next/static/chunks/{e7bbb90aada90fdf.js → bdb7ebd88ea13111.js} +1 -1
- package/.next/static/chunks/bfcfbe145220d365.js +1 -0
- package/.next/static/chunks/c0d9f53d91cc65c5.js +10 -0
- package/.next/static/chunks/{36aff6bd42d53c8b.js → c0e2f959abc4cc13.js} +1 -1
- package/.next/static/chunks/{62e0c437eb8fc2da.js → c822e53f79a492c7.js} +1 -1
- package/.next/static/chunks/{fd0cb4d03fd17cf6.js → ce6b2024d13b4333.js} +1 -1
- package/.next/static/chunks/d13249af74d111cf.js +3 -0
- package/.next/static/chunks/{4a6dcf80b293d7a4.js → d16f64ca3a8ed208.js} +1 -1
- package/.next/static/chunks/{c84580993f22c17a.js → d6e1b7307a9274ce.js} +1 -1
- package/.next/static/chunks/d7541a171116ec9c.js +1 -0
- package/.next/static/chunks/{93719e85369dd453.js → e03137fd069b1514.js} +1 -1
- package/.next/static/chunks/{db4da5ee45033817.js → e10faa9296c8b246.js} +1 -1
- package/.next/static/chunks/ec24877f7b7f82c5.js +3 -0
- package/.next/static/chunks/{f179280598d329b2.js → ff3bbb5df40b2cc4.js} +1 -1
- package/.next/static/chunks/{turbopack-0236a74c4f471967.js → turbopack-dbf3078dbf5863bd.js} +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +11 -2
- package/tsconfig.json +2 -1
- package/.next/server/chunks/[root-of-the-server]__01863a8b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01863a8b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__150bf0bf._.js +0 -4
- package/.next/server/chunks/[root-of-the-server]__150bf0bf._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__4079fa2b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__4079fa2b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__453333f5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__453333f5._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__502825d0._.js +0 -13
- package/.next/server/chunks/[root-of-the-server]__502825d0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__51198e25._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__51198e25._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__542a081b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__542a081b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__63715de8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__63715de8._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__69c45937._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__69c45937._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6caa8f2d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6caa8f2d._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__7459129e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__7459129e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__89605574._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__89605574._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a49c534d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__a49c534d._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b64936a3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b64936a3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js +0 -6
- package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e063a986._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e063a986._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__4fd003c7._.js +0 -10
- package/.next/server/chunks/ssr/_d9520bea._.js +0 -3
- package/.next/server/chunks/ssr/_d9520bea._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +0 -3
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js +0 -12
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js.map +0 -1
- package/.next/static/chunks/33959503ed1ef5fe.css +0 -3
- package/.next/static/chunks/474635d658546626.js +0 -1
- package/.next/static/chunks/4d4876ec71727e38.js +0 -1
- package/.next/static/chunks/579cd9be685abc65.js +0 -1
- package/.next/static/chunks/5e3b1d0f61a651bf.js +0 -1
- package/.next/static/chunks/a719c5f36ffeec2a.js +0 -10
- package/.next/static/chunks/ca07f0194f384207.js +0 -1
- /package/.next/server/chunks/{[root-of-the-server]__26c618a3._.js.map → [root-of-the-server]__0883634a._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__fef7183d._.js.map → [root-of-the-server]__0f55461f._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__05f5e243._.js.map → [root-of-the-server]__1f1e62ac._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__864a08dd._.js.map → [root-of-the-server]__20b1f42d._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__69be1758._.js.map → [root-of-the-server]__2dd1afff._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__698cf062._.js.map → [root-of-the-server]__5aa1dc93._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__b002764e._.js.map → [root-of-the-server]__5c5990a6._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__7a331e51._.js.map → [root-of-the-server]__603cb0fa._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__d924e5ac._.js.map → [root-of-the-server]__636919a0._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__c63a9f28._.js.map → [root-of-the-server]__74b80ca4._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__5ea38a67._.js.map → [root-of-the-server]__8f8e110f._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__e40409a2._.js.map → [root-of-the-server]__9853b72d._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__95ddb81a._.js.map → [root-of-the-server]__9dba20b3._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__ff69832c._.js.map → [root-of-the-server]__9e96d37b._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__8e27e9f7._.js.map → [root-of-the-server]__aba68368._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__bf608f29._.js.map → [root-of-the-server]__be5f57b2._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__8ea22d0a._.js.map → [root-of-the-server]__d302afb4._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__47eb3111._.js.map → [root-of-the-server]__e9d9d570._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__59a6cf09._.js.map → [root-of-the-server]__f45ceefb._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__17b046ea._.js.map → [root-of-the-server]__388bae11._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__9a7d79aa._.js.map → [root-of-the-server]__997aa62c._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__0df430db._.js.map → [root-of-the-server]__9e400864._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__8a588fad._.js.map → [root-of-the-server]__a6348eaa._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__49281b4c._.js.map → [root-of-the-server]__af792402._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__8756d76d._.js.map → [root-of-the-server]__b8998a21._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__c777e326._.js.map → [root-of-the-server]__df23886e._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__02e6ccaa._.js.map → [root-of-the-server]__e9bd9b71._.js.map} +0 -0
- /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_buildManifest.js +0 -0
- /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(43476),a=e.i(74080);function r({open:e,onClose:r,title:s,children:i,error:l,confirmLabel:o,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:u}){if(!e)return null;let x=m??!1,h=x&&n?n:o,p="confirmation-modal-title";return(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:r,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,l?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||x,onClick:c,className:u??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>r])},54510,e=>{"use strict";var t=e.i(43476),a=e.i(44355);function r({open:e,onClose:r,title:s,entityLabel:i,bodyText:l,onConfirm:o,busy:n,error:c}){return(0,t.jsx)(a.ConfirmationModal,{open:e,onClose:r,title:s,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:o,busy:n,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",l]})})}function s(e){return function(a){let s=a[e.entityLabelKey];return(0,t.jsx)(r,{open:a.open,onClose:a.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:a.onConfirm,busy:a.busy,error:a.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),l=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),o=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,o,"DeleteTeamModal",0,l],54510)},92236,e=>{"use strict";async function t(e){let t=await fetch("/api/scaffold",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...e,applyConfig:!0,overwrite:!1})}),a=await t.json();return{res:t,json:a}}e.s(["fetchScaffold",()=>t])},56460,e=>{"use strict";function t(e,a=80){let r=String(e??"").toLowerCase().trim(),s=Math.min(r.length,2*a),i="",l=!1;for(let e=0;e<s;e++){let t=r[e];t>="a"&&t<="z"||t>="0"&&t<="9"?(i+=t,l=!1):" "!==t&&"-"!==t&&"_"!==t||l||(i+="-",l=!0)}for(;i.startsWith("-");)i=i.slice(1);for(;i.endsWith("-");)i=i.slice(0,-1);return i.slice(0,a)}e.s(["slugifyId",()=>t])},44321,e=>{"use strict";var t=e.i(43476),a=e.i(22016),r=e.i(18566),s=e.i(71645),i=e.i(74080);let l={1:"Ordering team…",2:"Cooking up agents…",3:"Serving them up hot…"};function o({open:e,step:a,onDismiss:r}){return e?(0,i.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[9999]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none"}),r?(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),r()},className:"fixed right-4 top-4 z-[10000] rounded-full border border-white/10 bg-[color:var(--ck-bg-glass)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":"Dismiss loading overlay",title:"Dismiss",children:"Esc"}):null,(0,t.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-6 sm:p-10",children:(0,t.jsxs)("div",{className:"w-full max-w-2xl rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("div",{className:"text-2xl font-semibold text-[color:var(--ck-text-primary)]",children:"Claw Kitchen"}),(0,t.jsx)("div",{className:"mt-3 text-base text-[color:var(--ck-text-secondary)]",children:"Hang tight — we’re updating your OpenClaw install."}),(0,t.jsx)("div",{className:"mt-8 space-y-4 text-base",children:[1,2,3].map(e=>{let r=e===a,s=e<a;return(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-4 w-4 rounded-full "+(s?"bg-emerald-400":r?"bg-[var(--ck-accent-red)] animate-pulse":"bg-white/20")}),(0,t.jsx)("div",{className:s?"text-[color:var(--ck-text-secondary)] line-through":"text-[color:var(--ck-text-primary)]",children:l[e]})]},e)})})]})})]}),document.body):null}var n=e.i(42771);async function c(e,t){let a=t.intervalMs??500,r=Date.now();for(;Date.now()-r<t.timeoutMs;){let t=await e();if(null!==t)return t;await new Promise(e=>setTimeout(e,a))}return null}var d=e.i(92236),m=e.i(76972),u=e.i(56460);function x(e){let{open:t,name:a,setName:r,id:i,setId:l,idTouched:o,setIdTouched:n,slugify:c=u.slugifyId}=e,d=(0,s.useMemo)(()=>c(a),[a,c]),m=o?i:d;return(0,s.useEffect)(()=>{t&&(o||l(d))},[d,t,o,l]),(0,s.useEffect)(()=>{t||(n(!1),r(""),l(""))},[t,n,r,l]),{derivedId:d,effectiveId:m}}var h=e.i(44355);function p({open:e,title:a,recipeId:r,recipeName:s,children:i,error:l,busy:o,canConfirm:n,onClose:c,onConfirm:d,confirmLabel:m}){return(0,t.jsxs)(h.ConfirmationModal,{open:e,onClose:c,title:a,error:l,confirmLabel:m,confirmBusyLabel:"Creating…",confirmDisabled:!n,busy:o,onConfirm:d,children:[(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Create a new ",a.toLowerCase().replace("create ","")," from recipe"," ",(0,t.jsx)("code",{className:"font-mono",children:r}),s?(0,t.jsxs)(t.Fragment,{children:[" ","(",(0,t.jsx)("span",{className:"font-medium",children:s}),")"]}):null,"."]}),i]})}function g({open:e,recipeId:a,recipeName:r,teamId:i,setTeamId:l,installCron:o,setInstallCron:n,busy:c,error:d,onClose:m,onConfirm:u}){let[h,g]=(0,s.useState)(""),[v,f]=(0,s.useState)(!1),{effectiveId:y}=x({open:e,name:h,setName:g,id:i,setId:l,idTouched:v,setIdTouched:f});return(0,t.jsxs)(p,{open:e,title:"Create team",recipeId:a,recipeName:r,error:d,busy:c,canConfirm:!!y.trim(),onClose:m,onConfirm:u,confirmLabel:"Create team",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team name"}),(0,t.jsx)("input",{value:h,onChange:e=>g(e.target.value),placeholder:"e.g. Crypto Team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team id"}),(0,t.jsx)("input",{value:y,onChange:e=>{f(!0),l(e.target.value)},placeholder:"e.g. my-team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"This will scaffold ~/.openclaw/workspace-<teamId> and add the team to config."})]}),(0,t.jsxs)("label",{className:"mt-4 flex items-center gap-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:o,onChange:e=>n(e.target.checked)}),"Install cron jobs from this recipe"]})]})}function v(e){return/^[a-z0-9][a-z0-9_-]{1,62}$/.test(e)}function f({open:e,teamId:a,setTeamId:r,busy:i,error:l,onClose:o,onConfirm:c,onRolesChange:d}){let[m,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(""),[y,b]=(0,s.useState)({}),[k,w]=(0,s.useState)(null),[j,N]=(0,s.useState)(null),[C,I]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(async()=>{let t=await (0,n.fetchJsonWithStatus)("/api/recipes/local-agent-catalog",{cache:"no-store"});if(!e){if(!t.ok)return h(t.error||"Failed to load local agent catalog");if(!t.data.ok)return h(t.data.error||"Failed to load local agent catalog");u(Array.isArray(t.data.items)?t.data.items:[])}})(),()=>{e=!0}},[]);let[S,T]=(0,s.useState)({state:"unknown"}),$=(0,s.useMemo)(()=>{let e=g.trim().toLowerCase(),t=m.map(e=>{var t;let a;if("team-role"===e.kind){let t=`team:${e.recipeId}:${e.roleId}`,a=e.recipeName||e.recipeId,r=e.roleName?`${e.roleName} (${e.roleId})`:e.roleId;return{id:t,label:`${a} → ${r}`,roleId:e.roleId,displayName:e.roleName||`${a} ${e.roleId}`,haystack:`${e.recipeId} ${e.recipeName||""} ${e.roleId} ${e.roleName||""}`.toLowerCase()}}let r=`agent:${e.recipeId}`,s=e.recipeName||e.recipeId,i=e.description?` — ${e.description}`:"";return{id:r,label:`${s} (agent recipe: ${e.recipeId})${i}`,roleId:((a=(t=e.recipeId).split("/").pop()||t).split("-").slice(-1)[0]||a).toLowerCase().replace(/[^a-z0-9_-]+/g,"-"),displayName:s,haystack:`${e.recipeId} ${e.recipeName||""} ${e.description||""}`.toLowerCase()}});return(e?t.filter(t=>t.haystack.includes(e)):t).slice().sort((e,t)=>e.label.localeCompare(t.label)).map(({haystack:e,...t})=>t)},[m,g]),M=(0,s.useMemo)(()=>Object.values(y),[y]),D=a.trim(),L=(0,s.useMemo)(()=>e?D?v(D)?D.endsWith("-team")?"taken"===S.state?`Team id is already taken: ${D}`:null:"Team id must end with -team.":"Invalid team id. Use lowercase letters/numbers with - or _ (2-63 chars).":"Team id is required.":null,[e,D,S.state]),A=(0,s.useMemo)(()=>{let e=new Map;for(let t of M){let a=String(t.roleId??"").trim();if(!a){e.set(t.agentId,"Role id is required.");continue}v(a)||e.set(t.agentId,"Invalid role id (lowercase letters/numbers with - or _).")}return e},[M]),E=!L&&"checking"!==S.state&&"unknown"!==S.state&&M.length>0&&0===A.size;return(0,s.useEffect)(()=>{e&&d(M)},[e,M,d]),(0,s.useEffect)(()=>{if(!e)return;let t=!1,a=setTimeout(async()=>{if(!D||!(v(D)&&D.endsWith("-team")))return void T({state:"unknown"});T({state:"checking"});let e=await (0,n.fetchJsonWithStatus)(`/api/ids/check?kind=team&id=${encodeURIComponent(D)}`,{cache:"no-store"});if(!t){if(!e.ok)return void T({state:"unknown"});if(e.data.ok&&!0===e.data.available)return void T({state:"available"});T({state:"taken",reason:e.data.reason})}},250);return()=>{t=!0,clearTimeout(a)}},[e,D]),(0,s.useEffect)(()=>{if(!e||!E)return;let t=!1,a=setTimeout(async()=>{let e=D.endsWith("-team")?D.slice(0,-5):D,a=await (0,n.fetchJsonWithStatus)("/api/recipes/custom-team",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dryRun:!0,recipeId:e,teamId:D,roles:M.map(e=>({roleId:e.roleId,displayName:e.displayName}))})});if(!t){if(!a.ok){I(a.error),w(null),N(null);return}if(!a.data.ok){I(a.data.error||"Failed to generate preview"),w(null),N(null);return}I(null),w("string"==typeof a.data.md?a.data.md:null),N("string"==typeof a.data.filePath?a.data.filePath:null)}},250);return()=>{t=!0,clearTimeout(a)}},[e,E,D,M]),(0,t.jsxs)(p,{open:e,title:"Create custom team",recipeId:"(new recipe)",recipeName:"Custom Team",error:l||x,busy:i,canConfirm:E,onClose:o,onConfirm:c,confirmLabel:"Create team",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team id"}),(0,t.jsx)("input",{value:a,onChange:e=>r(e.target.value.toLowerCase().replace(/\s+/g,"-")),placeholder:"e.g. my-team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0}),L?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:L}):null,!L&&D?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["checking"===S.state?"Checking availability…":null,"available"===S.state?"Available.":null]}):null]}),(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Select agents"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"MVP: this creates new team roles that mirror the selected agents' names. You can edit the resulting team recipe later."}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("input",{value:g,onChange:e=>f(e.target.value),placeholder:"Search local roles/agents (recipe id, name, role)",className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"}),(0,t.jsxs)("div",{className:"mt-3 max-h-[220px] overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3",children:[x?(0,t.jsx)("div",{className:"text-sm text-red-300",children:x}):null,x||0!==$.length?null:(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"No local roles/agents found."}),!x&&$.length?(0,t.jsx)("div",{className:"space-y-2",children:$.map(e=>{let a=!!y[e.id];return(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:t=>{let a={...y};t.target.checked?a[e.id]={agentId:e.id,roleId:e.roleId,displayName:e.displayName}:delete a[e.id],b(a)}}),(0,t.jsx)("span",{className:"min-w-0 break-words",children:e.label})]},e.id)})}):null]})]})]}),M.length?(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Role mapping"}),(0,t.jsx)("div",{className:"mt-3 space-y-3",children:M.map(e=>{let a=A.get(e.agentId);return(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3",children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.agentId}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Role id"}),(0,t.jsx)("input",{value:e.roleId,onChange:t=>{b(a=>({...a,[e.agentId]:{...a[e.agentId],roleId:t.target.value}}))},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),a?(0,t.jsx)("div",{className:"mt-1 text-xs text-red-300",children:a}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Display name"}),(0,t.jsx)("input",{value:e.displayName,onChange:t=>{b(a=>({...a,[e.agentId]:{...a[e.agentId],displayName:t.target.value}}))},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]})]},e.agentId)})})]}):null,(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Preview"}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Generated recipe preview (best-effort). This is what will be written to",(0,t.jsx)("code",{className:"ml-1",children:"~/.openclaw/workspace/recipes/<teamId>.md"}),"."]}),E&&C?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:C}):null,E&&j?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Target path: ",(0,t.jsx)("code",{children:j})]}):null,(0,t.jsx)("pre",{className:"mt-3 max-h-[260px] overflow-auto whitespace-pre-wrap rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-3 text-xs text-[color:var(--ck-text-secondary)]",children:E?k||"(Loading preview…)":"(Select a valid team id and at least one agent to preview.)"})]})]})}function y({open:e,recipeId:a,recipeName:r,agentId:i,setAgentId:l,agentName:o,setAgentName:c,existingRecipeIds:d,existingAgentIds:m,busy:u,error:h,onClose:g,onConfirm:v}){var f,y;let[b,k]=(0,s.useState)(!1),[w,j]=(0,s.useState)(null),{effectiveId:N}=x({open:e,name:o,setName:c,id:i,setId:l,idTouched:b,setIdTouched:k}),C=String(N??"").trim(),I=(0,s.useMemo)(()=>e?C?d.includes(C)?{state:"taken",reason:"recipe-id-collision"}:m.includes(C)?{state:"taken",reason:"agent-exists"}:null:{state:"empty"}:{state:"empty"},[e,C,d,m]),S=I??w??{state:"available"};return(0,s.useEffect)(()=>{if(!e||null!==I)return;let t=setTimeout(()=>{(async()=>{j({state:"checking"});try{let e=await (0,n.fetchJson)(`/api/ids/check?kind=agent&id=${encodeURIComponent(C)}`,{cache:"no-store"});e.available?j({state:"available"}):j({state:"taken",reason:e.reason})}catch{j({state:"available"})}})()},250);return()=>clearTimeout(t)},[e,I,C]),(0,t.jsxs)(p,{open:e,title:"Create agent",recipeId:a,recipeName:r,error:h,busy:u,canConfirm:!!N.trim()&&"taken"!==S.state&&"checking"!==S.state,onClose:g,onConfirm:v,confirmLabel:"Create agent",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Agent name"}),(0,t.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"e.g. Crypto Onchain",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Agent id"}),(0,t.jsx)("input",{value:N,onChange:e=>{k(!0),l(e.target.value)},placeholder:"e.g. crypto-onchain",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)] "+("available"===(f=S.state)?"border-emerald-400/50":"taken"===f?"border-red-400/60":"border-white/10")}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"taken"===(y=S.state)?"That id is already taken.":"available"===y?"Id is available.":"This will scaffold ~/.openclaw/workspace/agents/<agentId> and add the agent to config."})]})]})}var b=e.i(54510),k=e.i(82310);function w({title:e,items:r,onDelete:s,onCreateTeam:i,onCreateAgent:l,installedAgentIds:o}){return(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:e}),0===r.length?(0,t.jsx)("div",{className:"mt-3 ck-glass px-4 py-3 text-sm text-[color:var(--ck-text-secondary)]",children:"None yet."}):(0,t.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:r.map(e=>{var r;let n="agent"===e.kind&&o.includes(e.id),c=n?`/agents/${encodeURIComponent(e.id)}`:`/recipes/${encodeURIComponent(e.id)}`,d=(r=e.source,n?"Edit agent":"builtin"===r?"View recipe":"Edit recipe");return(0,t.jsxs)("div",{className:"ck-glass flex flex-col gap-3 px-4 py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium text-[color:var(--ck-text-primary)] whitespace-normal break-words",children:e.name}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id})," • ",e.kind," • ",e.source]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["team"===e.kind&&i?(0,t.jsx)("button",{type:"button",onClick:()=>i(e),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create team"}):null,"agent"===e.kind&&l?(0,t.jsx)("button",{type:"button",onClick:()=>l(e),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create agent"}):null,(0,t.jsx)(a.default,{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",href:c,children:d}),s?(0,t.jsx)("button",{type:"button",onClick:()=>s(e.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Delete"}):null]})]},`${e.source}:${e.id}`)})})]})}function j({builtin:e,customTeamRecipes:a,customAgentRecipes:i,installedAgentIds:l,initialOpenCustomTeam:u=!1}){let x=(0,m.useToast)(),[h,p]=(0,s.useState)(!1),[v,j]=(0,s.useState)(1),N=(0,r.useRouter)(),[C,I]=(0,s.useState)(!1),[S,T]=(0,s.useState)(""),[$,M]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),[A,E]=(0,s.useState)(!1),[O,R]=(0,s.useState)(null),[P,W]=(0,s.useState)(""),[J,B]=(0,s.useState)(!0),[F,U]=(0,s.useState)(!1),[z,K]=(0,s.useState)(null),[q,_]=(0,s.useState)(!1),[G,V]=(0,s.useState)(null),[Y,H]=(0,s.useState)(""),[Q,X]=(0,s.useState)(""),[Z,ee]=(0,s.useState)(!1),[et,ea]=(0,s.useState)(null),[er,es]=(0,s.useState)(u),[ei,el]=(0,s.useState)(""),[eo,en]=(0,s.useState)(!1),[ec,ed]=(0,s.useState)(null),[em,eu]=(0,s.useState)([]),ex=e=>{T(e),L(null),I(!0)},eh=e=>{R(e),W(""),B(!0),K(null),E(!0)},ep=e=>{V(e),H(""),X(""),ea(null),_(!0)};async function eg(){M(!0),L(null);try{let e=await (0,n.fetchJsonWithStatus)("/api/recipes/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:S})});if(!e.ok){if(409===e.status)return void L(e.error);throw Error(e.error)}if(!e.data.ok)return void L(e.data.error??"Delete failed");x.push({kind:"success",message:`Deleted recipe: ${S}`}),I(!1),window.location.reload()}catch(e){x.push({kind:"error",message:(0,k.errorMessage)(e)})}finally{M(!1)}}async function ev(e){let t=e?.timeoutMs??3e4;return await c(async()=>{try{return!!(await fetch("/healthz",{cache:"no-store"})).ok||null}catch{return null}},{timeoutMs:t})??!1}async function ef(e,t){let a=t?.timeoutMs??3e4;return await c(async()=>{try{let[t,a]=await Promise.all([fetch("/api/recipes",{cache:"no-store"}),fetch(`/api/teams/meta?teamId=${encodeURIComponent(e)}`,{cache:"no-store"})]),r=await t.json(),s=(Array.isArray(r.recipes)?r.recipes:[]).some(t=>String(t.id??"")===e&&"team"===String(t.kind??"")),i=await a.json(),l=!!(a.ok&&i.ok&&!i.missing);return!!s&&!!l||null}catch{return null}},{timeoutMs:a})??!1}async function ey(e,t,a){let r=await (0,n.fetchJsonWithStatus)("/api/teams/meta",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,recipeId:t,recipeName:a})});if(!r.ok)throw Error(r.error);if(!r.data.ok)throw Error(r.data.error||"Failed to attach team meta")}async function eb(e){let{kind:t,recipeId:a,teamId:r,agentId:s,name:i,cronInstallChoice:l,setBusy:o,setError:n,setModalOpen:c,setOverlayOpen:m,setOverlayStep:u,successMessage:h,navigateTo:p,waitBeforeNavigate:g}=e;o(!0),n(null),c(!1),m(!0),u(1);let v=null;try{let{res:e,json:o}=await (0,d.fetchScaffold)("team"===t?{kind:"team",recipeId:a,teamId:r,cronInstallChoice:l}:{kind:"agent",recipeId:a,agentId:s,name:i});if(!e.ok||!o.ok)throw Error(String(o.error||("team"===t?"Create team failed":"Create agent failed")));u(2),v=setTimeout(()=>{u(e=>e<3?3:e)},2e4);let n="string"==typeof o.stderr?o.stderr:"";if(/Failed to start CLI:/i.test(n)||/\bError: /i.test(n))throw Error(n.trim()||"Scaffold failed");if(/Restart required:/i.test(n)){u(3);try{await fetch("/api/gateway/restart",{method:"POST"})}catch{}await ev({timeoutMs:6e4})}g&&await g(),v&&clearTimeout(v),x.push({kind:"success",message:h}),c(!1),N.push(p),setTimeout(()=>m(!1),500)}catch(t){v&&clearTimeout(v),m(!1);let e=(0,k.errorMessage)(t);n(e),x.push({kind:"error",message:e})}finally{o(!1)}}async function ek(){let e=function(e,t){if(!e)return null;let a=t.trim();return a?a.endsWith("-team")?a===e.id?`Team id cannot be the same as the recipe id (${e.id}). Choose a new team id.`:null:"Team id must end with -team.":"Team id is required."}(O,P);if(e)return void K(e);if(!O)return;let t=P.trim();await eb({kind:"team",recipeId:O.id,teamId:t,cronInstallChoice:J?"yes":"no",setBusy:U,setError:K,setModalOpen:E,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created team: ${t}`,navigateTo:`/teams/${encodeURIComponent(t)}`,waitBeforeNavigate:()=>ef(t,{timeoutMs:6e4})})}async function ew(){if(!G)return;let e=Y.trim();e?e===G.id?ea(`Agent id cannot be the same as the recipe id (${G.id}). Choose a new agent id.`):await eb({kind:"agent",recipeId:G.id,agentId:e,name:Q.trim()||void 0,setBusy:ee,setError:ea,setModalOpen:_,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created agent: ${e}`,navigateTo:`/agents/${encodeURIComponent(e)}`}):ea("Agent id is required.")}async function ej(){let e=ei.trim();if(!e)return void ed("Team id is required.");let t=e.endsWith("-team")?e.slice(0,-5):e;if(!t)return void ed("Team id is invalid.");if(em.length<1)return void ed("Select at least one agent.");ed(null);try{en(!0);let a=await (0,n.fetchJsonWithStatus)("/api/recipes/custom-team",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({recipeId:t,teamId:e,roles:em.map(e=>({roleId:e.roleId,displayName:e.displayName}))})});if(en(!1),!a.ok)throw Error(a.error);if(!a.data.ok)throw Error(a.data.error||"Failed to create custom team recipe");await eb({kind:"team",recipeId:t,teamId:e,cronInstallChoice:"no",setBusy:en,setError:ed,setModalOpen:es,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created team: ${e}`,navigateTo:`/teams/${encodeURIComponent(e)}`,waitBeforeNavigate:async()=>{await ey(e,t,"Custom Team"),await ef(e,{timeoutMs:6e4})}})}catch(t){en(!1);let e=(0,k.errorMessage)(t);ed(e),x.push({kind:"error",message:e})}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{open:h,step:v,onDismiss:()=>{p(!1)}}),(0,t.jsxs)("div",{className:"mt-8 space-y-10",children:[(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Custom recipes"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Workspace recipes (editable) — stored under ",(0,t.jsx)("code",{className:"font-mono",children:"~/.openclaw/workspace/recipes/"}),"."]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{el(""),eu([]),ed(null),es(!0)},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create custom team"})]}),(0,t.jsxs)("div",{className:"mt-4 space-y-8",children:[(0,t.jsx)(w,{title:`Teams (${a.length})`,items:a,onDelete:ex,onCreateTeam:eh,installedAgentIds:l}),(0,t.jsx)(w,{title:`Agents (${i.length})`,items:i,onDelete:ex,onCreateAgent:ep,installedAgentIds:l})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Builtin recipes"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:"Bundled recipes shipped with the plugin."}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(w,{title:`All (${e.length})`,items:e,onCreateTeam:eh,onCreateAgent:ep,installedAgentIds:l})})]})]}),(0,t.jsx)(b.DeleteRecipeModal,{open:C,recipeId:S,busy:$,error:D,onClose:()=>I(!1),onConfirm:eg}),(0,t.jsx)(f,{open:er,teamId:ei,setTeamId:el,busy:eo,error:ec,onRolesChange:eu,onClose:()=>es(!1),onConfirm:ej}),(0,t.jsx)(g,{open:A,recipeId:O?.id??"",recipeName:O?.name??"",teamId:P,setTeamId:W,installCron:J,setInstallCron:B,busy:F,error:z,onClose:()=>E(!1),onConfirm:ek}),(0,t.jsx)(y,{open:q,recipeId:G?.id??"",recipeName:G?.name??"",agentId:Y,setAgentId:H,agentName:Q,setAgentName:X,existingRecipeIds:[...e,...a,...i].map(e=>e.id),existingAgentIds:l,busy:Z,error:et,onClose:()=>_(!1),onConfirm:ew})]})}e.s(["default",()=>j],44321)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(18050),a=e.i(74080);function r({open:e,onClose:r,title:s,children:i,error:l,confirmLabel:o,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:u}){if(!e)return null;let x=m??!1,h=x&&n?n:o,p="confirmation-modal-title";return(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:r,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,l?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:r,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||x,onClick:c,className:u??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>r])},54510,e=>{"use strict";var t=e.i(18050),a=e.i(44355);function r({open:e,onClose:r,title:s,entityLabel:i,bodyText:l,onConfirm:o,busy:n,error:c}){return(0,t.jsx)(a.ConfirmationModal,{open:e,onClose:r,title:s,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:o,busy:n,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",l]})})}function s(e){return function(a){let s=a[e.entityLabelKey];return(0,t.jsx)(r,{open:a.open,onClose:a.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:a.onConfirm,busy:a.busy,error:a.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),l=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),o=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,o,"DeleteTeamModal",0,l],54510)},92236,e=>{"use strict";async function t(e){let t=await fetch("/api/scaffold",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...e,applyConfig:!0,overwrite:!1})}),a=await t.json();return{res:t,json:a}}e.s(["fetchScaffold",()=>t])},56460,e=>{"use strict";function t(e,a=80){let r=String(e??"").toLowerCase().trim(),s=Math.min(r.length,2*a),i="",l=!1;for(let e=0;e<s;e++){let t=r[e];t>="a"&&t<="z"||t>="0"&&t<="9"?(i+=t,l=!1):" "!==t&&"-"!==t&&"_"!==t||l||(i+="-",l=!0)}for(;i.startsWith("-");)i=i.slice(1);for(;i.endsWith("-");)i=i.slice(0,-1);return i.slice(0,a)}e.s(["slugifyId",()=>t])},44321,e=>{"use strict";var t=e.i(18050),a=e.i(22016),r=e.i(18566),s=e.i(71645),i=e.i(74080);let l={1:"Ordering team…",2:"Cooking up agents…",3:"Serving them up hot…"};function o({open:e,step:a,onDismiss:r}){return e?(0,i.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[9999]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none"}),r?(0,t.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),r()},className:"fixed right-4 top-4 z-[10000] rounded-full border border-white/10 bg-[color:var(--ck-bg-glass)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":"Dismiss loading overlay",title:"Dismiss",children:"Esc"}):null,(0,t.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-6 sm:p-10",children:(0,t.jsxs)("div",{className:"w-full max-w-2xl rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("div",{className:"text-2xl font-semibold text-[color:var(--ck-text-primary)]",children:"Claw Kitchen"}),(0,t.jsx)("div",{className:"mt-3 text-base text-[color:var(--ck-text-secondary)]",children:"Hang tight — we’re updating your OpenClaw install."}),(0,t.jsx)("div",{className:"mt-8 space-y-4 text-base",children:[1,2,3].map(e=>{let r=e===a,s=e<a;return(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"h-4 w-4 rounded-full "+(s?"bg-emerald-400":r?"bg-[var(--ck-accent-red)] animate-pulse":"bg-white/20")}),(0,t.jsx)("div",{className:s?"text-[color:var(--ck-text-secondary)] line-through":"text-[color:var(--ck-text-primary)]",children:l[e]})]},e)})})]})})]}),document.body):null}var n=e.i(42771);async function c(e,t){let a=t.intervalMs??500,r=Date.now();for(;Date.now()-r<t.timeoutMs;){let t=await e();if(null!==t)return t;await new Promise(e=>setTimeout(e,a))}return null}var d=e.i(92236),m=e.i(76972),u=e.i(56460);function x(e){let{open:t,name:a,setName:r,id:i,setId:l,idTouched:o,setIdTouched:n,slugify:c=u.slugifyId}=e,d=(0,s.useMemo)(()=>c(a),[a,c]),m=o?i:d;return(0,s.useEffect)(()=>{t&&(o||l(d))},[d,t,o,l]),(0,s.useEffect)(()=>{t||(n(!1),r(""),l(""))},[t,n,r,l]),{derivedId:d,effectiveId:m}}var h=e.i(44355);function p({open:e,title:a,recipeId:r,recipeName:s,children:i,error:l,busy:o,canConfirm:n,onClose:c,onConfirm:d,confirmLabel:m}){return(0,t.jsxs)(h.ConfirmationModal,{open:e,onClose:c,title:a,error:l,confirmLabel:m,confirmBusyLabel:"Creating…",confirmDisabled:!n,busy:o,onConfirm:d,children:[(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Create a new ",a.toLowerCase().replace("create ","")," from recipe"," ",(0,t.jsx)("code",{className:"font-mono",children:r}),s?(0,t.jsxs)(t.Fragment,{children:[" ","(",(0,t.jsx)("span",{className:"font-medium",children:s}),")"]}):null,"."]}),i]})}function g({open:e,recipeId:a,recipeName:r,teamId:i,setTeamId:l,installCron:o,setInstallCron:n,busy:c,error:d,onClose:m,onConfirm:u}){let[h,g]=(0,s.useState)(""),[v,f]=(0,s.useState)(!1),{effectiveId:y}=x({open:e,name:h,setName:g,id:i,setId:l,idTouched:v,setIdTouched:f});return(0,t.jsxs)(p,{open:e,title:"Create team",recipeId:a,recipeName:r,error:d,busy:c,canConfirm:!!y.trim(),onClose:m,onConfirm:u,confirmLabel:"Create team",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team name"}),(0,t.jsx)("input",{value:h,onChange:e=>g(e.target.value),placeholder:"e.g. Crypto Team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team id"}),(0,t.jsx)("input",{value:y,onChange:e=>{f(!0),l(e.target.value)},placeholder:"e.g. my-team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"This will scaffold ~/.openclaw/workspace-<teamId> and add the team to config."})]}),(0,t.jsxs)("label",{className:"mt-4 flex items-center gap-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:o,onChange:e=>n(e.target.checked)}),"Install cron jobs from this recipe"]})]})}function v(e){return/^[a-z0-9][a-z0-9_-]{1,62}$/.test(e)}function f({open:e,teamId:a,setTeamId:r,busy:i,error:l,onClose:o,onConfirm:c,onRolesChange:d}){let[m,u]=(0,s.useState)([]),[x,h]=(0,s.useState)(null),[g,f]=(0,s.useState)(""),[y,b]=(0,s.useState)({}),[k,w]=(0,s.useState)(null),[j,N]=(0,s.useState)(null),[C,I]=(0,s.useState)(null);(0,s.useEffect)(()=>{let e=!1;return(async()=>{let t=await (0,n.fetchJsonWithStatus)("/api/recipes/local-agent-catalog",{cache:"no-store"});if(!e){if(!t.ok)return h(t.error||"Failed to load local agent catalog");if(!t.data.ok)return h(t.data.error||"Failed to load local agent catalog");u(Array.isArray(t.data.items)?t.data.items:[])}})(),()=>{e=!0}},[]);let[S,T]=(0,s.useState)({state:"unknown"}),$=(0,s.useMemo)(()=>{let e=g.trim().toLowerCase(),t=m.map(e=>{var t;let a;if("team-role"===e.kind){let t=`team:${e.recipeId}:${e.roleId}`,a=e.recipeName||e.recipeId,r=e.roleName?`${e.roleName} (${e.roleId})`:e.roleId;return{id:t,label:`${a} → ${r}`,roleId:e.roleId,displayName:e.roleName||`${a} ${e.roleId}`,haystack:`${e.recipeId} ${e.recipeName||""} ${e.roleId} ${e.roleName||""}`.toLowerCase()}}let r=`agent:${e.recipeId}`,s=e.recipeName||e.recipeId,i=e.description?` — ${e.description}`:"";return{id:r,label:`${s} (agent recipe: ${e.recipeId})${i}`,roleId:((a=(t=e.recipeId).split("/").pop()||t).split("-").slice(-1)[0]||a).toLowerCase().replace(/[^a-z0-9_-]+/g,"-"),displayName:s,haystack:`${e.recipeId} ${e.recipeName||""} ${e.description||""}`.toLowerCase()}});return(e?t.filter(t=>t.haystack.includes(e)):t).slice().sort((e,t)=>e.label.localeCompare(t.label)).map(({haystack:e,...t})=>t)},[m,g]),M=(0,s.useMemo)(()=>Object.values(y),[y]),D=a.trim(),L=(0,s.useMemo)(()=>e?D?v(D)?D.endsWith("-team")?"taken"===S.state?`Team id is already taken: ${D}`:null:"Team id must end with -team.":"Invalid team id. Use lowercase letters/numbers with - or _ (2-63 chars).":"Team id is required.":null,[e,D,S.state]),A=(0,s.useMemo)(()=>{let e=new Map;for(let t of M){let a=String(t.roleId??"").trim();if(!a){e.set(t.agentId,"Role id is required.");continue}v(a)||e.set(t.agentId,"Invalid role id (lowercase letters/numbers with - or _).")}return e},[M]),E=!L&&"checking"!==S.state&&"unknown"!==S.state&&M.length>0&&0===A.size;return(0,s.useEffect)(()=>{e&&d(M)},[e,M,d]),(0,s.useEffect)(()=>{if(!e)return;let t=!1,a=setTimeout(async()=>{if(!D||!(v(D)&&D.endsWith("-team")))return void T({state:"unknown"});T({state:"checking"});let e=await (0,n.fetchJsonWithStatus)(`/api/ids/check?kind=team&id=${encodeURIComponent(D)}`,{cache:"no-store"});if(!t){if(!e.ok)return void T({state:"unknown"});if(e.data.ok&&!0===e.data.available)return void T({state:"available"});T({state:"taken",reason:e.data.reason})}},250);return()=>{t=!0,clearTimeout(a)}},[e,D]),(0,s.useEffect)(()=>{if(!e||!E)return;let t=!1,a=setTimeout(async()=>{let e=D.endsWith("-team")?D.slice(0,-5):D,a=await (0,n.fetchJsonWithStatus)("/api/recipes/custom-team",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dryRun:!0,recipeId:e,teamId:D,roles:M.map(e=>({roleId:e.roleId,displayName:e.displayName}))})});if(!t){if(!a.ok){I(a.error),w(null),N(null);return}if(!a.data.ok){I(a.data.error||"Failed to generate preview"),w(null),N(null);return}I(null),w("string"==typeof a.data.md?a.data.md:null),N("string"==typeof a.data.filePath?a.data.filePath:null)}},250);return()=>{t=!0,clearTimeout(a)}},[e,E,D,M]),(0,t.jsxs)(p,{open:e,title:"Create custom team",recipeId:"(new recipe)",recipeName:"Custom Team",error:l||x,busy:i,canConfirm:E,onClose:o,onConfirm:c,confirmLabel:"Create team",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Team id"}),(0,t.jsx)("input",{value:a,onChange:e=>r(e.target.value.toLowerCase().replace(/\s+/g,"-")),placeholder:"e.g. my-team",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0}),L?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:L}):null,!L&&D?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["checking"===S.state?"Checking availability…":null,"available"===S.state?"Available.":null]}):null]}),(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Select agents"}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"MVP: this creates new team roles that mirror the selected agents' names. You can edit the resulting team recipe later."}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("input",{value:g,onChange:e=>f(e.target.value),placeholder:"Search local roles/agents (recipe id, name, role)",className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"}),(0,t.jsxs)("div",{className:"mt-3 max-h-[220px] overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3",children:[x?(0,t.jsx)("div",{className:"text-sm text-red-300",children:x}):null,x||0!==$.length?null:(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"No local roles/agents found."}),!x&&$.length?(0,t.jsx)("div",{className:"space-y-2",children:$.map(e=>{let a=!!y[e.id];return(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:t=>{let a={...y};t.target.checked?a[e.id]={agentId:e.id,roleId:e.roleId,displayName:e.displayName}:delete a[e.id],b(a)}}),(0,t.jsx)("span",{className:"min-w-0 break-words",children:e.label})]},e.id)})}):null]})]})]}),M.length?(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Role mapping"}),(0,t.jsx)("div",{className:"mt-3 space-y-3",children:M.map(e=>{let a=A.get(e.agentId);return(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3",children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.agentId}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Role id"}),(0,t.jsx)("input",{value:e.roleId,onChange:t=>{b(a=>({...a,[e.agentId]:{...a[e.agentId],roleId:t.target.value}}))},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),a?(0,t.jsx)("div",{className:"mt-1 text-xs text-red-300",children:a}):null]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Display name"}),(0,t.jsx)("input",{value:e.displayName,onChange:t=>{b(a=>({...a,[e.agentId]:{...a[e.agentId],displayName:t.target.value}}))},className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]})]},e.agentId)})})]}):null,(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Preview"}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Generated recipe preview (best-effort). This is what will be written to",(0,t.jsx)("code",{className:"ml-1",children:"~/.openclaw/workspace/recipes/<teamId>.md"}),"."]}),E&&C?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:C}):null,E&&j?(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["Target path: ",(0,t.jsx)("code",{children:j})]}):null,(0,t.jsx)("pre",{className:"mt-3 max-h-[260px] overflow-auto whitespace-pre-wrap rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-3 text-xs text-[color:var(--ck-text-secondary)]",children:E?k||"(Loading preview…)":"(Select a valid team id and at least one agent to preview.)"})]})]})}function y({open:e,recipeId:a,recipeName:r,agentId:i,setAgentId:l,agentName:o,setAgentName:c,existingRecipeIds:d,existingAgentIds:m,busy:u,error:h,onClose:g,onConfirm:v}){var f,y;let[b,k]=(0,s.useState)(!1),[w,j]=(0,s.useState)(null),{effectiveId:N}=x({open:e,name:o,setName:c,id:i,setId:l,idTouched:b,setIdTouched:k}),C=String(N??"").trim(),I=(0,s.useMemo)(()=>e?C?d.includes(C)?{state:"taken",reason:"recipe-id-collision"}:m.includes(C)?{state:"taken",reason:"agent-exists"}:null:{state:"empty"}:{state:"empty"},[e,C,d,m]),S=I??w??{state:"available"};return(0,s.useEffect)(()=>{if(!e||null!==I)return;let t=setTimeout(()=>{(async()=>{j({state:"checking"});try{let e=await (0,n.fetchJson)(`/api/ids/check?kind=agent&id=${encodeURIComponent(C)}`,{cache:"no-store"});e.available?j({state:"available"}):j({state:"taken",reason:e.reason})}catch{j({state:"available"})}})()},250);return()=>clearTimeout(t)},[e,I,C]),(0,t.jsxs)(p,{open:e,title:"Create agent",recipeId:a,recipeName:r,error:h,busy:u,canConfirm:!!N.trim()&&"taken"!==S.state&&"checking"!==S.state,onClose:g,onConfirm:v,confirmLabel:"Create agent",children:[(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Agent name"}),(0,t.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"e.g. Crypto Onchain",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Agent id"}),(0,t.jsx)("input",{value:N,onChange:e=>{k(!0),l(e.target.value)},placeholder:"e.g. crypto-onchain",className:"mt-2 w-full rounded-[var(--ck-radius-sm)] border bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)] "+("available"===(f=S.state)?"border-emerald-400/50":"taken"===f?"border-red-400/60":"border-white/10")}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"taken"===(y=S.state)?"That id is already taken.":"available"===y?"Id is available.":"This will scaffold ~/.openclaw/workspace/agents/<agentId> and add the agent to config."})]})]})}var b=e.i(54510),k=e.i(82310);function w({title:e,items:r,onDelete:s,onCreateTeam:i,onCreateAgent:l,installedAgentIds:o}){return(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:e}),0===r.length?(0,t.jsx)("div",{className:"mt-3 ck-glass px-4 py-3 text-sm text-[color:var(--ck-text-secondary)]",children:"None yet."}):(0,t.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2",children:r.map(e=>{var r;let n="agent"===e.kind&&o.includes(e.id),c=n?`/agents/${encodeURIComponent(e.id)}`:`/recipes/${encodeURIComponent(e.id)}`,d=(r=e.source,n?"Edit agent":"builtin"===r?"View recipe":"Edit recipe");return(0,t.jsxs)("div",{className:"ck-glass flex flex-col gap-3 px-4 py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium text-[color:var(--ck-text-primary)] whitespace-normal break-words",children:e.name}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.id})," • ",e.kind," • ",e.source]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:["team"===e.kind&&i?(0,t.jsx)("button",{type:"button",onClick:()=>i(e),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create team"}):null,"agent"===e.kind&&l?(0,t.jsx)("button",{type:"button",onClick:()=>l(e),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create agent"}):null,(0,t.jsx)(a.default,{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",href:c,children:d}),s?(0,t.jsx)("button",{type:"button",onClick:()=>s(e.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Delete"}):null]})]},`${e.source}:${e.id}`)})})]})}function j({builtin:e,customTeamRecipes:a,customAgentRecipes:i,installedAgentIds:l,initialOpenCustomTeam:u=!1}){let x=(0,m.useToast)(),[h,p]=(0,s.useState)(!1),[v,j]=(0,s.useState)(1),N=(0,r.useRouter)(),[C,I]=(0,s.useState)(!1),[S,T]=(0,s.useState)(""),[$,M]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),[A,E]=(0,s.useState)(!1),[O,R]=(0,s.useState)(null),[P,W]=(0,s.useState)(""),[J,B]=(0,s.useState)(!0),[F,U]=(0,s.useState)(!1),[z,K]=(0,s.useState)(null),[q,_]=(0,s.useState)(!1),[G,V]=(0,s.useState)(null),[Y,H]=(0,s.useState)(""),[Q,X]=(0,s.useState)(""),[Z,ee]=(0,s.useState)(!1),[et,ea]=(0,s.useState)(null),[er,es]=(0,s.useState)(u),[ei,el]=(0,s.useState)(""),[eo,en]=(0,s.useState)(!1),[ec,ed]=(0,s.useState)(null),[em,eu]=(0,s.useState)([]),ex=e=>{T(e),L(null),I(!0)},eh=e=>{R(e),W(""),B(!0),K(null),E(!0)},ep=e=>{V(e),H(""),X(""),ea(null),_(!0)};async function eg(){M(!0),L(null);try{let e=await (0,n.fetchJsonWithStatus)("/api/recipes/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:S})});if(!e.ok){if(409===e.status)return void L(e.error);throw Error(e.error)}if(!e.data.ok)return void L(e.data.error??"Delete failed");x.push({kind:"success",message:`Deleted recipe: ${S}`}),I(!1),window.location.reload()}catch(e){x.push({kind:"error",message:(0,k.errorMessage)(e)})}finally{M(!1)}}async function ev(e){let t=e?.timeoutMs??3e4;return await c(async()=>{try{return!!(await fetch("/healthz",{cache:"no-store"})).ok||null}catch{return null}},{timeoutMs:t})??!1}async function ef(e,t){let a=t?.timeoutMs??3e4;return await c(async()=>{try{let[t,a]=await Promise.all([fetch("/api/recipes",{cache:"no-store"}),fetch(`/api/teams/meta?teamId=${encodeURIComponent(e)}`,{cache:"no-store"})]),r=await t.json(),s=(Array.isArray(r.recipes)?r.recipes:[]).some(t=>String(t.id??"")===e&&"team"===String(t.kind??"")),i=await a.json(),l=!!(a.ok&&i.ok&&!i.missing);return!!s&&!!l||null}catch{return null}},{timeoutMs:a})??!1}async function ey(e,t,a){let r=await (0,n.fetchJsonWithStatus)("/api/teams/meta",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,recipeId:t,recipeName:a})});if(!r.ok)throw Error(r.error);if(!r.data.ok)throw Error(r.data.error||"Failed to attach team meta")}async function eb(e){let{kind:t,recipeId:a,teamId:r,agentId:s,name:i,cronInstallChoice:l,setBusy:o,setError:n,setModalOpen:c,setOverlayOpen:m,setOverlayStep:u,successMessage:h,navigateTo:p,waitBeforeNavigate:g}=e;o(!0),n(null),c(!1),m(!0),u(1);let v=null;try{let{res:e,json:o}=await (0,d.fetchScaffold)("team"===t?{kind:"team",recipeId:a,teamId:r,cronInstallChoice:l}:{kind:"agent",recipeId:a,agentId:s,name:i});if(!e.ok||!o.ok)throw Error(String(o.error||("team"===t?"Create team failed":"Create agent failed")));u(2),v=setTimeout(()=>{u(e=>e<3?3:e)},2e4);let n="string"==typeof o.stderr?o.stderr:"";if(/Failed to start CLI:/i.test(n)||/\bError: /i.test(n))throw Error(n.trim()||"Scaffold failed");if(/Restart required:/i.test(n)){u(3);try{await fetch("/api/gateway/restart",{method:"POST"})}catch{}await ev({timeoutMs:6e4})}g&&await g(),v&&clearTimeout(v),x.push({kind:"success",message:h}),c(!1),N.push(p),setTimeout(()=>m(!1),500)}catch(t){v&&clearTimeout(v),m(!1);let e=(0,k.errorMessage)(t);n(e),x.push({kind:"error",message:e})}finally{o(!1)}}async function ek(){let e=function(e,t){if(!e)return null;let a=t.trim();return a?a.endsWith("-team")?a===e.id?`Team id cannot be the same as the recipe id (${e.id}). Choose a new team id.`:null:"Team id must end with -team.":"Team id is required."}(O,P);if(e)return void K(e);if(!O)return;let t=P.trim();await eb({kind:"team",recipeId:O.id,teamId:t,cronInstallChoice:J?"yes":"no",setBusy:U,setError:K,setModalOpen:E,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created team: ${t}`,navigateTo:`/teams/${encodeURIComponent(t)}`,waitBeforeNavigate:()=>ef(t,{timeoutMs:6e4})})}async function ew(){if(!G)return;let e=Y.trim();e?e===G.id?ea(`Agent id cannot be the same as the recipe id (${G.id}). Choose a new agent id.`):await eb({kind:"agent",recipeId:G.id,agentId:e,name:Q.trim()||void 0,setBusy:ee,setError:ea,setModalOpen:_,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created agent: ${e}`,navigateTo:`/agents/${encodeURIComponent(e)}`}):ea("Agent id is required.")}async function ej(){let e=ei.trim();if(!e)return void ed("Team id is required.");let t=e.endsWith("-team")?e.slice(0,-5):e;if(!t)return void ed("Team id is invalid.");if(em.length<1)return void ed("Select at least one agent.");ed(null);try{en(!0);let a=await (0,n.fetchJsonWithStatus)("/api/recipes/custom-team",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({recipeId:t,teamId:e,roles:em.map(e=>({roleId:e.roleId,displayName:e.displayName}))})});if(en(!1),!a.ok)throw Error(a.error);if(!a.data.ok)throw Error(a.data.error||"Failed to create custom team recipe");await eb({kind:"team",recipeId:t,teamId:e,cronInstallChoice:"no",setBusy:en,setError:ed,setModalOpen:es,setOverlayOpen:p,setOverlayStep:j,successMessage:`Created team: ${e}`,navigateTo:`/teams/${encodeURIComponent(e)}`,waitBeforeNavigate:async()=>{await ey(e,t,"Custom Team"),await ef(e,{timeoutMs:6e4})}})}catch(t){en(!1);let e=(0,k.errorMessage)(t);ed(e),x.push({kind:"error",message:e})}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{open:h,step:v,onDismiss:()=>{p(!1)}}),(0,t.jsxs)("div",{className:"mt-8 space-y-10",children:[(0,t.jsxs)("section",{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Custom recipes"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Workspace recipes (editable) — stored under ",(0,t.jsx)("code",{className:"font-mono",children:"~/.openclaw/workspace/recipes/"}),"."]})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{el(""),eu([]),ed(null),es(!0)},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15",children:"Create custom team"})]}),(0,t.jsxs)("div",{className:"mt-4 space-y-8",children:[(0,t.jsx)(w,{title:`Teams (${a.length})`,items:a,onDelete:ex,onCreateTeam:eh,installedAgentIds:l}),(0,t.jsx)(w,{title:`Agents (${i.length})`,items:i,onDelete:ex,onCreateAgent:ep,installedAgentIds:l})]})]}),(0,t.jsxs)("section",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Builtin recipes"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:"Bundled recipes shipped with the plugin."}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(w,{title:`All (${e.length})`,items:e,onCreateTeam:eh,onCreateAgent:ep,installedAgentIds:l})})]})]}),(0,t.jsx)(b.DeleteRecipeModal,{open:C,recipeId:S,busy:$,error:D,onClose:()=>I(!1),onConfirm:eg}),(0,t.jsx)(f,{open:er,teamId:ei,setTeamId:el,busy:eo,error:ec,onRolesChange:eu,onClose:()=>es(!1),onConfirm:ej}),(0,t.jsx)(g,{open:A,recipeId:O?.id??"",recipeName:O?.name??"",teamId:P,setTeamId:W,installCron:J,setInstallCron:B,busy:F,error:z,onClose:()=>E(!1),onConfirm:ek}),(0,t.jsx)(y,{open:q,recipeId:G?.id??"",recipeName:G?.name??"",agentId:Y,setAgentId:H,agentName:Q,setAgentName:X,existingRecipeIds:[...e,...a,...i].map(e=>e.id),existingAgentIds:l,busy:Z,error:et,onClose:()=>_(!1),onConfirm:ew})]})}e.s(["default",()=>j],44321)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function s(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>s])},41588,e=>{"use strict";var s=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function s(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>s])},41588,e=>{"use strict";var s=e.i(18050),t=e.i(22016),a=e.i(82310),l=e.i(42771),r=e.i(18566),n=e.i(71645);async function c(){try{return{goals:(await (0,l.fetchJson)("/api/goals",{cache:"no-store"})).goals??[],error:null}}catch(e){return{goals:[],error:(0,a.errorMessage)(e)}}}function i({children:e}){return(0,s.jsx)("span",{className:"rounded-full bg-[color:var(--ck-bg-glass)] px-2 py-0.5 text-xs text-[color:var(--ck-text-secondary)]",children:e})}function o(){let[e,l]=(0,n.useState)(null),[o,d]=(0,n.useState)(null),x=((0,r.useSearchParams)().get("team")??"").trim(),[m,u]=(0,n.useState)("all");async function h(){l(null),d(null);try{let{goals:e,error:s}=await c();d(s),l(s?[]:e)}catch(e){d((0,a.errorMessage)(e)),l([])}}(0,n.useEffect)(()=>{let e=!1;return(async()=>{try{let{goals:s,error:t}=await c();if(e)return;d(t),l(t?[]:s)}catch(s){if(e)return;d((0,a.errorMessage)(s)),l([])}})(),()=>{e=!0}},[]);let g=(0,n.useMemo)(()=>{let s=e??[];return(x&&(s=s.filter(e=>Array.isArray(e.teams)&&e.teams.includes(x))),"all"===m)?s:s.filter(e=>e.status===m)},[e,m,x]),p=(0,n.useMemo)(()=>{let s=e??[],t={all:s.length,active:0,planned:0,done:0};for(let e of s)"active"===e.status?t.active+=1:"done"===e.status?t.done+=1:t.planned+=1;return t},[e]);function v(e){return(0,s.jsx)(t.default,{href:`/goals/${encodeURIComponent(e.id)}`,className:"block ck-glass p-5 transition hover:bg-[color:var(--ck-bg-glass)]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate text-base font-semibold text-[color:var(--ck-text-primary)]",children:e.title}),(0,s.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,s.jsx)("span",{className:"font-mono",children:e.id}),e.updatedAt?` • updated ${new Date(e.updatedAt).toLocaleString()}`:""]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(i,{children:e.status}),e.teams?.slice(0,3).map(e=>(0,s.jsx)(i,{children:e},e)),e.tags?.slice(0,3).map(e=>(0,s.jsxs)(i,{children:["#",e]},e))]})]})},e.id)}return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Goals"}),(0,s.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,s.jsx)("code",{className:"font-mono",children:"~/.openclaw/workspace/notes/goals/"}),x?(0,s.jsxs)(s.Fragment,{children:[" ","• filtered by team ",(0,s.jsx)("code",{className:"font-mono",children:x})]}):null]})]}),(0,s.jsx)(t.default,{href:"/goals/new",className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white",children:"Create goal"})]}),(0,s.jsx)("div",{className:"ck-glass p-4",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("label",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Status"}),(0,s.jsxs)("select",{className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-transparent px-2 py-1 text-sm",value:m,onChange:e=>u(e.target.value),children:[(0,s.jsxs)("option",{value:"all",children:["All (",p.all,")"]}),(0,s.jsxs)("option",{value:"active",children:["Active (",p.active,")"]}),(0,s.jsxs)("option",{value:"planned",children:["Planned (",p.planned,")"]}),(0,s.jsxs)("option",{value:"done",children:["Done (",p.done,")"]})]}),(0,s.jsx)("button",{className:"ml-auto text-sm font-medium hover:underline",onClick:()=>void h(),children:"Refresh"})]})}),o?(0,s.jsx)("div",{className:"ck-glass p-4 text-sm text-red-300",children:o}):null,null==e&&(0,s.jsx)("div",{className:"ck-glass p-6 text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}),null!=e&&0===g.length&&(0,s.jsxs)("div",{className:"ck-glass p-6",children:[(0,s.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"No goals yet."}),(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(t.default,{href:"/goals/new",className:"text-sm font-medium hover:underline",children:"Create your first goal →"})})]}),null!=e&&g.length>0&&"all"!==m&&(0,s.jsx)("div",{className:"space-y-3",children:g.map(v)}),null!=e&&g.length>0&&"all"===m&&(0,s.jsx)("div",{className:"space-y-8",children:["active","planned","done"].map(e=>{let t=g.filter(s=>s.status===e);return t.length?(0,s.jsxs)("section",{children:[(0,s.jsx)("div",{className:"mb-2 flex items-end justify-between",children:(0,s.jsxs)("h2",{className:"text-sm font-semibold tracking-wide text-[color:var(--ck-text-secondary)] uppercase",children:[e," (",t.length,")"]})}),(0,s.jsx)("div",{className:"space-y-3",children:t.map(v)})]},e):null})})]})}e.s(["default",()=>o])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(43476),a=e.i(74080);function s({open:e,onClose:s,title:r,children:i,error:l,confirmLabel:n,confirmBusyLabel:o,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:x}){if(!e)return null;let u=m??!1,h=u&&o?o:n,g="confirmation-modal-title";return(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:s,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":g,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:g,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:r}),i,l?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||u,onClick:c,className:x??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>s])},54510,e=>{"use strict";var t=e.i(43476),a=e.i(44355);function s({open:e,onClose:s,title:r,entityLabel:i,bodyText:l,onConfirm:n,busy:o,error:c}){return(0,t.jsx)(a.ConfirmationModal,{open:e,onClose:s,title:r,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:n,busy:o,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[r," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",l]})})}function r(e){return function(a){let r=a[e.entityLabelKey];return(0,t.jsx)(s,{open:a.open,onClose:a.onClose,title:e.title,entityLabel:r,bodyText:e.bodyText,onConfirm:a.onConfirm,busy:a.busy,error:a.error})}}let i=r({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),l=r({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),n=r({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),o=r({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,o,"DeleteRecipeModal",0,n,"DeleteTeamModal",0,l],54510)},72532,e=>{"use strict";var t=e.i(43476);function a({title:e,files:a,loading:s,showOptionalFiles:r,onShowOptionalChange:i,selectedFileName:l,onSelectFile:n,renderItemExtra:o}){let c=r?a:a.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:e}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:r,onChange:e=>i(e.target.checked)}),"Show optional"]})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"Default view hides optional missing files to reduce noise."}),(0,t.jsxs)("ul",{className:"mt-3 space-y-1",children:[s?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,c.map(e=>{var a;let s;return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(e.name),className:(a=e.name,s="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",l===a?`${s} bg-white/10 text-[color:var(--ck-text-primary)]`:`${s} text-[color:var(--ck-text-secondary)] hover:bg-white/5`),children:[(0,t.jsx)("span",{className:e.required?"text-[color:var(--ck-text-primary)]":"text-[color:var(--ck-text-secondary)]",children:e.name}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.required?"required":"optional"}),e.missing?(0,t.jsx)("span",{className:"ml-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"missing"}):null]}),o?.(e)]})},e.name)})]})]})}e.s(["FileListWithOptionalToggle",()=>a])},88810,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(18566),r=e.i(82310),i=e.i(42771),l=e.i(54510),n=e.i(72532);function o({name:e,emoji:a,theme:s,avatar:r,saving:i,returnTo:l,onNameChange:n,onEmojiChange:o,onThemeChange:c,onAvatarChange:d,onSave:m,router:x}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Identity"}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Name"}),(0,t.jsx)("input",{value:e,onChange:e=>n(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Emoji"}),(0,t.jsx)("input",{value:a,onChange:e=>o(e.target.value),placeholder:"🦞",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Theme"}),(0,t.jsx)("input",{value:s,onChange:e=>c(e.target.value),placeholder:"warm, sharp, calm",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Avatar"}),(0,t.jsx)("input",{value:r,onChange:e=>d(e.target.value),placeholder:"avatars/openclaw.png",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("button",{disabled:i,onClick:m,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] active:bg-[var(--ck-accent-red-active)] disabled:opacity-50",children:i?"Saving…":"Save"}),l?(0,t.jsx)("button",{disabled:i,onClick:async()=>{await m(),x.push(l)},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15 disabled:opacity-50",children:"Save & return"}):null]})]})}function c({model:e,saving:a,onModelChange:s,onSave:r}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Config"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Thin slice: edit the configured model id for this agent (writes to OpenClaw config)."}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Model"}),(0,t.jsx)("input",{value:e,onChange:e=>s(e.target.value),placeholder:"openai/gpt-5.2",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("button",{disabled:a,onClick:r,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:a?"Saving…":"Save config"})})]})}function d({agentId:e,skillsList:a,availableSkills:s,skillsLoading:r,selectedSkill:i,installingSkill:l,skillError:n,skillMsg:o,onSelectedSkillChange:c,onInstallSkill:d}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Skills"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Skills installed in this ",(0,t.jsx)("strong",{children:"agent"})," workspace (",(0,t.jsx)("code",{children:"skills/"}),"). If you want a skill available to all agents, add it at the team level."]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Installed"}),(0,t.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-[color:var(--ck-text-secondary)]",children:[r&&(0,t.jsx)("li",{children:"Loading…"}),!r&&a.length>0&&a.map(e=>(0,t.jsx)("li",{children:e},e)),!r&&!a.length&&(0,t.jsx)("li",{children:"None installed."})]})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Add a skill"}),(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,t.jsx)("select",{value:i,onChange:e=>c(e.target.value),className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",disabled:l||!s.length,children:s.length?s.map(e=>(0,t.jsx)("option",{value:e,children:e},e)):(0,t.jsx)("option",{value:"",children:"No skills found"})}),(0,t.jsx)("button",{type:"button",disabled:l||!i,onClick:()=>void d(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:l?"Adding…":"Add"})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:n}),!n&&o&&(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-emerald-400/30 bg-emerald-500/10 p-3 text-sm text-emerald-100",children:o}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["This uses ",(0,t.jsxs)("code",{children:["openclaw recipes install-skill <skill> --agent-id ",e," --yes"]}),"."]})]})]})}function m({agentFiles:e,agentFilesLoading:a,showOptionalFiles:s,fileName:r,fileContent:i,loadingFile:l,saving:o,fileError:c,onShowOptionalChange:d,onLoadFile:m,onFileContentChange:x,onSaveFile:u,onCreateMissingFile:h}){return(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsx)(n.FileListWithOptionalToggle,{title:"Agent files",files:e,loading:a,showOptionalFiles:s,onShowOptionalChange:d,selectedFileName:r,onSelectFile:m,renderItemExtra:e=>e.missing?(0,t.jsx)("button",{type:"button",disabled:o,onClick:()=>void h(e.name),className:"shrink-0 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"Create"}):null}),(0,t.jsxs)("div",{className:"ck-glass-strong p-4 lg:col-span-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:["Edit: ",r]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[l?(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Loading…"}):null,(0,t.jsx)("button",{disabled:o,onClick:u,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:o?"Saving…":"Save file"})]})]}),c?(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:c}):null,(0,t.jsx)("textarea",{value:i,onChange:e=>x(e.target.value),className:"mt-3 h-[55vh] w-full resize-none rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]",spellCheck:!1})]})]})}async function x(e,t){t.setAgentFilesLoading(!0),t.setSkillsLoading(!0);try{let[a,s,r]=await (0,i.fetchAll)([`/api/agents/files?agentId=${encodeURIComponent(e)}`,`/api/agents/skills?agentId=${encodeURIComponent(e)}`,"/api/skills/available"]),l=[];try{let e=await a.json();if(a.ok&&e.ok){let a=Array.isArray(e.files)?e.files:[];t.setAgentFiles(a.map(e=>({name:String(e.name??""),missing:!!e.missing,required:!!e.required,rationale:"string"==typeof e.rationale?e.rationale:void 0})))}}catch{}try{let e=await s.json();s.ok&&e.ok&&(l=Array.isArray(e.skills)?e.skills:[],t.setSkillsList(l))}catch{}try{let e=await r.json();if(r.ok&&e.ok){let a=Array.isArray(e.skills)?e.skills:[];t.setAvailableSkills(a);let s=a.find(e=>!l.includes(e));t.setSelectedSkill(s??a[0]??"")}}catch{}}finally{t.setAgentFilesLoading(!1),t.setSkillsLoading(!1)}}function u({agentId:e,returnTo:n}){let u=(0,s.useRouter)(),[h,g]=(0,a.useState)(null),[p,v]=(0,a.useState)(!0),[k,b]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),[j,w]=(0,a.useState)(""),[N,S]=(0,a.useState)(""),[C,T]=(0,a.useState)(""),[A,L]=(0,a.useState)(""),[I,E]=(0,a.useState)(!1),[O,F]=(0,a.useState)(!1),[M,D]=(0,a.useState)(null),[U,R]=(0,a.useState)("identity"),[J,$]=(0,a.useState)(""),[K,P]=(0,a.useState)(""),[q,B]=(0,a.useState)(""),[G,W]=(0,a.useState)(""),[Y,z]=(0,a.useState)(""),[H,V]=(0,a.useState)([]),[Q,X]=(0,a.useState)([]),[Z,_]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(""),[ea,es]=(0,a.useState)(!1),[er,ei]=(0,a.useState)([]),[el,en]=(0,a.useState)(!1),[eo,ec]=(0,a.useState)(!1),[ed,em]=(0,a.useState)("SOUL.md"),[ex,eu]=(0,a.useState)(""),eh=e.includes("-")?e.split("-").slice(0,-1).join("-"):"";async function eg(e){b(!0),w("");try{let t=await e();w(t)}catch(e){w((0,r.errorMessage)(e))}finally{b(!1)}}async function ep(){await eg(async()=>(await (0,i.fetchJson)("/api/agents/identity",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:J,emoji:K,theme:q,avatar:G})}),"Saved identity via openclaw agents set-identity"))}async function ev(){await eg(async()=>(await (0,i.fetchJson)("/api/agents/update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,patch:{model:Y}})}),"Saved agent config (model) and restarted gateway"))}async function ek(t){em(t),eu(""),f(!0),S("");try{let a=await (0,i.fetchJson)(`/api/agents/file?agentId=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{cache:"no-store"});if(!a.ok)throw Error("Failed to load file");eu(String(a.content??""))}catch(e){S((0,r.errorMessage)(e))}finally{f(!1)}}async function eb(){b(!0),S("");try{if(!(await (0,i.fetchJson)("/api/agents/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:ed,content:ex})})).ok)throw Error("Failed to save file");try{let t=await (0,i.fetchJson)(`/api/agents/files?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.files)&&ei(t.files)}catch{}}catch(e){S((0,r.errorMessage)(e))}finally{b(!1)}}async function ey(e){em(e),S(""),eu(function(e){switch(e){case"SOUL.md":return"# SOUL.md\n\n";case"AGENTS.md":return"# AGENTS.md\n\n";case"TOOLS.md":return"# TOOLS.md\n\n";case"STATUS.md":return"# STATUS.md\n\n- (empty)\n";case"NOTES.md":return"# NOTES.md\n\n- (empty)\n";case"IDENTITY.md":return"# IDENTITY.md\n\n- **Name:**\n- **Creature:**\n- **Vibe:**\n- **Emoji:**\n- **Avatar:**\n";case"USER.md":return"# USER.md\n\n";case"HEARTBEAT.md":return"# HEARTBEAT.md\n\n# Keep this file empty (or with only comments) to skip heartbeat API calls.\n";default:return""}}(e)),await eb()}async function ef(){F(!0),D(null),w("");try{await (0,i.fetchJson)(`/api/agents/${encodeURIComponent(e)}`,{method:"DELETE"}),window.location.href="/"}catch(e){D((0,r.errorMessage)(e)),F(!1)}}return(0,a.useEffect)(()=>{(async()=>{v(!0),w("");try{let t=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),a=(Array.isArray(t.agents)?t.agents:[]).find(t=>t.id===e)??null;g(a),$(a?.identityName??""),z(a?.model??""),v(!1),x(e,{setAgentFiles:ei,setSkillsList:V,setAvailableSkills:X,setSelectedSkill:et,setAgentFilesLoading:en,setSkillsLoading:_})}catch(e){w((0,r.errorMessage)(e))}finally{v(!1)}})()},[e]),(0,a.useEffect)(()=>{if("files"!==U||!er.length)return;let e=er.some(e=>e.name===ed),t=er[0]?.name,a=e?ed:t;a&&(a!==ed&&(em(a),eu("")),ex||ek(a))},[U,e,er.length]),p?(0,t.jsx)("div",{className:"ck-glass mx-auto max-w-4xl p-6",children:"Loading…"}):h?(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-4xl p-6 sm:p-8",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Agent editor"}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[h.id,h.isDefault?" • default":"",h.model?` • ${h.model}`:""]})]}),(0,t.jsx)("button",{type:"button",disabled:k,onClick:()=>{D(null),E(!0)},className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-2 text-sm font-medium text-[color:var(--ck-accent-red)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)] disabled:opacity-50",children:"Delete agent"})]}),h.workspace?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Workspace: ",h.workspace]}):null,eh?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Team: ",eh]}):null,j?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3 text-sm text-[color:var(--ck-text-primary)]",children:j}):null,(0,t.jsx)("div",{className:"mt-6 flex flex-wrap gap-2",children:[{id:"identity",label:"Identity"},{id:"config",label:"Config"},{id:"skills",label:"Skills"},{id:"files",label:"Files"}].map(e=>(0,t.jsx)("button",{onClick:()=>R(e.id),className:U===e.id?"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]":"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:e.label},e.id))}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-4",children:["identity"===U&&(0,t.jsx)(o,{name:J,emoji:K,theme:q,avatar:G,saving:k,returnTo:n,onNameChange:$,onEmojiChange:P,onThemeChange:B,onAvatarChange:W,onSave:ep,router:u}),"config"===U&&(0,t.jsx)(c,{model:Y,saving:k,onModelChange:z,onSave:ev}),"skills"===U&&(0,t.jsx)(d,{agentId:e,skillsList:H,availableSkills:Q,skillsLoading:Z,selectedSkill:ee,installingSkill:ea,skillError:A,skillMsg:C,onSelectedSkillChange:et,onInstallSkill:async()=>{es(!0),T(""),L("");try{await (0,i.fetchJson)("/api/agents/skills/install",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,skill:ee})}),T(`Installed skill: ${ee}`);try{let t=await (0,i.fetchJson)(`/api/agents/skills?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.skills)&&V(t.skills)}catch{}}catch(e){L((0,r.errorMessage)(e))}finally{es(!1)}}}),"files"===U&&(0,t.jsx)(m,{agentFiles:er,agentFilesLoading:el,showOptionalFiles:eo,fileName:ed,fileContent:ex,loadingFile:y,saving:k,fileError:N,onShowOptionalChange:ec,onLoadFile:ek,onFileContentChange:eu,onSaveFile:eb,onCreateMissingFile:ey})]}),(0,t.jsx)(l.DeleteAgentModal,{open:I,agentId:e,busy:O,error:M,onClose:()=>E(!1),onConfirm:()=>void ef()})]}):(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-4xl p-6",children:["Agent not found: ",e]})}e.s(["default",()=>u],88810)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(18050),a=e.i(74080);function s({open:e,onClose:s,title:r,children:i,error:l,confirmLabel:n,confirmBusyLabel:o,onConfirm:c,confirmDisabled:d,busy:m,confirmButtonClassName:x}){if(!e)return null;let u=m??!1,h=u&&o?o:n,g="confirmation-modal-title";return(0,a.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:s,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":g,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:g,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:r}),i,l?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:l}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:s,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||u,onClick:c,className:x??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:h})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>s])},54510,e=>{"use strict";var t=e.i(18050),a=e.i(44355);function s({open:e,onClose:s,title:r,entityLabel:i,bodyText:l,onConfirm:n,busy:o,error:c}){return(0,t.jsx)(a.ConfirmationModal,{open:e,onClose:s,title:r,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:n,busy:o,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[r," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",l]})})}function r(e){return function(a){let r=a[e.entityLabelKey];return(0,t.jsx)(s,{open:a.open,onClose:a.onClose,title:e.title,entityLabel:r,bodyText:e.bodyText,onConfirm:a.onConfirm,busy:a.busy,error:a.error})}}let i=r({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),l=r({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),n=r({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),o=r({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,o,"DeleteRecipeModal",0,n,"DeleteTeamModal",0,l],54510)},72532,e=>{"use strict";var t=e.i(18050);function a({title:e,files:a,loading:s,showOptionalFiles:r,onShowOptionalChange:i,selectedFileName:l,onSelectFile:n,renderItemExtra:o}){let c=r?a:a.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:e}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:r,onChange:e=>i(e.target.checked)}),"Show optional"]})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"Default view hides optional missing files to reduce noise."}),(0,t.jsxs)("ul",{className:"mt-3 space-y-1",children:[s?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,c.map(e=>{var a;let s;return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(e.name),className:(a=e.name,s="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",l===a?`${s} bg-white/10 text-[color:var(--ck-text-primary)]`:`${s} text-[color:var(--ck-text-secondary)] hover:bg-white/5`),children:[(0,t.jsx)("span",{className:e.required?"text-[color:var(--ck-text-primary)]":"text-[color:var(--ck-text-secondary)]",children:e.name}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.required?"required":"optional"}),e.missing?(0,t.jsx)("span",{className:"ml-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"missing"}):null]}),o?.(e)]})},e.name)})]})]})}e.s(["FileListWithOptionalToggle",()=>a])},88810,e=>{"use strict";var t=e.i(18050),a=e.i(71645),s=e.i(18566),r=e.i(82310),i=e.i(42771),l=e.i(54510),n=e.i(72532);function o({name:e,emoji:a,theme:s,avatar:r,saving:i,returnTo:l,onNameChange:n,onEmojiChange:o,onThemeChange:c,onAvatarChange:d,onSave:m,router:x}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Identity"}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Name"}),(0,t.jsx)("input",{value:e,onChange:e=>n(e.target.value),className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Emoji"}),(0,t.jsx)("input",{value:a,onChange:e=>o(e.target.value),placeholder:"🦞",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Theme"}),(0,t.jsx)("input",{value:s,onChange:e=>c(e.target.value),placeholder:"warm, sharp, calm",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Avatar"}),(0,t.jsx)("input",{value:r,onChange:e=>d(e.target.value),placeholder:"avatars/openclaw.png",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("button",{disabled:i,onClick:m,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] active:bg-[var(--ck-accent-red-active)] disabled:opacity-50",children:i?"Saving…":"Save"}),l?(0,t.jsx)("button",{disabled:i,onClick:async()=>{await m(),x.push(l)},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-white/10 active:bg-white/15 disabled:opacity-50",children:"Save & return"}):null]})]})}function c({model:e,saving:a,onModelChange:s,onSave:r}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Config"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"Thin slice: edit the configured model id for this agent (writes to OpenClaw config)."}),(0,t.jsx)("label",{className:"mt-3 block text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Model"}),(0,t.jsx)("input",{value:e,onChange:e=>s(e.target.value),placeholder:"openai/gpt-5.2",className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]"}),(0,t.jsx)("div",{className:"mt-3",children:(0,t.jsx)("button",{disabled:a,onClick:r,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:a?"Saving…":"Save config"})})]})}function d({agentId:e,skillsList:a,availableSkills:s,skillsLoading:r,selectedSkill:i,installingSkill:l,skillError:n,skillMsg:o,onSelectedSkillChange:c,onInstallSkill:d}){return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:"Skills"}),(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:["Skills installed in this ",(0,t.jsx)("strong",{children:"agent"})," workspace (",(0,t.jsx)("code",{children:"skills/"}),"). If you want a skill available to all agents, add it at the team level."]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Installed"}),(0,t.jsxs)("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-[color:var(--ck-text-secondary)]",children:[r&&(0,t.jsx)("li",{children:"Loading…"}),!r&&a.length>0&&a.map(e=>(0,t.jsx)("li",{children:e},e)),!r&&!a.length&&(0,t.jsx)("li",{children:"None installed."})]})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/15 p-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Add a skill"}),(0,t.jsxs)("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,t.jsx)("select",{value:i,onChange:e=>c(e.target.value),className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",disabled:l||!s.length,children:s.length?s.map(e=>(0,t.jsx)("option",{value:e,children:e},e)):(0,t.jsx)("option",{value:"",children:"No skills found"})}),(0,t.jsx)("button",{type:"button",disabled:l||!i,onClick:()=>void d(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:l?"Adding…":"Add"})]}),n&&(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:n}),!n&&o&&(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-emerald-400/30 bg-emerald-500/10 p-3 text-sm text-emerald-100",children:o}),(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["This uses ",(0,t.jsxs)("code",{children:["openclaw recipes install-skill <skill> --agent-id ",e," --yes"]}),"."]})]})]})}function m({agentFiles:e,agentFilesLoading:a,showOptionalFiles:s,fileName:r,fileContent:i,loadingFile:l,saving:o,fileError:c,onShowOptionalChange:d,onLoadFile:m,onFileContentChange:x,onSaveFile:u,onCreateMissingFile:h}){return(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsx)(n.FileListWithOptionalToggle,{title:"Agent files",files:e,loading:a,showOptionalFiles:s,onShowOptionalChange:d,selectedFileName:r,onSelectFile:m,renderItemExtra:e=>e.missing?(0,t.jsx)("button",{type:"button",disabled:o,onClick:()=>void h(e.name),className:"shrink-0 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-xs font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-50",children:"Create"}):null}),(0,t.jsxs)("div",{className:"ck-glass-strong p-4 lg:col-span-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:["Edit: ",r]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[l?(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Loading…"}):null,(0,t.jsx)("button",{disabled:o,onClick:u,className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] disabled:opacity-50",children:o?"Saving…":"Save file"})]})]}),c?(0,t.jsx)("div",{className:"mt-3 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:c}):null,(0,t.jsx)("textarea",{value:i,onChange:e=>x(e.target.value),className:"mt-3 h-[55vh] w-full resize-none rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-primary)]",spellCheck:!1})]})]})}async function x(e,t){t.setAgentFilesLoading(!0),t.setSkillsLoading(!0);try{let[a,s,r]=await (0,i.fetchAll)([`/api/agents/files?agentId=${encodeURIComponent(e)}`,`/api/agents/skills?agentId=${encodeURIComponent(e)}`,"/api/skills/available"]),l=[];try{let e=await a.json();if(a.ok&&e.ok){let a=Array.isArray(e.files)?e.files:[];t.setAgentFiles(a.map(e=>({name:String(e.name??""),missing:!!e.missing,required:!!e.required,rationale:"string"==typeof e.rationale?e.rationale:void 0})))}}catch{}try{let e=await s.json();s.ok&&e.ok&&(l=Array.isArray(e.skills)?e.skills:[],t.setSkillsList(l))}catch{}try{let e=await r.json();if(r.ok&&e.ok){let a=Array.isArray(e.skills)?e.skills:[];t.setAvailableSkills(a);let s=a.find(e=>!l.includes(e));t.setSelectedSkill(s??a[0]??"")}}catch{}}finally{t.setAgentFilesLoading(!1),t.setSkillsLoading(!1)}}function u({agentId:e,returnTo:n}){let u=(0,s.useRouter)(),[h,g]=(0,a.useState)(null),[p,v]=(0,a.useState)(!0),[k,b]=(0,a.useState)(!1),[y,f]=(0,a.useState)(!1),[j,w]=(0,a.useState)(""),[N,S]=(0,a.useState)(""),[C,T]=(0,a.useState)(""),[A,L]=(0,a.useState)(""),[I,E]=(0,a.useState)(!1),[O,F]=(0,a.useState)(!1),[M,D]=(0,a.useState)(null),[U,R]=(0,a.useState)("identity"),[J,$]=(0,a.useState)(""),[K,P]=(0,a.useState)(""),[q,B]=(0,a.useState)(""),[G,W]=(0,a.useState)(""),[Y,z]=(0,a.useState)(""),[H,V]=(0,a.useState)([]),[Q,X]=(0,a.useState)([]),[Z,_]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(""),[ea,es]=(0,a.useState)(!1),[er,ei]=(0,a.useState)([]),[el,en]=(0,a.useState)(!1),[eo,ec]=(0,a.useState)(!1),[ed,em]=(0,a.useState)("SOUL.md"),[ex,eu]=(0,a.useState)(""),eh=e.includes("-")?e.split("-").slice(0,-1).join("-"):"";async function eg(e){b(!0),w("");try{let t=await e();w(t)}catch(e){w((0,r.errorMessage)(e))}finally{b(!1)}}async function ep(){await eg(async()=>(await (0,i.fetchJson)("/api/agents/identity",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:J,emoji:K,theme:q,avatar:G})}),"Saved identity via openclaw agents set-identity"))}async function ev(){await eg(async()=>(await (0,i.fetchJson)("/api/agents/update",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,patch:{model:Y}})}),"Saved agent config (model) and restarted gateway"))}async function ek(t){em(t),eu(""),f(!0),S("");try{let a=await (0,i.fetchJson)(`/api/agents/file?agentId=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`,{cache:"no-store"});if(!a.ok)throw Error("Failed to load file");eu(String(a.content??""))}catch(e){S((0,r.errorMessage)(e))}finally{f(!1)}}async function eb(){b(!0),S("");try{if(!(await (0,i.fetchJson)("/api/agents/file",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,name:ed,content:ex})})).ok)throw Error("Failed to save file");try{let t=await (0,i.fetchJson)(`/api/agents/files?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.files)&&ei(t.files)}catch{}}catch(e){S((0,r.errorMessage)(e))}finally{b(!1)}}async function ey(e){em(e),S(""),eu(function(e){switch(e){case"SOUL.md":return"# SOUL.md\n\n";case"AGENTS.md":return"# AGENTS.md\n\n";case"TOOLS.md":return"# TOOLS.md\n\n";case"STATUS.md":return"# STATUS.md\n\n- (empty)\n";case"NOTES.md":return"# NOTES.md\n\n- (empty)\n";case"IDENTITY.md":return"# IDENTITY.md\n\n- **Name:**\n- **Creature:**\n- **Vibe:**\n- **Emoji:**\n- **Avatar:**\n";case"USER.md":return"# USER.md\n\n";case"HEARTBEAT.md":return"# HEARTBEAT.md\n\n# Keep this file empty (or with only comments) to skip heartbeat API calls.\n";default:return""}}(e)),await eb()}async function ef(){F(!0),D(null),w("");try{await (0,i.fetchJson)(`/api/agents/${encodeURIComponent(e)}`,{method:"DELETE"}),window.location.href="/"}catch(e){D((0,r.errorMessage)(e)),F(!1)}}return(0,a.useEffect)(()=>{(async()=>{v(!0),w("");try{let t=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),a=(Array.isArray(t.agents)?t.agents:[]).find(t=>t.id===e)??null;g(a),$(a?.identityName??""),z(a?.model??""),v(!1),x(e,{setAgentFiles:ei,setSkillsList:V,setAvailableSkills:X,setSelectedSkill:et,setAgentFilesLoading:en,setSkillsLoading:_})}catch(e){w((0,r.errorMessage)(e))}finally{v(!1)}})()},[e]),(0,a.useEffect)(()=>{if("files"!==U||!er.length)return;let e=er.some(e=>e.name===ed),t=er[0]?.name,a=e?ed:t;a&&(a!==ed&&(em(a),eu("")),ex||ek(a))},[U,e,er.length]),p?(0,t.jsx)("div",{className:"ck-glass mx-auto max-w-4xl p-6",children:"Loading…"}):h?(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-4xl p-6 sm:p-8",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Agent editor"}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-secondary)]",children:[h.id,h.isDefault?" • default":"",h.model?` • ${h.model}`:""]})]}),(0,t.jsx)("button",{type:"button",disabled:k,onClick:()=>{D(null),E(!0)},className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-2 text-sm font-medium text-[color:var(--ck-accent-red)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)] disabled:opacity-50",children:"Delete agent"})]}),h.workspace?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Workspace: ",h.workspace]}):null,eh?(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:["Team: ",eh]}):null,j?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 p-3 text-sm text-[color:var(--ck-text-primary)]",children:j}):null,(0,t.jsx)("div",{className:"mt-6 flex flex-wrap gap-2",children:[{id:"identity",label:"Identity"},{id:"config",label:"Config"},{id:"skills",label:"Skills"},{id:"files",label:"Files"}].map(e=>(0,t.jsx)("button",{onClick:()=>R(e.id),className:U===e.id?"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]":"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:e.label},e.id))}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-4",children:["identity"===U&&(0,t.jsx)(o,{name:J,emoji:K,theme:q,avatar:G,saving:k,returnTo:n,onNameChange:$,onEmojiChange:P,onThemeChange:B,onAvatarChange:W,onSave:ep,router:u}),"config"===U&&(0,t.jsx)(c,{model:Y,saving:k,onModelChange:z,onSave:ev}),"skills"===U&&(0,t.jsx)(d,{agentId:e,skillsList:H,availableSkills:Q,skillsLoading:Z,selectedSkill:ee,installingSkill:ea,skillError:A,skillMsg:C,onSelectedSkillChange:et,onInstallSkill:async()=>{es(!0),T(""),L("");try{await (0,i.fetchJson)("/api/agents/skills/install",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agentId:e,skill:ee})}),T(`Installed skill: ${ee}`);try{let t=await (0,i.fetchJson)(`/api/agents/skills?agentId=${encodeURIComponent(e)}`,{cache:"no-store"});t.ok&&Array.isArray(t.skills)&&V(t.skills)}catch{}}catch(e){L((0,r.errorMessage)(e))}finally{es(!1)}}}),"files"===U&&(0,t.jsx)(m,{agentFiles:er,agentFilesLoading:el,showOptionalFiles:eo,fileName:ed,fileContent:ex,loadingFile:y,saving:k,fileError:N,onShowOptionalChange:ec,onLoadFile:ek,onFileContentChange:eu,onSaveFile:eb,onCreateMissingFile:ey})]}),(0,t.jsx)(l.DeleteAgentModal,{open:I,agentId:e,busy:O,error:M,onClose:()=>E(!1),onConfirm:()=>void ef()})]}):(0,t.jsxs)("div",{className:"ck-glass mx-auto max-w-4xl p-6",children:["Agent not found: ",e]})}e.s(["default",()=>u],88810)}]);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},44355,e=>{"use strict";var t=e.i(18050),r=e.i(74080);function a({open:e,onClose:a,title:s,children:i,error:o,confirmLabel:l,confirmBusyLabel:n,onConfirm:c,confirmDisabled:d,busy:u,confirmButtonClassName:m}){if(!e)return null;let x=u??!1,p=x&&n?n:l,h="confirmation-modal-title";return(0,r.createPortal)((0,t.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:a,"aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":h,children:(0,t.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,t.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-glass-strong)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,t.jsx)("h2",{id:h,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:s}),i,o?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:o}):null,(0,t.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:a,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,t.jsx)("button",{type:"button",disabled:(d??!1)||x,onClick:c,className:m??"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:p})]})]})})})]}),document.body)}e.s(["ConfirmationModal",()=>a])},54510,e=>{"use strict";var t=e.i(18050),r=e.i(44355);function a({open:e,onClose:a,title:s,entityLabel:i,bodyText:o,onConfirm:l,busy:n,error:c}){return(0,t.jsx)(r.ConfirmationModal,{open:e,onClose:a,title:s,confirmLabel:"Delete",confirmBusyLabel:"Deleting…",onConfirm:l,busy:n,error:c??void 0,children:(0,t.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[s," ",(0,t.jsx)("code",{className:"font-mono",children:i}),"? ",o]})})}function s(e){return function(r){let s=r[e.entityLabelKey];return(0,t.jsx)(a,{open:r.open,onClose:r.onClose,title:e.title,entityLabel:s,bodyText:e.bodyText,onConfirm:r.onConfirm,busy:r.busy,error:r.error})}}let i=s({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),o=s({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),l=s({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),n=s({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});e.s(["DeleteAgentModal",0,i,"DeleteCronJobModal",0,n,"DeleteRecipeModal",0,l,"DeleteTeamModal",0,o],54510)},72532,e=>{"use strict";var t=e.i(18050);function r({title:e,files:r,loading:a,showOptionalFiles:s,onShowOptionalChange:i,selectedFileName:o,onSelectFile:l,renderItemExtra:n}){let c=s?r:r.filter(e=>e.required||!e.missing);return(0,t.jsxs)("div",{className:"ck-glass-strong p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:e}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("input",{type:"checkbox",checked:s,onChange:e=>i(e.target.checked)}),"Show optional"]})]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"Default view hides optional missing files to reduce noise."}),(0,t.jsxs)("ul",{className:"mt-3 space-y-1",children:[a?(0,t.jsx)("li",{className:"text-sm text-[color:var(--ck-text-secondary)]",children:"Loading…"}):null,c.map(e=>{var r;let a;return(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e.name),className:(r=e.name,a="w-full rounded-[var(--ck-radius-sm)] px-3 py-2 text-left text-sm",o===r?`${a} bg-white/10 text-[color:var(--ck-text-primary)]`:`${a} text-[color:var(--ck-text-secondary)] hover:bg-white/5`),children:[(0,t.jsx)("span",{className:e.required?"text-[color:var(--ck-text-primary)]":"text-[color:var(--ck-text-secondary)]",children:e.name}),(0,t.jsx)("span",{className:"ml-2 text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:e.required?"required":"optional"}),e.missing?(0,t.jsx)("span",{className:"ml-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"missing"}):null]}),n?.(e)]})},e.name)})]})]})}e.s(["FileListWithOptionalToggle",()=>r])},92140,e=>{"use strict";var t=e.i(18050),r=e.i(71645),a=e.i(22016),s=e.i(18566),i=e.i(42771),o=e.i(82310);function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}function n({teamId:e,llmTaskEnabled:n}){let c=(0,s.useRouter)(),[d,u]=(0,r.useState)([]),[m,x]=(0,r.useState)(!0),[p,h]=(0,r.useState)(!1),[f,v]=(0,r.useState)(""),[b,g]=(0,r.useState)(""),[w,y]=(0,r.useState)({}),[j,k]=(0,r.useState)({}),[N,C]=(0,r.useState)(""),[S,_]=(0,r.useState)(""),[I,P]=(0,r.useState)(null),[R,E]=(0,r.useState)(""),[O,$]=(0,r.useState)(""),[M,A]=(0,r.useState)(!1),T=(0,r.useCallback)(async t=>{let r=!!t?.quiet;v(""),r||x(!0);try{let t=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}`,{cache:"no-store"});if(!t.ok)throw Error("Failed to load workflows");let r=(Array.isArray(t.files)?t.files:[]).map(e=>e.endsWith(".workflow.json")?e.slice(0,-14):null).filter(e=>!!e);u(r.map(e=>({id:e,name:e})))}catch(e){v((0,o.errorMessage)(e))}finally{r||x(!1)}},[e]);async function z(){h(!0);try{await T({quiet:!0})}finally{h(!1)}}async function D(t){if(confirm(`Delete workflow “${t}”? This removes the .workflow.json file from the team workspace.`)){v("");try{let r=await (0,i.fetchJson)(`/api/teams/workflows?teamId=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok)throw Error(r.error||"Failed to delete workflow");await T({quiet:!0}),b===t&&(g(""),C(""),P(null))}catch(e){v((0,o.errorMessage)(e))}}}async function L(t){k(e=>({...e,[t]:!0})),E("");try{let r=await (0,i.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}`,{cache:"no-store"});if(!r.ok)throw Error(r.error||"Failed to load runs");let a=Array.isArray(r.runIds)?r.runIds.map(e=>String(e||"").trim()).filter(Boolean):Array.isArray(r.files)?r.files.map(e=>"string"==typeof e&&e.endsWith(".run.json")?e.slice(0,-9):null).filter(e=>!!e):[];y(e=>({...e,[t]:a}))}catch(e){E((0,o.errorMessage)(e)),y(e=>({...e,[t]:[]}))}finally{k(e=>({...e,[t]:!1}))}}async function U(t,r){_(t),C(r),P(null),E(""),$("");try{let a=await (0,i.fetchJson)(`/api/teams/workflow-runs?teamId=${encodeURIComponent(e)}&workflowId=${encodeURIComponent(t)}&runId=${encodeURIComponent(r)}`,{cache:"no-store"});if(!a.ok)throw Error(a.error||"Failed to load run");let s=l(a.run)?a.run:null;if(!s)throw Error("Invalid run format");P({id:String(s.id??r),status:"string"==typeof s.status?s.status:void 0,startedAt:"string"==typeof s.startedAt?s.startedAt:void 0,finishedAt:"string"==typeof s.finishedAt?String(s.finishedAt):void 0,meta:s.meta,memoryUsed:s.memoryUsed,approval:s.approval,raw:s})}catch(e){E((0,o.errorMessage)(e)),P(null)}}async function q(t){if(confirm(`Add workflow from template “${t}”?`)){v("");try{let r=await (0,i.fetchJson)("/api/teams/workflow-templates",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,templateId:t})});if(!r.ok)throw Error(r.error||"Failed to apply template");let a=String(r.workflowId??"").trim();if(!a)throw Error("Template applied but workflowId missing");await T({quiet:!0}),c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(a)}`)}catch(e){v((0,o.errorMessage)(e))}}}(0,r.useEffect)(()=>{T()},[T]);let B=(0,r.useMemo)(()=>{if(!I)return[];let e=I.memoryUsed??(l(I.meta)?I.meta.memoryUsed:void 0);return Array.isArray(e)?e.map(e=>l(e)?e:null).filter(Boolean).map(e=>({ts:String(e.ts??"").trim(),author:String(e.author??"").trim(),type:String(e.type??"").trim(),content:String(e.content??"").trim(),source:e.source})).filter(e=>e.ts&&e.author&&e.type&&e.content):[]},[I]);if(m)return(0,t.jsx)("div",{className:"ck-glass p-4",children:"Loading workflows…"});let F=!1===n?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-amber-500/30 bg-amber-500/10 p-4 text-sm",children:[(0,t.jsx)("div",{className:"font-medium text-amber-200",children:"LLM support is not enabled"}),(0,t.jsxs)("div",{className:"mt-1 text-[color:var(--ck-text-secondary)]",children:["Workflow LLM nodes require the optional built-in ",(0,t.jsx)("code",{className:"px-1",children:"llm-task"})," plugin."]}),(0,t.jsxs)("div",{className:"mt-2 text-[color:var(--ck-text-secondary)]",children:["Enable it with: ",(0,t.jsx)("code",{className:"px-1",children:"openclaw plugins enable llm-task"})," then run"," ",(0,t.jsx)("code",{className:"px-1",children:"openclaw gateway restart"}),"."]}),(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"If you’re doing a non-interactive install, keep this command in your setup docs as a fallback."})]}):null;return(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:"Workflows (file-first)"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:["Stored in ",(0,t.jsx)("code",{children:"shared-context/workflows/<id>.workflow.json"})," inside the team workspace."]}),F,(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-start gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{let t=`new-${Date.now()}`;c.push(`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(t)}?draft=1`)},className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)]",children:"Add workflow"}),(0,t.jsx)("button",{type:"button",onClick:()=>void q("marketing-cadence-v1"),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Add example template"}),(0,t.jsx)("button",{type:"button",onClick:z,disabled:p,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:p?"Refreshing…":"Refresh"})]})]}),f?(0,t.jsx)("div",{className:"mt-4 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-4 text-sm text-red-100",children:f}):null,0===d.length?(0,t.jsx)("p",{className:"mt-4 text-sm text-[color:var(--ck-text-secondary)]",children:"No workflows yet."}):(0,t.jsx)("ul",{className:"mt-4 divide-y divide-white/10 overflow-hidden rounded-[var(--ck-radius-sm)] border border-white/10",children:d.map(r=>{let s=b===r.id,i=w[r.id]??[],n=!!j[r.id];return(0,t.jsxs)("li",{className:"bg-white/5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[(0,t.jsxs)("button",{type:"button",onClick:async()=>{let e=s?"":r.id;g(e),C(""),P(null),E(""),e&&await L(e)},className:"min-w-0 flex-1 text-left",children:[(0,t.jsx)("div",{className:"truncate text-sm font-medium text-[color:var(--ck-text-primary)]",children:r.name||r.id}),(0,t.jsx)("div",{className:"truncate text-xs text-[color:var(--ck-text-tertiary)]",children:r.id}),(0,t.jsxs)("div",{className:"mt-1 text-[10px] text-[color:var(--ck-text-tertiary)]",children:["Click to ",s?"collapse":"expand"," run details"]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)(a.default,{href:`/teams/${encodeURIComponent(e)}/workflows/${encodeURIComponent(r.id)}`,className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-1.5 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Edit"}),(0,t.jsx)("button",{type:"button",onClick:()=>void D(r.id),className:"rounded-[var(--ck-radius-sm)] border border-[color:rgba(255,59,48,0.45)] bg-[color:rgba(255,59,48,0.08)] px-3 py-1.5 text-sm font-medium text-[color:var(--ck-accent-red)] transition-colors hover:bg-[color:rgba(255,59,48,0.12)]",children:"Delete"})]})]}),s?(0,t.jsxs)("div",{className:"border-t border-white/10 bg-black/20 px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Runs"}),(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void L(r.id),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:n?"Loading…":"Refresh runs"})]}),R?(0,t.jsx)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-red-400/30 bg-red-500/10 p-2 text-xs text-red-100",children:R}):null,(0,t.jsxs)("div",{className:"mt-2 grid grid-cols-1 gap-3 lg:grid-cols-2",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:i.length?(0,t.jsx)("div",{className:"space-y-1",children:i.slice(0,8).map(e=>{let a=N===e;return(0,t.jsx)("button",{type:"button",onClick:()=>void U(r.id,e),className:a?"w-full rounded-[var(--ck-radius-sm)] bg-white/10 px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-primary)]":"w-full rounded-[var(--ck-radius-sm)] px-2 py-1 text-left text-[11px] text-[color:var(--ck-text-secondary)] hover:bg-white/5",children:(0,t.jsx)("span",{className:"font-mono",children:e})},e)})}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"No runs yet."})}),(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-3",children:I?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Run detail"}),(0,t.jsxs)("div",{className:"mt-1 text-[11px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:I.id}),I.status?(0,t.jsxs)("span",{children:[" • ",I.status]}):null]})]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Approval"}),(()=>{let r=I.approval;if(!l(r))return(0,t.jsx)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:"(No approval info recorded.)"});let a=String(r.state??"").trim(),s="string"==typeof r.requestedAt?r.requestedAt:"",i="string"==typeof r.decidedAt?r.decidedAt:"",n="string"==typeof r.decidedBy?r.decidedBy:"",c="string"==typeof r.note?r.note:"",d=l(r.outbound)?r.outbound:null,u="pending"===a||"waiting_for_approval"===I.status;return(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2 text-[11px] text-[color:var(--ck-text-secondary)]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"state"}),": ",(0,t.jsx)("span",{className:"font-mono text-[color:var(--ck-text-primary)]",children:a||"(unknown)"})]}),s?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"requestedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:s})]}):null,i?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedAt"}),": ",(0,t.jsx)("span",{className:"font-mono",children:i})]}):null,n?(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-mono",children:"decidedBy"}),": ",(0,t.jsx)("span",{className:"font-mono",children:n})]}):null,c?(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:c}):null,d?(0,t.jsxs)("div",{className:"mt-2 rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px]",children:[(0,t.jsx)("div",{className:"text-[color:var(--ck-text-tertiary)]",children:"Outbound"}),(0,t.jsx)("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap",children:JSON.stringify(d,null,2)})]}):null]}),u?(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/20 p-2",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"approval note (optional)"}),(0,t.jsx)("textarea",{value:O,onChange:e=>$(e.target.value),rows:3,className:"mt-1 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",placeholder:"e.g. Ship it / please tweak hook"}),(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:[{action:"approve",label:"Approve"},{action:"request_changes",label:"Request changes"},{action:"cancel",label:"Cancel"}].map(r=>(0,t.jsx)("button",{type:"button",disabled:M,onClick:async()=>{if(S&&N&&confirm(`${r.label} run ${N}?`)){A(!0),E("");try{let t=await fetch("/api/teams/workflow-runs",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:e,workflowId:S,runId:N,action:r.action,note:O||void 0,decidedBy:"ClawKitchen UI"})}),a=await t.json();if(!t.ok||!a.ok)throw Error(a.error||"Failed to apply approval action");await U(S,N)}catch(e){E((0,o.errorMessage)(e))}finally{A(!1)}}},className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-2 py-1 text-[11px] font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10 disabled:opacity-60",children:r.label},r.action))})]}):null]})})()]}),(0,t.jsxs)("div",{className:"border-t border-white/10 pt-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",children:"Memory used in this run"}),B.length?(0,t.jsx)("div",{className:"mt-2 space-y-2",children:B.slice(0,20).map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-2",children:[(0,t.jsxs)("div",{className:"text-[10px] text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:e.ts})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.type})," • ",(0,t.jsx)("span",{className:"font-mono",children:e.author})]}),(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap text-xs text-[color:var(--ck-text-primary)]",children:e.content}),void 0!==e.source?(0,t.jsx)("pre",{className:"mt-2 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/30 p-2 text-[10px] text-[color:var(--ck-text-secondary)]",children:JSON.stringify(e.source,null,2)}):null]},`${e.ts}-${r}`))}):(0,t.jsxs)("div",{className:"mt-2 text-xs text-[color:var(--ck-text-tertiary)]",children:["(None recorded yet.)",(0,t.jsxs)("div",{className:"mt-1",children:["Next step: have the workflow runner write an explicit ",(0,t.jsx)("span",{className:"font-mono",children:"memoryUsed[]"})," list into the run file."]})]})]})]}):N?(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-secondary)]",children:"Loading run…"}):(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:"Select a run to see details."})})]})]}):null]},r.id)})})]})}e.s(["default",()=>n])},88143,(e,t,r)=>{"use strict";function a({widthInt:e,heightInt:t,blurWidth:r,blurHeight:a,blurDataURL:s,objectFit:i}){let o=r?40*r:e,l=a?40*a:t,n=o&&l?`viewBox='0 0 ${o} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${n}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${n?"none":"contain"===i?"xMidYMid":"cover"===i?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return a}})},87690,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return o}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(33525);let a=e.r(43369),s=e.r(88143),i=e.r(87690),o=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function n(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:r=!1,priority:c=!1,preload:d=!1,loading:u,className:m,quality:x,width:p,height:h,fill:f=!1,style:v,overrideSrc:b,onLoad:g,onLoadingComplete:w,placeholder:y="empty",blurDataURL:j,fetchPriority:k,decoding:N="async",layout:C,objectFit:S,objectPosition:_,lazyBoundary:I,lazyRoot:P,...R},E){var O;let $,M,A,{imgConf:T,showAltText:z,blurComplete:D,defaultLoader:L}=E,U=T||i.imageConfigDefault;if("allSizes"in U)$=U;else{let e=[...U.deviceSizes,...U.imageSizes].sort((e,t)=>e-t),t=U.deviceSizes.sort((e,t)=>e-t),r=U.qualities?.sort((e,t)=>e-t);$={...U,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===L)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let q=R.loader||L;delete R.loader,delete R.srcSet;let B="__next_img_default"in q;if(B){if("custom"===$.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=q;q=t=>{let{config:r,...a}=t;return e(a)}}if(C){"fill"===C&&(f=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[C];e&&(v={...v,...e});let r={responsive:"100vw",fill:"100vw"}[C];r&&!t&&(t=r)}let F="",W=n(p),J=n(h);if((O=e)&&"object"==typeof O&&(l(O)||void 0!==O.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,A=t.blurHeight,j=j||t.blurDataURL,F=t.src,!f)if(W||J){if(W&&!J){let e=W/t.width;J=Math.round(t.height*e)}else if(!W&&J){let e=J/t.height;W=Math.round(t.width*e)}}else W=t.width,J=t.height}let G=!c&&!d&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:F)||e.startsWith("data:")||e.startsWith("blob:"))&&(r=!0,G=!1),$.unoptimized&&(r=!0),B&&!$.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(r=!0);let K=n(x),X=Object.assign(f?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:_}:{},z?{}:{color:"transparent"},v),V=D||"empty"===y?null:"blur"===y?`url("data:image/svg+xml;charset=utf-8,${(0,s.getImageBlurSvg)({widthInt:W,heightInt:J,blurWidth:M,blurHeight:A,blurDataURL:j||"",objectFit:X.objectFit})}")`:`url("${y}")`,H=o.includes(X.objectFit)?"fill"===X.objectFit?"100% 100%":"cover":X.objectFit,Y=V?{backgroundSize:H,backgroundPosition:X.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:V}:{},Q=function({config:e,src:t,unoptimized:r,width:s,quality:i,sizes:o,loader:l}){if(r){let e=(0,a.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let r=t.includes("?")?"&":"?";t=`${t}${r}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:n,kind:c}=function({deviceSizes:e,allSizes:t},r,a){if(a){let r=/(^|\s)(1?\d?\d)vw/g,s=[];for(let e;e=r.exec(a);)s.push(parseInt(e[2]));if(s.length){let r=.01*Math.min(...s);return{widths:t.filter(t=>t>=e[0]*r),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof r?{widths:e,kind:"w"}:{widths:[...new Set([r,2*r].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,s,o),d=n.length-1;return{sizes:o||"w"!==c?o:"100vw",srcSet:n.map((r,a)=>`${l({config:e,src:t,quality:i,width:r})} ${"w"===c?r:a+1}${c}`).join(", "),src:l({config:e,src:t,quality:i,width:n[d]})}}({config:$,src:e,unoptimized:r,width:W,quality:K,sizes:t,loader:q}),Z=G?"lazy":u;return{props:{...R,loading:Z,fetchPriority:k,width:W,height:J,decoding:N,className:m,style:{...X,...Y},sizes:Q.sizes,srcSet:Q.srcSet,src:b||Q.src},meta:{unoptimized:r,preload:d||c,placeholder:y,fill:f}}}},98879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let a=e.r(71645),s="u"<typeof window,i=s?()=>{}:a.useLayoutEffect,o=s?()=>{}:a.useEffect;function l(e){let{headManager:t,reduceComponentsToState:r}=e;function l(){if(t&&t.mountedInstances){let e=a.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return s&&(t?.mountedInstances?.add(e.children),l()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return h},defaultHead:function(){return u}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(90809),l=e.r(18050),n=o._(e.r(71645)),c=i._(e.r(98879)),d=e.r(42732);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function m(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===n.default.Fragment?e.concat(n.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let x=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,a,s;return e.reduce(m,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,a=new Set,s={},e=>{let i=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=x.length;t<r;t++){let r=x[t];if(e.props.hasOwnProperty(r))if("charSet"===r)a.has(r)?i=!1:a.add(r);else{let t=e.props[r],a=s[r]||new Set;("name"!==r||!o)&&a.has(t)?i=!1:(a.add(t),s[r]=a)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return n.default.cloneElement(e,{key:r})})}let h=function({children:e}){let t=(0,n.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:p,headManager:t,children:e})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18556,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let a=e.r(55682)._(e.r(71645)),s=e.r(87690),i=a.default.createContext(s.imageConfigDefault)},65856,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return a}});let a=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,r)=>{"use strict";function a(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return a}})},1948,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let a=e.r(70965),s=e.r(43369);function i({config:e,src:t,width:r,quality:i}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,a.findClosestQuality)(i,e),l=(0,s.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${r}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}i.__next_img_default=!0;let o=i},5500,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return w}});let a=e.r(55682),s=e.r(90809),i=e.r(18050),o=s._(e.r(71645)),l=a._(e.r(74080)),n=a._(e.r(25633)),c=e.r(8927),d=e.r(87690),u=e.r(18556);e.r(33525);let m=e.r(65856),x=a._(e.r(1948)),p=e.r(18581),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function f(e,t,r,a,s,i,o){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&s(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let a=!1,s=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>a,isPropagationStopped:()=>s,persist:()=>{},preventDefault:()=>{a=!0,t.preventDefault()},stopPropagation:()=>{s=!0,t.stopPropagation()}})}a?.current&&a.current(e)}}))}function v(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,o.forwardRef)(({src:e,srcSet:t,sizes:r,height:a,width:s,decoding:l,className:n,style:c,fetchPriority:d,placeholder:u,loading:m,unoptimized:x,fill:h,onLoadRef:b,onLoadingCompleteRef:g,setBlurComplete:w,setShowAltText:y,sizesInput:j,onLoad:k,onError:N,...C},S)=>{let _=(0,o.useCallback)(e=>{e&&(N&&(e.src=e.src),e.complete&&f(e,u,b,g,w,x,j))},[e,u,b,g,w,N,x,j]),I=(0,p.useMergedRef)(S,_);return(0,i.jsx)("img",{...C,...v(d),loading:m,width:s,height:a,decoding:l,"data-nimg":h?"fill":"1",className:n,style:c,sizes:r,srcSet:t,src:e,ref:I,onLoad:e=>{f(e.currentTarget,u,b,g,w,x,j)},onError:e=>{y(!0),"empty"!==u&&w(!0),N&&N(e)}})});function g({isAppRouter:e,imgAttributes:t}){let r={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...v(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,r),null):(0,i.jsx)(n.default,{children:(0,i.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...r},"__nimg-"+t.src+t.srcSet+t.sizes)})}let w=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(m.RouterContext),a=(0,o.useContext)(u.ImageConfigContext),s=(0,o.useMemo)(()=>{let e=h||a||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),s=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:s,localPatterns:"u"<typeof window?a?.localPatterns:e.localPatterns}},[a]),{onLoad:l,onLoadingComplete:n}=e,p=(0,o.useRef)(l);(0,o.useEffect)(()=>{p.current=l},[l]);let f=(0,o.useRef)(n);(0,o.useEffect)(()=>{f.current=n},[n]);let[v,w]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!1),{props:k,meta:N}=(0,c.getImgProps)(e,{defaultLoader:x.default,imgConf:s,blurComplete:v,showAltText:y});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{...k,unoptimized:N.unoptimized,placeholder:N.placeholder,fill:N.fill,onLoadRef:p,onLoadingCompleteRef:f,setBlurComplete:w,setShowAltText:j,sizesInput:e.sizes,ref:t}),N.preload?(0,i.jsx)(g,{isAppRouter:!r,imgAttributes:k}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},94909,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return d},getImageProps:function(){return c}};for(var s in a)Object.defineProperty(r,s,{enumerable:!0,get:a[s]});let i=e.r(55682),o=e.r(8927),l=e.r(5500),n=i._(e.r(1948));function c(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:n.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let d=l.Image},57688,(e,t,r)=>{t.exports=e.r(94909)},529,e=>{"use strict";var t=e.i(18050),r=e.i(57688),a=e.i(22016),s=e.i(71645),i=e.i(18566);let o=new Set(["png","jpg","jpeg","gif","webp","svg"]);function l(e){let t=e.toLowerCase().split(".").pop()??"";return o.has(t)}function n(e,t){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(e)}&runId=${encodeURIComponent(t.runId)}&path=${encodeURIComponent(t.relativePath)}`}function c(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,t)).toFixed(1))+" "+["B","KB","MB","GB"][t]}function d(e){try{return new Date(e).toLocaleString()}catch{return e}}function u(e){switch(e.toLowerCase().split(".").pop()){case"md":return"📝";case"json":return"🔧";case"txt":default:return"📄";case"html":case"htm":return"🌐";case"css":return"🎨";case"js":case"ts":case"tsx":case"jsx":return"⚙️";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"🖼️";case"pdf":return"📋";case"zip":case"tar":case"gz":return"📦"}}function m({teamId:e,deliverables:o,workflows:m}){let x=(0,i.useRouter)(),[p,h]=(0,s.useState)(""),[f,v]=(0,s.useState)(""),[b,g]=(0,s.useState)(""),[w,y]=(0,s.useState)(null),j=(0,s.useMemo)(()=>{let e=b.trim().toLowerCase();return o.filter(t=>{if(p&&t.workflowId!==p||f&&t.runId!==f)return!1;if(!e)return!0;let r=m[t.workflowId]?.name??"";return t.fileName.toLowerCase().includes(e)||t.workflowId.toLowerCase().includes(e)||t.runId.toLowerCase().includes(e)||r.toLowerCase().includes(e)||t.contentPreview&&t.contentPreview.toLowerCase().includes(e)})},[o,b,p,f,m]),k=(0,s.useMemo)(()=>Array.from(new Set(o.map(e=>e.workflowId).filter(Boolean))).sort(),[o]),N=(0,s.useMemo)(()=>Array.from(new Set((p?o.filter(e=>e.workflowId===p):o).map(e=>e.runId).filter(Boolean))).sort(),[o,p]),C=async t=>{try{if(t.isText&&t.contentPreview)await navigator.clipboard.writeText(t.contentPreview),alert("Content copied to clipboard!");else{let r=n(e,t),a=document.createElement("a");a.href=r,a.download=t.fileName,document.body.appendChild(a),a.click(),a.remove()}}catch{alert("Failed to download file")}};return(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("div",{className:"rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"workflow"}),(0,t.jsxs)("select",{value:p,onChange:e=>{h(e.target.value||""),v("")},className:"mt-1 w-64 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All workflows"}),k.map(e=>(0,t.jsx)("option",{value:e,children:m[e]?.name?`${m[e]?.name} (${e})`:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,t.jsxs)("select",{value:f,onChange:e=>v(e.target.value||""),className:"mt-1 w-56 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,t.jsx)("option",{value:"",children:"All runs"}),N.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,t.jsx)("input",{value:b,onChange:e=>g(e.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>x.refresh(),className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Refresh"})})]})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,t.jsxs)("div",{className:"lg:col-span-2 rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),j.length>0?(0,t.jsx)("div",{className:"space-y-2",children:j.map((s,i)=>{let o=w?.absolutePath===s.absolutePath,x=m[s.workflowId]?.name||s.workflowId;return(0,t.jsx)("div",{className:`cursor-pointer rounded-[var(--ck-radius-sm)] border p-3 transition-colors ${o?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>y(s),children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[l(s.fileName)&&(0,t.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-black/20 border border-white/10",children:(0,t.jsx)(r.default,{src:n(e,s),alt:s.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-lg",children:u(s.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:s.fileName}),s.isText&&(0,t.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,t.jsx)("span",{className:"font-mono",children:x})," · ",(0,t.jsx)("span",{className:"font-mono",children:s.runId})]}),(0,t.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[s.relativePath!==s.fileName&&(0,t.jsxs)("span",{children:[s.relativePath," · "]}),c(s.size)," · ",d(s.mtime)]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),C(s)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:s.isText?"Copy":"Download"}),(0,t.jsx)(a.default,{href:`/teams/${e}/runs/${s.workflowId}/${s.runId}`,onClick:e=>e.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run →"})]})]})},`${s.runId}-${s.relativePath}`)})}):(0,t.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("div",{className:"text-4xl mb-2",children:"📋"}),(0,t.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,t.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),j.length>0&&(0,t.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",j.length," of ",o.length," deliverables."]})]}),(0,t.jsxs)("div",{className:"lg:col-span-1 rounded-[var(--ck-radius-lg)] border border-white/10 bg-black/10 p-4",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),w?(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("span",{className:"text-lg",children:u(w.fileName)}),(0,t.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:w.fileName})]}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,t.jsxs)("div",{children:["Size: ",c(w.size)]}),(0,t.jsxs)("div",{children:["Modified: ",d(w.mtime)]}),(0,t.jsxs)("div",{children:["Path: ",w.relativePath]})]})]}),l(w.fileName)?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Image Preview:"}),(0,t.jsx)("div",{className:"bg-black/20 border border-white/10 rounded-[var(--ck-radius-sm)] p-2 overflow-hidden",children:(0,t.jsx)(r.default,{src:n(e,w),alt:w.fileName,width:800,height:600,className:"w-full h-auto rounded-[var(--ck-radius-sm)] object-contain max-h-[500px]",unoptimized:!0})}),(0,t.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,t.jsx)("a",{href:n(e,w),target:"_blank",rel:"noopener noreferrer",className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Open full size ↗"}),(0,t.jsx)("button",{onClick:()=>C(w),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download"})]})]}):w.isText&&w.contentPreview?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] mb-2",children:"Content Preview:"}),(0,t.jsx)("div",{className:"bg-black/20 border border-white/10 rounded-[var(--ck-radius-sm)] p-3 max-h-[400px] overflow-auto",children:(0,t.jsx)("pre",{className:"text-xs text-[color:var(--ck-text-primary)] whitespace-pre-wrap break-words",children:w.contentPreview})})]}):(0,t.jsxs)("div",{className:"text-center py-6",children:[(0,t.jsx)("div",{className:"text-3xl mb-2",children:u(w.fileName)}),(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-secondary)] mb-2",children:[c(w.size)," · ",w.fileName.split(".").pop()?.toUpperCase()," file"]}),(0,t.jsx)("button",{onClick:()=>C(w),className:"text-xs px-3 py-1.5 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"Download file"})]})]}):(0,t.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}e.s(["default",()=>m])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},36288,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),a=e.i(71645),o=e.i(76972),n=e.i(82310),c=e.i(42771);let l=new Set(["lead","dev","qa","tester","agent","system"]);function i({teamId:e,ticket:r,currentOwner:o}){let n=(0,s.useRouter)(),[c,l]=(0,a.useState)([]),[i,d]=(0,a.useState)(o??""),[m,x]=(0,a.useState)(!1),[u,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{let t=!1;return(async()=>{try{let r=e?`/api/teams/${encodeURIComponent(e)}/tickets/assignees`:"/api/tickets/assignees",s=await fetch(r,{cache:"no-store"}),a=await s.json();if(t)return;l(Array.isArray(a.assignees)?a.assignees:[])}catch{if(t)return;l([])}})(),()=>{t=!0}},[]);let h=(0,a.useMemo)(()=>{let e=new Set(c);return o&&e.add(o),Array.from(e).sort()},[c,o]);async function p(){x(!0),b(null);try{let t=e?`/api/teams/${encodeURIComponent(e)}/tickets/assign`:"/api/tickets/assign",s=await fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:r,assignee:i,...e?{teamId:e}:{}})}),a=await s.json();if(!s.ok)return void b(a.error||"Assign failed");n.refresh()}catch{b("Assign failed")}finally{x(!1)}}return(0,t.jsxs)("div",{className:"ck-glass p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-tertiary)]",children:"Assignee"}),(0,t.jsxs)("select",{className:"rounded-md border border-white/10 bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",value:i,onChange:e=>d(e.target.value),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:"Select…"}),h.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsx)("button",{type:"button",onClick:p,disabled:m||!i||i===(o??""),className:"rounded-md bg-emerald-600 px-3 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:cursor-not-allowed disabled:opacity-50",children:m?"Assigning…":"Assign"}),o?(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:["Currently: ",o]}):null]}),u?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:u}):null]})}function d(e,t){return t||0==e.trim().length}function m(e){let m=(0,s.useRouter)(),x=(0,o.useToast)(),[u,b]=(0,a.useTransition)(),[h,p]=(0,a.useState)(null),[k,v]=(0,a.useState)(null),f=(0,a.useMemo)(()=>(function(e){let t=function(e){let t=/^## Comments\s*$/gim.exec(e);if(!t)return null;let r=t.index+t[0].length,s=e.slice(r).search(/^##\s+/m),a=-1===s?e.length:r+s;return{start:r,end:a}}(e);if(!t)return[];let r=e.slice(t.start,t.end).replace(/^\s+/,"").split("\n"),s=[],a=null,o=/^- \*\*(.+?)\*\*\s+—\s+(.*)$/;for(let e of r){let t=e.replace(/\r$/,""),r=t.match(o);if(r){a&&s.push({...a,body:a.body.trimEnd()});let e=r[1].trim(),t=r[2].trim(),o=t.indexOf(":"),n=(o>=0?t.slice(0,o):t).trim()||"unknown",c=o>=0?t.slice(o+1).trimStart():"",i=function(e){let t=e?.trim()||"unknown",r=t.match(/^(.*?)\s*\((.*?)\)\s*$/);if(r){let e=r[1].trim()||"unknown",s=r[2].trim();return{name:e,role:s&&s.toLowerCase()!=e.toLowerCase()?s:void 0,raw:t}}for(let e of[" — "," - "," | "]){if(!t.includes(e))continue;let[r,s]=t.split(e).map(e=>e.trim()).filter(Boolean);if(!r||!s)break;let a=l.has(r.toLowerCase()),o=l.has(s.toLowerCase());if(a&&!o)return{name:s,role:r,raw:t};return{name:r,role:s,raw:t}}return{name:t,raw:t}}(n);a={timestamp:e,authorName:i.name,authorRole:i.role,authorRaw:i.raw,body:c?c+"\n":""};continue}a&&(a.body+=t.replace(/^\s{0,2}/,"")+"\n")}return a&&s.push({...a,body:a.body.trimEnd()}),s})(e.markdown),[e.markdown]),[g,y]=(0,a.useState)(""),[j,w]=(0,a.useState)("");async function N(){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move-to-goals`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function C(){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/delete`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function S(t){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,to:t})})}async function T(){p(null);let t=j.trim();if(!t)throw Error("Comment cannot be empty.");await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/comment`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,author:g.trim()||void 0,comment:t})}),w(""),x.push({kind:"success",message:"Comment added."}),m.refresh()}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(r.default,{href:e.backHref??"/tickets",className:"text-sm font-medium hover:underline",children:"← Back"}),(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.file})]}),h?(0,t.jsx)("div",{className:"ck-glass border border-[color:var(--ck-border-strong)] p-3 text-sm text-[color:var(--ck-text-primary)]",children:h}):null,(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Ticket"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{children:"Status"}),(0,t.jsxs)("select",{className:"rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",disabled:u,value:e.stage,onChange:t=>{let r=t.target.value;if(r!==e.stage){if("done"===r&&!window.confirm("Mark this ticket done? This will move the file to work/done and add an audit comment."))return;b(()=>{S(r).then(()=>{x.push({kind:"success",message:`Status updated to ${r}.`}),m.refresh()}).catch(e=>p((0,n.errorMessage)(e)))})}},children:[(0,t.jsx)("option",{value:"backlog",children:"backlog"}),(0,t.jsx)("option",{value:"in-progress",children:"in-progress"}),(0,t.jsx)("option",{value:"testing",children:"testing"}),(0,t.jsx)("option",{value:"done",children:"done"})]})]}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:border-[color:var(--ck-border-strong)]",onClick:()=>v({kind:"goals"}),disabled:u,children:"Move to Goals"}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-accent-red)] bg-[color:var(--ck-accent-red-soft)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-accent-red)] hover:bg-[color:var(--ck-accent-red-soft-strong)]",onClick:()=>v({kind:"delete"}),disabled:u,children:"Delete Ticket"})]})]}),void 0!==e.currentOwner?(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(i,{teamId:e.teamId,ticket:e.ticketId,currentOwner:e.currentOwner??null})}):null,(0,t.jsxs)("div",{className:"mt-6 border-t border-[color:var(--ck-border-subtle)] pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Comments"}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:f.length})]}),f.length?(0,t.jsx)("div",{className:"mt-3 space-y-3",children:f.map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-black/10 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-primary)]",children:e.authorName}),e.authorRole?(0,t.jsx)("div",{className:"rounded border border-[color:var(--ck-border-subtle)] bg-black/10 px-1.5 py-0.5 text-[10px] font-medium text-[color:var(--ck-text-tertiary)]",children:e.authorRole}):null]}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.timestamp})]}),(0,t.jsx)("div",{className:"mt-2 whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-secondary)]",children:e.body})]},`${e.timestamp}-${r}`))}):(0,t.jsx)("div",{className:"mt-3 text-sm text-[color:var(--ck-text-secondary)]",children:"No comments yet."}),(0,t.jsxs)("div",{className:"mt-4 border-t border-[color:var(--ck-border-subtle)] pt-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Add comment"}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-author",children:"Author (optional)"}),(0,t.jsx)("input",{id:"ck-comment-author",value:g,onChange:e=>y(e.target.value),placeholder:"unknown",className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:u})]}),(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-body",children:"Comment"}),(0,t.jsx)("textarea",{id:"ck-comment-body",value:j,onChange:e=>w(e.target.value),rows:4,className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:u})]}),(0,t.jsx)("div",{className:"flex items-center justify-end",children:(0,t.jsx)("button",{type:"button","aria-busy":u,className:"rounded-[var(--ck-radius-sm)] bg-[color:var(--ck-accent)] px-3 py-2 text-xs font-semibold text-black transition hover:brightness-110 active:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--ck-border-strong)] focus-visible:ring-offset-2 focus-visible:ring-offset-black/30 disabled:cursor-not-allowed disabled:border disabled:border-[color:var(--ck-border-subtle)] disabled:bg-[color:var(--ck-bg-glass)] disabled:text-[color:var(--ck-text-tertiary)]",onClick:()=>{b(()=>{T().catch(e=>p((0,n.errorMessage)(e)))})},disabled:d(j,u),children:u?"Posting…":"Post comment"})})]})]})]})]}),(0,t.jsx)("div",{className:"ck-glass p-6",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-primary)]",children:e.markdown})}),k?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,t.jsxs)("div",{className:"ck-glass w-full max-w-lg rounded-[var(--ck-radius-md)] border border-[color:var(--ck-border-strong)] p-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"goals"===k.kind?"Move to Goals":"Delete ticket"}),(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"goals"===k.kind?(0,t.jsxs)(t.Fragment,{children:["This will move the ticket out of the work lanes into ",(0,t.jsx)("code",{children:"work/goals/"})," so it won’t be picked up by automation."]}):(0,t.jsx)(t.Fragment,{children:"This will permanently remove the ticket markdown file. Assignment stubs (if any) will be archived."})}),(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs text-[color:var(--ck-text-secondary)]",onClick:()=>v(null),disabled:u,children:"Cancel"}),(0,t.jsx)("button",{className:"delete"===k.kind?"rounded bg-[color:var(--ck-accent-red)] px-3 py-1.5 text-xs font-medium text-white":"rounded bg-[color:var(--ck-accent)] px-3 py-1.5 text-xs font-medium text-black",onClick:()=>{let t=k.kind;v(null),b(()=>{("goals"===t?N():C()).then(()=>{x.push({kind:"success",message:"delete"===t?"Ticket deleted.":"Moved to Goals."}),"delete"===t?m.push(e.backHref??"/tickets"):m.refresh()}).catch(e=>p((0,n.errorMessage)(e)))})},disabled:u,children:"Confirm"})]})]})}):null]})}e.s(["TicketDetailClient",()=>m,"isPostCommentDisabled",()=>d],36288)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82310,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},36288,e=>{"use strict";var t=e.i(18050),r=e.i(22016),s=e.i(18566),a=e.i(71645),o=e.i(76972),n=e.i(82310),c=e.i(42771);let l=new Set(["lead","dev","qa","tester","agent","system"]);function i({teamId:e,ticket:r,currentOwner:o}){let n=(0,s.useRouter)(),[c,l]=(0,a.useState)([]),[i,d]=(0,a.useState)(o??""),[m,x]=(0,a.useState)(!1),[u,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{let t=!1;return(async()=>{try{let r=e?`/api/teams/${encodeURIComponent(e)}/tickets/assignees`:"/api/tickets/assignees",s=await fetch(r,{cache:"no-store"}),a=await s.json();if(t)return;l(Array.isArray(a.assignees)?a.assignees:[])}catch{if(t)return;l([])}})(),()=>{t=!0}},[]);let h=(0,a.useMemo)(()=>{let e=new Set(c);return o&&e.add(o),Array.from(e).sort()},[c,o]);async function p(){x(!0),b(null);try{let t=e?`/api/teams/${encodeURIComponent(e)}/tickets/assign`:"/api/tickets/assign",s=await fetch(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:r,assignee:i,...e?{teamId:e}:{}})}),a=await s.json();if(!s.ok)return void b(a.error||"Assign failed");n.refresh()}catch{b("Assign failed")}finally{x(!1)}}return(0,t.jsxs)("div",{className:"ck-glass p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-tertiary)]",children:"Assignee"}),(0,t.jsxs)("select",{className:"rounded-md border border-white/10 bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)]",value:i,onChange:e=>d(e.target.value),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:"Select…"}),h.map(e=>(0,t.jsx)("option",{value:e,children:e},e))]}),(0,t.jsx)("button",{type:"button",onClick:p,disabled:m||!i||i===(o??""),className:"rounded-md bg-emerald-600 px-3 py-2 text-sm font-semibold text-white hover:bg-emerald-500 disabled:cursor-not-allowed disabled:opacity-50",children:m?"Assigning…":"Assign"}),o?(0,t.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:["Currently: ",o]}):null]}),u?(0,t.jsx)("div",{className:"mt-2 text-xs text-red-300",children:u}):null]})}function d(e,t){return t||0==e.trim().length}function m(e){let m=(0,s.useRouter)(),x=(0,o.useToast)(),[u,b]=(0,a.useTransition)(),[h,p]=(0,a.useState)(null),[k,v]=(0,a.useState)(null),f=(0,a.useMemo)(()=>(function(e){let t=function(e){let t=/^## Comments\s*$/gim.exec(e);if(!t)return null;let r=t.index+t[0].length,s=e.slice(r).search(/^##\s+/m),a=-1===s?e.length:r+s;return{start:r,end:a}}(e);if(!t)return[];let r=e.slice(t.start,t.end).replace(/^\s+/,"").split("\n"),s=[],a=null,o=/^- \*\*(.+?)\*\*\s+—\s+(.*)$/;for(let e of r){let t=e.replace(/\r$/,""),r=t.match(o);if(r){a&&s.push({...a,body:a.body.trimEnd()});let e=r[1].trim(),t=r[2].trim(),o=t.indexOf(":"),n=(o>=0?t.slice(0,o):t).trim()||"unknown",c=o>=0?t.slice(o+1).trimStart():"",i=function(e){let t=e?.trim()||"unknown",r=t.match(/^(.*?)\s*\((.*?)\)\s*$/);if(r){let e=r[1].trim()||"unknown",s=r[2].trim();return{name:e,role:s&&s.toLowerCase()!=e.toLowerCase()?s:void 0,raw:t}}for(let e of[" — "," - "," | "]){if(!t.includes(e))continue;let[r,s]=t.split(e).map(e=>e.trim()).filter(Boolean);if(!r||!s)break;let a=l.has(r.toLowerCase()),o=l.has(s.toLowerCase());if(a&&!o)return{name:s,role:r,raw:t};return{name:r,role:s,raw:t}}return{name:t,raw:t}}(n);a={timestamp:e,authorName:i.name,authorRole:i.role,authorRaw:i.raw,body:c?c+"\n":""};continue}a&&(a.body+=t.replace(/^\s{0,2}/,"")+"\n")}return a&&s.push({...a,body:a.body.trimEnd()}),s})(e.markdown),[e.markdown]),[g,y]=(0,a.useState)(""),[j,w]=(0,a.useState)("");async function N(){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move-to-goals`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function C(){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/delete`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId})})}async function S(t){p(null),await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/move`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,to:t})})}async function T(){p(null);let t=j.trim();if(!t)throw Error("Comment cannot be empty.");await (0,c.fetchJson)(`/api/teams/${encodeURIComponent(e.teamId)}/tickets/comment`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({ticket:e.ticketId,author:g.trim()||void 0,comment:t})}),w(""),x.push({kind:"success",message:"Comment added."}),m.refresh()}return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(r.default,{href:e.backHref??"/tickets",className:"text-sm font-medium hover:underline",children:"← Back"}),(0,t.jsx)("span",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.file})]}),h?(0,t.jsx)("div",{className:"ck-glass border border-[color:var(--ck-border-strong)] p-3 text-sm text-[color:var(--ck-text-primary)]",children:h}):null,(0,t.jsxs)("div",{className:"ck-glass p-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Ticket"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-[color:var(--ck-text-secondary)]",children:[(0,t.jsx)("span",{children:"Status"}),(0,t.jsxs)("select",{className:"rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-2 py-1 text-xs text-[color:var(--ck-text-primary)]",disabled:u,value:e.stage,onChange:t=>{let r=t.target.value;if(r!==e.stage){if("done"===r&&!window.confirm("Mark this ticket done? This will move the file to work/done and add an audit comment."))return;b(()=>{S(r).then(()=>{x.push({kind:"success",message:`Status updated to ${r}.`}),m.refresh()}).catch(e=>p((0,n.errorMessage)(e)))})}},children:[(0,t.jsx)("option",{value:"backlog",children:"backlog"}),(0,t.jsx)("option",{value:"in-progress",children:"in-progress"}),(0,t.jsx)("option",{value:"testing",children:"testing"}),(0,t.jsx)("option",{value:"done",children:"done"})]})]}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:border-[color:var(--ck-border-strong)]",onClick:()=>v({kind:"goals"}),disabled:u,children:"Move to Goals"}),(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-accent-red)] bg-[color:var(--ck-accent-red-soft)] px-3 py-1.5 text-xs font-medium text-[color:var(--ck-accent-red)] hover:bg-[color:var(--ck-accent-red-soft-strong)]",onClick:()=>v({kind:"delete"}),disabled:u,children:"Delete Ticket"})]})]}),void 0!==e.currentOwner?(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(i,{teamId:e.teamId,ticket:e.ticketId,currentOwner:e.currentOwner??null})}):null,(0,t.jsxs)("div",{className:"mt-6 border-t border-[color:var(--ck-border-subtle)] pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Comments"}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:f.length})]}),f.length?(0,t.jsx)("div",{className:"mt-3 space-y-3",children:f.map((e,r)=>(0,t.jsxs)("div",{className:"rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-black/10 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-[color:var(--ck-text-primary)]",children:e.authorName}),e.authorRole?(0,t.jsx)("div",{className:"rounded border border-[color:var(--ck-border-subtle)] bg-black/10 px-1.5 py-0.5 text-[10px] font-medium text-[color:var(--ck-text-tertiary)]",children:e.authorRole}):null]}),(0,t.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:e.timestamp})]}),(0,t.jsx)("div",{className:"mt-2 whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-secondary)]",children:e.body})]},`${e.timestamp}-${r}`))}):(0,t.jsx)("div",{className:"mt-3 text-sm text-[color:var(--ck-text-secondary)]",children:"No comments yet."}),(0,t.jsxs)("div",{className:"mt-4 border-t border-[color:var(--ck-border-subtle)] pt-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"Add comment"}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-author",children:"Author (optional)"}),(0,t.jsx)("input",{id:"ck-comment-author",value:g,onChange:e=>y(e.target.value),placeholder:"unknown",className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:u})]}),(0,t.jsxs)("div",{className:"grid gap-1",children:[(0,t.jsx)("label",{className:"text-xs font-medium text-[color:var(--ck-text-secondary)]",htmlFor:"ck-comment-body",children:"Comment"}),(0,t.jsx)("textarea",{id:"ck-comment-body",value:j,onChange:e=>w(e.target.value),rows:4,className:"w-full rounded border border-[color:var(--ck-border-subtle)] bg-black/20 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] outline-none focus:border-[color:var(--ck-border-strong)]",disabled:u})]}),(0,t.jsx)("div",{className:"flex items-center justify-end",children:(0,t.jsx)("button",{type:"button","aria-busy":u,className:"rounded-[var(--ck-radius-sm)] bg-[color:var(--ck-accent)] px-3 py-2 text-xs font-semibold text-black transition hover:brightness-110 active:brightness-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[color:var(--ck-border-strong)] focus-visible:ring-offset-2 focus-visible:ring-offset-black/30 disabled:cursor-not-allowed disabled:border disabled:border-[color:var(--ck-border-subtle)] disabled:bg-[color:var(--ck-bg-glass)] disabled:text-[color:var(--ck-text-tertiary)]",onClick:()=>{b(()=>{T().catch(e=>p((0,n.errorMessage)(e)))})},disabled:d(j,u),children:u?"Posting…":"Post comment"})})]})]})]})]}),(0,t.jsx)("div",{className:"ck-glass p-6",children:(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-[color:var(--ck-text-primary)]",children:e.markdown})}),k?(0,t.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",children:(0,t.jsxs)("div",{className:"ck-glass w-full max-w-lg rounded-[var(--ck-radius-md)] border border-[color:var(--ck-border-strong)] p-4",children:[(0,t.jsx)("div",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)]",children:"goals"===k.kind?"Move to Goals":"Delete ticket"}),(0,t.jsx)("div",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"goals"===k.kind?(0,t.jsxs)(t.Fragment,{children:["This will move the ticket out of the work lanes into ",(0,t.jsx)("code",{children:"work/goals/"})," so it won’t be picked up by automation."]}):(0,t.jsx)(t.Fragment,{children:"This will permanently remove the ticket markdown file. Assignment stubs (if any) will be archived."})}),(0,t.jsxs)("div",{className:"mt-4 flex items-center justify-end gap-2",children:[(0,t.jsx)("button",{className:"rounded border border-[color:var(--ck-border-subtle)] px-3 py-1.5 text-xs text-[color:var(--ck-text-secondary)]",onClick:()=>v(null),disabled:u,children:"Cancel"}),(0,t.jsx)("button",{className:"delete"===k.kind?"rounded bg-[color:var(--ck-accent-red)] px-3 py-1.5 text-xs font-medium text-white":"rounded bg-[color:var(--ck-accent)] px-3 py-1.5 text-xs font-medium text-black",onClick:()=>{let t=k.kind;v(null),b(()=>{("goals"===t?N():C()).then(()=>{x.push({kind:"success",message:"delete"===t?"Ticket deleted.":"Moved to Goals."}),"delete"===t?m.push(e.backHref??"/tickets"):m.refresh()}).catch(e=>p((0,n.errorMessage)(e)))})},disabled:u,children:"Confirm"})]})]})}):null]})}e.s(["TicketDetailClient",()=>m,"isPostCommentDisabled",()=>d],36288)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63491,e=>{"use strict";var t=e.i(
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63491,e=>{"use strict";var t=e.i(18050),r=e.i(71645);function c({error:e,reset:c}){return(0,r.useEffect)(()=>{console.error("Global error:",e)},[e]),(0,t.jsx)("html",{lang:"en",children:(0,t.jsx)("body",{className:"min-h-screen bg-[color:var(--ck-bg)] text-[color:var(--ck-text-primary)]",children:(0,t.jsxs)("div",{className:"mx-auto max-w-2xl px-6 py-16",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"An unexpected error occurred."}),(0,t.jsx)("pre",{className:"mt-6 overflow-auto rounded-md border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] p-4 text-xs text-[color:var(--ck-text-secondary)]",children:String(e?.stack||e)}),e?.digest?(0,t.jsxs)("p",{className:"mt-3 text-xs text-[color:var(--ck-text-secondary)]",children:["Digest: ",e.digest]}):null,(0,t.jsx)("div",{className:"mt-6 flex gap-3",children:(0,t.jsx)("button",{type:"button",onClick:()=>c(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white",children:"Try again"})})]})})})}e.s(["default",()=>c])}]);
|