@jiggai/kitchen 0.5.11 → 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.
Files changed (186) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error.html +2 -2
  5. package/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/server/app/_not-found.html +1 -1
  12. package/.next/server/app/_not-found.rsc +2 -2
  13. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/api/cron/add/route.js +1 -1
  20. package/.next/server/app/api/cron/add/route.js.nft.json +1 -1
  21. package/.next/server/app/api/cron/bulk/route.js +1 -1
  22. package/.next/server/app/api/cron/bulk/route.js.nft.json +1 -1
  23. package/.next/server/app/api/cron/delete/route.js +1 -1
  24. package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
  25. package/.next/server/app/api/cron/edit/route.js +1 -1
  26. package/.next/server/app/api/cron/edit/route.js.nft.json +1 -1
  27. package/.next/server/app/api/cron/job/route.js +1 -1
  28. package/.next/server/app/api/cron/job/route.js.nft.json +1 -1
  29. package/.next/server/app/api/cron/jobs/route.js +1 -1
  30. package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
  31. package/.next/server/app/api/cron/recipe-installed/route.js +1 -1
  32. package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
  33. package/.next/server/app/api/cron/worker/route.js +1 -1
  34. package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
  35. package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
  36. package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
  37. package/.next/server/app/api/goals/route.js.nft.json +1 -1
  38. package/.next/server/app/api/plugins/[pluginId]/[...path]/route.js.nft.json +1 -1
  39. package/.next/server/app/api/plugins/[pluginId]/tabs/[tabId]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/plugins/route.js.nft.json +1 -1
  41. package/.next/server/app/api/plugins/test/route.js.nft.json +1 -1
  42. package/.next/server/app/api/recipes/[id]/route.js +1 -1
  43. package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
  44. package/.next/server/app/api/recipes/delete/route.js +1 -1
  45. package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
  46. package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
  47. package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
  48. package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
  49. package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
  50. package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
  51. package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
  52. package/.next/server/app/api/teams/plugins/route.js.nft.json +1 -1
  53. package/.next/server/app/api/teams/remove-team/route.js +1 -1
  54. package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
  55. package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
  56. package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
  57. package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
  58. package/.next/server/app/channels.html +2 -2
  59. package/.next/server/app/channels.rsc +2 -2
  60. package/.next/server/app/channels.segments/_full.segment.rsc +2 -2
  61. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  62. package/.next/server/app/channels.segments/_index.segment.rsc +1 -1
  63. package/.next/server/app/channels.segments/_tree.segment.rsc +1 -1
  64. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +1 -1
  65. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  66. package/.next/server/app/goals/new.html +2 -2
  67. package/.next/server/app/goals/new.rsc +2 -2
  68. package/.next/server/app/goals/new.segments/_full.segment.rsc +2 -2
  69. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  70. package/.next/server/app/goals/new.segments/_index.segment.rsc +1 -1
  71. package/.next/server/app/goals/new.segments/_tree.segment.rsc +1 -1
  72. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +1 -1
  73. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  74. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  75. package/.next/server/app/goals.html +1 -1
  76. package/.next/server/app/goals.rsc +2 -2
  77. package/.next/server/app/goals.segments/_full.segment.rsc +2 -2
  78. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  79. package/.next/server/app/goals.segments/_index.segment.rsc +1 -1
  80. package/.next/server/app/goals.segments/_tree.segment.rsc +1 -1
  81. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +1 -1
  82. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  83. package/.next/server/app/page.js +3 -3
  84. package/.next/server/app/page.js.nft.json +1 -1
  85. package/.next/server/app/recipes/[id]/page.js +1 -1
  86. package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
  87. package/.next/server/app/settings.html +1 -1
  88. package/.next/server/app/settings.rsc +2 -2
  89. package/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  90. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  91. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  92. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  93. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  94. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  95. package/.next/server/app/teams/[teamId]/deliverables/page.js +2 -2
  96. package/.next/server/app/teams/[teamId]/deliverables/page.js.nft.json +1 -1
  97. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +2 -2
  98. package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
  99. package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
  100. package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
  101. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +1 -1
  102. package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
  103. package/.next/server/app/teams/[teamId]/workflows/page.js +3 -3
  104. package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
  105. package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
  106. package/.next/server/app/tickets/page.js.nft.json +1 -1
  107. package/.next/server/chunks/[root-of-the-server]__1331482c._.js +3 -0
  108. package/.next/server/chunks/[root-of-the-server]__1331482c._.js.map +1 -0
  109. package/.next/server/chunks/[root-of-the-server]__24d25a8c._.js +3 -0
  110. package/.next/server/chunks/[root-of-the-server]__24d25a8c._.js.map +1 -0
  111. package/.next/server/chunks/[root-of-the-server]__3d9c4025._.js +3 -0
  112. package/.next/server/chunks/[root-of-the-server]__3d9c4025._.js.map +1 -0
  113. package/.next/server/chunks/[root-of-the-server]__83753ef0._.js +3 -0
  114. package/.next/server/chunks/[root-of-the-server]__83753ef0._.js.map +1 -0
  115. package/.next/server/chunks/[root-of-the-server]__8799df50._.js +3 -0
  116. package/.next/server/chunks/[root-of-the-server]__8799df50._.js.map +1 -0
  117. package/.next/server/chunks/[root-of-the-server]__a90f7cdc._.js +3 -0
  118. package/.next/server/chunks/[root-of-the-server]__a90f7cdc._.js.map +1 -0
  119. package/.next/server/chunks/[root-of-the-server]__afde9f7c._.js +3 -0
  120. package/.next/server/chunks/[root-of-the-server]__afde9f7c._.js.map +1 -0
  121. package/.next/server/chunks/[root-of-the-server]__e3431817._.js +3 -0
  122. package/.next/server/chunks/[root-of-the-server]__e3431817._.js.map +1 -0
  123. package/.next/server/chunks/[root-of-the-server]__e6ecca08._.js +3 -0
  124. package/.next/server/chunks/[root-of-the-server]__e6ecca08._.js.map +1 -0
  125. package/.next/server/chunks/{[root-of-the-server]__d0634ad4._.js → [root-of-the-server]__fc511c8f._.js} +2 -2
  126. package/.next/server/chunks/[root-of-the-server]__fc511c8f._.js.map +1 -0
  127. package/.next/server/chunks/[root-of-the-server]__fcde644b._.js +3 -0
  128. package/.next/server/chunks/[root-of-the-server]__fcde644b._.js.map +1 -0
  129. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js +2 -2
  130. package/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_cb6ddb24.js.map +1 -1
  131. package/.next/server/chunks/ssr/{[root-of-the-server]__becf14db._.js → [root-of-the-server]__0a8db855._.js} +2 -2
  132. package/.next/server/chunks/ssr/[root-of-the-server]__0a8db855._.js.map +1 -0
  133. package/.next/server/chunks/ssr/{[root-of-the-server]__4d24c088._.js → [root-of-the-server]__18154c9e._.js} +2 -2
  134. package/.next/server/chunks/ssr/[root-of-the-server]__18154c9e._.js.map +1 -0
  135. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +1 -1
  136. package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -1
  137. package/.next/server/chunks/ssr/[root-of-the-server]__52cb8e0e._.js +3 -0
  138. package/.next/server/chunks/ssr/[root-of-the-server]__52cb8e0e._.js.map +1 -0
  139. package/.next/server/chunks/ssr/[root-of-the-server]__7c14561e._.js +3 -0
  140. package/.next/server/chunks/ssr/[root-of-the-server]__7c14561e._.js.map +1 -0
  141. package/.next/server/chunks/ssr/[root-of-the-server]__c97fe9e9._.js +3 -0
  142. package/.next/server/chunks/ssr/[root-of-the-server]__c97fe9e9._.js.map +1 -0
  143. package/.next/server/chunks/ssr/[root-of-the-server]__e9faef37._.js +3 -0
  144. package/.next/server/chunks/ssr/[root-of-the-server]__e9faef37._.js.map +1 -0
  145. package/.next/server/chunks/ssr/_018dfe6b._.js +1 -1
  146. package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -1
  147. package/.next/server/pages/404.html +1 -1
  148. package/.next/server/pages/500.html +2 -2
  149. package/.next/server/server-reference-manifest.js +1 -1
  150. package/.next/server/server-reference-manifest.json +1 -1
  151. package/openclaw.plugin.json +1 -1
  152. package/package.json +1 -1
  153. package/.next/server/chunks/[root-of-the-server]__2705b289._.js +0 -3
  154. package/.next/server/chunks/[root-of-the-server]__2705b289._.js.map +0 -1
  155. package/.next/server/chunks/[root-of-the-server]__28a2e162._.js +0 -3
  156. package/.next/server/chunks/[root-of-the-server]__28a2e162._.js.map +0 -1
  157. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js +0 -3
  158. package/.next/server/chunks/[root-of-the-server]__30cd38e9._.js.map +0 -1
  159. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js +0 -3
  160. package/.next/server/chunks/[root-of-the-server]__55defc7c._.js.map +0 -1
  161. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js +0 -3
  162. package/.next/server/chunks/[root-of-the-server]__69c065ce._.js.map +0 -1
  163. package/.next/server/chunks/[root-of-the-server]__6b759340._.js +0 -3
  164. package/.next/server/chunks/[root-of-the-server]__6b759340._.js.map +0 -1
  165. package/.next/server/chunks/[root-of-the-server]__70a062f7._.js +0 -3
  166. package/.next/server/chunks/[root-of-the-server]__70a062f7._.js.map +0 -1
  167. package/.next/server/chunks/[root-of-the-server]__783b6b5b._.js +0 -3
  168. package/.next/server/chunks/[root-of-the-server]__783b6b5b._.js.map +0 -1
  169. package/.next/server/chunks/[root-of-the-server]__9f73c31b._.js +0 -3
  170. package/.next/server/chunks/[root-of-the-server]__9f73c31b._.js.map +0 -1
  171. package/.next/server/chunks/[root-of-the-server]__d0634ad4._.js.map +0 -1
  172. package/.next/server/chunks/[root-of-the-server]__f3e3dd8e._.js +0 -3
  173. package/.next/server/chunks/[root-of-the-server]__f3e3dd8e._.js.map +0 -1
  174. package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js +0 -3
  175. package/.next/server/chunks/ssr/[root-of-the-server]__3f55f975._.js.map +0 -1
  176. package/.next/server/chunks/ssr/[root-of-the-server]__4d24c088._.js.map +0 -1
  177. package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js +0 -3
  178. package/.next/server/chunks/ssr/[root-of-the-server]__6390ce9c._.js.map +0 -1
  179. package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js +0 -3
  180. package/.next/server/chunks/ssr/[root-of-the-server]__a2e3966f._.js.map +0 -1
  181. package/.next/server/chunks/ssr/[root-of-the-server]__becf14db._.js.map +0 -1
  182. package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js +0 -3
  183. package/.next/server/chunks/ssr/[root-of-the-server]__f59c3144._.js.map +0 -1
  184. /package/.next/static/{LRt6kweldrLHTF1HgLgu2 → p8YaBY0FwA86zQelkOQ-m}/_buildManifest.js +0 -0
  185. /package/.next/static/{LRt6kweldrLHTF1HgLgu2 → p8YaBY0FwA86zQelkOQ-m}/_clientMiddlewareManifest.json +0 -0
  186. /package/.next/static/{LRt6kweldrLHTF1HgLgu2 → p8YaBY0FwA86zQelkOQ-m}/_ssgManifest.js +0 -0
@@ -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/plugins.ts","../../../../src/app/teams/%5BteamId%5D/workflows/workflows-client.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/workflows/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 { 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/workflows-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/workflows-client.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport { getTeamDisplayName } from \"@/lib/recipes\";\nimport { isPluginEnabled } from \"@/lib/plugins\";\nimport WorkflowsClient from \"./workflows-client\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function WorkflowsPage({\n params,\n}: {\n params: Promise<{ teamId: string }>;\n}) {\n noStore();\n\n const { teamId } = await params;\n const name = await getTeamDisplayName(teamId);\n\n return (\n <div className=\"space-y-4 p-6\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div>\n <Link\n href={`/teams/${encodeURIComponent(teamId)}`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n ← {name || teamId}\n </Link>\n <h1 className=\"mt-2 text-2xl font-semibold tracking-tight\">Workflows</h1>\n <p className=\"mt-1 text-sm text-[color:var(--ck-text-secondary)]\">\n Create and edit workflow definitions for this team.\n </p>\n </div>\n </div>\n\n <WorkflowsClient teamId={teamId} llmTaskEnabled={await isPluginEnabled(\"llm-task\")} />\n </div>\n );\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,yBAAE,CAAuB,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,OAAA,AAZIiC,GAAqBC,GAAyBC,IAC3CpG,CAWP,CAXaK,QAAQ,AADG,EACOkE,KADkB,CACZR,EADqC,SACxBC,OAAOC,GAAG,CAAC,cACzDC,CADwE,OAChEmC,KAAK,CACX,CAAC,8NAGHnC,CAHkO,CAAC,MAG3NmC,KAAK,CACX,CAAC,2MAKA,AAL2M,CAK3M,AAL4M,EAK5M,EAAA,GAAA,EAACC,EAAAA,OAAmB,CAAA,CAAE,GAAGtG,CAAK,EACvC,gPC5BA,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,MAAU,AAAJ,MAAU,qEACzB,OAAO,CACT,CAuBO,eAAe,EAAoB,CAAc,EACtD,IAAM,EAAO,EAAA,OAAE,CAAC,OAAO,GACvB,GAAI,CAAC,EAAM,MAAU,AAAJ,MAAU,oCAC3B,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAM,YAAa,CAAC,UAAU,EAAE,EAAA,CAAQ,CAC3D,oFE1DA,IAAA,EAAA,EAAA,CAAA,CAAA,OAGA,IAAM,EAAgB,CAAA,EAAA,AAFtB,EAAA,CAAA,CAAA,OAEsB,SAAA,AAAS,EAAC,EAAA,QAAQ,EASxC,SAAS,EAAc,CAAyB,QAC9C,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAE5D,EACT,CASA,SAAS,EAAc,CAA4C,CAAE,CAAiB,QACpF,AAA0B,UAAtB,AAAgC,OAAzB,EAAI,MAAM,CAAsB,EAAI,MAAM,CACjD,EAAI,MAAM,EAA0B,UAAtB,OAAO,EAAI,MAAM,EAAiB,aAAc,EAAI,MAAM,CACnE,CADqE,MAC7D,EAAI,MAAM,CAAgC,QAAQ,IAE/D,AAAuB,UAAU,OAA1B,EAAI,OAAO,CAAsB,EAAI,OAAO,CAChD,OAAO,EAChB,CAaA,SAAS,EAAe,CAAW,EACjC,IAAM,EAAU,EAAI,IAAI,GACxB,GAAI,CAAC,EAAS,OAAO,EAGrB,IAAM,EAAY,CAAO,CAAC,EAAE,CAC5B,GAAkB,MAAd,GAAmC,MAAd,GAAmC,MAAd,EAAmB,OAAO,EAGxE,IAAM,EAAQ,EAAQ,KAAK,CAAC,MACtB,EAAe,EAAM,SAAS,CAAC,AAAC,GAAM,aAAa,IAAI,CAAC,IAC9D,GAAI,EAAe,EAAG,CAEpB,IAAM,EAAY,EAAM,KAAK,CAAC,GAAc,IAAI,CAAC,MACjD,GAAI,CAEF,OADA,KAAK,KAAK,CAAC,GACJ,CACT,CAAE,KAAM,CAER,CACF,CAEA,OAAO,CACT,CAEA,eAAe,EAAiB,CAAc,CAAE,EAAwC,CAAC,CAAC,EACxF,GAAM,CAAE,eAAgB,GAAiB,CAAI,CAAE,CAAG,EAElD,GAAI,CACgB,QAAQ,QAAQ,CAClC,IADuC,AACjC,EAAM,MAAM,EAAc,WAAY,EAAM,CAChD,QAAS,KACT,aAAa,EACb,UAAW,KAAK,GAIlB,GAEM,CANmB,CAMP,OAAO,EAAI,MAAM,EAAI,IAEvC,MAAO,CACL,IAAI,EACJ,SAAU,EACV,OAAQ,EAAiB,EAAe,GAAa,EACrD,OAAQ,OAAO,EAAI,MAAM,EAAI,GAC/B,CACF,CAAE,MAAO,EAAY,CAEnB,IAAM,EAA+B,UAApB,OAAO,EAAI,IAAI,CAAgB,EAAI,IAAI,CAAG,EAG3D,MAAO,CAAE,IAAI,WAAO,EAAU,OAFf,EAFH,GAI0B,OADvB,EADc,EACK,EACW,CAC/C,CACF,CAOO,KAV0B,IAUjB,EAAyB,CAAc,EACrD,IAAM,EAAU,EAAO,IAAI,GAC3B,GAAI,CAAC,EAAS,OAAO,KAGrB,GAAI,CACF,OAAO,KAAK,KAAK,CAAC,EACpB,CAAE,KAAM,CAER,CAGA,IAAM,EAAQ,EAAQ,KAAK,CAAC,MACtB,EAAe,EAAM,SAAS,CAAC,AAAC,GAAM,YAAY,IAAI,CAAC,IAC7D,GAAI,GAAgB,EAAG,CACrB,IAAM,EAAY,EAAM,KAAK,CAAC,GAAc,IAAI,CAAC,MACjD,GAAI,CACF,OAAO,KAAK,KAAK,CAAC,EACpB,CAAE,KAAM,CAER,CACF,CAGA,IAAK,IAAI,EAAI,EAAM,MAAM,CAAG,EAAG,GAAK,EAAG,IAAK,AAC1C,GAAI,YAAY,IAAI,CAAC,CAAK,CAAC,EAAE,EAE3B,CAF8B,IAEzB,IAAI,EAAI,EAAG,GAAK,EAAG,IAAK,AAC3B,GAAI,YAAY,IAAI,CAAC,CAAK,CAAC,EAAE,EAC3B,CAD8B,EAC1B,CACF,OAAO,KAAK,KAAK,CAAC,EAAM,KAAK,CAAC,EAAG,EAAI,GAAG,IAAI,CAAC,MAC/C,CAAE,KAAM,CAER,CAEJ,CAIJ,OAAO,IACT,CAKO,eAAe,EAAe,CAAc,EAEjD,OAAO,EAAiB,EAAM,CAAE,gBAAgB,CAAM,EACxD,CAEO,eAAe,EAAY,CAAc,EAO9C,GAAgB,SAAZ,CAAI,CAAC,EAAE,EAOG,YAAZ,CAAI,CAAC,EAAE,EACP,AAAY,eAAR,CAAC,EAAE,EACP,CAAC,cAAe,cAAe,cAAc,CAAC,QAAQ,CAAC,CAAI,CAAC,EAAE,EATxC,CAUtB,MAV6B,EAAiB,GAchD,IAAM,ED1KD,AC0KO,SD1KE,EACd,IAAM,EAAO,WAA6D,iBAAiB,CAC3F,GAAI,CAAC,EACH,GADQ,GACF,AAAI,MACR,gIAGJ,OAAO,CACT,ICmKE,GAAI,CACF,IAAM,EAAO,MAAM,EAAI,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,cAAe,EAAK,CAAE,CAAE,UAAW,IAAO,GAQjG,EAAS,EAAe,OAAO,EAAI,MAAM,EAAI,KAC7C,EAAS,OAAO,EAAI,MAAM,EAAI,IAC9B,EA1KR,AAA4B,SA0KT,CA1Kf,AAAkC,OAA3B,EAAI,QAAQ,CAAsB,EAAI,QAAQ,CACjC,UAApB,AAA8B,OAAvB,EAAI,IAAI,CAyKgB,AAzKM,EAAI,IAAI,CACvB,UAAU,AAAhC,OAAO,EAAI,MAAM,CAAsB,EAAI,MAAM,CAC9C,EAyKL,GAAiB,IAAb,EAAgB,MAAO,CAAE,IAAI,WAAO,EAAU,SAAQ,QAAO,EACjE,MAAO,CAAE,IAAI,EAAM,SAAU,SAAG,SAAQ,CAAO,CACjD,CAAE,MAAO,EAAY,CAEnB,IAAM,EAA+B,UAApB,OAAO,EAAI,IAAI,CAAgB,EAAI,IAAI,CAAG,EAG3D,MAAO,CAAE,IAAI,WAAO,EAAU,OAFf,KAEuB,OADvB,EAHH,AAEiB,EACK,EACW,CAC/C,CACF,MAHiC,+FCxMjC,IAAA,EAAA,EAAA,CAAA,CAAA,OAiBA,IAAM,EAAQ,IAAI,IACZ,EAAW,IAAI,IAEd,eAAe,EACpB,CAAc,CACd,EAA8B,CAAC,CAAC,EAEhC,IAAM,EAAM,EAAQ,KAAK,EATJ,EASQ,EACvB,EAAM,KAAK,SAAS,CAAC,GACrB,EAAS,EAAM,GAAG,CAAC,GACzB,GAAI,GAAU,KAAK,GAAG,GAAK,EAAO,OAAO,CAAE,OAAO,EAAO,KAAK,CAC9D,IAAM,EAAW,EAAS,GAAG,CAAC,GAC9B,GAAI,EAAU,OAAO,EACrB,IAAM,EAAU,CAAC,UACf,GAAI,CACF,IAAM,EAAQ,MAAM,CAAA,EAAA,EAAA,WAAA,AAAW,EAAC,GAEhC,OADI,EAAM,EAAE,EAAE,EAAM,GAAG,CAAC,EAAK,OAAE,EAAO,QAAS,KAAK,GAAG,GAAK,CAAI,GACzD,CACT,QAAU,CACR,EAAS,MAAM,CAAC,EAClB,EACF,CAAC,GAED,OADA,EAAS,GAAG,CAAC,EAAK,GACX,CACT,0DCzCA,IAAA,EAAA,EAAA,CAAA,CAAA,OAwBO,eAAe,IAIpB,IAAM,EAAM,MAAM,CAAA,EAAA,EAAA,iBAAA,AAAiB,EAAC,CAAC,UAAW,OAAQ,SAAU,YAAY,EAC9E,GAAI,CAAC,EAAI,EAAE,CAET,CAFW,KAEJ,CAAE,IAAI,EAAO,MADR,CACe,CADX,MAAM,CAAC,IAAI,IAAM,CAAC,mCAAmC,EAAE,EAAI,QAAQ,CAAC,CAAC,CACtD,AADuD,EAIxF,GAAI,OA3BwB,EA4B1B,CA5BsC,KA4B/B,CAAE,IAAI,EAAM,GAAA,EApBe,AAoBV,EAAsB,EAAI,EApBF,IAoBQ,CAjBnD,CAVP,AAAI,MAAM,OAAO,CAAC,EAQH,IARS,CAQJ,KAAK,CAAC,IARK,EAC3B,GAAsB,UAAf,OAAO,GAAoB,MAAM,OAAO,CAAE,EAA8B,OAAO,EAChF,CADmF,CAC5C,OAAO,CAEjD,EAJwB,AAItB,EAON,MAAM,CAAC,AAAC,IAAM,CAAQ,GAAmB,UAAb,OAAO,IAA2D,IAAxC,EAA4B,OAAO,EACzF,GAAG,CAAC,AAAC,GAAM,OAAO,EAAE,EAAE,EAAI,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,EAAA,AADf,EAAA,CAAA,CAAA,OACe,uBAAA,AAAuB,EAClC,WAAa,MAAM,AAAI,MAAM,uTAAyT,EACtV,sFACA,+DAHW,CAAA,EADf,AACe,EADf,CAAA,CAAA,OACe,uBAAA,AAAuB,EAClC,WAAa,MAAM,AAAI,MAAM,mSAAqS,EAClU,kEACA,6GCLJ,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAKe,eAAe,EAAc,QAC1C,CAAM,CAGP,EACC,CAAA,EAAA,EAAA,gBAAA,AAAO,IAEP,GAAM,QAAE,CAAM,CAAE,CAAG,MAAM,EACnB,EAAO,MAAM,CAAA,EAAA,EAAA,kBAAA,AAAkB,EAAC,GAEtC,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,0BACb,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,4DACb,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,WACC,CAAA,EAAA,EAAA,IAAA,EAAC,EAAA,OAAI,CAAA,CACH,KAAM,CAAC,OAAO,EAAE,mBAAmB,GAAA,CAAS,CAC5C,UAAU,sFACX,KACI,GAAQ,KAEb,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,sDAA6C,cAC3D,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CAAE,UAAU,8DAAqD,6DAMtE,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,OAAe,CAAA,CAAC,OAAQ,EAAQ,eAAgB,MAAM,CAAA,EAAA,EAAA,eAAA,AAAe,EAAC,gBAG7E,kCAjCuB,+BACG","ignoreList":[0,2,8]}
@@ -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])},94510,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/recipes/[id]/RecipeEditor/index.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/recipes/[id]/RecipeEditor/index.tsx <module evaluation>","default")},87732,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/recipes/[id]/RecipeEditor/index.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/recipes/[id]/RecipeEditor/index.tsx","default")},62485,a=>{"use strict";a.i(94510);var b=a.i(87732);a.n(b)},79604,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(18558),e=a.i(15629),f=a.i(62485);async function g(a){let b=await (0,e.listRecipes)();return b.find(b=>b.id===a)?.kind??null}async function h({params:a}){(0,d.unstable_noStore)();let{id:e}=await a;return await g(e),(0,b.jsxs)("main",{className:"min-h-screen p-8",children:[(0,b.jsx)("div",{className:"mx-auto mb-4 max-w-6xl",children:(0,b.jsx)(c.default,{href:"/recipes",className:"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]",children:"← Back to recipes"})}),(0,b.jsx)(f.default,{recipeId:e})]})}a.s(["default",()=>h,"dynamic",0,"force-dynamic","revalidate",0,0])}];
2
+
3
+ //# sourceMappingURL=%5Broot-of-the-server%5D__e9faef37._.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/app/recipes/%5Bid%5D/RecipeEditor/index.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/recipes/%5Bid%5D/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","// 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/recipes/[id]/RecipeEditor/index.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/recipes/[id]/RecipeEditor/index.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport { listRecipes } from \"@/lib/recipes\";\nimport RecipeEditor from \"./RecipeEditor\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nasync function getKind(id: string): Promise<\"agent\" | \"team\" | null> {\n const recipes = await listRecipes();\n return recipes.find((r) => r.id === id)?.kind ?? null;\n}\n\nexport default async function RecipePage({ params }: { params: Promise<{ id: string }> }) {\n noStore();\n\n const { id } = await params;\n await getKind(id); // Resolved for future redirect logic; kept for cache consistency\n\n // NOTE: We do NOT redirect team recipes to /teams/<id>.\n // /recipes/<id> is the recipe editor/preview surface; /teams/<id> is the installed team editor.\n\n return (\n <main className=\"min-h-screen p-8\">\n <div className=\"mx-auto mb-4 max-w-6xl\">\n <Link\n href=\"/recipes\"\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:text-[color:var(--ck-text-primary)]\"\n >\n ← Back to recipes\n </Link>\n </div>\n <RecipeEditor recipeId={id} />\n </main>\n );\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":"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","ignoreList":[0,2,7]}
@@ -22,6 +22,6 @@ ${h}
22
22
  ${c}`:c;else if(d||a.directives.docStart||!e)a.commentBefore=c;else if(h.isCollection(e)&&!e.flow&&e.items.length>0){let a=e.items[0];h.isPair(a)&&(a=a.key);let b=a.commentBefore;a.commentBefore=b?`${c}
23
23
  ${b}`:c}else{let a=e.commentBefore;e.commentBefore=a?`${c}
24
24
  ${a}`:c}}b?(Array.prototype.push.apply(a.errors,this.errors),Array.prototype.push.apply(a.warnings,this.warnings)):(a.errors=this.errors,a.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:l(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(a,b=!1,c=-1){for(let b of a)yield*this.next(b);yield*this.end(b,c)}*next(a){switch(d.env.LOG_STREAM&&console.dir(a,{depth:null}),a.type){case"directive":this.directives.add(a.source,(b,c,d)=>{let e=k(a);e[0]+=b,this.onError(e,"BAD_DIRECTIVE",c,d)}),this.prelude.push(a.source),this.atDirectives=!0;break;case"document":{let b=i.composeDoc(this.options,this.directives,a,this.onError);this.atDirectives&&!b.directives.docStart&&this.onError(a,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(b,!1),this.doc&&(yield this.doc),this.doc=b,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(a.source);break;case"error":{let b=a.source?`${a.message}: ${JSON.stringify(a.source)}`:a.message,c=new g.YAMLParseError(k(a),"UNEXPECTED_TOKEN",b);this.atDirectives||!this.doc?this.errors.push(c):this.doc.errors.push(c);break}case"doc-end":{if(!this.doc){this.errors.push(new g.YAMLParseError(k(a),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let b=j.resolveEnd(a.end,a.offset+a.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),b.comment){let a=this.doc.comment;this.doc.comment=a?`${a}
25
- ${b.comment}`:b.comment}this.doc.range[2]=b.offset;break}default:this.errors.push(new g.YAMLParseError(k(a),"UNEXPECTED_TOKEN",`Unsupported token ${a.type}`))}}*end(a=!1,b=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(a){let a=Object.assign({_directives:this.directives},this.options),c=new f.Document(void 0,a);this.atDirectives&&this.onError(b,"MISSING_CHAR","Missing directives-end indicator line"),c.range=[0,b,b],this.decorate(c,!1),yield c}}}},86888,(a,b,c)=>{"use strict";var d=a.r(16814),e=a.r(21525),f=a.r(25717),g=a.r(88583);function h(a,b){if(b)for(let c of b)switch(c.type){case"space":case"comment":a.push(c);break;case"newline":return a.push(c),!0}return!1}function i(a,b,c){switch(a.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":a.type=c,a.source=b;break;case"block-scalar":{let d=a.props.slice(1),e=b.length;for(let b of("block-scalar-header"===a.props[0].type&&(e-=a.props[0].source.length),d))b.offset+=e;delete a.props,Object.assign(a,{type:c,source:b,end:d});break}case"block-map":case"block-seq":{let d={type:"newline",offset:a.offset+b.length,indent:a.indent,source:"\n"};delete a.items,Object.assign(a,{type:c,source:b,end:[d]});break}default:{let d="indent"in a?a.indent:-1,e="end"in a&&Array.isArray(a.end)?a.end.filter(a=>"space"===a.type||"comment"===a.type||"newline"===a.type):[];for(let b of Object.keys(a))"type"!==b&&"offset"!==b&&delete a[b];Object.assign(a,{type:c,indent:d,source:b,end:e})}}}c.createScalarToken=function(a,b){let{implicitKey:c=!1,indent:d,inFlow:e=!1,offset:f=-1,type:i="PLAIN"}=b,j=g.stringifyString({type:i,value:a},{implicitKey:c,indent:d>0?" ".repeat(d):"",inFlow:e,options:{blockQuote:!0,lineWidth:-1}}),k=b.end??[{type:"newline",offset:-1,indent:d,source:"\n"}];switch(j[0]){case"|":case">":{let a=j.indexOf("\n"),b=j.substring(0,a),c=j.substring(a+1)+"\n",e=[{type:"block-scalar-header",offset:f,indent:d,source:b}];return h(e,k)||e.push({type:"newline",offset:-1,indent:d,source:"\n"}),{type:"block-scalar",offset:f,indent:d,props:e,source:c}}case'"':return{type:"double-quoted-scalar",offset:f,indent:d,source:j,end:k};case"'":return{type:"single-quoted-scalar",offset:f,indent:d,source:j,end:k};default:return{type:"scalar",offset:f,indent:d,source:j,end:k}}},c.resolveAsScalar=function(a,b=!0,c){if(a){let g=(a,b,d)=>{let e="number"==typeof a?a:Array.isArray(a)?a[0]:a.offset;if(c)c(e,b,d);else throw new f.YAMLParseError([e,e+1],b,d)};switch(a.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return e.resolveFlowScalar(a,b,g);case"block-scalar":return d.resolveBlockScalar({options:{strict:b}},a,g)}}return null},c.setScalarValue=function(a,b,c={}){let{afterKey:d=!1,implicitKey:e=!1,inFlow:f=!1,type:j}=c,k="indent"in a?a.indent:null;if(d&&"number"==typeof k&&(k+=2),!j)switch(a.type){case"single-quoted-scalar":j="QUOTE_SINGLE";break;case"double-quoted-scalar":j="QUOTE_DOUBLE";break;case"block-scalar":{let b=a.props[0];if("block-scalar-header"!==b.type)throw Error("Invalid block scalar header");j=">"===b.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:j="PLAIN"}let l=g.stringifyString({type:j,value:b},{implicitKey:e||null===k,indent:null!==k&&k>0?" ".repeat(k):"",inFlow:f,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(a,b){let c=b.indexOf("\n"),d=b.substring(0,c),e=b.substring(c+1)+"\n";if("block-scalar"===a.type){let b=a.props[0];if("block-scalar-header"!==b.type)throw Error("Invalid block scalar header");b.source=d,a.source=e}else{let{offset:b}=a,c="indent"in a?a.indent:-1,f=[{type:"block-scalar-header",offset:b,indent:c,source:d}];for(let b of(h(f,"end"in a?a.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:"\n"}),Object.keys(a)))"type"!==b&&"offset"!==b&&delete a[b];Object.assign(a,{type:"block-scalar",indent:c,props:f,source:e})}}(a,l);break;case'"':i(a,l,"double-quoted-scalar");break;case"'":i(a,l,"single-quoted-scalar");break;default:i(a,l,"scalar")}}},25449,(a,b,c)=>{"use strict";function d(a){switch(a.type){case"block-scalar":{let b="";for(let c of a.props)b+=d(c);return b+a.source}case"block-map":case"block-seq":{let b="";for(let c of a.items)b+=e(c);return b}case"flow-collection":{let b=a.start.source;for(let c of a.items)b+=e(c);for(let c of a.end)b+=c.source;return b}case"document":{let b=e(a);if(a.end)for(let c of a.end)b+=c.source;return b}default:{let b=a.source;if("end"in a&&a.end)for(let c of a.end)b+=c.source;return b}}}function e({start:a,key:b,sep:c,value:e}){let f="";for(let b of a)f+=b.source;if(b&&(f+=d(b)),c)for(let a of c)f+=a.source;return e&&(f+=d(e)),f}c.stringify=a=>"type"in a?d(a):e(a)},2135,(a,b,c)=>{"use strict";let d=Symbol("break visit"),e=Symbol("skip children"),f=Symbol("remove item");function g(a,b){"type"in a&&"document"===a.type&&(a={start:a.start,value:a.value}),function a(b,c,e){let g=e(c,b);if("symbol"==typeof g)return g;for(let h of["key","value"]){let i=c[h];if(i&&"items"in i){for(let c=0;c<i.items.length;++c){let g=a(Object.freeze(b.concat([[h,c]])),i.items[c],e);if("number"==typeof g)c=g-1;else{if(g===d)return d;g===f&&(i.items.splice(c,1),c-=1)}}"function"==typeof g&&"key"===h&&(g=g(c,b))}}return"function"==typeof g?g(c,b):g}(Object.freeze([]),a,b)}g.BREAK=d,g.SKIP=e,g.REMOVE=f,g.itemAtPath=(a,b)=>{let c=a;for(let[a,d]of b){let b=c?.[a];if(!b||!("items"in b))return;c=b.items[d]}return c},g.parentCollection=(a,b)=>{let c=g.itemAtPath(a,b.slice(0,-1)),d=b[b.length-1][0],e=c?.[d];if(e&&"items"in e)return e;throw Error("Parent collection not found")},c.visit=g},2704,(a,b,c)=>{"use strict";var d=a.r(86888),e=a.r(25449),f=a.r(2135);c.createScalarToken=d.createScalarToken,c.resolveAsScalar=d.resolveAsScalar,c.setScalarValue=d.setScalarValue,c.stringify=e.stringify,c.visit=f.visit,c.BOM="\uFEFF",c.DOCUMENT="\x02",c.FLOW_END="\x18",c.SCALAR="\x1f",c.isCollection=a=>!!a&&"items"in a,c.isScalar=a=>!!a&&("scalar"===a.type||"single-quoted-scalar"===a.type||"double-quoted-scalar"===a.type||"block-scalar"===a.type),c.prettyToken=function(a){switch(a){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(a)}},c.tokenType=function(a){switch(a){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(a[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}},66326,(a,b,c)=>{"use strict";var d=a.r(2704);function e(a){switch(a){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let f=new Set("0123456789ABCDEFabcdef"),g=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),h=new Set(",[]{}"),i=new Set(" ,[]{}\n\r "),j=a=>!a||i.has(a);c.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(a,b=!1){if(a){if("string"!=typeof a)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+a:a,this.lineEndPos=null}this.atEnd=!b;let c=this.next??"stream";for(;c&&(b||this.hasChars(1));)c=yield*this.parseNext(c)}atLineEnd(){let a=this.pos,b=this.buffer[a];for(;" "===b||" "===b;)b=this.buffer[++a];return!b||"#"===b||"\n"===b||"\r"===b&&"\n"===this.buffer[a+1]}charAt(a){return this.buffer[this.pos+a]}continueScalar(a){let b=this.buffer[a];if(this.indentNext>0){let c=0;for(;" "===b;)b=this.buffer[++c+a];if("\r"===b){let b=this.buffer[c+a+1];if("\n"===b||!b&&!this.atEnd)return a+c+1}return"\n"!==b&&!(c>=this.indentNext)&&(b||this.atEnd)?-1:a+c}if("-"===b||"."===b){let b=this.buffer.substr(a,3);if(("---"===b||"..."===b)&&e(this.buffer[a+3]))return -1}return a}getLine(){let a=this.lineEndPos;return(("number"!=typeof a||-1!==a&&a<this.pos)&&(a=this.buffer.indexOf("\n",this.pos),this.lineEndPos=a),-1===a)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[a-1]&&(a-=1),this.buffer.substring(this.pos,a))}hasChars(a){return this.pos+a<=this.buffer.length}setNext(a){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=a,null}peek(a){return this.buffer.substr(this.pos,a)}*parseNext(a){switch(a){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let a=this.getLine();if(null===a)return this.setNext("stream");if(a[0]===d.BOM&&(yield*this.pushCount(1),a=a.substring(1)),"%"===a[0]){let b=a.length,c=a.indexOf("#");for(;-1!==c;){let d=a[c-1];if(" "===d||" "===d){b=c-1;break}c=a.indexOf("#",c+1)}for(;;){let c=a[b-1];if(" "===c||" "===c)b-=1;else break}let d=(yield*this.pushCount(b))+(yield*this.pushSpaces(!0));return yield*this.pushCount(a.length-d),this.pushNewline(),"stream"}if(this.atLineEnd()){let b=yield*this.pushSpaces(!0);return yield*this.pushCount(a.length-b),yield*this.pushNewline(),"stream"}return yield d.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let a=this.charAt(0);if(!a&&!this.atEnd)return this.setNext("line-start");if("-"===a||"."===a){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let a=this.peek(3);if(("---"===a||"..."===a)&&e(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===a?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!e(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[a,b]=this.peek(2);if(!b&&!this.atEnd)return this.setNext("block-start");if(("-"===a||"?"===a||":"===a)&&e(b)){let a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let a=this.getLine();if(null===a)return this.setNext("doc");let b=yield*this.pushIndicators();switch(a[b]){case"#":yield*this.pushCount(a.length-b);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(j),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return b+=yield*this.parseBlockScalarHeader(),b+=yield*this.pushSpaces(!0),yield*this.pushCount(a.length-b),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let a,b,c=-1;do(a=yield*this.pushNewline())>0?(b=yield*this.pushSpaces(!1),this.indentValue=c=b):b=0,b+=yield*this.pushSpaces(!0);while(a+b>0)let f=this.getLine();if(null===f)return this.setNext("flow");if((-1!==c&&c<this.indentNext&&"#"!==f[0]||0===c&&(f.startsWith("---")||f.startsWith("..."))&&e(f[3]))&&(c!==this.indentNext-1||1!==this.flowLevel||"]"!==f[0]&&"}"!==f[0]))return this.flowLevel=0,yield d.FLOW_END,yield*this.parseLineStart();let g=0;for(;","===f[g];)g+=yield*this.pushCount(1),g+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(f[g+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(f.length-g),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(j),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||e(a)||","===a)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let a=this.charAt(0),b=this.buffer.indexOf(a,this.pos+1);if("'"===a)for(;-1!==b&&"'"===this.buffer[b+1];)b=this.buffer.indexOf("'",b+2);else for(;-1!==b;){let a=0;for(;"\\"===this.buffer[b-1-a];)a+=1;if(a%2==0)break;b=this.buffer.indexOf('"',b+1)}let c=this.buffer.substring(0,b),d=c.indexOf("\n",this.pos);if(-1!==d){for(;-1!==d;){let a=this.continueScalar(d+1);if(-1===a)break;d=c.indexOf("\n",a)}-1!==d&&(b=d-("\r"===c[d-1]?2:1))}if(-1===b){if(!this.atEnd)return this.setNext("quoted-scalar");b=this.buffer.length}return yield*this.pushToIndex(b+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let a=this.pos;for(;;){let b=this.buffer[++a];if("+"===b)this.blockScalarKeep=!0;else if(b>"0"&&b<="9")this.blockScalarIndent=Number(b)-1;else if("-"!==b)break}return yield*this.pushUntil(a=>e(a)||"#"===a)}*parseBlockScalar(){let a,b=this.pos-1,c=0;a:for(let d=this.pos;a=this.buffer[d];++d)switch(a){case" ":c+=1;break;case"\n":b=d,c=0;break;case"\r":{let a=this.buffer[d+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if("\n"===a)break}default:break a}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(c>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=c:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let a=this.continueScalar(b+1);if(-1===a)break;b=this.buffer.indexOf("\n",a)}while(-1!==b)if(-1===b){if(!this.atEnd)return this.setNext("block-scalar");b=this.buffer.length}}let e=b+1;for(a=this.buffer[e];" "===a;)a=this.buffer[++e];if(" "===a){for(;" "===a||" "===a||"\r"===a||"\n"===a;)a=this.buffer[++e];b=e-1}else if(!this.blockScalarKeep)for(;;){let a=b-1,d=this.buffer[a];"\r"===d&&(d=this.buffer[--a]);let e=a;for(;" "===d;)d=this.buffer[--a];if("\n"===d&&a>=this.pos&&a+1+c>e)b=a;else break}return yield d.SCALAR,yield*this.pushToIndex(b+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let a,b=this.flowLevel>0,c=this.pos-1,f=this.pos-1;for(;a=this.buffer[++f];)if(":"===a){let a=this.buffer[f+1];if(e(a)||b&&h.has(a))break;c=f}else if(e(a)){let d=this.buffer[f+1];if("\r"===a&&("\n"===d?(f+=1,a="\n",d=this.buffer[f+1]):c=f),"#"===d||b&&h.has(d))break;if("\n"===a){let a=this.continueScalar(f+1);if(-1===a)break;f=Math.max(f,a-2)}}else{if(b&&h.has(a))break;c=f}return a||this.atEnd?(yield d.SCALAR,yield*this.pushToIndex(c+1,!0),b?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(a){return a>0?(yield this.buffer.substr(this.pos,a),this.pos+=a,a):0}*pushToIndex(a,b){let c=this.buffer.slice(this.pos,a);return c?(yield c,this.pos+=c.length,c.length):(b&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(j))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let a=this.flowLevel>0,b=this.charAt(1);if(e(b)||a&&h.has(b))return a?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let a=this.pos+2,b=this.buffer[a];for(;!e(b)&&">"!==b;)b=this.buffer[++a];return yield*this.pushToIndex(">"===b?a+1:a,!1)}{let a=this.pos+1,b=this.buffer[a];for(;b;)if(g.has(b))b=this.buffer[++a];else if("%"===b&&f.has(this.buffer[a+1])&&f.has(this.buffer[a+2]))b=this.buffer[a+=3];else break;return yield*this.pushToIndex(a,!1)}}*pushNewline(){let a=this.buffer[this.pos];return"\n"===a?yield*this.pushCount(1):"\r"===a&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(a){let b,c=this.pos-1;do b=this.buffer[++c];while(" "===b||a&&" "===b)let d=c-this.pos;return d>0&&(yield this.buffer.substr(this.pos,d),this.pos=c),d}*pushUntil(a){let b=this.pos,c=this.buffer[b];for(;!a(c);)c=this.buffer[++b];return yield*this.pushToIndex(b,!1)}}},46987,(a,b,c)=>{"use strict";c.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=a=>this.lineStarts.push(a),this.linePos=a=>{let b=0,c=this.lineStarts.length;for(;b<c;){let d=b+c>>1;this.lineStarts[d]<a?b=d+1:c=d}if(this.lineStarts[b]===a)return{line:b+1,col:1};if(0===b)return{line:0,col:a};let d=this.lineStarts[b-1];return{line:b,col:a-d+1}}}}},9575,(a,b,c)=>{"use strict";var d=a.r(5365),e=a.r(2704),f=a.r(66326);function g(a,b){for(let c=0;c<a.length;++c)if(a[c].type===b)return!0;return!1}function h(a){for(let b=0;b<a.length;++b)switch(a[b].type){case"space":case"comment":case"newline":break;default:return b}return -1}function i(a){switch(a?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function j(a){switch(a.type){case"document":return a.start;case"block-map":{let b=a.items[a.items.length-1];return b.sep??b.start}case"block-seq":return a.items[a.items.length-1].start;default:return[]}}function k(a){if(0===a.length)return[];let b=a.length;a:for(;--b>=0;)switch(a[b].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break a}for(;a[++b]?.type==="space";);return a.splice(b,a.length)}function l(a){if("flow-seq-start"===a.start.type)for(let b of a.items)!b.sep||b.value||g(b.start,"explicit-key-ind")||g(b.sep,"map-value-ind")||(b.key&&(b.value=b.key),delete b.key,i(b.value)?b.value.end?Array.prototype.push.apply(b.value.end,b.sep):b.value.end=b.sep:Array.prototype.push.apply(b.start,b.sep),delete b.sep)}c.Parser=class{constructor(a){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new f.Lexer,this.onNewLine=a}*parse(a,b=!1){for(let c of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(a,b)))yield*this.next(c);b||(yield*this.end())}*next(a){if(this.source=a,d.env.LOG_TOKENS&&console.log("|",e.prettyToken(a)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=a.length;return}let b=e.tokenType(a);if(b)if("scalar"===b)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=b,yield*this.step(),b){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+a.length);break;case"space":this.atNewLine&&" "===a[0]&&(this.indent+=a.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=a.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=a.length}else{let b=`Not a YAML token: ${a}`;yield*this.pop({type:"error",offset:this.offset,message:b,source:a}),this.offset+=a.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let a=this.peek(1);if("doc-end"===this.type&&a?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!a)return yield*this.stream();switch(a.type){case"document":return yield*this.document(a);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(a);case"block-scalar":return yield*this.blockScalar(a);case"block-map":return yield*this.blockMap(a);case"block-seq":return yield*this.blockSequence(a);case"flow-collection":return yield*this.flowCollection(a);case"doc-end":return yield*this.documentEnd(a)}yield*this.pop()}peek(a){return this.stack[this.stack.length-a]}*pop(a){let b=a??this.stack.pop();if(b)if(0===this.stack.length)yield b;else{let a=this.peek(1);switch("block-scalar"===b.type?b.indent="indent"in a?a.indent:0:"flow-collection"===b.type&&"document"===a.type&&(b.indent=0),"flow-collection"===b.type&&l(b),a.type){case"document":a.value=b;break;case"block-scalar":a.props.push(b);break;case"block-map":{let c=a.items[a.items.length-1];if(c.value){a.items.push({start:[],key:b,sep:[]}),this.onKeyLine=!0;return}if(c.sep)c.value=b;else{Object.assign(c,{key:b,sep:[]}),this.onKeyLine=!c.explicitKey;return}break}case"block-seq":{let c=a.items[a.items.length-1];c.value?a.items.push({start:[],value:b}):c.value=b;break}case"flow-collection":{let c=a.items[a.items.length-1];!c||c.value?a.items.push({start:[],key:b,sep:[]}):c.sep?c.value=b:Object.assign(c,{key:b,sep:[]});return}default:yield*this.pop(),yield*this.pop(b)}if(("document"===a.type||"block-map"===a.type||"block-seq"===a.type)&&("block-map"===b.type||"block-seq"===b.type)){let c=b.items[b.items.length-1];c&&!c.sep&&!c.value&&c.start.length>0&&-1===h(c.start)&&(0===b.indent||c.start.every(a=>"comment"!==a.type||a.indent<b.indent))&&("document"===a.type?a.end=c.start:a.items.push({start:c.start}),b.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let a={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&a.start.push(this.sourceToken),this.stack.push(a);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(a){if(a.value)return yield*this.lineEnd(a);switch(this.type){case"doc-start":-1!==h(a.start)?(yield*this.pop(),yield*this.step()):a.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":a.start.push(this.sourceToken);return}let b=this.startBlockValue(a);b?this.stack.push(b):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(a){if("map-value-ind"===this.type){let b,c=k(j(this.peek(2)));a.end?((b=a.end).push(this.sourceToken),delete a.end):b=[this.sourceToken];let d={type:"block-map",offset:a.offset,indent:a.indent,items:[{start:c,key:a,sep:b}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(a)}*blockScalar(a){switch(this.type){case"space":case"comment":case"newline":a.props.push(this.sourceToken);return;case"scalar":if(a.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let a=this.source.indexOf("\n")+1;for(;0!==a;)this.onNewLine(this.offset+a),a=this.source.indexOf("\n",a)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(a){let b=a.items[a.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,b.value){let c="end"in b.value?b.value.end:void 0,d=Array.isArray(c)?c[c.length-1]:void 0;d?.type==="comment"?c?.push(this.sourceToken):a.items.push({start:[this.sourceToken]})}else b.sep?b.sep.push(this.sourceToken):b.start.push(this.sourceToken);return;case"space":case"comment":if(b.value)a.items.push({start:[this.sourceToken]});else if(b.sep)b.sep.push(this.sourceToken);else{if(this.atIndentedComment(b.start,a.indent)){let c=a.items[a.items.length-2],d=c?.value?.end;if(Array.isArray(d)){Array.prototype.push.apply(d,b.start),d.push(this.sourceToken),a.items.pop();return}}b.start.push(this.sourceToken)}return}if(this.indent>=a.indent){let c=!this.onKeyLine&&this.indent===a.indent,d=c&&(b.sep||b.explicitKey)&&"seq-item-ind"!==this.type,e=[];if(d&&b.sep&&!b.value){let c=[];for(let d=0;d<b.sep.length;++d){let e=b.sep[d];switch(e.type){case"newline":c.push(d);break;case"space":break;case"comment":e.indent>a.indent&&(c.length=0);break;default:c.length=0}}c.length>=2&&(e=b.sep.splice(c[1]))}switch(this.type){case"anchor":case"tag":d||b.value?(e.push(this.sourceToken),a.items.push({start:e}),this.onKeyLine=!0):b.sep?b.sep.push(this.sourceToken):b.start.push(this.sourceToken);return;case"explicit-key-ind":b.sep||b.explicitKey?d||b.value?(e.push(this.sourceToken),a.items.push({start:e,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(b.start.push(this.sourceToken),b.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(b.explicitKey)if(b.sep)if(b.value)a.items.push({start:[],key:null,sep:[this.sourceToken]});else if(g(b.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]});else if(i(b.key)&&!g(b.sep,"newline")){let a=k(b.start),c=b.key,d=b.sep;d.push(this.sourceToken),delete b.key,delete b.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:c,sep:d}]})}else e.length>0?b.sep=b.sep.concat(e,this.sourceToken):b.sep.push(this.sourceToken);else if(g(b.start,"newline"))Object.assign(b,{key:null,sep:[this.sourceToken]});else{let a=k(b.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else b.sep?b.value||d?a.items.push({start:e,key:null,sep:[this.sourceToken]}):g(b.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):b.sep.push(this.sourceToken):Object.assign(b,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let c=this.flowScalar(this.type);d||b.value?(a.items.push({start:e,key:c,sep:[]}),this.onKeyLine=!0):b.sep?this.stack.push(c):(Object.assign(b,{key:c,sep:[]}),this.onKeyLine=!0);return}default:{let d=this.startBlockValue(a);if(d){if("block-seq"===d.type){if(!b.explicitKey&&b.sep&&!g(b.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else c&&a.items.push({start:e});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(a){let b=a.items[a.items.length-1];switch(this.type){case"newline":if(b.value){let c="end"in b.value?b.value.end:void 0,d=Array.isArray(c)?c[c.length-1]:void 0;d?.type==="comment"?c?.push(this.sourceToken):a.items.push({start:[this.sourceToken]})}else b.start.push(this.sourceToken);return;case"space":case"comment":if(b.value)a.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(b.start,a.indent)){let c=a.items[a.items.length-2],d=c?.value?.end;if(Array.isArray(d)){Array.prototype.push.apply(d,b.start),d.push(this.sourceToken),a.items.pop();return}}b.start.push(this.sourceToken)}return;case"anchor":case"tag":if(b.value||this.indent<=a.indent)break;b.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==a.indent)break;b.value||g(b.start,"seq-item-ind")?a.items.push({start:[this.sourceToken]}):b.start.push(this.sourceToken);return}if(this.indent>a.indent){let b=this.startBlockValue(a);if(b)return void this.stack.push(b)}yield*this.pop(),yield*this.step()}*flowCollection(a){let b=a.items[a.items.length-1];if("flow-error-end"===this.type){let a;do yield*this.pop(),a=this.peek(1);while(a?.type==="flow-collection")}else if(0===a.end.length){switch(this.type){case"comma":case"explicit-key-ind":!b||b.sep?a.items.push({start:[this.sourceToken]}):b.start.push(this.sourceToken);return;case"map-value-ind":!b||b.value?a.items.push({start:[],key:null,sep:[this.sourceToken]}):b.sep?b.sep.push(this.sourceToken):Object.assign(b,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!b||b.value?a.items.push({start:[this.sourceToken]}):b.sep?b.sep.push(this.sourceToken):b.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let c=this.flowScalar(this.type);!b||b.value?a.items.push({start:[],key:c,sep:[]}):b.sep?this.stack.push(c):Object.assign(b,{key:c,sep:[]});return}case"flow-map-end":case"flow-seq-end":a.end.push(this.sourceToken);return}let c=this.startBlockValue(a);c?this.stack.push(c):(yield*this.pop(),yield*this.step())}else{let b=this.peek(2);if("block-map"!==b.type||("map-value-ind"!==this.type||b.indent!==a.indent)&&("newline"!==this.type||b.items[b.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==b.type){let c=k(j(b));l(a);let d=a.end.splice(1,a.end.length);d.push(this.sourceToken);let e={type:"block-map",offset:a.offset,indent:a.indent,items:[{start:c,key:a,sep:d}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=e}else yield*this.lineEnd(a);else yield*this.pop(),yield*this.step()}}flowScalar(a){if(this.onNewLine){let a=this.source.indexOf("\n")+1;for(;0!==a;)this.onNewLine(this.offset+a),a=this.source.indexOf("\n",a)+1}return{type:a,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(a){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let b=k(j(a));return b.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:b,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let b=k(j(a));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:b,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(a,b){return"comment"===this.type&&!(this.indent<=b)&&a.every(a=>"newline"===a.type||"space"===a.type)}*documentEnd(a){"doc-mode"!==this.type&&(a.end?a.end.push(this.sourceToken):a.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(a){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:a.end?a.end.push(this.sourceToken):a.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},5013,(a,b,c)=>{"use strict";var d=a.r(19662),e=a.r(85774),f=a.r(25717),g=a.r(18114),h=a.r(27267),i=a.r(46987),j=a.r(9575);function k(a){let b=!1!==a.prettyErrors;return{lineCounter:a.lineCounter||b&&new i.LineCounter||null,prettyErrors:b}}function l(a,b={}){let{lineCounter:c,prettyErrors:e}=k(b),g=new j.Parser(c?.addNewLine),h=new d.Composer(b),i=null;for(let b of h.compose(g.parse(a),!0,a.length))if(i){if("silent"!==i.options.logLevel){i.errors.push(new f.YAMLParseError(b.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else i=b;return e&&c&&(i.errors.forEach(f.prettifyError(a,c)),i.warnings.forEach(f.prettifyError(a,c))),i}c.parse=function(a,b,c){let d;"function"==typeof b?d=b:void 0===c&&b&&"object"==typeof b&&(c=b);let e=l(a,c);if(!e)return null;if(e.warnings.forEach(a=>g.warn(e.options.logLevel,a)),e.errors.length>0)if("silent"!==e.options.logLevel)throw e.errors[0];else e.errors=[];return e.toJS(Object.assign({reviver:d},c))},c.parseAllDocuments=function(a,b={}){let{lineCounter:c,prettyErrors:e}=k(b),g=new j.Parser(c?.addNewLine),h=new d.Composer(b),i=Array.from(h.compose(g.parse(a)));if(e&&c)for(let b of i)b.errors.forEach(f.prettifyError(a,c)),b.warnings.forEach(f.prettifyError(a,c));return i.length>0?i:Object.assign([],{empty:!0},h.streamInfo())},c.parseDocument=l,c.stringify=function(a,b,c){let d=null;if("function"==typeof b||Array.isArray(b)?d=b:void 0===c&&b&&(c=b),"string"==typeof c&&(c=c.length),"number"==typeof c){let a=Math.round(c);c=a<1?void 0:a>8?{indent:8}:{indent:a}}if(void 0===a){let{keepUndefined:a}=c??b??{};if(!a)return}return h.isDocument(a)&&!d?a.toString(c):new e.Document(a,d,c).toString(c)}},22650,(a,b,c)=>{"use strict";var d=a.r(19662),e=a.r(85774),f=a.r(98027),g=a.r(25717),h=a.r(21562),i=a.r(27267),j=a.r(17602),k=a.r(27853),l=a.r(47544),m=a.r(7621),n=a.r(2704),o=a.r(66326),p=a.r(46987),q=a.r(9575),r=a.r(5013),s=a.r(85927);c.Composer=d.Composer,c.Document=e.Document,c.Schema=f.Schema,c.YAMLError=g.YAMLError,c.YAMLParseError=g.YAMLParseError,c.YAMLWarning=g.YAMLWarning,c.Alias=h.Alias,c.isAlias=i.isAlias,c.isCollection=i.isCollection,c.isDocument=i.isDocument,c.isMap=i.isMap,c.isNode=i.isNode,c.isPair=i.isPair,c.isScalar=i.isScalar,c.isSeq=i.isSeq,c.Pair=j.Pair,c.Scalar=k.Scalar,c.YAMLMap=l.YAMLMap,c.YAMLSeq=m.YAMLSeq,c.CST=n,c.Lexer=o.Lexer,c.LineCounter=p.LineCounter,c.Parser=q.Parser,c.parse=r.parse,c.parseAllDocuments=r.parseAllDocuments,c.parseDocument=r.parseDocument,c.stringify=r.stringify,c.visit=s.visit,c.visitAsync=s.visitAsync},15629,a=>{"use strict";a.i(12714),a.i(50227),a.i(22650);var b=a.i(83643);async function c(a){let b=(await d()).find(b=>"team"===b.kind&&b.id===a);return b?.name??null}async function d(){let a=await (0,b.runOpenClaw)(["recipes","list"]);if(!a.ok)return[];try{return JSON.parse(a.stdout)}catch{return[]}}a.i(28215),a.s(["getTeamDisplayName",()=>c,"listRecipes",()=>d])}];
25
+ ${b.comment}`:b.comment}this.doc.range[2]=b.offset;break}default:this.errors.push(new g.YAMLParseError(k(a),"UNEXPECTED_TOKEN",`Unsupported token ${a.type}`))}}*end(a=!1,b=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(a){let a=Object.assign({_directives:this.directives},this.options),c=new f.Document(void 0,a);this.atDirectives&&this.onError(b,"MISSING_CHAR","Missing directives-end indicator line"),c.range=[0,b,b],this.decorate(c,!1),yield c}}}},86888,(a,b,c)=>{"use strict";var d=a.r(16814),e=a.r(21525),f=a.r(25717),g=a.r(88583);function h(a,b){if(b)for(let c of b)switch(c.type){case"space":case"comment":a.push(c);break;case"newline":return a.push(c),!0}return!1}function i(a,b,c){switch(a.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":a.type=c,a.source=b;break;case"block-scalar":{let d=a.props.slice(1),e=b.length;for(let b of("block-scalar-header"===a.props[0].type&&(e-=a.props[0].source.length),d))b.offset+=e;delete a.props,Object.assign(a,{type:c,source:b,end:d});break}case"block-map":case"block-seq":{let d={type:"newline",offset:a.offset+b.length,indent:a.indent,source:"\n"};delete a.items,Object.assign(a,{type:c,source:b,end:[d]});break}default:{let d="indent"in a?a.indent:-1,e="end"in a&&Array.isArray(a.end)?a.end.filter(a=>"space"===a.type||"comment"===a.type||"newline"===a.type):[];for(let b of Object.keys(a))"type"!==b&&"offset"!==b&&delete a[b];Object.assign(a,{type:c,indent:d,source:b,end:e})}}}c.createScalarToken=function(a,b){let{implicitKey:c=!1,indent:d,inFlow:e=!1,offset:f=-1,type:i="PLAIN"}=b,j=g.stringifyString({type:i,value:a},{implicitKey:c,indent:d>0?" ".repeat(d):"",inFlow:e,options:{blockQuote:!0,lineWidth:-1}}),k=b.end??[{type:"newline",offset:-1,indent:d,source:"\n"}];switch(j[0]){case"|":case">":{let a=j.indexOf("\n"),b=j.substring(0,a),c=j.substring(a+1)+"\n",e=[{type:"block-scalar-header",offset:f,indent:d,source:b}];return h(e,k)||e.push({type:"newline",offset:-1,indent:d,source:"\n"}),{type:"block-scalar",offset:f,indent:d,props:e,source:c}}case'"':return{type:"double-quoted-scalar",offset:f,indent:d,source:j,end:k};case"'":return{type:"single-quoted-scalar",offset:f,indent:d,source:j,end:k};default:return{type:"scalar",offset:f,indent:d,source:j,end:k}}},c.resolveAsScalar=function(a,b=!0,c){if(a){let g=(a,b,d)=>{let e="number"==typeof a?a:Array.isArray(a)?a[0]:a.offset;if(c)c(e,b,d);else throw new f.YAMLParseError([e,e+1],b,d)};switch(a.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return e.resolveFlowScalar(a,b,g);case"block-scalar":return d.resolveBlockScalar({options:{strict:b}},a,g)}}return null},c.setScalarValue=function(a,b,c={}){let{afterKey:d=!1,implicitKey:e=!1,inFlow:f=!1,type:j}=c,k="indent"in a?a.indent:null;if(d&&"number"==typeof k&&(k+=2),!j)switch(a.type){case"single-quoted-scalar":j="QUOTE_SINGLE";break;case"double-quoted-scalar":j="QUOTE_DOUBLE";break;case"block-scalar":{let b=a.props[0];if("block-scalar-header"!==b.type)throw Error("Invalid block scalar header");j=">"===b.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:j="PLAIN"}let l=g.stringifyString({type:j,value:b},{implicitKey:e||null===k,indent:null!==k&&k>0?" ".repeat(k):"",inFlow:f,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(a,b){let c=b.indexOf("\n"),d=b.substring(0,c),e=b.substring(c+1)+"\n";if("block-scalar"===a.type){let b=a.props[0];if("block-scalar-header"!==b.type)throw Error("Invalid block scalar header");b.source=d,a.source=e}else{let{offset:b}=a,c="indent"in a?a.indent:-1,f=[{type:"block-scalar-header",offset:b,indent:c,source:d}];for(let b of(h(f,"end"in a?a.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:"\n"}),Object.keys(a)))"type"!==b&&"offset"!==b&&delete a[b];Object.assign(a,{type:"block-scalar",indent:c,props:f,source:e})}}(a,l);break;case'"':i(a,l,"double-quoted-scalar");break;case"'":i(a,l,"single-quoted-scalar");break;default:i(a,l,"scalar")}}},25449,(a,b,c)=>{"use strict";function d(a){switch(a.type){case"block-scalar":{let b="";for(let c of a.props)b+=d(c);return b+a.source}case"block-map":case"block-seq":{let b="";for(let c of a.items)b+=e(c);return b}case"flow-collection":{let b=a.start.source;for(let c of a.items)b+=e(c);for(let c of a.end)b+=c.source;return b}case"document":{let b=e(a);if(a.end)for(let c of a.end)b+=c.source;return b}default:{let b=a.source;if("end"in a&&a.end)for(let c of a.end)b+=c.source;return b}}}function e({start:a,key:b,sep:c,value:e}){let f="";for(let b of a)f+=b.source;if(b&&(f+=d(b)),c)for(let a of c)f+=a.source;return e&&(f+=d(e)),f}c.stringify=a=>"type"in a?d(a):e(a)},2135,(a,b,c)=>{"use strict";let d=Symbol("break visit"),e=Symbol("skip children"),f=Symbol("remove item");function g(a,b){"type"in a&&"document"===a.type&&(a={start:a.start,value:a.value}),function a(b,c,e){let g=e(c,b);if("symbol"==typeof g)return g;for(let h of["key","value"]){let i=c[h];if(i&&"items"in i){for(let c=0;c<i.items.length;++c){let g=a(Object.freeze(b.concat([[h,c]])),i.items[c],e);if("number"==typeof g)c=g-1;else{if(g===d)return d;g===f&&(i.items.splice(c,1),c-=1)}}"function"==typeof g&&"key"===h&&(g=g(c,b))}}return"function"==typeof g?g(c,b):g}(Object.freeze([]),a,b)}g.BREAK=d,g.SKIP=e,g.REMOVE=f,g.itemAtPath=(a,b)=>{let c=a;for(let[a,d]of b){let b=c?.[a];if(!b||!("items"in b))return;c=b.items[d]}return c},g.parentCollection=(a,b)=>{let c=g.itemAtPath(a,b.slice(0,-1)),d=b[b.length-1][0],e=c?.[d];if(e&&"items"in e)return e;throw Error("Parent collection not found")},c.visit=g},2704,(a,b,c)=>{"use strict";var d=a.r(86888),e=a.r(25449),f=a.r(2135);c.createScalarToken=d.createScalarToken,c.resolveAsScalar=d.resolveAsScalar,c.setScalarValue=d.setScalarValue,c.stringify=e.stringify,c.visit=f.visit,c.BOM="\uFEFF",c.DOCUMENT="\x02",c.FLOW_END="\x18",c.SCALAR="\x1f",c.isCollection=a=>!!a&&"items"in a,c.isScalar=a=>!!a&&("scalar"===a.type||"single-quoted-scalar"===a.type||"double-quoted-scalar"===a.type||"block-scalar"===a.type),c.prettyToken=function(a){switch(a){case"\uFEFF":return"<BOM>";case"\x02":return"<DOC>";case"\x18":return"<FLOW_END>";case"\x1f":return"<SCALAR>";default:return JSON.stringify(a)}},c.tokenType=function(a){switch(a){case"\uFEFF":return"byte-order-mark";case"\x02":return"doc-mode";case"\x18":return"flow-error-end";case"\x1f":return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(a[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}},66326,(a,b,c)=>{"use strict";var d=a.r(2704);function e(a){switch(a){case void 0:case" ":case"\n":case"\r":case" ":return!0;default:return!1}}let f=new Set("0123456789ABCDEFabcdef"),g=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),h=new Set(",[]{}"),i=new Set(" ,[]{}\n\r "),j=a=>!a||i.has(a);c.Lexer=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(a,b=!1){if(a){if("string"!=typeof a)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+a:a,this.lineEndPos=null}this.atEnd=!b;let c=this.next??"stream";for(;c&&(b||this.hasChars(1));)c=yield*this.parseNext(c)}atLineEnd(){let a=this.pos,b=this.buffer[a];for(;" "===b||" "===b;)b=this.buffer[++a];return!b||"#"===b||"\n"===b||"\r"===b&&"\n"===this.buffer[a+1]}charAt(a){return this.buffer[this.pos+a]}continueScalar(a){let b=this.buffer[a];if(this.indentNext>0){let c=0;for(;" "===b;)b=this.buffer[++c+a];if("\r"===b){let b=this.buffer[c+a+1];if("\n"===b||!b&&!this.atEnd)return a+c+1}return"\n"!==b&&!(c>=this.indentNext)&&(b||this.atEnd)?-1:a+c}if("-"===b||"."===b){let b=this.buffer.substr(a,3);if(("---"===b||"..."===b)&&e(this.buffer[a+3]))return -1}return a}getLine(){let a=this.lineEndPos;return(("number"!=typeof a||-1!==a&&a<this.pos)&&(a=this.buffer.indexOf("\n",this.pos),this.lineEndPos=a),-1===a)?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[a-1]&&(a-=1),this.buffer.substring(this.pos,a))}hasChars(a){return this.pos+a<=this.buffer.length}setNext(a){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=a,null}peek(a){return this.buffer.substr(this.pos,a)}*parseNext(a){switch(a){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let a=this.getLine();if(null===a)return this.setNext("stream");if(a[0]===d.BOM&&(yield*this.pushCount(1),a=a.substring(1)),"%"===a[0]){let b=a.length,c=a.indexOf("#");for(;-1!==c;){let d=a[c-1];if(" "===d||" "===d){b=c-1;break}c=a.indexOf("#",c+1)}for(;;){let c=a[b-1];if(" "===c||" "===c)b-=1;else break}let d=(yield*this.pushCount(b))+(yield*this.pushSpaces(!0));return yield*this.pushCount(a.length-d),this.pushNewline(),"stream"}if(this.atLineEnd()){let b=yield*this.pushSpaces(!0);return yield*this.pushCount(a.length-b),yield*this.pushNewline(),"stream"}return yield d.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let a=this.charAt(0);if(!a&&!this.atEnd)return this.setNext("line-start");if("-"===a||"."===a){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let a=this.peek(3);if(("---"===a||"..."===a)&&e(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===a?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!e(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[a,b]=this.peek(2);if(!b&&!this.atEnd)return this.setNext("block-start");if(("-"===a||"?"===a||":"===a)&&e(b)){let a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let a=this.getLine();if(null===a)return this.setNext("doc");let b=yield*this.pushIndicators();switch(a[b]){case"#":yield*this.pushCount(a.length-b);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(j),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return b+=yield*this.parseBlockScalarHeader(),b+=yield*this.pushSpaces(!0),yield*this.pushCount(a.length-b),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let a,b,c=-1;do(a=yield*this.pushNewline())>0?(b=yield*this.pushSpaces(!1),this.indentValue=c=b):b=0,b+=yield*this.pushSpaces(!0);while(a+b>0)let f=this.getLine();if(null===f)return this.setNext("flow");if((-1!==c&&c<this.indentNext&&"#"!==f[0]||0===c&&(f.startsWith("---")||f.startsWith("..."))&&e(f[3]))&&(c!==this.indentNext-1||1!==this.flowLevel||"]"!==f[0]&&"}"!==f[0]))return this.flowLevel=0,yield d.FLOW_END,yield*this.parseLineStart();let g=0;for(;","===f[g];)g+=yield*this.pushCount(1),g+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(f[g+=yield*this.pushIndicators()]){case void 0:return"flow";case"#":return yield*this.pushCount(f.length-g),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(j),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||e(a)||","===a)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let a=this.charAt(0),b=this.buffer.indexOf(a,this.pos+1);if("'"===a)for(;-1!==b&&"'"===this.buffer[b+1];)b=this.buffer.indexOf("'",b+2);else for(;-1!==b;){let a=0;for(;"\\"===this.buffer[b-1-a];)a+=1;if(a%2==0)break;b=this.buffer.indexOf('"',b+1)}let c=this.buffer.substring(0,b),d=c.indexOf("\n",this.pos);if(-1!==d){for(;-1!==d;){let a=this.continueScalar(d+1);if(-1===a)break;d=c.indexOf("\n",a)}-1!==d&&(b=d-("\r"===c[d-1]?2:1))}if(-1===b){if(!this.atEnd)return this.setNext("quoted-scalar");b=this.buffer.length}return yield*this.pushToIndex(b+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let a=this.pos;for(;;){let b=this.buffer[++a];if("+"===b)this.blockScalarKeep=!0;else if(b>"0"&&b<="9")this.blockScalarIndent=Number(b)-1;else if("-"!==b)break}return yield*this.pushUntil(a=>e(a)||"#"===a)}*parseBlockScalar(){let a,b=this.pos-1,c=0;a:for(let d=this.pos;a=this.buffer[d];++d)switch(a){case" ":c+=1;break;case"\n":b=d,c=0;break;case"\r":{let a=this.buffer[d+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if("\n"===a)break}default:break a}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(c>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=c:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{let a=this.continueScalar(b+1);if(-1===a)break;b=this.buffer.indexOf("\n",a)}while(-1!==b)if(-1===b){if(!this.atEnd)return this.setNext("block-scalar");b=this.buffer.length}}let e=b+1;for(a=this.buffer[e];" "===a;)a=this.buffer[++e];if(" "===a){for(;" "===a||" "===a||"\r"===a||"\n"===a;)a=this.buffer[++e];b=e-1}else if(!this.blockScalarKeep)for(;;){let a=b-1,d=this.buffer[a];"\r"===d&&(d=this.buffer[--a]);let e=a;for(;" "===d;)d=this.buffer[--a];if("\n"===d&&a>=this.pos&&a+1+c>e)b=a;else break}return yield d.SCALAR,yield*this.pushToIndex(b+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let a,b=this.flowLevel>0,c=this.pos-1,f=this.pos-1;for(;a=this.buffer[++f];)if(":"===a){let a=this.buffer[f+1];if(e(a)||b&&h.has(a))break;c=f}else if(e(a)){let d=this.buffer[f+1];if("\r"===a&&("\n"===d?(f+=1,a="\n",d=this.buffer[f+1]):c=f),"#"===d||b&&h.has(d))break;if("\n"===a){let a=this.continueScalar(f+1);if(-1===a)break;f=Math.max(f,a-2)}}else{if(b&&h.has(a))break;c=f}return a||this.atEnd?(yield d.SCALAR,yield*this.pushToIndex(c+1,!0),b?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(a){return a>0?(yield this.buffer.substr(this.pos,a),this.pos+=a,a):0}*pushToIndex(a,b){let c=this.buffer.slice(this.pos,a);return c?(yield c,this.pos+=c.length,c.length):(b&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(j))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let a=this.flowLevel>0,b=this.charAt(1);if(e(b)||a&&h.has(b))return a?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if("<"===this.charAt(1)){let a=this.pos+2,b=this.buffer[a];for(;!e(b)&&">"!==b;)b=this.buffer[++a];return yield*this.pushToIndex(">"===b?a+1:a,!1)}{let a=this.pos+1,b=this.buffer[a];for(;b;)if(g.has(b))b=this.buffer[++a];else if("%"===b&&f.has(this.buffer[a+1])&&f.has(this.buffer[a+2]))b=this.buffer[a+=3];else break;return yield*this.pushToIndex(a,!1)}}*pushNewline(){let a=this.buffer[this.pos];return"\n"===a?yield*this.pushCount(1):"\r"===a&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(a){let b,c=this.pos-1;do b=this.buffer[++c];while(" "===b||a&&" "===b)let d=c-this.pos;return d>0&&(yield this.buffer.substr(this.pos,d),this.pos=c),d}*pushUntil(a){let b=this.pos,c=this.buffer[b];for(;!a(c);)c=this.buffer[++b];return yield*this.pushToIndex(b,!1)}}},46987,(a,b,c)=>{"use strict";c.LineCounter=class{constructor(){this.lineStarts=[],this.addNewLine=a=>this.lineStarts.push(a),this.linePos=a=>{let b=0,c=this.lineStarts.length;for(;b<c;){let d=b+c>>1;this.lineStarts[d]<a?b=d+1:c=d}if(this.lineStarts[b]===a)return{line:b+1,col:1};if(0===b)return{line:0,col:a};let d=this.lineStarts[b-1];return{line:b,col:a-d+1}}}}},9575,(a,b,c)=>{"use strict";var d=a.r(5365),e=a.r(2704),f=a.r(66326);function g(a,b){for(let c=0;c<a.length;++c)if(a[c].type===b)return!0;return!1}function h(a){for(let b=0;b<a.length;++b)switch(a[b].type){case"space":case"comment":case"newline":break;default:return b}return -1}function i(a){switch(a?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function j(a){switch(a.type){case"document":return a.start;case"block-map":{let b=a.items[a.items.length-1];return b.sep??b.start}case"block-seq":return a.items[a.items.length-1].start;default:return[]}}function k(a){if(0===a.length)return[];let b=a.length;a:for(;--b>=0;)switch(a[b].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break a}for(;a[++b]?.type==="space";);return a.splice(b,a.length)}function l(a){if("flow-seq-start"===a.start.type)for(let b of a.items)!b.sep||b.value||g(b.start,"explicit-key-ind")||g(b.sep,"map-value-ind")||(b.key&&(b.value=b.key),delete b.key,i(b.value)?b.value.end?Array.prototype.push.apply(b.value.end,b.sep):b.value.end=b.sep:Array.prototype.push.apply(b.start,b.sep),delete b.sep)}c.Parser=class{constructor(a){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new f.Lexer,this.onNewLine=a}*parse(a,b=!1){for(let c of(this.onNewLine&&0===this.offset&&this.onNewLine(0),this.lexer.lex(a,b)))yield*this.next(c);b||(yield*this.end())}*next(a){if(this.source=a,d.env.LOG_TOKENS&&console.log("|",e.prettyToken(a)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=a.length;return}let b=e.tokenType(a);if(b)if("scalar"===b)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=b,yield*this.step(),b){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+a.length);break;case"space":this.atNewLine&&" "===a[0]&&(this.indent+=a.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=a.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=a.length}else{let b=`Not a YAML token: ${a}`;yield*this.pop({type:"error",offset:this.offset,message:b,source:a}),this.offset+=a.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let a=this.peek(1);if("doc-end"===this.type&&a?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!a)return yield*this.stream();switch(a.type){case"document":return yield*this.document(a);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(a);case"block-scalar":return yield*this.blockScalar(a);case"block-map":return yield*this.blockMap(a);case"block-seq":return yield*this.blockSequence(a);case"flow-collection":return yield*this.flowCollection(a);case"doc-end":return yield*this.documentEnd(a)}yield*this.pop()}peek(a){return this.stack[this.stack.length-a]}*pop(a){let b=a??this.stack.pop();if(b)if(0===this.stack.length)yield b;else{let a=this.peek(1);switch("block-scalar"===b.type?b.indent="indent"in a?a.indent:0:"flow-collection"===b.type&&"document"===a.type&&(b.indent=0),"flow-collection"===b.type&&l(b),a.type){case"document":a.value=b;break;case"block-scalar":a.props.push(b);break;case"block-map":{let c=a.items[a.items.length-1];if(c.value){a.items.push({start:[],key:b,sep:[]}),this.onKeyLine=!0;return}if(c.sep)c.value=b;else{Object.assign(c,{key:b,sep:[]}),this.onKeyLine=!c.explicitKey;return}break}case"block-seq":{let c=a.items[a.items.length-1];c.value?a.items.push({start:[],value:b}):c.value=b;break}case"flow-collection":{let c=a.items[a.items.length-1];!c||c.value?a.items.push({start:[],key:b,sep:[]}):c.sep?c.value=b:Object.assign(c,{key:b,sep:[]});return}default:yield*this.pop(),yield*this.pop(b)}if(("document"===a.type||"block-map"===a.type||"block-seq"===a.type)&&("block-map"===b.type||"block-seq"===b.type)){let c=b.items[b.items.length-1];c&&!c.sep&&!c.value&&c.start.length>0&&-1===h(c.start)&&(0===b.indent||c.start.every(a=>"comment"!==a.type||a.indent<b.indent))&&("document"===a.type?a.end=c.start:a.items.push({start:c.start}),b.items.splice(-1,1))}}else yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let a={type:"document",offset:this.offset,start:[]};"doc-start"===this.type&&a.start.push(this.sourceToken),this.stack.push(a);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(a){if(a.value)return yield*this.lineEnd(a);switch(this.type){case"doc-start":-1!==h(a.start)?(yield*this.pop(),yield*this.step()):a.start.push(this.sourceToken);return;case"anchor":case"tag":case"space":case"comment":case"newline":a.start.push(this.sourceToken);return}let b=this.startBlockValue(a);b?this.stack.push(b):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(a){if("map-value-ind"===this.type){let b,c=k(j(this.peek(2)));a.end?((b=a.end).push(this.sourceToken),delete a.end):b=[this.sourceToken];let d={type:"block-map",offset:a.offset,indent:a.indent,items:[{start:c,key:a,sep:b}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=d}else yield*this.lineEnd(a)}*blockScalar(a){switch(this.type){case"space":case"comment":case"newline":a.props.push(this.sourceToken);return;case"scalar":if(a.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let a=this.source.indexOf("\n")+1;for(;0!==a;)this.onNewLine(this.offset+a),a=this.source.indexOf("\n",a)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(a){let b=a.items[a.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,b.value){let c="end"in b.value?b.value.end:void 0,d=Array.isArray(c)?c[c.length-1]:void 0;d?.type==="comment"?c?.push(this.sourceToken):a.items.push({start:[this.sourceToken]})}else b.sep?b.sep.push(this.sourceToken):b.start.push(this.sourceToken);return;case"space":case"comment":if(b.value)a.items.push({start:[this.sourceToken]});else if(b.sep)b.sep.push(this.sourceToken);else{if(this.atIndentedComment(b.start,a.indent)){let c=a.items[a.items.length-2],d=c?.value?.end;if(Array.isArray(d)){Array.prototype.push.apply(d,b.start),d.push(this.sourceToken),a.items.pop();return}}b.start.push(this.sourceToken)}return}if(this.indent>=a.indent){let c=!this.onKeyLine&&this.indent===a.indent,d=c&&(b.sep||b.explicitKey)&&"seq-item-ind"!==this.type,e=[];if(d&&b.sep&&!b.value){let c=[];for(let d=0;d<b.sep.length;++d){let e=b.sep[d];switch(e.type){case"newline":c.push(d);break;case"space":break;case"comment":e.indent>a.indent&&(c.length=0);break;default:c.length=0}}c.length>=2&&(e=b.sep.splice(c[1]))}switch(this.type){case"anchor":case"tag":d||b.value?(e.push(this.sourceToken),a.items.push({start:e}),this.onKeyLine=!0):b.sep?b.sep.push(this.sourceToken):b.start.push(this.sourceToken);return;case"explicit-key-ind":b.sep||b.explicitKey?d||b.value?(e.push(this.sourceToken),a.items.push({start:e,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(b.start.push(this.sourceToken),b.explicitKey=!0),this.onKeyLine=!0;return;case"map-value-ind":if(b.explicitKey)if(b.sep)if(b.value)a.items.push({start:[],key:null,sep:[this.sourceToken]});else if(g(b.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]});else if(i(b.key)&&!g(b.sep,"newline")){let a=k(b.start),c=b.key,d=b.sep;d.push(this.sourceToken),delete b.key,delete b.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:c,sep:d}]})}else e.length>0?b.sep=b.sep.concat(e,this.sourceToken):b.sep.push(this.sourceToken);else if(g(b.start,"newline"))Object.assign(b,{key:null,sep:[this.sourceToken]});else{let a=k(b.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else b.sep?b.value||d?a.items.push({start:e,key:null,sep:[this.sourceToken]}):g(b.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):b.sep.push(this.sourceToken):Object.assign(b,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let c=this.flowScalar(this.type);d||b.value?(a.items.push({start:e,key:c,sep:[]}),this.onKeyLine=!0):b.sep?this.stack.push(c):(Object.assign(b,{key:c,sep:[]}),this.onKeyLine=!0);return}default:{let d=this.startBlockValue(a);if(d){if("block-seq"===d.type){if(!b.explicitKey&&b.sep&&!g(b.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else c&&a.items.push({start:e});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(a){let b=a.items[a.items.length-1];switch(this.type){case"newline":if(b.value){let c="end"in b.value?b.value.end:void 0,d=Array.isArray(c)?c[c.length-1]:void 0;d?.type==="comment"?c?.push(this.sourceToken):a.items.push({start:[this.sourceToken]})}else b.start.push(this.sourceToken);return;case"space":case"comment":if(b.value)a.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(b.start,a.indent)){let c=a.items[a.items.length-2],d=c?.value?.end;if(Array.isArray(d)){Array.prototype.push.apply(d,b.start),d.push(this.sourceToken),a.items.pop();return}}b.start.push(this.sourceToken)}return;case"anchor":case"tag":if(b.value||this.indent<=a.indent)break;b.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==a.indent)break;b.value||g(b.start,"seq-item-ind")?a.items.push({start:[this.sourceToken]}):b.start.push(this.sourceToken);return}if(this.indent>a.indent){let b=this.startBlockValue(a);if(b)return void this.stack.push(b)}yield*this.pop(),yield*this.step()}*flowCollection(a){let b=a.items[a.items.length-1];if("flow-error-end"===this.type){let a;do yield*this.pop(),a=this.peek(1);while(a?.type==="flow-collection")}else if(0===a.end.length){switch(this.type){case"comma":case"explicit-key-ind":!b||b.sep?a.items.push({start:[this.sourceToken]}):b.start.push(this.sourceToken);return;case"map-value-ind":!b||b.value?a.items.push({start:[],key:null,sep:[this.sourceToken]}):b.sep?b.sep.push(this.sourceToken):Object.assign(b,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!b||b.value?a.items.push({start:[this.sourceToken]}):b.sep?b.sep.push(this.sourceToken):b.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let c=this.flowScalar(this.type);!b||b.value?a.items.push({start:[],key:c,sep:[]}):b.sep?this.stack.push(c):Object.assign(b,{key:c,sep:[]});return}case"flow-map-end":case"flow-seq-end":a.end.push(this.sourceToken);return}let c=this.startBlockValue(a);c?this.stack.push(c):(yield*this.pop(),yield*this.step())}else{let b=this.peek(2);if("block-map"!==b.type||("map-value-ind"!==this.type||b.indent!==a.indent)&&("newline"!==this.type||b.items[b.items.length-1].sep))if("map-value-ind"===this.type&&"flow-collection"!==b.type){let c=k(j(b));l(a);let d=a.end.splice(1,a.end.length);d.push(this.sourceToken);let e={type:"block-map",offset:a.offset,indent:a.indent,items:[{start:c,key:a,sep:d}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=e}else yield*this.lineEnd(a);else yield*this.pop(),yield*this.step()}}flowScalar(a){if(this.onNewLine){let a=this.source.indexOf("\n")+1;for(;0!==a;)this.onNewLine(this.offset+a),a=this.source.indexOf("\n",a)+1}return{type:a,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(a){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let b=k(j(a));return b.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:b,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let b=k(j(a));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:b,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(a,b){return"comment"===this.type&&!(this.indent<=b)&&a.every(a=>"newline"===a.type||"space"===a.type)}*documentEnd(a){"doc-mode"!==this.type&&(a.end?a.end.push(this.sourceToken):a.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(a){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:a.end?a.end.push(this.sourceToken):a.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}},5013,(a,b,c)=>{"use strict";var d=a.r(19662),e=a.r(85774),f=a.r(25717),g=a.r(18114),h=a.r(27267),i=a.r(46987),j=a.r(9575);function k(a){let b=!1!==a.prettyErrors;return{lineCounter:a.lineCounter||b&&new i.LineCounter||null,prettyErrors:b}}function l(a,b={}){let{lineCounter:c,prettyErrors:e}=k(b),g=new j.Parser(c?.addNewLine),h=new d.Composer(b),i=null;for(let b of h.compose(g.parse(a),!0,a.length))if(i){if("silent"!==i.options.logLevel){i.errors.push(new f.YAMLParseError(b.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else i=b;return e&&c&&(i.errors.forEach(f.prettifyError(a,c)),i.warnings.forEach(f.prettifyError(a,c))),i}c.parse=function(a,b,c){let d;"function"==typeof b?d=b:void 0===c&&b&&"object"==typeof b&&(c=b);let e=l(a,c);if(!e)return null;if(e.warnings.forEach(a=>g.warn(e.options.logLevel,a)),e.errors.length>0)if("silent"!==e.options.logLevel)throw e.errors[0];else e.errors=[];return e.toJS(Object.assign({reviver:d},c))},c.parseAllDocuments=function(a,b={}){let{lineCounter:c,prettyErrors:e}=k(b),g=new j.Parser(c?.addNewLine),h=new d.Composer(b),i=Array.from(h.compose(g.parse(a)));if(e&&c)for(let b of i)b.errors.forEach(f.prettifyError(a,c)),b.warnings.forEach(f.prettifyError(a,c));return i.length>0?i:Object.assign([],{empty:!0},h.streamInfo())},c.parseDocument=l,c.stringify=function(a,b,c){let d=null;if("function"==typeof b||Array.isArray(b)?d=b:void 0===c&&b&&(c=b),"string"==typeof c&&(c=c.length),"number"==typeof c){let a=Math.round(c);c=a<1?void 0:a>8?{indent:8}:{indent:a}}if(void 0===a){let{keepUndefined:a}=c??b??{};if(!a)return}return h.isDocument(a)&&!d?a.toString(c):new e.Document(a,d,c).toString(c)}},22650,(a,b,c)=>{"use strict";var d=a.r(19662),e=a.r(85774),f=a.r(98027),g=a.r(25717),h=a.r(21562),i=a.r(27267),j=a.r(17602),k=a.r(27853),l=a.r(47544),m=a.r(7621),n=a.r(2704),o=a.r(66326),p=a.r(46987),q=a.r(9575),r=a.r(5013),s=a.r(85927);c.Composer=d.Composer,c.Document=e.Document,c.Schema=f.Schema,c.YAMLError=g.YAMLError,c.YAMLParseError=g.YAMLParseError,c.YAMLWarning=g.YAMLWarning,c.Alias=h.Alias,c.isAlias=i.isAlias,c.isCollection=i.isCollection,c.isDocument=i.isDocument,c.isMap=i.isMap,c.isNode=i.isNode,c.isPair=i.isPair,c.isScalar=i.isScalar,c.isSeq=i.isSeq,c.Pair=j.Pair,c.Scalar=k.Scalar,c.YAMLMap=l.YAMLMap,c.YAMLSeq=m.YAMLSeq,c.CST=n,c.Lexer=o.Lexer,c.LineCounter=p.LineCounter,c.Parser=q.Parser,c.parse=r.parse,c.parseAllDocuments=r.parseAllDocuments,c.parseDocument=r.parseDocument,c.stringify=r.stringify,c.visit=s.visit,c.visitAsync=s.visitAsync},15629,a=>{"use strict";var b=a.i(12714),c=a.i(50227);a.i(22650);var d=a.i(83643),e=a.i(45818),f=a.i(28215);async function g(a){let d=String(a??"").trim();if(!d)return null;try{let a=await (0,f.getTeamWorkspaceDir)(d),e=await b.default.readFile(c.default.join(a,"team.json"),"utf8"),g=JSON.parse(e),h="string"==typeof g.recipeName&&g.recipeName.trim()?g.recipeName.trim():"string"==typeof g.displayName&&g.displayName.trim()?g.displayName.trim():null;if(h)return h}catch{}let e=(await h()).find(a=>"team"===a.kind&&a.id===d);return e?.name??null}async function h(){let a=await (0,e.cachedRunOpenClaw)(["recipes","list"]);if(!a.ok)return[];try{return JSON.parse(a.stdout)}catch{return[]}}async function i(){let a=await (0,d.runOpenClaw)(["recipes","list"]);if(!a.ok)return[];try{return JSON.parse(a.stdout)}catch{return[]}}a.s(["getTeamDisplayName",()=>g,"listRecipes",()=>i])}];
26
26
 
27
27
  //# sourceMappingURL=_018dfe6b._.js.map