@jiggai/kitchen 0.5.11 → 0.5.13
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/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/agents/[agentId]/page_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 +2 -1
- package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/files/route.js +2 -1
- package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/route.js +1 -1
- package/.next/server/app/api/agents/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/install/route.js +2 -1
- package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/route.js +2 -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.js +1 -1
- package/.next/server/app/api/cron/add/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/bulk/route.js +1 -1
- package/.next/server/app/api/cron/bulk/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/delete/route.js +1 -1
- package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/edit/route.js +1 -1
- package/.next/server/app/api/cron/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/job/route.js +1 -1
- package/.next/server/app/api/cron/job/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/jobs/route.js +1 -1
- package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
- package/.next/server/app/api/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/manifest/route.js +1 -1
- package/.next/server/app/api/manifest/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js +1 -1
- package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js +1 -1
- package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/route.js +1 -1
- package/.next/server/app/api/plugins/route.js.nft.json +1 -1
- package/.next/server/app/api/plugins/test/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/[id]/route.js +1 -1
- package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/clone/route.js +1 -1
- package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/custom-team/route.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 +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/route.js +1 -1
- package/.next/server/app/api/recipes/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/scaffold/route.js +1 -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.js +1 -1
- package/.next/server/app/api/settings/model-options/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/available/route.js +1 -1
- package/.next/server/app/api/skills/available/route.js.nft.json +1 -1
- package/.next/server/app/api/swarms/start/route.js +1 -1
- 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]/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 +1 -1
- 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 +2 -1
- package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/files/route.js +2 -1
- package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/list/route.js +1 -1
- package/.next/server/app/api/teams/list/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/memory/route.js +1 -1
- package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/meta/route.js +2 -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/plugins/route.js +3 -2
- package/.next/server/app/api/teams/plugins/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 +2 -1
- package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/route.js +2 -1
- package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js +1 -1
- package/.next/server/app/api/teams/workflow-deliverables/file/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-deliverables/route.js +1 -1
- package/.next/server/app/api/teams/workflow-deliverables/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-runs/route.js +3 -2
- package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-templates/route.js +2 -1
- package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-triggers/route.js +1 -1
- package/.next/server/app/api/teams/workflow-triggers/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflows/route.js +2 -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_client-reference-manifest.js +1 -1
- package/.next/server/app/channels.html +2 -2
- package/.next/server/app/channels.rsc +3 -3
- package/.next/server/app/channels.segments/_full.segment.rsc +3 -3
- package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
- package/.next/server/app/channels.segments/_index.segment.rsc +2 -2
- package/.next/server/app/channels.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
- package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/[id]/page_client-reference-manifest.js +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 +3 -3
- package/.next/server/app/goals/new.segments/_full.segment.rsc +3 -3
- package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/_index.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
- package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals.html +1 -1
- package/.next/server/app/goals.rsc +3 -3
- package/.next/server/app/goals.segments/_full.segment.rsc +3 -3
- package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
- package/.next/server/app/goals.segments/_index.segment.rsc +2 -2
- package/.next/server/app/goals.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
- package/.next/server/app/page.js +2 -2
- 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.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_client-reference-manifest.js +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +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 +3 -3
- package/.next/server/app/settings.segments/_full.segment.rsc +3 -3
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/teams/[teamId]/deliverables/page.js +2 -2
- package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/deliverables/page_client-reference-manifest.js +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.js +2 -2
- 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_client-reference-manifest.js +1 -1
- 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.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.js +3 -3
- 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.js +2 -2
- 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.js.nft.json +1 -1
- package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- 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/chunks/{[root-of-the-server]__9e96d37b._.js → [root-of-the-server]__0371f2bc._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0964b35a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0964b35a._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__e1432bba._.js → [root-of-the-server]__0eef1b4c._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__e1432bba._.js.map → [root-of-the-server]__0eef1b4c._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__15008417._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15008417._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__2dd1afff._.js → [root-of-the-server]__203b56ac._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0f55461f._.js → [root-of-the-server]__29781cc0._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__5c5990a6._.js → [root-of-the-server]__2f6a0911._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__cc3ea05b._.js → [root-of-the-server]__33717611._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__337ee852._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__337ee852._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__603cb0fa._.js → [root-of-the-server]__36c430c7._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__653d42f0._.js → [root-of-the-server]__3a216511._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__5aa1dc93._.js → [root-of-the-server]__50179133._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__03c5f2a6._.js → [root-of-the-server]__506ec633._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__5124e458._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__5124e458._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__89f2190c._.js → [root-of-the-server]__5324f0f2._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__89f2190c._.js.map → [root-of-the-server]__5324f0f2._.js.map} +1 -1
- package/.next/server/chunks/[root-of-the-server]__540cbc0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__540cbc0a._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__8f8e110f._.js → [root-of-the-server]__576c42b0._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__9dba20b3._.js → [root-of-the-server]__57ebd007._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1f1e62ac._.js → [root-of-the-server]__632cc20d._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__7f014dfd._.js → [root-of-the-server]__6c26557b._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__7a73dee7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__7a73dee7._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__69ffdae8._.js → [root-of-the-server]__821b3ca9._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__7347e39f._.js → [root-of-the-server]__82959637._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__84edf1c3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__84edf1c3._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__e9d9d570._.js → [root-of-the-server]__8d1c69aa._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__9853b72d._.js → [root-of-the-server]__97c0689a._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__9ae5d489._.js +6 -0
- package/.next/server/chunks/[root-of-the-server]__9ae5d489._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__aba68368._.js → [root-of-the-server]__a13ba4e9._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__ec5b8508._.js → [root-of-the-server]__a1d4195b._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__68a21bb1._.js → [root-of-the-server]__a4b416bf._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__7194dfe2._.js → [root-of-the-server]__a93f86ca._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__7194dfe2._.js.map → [root-of-the-server]__a93f86ca._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__d302afb4._.js → [root-of-the-server]__ad96320d._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__6131b7e2._.js → [root-of-the-server]__b8298074._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__bbf9672b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__bbf9672b._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__e9acbabd._.js → [root-of-the-server]__c055bf8b._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__e9acbabd._.js.map → [root-of-the-server]__c055bf8b._.js.map} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__c50e4bc4._.js → [root-of-the-server]__c2c4ded6._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__c36db8bb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c36db8bb._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__654b0c85._.js → [root-of-the-server]__c5fb588b._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1d123784._.js → [root-of-the-server]__c6a55b2e._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__c77b0b81._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__c77b0b81._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__bc094b8f._.js → [root-of-the-server]__cd0f78cd._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__cd49b1bd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__cd49b1bd._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__20b1f42d._.js → [root-of-the-server]__cdeb32fb._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__d8e2be0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__d8e2be0a._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__1480ffda._.js → [root-of-the-server]__d9256812._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__636919a0._.js → [root-of-the-server]__df1ff3d3._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__e0960142._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e0960142._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__68b03663._.js → [root-of-the-server]__e727e957._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__937b40e2._.js → [root-of-the-server]__f3099f80._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__f8abf92d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__f8abf92d._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__dbe8d4c9._.js → [root-of-the-server]__fa7664de._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__fe16f026._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__fe16f026._.js.map +1 -0
- package/.next/server/chunks/_6189bbca._.js +3 -0
- package/.next/server/chunks/_6189bbca._.js.map +1 -0
- package/.next/server/chunks/_7f3f54b0._.js +3 -0
- package/.next/server/chunks/_7f3f54b0._.js.map +1 -0
- package/.next/server/chunks/_8e1e2c26._.js +3 -0
- package/.next/server/chunks/_8e1e2c26._.js.map +1 -0
- package/.next/server/chunks/_bdadf32a._.js +3 -0
- package/.next/server/chunks/_bdadf32a._.js.map +1 -0
- package/.next/server/chunks/_e90b77d5._.js +3 -0
- package/.next/server/chunks/_e90b77d5._.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1ede7019.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_1ede7019.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_25b3f552.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_25b3f552.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_649a4f9e.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_649a4f9e.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_77c0b121.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_77c0b121.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c49da317.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_c49da317.js.map +1 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js +2 -2
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js.map +1 -1
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fd57b1e5.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_fd57b1e5.js.map +1 -0
- package/.next/server/chunks/src_lib_1edcc447._.js +3 -0
- package/.next/server/chunks/src_lib_1edcc447._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__00365d2a._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__00365d2a._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__03399d11._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__03399d11._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__076b2077._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__076b2077._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__195421b7._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2a657095._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2a657095._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__2b009660._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__2b009660._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__388bae11._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__388bae11._.js.map +1 -1
- 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]__5180e2c4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__5180e2c4._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__997a440f._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__997a440f._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__df23886e._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__df23886e._.js.map +1 -1
- package/.next/server/chunks/ssr/_018dfe6b._.js +1 -1
- package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js +1 -1
- package/.next/server/chunks/ssr/src_app_cron-jobs_cron-jobs-client_tsx_ec91a73d._.js.map +1 -1
- 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/{f51763a2aea0a4b6.js → ca97f33dce4a7720.js} +1 -1
- package/.next/static/chunks/cc172eec0c47f311.css +3 -0
- package/.next/static/chunks/d4b7ed231a81c514.js +10 -0
- package/openclaw/index.ts +6 -28
- package/openclaw/list-installed-plugins.ts +49 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/[root-of-the-server]__0625e28f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0625e28f._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__224ffe98._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__224ffe98._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__2705b289._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2705b289._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__28a2e162._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__28a2e162._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__2b84b8e2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2b84b8e2._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__309a4318._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__309a4318._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__336dafb8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__336dafb8._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__507af82b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__507af82b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__55defc7c._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__69c065ce._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__6b759340._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__6b759340._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__70a062f7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__70a062f7._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__783b6b5b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__783b6b5b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__8981f980._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__8981f980._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__92517eeb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__92517eeb._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__9f73c31b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__9f73c31b._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__b986660c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__b986660c._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bbed0e46._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__bbed0e46._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bcf10654._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__bcf10654._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__bdb8b806._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__bdb8b806._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__d0634ad4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__d0634ad4._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__d1b157f2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__d1b157f2._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e17f35da._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e17f35da._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__e8d765bb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__e8d765bb._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__ed3ced73._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__ed3ced73._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__f3e3dd8e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__f3e3dd8e._.js.map +0 -1
- package/.next/server/chunks/[root-of-the-server]__fe6502cf._.js +0 -6
- package/.next/server/chunks/[root-of-the-server]__fe6502cf._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__4d24c088._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__4d24c088._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__becf14db._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__becf14db._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js.map +0 -1
- package/.next/static/chunks/7e5bbe9b394728be.js +0 -10
- package/.next/static/chunks/a683f58aaf4f41e9.css +0 -3
- /package/.next/server/chunks/{[root-of-the-server]__9e96d37b._.js.map → [root-of-the-server]__0371f2bc._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__2dd1afff._.js.map → [root-of-the-server]__203b56ac._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__0f55461f._.js.map → [root-of-the-server]__29781cc0._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__5c5990a6._.js.map → [root-of-the-server]__2f6a0911._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__cc3ea05b._.js.map → [root-of-the-server]__33717611._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__603cb0fa._.js.map → [root-of-the-server]__36c430c7._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__653d42f0._.js.map → [root-of-the-server]__3a216511._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__5aa1dc93._.js.map → [root-of-the-server]__50179133._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__03c5f2a6._.js.map → [root-of-the-server]__506ec633._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__8f8e110f._.js.map → [root-of-the-server]__576c42b0._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__9dba20b3._.js.map → [root-of-the-server]__57ebd007._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1f1e62ac._.js.map → [root-of-the-server]__632cc20d._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__7f014dfd._.js.map → [root-of-the-server]__6c26557b._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__69ffdae8._.js.map → [root-of-the-server]__821b3ca9._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__7347e39f._.js.map → [root-of-the-server]__82959637._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__e9d9d570._.js.map → [root-of-the-server]__8d1c69aa._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__9853b72d._.js.map → [root-of-the-server]__97c0689a._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__aba68368._.js.map → [root-of-the-server]__a13ba4e9._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__ec5b8508._.js.map → [root-of-the-server]__a1d4195b._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__68a21bb1._.js.map → [root-of-the-server]__a4b416bf._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__d302afb4._.js.map → [root-of-the-server]__ad96320d._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__6131b7e2._.js.map → [root-of-the-server]__b8298074._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__c50e4bc4._.js.map → [root-of-the-server]__c2c4ded6._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__654b0c85._.js.map → [root-of-the-server]__c5fb588b._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1d123784._.js.map → [root-of-the-server]__c6a55b2e._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__bc094b8f._.js.map → [root-of-the-server]__cd0f78cd._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__20b1f42d._.js.map → [root-of-the-server]__cdeb32fb._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__1480ffda._.js.map → [root-of-the-server]__d9256812._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__636919a0._.js.map → [root-of-the-server]__df1ff3d3._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__68b03663._.js.map → [root-of-the-server]__e727e957._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__937b40e2._.js.map → [root-of-the-server]__f3099f80._.js.map} +0 -0
- /package/.next/server/chunks/{[root-of-the-server]__dbe8d4c9._.js.map → [root-of-the-server]__fa7664de._.js.map} +0 -0
- /package/.next/static/{LRt6kweldrLHTF1HgLgu2 → IDhQCme1GnI-fdSGoYAJ3}/_buildManifest.js +0 -0
- /package/.next/static/{LRt6kweldrLHTF1HgLgu2 → IDhQCme1GnI-fdSGoYAJ3}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{LRt6kweldrLHTF1HgLgu2 → IDhQCme1GnI-fdSGoYAJ3}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[56995,63715,e=>{"use strict";var t=e.i(12714),a=e.i(50227),r=e.i(7367);async function n(e,a,r=!1){try{let n=(await t.default.readdir(e,{withFileTypes:!0})).filter(e=>e.isFile()&&e.name.endsWith(a)).map(e=>e.name).sort();return r&&(n=n.reverse()),{ok:!0,dir:e,files:n}}catch(t){if(t&&"object"==typeof t&&"ENOENT"===t.code)return{ok:!0,dir:e,files:[]};throw t}}e.s(["readdirFiles",()=>n],63715);let o=a.default.join("shared-context","workflows");function i(e){return`${e}.workflow.json`}function s(e){let t=String(e??"").trim();if(!t)throw Error("workflow id is required");if(!/^[a-z0-9][a-z0-9-]{0,62}$/.test(t))throw Error("Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1");return t}async function l(e){let t=await (0,r.getTeamWorkspaceDir)(e);return a.default.join(t,o)}async function d(e){return n(await l(e),".workflow.json")}async function p(e,r){let n=s(r),o=await l(e),d=a.default.join(o,i(n)),p=JSON.parse(await t.default.readFile(d,"utf8"));return{ok:!0,path:d,workflow:p}}async function c(e,r){let n=s(r.id),o=await l(e);await t.default.mkdir(o,{recursive:!0});let d=a.default.join(o,i(n)),p={...r,schema:"clawkitchen.workflow.v1",id:n};return await t.default.writeFile(d,JSON.stringify(p,null,2)+"\n","utf8"),{ok:!0,path:d}}async function u(e,r){let n=s(r),o=await l(e),d=a.default.join(o,i(n));try{await t.default.unlink(d)}catch(e){if(e&&"object"==typeof e&&"ENOENT"===e.code)return{ok:!0,path:d,existed:!1};throw e}return{ok:!0,path:d,existed:!0}}e.s(["assertSafeWorkflowId",()=>s,"deleteWorkflow",()=>u,"listWorkflows",()=>d,"readWorkflow",()=>p,"writeWorkflow",()=>c],56995)},17601,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),o=e.i(61916),i=e.i(74677),s=e.i(69741),l=e.i(16795),d=e.i(87718),p=e.i(95169),c=e.i(47587),u=e.i(66012),m=e.i(70101),f=e.i(74838),g=e.i(10372),h=e.i(93695);e.i(52474);var w=e.i(220),k=e.i(12714),v=e.i(50227),y=e.i(89171),_=e.i(85067),R=e.i(40317),x=e.i(7367),T=e.i(56995);async function E(e){try{return await k.default.access(e),!0}catch{return!1}}async function N(e,t){await E(e)||(await k.default.mkdir(v.default.dirname(e),{recursive:!0}),await k.default.writeFile(e,t,"utf8"))}async function b(e){let t=await (0,_.parseJsonBody)(e);if(t instanceof y.NextResponse)return t;let{body:a}=t,r=String(a.teamId??"").trim(),n=String(a.templateId??"").trim();if(!r)return y.NextResponse.json({ok:!1,error:"teamId is required"},{status:400});if(!n)return y.NextResponse.json({ok:!1,error:"templateId is required"},{status:400});try{var o;let e,t,a;if("marketing-cadence-v1"!==n)return y.NextResponse.json({ok:!1,error:`Unknown templateId: ${n}`},{status:400});let i=await (0,T.listWorkflows)(r),s=new Set(i.files.map(e=>"string"==typeof e&&e.endsWith(".workflow.json")?e.slice(0,-14):null).filter(e=>!!e)),l=(o={id:function(e,t){if(!t.has(e))return e;for(let a=2;a<1e3;a++){let r=`${e}-${a}`;if(!t.has(r))return r}return`${e}-${Date.now()}`}("marketing-cadence-v1",s),approvalProvider:"telegram",approvalTarget:""},e=String(o?.id??"marketing-cadence-v1").trim()||"marketing-cadence-v1",t=String(o?.approvalProvider??"telegram").trim()||"telegram",a=String(o?.approvalTarget??"").trim(),{schema:"clawkitchen.workflow.v1",id:e,name:"Marketing Cadence (v1)",version:1,timezone:"America/New_York",triggers:[{kind:"cron",id:"t-weekdays-9",name:"Weekdays 09:00",enabled:!0,expr:"0 9 * * 1-5",tz:"America/New_York"}],meta:{templateId:"marketing-cadence-v1",approvalProvider:t,approvalTarget:a,writeback:{postLogPath:"shared-context/marketing/POST_LOG.md",learningsJsonlPath:"shared-context/memory/marketing_learnings.jsonl"},platforms:["x","instagram","tiktok","youtube"],approvalBindingId:"marketing-approval"},nodes:[{id:"start",type:"start",name:"Start",x:60,y:120,config:{}},{id:"research",type:"llm",name:"Research + idea",x:300,y:80,config:{agentId:"marketing-research",promptTemplate:"Do competitive + trend research. Produce: 5 angles + supporting bullets. Output JSON: {angles:[...], sources:[...]}"}},{id:"draft_assets",type:"llm",name:"Draft platform assets",x:560,y:80,config:{agentId:"marketing-writer",promptTemplate:"Using the research output, draft platform-specific variants applying proven viral psychology:\n\n**EMOTIONAL TRIGGER (REQUIRED):** Every post must trigger one of these emotions:\n- NSFW (\"That's crazy!\") - shocking/surprising\n- LOL (\"That's funny!\") - humor/entertainment\n- OHHH (\"Now I get it!\") - aha moments/simplification\n- WOW (\"That's amazing!\") - success stories\n- FINALLY (\"Someone said it!\") - validating opinions\n- WTF (\"That pisses me off!\") - frustration with status quo\n\n**IDENTITY TARGETING:** Use 'There are two types of...' or 'This is for founders who...'\n**US vs THEM:** Position against inefficient alternatives (not competitors)\n\nState which emotion you're targeting and why.\n\nAlso include an `image_brief` field: a concise (under 1000 chars) visual concept description for DALL-E image generation. Describe the scene, composition, color palette, and mood — NO text/words in the image. This should capture the emotional hook visually without repeating the copy.\n\nOutput JSON: {emotion:'OHHH',image_brief:'A split-screen illustration showing...',platforms:{x:{hook,body},instagram:{hook,body,assetNotes},tiktok:{hook,script,assetNotes},youtube:{hook,script,assetNotes}}}"}},{id:"generate_image",type:"media-image",name:"Design image concept",x:670,y:320,config:{mediaType:"image",provider:"skill-openai-image-gen",prompt:"{{draft_assets.image_brief}}",promptTemplate:"{{draft_assets.image_brief}}",outputPath:"node-outputs/generated_image.png",agentId:"marketing-designer"}},{id:"qc_brand",type:"llm",name:"QC / brand consistency",x:820,y:80,config:{agentId:"brand-qc",promptTemplate:'Review drafts for consistency and note the image concept for visual alignment. Apply corrections. Always mention @ClawRecipes and how it applies to the post. Remove any hashtags if present.\n\nImage concept from designer:\n{{generate_image.output}}\n\nEnsure the copy and visual concept work together effectively. No posting without approval. Output JSON: {platforms:{...}, image_concept: "brief description of planned visual", notes:[...]}'}},{id:"post_preview",type:"tool",name:"Post preview (dry run)",x:1080,y:220,config:{tool:"marketing.post_all",args:{platforms:["x","instagram","tiktok","youtube"],draftsFromNode:"qc_brand",dryRun:!0},agentId:"marketing-lead"}},{id:"approval",type:"human_approval",name:"Human approval",x:1080,y:80,config:{provider:t,target:a||"(set in UI)",messageTemplate:"{{workflow.name}} — Approval needed\nRun: {{run.id}}\n\n{{packet.note}}",approvalBindingId:"marketing-approval"}},{id:"post_to_platforms",type:"tool",name:"Post (after approval)",x:1340,y:80,config:{tool:"marketing.post_all",args:{platforms:["x","instagram","tiktok","youtube"],draftsFromNode:"qc_brand"},agentId:"marketing-lead"}},{id:"write_post_log",type:"tool",name:"Append POST_LOG.md",x:1600,y:60,config:{tool:"fs.append",args:{path:"shared-context/marketing/POST_LOG.md",content:"- {{date}} {{platforms}} posted. Run={{run.id}}\\n"},agentId:"marketing-lead"}},{id:"write_learnings",type:"tool",name:"Append marketing_learnings.jsonl",x:1600,y:140,config:{tool:"fs.append",args:{path:"shared-context/memory/marketing_learnings.jsonl",content:'{"ts":"{{date}}","runId":"{{run.id}}","notes":{{qc_brand.notes_json}}}\\n'},agentId:"marketing-lead"}},{id:"update_ticket",type:"llm",name:"Update ticket with details",x:1860,y:100,config:{agentId:"marketing-lead",promptTemplate:"A marketing cadence workflow run just completed. Update the associated ticket with all run details.\n\nWorkflow: {{workflow.name}}\nRun ID: {{run.id}}\nDate: {{date}}\n\nResearch output:\n{{research.output}}\n\nDraft assets:\n{{draft_assets.output}}\n\nGenerated image:\n{{generate_image.output}}\n\nQC/Brand review:\n{{qc_brand.output}}\n\nPosting results:\n{{post_to_platforms.output}}\n\nWrite a clear, dated summary under ## Comments in the ticket capturing:\n- What was researched and which angle was chosen\n- What image was generated and its visual concept\n- What platforms were posted to\n- The final approved copy and image\n- Any QC notes or corrections made\n- Links to posted content if available\n\nThen move the ticket to work/done/."}},{id:"end",type:"end",name:"End",x:2120,y:120,config:{}}],edges:[{id:"e-start-research",from:"start",to:"research"},{id:"e-research-draft",from:"research",to:"draft_assets"},{id:"e-draft-image",from:"draft_assets",to:"generate_image"},{id:"e-image-qc",from:"generate_image",to:"qc_brand"},{id:"e-qc-preview",from:"qc_brand",to:"post_preview"},{id:"e-preview-approval",from:"post_preview",to:"approval"},{id:"e-approval-post",from:"approval",to:"post_to_platforms"},{id:"e-post-log",from:"post_to_platforms",to:"write_post_log"},{id:"e-post-learnings",from:"post_to_platforms",to:"write_learnings"},{id:"e-log-ticket",from:"write_post_log",to:"update_ticket"},{id:"e-learnings-ticket",from:"write_learnings",to:"update_ticket"},{id:"e-ticket-end",from:"update_ticket",to:"end"}]}),d=await (0,T.writeWorkflow)(r,l),p=await (0,x.getTeamWorkspaceDir)(r);return await N(v.default.join(p,"shared-context","marketing","POST_LOG.md"),""),await N(v.default.join(p,"shared-context","memory","marketing_learnings.jsonl"),""),(0,_.jsonOkRest)({...d,workflowId:l.id,templateId:n})}catch(e){return y.NextResponse.json({ok:!1,error:(0,R.errorMessage)(e)},{status:500})}}e.s(["POST",()=>b],58460);var O=e.i(58460);let I=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/teams/workflow-templates/route",pathname:"/api/teams/workflow-templates",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/teams/workflow-templates/route.ts",nextConfigOutput:"standalone",userland:O}),{workAsyncStorage:A,workUnitAsyncStorage:S,serverHooks:C}=I;function P(){return(0,r.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:S})}async function j(e,t,r){I.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let k="/api/teams/workflow-templates/route";k=k.replace(/\/index$/,"")||"/";let v=await I.prepare(e,t,{srcPage:k,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:y,params:_,nextConfig:R,parsedUrl:x,isDraftMode:T,prerenderManifest:E,routerServerContext:N,isOnDemandRevalidate:b,revalidateOnlyGenerated:O,resolvedPathname:A,clientReferenceManifest:S,serverActionsManifest:C}=v,P=(0,s.normalizeAppPath)(k),j=!!(E.dynamicRoutes[P]||E.routes[A]),q=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,x,!1):t.end("This page could not be found"),null);if(j&&!T){let e=!!E.routes[A],t=E.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(R.experimental.adapterPath)return await q();throw new h.NoFallbackError}}let D=null;!j||I.isDev||T||(D="/index"===(D=A)?"/":D);let H=!0===I.isDev||!j,U=j&&!H;C&&S&&(0,i.setManifestsSingleton)({page:k,clientReferenceManifest:S,serverActionsManifest:C});let W=e.method||"GET",F=(0,o.getTracer)(),L=F.getActiveScopeSpan(),M={params:_,prerenderManifest:E,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:R.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>I.onRequestError(e,t,r,n,N)},sharedContext:{buildId:y}},$=new l.NodeNextRequest(e),G=new l.NodeNextResponse(t),B=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t));try{let i=async e=>I.handle(B,M).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=F.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${W} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${W} ${k}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var o,l;let d=async({previousCacheEntry:a})=>{try{if(!s&&b&&O&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=M.renderOpts.fetchMetrics;let l=M.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let d=M.renderOpts.collectedTags;if(!j)return await (0,u.sendResponse)($,G,o,M.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,m.toNodeOutgoingHttpHeaders)(o.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,r=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,N),t}},p=await I.handleResponse({req:e,nextConfig:R,cacheKey:D,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:E,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:r.waitUntil,isMinimalMode:s});if(!j)return null;if((null==p||null==(o=p.value)?void 0:o.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",b?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let h=(0,m.fromNodeOutgoingHttpHeaders)(p.value.headers);return s&&j||h.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||h.get("Cache-Control")||h.set("Cache-Control",(0,f.getCacheControlHeader)(p.cacheControl)),await (0,u.sendResponse)($,G,new Response(p.value.body,{headers:h,status:p.value.status||200})),null};L?await l(L):await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${W} ${k}`,kind:o.SpanKind.SERVER,attributes:{"http.method":W,"http.target":e.url}},l))}catch(t){if(t instanceof h.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,N),j)throw t;return await (0,u.sendResponse)($,G,new Response(null,{status:500})),null}}e.s(["handler",()=>j,"patchFetch",()=>P,"routeModule",()=>I,"serverHooks",()=>C,"workAsyncStorage",()=>A,"workUnitAsyncStorage",()=>S],17601)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_6189bbca._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/workflows/storage.ts","../../../src/lib/workflows/readdir.ts","../../../src/app/api/teams/workflow-templates/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/lib/workflows/templates/marketing-cadence-v1.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { readdirFiles } from \"@/lib/workflows/readdir\";\nimport type { WorkflowFileV1 } from \"@/lib/workflows/types\";\n\nconst WORKFLOWS_DIR = path.join(\"shared-context\", \"workflows\");\n\nexport function workflowFileName(workflowId: string) {\n return `${workflowId}.workflow.json`;\n}\n\nexport function assertSafeWorkflowId(workflowId: string) {\n const id = String(workflowId ?? \"\").trim();\n if (!id) throw new Error(\"workflow id is required\");\n if (!/^[a-z0-9][a-z0-9-]{0,62}$/.test(id)) {\n throw new Error(\n \"Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1\"\n );\n }\n return id;\n}\n\nexport async function getTeamWorkflowsDir(teamId: string) {\n const teamDir = await getTeamWorkspaceDir(teamId);\n return path.join(teamDir, WORKFLOWS_DIR);\n}\n\nexport async function listWorkflows(teamId: string) {\n const dir = await getTeamWorkflowsDir(teamId);\n return readdirFiles(dir, \".workflow.json\");\n}\n\nexport async function readWorkflow(teamId: string, workflowId: string) {\n const id = assertSafeWorkflowId(workflowId);\n const dir = await getTeamWorkflowsDir(teamId);\n const p = path.join(dir, workflowFileName(id));\n const raw = await fs.readFile(p, \"utf8\");\n const parsed = JSON.parse(raw) as WorkflowFileV1;\n return { ok: true as const, path: p, workflow: parsed };\n}\n\nexport async function writeWorkflow(teamId: string, workflow: WorkflowFileV1) {\n const id = assertSafeWorkflowId(workflow.id);\n const dir = await getTeamWorkflowsDir(teamId);\n await fs.mkdir(dir, { recursive: true });\n const p = path.join(dir, workflowFileName(id));\n const toWrite: WorkflowFileV1 = {\n ...workflow,\n schema: \"clawkitchen.workflow.v1\",\n id,\n };\n await fs.writeFile(p, JSON.stringify(toWrite, null, 2) + \"\\n\", \"utf8\");\n return { ok: true as const, path: p };\n}\n\nexport async function deleteWorkflow(teamId: string, workflowId: string) {\n const id = assertSafeWorkflowId(workflowId);\n const dir = await getTeamWorkflowsDir(teamId);\n const p = path.join(dir, workflowFileName(id));\n try {\n await fs.unlink(p);\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n return { ok: true as const, path: p, existed: false as const };\n }\n throw err;\n }\n return { ok: true as const, path: p, existed: true as const };\n}\n","import fs from \"node:fs/promises\";\n\n/** Reads dir with optional suffix filter and reverse sort. Returns { ok, dir, files } or { ok, dir, files: [] } on ENOENT. */\nexport async function readdirFiles(\n dir: string,\n suffix: string,\n reverse = false\n): Promise<{ ok: true; dir: string; files: string[] }> {\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n let files = entries\n .filter((e) => e.isFile() && e.name.endsWith(suffix))\n .map((e) => e.name)\n .sort();\n if (reverse) files = files.reverse();\n return { ok: true as const, dir, files };\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n return { ok: true as const, dir, files: [] as string[] };\n }\n throw err;\n }\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { jsonOkRest, parseJsonBody } from \"@/lib/api-route-helpers\";\nimport { errorMessage } from \"@/lib/errors\";\nimport { getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { listWorkflows, writeWorkflow } from \"@/lib/workflows/storage\";\nimport { marketingCadenceWorkflowV1 } from \"@/lib/workflows/templates\";\n\nasync function exists(p: string) {\n try {\n await fs.access(p);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction nextAvailableId(baseId: string, existing: Set<string>) {\n if (!existing.has(baseId)) return baseId;\n for (let i = 2; i < 1000; i++) {\n const id = `${baseId}-${i}`;\n if (!existing.has(id)) return id;\n }\n return `${baseId}-${Date.now()}`;\n}\n\nasync function ensureFile(p: string, content: string) {\n if (await exists(p)) return;\n await fs.mkdir(path.dirname(p), { recursive: true });\n await fs.writeFile(p, content, \"utf8\");\n}\n\nexport async function POST(req: Request) {\n const parsed = await parseJsonBody(req);\n if (parsed instanceof NextResponse) return parsed;\n const { body: o } = parsed;\n\n const teamId = String(o.teamId ?? \"\").trim();\n const templateId = String(o.templateId ?? \"\").trim();\n\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n if (!templateId) return NextResponse.json({ ok: false, error: \"templateId is required\" }, { status: 400 });\n\n try {\n if (templateId !== \"marketing-cadence-v1\") {\n return NextResponse.json({ ok: false, error: `Unknown templateId: ${templateId}` }, { status: 400 });\n }\n\n const listed = await listWorkflows(teamId);\n const existingIds = new Set(\n listed.files\n .map((f) => (typeof f === \"string\" && f.endsWith(\".workflow.json\") ? f.slice(0, -\".workflow.json\".length) : null))\n .filter((x): x is string => Boolean(x))\n );\n\n const id = nextAvailableId(\"marketing-cadence-v1\", existingIds);\n\n const wf = marketingCadenceWorkflowV1({ id, approvalProvider: \"telegram\", approvalTarget: \"\" });\n const writeRes = await writeWorkflow(teamId, wf);\n\n // Ensure canonical file-first destinations exist so demo doesn't 404.\n const teamDir = await getTeamWorkspaceDir(teamId);\n await ensureFile(path.join(teamDir, \"shared-context\", \"marketing\", \"POST_LOG.md\"), \"\");\n await ensureFile(path.join(teamDir, \"shared-context\", \"memory\", \"marketing_learnings.jsonl\"), \"\");\n\n return jsonOkRest({ ...writeRes, workflowId: wf.id, templateId });\n } catch (err: unknown) {\n return NextResponse.json({ ok: false, error: errorMessage(err) }, { 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/teams/workflow-templates/route\",\n pathname: \"/api/teams/workflow-templates\",\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/teams/workflow-templates/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/teams/workflow-templates/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 type { WorkflowFileV1 } from \"@/lib/workflows/types\";\n\nexport function marketingCadenceWorkflowV1(opts?: { id?: string; approvalProvider?: string; approvalTarget?: string }): WorkflowFileV1 {\n const id = String(opts?.id ?? \"marketing-cadence-v1\").trim() || \"marketing-cadence-v1\";\n const approvalProvider = String(opts?.approvalProvider ?? \"telegram\").trim() || \"telegram\";\n const approvalTarget = String(opts?.approvalTarget ?? \"\").trim();\n\n return {\n schema: \"clawkitchen.workflow.v1\",\n id,\n name: \"Marketing Cadence (v1)\",\n version: 1,\n timezone: \"America/New_York\",\n triggers: [\n {\n kind: \"cron\",\n id: \"t-weekdays-9\",\n name: \"Weekdays 09:00\",\n enabled: true,\n expr: \"0 9 * * 1-5\",\n tz: \"America/New_York\",\n },\n ],\n meta: {\n templateId: \"marketing-cadence-v1\",\n approvalProvider,\n approvalTarget,\n writeback: {\n postLogPath: \"shared-context/marketing/POST_LOG.md\",\n learningsJsonlPath: \"shared-context/memory/marketing_learnings.jsonl\",\n },\n platforms: [\"x\", \"instagram\", \"tiktok\", \"youtube\"],\n approvalBindingId: \"marketing-approval\",\n },\n nodes: [\n { id: \"start\", type: \"start\", name: \"Start\", x: 60, y: 120, config: {} },\n {\n id: \"research\",\n type: \"llm\",\n name: \"Research + idea\",\n x: 300,\n y: 80,\n config: {\n agentId: \"marketing-research\",\n promptTemplate:\n \"Do competitive + trend research. Produce: 5 angles + supporting bullets. Output JSON: {angles:[...], sources:[...]}\",\n },\n },\n {\n id: \"draft_assets\",\n type: \"llm\",\n name: \"Draft platform assets\",\n x: 560,\n y: 80,\n config: {\n agentId: \"marketing-writer\",\n promptTemplate:\n \"Using the research output, draft platform-specific variants applying proven viral psychology:\\n\\n**EMOTIONAL TRIGGER (REQUIRED):** Every post must trigger one of these emotions:\\n- NSFW (\\\"That's crazy!\\\") - shocking/surprising\\n- LOL (\\\"That's funny!\\\") - humor/entertainment\\n- OHHH (\\\"Now I get it!\\\") - aha moments/simplification\\n- WOW (\\\"That's amazing!\\\") - success stories\\n- FINALLY (\\\"Someone said it!\\\") - validating opinions\\n- WTF (\\\"That pisses me off!\\\") - frustration with status quo\\n\\n**IDENTITY TARGETING:** Use 'There are two types of...' or 'This is for founders who...'\\n**US vs THEM:** Position against inefficient alternatives (not competitors)\\n\\nState which emotion you're targeting and why.\\n\\nAlso include an `image_brief` field: a concise (under 1000 chars) visual concept description for DALL-E image generation. Describe the scene, composition, color palette, and mood — NO text/words in the image. This should capture the emotional hook visually without repeating the copy.\\n\\nOutput JSON: {emotion:'OHHH',image_brief:'A split-screen illustration showing...',platforms:{x:{hook,body},instagram:{hook,body,assetNotes},tiktok:{hook,script,assetNotes},youtube:{hook,script,assetNotes}}}\",\n },\n },\n {\n id: \"generate_image\",\n type: \"media-image\",\n name: \"Design image concept\",\n x: 670,\n y: 320,\n config: {\n mediaType: \"image\",\n provider: \"skill-openai-image-gen\",\n prompt: \"{{draft_assets.image_brief}}\",\n promptTemplate: \"{{draft_assets.image_brief}}\",\n outputPath: \"node-outputs/generated_image.png\",\n agentId: \"marketing-designer\",\n },\n },\n {\n id: \"qc_brand\",\n type: \"llm\",\n name: \"QC / brand consistency\",\n x: 820,\n y: 80,\n config: {\n agentId: \"brand-qc\",\n promptTemplate:\n \"Review drafts for consistency and note the image concept for visual alignment. Apply corrections. Always mention @ClawRecipes and how it applies to the post. Remove any hashtags if present.\\n\\nImage concept from designer:\\n{{generate_image.output}}\\n\\nEnsure the copy and visual concept work together effectively. No posting without approval. Output JSON: {platforms:{...}, image_concept: \\\"brief description of planned visual\\\", notes:[...]}\",\n },\n },\n {\n id: \"post_preview\",\n type: \"tool\",\n name: \"Post preview (dry run)\",\n x: 1080,\n y: 220,\n config: {\n tool: \"marketing.post_all\",\n args: {\n platforms: [\"x\", \"instagram\", \"tiktok\", \"youtube\"],\n draftsFromNode: \"qc_brand\",\n dryRun: true,\n },\n agentId: \"marketing-lead\",\n },\n },\n {\n id: \"approval\",\n type: \"human_approval\",\n name: \"Human approval\",\n x: 1080,\n y: 80,\n config: {\n provider: approvalProvider,\n target: approvalTarget || \"(set in UI)\",\n messageTemplate:\n \"{{workflow.name}} — Approval needed\\nRun: {{run.id}}\\n\\n{{packet.note}}\",\n approvalBindingId: \"marketing-approval\",\n },\n },\n {\n id: \"post_to_platforms\",\n type: \"tool\",\n name: \"Post (after approval)\",\n x: 1340,\n y: 80,\n config: {\n tool: \"marketing.post_all\",\n args: {\n platforms: [\"x\", \"instagram\", \"tiktok\", \"youtube\"],\n draftsFromNode: \"qc_brand\",\n },\n agentId: \"marketing-lead\",\n },\n },\n {\n id: \"write_post_log\",\n type: \"tool\",\n name: \"Append POST_LOG.md\",\n x: 1600,\n y: 60,\n config: {\n tool: \"fs.append\",\n args: {\n path: \"shared-context/marketing/POST_LOG.md\",\n content: \"- {{date}} {{platforms}} posted. Run={{run.id}}\\\\n\",\n },\n agentId: \"marketing-lead\",\n },\n },\n {\n id: \"write_learnings\",\n type: \"tool\",\n name: \"Append marketing_learnings.jsonl\",\n x: 1600,\n y: 140,\n config: {\n tool: \"fs.append\",\n args: {\n path: \"shared-context/memory/marketing_learnings.jsonl\",\n content:\n '{\"ts\":\"{{date}}\",\"runId\":\"{{run.id}}\",\"notes\":{{qc_brand.notes_json}}}\\\\n',\n },\n agentId: \"marketing-lead\",\n },\n },\n {\n id: \"update_ticket\",\n type: \"llm\",\n name: \"Update ticket with details\",\n x: 1860,\n y: 100,\n config: {\n agentId: \"marketing-lead\",\n promptTemplate:\n \"A marketing cadence workflow run just completed. Update the associated ticket with all run details.\\n\\nWorkflow: {{workflow.name}}\\nRun ID: {{run.id}}\\nDate: {{date}}\\n\\nResearch output:\\n{{research.output}}\\n\\nDraft assets:\\n{{draft_assets.output}}\\n\\nGenerated image:\\n{{generate_image.output}}\\n\\nQC/Brand review:\\n{{qc_brand.output}}\\n\\nPosting results:\\n{{post_to_platforms.output}}\\n\\nWrite a clear, dated summary under ## Comments in the ticket capturing:\\n- What was researched and which angle was chosen\\n- What image was generated and its visual concept\\n- What platforms were posted to\\n- The final approved copy and image\\n- Any QC notes or corrections made\\n- Links to posted content if available\\n\\nThen move the ticket to work/done/.\",\n },\n },\n { id: \"end\", type: \"end\", name: \"End\", x: 2120, y: 120, config: {} },\n ],\n edges: [\n { id: \"e-start-research\", from: \"start\", to: \"research\" },\n { id: \"e-research-draft\", from: \"research\", to: \"draft_assets\" },\n { id: \"e-draft-image\", from: \"draft_assets\", to: \"generate_image\" },\n { id: \"e-image-qc\", from: \"generate_image\", to: \"qc_brand\" },\n { id: \"e-qc-preview\", from: \"qc_brand\", to: \"post_preview\" },\n { id: \"e-preview-approval\", from: \"post_preview\", to: \"approval\" },\n { id: \"e-approval-post\", from: \"approval\", to: \"post_to_platforms\" },\n { id: \"e-post-log\", from: \"post_to_platforms\", to: \"write_post_log\" },\n { id: \"e-post-learnings\", from: \"post_to_platforms\", to: \"write_learnings\" },\n { id: \"e-log-ticket\", from: \"write_post_log\", to: \"update_ticket\" },\n { id: \"e-learnings-ticket\", from: \"write_learnings\", to: \"update_ticket\" },\n { id: \"e-ticket-end\", from: \"update_ticket\", to: \"end\" },\n ],\n };\n}\n"],"names":[],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MCCO,eAAe,EACpB,CAAW,CACX,CAAc,CACd,EAAU,EAAK,EAEf,GAAI,CAEF,IAAI,EAAQ,CADI,MAAM,EAAA,OAAE,CAAC,OAAO,CAAC,EAAK,CAAE,eAAe,CAAK,EAAA,EAEzD,MAAM,CAAC,AAAC,GAAM,EAAE,MAAM,IAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAC5C,GAAG,CAAC,AAAC,GAAM,EAAE,IAAI,EACjB,IAAI,GAEP,OADI,IAAS,EAAQ,EAAM,OAAO,EAAA,EAC3B,CAAE,IAAI,MAAe,QAAK,CAAM,CACzC,CAAE,MAAO,EAAc,CACrB,GAAI,GAAsB,UAAf,OAAO,GAAyD,UAAU,CAA9C,EAA2B,IAAI,CACpE,MAAO,CAAE,GAAI,OAAe,EAAK,MAAO,EAAE,AAAa,CAEzD,OAAM,CACR,CACF,mCDhBA,IAAM,EAAgB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AAA,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,oBAClC,uBACA,CACJ,EACJ,GAAG,AATgB,EASJ,GAIf,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[3]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[87841,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=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),m=e.i(74838),f=e.i(10372),R=e.i(93695);e.i(52474);var v=e.i(220),w=e.i(12714),E=e.i(50227),g=e.i(89171),C=e.i(85067);async function y(t){return(0,C.withTeamContextFromQuery)(t,async({teamId:t,teamDir:a})=>{let r=await (async()=>{try{return(await w.default.stat(E.default.join(a,"roles","test"))).isDirectory()}catch{return!1}})(),n=await (async()=>{try{let t=E.default.join(a,"team.json"),r=await w.default.readFile(t,"utf8"),n=JSON.parse(r),i=String(n.recipeId??"").trim();if(!i)return!1;let{cachedRunOpenClaw:o}=await e.A(58941),s=await o(["recipes","show",i],{ttlMs:3e5});if(!s.ok)return!1;let l=String(s.stdout??"");if(!l.startsWith("---\n"))return!1;let u=l.indexOf("\n---\n",4);if(-1===u)return!1;let d=l.slice(4,u),{default:c}=await e.A(64778);return!!(c.parse(d)??{}).qaChecklist}catch{return!1}})(),i=await (0,C.listWorkspaceFiles)(a,[{name:"TEAM.md",required:!0,rationale:"Team workspace overview"},{name:"TICKETS.md",required:!0,rationale:"Ticket workflow + format"},{name:"notes/QA_CHECKLIST.md",required:r||n,rationale:"QA verification checklist"},{name:"SOUL.md",required:!1,rationale:"Optional team persona (some teams use role SOUL.md only)"},{name:"USER.md",required:!1,rationale:"Optional user profile"},{name:"AGENTS.md",required:!1,rationale:"Optional team notes (often role-scoped)"},{name:"TOOLS.md",required:!1,rationale:"Optional team-local tooling notes"},{name:"MEMORY.md",required:!1,rationale:"Optional curated memory"}]);return g.NextResponse.json({ok:!0,teamId:t,teamDir:a,files:i})})}e.s(["GET",()=>y],45823);var x=e.i(45823);let A=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/teams/files/route",pathname:"/api/teams/files",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/teams/files/route.ts",nextConfigOutput:"standalone",userland:x}),{workAsyncStorage:T,workUnitAsyncStorage:O,serverHooks:S}=A;function _(){return(0,r.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:O})}async function N(e,t,r){A.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/teams/files/route";w=w.replace(/\/index$/,"")||"/";let E=await A.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:g,params:C,nextConfig:y,parsedUrl:x,isDraftMode:T,prerenderManifest:O,routerServerContext:S,isOnDemandRevalidate:_,revalidateOnlyGenerated:N,resolvedPathname:P,clientReferenceManifest:k,serverActionsManifest:q}=E,b=(0,s.normalizeAppPath)(w),U=!!(O.dynamicRoutes[b]||O.routes[P]),H=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,x,!1):t.end("This page could not be found"),null);if(U&&!T){let e=!!O.routes[P],t=O.dynamicRoutes[b];if(t&&!1===t.fallback&&!e){if(y.experimental.adapterPath)return await H();throw new R.NoFallbackError}}let I=null;!U||A.isDev||T||(I="/index"===(I=P)?"/":I);let M=!0===A.isDev||!U,D=U&&!M;q&&k&&(0,o.setManifestsSingleton)({page:w,clientReferenceManifest:k,serverActionsManifest:q});let j=e.method||"GET",F=(0,i.getTracer)(),K=F.getActiveScopeSpan(),L={params:C,prerenderManifest:O,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts},cacheComponents:!!y.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:y.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>A.onRequestError(e,t,r,n,S)},sharedContext:{buildId:g}},$=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest($,(0,u.signalFromNodeResponse)(t));try{let o=async e=>A.handle(G,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=F.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${j} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${j} ${w}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var i,l;let u=async({previousCacheEntry:a})=>{try{if(!s&&_&&N&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(n);e.fetchMetrics=L.renderOpts.fetchMetrics;let l=L.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let u=L.renderOpts.collectedTags;if(!U)return await (0,p.sendResponse)($,B,i,L.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);u&&(t[f.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,r=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:_})},!1,S),t}},d=await A.handleResponse({req:e,nextConfig:y,cacheKey:I,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:O,isRoutePPREnabled:!1,isOnDemandRevalidate:_,revalidateOnlyGenerated:N,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:s});if(!U)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==v.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});s||t.setHeader("x-nextjs-cache",_?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&U||R.delete(f.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,m.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)($,B,new Response(d.value.body,{headers:R,status:d.value.status||200})),null};K?await l(K):await F.withPropagatedContext(e.headers,()=>F.trace(d.BaseServerSpan.handleRequest,{spanName:`${j} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:_})},!1,S),U)throw t;return await (0,p.sendResponse)($,B,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>_,"routeModule",()=>A,"serverHooks",()=>S,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>O],87841)},58941,e=>{e.v(e=>Promise.resolve().then(()=>e(42013)))},64778,e=>{e.v(t=>Promise.all(["server/chunks/[externals]__c37e9f91._.js","server/chunks/node_modules_yaml_dist_49c13b35._.js"].map(t=>e.l(t))).then(()=>t(23008)))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_7f3f54b0._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/teams/files/route.ts"],"sourcesContent":["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/teams/files/route\",\n pathname: \"/api/teams/files\",\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/teams/files/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/teams/files/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 { NextResponse } from \"next/server\";\nimport { listWorkspaceFiles, withTeamContextFromQuery } from \"@/lib/api-route-helpers\";\n\nexport async function GET(req: Request) {\n return withTeamContextFromQuery(req, async ({ teamId, teamDir }) => {\n // QA checklist should only be required when:\n // - the team has a test role, and/or\n // - the recipe opts in via frontmatter (qaChecklist: true)\n const hasTestRole = await (async () => {\n try {\n const st = await fs.stat(path.join(teamDir, \"roles\", \"test\"));\n return st.isDirectory();\n } catch {\n return false;\n }\n })();\n\n const recipeOptsIn = await (async () => {\n try {\n const teamJsonPath = path.join(teamDir, \"team.json\");\n const raw = await fs.readFile(teamJsonPath, \"utf8\");\n const parsed = JSON.parse(raw) as { recipeId?: unknown };\n const recipeId = String(parsed.recipeId ?? \"\").trim();\n if (!recipeId) return false;\n\n // Load recipe frontmatter via OpenClaw CLI and check for qaChecklist: true.\n // `recipes show` takes ~18s on this machine and is the dominant cost of\n // the team-editor mount (5 endpoints fetch in parallel, slowest one\n // wins). Cache for 5 min — recipes change rarely; PUT /api/recipes/[id]\n // invalidates after writes.\n const { cachedRunOpenClaw } = await import(\"@/lib/openclaw-cache\");\n const shown = await cachedRunOpenClaw([\"recipes\", \"show\", recipeId], { ttlMs: 5 * 60_000 });\n if (!shown.ok) return false;\n const md = String(shown.stdout ?? \"\");\n if (!md.startsWith(\"---\\n\")) return false;\n const end = md.indexOf(\"\\n---\\n\", 4);\n if (end === -1) return false;\n const yamlText = md.slice(4, end);\n const { default: YAML } = await import(\"yaml\");\n const fm = (YAML.parse(yamlText) ?? {}) as { qaChecklist?: unknown };\n return Boolean(fm.qaChecklist);\n } catch {\n return false;\n }\n })();\n\n const qaChecklistRequired = hasTestRole || recipeOptsIn;\n\n const candidates: Array<{ name: string; required: boolean; rationale: string }> = [\n { name: \"TEAM.md\", required: true, rationale: \"Team workspace overview\" },\n { name: \"TICKETS.md\", required: true, rationale: \"Ticket workflow + format\" },\n { name: \"notes/QA_CHECKLIST.md\", required: qaChecklistRequired, rationale: \"QA verification checklist\" },\n\n { name: \"SOUL.md\", required: false, rationale: \"Optional team persona (some teams use role SOUL.md only)\" },\n { name: \"USER.md\", required: false, rationale: \"Optional user profile\" },\n { name: \"AGENTS.md\", required: false, rationale: \"Optional team notes (often role-scoped)\" },\n { name: \"TOOLS.md\", required: false, rationale: \"Optional team-local tooling notes\" },\n { name: \"MEMORY.md\", required: false, rationale: \"Optional curated memory\" },\n ];\n\n const files = await listWorkspaceFiles(teamDir, candidates);\n\n return NextResponse.json({ ok: true, teamId, teamDir, files });\n });\n}\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,KChBA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEO,eAAe,EAAI,CAAY,EACpC,MAAO,CAAA,EAAA,EAAA,wBAAwB,AAAxB,EAAyB,EAAK,MAAO,QAAE,CAAM,SAAE,CAAO,CAAE,IAI7D,IAAM,EAAc,MAAM,AAAC,WAC3B,GAAI,CAEF,MAAO,CADI,MAAM,EAAA,OAAE,CAAC,IAAI,CAAC,EAAA,OAAI,CAAC,IAAI,CAAC,EAAS,QAAS,QAAA,EAC3C,WAAW,EACvB,CAAE,KAAM,CACN,OAAO,CACT,CACA,CAAC,IAEK,EAAe,MAAM,CAAC,UAC5B,GAAI,CACF,IAAM,EAAe,EAAA,OAAI,CAAC,IAAI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AAT,GAAY,CAAC,kBAAkB,AAC7F,EAAQ,GAAG,CAAC,gBAAiB,CAAA,EAAA,EAAA,qBAAA,AAAqB,EAAC,EAAW,YAAY,GAE9E,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAeV,GAdM,aAAe,EAAA,eAAe,EAEhC,CAFmC,KAE7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,EACA,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":[0]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[11628,e=>{"use strict";var t=e.i(50227);function a(e){let a=e.replace(/\\/g,"/").match(/^(.*\/workspace-([^\/]+))\/roles\/([^\/]+)\/?$/);if(!a)return{kind:"other"};let r=a[1],n=a[2],i=a[3],o=t.default.join(r,"roles",i);return{kind:"teamRole",teamDir:r,teamId:n,roleDir:o,role:i}}e.s(["parseTeamRoleWorkspace",()=>a])},81317,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),i=e.i(61916),o=e.i(74677),s=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),R=e.i(74838),f=e.i(10372),v=e.i(93695);e.i(52474);var g=e.i(220),m=e.i(12714),w=e.i(50227),E=e.i(89171),C=e.i(11628),x=e.i(85067),y=e.i(40317);async function A(e){let t=await (0,x.getAgentContextFromQuery)(e);if(t instanceof E.NextResponse)return t;let{agentId:a,ws:r}=t,n=(0,C.parseTeamRoleWorkspace)(r),i=[w.default.join(r,"skills")];"teamRole"===n.kind&&i.push(w.default.join(n.teamDir,"skills"));let o=new Set,s=[];for(let e of i)try{for(let t of(await m.default.readdir(e,{withFileTypes:!0})))t.isDirectory()&&o.add(t.name)}catch(t){s.push(`${e}: ${(0,y.errorMessage)(t)}`)}return E.NextResponse.json({ok:!0,agentId:a,workspace:r,skillsDirs:i,skills:Array.from(o).sort((e,t)=>e.localeCompare(t)),note:s.length?s.join("; "):void 0})}e.s(["GET",()=>A],93364);var k=e.i(93364);let T=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/agents/skills/route",pathname:"/api/agents/skills",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skills/route.ts",nextConfigOutput:"standalone",userland:k}),{workAsyncStorage:N,workUnitAsyncStorage:P,serverHooks:b}=T;function O(){return(0,r.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:P})}async function S(e,t,r){T.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/agents/skills/route";m=m.replace(/\/index$/,"")||"/";let w=await T.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:E,params:C,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:k,routerServerContext:N,isOnDemandRevalidate:P,revalidateOnlyGenerated:b,resolvedPathname:O,clientReferenceManifest:S,serverActionsManifest:_}=w,H=(0,s.normalizeAppPath)(m),D=!!(k.dynamicRoutes[H]||k.routes[O]),U=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,y,!1):t.end("This page could not be found"),null);if(D&&!A){let e=!!k.routes[O],t=k.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(x.experimental.adapterPath)return await U();throw new v.NoFallbackError}}let I=null;!D||T.isDev||A||(I="/index"===(I=O)?"/":I);let q=!0===T.isDev||!D,M=D&&!q;_&&S&&(0,o.setManifestsSingleton)({page:m,clientReferenceManifest:S,serverActionsManifest:_});let j=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),K={params:C,prerenderManifest:k,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:q,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:x.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>T.onRequestError(e,t,r,n,N)},sharedContext:{buildId:E}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(B,(0,u.signalFromNodeResponse)(t));try{let o=async e=>T.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=$.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${j} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${j} ${m}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var i,l;let u=async({previousCacheEntry:a})=>{try{if(!s&&P&&b&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let u=K.renderOpts.collectedTags;if(!D)return await (0,p.sendResponse)(B,L,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);u&&(t[f.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=f.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,r=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=f.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await T.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:P})},!1,N),t}},d=await T.handleResponse({req:e,nextConfig:x,cacheKey:I,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:k,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:b,responseGenerator:u,waitUntil:r.waitUntil,isMinimalMode:s});if(!D)return null;if((null==d||null==(i=d.value)?void 0:i.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});s||t.setHeader("x-nextjs-cache",P?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&D||v.delete(f.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,R.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(B,L,new Response(d.value.body,{headers:v,status:d.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${j} ${m}`,kind:i.SpanKind.SERVER,attributes:{"http.method":j,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await T.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:M,isOnDemandRevalidate:P})},!1,N),D)throw t;return await (0,p.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>O,"routeModule",()=>T,"serverHooks",()=>b,"workAsyncStorage",()=>N,"workUnitAsyncStorage",()=>P],81317)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_8e1e2c26._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/agent-workspace.ts","../../../src/app/api/agents/skills/route.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import path from \"node:path\";\n\nexport function parseTeamRoleWorkspace(ws: string):\n | { kind: \"teamRole\"; teamDir: string; teamId: string; roleDir: string; role: string }\n | { kind: \"other\" } {\n const normalized = ws.replace(/\\\\/g, \"/\");\n const m = normalized.match(/^(.*\\/workspace-([^\\/]+))\\/roles\\/([^\\/]+)\\/?$/);\n if (!m) return { kind: \"other\" };\n const teamDir = m[1];\n const teamId = m[2];\n const role = m[3];\n const roleDir = path.join(teamDir, \"roles\", role);\n return { kind: \"teamRole\", teamDir, teamId, roleDir, role };\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { parseTeamRoleWorkspace } from \"@/lib/agent-workspace\";\nimport { getAgentContextFromQuery } from \"@/lib/api-route-helpers\";\nimport { errorMessage } from \"@/lib/errors\";\n\nexport async function GET(req: Request) {\n const ctx = await getAgentContextFromQuery(req);\n if (ctx instanceof NextResponse) return ctx;\n const { agentId, ws } = ctx;\n\n const info = parseTeamRoleWorkspace(ws);\n const dirs: string[] = [path.join(ws, \"skills\")];\n if (info.kind === \"teamRole\") {\n dirs.push(path.join(info.teamDir, \"skills\"));\n }\n\n const skills = new Set<string>();\n const notes: string[] = [];\n\n for (const skillsDir of dirs) {\n try {\n const entries = await fs.readdir(skillsDir, { withFileTypes: true });\n for (const e of entries) if (e.isDirectory()) skills.add(e.name);\n } catch (e: unknown) {\n notes.push(`${skillsDir}: ${errorMessage(e)}`);\n }\n }\n\n return NextResponse.json({\n ok: true,\n agentId,\n workspace: ws,\n skillsDirs: dirs,\n skills: Array.from(skills).sort((a, b) => a.localeCompare(b)),\n note: notes.length ? notes.join(\"; \") : undefined,\n });\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/skills/route\",\n pathname: \"/api/agents/skills\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/agents/skills/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/skills/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEO,SAAS,EAAuB,CAAU,EAI/C,IAAM,EADa,AACT,EADY,OAAO,CAAC,MAAO,KAChB,KAAK,CAAC,kDAC3B,GAAI,CAAC,EAAG,MAAO,CAAE,KAAM,OAAQ,EAC/B,IAAM,EAAU,CAAC,CAAC,EAAE,CACd,EAAS,CAAC,CAAC,EAAE,CACb,EAAO,CAAC,CAAC,EAAE,CACX,EAAU,EAAA,OAAI,CAAC,IAAI,CAAC,EAAS,QAAS,GAC5C,MAAO,CAAE,KAAM,mBAAY,SAAS,UAAQ,OAAS,CAAK,CAC5D,+DEbA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAA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,e=>{"use strict";var t=e.i(12714),r=e.i(50227),a=e.i(7367);async function n(e,r,a=!1){try{let n=(await t.default.readdir(e,{withFileTypes:!0})).filter(e=>e.isFile()&&e.name.endsWith(r)).map(e=>e.name).sort();return a&&(n=n.reverse()),{ok:!0,dir:e,files:n}}catch(t){if(t&&"object"==typeof t&&"ENOENT"===t.code)return{ok:!0,dir:e,files:[]};throw t}}e.s(["readdirFiles",()=>n],63715);let o=r.default.join("shared-context","workflows");function i(e){return`${e}.workflow.json`}function s(e){let t=String(e??"").trim();if(!t)throw Error("workflow id is required");if(!/^[a-z0-9][a-z0-9-]{0,62}$/.test(t))throw Error("Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1");return t}async function l(e){let t=await (0,a.getTeamWorkspaceDir)(e);return r.default.join(t,o)}async function u(e){return n(await l(e),".workflow.json")}async function d(e,a){let n=s(a),o=await l(e),u=r.default.join(o,i(n)),d=JSON.parse(await t.default.readFile(u,"utf8"));return{ok:!0,path:u,workflow:d}}async function c(e,a){let n=s(a.id),o=await l(e);await t.default.mkdir(o,{recursive:!0});let u=r.default.join(o,i(n)),d={...a,schema:"clawkitchen.workflow.v1",id:n};return await t.default.writeFile(u,JSON.stringify(d,null,2)+"\n","utf8"),{ok:!0,path:u}}async function p(e,a){let n=s(a),o=await l(e),u=r.default.join(o,i(n));try{await t.default.unlink(u)}catch(e){if(e&&"object"==typeof e&&"ENOENT"===e.code)return{ok:!0,path:u,existed:!1};throw e}return{ok:!0,path:u,existed:!0}}e.s(["assertSafeWorkflowId",()=>s,"deleteWorkflow",()=>p,"listWorkflows",()=>u,"readWorkflow",()=>d,"writeWorkflow",()=>c],56995)},41674,e=>{"use strict";var t=e.i(89171),r=e.i(85067);function a(e){let{searchParams:t}=new URL(e.url);return{teamId:String(t.get("teamId")??"").trim(),id:String(t.get("id")??"").trim(),workflowId:String(t.get("workflowId")??"").trim(),runId:String(t.get("runId")??"").trim()}}async function n(e,n,o){let{teamId:i,id:s}=a(e);return i?(0,r.withStorageError)(()=>s?n(i,s):o(i)):t.NextResponse.json({ok:!1,error:"teamId is required"},{status:400})}async function o(e,n,o){let{teamId:i,workflowId:s,runId:l}=a(e);return i?s?(0,r.withStorageError)(()=>l?n(i,s,l):o(i,s)):t.NextResponse.json({ok:!1,error:"workflowId is required"},{status:400}):t.NextResponse.json({ok:!1,error:"teamId is required"},{status:400})}e.s(["handleWorkflowRunsGet",()=>o,"handleWorkflowsGet",()=>n])},86076,e=>{"use strict";var t=e.i(47909),r=e.i(74017),a=e.i(96250),n=e.i(59756),o=e.i(61916),i=e.i(74677),s=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),w=e.i(74838),h=e.i(10372),R=e.i(93695);e.i(52474);var m=e.i(220),g=e.i(89171),k=e.i(85067),y=e.i(40317),E=e.i(41674),v=e.i(56995);async function x(e){return(0,E.handleWorkflowsGet)(e,v.readWorkflow,v.listWorkflows)}async function N(e){let t=await (0,k.parseJsonBody)(e);if(t instanceof g.NextResponse)return t;let{body:r}=t,a=String(r.teamId??"").trim(),n=r.workflow;if(!a)return g.NextResponse.json({ok:!1,error:"teamId is required"},{status:400});if(!(n&&"object"==typeof n&&"string"==typeof n.id&&n.id.trim()&&"string"==typeof n.name&&n.name.trim()&&Array.isArray(n.nodes)&&Array.isArray(n.edges)&&1))return g.NextResponse.json({ok:!1,error:"workflow is required (must include id, name, nodes[], edges[])"},{status:400});try{return(0,k.jsonOkRest)(await (0,v.writeWorkflow)(a,n))}catch(e){return g.NextResponse.json({ok:!1,error:(0,y.errorMessage)(e)},{status:500})}}async function C(e){let{searchParams:t}=new URL(e.url),r=String(t.get("teamId")??"").trim(),a=String(t.get("id")??"").trim();if(!r)return g.NextResponse.json({ok:!1,error:"teamId is required"},{status:400});if(!a)return g.NextResponse.json({ok:!1,error:"id is required"},{status:400});try{return(0,k.jsonOkRest)(await (0,v.deleteWorkflow)(r,a))}catch(e){return g.NextResponse.json({ok:!1,error:(0,y.errorMessage)(e)},{status:500})}}e.s(["DELETE",()=>C,"GET",()=>x,"POST",()=>N],9086);var A=e.i(9086);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/teams/workflows/route",pathname:"/api/teams/workflows",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/teams/workflows/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:T,workUnitAsyncStorage:I,serverHooks:j}=S;function O(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:I})}async function b(e,t,a){S.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/teams/workflows/route";g=g.replace(/\/index$/,"")||"/";let k=await S.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!k)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,params:E,nextConfig:v,parsedUrl:x,isDraftMode:N,prerenderManifest:C,routerServerContext:A,isOnDemandRevalidate:T,revalidateOnlyGenerated:I,resolvedPathname:j,clientReferenceManifest:O,serverActionsManifest:b}=k,P=(0,s.normalizeAppPath)(g),q=!!(C.dynamicRoutes[P]||C.routes[j]),_=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,x,!1):t.end("This page could not be found"),null);if(q&&!N){let e=!!C.routes[j],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(v.experimental.adapterPath)return await _();throw new R.NoFallbackError}}let U=null;!q||S.isDev||N||(U="/index"===(U=j)?"/":U);let H=!0===S.isDev||!q,W=q&&!H;b&&O&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:O,serverActionsManifest:b});let D=e.method||"GET",M=(0,o.getTracer)(),F=M.getActiveScopeSpan(),$={params:E,prerenderManifest:C,renderOpts:{experimental:{authInterrupts:!!v.experimental.authInterrupts},cacheComponents:!!v.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:v.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>S.onRequestError(e,t,a,n,A)},sharedContext:{buildId:y}},K=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t));try{let i=async e=>S.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.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 a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${g}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var o,l;let u=async({previousCacheEntry:r})=>{try{if(!s&&T&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let u=$.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(K,L,o,$.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(o.headers);u&&(t[h.NEXT_CACHE_TAGS_HEADER]=u),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,a=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:m.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:W,isOnDemandRevalidate:T})},!1,A),t}},d=await S.handleResponse({req:e,nextConfig:v,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:I,responseGenerator:u,waitUntil:a.waitUntil,isMinimalMode:s});if(!q)return null;if((null==d||null==(o=d.value)?void 0:o.kind)!==m.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});s||t.setHeader("x-nextjs-cache",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let R=(0,f.fromNodeOutgoingHttpHeaders)(d.value.headers);return s&&q||R.delete(h.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||R.get("Cache-Control")||R.set("Cache-Control",(0,w.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(K,L,new Response(d.value.body,{headers:R,status:d.value.status||200})),null};F?await l(F):await M.withPropagatedContext(e.headers,()=>M.trace(d.BaseServerSpan.handleRequest,{spanName:`${D} ${g}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof R.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:W,isOnDemandRevalidate:T})},!1,A),q)throw t;return await (0,p.sendResponse)(K,L,new Response(null,{status:500})),null}}e.s(["handler",()=>b,"patchFetch",()=>O,"routeModule",()=>S,"serverHooks",()=>j,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>I],86076)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_bdadf32a._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/workflows/storage.ts","../../../src/lib/workflows/readdir.ts","../../../src/lib/workflows/api-handlers.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/teams/workflows/route.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { getTeamWorkspaceDir } from \"@/lib/paths\";\nimport { readdirFiles } from \"@/lib/workflows/readdir\";\nimport type { WorkflowFileV1 } from \"@/lib/workflows/types\";\n\nconst WORKFLOWS_DIR = path.join(\"shared-context\", \"workflows\");\n\nexport function workflowFileName(workflowId: string) {\n return `${workflowId}.workflow.json`;\n}\n\nexport function assertSafeWorkflowId(workflowId: string) {\n const id = String(workflowId ?? \"\").trim();\n if (!id) throw new Error(\"workflow id is required\");\n if (!/^[a-z0-9][a-z0-9-]{0,62}$/.test(id)) {\n throw new Error(\n \"Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1\"\n );\n }\n return id;\n}\n\nexport async function getTeamWorkflowsDir(teamId: string) {\n const teamDir = await getTeamWorkspaceDir(teamId);\n return path.join(teamDir, WORKFLOWS_DIR);\n}\n\nexport async function listWorkflows(teamId: string) {\n const dir = await getTeamWorkflowsDir(teamId);\n return readdirFiles(dir, \".workflow.json\");\n}\n\nexport async function readWorkflow(teamId: string, workflowId: string) {\n const id = assertSafeWorkflowId(workflowId);\n const dir = await getTeamWorkflowsDir(teamId);\n const p = path.join(dir, workflowFileName(id));\n const raw = await fs.readFile(p, \"utf8\");\n const parsed = JSON.parse(raw) as WorkflowFileV1;\n return { ok: true as const, path: p, workflow: parsed };\n}\n\nexport async function writeWorkflow(teamId: string, workflow: WorkflowFileV1) {\n const id = assertSafeWorkflowId(workflow.id);\n const dir = await getTeamWorkflowsDir(teamId);\n await fs.mkdir(dir, { recursive: true });\n const p = path.join(dir, workflowFileName(id));\n const toWrite: WorkflowFileV1 = {\n ...workflow,\n schema: \"clawkitchen.workflow.v1\",\n id,\n };\n await fs.writeFile(p, JSON.stringify(toWrite, null, 2) + \"\\n\", \"utf8\");\n return { ok: true as const, path: p };\n}\n\nexport async function deleteWorkflow(teamId: string, workflowId: string) {\n const id = assertSafeWorkflowId(workflowId);\n const dir = await getTeamWorkflowsDir(teamId);\n const p = path.join(dir, workflowFileName(id));\n try {\n await fs.unlink(p);\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n return { ok: true as const, path: p, existed: false as const };\n }\n throw err;\n }\n return { ok: true as const, path: p, existed: true as const };\n}\n","import fs from \"node:fs/promises\";\n\n/** Reads dir with optional suffix filter and reverse sort. Returns { ok, dir, files } or { ok, dir, files: [] } on ENOENT. */\nexport async function readdirFiles(\n dir: string,\n suffix: string,\n reverse = false\n): Promise<{ ok: true; dir: string; files: string[] }> {\n try {\n const entries = await fs.readdir(dir, { withFileTypes: true });\n let files = entries\n .filter((e) => e.isFile() && e.name.endsWith(suffix))\n .map((e) => e.name)\n .sort();\n if (reverse) files = files.reverse();\n return { ok: true as const, dir, files };\n } catch (err: unknown) {\n if (err && typeof err === \"object\" && (err as { code?: unknown }).code === \"ENOENT\") {\n return { ok: true as const, dir, files: [] as string[] };\n }\n throw err;\n }\n}\n","import { NextResponse } from \"next/server\";\nimport { withStorageError } from \"@/lib/api-route-helpers\";\n\nfunction params(req: Request) {\n const { searchParams } = new URL(req.url);\n return {\n teamId: String(searchParams.get(\"teamId\") ?? \"\").trim(),\n id: String(searchParams.get(\"id\") ?? \"\").trim(),\n workflowId: String(searchParams.get(\"workflowId\") ?? \"\").trim(),\n runId: String(searchParams.get(\"runId\") ?? \"\").trim(),\n };\n}\n\n/** GET handler for /api/teams/workflows. */\nexport async function handleWorkflowsGet(\n req: Request,\n readOne: (teamId: string, id: string) => Promise<{ ok: boolean }>,\n listAll: (teamId: string) => Promise<{ ok: boolean }>\n): Promise<NextResponse> {\n const { teamId, id } = params(req);\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n return withStorageError(() => (id ? readOne(teamId, id) : listAll(teamId)));\n}\n\n/** GET handler for /api/teams/workflow-runs. */\nexport async function handleWorkflowRunsGet(\n req: Request,\n readOne: (teamId: string, workflowId: string, runId: string) => Promise<{ ok: boolean }>,\n listAll: (teamId: string, workflowId: string) => Promise<{ ok: boolean }>\n): Promise<NextResponse> {\n const { teamId, workflowId, runId } = params(req);\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n if (!workflowId) return NextResponse.json({ ok: false, error: \"workflowId is required\" }, { status: 400 });\n return withStorageError(() => (runId ? readOne(teamId, workflowId, runId) : listAll(teamId, workflowId)));\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/teams/workflows/route\",\n pathname: \"/api/teams/workflows\",\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/teams/workflows/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/teams/workflows/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 { NextResponse } from \"next/server\";\nimport { jsonOkRest, parseJsonBody } from \"@/lib/api-route-helpers\";\nimport { errorMessage } from \"@/lib/errors\";\nimport { handleWorkflowsGet } from \"@/lib/workflows/api-handlers\";\nimport { deleteWorkflow, listWorkflows, readWorkflow, writeWorkflow } from \"@/lib/workflows/storage\";\nimport type { WorkflowFileV1 } from \"@/lib/workflows/types\";\n\nfunction isWorkflowFileV1(v: unknown): v is WorkflowFileV1 {\n if (!v || typeof v !== \"object\") return false;\n const o = v as Record<string, unknown>;\n if (typeof o.id !== \"string\" || !o.id.trim()) return false;\n if (typeof o.name !== \"string\" || !o.name.trim()) return false;\n if (!Array.isArray(o.nodes)) return false;\n if (!Array.isArray(o.edges)) return false;\n return true;\n}\n\nexport async function GET(req: Request) {\n return handleWorkflowsGet(req, readWorkflow, listWorkflows);\n}\n\nexport async function POST(req: Request) {\n const parsed = await parseJsonBody(req);\n if (parsed instanceof NextResponse) return parsed;\n const { body: o } = parsed;\n\n const teamId = String(o.teamId ?? \"\").trim();\n const workflowRaw = o.workflow;\n\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n if (!isWorkflowFileV1(workflowRaw)) {\n return NextResponse.json({ ok: false, error: \"workflow is required (must include id, name, nodes[], edges[])\" }, { status: 400 });\n }\n\n try {\n return jsonOkRest(await writeWorkflow(teamId, workflowRaw));\n } catch (err: unknown) {\n return NextResponse.json({ ok: false, error: errorMessage(err) }, { status: 500 });\n }\n}\n\nexport async function DELETE(req: Request) {\n const { searchParams } = new URL(req.url);\n const teamId = String(searchParams.get(\"teamId\") ?? \"\").trim();\n const id = String(searchParams.get(\"id\") ?? \"\").trim();\n\n if (!teamId) return NextResponse.json({ ok: false, error: \"teamId is required\" }, { status: 400 });\n if (!id) return NextResponse.json({ ok: false, error: \"id is required\" }, { status: 400 });\n\n try {\n return jsonOkRest(await deleteWorkflow(teamId, id));\n } catch (err: unknown) {\n return NextResponse.json({ ok: false, error: errorMessage(err) }, { status: 500 });\n }\n}\n"],"names":[],"mappings":"6CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MCCO,eAAe,EACpB,CAAW,CACX,CAAc,CACd,GAAU,CAAK,EAEf,GAAI,CAEF,IAAI,EAAQ,CADI,MAAM,EAAA,OAAE,CAAC,OAAO,CAAC,EAAK,CAAE,eAAe,CAAK,EAAA,EAEzD,MAAM,CAAC,AAAC,GAAM,EAAE,MAAM,IAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,IAC5C,GAAG,CAAC,AAAC,GAAM,EAAE,IAAI,EACjB,IAAI,GAEP,OADI,IAAS,EAAQ,EAAM,OAAO,EAAA,EAC3B,CAAE,GAAI,OAAe,QAAK,CAAM,CACzC,CAAE,MAAO,EAAc,CACrB,GAAI,GAAsB,UAAf,OAAO,GAAyD,UAAU,CAA9C,EAA2B,IAAI,CACpE,MAAO,CAAE,IAAI,MAAe,EAAK,MAAO,EAAE,AAAa,CAEzD,O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AAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[3]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[11628,e=>{"use strict";var t=e.i(50227);function a(e){let a=e.replace(/\\/g,"/").match(/^(.*\/workspace-([^\/]+))\/roles\/([^\/]+)\/?$/);if(!a)return{kind:"other"};let r=a[1],n=a[2],s=a[3],i=t.default.join(r,"roles",s);return{kind:"teamRole",teamDir:r,teamId:n,roleDir:i,role:s}}e.s(["parseTeamRoleWorkspace",()=>a])},60232,e=>{"use strict";var t=e.i(47909),a=e.i(74017),r=e.i(96250),n=e.i(59756),s=e.i(61916),i=e.i(74677),o=e.i(69741),l=e.i(16795),d=e.i(87718),u=e.i(95169),c=e.i(47587),p=e.i(66012),h=e.i(70101),R=e.i(74838),g=e.i(10372),f=e.i(93695);e.i(52474);var v=e.i(220),w=e.i(89171),m=e.i(5003),E=e.i(11628),C=e.i(85067);async function k(e){let t=await e.json(),a=String(t.agentId??"").trim(),r=String(t.skill??"").trim();if(!a)return w.NextResponse.json({ok:!1,error:"agentId is required"},{status:400});if(!r)return w.NextResponse.json({ok:!1,error:"skill is required"},{status:400});let n=["recipes","install-skill",r,"--agent-id",a,"--yes"];try{let{stdout:e}=await (0,m.runOpenClaw)(["agents","list","--json"]),t=JSON.parse(e).find(e=>e.id===a),s=t?.workspace?String(t.workspace):"",i=(0,E.parseTeamRoleWorkspace)(s);"teamRole"===i.kind&&(n=["recipes","install-skill",r,"--team-id",i.teamId,"--yes"])}catch{}let s=await (0,m.runOpenClaw)(n);return s.ok?w.NextResponse.json({ok:!0,agentId:a,skill:r,scopeArgs:n,stdout:s.stdout,stderr:s.stderr}):(0,C.installSkillErrorResponse)(n,s,{scopeArgs:n})}e.s(["POST",()=>k],29357);var x=e.i(29357);let A=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/agents/skills/install/route",pathname:"/api/agents/skills/install",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/agents/skills/install/route.ts",nextConfigOutput:"standalone",userland:x}),{workAsyncStorage:y,workUnitAsyncStorage:N,serverHooks:T}=A;function O(){return(0,r.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:N})}async function S(e,t,r){A.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/agents/skills/install/route";w=w.replace(/\/index$/,"")||"/";let m=await A.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:E,params:C,nextConfig:k,parsedUrl:x,isDraftMode:y,prerenderManifest:N,routerServerContext:T,isOnDemandRevalidate:O,revalidateOnlyGenerated:S,resolvedPathname:P,clientReferenceManifest:b,serverActionsManifest:_}=m,I=(0,o.normalizeAppPath)(w),H=!!(N.dynamicRoutes[I]||N.routes[P]),q=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,x,!1):t.end("This page could not be found"),null);if(H&&!y){let e=!!N.routes[P],t=N.dynamicRoutes[I];if(t&&!1===t.fallback&&!e){if(k.experimental.adapterPath)return await q();throw new f.NoFallbackError}}let U=null;!H||A.isDev||y||(U="/index"===(U=P)?"/":U);let j=!0===A.isDev||!H,D=H&&!j;_&&b&&(0,i.setManifestsSingleton)({page:w,clientReferenceManifest:b,serverActionsManifest:_});let M=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K={params:C,prerenderManifest:N,renderOpts:{experimental:{authInterrupts:!!k.experimental.authInterrupts},cacheComponents:!!k.cacheComponents,supportsDynamicResponse:j,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:k.cacheLife,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>A.onRequestError(e,t,r,n,T)},sharedContext:{buildId:E}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>A.handle(W,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let a=$.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route");if(r){let t=`${M} ${r}`;e.setAttributes({"next.route":r,"http.route":r,"next.span_name":t}),e.updateName(t)}else e.updateName(`${M} ${w}`)}),o=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var s,l;let d=async({previousCacheEntry:a})=>{try{if(!o&&O&&S&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&r.waitUntil&&(r.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!H)return await (0,p.sendResponse)(B,L,s,K.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,r=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:O})},!1,T),t}},u=await A.handleResponse({req:e,nextConfig:k,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:r.waitUntil,isMinimalMode:o});if(!H)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});o||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),y&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return o&&H||f.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,R.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(B,L,new Response(u.value.body,{headers:f,status:u.value.status||200})),null};F?await l(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${w}`,kind:s.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},l))}catch(t){if(t instanceof f.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:O})},!1,T),H)throw t;return await (0,p.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>O,"routeModule",()=>A,"serverHooks",()=>T,"workAsyncStorage",()=>y,"workUnitAsyncStorage",()=>N],60232)}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_e90b77d5._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/lib/agent-workspace.ts","../../../node_modules/next/dist/esm/build/templates/app-route.js","../../../src/app/api/agents/skills/install/route.ts"],"sourcesContent":["import path from \"node:path\";\n\nexport function parseTeamRoleWorkspace(ws: string):\n | { kind: \"teamRole\"; teamDir: string; teamId: string; roleDir: string; role: string }\n | { kind: \"other\" } {\n const normalized = ws.replace(/\\\\/g, \"/\");\n const m = normalized.match(/^(.*\\/workspace-([^\\/]+))\\/roles\\/([^\\/]+)\\/?$/);\n if (!m) return { kind: \"other\" };\n const teamDir = m[1];\n const teamId = m[2];\n const role = m[3];\n const roleDir = path.join(teamDir, \"roles\", role);\n return { kind: \"teamRole\", teamDir, teamId, roleDir, role };\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { addRequestMeta, getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setManifestsSingleton } from \"next/dist/esm/server/app-render/manifests-singleton\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"standalone\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/agents/skills/install/route\",\n pathname: \"/api/agents/skills/install\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/src/app/api/agents/skills/install/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint());\n }\n let srcPage = \"/api/agents/skills/install/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, parsedUrl, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n const render404 = async ()=>{\n // TODO: should route-module itself handle rendering the 404\n if (routerServerContext == null ? void 0 : routerServerContext.render404) {\n await routerServerContext.render404(req, res, parsedUrl, false);\n } else {\n res.end('This page could not be found');\n }\n return null;\n };\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n if (nextConfig.experimental.adapterPath) {\n return await render404();\n }\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n cacheComponents: Boolean(nextConfig.cacheComponents),\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: nextConfig.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext, silenceLog)=>routeModule.onRequestError(req, error, errorContext, silenceLog, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const isMinimalMode = Boolean(process.env.MINIMAL_MODE || getRequestMeta(req, 'minimalMode'));\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!isMinimalMode && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil,\n isMinimalMode\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!isMinimalMode) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(isMinimalMode && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n const silenceLog = false;\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, silenceLog, routerServerContext);\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { NextResponse } from \"next/server\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { parseTeamRoleWorkspace } from \"@/lib/agent-workspace\";\nimport { installSkillErrorResponse } from \"@/lib/api-route-helpers\";\n\nexport async function POST(req: Request) {\n const body = (await req.json()) as { agentId?: string; skill?: string };\n const agentId = String(body.agentId ?? \"\").trim();\n const skill = String(body.skill ?? \"\").trim();\n\n if (!agentId) return NextResponse.json({ ok: false, error: \"agentId is required\" }, { status: 400 });\n if (!skill) return NextResponse.json({ ok: false, error: \"skill is required\" }, { status: 400 });\n\n // For role-based team agents, install at team scope to avoid creating a separate\n // workspace-<agentId> directory that diverges from roles/<role>.\n let args = [\"recipes\", \"install-skill\", skill, \"--agent-id\", agentId, \"--yes\"];\n try {\n const { stdout } = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n const list = JSON.parse(stdout) as Array<{ id: string; workspace?: string }>;\n const agent = list.find((a) => a.id === agentId);\n const ws = agent?.workspace ? String(agent.workspace) : \"\";\n const info = parseTeamRoleWorkspace(ws);\n if (info.kind === \"teamRole\") {\n args = [\"recipes\", \"install-skill\", skill, \"--team-id\", info.teamId, \"--yes\"];\n }\n } catch {\n // If anything goes wrong, fall back to agent scope.\n }\n\n const res = await runOpenClaw(args);\n if (!res.ok) return installSkillErrorResponse(args, res, { scopeArgs: args });\n\n return NextResponse.json({ ok: true, agentId, skill, scopeArgs: args, stdout: res.stdout, stderr: res.stderr });\n}\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OAEO,SAAS,EAAuB,CAAU,EAI/C,IAAM,EADa,AACT,EADY,OAAO,CAAC,MAAO,KAChB,KAAK,CAAC,kDAC3B,GAAI,CAAC,EAAG,MAAO,CAAE,KAAM,OAAQ,EAC/B,IAAM,EAAU,CAAC,CAAC,EAAE,CACd,EAAS,CAAC,CAAC,EAAE,CACb,EAAO,CAAC,CAAC,EAAE,CACX,EAAU,EAAA,OAAI,CAAC,IAAI,CAAC,EAAS,QAAS,GAC5C,MAAO,CAAE,KAAM,mBAAY,SAAS,UAAQ,OAAS,CAAK,CAC5D,+DCbA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,KChBA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEO,eAAe,EAAK,CA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