@jiggai/kitchen 0.5.10 β 0.5.12
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/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.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/route.js.nft.json +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.nft.json +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/delete/route.js +1 -1
- package/.next/server/app/api/recipes/delete/route.js.nft.json +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/comment/route.js.nft.json +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.nft.json +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/orchestrator/route.js.nft.json +1 -1
- 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/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assignees/route.js.nft.json +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 +3 -3
- 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 +1 -1
- 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.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.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 +1 -1
- 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 +3 -3
- 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]__1331482c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1331482c._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__24d25a8c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__24d25a8c._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__3d9c4025._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__3d9c4025._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__83753ef0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__83753ef0._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__8799df50._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__8799df50._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__a90f7cdc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__a90f7cdc._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__afde9f7c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__afde9f7c._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e3431817._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e3431817._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__e6ecca08._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__e6ecca08._.js.map +1 -0
- package/.next/server/chunks/{[root-of-the-server]__d0634ad4._.js β [root-of-the-server]__fc511c8f._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__fc511c8f._.js.map +1 -0
- package/.next/server/chunks/[root-of-the-server]__fcde644b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__fcde644b._.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/ssr/{[root-of-the-server]__becf14db._.js β [root-of-the-server]__0a8db855._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0a8db855._.js.map +1 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__4d24c088._.js β [root-of-the-server]__18154c9e._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__18154c9e._.js.map +1 -0
- 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]__52cb8e0e._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__52cb8e0e._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__7af8e528._.js +9 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__7af8e528._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__7c14561e._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__7c14561e._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__c97fe9e9._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__c97fe9e9._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__e9faef37._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__e9faef37._.js.map +1 -0
- package/.next/server/chunks/ssr/_018dfe6b._.js +1 -1
- package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -1
- package/.next/server/chunks/ssr/_15bc566e._.js +9 -0
- package/.next/server/chunks/ssr/_15bc566e._.js.map +1 -0
- package/.next/server/chunks/ssr/{_835573ec._.js β _3d6d3f59._.js} +8 -2
- package/.next/server/chunks/ssr/_3d6d3f59._.js.map +1 -0
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -7
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js +1 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_runs_[workflowId]_[runId]_run-detail-client_tsx_56f0cbd7._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.js +1 -1
- package/.next/server/chunks/ssr/src_app_teams_[teamId]_workflows_workflows-client_tsx_12742cc9._.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/2a86fa0c3d9177c5.js +7 -0
- package/.next/static/chunks/4a57b795d958b061.js +1 -0
- package/.next/static/chunks/67a9a9a3c6dd4aa4.js +7 -0
- package/.next/static/chunks/a683f58aaf4f41e9.css +3 -0
- package/.next/static/chunks/{212477db59154fa7.js β b641409c1c9d8c3e.js} +3 -3
- package/.next/static/chunks/{fac5526bd312cf6e.js β b8722104d0ceb74d.js} +9 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -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]__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]__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]__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]__d0634ad4._.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/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.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.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__cb91405c._.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/server/chunks/ssr/_835573ec._.js.map +0 -1
- package/.next/static/chunks/24ac17715eb2614d.js +0 -1
- package/.next/static/chunks/8b99ae14a606b607.css +0 -3
- package/.next/static/chunks/d593ea5e91e81b45.js +0 -1
- package/.next/static/chunks/ff661b5e599f8d74.js +0 -7
- /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 β p8YaBY0FwA86zQelkOQ-m}/_buildManifest.js +0 -0
- /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 β p8YaBY0FwA86zQelkOQ-m}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{3JkH3_7LqC0wr-k7JoZl9 β p8YaBY0FwA86zQelkOQ-m}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/paths.ts","../../../../src/lib/kitchen-api.ts","../../../../src/lib/openclaw.ts","../../../../src/lib/openclaw-cache.ts","../../../../src/lib/manifest.ts","../../../../src/app/HomeClient.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/page.tsx"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\ntype OpenClawConfig = {\n agents?: { defaults?: { workspace?: string } };\n gateway?: { port?: number; auth?: { token?: string } };\n tools?: {\n agentToAgent?: {\n enabled?: boolean;\n allow?: string[];\n };\n };\n plugins?: {\n installs?: { recipes?: { installPath?: string; sourcePath?: string } };\n load?: { paths?: string[] };\n };\n // OpenClaw message routing bindings (used for HITL approvals, etc.)\n bindings?: unknown[];\n};\n\nexport async function readOpenClawConfig(): Promise<OpenClawConfig> {\n const p = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");\n const text = await fs.readFile(p, \"utf8\");\n return JSON.parse(text) as OpenClawConfig;\n}\n\nexport async function getWorkspaceDir() {\n const cfg = await readOpenClawConfig();\n const ws = cfg.agents?.defaults?.workspace;\n if (!ws) throw new Error(\"agents.defaults.workspace is not set in ~/.openclaw/openclaw.json\");\n return ws;\n}\n\nexport async function getWorkspaceRecipesDir() {\n const ws = await getWorkspaceDir();\n return path.join(ws, \"recipes\");\n}\n\nexport async function getWorkspaceGoalsDir() {\n const ws = await getWorkspaceDir();\n\n // Back-compat: some installs keep goals at <workspace>/goals.\n // Prefer that when present, otherwise fall back to <workspace>/notes/goals.\n const direct = path.join(ws, \"goals\");\n try {\n const st = await fs.stat(direct);\n if (st.isDirectory()) return direct;\n } catch {\n // ignore\n }\n\n return path.join(ws, \"notes\", \"goals\");\n}\n\nexport async function getTeamWorkspaceDir(teamId: string) {\n const home = os.homedir();\n if (!home) throw new Error(\"Could not resolve home directory\");\n return path.join(home, \".openclaw\", `workspace-${teamId}`);\n}\n\n/** Team workspace dir derived from agents.defaults.workspace (sibling: .. / workspace-{teamId}) */\nexport function teamDirFromBaseWorkspace(baseWorkspace: string, teamId: string) {\n // Special-case: treat \"main\" as the personal workspace (agents.defaults.workspace).\n // This lets Kitchen expose a selectable \"main\" scope without creating a separate\n // ~/.openclaw/workspace-main folder.\n if (teamId === \"main\") return path.resolve(baseWorkspace);\n return path.resolve(baseWorkspace, \"..\", `workspace-${teamId}`);\n}\n\n/** Rejects path traversal and empty names; returns normalized name. */\nexport function assertSafeRelativeFileName(name: string): string {\n const n = name.replace(/\\\\/g, \"/\");\n if (!n || n.startsWith(\"/\") || n.includes(\"..\")) throw new Error(\"Invalid file name\");\n return n;\n}\n\nexport async function getBuiltinRecipesDir() {\n const cfg = await readOpenClawConfig();\n const p =\n cfg.plugins?.installs?.recipes?.installPath ||\n cfg.plugins?.installs?.recipes?.sourcePath ||\n cfg.plugins?.load?.paths?.[0];\n if (!p) throw new Error(\"Could not determine recipes plugin install path from ~/.openclaw/openclaw.json\");\n return path.join(p, \"recipes\", \"default\");\n}\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"π¦ OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping β return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import { runOpenClaw, type OpenClawExecResult } from \"@/lib/openclaw\";\n\n// `openclaw <cmd>` invocations spawn a subprocess that pays a fixed startup\n// cost (~15-20s on this machine). Server components that read configuration\n// β agents list, recipes list, plugins list β call these on every render,\n// including each 3s `router.refresh()` poll on live pages, blocking the page\n// behind that subprocess.\n//\n// This helper memoizes successful results by argv key for a short window so\n// renders return fast. Concurrent callers share one in-flight subprocess\n// instead of spawning duplicates. Only successful results are cached so a\n// transient failure won't stick. Callers that mutate state (cron rm, recipes\n// delete, etc.) and routes that need fresh post-mutation reads should use\n// `runOpenClaw` directly instead.\n\nconst DEFAULT_TTL_MS = 30_000;\n\nconst cache = new Map<string, { value: OpenClawExecResult; expires: number }>();\nconst inflight = new Map<string, Promise<OpenClawExecResult>>();\n\nexport async function cachedRunOpenClaw(\n args: string[],\n options: { ttlMs?: number } = {}\n): Promise<OpenClawExecResult> {\n const ttl = options.ttlMs ?? DEFAULT_TTL_MS;\n const key = JSON.stringify(args);\n const cached = cache.get(key);\n if (cached && Date.now() < cached.expires) return cached.value;\n const existing = inflight.get(key);\n if (existing) return existing;\n const promise = (async () => {\n try {\n const value = await runOpenClaw(args);\n if (value.ok) cache.set(key, { value, expires: Date.now() + ttl });\n return value;\n } finally {\n inflight.delete(key);\n }\n })();\n inflight.set(key, promise);\n return promise;\n}\n\n/**\n * Invalidate one or more cached entries by argv. Mutation routes (e.g.\n * `cron rm`, `cron enable`) call this after a successful write so the next\n * read returns fresh data instead of waiting for the TTL to expire.\n *\n * Each argv is matched as a prefix: `invalidateOpenClawCache([\"cron\"])` clears\n * every cached `openclaw cron *` call. Pass an exact argv to scope tightly.\n */\nexport function invalidateOpenClawCache(...argvs: string[][]): void {\n for (const argv of argvs) {\n const prefix = JSON.stringify(argv).replace(/\\]$/, \"\");\n for (const key of cache.keys()) {\n if (key === JSON.stringify(argv) || key.startsWith(prefix)) cache.delete(key);\n }\n for (const key of inflight.keys()) {\n if (key === JSON.stringify(argv) || key.startsWith(prefix)) inflight.delete(key);\n }\n }\n}\n\n/** Test-only: clear all cached subprocess results. */\nexport function _resetOpenClawCache() {\n cache.clear();\n inflight.clear();\n}\n","import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n// ββ Manifest types (mirrors ClawRecipes src/lib/kitchen-manifest.ts) ββββββββ\n\nexport interface KitchenManifest {\n version: 1;\n generatedAt: string;\n teams: Record<string, TeamManifestEntry>;\n agents: AgentManifestEntry[];\n recipes: RecipeManifestEntry[];\n}\n\nexport interface TeamManifestEntry {\n teamId: string;\n displayName: string | null;\n roles: string[];\n ticketCounts: {\n backlog: number;\n \"in-progress\": number;\n testing: number;\n done: number;\n total: number;\n };\n activeRunCount: number;\n}\n\nexport interface AgentManifestEntry {\n id: string;\n identityName?: string;\n workspace?: string;\n model?: string;\n isDefault?: boolean;\n}\n\nexport interface RecipeManifestEntry {\n id: string;\n name: string;\n kind: \"agent\" | \"team\";\n source: \"builtin\" | \"workspace\";\n}\n\n// ββ Reader ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ\n\nconst MANIFEST_PATH = path.join(os.homedir(), \".openclaw\", \"kitchen-manifest.json\");\n\n/** Max age in ms before we consider the manifest stale and trigger background regen. */\nconst STALE_THRESHOLD_MS = 10_000;\n\n/**\n * Read the kitchen manifest. Returns null if the file is missing or unparseable.\n */\nexport async function readManifest(): Promise<KitchenManifest | null> {\n try {\n const raw = await fs.readFile(MANIFEST_PATH, \"utf8\");\n const parsed = JSON.parse(raw) as KitchenManifest;\n if (!parsed || parsed.version !== 1 || !parsed.generatedAt) return null;\n return parsed;\n } catch {\n return null;\n }\n}\n\n/**\n * Check whether the manifest is stale (older than STALE_THRESHOLD_MS).\n */\nexport function isManifestStale(manifest: KitchenManifest): boolean {\n const age = Date.now() - new Date(manifest.generatedAt).getTime();\n return age > STALE_THRESHOLD_MS;\n}\n\n/**\n * Fire-and-forget: trigger manifest regeneration via the openclaw CLI.\n * Does not block β errors are silently logged.\n */\nexport function triggerManifestRegeneration(): void {\n // Dynamic import to avoid pulling in openclaw.ts at module level\n import(\"./openclaw\").then(({ runOpenClaw }) => {\n runOpenClaw([\"recipes\", \"kitchen-manifest\"]).catch(() => {\n // best-effort β if regen fails, next request will try again\n });\n }).catch(() => {});\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/HomeClient.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/HomeClient.tsx\",\n \"default\",\n);\n","import { unstable_noStore as noStore } from \"next/cache\";\nimport { type AgentListItem } from \"@/lib/agents\";\nimport { APP_VERSION } from \"@/lib/app-info\";\nimport { runOpenClaw } from \"@/lib/openclaw\";\nimport { listRecipes } from \"@/lib/recipes\";\nimport { readManifest, isManifestStale, triggerManifestRegeneration } from \"@/lib/manifest\";\nimport HomeClient from \"./HomeClient\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nasync function getAgents(): Promise<AgentListItem[]> {\n const res = await runOpenClaw([\"agents\", \"list\", \"--json\"]);\n if (!res.ok) return [];\n return JSON.parse(res.stdout) as AgentListItem[];\n}\n\nasync function getTeamsFromRecipes(): Promise<{ teamNames: Record<string, string> }> {\n const items = await listRecipes();\n const teamNames: Record<string, string> = {};\n for (const r of items) {\n if (r.kind !== \"team\") continue;\n const name = String(r.name ?? \"\").trim();\n if (!name) continue;\n teamNames[r.id] = name;\n }\n return { teamNames };\n}\n\nexport default async function Home() {\n noStore();\n\n // Try manifest first (single file read vs 2 subprocess calls)\n const manifest = await readManifest();\n if (manifest) {\n if (isManifestStale(manifest)) triggerManifestRegeneration();\n\n const agents: AgentListItem[] = manifest.agents;\n const teamNames: Record<string, string> = {};\n for (const r of manifest.recipes) {\n if (r.kind !== \"team\") continue;\n const name = String(r.name ?? \"\").trim();\n if (!name) continue;\n teamNames[r.id] = name;\n }\n return <HomeClient agents={agents} teamNames={teamNames} appVersion={APP_VERSION} />;\n }\n\n // Fallback: subprocess calls (manifest missing or corrupt)\n const [agents, { teamNames }] = await Promise.all([getAgents(), getTeamsFromRecipes()]);\n return <HomeClient agents={agents} teamNames={teamNames} appVersion={APP_VERSION} />;\n}\n"],"names":[],"mappings":"szBAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAmBO,eAAe,IACpB,IAAM,EAAI,EAAA,OAAI,CAAC,IAAI,CAAC,EAAA,OAAE,CAAC,OAAO,GAAI,YAAa,iBAE/C,OAAO,KAAK,KAAK,CADJ,AACK,MADC,EAAA,OAAE,CAAC,QAAQ,CAAC,EAAG,QAEpC,CAEO,eAAe,IACpB,IAAM,EAAM,MAAM,IACZ,EAAK,EAAI,MAAM,EAAE,UAAU,UACjC,GAAI,CAAC,EAAI,MAAM,AAAI,MAAM,qEACzB,OAAO,CACT,CAuBO,eAAe,EAAoB,CAAc,EACtD,IAAM,EAAO,EAAA,OAAE,CAAC,OAAO,GACvB,GAAI,CAAC,EAAM,MAAM,AAAI,MAAM,oCAC3B,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAM,YAAa,CAAC,UAAU,EAAE,EAAA,CAAQ,CAC3D,oFE1DA,IAA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AO,CAAE,CAChC,GAAe,SAAX,EAAE,IAAI,CAAa,SACvB,IAAM,EAAO,OAAO,EAAE,IAAI,EAAI,IAAI,IAAI,GACjC,IACL,CAAS,CADE,AACD,EAAE,EAAE,CAAC,CAAG,CAAA,CACpB,CACA,MAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAU,CAAA,CAAC,OAAQ,EAAQ,UAAW,EAAW,WAAY,EAAA,WAAW,EAClF,CAGA,GAAM,CAAC,EAAQ,WAAE,CAAS,CAAE,CAAC,CAAG,MAAM,QAAQ,GAAG,CAAC,CAAC,IAAa,IAAsB,EACtF,MAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAU,CAAA,CAAC,OAAQ,EAAQ,UAAW,EAAW,WAAY,EAAA,WAAW,EAClF,kCA3CuB,+BACG","ignoreList":[5]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},83643,a=>{"use strict";var b=a.i(74533);let c=(0,a.i(12057).promisify)(b.execFile);function d(a){return"string"==typeof a.stdout?a.stdout:a.stdout&&"object"==typeof a.stdout&&"toString"in a.stdout?String(a.stdout.toString()):""}function e(a,b){return"string"==typeof a.stderr?a.stderr:a.stderr&&"object"==typeof a.stderr&&"toString"in a.stderr?String(a.stderr.toString()):"string"==typeof a.message?a.message:String(b)}function f(a){let b=a.trim();if(!b)return a;let c=b[0];if("["===c||"{"===c||'"'===c)return a;let d=b.split("\n"),e=d.findIndex(a=>/^\s*[[\{"]/.test(a));if(e>0){let a=d.slice(e).join("\n");try{return JSON.parse(a),a}catch{}}return a}async function g(a,b={}){let{sanitizeStdout:h=!0}=b;try{process.platform;let b=await c("openclaw",a,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000}),d=String(b.stdout??"");return{ok:!0,exitCode:0,stdout:h?f(d):d,stderr:String(b.stderr??"")}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}function h(a){let b=a.trim();if(!b)return null;try{return JSON.parse(b)}catch{}let c=b.split("\n"),d=c.findIndex(a=>/^\s*[[\{]/.test(a));if(d>=0){let a=c.slice(d).join("\n");try{return JSON.parse(a)}catch{}}for(let a=c.length-1;a>=0;a--)if(/^\s*[\]}]/.test(c[a])){for(let b=a;b>=0;b--)if(/^\s*[[\{]/.test(c[b]))try{return JSON.parse(c.slice(b,a+1).join("\n"))}catch{}}return null}async function i(a){return g(a,{sanitizeStdout:!1})}async function j(a){if("cron"===a[0]||"recipes"===a[0]&&"workflows"===a[1]&&["runner-once","runner-tick","worker-tick"].includes(a[2]))return g(a);let b=function(){let a=globalThis.__clawkitchen_api;if(!a)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return a}();try{let c=await b.runtime.system.runCommandWithTimeout(["openclaw",...a],{timeoutMs:12e4}),d=f(String(c.stdout??"")),e=String(c.stderr??""),g="number"==typeof c.exitCode?c.exitCode:"number"==typeof c.code?c.code:"number"==typeof c.status?c.status:0;if(0!==g)return{ok:!1,exitCode:g,stdout:d,stderr:e};return{ok:!0,exitCode:0,stdout:d,stderr:e}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}a.s(["extractJson",()=>h,"runOpenClaw",()=>j,"runOpenClawRaw",()=>i],83643)},
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},83643,a=>{"use strict";var b=a.i(74533);let c=(0,a.i(12057).promisify)(b.execFile);function d(a){return"string"==typeof a.stdout?a.stdout:a.stdout&&"object"==typeof a.stdout&&"toString"in a.stdout?String(a.stdout.toString()):""}function e(a,b){return"string"==typeof a.stderr?a.stderr:a.stderr&&"object"==typeof a.stderr&&"toString"in a.stderr?String(a.stderr.toString()):"string"==typeof a.message?a.message:String(b)}function f(a){let b=a.trim();if(!b)return a;let c=b[0];if("["===c||"{"===c||'"'===c)return a;let d=b.split("\n"),e=d.findIndex(a=>/^\s*[[\{"]/.test(a));if(e>0){let a=d.slice(e).join("\n");try{return JSON.parse(a),a}catch{}}return a}async function g(a,b={}){let{sanitizeStdout:h=!0}=b;try{process.platform;let b=await c("openclaw",a,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000}),d=String(b.stdout??"");return{ok:!0,exitCode:0,stdout:h?f(d):d,stderr:String(b.stderr??"")}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}function h(a){let b=a.trim();if(!b)return null;try{return JSON.parse(b)}catch{}let c=b.split("\n"),d=c.findIndex(a=>/^\s*[[\{]/.test(a));if(d>=0){let a=c.slice(d).join("\n");try{return JSON.parse(a)}catch{}}for(let a=c.length-1;a>=0;a--)if(/^\s*[\]}]/.test(c[a])){for(let b=a;b>=0;b--)if(/^\s*[[\{]/.test(c[b]))try{return JSON.parse(c.slice(b,a+1).join("\n"))}catch{}}return null}async function i(a){return g(a,{sanitizeStdout:!1})}async function j(a){if("cron"===a[0]||"recipes"===a[0]&&"workflows"===a[1]&&["runner-once","runner-tick","worker-tick"].includes(a[2]))return g(a);let b=function(){let a=globalThis.__clawkitchen_api;if(!a)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return a}();try{let c=await b.runtime.system.runCommandWithTimeout(["openclaw",...a],{timeoutMs:12e4}),d=f(String(c.stdout??"")),e=String(c.stderr??""),g="number"==typeof c.exitCode?c.exitCode:"number"==typeof c.code?c.code:"number"==typeof c.status?c.status:0;if(0!==g)return{ok:!1,exitCode:g,stdout:d,stderr:e};return{ok:!0,exitCode:0,stdout:d,stderr:e}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}a.s(["extractJson",()=>h,"runOpenClaw",()=>j,"runOpenClawRaw",()=>i],83643)},45818,a=>{"use strict";var b=a.i(83643);let c=new Map,d=new Map;async function e(a,f={}){let g=f.ttlMs??3e4,h=JSON.stringify(a),i=c.get(h);if(i&&Date.now()<i.expires)return i.value;let j=d.get(h);if(j)return j;let k=(async()=>{try{let d=await (0,b.runOpenClaw)(a);return d.ok&&c.set(h,{value:d,expires:Date.now()+g}),d}finally{d.delete(h)}})();return d.set(h,k),k}a.s(["cachedRunOpenClaw",()=>e])},81511,a=>{"use strict";var b=a.i(45818);async function c(){let a=await (0,b.cachedRunOpenClaw)(["plugins","list","--json","--verbose"]);if(!a.ok)return{ok:!1,error:a.stderr.trim()||`openclaw plugins list failed (exit=${a.exitCode})`};try{var c,d;return{ok:!0,ids:(c=a.stdout,(Array.isArray(d=JSON.parse(c))?d:d&&"object"==typeof d&&Array.isArray(d.plugins)?d.plugins:[]).filter(a=>!!a&&"object"==typeof a&&!0===a.enabled).map(a=>String(a.id??"")).filter(Boolean))}}catch{return{ok:!1,error:"Failed to parse openclaw plugins list output"}}}async function d(a){let b=await c();return!!b.ok&&b.ids.includes(a)}a.s(["isPluginEnabled",()=>d])},78892,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx <module evaluation>","default")},49752,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx","default")},21895,a=>{"use strict";a.i(78892);var b=a.i(49752);a.n(b)},23388,a=>{"use strict";var b=a.i(7997),c=a.i(18558),d=a.i(21895),e=a.i(81511);async function f({params:a,searchParams:f}){(0,c.unstable_noStore)();let{teamId:g,workflowId:h}=await a,i=(await f??{}).draft,j=Array.isArray(i)?i[0]:i;return(0,b.jsx)("div",{className:"flex h-full min-h-0 flex-col",children:(0,b.jsx)(d.default,{teamId:g,workflowId:h,draft:"1"===j,llmTaskEnabled:await (0,e.isPluginEnabled)("llm-task")})})}a.s(["default",()=>f,"dynamic",0,"force-dynamic","revalidate",0,0])}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__18154c9e._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/kitchen-api.ts","../../../../src/lib/openclaw.ts","../../../../src/lib/openclaw-cache.ts","../../../../src/lib/plugins.ts","../../../../src/app/teams/%5BteamId%5D/workflows/%5BworkflowId%5D/workflows-editor-client.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/workflows/%5BworkflowId%5D/page.tsx"],"sourcesContent":["// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"π¦ OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping β return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import { runOpenClaw, type OpenClawExecResult } from \"@/lib/openclaw\";\n\n// `openclaw <cmd>` invocations spawn a subprocess that pays a fixed startup\n// cost (~15-20s on this machine). Server components that read configuration\n// β agents list, recipes list, plugins list β call these on every render,\n// including each 3s `router.refresh()` poll on live pages, blocking the page\n// behind that subprocess.\n//\n// This helper memoizes successful results by argv key for a short window so\n// renders return fast. Concurrent callers share one in-flight subprocess\n// instead of spawning duplicates. Only successful results are cached so a\n// transient failure won't stick. Callers that mutate state (cron rm, recipes\n// delete, etc.) and routes that need fresh post-mutation reads should use\n// `runOpenClaw` directly instead.\n\nconst DEFAULT_TTL_MS = 30_000;\n\nconst cache = new Map<string, { value: OpenClawExecResult; expires: number }>();\nconst inflight = new Map<string, Promise<OpenClawExecResult>>();\n\nexport async function cachedRunOpenClaw(\n args: string[],\n options: { ttlMs?: number } = {}\n): Promise<OpenClawExecResult> {\n const ttl = options.ttlMs ?? DEFAULT_TTL_MS;\n const key = JSON.stringify(args);\n const cached = cache.get(key);\n if (cached && Date.now() < cached.expires) return cached.value;\n const existing = inflight.get(key);\n if (existing) return existing;\n const promise = (async () => {\n try {\n const value = await runOpenClaw(args);\n if (value.ok) cache.set(key, { value, expires: Date.now() + ttl });\n return value;\n } finally {\n inflight.delete(key);\n }\n })();\n inflight.set(key, promise);\n return promise;\n}\n\n/**\n * Invalidate one or more cached entries by argv. Mutation routes (e.g.\n * `cron rm`, `cron enable`) call this after a successful write so the next\n * read returns fresh data instead of waiting for the TTL to expire.\n *\n * Each argv is matched as a prefix: `invalidateOpenClawCache([\"cron\"])` clears\n * every cached `openclaw cron *` call. Pass an exact argv to scope tightly.\n */\nexport function invalidateOpenClawCache(...argvs: string[][]): void {\n for (const argv of argvs) {\n const prefix = JSON.stringify(argv).replace(/\\]$/, \"\");\n for (const key of cache.keys()) {\n if (key === JSON.stringify(argv) || key.startsWith(prefix)) cache.delete(key);\n }\n for (const key of inflight.keys()) {\n if (key === JSON.stringify(argv) || key.startsWith(prefix)) inflight.delete(key);\n }\n }\n}\n\n/** Test-only: clear all cached subprocess results. */\nexport function _resetOpenClawCache() {\n cache.clear();\n inflight.clear();\n}\n","import { cachedRunOpenClaw } from \"@/lib/openclaw-cache\";\n\nexport type PluginListEntry = {\n id?: unknown;\n enabled?: unknown;\n};\n\nfunction extractPluginEntries(raw: unknown): PluginListEntry[] {\n if (Array.isArray(raw)) return raw as PluginListEntry[];\n if (raw && typeof raw === \"object\" && Array.isArray((raw as { plugins?: unknown }).plugins)) {\n return (raw as { plugins: PluginListEntry[] }).plugins;\n }\n return [];\n}\n\nexport function parseEnabledPluginIds(stdout: string): string[] {\n const parsed = JSON.parse(stdout) as unknown;\n const items = extractPluginEntries(parsed);\n return items\n .filter((p) => Boolean(p) && typeof p === \"object\" && (p as { enabled?: unknown }).enabled === true)\n .map((p) => String(p.id ?? \"\"))\n .filter(Boolean);\n}\n\nexport async function getEnabledPluginIds(): Promise<{ ok: true; ids: string[] } | { ok: false; error: string }> {\n // `openclaw plugins list` takes ~15s on this machine. Cache for 30s β workflow\n // editor pages render this on every poll. Plugin enable/disable changes are\n // rare and 30s lag to pick them up is acceptable.\n const res = await cachedRunOpenClaw([\"plugins\", \"list\", \"--json\", \"--verbose\"]);\n if (!res.ok) {\n const err = res.stderr.trim() || `openclaw plugins list failed (exit=${res.exitCode})`;\n return { ok: false, error: err };\n }\n\n try {\n return { ok: true, ids: parseEnabledPluginIds(res.stdout) };\n } catch {\n return { ok: false, error: \"Failed to parse openclaw plugins list output\" };\n }\n}\n\nexport async function isPluginEnabled(pluginId: string): Promise<boolean> {\n const res = await getEnabledPluginIds();\n if (!res.ok) return false;\n return res.ids.includes(pluginId);\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx\",\n \"default\",\n);\n","import { unstable_noStore as noStore } from \"next/cache\";\nimport WorkflowsEditorClient from \"./workflows-editor-client\";\nimport { isPluginEnabled } from \"@/lib/plugins\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function WorkflowEditorPage({\n params,\n searchParams,\n}: {\n params: Promise<{ teamId: string; workflowId: string }>;\n searchParams?: Promise<Record<string, string | string[] | undefined>>;\n}) {\n noStore();\n\n const { teamId, workflowId } = await params;\n const sp = (await searchParams) ?? {};\n const draftRaw = sp.draft;\n const draft = Array.isArray(draftRaw) ? draftRaw[0] : draftRaw;\n\n // Full-bleed workflows editor (no extra top row / padding / border).\n return (\n <div className=\"flex h-full min-h-0 flex-col\">\n <WorkflowsEditorClient\n teamId={teamId}\n workflowId={workflowId}\n draft={draft === \"1\"}\n llmTaskEnabled={await isPluginEnabled(\"llm-task\")}\n />\n </div>\n );\n}\n"],"names":[],"mappings":"geCCA,IAAA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAFtB,AAEsB,EAFtB,CAAA,CAAA,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,KAC1B,MAAM,CAAC,SAckD,CAC5D,CAAE,KAAM,CACN,MAAO,CAAE,IAAI,EAAO,MAAO,8CAA+C,CAC5E,CACF,CAEO,eAAe,EAAgB,CAAgB,EACpD,IAAM,EAAM,MAAM,UAClB,CAAI,CAAC,EAAI,EAAE,EAAE,AACN,EAAI,GAAG,CAAC,CADK,OACG,CAAC,EAC1B,qFC3Ce,CAAA,EADf,AACe,EADf,CAAA,CAAA,OACe,uBAAA,AAAuB,EAClC,WAAa,MAAM,AAAI,MAAM,2UAA6U,EAC1W,0GACA,gEAHW,CAAA,EAAA,AADf,EAAA,CAAA,CAAA,OACe,uBAAA,AAAuB,EAClC,WAAa,MAAM,AAAI,MAAM,uTAAyT,EACtV,sFACA,8GCLJ,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAKe,eAAe,EAAmB,CAC/C,QAAM,cACN,CAAY,CAIb,EACC,CAAA,EAAA,EAAA,gBAAA,AAAO,IAEP,GAAM,QAAE,CAAM,YAAE,CAAU,CAAE,CAAG,MAAM,EAE/B,EAAW,CADL,MAAM,GAAiB,EAAC,EAChB,KAAK,CACnB,EAAQ,MAAM,OAAO,CAAC,GAAY,CAAQ,CAAC,EAAE,CAAG,EAGtD,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,wCACb,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAqB,CAAA,CACpB,OAAQ,EACR,WAAY,EACZ,MAAiB,MAAV,EACP,eAAgB,MAAM,CAAA,EAAA,EAAA,eAAA,AAAe,EAAC,eAI9C,kCA5BuB,+BACG","ignoreList":[4]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[4730,a=>{a.v({name:"@jiggai/kitchen",version:"0.5.
|
|
1
|
+
module.exports=[4730,a=>{a.v({name:"@jiggai/kitchen",version:"0.5.12",main:"openclaw/index.ts",description:"ClawKitchen - Web-based dashboard for OpenClaw agent teams, workflows, and automation",author:"@rjdjohnston Β· rjdjohnston",license:"Apache-2.0",repository:{type:"git",url:"https://github.com/JIGGAI/clawkitchen.git"},keywords:["openclaw","clawkitchen","dashboard","agents","workflows","plugin"],openclaw:{extensions:["./openclaw/index.ts"],compat:{pluginApi:">=1.0.0",pluginApiRange:">=2026.3"},build:{openclawVersion:"2026.3.28"}},scripts:{dev:"next dev",build:"rm -rf .next && NODE_ENV=production next build",postbuild:"node scripts/copy-standalone-static.mjs",start:"next start",lint:"eslint",test:"vitest","test:run":"vitest run",coverage:"vitest run --coverage",check:"npm run lint && npm run test:run","dup:check":"jscpd src --min-tokens 50 --min-lines 10 --reporters html,console","refactor:report":"node scripts/refactor-report.mjs","smoke:goals":"node scripts/goals-smoke.mjs",prepare:"husky || true",prepack:"npm run -s sync:plugin-version && npm run -s check:plugin-version","sync:plugin-version":"node scripts/sync-openclaw-plugin-version.mjs","check:plugin-version":"node scripts/check-openclaw-plugin-version.mjs",prepublishOnly:"npm run -s sync:plugin-version && npm run -s check:plugin-version"},publishConfig:{access:"public"},files:["openclaw/","openclaw.plugin.json","README.md","LICENSE","next.config.ts","next-env.d.ts","tsconfig.json","public/",".next/BUILD_ID",".next/server/",".next/static/",".next/required-server-files.json",".next/required-server-files.js",".next/routes-manifest.json",".next/prerender-manifest.json",".next/build-manifest.json",".next/app-path-routes-manifest.json",".next/package.json"],dependencies:{"better-sqlite3":"^12.8.0","drizzle-kit":"^0.31.10","drizzle-orm":"^0.45.2",next:"16.1.6",react:"19.2.3","react-dom":"19.2.3","react-markdown":"^10.1.0","remark-gfm":"^4.0.1",yaml:"^2.8.2"},devDependencies:{"@tailwindcss/postcss":"^4","@testing-library/dom":"^10.4.1","@testing-library/react":"^16.3.2","@types/better-sqlite3":"^7.6.13","@types/node":"^20","@types/react":"^19","@types/react-dom":"^19","@vitejs/plugin-react":"^5.1.4","@vitest/coverage-v8":"^4.0.18",eslint:"^9","eslint-config-next":"16.1.6","eslint-plugin-sonarjs":"^4.0.0",husky:"^9.1.7",jscpd:"^4.0.8",jsdom:"^28.1.0","lint-staged":"^16.2.7",tailwindcss:"^4",typescript:"5.9.3","vite-tsconfig-paths":"^6.1.1",vitest:"^4.0.18"},"lint-staged":{"*.{ts,tsx}":"eslint --fix"}})},21133,a=>{"use strict";let b=String(a.i(4730).default.version??"");function c(){let a=b.trim();return a?`ClawKitchen (${a}-beta)`:"ClawKitchen"}a.s(["APP_VERSION",0,b,"getAppTitle",()=>c])},89578,a=>{a.v({className:"geist_a71539c9-module__T19VSG__className",variable:"geist_a71539c9-module__T19VSG__variable"})},35214,a=>{a.v({className:"geist_mono_8d43a2aa-module__8Li5zG__className",variable:"geist_mono_8d43a2aa-module__8Li5zG__variable"})},17917,a=>{"use strict";a.s(["AppShell",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AppShell() from the server but AppShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/AppShell.tsx <module evaluation>","AppShell")},43297,a=>{"use strict";a.s(["AppShell",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call AppShell() from the server but AppShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/components/AppShell.tsx","AppShell")},56935,a=>{"use strict";a.i(17917);var b=a.i(43297);a.n(b)},27572,a=>{"use strict";var b=a.i(7997),c=a.i(21133),d=a.i(89578);let e={className:d.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=d.default.variable&&(e.variable=d.default.variable);var f=a.i(35214);let g={className:f.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=f.default.variable&&(g.variable=f.default.variable);var h=a.i(56935);async function i(){return{title:(0,c.getAppTitle)(),description:"Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.",icons:{icon:[{url:"/favicon.ico",sizes:"any"},{url:"/favicon-16x16.png",sizes:"16x16",type:"image/png"},{url:"/favicon-32x32.png",sizes:"32x32",type:"image/png"}],apple:"/apple-touch-icon.png"}}}function j({children:a}){return(0,b.jsxs)("html",{lang:"en","data-theme":"dark",suppressHydrationWarning:!0,children:[(0,b.jsx)("head",{}),(0,b.jsx)("body",{suppressHydrationWarning:!0,className:`${e.variable} ${g.variable} antialiased`,children:(0,b.jsx)(h.AppShell,{children:a})})]})}a.s(["default",()=>j,"generateMetadata",()=>i],27572)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__3b880807._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/package.json","../../../../src/lib/app-info.ts","turbopack:///[next]/internal/font/google/geist_a71539c9.module.css [app-rsc] (css module)","turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.module.css [app-rsc] (css module)","../../../../src/components/AppShell.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/layout.tsx","turbopack:///[next]/internal/font/google/geist_a71539c9.js","turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.js"],"sourcesContent":["{\"name\":\"@jiggai/kitchen\",\"version\":\"0.5.
|
|
1
|
+
{"version":3,"sources":["turbopack:///[project]/package.json","../../../../src/lib/app-info.ts","turbopack:///[next]/internal/font/google/geist_a71539c9.module.css [app-rsc] (css module)","turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.module.css [app-rsc] (css module)","../../../../src/components/AppShell.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/layout.tsx","turbopack:///[next]/internal/font/google/geist_a71539c9.js","turbopack:///[next]/internal/font/google/geist_mono_8d43a2aa.js"],"sourcesContent":["{\"name\":\"@jiggai/kitchen\",\"version\":\"0.5.12\",\"main\":\"openclaw/index.ts\",\"description\":\"ClawKitchen - Web-based dashboard for OpenClaw agent teams, workflows, and automation\",\"author\":\"@rjdjohnston Β· rjdjohnston\",\"license\":\"Apache-2.0\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/JIGGAI/clawkitchen.git\"},\"keywords\":[\"openclaw\",\"clawkitchen\",\"dashboard\",\"agents\",\"workflows\",\"plugin\"],\"openclaw\":{\"extensions\":[\"./openclaw/index.ts\"],\"compat\":{\"pluginApi\":\">=1.0.0\",\"pluginApiRange\":\">=2026.3\"},\"build\":{\"openclawVersion\":\"2026.3.28\"}},\"scripts\":{\"dev\":\"next dev\",\"build\":\"rm -rf .next && NODE_ENV=production next build\",\"postbuild\":\"node scripts/copy-standalone-static.mjs\",\"start\":\"next start\",\"lint\":\"eslint\",\"test\":\"vitest\",\"test:run\":\"vitest run\",\"coverage\":\"vitest run --coverage\",\"check\":\"npm run lint && npm run test:run\",\"dup:check\":\"jscpd src --min-tokens 50 --min-lines 10 --reporters html,console\",\"refactor:report\":\"node scripts/refactor-report.mjs\",\"smoke:goals\":\"node scripts/goals-smoke.mjs\",\"prepare\":\"husky || true\",\"prepack\":\"npm run -s sync:plugin-version && npm run -s check:plugin-version\",\"sync:plugin-version\":\"node scripts/sync-openclaw-plugin-version.mjs\",\"check:plugin-version\":\"node scripts/check-openclaw-plugin-version.mjs\",\"prepublishOnly\":\"npm run -s sync:plugin-version && npm run -s check:plugin-version\"},\"publishConfig\":{\"access\":\"public\"},\"files\":[\"openclaw/\",\"openclaw.plugin.json\",\"README.md\",\"LICENSE\",\"next.config.ts\",\"next-env.d.ts\",\"tsconfig.json\",\"public/\",\".next/BUILD_ID\",\".next/server/\",\".next/static/\",\".next/required-server-files.json\",\".next/required-server-files.js\",\".next/routes-manifest.json\",\".next/prerender-manifest.json\",\".next/build-manifest.json\",\".next/app-path-routes-manifest.json\",\".next/package.json\"],\"dependencies\":{\"better-sqlite3\":\"^12.8.0\",\"drizzle-kit\":\"^0.31.10\",\"drizzle-orm\":\"^0.45.2\",\"next\":\"16.1.6\",\"react\":\"19.2.3\",\"react-dom\":\"19.2.3\",\"react-markdown\":\"^10.1.0\",\"remark-gfm\":\"^4.0.1\",\"yaml\":\"^2.8.2\"},\"devDependencies\":{\"@tailwindcss/postcss\":\"^4\",\"@testing-library/dom\":\"^10.4.1\",\"@testing-library/react\":\"^16.3.2\",\"@types/better-sqlite3\":\"^7.6.13\",\"@types/node\":\"^20\",\"@types/react\":\"^19\",\"@types/react-dom\":\"^19\",\"@vitejs/plugin-react\":\"^5.1.4\",\"@vitest/coverage-v8\":\"^4.0.18\",\"eslint\":\"^9\",\"eslint-config-next\":\"16.1.6\",\"eslint-plugin-sonarjs\":\"^4.0.0\",\"husky\":\"^9.1.7\",\"jscpd\":\"^4.0.8\",\"jsdom\":\"^28.1.0\",\"lint-staged\":\"^16.2.7\",\"tailwindcss\":\"^4\",\"typescript\":\"5.9.3\",\"vite-tsconfig-paths\":\"^6.1.1\",\"vitest\":\"^4.0.18\"},\"lint-staged\":{\"*.{ts,tsx}\":\"eslint --fix\"}}","import pkg from \"../../package.json\";\n\n// Loaded once at module init (cached by Node/Next). Avoids per-render disk reads.\nexport const APP_VERSION = String((pkg as { version?: string }).version ?? \"\");\n\nexport function getAppTitle(): string {\n const v = APP_VERSION.trim();\n return v ? `ClawKitchen (${v}-beta)` : \"ClawKitchen\";\n}\n","__turbopack_context__.v({\n \"className\": \"geist_a71539c9-module__T19VSG__className\",\n \"variable\": \"geist_a71539c9-module__T19VSG__variable\",\n});\n","__turbopack_context__.v({\n \"className\": \"geist_mono_8d43a2aa-module__8Li5zG__className\",\n \"variable\": \"geist_mono_8d43a2aa-module__8Li5zG__variable\",\n});\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const AppShell = registerClientReference(\n function() { throw new Error(\"Attempted to call AppShell() from the server but AppShell is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/components/AppShell.tsx\",\n \"AppShell\",\n);\n","import type { Metadata } from \"next\";\nimport { getAppTitle } from \"@/lib/app-info\";\nimport { Geist, Geist_Mono } from \"next/font/google\";\nimport \"./globals.css\";\nimport { AppShell } from \"@/components/AppShell\";\n\nconst geistSans = Geist({\n variable: \"--font-geist-sans\",\n subsets: [\"latin\"],\n});\n\nconst geistMono = Geist_Mono({\n variable: \"--font-geist-mono\",\n subsets: [\"latin\"],\n});\n\nexport async function generateMetadata(): Promise<Metadata> {\n return {\n title: getAppTitle(),\n description: \"Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.\",\n icons: {\n icon: [\n { url: \"/favicon.ico\", sizes: \"any\" },\n { url: \"/favicon-16x16.png\", sizes: \"16x16\", type: \"image/png\" },\n { url: \"/favicon-32x32.png\", sizes: \"32x32\", type: \"image/png\" },\n ],\n apple: \"/apple-touch-icon.png\",\n },\n };\n}\n\nexport default function RootLayout({\n children,\n}: Readonly<{\n children: React.ReactNode;\n}>) {\n return (\n <html lang=\"en\" data-theme=\"dark\" suppressHydrationWarning>\n <head />\n <body\n suppressHydrationWarning\n className={`${geistSans.variable} ${geistMono.variable} antialiased`}\n >\n <AppShell>{children}</AppShell>\n </body>\n </html>\n );\n}\n","import cssModule from \"@vercel/turbopack-next/internal/font/google/cssmodule.module.css?{%22path%22:%22layout.tsx%22,%22import%22:%22Geist%22,%22arguments%22:[{%22variable%22:%22--font-geist-sans%22,%22subsets%22:[%22latin%22]}],%22variableName%22:%22geistSans%22}\";\nconst fontData = {\n className: cssModule.className,\n style: {\n fontFamily: \"'Geist', 'Geist Fallback'\",\n fontStyle: \"normal\",\n\n },\n};\n\nif (cssModule.variable != null) {\n fontData.variable = cssModule.variable;\n}\n\nexport default fontData;\n","import cssModule from \"@vercel/turbopack-next/internal/font/google/cssmodule.module.css?{%22path%22:%22layout.tsx%22,%22import%22:%22Geist_Mono%22,%22arguments%22:[{%22variable%22:%22--font-geist-mono%22,%22subsets%22:[%22latin%22]}],%22variableName%22:%22geistMono%22}\";\nconst fontData = {\n className: cssModule.className,\n style: {\n fontFamily: \"'Geist Mono', 'Geist Mono Fallback'\",\n fontStyle: \"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CACJ,CAAE,IAAK,eAAgB,MAAO,KAAM,EACpC,CAAE,IAAK,qBAAsB,MAAO,QAAS,KAAM,WAAY,EAC/D,CAAE,IAAK,qBAAsB,MAAO,QAAS,KAAM,WAAY,EAChE,CACD,MAAO,uBACT,CACF,CACF,CAEe,SAAS,EAAW,UACjC,CAAQ,CAGR,EACA,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,OAAA,CAAK,KAAK,KAAK,aAAW,OAAO,wBAAwB,CAAA,CAAA,YACxD,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAA,GACD,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CACC,wBAAwB,CAAA,CAAA,EACxB,UAAW,CAAA,EC3BJ,AD2BO,EAAU,QAAQ,CAAC,CAAC,EE3B3B,AF2B6B,EAAU,QAAQ,CAAC,YAAY,CAAC,UAEpE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,QAAQ,CAAA,UAAE,QAInB","ignoreList":[2,3,4,6,7]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},28215,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227);async function e(){let a=d.default.join(c.default.homedir(),".openclaw","openclaw.json");return JSON.parse(await b.default.readFile(a,"utf8"))}async function f(){let a=await e(),b=a.agents?.defaults?.workspace;if(!b)throw Error("agents.defaults.workspace is not set in ~/.openclaw/openclaw.json");return b}async function g(a){let b=c.default.homedir();if(!b)throw Error("Could not resolve home directory");return d.default.join(b,".openclaw",`workspace-${a}`)}a.s(["getTeamWorkspaceDir",()=>g,"getWorkspaceDir",()=>f])},83643,a=>{"use strict";var b=a.i(74533);let c=(0,a.i(12057).promisify)(b.execFile);function d(a){return"string"==typeof a.stdout?a.stdout:a.stdout&&"object"==typeof a.stdout&&"toString"in a.stdout?String(a.stdout.toString()):""}function e(a,b){return"string"==typeof a.stderr?a.stderr:a.stderr&&"object"==typeof a.stderr&&"toString"in a.stderr?String(a.stderr.toString()):"string"==typeof a.message?a.message:String(b)}function f(a){let b=a.trim();if(!b)return a;let c=b[0];if("["===c||"{"===c||'"'===c)return a;let d=b.split("\n"),e=d.findIndex(a=>/^\s*[[\{"]/.test(a));if(e>0){let a=d.slice(e).join("\n");try{return JSON.parse(a),a}catch{}}return a}async function g(a,b={}){let{sanitizeStdout:h=!0}=b;try{process.platform;let b=await c("openclaw",a,{timeout:12e4,windowsHide:!0,maxBuffer:0xa00000}),d=String(b.stdout??"");return{ok:!0,exitCode:0,stdout:h?f(d):d,stderr:String(b.stderr??"")}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}function h(a){let b=a.trim();if(!b)return null;try{return JSON.parse(b)}catch{}let c=b.split("\n"),d=c.findIndex(a=>/^\s*[[\{]/.test(a));if(d>=0){let a=c.slice(d).join("\n");try{return JSON.parse(a)}catch{}}for(let a=c.length-1;a>=0;a--)if(/^\s*[\]}]/.test(c[a])){for(let b=a;b>=0;b--)if(/^\s*[[\{]/.test(c[b]))try{return JSON.parse(c.slice(b,a+1).join("\n"))}catch{}}return null}async function i(a){return g(a,{sanitizeStdout:!1})}async function j(a){if("cron"===a[0]||"recipes"===a[0]&&"workflows"===a[1]&&["runner-once","runner-tick","worker-tick"].includes(a[2]))return g(a);let b=function(){let a=globalThis.__clawkitchen_api;if(!a)throw Error("ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)");return a}();try{let c=await b.runtime.system.runCommandWithTimeout(["openclaw",...a],{timeoutMs:12e4}),d=f(String(c.stdout??"")),e=String(c.stderr??""),g="number"==typeof c.exitCode?c.exitCode:"number"==typeof c.code?c.code:"number"==typeof c.status?c.status:0;if(0!==g)return{ok:!1,exitCode:g,stdout:d,stderr:e};return{ok:!0,exitCode:0,stdout:d,stderr:e}}catch(b){let a="number"==typeof b.code?b.code:1;return{ok:!1,exitCode:a,stdout:d(b),stderr:e(b,b)}}}a.s(["extractJson",()=>h,"runOpenClaw",()=>j,"runOpenClawRaw",()=>i],83643)},45818,a=>{"use strict";var b=a.i(83643);let c=new Map,d=new Map;async function e(a,f={}){let g=f.ttlMs??3e4,h=JSON.stringify(a),i=c.get(h);if(i&&Date.now()<i.expires)return i.value;let j=d.get(h);if(j)return j;let k=(async()=>{try{let d=await (0,b.runOpenClaw)(a);return d.ok&&c.set(h,{value:d,expires:Date.now()+g}),d}finally{d.delete(h)}})();return d.set(h,k),k}a.s(["cachedRunOpenClaw",()=>e])},88241,9444,a=>{"use strict";var b=a.i(12714),c=a.i(50227),d=a.i(28215);a.s([],9444);let e=c.default.join("shared-context","workflows");function f(a){let b=String(a??"").trim();if(!b)throw Error("workflow id is required");if(!/^[a-z0-9][a-z0-9-]{0,62}$/.test(b))throw Error("Invalid workflow id. Use lowercase letters, numbers, and dashes (max 63 chars), e.g. marketing-cadence-v1");return b}async function g(a){let b=await (0,d.getTeamWorkspaceDir)(a);return c.default.join(b,e)}async function h(a,d){let e=f(d),h=await g(a),i=c.default.join(h,`${e}.workflow.json`),j=JSON.parse(await b.default.readFile(i,"utf8"));return{ok:!0,path:i,workflow:j}}a.s(["assertSafeWorkflowId",()=>f,"readWorkflow",()=>h],88241)},72660,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/deliverables/deliverables-client.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/deliverables/deliverables-client.tsx <module evaluation>","default")},93233,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/deliverables/deliverables-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/deliverables/deliverables-client.tsx","default")},80093,a=>{"use strict";a.i(72660);var b=a.i(93233);a.n(b)},67958,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(18558),e=a.i(80093),f=a.i(15629),g=a.i(88241);async function h({params:a}){(0,d.unstable_noStore)();let{teamId:h}=await a,i=await (0,f.getTeamDisplayName)(h),j=process.env.KITCHEN_INTERNAL_URL||"http://localhost:3000",k=await fetch(`${j}/api/teams/workflow-deliverables?teamId=${encodeURIComponent(h)}`,{cache:"no-store"});if(!k.ok)return(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Deliverables"}),(0,b.jsxs)("div",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:[i||h," Β· ",(0,b.jsx)("span",{className:"font-mono",children:h})]})]}),(0,b.jsxs)("div",{className:"rounded-3xl border border-red-400/30 bg-red-500/10 p-4",children:[(0,b.jsx)("div",{className:"text-red-50",children:"Failed to load deliverables"}),(0,b.jsxs)("div",{className:"mt-1 text-sm text-red-200",children:["Error: ",k.status," ",k.statusText]})]})]});let l=await k.json();if(!l.ok)return(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Deliverables"}),(0,b.jsxs)("div",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:[i||h," Β· ",(0,b.jsx)("span",{className:"font-mono",children:h})]})]}),(0,b.jsxs)("div",{className:"rounded-3xl border border-red-400/30 bg-red-500/10 p-4",children:[(0,b.jsx)("div",{className:"text-red-50",children:"Failed to load deliverables"}),(0,b.jsx)("div",{className:"mt-1 text-sm text-red-200",children:l.error||"Unknown error"})]})]});let m=Array.from(new Set(l.deliverables.map(a=>a.workflowId).filter(Boolean))).sort(),n={};return await Promise.all(m.map(async a=>{try{let{workflow:b}=await (0,g.readWorkflow)(h,a);n[a]={id:b.id,name:b.name}}catch{n[a]={id:a}}})),(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:"Deliverables"}),(0,b.jsxs)("div",{className:"mt-1 text-sm text-[color:var(--ck-text-secondary)]",children:[i||h," Β· ",(0,b.jsx)("span",{className:"font-mono",children:h})]}),(0,b.jsx)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:"Browse and access outputs from completed workflow runs"})]}),(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(c.default,{href:`/teams/${encodeURIComponent(h)}/workflows`,className:"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline",children:"Workflows β"}),(0,b.jsx)(c.default,{href:`/runs?team=${encodeURIComponent(h)}`,className:"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline",children:"Runs β"})]})]}),(0,b.jsx)(e.default,{teamId:h,deliverables:l.deliverables,workflows:n})]})}a.s(["default",()=>h,"dynamic",0,"force-dynamic","revalidate",0,0])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__52cb8e0e._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/next/dist/client/app-dir/link.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../node_modules/next/src/client/app-dir/link.react-server.tsx","../../../../src/lib/paths.ts","../../../../src/lib/kitchen-api.ts","../../../../src/lib/openclaw.ts","../../../../src/lib/openclaw-cache.ts","../../../../src/lib/workflows/storage.ts","../../../../src/lib/workflows/readdir.ts","../../../../src/app/teams/%5BteamId%5D/deliverables/deliverables-client.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/deliverables/page.tsx"],"sourcesContent":["// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/app-dir/link.js\"));\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browserβs default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browserβs default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import type { ComponentProps } from 'react'\nimport ClientLinkComponent, { type LinkProps, useLinkStatus } from './link'\n\nexport default function LinkComponent(\n props: ComponentProps<typeof ClientLinkComponent>\n) {\n const isLegacyBehavior = props.legacyBehavior\n const childIsHostComponent =\n typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n typeof (props.children as any)?.type === 'string'\n const childIsClientComponent =\n (props.children as any)?.type?.$$typeof ===\n Symbol.for('react.client.reference')\n\n if (isLegacyBehavior && !childIsHostComponent && !childIsClientComponent) {\n if ((props.children as any)?.type?.$$typeof === Symbol.for('react.lazy')) {\n console.error(\n `Using a Lazy Component as a direct child of \\`<Link legacyBehavior>\\` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n } else {\n console.error(\n `Using a Server Component as a direct child of \\`<Link legacyBehavior>\\` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n }\n\n return <ClientLinkComponent {...props} />\n}\n\nexport { type LinkProps, useLinkStatus }\n","import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\ntype OpenClawConfig = {\n agents?: { defaults?: { workspace?: string } };\n gateway?: { port?: number; auth?: { token?: string } };\n tools?: {\n agentToAgent?: {\n enabled?: boolean;\n allow?: string[];\n };\n };\n plugins?: {\n installs?: { recipes?: { installPath?: string; sourcePath?: string } };\n load?: { paths?: string[] };\n };\n // OpenClaw message routing bindings (used for HITL approvals, etc.)\n bindings?: unknown[];\n};\n\nexport async function readOpenClawConfig(): Promise<OpenClawConfig> {\n const p = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");\n const text = await fs.readFile(p, \"utf8\");\n return JSON.parse(text) as OpenClawConfig;\n}\n\nexport async function getWorkspaceDir() {\n const cfg = await readOpenClawConfig();\n const ws = cfg.agents?.defaults?.workspace;\n if (!ws) throw new Error(\"agents.defaults.workspace is not set in ~/.openclaw/openclaw.json\");\n return ws;\n}\n\nexport async function getWorkspaceRecipesDir() {\n const ws = await getWorkspaceDir();\n return path.join(ws, \"recipes\");\n}\n\nexport async function getWorkspaceGoalsDir() {\n const ws = await getWorkspaceDir();\n\n // Back-compat: some installs keep goals at <workspace>/goals.\n // Prefer that when present, otherwise fall back to <workspace>/notes/goals.\n const direct = path.join(ws, \"goals\");\n try {\n const st = await fs.stat(direct);\n if (st.isDirectory()) return direct;\n } catch {\n // ignore\n }\n\n return path.join(ws, \"notes\", \"goals\");\n}\n\nexport async function getTeamWorkspaceDir(teamId: string) {\n const home = os.homedir();\n if (!home) throw new Error(\"Could not resolve home directory\");\n return path.join(home, \".openclaw\", `workspace-${teamId}`);\n}\n\n/** Team workspace dir derived from agents.defaults.workspace (sibling: .. / workspace-{teamId}) */\nexport function teamDirFromBaseWorkspace(baseWorkspace: string, teamId: string) {\n // Special-case: treat \"main\" as the personal workspace (agents.defaults.workspace).\n // This lets Kitchen expose a selectable \"main\" scope without creating a separate\n // ~/.openclaw/workspace-main folder.\n if (teamId === \"main\") return path.resolve(baseWorkspace);\n return path.resolve(baseWorkspace, \"..\", `workspace-${teamId}`);\n}\n\n/** Rejects path traversal and empty names; returns normalized name. */\nexport function assertSafeRelativeFileName(name: string): string {\n const n = name.replace(/\\\\/g, \"/\");\n if (!n || n.startsWith(\"/\") || n.includes(\"..\")) throw new Error(\"Invalid file name\");\n return n;\n}\n\nexport async function getBuiltinRecipesDir() {\n const cfg = await readOpenClawConfig();\n const p =\n cfg.plugins?.installs?.recipes?.installPath ||\n cfg.plugins?.installs?.recipes?.sourcePath ||\n cfg.plugins?.load?.paths?.[0];\n if (!p) throw new Error(\"Could not determine recipes plugin install path from ~/.openclaw/openclaw.json\");\n return path.join(p, \"recipes\", \"default\");\n}\n","// NOTE: This file is compiled by Next.js.\n// Do not import `openclaw/plugin-sdk` here (it is provided by the gateway runtime, not as an npm dep).\n\ntype KitchenApi = {\n config: unknown;\n runtime: {\n system: { runCommandWithTimeout: (argv: string[], opts: { timeoutMs: number }) => Promise<{ stdout?: string; stderr?: string }> };\n };\n};\n\nexport function getKitchenApi(): KitchenApi {\n const api = (globalThis as unknown as { __clawkitchen_api?: KitchenApi }).__clawkitchen_api;\n if (!api) {\n throw new Error(\n \"ClawKitchen: OpenClaw plugin API not available. (This should only happen if Kitchen is started outside the gateway process.)\",\n );\n }\n return api;\n}\n","import { getKitchenApi } from \"@/lib/kitchen-api\";\nimport { execFile } from \"node:child_process\";\nimport { promisify } from \"node:util\";\n\nconst execFileAsync = promisify(execFile);\n\nexport type OpenClawExecResult = {\n ok: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n};\n\nfunction extractStdout(err: { stdout?: unknown }): string {\n if (typeof err.stdout === \"string\") return err.stdout;\n if (err.stdout && typeof err.stdout === \"object\" && \"toString\" in err.stdout) {\n return String((err.stdout as { toString: () => string }).toString());\n }\n return \"\";\n}\n\nfunction resolveExitCode(res: { exitCode?: unknown; code?: unknown; status?: unknown }): number {\n if (typeof res.exitCode === \"number\") return res.exitCode;\n if (typeof res.code === \"number\") return res.code;\n if (typeof res.status === \"number\") return res.status;\n return 0;\n}\n\nfunction extractStderr(err: { stderr?: unknown; message?: unknown }, fallback: unknown): string {\n if (typeof err.stderr === \"string\") return err.stderr;\n if (err.stderr && typeof err.stderr === \"object\" && \"toString\" in err.stderr) {\n return String((err.stderr as { toString: () => string }).toString());\n }\n if (typeof err.message === \"string\") return err.message;\n return String(fallback);\n}\n\n/**\n * Strip non-JSON diagnostic lines from stdout.\n *\n * OpenClaw may print plugin/doctor/diagnostic lines to stdout before the\n * actual JSON payload (e.g. \"[doctor] ...\", \"[plugins] ...\", \"π¦ OpenClaw ...\").\n * This breaks callers that do JSON.parse(stdout).\n *\n * If stdout looks like it contains a JSON payload with leading noise, strip the\n * noise lines. Otherwise return as-is (non-JSON commands like `config get` may\n * return plain text).\n */\nfunction sanitizeStdout(raw: string): string {\n const trimmed = raw.trim();\n if (!trimmed) return raw;\n\n // Fast path: already starts with JSON\n const firstChar = trimmed[0];\n if (firstChar === \"[\" || firstChar === \"{\" || firstChar === '\"') return raw;\n\n // Look for the first line starting with a JSON token\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{\"]/.test(l));\n if (jsonStartIdx > 0) {\n // Verify the remainder is valid JSON before stripping\n const candidate = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n JSON.parse(candidate);\n return candidate;\n } catch {\n // Not valid JSON after stripping β return original\n }\n }\n\n return raw;\n}\n\nasync function runOpenClawLocal(args: string[], options: { sanitizeStdout?: boolean } = {}): Promise<OpenClawExecResult> {\n const { sanitizeStdout: shouldSanitize = true } = options;\n \n try {\n const isWindows = process.platform === \"win32\";\n const res = await execFileAsync(\"openclaw\", args, {\n timeout: 120000,\n windowsHide: true,\n maxBuffer: 10 * 1024 * 1024,\n // Windows requires shell:true to resolve executables on PATH via PATHEXT.\n // Without it, execFile throws ENOENT even when openclaw is installed globally.\n ...(isWindows ? { shell: true } : {}),\n });\n\n const rawStdout = String(res.stdout ?? \"\");\n \n return {\n ok: true,\n exitCode: 0,\n stdout: shouldSanitize ? sanitizeStdout(rawStdout) : rawStdout,\n stderr: String(res.stderr ?? \"\"),\n };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n\n/**\n * Extract a JSON payload from stdout that may contain non-JSON diagnostic lines\n * (e.g. [doctor], [plugins], [recipes] log lines before the actual JSON).\n * Returns the parsed value or null if no JSON found.\n */\nexport function extractJson<T = unknown>(stdout: string): T | null {\n const trimmed = stdout.trim();\n if (!trimmed) return null;\n\n // Fast path: pure JSON\n try {\n return JSON.parse(trimmed) as T;\n } catch {\n // fall through\n }\n\n // Find the first line starting with [ or { (JSON array/object)\n const lines = trimmed.split(\"\\n\");\n const jsonStartIdx = lines.findIndex((l) => /^\\s*[[\\{]/.test(l));\n if (jsonStartIdx >= 0) {\n const jsonSlice = lines.slice(jsonStartIdx).join(\"\\n\");\n try {\n return JSON.parse(jsonSlice) as T;\n } catch {\n // fall through\n }\n }\n\n // Last resort: find the last JSON block (scan from end)\n for (let i = lines.length - 1; i >= 0; i--) {\n if (/^\\s*[\\]}]/.test(lines[i])) {\n // Walk backward to find the matching open\n for (let j = i; j >= 0; j--) {\n if (/^\\s*[[\\{]/.test(lines[j])) {\n try {\n return JSON.parse(lines.slice(j, i + 1).join(\"\\n\")) as T;\n } catch {\n // continue searching\n }\n }\n }\n }\n }\n\n return null;\n}\n\n/**\n * Run OpenClaw without stdout sanitization (for raw text output like recipe markdown)\n */\nexport async function runOpenClawRaw(args: string[]): Promise<OpenClawExecResult> {\n // Always use local exec for raw content to avoid Kitchen runtime restrictions\n return runOpenClawLocal(args, { sanitizeStdout: false });\n}\n\nexport async function runOpenClaw(args: string[]): Promise<OpenClawExecResult> {\n // In some Kitchen runtime contexts, `api.runtime.system.runCommandWithTimeout`\n // is executed with a restricted allowlist that does not include the `cron` tool,\n // causing `openclaw cron ...` to fail with \"Tool not available: cron\".\n //\n // Cron routes need to work in the gateway-run Kitchen environment, so for cron\n // specifically we prefer a local exec (host OpenClaw).\n if (args[0] === \"cron\") return runOpenClawLocal(args);\n\n // Workflow runner/worker commands are long-running orchestration processes that\n // acquire locks and claims. The runtime command wrapper (runCommandWithTimeout)\n // has a 120s hard timeout that can kill these mid-execution, orphaning locks and\n // leaving runs stuck in waiting_workers. Route them through local exec instead.\n if (\n args[0] === \"recipes\" &&\n args[1] === \"workflows\" &&\n [\"runner-once\", \"runner-tick\", \"worker-tick\"].includes(args[2])\n ) {\n return runOpenClawLocal(args);\n }\n\n const api = getKitchenApi();\n try {\n const res = (await api.runtime.system.runCommandWithTimeout([\"openclaw\", ...args], { timeoutMs: 120000 })) as {\n stdout?: unknown;\n stderr?: unknown;\n exitCode?: unknown;\n code?: unknown;\n status?: unknown;\n };\n\n const stdout = sanitizeStdout(String(res.stdout ?? \"\"));\n const stderr = String(res.stderr ?? \"\");\n const exitCode = resolveExitCode(res);\n\n if (exitCode !== 0) return { ok: false, exitCode, stdout, stderr };\n return { ok: true, exitCode: 0, stdout, stderr };\n } catch (e: unknown) {\n const err = e as { code?: unknown; stdout?: unknown; stderr?: unknown; message?: unknown };\n const exitCode = typeof err.code === \"number\" ? err.code : 1;\n const stdout = extractStdout(err);\n const stderr = extractStderr(err, e);\n return { ok: false, exitCode, stdout, stderr };\n }\n}\n","import { runOpenClaw, type OpenClawExecResult } from \"@/lib/openclaw\";\n\n// `openclaw <cmd>` invocations spawn a subprocess that pays a fixed startup\n// cost (~15-20s on this machine). Server components that read configuration\n// β agents list, recipes list, plugins list β call these on every render,\n// including each 3s `router.refresh()` poll on live pages, blocking the page\n// behind that subprocess.\n//\n// This helper memoizes successful results by argv key for a short window so\n// renders return fast. Concurrent callers share one in-flight subprocess\n// instead of spawning duplicates. Only successful results are cached so a\n// transient failure won't stick. Callers that mutate state (cron rm, recipes\n// delete, etc.) and routes that need fresh post-mutation reads should use\n// `runOpenClaw` directly instead.\n\nconst DEFAULT_TTL_MS = 30_000;\n\nconst cache = new Map<string, { value: OpenClawExecResult; expires: number }>();\nconst inflight = new Map<string, Promise<OpenClawExecResult>>();\n\nexport async function cachedRunOpenClaw(\n args: string[],\n options: { ttlMs?: number } = {}\n): Promise<OpenClawExecResult> {\n const ttl = options.ttlMs ?? DEFAULT_TTL_MS;\n const key = JSON.stringify(args);\n const cached = cache.get(key);\n if (cached && Date.now() < cached.expires) return cached.value;\n const existing = inflight.get(key);\n if (existing) return existing;\n const promise = (async () => {\n try {\n const value = await runOpenClaw(args);\n if (value.ok) cache.set(key, { value, expires: Date.now() + ttl });\n return value;\n } finally {\n inflight.delete(key);\n }\n })();\n inflight.set(key, promise);\n return promise;\n}\n\n/**\n * Invalidate one or more cached entries by argv. Mutation routes (e.g.\n * `cron rm`, `cron enable`) call this after a successful write so the next\n * read returns fresh data instead of waiting for the TTL to expire.\n *\n * Each argv is matched as a prefix: `invalidateOpenClawCache([\"cron\"])` clears\n * every cached `openclaw cron *` call. Pass an exact argv to scope tightly.\n */\nexport function invalidateOpenClawCache(...argvs: string[][]): void {\n for (const argv of argvs) {\n const prefix = JSON.stringify(argv).replace(/\\]$/, \"\");\n for (const key of cache.keys()) {\n if (key === JSON.stringify(argv) || key.startsWith(prefix)) cache.delete(key);\n }\n for (const key of inflight.keys()) {\n if (key === JSON.stringify(argv) || key.startsWith(prefix)) inflight.delete(key);\n }\n }\n}\n\n/** Test-only: clear all cached subprocess results. */\nexport function _resetOpenClawCache() {\n cache.clear();\n inflight.clear();\n}\n","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","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/teams/[teamId]/deliverables/deliverables-client.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/teams/[teamId]/deliverables/deliverables-client.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport DeliverablesClient from \"./deliverables-client\";\nimport { getTeamDisplayName } from \"@/lib/recipes\";\nimport { readWorkflow } from \"@/lib/workflows/storage\";\nimport type { WorkflowDeliverablesResponse } from \"@/app/api/teams/workflow-deliverables/route\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function TeamDeliverablesPage({\n params,\n}: {\n params: Promise<{ teamId: string }>;\n}) {\n noStore();\n\n const { teamId } = await params;\n const teamName = await getTeamDisplayName(teamId);\n\n // Fetch deliverables from our API\n const baseUrl = process.env.KITCHEN_INTERNAL_URL || \"http://localhost:3000\";\n const response = await fetch(`${baseUrl}/api/teams/workflow-deliverables?teamId=${encodeURIComponent(teamId)}`, {\n cache: \"no-store\",\n });\n\n if (!response.ok) {\n return (\n <div className=\"flex flex-col gap-4\">\n <div>\n <h1 className=\"text-2xl font-semibold tracking-tight\">Deliverables</h1>\n <div className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n {teamName || teamId} Β· <span className=\"font-mono\">{teamId}</span>\n </div>\n </div>\n \n <div className=\"rounded-3xl border border-red-400/30 bg-red-500/10 p-4\">\n <div className=\"text-red-50\">Failed to load deliverables</div>\n <div className=\"mt-1 text-sm text-red-200\">\n Error: {response.status} {response.statusText}\n </div>\n </div>\n </div>\n );\n }\n\n const data = await response.json() as WorkflowDeliverablesResponse;\n \n if (!data.ok) {\n return (\n <div className=\"flex flex-col gap-4\">\n <div>\n <h1 className=\"text-2xl font-semibold tracking-tight\">Deliverables</h1>\n <div className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n {teamName || teamId} Β· <span className=\"font-mono\">{teamId}</span>\n </div>\n </div>\n \n <div className=\"rounded-3xl border border-red-400/30 bg-red-500/10 p-4\">\n <div className=\"text-red-50\">Failed to load deliverables</div>\n <div className=\"mt-1 text-sm text-red-200\">\n {(data as { error?: string }).error || \"Unknown error\"}\n </div>\n </div>\n </div>\n );\n }\n\n // Load workflow metadata for better display\n const wfIds = Array.from(new Set(data.deliverables.map((d) => d.workflowId).filter(Boolean))).sort();\n const workflows: Record<string, { id: string; name?: string }> = {};\n await Promise.all(\n wfIds.map(async (id) => {\n try {\n const { workflow } = await readWorkflow(teamId, id);\n workflows[id] = { id: workflow.id, name: workflow.name };\n } catch {\n workflows[id] = { id };\n }\n })\n );\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div>\n <h1 className=\"text-2xl font-semibold tracking-tight\">Deliverables</h1>\n <div className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n {teamName || teamId} Β· <span className=\"font-mono\">{teamId}</span>\n </div>\n <div className=\"mt-1 text-xs text-[color:var(--ck-text-tertiary)]\">\n Browse and access outputs from completed workflow runs\n </div>\n </div>\n\n <div className=\"flex items-center gap-3\">\n <Link\n href={`/teams/${encodeURIComponent(teamId)}/workflows`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n Workflows β\n </Link>\n <Link\n href={`/runs?team=${encodeURIComponent(teamId)}`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n Runs β\n </Link>\n </div>\n </div>\n\n <DeliverablesClient \n teamId={teamId} \n deliverables={data.deliverables} \n workflows={workflows}\n />\n </div>\n );\n}"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","as","linkInstanceRef","replace","scroll","onNavigate","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","useMemo","resolvedHref","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","undefined","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext","__NEXT_CACHE_COMPONENTS","Full","isLegacyBehavior","childIsHostComponent","childIsClientComponent","error","ClientLinkComponent"],"mappings":"6yBACA,GAAM,CAAE,yBAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CAAC,CAAC,EAAwB,iGAFhD,GAAM,yBAAE,CAAuB,CAAE,CAAA,EAAA,CAAA,CAAA,OAEjC,EAAsB,CAAC,CAAC,EAAwB,2MEAhD,OAyBC,CAAA,kBAzBuBA,GA2BCC,aAAa,CAAA,kBAAbA,EAAAA,aAAa,2GA7B6B,CAAA,CAAA,IAAA,IAEpD,SAASD,EACtBuC,CAAiD,EAEjD,IAAMkG,EAAmBlG,EAAMmB,cAAc,CACvCgF,EACsB,UAA1B,OAAOnG,EAAMK,QAAQ,EACK,UAA1B,OAAOL,EAAMK,QAAQ,EACoB,UAAzC,OAAQL,EAAMK,QAAQ,EAAUkE,KAC5B6B,EACHpG,EAAMK,QAAQ,EAAUkE,MAAMR,WAC/BC,OAAOC,GAAG,CAAC,0BAcb,OAZIiC,AAYJ,GAZyBC,GAAyBC,IAC3CpG,CAWP,CAXaK,QADW,AACH,EAAUkE,KADkB,CACZR,EADqC,SACxBC,OAAOC,GAAG,CAAC,cACzDC,CADwE,OAChEmC,KAAK,CACX,CAAC,8NAGHnC,CAHkO,CAAC,MAG3NmC,KAAK,CACX,CAAC,2MAA2M,AAK3M,CAL4M,AAK5M,EAAA,EAAA,GAAA,EAACC,EAAAA,OAAmB,CAAA,CAAE,GAAGtG,CAAK,EACvC,gPC5BA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,O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AAC,WAAW,EAAE,mBAAmB,GAAA,CAAS,CAChD,UAAU,qFACX,iBAML,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAkB,CAAA,CACjB,OAAQ,EACR,aAAc,EAAK,YAAY,CAC/B,UAAW,MAInB,kCA/GuB,+BACG","ignoreList":[0,2,9]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module.exports=[50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},74621,a=>{"use strict";function b(a){return a instanceof Error?a.message:String(a)}a.s(["errorMessage",()=>b])},66063,a=>{"use strict";var b=a.i(87924),c=a.i(35112);function d({open:a,onClose:d,title:e,children:f,error:g,confirmLabel:h,confirmBusyLabel:i,onConfirm:j,confirmDisabled:k,busy:l,confirmButtonClassName:m}){if(!a)return null;let n=l??!1,o=n&&i?i:h,p="confirmation-modal-title";return(0,c.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,b.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:d,"aria-hidden":"true"}),(0,b.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":p,children:(0,b.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,b.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-5 shadow-[var(--ck-shadow-2)]",children:[(0,b.jsx)("h2",{id:p,className:"text-lg font-semibold text-[color:var(--ck-text-primary)]",children:e}),f,g?(0,b.jsx)("div",{className:"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100",children:g}):null,(0,b.jsxs)("div",{className:"mt-6 flex items-center justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",onClick:d,className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Cancel"}),(0,b.jsx)("button",{type:"button",disabled:(k??!1)||n,onClick:j,className:m??"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50",children:o})]})]})})})]}),document.body)}a.s(["ConfirmationModal",()=>d])},88764,a=>{"use strict";var b=a.i(87924),c=a.i(66063);function d({open:a,onClose:d,title:e,entityLabel:f,bodyText:g,onConfirm:h,busy:i,error:j}){return(0,b.jsx)(c.ConfirmationModal,{open:a,onClose:d,title:e,confirmLabel:"Delete",confirmBusyLabel:"Deletingβ¦",onConfirm:h,busy:i,error:j??void 0,children:(0,b.jsxs)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:[e," ",(0,b.jsx)("code",{className:"font-mono",children:f}),"? ",g]})})}function e(a){return function(c){let e=c[a.entityLabelKey];return(0,b.jsx)(d,{open:c.open,onClose:c.onClose,title:a.title,entityLabel:e,bodyText:a.bodyText,onConfirm:c.onConfirm,busy:c.busy,error:c.error})}}let f=e({title:"Delete agent",bodyText:"This will remove its workspace/state.",entityLabelKey:"agentId"}),g=e({title:"Delete Team",bodyText:"This will remove the team workspace, agents, and stamped cron jobs.",entityLabelKey:"teamId"}),h=e({title:"Delete recipe",bodyText:"This removes the markdown file from your workspace.",entityLabelKey:"recipeId"}),i=e({title:"Delete cron job",bodyText:"This removes it from the Gateway scheduler. You can recreate it later.",entityLabelKey:"jobLabel"});a.s(["DeleteAgentModal",0,f,"DeleteCronJobModal",0,i,"DeleteRecipeModal",0,h,"DeleteTeamModal",0,g],88764)},86732,a=>{"use strict";var b=a.i(87924),c=a.i(35112);function d({open:a}){return a?(0,c.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[9999]",children:[(0,b.jsx)("div",{className:"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none"}),(0,b.jsx)("div",{className:"fixed inset-0 flex items-center justify-center p-6 sm:p-10",children:(0,b.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]",children:[(0,b.jsx)("div",{className:"text-xl font-semibold text-[color:var(--ck-text-primary)]",children:"Gathering your ingredients.."}),(0,b.jsx)("div",{className:"mt-6 h-1.5 w-full overflow-hidden rounded-full bg-white/10",children:(0,b.jsx)("div",{className:"h-full w-1/3 animate-[loading-bar_1.5s_ease-in-out_infinite] rounded-full bg-[var(--ck-accent-red)]"})})]})}),(0,b.jsx)("style",{children:`
|
|
2
|
+
@keyframes loading-bar {
|
|
3
|
+
0% { transform: translateX(-100%); }
|
|
4
|
+
50% { transform: translateX(200%); }
|
|
5
|
+
100% { transform: translateX(-100%); }
|
|
6
|
+
}
|
|
7
|
+
`})]}),document.body):null}a.s(["RunLoadingOverlay",()=>d])},28268,a=>{"use strict";var b=a.i(87924),c=a.i(35112);function d({open:a,onClose:d,title:e,children:f,size:g="md",hideTitle:h=!1}){if(!a)return null;let i="modal-title";return(0,c.createPortal)((0,b.jsxs)("div",{className:"fixed inset-0 z-[200]",children:[(0,b.jsx)("div",{className:"fixed inset-0 bg-black/60",onClick:d,"aria-hidden":"true"}),(0,b.jsx)("div",{className:"fixed inset-0 overflow-y-auto",role:"dialog","aria-modal":"true","aria-labelledby":i,children:(0,b.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,b.jsxs)("div",{className:`w-full ${{sm:"max-w-md",md:"max-w-lg",lg:"max-w-2xl",xl:"max-w-4xl",full:"max-w-6xl"}[g]} rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-6 shadow-[var(--ck-shadow-2)]`,children:[h?(0,b.jsx)("h2",{id:i,className:"sr-only",children:e}):(0,b.jsx)("h2",{id:i,className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:e}),f]})})})]}),document.body)}a.s(["Modal",()=>d])},83519,a=>{"use strict";var b=a.i(87924),c=a.i(71987),d=a.i(38246),e=a.i(72131),f=a.i(50944),g=a.i(9233),h=a.i(95625);function i(a,b){return`/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(a)}&runId=${encodeURIComponent(b.runId)}&path=${encodeURIComponent(b.relativePath)}`}function j(a){if(0===a)return"0 B";let b=Math.floor(Math.log(a)/Math.log(1024));return parseFloat((a/Math.pow(1024,b)).toFixed(1))+" "+["B","KB","MB","GB"][b]}function k(a){try{return new Date(a).toLocaleString()}catch{return a}}function l(a){switch(a.toLowerCase().split(".").pop()){case"md":return"π";case"json":return"π§";case"txt":default:return"π";case"html":case"htm":return"π";case"css":return"π¨";case"js":case"ts":case"tsx":case"jsx":return"βοΈ";case"png":case"jpg":case"jpeg":case"gif":case"webp":return"πΌοΈ";case"pdf":return"π";case"zip":case"tar":case"gz":return"π¦"}}function m({teamId:a,deliverables:m,workflows:n}){let o=(0,f.useRouter)(),[p,q]=(0,e.useState)(""),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(""),[v,w]=(0,e.useState)(null),x=(0,e.useMemo)(()=>{let a=t.trim().toLowerCase();return m.filter(b=>{if(p&&b.workflowId!==p||r&&b.runId!==r)return!1;if(!a)return!0;let c=n[b.workflowId]?.name??"";return b.fileName.toLowerCase().includes(a)||b.workflowId.toLowerCase().includes(a)||b.runId.toLowerCase().includes(a)||c.toLowerCase().includes(a)||b.contentPreview&&b.contentPreview.toLowerCase().includes(a)})},[m,t,p,r,n]),y=(0,e.useMemo)(()=>Array.from(new Set(m.map(a=>a.workflowId).filter(Boolean))).sort(),[m]),z=(0,e.useMemo)(()=>Array.from(new Set((p?m.filter(a=>a.workflowId===p):m).map(a=>a.runId).filter(Boolean))).sort(),[m,p]),A=async b=>{try{if(b.isText&&b.contentPreview)await navigator.clipboard.writeText(b.contentPreview),alert("Content copied to clipboard!");else{let c=i(a,b),d=document.createElement("a");d.href=c,d.download=b.fileName,document.body.appendChild(d),d.click(),d.remove()}}catch{alert("Failed to download file")}};return(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsx)("div",{className:"rounded-3xl border border-white/10 bg-black/10 p-4",children:(0,b.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,b.jsxs)("label",{className:"block",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"workflow"}),(0,b.jsxs)("select",{value:p,onChange:a=>{q(a.target.value||""),s("")},className:"mt-1 w-64 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,b.jsx)("option",{value:"",children:"All workflows"}),y.map(a=>(0,b.jsx)("option",{value:a,children:n[a]?.name?`${n[a]?.name} (${a})`:a},a))]})]}),(0,b.jsxs)("label",{className:"block",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"run"}),(0,b.jsxs)("select",{value:r,onChange:a=>s(a.target.value||""),className:"mt-1 w-56 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]",children:[(0,b.jsx)("option",{value:"",children:"All runs"}),z.map(a=>(0,b.jsx)("option",{value:a,children:a},a))]})]}),(0,b.jsxs)("label",{className:"block",children:[(0,b.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"search"}),(0,b.jsx)("input",{value:t,onChange:a=>u(a.target.value),placeholder:"filename / content",className:"mt-1 w-72 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"})]})]}),(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)("button",{type:"button",onClick:()=>o.refresh(),className:"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10",children:"Refresh"})})]})}),(0,b.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:[(0,b.jsxs)("div",{className:"lg:col-span-2 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,b.jsx)("h2",{className:"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4",children:"Workflow Deliverables"}),x.length>0?(0,b.jsx)("div",{className:"space-y-2",children:x.map((e,f)=>{let h=v?.absolutePath===e.absolutePath,m=n[e.workflowId]?.name||e.workflowId;return(0,b.jsx)("div",{className:`cursor-pointer rounded-lg border p-3 transition-colors ${h?"border-white/20 bg-white/10":"border-white/5 bg-black/5 hover:bg-white/5"}`,onClick:()=>w(e),children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,g.isImageFile)(e.fileName)&&(0,b.jsx)("div",{className:"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-white/5 border border-white/10",children:(0,b.jsx)(c.default,{src:i(a,e),alt:e.fileName,width:48,height:48,className:"w-full h-full object-cover",unoptimized:!0})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-lg",children:l(e.fileName)}),(0,b.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] truncate",children:e.fileName}),e.isText&&(0,b.jsx)("span",{className:"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded",children:"TEXT"})]}),(0,b.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[(0,b.jsx)("span",{className:"font-mono",children:m})," Β· ",(0,b.jsx)("span",{className:"font-mono",children:e.runId})]}),(0,b.jsxs)("div",{className:"mt-1 text-xs text-[color:var(--ck-text-tertiary)]",children:[e.relativePath!==e.fileName&&(0,b.jsxs)("span",{children:[e.relativePath," Β· "]}),j(e.size)," Β· ",k(e.mtime)]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("button",{onClick:a=>{a.stopPropagation(),A(e)},className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:e.isText?"Copy":"Download"}),(0,b.jsx)(d.default,{href:`/teams/${a}/runs/${e.workflowId}/${e.runId}`,onClick:a=>a.stopPropagation(),className:"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]",children:"View Run β"})]})]})},`${e.runId}-${e.relativePath}`)})}):(0,b.jsxs)("div",{className:"text-center py-8 text-[color:var(--ck-text-secondary)]",children:[(0,b.jsx)("div",{className:"text-4xl mb-2",children:"π"}),(0,b.jsx)("div",{className:"text-lg mb-1",children:"No deliverables found"}),(0,b.jsx)("div",{className:"text-sm",children:"Workflow runs will create deliverables that appear here when they complete."})]}),x.length>0&&(0,b.jsxs)("div",{className:"mt-4 text-xs text-[color:var(--ck-text-tertiary)]",children:["Showing ",x.length," of ",m.length," deliverables."]})]}),(0,b.jsxs)("div",{className:"lg:col-span-1 rounded-3xl border border-white/10 bg-black/10 p-4",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3",children:"Preview"}),v?(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:"mb-3 pb-3 border-b border-white/10",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,b.jsx)("span",{className:"text-lg",children:l(v.fileName)}),(0,b.jsx)("span",{className:"font-medium text-[color:var(--ck-text-primary)] text-sm break-all",children:v.fileName})]}),(0,b.jsxs)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)] space-y-1",children:[(0,b.jsxs)("div",{children:["Size: ",j(v.size)]}),(0,b.jsxs)("div",{children:["Modified: ",k(v.mtime)]}),(0,b.jsxs)("div",{children:["Path: ",v.relativePath]})]})]}),(0,b.jsx)(h.DeliverablePreviewPanel,{deliverable:v,fileUrl:i(a,v),maxMediaHeight:"500px",onDownload:()=>A(v)})]}):(0,b.jsx)("div",{className:"text-sm text-[color:var(--ck-text-secondary)] italic",children:"Select a deliverable to preview"})]})]})]})}a.s(["default",()=>m])}];
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__7af8e528._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-dom.ts","../../../../src/lib/errors.ts","../../../../src/components/ConfirmationModal.tsx","../../../../src/components/DeleteEntityModal.tsx","../../../../src/components/delete-modals.tsx","../../../../src/components/RunLoadingOverlay.tsx","../../../../src/components/Modal.tsx","../../../../src/app/teams/%5BteamId%5D/deliverables/deliverables-client.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactDOM\n","/**\n * Extracts a string message from an unknown error value.\n * Used consistently across API routes and client components.\n */\nexport function errorMessage(e: unknown): string {\n return e instanceof Error ? e.message : String(e);\n}\n","\"use client\";\n\nimport { createPortal } from \"react-dom\";\n\n/** Shared confirmation modal shell: overlay, title, body, optional error, Cancel + Confirm buttons. */\nexport function ConfirmationModal({\n open,\n onClose,\n title,\n children,\n error,\n confirmLabel,\n confirmBusyLabel,\n onConfirm,\n confirmDisabled,\n busy,\n confirmButtonClassName,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n children: React.ReactNode;\n /** Optional error message to show above footer */\n error?: string | null;\n confirmLabel: string;\n confirmBusyLabel?: string;\n onConfirm: () => void;\n confirmDisabled?: boolean;\n busy?: boolean;\n /** Override confirm button styles (default: accent red) */\n confirmButtonClassName?: string;\n}) {\n if (!open) return null;\n\n const isDisabled = confirmDisabled ?? false;\n const isBusy = busy ?? false;\n const btnLabel = isBusy && confirmBusyLabel ? confirmBusyLabel : confirmLabel;\n const confirmClass =\n confirmButtonClassName ??\n \"rounded-lg bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[var(--ck-accent-red-hover)] disabled:opacity-50\";\n\n const titleId = \"confirmation-modal-title\";\n return createPortal(\n <div className=\"fixed inset-0 z-[200]\">\n <div className=\"fixed inset-0 bg-black/60\" onClick={onClose} aria-hidden=\"true\" />\n <div className=\"fixed inset-0 overflow-y-auto\" role=\"dialog\" aria-modal=\"true\" aria-labelledby={titleId}>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div className=\"w-full max-w-lg rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-5 shadow-[var(--ck-shadow-2)]\">\n <h2 id={titleId} className=\"text-lg font-semibold text-[color:var(--ck-text-primary)]\">{title}</h2>\n {children}\n\n {error ? (\n <div className=\"mt-4 rounded-lg border border-red-400/30 bg-red-500/10 p-3 text-sm text-red-100\">\n {error}\n </div>\n ) : null}\n\n <div className=\"mt-6 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n onClick={onClose}\n className=\"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n disabled={isDisabled || isBusy}\n onClick={onConfirm}\n className={confirmClass}\n >\n {btnLabel}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>,\n document.body\n );\n}\n","\"use client\";\n\nimport { ConfirmationModal } from \"./ConfirmationModal\";\n\n/** Shared delete confirmation modal: title, entity label in code, body text. */\nexport function DeleteEntityModal({\n open,\n onClose,\n title,\n entityLabel,\n bodyText,\n onConfirm,\n busy,\n error,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n entityLabel: string;\n bodyText: string;\n onConfirm: () => void;\n busy?: boolean;\n error?: string | null;\n}) {\n return (\n <ConfirmationModal\n open={open}\n onClose={onClose}\n title={title}\n confirmLabel=\"Delete\"\n confirmBusyLabel=\"Deletingβ¦\"\n onConfirm={onConfirm}\n busy={busy}\n error={error ?? undefined}\n >\n <p className=\"mt-2 text-sm text-[color:var(--ck-text-secondary)]\">\n {title} <code className=\"font-mono\">{entityLabel}</code>? {bodyText}\n </p>\n </ConfirmationModal>\n );\n}\n","\"use client\";\n\nimport { DeleteEntityModal } from \"./DeleteEntityModal\";\n\ntype EntityLabelKey = \"agentId\" | \"teamId\" | \"recipeId\" | \"jobLabel\";\n\ntype BaseProps = {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n busy?: boolean;\n error?: string | null;\n};\n\nfunction createDeleteModal<K extends EntityLabelKey>(config: {\n title: string;\n bodyText: string;\n entityLabelKey: K;\n}) {\n return function DeleteModal(props: BaseProps & Record<K, string>) {\n const entityLabel = props[config.entityLabelKey];\n return (\n <DeleteEntityModal\n open={props.open}\n onClose={props.onClose}\n title={config.title}\n entityLabel={entityLabel}\n bodyText={config.bodyText}\n onConfirm={props.onConfirm}\n busy={props.busy}\n error={props.error}\n />\n );\n };\n}\n\nexport const DeleteAgentModal = createDeleteModal({\n title: \"Delete agent\",\n bodyText: \"This will remove its workspace/state.\",\n entityLabelKey: \"agentId\",\n});\n\nexport const DeleteTeamModal = createDeleteModal({\n title: \"Delete Team\",\n bodyText: \"This will remove the team workspace, agents, and stamped cron jobs.\",\n entityLabelKey: \"teamId\",\n});\n\nexport const DeleteRecipeModal = createDeleteModal({\n title: \"Delete recipe\",\n bodyText: \"This removes the markdown file from your workspace.\",\n entityLabelKey: \"recipeId\",\n});\n\nexport const DeleteCronJobModal = createDeleteModal({\n title: \"Delete cron job\",\n bodyText: \"This removes it from the Gateway scheduler. You can recreate it later.\",\n entityLabelKey: \"jobLabel\",\n});\n","\"use client\";\n\nimport { createPortal } from \"react-dom\";\n\nexport function RunLoadingOverlay({ open }: { open: boolean }) {\n if (!open) return null;\n\n return createPortal(\n <div className=\"fixed inset-0 z-[9999]\">\n <div className=\"fixed inset-0 bg-[color:var(--ck-bg-base)]/90 pointer-events-none\" />\n\n <div className=\"fixed inset-0 flex items-center justify-center p-6 sm:p-10\">\n <div className=\"w-full max-w-md rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-8 sm:p-10 shadow-[var(--ck-shadow-2)]\">\n <div className=\"text-xl font-semibold text-[color:var(--ck-text-primary)]\">\n Gathering your ingredients..\n </div>\n\n <div className=\"mt-6 h-1.5 w-full overflow-hidden rounded-full bg-white/10\">\n <div className=\"h-full w-1/3 animate-[loading-bar_1.5s_ease-in-out_infinite] rounded-full bg-[var(--ck-accent-red)]\" />\n </div>\n </div>\n </div>\n\n <style>{`\n @keyframes loading-bar {\n 0% { transform: translateX(-100%); }\n 50% { transform: translateX(200%); }\n 100% { transform: translateX(-100%); }\n }\n `}</style>\n </div>,\n document.body,\n );\n}\n","\"use client\";\n\nimport { createPortal } from \"react-dom\";\n\nexport function Modal({\n open,\n onClose,\n title,\n children,\n size = \"md\",\n hideTitle = false,\n}: {\n open: boolean;\n onClose: () => void;\n title: string;\n children: React.ReactNode;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n hideTitle?: boolean;\n}) {\n if (!open) return null;\n\n const sizeClasses = {\n sm: \"max-w-md\",\n md: \"max-w-lg\",\n lg: \"max-w-2xl\",\n xl: \"max-w-4xl\",\n full: \"max-w-6xl\"\n };\n\n const titleId = \"modal-title\";\n return createPortal(\n <div className=\"fixed inset-0 z-[200]\">\n <div className=\"fixed inset-0 bg-black/60\" onClick={onClose} aria-hidden=\"true\" />\n <div className=\"fixed inset-0 overflow-y-auto\" role=\"dialog\" aria-modal=\"true\" aria-labelledby={titleId}>\n <div className=\"flex min-h-full items-center justify-center p-4\">\n <div className={`w-full ${sizeClasses[size]} rounded-2xl border border-white/10 bg-[color:var(--ck-bg-soft)] p-6 shadow-[var(--ck-shadow-2)]`}>\n {hideTitle ? <h2 id={titleId} className=\"sr-only\">{title}</h2> : <h2 id={titleId} className=\"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4\">{title}</h2>}\n {children}\n </div>\n </div>\n </div>\n </div>,\n document.body\n );\n}","\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { useMemo, useState } from \"react\";\nimport { useRouter } from \"next/navigation\";\n\nimport type { WorkflowDeliverable } from \"@/app/api/teams/workflow-deliverables/route\";\nimport { isImageFile } from \"@/lib/media-file-utils\";\nimport { DeliverablePreviewPanel } from \"@/components/DeliverablePreviewPanel\";\n\nfunction deliverableFileUrl(teamId: string, d: WorkflowDeliverable): string {\n return `/api/teams/workflow-deliverables/file?teamId=${encodeURIComponent(teamId)}&runId=${encodeURIComponent(d.runId)}&path=${encodeURIComponent(d.relativePath)}`;\n}\n\nfunction formatBytes(bytes: number) {\n if (bytes === 0) return \"0 B\";\n const k = 1024;\n const sizes = [\"B\", \"KB\", \"MB\", \"GB\"];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + \" \" + sizes[i];\n}\n\nfunction formatDate(dateString: string) {\n try {\n return new Date(dateString).toLocaleString();\n } catch {\n return dateString;\n }\n}\n\nfunction getFileIcon(fileName: string) {\n const ext = fileName.toLowerCase().split(\".\").pop();\n switch (ext) {\n case \"md\":\n return \"π\";\n case \"json\":\n return \"π§\";\n case \"txt\":\n return \"π\";\n case \"html\":\n case \"htm\":\n return \"π\";\n case \"css\":\n return \"π¨\";\n case \"js\":\n case \"ts\":\n case \"tsx\":\n case \"jsx\":\n return \"βοΈ\";\n case \"png\":\n case \"jpg\":\n case \"jpeg\":\n case \"gif\":\n case \"webp\":\n return \"πΌοΈ\";\n case \"pdf\":\n return \"π\";\n case \"zip\":\n case \"tar\":\n case \"gz\":\n return \"π¦\";\n default:\n return \"π\";\n }\n}\n\nexport default function DeliverablesClient({\n teamId,\n deliverables,\n workflows,\n}: {\n teamId: string;\n deliverables: WorkflowDeliverable[];\n workflows: Record<string, { id: string; name?: string }>;\n}) {\n const router = useRouter();\n const [workflowFilter, setWorkflowFilter] = useState<string>(\"\");\n const [runFilter, setRunFilter] = useState<string>(\"\");\n const [searchQuery, setSearchQuery] = useState<string>(\"\");\n const [selectedDeliverable, setSelectedDeliverable] = useState<WorkflowDeliverable | null>(null);\n\n const filteredDeliverables = useMemo(() => {\n const needle = searchQuery.trim().toLowerCase();\n return deliverables.filter((d) => {\n if (workflowFilter && d.workflowId !== workflowFilter) return false;\n if (runFilter && d.runId !== runFilter) return false;\n if (!needle) return true;\n \n const wfName = workflows[d.workflowId]?.name ?? \"\";\n return (\n d.fileName.toLowerCase().includes(needle) ||\n d.workflowId.toLowerCase().includes(needle) ||\n d.runId.toLowerCase().includes(needle) ||\n wfName.toLowerCase().includes(needle) ||\n (d.contentPreview && d.contentPreview.toLowerCase().includes(needle))\n );\n });\n }, [deliverables, searchQuery, workflowFilter, runFilter, workflows]);\n\n const workflowOptions = useMemo(() => {\n const ids = Array.from(new Set(deliverables.map((d) => d.workflowId).filter(Boolean))).sort();\n return ids;\n }, [deliverables]);\n\n const runOptions = useMemo(() => {\n const filtered = workflowFilter \n ? deliverables.filter(d => d.workflowId === workflowFilter)\n : deliverables;\n const ids = Array.from(new Set(filtered.map((d) => d.runId).filter(Boolean))).sort();\n return ids;\n }, [deliverables, workflowFilter]);\n\n const downloadDeliverable = async (deliverable: WorkflowDeliverable) => {\n try {\n if (deliverable.isText && deliverable.contentPreview) {\n await navigator.clipboard.writeText(deliverable.contentPreview);\n alert(\"Content copied to clipboard!\");\n } else {\n // Download binary files via the file API\n const url = deliverableFileUrl(teamId, deliverable);\n const a = document.createElement(\"a\");\n a.href = url;\n a.download = deliverable.fileName;\n document.body.appendChild(a);\n a.click();\n a.remove();\n }\n } catch {\n alert(\"Failed to download file\");\n }\n };\n\n return (\n <div className=\"flex flex-col gap-4\">\n <div className=\"rounded-3xl border border-white/10 bg-black/10 p-4\">\n <div className=\"flex flex-wrap items-end justify-between gap-3\">\n <div className=\"flex flex-wrap items-end gap-3\">\n <label className=\"block\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">workflow</div>\n <select\n value={workflowFilter}\n onChange={(e) => {\n setWorkflowFilter(e.target.value || \"\");\n setRunFilter(\"\"); // Reset run filter when workflow changes\n }}\n className=\"mt-1 w-64 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\"\n >\n <option value=\"\">All workflows</option>\n {workflowOptions.map((id) => (\n <option key={id} value={id}>\n {workflows[id]?.name ? `${workflows[id]?.name} (${id})` : id}\n </option>\n ))}\n </select>\n </label>\n\n <label className=\"block\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">run</div>\n <select\n value={runFilter}\n onChange={(e) => setRunFilter(e.target.value || \"\")}\n className=\"mt-1 w-56 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\"\n >\n <option value=\"\">All runs</option>\n {runOptions.map((id) => (\n <option key={id} value={id}>\n {id}\n </option>\n ))}\n </select>\n </label>\n\n <label className=\"block\">\n <div className=\"text-[10px] uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">search</div>\n <input\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n placeholder=\"filename / content\"\n className=\"mt-1 w-72 max-w-full rounded-lg border border-white/10 bg-white/5 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\"\n />\n </label>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => router.refresh()}\n className=\"rounded-lg border border-white/10 bg-white/5 px-3 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] hover:bg-white/10\"\n >\n Refresh\n </button>\n </div>\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-3\">\n {/* Deliverables List */}\n <div className=\"lg:col-span-2 rounded-3xl border border-white/10 bg-black/10 p-4\">\n <h2 className=\"text-lg font-semibold text-[color:var(--ck-text-primary)] mb-4\">\n Workflow Deliverables\n </h2>\n\n {filteredDeliverables.length > 0 ? (\n <div className=\"space-y-2\">\n {filteredDeliverables.map((deliverable, idx) => {\n const isSelected = selectedDeliverable?.absolutePath === deliverable.absolutePath;\n const wfName = workflows[deliverable.workflowId]?.name || deliverable.workflowId;\n \n return (\n <div\n key={`${deliverable.runId}-${deliverable.relativePath}`}\n className={`cursor-pointer rounded-lg border p-3 transition-colors ${\n isSelected\n ? \"border-white/20 bg-white/10\"\n : \"border-white/5 bg-black/5 hover:bg-white/5\"\n }`}\n onClick={() => setSelectedDeliverable(deliverable)}\n >\n <div className=\"flex items-start justify-between gap-3\">\n {isImageFile(deliverable.fileName) && (\n <div className=\"flex-shrink-0 w-12 h-12 rounded overflow-hidden bg-white/5 border border-white/10\">\n <Image\n src={deliverableFileUrl(teamId, deliverable)}\n alt={deliverable.fileName}\n width={48}\n height={48}\n className=\"w-full h-full object-cover\"\n unoptimized\n />\n </div>\n )}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-lg\">{getFileIcon(deliverable.fileName)}</span>\n <span className=\"font-medium text-[color:var(--ck-text-primary)] truncate\">\n {deliverable.fileName}\n </span>\n {deliverable.isText && (\n <span className=\"text-xs bg-green-500/20 text-green-400 px-1.5 py-0.5 rounded\">\n TEXT\n </span>\n )}\n </div>\n \n <div className=\"mt-1 text-xs text-[color:var(--ck-text-tertiary)]\">\n <span className=\"font-mono\">{wfName}</span>\n {\" Β· \"}\n <span className=\"font-mono\">{deliverable.runId}</span>\n </div>\n \n <div className=\"mt-1 text-xs text-[color:var(--ck-text-tertiary)]\">\n {deliverable.relativePath !== deliverable.fileName && (\n <span>{deliverable.relativePath} Β· </span>\n )}\n {formatBytes(deliverable.size)} Β· {formatDate(deliverable.mtime)}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n <button\n onClick={(e) => {\n e.stopPropagation();\n downloadDeliverable(deliverable);\n }}\n className=\"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]\"\n >\n {deliverable.isText ? \"Copy\" : \"Download\"}\n </button>\n <Link\n href={`/teams/${teamId}/runs/${deliverable.workflowId}/${deliverable.runId}`}\n onClick={(e) => e.stopPropagation()}\n className=\"text-xs px-2 py-1 border border-white/10 rounded hover:bg-white/5 text-[color:var(--ck-text-secondary)]\"\n >\n View Run β\n </Link>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n ) : (\n <div className=\"text-center py-8 text-[color:var(--ck-text-secondary)]\">\n <div className=\"text-4xl mb-2\">π</div>\n <div className=\"text-lg mb-1\">No deliverables found</div>\n <div className=\"text-sm\">\n Workflow runs will create deliverables that appear here when they complete.\n </div>\n </div>\n )}\n\n {filteredDeliverables.length > 0 && (\n <div className=\"mt-4 text-xs text-[color:var(--ck-text-tertiary)]\">\n Showing {filteredDeliverables.length} of {deliverables.length} deliverables.\n </div>\n )}\n </div>\n\n {/* Preview Panel */}\n <div className=\"lg:col-span-1 rounded-3xl border border-white/10 bg-black/10 p-4\">\n <h3 className=\"text-sm font-semibold text-[color:var(--ck-text-primary)] mb-3\">\n Preview\n </h3>\n\n {selectedDeliverable ? (\n <div>\n <div className=\"mb-3 pb-3 border-b border-white/10\">\n <div className=\"flex items-center gap-2 mb-2\">\n <span className=\"text-lg\">{getFileIcon(selectedDeliverable.fileName)}</span>\n <span className=\"font-medium text-[color:var(--ck-text-primary)] text-sm break-all\">\n {selectedDeliverable.fileName}\n </span>\n </div>\n <div className=\"text-xs text-[color:var(--ck-text-tertiary)] space-y-1\">\n <div>Size: {formatBytes(selectedDeliverable.size)}</div>\n <div>Modified: {formatDate(selectedDeliverable.mtime)}</div>\n <div>Path: {selectedDeliverable.relativePath}</div>\n </div>\n </div>\n\n <DeliverablePreviewPanel\n deliverable={selectedDeliverable}\n fileUrl={deliverableFileUrl(teamId, selectedDeliverable)}\n maxMediaHeight=\"500px\"\n onDownload={() => downloadDeliverable(selectedDeliverable)}\n />\n </div>\n ) : (\n <div className=\"text-sm text-[color:var(--ck-text-secondary)] italic\">\n Select a deliverable to preview\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