@jiggai/kitchen 0.1.12 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +21 -0
- package/.next/build-manifest.json +6 -6
- package/.next/prerender-manifest.json +11 -6
- package/.next/routes-manifest.json +146 -0
- package/.next/server/app/_global-error/page/build-manifest.json +4 -4
- package/.next/server/app/_global-error/page.js +3 -3
- 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 +2 -2
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/build-manifest.json +4 -4
- package/.next/server/app/_not-found/page.js +10 -9
- 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 +5 -5
- package/.next/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/agents/[agentId]/page/build-manifest.json +4 -4
- package/.next/server/app/agents/[agentId]/page.js +8 -8
- 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/identity/route.js +1 -1
- package/.next/server/app/api/agents/identity/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/route.js +1 -1
- package/.next/server/app/api/agents/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/install/route.js +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/delete/route.js +1 -1
- package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/job/route.js +1 -1
- package/.next/server/app/api/cron/job/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/jobs/route.js +1 -1
- 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/gateway/restart/route.js +1 -1
- package/.next/server/app/api/gateway/restart/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/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/app-paths-manifest.json +3 -0
- package/.next/server/app/api/recipes/custom-team/route/build-manifest.json +11 -0
- package/.next/server/app/api/recipes/custom-team/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/recipes/custom-team/route.js +6 -0
- package/.next/server/app/api/recipes/custom-team/route.js.map +5 -0
- package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -0
- package/.next/server/app/api/recipes/custom-team/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/recipes/delete/route.js +1 -1
- package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/route.js +1 -1
- package/.next/server/app/api/recipes/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 -2
- 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/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/app-paths-manifest.json +3 -0
- package/.next/server/app/api/swarms/start/route/build-manifest.json +11 -0
- package/.next/server/app/api/swarms/start/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/swarms/start/route.js +6 -0
- package/.next/server/app/api/swarms/start/route.js.map +5 -0
- package/.next/server/app/api/swarms/start/route.js.nft.json +1 -0
- package/.next/server/app/api/swarms/start/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/swarms/status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/swarms/status/route/build-manifest.json +11 -0
- package/.next/server/app/api/swarms/status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/swarms/status/route.js +6 -0
- package/.next/server/app/api/swarms/status/route.js.map +5 -0
- package/.next/server/app/api/swarms/status/route.js.nft.json +1 -0
- package/.next/server/app/api/swarms/status/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route_client-reference-manifest.js +2 -0
- 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/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/memory/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/memory/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/memory/route.js +6 -0
- package/.next/server/app/api/teams/memory/route.js.map +5 -0
- package/.next/server/app/api/teams/memory/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/memory/route_client-reference-manifest.js +2 -0
- 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/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/orchestrator/install/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/orchestrator/install/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/orchestrator/install/route.js +6 -0
- package/.next/server/app/api/teams/orchestrator/install/route.js.map +5 -0
- package/.next/server/app/api/teams/orchestrator/install/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/orchestrator/install/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/orchestrator/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/orchestrator/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/orchestrator/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/orchestrator/route.js +6 -0
- package/.next/server/app/api/teams/orchestrator/route.js.map +5 -0
- package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/orchestrator/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/remove-team/route.js +2 -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-runs/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflow-runs/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflow-runs/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflow-runs/route.js +7 -0
- package/.next/server/app/api/teams/workflow-runs/route.js.map +5 -0
- package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflow-runs/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/workflow-templates/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflow-templates/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflow-templates/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflow-templates/route.js +6 -0
- package/.next/server/app/api/teams/workflow-templates/route.js.map +5 -0
- package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflow-templates/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/workflows/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflows/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflows/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflows/route.js +6 -0
- package/.next/server/app/api/teams/workflows/route.js.map +5 -0
- package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflows/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/tickets/assign/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tickets/assign/route/build-manifest.json +11 -0
- package/.next/server/app/api/tickets/assign/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tickets/assign/route.js +6 -0
- package/.next/server/app/api/tickets/assign/route.js.map +5 -0
- package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -0
- package/.next/server/app/api/tickets/assign/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/tickets/assignees/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tickets/assignees/route/build-manifest.json +11 -0
- package/.next/server/app/api/tickets/assignees/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tickets/assignees/route.js +6 -0
- package/.next/server/app/api/tickets/assignees/route.js.map +5 -0
- package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -0
- package/.next/server/app/api/tickets/assignees/route_client-reference-manifest.js +2 -0
- 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 +4 -4
- package/.next/server/app/channels/page.js +8 -8
- 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 +6 -6
- package/.next/server/app/channels.segments/_full.segment.rsc +6 -6
- package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
- package/.next/server/app/channels.segments/_index.segment.rsc +3 -3
- package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
- package/.next/server/app/cron-jobs/page/build-manifest.json +4 -4
- package/.next/server/app/cron-jobs/page.js +8 -8
- 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/cron-jobs.html +1 -1
- package/.next/server/app/cron-jobs.rsc +7 -7
- package/.next/server/app/cron-jobs.segments/_full.segment.rsc +7 -7
- package/.next/server/app/cron-jobs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/cron-jobs.segments/_index.segment.rsc +3 -3
- package/.next/server/app/cron-jobs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/cron-jobs.segments/cron-jobs/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/cron-jobs.segments/cron-jobs.segment.rsc +1 -1
- package/.next/server/app/goals/[id]/page/build-manifest.json +4 -4
- package/.next/server/app/goals/[id]/page.js +8 -8
- 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 +4 -4
- package/.next/server/app/goals/new/page.js +8 -8
- 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 +6 -6
- package/.next/server/app/goals/new.segments/_full.segment.rsc +6 -6
- package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/_index.segment.rsc +3 -3
- package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
- package/.next/server/app/goals/page/build-manifest.json +4 -4
- package/.next/server/app/goals/page.js +8 -8
- 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 +6 -6
- package/.next/server/app/goals.segments/_full.segment.rsc +6 -6
- package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
- package/.next/server/app/goals.segments/_index.segment.rsc +3 -3
- package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
- package/.next/server/app/manifest.webmanifest/route/app-paths-manifest.json +3 -0
- package/.next/server/app/manifest.webmanifest/route/build-manifest.json +11 -0
- package/.next/server/app/manifest.webmanifest/route/server-reference-manifest.json +4 -0
- package/.next/server/app/manifest.webmanifest/route.js +6 -0
- package/.next/server/app/manifest.webmanifest/route.js.map +5 -0
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -0
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +2 -0
- package/.next/server/app/manifest.webmanifest.body +1 -0
- package/.next/server/app/manifest.webmanifest.meta +1 -0
- package/.next/server/app/page/build-manifest.json +4 -4
- package/.next/server/app/page.js +10 -9
- 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 +4 -4
- package/.next/server/app/recipes/[id]/page.js +10 -9
- 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 +4 -4
- package/.next/server/app/recipes/page.js +9 -9
- 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/settings/page/build-manifest.json +4 -4
- package/.next/server/app/settings/page.js +8 -8
- 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 +6 -6
- package/.next/server/app/settings.segments/_full.segment.rsc +6 -6
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/teams/[teamId]/page/build-manifest.json +4 -4
- package/.next/server/app/teams/[teamId]/page.js +10 -9
- 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]/tickets/[ticket]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/build-manifest.json +17 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/next-font-manifest.json +11 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +18 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.map +5 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -0
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +2 -0
- package/.next/server/app/teams/[teamId]/tickets/page/app-paths-manifest.json +3 -0
- package/.next/server/app/teams/[teamId]/tickets/page/build-manifest.json +17 -0
- package/.next/server/app/teams/[teamId]/tickets/page/next-font-manifest.json +11 -0
- package/.next/server/app/teams/[teamId]/tickets/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/teams/[teamId]/tickets/page/server-reference-manifest.json +4 -0
- package/.next/server/app/teams/[teamId]/tickets/page.js +18 -0
- package/.next/server/app/teams/[teamId]/tickets/page.js.map +5 -0
- package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -0
- package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +2 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/build-manifest.json +17 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/next-font-manifest.json +11 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +19 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.map +5 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -0
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +2 -0
- package/.next/server/app/teams/[teamId]/workflows/page/app-paths-manifest.json +3 -0
- package/.next/server/app/teams/[teamId]/workflows/page/build-manifest.json +17 -0
- package/.next/server/app/teams/[teamId]/workflows/page/next-font-manifest.json +11 -0
- package/.next/server/app/teams/[teamId]/workflows/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/teams/[teamId]/workflows/page/server-reference-manifest.json +4 -0
- package/.next/server/app/teams/[teamId]/workflows/page.js +20 -0
- package/.next/server/app/teams/[teamId]/workflows/page.js.map +5 -0
- package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -0
- package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +2 -0
- package/.next/server/app/tickets/[ticket]/page/build-manifest.json +4 -4
- package/.next/server/app/tickets/[ticket]/page.js +8 -8
- 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 +4 -4
- package/.next/server/app/tickets/page.js +8 -8
- 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 +21 -0
- package/.next/server/chunks/[root-of-the-server]__04d535a1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04d535a1._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0554d494._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0554d494._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__05f5e243._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__05f5e243._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__0e5f94e2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0e5f94e2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__107d374d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__107d374d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1106aaf7._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__1106aaf7._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__1805932c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1805932c._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__26c618a3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__26c618a3._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__2fa553db._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__2fa553db._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__392e585d._.js +18 -0
- package/.next/server/chunks/[root-of-the-server]__392e585d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3cddf0a5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3cddf0a5._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3f7058b4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3f7058b4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__477c3d5b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__477c3d5b._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__47eb3111._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__47eb3111._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__4898071c._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__59a6cf09._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__59a6cf09._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__6629e914._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__6629e914._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__667c3a2d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__667c3a2d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__691a8e5d._.js +6 -0
- package/.next/server/chunks/[root-of-the-server]__691a8e5d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__698cf062._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__698cf062._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__69be1758._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__69be1758._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__6d8e7b75._.js +6 -0
- package/.next/server/chunks/[root-of-the-server]__6d8e7b75._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__6e5826c5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__6e5826c5._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__795578f0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__795578f0._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__7a331e51._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__7a331e51._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__7e46fb06._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__7e46fb06._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__864a08dd._.js +10 -0
- package/.next/server/chunks/[root-of-the-server]__864a08dd._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__8a811a30._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__8a811a30._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js +8 -0
- package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__8ea22d0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__8ea22d0a._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__904a6d9f._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__904a6d9f._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__a12dc320._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__a12dc320._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__a6ade549._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__a6ade549._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__abcda400._.js +6 -0
- package/.next/server/chunks/[root-of-the-server]__abcda400._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__b002764e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__b002764e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__bc3630f4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__bc3630f4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__befb8c19._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__befb8c19._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__bf608f29._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__be5f57b2._.js.map → [root-of-the-server]__bf608f29._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__74b80ca4._.js → [root-of-the-server]__c63a9f28._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__c86c0469._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c86c0469._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c9e4c772._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c9e4c772._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__cbe01b74._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__cbe01b74._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__ce9cfa39._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__ce9cfa39._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e40409a2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e40409a2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e6fa5823._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e6fa5823._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e8bfeaba._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e8bfeaba._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e8f8017b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e8f8017b._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__ee5cefd8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__ee5cefd8._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__ef60acef._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__ef60acef._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__fdda9176._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__a6ac3ddf._.js.map → [root-of-the-server]__fdda9176._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__fec14c75._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__fec14c75._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__fef7183d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__fef7183d._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_recipes_custom-team_route_actions_861b1489.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_swarms_start_route_actions_b79e9029.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_swarms_start_route_actions_b79e9029.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_swarms_status_route_actions_54826df0.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_swarms_status_route_actions_54826df0.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_[teamId]_tickets_move_route_actions_b47d8708.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_[teamId]_tickets_move_route_actions_b47d8708.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_memory_route_actions_5b7dc699.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_memory_route_actions_5b7dc699.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_install_route_actions_49b6602b.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_install_route_actions_49b6602b.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_route_actions_1949c463.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_orchestrator_route_actions_1949c463.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-runs_route_actions_8327ac7d.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-runs_route_actions_8327ac7d.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-templates_route_actions_87b51d57.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-templates_route_actions_87b51d57.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflows_route_actions_43dd6e07.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflows_route_actions_43dd6e07.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tickets_assign_route_actions_629cc773.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tickets_assign_route_actions_629cc773.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_tickets_assignees_route_actions_64d3d63e.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tickets_assignees_route_actions_64d3d63e.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_manifest_webmanifest_route_actions_1bff3fca.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_manifest_webmanifest_route_actions_1bff3fca.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assign_route_actions_50521c46.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assign_route_actions_50521c46.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assignees_route_actions_75675d78.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_assignees_route_actions_75675d78.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_delete_route_actions_9d6ca9f4.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_delete_route_actions_9d6ca9f4.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_move-to-goals_route_actions_760612ca.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_tickets_move-to-goals_route_actions_760612ca.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +16 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0d4cb2ba._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__285ae6b7._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__46e08d44._.js.map → [root-of-the-server]__285ae6b7._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__2bef6884._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__15600e29._.js.map → [root-of-the-server]__2bef6884._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__37c705d4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__37c705d4._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__3ec61b25._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__3ec61b25._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__3efd25c4._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__2a6f1e3e._.js.map → [root-of-the-server]__3efd25c4._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__44d2d5fa._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__44d2d5fa._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__4c4391c1._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__4c4391c1._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__4c6592ca._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__4c6592ca._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__682758bd._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__682758bd._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__e2e52c6e._.js → [root-of-the-server]__78cdd31e._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__92524828._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__247198dc._.js.map → [root-of-the-server]__92524828._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__9e1ab064._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__9e1ab064._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__ad654f09._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__ad654f09._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__b2617fbf._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__fd669584._.js.map → [root-of-the-server]__b2617fbf._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__b5f65083._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__b5f65083._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__4c6cc96d._.js → [root-of-the-server]__de18d058._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__4c6cc96d._.js.map → [root-of-the-server]__de18d058._.js.map} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__7180d770._.js → [root-of-the-server]__e364449b._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__e364449b._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__e5d416d5._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__3ad3e5b1._.js.map → [root-of-the-server]__e5d416d5._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__e94ab521._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__b9356576._.js → [root-of-the-server]__f62d412e._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__b9356576._.js.map → [root-of-the-server]__f62d412e._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__f8a2f82d._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__f8a2f82d._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__fbe5ff69._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__3575e6da._.js.map → [root-of-the-server]__fbe5ff69._.js.map} +1 -1
- package/.next/server/chunks/ssr/_018dfe6b._.js +27 -0
- package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -0
- package/.next/server/chunks/ssr/{_8c45edba._.js → _0bdae23a._.js} +3 -3
- package/.next/server/chunks/ssr/_0bdae23a._.js.map +1 -0
- package/.next/server/chunks/ssr/{_d27483a1._.js → _19aa68d3._.js} +3 -3
- package/.next/server/chunks/ssr/_19aa68d3._.js.map +1 -0
- package/.next/server/chunks/ssr/{_25e6aab8._.js → _347e2d56._.js} +3 -3
- package/.next/server/chunks/ssr/_347e2d56._.js.map +1 -0
- package/.next/server/chunks/ssr/_3c9015dc._.js +4 -0
- package/.next/server/chunks/ssr/_3c9015dc._.js.map +1 -0
- package/.next/server/chunks/ssr/_41ca4e70._.js +3 -0
- package/.next/server/chunks/ssr/_41ca4e70._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules_next_dist_12287b3d._.js → _49fb12c2._.js} +3 -3
- package/.next/server/chunks/ssr/_49fb12c2._.js.map +1 -0
- package/.next/server/chunks/ssr/{_3c8b2df6._.js → _536983a4._.js} +3 -3
- package/.next/server/chunks/ssr/_536983a4._.js.map +1 -0
- package/.next/server/chunks/ssr/_5443093b._.js +3 -0
- package/.next/server/chunks/ssr/_5443093b._.js.map +1 -0
- package/.next/server/chunks/ssr/{_cd23c5af._.js → _5b282394._.js} +3 -3
- package/.next/server/chunks/ssr/_5b282394._.js.map +1 -0
- package/.next/server/chunks/ssr/{_6e70b5a4._.js → _5cc24343._.js} +3 -3
- package/.next/server/chunks/ssr/_5cc24343._.js.map +1 -0
- package/.next/server/chunks/ssr/_67830ad6._.js +3 -0
- package/.next/server/chunks/ssr/_67830ad6._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_68c68167.js → _7eac37fb._.js} +3 -3
- package/.next/server/chunks/ssr/_7eac37fb._.js.map +1 -0
- package/.next/server/chunks/ssr/{_92140ca3._.js → _802ee40f._.js} +3 -3
- package/.next/server/chunks/ssr/{_25e6aab8._.js.map → _802ee40f._.js.map} +1 -1
- package/.next/server/chunks/ssr/{_8c8207c1._.js → _8062e992._.js} +3 -3
- package/.next/server/chunks/ssr/_8062e992._.js.map +1 -0
- package/.next/server/chunks/ssr/{_0808c2b9._.js → _99994c05._.js} +3 -3
- package/.next/server/chunks/ssr/_99994c05._.js.map +1 -0
- package/.next/server/chunks/ssr/{_b5e9afcc._.js → _aafc99aa._.js} +3 -3
- package/.next/server/chunks/ssr/_aafc99aa._.js.map +1 -0
- package/.next/server/chunks/ssr/{_39e6e769._.js → _b7f3caf7._.js} +3 -3
- package/.next/server/chunks/ssr/_b7f3caf7._.js.map +1 -0
- package/.next/server/chunks/ssr/_c2041f88._.js +4 -0
- package/.next/server/chunks/ssr/_c2041f88._.js.map +1 -0
- package/.next/server/chunks/ssr/_d2e9dda9._.js +4 -0
- package/.next/server/chunks/ssr/_d2e9dda9._.js.map +1 -0
- package/.next/server/chunks/ssr/{_3158c108._.js → _f4d8af3b._.js} +3 -3
- package/.next/server/chunks/ssr/_f4d8af3b._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_[ticket]_page_actions_25ad633d.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_[ticket]_page_actions_25ad633d.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_page_actions_dffb2525.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_tickets_page_actions_dffb2525.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_workflows_page_actions_3defde35.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_workflows_page_actions_3defde35.js.map +1 -0
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +3 -0
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -0
- package/.next/server/chunks/ssr/ce889_server_app_teams_[teamId]_workflows_[workflowId]_page_actions_880cbbc3.js +3 -0
- package/.next/server/chunks/ssr/ce889_server_app_teams_[teamId]_workflows_[workflowId]_page_actions_880cbbc3.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_ea845e5f._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_ea845e5f._.js.map +1 -0
- package/.next/server/chunks/ssr/{_da6f800e._.js → node_modules_next_aefa2538._.js} +2 -2
- package/.next/server/chunks/ssr/node_modules_next_aefa2538._.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_8a37abed._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_8a37abed._.js.map +1 -0
- package/.next/server/chunks/ssr/{node_modules_next_dist_client_components_9774470f._.js → node_modules_next_dist_client_components_2fffaa3a._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_next_dist_client_components_9774470f._.js.map → node_modules_next_dist_client_components_2fffaa3a._.js.map} +1 -1
- package/.next/server/chunks/ssr/{_68793c1f._.js → node_modules_next_dist_esm_build_templates_app-page_b5ef32b4.js} +3 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_b5ef32b4.js.map +1 -0
- package/.next/server/chunks/ssr/src_13139e3d._.js +3 -0
- package/.next/server/chunks/ssr/src_13139e3d._.js.map +1 -0
- package/.next/server/chunks/ssr/src_2a73b867._.js +3 -0
- package/.next/server/chunks/ssr/src_2a73b867._.js.map +1 -0
- package/.next/server/chunks/ssr/src_2dbb3b7f._.js +3 -0
- package/.next/server/chunks/ssr/src_2dbb3b7f._.js.map +1 -0
- package/.next/server/chunks/ssr/src_417bc4a6._.js +3 -0
- package/.next/server/chunks/ssr/src_417bc4a6._.js.map +1 -0
- package/.next/server/chunks/ssr/src_59477309._.js +3 -0
- package/.next/server/chunks/ssr/src_59477309._.js.map +1 -0
- package/.next/server/chunks/ssr/src_79d55c05._.js +3 -0
- package/.next/server/chunks/ssr/src_79d55c05._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js +1 -1
- package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_agents_[agentId]_agent-editor_tsx_f85bbe65._.js +1 -1
- package/.next/server/chunks/ssr/src_app_agents_[agentId]_agent-editor_tsx_f85bbe65._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_global-error_tsx_aa661ba4._.js +3 -0
- package/.next/server/chunks/ssr/src_app_global-error_tsx_aa661ba4._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_not-found_tsx_3f23d179._.js +3 -0
- package/.next/server/chunks/ssr/src_app_not-found_tsx_3f23d179._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_index_tsx_98393217._.js +3 -0
- package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_index_tsx_98393217._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_recipes_recipes-client_tsx_8ed3ca94._.js +1 -1
- package/.next/server/chunks/ssr/src_app_recipes_recipes-client_tsx_8ed3ca94._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js +12 -0
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js.map +1 -0
- package/.next/server/chunks/ssr/src_app_tickets_TicketsBoardClient_tsx_5e156ef3._.js +1 -1
- package/.next/server/chunks/ssr/src_app_tickets_TicketsBoardClient_tsx_5e156ef3._.js.map +1 -1
- package/.next/server/chunks/ssr/src_e54f24fb._.js +3 -0
- package/.next/server/chunks/ssr/src_e54f24fb._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +4 -4
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +16 -0
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/static/chunks/0edab8a24d59a626.js +2 -0
- package/.next/static/chunks/11da0a52793b005a.js +1 -0
- package/.next/static/chunks/150338287c7dae30.js +1 -0
- package/.next/static/chunks/236ef28eb649c432.js +1 -0
- package/.next/static/chunks/3e1fe6be993c61fb.js +1 -0
- package/.next/static/chunks/55a88f2071ebe766.js +1 -0
- package/.next/static/chunks/5cf42ef49ad071af.js +10 -0
- package/.next/static/chunks/62e0c437eb8fc2da.js +1 -0
- package/.next/static/chunks/{82abf2d65f5428ae.js → 68a088aa49e6124a.js} +3 -3
- package/.next/static/chunks/7bb0aafbf73524bf.js +1 -0
- package/.next/static/chunks/8d359fbce4ebb835.js +1 -0
- package/.next/static/chunks/9197ecb9606557f3.js +1 -0
- package/.next/static/chunks/93719e85369dd453.js +1 -0
- package/.next/static/chunks/b244476ded155cf9.css +3 -0
- package/.next/static/chunks/c75e00652e6b7d85.js +1 -0
- package/.next/static/chunks/c84580993f22c17a.js +1 -0
- package/.next/static/chunks/d73a47fc8def319c.js +1 -0
- package/.next/static/chunks/daa78a9d669e23f5.js +1 -0
- package/.next/static/chunks/db4da5ee45033817.js +1 -0
- package/.next/static/chunks/e8021fea9aee6b63.js +1 -0
- package/.next/static/chunks/e854e56ea8cb6236.js +1 -0
- package/.next/static/chunks/ffff6b5105288d2c.js +1 -0
- package/.next/static/chunks/{turbopack-ae1340e658f67df8.js → turbopack-0236a74c4f471967.js} +1 -1
- package/README.md +22 -1
- package/openclaw/index.ts +133 -26
- package/openclaw.plugin.json +9 -1
- package/package.json +24 -3
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/chef.jpg +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/src/app/HomeClient.tsx +8 -9
- package/src/app/agents/[agentId]/agent-editor-tabs.tsx +298 -0
- package/src/app/agents/[agentId]/agent-editor.tsx +200 -428
- package/src/app/api/__tests__/agents-add-route.test.ts +143 -0
- package/src/app/api/__tests__/agents-file-route.test.ts +117 -0
- package/src/app/api/__tests__/agents-files-route.test.ts +61 -0
- package/src/app/api/__tests__/agents-id-route.test.ts +104 -0
- package/src/app/api/__tests__/agents-identity-route.test.ts +92 -0
- package/src/app/api/__tests__/agents-route.test.ts +54 -0
- package/src/app/api/__tests__/agents-skills-install-route.test.ts +131 -0
- package/src/app/api/__tests__/agents-skills-route.test.ts +64 -0
- package/src/app/api/__tests__/agents-update-route.test.ts +95 -0
- package/src/app/api/__tests__/channels-bindings-route.test.ts +143 -0
- package/src/app/api/__tests__/cron-delete-route.test.ts +93 -0
- package/src/app/api/__tests__/cron-job-route.test.ts +78 -0
- package/src/app/api/__tests__/cron-jobs-route.test.ts +116 -0
- package/src/app/api/__tests__/cron-recipe-installed-route.test.ts +114 -0
- package/src/app/api/__tests__/gateway-restart-route.test.ts +36 -0
- package/src/app/api/__tests__/goals-promote-route.test.ts +200 -0
- package/src/app/api/__tests__/goals-route.test.ts +184 -0
- package/src/app/api/__tests__/ids-check-route.test.ts +188 -0
- package/src/app/api/__tests__/marketplace-recipes-route.test.ts +123 -0
- package/src/app/api/__tests__/recipes-clone-route.test.ts +221 -0
- package/src/app/api/__tests__/recipes-delete-route.test.ts +248 -0
- package/src/app/api/__tests__/recipes-id-route.test.ts +166 -0
- package/src/app/api/__tests__/recipes-route.test.ts +57 -0
- package/src/app/api/__tests__/recipes-team-agents-route.test.ts +135 -0
- package/src/app/api/__tests__/scaffold-route.test.ts +173 -0
- package/src/app/api/__tests__/settings-cron-installation-route.test.ts +82 -0
- package/src/app/api/__tests__/skills-available-route.test.ts +47 -0
- package/src/app/api/__tests__/swarms-start-route.test.ts +79 -0
- package/src/app/api/__tests__/swarms-status-route.test.ts +42 -0
- package/src/app/api/__tests__/teams-file-route.test.ts +129 -0
- package/src/app/api/__tests__/teams-files-route.test.ts +57 -0
- package/src/app/api/__tests__/teams-meta-route.test.ts +113 -0
- package/src/app/api/__tests__/teams-orchestrator-install-route.test.ts +66 -0
- package/src/app/api/__tests__/teams-orchestrator-route.test.ts +59 -0
- package/src/app/api/__tests__/teams-remove-team-route.test.ts +122 -0
- package/src/app/api/__tests__/teams-skills-install-route.test.ts +78 -0
- package/src/app/api/__tests__/teams-skills-route.test.ts +73 -0
- package/src/app/api/__tests__/teams-workflow-runs-route.test.ts +85 -0
- package/src/app/api/__tests__/teams-workflows-route.test.ts +110 -0
- package/src/app/api/__tests__/tickets-move-route.test.ts +60 -0
- package/src/app/api/agents/[id]/route.ts +33 -29
- package/src/app/api/agents/add/route.ts +38 -33
- package/src/app/api/agents/file/route.ts +14 -27
- package/src/app/api/agents/files/route.ts +7 -62
- package/src/app/api/agents/route.ts +3 -10
- package/src/app/api/agents/skills/install/route.ts +2 -14
- package/src/app/api/agents/skills/route.ts +6 -18
- package/src/app/api/channels/bindings/route.ts +6 -15
- package/src/app/api/cron/__tests__/helpers.test.ts +164 -0
- package/src/app/api/cron/delete/route.ts +4 -63
- package/src/app/api/cron/helpers.ts +172 -0
- package/src/app/api/cron/jobs/route.ts +24 -113
- package/src/app/api/cron/recipe-installed/route.ts +6 -4
- package/src/app/api/gateway/restart/route.ts +2 -1
- package/src/app/api/goals/[id]/promote/route.ts +10 -43
- package/src/app/api/goals/[id]/route.ts +10 -16
- package/src/app/api/goals/route.ts +3 -6
- package/src/app/api/ids/check/route.ts +18 -26
- package/src/app/api/marketplace/recipes/[slug]/route.ts +2 -2
- package/src/app/api/recipes/[id]/route.ts +3 -9
- package/src/app/api/recipes/clone/route.ts +3 -38
- package/src/app/api/recipes/custom-team/route.ts +193 -0
- package/src/app/api/recipes/delete/helpers.ts +65 -0
- package/src/app/api/recipes/delete/route.ts +11 -78
- package/src/app/api/recipes/team-agents/__tests__/helpers.test.ts +156 -0
- package/src/app/api/recipes/team-agents/helpers.ts +151 -0
- package/src/app/api/recipes/team-agents/route.ts +27 -125
- package/src/app/api/scaffold/__tests__/helpers.test.ts +186 -0
- package/src/app/api/scaffold/helpers.ts +214 -0
- package/src/app/api/scaffold/route.ts +40 -274
- package/src/app/api/settings/cron-installation/route.ts +3 -2
- package/src/app/api/skills/available/route.ts +2 -1
- package/src/app/api/swarms/start/route.ts +100 -0
- package/src/app/api/swarms/status/route.ts +31 -0
- package/src/app/api/teams/[teamId]/tickets/assign/route.ts +105 -0
- package/src/app/api/teams/[teamId]/tickets/assignees/route.ts +27 -0
- package/src/app/api/teams/[teamId]/tickets/delete/route.ts +55 -0
- package/src/app/api/teams/[teamId]/tickets/move/route.ts +70 -0
- package/src/app/api/teams/[teamId]/tickets/move-to-goals/route.ts +56 -0
- package/src/app/api/teams/file/route.ts +26 -47
- package/src/app/api/teams/files/route.ts +13 -45
- package/src/app/api/teams/memory/route.ts +250 -0
- package/src/app/api/teams/meta/route.ts +16 -35
- package/src/app/api/teams/orchestrator/install/route.ts +129 -0
- package/src/app/api/teams/orchestrator/route.ts +216 -0
- package/src/app/api/teams/remove-team/route.ts +7 -15
- package/src/app/api/teams/skills/install/route.ts +2 -13
- package/src/app/api/teams/skills/route.ts +6 -17
- package/src/app/api/teams/workflow-runs/route.ts +534 -0
- package/src/app/api/teams/workflow-templates/route.ts +71 -0
- package/src/app/api/teams/workflows/route.ts +55 -0
- package/src/app/api/tickets/assign/route.ts +94 -0
- package/src/app/api/tickets/assignees/route.ts +24 -0
- package/src/app/api/tickets/move/route.ts +31 -0
- package/src/app/channels/channels-client.tsx +48 -47
- package/src/app/cron-jobs/cron-jobs-client.tsx +11 -14
- package/src/app/cron-jobs/page.tsx +1 -1
- package/src/app/global-error.tsx +50 -0
- package/src/app/goals/[id]/goal-editor.tsx +74 -179
- package/src/app/goals/goals-client.tsx +30 -39
- package/src/app/goals/new/page.tsx +45 -124
- package/src/app/layout.tsx +8 -0
- package/src/app/manifest.ts +15 -0
- package/src/app/not-found.tsx +8 -0
- package/src/app/page.tsx +4 -31
- package/src/app/recipes/CreateAgentModal.tsx +98 -153
- package/src/app/recipes/CreateCustomTeamModal.tsx +375 -0
- package/src/app/recipes/CreateModalShell.tsx +55 -0
- package/src/app/recipes/CreateTeamModal.tsx +54 -105
- package/src/app/recipes/[id]/RecipeEditor/RecipeEditorCreateModal.tsx +72 -0
- package/src/app/recipes/[id]/RecipeEditor/RecipeEditorPanel.tsx +216 -0
- package/src/app/recipes/[id]/RecipeEditor/index.tsx +271 -0
- package/src/app/recipes/[id]/RecipeEditor/recipe-editor-utils.ts +46 -0
- package/src/app/recipes/[id]/RecipeEditor/types.ts +52 -0
- package/src/app/recipes/[id]/page.tsx +4 -18
- package/src/app/recipes/page.tsx +9 -2
- package/src/app/recipes/recipes-client.tsx +266 -156
- package/src/app/settings/page.tsx +1 -1
- package/src/app/settings/settings-client.tsx +11 -10
- package/src/app/teams/[teamId]/CloneTeamModal.tsx +77 -111
- package/src/app/teams/[teamId]/OrchestratorPanel.tsx +255 -0
- package/src/app/teams/[teamId]/OrchestratorSetupModal.tsx +184 -0
- package/src/app/teams/[teamId]/PublishChangesModal.tsx +21 -42
- package/src/app/teams/[teamId]/page.tsx +27 -49
- package/src/app/teams/[teamId]/team-editor/TeamAgentsTab.tsx +145 -0
- package/src/app/teams/[teamId]/team-editor/TeamCronTab.tsx +72 -0
- package/src/app/teams/[teamId]/team-editor/TeamFilesTab.tsx +74 -0
- package/src/app/teams/[teamId]/team-editor/TeamMemoryTab.tsx +349 -0
- package/src/app/teams/[teamId]/team-editor/TeamRecipeTab.tsx +151 -0
- package/src/app/teams/[teamId]/team-editor/TeamSkillsTab.tsx +68 -0
- package/src/app/teams/[teamId]/team-editor/index.tsx +558 -0
- package/src/app/teams/[teamId]/team-editor/team-editor-data.ts +255 -0
- package/src/app/teams/[teamId]/team-editor/team-editor-utils.ts +78 -0
- package/src/app/teams/[teamId]/team-editor/types.ts +34 -0
- package/src/app/teams/[teamId]/tickets/[ticket]/page.tsx +35 -0
- package/src/app/teams/[teamId]/tickets/page.tsx +15 -0
- package/src/app/teams/[teamId]/workflows/[workflowId]/WorkflowCanvas.tsx +111 -0
- package/src/app/teams/[teamId]/workflows/[workflowId]/page.tsx +27 -0
- package/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx +1608 -0
- package/src/app/teams/[teamId]/workflows/page.tsx +40 -0
- package/src/app/teams/[teamId]/workflows/workflows-client.tsx +494 -0
- package/src/app/tickets/TicketDetailClient.tsx +147 -0
- package/src/app/tickets/TicketsBoardClient.tsx +11 -57
- package/src/app/tickets/[ticket]/TicketAssignControl.tsx +112 -0
- package/src/app/tickets/[ticket]/page.tsx +13 -21
- package/src/app/tickets/page.tsx +5 -2
- package/src/components/AppShell.tsx +252 -31
- package/src/{app/cron-jobs/DeleteCronJobModal.tsx → components/ConfirmationModal.tsx} +35 -17
- package/src/components/DeleteEntityModal.tsx +41 -0
- package/src/components/ErrorBoundary.tsx +70 -0
- package/src/components/FileListWithOptionalToggle.tsx +86 -0
- package/src/components/GoalFormFields.tsx +163 -0
- package/src/components/ScaffoldOverlay.tsx +7 -10
- package/src/components/ToastProvider.tsx +22 -18
- package/src/components/__tests__/ConfirmationModal.test.tsx +109 -0
- package/src/components/__tests__/ErrorBoundary.test.tsx +39 -0
- package/src/components/__tests__/FileListWithOptionalToggle.test.tsx +109 -0
- package/src/components/__tests__/GoalFormFields.test.tsx +117 -0
- package/src/components/delete-modals.tsx +59 -0
- package/src/components/icons.tsx +12 -10
- package/src/lib/__tests__/agent-workspace.test.ts +44 -0
- package/src/lib/__tests__/agents.test.ts +36 -0
- package/src/lib/__tests__/api-route-helpers.test.ts +188 -0
- package/src/lib/__tests__/cron.test.ts +45 -0
- package/src/lib/__tests__/editor-utils.test.ts +38 -0
- package/src/lib/__tests__/errors.test.ts +15 -0
- package/src/lib/__tests__/exec.test.ts +13 -0
- package/src/lib/__tests__/fetch-json.test.ts +118 -0
- package/src/lib/__tests__/gateway.test.ts +234 -0
- package/src/lib/__tests__/goal-promote.test.ts +39 -0
- package/src/lib/__tests__/goals-client.test.ts +26 -0
- package/src/lib/__tests__/goals.test.ts +275 -0
- package/src/lib/__tests__/json.test.ts +15 -0
- package/src/lib/__tests__/kitchen-api.test.ts +32 -0
- package/src/lib/__tests__/marketplace.test.ts +116 -0
- package/src/lib/__tests__/openclaw.test.ts +129 -0
- package/src/lib/__tests__/paths.test.ts +136 -0
- package/src/lib/__tests__/poll.test.ts +26 -0
- package/src/lib/__tests__/recipe-clone.test.ts +85 -0
- package/src/lib/__tests__/recipe-team-agents.test.ts +70 -0
- package/src/lib/__tests__/recipes.test.ts +199 -0
- package/src/lib/__tests__/scaffold-client.test.ts +106 -0
- package/src/lib/__tests__/scaffold.test.ts +64 -0
- package/src/lib/__tests__/slugify.test.ts +23 -0
- package/src/lib/__tests__/tickets.test.ts +158 -0
- package/src/lib/__tests__/type-guards.test.ts +18 -0
- package/src/lib/__tests__/use-slugified-id.test.tsx +120 -0
- package/src/lib/agents.ts +17 -0
- package/src/lib/api-route-helpers.ts +157 -0
- package/src/lib/cron.ts +40 -0
- package/src/lib/editor-utils.ts +18 -0
- package/src/lib/errors.ts +7 -0
- package/src/lib/exec.ts +4 -0
- package/src/lib/fetch-json.ts +29 -0
- package/src/lib/gateway.ts +5 -1
- package/src/lib/goal-promote.ts +27 -0
- package/src/lib/goals-client.ts +69 -0
- package/src/lib/goals.ts +22 -3
- package/src/lib/json.ts +10 -0
- package/src/lib/openclaw.ts +28 -13
- package/src/lib/paths.ts +12 -0
- package/src/lib/poll.ts +18 -0
- package/src/lib/recipe-clone.ts +42 -0
- package/src/lib/recipe-team-agents.ts +30 -0
- package/src/lib/recipes.ts +47 -0
- package/src/lib/scaffold-client.ts +31 -0
- package/src/lib/scaffold.ts +37 -0
- package/src/lib/slugify.ts +25 -0
- package/src/lib/swarms.ts +25 -0
- package/src/lib/tickets.ts +81 -25
- package/src/lib/type-guards.ts +3 -0
- package/src/lib/use-slugified-id.ts +35 -0
- package/src/lib/workflows/README.md +11 -0
- package/src/lib/workflows/__tests__/storage.test.ts +129 -0
- package/src/lib/workflows/__tests__/validate.test.ts +92 -0
- package/src/lib/workflows/api-handlers.ts +35 -0
- package/src/lib/workflows/readdir.ts +23 -0
- package/src/lib/workflows/runs-storage.ts +59 -0
- package/src/lib/workflows/runs-types.ts +42 -0
- package/src/lib/workflows/storage.ts +70 -0
- package/src/lib/workflows/templates/index.ts +1 -0
- package/src/lib/workflows/templates/marketing-cadence-v1.ts +142 -0
- package/src/lib/workflows/types.ts +48 -0
- package/src/lib/workflows/validate.ts +92 -0
- package/.next/server/app/tickets.html +0 -1
- package/.next/server/app/tickets.meta +0 -15
- package/.next/server/app/tickets.rsc +0 -19
- package/.next/server/app/tickets.segments/_full.segment.rsc +0 -19
- package/.next/server/app/tickets.segments/_head.segment.rsc +0 -6
- package/.next/server/app/tickets.segments/_index.segment.rsc +0 -6
- package/.next/server/app/tickets.segments/_tree.segment.rsc +0 -4
- package/.next/server/app/tickets.segments/tickets/__PAGE__.segment.rsc +0 -8
- package/.next/server/app/tickets.segments/tickets.segment.rsc +0 -4
- package/.next/server/chunks/[root-of-the-server]__055885ce._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__055885ce._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0c01c5c7._.js +0 -10
- package/.next/server/chunks/[root-of-the-server]__0c01c5c7._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1398a33a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1398a33a._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__159c002b._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__159c002b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__20c60fb7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20c60fb7._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__2588560d._.js +0 -6
- package/.next/server/chunks/[root-of-the-server]__2588560d._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__27293e91._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__27293e91._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__29c85a51._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__29c85a51._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__29fa8108._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__29fa8108._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__2bd44067._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2bd44067._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__2dd1afff._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2dd1afff._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__401ab759._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__401ab759._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__422c7160._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__422c7160._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__4670294e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__4670294e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__4eda99a9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__4eda99a9._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__54478298._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__54478298._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6dbdb384._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6dbdb384._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__94d68aa3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__94d68aa3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__9ecbb339._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__9ecbb339._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a27f8405._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__a27f8405._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a6ac3ddf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b11231a9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b11231a9._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b59b3cdd._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b59b3cdd._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b5c2b370._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b5c2b370._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b955e35a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b955e35a._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__be5f57b2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__c4ff0427._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__c4ff0427._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__c4ffbb03._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__c4ffbb03._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__d737ca42._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__d737ca42._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__df7df3ac._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__df7df3ac._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__dfca6557._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__dfca6557._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e6184ba3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e6184ba3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__ed0323e9._.js +0 -8
- package/.next/server/chunks/[root-of-the-server]__ed0323e9._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__f585823b._.js +0 -6
- package/.next/server/chunks/[root-of-the-server]__f585823b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__ff940674._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__ff940674._.js.map +0 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_5a9305ea.js +0 -6
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_5a9305ea.js.map +0 -1
- package/.next/server/chunks/src_lib_d2210cbf._.js +0 -3
- package/.next/server/chunks/src_lib_d2210cbf._.js.map +0 -1
- package/.next/server/chunks/ssr/[externals]__c37e9f91._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__15600e29._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__247198dc._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__2a6f1e3e._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__346f79e5._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__346f79e5._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3575e6da._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__3ad3e5b1._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__3bc7ad0a._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__4393e897._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__4393e897._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__46e08d44._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__491e06fa._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__491e06fa._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__507d2fc9._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__507d2fc9._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__5d24d429._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__5d24d429._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__7180d770._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__82ce3aee._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__82ce3aee._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__8d24c9c3._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__8d24c9c3._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__a457c799._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__a457c799._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__bc3b27b0._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__bc3b27b0._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__f75a61bf._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__f75a61bf._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__fd669584._.js +0 -3
- package/.next/server/chunks/ssr/_0808c2b9._.js.map +0 -1
- package/.next/server/chunks/ssr/_1aad1d9b._.js +0 -24
- package/.next/server/chunks/ssr/_1aad1d9b._.js.map +0 -1
- package/.next/server/chunks/ssr/_3158c108._.js.map +0 -1
- package/.next/server/chunks/ssr/_39e6e769._.js.map +0 -1
- package/.next/server/chunks/ssr/_3c8b2df6._.js.map +0 -1
- package/.next/server/chunks/ssr/_5070929e._.js +0 -3
- package/.next/server/chunks/ssr/_5070929e._.js.map +0 -1
- package/.next/server/chunks/ssr/_68793c1f._.js.map +0 -1
- package/.next/server/chunks/ssr/_6e70b5a4._.js.map +0 -1
- package/.next/server/chunks/ssr/_8c45edba._.js.map +0 -1
- package/.next/server/chunks/ssr/_8c8207c1._.js.map +0 -1
- package/.next/server/chunks/ssr/_92140ca3._.js.map +0 -1
- package/.next/server/chunks/ssr/_b5e9afcc._.js.map +0 -1
- package/.next/server/chunks/ssr/_cd23c5af._.js.map +0 -1
- package/.next/server/chunks/ssr/_d27483a1._.js.map +0 -1
- package/.next/server/chunks/ssr/_da6f800e._.js.map +0 -1
- package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js +0 -3
- package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_12287b3d._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_852965c2._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_852965c2._.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_45780354.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js +0 -3
- package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_ece394eb.js.map +0 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_68c68167.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_channels_channels-client_tsx_8c8be116._.js +0 -3
- package/.next/server/chunks/ssr/src_app_channels_channels-client_tsx_8c8be116._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_goals_[id]_goal-editor_tsx_7df8193f._.js +0 -3
- package/.next/server/chunks/ssr/src_app_goals_[id]_goal-editor_tsx_7df8193f._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_goals_goals-client_tsx_a45eeff4._.js +0 -3
- package/.next/server/chunks/ssr/src_app_goals_goals-client_tsx_a45eeff4._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_goals_new_page_tsx_8f749229._.js +0 -3
- package/.next/server/chunks/ssr/src_app_goals_new_page_tsx_8f749229._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_tsx_c6d38350._.js +0 -3
- package/.next/server/chunks/ssr/src_app_recipes_[id]_RecipeEditor_tsx_c6d38350._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_settings_settings-client_tsx_279084f8._.js +0 -3
- package/.next/server/chunks/ssr/src_app_settings_settings-client_tsx_279084f8._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_tsx_2900b91d._.js +0 -12
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_tsx_2900b91d._.js.map +0 -1
- package/.next/static/chunks/10cbf02e6fc36465.js +0 -2
- package/.next/static/chunks/1ce21af6dfb18ee3.js +0 -1
- package/.next/static/chunks/40f7fde35327d214.js +0 -1
- package/.next/static/chunks/54beb791bcc086ae.js +0 -1
- package/.next/static/chunks/55866d57aa2c7a9c.js +0 -1
- package/.next/static/chunks/6a7862e37c616cc3.js +0 -1
- package/.next/static/chunks/817ae077ec8c6255.js +0 -1
- package/.next/static/chunks/8484c54dc9a377e8.js +0 -10
- package/.next/static/chunks/8662fcc3cdff66f3.js +0 -1
- package/.next/static/chunks/99208ebf7e47471d.js +0 -1
- package/.next/static/chunks/a4e69b85b74277a7.css +0 -3
- package/.next/static/chunks/a9ed074e89b16a5e.js +0 -1
- package/.next/static/chunks/c6dfa918cafb6c0c.js +0 -1
- package/.next/static/chunks/d1c5f764e5fd615a.js +0 -1
- package/.next/static/chunks/d4ce2f908d8c4dea.js +0 -1
- package/.next/static/chunks/de9e30e86ef31e72.js +0 -1
- package/src/app/recipes/DeleteRecipeModal.tsx +0 -62
- package/src/app/recipes/[id]/RecipeEditor.tsx +0 -697
- package/src/app/teams/[teamId]/DeleteTeamModal.tsx +0 -54
- package/src/app/teams/[teamId]/team-editor.tsx +0 -1195
- /package/.next/server/chunks/{[root-of-the-server]__74b80ca4._.js.map → [root-of-the-server]__c63a9f28._.js.map} +0 -0
- /package/.next/server/chunks/{ssr/[externals]__c37e9f91._.js.map → _next-internal_server_app_api_recipes_custom-team_route_actions_861b1489.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__3bc7ad0a._.js.map → [root-of-the-server]__0d4cb2ba._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__e2e52c6e._.js.map → [root-of-the-server]__78cdd31e._.js.map} +0 -0
- /package/.next/static/{QOy0ilqTW1kHfmpls_oWp → z9yFlFZ5f_hw9mm0nfMJl}/_buildManifest.js +0 -0
- /package/.next/static/{QOy0ilqTW1kHfmpls_oWp → z9yFlFZ5f_hw9mm0nfMJl}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{QOy0ilqTW1kHfmpls_oWp → z9yFlFZ5f_hw9mm0nfMJl}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},5003,e=>{"use strict";var t=e.i(59494);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=String(t.stdout??""),a=String(t.stderr??""),i="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==i)return{ok:!1,exitCode:i,stdout:n,stderr:a};return{ok:!0,exitCode:0,stdout:n,stderr:a}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:"string"==typeof t.stdout?t.stdout:"",stderr:"string"==typeof t.stderr?t.stderr:"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},7367,e=>{"use strict";var t=e.i(12714),r=e.i(60526),n=e.i(50227);async function a(){let e=n.default.join(r.default.homedir(),".openclaw","openclaw.json");return JSON.parse(await t.default.readFile(e,"utf8"))}async function i(){let e=await a(),t=e.agents?.defaults?.workspace;if(!t)throw Error("agents.defaults.workspace is not set in ~/.openclaw/openclaw.json");return t}async function s(){let e=await i();return n.default.join(e,"recipes")}async function o(){let e=await i();return n.default.join(e,"notes","goals")}async function l(e){let t=r.default.homedir();if(!t)throw Error("Could not resolve home directory");return n.default.join(t,".openclaw",`workspace-${e}`)}async function u(){let e=await a(),t=e.plugins?.installs?.recipes?.installPath||e.plugins?.installs?.recipes?.sourcePath||e.plugins?.load?.paths?.[0];if(!t)throw Error("Could not determine recipes plugin install path from ~/.openclaw/openclaw.json");return n.default.join(t,"recipes","default")}e.s(["getBuiltinRecipesDir",()=>u,"getTeamWorkspaceDir",()=>l,"getWorkspaceDir",()=>i,"getWorkspaceGoalsDir",()=>o,"getWorkspaceRecipesDir",()=>s,"readOpenClawConfig",()=>a])},5365,(e,t,r)=>{t.exports=e.x("process",()=>require("process"))},874,(e,t,r)=>{t.exports=e.x("buffer",()=>require("buffer"))},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},72915,e=>{"use strict";var t=e.i(12714),r=e.i(50227),n=e.i(23008),a=e.i(7367);function i(e){if(!e.startsWith("---\n"))throw Error("Recipe markdown must start with YAML frontmatter (---)");let t=e.indexOf("\n---\n",4);if(-1===t)throw Error("Recipe frontmatter not terminated (---)");let r=e.slice(4,t+1),a=n.default.parse(r);if(!a?.id)throw Error("Recipe frontmatter must include id");return a.id}async function s(e){let t="builtin"===e.source?await (0,a.getBuiltinRecipesDir)():await (0,a.getWorkspaceRecipesDir)();return r.default.join(t,`${e.id}.md`)}async function o(e,n){await t.default.mkdir(r.default.dirname(e),{recursive:!0}),await t.default.writeFile(e,n,"utf8")}e.s(["parseFrontmatterId",()=>i,"resolveRecipePath",()=>s,"writeRecipeFile",()=>o])},64965,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),i=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),p=e.i(47587),c=e.i(66012),f=e.i(70101),h=e.i(26937),w=e.i(10372),x=e.i(93695);e.i(52474);var R=e.i(220),m=e.i(66680),g=e.i(89171),v=e.i(5003),y=e.i(72915);async function C(e,{params:t}){var r;let{id:n}=await t,a=JSON.parse((await (0,v.runOpenClaw)(["recipes","list"])).stdout).find(e=>e.id===n);if(!a)return g.NextResponse.json({error:`Recipe not found: ${n}`},{status:404});let i=await (0,v.runOpenClaw)(["recipes","show",n]),s=await (0,y.resolveRecipePath)(a).catch(()=>null),o=(r=i.stdout,m.default.createHash("sha256").update(r,"utf8").digest("hex"));return g.NextResponse.json({recipe:{...a,content:i.stdout,filePath:s},recipeHash:o,stderr:i.stderr})}async function E(e,{params:t}){let r,{id:n}=await t,a=await e.json();if("string"!=typeof a.content)return g.NextResponse.json({error:"Missing content"},{status:400});try{r=(0,y.parseFrontmatterId)(a.content)}catch(e){return g.NextResponse.json({error:e.message},{status:400})}if(r!==n)return g.NextResponse.json({error:`Frontmatter id (${r}) must match URL id (${n})`},{status:400});let i=JSON.parse((await (0,v.runOpenClaw)(["recipes","list"])).stdout).find(e=>e.id===n);if(!i)return g.NextResponse.json({error:`Recipe not found: ${n}`},{status:404});if("builtin"===i.source)return g.NextResponse.json({error:`Recipe ${n} is builtin and cannot be modified`},{status:403});let s=await (0,y.resolveRecipePath)(i);return await (0,y.writeRecipeFile)(s,a.content),g.NextResponse.json({ok:!0,filePath:s})}e.s(["GET",()=>C,"PUT",()=>E],89749);var b=e.i(89749);let k=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/recipes/[id]/route",pathname:"/api/recipes/[id]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/recipes/[id]/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:j,workUnitAsyncStorage:N,serverHooks:A}=k;function O(){return(0,n.patchFetch)({workAsyncStorage:j,workUnitAsyncStorage:N})}async function P(e,t,n){k.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/recipes/[id]/route";m=m.replace(/\/index$/,"")||"/";let g=await k.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,params:y,nextConfig:C,parsedUrl:E,isDraftMode:b,prerenderManifest:j,routerServerContext:N,isOnDemandRevalidate:A,revalidateOnlyGenerated:O,resolvedPathname:P,clientReferenceManifest:T,serverActionsManifest:q}=g,S=(0,o.normalizeAppPath)(m),_=!!(j.dynamicRoutes[S]||j.routes[P]),D=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!b){let e=!!j.routes[P],t=j.dynamicRoutes[S];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await D();throw new x.NoFallbackError}}let H=null;!_||k.isDev||b||(H="/index"===(H=P)?"/":H);let I=!0===k.isDev||!_,U=_&&!I;q&&T&&(0,s.setManifestsSingleton)({page:m,clientReferenceManifest:T,serverActionsManifest:q});let $=e.method||"GET",F=(0,i.getTracer)(),M=F.getActiveScopeSpan(),K={params:y,prerenderManifest:j,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:I,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>k.onRequestError(e,t,n,a,N)},sharedContext:{buildId:v}},W=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t));try{let s=async e=>k.handle(L,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${m}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var i,l;let u=async({previousCacheEntry:r})=>{try{if(!o&&A&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!_)return await (0,c.sendResponse)(W,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(i.headers);u&&(t[w.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=w.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=w.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await k.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,N),t}},d=await k.handleResponse({req:e,nextConfig:C,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:j,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:O,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:o});if(!_)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let x=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return o&&_||x.delete(w.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||x.get("Cache-Control")||x.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,c.sendResponse)(W,B,new Response(d.value.body,{headers:x,status:d.value.status||200})),null};M?await l(M):await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${$} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},l))}catch(t){if(t instanceof x.NoFallbackError||await k.onRequestError(e,t,{routerKind:"App Router",routePath:S,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,N),_)throw t;return await (0,c.sendResponse)(W,B,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>O,"routeModule",()=>k,"serverHooks",()=>A,"workAsyncStorage",()=>j,"workUnitAsyncStorage",()=>N],64965)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__c4ff0427._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/paths.ts","../../../src/lib/recipes.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/recipes/%5Bid%5D/route.ts"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // Avoid child_process usage in plugin code (triggers OpenClaw install-time safety warnings).\n // Delegate to the OpenClaw runtime helper instead.\n const api = getKitchenApi();\n\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode =\n typeof res.exitCode === \"number\"\n ? res.exitCode\n : typeof res.code === \"number\"\n ? res.code\n : typeof res.status === \"number\"\n ? res.status\n : 0;\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = typeof err.stdout === \"string\" ? err.stdout : \"\";\n const stderr = typeof err.stderr === \"string\" ? err.stderr : typeof err.message === \"string\" ? err.message : String(e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\ntype OpenClawConfig = {\n agents?: { defaults?: { workspace?: string } };\n gateway?: { port?: number; auth?: { token?: string } };\n tools?: {\n agentToAgent?: {\n enabled?: boolean;\n allow?: string[];\n };\n };\n plugins?: {\n installs?: { recipes?: { installPath?: string; sourcePath?: string } };\n load?: { paths?: string[] };\n };\n};\n\nexport async function readOpenClawConfig(): Promise<OpenClawConfig> {\n const p = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");\n const text = await fs.readFile(p, \"utf8\");\n return JSON.parse(text) as OpenClawConfig;\n}\n\nexport async function getWorkspaceDir() {\n const cfg = await readOpenClawConfig();\n const ws = cfg.agents?.defaults?.workspace;\n if (!ws) throw new Error(\"agents.defaults.workspace is not set in ~/.openclaw/openclaw.json\");\n return ws;\n}\n\nexport async function getWorkspaceRecipesDir() {\n const ws = await getWorkspaceDir();\n return path.join(ws, \"recipes\");\n}\n\nexport async function getWorkspaceGoalsDir() {\n const ws = await getWorkspaceDir();\n return path.join(ws, \"notes\", \"goals\");\n}\n\nexport async function getTeamWorkspaceDir(teamId: string) {\n const home = os.homedir();\n if (!home) throw new Error(\"Could not resolve home directory\");\n return path.join(home, \".openclaw\", `workspace-${teamId}`);\n}\n\nexport async function getBuiltinRecipesDir() {\n const cfg = await readOpenClawConfig();\n const p =\n cfg.plugins?.installs?.recipes?.installPath ||\n cfg.plugins?.installs?.recipes?.sourcePath ||\n cfg.plugins?.load?.paths?.[0];\n if (!p) throw new Error(\"Could not determine recipes plugin install path from ~/.openclaw/openclaw.json\");\n return path.join(p, \"recipes\", \"default\");\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport YAML from \"yaml\";\nimport { getBuiltinRecipesDir, getWorkspaceRecipesDir } from \"./paths\";\n\nexport type RecipeListItem = {\n id: string;\n name: string;\n kind: \"agent\" | \"team\";\n source: \"builtin\" | \"workspace\";\n};\n\nexport type RecipeDetail = RecipeListItem & {\n content: string;\n filePath: string | null;\n};\n\nexport function parseFrontmatterId(md: string): string {\n if (!md.startsWith(\"---\\n\")) throw new Error(\"Recipe markdown must start with YAML frontmatter (---)\");\n const end = md.indexOf(\"\\n---\\n\", 4);\n if (end === -1) throw new Error(\"Recipe frontmatter not terminated (---)\");\n const yamlText = md.slice(4, end + 1);\n const fm = YAML.parse(yamlText) as { id?: string };\n if (!fm?.id) throw new Error(\"Recipe frontmatter must include id\");\n return fm.id;\n}\n\nexport async function resolveRecipePath(item: RecipeListItem): Promise<string> {\n const dir = item.source === \"builtin\" ? await getBuiltinRecipesDir() : await getWorkspaceRecipesDir();\n // Current convention: <id>.md in the directory.\n return path.join(dir, `${item.id}.md`);\n}\n\nexport async function readRecipe(item: RecipeListItem, contentFromCli: string): Promise<RecipeDetail> {\n // Prefer CLI-provided markdown, but also compute path for saving.\n let filePath: string | null = null;\n try {\n filePath = await resolveRecipePath(item);\n } catch {\n filePath = null;\n }\n return { ...item, content: contentFromCli, filePath };\n}\n\nexport async function writeRecipeFile(filePath: string, md: string) {\n await fs.mkdir(path.dirname(filePath), { recursive: true });\n await fs.writeFile(filePath, md, \"utf8\");\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/recipes/[id]/route\",\n pathname: \"/api/recipes/[id]\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/recipes/[id]/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/recipes/[id]/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import crypto from \"node:crypto\";\nimport { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { parseFrontmatterId, resolveRecipePath, type RecipeListItem, writeRecipeFile } from \"@/lib/recipes\";\n\nfunction sha256(text: string) {\n return crypto.createHash(\"sha256\").update(text, \"utf8\").digest(\"hex\");\n}\n\nexport async function GET(\n _req: Request,\n { params }: { params: Promise<{ id: string }> }\n) {\n const { id } = await params;\n\n // Get list to learn the source (builtin/workspace) and metadata.\n const list = await runOpenClaw([\"recipes\", \"list\"]);\n const recipes = JSON.parse(list.stdout) as RecipeListItem[];\n const item = recipes.find((r) => r.id === id);\n if (!item) return NextResponse.json({ error: `Recipe not found: ${id}` }, { status: 404 });\n\n const shown = await runOpenClaw([\"recipes\", \"show\", id]);\n const filePath = await resolveRecipePath(item).catch(() => null);\n\n const recipeHash = sha256(shown.stdout);\n\n return NextResponse.json({ recipe: { ...item, content: shown.stdout, filePath }, recipeHash, stderr: shown.stderr });\n}\n\nexport async function PUT(\n req: Request,\n { params }: { params: Promise<{ id: string }> }\n) {\n const { id } = await params;\n const body = (await req.json()) as { content?: string };\n if (typeof body.content !== \"string\") {\n return NextResponse.json({ error: \"Missing content\" }, { status: 400 });\n }\n\n // Validate frontmatter id matches route id.\n let parsedId: string;\n try {\n parsedId = parseFrontmatterId(body.content);\n } catch (e) {\n return NextResponse.json({ error: (e as Error).message }, { status: 400 });\n }\n if (parsedId !== id) {\n return NextResponse.json(\n { error: `Frontmatter id (${parsedId}) must match URL id (${id})` },\n { status: 400 }\n );\n }\n\n // Determine source/path via list.\n const list = await runOpenClaw([\"recipes\", \"list\"]);\n const recipes = JSON.parse(list.stdout) as RecipeListItem[];\n const item = recipes.find((r) => r.id === id);\n if (!item) return NextResponse.json({ error: `Recipe not found: ${id}` }, { status: 404 });\n\n if (item.source === \"builtin\") {\n return NextResponse.json({ error: `Recipe ${id} is builtin and cannot be modified` }, { status: 403 });\n }\n\n const filePath = await resolveRecipePath(item);\n await writeRecipeFile(filePath, body.content);\n\n return NextResponse.json({ ok: true, filePath });\n}\n"],"names":[],"mappings":"uCAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,qDClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAY,CAAc,EAG9C,IAAM,EAAM,CAAA,EAAA,EAAA,aAAA,AAAa,IAEzB,GAAI,CACF,IAAM,EAAO,MAAM,EA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ACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[5003,e=>{"use strict";var t=e.i(59494);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=String(t.stdout??""),a=String(t.stderr??""),s="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==s)return{ok:!1,exitCode:s,stdout:n,stderr:a};return{ok:!0,exitCode:0,stdout:n,stderr:a}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:"string"==typeof t.stdout?t.stdout:"",stderr:"string"==typeof t.stderr?t.stderr:"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},64145,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),x=e.i(26937),g=e.i(10372),R=e.i(93695);e.i(52474);var f=e.i(220),m=e.i(89171),v=e.i(5003);async function w(){try{let{stdout:e,stderr:t}=await (0,v.runOpenClaw)(["agents","list","--json"]),r=JSON.parse(e);return m.NextResponse.json({agents:r,stderr:t||void 0})}catch(e){return m.NextResponse.json({error:"Failed to list agents",message:e instanceof Error?e.message:String(e)},{status:500})}}e.s(["GET",()=>w],62603);var y=e.i(62603);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/route",pathname:"/api/agents",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/route.ts",nextConfigOutput:"standalone",userland:y}),{workAsyncStorage:C,workUnitAsyncStorage:b,serverHooks:A}=E;function T(){return(0,n.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:b})}async function N(e,t,n){E.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/agents/route";m=m.replace(/\/index$/,"")||"/";let v=await E.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:C,parsedUrl:b,isDraftMode:A,prerenderManifest:T,routerServerContext:N,isOnDemandRevalidate:k,revalidateOnlyGenerated:O,resolvedPathname:P,clientReferenceManifest:S,serverActionsManifest:_}=v,j=(0,i.normalizeAppPath)(m),q=!!(T.dynamicRoutes[j]||T.routes[P]),H=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,b,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!T.routes[P],t=T.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await H();throw new R.NoFallbackError}}let I=null;!q||E.isDev||A||(I="/index"===(I=P)?"/":I);let U=!0===E.isDev||!q,D=q&&!U;_&&S&&(0,o.setManifestsSingleton)({page:m,clientReferenceManifest:S,serverActionsManifest:_});let M=e.method||"GET",K=(0,s.getTracer)(),F=K.getActiveScopeSpan(),$={params:y,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:C.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>E.onRequestError(e,t,n,a,N)},sharedContext:{buildId:w}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let o=async e=>E.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${m}`)}),i=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&k&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(a);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=$.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(B,L,s,$.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:k})},!1,N),t}},u=await E.handleResponse({req:e,nextConfig:C,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:i});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&q||R.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(B,L,new Response(u.value.body,{headers:R,status:u.value.status||200})),null};F?await l(F):await K.withPropagatedContext(e.headers,()=>K.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:k})},!1,N),q)throw t;return await (0,c.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>T,"routeModule",()=>E,"serverHooks",()=>A,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>b],64145)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__c4ffbb03._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/openclaw.ts","../../../src/lib/kitchen-api.ts","../../../src/app/api/agents/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { getKitchenApi } from \"@/lib/kitchen-api\";\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // Avoid child_process usage in plugin code (triggers OpenClaw install-time safety warnings).\n // Delegate to the OpenClaw runtime helper instead.\n const api = getKitchenApi();\n\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode =\n typeof res.exitCode === \"number\"\n ? res.exitCode\n : typeof res.code === \"number\"\n ? res.code\n : typeof res.status === \"number\"\n ? res.status\n : 0;\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = typeof err.stdout === \"string\" ? err.stdout : \"\";\n const stderr = typeof err.stderr === \"string\" ? err.stderr : typeof err.message === \"string\" ? err.message : String(e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { NextResponse } from \"next/server\";\n\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\ntype AgentListItem = {\n id: string;\n identityName?: string;\n workspace?: string;\n model?: string;\n isDefault?: boolean;\n};\n\nexport async function GET() {\n try {\n const { stdout, stderr } = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n\n const agents = JSON.parse(stdout) as AgentListItem[];\n\n return NextResponse.json({ agents, stderr: stderr || undefined });\n } catch (err) {\n return NextResponse.json(\n {\n error: \"Failed to list agents\",\n message: err instanceof Error ? err.message : String(err),\n },\n { status: 500 },\n );\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/route\",\n pathname: \"/api/agents\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/agents/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"sCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAY,CAAc,EAG9C,IAAM,EAAM,CAAA,EAAA,EAAA,aAAA,AAA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Y,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[3]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[5003,e=>{"use strict";var t=e.i(59494);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=String(t.stdout??""),a=String(t.stderr??""),s="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==s)return{ok:!1,exitCode:s,stdout:n,stderr:a};return{ok:!0,exitCode:0,stdout:n,stderr:a}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:"string"==typeof t.stdout?t.stdout:"",stderr:"string"==typeof t.stderr?t.stderr:"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},70628,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),m=e.i(26937),x=e.i(10372),g=e.i(93695);e.i(52474);var R=e.i(220),f=e.i(89171),v=e.i(5003);async function y(e){try{let t=await e.json(),r=t.agentId?.trim();if(!r)return f.NextResponse.json({error:"agentId is required"},{status:400});let n=["agents","set-identity",r];t.name?.trim()&&n.push("--name",t.name.trim()),t.emoji?.trim()&&n.push("--emoji",t.emoji.trim()),t.theme?.trim()&&n.push("--theme",t.theme.trim()),t.avatar?.trim()&&n.push("--avatar",t.avatar.trim());let{stdout:a,stderr:s}=await (0,v.runOpenClaw)(n);return f.NextResponse.json({ok:!0,stdout:a,stderr:s})}catch(e){return f.NextResponse.json({error:"Failed to set agent identity",message:e instanceof Error?e.message:String(e)},{status:500})}}e.s(["POST",()=>y],92455);var w=e.i(92455);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/identity/route",pathname:"/api/agents/identity",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/identity/route.ts",nextConfigOutput:"standalone",userland:w}),{workAsyncStorage:E,workUnitAsyncStorage:b,serverHooks:A}=C;function T(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:b})}async function k(e,t,n){C.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/agents/identity/route";f=f.replace(/\/index$/,"")||"/";let v=await C.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:y,params:w,nextConfig:E,parsedUrl:b,isDraftMode:A,prerenderManifest:T,routerServerContext:k,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:P,clientReferenceManifest:j,serverActionsManifest:S}=v,_=(0,o.normalizeAppPath)(f),q=!!(T.dynamicRoutes[_]||T.routes[P]),I=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,b,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!T.routes[P],t=T.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await I();throw new g.NoFallbackError}}let H=null;!q||C.isDev||A||(H="/index"===(H=P)?"/":H);let U=!0===C.isDev||!q,D=q&&!U;S&&j&&(0,i.setManifestsSingleton)({page:f,clientReferenceManifest:j,serverActionsManifest:S});let M=e.method||"GET",K=(0,s.getTracer)(),F=K.getActiveScopeSpan(),$={params:w,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>C.onRequestError(e,t,n,a,k)},sharedContext:{buildId:y}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>C.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${f}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&N&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=$.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(B,L,s,$.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,n=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,k),t}},u=await C.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:o});if(!q)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&q||g.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,m.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(B,L,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};F?await l(F):await K.withPropagatedContext(e.headers,()=>K.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,k),q)throw t;return await (0,c.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>k,"patchFetch",()=>T,"routeModule",()=>C,"serverHooks",()=>A,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>b],70628)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__d737ca42._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/openclaw.ts","../../../src/lib/kitchen-api.ts","../../../src/app/api/agents/identity/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { getKitchenApi } from \"@/lib/kitchen-api\";\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // Avoid child_process usage in plugin code (triggers OpenClaw install-time safety warnings).\n // Delegate to the OpenClaw runtime helper instead.\n const api = getKitchenApi();\n\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode =\n typeof res.exitCode === \"number\"\n ? res.exitCode\n : typeof res.code === \"number\"\n ? res.code\n : typeof res.status === \"number\"\n ? res.status\n : 0;\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = typeof err.stdout === \"string\" ? err.stdout : \"\";\n const stderr = typeof err.stderr === \"string\" ? err.stderr : typeof err.message === \"string\" ? err.message : String(e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { NextResponse } from \"next/server\";\n\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\ntype Body = {\n agentId: string;\n name?: string;\n emoji?: string;\n theme?: string;\n avatar?: string;\n};\n\nexport async function POST(req: Request) {\n try {\n const body = (await req.json()) as Body;\n const agentId = body.agentId?.trim();\n\n if (!agentId) {\n return NextResponse.json({ error: \"agentId is required\" }, { status: 400 });\n }\n\n const args = [\"agents\", \"set-identity\", agentId];\n\n if (body.name?.trim()) args.push(\"--name\", body.name.trim());\n if (body.emoji?.trim()) args.push(\"--emoji\", body.emoji.trim());\n if (body.theme?.trim()) args.push(\"--theme\", body.theme.trim());\n if (body.avatar?.trim()) args.push(\"--avatar\", body.avatar.trim());\n\n const { stdout, stderr } = await runOpenClaw(args);\n\n return NextResponse.json({ ok: true, stdout, stderr });\n } catch (err) {\n return NextResponse.json(\n {\n error: \"Failed to set agent identity\",\n message: err instanceof Error ? err.message : String(err),\n },\n { status: 500 },\n );\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/identity/route\",\n pathname: \"/api/agents/identity\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/agents/identity/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/identity/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"sCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAY,CAAc,EAG9C,IAAM,EAAM,CAAA,EAAA,EAAA,aAAA,AAAa,IAEzB,GAAI,CACF,IAAM,EAAO,MAAM,EAAI,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,cAAe,EAAK,CAAE,CAAE,UAAW,IAAO,GAQjG,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EACoB,UAAxB,OAAO,EAAI,QAAQ,CACf,EAAI,QAAQ,CACQ,UAApB,OAAO,EAAI,IAAI,CACb,EAAI,IAAI,CACc,UAAtB,OAAO,EAAI,MAAM,CACf,EAAI,MAAM,CACV,EAEV,GAAiB,IAAb,EAAgB,MAAO,CAAE,IAAI,WAAO,EAAU,gBAAQ,CAAO,EACjE,MAAO,CAAE,IAAI,EAAM,SAAU,SAAG,SAAQ,CAAO,CACjD,CAAE,MAAO,EAAY,CAEnB,IAAM,EAA+B,UAApB,OAAO,EAAI,IAAI,CAAgB,EAAI,IAAI,CAAG,EAG3D,MAAO,CAAE,IAAI,EAAO,WAAU,OAFO,UAAtB,OAAO,EAAI,MAAM,CAAgB,EAAI,MAAM,CAAG,GAEvB,OADD,UAAtB,OAAO,EAAI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,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[3]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},12714,(e,t,r)=>{t.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},5003,e=>{"use strict";var t=e.i(59494);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),a=String(t.stdout??""),n=String(t.stderr??""),s="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==s)return{ok:!1,exitCode:s,stdout:a,stderr:n};return{ok:!0,exitCode:0,stdout:a,stderr:n}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:"string"==typeof t.stdout?t.stdout:"",stderr:"string"==typeof t.stderr?t.stderr:"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},11628,e=>{"use strict";var t=e.i(50227);function r(e){let r=e.replace(/\\/g,"/").match(/^(.*\/workspace-([^\/]+))\/roles\/([^\/]+)\/?$/);if(!r)return{kind:"other"};let a=r[1],n=r[2],s=r[3],o=t.default.join(a,"roles",s);return{kind:"teamRole",teamDir:a,teamId:n,roleDir:o,role:s}}e.s(["parseTeamRoleWorkspace",()=>r])},81317,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),o=e.i(74677),i=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),f=e.i(26937),x=e.i(10372),g=e.i(93695);e.i(52474);var m=e.i(220),R=e.i(12714),w=e.i(50227),v=e.i(89171),y=e.i(5003),k=e.i(11628);async function E(e){let{stdout:t}=await (0,y.runOpenClaw)(["agents","list","--json"]),r=JSON.parse(t).find(t=>t.id===e);if(!r?.workspace)throw Error(`Agent workspace not found for ${e}`);return r.workspace}async function C(e){let{searchParams:t}=new URL(e.url),r=String(t.get("agentId")??"").trim();if(!r)return v.NextResponse.json({ok:!1,error:"agentId is required"},{status:400});let a=await E(r),n=(0,k.parseTeamRoleWorkspace)(a),s=[w.default.join(a,"skills")];"teamRole"===n.kind&&s.push(w.default.join(n.teamDir,"skills"));let o=new Set,i=[];for(let e of s)try{for(let t of(await R.default.readdir(e,{withFileTypes:!0})))t.isDirectory()&&o.add(t.name)}catch(t){i.push(`${e}: ${t instanceof Error?t.message:String(t)}`)}return v.NextResponse.json({ok:!0,agentId:r,workspace:a,skillsDirs:s,skills:Array.from(o).sort((e,t)=>e.localeCompare(t)),note:i.length?i.join("; "):void 0})}e.s(["GET",()=>C],93364);var A=e.i(93364);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/skills/route",pathname:"/api/agents/skills",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skills/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:T,workUnitAsyncStorage:N,serverHooks:S}=b;function O(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:N})}async function j(e,t,a){b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/agents/skills/route";R=R.replace(/\/index$/,"")||"/";let w=await b.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:v,params:y,nextConfig:k,parsedUrl:E,isDraftMode:C,prerenderManifest:A,routerServerContext:T,isOnDemandRevalidate:N,revalidateOnlyGenerated:S,resolvedPathname:O,clientReferenceManifest:j,serverActionsManifest:P}=w,q=(0,i.normalizeAppPath)(R),_=!!(A.dynamicRoutes[q]||A.routes[O]),I=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!C){let e=!!A.routes[O],t=A.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(k.experimental.adapterPath)return await I();throw new g.NoFallbackError}}let H=null;!_||b.isDev||C||(H="/index"===(H=O)?"/":H);let U=!0===b.isDev||!_,D=_&&!U;P&&j&&(0,o.setManifestsSingleton)({page:R,clientReferenceManifest:j,serverActionsManifest:P});let M=e.method||"GET",$=(0,s.getTracer)(),K=$.getActiveScopeSpan(),F={params:y,prerenderManifest:A,renderOpts:{experimental:{authInterrupts:!!k.experimental.authInterrupts},cacheComponents:!!k.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:k.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,T)},sharedContext:{buildId:v}},L=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>b.handle(W,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${R}`)}),i=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!i&&N&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await o(n);e.fetchMetrics=F.renderOpts.fetchMetrics;let l=F.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=F.renderOpts.collectedTags;if(!_)return await (0,c.sendResponse)(L,B,s,F.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,a=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,T),t}},u=await b.handleResponse({req:e,nextConfig:k,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:i});if(!_)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});i||t.setHeader("x-nextjs-cache",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return i&&_||g.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(L,B,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};K?await l(K):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${R}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,T),_)throw t;return await (0,c.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>j,"patchFetch",()=>O,"routeModule",()=>b,"serverHooks",()=>S,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>N],81317)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__df7df3ac._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/agent-workspace.ts","../../../src/app/api/agents/skills/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // Avoid child_process usage in plugin code (triggers OpenClaw install-time safety warnings).\n // Delegate to the OpenClaw runtime helper instead.\n const api = getKitchenApi();\n\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode =\n typeof res.exitCode === \"number\"\n ? res.exitCode\n : typeof res.code === \"number\"\n ? res.code\n : typeof res.status === \"number\"\n ? res.status\n : 0;\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = typeof err.stdout === \"string\" ? err.stdout : \"\";\n const stderr = typeof err.stderr === \"string\" ? err.stderr : typeof err.message === \"string\" ? err.message : String(e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import path from \"node:path\";\n\nexport function parseTeamRoleWorkspace(ws: string):\n | { kind: \"teamRole\"; teamDir: string; teamId: string; roleDir: string; role: string }\n | { kind: \"other\" } {\n const normalized = ws.replace(/\\\\/g, \"/\");\n const m = normalized.match(/^(.*\\/workspace-([^\\/]+))\\/roles\\/([^\\/]+)\\/?$/);\n if (!m) return { kind: \"other\" };\n const teamDir = m[1];\n const teamId = m[2];\n const role = m[3];\n const roleDir = path.join(teamDir, \"roles\", role);\n return { kind: \"teamRole\", teamDir, teamId, roleDir, role };\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { parseTeamRoleWorkspace } from \"@/lib/agent-workspace\";\n\ntype AgentListItem = { id: string; workspace?: string };\n\nasync function resolveAgentWorkspace(agentId: string) {\n const { stdout } = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n const list = JSON.parse(stdout) as AgentListItem[];\n const agent = list.find((a) => a.id === agentId);\n if (!agent?.workspace) throw new Error(`Agent workspace not found for ${agentId}`);\n return agent.workspace;\n}\n\nexport async function GET(req: Request) {\n const { searchParams } = new URL(req.url);\n const agentId = String(searchParams.get(\"agentId\") ?? \"\").trim();\n if (!agentId) return NextResponse.json({ ok: false, error: \"agentId is required\" }, { status: 400 });\n\n const ws = await resolveAgentWorkspace(agentId);\n\n const info = parseTeamRoleWorkspace(ws);\n const dirs: string[] = [path.join(ws, \"skills\")];\n if (info.kind === \"teamRole\") {\n // If skills were installed at the team scope, surface them for the role agent too.\n dirs.push(path.join(info.teamDir, \"skills\"));\n }\n\n const skills = new Set<string>();\n const notes: string[] = [];\n\n for (const skillsDir of dirs) {\n try {\n const entries = await fs.readdir(skillsDir, { withFileTypes: true });\n for (const e of entries) if (e.isDirectory()) skills.add(e.name);\n } catch (e: unknown) {\n notes.push(`${skillsDir}: ${e instanceof Error ? e.message : String(e)}`);\n }\n }\n\n return NextResponse.json({\n ok: true,\n agentId,\n workspace: ws,\n skillsDirs: dirs,\n skills: Array.from(skills).sort((a, b) => a.localeCompare(b)),\n note: notes.length ? notes.join(\"; \") : undefined,\n });\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/skills/route\",\n pathname: \"/api/agents/skills\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/agents/skills/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/skills/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"2oCAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,qDClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OASO,eAAe,EAAY,CAAc,EAG9C,IAAM,EAAM,CAAA,EAAA,EAAA,aAAA,AAAa,IAEzB,GAAI,CACF,IAAM,EAAO,MAAM,EAAI,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,cAAe,EAAK,CAAE,CAAE,UAAW,IAAO,GAQjG,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EACoB,UAAxB,OAAO,EAAI,QAAQ,CACf,EAAI,QAAQ,CACQ,UAApB,OAAO,EAAI,IAAI,CACb,EAAI,IAAI,CACc,UAAtB,OAAO,EAAI,MAAM,CACf,EAAI,MAAM,CACV,EAEV,GAAiB,IAAb,EAAgB,MAAO,CAAE,IAAI,EAAO,kBAAU,EAAQ,QAAO,EACjE,MAAO,CAAE,IAAI,EAAM,SAAU,SAAG,SAAQ,CAAO,CACjD,CAAE,MAAO,EAAY,CAEnB,IAAM,EAA+B,UAApB,OAAO,EAAI,IAAI,CAAgB,EAAI,IAAI,CAAG,EAG3D,MAAO,CAAE,IAAI,WAAO,EAAU,OAFO,AAAtB,iBAAO,EAAI,MAAM,CAAgB,EAAI,MAAM,CAAG,GAEvB,OADD,UAAtB,OAAO,EAAI,MAAM,CAAgB,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K,SAAS,CAAC,kBAAqB,EAAQ,AAAT,GAAY,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAmB,AAAnB,EAAoB,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},5003,e=>{"use strict";var t=e.i(59494);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=String(t.stdout??""),a=String(t.stderr??""),s="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==s)return{ok:!1,exitCode:s,stdout:n,stderr:a};return{ok:!0,exitCode:0,stdout:n,stderr:a}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:"string"==typeof t.stdout?t.stdout:"",stderr:"string"==typeof t.stderr?t.stderr:"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},11628,e=>{"use strict";var t=e.i(50227);function r(e){let r=e.replace(/\\/g,"/").match(/^(.*\/workspace-([^\/]+))\/roles\/([^\/]+)\/?$/);if(!r)return{kind:"other"};let n=r[1],a=r[2],s=r[3],i=t.default.join(n,"roles",s);return{kind:"teamRole",teamDir:n,teamId:a,roleDir:i,role:s}}e.s(["parseTeamRoleWorkspace",()=>r])},60232,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),a=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),x=e.i(26937),g=e.i(10372),f=e.i(93695);e.i(52474);var m=e.i(220),R=e.i(89171),w=e.i(5003),v=e.i(11628);async function y(e){let t=await e.json(),r=String(t.agentId??"").trim(),n=String(t.skill??"").trim();if(!r)return R.NextResponse.json({ok:!1,error:"agentId is required"},{status:400});if(!n)return R.NextResponse.json({ok:!1,error:"skill is required"},{status:400});let a=["recipes","install-skill",n,"--agent-id",r,"--yes"];try{let{stdout:e}=await (0,w.runOpenClaw)(["agents","list","--json"]),t=JSON.parse(e).find(e=>e.id===r),s=t?.workspace?String(t.workspace):"",i=(0,v.parseTeamRoleWorkspace)(s);"teamRole"===i.kind&&(a=["recipes","install-skill",n,"--team-id",i.teamId,"--yes"])}catch{}let s=await (0,w.runOpenClaw)(a);if(!s.ok){let e=s.stdout?.trim(),t=s.stderr?.trim();return R.NextResponse.json({ok:!1,error:t||e||`openclaw ${a.join(" ")} failed (exit=${s.exitCode})`,stdout:s.stdout,stderr:s.stderr,scopeArgs:a},{status:500})}return R.NextResponse.json({ok:!0,agentId:r,skill:n,scopeArgs:a,stdout:s.stdout,stderr:s.stderr})}e.s(["POST",()=>y],29357);var k=e.i(29357);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/agents/skills/install/route",pathname:"/api/agents/skills/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skills/install/route.ts",nextConfigOutput:"standalone",userland:k}),{workAsyncStorage:E,workUnitAsyncStorage:A,serverHooks:b}=C;function T(){return(0,n.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:A})}async function N(e,t,n){C.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/agents/skills/install/route";R=R.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:v,params:y,nextConfig:k,parsedUrl:E,isDraftMode:A,prerenderManifest:b,routerServerContext:T,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,resolvedPathname:S,clientReferenceManifest:j,serverActionsManifest:P}=w,q=(0,o.normalizeAppPath)(R),_=!!(b.dynamicRoutes[q]||b.routes[S]),I=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!A){let e=!!b.routes[S],t=b.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(k.experimental.adapterPath)return await I();throw new f.NoFallbackError}}let H=null;!_||C.isDev||A||(H="/index"===(H=S)?"/":H);let U=!0===C.isDev||!_,D=_&&!U;P&&j&&(0,i.setManifestsSingleton)({page:R,clientReferenceManifest:j,serverActionsManifest:P});let M=e.method||"GET",K=(0,s.getTracer)(),$=K.getActiveScopeSpan(),F={params:y,prerenderManifest:b,renderOpts:{experimental:{authInterrupts:!!k.experimental.authInterrupts},cacheComponents:!!k.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:k.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>C.onRequestError(e,t,n,a,T)},sharedContext:{buildId:v}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>C.handle(W,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${M} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${R}`)}),o=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&N&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(a);e.fetchMetrics=F.renderOpts.fetchMetrics;let l=F.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=F.renderOpts.collectedTags;if(!_)return await (0,c.sendResponse)(B,L,s,F.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,n=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,T),t}},u=await C.handleResponse({req:e,nextConfig:k,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:n.waitUntil,isMinimalMode:o});if(!_)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==m.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&_||f.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(B,L,new Response(u.value.body,{headers:f,status:u.value.status||200})),null};$?await l($):await K.withPropagatedContext(e.headers,()=>K.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${R}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:N})},!1,T),_)throw t;return await (0,c.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>T,"routeModule",()=>C,"serverHooks",()=>b,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>A],60232)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__dfca6557._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/agent-workspace.ts","../../../src/app/api/agents/skills/install/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // Avoid child_process usage in plugin code (triggers OpenClaw install-time safety warnings).\n // Delegate to the OpenClaw runtime helper instead.\n const api = getKitchenApi();\n\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = String(res.stdout ?? \"\");\n const stderr = String(res.stderr ?? \"\");\n const exitCode =\n typeof res.exitCode === \"number\"\n ? res.exitCode\n : typeof res.code === \"number\"\n ? res.code\n : typeof res.status === \"number\"\n ? res.status\n : 0;\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = typeof err.stdout === \"string\" ? err.stdout : \"\";\n const stderr = typeof err.stderr === \"string\" ? err.stderr : typeof err.message === \"string\" ? err.message : String(e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import path from \"node:path\";\n\nexport function parseTeamRoleWorkspace(ws: string):\n | { kind: \"teamRole\"; teamDir: string; teamId: string; roleDir: string; role: string }\n | { kind: \"other\" } {\n const normalized = ws.replace(/\\\\/g, \"/\");\n const m = normalized.match(/^(.*\\/workspace-([^\\/]+))\\/roles\\/([^\\/]+)\\/?$/);\n if (!m) return { kind: \"other\" };\n const teamDir = m[1];\n const teamId = m[2];\n const role = m[3];\n const roleDir = path.join(teamDir, \"roles\", role);\n return { kind: \"teamRole\", teamDir, teamId, roleDir, role };\n}\n","import { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { parseTeamRoleWorkspace } from \"@/lib/agent-workspace\";\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as { agentId?: string; skill?: string };\n const agentId = String(body.agentId ?? \"\").trim();\n const skill = String(body.skill ?? \"\").trim();\n\n if (!agentId) return NextResponse.json({ ok: false, error: \"agentId is required\" }, { status: 400 });\n if (!skill) return NextResponse.json({ ok: false, error: \"skill is required\" }, { status: 400 });\n\n // For role-based team agents, install at team scope to avoid creating a separate\n // workspace-<agentId> directory that diverges from roles/<role>.\n let args = [\"recipes\", \"install-skill\", skill, \"--agent-id\", agentId, \"--yes\"];\n try {\n const { stdout } = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n const list = JSON.parse(stdout) as Array<{ id: string; workspace?: string }>;\n const agent = list.find((a) => a.id === agentId);\n const ws = agent?.workspace ? String(agent.workspace) : \"\";\n const info = parseTeamRoleWorkspace(ws);\n if (info.kind === \"teamRole\") {\n args = [\"recipes\", \"install-skill\", skill, \"--team-id\", info.teamId, \"--yes\"];\n }\n } catch {\n // If anything goes wrong, fall back to agent scope.\n }\n\n const res = await runOpenClaw(args);\n if (!res.ok) {\n const stdout = res.stdout?.trim();\n const stderr = res.stderr?.trim();\n return NextResponse.json(\n {\n ok: false,\n error: stderr || stdout || `openclaw ${args.join(\" \")} failed (exit=${res.exitCode})`,\n stdout: res.stdout,\n stderr: res.stderr,\n scopeArgs: args,\n },\n { status: 500 },\n );\n }\n\n return NextResponse.json({ ok: true, agentId, skill, scopeArgs: args, stdout: res.stdout, stderr: res.stderr });\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/skills/install/route\",\n pathname: \"/api/agents/skills/install\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/agents/skills/install/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/skills/install/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"wjCAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAA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AAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,CAClC,qBACA,sBACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[4]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[5003,e=>{"use strict";var t=e.i(59494);async function r(e){let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),a=String(t.stdout??""),n=String(t.stderr??""),s="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==s)return{ok:!1,exitCode:s,stdout:a,stderr:n};return{ok:!0,exitCode:0,stdout:a,stderr:n}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:"string"==typeof t.stdout?t.stdout:"",stderr:"string"==typeof t.stderr?t.stderr:"string"==typeof t.message?t.message:String(t)}}}e.s(["runOpenClaw",()=>r])},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},59494,e=>{"use strict";function t(){let e=globalThis.__clawkitchen_api;if(!e)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return e}e.s(["getKitchenApi",()=>t])},36499,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),p=e.i(47587),c=e.i(66012),h=e.i(70101),x=e.i(26937),R=e.i(10372),g=e.i(93695);e.i(52474);var f=e.i(220),m=e.i(89171),v=e.i(5003);async function w(){let e,{stdout:t,stderr:r}=await (0,v.runOpenClaw)(["recipes","list"]);r.trim();try{e=JSON.parse(t)}catch{return m.NextResponse.json({error:"Failed to parse openclaw recipes list output",stderr:r,stdout:t},{status:500})}let a=Array.isArray(e)?e:[];return m.NextResponse.json({recipes:a,stderr:r})}e.s(["GET",()=>w],21082);var y=e.i(21082);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/recipes/route",pathname:"/api/recipes",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/recipes/route.ts",nextConfigOutput:"standalone",userland:y}),{workAsyncStorage:E,workUnitAsyncStorage:A,serverHooks:b}=C;function T(){return(0,a.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:A})}async function N(e,t,a){C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/recipes/route";m=m.replace(/\/index$/,"")||"/";let v=await C.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:y,nextConfig:E,parsedUrl:A,isDraftMode:b,prerenderManifest:T,routerServerContext:N,isOnDemandRevalidate:k,revalidateOnlyGenerated:O,resolvedPathname:P,clientReferenceManifest:S,serverActionsManifest:_}=v,q=(0,o.normalizeAppPath)(m),j=!!(T.dynamicRoutes[q]||T.routes[P]),H=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,A,!1):t.end("This page could not be found"),null);if(j&&!b){let e=!!T.routes[P],t=T.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await H();throw new g.NoFallbackError}}let I=null;!j||C.isDev||b||(I="/index"===(I=P)?"/":I);let U=!0===C.isDev||!j,D=j&&!U;_&&S&&(0,i.setManifestsSingleton)({page:m,clientReferenceManifest:S,serverActionsManifest:_});let M=e.method||"GET",K=(0,s.getTracer)(),F=K.getActiveScopeSpan(),$={params:y,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,N)},sharedContext:{buildId:w}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>C.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${m}`)}),o=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!o&&k&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=$.renderOpts.collectedTags;if(!j)return await (0,c.sendResponse)(B,L,s,$.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[R.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=R.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,a=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=R.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:k})},!1,N),t}},u=await C.handleResponse({req:e,nextConfig:E,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:o});if(!j)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",k?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&j||g.delete(R.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,x.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(B,L,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};F?await l(F):await K.withPropagatedContext(e.headers,()=>K.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${m}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:k})},!1,N),j)throw t;return await (0,c.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>T,"routeModule",()=>C,"serverHooks",()=>b,"workAsyncStorage",()=>E,"workUnitAsyncStorage",()=>A],36499)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__e6184ba3._.js.map
|