@jiggai/kitchen 0.3.28 → 0.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +11 -0
- package/.next/build-manifest.json +5 -5
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +76 -0
- package/.next/server/app/_global-error/page/build-manifest.json +3 -3
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +8 -8
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_global-error.segments/_full.segment.rsc +8 -8
- package/.next/server/app/_global-error.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page/build-manifest.json +3 -3
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +11 -11
- package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/agents/[agentId]/page/build-manifest.json +3 -3
- package/.next/server/app/agents/[agentId]/page.js +2 -2
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/[id]/route.js +1 -1
- package/.next/server/app/api/agents/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/add/route.js +1 -1
- package/.next/server/app/api/agents/add/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/file/route.js +1 -1
- package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/files/route.js +1 -1
- package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/route.js +1 -1
- package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/update/route.js +1 -1
- package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
- package/.next/server/app/api/channels/bindings/route.js +1 -1
- package/.next/server/app/api/channels/bindings/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/add/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/cron/add/route/build-manifest.json +11 -0
- package/.next/server/app/api/cron/add/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/cron/add/route.js +6 -0
- package/.next/server/app/api/cron/add/route.js.map +5 -0
- package/.next/server/app/api/cron/add/route.js.nft.json +1 -0
- package/.next/server/app/api/cron/add/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/cron/delete/route.js +1 -1
- package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/edit/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/cron/edit/route/build-manifest.json +11 -0
- package/.next/server/app/api/cron/edit/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/cron/edit/route.js +6 -0
- package/.next/server/app/api/cron/edit/route.js.map +5 -0
- package/.next/server/app/api/cron/edit/route.js.nft.json +1 -0
- package/.next/server/app/api/cron/edit/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/worker/route.js +1 -1
- package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/promote/route.js +1 -1
- package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/route.js +1 -1
- package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/route.js +1 -1
- package/.next/server/app/api/goals/route.js.nft.json +1 -1
- package/.next/server/app/api/ids/check/route.js +1 -1
- package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
- package/.next/server/app/api/marketplace/recipes/[slug]/route.js +1 -1
- package/.next/server/app/api/marketplace/recipes/[slug]/route.js.nft.json +1 -1
- package/.next/server/app/api/marketplace/recipes/route.js +1 -1
- package/.next/server/app/api/marketplace/recipes/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js +7 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.map +5 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js +7 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.map +5 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/plugins/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/route.js +7 -0
- package/.next/server/app/api/plugins/route.js.map +5 -0
- package/.next/server/app/api/plugins/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/plugins/test/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/plugins/test/route/build-manifest.json +11 -0
- package/.next/server/app/api/plugins/test/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/plugins/test/route.js +7 -0
- package/.next/server/app/api/plugins/test/route.js.map +5 -0
- package/.next/server/app/api/plugins/test/route.js.nft.json +1 -0
- package/.next/server/app/api/plugins/test/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/recipes/[id]/route.js +1 -1
- package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/clone/route.js +1 -1
- package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/custom-team/route.js +1 -1
- package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/local-agent-catalog/route.js +1 -1
- package/.next/server/app/api/recipes/local-agent-catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/scaffold/route.js +1 -1
- package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/cron-installation/route.js +1 -1
- package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/model-options/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/settings/model-options/route/build-manifest.json +11 -0
- package/.next/server/app/api/settings/model-options/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/settings/model-options/route.js +6 -0
- package/.next/server/app/api/settings/model-options/route.js.map +5 -0
- package/.next/server/app/api/settings/model-options/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/model-options/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/skills/available/route.js +1 -1
- package/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/.next/server/app/api/swarms/start/route.js +3 -3
- package/.next/server/app/api/swarms/start/route.js.nft.json +1 -1
- package/.next/server/app/api/swarms/status/route.js +1 -1
- package/.next/server/app/api/swarms/status/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/media-providers/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route.js +6 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route.js.map +5 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/[teamId]/media-providers/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js +3 -3
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/file/route.js +1 -1
- package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/files/route.js +1 -1
- package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/memory/route.js +2 -1
- package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/meta/route.js +1 -1
- package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/orchestrator/install/route.js +1 -1
- package/.next/server/app/api/teams/orchestrator/install/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/orchestrator/route.js +1 -1
- package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/remove-team/route.js +1 -1
- package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/install/route.js +1 -1
- package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/route.js +1 -1
- package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-deliverables/file/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js +6 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js.map +5 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflow-deliverables/file/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/workflow-deliverables/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/teams/workflow-deliverables/route/build-manifest.json +11 -0
- package/.next/server/app/api/teams/workflow-deliverables/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/teams/workflow-deliverables/route.js +6 -0
- package/.next/server/app/api/teams/workflow-deliverables/route.js.map +5 -0
- package/.next/server/app/api/teams/workflow-deliverables/route.js.nft.json +1 -0
- package/.next/server/app/api/teams/workflow-deliverables/route_client-reference-manifest.js +2 -0
- package/.next/server/app/api/teams/workflow-runs/route.js +1 -1
- package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-templates/route.js +1 -1
- package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflows/route.js +1 -1
- package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assign/route.js +1 -1
- package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assignees/route.js +1 -1
- package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/move/route.js +1 -1
- package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
- package/.next/server/app/channels/page/build-manifest.json +3 -3
- package/.next/server/app/channels/page.js +2 -2
- package/.next/server/app/channels/page.js.nft.json +1 -1
- package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
- package/.next/server/app/channels.html +2 -2
- package/.next/server/app/channels.rsc +12 -12
- package/.next/server/app/channels.segments/_full.segment.rsc +12 -12
- package/.next/server/app/channels.segments/_head.segment.rsc +4 -4
- package/.next/server/app/channels.segments/_index.segment.rsc +5 -5
- package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/channels.segments/channels.segment.rsc +3 -3
- package/.next/server/app/cron-jobs/page/build-manifest.json +3 -3
- package/.next/server/app/cron-jobs/page.js +2 -2
- package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
- package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/[id]/page/build-manifest.json +3 -3
- package/.next/server/app/goals/[id]/page.js +2 -2
- package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
- package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/new/page/build-manifest.json +3 -3
- package/.next/server/app/goals/new/page.js +2 -2
- package/.next/server/app/goals/new/page.js.nft.json +1 -1
- package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/new.html +2 -2
- package/.next/server/app/goals/new.rsc +13 -13
- package/.next/server/app/goals/new.segments/_full.segment.rsc +13 -13
- package/.next/server/app/goals/new.segments/_head.segment.rsc +4 -4
- package/.next/server/app/goals/new.segments/_index.segment.rsc +5 -5
- package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +4 -4
- package/.next/server/app/goals/new.segments/goals/new.segment.rsc +3 -3
- package/.next/server/app/goals/new.segments/goals.segment.rsc +3 -3
- package/.next/server/app/goals/page/build-manifest.json +3 -3
- package/.next/server/app/goals/page.js +2 -2
- package/.next/server/app/goals/page.js.nft.json +1 -1
- package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals.html +1 -1
- package/.next/server/app/goals.rsc +12 -12
- package/.next/server/app/goals.segments/_full.segment.rsc +12 -12
- package/.next/server/app/goals.segments/_head.segment.rsc +4 -4
- package/.next/server/app/goals.segments/_index.segment.rsc +5 -5
- package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/goals.segments/goals.segment.rsc +3 -3
- package/.next/server/app/page/build-manifest.json +3 -3
- package/.next/server/app/page.js +4 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recipes/[id]/page/build-manifest.json +3 -3
- package/.next/server/app/recipes/[id]/page.js +4 -4
- package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
- package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recipes/page/build-manifest.json +3 -3
- package/.next/server/app/recipes/page.js +2 -2
- package/.next/server/app/recipes/page.js.nft.json +1 -1
- package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/runs/page/build-manifest.json +3 -3
- package/.next/server/app/runs/page.js +6 -5
- package/.next/server/app/runs/page.js.nft.json +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page/build-manifest.json +3 -3
- package/.next/server/app/settings/page.js +2 -2
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +12 -12
- package/.next/server/app/settings.segments/_full.segment.rsc +12 -12
- package/.next/server/app/settings.segments/_head.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_index.segment.rsc +5 -5
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
- package/.next/server/app/settings.segments/settings.segment.rsc +3 -3
- package/.next/server/app/teams/[teamId]/deliverables/page/app-paths-manifest.json +3 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/build-manifest.json +17 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/next-font-manifest.json +11 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/teams/[teamId]/deliverables/page/server-reference-manifest.json +4 -0
- package/.next/server/app/teams/[teamId]/deliverables/page.js +21 -0
- package/.next/server/app/teams/[teamId]/deliverables/page.js.map +5 -0
- package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -0
- package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +2 -0
- package/.next/server/app/teams/[teamId]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/page.js +4 -4
- package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +6 -5
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/runs/page.js +2 -2
- package/.next/server/app/teams/[teamId]/runs/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +3 -3
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/tickets/page.js +3 -3
- package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +2 -2
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/page/build-manifest.json +3 -3
- package/.next/server/app/teams/[teamId]/workflows/page.js +4 -4
- package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tickets/[ticket]/page/build-manifest.json +3 -3
- package/.next/server/app/tickets/[ticket]/page.js +3 -3
- package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
- package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tickets/page/build-manifest.json +3 -3
- package/.next/server/app/tickets/page.js +3 -3
- package/.next/server/app/tickets/page.js.nft.json +1 -1
- package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +11 -0
- package/.next/server/chunks/[root-of-the-server]__00a30f40._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00a30f40._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__04f289da._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__04f289da._.js.map +1 -1
- package/.next/server/chunks/{[root-of-the-server]__26c618a3._.js → [root-of-the-server]__0883634a._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__08b4c8f2._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0bea0f71._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bea0f71._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__fef7183d._.js → [root-of-the-server]__0f55461f._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__1480ffda._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1480ffda._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__17124952._.js +4 -0
- package/.next/server/chunks/[root-of-the-server]__17124952._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__18423bab._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__18423bab._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__1873f417._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1873f417._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__05f5e243._.js → [root-of-the-server]__1f1e62ac._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__864a08dd._.js → [root-of-the-server]__20b1f42d._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__21ad9eeb._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__2c207e60._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__2c207e60._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__69be1758._.js → [root-of-the-server]__2dd1afff._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__3021a250._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3021a250._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__343776df._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__343776df._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__35ec765d._.js +13 -0
- package/.next/server/chunks/[root-of-the-server]__35ec765d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__392e585d._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__3b2d0020._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3b2d0020._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3bfad714._.js +6 -0
- package/.next/server/chunks/[root-of-the-server]__3bfad714._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3c92e5aa._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3d15e850._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3d15e850._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3f648b9b._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__482575d2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__482575d2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__4898071c._.js +4 -4
- package/.next/server/chunks/{[root-of-the-server]__bbdb6dcb._.js → [root-of-the-server]__4ee12514._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__4ee12514._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__55defc7c._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__698cf062._.js → [root-of-the-server]__5aa1dc93._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__b002764e._.js → [root-of-the-server]__5c5990a6._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__7a331e51._.js → [root-of-the-server]__603cb0fa._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__6131b7e2._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__d924e5ac._.js → [root-of-the-server]__636919a0._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__663e79ff._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__663e79ff._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__69c065ce._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__c63a9f28._.js → [root-of-the-server]__74b80ca4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__74e2a9ba._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__7bdf9f6e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__7e12b9f4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__813dd669._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__813dd669._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__5ceff0f3._.js → [root-of-the-server]__87875179._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__87875179._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__5ea38a67._.js → [root-of-the-server]__8f8e110f._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__91d0cce1._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__e40409a2._.js → [root-of-the-server]__9853b72d._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__95ddb81a._.js → [root-of-the-server]__9dba20b3._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__ff69832c._.js → [root-of-the-server]__9e96d37b._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__8e27e9f7._.js → [root-of-the-server]__aba68368._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__aed4e4f2._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__b457b884._.js +22 -0
- package/.next/server/chunks/[root-of-the-server]__b457b884._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__b6cff26d._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__bf608f29._.js → [root-of-the-server]__be5f57b2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__c15c5141._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c15c5141._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c1b0d50e._.js +4 -0
- package/.next/server/chunks/[root-of-the-server]__c1b0d50e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c50e4bc4._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__c5e88cbb._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__cc0860cb._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__8ea22d0a._.js → [root-of-the-server]__d302afb4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__d4a8660e._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__da7df58d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__da7df58d._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e9acbabd._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__47eb3111._.js → [root-of-the-server]__e9d9d570._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__f408c708._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__59a6cf09._.js → [root-of-the-server]__f45ceefb._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__f4cbadf7._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__f5cd81f1._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__3cfdf0b3._.js → [root-of-the-server]__f994dc62._.js} +3 -3
- package/.next/server/chunks/[root-of-the-server]__f994dc62._.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_add_route_actions_f9053a93.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_add_route_actions_f9053a93.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_edit_route_actions_3b551424.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_cron_edit_route_actions_3b551424.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_route_actions_0aabd6b3.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_route_actions_0aabd6b3.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_test_route_actions_8babbe5c.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_plugins_test_route_actions_8babbe5c.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_settings_model-options_route_actions_bccf115a.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_settings_model-options_route_actions_bccf115a.js.map +1 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-deliverables_route_actions_9de4298b.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_teams_workflow-deliverables_route_actions_9de4298b.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_[___path]_route_actions_471be8ce.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_[___path]_route_actions_471be8ce.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_tabs_[tabId]_route_actions_9420efec.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_plugins_[pluginId]_tabs_[tabId]_route_actions_9420efec.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_media-providers_route_actions_1ea823f1.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_[teamId]_media-providers_route_actions_1ea823f1.js.map +1 -0
- package/.next/server/chunks/ce889_server_app_api_teams_workflow-deliverables_file_route_actions_332fd6ea.js +3 -0
- package/.next/server/chunks/ce889_server_app_api_teams_workflow-deliverables_file_route_actions_332fd6ea.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1fe98a49.js.map +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_3a1b29e4.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_f5680d9e.js +1 -1
- package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js +4 -4
- package/.next/server/chunks/node_modules_yaml_dist_49c13b35._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0a5cb3ca._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__177cec74._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js +12 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__17b046ea._.js → [root-of-the-server]__388bae11._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__51e26a01._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__4c66998a._.js.map → [root-of-the-server]__51e26a01._.js.map} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__6b6b7595._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__2db9d262._.js → [root-of-the-server]__8f9585b9._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__2db9d262._.js.map → [root-of-the-server]__8f9585b9._.js.map} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__9a7d79aa._.js → [root-of-the-server]__997aa62c._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0df430db._.js → [root-of-the-server]__9e400864._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__8a588fad._.js → [root-of-the-server]__a6348eaa._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__49281b4c._.js → [root-of-the-server]__af792402._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__68c20e8e._.js → [root-of-the-server]__b5aa14b8._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__68c20e8e._.js.map → [root-of-the-server]__b5aa14b8._.js.map} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__8756d76d._.js → [root-of-the-server]__b8998a21._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__c777e326._.js → [root-of-the-server]__df23886e._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__02e6ccaa._.js → [root-of-the-server]__e9bd9b71._.js} +2 -2
- package/.next/server/chunks/ssr/_018dfe6b._.js +2 -2
- package/.next/server/chunks/ssr/_2d8d7232._.js +3 -0
- package/.next/server/chunks/ssr/_2d8d7232._.js.map +1 -0
- package/.next/server/chunks/ssr/_7f9e89d2._.js +1 -1
- package/.next/server/chunks/ssr/_7f9e89d2._.js.map +1 -1
- package/.next/server/chunks/ssr/_8538617d._.js +3 -0
- package/.next/server/chunks/ssr/_8538617d._.js.map +1 -0
- package/.next/server/chunks/ssr/_a506fcf8._.js +3 -0
- package/.next/server/chunks/ssr/_a506fcf8._.js.map +1 -0
- package/.next/server/chunks/ssr/_deb7a691._.js +5 -0
- package/.next/server/chunks/ssr/_deb7a691._.js.map +1 -0
- package/.next/server/chunks/ssr/_ec0b0b83._.js +4 -0
- package/.next/server/chunks/ssr/_ec0b0b83._.js.map +1 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_deliverables_page_actions_f44ae7c7.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_teams_[teamId]_deliverables_page_actions_f44ae7c7.js.map +1 -0
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
- package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js +3 -0
- package/.next/server/chunks/ssr/d4b1c_modules_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_6ef9314a.js.map +1 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_1038a5b9._.js +10 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__4fd003c7._.js.map → node_modules_next_dist_1038a5b9._.js.map} +1 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js +1 -1
- package/.next/server/chunks/ssr/node_modules_next_dist_25a30daf._.js.map +1 -1
- package/.next/server/chunks/ssr/node_modules_yaml_dist_18db9ed7._.js +2 -2
- package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js +3 -0
- package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js.map +1 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +4 -0
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{d2be314c3ece3fbe.js → 0bd6498bda341889.js} +1 -1
- package/.next/static/chunks/{c27f767f683b017a.js → 410dc851d0e3033d.js} +1 -1
- package/.next/static/chunks/{2ad8e6acac0ede2c.js → 4e38b3f280ced64c.js} +1 -1
- package/.next/static/chunks/{236ef28eb649c432.js → 4f2b8a07ace7e02b.js} +1 -1
- package/.next/static/chunks/57ad5290f7e92ffd.css +3 -0
- package/.next/static/chunks/{e854e56ea8cb6236.js → 87879d67a1601ee0.js} +1 -1
- package/.next/static/chunks/8a919077b73862da.js +1 -0
- package/.next/static/chunks/9906444fb1191bb4.js +1 -0
- package/.next/static/chunks/{43d0024279c6160e.js → a625725b4cd85ea3.js} +1 -1
- package/.next/static/chunks/{3e1fe6be993c61fb.js → ac32974713c57cb3.js} +1 -1
- package/.next/static/chunks/{f2f58a7e93290fbb.js → aebc3b6d791f68d2.js} +1 -1
- package/.next/static/chunks/{e083bcf4a197beae.js → b83c1ca03c3b8c6d.js} +1 -1
- package/.next/static/chunks/{e7bbb90aada90fdf.js → bdb7ebd88ea13111.js} +1 -1
- package/.next/static/chunks/bfcfbe145220d365.js +1 -0
- package/.next/static/chunks/c0d9f53d91cc65c5.js +10 -0
- package/.next/static/chunks/{36aff6bd42d53c8b.js → c0e2f959abc4cc13.js} +1 -1
- package/.next/static/chunks/{62e0c437eb8fc2da.js → c822e53f79a492c7.js} +1 -1
- package/.next/static/chunks/{fd0cb4d03fd17cf6.js → ce6b2024d13b4333.js} +1 -1
- package/.next/static/chunks/d13249af74d111cf.js +3 -0
- package/.next/static/chunks/{4a6dcf80b293d7a4.js → d16f64ca3a8ed208.js} +1 -1
- package/.next/static/chunks/{c84580993f22c17a.js → d6e1b7307a9274ce.js} +1 -1
- package/.next/static/chunks/d7541a171116ec9c.js +1 -0
- package/.next/static/chunks/{93719e85369dd453.js → e03137fd069b1514.js} +1 -1
- package/.next/static/chunks/{db4da5ee45033817.js → e10faa9296c8b246.js} +1 -1
- package/.next/static/chunks/ec24877f7b7f82c5.js +3 -0
- package/.next/static/chunks/{f179280598d329b2.js → ff3bbb5df40b2cc4.js} +1 -1
- package/.next/static/chunks/{turbopack-0236a74c4f471967.js → turbopack-dbf3078dbf5863bd.js} +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +11 -2
- package/tsconfig.json +2 -1
- package/.next/server/chunks/[root-of-the-server]__01863a8b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01863a8b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__150bf0bf._.js +0 -4
- package/.next/server/chunks/[root-of-the-server]__150bf0bf._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__4079fa2b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__4079fa2b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__453333f5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__453333f5._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__502825d0._.js +0 -13
- package/.next/server/chunks/[root-of-the-server]__502825d0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__51198e25._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__51198e25._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__542a081b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__542a081b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__63715de8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__63715de8._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__69c45937._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__69c45937._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6caa8f2d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6caa8f2d._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__7459129e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__7459129e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__89605574._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__89605574._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a49c534d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__a49c534d._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b64936a3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b64936a3._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js +0 -6
- package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e063a986._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e063a986._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__4c66998a._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__4fd003c7._.js +0 -10
- package/.next/server/chunks/ssr/_d9520bea._.js +0 -3
- package/.next/server/chunks/ssr/_d9520bea._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +0 -3
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +0 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js +0 -12
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_team-editor_index_tsx_e68e9cbc._.js.map +0 -1
- package/.next/static/chunks/33959503ed1ef5fe.css +0 -3
- package/.next/static/chunks/474635d658546626.js +0 -1
- package/.next/static/chunks/4d4876ec71727e38.js +0 -1
- package/.next/static/chunks/579cd9be685abc65.js +0 -1
- package/.next/static/chunks/5e3b1d0f61a651bf.js +0 -1
- package/.next/static/chunks/a719c5f36ffeec2a.js +0 -10
- package/.next/static/chunks/ca07f0194f384207.js +0 -1
- /package/.next/server/chunks/{[root-of-the-server]__26c618a3._.js.map → [root-of-the-server]__0883634a._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__fef7183d._.js.map → [root-of-the-server]__0f55461f._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__05f5e243._.js.map → [root-of-the-server]__1f1e62ac._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__864a08dd._.js.map → [root-of-the-server]__20b1f42d._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__69be1758._.js.map → [root-of-the-server]__2dd1afff._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__698cf062._.js.map → [root-of-the-server]__5aa1dc93._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__b002764e._.js.map → [root-of-the-server]__5c5990a6._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__7a331e51._.js.map → [root-of-the-server]__603cb0fa._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__d924e5ac._.js.map → [root-of-the-server]__636919a0._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__c63a9f28._.js.map → [root-of-the-server]__74b80ca4._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__5ea38a67._.js.map → [root-of-the-server]__8f8e110f._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__e40409a2._.js.map → [root-of-the-server]__9853b72d._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__95ddb81a._.js.map → [root-of-the-server]__9dba20b3._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__ff69832c._.js.map → [root-of-the-server]__9e96d37b._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__8e27e9f7._.js.map → [root-of-the-server]__aba68368._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__bf608f29._.js.map → [root-of-the-server]__be5f57b2._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__8ea22d0a._.js.map → [root-of-the-server]__d302afb4._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__47eb3111._.js.map → [root-of-the-server]__e9d9d570._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__59a6cf09._.js.map → [root-of-the-server]__f45ceefb._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__17b046ea._.js.map → [root-of-the-server]__388bae11._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__9a7d79aa._.js.map → [root-of-the-server]__997aa62c._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__0df430db._.js.map → [root-of-the-server]__9e400864._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__8a588fad._.js.map → [root-of-the-server]__a6348eaa._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__49281b4c._.js.map → [root-of-the-server]__af792402._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__8756d76d._.js.map → [root-of-the-server]__b8998a21._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__c777e326._.js.map → [root-of-the-server]__df23886e._.js.map} +0 -0
- /package/.next/server/chunks/ssr/{[root-of-the-server]__02e6ccaa._.js.map → [root-of-the-server]__e9bd9b71._.js.map} +0 -0
- /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_buildManifest.js +0 -0
- /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{xL1Ph-1X9rdYxDgzULIJA → O_6k_lqrD6rgSIl4YQjxa}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/paths.ts","../../../src/lib/recipes.ts","../../../src/app/api/recipes/delete/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/recipes/delete/helpers.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\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\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 = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n const api = getKitchenApi();\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 = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\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 = extractStdout(err);\n const stderr = extractStderr(err, 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 // OpenClaw message routing bindings (used for HITL approvals, etc.)\n bindings?: unknown[];\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\n // Back-compat: some installs keep goals at <workspace>/goals.\n // Prefer that when present, otherwise fall back to <workspace>/notes/goals.\n const direct = path.join(ws, \"goals\");\n try {\n const st = await fs.stat(direct);\n if (st.isDirectory()) return direct;\n } catch {\n // ignore\n }\n\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\n/** Team workspace dir derived from agents.defaults.workspace (sibling: .. / workspace-{teamId}) */\nexport function teamDirFromBaseWorkspace(baseWorkspace: string, teamId: string) {\n // Special-case: treat \"main\" as the personal workspace (agents.defaults.workspace).\n // This lets Kitchen expose a selectable \"main\" scope without creating a separate\n // ~/.openclaw/workspace-main folder.\n if (teamId === \"main\") return path.resolve(baseWorkspace);\n return path.resolve(baseWorkspace, \"..\", `workspace-${teamId}`);\n}\n\n/** Rejects path traversal and empty names; returns normalized name. */\nexport function assertSafeRelativeFileName(name: string): string {\n const n = name.replace(/\\\\/g, \"/\");\n if (!n || n.startsWith(\"/\") || n.includes(\"..\")) throw new Error(\"Invalid file name\");\n return n;\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 { runOpenClaw } from \"./openclaw\";\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\n/** Ensures the frontmatter id field matches the given id. Preserves body. Returns md unchanged if no valid frontmatter. */\nexport function forceFrontmatterId(md: string, id: string): string {\n if (!md.startsWith(\"---\\n\")) return md;\n const end = md.indexOf(\"\\n---\\n\", 4);\n if (end === -1) return md;\n const fm = md.slice(4, end);\n const body = md.slice(end + 5);\n\n const lines = fm.split(\"\\n\");\n let found = false;\n const nextLines = lines.map((line) => {\n if (/^id\\s*:/i.test(line)) {\n found = true;\n return `id: ${id}`;\n }\n return line;\n });\n if (!found) nextLines.unshift(`id: ${id}`);\n\n return `---\\n${nextLines.join(\"\\n\")}\\n---\\n${body}`;\n}\n\n/** Returns display name for a team from recipe list, or null if not found. */\nexport async function getTeamDisplayName(teamId: string): Promise<string | null> {\n const recipes = await listRecipes();\n const match = recipes.find((r) => r.kind === \"team\" && r.id === teamId);\n return match?.name ?? null;\n}\n\n/** Fetches recipe list from openclaw. Returns empty array on failure. */\nexport async function listRecipes(): Promise<RecipeListItem[]> {\n const list = await runOpenClaw([\"recipes\", \"list\"]);\n if (!list.ok) return [];\n try {\n return JSON.parse(list.stdout) as RecipeListItem[];\n } catch {\n return [];\n }\n}\n\n/** Fetches recipe list and returns the item with the given id, or null. */\nexport async function findRecipeById(id: string): Promise<RecipeListItem | null> {\n const recipes = await listRecipes();\n return recipes.find((r) => r.id === id) ?? null;\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 { NextResponse } from \"next/server\";\nimport path from \"node:path\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { findRecipeById, resolveRecipePath } from \"@/lib/recipes\";\nimport fs from \"node:fs/promises\";\nimport { getAttachedTeams, getAttachedAgents } from \"./helpers\";\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as { id?: string };\n const id = String(body.id ?? \"\").trim();\n if (!id) return NextResponse.json({ ok: false, error: \"id is required\" }, { status: 400 });\n\n const item = await findRecipeById(id);\n if (!item) return NextResponse.json({ ok: false, error: `Recipe not found: ${id}` }, { status: 404 });\n if (item.source === \"builtin\") {\n return NextResponse.json({ ok: false, error: `Recipe ${id} is builtin and cannot be deleted` }, { status: 403 });\n }\n\n const workspaceRoot = (await runOpenClaw([\"config\", \"get\", \"agents.defaults.workspace\"]))?.stdout?.trim();\n if (!workspaceRoot) {\n return NextResponse.json({ ok: false, error: \"agents.defaults.workspace not set\" }, { status: 500 });\n }\n const allowedDir = path.resolve(workspaceRoot, \"recipes\") + path.sep;\n\n const filePath = await resolveRecipePath(item);\n const resolved = path.resolve(filePath);\n if (!resolved.startsWith(allowedDir)) {\n return NextResponse.json({ ok: false, error: `Refusing to delete non-workspace recipe path: ${resolved}` }, { status: 403 });\n }\n\n const kind = (item.kind ?? \"team\") as \"team\" | \"agent\";\n\n if (kind === \"team\") {\n const attachedTeams = await getAttachedTeams(workspaceRoot, id);\n if (attachedTeams.length) {\n return NextResponse.json(\n {\n ok: false,\n error: `Team ${id} is in use by installed team(s): ${attachedTeams.join(\", \")}. Remove the team(s) first, then delete the recipe. If no team is shown, you still have a .openclaw/workspace-${id} folder. Please remove the folder to delete this recipe.`,\n details: { attachedTeams },\n },\n { status: 409 }\n );\n }\n }\n\n if (kind === \"agent\") {\n const { attachedAgents, hasSameIdAgent } = await getAttachedAgents(workspaceRoot, id);\n if (hasSameIdAgent) {\n return NextResponse.json(\n {\n ok: false,\n error: `Agent recipe ${id} cannot be deleted because an active agent exists with the same id: ${id}. Delete the agent first, then delete the recipe.`,\n details: { agentId: id },\n },\n { status: 409 }\n );\n }\n if (attachedAgents.length) {\n return NextResponse.json(\n {\n ok: false,\n error: `Agent recipe ${id} is in use by active agent(s): ${attachedAgents.join(\", \")}. Delete the agent(s) first, then delete the recipe.`,\n details: { attachedAgents },\n },\n { status: 409 }\n );\n }\n }\n\n await fs.rm(resolved, { force: true });\n return NextResponse.json({ ok: true, deleted: resolved });\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/delete/route\",\n pathname: \"/api/recipes/delete\",\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/delete/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/delete/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 fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\nexport async function getAttachedTeams(workspaceRoot: string, recipeId: string): Promise<string[]> {\n const attachedTeams: string[] = [];\n const teamsRoot = path.resolve(workspaceRoot, \"..\");\n\n try {\n const entries = await fs.readdir(teamsRoot, { withFileTypes: true });\n const workspaceDirs = entries.filter((e) => e.isDirectory() && e.name.startsWith(\"workspace-\"));\n\n for (const dirent of workspaceDirs) {\n const metaPath = path.join(teamsRoot, dirent.name, \"team.json\");\n try {\n const raw = await fs.readFile(metaPath, \"utf8\");\n const meta = JSON.parse(raw) as { recipeId?: unknown; teamId?: unknown };\n if (String(meta.recipeId ?? \"\").trim() === recipeId) {\n attachedTeams.push(\n String(meta.teamId ?? dirent.name.replace(/^workspace-/, \"\")).trim() || dirent.name\n );\n }\n } catch {\n // ignore\n }\n }\n } catch {\n // ignore\n }\n\n return attachedTeams;\n}\n\nexport async function getAttachedAgents(\n workspaceRoot: string,\n recipeId: string\n): Promise<{ attachedAgents: string[]; hasSameIdAgent: boolean }> {\n const attachedAgents: string[] = [];\n let hasSameIdAgent = false;\n\n const agentsRes = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n if (!agentsRes.ok) return { attachedAgents, hasSameIdAgent };\n\n try {\n const agents = JSON.parse(agentsRes.stdout) as Array<{ id?: unknown }>;\n hasSameIdAgent = agents.some((a) => String(a.id ?? \"\").trim() === recipeId);\n\n for (const a of agents) {\n const agentId = String(a.id ?? \"\").trim();\n if (!agentId) continue;\n const metaPath = path.join(workspaceRoot, \"agents\", agentId, \"agent.json\");\n try {\n const raw = await fs.readFile(metaPath, \"utf8\");\n const meta = JSON.parse(raw) as { recipeId?: unknown };\n if (String(meta.recipeId ?? \"\").trim() === recipeId) attachedAgents.push(agentId);\n } catch {\n // ignore\n }\n }\n } catch {\n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A,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,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":[5]}
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/paths.ts","../../../src/lib/recipes.ts","../../../src/app/api/recipes/delete/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/recipes/delete/helpers.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\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\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 = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\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 = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\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 = extractStdout(err);\n const stderr = extractStderr(err, 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 // OpenClaw message routing bindings (used for HITL approvals, etc.)\n bindings?: unknown[];\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\n // Back-compat: some installs keep goals at <workspace>/goals.\n // Prefer that when present, otherwise fall back to <workspace>/notes/goals.\n const direct = path.join(ws, \"goals\");\n try {\n const st = await fs.stat(direct);\n if (st.isDirectory()) return direct;\n } catch {\n // ignore\n }\n\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\n/** Team workspace dir derived from agents.defaults.workspace (sibling: .. / workspace-{teamId}) */\nexport function teamDirFromBaseWorkspace(baseWorkspace: string, teamId: string) {\n // Special-case: treat \"main\" as the personal workspace (agents.defaults.workspace).\n // This lets Kitchen expose a selectable \"main\" scope without creating a separate\n // ~/.openclaw/workspace-main folder.\n if (teamId === \"main\") return path.resolve(baseWorkspace);\n return path.resolve(baseWorkspace, \"..\", `workspace-${teamId}`);\n}\n\n/** Rejects path traversal and empty names; returns normalized name. */\nexport function assertSafeRelativeFileName(name: string): string {\n const n = name.replace(/\\\\/g, \"/\");\n if (!n || n.startsWith(\"/\") || n.includes(\"..\")) throw new Error(\"Invalid file name\");\n return n;\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 { runOpenClaw } from \"./openclaw\";\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\n/** Ensures the frontmatter id field matches the given id. Preserves body. Returns md unchanged if no valid frontmatter. */\nexport function forceFrontmatterId(md: string, id: string): string {\n if (!md.startsWith(\"---\\n\")) return md;\n const end = md.indexOf(\"\\n---\\n\", 4);\n if (end === -1) return md;\n const fm = md.slice(4, end);\n const body = md.slice(end + 5);\n\n const lines = fm.split(\"\\n\");\n let found = false;\n const nextLines = lines.map((line) => {\n if (/^id\\s*:/i.test(line)) {\n found = true;\n return `id: ${id}`;\n }\n return line;\n });\n if (!found) nextLines.unshift(`id: ${id}`);\n\n return `---\\n${nextLines.join(\"\\n\")}\\n---\\n${body}`;\n}\n\n/** Returns display name for a team from recipe list, or null if not found. */\nexport async function getTeamDisplayName(teamId: string): Promise<string | null> {\n const recipes = await listRecipes();\n const match = recipes.find((r) => r.kind === \"team\" && r.id === teamId);\n return match?.name ?? null;\n}\n\n/** Fetches recipe list from openclaw. Returns empty array on failure. */\nexport async function listRecipes(): Promise<RecipeListItem[]> {\n const list = await runOpenClaw([\"recipes\", \"list\"]);\n if (!list.ok) return [];\n try {\n return JSON.parse(list.stdout) as RecipeListItem[];\n } catch {\n return [];\n }\n}\n\n/** Fetches recipe list and returns the item with the given id, or null. */\nexport async function findRecipeById(id: string): Promise<RecipeListItem | null> {\n const recipes = await listRecipes();\n return recipes.find((r) => r.id === id) ?? null;\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 { NextResponse } from \"next/server\";\nimport path from \"node:path\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { findRecipeById, resolveRecipePath } from \"@/lib/recipes\";\nimport fs from \"node:fs/promises\";\nimport { getAttachedTeams, getAttachedAgents } from \"./helpers\";\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as { id?: string };\n const id = String(body.id ?? \"\").trim();\n if (!id) return NextResponse.json({ ok: false, error: \"id is required\" }, { status: 400 });\n\n const item = await findRecipeById(id);\n if (!item) return NextResponse.json({ ok: false, error: `Recipe not found: ${id}` }, { status: 404 });\n if (item.source === \"builtin\") {\n return NextResponse.json({ ok: false, error: `Recipe ${id} is builtin and cannot be deleted` }, { status: 403 });\n }\n\n const workspaceRoot = (await runOpenClaw([\"config\", \"get\", \"agents.defaults.workspace\"]))?.stdout?.trim();\n if (!workspaceRoot) {\n return NextResponse.json({ ok: false, error: \"agents.defaults.workspace not set\" }, { status: 500 });\n }\n const allowedDir = path.resolve(workspaceRoot, \"recipes\") + path.sep;\n\n const filePath = await resolveRecipePath(item);\n const resolved = path.resolve(filePath);\n if (!resolved.startsWith(allowedDir)) {\n return NextResponse.json({ ok: false, error: `Refusing to delete non-workspace recipe path: ${resolved}` }, { status: 403 });\n }\n\n const kind = (item.kind ?? \"team\") as \"team\" | \"agent\";\n\n if (kind === \"team\") {\n const attachedTeams = await getAttachedTeams(workspaceRoot, id);\n if (attachedTeams.length) {\n return NextResponse.json(\n {\n ok: false,\n error: `Team ${id} is in use by installed team(s): ${attachedTeams.join(\", \")}. Remove the team(s) first, then delete the recipe. If no team is shown, you still have a .openclaw/workspace-${id} folder. Please remove the folder to delete this recipe.`,\n details: { attachedTeams },\n },\n { status: 409 }\n );\n }\n }\n\n if (kind === \"agent\") {\n const { attachedAgents, hasSameIdAgent } = await getAttachedAgents(workspaceRoot, id);\n if (hasSameIdAgent) {\n return NextResponse.json(\n {\n ok: false,\n error: `Agent recipe ${id} cannot be deleted because an active agent exists with the same id: ${id}. Delete the agent first, then delete the recipe.`,\n details: { agentId: id },\n },\n { status: 409 }\n );\n }\n if (attachedAgents.length) {\n return NextResponse.json(\n {\n ok: false,\n error: `Agent recipe ${id} is in use by active agent(s): ${attachedAgents.join(\", \")}. Delete the agent(s) first, then delete the recipe.`,\n details: { attachedAgents },\n },\n { status: 409 }\n );\n }\n }\n\n await fs.rm(resolved, { force: true });\n return NextResponse.json({ ok: true, deleted: resolved });\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/delete/route\",\n pathname: \"/api/recipes/delete\",\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/delete/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/delete/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 fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\n\nexport async function getAttachedTeams(workspaceRoot: string, recipeId: string): Promise<string[]> {\n const attachedTeams: string[] = [];\n const teamsRoot = path.resolve(workspaceRoot, \"..\");\n\n try {\n const entries = await fs.readdir(teamsRoot, { withFileTypes: true });\n const workspaceDirs = entries.filter((e) => e.isDirectory() && e.name.startsWith(\"workspace-\"));\n\n for (const dirent of workspaceDirs) {\n const metaPath = path.join(teamsRoot, dirent.name, \"team.json\");\n try {\n const raw = await fs.readFile(metaPath, \"utf8\");\n const meta = JSON.parse(raw) as { recipeId?: unknown; teamId?: unknown };\n if (String(meta.recipeId ?? \"\").trim() === recipeId) {\n attachedTeams.push(\n String(meta.teamId ?? dirent.name.replace(/^workspace-/, \"\")).trim() || dirent.name\n );\n }\n } catch {\n // ignore\n }\n }\n } catch {\n // ignore\n }\n\n return attachedTeams;\n}\n\nexport async function getAttachedAgents(\n workspaceRoot: string,\n recipeId: string\n): Promise<{ attachedAgents: string[]; hasSameIdAgent: boolean }> {\n const attachedAgents: string[] = [];\n let hasSameIdAgent = false;\n\n const agentsRes = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n if (!agentsRes.ok) return { attachedAgents, hasSameIdAgent };\n\n try {\n const agents = JSON.parse(agentsRes.stdout) as Array<{ id?: unknown }>;\n hasSameIdAgent = agents.some((a) => String(a.id ?? \"\").trim() === recipeId);\n\n for (const a of agents) {\n const agentId = String(a.id ?? \"\").trim();\n if (!agentId) continue;\n const metaPath = path.join(workspaceRoot, \"agents\", agentId, \"agent.json\");\n try {\n const raw = await fs.readFile(metaPath, \"utf8\");\n const meta = JSON.parse(raw) as { recipeId?: unknown };\n if (String(meta.recipeId ?? \"\").trim() === recipeId) attachedAgents.push(agentId);\n } catch {\n // ignore\n }\n }\n } catch {\n // ignore\n }\n\n return { attachedAgents, hasSameIdAgent };\n}\n"],"names":[],"mappings":"mMAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,qDClBA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAAA,AAFtB,EAAA,CAAA,CAAA,OAEsB,SAAA,AAAS,EAAC,EAAA,QAAQ,EASxC,SAAS,EAAc,CAAyB,QAC9C,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAE5D,EACT,CASA,SAAS,EAAc,CAA4C,CAAE,CAAiB,QACpF,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAExC,UAAvB,AAAiC,OAA1B,EAAI,OAAO,CAAsB,EAAI,OAAO,CAChD,OAAO,EAChB,CAaA,SAAS,EAAe,CAAW,EACjC,IAAM,EAAU,EAAI,IAAI,GACxB,GAAI,CAAC,EAAS,OAAO,EAGrB,IAAM,EAAY,CAAO,CAAC,EAAE,CAC5B,GAAI,AAAc,SAAO,AAAc,SAAqB,MAAd,EAAmB,OAAO,EAGxE,IAAM,EAAQ,EAAQ,KAAK,CAAC,MACtB,EAAe,EAAM,SAAS,CAAC,AAAC,GAAM,aAAa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D,AAAS,GAAG,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,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":[5]}
|
|
@@ -0,0 +1,3 @@
|
|
|
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"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},74533,(e,t,r)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},12057,(e,t,r)=>{t.exports=e.x("node:util",()=>require("node:util"))},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),r=e.i(74533);let n=(0,e.i(12057).promisify)(r.execFile);function i(e){return"string"==typeof e.stdout?e.stdout:e.stdout&&"object"==typeof e.stdout&&"toString"in e.stdout?String(e.stdout.toString()):""}function a(e,t){return"string"==typeof e.stderr?e.stderr:e.stderr&&"object"==typeof e.stderr&&"toString"in e.stderr?String(e.stderr.toString()):"string"==typeof e.message?e.message:String(t)}function s(e){let t=e.trim();if(!t)return e;let r=t[0];if("["===r||"{"===r||'"'===r)return e;let n=t.split("\n"),i=n.findIndex(e=>/^\s*[[\{"]/.test(e));if(i>0){let e=n.slice(i).join("\n");try{return JSON.parse(e),e}catch{}}return e}async function o(e,t={}){let{sanitizeStdout:r=!0}=t;try{process.platform;let t=await n("openclaw",e,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000}),i=String(t.stdout??"");return{ok:!0,exitCode:0,stdout:r?s(i):i,stderr:String(t.stderr??"")}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:i(t),stderr:a(t,t)}}}function l(e){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{}let r=t.split("\n"),n=r.findIndex(e=>/^\s*[[\{]/.test(e));if(n>=0){let e=r.slice(n).join("\n");try{return JSON.parse(e)}catch{}}for(let e=r.length-1;e>=0;e--)if(/^\s*[\]}]/.test(r[e])){for(let t=e;t>=0;t--)if(/^\s*[[\{]/.test(r[t]))try{return JSON.parse(r.slice(t,e+1).join("\n"))}catch{}}return null}async function u(e){return o(e,{sanitizeStdout:!1})}async function d(e){if("cron"===e[0]||"recipes"===e[0]&&"workflows"===e[1]&&["runner-once","runner-tick","worker-tick"].includes(e[2]))return o(e);let r=(0,t.getKitchenApi)();try{let t=await r.runtime.system.runCommandWithTimeout(["openclaw",...e],{timeoutMs:12e4}),n=s(String(t.stdout??"")),i=String(t.stderr??""),a="number"==typeof t.exitCode?t.exitCode:"number"==typeof t.code?t.code:"number"==typeof t.status?t.status:0;if(0!==a)return{ok:!1,exitCode:a,stdout:n,stderr:i};return{ok:!0,exitCode:0,stdout:n,stderr:i}}catch(t){let e="number"==typeof t.code?t.code:1;return{ok:!1,exitCode:e,stdout:i(t),stderr:a(t,t)}}}e.s(["extractJson",()=>l,"runOpenClaw",()=>d,"runOpenClawRaw",()=>u])},26837,e=>{"use strict";var t=e.i(12714),r=e.i(60526),n=e.i(50227);function i(e){return e.includes("/")||e.includes("\\")}function a(e){if(!/^[a-z0-9][a-z0-9-]{1,63}$/.test(e))throw Error(`Invalid teamId "${e}"`);return n.default.join(r.default.homedir(),".openclaw",`workspace-${e}`)}function s(e){if(e)return a(e);let t=process.env.CK_TEAM_ID;if(!t&&!process.env.CK_TEAM_WORKSPACE_DIR)throw Error("No team specified. Pass a teamId or set CK_TEAM_ID / CK_TEAM_WORKSPACE_DIR.");return process.env.CK_TEAM_WORKSPACE_DIR??a(t)}function o(e,t){let r=i(t)?t:a(t);return n.default.join(r,{backlog:"work/backlog","in-progress":"work/in-progress",testing:"work/testing",done:"work/done"}[e])}async function l(e){let r,a=i(e)?"workspace"===(r=n.default.basename(e))?"main":r.startsWith("workspace-")?r.slice(10):r:e,s=[];for(let r of["backlog","in-progress","testing","done"]){let i=[];try{i=await t.default.readdir(o(r,e))}catch{i=[]}for(let l of i){if(!l.endsWith(".md"))continue;let i=function(e){let t=e.match(/^(\d{4})-/);return t?Number(t[1]):null}(l);if(null==i)continue;let u=n.default.join(o(r,e),l),[d,c]=await Promise.all([t.default.readFile(u,"utf8"),t.default.stat(u)]),p=function(e){let t=e.split("\n")[0]??"",r=t.startsWith("# ")?t.slice(2).trim():"",n=r.indexOf(" ");if(n>0){let e=r.slice(n+1).trim();if(e)return e}let i=r.replace(/^\d{4}-/,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim(),a=new Set(["api","cli","ui","ux","gpu","cpu","npm","pr","ci","cd","json","yaml","md"]),s=i?i.split(" ").filter(Boolean).map(e=>{let t=e.toLowerCase();return a.has(t)?e.toUpperCase():t.startsWith("v")&&/^\d/.test(t.slice(1))||/^[\d.]+$/.test(e)?e:e.slice(0,1).toUpperCase()+e.slice(1)}).join(" "):"";return s||r||"(untitled)"}(d),f=function(e,t){let r=RegExp(`^${t}:\\s*(.*)$`,"mi"),n=e.match(r);return n?.[1]?.trim()||null}(d,"Owner"),m=c.mtime.toISOString(),h=(Date.now()-c.mtimeMs)/36e5;s.push({teamId:a,number:i,id:l.replace(/\.md$/,""),title:p,owner:f,stage:r,file:u,updatedAt:m,ageHours:h})}}return s.sort((e,t)=>e.number-t.number),s}async function u(e,t){let r=await l(t),n=e.trim(),i=n.match(/^\d+$/)?r.find(e=>e.number===Number(n)):null;return r.find(e=>e.id===n)??i??null}async function d(e,t){return u(t,e)}async function c(e,r){let n=await u(r,e);return n?{teamId:n.teamId,id:n.id,file:n.file,markdown:await t.default.readFile(n.file,"utf8"),owner:n.owner,stage:n.stage}:null}e.s(["getTeamWorkspaceDir",()=>s,"getTicketByIdOrNumber",()=>u,"getTicketMarkdown",()=>c,"listTickets",()=>l,"resolveTicket",()=>d,"stageDir",()=>o,"teamWorkspace",()=>a])},16328,e=>{"use strict";var t=e.i(47909),r=e.i(74017),n=e.i(96250),i=e.i(59756),a=e.i(61916),s=e.i(74677),o=e.i(69741),l=e.i(16795),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),f=e.i(70101),m=e.i(54468),h=e.i(10372),g=e.i(93695);e.i(52474);var w=e.i(220),x=e.i(12714),k=e.i(89171),R=e.i(5003),v=e.i(26837);async function y(e,t){let r=await (0,v.getTicketMarkdown)(e,t);if(!r)return;let n=`- ${new Date().toISOString().slice(0,10)} (ClawKitchen UI): Marked done from ClawKitchen UI.`;if(r.markdown.includes(n))return;let i=/\n## Comments\n/i.test(r.markdown)||/^## Comments\n/im.test(r.markdown),a=r.markdown;i||(a=a.replace(/\s*$/,"\n\n## Comments\n")),a=a.replace(/\s*$/,"\n"+n+"\n"),await x.default.writeFile(r.file,a,"utf8")}async function C(e){try{let t=await e.json(),r=String(t.teamId??"").trim(),n=String(t.ticket??"").trim(),i=String(t.to??"").trim();if(!r)return k.NextResponse.json({ok:!1,error:"Missing teamId"},{status:400});if(!n)return k.NextResponse.json({ok:!1,error:"Missing ticket"},{status:400});if(!i||!["backlog","in-progress","testing","done"].includes(i))return k.NextResponse.json({ok:!1,error:"Invalid destination stage"},{status:400});let a=await (0,R.runOpenClaw)(["recipes","move-ticket","--team-id",r,"--ticket",n,"--to",i,"--yes"]);if(!a.ok)throw Error(a.stderr||`openclaw exit ${a.exitCode}`);return"done"===i&&await y(r,n),k.NextResponse.json({ok:!0})}catch(t){let e=t instanceof Error?t.message:String(t);return k.NextResponse.json({ok:!1,error:e},{status:500})}}e.s(["POST",()=>C],9749);var E=e.i(9749);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/tickets/move/route",pathname:"/api/tickets/move",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/tickets/move/route.ts",nextConfigOutput:"standalone",userland:E}),{workAsyncStorage:b,workUnitAsyncStorage:A,serverHooks:T}=S;function _(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:A})}async function O(e,t,n){S.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let x="/api/tickets/move/route";x=x.replace(/\/index$/,"")||"/";let k=await S.prepare(e,t,{srcPage:x,multiZoneDraftMode:!1});if(!k)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:R,params:v,nextConfig:y,parsedUrl:C,isDraftMode:E,prerenderManifest:b,routerServerContext:A,isOnDemandRevalidate:T,revalidateOnlyGenerated:_,resolvedPathname:O,clientReferenceManifest:I,serverActionsManifest:N}=k,j=(0,o.normalizeAppPath)(x),P=!!(b.dynamicRoutes[j]||b.routes[O]),q=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,C,!1):t.end("This page could not be found"),null);if(P&&!E){let e=!!b.routes[O],t=b.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await q();throw new g.NoFallbackError}}let M=null;!P||S.isDev||E||(M="/index"===(M=O)?"/":M);let D=!0===S.isDev||!P,K=P&&!D;N&&I&&(0,s.setManifestsSingleton)({page:x,clientReferenceManifest:I,serverActionsManifest:N});let $=e.method||"GET",U=(0,a.getTracer)(),H=U.getActiveScopeSpan(),F={params:v,prerenderManifest:b,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:D,incrementalCache:(0,i.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>S.onRequestError(e,t,n,i,A)},sharedContext:{buildId:R}},W=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),L=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t));try{let s=async e=>S.handle(L,F).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=U.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(`${$} ${x}`)}),o=!!(0,i.getRequestMeta)(e,"minimalMode"),l=async i=>{var a,l;let u=async({previousCacheEntry:r})=>{try{if(!o&&T&&_&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await s(i);e.fetchMetrics=F.renderOpts.fetchMetrics;let l=F.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let u=F.renderOpts.collectedTags;if(!P)return await (0,p.sendResponse)(W,B,a,F.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(a.headers);u&&(t[h.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==F.renderOpts.collectedRevalidate&&!(F.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&F.renderOpts.collectedRevalidate,n=void 0===F.renderOpts.collectedExpire||F.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:F.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:T})},!1,A),t}},d=await S.handleResponse({req:e,nextConfig:y,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:_,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:o});if(!P)return null;if((null==d||null==(a=d.value)?void 0:a.kind)!==w.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",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),E&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return o&&P||g.delete(h.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(W,B,new Response(d.value.body,{headers:g,status:d.value.status||200})),null};H?await l(H):await U.withPropagatedContext(e.headers,()=>U.trace(d.BaseServerSpan.handleRequest,{spanName:`${$} ${x}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:K,isOnDemandRevalidate:T})},!1,A),P)throw t;return await (0,p.sendResponse)(W,B,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>_,"routeModule",()=>S,"serverHooks",()=>T,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>A],16328)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__1480ffda._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/kitchen-api.ts","../../../src/lib/openclaw.ts","../../../src/lib/tickets.ts","../../../src/app/api/tickets/move/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\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"🦞 OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping — return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\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 = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\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 = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\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 = extractStdout(err);\n const stderr = extractStderr(err, 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\nexport type TicketStage = \"backlog\" | \"in-progress\" | \"testing\" | \"done\";\n\nexport interface TicketSummary {\n teamId: string;\n number: number;\n id: string;\n title: string;\n owner: string | null;\n stage: TicketStage;\n file: string;\n updatedAt: string; // ISO\n ageHours: number;\n}\n\nfunction assertSafeTeamId(teamId: string) {\n // Conservative: matches OpenClaw team ids like \"development-team\".\n if (!/^[a-z0-9][a-z0-9-]{1,63}$/.test(teamId)) {\n throw new Error(`Invalid teamId \"${teamId}\"`);\n }\n}\n\nfunction isPathLike(s: string) {\n return s.includes(\"/\") || s.includes(\"\\\\\");\n}\n\nexport function teamWorkspace(teamId: string) {\n assertSafeTeamId(teamId);\n return path.join(os.homedir(), \".openclaw\", `workspace-${teamId}`);\n}\n\n/**\n * Back-compat helper for older non-team-scoped code paths.\n * Prefer passing explicit teamId into APIs instead.\n */\nexport function getTeamWorkspaceDir(teamId?: string): string {\n if (teamId) return teamWorkspace(teamId);\n const envTeam = process.env.CK_TEAM_ID;\n if (!envTeam && !process.env.CK_TEAM_WORKSPACE_DIR) {\n throw new Error(\"No team specified. Pass a teamId or set CK_TEAM_ID / CK_TEAM_WORKSPACE_DIR.\");\n }\n return process.env.CK_TEAM_WORKSPACE_DIR ?? teamWorkspace(envTeam!);\n}\n\nexport function stageDir(stage: TicketStage, teamIdOrDir: string) {\n const map: Record<TicketStage, string> = {\n backlog: \"work/backlog\",\n \"in-progress\": \"work/in-progress\",\n testing: \"work/testing\",\n done: \"work/done\",\n };\n\n const base = isPathLike(teamIdOrDir) ? teamIdOrDir : teamWorkspace(teamIdOrDir);\n return path.join(base, map[stage]);\n}\n\nexport function parseTitle(md: string) {\n // Ticket markdown files typically start with: # 0033-some-slug\n const firstLine = md.split(\"\\n\")[0] ?? \"\";\n const header = firstLine.startsWith(\"# \") ? firstLine.slice(2).trim() : \"\";\n\n // If header is like: \"<id> <title...>\" keep the explicit title portion.\n const firstSpace = header.indexOf(\" \");\n if (firstSpace > 0) {\n const afterSpace = header.slice(firstSpace + 1).trim();\n if (afterSpace) return afterSpace;\n }\n\n // Otherwise derive from the slug: strip leading number + hyphen, then de-kebab.\n const derivedRaw = header\n .replace(/^\\d{4}-/, \"\")\n .replace(/[-_]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n\n const ACRONYMS = new Set([\"api\", \"cli\", \"ui\", \"ux\", \"gpu\", \"cpu\", \"npm\", \"pr\", \"ci\", \"cd\", \"json\", \"yaml\", \"md\"]);\n const titleCase = (s: string) =>\n s\n .split(\" \")\n .filter(Boolean)\n .map((w) => {\n const lower = w.toLowerCase();\n if (ACRONYMS.has(lower)) return w.toUpperCase();\n if (lower.startsWith(\"v\") && /^\\d/.test(lower.slice(1))) return w; // version-like\n if (/^[\\d.]+$/.test(w)) return w; // numbers/semver\n return w.slice(0, 1).toUpperCase() + w.slice(1);\n })\n .join(\" \");\n\n const derived = derivedRaw ? titleCase(derivedRaw) : \"\";\n\n if (derived) return derived;\n return header || \"(untitled)\";\n}\n\nfunction parseField(md: string, field: string): string | null {\n const re = new RegExp(`^${field}:\\\\s*(.*)$`, \"mi\");\n const m = md.match(re);\n return m?.[1]?.trim() || null;\n}\n\nexport function parseNumberFromFilename(filename: string): number | null {\n const m = filename.match(/^(\\d{4})-/);\n if (!m) return null;\n return Number(m[1]);\n}\n\nfunction teamIdFromTeamDir(teamDir: string): string {\n const base = path.basename(teamDir);\n if (base === \"workspace\") return \"main\";\n if (base.startsWith(\"workspace-\")) return base.slice(\"workspace-\".length);\n return base;\n}\n\nexport async function discoverTeamIds(): Promise<string[]> {\n // Convention: ~/.openclaw/workspace-<teamId>\n const root = path.join(os.homedir(), \".openclaw\");\n let entries: string[] = [];\n try {\n entries = await fs.readdir(root);\n } catch {\n return [];\n }\n\n const teamIds = entries\n .filter((e) => e.startsWith(\"workspace-\"))\n .map((e) => e.slice(\"workspace-\".length))\n .filter((id) => Boolean(id) && id !== \"workspace\");\n\n // Also include personal workspace scope.\n teamIds.push(\"main\");\n\n return Array.from(new Set(teamIds)).sort();\n}\n\n/**\n * List tickets for a specific team (recommended).\n * - listTickets(\"my-team\")\n * - listTickets(teamWorkspaceDir)\n */\nexport async function listTickets(teamIdOrDir: string): Promise<TicketSummary[]> {\n const teamId = isPathLike(teamIdOrDir) ? teamIdFromTeamDir(teamIdOrDir) : teamIdOrDir;\n const stages: TicketStage[] = [\"backlog\", \"in-progress\", \"testing\", \"done\"];\n const all: TicketSummary[] = [];\n\n for (const stage of stages) {\n let files: string[] = [];\n try {\n files = await fs.readdir(stageDir(stage, teamIdOrDir));\n } catch {\n files = [];\n }\n\n for (const f of files) {\n if (!f.endsWith(\".md\")) continue;\n const number = parseNumberFromFilename(f);\n if (number == null) continue;\n\n const file = path.join(stageDir(stage, teamIdOrDir), f);\n const [md, stat] = await Promise.all([fs.readFile(file, \"utf8\"), fs.stat(file)]);\n\n const title = parseTitle(md);\n const owner = parseField(md, \"Owner\");\n const updatedAt = stat.mtime.toISOString();\n const ageHours = (Date.now() - stat.mtimeMs) / (1000 * 60 * 60);\n\n all.push({\n teamId,\n number,\n id: f.replace(/\\.md$/, \"\"),\n title,\n owner,\n stage,\n file,\n updatedAt,\n ageHours,\n });\n }\n }\n\n all.sort((a, b) => a.number - b.number);\n return all;\n}\n\n/**\n * List tickets across all discovered teams (used for /tickets?team=all).\n */\nexport async function listAllTeamsTickets(): Promise<TicketSummary[]> {\n const teamIds = await discoverTeamIds();\n const all: TicketSummary[] = [];\n\n for (const teamId of teamIds) {\n all.push(...(await listTickets(teamId)));\n }\n\n all.sort((a, b) => (a.teamId === b.teamId ? a.number - b.number : a.teamId.localeCompare(b.teamId)));\n return all;\n}\n\n/**\n * Back-compat helper used by some API routes.\n */\nexport async function getTicketByIdOrNumber(ticketIdOrNumber: string, teamIdOrDir: string) {\n const tickets = await listTickets(teamIdOrDir);\n const normalized = ticketIdOrNumber.trim();\n\n const byNumber = normalized.match(/^\\d+$/) ? tickets.find((t) => t.number === Number(normalized)) : null;\n const byId = tickets.find((t) => t.id === normalized);\n return byId ?? byNumber ?? null;\n}\n\nexport async function resolveTicket(teamId: string, ticketIdOrNumber: string): Promise<TicketSummary | null> {\n return getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n}\n\n/**\n * getTicketMarkdown(teamId, ticketIdOrNumber)\n */\nexport async function getTicketMarkdown(\n teamId: string,\n ticketIdOrNumber: string,\n): Promise<{ teamId: string; id: string; file: string; markdown: string; owner: string | null; stage: TicketStage } | null> {\n const hit = await getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n if (!hit) return null;\n\n return {\n teamId: hit.teamId,\n id: hit.id,\n file: hit.file,\n markdown: await fs.readFile(hit.file, \"utf8\"),\n owner: hit.owner,\n stage: hit.stage,\n };\n}\n","import fs from \"node:fs/promises\";\n\nimport { NextResponse } from \"next/server\";\n\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { getTicketMarkdown } from \"@/lib/tickets\";\n\nfunction todayUtc() {\n return new Date().toISOString().slice(0, 10);\n}\n\nasync function appendDoneAuditComment(teamId: string, ticketIdOrNumber: string) {\n const hit = await getTicketMarkdown(teamId, ticketIdOrNumber);\n if (!hit) return;\n\n const line = `- ${todayUtc()} (ClawKitchen UI): Marked done from ClawKitchen UI.`;\n if (hit.markdown.includes(line)) return;\n\n const hasComments = /\\n## Comments\\n/i.test(hit.markdown) || /^## Comments\\n/im.test(hit.markdown);\n\n let next = hit.markdown;\n if (!hasComments) {\n next = next.replace(/\\s*$/, \"\\n\\n## Comments\\n\");\n }\n\n // Append at end; this keeps the operation simple and avoids brittle section parsing.\n next = next.replace(/\\s*$/, \"\\n\" + line + \"\\n\");\n\n await fs.writeFile(hit.file, next, \"utf8\");\n}\n\nexport async function POST(req: Request) {\n try {\n const body = await req.json();\n const teamId = String(body.teamId ?? \"\").trim();\n const ticket = String(body.ticket ?? \"\").trim();\n const to = String(body.to ?? \"\").trim();\n\n if (!teamId) {\n return NextResponse.json({ ok: false, error: \"Missing teamId\" }, { status: 400 });\n }\n if (!ticket) {\n return NextResponse.json({ ok: false, error: \"Missing ticket\" }, { status: 400 });\n }\n if (!to || ![\"backlog\", \"in-progress\", \"testing\", \"done\"].includes(to)) {\n return NextResponse.json({ ok: false, error: \"Invalid destination stage\" }, { status: 400 });\n }\n\n const args = [\"recipes\", \"move-ticket\", \"--team-id\", teamId, \"--ticket\", ticket, \"--to\", to, \"--yes\"];\n\n const res = await runOpenClaw(args);\n if (!res.ok) throw new Error(res.stderr || `openclaw exit ${res.exitCode}`);\n\n if (to === \"done\") {\n await appendDoneAuditComment(teamId, ticket);\n }\n\n return NextResponse.json({ ok: true });\n } catch (err: unknown) {\n const message = err instanceof Error ? err.message : String(err);\n return NextResponse.json({ ok: false, error: message }, { status: 500 });\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/tickets/move/route\",\n pathname: \"/api/tickets/move\",\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/tickets/move/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/tickets/move/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":"w2CAUO,SAAS,IACd,IAAM,EAAO,WAA6D,iBAAiB,CAC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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"))},40317,e=>{"use strict";function t(e){return e instanceof Error?e.message:String(e)}e.s(["errorMessage",()=>t])},66680,(e,t,r)=>{t.exports=e.x("node:crypto",()=>require("node:crypto"))},15877,69279,e=>{"use strict";var t=e.i(66680),r=e.i(12714),n=e.i(50227);function a(){let e=process.env.HOME||process.env.USERPROFILE||"";if(!e)throw Error("Could not resolve home directory (set HOME)");return n.join(e,".openclaw","openclaw.json")}async function s(){let e=a(),n=await r.default.readFile(e,"utf8"),s=t.default.createHash("sha256").update(n).digest("hex"),o=JSON.parse(n);return{path:e,raw:n,hash:s,json:o}}function o(e){return e&&"object"==typeof e?function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let r={};for(let[n,a]of Object.entries(t)){if("botToken"===n||"token"===n||"authToken"===n||n.toLowerCase().includes("secret")){"string"==typeof a&&a?r[n]="__OPENCLAW_REDACTED__":r[n]=a;continue}r[n]=e(a)}return r}(e):{}}async function i({patch:e,note:s}){let o=a(),i=JSON.stringify(e(JSON.parse(await r.default.readFile(o,"utf8"))),null,2)+"\n",l=n.dirname(o),u=n.join(l,`openclaw.json.tmp.${process.pid}.${Date.now()}`);if(await r.default.writeFile(u,i,"utf8"),await r.default.rename(u,o),s)try{let e=n.join(l,"notes");await r.default.mkdir(e,{recursive:!0}),await r.default.appendFile(n.join(e,"kitchen-config.log"),`[${new Date().toISOString()}] ${s}
|
|
2
|
+
`,"utf8")}catch{}return{ok:!0,path:o,hash:t.default.createHash("sha256").update(i).digest("hex")}}function l(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}e.s(["patchOpenClawConfigFile",()=>i,"readOpenClawConfigRaw",()=>s,"redactChannels",()=>o],15877),e.s(["isRecord",()=>l],69279)},64937,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),u=e.i(87718),d=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),f=e.i(54468),x=e.i(10372),R=e.i(93695);e.i(52474);var g=e.i(220),w=e.i(89171),v=e.i(40317),y=e.i(15877),m=e.i(69279);async function C(){try{let e=await (0,y.readOpenClawConfigRaw)(),t=(0,m.isRecord)(e.json)?e.json:{},r=(0,m.isRecord)(t.channels)?t.channels:{},n=Array.isArray(t.bindings)?t.bindings:[];return w.NextResponse.json({ok:!0,hash:e.hash,channels:(0,y.redactChannels)(r),bindings:n})}catch(t){let e=(0,v.errorMessage)(t);return w.NextResponse.json({ok:!1,error:e},{status:500})}}async function E(e){try{let t=await e.json(),r=String(t?.provider??"").trim();if(!r)return w.NextResponse.json({ok:!1,error:"provider is required"},{status:400});let n=(0,m.isRecord)(t?.config)?t.config:null;if(!n)return w.NextResponse.json({ok:!1,error:"config must be an object"},{status:400});if("telegram"===r&&!String(n.botToken??"").trim())return w.NextResponse.json({ok:!1,error:"telegram.botToken is required"},{status:400});return await (0,y.patchOpenClawConfigFile)({note:`ClawKitchen Channels upsert: ${r}`,patch:e=>{let t={...e},a=(0,m.isRecord)(t.channels)?t.channels:{};return t.channels={...a,[r]:n},t}}),w.NextResponse.json({ok:!0,restartRequired:!0,restartHint:"Restart OpenClaw Gateway to apply channel config changes."})}catch(t){let e=(0,v.errorMessage)(t);return w.NextResponse.json({ok:!1,error:e},{status:500})}}async function j(e){try{let t=await e.json(),r=String(t?.provider??"").trim();if(!r)return w.NextResponse.json({ok:!1,error:"provider is required"},{status:400});if(String(t?.confirm??"").trim()!=r)return w.NextResponse.json({ok:!1,error:`Typed confirmation required. Set confirm="${r}" to delete.`},{status:400});return await (0,y.patchOpenClawConfigFile)({note:`ClawKitchen Channels delete: ${r}`,patch:e=>{let t={...e},n={...(0,m.isRecord)(t.channels)?t.channels:{}};return delete n[r],t.channels=n,t}}),w.NextResponse.json({ok:!0,restartRequired:!0,restartHint:"Restart OpenClaw Gateway to apply channel config changes."})}catch(t){let e=(0,v.errorMessage)(t);return w.NextResponse.json({ok:!1,error:e},{status:500})}}e.s(["DELETE",()=>j,"GET",()=>C,"PUT",()=>E],23334);var b=e.i(23334);let k=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/channels/bindings/route",pathname:"/api/channels/bindings",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/channels/bindings/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:N,workUnitAsyncStorage:A,serverHooks:O}=k;function T(){return(0,n.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:A})}async function S(e,t,n){k.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/channels/bindings/route";w=w.replace(/\/index$/,"")||"/";let v=await k.prepare(e,t,{srcPage:w,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:m,nextConfig:C,parsedUrl:E,isDraftMode:j,prerenderManifest:b,routerServerContext:N,isOnDemandRevalidate:A,revalidateOnlyGenerated:O,resolvedPathname:T,clientReferenceManifest:S,serverActionsManifest:q}=v,P=(0,i.normalizeAppPath)(w),_=!!(b.dynamicRoutes[P]||b.routes[T]),H=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,E,!1):t.end("This page could not be found"),null);if(_&&!j){let e=!!b.routes[T],t=b.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(C.experimental.adapterPath)return await H();throw new R.NoFallbackError}}let D=null;!_||k.isDev||j||(D="/index"===(D=T)?"/":D);let M=!0===k.isDev||!_,U=_&&!M;q&&S&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:S,serverActionsManifest:q});let I=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),K={params:m,prerenderManifest:b,renderOpts:{experimental:{authInterrupts:!!C.experimental.authInterrupts},cacheComponents:!!C.cacheComponents,supportsDynamicResponse:M,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:y}},L=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),B=u.NextRequestAdapter.fromNodeNextRequest(L,(0,u.signalFromNodeResponse)(t));try{let o=async e=>k.handle(B,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=`${I} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${I} ${w}`)}),i=!!(0,a.getRequestMeta)(e,"minimalMode"),l=async a=>{var s,l;let u=async({previousCacheEntry:r})=>{try{if(!i&&A&&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=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,p.sendResponse)(L,G,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);u&&(t[x.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>=x.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.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 k.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,N),t}},d=await k.handleResponse({req:e,nextConfig:C,cacheKey:D,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:O,responseGenerator:u,waitUntil:n.waitUntil,isMinimalMode:i});if(!_)return null;if((null==d||null==(s=d.value)?void 0:s.kind)!==g.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});i||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),j&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return i&&_||R.delete(x.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,f.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(L,G,new Response(d.value.body,{headers:R,status:d.value.status||200})),null};$?await l($):await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${I} ${w}`,kind:s.SpanKind.SERVER,attributes:{"http.method":I,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await k.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,N),_)throw t;return await (0,p.sendResponse)(L,G,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>T,"routeModule",()=>k,"serverHooks",()=>O,"workAsyncStorage",()=>N,"workUnitAsyncStorage",()=>A],64937)}];
|
|
3
|
+
|
|
4
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__17124952._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/errors.ts","../../../src/lib/openclaw-config.ts","../../../src/lib/type-guards.ts","../../../src/app/api/channels/bindings/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["/**\n * Extracts a string message from an unknown error value.\n * Used consistently across API routes and client components.\n */\nexport function errorMessage(e: unknown): string {\n return e instanceof Error ? e.message : String(e);\n}\n","import crypto from \"node:crypto\";\nimport fs from \"node:fs/promises\";\nimport * as path from \"node:path\";\n\nexport type OpenClawConfigFile = {\n gateway?: unknown;\n channels?: unknown;\n bindings?: unknown;\n // allow extra keys\n [k: string]: unknown;\n};\n\nfunction configPath() {\n const home = process.env.HOME || process.env.USERPROFILE || \"\";\n if (!home) throw new Error(\"Could not resolve home directory (set HOME)\");\n return path.join(home, \".openclaw\", \"openclaw.json\");\n}\n\nexport async function readOpenClawConfigRaw(): Promise<{ path: string; raw: string; hash: string; json: OpenClawConfigFile }> {\n const p = configPath();\n const raw = await fs.readFile(p, \"utf8\");\n const hash = crypto.createHash(\"sha256\").update(raw).digest(\"hex\");\n const json = JSON.parse(raw) as OpenClawConfigFile;\n return { path: p, raw, hash, json };\n}\n\nexport function redactChannels(channels: unknown) {\n if (!channels || typeof channels !== \"object\") return {};\n const root = channels as Record<string, unknown>;\n\n function redactObj(v: unknown): unknown {\n if (!v || typeof v !== \"object\") return v;\n if (Array.isArray(v)) return v.map(redactObj);\n\n const o = v as Record<string, unknown>;\n const out: Record<string, unknown> = {};\n for (const [k, val] of Object.entries(o)) {\n if (k === \"botToken\" || k === \"token\" || k === \"authToken\" || k.toLowerCase().includes(\"secret\")) {\n if (typeof val === \"string\" && val) out[k] = \"__OPENCLAW_REDACTED__\";\n else out[k] = val;\n continue;\n }\n out[k] = redactObj(val);\n }\n return out;\n }\n\n return redactObj(root);\n}\n\nexport async function patchOpenClawConfigFile({\n patch,\n note,\n}: {\n patch: (prev: OpenClawConfigFile) => OpenClawConfigFile;\n note?: string;\n}): Promise<{ ok: true; path: string; hash: string }> {\n const p = configPath();\n const prevRaw = await fs.readFile(p, \"utf8\");\n const prev = JSON.parse(prevRaw) as OpenClawConfigFile;\n\n const next = patch(prev);\n const nextRaw = JSON.stringify(next, null, 2) + \"\\n\";\n\n // Atomic-ish write: write temp then rename.\n const dir = path.dirname(p);\n const tmp = path.join(dir, `openclaw.json.tmp.${process.pid}.${Date.now()}`);\n await fs.writeFile(tmp, nextRaw, \"utf8\");\n await fs.rename(tmp, p);\n\n // Best-effort breadcrumb.\n if (note) {\n try {\n const notesDir = path.join(dir, \"notes\");\n await fs.mkdir(notesDir, { recursive: true });\n await fs.appendFile(path.join(notesDir, \"kitchen-config.log\"), `[${new Date().toISOString()}] ${note}\\n`, \"utf8\");\n } catch {\n // ignore\n }\n }\n\n const hash = crypto.createHash(\"sha256\").update(nextRaw).digest(\"hex\");\n return { ok: true, path: p, hash };\n}\n","export function isRecord(v: unknown): v is Record<string, unknown> {\n return Boolean(v) && typeof v === \"object\" && !Array.isArray(v);\n}\n","import { NextResponse } from \"next/server\";\nimport { errorMessage } from \"@/lib/errors\";\nimport { readOpenClawConfigRaw, redactChannels, patchOpenClawConfigFile } from \"@/lib/openclaw-config\";\nimport { isRecord } from \"@/lib/type-guards\";\n\nexport async function GET() {\n try {\n const cfg = await readOpenClawConfigRaw();\n const root = isRecord(cfg.json) ? cfg.json : {};\n const channels = isRecord(root.channels) ? root.channels : {};\n const bindings = Array.isArray(root.bindings) ? root.bindings : [];\n\n // NOTE: We intentionally avoid calling the Gateway tool (gateway.config.get/patch) here.\n // Kitchen runs in-process with the gateway, but the /tools/invoke surface is sensitive.\n // Instead, we read ~/.openclaw/openclaw.json directly and redact secrets.\n return NextResponse.json({ ok: true, hash: cfg.hash, channels: redactChannels(channels), bindings });\n } catch (e: unknown) {\n const msg = errorMessage(e);\n return NextResponse.json({ ok: false, error: msg }, { status: 500 });\n }\n}\n\ntype UpsertBody = {\n provider: string;\n config: Record<string, unknown>;\n};\n\nexport async function PUT(req: Request) {\n try {\n const body = (await req.json()) as UpsertBody;\n const provider = String(body?.provider ?? \"\").trim();\n if (!provider) return NextResponse.json({ ok: false, error: \"provider is required\" }, { status: 400 });\n\n const cfg = isRecord(body?.config) ? body.config : null;\n if (!cfg) return NextResponse.json({ ok: false, error: \"config must be an object\" }, { status: 400 });\n\n // v1 validation (Telegram as reference)\n if (provider === \"telegram\") {\n const botToken = String(cfg.botToken ?? \"\").trim();\n if (!botToken) return NextResponse.json({ ok: false, error: \"telegram.botToken is required\" }, { status: 400 });\n }\n\n await patchOpenClawConfigFile({\n note: `ClawKitchen Channels upsert: ${provider}`,\n patch: (prev) => {\n const next = { ...prev };\n const prevChannels = isRecord(next.channels) ? (next.channels as Record<string, unknown>) : {};\n next.channels = { ...prevChannels, [provider]: cfg };\n return next;\n },\n });\n\n return NextResponse.json({ ok: true, restartRequired: true, restartHint: \"Restart OpenClaw Gateway to apply channel config changes.\" });\n } catch (e: unknown) {\n const msg = errorMessage(e);\n return NextResponse.json({ ok: false, error: msg }, { status: 500 });\n }\n}\n\ntype DeleteBody = { provider: string; confirm?: string };\n\nexport async function DELETE(req: Request) {\n try {\n const body = (await req.json()) as DeleteBody;\n const provider = String(body?.provider ?? \"\").trim();\n if (!provider) return NextResponse.json({ ok: false, error: \"provider is required\" }, { status: 400 });\n\n const confirm = String(body?.confirm ?? \"\").trim();\n if (confirm != provider) {\n return NextResponse.json(\n { ok: false, error: `Typed confirmation required. Set confirm=\"${provider}\" to delete.` },\n { status: 400 }\n );\n }\n\n await patchOpenClawConfigFile({\n note: `ClawKitchen Channels delete: ${provider}`,\n patch: (prev) => {\n const next = { ...prev };\n const prevChannels = isRecord(next.channels) ? (next.channels as Record<string, unknown>) : {};\n const rest = { ...prevChannels };\n delete (rest as Record<string, unknown>)[provider];\n next.channels = rest;\n return next;\n },\n });\n\n return NextResponse.json({ ok: true, restartRequired: true, restartHint: \"Restart OpenClaw Gateway to apply channel config changes.\" });\n } catch (e: unknown) {\n const msg = errorMessage(e);\n return NextResponse.json({ ok: false, error: msg }, { status: 500 });\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/channels/bindings/route\",\n pathname: \"/api/channels/bindings\",\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/channels/bindings/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/channels/bindings/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":"2oCAIO,SAAS,EAAa,CAAU,EACrC,OAAO,aAAa,MAAQ,EAAE,OAAO,CAAG,OAAO,EACjD,oICNA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAUA,SAAS,IACP,IAAM,EAAO,QAAQ,GAAG,CAAC,IAAI,EAAI,QAAQ,GAAG,CAAC,WAAW,EAAI,GAC5D,GAAI,CAAC,EAAM,MAAM,AAAI,MAAM,+CAC3B,OAAO,EAAA,IAAS,CAAC,EAAM,YAAa,gBACtC,CAEO,eAAe,IACpB,IAAM,EAAI,IACJ,EAAM,MAAM,EAAA,OAAE,CAAC,QAAQ,CAAC,EAAG,QAC3B,EAAO,EAAA,OAAM,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