agentroam-runtime-darwin-arm64 0.2.0-preview.44 → 0.2.0-preview.46

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 (764) hide show
  1. package/manifest.json +1 -1
  2. package/package.json +1 -1
  3. package/runtime/.next/BUILD_ID +1 -1
  4. package/runtime/.next/app-build-manifest.json +14 -14
  5. package/runtime/.next/app-path-routes-manifest.json +1 -1
  6. package/runtime/.next/build-manifest.json +8 -8
  7. package/runtime/.next/prerender-manifest.json +1 -1
  8. package/runtime/.next/required-server-files.json +1 -1
  9. package/runtime/.next/server/app/_not-found/page.js +1 -1
  10. package/runtime/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/runtime/.next/server/app/_not-found.html +1 -1
  12. package/runtime/.next/server/app/_not-found.rsc +1 -1
  13. package/runtime/.next/server/app/api/agent/abort/route.js +1 -1
  14. package/runtime/.next/server/app/api/agent/answer/route.js +1 -1
  15. package/runtime/.next/server/app/api/agent/harness/status/route.js +1 -1
  16. package/runtime/.next/server/app/api/agent/model/route.js +1 -1
  17. package/runtime/.next/server/app/api/agent/models/route.js +1 -1
  18. package/runtime/.next/server/app/api/agent/run/route.js +2 -2
  19. package/runtime/.next/server/app/api/agent/runtime-health/route.js +1 -1
  20. package/runtime/.next/server/app/api/agent/steer/route.js +1 -1
  21. package/runtime/.next/server/app/api/agent/stream/route.js +3 -3
  22. package/runtime/.next/server/app/api/agent-workspaces/[workspaceId]/sessions/route.js +1 -1
  23. package/runtime/.next/server/app/api/agent-workspaces/route.js +1 -1
  24. package/runtime/.next/server/app/api/auth/verify/route.js +1 -1
  25. package/runtime/.next/server/app/api/business/route.js +1 -1
  26. package/runtime/.next/server/app/api/client-logs/route.js +1 -1
  27. package/runtime/.next/server/app/api/collaboration/route.js +1 -0
  28. package/runtime/.next/server/app/api/collaboration/route.js.nft.json +1 -0
  29. package/runtime/.next/server/app/api/flow/v1/catalog/route.js +1 -1
  30. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/cancel/route.js +1 -1
  31. package/runtime/.next/server/app/api/flow/v1/runs/[runId]/events/route.js +2 -2
  32. package/runtime/.next/server/app/api/flow/v1/runs/route.js +1 -1
  33. package/runtime/.next/server/app/api/flow-studio/config/route.js +1 -1
  34. package/runtime/.next/server/app/api/mcp/connect/route.js +1 -1
  35. package/runtime/.next/server/app/api/mcp/disconnect/route.js +1 -1
  36. package/runtime/.next/server/app/api/mcp/servers/route.js +1 -1
  37. package/runtime/.next/server/app/api/memory/[key]/route.js +1 -1
  38. package/runtime/.next/server/app/api/memory/route.js +1 -1
  39. package/runtime/.next/server/app/api/plugins/load/route.js +1 -1
  40. package/runtime/.next/server/app/api/projects/[id]/route.js +1 -1
  41. package/runtime/.next/server/app/api/projects/check/route.js +1 -1
  42. package/runtime/.next/server/app/api/projects/directories/route.js +1 -1
  43. package/runtime/.next/server/app/api/projects/roots/route.js +1 -1
  44. package/runtime/.next/server/app/api/projects/route.js +1 -1
  45. package/runtime/.next/server/app/api/push/subscribe/route.js +2 -2
  46. package/runtime/.next/server/app/api/push/unsubscribe/route.js +2 -2
  47. package/runtime/.next/server/app/api/push/vapid/route.js +2 -2
  48. package/runtime/.next/server/app/api/push/vapid.body +1 -1
  49. package/runtime/.next/server/app/api/remote-tools/register/route.js +1 -1
  50. package/runtime/.next/server/app/api/sessions/[id]/changes/route.js +2 -2
  51. package/runtime/.next/server/app/api/sessions/[id]/fork/route.js +1 -1
  52. package/runtime/.next/server/app/api/sessions/[id]/fork-at/route.js +1 -1
  53. package/runtime/.next/server/app/api/sessions/[id]/goals/route.js +1 -1
  54. package/runtime/.next/server/app/api/sessions/[id]/handoff/route.js +1 -1
  55. package/runtime/.next/server/app/api/sessions/[id]/native-goal/route.js +1 -1
  56. package/runtime/.next/server/app/api/sessions/[id]/query-index/route.js +1 -1
  57. package/runtime/.next/server/app/api/sessions/[id]/release/route.js +1 -1
  58. package/runtime/.next/server/app/api/sessions/[id]/route.js +1 -1
  59. package/runtime/.next/server/app/api/sessions/[id]/thread-goal/route.js +1 -1
  60. package/runtime/.next/server/app/api/sessions/[id]/tool-result/route.js +1 -1
  61. package/runtime/.next/server/app/api/sessions/route.js +1 -1
  62. package/runtime/.next/server/app/api/settings/route.js +1 -1
  63. package/runtime/.next/server/app/api/skills/route.js +1 -1
  64. package/runtime/.next/server/app/api/tool-policies/[policyId]/route.js +1 -1
  65. package/runtime/.next/server/app/api/tool-policies/route.js +1 -1
  66. package/runtime/.next/server/app/api/tools/route.js +1 -1
  67. package/runtime/.next/server/app/api/update/check/route.js +1 -1
  68. package/runtime/.next/server/app/api/update/install/route.js +1 -1
  69. package/runtime/.next/server/app/api/update/status/route.js +1 -1
  70. package/runtime/.next/server/app/api/web-auth/login/route.js +1 -1
  71. package/runtime/.next/server/app/api/web-auth/logout/route.js +1 -1
  72. package/runtime/.next/server/app/api/web-auth/revoke-all/route.js +1 -1
  73. package/runtime/.next/server/app/api/web-auth/setup/route.js +1 -1
  74. package/runtime/.next/server/app/api/web-auth/status/route.js +1 -1
  75. package/runtime/.next/server/app/api/web-console/bootstrap/route.js +1 -1
  76. package/runtime/.next/server/app/api/web-console/computer-settings/route.js +1 -1
  77. package/runtime/.next/server/app/api/web-console/device-state/route.js +1 -1
  78. package/runtime/.next/server/app/api/web-console/history/route.js +1 -1
  79. package/runtime/.next/server/app/api/web-console/preferences/route.js +1 -1
  80. package/runtime/.next/server/app/web/page.js +8 -3
  81. package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
  82. package/runtime/.next/server/app-paths-manifest.json +30 -29
  83. package/runtime/.next/server/chunks/1322.js +148 -115
  84. package/runtime/.next/server/chunks/1773.js +95 -92
  85. package/runtime/.next/server/chunks/2293.js +1 -1
  86. package/runtime/.next/server/chunks/366.js +1 -1
  87. package/runtime/.next/server/chunks/5303.js +2 -2
  88. package/runtime/.next/server/chunks/6244.js +1 -1
  89. package/runtime/.next/server/chunks/6703.js +2 -2
  90. package/runtime/.next/server/chunks/8532.js +1 -1
  91. package/runtime/.next/server/middleware-build-manifest.js +1 -1
  92. package/runtime/.next/server/pages/404.html +1 -1
  93. package/runtime/.next/server/pages/500.html +1 -1
  94. package/runtime/.next/server/server-reference-manifest.json +1 -1
  95. package/runtime/.next/static/chunks/344-04fd45d8838bfada.js +1 -0
  96. package/runtime/.next/static/chunks/app/web/{error-f5e723c8a63ca181.js → error-ea9738345723fb6c.js} +1 -1
  97. package/runtime/.next/static/chunks/app/web/layout-64f8e0ed9f785fce.js +1 -0
  98. package/runtime/.next/static/chunks/app/web/page-85eeb13ae4f1dc7d.js +1 -0
  99. package/runtime/.next/static/chunks/main-app-81c96817a0fe0365.js +1 -0
  100. package/runtime/.next/static/chunks/{main-3b6443d34e818b51.js → main-e716527431f6ee7e.js} +1 -1
  101. package/runtime/lib/project-picker-directory.mjs +16 -0
  102. package/runtime/node_modules/.package-lock.json +14 -14
  103. package/runtime/node_modules/@agent/core/dist/index.js +818 -6
  104. package/runtime/node_modules/@agent/native-runtime/dist/index.js +570 -20
  105. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +70 -112
  106. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +62 -60
  107. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-x6a2shyd.mjs +35 -0
  108. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-xcjrj654.mjs +52 -0
  109. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +18 -18
  110. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +21 -22
  111. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +25 -26
  112. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +12 -12
  113. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +85 -71
  114. package/runtime/node_modules/caniuse-lite/data/agents.js +1 -1
  115. package/runtime/node_modules/caniuse-lite/data/features/aac.js +1 -1
  116. package/runtime/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
  117. package/runtime/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
  118. package/runtime/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
  119. package/runtime/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
  120. package/runtime/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
  121. package/runtime/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
  122. package/runtime/node_modules/caniuse-lite/data/features/apng.js +1 -1
  123. package/runtime/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
  124. package/runtime/node_modules/caniuse-lite/data/features/array-find.js +1 -1
  125. package/runtime/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
  126. package/runtime/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
  127. package/runtime/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
  128. package/runtime/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
  129. package/runtime/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
  130. package/runtime/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
  131. package/runtime/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
  132. package/runtime/node_modules/caniuse-lite/data/features/audio.js +1 -1
  133. package/runtime/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
  134. package/runtime/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
  135. package/runtime/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
  136. package/runtime/node_modules/caniuse-lite/data/features/av1.js +1 -1
  137. package/runtime/node_modules/caniuse-lite/data/features/avif.js +1 -1
  138. package/runtime/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
  139. package/runtime/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
  140. package/runtime/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
  141. package/runtime/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
  142. package/runtime/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
  143. package/runtime/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
  144. package/runtime/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
  145. package/runtime/node_modules/caniuse-lite/data/features/beacon.js +1 -1
  146. package/runtime/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
  147. package/runtime/node_modules/caniuse-lite/data/features/bigint.js +1 -1
  148. package/runtime/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
  149. package/runtime/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
  150. package/runtime/node_modules/caniuse-lite/data/features/border-image.js +1 -1
  151. package/runtime/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
  152. package/runtime/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
  153. package/runtime/node_modules/caniuse-lite/data/features/brotli.js +1 -1
  154. package/runtime/node_modules/caniuse-lite/data/features/calc.js +1 -1
  155. package/runtime/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
  156. package/runtime/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
  157. package/runtime/node_modules/caniuse-lite/data/features/canvas.js +1 -1
  158. package/runtime/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
  159. package/runtime/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
  160. package/runtime/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
  161. package/runtime/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
  162. package/runtime/node_modules/caniuse-lite/data/features/classlist.js +1 -1
  163. package/runtime/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
  164. package/runtime/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
  165. package/runtime/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
  166. package/runtime/node_modules/caniuse-lite/data/features/colr.js +1 -1
  167. package/runtime/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
  168. package/runtime/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
  169. package/runtime/node_modules/caniuse-lite/data/features/console-time.js +1 -1
  170. package/runtime/node_modules/caniuse-lite/data/features/const.js +1 -1
  171. package/runtime/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
  172. package/runtime/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
  173. package/runtime/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
  174. package/runtime/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
  175. package/runtime/node_modules/caniuse-lite/data/features/cors.js +1 -1
  176. package/runtime/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
  177. package/runtime/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
  178. package/runtime/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
  179. package/runtime/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
  180. package/runtime/node_modules/caniuse-lite/data/features/css-all.js +1 -1
  181. package/runtime/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
  182. package/runtime/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
  183. package/runtime/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
  184. package/runtime/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
  185. package/runtime/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
  186. package/runtime/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
  187. package/runtime/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
  188. package/runtime/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
  189. package/runtime/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
  190. package/runtime/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
  191. package/runtime/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
  192. package/runtime/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
  193. package/runtime/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
  194. package/runtime/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
  195. package/runtime/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
  196. package/runtime/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
  197. package/runtime/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
  198. package/runtime/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
  199. package/runtime/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
  200. package/runtime/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
  201. package/runtime/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
  202. package/runtime/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
  203. package/runtime/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
  204. package/runtime/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
  205. package/runtime/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
  206. package/runtime/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
  207. package/runtime/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
  208. package/runtime/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
  209. package/runtime/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
  210. package/runtime/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
  211. package/runtime/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
  212. package/runtime/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
  213. package/runtime/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
  214. package/runtime/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
  215. package/runtime/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
  216. package/runtime/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
  217. package/runtime/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
  218. package/runtime/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
  219. package/runtime/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
  220. package/runtime/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
  221. package/runtime/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
  222. package/runtime/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
  223. package/runtime/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
  224. package/runtime/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
  225. package/runtime/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
  226. package/runtime/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
  227. package/runtime/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
  228. package/runtime/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
  229. package/runtime/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
  230. package/runtime/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
  231. package/runtime/node_modules/caniuse-lite/data/features/css-has.js +1 -1
  232. package/runtime/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
  233. package/runtime/node_modules/caniuse-lite/data/features/css-if.js +1 -1
  234. package/runtime/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
  235. package/runtime/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
  236. package/runtime/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
  237. package/runtime/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
  238. package/runtime/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
  239. package/runtime/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
  240. package/runtime/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
  241. package/runtime/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
  242. package/runtime/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
  243. package/runtime/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
  244. package/runtime/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
  245. package/runtime/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
  246. package/runtime/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
  247. package/runtime/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
  248. package/runtime/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
  249. package/runtime/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
  250. package/runtime/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
  251. package/runtime/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
  252. package/runtime/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
  253. package/runtime/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
  254. package/runtime/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
  255. package/runtime/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
  256. package/runtime/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
  257. package/runtime/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
  258. package/runtime/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
  259. package/runtime/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
  260. package/runtime/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
  261. package/runtime/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
  262. package/runtime/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
  263. package/runtime/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
  264. package/runtime/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
  265. package/runtime/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
  266. package/runtime/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
  267. package/runtime/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
  268. package/runtime/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
  269. package/runtime/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
  270. package/runtime/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
  271. package/runtime/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
  272. package/runtime/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
  273. package/runtime/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
  274. package/runtime/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
  275. package/runtime/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
  276. package/runtime/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
  277. package/runtime/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
  278. package/runtime/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
  279. package/runtime/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
  280. package/runtime/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
  281. package/runtime/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
  282. package/runtime/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
  283. package/runtime/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
  284. package/runtime/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
  285. package/runtime/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
  286. package/runtime/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
  287. package/runtime/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
  288. package/runtime/node_modules/caniuse-lite/data/features/css-table.js +1 -1
  289. package/runtime/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
  290. package/runtime/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
  291. package/runtime/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
  292. package/runtime/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
  293. package/runtime/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
  294. package/runtime/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
  295. package/runtime/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
  296. package/runtime/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
  297. package/runtime/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
  298. package/runtime/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
  299. package/runtime/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
  300. package/runtime/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
  301. package/runtime/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
  302. package/runtime/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
  303. package/runtime/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
  304. package/runtime/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
  305. package/runtime/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
  306. package/runtime/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
  307. package/runtime/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
  308. package/runtime/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
  309. package/runtime/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
  310. package/runtime/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
  311. package/runtime/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
  312. package/runtime/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
  313. package/runtime/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
  314. package/runtime/node_modules/caniuse-lite/data/features/customevent.js +1 -1
  315. package/runtime/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
  316. package/runtime/node_modules/caniuse-lite/data/features/datalist.js +1 -1
  317. package/runtime/node_modules/caniuse-lite/data/features/dataset.js +1 -1
  318. package/runtime/node_modules/caniuse-lite/data/features/datauri.js +1 -1
  319. package/runtime/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
  320. package/runtime/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
  321. package/runtime/node_modules/caniuse-lite/data/features/details.js +1 -1
  322. package/runtime/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
  323. package/runtime/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
  324. package/runtime/node_modules/caniuse-lite/data/features/dialog.js +1 -1
  325. package/runtime/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
  326. package/runtime/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
  327. package/runtime/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
  328. package/runtime/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
  329. package/runtime/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
  330. package/runtime/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
  331. package/runtime/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
  332. package/runtime/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
  333. package/runtime/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
  334. package/runtime/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
  335. package/runtime/node_modules/caniuse-lite/data/features/download.js +1 -1
  336. package/runtime/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
  337. package/runtime/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
  338. package/runtime/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
  339. package/runtime/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
  340. package/runtime/node_modules/caniuse-lite/data/features/eme.js +1 -1
  341. package/runtime/node_modules/caniuse-lite/data/features/eot.js +1 -1
  342. package/runtime/node_modules/caniuse-lite/data/features/es5.js +1 -1
  343. package/runtime/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
  344. package/runtime/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
  345. package/runtime/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
  346. package/runtime/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
  347. package/runtime/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
  348. package/runtime/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
  349. package/runtime/node_modules/caniuse-lite/data/features/es6.js +1 -1
  350. package/runtime/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
  351. package/runtime/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
  352. package/runtime/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
  353. package/runtime/node_modules/caniuse-lite/data/features/fetch.js +1 -1
  354. package/runtime/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
  355. package/runtime/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
  356. package/runtime/node_modules/caniuse-lite/data/features/filereader.js +1 -1
  357. package/runtime/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
  358. package/runtime/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
  359. package/runtime/node_modules/caniuse-lite/data/features/flac.js +1 -1
  360. package/runtime/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
  361. package/runtime/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
  362. package/runtime/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
  363. package/runtime/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
  364. package/runtime/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
  365. package/runtime/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
  366. package/runtime/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
  367. package/runtime/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
  368. package/runtime/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
  369. package/runtime/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
  370. package/runtime/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
  371. package/runtime/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
  372. package/runtime/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
  373. package/runtime/node_modules/caniuse-lite/data/features/fontface.js +1 -1
  374. package/runtime/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
  375. package/runtime/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
  376. package/runtime/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
  377. package/runtime/node_modules/caniuse-lite/data/features/forms.js +1 -1
  378. package/runtime/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
  379. package/runtime/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
  380. package/runtime/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
  381. package/runtime/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
  382. package/runtime/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
  383. package/runtime/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
  384. package/runtime/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
  385. package/runtime/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
  386. package/runtime/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
  387. package/runtime/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
  388. package/runtime/node_modules/caniuse-lite/data/features/heif.js +1 -1
  389. package/runtime/node_modules/caniuse-lite/data/features/hevc.js +1 -1
  390. package/runtime/node_modules/caniuse-lite/data/features/hidden.js +1 -1
  391. package/runtime/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
  392. package/runtime/node_modules/caniuse-lite/data/features/history.js +1 -1
  393. package/runtime/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
  394. package/runtime/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
  395. package/runtime/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
  396. package/runtime/node_modules/caniuse-lite/data/features/http2.js +1 -1
  397. package/runtime/node_modules/caniuse-lite/data/features/http3.js +1 -1
  398. package/runtime/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
  399. package/runtime/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
  400. package/runtime/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
  401. package/runtime/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
  402. package/runtime/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
  403. package/runtime/node_modules/caniuse-lite/data/features/imports.js +1 -1
  404. package/runtime/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
  405. package/runtime/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
  406. package/runtime/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
  407. package/runtime/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
  408. package/runtime/node_modules/caniuse-lite/data/features/innertext.js +1 -1
  409. package/runtime/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
  410. package/runtime/node_modules/caniuse-lite/data/features/input-color.js +1 -1
  411. package/runtime/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
  412. package/runtime/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
  413. package/runtime/node_modules/caniuse-lite/data/features/input-event.js +1 -1
  414. package/runtime/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
  415. package/runtime/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
  416. package/runtime/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
  417. package/runtime/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
  418. package/runtime/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
  419. package/runtime/node_modules/caniuse-lite/data/features/input-number.js +1 -1
  420. package/runtime/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
  421. package/runtime/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
  422. package/runtime/node_modules/caniuse-lite/data/features/input-range.js +1 -1
  423. package/runtime/node_modules/caniuse-lite/data/features/input-search.js +1 -1
  424. package/runtime/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
  425. package/runtime/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
  426. package/runtime/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
  427. package/runtime/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
  428. package/runtime/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
  429. package/runtime/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
  430. package/runtime/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
  431. package/runtime/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
  432. package/runtime/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
  433. package/runtime/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
  434. package/runtime/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
  435. package/runtime/node_modules/caniuse-lite/data/features/json.js +1 -1
  436. package/runtime/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
  437. package/runtime/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
  438. package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
  439. package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
  440. package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
  441. package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
  442. package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
  443. package/runtime/node_modules/caniuse-lite/data/features/let.js +1 -1
  444. package/runtime/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
  445. package/runtime/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
  446. package/runtime/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
  447. package/runtime/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
  448. package/runtime/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
  449. package/runtime/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
  450. package/runtime/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
  451. package/runtime/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
  452. package/runtime/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
  453. package/runtime/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
  454. package/runtime/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
  455. package/runtime/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
  456. package/runtime/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
  457. package/runtime/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
  458. package/runtime/node_modules/caniuse-lite/data/features/mathml.js +1 -1
  459. package/runtime/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
  460. package/runtime/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
  461. package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
  462. package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
  463. package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
  464. package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
  465. package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
  466. package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
  467. package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
  468. package/runtime/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
  469. package/runtime/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
  470. package/runtime/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
  471. package/runtime/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
  472. package/runtime/node_modules/caniuse-lite/data/features/menu.js +1 -1
  473. package/runtime/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
  474. package/runtime/node_modules/caniuse-lite/data/features/meter.js +1 -1
  475. package/runtime/node_modules/caniuse-lite/data/features/midi.js +1 -1
  476. package/runtime/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
  477. package/runtime/node_modules/caniuse-lite/data/features/mp3.js +1 -1
  478. package/runtime/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
  479. package/runtime/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
  480. package/runtime/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
  481. package/runtime/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
  482. package/runtime/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
  483. package/runtime/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
  484. package/runtime/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
  485. package/runtime/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
  486. package/runtime/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
  487. package/runtime/node_modules/caniuse-lite/data/features/notifications.js +1 -1
  488. package/runtime/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
  489. package/runtime/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
  490. package/runtime/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
  491. package/runtime/node_modules/caniuse-lite/data/features/object-values.js +1 -1
  492. package/runtime/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
  493. package/runtime/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
  494. package/runtime/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
  495. package/runtime/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
  496. package/runtime/node_modules/caniuse-lite/data/features/ogv.js +1 -1
  497. package/runtime/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
  498. package/runtime/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
  499. package/runtime/node_modules/caniuse-lite/data/features/online-status.js +1 -1
  500. package/runtime/node_modules/caniuse-lite/data/features/opus.js +1 -1
  501. package/runtime/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
  502. package/runtime/node_modules/caniuse-lite/data/features/outline.js +1 -1
  503. package/runtime/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
  504. package/runtime/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
  505. package/runtime/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
  506. package/runtime/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
  507. package/runtime/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
  508. package/runtime/node_modules/caniuse-lite/data/features/path2d.js +1 -1
  509. package/runtime/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
  510. package/runtime/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
  511. package/runtime/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
  512. package/runtime/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
  513. package/runtime/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
  514. package/runtime/node_modules/caniuse-lite/data/features/picture.js +1 -1
  515. package/runtime/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
  516. package/runtime/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
  517. package/runtime/node_modules/caniuse-lite/data/features/pointer.js +1 -1
  518. package/runtime/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
  519. package/runtime/node_modules/caniuse-lite/data/features/portals.js +1 -1
  520. package/runtime/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
  521. package/runtime/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
  522. package/runtime/node_modules/caniuse-lite/data/features/progress.js +1 -1
  523. package/runtime/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
  524. package/runtime/node_modules/caniuse-lite/data/features/promises.js +1 -1
  525. package/runtime/node_modules/caniuse-lite/data/features/proximity.js +1 -1
  526. package/runtime/node_modules/caniuse-lite/data/features/proxy.js +1 -1
  527. package/runtime/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
  528. package/runtime/node_modules/caniuse-lite/data/features/push-api.js +1 -1
  529. package/runtime/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
  530. package/runtime/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
  531. package/runtime/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
  532. package/runtime/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
  533. package/runtime/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
  534. package/runtime/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
  535. package/runtime/node_modules/caniuse-lite/data/features/rellist.js +1 -1
  536. package/runtime/node_modules/caniuse-lite/data/features/rem.js +1 -1
  537. package/runtime/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
  538. package/runtime/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
  539. package/runtime/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
  540. package/runtime/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
  541. package/runtime/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
  542. package/runtime/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
  543. package/runtime/node_modules/caniuse-lite/data/features/ruby.js +1 -1
  544. package/runtime/node_modules/caniuse-lite/data/features/run-in.js +1 -1
  545. package/runtime/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
  546. package/runtime/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
  547. package/runtime/node_modules/caniuse-lite/data/features/script-async.js +1 -1
  548. package/runtime/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
  549. package/runtime/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
  550. package/runtime/node_modules/caniuse-lite/data/features/sdch.js +1 -1
  551. package/runtime/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
  552. package/runtime/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
  553. package/runtime/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
  554. package/runtime/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
  555. package/runtime/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
  556. package/runtime/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
  557. package/runtime/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
  558. package/runtime/node_modules/caniuse-lite/data/features/sni.js +1 -1
  559. package/runtime/node_modules/caniuse-lite/data/features/spdy.js +1 -1
  560. package/runtime/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
  561. package/runtime/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
  562. package/runtime/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
  563. package/runtime/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
  564. package/runtime/node_modules/caniuse-lite/data/features/srcset.js +1 -1
  565. package/runtime/node_modules/caniuse-lite/data/features/stream.js +1 -1
  566. package/runtime/node_modules/caniuse-lite/data/features/streams.js +1 -1
  567. package/runtime/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
  568. package/runtime/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
  569. package/runtime/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
  570. package/runtime/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
  571. package/runtime/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
  572. package/runtime/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
  573. package/runtime/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
  574. package/runtime/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
  575. package/runtime/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
  576. package/runtime/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
  577. package/runtime/node_modules/caniuse-lite/data/features/svg.js +1 -1
  578. package/runtime/node_modules/caniuse-lite/data/features/sxg.js +1 -1
  579. package/runtime/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
  580. package/runtime/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
  581. package/runtime/node_modules/caniuse-lite/data/features/template.js +1 -1
  582. package/runtime/node_modules/caniuse-lite/data/features/temporal.js +1 -1
  583. package/runtime/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
  584. package/runtime/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
  585. package/runtime/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
  586. package/runtime/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
  587. package/runtime/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
  588. package/runtime/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
  589. package/runtime/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
  590. package/runtime/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
  591. package/runtime/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
  592. package/runtime/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
  593. package/runtime/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
  594. package/runtime/node_modules/caniuse-lite/data/features/touch.js +1 -1
  595. package/runtime/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
  596. package/runtime/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
  597. package/runtime/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
  598. package/runtime/node_modules/caniuse-lite/data/features/ttf.js +1 -1
  599. package/runtime/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
  600. package/runtime/node_modules/caniuse-lite/data/features/u2f.js +1 -1
  601. package/runtime/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
  602. package/runtime/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
  603. package/runtime/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
  604. package/runtime/node_modules/caniuse-lite/data/features/url.js +1 -1
  605. package/runtime/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
  606. package/runtime/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
  607. package/runtime/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
  608. package/runtime/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
  609. package/runtime/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
  610. package/runtime/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
  611. package/runtime/node_modules/caniuse-lite/data/features/vibration.js +1 -1
  612. package/runtime/node_modules/caniuse-lite/data/features/video.js +1 -1
  613. package/runtime/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
  614. package/runtime/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
  615. package/runtime/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
  616. package/runtime/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
  617. package/runtime/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
  618. package/runtime/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
  619. package/runtime/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
  620. package/runtime/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
  621. package/runtime/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
  622. package/runtime/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
  623. package/runtime/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
  624. package/runtime/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
  625. package/runtime/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
  626. package/runtime/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
  627. package/runtime/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
  628. package/runtime/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
  629. package/runtime/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
  630. package/runtime/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
  631. package/runtime/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
  632. package/runtime/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
  633. package/runtime/node_modules/caniuse-lite/data/features/wasm.js +1 -1
  634. package/runtime/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
  635. package/runtime/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
  636. package/runtime/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
  637. package/runtime/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
  638. package/runtime/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
  639. package/runtime/node_modules/caniuse-lite/data/features/web-share.js +1 -1
  640. package/runtime/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
  641. package/runtime/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
  642. package/runtime/node_modules/caniuse-lite/data/features/webgl.js +1 -1
  643. package/runtime/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
  644. package/runtime/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
  645. package/runtime/node_modules/caniuse-lite/data/features/webhid.js +1 -1
  646. package/runtime/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
  647. package/runtime/node_modules/caniuse-lite/data/features/webm.js +1 -1
  648. package/runtime/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
  649. package/runtime/node_modules/caniuse-lite/data/features/webp.js +1 -1
  650. package/runtime/node_modules/caniuse-lite/data/features/websockets.js +1 -1
  651. package/runtime/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
  652. package/runtime/node_modules/caniuse-lite/data/features/webusb.js +1 -1
  653. package/runtime/node_modules/caniuse-lite/data/features/webvr.js +1 -1
  654. package/runtime/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
  655. package/runtime/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
  656. package/runtime/node_modules/caniuse-lite/data/features/webxr.js +1 -1
  657. package/runtime/node_modules/caniuse-lite/data/features/will-change.js +1 -1
  658. package/runtime/node_modules/caniuse-lite/data/features/woff.js +1 -1
  659. package/runtime/node_modules/caniuse-lite/data/features/woff2.js +1 -1
  660. package/runtime/node_modules/caniuse-lite/data/features/word-break.js +1 -1
  661. package/runtime/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
  662. package/runtime/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
  663. package/runtime/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
  664. package/runtime/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
  665. package/runtime/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
  666. package/runtime/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
  667. package/runtime/node_modules/caniuse-lite/data/features/zstd.js +1 -1
  668. package/runtime/node_modules/caniuse-lite/data/versionGroups.js +1 -1
  669. package/runtime/node_modules/caniuse-lite/package.json +1 -1
  670. package/runtime/package-lock.json +38 -38
  671. package/runtime/server.js +1 -1
  672. package/runtime/webapp/dist/assets/App-BRDBK6IZ.js +266 -0
  673. package/runtime/webapp/dist/assets/BrowserLivePanel-f4VBnSRL.js +91 -0
  674. package/runtime/webapp/dist/assets/CollaborationDashboard-BcPj80K3.js +111 -0
  675. package/runtime/webapp/dist/assets/CollaborationDashboard-CCXC6JuQ.css +1 -0
  676. package/runtime/webapp/dist/assets/CollaborationPage-D-RA1EZC.js +26 -0
  677. package/runtime/webapp/dist/assets/RemoteDesktopPage-CUTGrno3.js +1 -0
  678. package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-x1R6Iu77.js → abnfDiagram-VCTEODGH-CobaiK9H.js} +1 -1
  679. package/runtime/webapp/dist/assets/{arc-BcOw-1vQ.js → arc-DvaTZ6-W.js} +1 -1
  680. package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-CxSYcWIS.js → architectureDiagram-5GKGNRK7-SSn3B2Q4.js} +1 -1
  681. package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-S9AtA5hP.js → blockDiagram-I7D4REHJ-BSg6DXBP.js} +1 -1
  682. package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-Dr1SAGjO.js → c4Diagram-7LVT6UL2-VPX0N-V0.js} +1 -1
  683. package/runtime/webapp/dist/assets/channel-BXVfYROZ.js +1 -0
  684. package/runtime/webapp/dist/assets/chevron-down-XE2oQBd4.js +6 -0
  685. package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-BKPZWdAm.js → chunk-2Q5K7J3B-BtlfOuc0.js} +1 -1
  686. package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-CzoucxkD.js → chunk-5VM5RSS4-BF9yQJzd.js} +1 -1
  687. package/runtime/webapp/dist/assets/{chunk-F27PBJKO-BtjIT_2x.js → chunk-F27PBJKO-pf-egmEh.js} +1 -1
  688. package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-E7OjoZ2a.js → chunk-IMKFNOWR-BfR5_VVQ.js} +1 -1
  689. package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-2-P5LQXh.js → chunk-JWPE2WC7-DbTyTFNP.js} +1 -1
  690. package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-Ciml2jQ6.js → chunk-POPQ4Y6H-BT6_juZY.js} +1 -1
  691. package/runtime/webapp/dist/assets/{chunk-SVP7TREG-Cn17SOC0.js → chunk-SVP7TREG-DY2tKcFY.js} +1 -1
  692. package/runtime/webapp/dist/assets/{chunk-TICWLB2K-soVY8Rir.js → chunk-TICWLB2K-BPVO6ABs.js} +1 -1
  693. package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-SZRctzdQ.js → chunk-XXDRQBXY-BBJZ1QYv.js} +1 -1
  694. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-CQO_yH-s.js +1 -0
  695. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-CQO_yH-s.js +1 -0
  696. package/runtime/webapp/dist/assets/{codeSyntax-CJey69ZL.js → codeSyntax-xRnBffPx.js} +3 -3
  697. package/runtime/webapp/dist/assets/collaboration-CAXZdGJ2.css +1 -0
  698. package/runtime/webapp/dist/assets/collaboration-Cs05dFqf.js +16 -0
  699. package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-BPyWK7NV.js → cose-bilkent-JH36ORCC-ClSfa8QG.js} +1 -1
  700. package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-DGeqxDcw.js → cynefin-OW5HDTMX-eaqJ1hh9.js} +1 -1
  701. package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DfTaUevr.js → cynefinDiagram-5FMLGOSQ-D6LCoxky.js} +1 -1
  702. package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-BIJAN2wi.js → dagre-GXQ25YYZ-Dfhd14zz.js} +1 -1
  703. package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-mi1RzwgR.js → diagram-S7CK7UJ4-DJ-IP_47.js} +1 -1
  704. package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-DGHNw_Z5.js → diagram-UQ7AKVKN-EGouAPlg.js} +1 -1
  705. package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-C42kDvCz.js → diagram-VSXAHHWV-Bs-OO7VR.js} +1 -1
  706. package/runtime/webapp/dist/assets/{diagram-VX7I27RA-CCi_2Nrs.js → diagram-VX7I27RA-jZrRtFaX.js} +1 -1
  707. package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-etykqcun.js → diagram-Z3DM3KII-Dh4qa87O.js} +1 -1
  708. package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-Ci_CYRSq.js → ebnfDiagram-PWID7BFC-Erzm8SS4.js} +1 -1
  709. package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-5hMmPL9A.js → erDiagram-RLTQ6QDP-Bm8taJK2.js} +1 -1
  710. package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-C3zLjEGc.js → flowDiagram-HODETNUW-BreC9BhS.js} +1 -1
  711. package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-BnQGTtxw.js → ganttDiagram-EL5Y4UJY-BvRJ1YUF.js} +1 -1
  712. package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-BHoB9Vnf.js → gitGraphDiagram-WWUBYQGX-CbQP1MtW.js} +1 -1
  713. package/runtime/webapp/dist/assets/index-CbdPFz5M.css +1 -0
  714. package/runtime/webapp/dist/assets/{index-B-7NTn1y.js → index-Dix4bjYG.js} +20 -20
  715. package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-DhdUaQo8.js → infoDiagram-27XIBGKW-Rykgl8_a.js} +1 -1
  716. package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-DsjH1me-.js → ishikawaDiagram-5VMMS53U-sC8ufaqI.js} +1 -1
  717. package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-CIZ4_aZN.js → journeyDiagram-3NMN7TZE-CNijGKux.js} +1 -1
  718. package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-DgKh1Z-A.js → kanban-definition-UXKFOSKX-DBKMClh0.js} +1 -1
  719. package/runtime/webapp/dist/assets/{layout-czPyb2al.js → layout-DS0bzI4O.js} +1 -1
  720. package/runtime/webapp/dist/assets/{linear-Ga8QXx11.js → linear-DZevSj2n.js} +1 -1
  721. package/runtime/webapp/dist/assets/loader-circle-DFr0GIMV.js +6 -0
  722. package/runtime/webapp/dist/assets/{mermaid.core-DKaRWnQS.js → mermaid.core-DENHPAAp.js} +5 -5
  723. package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-BQDxajmK.js → mindmap-definition-YA3MSWOX-CJCDUcbT.js} +1 -1
  724. package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-NkY17xnB.js → pegDiagram-XKGWAZYB-BLX-5i4p.js} +1 -1
  725. package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-JPTi2PQu.js → pieDiagram-E7YTZNPT-BIqAJdyz.js} +1 -1
  726. package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-CJ2gJOmJ.js → quadrantDiagram-AXDQQJYC-DieNVnKe.js} +1 -1
  727. package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-CGOY-qbx.js → railroadDiagram-O6MQD6OU-BPiX7LAR.js} +1 -1
  728. package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-3whFM60H.js → requirementDiagram-BXWQKSXE-DUc0NLZ6.js} +1 -1
  729. package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-Db0FsilA.js → sankeyDiagram-P5KCCOFB-C7f3C-pP.js} +1 -1
  730. package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-By-uBxRb.js → sequenceDiagram-WJ2MYXX4-DaXzBFJr.js} +1 -1
  731. package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-Cu-n0-Ha.js → sizeCapture-INFHLROL-T-GLRxIv.js} +1 -1
  732. package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-mao8ulZU.js → stateDiagram-D77RDMKH-BU2Gf9ox.js} +1 -1
  733. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-DSi-QN-m.js +1 -0
  734. package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-CU74lrfT.js → swimlanes-42K2YHIH-C1wWPmfp.js} +1 -1
  735. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-BBxsK2vI.js +8 -0
  736. package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-nZ7AIGuB.js → timeline-definition-24CTP7MA-Q3i4n3gS.js} +1 -1
  737. package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-DBYuziJe.js → vennDiagram-4TSXK5OY-BFM57R6n.js} +1 -1
  738. package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-D3j06kuW.js → wardleyDiagram-VM6X3IG4-D2PueiKh.js} +1 -1
  739. package/runtime/webapp/dist/assets/{web-Di92d3Qk.js → web-7pGvb0-e.js} +1 -1
  740. package/runtime/webapp/dist/assets/{web-DsQ0RrIM.js → web-BIDvb2mA.js} +1 -1
  741. package/runtime/webapp/dist/assets/x-Iz4dGBMu.js +26 -0
  742. package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-DUit8OM3.js → xychartDiagram-S5SC5T6Z-BuvvDC1s.js} +1 -1
  743. package/runtime/webapp/dist/index.html +2 -2
  744. package/runtime/ws-server.mjs +12 -2
  745. package/runtime/.next/server/app/api/projects/roots.body +0 -1
  746. package/runtime/.next/server/app/api/projects/roots.meta +0 -1
  747. package/runtime/.next/static/chunks/798-ed5787fe9c4dda16.js +0 -1
  748. package/runtime/.next/static/chunks/app/web/layout-977564d9dfb1d2be.js +0 -1
  749. package/runtime/.next/static/chunks/app/web/page-14110258a9f6416c.js +0 -1
  750. package/runtime/.next/static/chunks/main-app-eb950b53b17261cf.js +0 -1
  751. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-2haqfy07.mjs +0 -33
  752. package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-a92dt75k.mjs +0 -40
  753. package/runtime/webapp/dist/assets/App-CT1963CO.js +0 -372
  754. package/runtime/webapp/dist/assets/BrowserLivePanel-6ybO6kL1.js +0 -126
  755. package/runtime/webapp/dist/assets/RemoteDesktopPage-7cA_BPGi.js +0 -1
  756. package/runtime/webapp/dist/assets/channel-ClY3AR_f.js +0 -1
  757. package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-BdITBBFY.js +0 -1
  758. package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-BdITBBFY.js +0 -1
  759. package/runtime/webapp/dist/assets/index-RJ-FA30p.css +0 -1
  760. package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-CT6vAlJr.js +0 -1
  761. package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-BHWLUkBS.js +0 -8
  762. /package/runtime/.next/static/chunks/{webpack-0f87c4f7f499edcd.js → webpack-d331689549804d1b.js} +0 -0
  763. /package/runtime/.next/static/{RS0401GZXUxVqr7E6bXjQ → dyKXYeP5GzbBzXvcrg83P}/_buildManifest.js +0 -0
  764. /package/runtime/.next/static/{RS0401GZXUxVqr7E6bXjQ → dyKXYeP5GzbBzXvcrg83P}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=7719,e.ids=[7719],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},3415:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>f,requestAsyncStorage:()=>h,routeModule:()=>c,serverHooks:()=>p,staticGenerationAsyncStorage:()=>d});var i={};r.r(i),r.d(i,{POST:()=>l});var s=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(1614);async function l(e,{params:t}){if(!(0,u.V_)(t.id))return o.NextResponse.json({error:"Only native sessions can be handed off"},{status:405});try{let e=await (0,u.NL)().handoff(t.id,"desktop");return o.NextResponse.json(e)}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Native handoff failed"},{status:(0,u.WW)(e)})}}let c=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/handoff/route",pathname:"/api/sessions/[id]/handoff",filename:"route",bundlePath:"app/api/sessions/[id]/handoff/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/handoff/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:h,staticGenerationAsyncStorage:d,serverHooks:p}=c,m="/api/sessions/[id]/handoff/route";function f(){return(0,a.patchFetch)({serverHooks:p,staticGenerationAsyncStorage:d})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),s=r(785);let n=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var h=r(535),d=r(6279),p=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new d.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),N(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async create(e){let t=w(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new d.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=w(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return w(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new d.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new d.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new d.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new d.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?N(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function N(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function O(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,p.kO)());m.__nativeRuntimeService=new f((0,d.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,O("AGENT_CODEX_RUNTIME_ERROR",t),O("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,h.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,d.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function w(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let a=g(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:g(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function g(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,d.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof d.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(3415));module.exports=i})();
1
+ "use strict";(()=>{var e={};e.id=7719,e.ids=[7719],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},6157:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>f,requestAsyncStorage:()=>h,routeModule:()=>c,serverHooks:()=>p,staticGenerationAsyncStorage:()=>d});var i={};r.r(i),r.d(i,{POST:()=>l});var s=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(1614);async function l(e,{params:t}){if(!(0,u.V_)(t.id))return o.NextResponse.json({error:"Only native sessions can be handed off"},{status:405});try{let e=await (0,u.NL)().handoff(t.id,"desktop");return o.NextResponse.json(e)}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Native handoff failed"},{status:(0,u.WW)(e)})}}let c=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/handoff/route",pathname:"/api/sessions/[id]/handoff",filename:"route",bundlePath:"app/api/sessions/[id]/handoff/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/handoff/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:h,staticGenerationAsyncStorage:d,serverHooks:p}=c,m="/api/sessions/[id]/handoff/route";function f(){return(0,a.patchFetch)({serverHooks:p,staticGenerationAsyncStorage:d})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),s=r(785);let n=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>O,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var h=r(535),d=r(6279),p=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new d.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),N(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return g(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return g(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async create(e){let t=w(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new d.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=w(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return w(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new d.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new d.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new d.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new d.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new d.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?N(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function N(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function v(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function O(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,p.kO)());m.__nativeRuntimeService=new f((0,d.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,v("AGENT_CODEX_RUNTIME_ERROR",t),v("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,h.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,d.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function w(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let a=P(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:P(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function P(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function g(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,d.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof d.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(6157));module.exports=i})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=5348,e.ids=[5348],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},184:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>v,patchFetch:()=>w,requestAsyncStorage:()=>f,routeModule:()=>m,serverHooks:()=>g,staticGenerationAsyncStorage:()=>N});var i={};r.r(i),r.d(i,{GET:()=>p,POST:()=>h,dynamic:()=>c});var s=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(6279),l=r(1614);let c="force-dynamic";async function p(e,{params:t}){if(!(0,l.V_)(t.id))return o.NextResponse.json({error:"此会话不支持原生目标"},{status:400});try{return o.NextResponse.json({goal:await (0,l.NL)().getNativeGoal(t.id)})}catch(e){return d(e)}}async function h(e,{params:t}){let r;if(!(0,l.V_)(t.id))return o.NextResponse.json({error:"此会话不支持原生目标"},{status:400});try{r=(0,u.J9)(await e.json())}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"目标操作格式无效"},{status:400})}try{return o.NextResponse.json({goal:await (0,l.NL)().mutateNativeGoal(t.id,r)})}catch(e){return d(e)}}function d(e){return o.NextResponse.json({error:e instanceof Error?e.message:"原生目标操作失败"},{status:(0,l.WW)(e)})}let m=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/native-goal/route",pathname:"/api/sessions/[id]/native-goal",filename:"route",bundlePath:"app/api/sessions/[id]/native-goal/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/native-goal/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:f,staticGenerationAsyncStorage:N,serverHooks:g}=m,v="/api/sessions/[id]/native-goal/route";function w(){return(0,a.patchFetch)({serverHooks:g,staticGenerationAsyncStorage:N})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),s=r(785);let n=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var p=r(535),h=r(6279),d=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),N(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async create(e){let t=w(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=w(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return w(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new h.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?N(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function N(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function g(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,d.kO)());m.__nativeRuntimeService=new f((0,h.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,g("AGENT_CODEX_RUNTIME_ERROR",t),g("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,p.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function w(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let a=O(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:O(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function O(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof h.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(184));module.exports=i})();
1
+ "use strict";(()=>{var e={};e.id=5348,e.ids=[5348],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},606:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>g,patchFetch:()=>w,requestAsyncStorage:()=>N,routeModule:()=>m,serverHooks:()=>v,staticGenerationAsyncStorage:()=>f});var i={};r.r(i),r.d(i,{GET:()=>p,POST:()=>h,dynamic:()=>c});var s=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(6279),l=r(1614);let c="force-dynamic";async function p(e,{params:t}){if(!(0,l.V_)(t.id))return o.NextResponse.json({error:"此会话不支持原生目标"},{status:400});try{return o.NextResponse.json({goal:await (0,l.NL)().getNativeGoal(t.id)})}catch(e){return d(e)}}async function h(e,{params:t}){let r;if(!(0,l.V_)(t.id))return o.NextResponse.json({error:"此会话不支持原生目标"},{status:400});try{r=(0,u.J9)(await e.json())}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"目标操作格式无效"},{status:400})}try{return o.NextResponse.json({goal:await (0,l.NL)().mutateNativeGoal(t.id,r)})}catch(e){return d(e)}}function d(e){return o.NextResponse.json({error:e instanceof Error?e.message:"原生目标操作失败"},{status:(0,l.WW)(e)})}let m=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/native-goal/route",pathname:"/api/sessions/[id]/native-goal",filename:"route",bundlePath:"app/api/sessions/[id]/native-goal/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/native-goal/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:N,staticGenerationAsyncStorage:f,serverHooks:v}=m,g="/api/sessions/[id]/native-goal/route";function w(){return(0,a.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:f})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),s=r(785);let n=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>g,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var p=r(535),h=r(6279),d=r(785);let m=globalThis;class N{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),f(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async create(e){let t=w(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=w(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return w(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new h.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?f(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function f(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function v(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function g(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,d.kO)());m.__nativeRuntimeService=new N((0,h.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,v("AGENT_CODEX_RUNTIME_ERROR",t),v("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,p.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function w(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let a=O(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:O(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function O(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof h.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(606));module.exports=i})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=3097,e.ids=[3097],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},3680:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>f,patchFetch:()=>y,requestAsyncStorage:()=>h,routeModule:()=>g,serverHooks:()=>v,staticGenerationAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{GET:()=>c});var o=t(7786),n=t(5042),i=t(2184),p=t(1890),u=t(1322),a=t(7519),d=t(1614),x=t(8274),q=t(6279);let l=new u.pGt;async function c(e,{params:r}){if((0,d.V_)(r.id))try{return p.NextResponse.json(await (0,d.NL)().getQueryIndex(r.id))}catch(e){return p.NextResponse.json({error:e instanceof Error?e.message:"Internal error",...e instanceof q.no?{code:e.code}:{}},{status:(0,d.WW)(e)})}let t=await a.agentHost.getSessionStore().get(r.id);if(!t)return p.NextResponse.json({error:"Session not found"},{status:404});let s=(!t.messages?.length&&t.events?.length?x.Q(t.events):t.messages)?.filter(e=>!u.lWN(e))??[];return p.NextResponse.json(l.getOrCreate(r.id,s))}let g=new o.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/query-index/route",pathname:"/api/sessions/[id]/query-index",filename:"route",bundlePath:"app/api/sessions/[id]/query-index/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/query-index/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:h,staticGenerationAsyncStorage:m,serverHooks:v}=g,f="/api/sessions/[id]/query-index/route";function y(){return(0,i.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:m})}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8375,6703,6244,1322,1773,4621,7519,8532],()=>t(3680));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=3097,e.ids=[3097],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},9664:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>f,patchFetch:()=>y,requestAsyncStorage:()=>h,routeModule:()=>g,serverHooks:()=>v,staticGenerationAsyncStorage:()=>m});var s={};t.r(s),t.d(s,{GET:()=>c});var o=t(7786),n=t(5042),i=t(2184),p=t(1890),u=t(1322),a=t(7519),d=t(1614),x=t(8274),q=t(6279);let l=new u.pGt;async function c(e,{params:r}){if((0,d.V_)(r.id))try{return p.NextResponse.json(await (0,d.NL)().getQueryIndex(r.id))}catch(e){return p.NextResponse.json({error:e instanceof Error?e.message:"Internal error",...e instanceof q.no?{code:e.code}:{}},{status:(0,d.WW)(e)})}let t=await a.agentHost.getSessionStore().get(r.id);if(!t)return p.NextResponse.json({error:"Session not found"},{status:404});let s=(!t.messages?.length&&t.events?.length?x.Q(t.events):t.messages)?.filter(e=>!u.lWN(e))??[];return p.NextResponse.json(l.getOrCreate(r.id,s))}let g=new o.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/query-index/route",pathname:"/api/sessions/[id]/query-index",filename:"route",bundlePath:"app/api/sessions/[id]/query-index/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/query-index/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:h,staticGenerationAsyncStorage:m,serverHooks:v}=g,f="/api/sessions/[id]/query-index/route";function y(){return(0,i.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:m})}}};var r=require("../../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8375,6703,6244,1322,1773,4621,7519,8532],()=>t(9664));module.exports=s})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=3610,e.ids=[3610],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},369:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>f,requestAsyncStorage:()=>d,routeModule:()=>c,serverHooks:()=>h,staticGenerationAsyncStorage:()=>p});var i={};r.r(i),r.d(i,{POST:()=>l});var s=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(1614);async function l(e,{params:t}){if(!(0,u.V_)(t.id)||!t.id.startsWith("runtime:codex:"))return o.NextResponse.json({error:"Only Codex sessions can be released"},{status:405});try{return await (0,u.NL)().release(t.id),o.NextResponse.json({status:"released"})}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Codex release failed"},{status:(0,u.WW)(e)})}}let c=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/release/route",pathname:"/api/sessions/[id]/release",filename:"route",bundlePath:"app/api/sessions/[id]/release/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/release/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:d,staticGenerationAsyncStorage:p,serverHooks:h}=c,m="/api/sessions/[id]/release/route";function f(){return(0,a.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:p})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),s=r(785);let n=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>w,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),p=r(6279),h=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),N(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>v(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>v(e,r,this.platform)),e)}async create(e){let t=v(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=v(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return v(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new p.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?N(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function N(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function O(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function w(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,O("AGENT_CODEX_RUNTIME_ERROR",t),O("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,p.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function v(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let a=g(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:g(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function g(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof p.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(369));module.exports=i})();
1
+ "use strict";(()=>{var e={};e.id=3610,e.ids=[3610],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},6548:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>f,requestAsyncStorage:()=>d,routeModule:()=>c,serverHooks:()=>h,staticGenerationAsyncStorage:()=>p});var i={};r.r(i),r.d(i,{POST:()=>l});var s=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(1614);async function l(e,{params:t}){if(!(0,u.V_)(t.id)||!t.id.startsWith("runtime:codex:"))return o.NextResponse.json({error:"Only Codex sessions can be released"},{status:405});try{return await (0,u.NL)().release(t.id),o.NextResponse.json({status:"released"})}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Codex release failed"},{status:(0,u.WW)(e)})}}let c=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/release/route",pathname:"/api/sessions/[id]/release",filename:"route",bundlePath:"app/api/sessions/[id]/release/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/release/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:d,staticGenerationAsyncStorage:p,serverHooks:h}=c,m="/api/sessions/[id]/release/route";function f(){return(0,a.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:p})}},535:(e,t,r)=>{r.d(t,{L:()=>a});var i=r(1322),s=r(785);let n=!1;function a(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),p=r(6279),h=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),N(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return g(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return g(this.withPendingCreations(t).map(e=>w(e,r,this.platform)),e)}async create(e){let t=w(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=w(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return w(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new p.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?N(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function N(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function O(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,O("AGENT_CODEX_RUNTIME_ERROR",t),O("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,p.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function w(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let a=P(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:P(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function P(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function g(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof p.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(6548));module.exports=i})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=5241,e.ids=[5241],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},8441:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>N,patchFetch:()=>P,requestAsyncStorage:()=>h,routeModule:()=>x,serverHooks:()=>q,staticGenerationAsyncStorage:()=>f});var t={};r.r(t),r.d(t,{DELETE:()=>v,GET:()=>l,PATCH:()=>g});var n=r(7786),o=r(5042),i=r(2184),a=r(1890),u=r(1322),d=r(7519),p=r(1614),m=r(6279),c=r(8274);async function l(e,{params:s}){let r=new URL(e.url),t=r.searchParams.get("before"),n=r.searchParams.get("after"),o=r.searchParams.get("anchor"),i=r.searchParams.get("limit"),l=r.searchParams.get("view"),g=r.searchParams.get("revision"),v=r.searchParams.get("turnId"),x="core"===l||"trace"===l?l:void 0,h=null!==t||null!==n||null!==o||null!==i||x||g||v?{before:t||void 0,after:n||void 0,anchor:o||void 0,limit:function(e){if(null===e)return;let s=Number(e);return Number.isFinite(s)?s:void 0}(i),view:x,revision:g||void 0,turnId:v||void 0}:void 0;if((0,p.V_)(s.id))try{let e=await (0,p.NL)().get(s.id,h);return a.NextResponse.json(e)}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Internal error",...e instanceof m.no?{code:e.code}:{}},{status:(0,p.WW)(e)})}let f=await d.agentHost.getSessionStore().get(s.id);if(!f)return a.NextResponse.json({error:"Session not found"},{status:404});let q=d.agentHost.getRecoverableRun(f),N=[...(!f.messages?.length&&!q&&Array.isArray(f.events)&&f.events.length>0?c.Q(f.events):f.messages)?.filter(e=>!u.lWN(e))??[]??[],...q?(0,c.Q)(f.events.slice(q.eventStart),{runId:q.runId,isStreaming:q.running}):[]],P=q?q.running?"active":"failed":f.status,R=q?{runId:q.runId,eventId:q.eventId,running:q.running}:void 0;try{let e=h?{...f,agentType:"customer-agent",status:P,permissionMode:(0,u.NyU)(f.metadata.permissionMode),...R?{activeRun:R}:{},...(0,u.MOJ)(N??[],f.events??[],h)}:{...f,agentType:"customer-agent",status:P,messages:N,permissionMode:(0,u.NyU)(f.metadata.permissionMode),...R?{activeRun:R}:{}};return a.NextResponse.json({...e,messageQueueVersion:1,goalState:(0,u.E0T)(f.metadata)})}catch(e){if(e instanceof u.ujo)return a.NextResponse.json({error:e.message,code:e.code},{status:409});throw e}}async function g(e,{params:s}){let r=await e.json();if(void 0!==r.nativePermissionPreset){if(!(0,p.V_)(s.id)||void 0!==r.permissionMode||"string"!=typeof r.nativePermissionPreset||!r.nativePermissionPreset.trim()||r.nativePermissionPreset.length>128)return a.NextResponse.json({error:"Invalid native permission preset"},{status:400});try{return a.NextResponse.json(await (0,p.NL)().setNativePermissionPreset(s.id,r.nativePermissionPreset))}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to update native permissions"},{status:(0,p.WW)(e)})}}if(!(0,u.ueU)(r.permissionMode))return a.NextResponse.json({error:"Invalid permission mode"},{status:400});if((0,p.V_)(s.id))try{let e=await (0,p.NL)().setPermissionMode(s.id,r.permissionMode);return a.NextResponse.json(e)}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to update permission mode"},{status:(0,p.WW)(e)})}try{let e=await d.agentHost.setSessionPermissionMode(s.id,r.permissionMode);return a.NextResponse.json({...e,permissionMode:(0,u.NyU)(e.metadata.permissionMode)})}catch(r){let e=r instanceof Error?r.message:"Unable to update permission mode",s=e.startsWith("Session not found")?404:500;return a.NextResponse.json({error:e},{status:s})}}async function v(e,{params:s}){if((0,p.V_)(s.id))try{return await (0,p.NL)().delete(s.id),a.NextResponse.json({status:"deleted"})}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to delete session"},{status:(0,p.WW)(e)})}return d.agentHost.isSessionRunning(s.id)?a.NextResponse.json({error:"Session is currently running"},{status:409}):(await d.agentHost.getSessionStore().delete(s.id),a.NextResponse.json({status:"deleted"}))}let x=new n.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:h,staticGenerationAsyncStorage:f,serverHooks:q}=x,N="/api/sessions/[id]/route";function P(){return(0,i.patchFetch)({serverHooks:q,staticGenerationAsyncStorage:f})}}};var s=require("../../../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[8375,6703,6244,1322,1773,4621,7519,8532],()=>r(8441));module.exports=t})();
1
+ "use strict";(()=>{var e={};e.id=5241,e.ids=[5241],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},8543:(e,s,r)=>{r.r(s),r.d(s,{originalPathname:()=>P,patchFetch:()=>q,requestAsyncStorage:()=>f,routeModule:()=>x,serverHooks:()=>N,staticGenerationAsyncStorage:()=>h});var t={};r.r(t),r.d(t,{DELETE:()=>g,GET:()=>l,PATCH:()=>v});var n=r(7786),o=r(5042),i=r(2184),a=r(1890),d=r(1322),u=r(7519),p=r(1614),m=r(6279),c=r(8274);async function l(e,{params:s}){let r=new URL(e.url),t=r.searchParams.get("before"),n=r.searchParams.get("after"),o=r.searchParams.get("anchor"),i=r.searchParams.get("limit"),l=r.searchParams.get("view"),v=r.searchParams.get("revision"),g=r.searchParams.get("turnId"),x="core"===l||"trace"===l?l:void 0,f=null!==t||null!==n||null!==o||null!==i||x||v||g?{before:t||void 0,after:n||void 0,anchor:o||void 0,limit:function(e){if(null===e)return;let s=Number(e);return Number.isFinite(s)?s:void 0}(i),view:x,revision:v||void 0,turnId:g||void 0}:void 0;if((0,p.V_)(s.id))try{let e=await (0,p.NL)().get(s.id,f);return a.NextResponse.json(e)}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Internal error",...e instanceof m.no?{code:e.code}:{}},{status:(0,p.WW)(e)})}let h=await u.agentHost.getSessionStore().get(s.id);if(!h)return a.NextResponse.json({error:"Session not found"},{status:404});let N=u.agentHost.getRecoverableRun(h),P=[...(!h.messages?.length&&!N&&Array.isArray(h.events)&&h.events.length>0?c.Q(h.events):h.messages)?.filter(e=>!d.lWN(e))??[]??[],...N?(0,c.Q)(h.events.slice(N.eventStart),{runId:N.runId,isStreaming:N.running}):[]],q=N?N.running?"active":"failed":h.status,R=N?{runId:N.runId,eventId:N.eventId,running:N.running}:void 0;try{let e=f?{...h,agentType:"customer-agent",status:q,permissionMode:(0,d.NyU)(h.metadata.permissionMode),...R?{activeRun:R}:{},...(0,d.MOJ)(P??[],h.events??[],f)}:{...h,agentType:"customer-agent",status:q,messages:P,permissionMode:(0,d.NyU)(h.metadata.permissionMode),...R?{activeRun:R}:{}};return a.NextResponse.json({...e,messageQueueVersion:1,goalState:(0,d.E0T)(h.metadata)})}catch(e){if(e instanceof d.ujo)return a.NextResponse.json({error:e.message,code:e.code},{status:409});throw e}}async function v(e,{params:s}){let r=await e.json();if(void 0!==r.nativeMode){if(!(0,p.V_)(s.id)||void 0!==r.permissionMode||void 0!==r.nativePermissionPreset||"string"!=typeof r.nativeMode||!r.nativeMode.trim()||r.nativeMode.length>128)return a.NextResponse.json({error:"Invalid native mode"},{status:400});try{return a.NextResponse.json(await (0,p.NL)().setNativeMode(s.id,r.nativeMode))}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to update native mode"},{status:(0,p.WW)(e)})}}if(void 0!==r.nativePermissionPreset){if(!(0,p.V_)(s.id)||void 0!==r.permissionMode||"string"!=typeof r.nativePermissionPreset||!r.nativePermissionPreset.trim()||r.nativePermissionPreset.length>128)return a.NextResponse.json({error:"Invalid native permission preset"},{status:400});try{return a.NextResponse.json(await (0,p.NL)().setNativePermissionPreset(s.id,r.nativePermissionPreset))}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to update native permissions"},{status:(0,p.WW)(e)})}}if(!(0,d.ueU)(r.permissionMode))return a.NextResponse.json({error:"Invalid permission mode"},{status:400});if((0,p.V_)(s.id))try{let e=await (0,p.NL)().setPermissionMode(s.id,r.permissionMode);return a.NextResponse.json(e)}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to update permission mode"},{status:(0,p.WW)(e)})}try{let e=await u.agentHost.setSessionPermissionMode(s.id,r.permissionMode);return a.NextResponse.json({...e,permissionMode:(0,d.NyU)(e.metadata.permissionMode)})}catch(r){let e=r instanceof Error?r.message:"Unable to update permission mode",s=e.startsWith("Session not found")?404:500;return a.NextResponse.json({error:e},{status:s})}}async function g(e,{params:s}){if((0,p.V_)(s.id))try{return await (0,p.NL)().delete(s.id),a.NextResponse.json({status:"deleted"})}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Unable to delete session"},{status:(0,p.WW)(e)})}return u.agentHost.isSessionRunning(s.id)?a.NextResponse.json({error:"Session is currently running"},{status:409}):(await u.agentHost.getSessionStore().delete(s.id),a.NextResponse.json({status:"deleted"}))}let x=new n.AppRouteRouteModule({definition:{kind:o.x.APP_ROUTE,page:"/api/sessions/[id]/route",pathname:"/api/sessions/[id]",filename:"route",bundlePath:"app/api/sessions/[id]/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/route.ts",nextConfigOutput:"standalone",userland:t}),{requestAsyncStorage:f,staticGenerationAsyncStorage:h,serverHooks:N}=x,P="/api/sessions/[id]/route";function q(){return(0,i.patchFetch)({serverHooks:N,staticGenerationAsyncStorage:h})}}};var s=require("../../../../webpack-runtime.js");s.C(e);var r=e=>s(s.s=e),t=s.X(0,[8375,6703,6244,1322,1773,4621,7519,8532],()=>r(8543));module.exports=t})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=6248,e.ids=[6248],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},9798:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>N,patchFetch:()=>_,requestAsyncStorage:()=>f,routeModule:()=>g,serverHooks:()=>v,staticGenerationAsyncStorage:()=>w});var s={};r.r(s),r.d(s,{DELETE:()=>p,GET:()=>c,PATCH:()=>h,PUT:()=>d});var n=r(7786),i=r(5042),a=r(2184),o=r(1890),u=r(1366),l=r(1614);async function c(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});let r=await (0,u.C)().getGoal(t.id);return o.NextResponse.json({goal:r})}async function d(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});try{let r=await e.json();if("string"!=typeof r.objective||!r.objective.trim())return o.NextResponse.json({error:"objective is required"},{status:400});let s=null===r.tokenBudget||void 0===r.tokenBudget?void 0:Number(r.tokenBudget);if(void 0!==s&&(!Number.isFinite(s)||s<=0))return o.NextResponse.json({error:"tokenBudget must be a positive number or null"},{status:400});let n=await (0,u.C)().setGoal(t.id,r.objective,{tokenBudget:s??null});return o.NextResponse.json({goal:n})}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Failed to set thread goal"},{status:m(e)})}}async function h(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});try{let r=await e.json(),s=(0,u.C)();if("pause"===r.action)return o.NextResponse.json({goal:await s.pauseGoal(t.id)});if("resume"===r.action)return o.NextResponse.json({goal:await s.resumeGoal(t.id)});return o.NextResponse.json({error:"action must be 'pause' or 'resume'"},{status:400})}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Failed to update thread goal"},{status:m(e)})}}async function p(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});let r=await (0,u.C)().clearGoal(t.id);return o.NextResponse.json({cleared:r})}function m(e){let t=e instanceof Error?e.message:"";return/no thread goal|Cannot transition/.test(t)?409:(/required|must be|at most/i.test(t),400)}let g=new n.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/sessions/[id]/thread-goal/route",pathname:"/api/sessions/[id]/thread-goal",filename:"route",bundlePath:"app/api/sessions/[id]/thread-goal/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/thread-goal/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:f,staticGenerationAsyncStorage:w,serverHooks:v}=g,N="/api/sessions/[id]/thread-goal/route";function _(){return(0,a.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:w})}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>P,WW:()=>T});var s=r(7561),n=r(612),i=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,s.accessSync)(e,s.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let s=u(r);t.push({source:"pin",path:r,executable:s,version:s?l(r):void 0,error:s?void 0:`${e.environmentVariable} "${r}" is not executable`})}let s=function(e){for(let t of(process.env.PATH??"").split(i.delimiter).filter(Boolean)){let r=(0,i.resolve)(t,e);if(u(r))return r}}(e.name);return s&&s!==r&&t.push({source:"path",path:s,executable:!0,version:l(s)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),h=r(6279),p=r(785);let m=globalThis;class g{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let s=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return s;let n=new Set(s.data.map(e=>e.id)),i=s.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),f(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||n.has(r.id)||i.unshift(r);return{...s,data:i}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return O(this.withPendingCreations(t).map(e=>N(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return O(this.withPendingCreations(t).map(e=>N(e,r,this.platform)),e)}async create(e){let t=N(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!P(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=N(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(s){let r=this.pendingCreations.get(e);if(!r)throw s;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return N(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:s}=await Promise.resolve().then(r.bind(r,1322));return s(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,s,n){return this.runtime.run(e,t,r,s,n)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new h.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,s="web",n){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,s,n)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,s="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,s)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,s){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,s)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?f(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function f(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function w(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,i.join)((0,n.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(i.delimiter),r=e.filter(e=>(0,s.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(i.delimiter))}();let e=new o.XWE((0,p.kO)());m.__nativeRuntimeService=new g((0,h.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,w("AGENT_CODEX_RUNTIME_ERROR",t),w("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function N(e,t,r=process.platform){let{projectId:s,...n}=e;if(!e.cwd)return n;let a=_(e.cwd,r),o="win32"===r?i.win32.sep:i.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:_(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...n,projectId:u.project.id}:n}function _(e,t=process.platform){if("win32"!==t)return(0,i.resolve)(e);let r=i.win32.resolve(e),s=i.win32.parse(r).root;return(r.length>s.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function O(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function P(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof h.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var s=r(1322),n=r(6279),i=r(785);class a{constructor(){this.tasks=new s.vo4((0,i.kO)()),this.scheduler=new n.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(7519).then(r.bind(r,7519)),{getCustomerGoalCoordinator:s}=await Promise.all([r.e(7519),r.e(732)]).then(r.bind(r,732)),n=e.sessionId;n&&await t.getSessionStore().get(n)||(n=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:n})),await s().enqueue(n,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let o=globalThis;function u(){return o.__sharedCronService??=new a}},1366:(e,t,r)=>{r.d(t,{C:()=>o,a:()=>u});var s=r(1322),n=r(7519),i=r(785);let a=globalThis;function o(){if(a.__threadGoalService)return a.__threadGoalService;let e=new s.rA9(new s.ZIW((0,i.kO)()),{isSessionRunning:e=>n.agentHost.isSessionRunning(e),startTurn:async(e,t)=>{if(n.agentHost.isSessionRunning(e))return!1;try{return n.agentHost.startRun(t,e,void 0,{source:"goal"}).completion.catch(()=>{}),!0}catch(e){if(e instanceof n.A)return!1;throw e}},steerHidden:(e,t)=>n.agentHost.steer(t,e,"__goal__"),sessionExists:async e=>!!await n.agentHost.getSessionStore().get(e)},{onUpdated:(e,t)=>n.agentHost.publishExternal(e,{type:"goal_updated",goal:t}),onCleared:e=>n.agentHost.publishExternal(e,{type:"goal_cleared",sessionId:e})});return n.agentHost.onRunSettled=t=>{e.onRunSettled({sessionId:t.sessionId,failed:t.failed,usageLimited:t.usageLimited,tokens:t.newTokens,seconds:t.durationMs/1e3}).catch(()=>{})},n.agentHost.threadGoalToolsProvider=t=>(0,s.DAt)(e,t),a.__threadGoalService=e,e}function u(){o().resumeInterrupted().catch(()=>{})}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,1773,4621,7519],()=>r(9798));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=6248,e.ids=[6248],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},5986:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>v,patchFetch:()=>O,requestAsyncStorage:()=>f,routeModule:()=>g,serverHooks:()=>N,staticGenerationAsyncStorage:()=>w});var s={};r.r(s),r.d(s,{DELETE:()=>p,GET:()=>c,PATCH:()=>h,PUT:()=>d});var n=r(7786),i=r(5042),a=r(2184),o=r(1890),u=r(1366),l=r(1614);async function c(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});let r=await (0,u.C)().getGoal(t.id);return o.NextResponse.json({goal:r})}async function d(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});try{let r=await e.json();if("string"!=typeof r.objective||!r.objective.trim())return o.NextResponse.json({error:"objective is required"},{status:400});let s=null===r.tokenBudget||void 0===r.tokenBudget?void 0:Number(r.tokenBudget);if(void 0!==s&&(!Number.isFinite(s)||s<=0))return o.NextResponse.json({error:"tokenBudget must be a positive number or null"},{status:400});let n=await (0,u.C)().setGoal(t.id,r.objective,{tokenBudget:s??null});return o.NextResponse.json({goal:n})}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Failed to set thread goal"},{status:m(e)})}}async function h(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});try{let r=await e.json(),s=(0,u.C)();if("pause"===r.action)return o.NextResponse.json({goal:await s.pauseGoal(t.id)});if("resume"===r.action)return o.NextResponse.json({goal:await s.resumeGoal(t.id)});return o.NextResponse.json({error:"action must be 'pause' or 'resume'"},{status:400})}catch(e){return o.NextResponse.json({error:e instanceof Error?e.message:"Failed to update thread goal"},{status:m(e)})}}async function p(e,{params:t}){if((0,l.V_)(t.id))return o.NextResponse.json({error:"Thread goal is only available on customer-agent sessions"},{status:400});let r=await (0,u.C)().clearGoal(t.id);return o.NextResponse.json({cleared:r})}function m(e){let t=e instanceof Error?e.message:"";return/no thread goal|Cannot transition/.test(t)?409:(/required|must be|at most/i.test(t),400)}let g=new n.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/sessions/[id]/thread-goal/route",pathname:"/api/sessions/[id]/thread-goal",filename:"route",bundlePath:"app/api/sessions/[id]/thread-goal/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/thread-goal/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:f,staticGenerationAsyncStorage:w,serverHooks:N}=g,v="/api/sessions/[id]/thread-goal/route";function O(){return(0,a.patchFetch)({serverHooks:N,staticGenerationAsyncStorage:w})}},1614:(e,t,r)=>{r.d(t,{NL:()=>N,V_:()=>_,WW:()=>T});var s=r(7561),n=r(612),i=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,s.accessSync)(e,s.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let s=u(r);t.push({source:"pin",path:r,executable:s,version:s?l(r):void 0,error:s?void 0:`${e.environmentVariable} "${r}" is not executable`})}let s=function(e){for(let t of(process.env.PATH??"").split(i.delimiter).filter(Boolean)){let r=(0,i.resolve)(t,e);if(u(r))return r}}(e.name);return s&&s!==r&&t.push({source:"path",path:s,executable:!0,version:l(s)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),h=r(6279),p=r(785);let m=globalThis;class g{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let s=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return s;let n=new Set(s.data.map(e=>e.id)),i=s.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),f(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||n.has(r.id)||i.unshift(r);return{...s,data:i}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>v(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>v(e,r,this.platform)),e)}async create(e){let t=v(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!_(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=v(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(s){let r=this.pendingCreations.get(e);if(!r)throw s;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return v(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:s}=await Promise.resolve().then(r.bind(r,1322));return s(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,s,n){return this.runtime.run(e,t,r,s,n)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new h.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,s="web",n){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,s,n)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,s="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,s)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,s){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,s)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?f(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function f(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function w(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function N(){if(!m.__nativeRuntimeService){!function(){let e=[(0,i.join)((0,n.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(i.delimiter),r=e.filter(e=>(0,s.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(i.delimiter))}();let e=new o.XWE((0,p.kO)());m.__nativeRuntimeService=new g((0,h.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,w("AGENT_CODEX_RUNTIME_ERROR",t),w("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function v(e,t,r=process.platform){let{projectId:s,...n}=e;if(!e.cwd)return n;let a=O(e.cwd,r),o="win32"===r?i.win32.sep:i.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:O(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...n,projectId:u.project.id}:n}function O(e,t=process.platform){if("win32"!==t)return(0,i.resolve)(e);let r=i.win32.resolve(e),s=i.win32.parse(r).root;return(r.length>s.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function _(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof h.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var s=r(1322),n=r(6279),i=r(785);class a{constructor(){this.tasks=new s.vo4((0,i.kO)()),this.scheduler=new n.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(7519).then(r.bind(r,7519)),{getCustomerGoalCoordinator:s}=await Promise.all([r.e(7519),r.e(732)]).then(r.bind(r,732)),n=e.sessionId;n&&await t.getSessionStore().get(n)||(n=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:n})),await s().enqueue(n,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let o=globalThis;function u(){return o.__sharedCronService??=new a}},1366:(e,t,r)=>{r.d(t,{C:()=>o,a:()=>u});var s=r(1322),n=r(7519),i=r(785);let a=globalThis;function o(){if(a.__threadGoalService)return a.__threadGoalService;let e=new s.rA9(new s.ZIW((0,i.kO)()),{isSessionRunning:e=>n.agentHost.isSessionRunning(e),startTurn:async(e,t)=>{if(n.agentHost.isSessionRunning(e))return!1;try{return n.agentHost.startRun(t,e,void 0,{source:"goal"}).completion.catch(()=>{}),!0}catch(e){if(e instanceof n.A)return!1;throw e}},steerHidden:(e,t)=>n.agentHost.steer(t,e,"__goal__"),sessionExists:async e=>!!await n.agentHost.getSessionStore().get(e)},{onUpdated:(e,t)=>n.agentHost.publishExternal(e,{type:"goal_updated",goal:t}),onCleared:e=>n.agentHost.publishExternal(e,{type:"goal_cleared",sessionId:e})});return n.agentHost.onRunSettled=t=>{e.onRunSettled({sessionId:t.sessionId,failed:t.failed,usageLimited:t.usageLimited,tokens:t.newTokens,seconds:t.durationMs/1e3}).catch(()=>{})},n.agentHost.threadGoalToolsProvider=t=>(0,s.DAt)(e,t),a.__threadGoalService=e,e}function u(){o().resumeInterrupted().catch(()=>{})}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,1773,4621,7519],()=>r(5986));module.exports=s})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=6787,e.ids=[6787],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},5516:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>f,requestAsyncStorage:()=>d,routeModule:()=>c,serverHooks:()=>h,staticGenerationAsyncStorage:()=>p});var i={};r.r(i),r.d(i,{GET:()=>l});var s=r(7786),n=r(5042),o=r(2184),a=r(1890),u=r(1614);async function l(e,{params:t}){if(!(0,u.V_)(t.id))return a.NextResponse.json({error:"Session tool results are available only for native sessions",code:"OPERATION_NOT_SUPPORTED"},{status:405});let r=new URL(e.url),i=r.searchParams.get("turnId")?.trim(),s=r.searchParams.get("itemId")?.trim(),n=r.searchParams.get("revision")?.trim();if(!i||!s||!n)return a.NextResponse.json({error:"turnId, itemId, and revision are required",code:"INVALID_SESSION_ID"},{status:400});try{let e=await (0,u.NL)().getSessionToolResult(t.id,{turnId:i,itemId:s,revision:n});return a.NextResponse.json(e)}catch(r){let e="object"==typeof r&&null!==r&&"string"==typeof r.code?r.code:void 0,t=(0,u.WW)(r);return a.NextResponse.json({error:r instanceof Error?r.message:"Unable to load tool result",...e?{code:e}:{}},{status:t})}}let c=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/tool-result/route",pathname:"/api/sessions/[id]/tool-result",filename:"route",bundlePath:"app/api/sessions/[id]/tool-result/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/[id]/tool-result/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:d,staticGenerationAsyncStorage:p,serverHooks:h}=c,m="/api/sessions/[id]/tool-result/route";function f(){return(0,o.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:p})}},535:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(1322),s=r(785);let n=!1;function o(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>v,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),o=r(7718),a=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,a.wyD)((0,o.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,a.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),p=r(6279),h=r(785);let m=globalThis;class f{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),N(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>g(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>g(e,r,this.platform)),e)}async create(e){let t=g(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=g(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return g(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new p.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?N(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function N(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function O(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function v(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new a.XWE((0,h.kO)());m.__nativeRuntimeService=new f((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:a.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,O("AGENT_CODEX_RUNTIME_ERROR",t),O("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,p.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function g(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let o=w(e.cwd,r),a="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:w(e.description,r)})).filter(({path:e})=>o===e||o.startsWith(`${e}${a}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function w(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof p.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(5516));module.exports=i})();
1
+ "use strict";(()=>{var e={};e.id=6787,e.ids=[6787],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},8067:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>m,patchFetch:()=>N,requestAsyncStorage:()=>d,routeModule:()=>c,serverHooks:()=>h,staticGenerationAsyncStorage:()=>p});var i={};r.r(i),r.d(i,{GET:()=>l});var s=r(7786),n=r(5042),o=r(2184),a=r(1890),u=r(1614);async function l(e,{params:t}){if(!(0,u.V_)(t.id))return a.NextResponse.json({error:"Session tool results are available only for native sessions",code:"OPERATION_NOT_SUPPORTED"},{status:405});let r=new URL(e.url),i=r.searchParams.get("turnId")?.trim(),s=r.searchParams.get("itemId")?.trim(),n=r.searchParams.get("revision")?.trim();if(!i||!s||!n)return a.NextResponse.json({error:"turnId, itemId, and revision are required",code:"INVALID_SESSION_ID"},{status:400});try{let e=await (0,u.NL)().getSessionToolResult(t.id,{turnId:i,itemId:s,revision:n});return a.NextResponse.json(e)}catch(r){let e="object"==typeof r&&null!==r&&"string"==typeof r.code?r.code:void 0,t=(0,u.WW)(r);return a.NextResponse.json({error:r instanceof Error?r.message:"Unable to load tool result",...e?{code:e}:{}},{status:t})}}let c=new s.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/[id]/tool-result/route",pathname:"/api/sessions/[id]/tool-result",filename:"route",bundlePath:"app/api/sessions/[id]/tool-result/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/[id]/tool-result/route.ts",nextConfigOutput:"standalone",userland:i}),{requestAsyncStorage:d,staticGenerationAsyncStorage:p,serverHooks:h}=c,m="/api/sessions/[id]/tool-result/route";function N(){return(0,o.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:p})}},535:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(1322),s=r(785);let n=!1;function o(){let e=(0,i.Qfc)();if(e)return e;let t=(0,i.qZ_)({dir:(0,s.ME)(),source:"server",minLevel:"info",handlers:{exitOnUncaughtException:!1}});return n||(n=!0,t.info("server logger attached",{dir:t.dir,pid:process.pid})),t}},1614:(e,t,r)=>{r.d(t,{NL:()=>O,V_:()=>E,WW:()=>T});var i=r(7561),s=r(612),n=r(9411),o=r(7718),a=r(1322);function u(e){if(!e.trim())return!1;try{return(0,i.accessSync)(e,i.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,a.wyD)((0,o.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let i=u(r);t.push({source:"pin",path:r,executable:i,version:i?l(r):void 0,error:i?void 0:`${e.environmentVariable} "${r}" is not executable`})}let i=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return i&&i!==r&&t.push({source:"path",path:i,executable:!0,version:l(i)}),(0,a.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var d=r(535),p=r(6279),h=r(785);let m=globalThis;class N{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new p.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let i=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return i;let s=new Set(i.data.map(e=>e.id)),n=i.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),f(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||s.has(r.id)||n.unshift(r);return{...i,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return g(this.withPendingCreations(t).map(e=>P(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return g(this.withPendingCreations(t).map(e=>P(e,r,this.platform)),e)}async create(e){let t=P(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!E(e))throw new p.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=P(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(i){let r=this.pendingCreations.get(e);if(!r)throw i;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return P(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:i}=await Promise.resolve().then(r.bind(r,1322));return i(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,i,s){return this.runtime.run(e,t,r,i,s)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new p.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,i="web",s){if(!this.runtime.startRun)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,i,s)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new p.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new p.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new p.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,i="web"){if(!this.runtime.enqueueGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,i)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new p.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,i){if(!this.runtime.updateMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,i)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new p.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?f(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function f(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function v(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function O(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,s.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,i.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new a.XWE((0,h.kO)());m.__nativeRuntimeService=new N((0,p.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:a.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,v("AGENT_CODEX_RUNTIME_ERROR",t),v("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,d.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,p.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function P(e,t,r=process.platform){let{projectId:i,...s}=e;if(!e.cwd)return s;let o=w(e.cwd,r),a="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:w(e.description,r)})).filter(({path:e})=>o===e||o.startsWith(`${e}${a}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...s,projectId:u.project.id}:s}function w(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),i=n.win32.parse(r).root;return(r.length>i.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function g(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function E(e){try{return"customer-agent"!==(0,p.Vu)(e).agentType}catch{return!1}}function T(e){if(e instanceof p.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}}};var t=require("../../../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),i=t.X(0,[8375,6703,6244,1322,1773],()=>r(8067));module.exports=i})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=1772,e.ids=[1772],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},5881:e=>{e.exports=require("node:util")},1439:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>f,patchFetch:()=>N,requestAsyncStorage:()=>m,routeModule:()=>d,serverHooks:()=>w,staticGenerationAsyncStorage:()=>g});var s={};r.r(s),r.d(s,{GET:()=>p,POST:()=>h});var i=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(1322),l=r(7519),c=r(1614);async function p(e){let t=new URL(e.url),r=t.searchParams.get("projectId")||void 0,s="1"===t.searchParams.get("refresh"),i=await l.agentHost.getSessionStore().list(r),n=(0,c.NL)(),a=i.map(({messages:e,events:t,...r})=>({...r,agentType:"customer-agent",messageQueueVersion:1,canDelete:!l.agentHost.isSessionRunning(r.id),permissionMode:(0,u.NyU)(r.metadata.permissionMode)}));try{let e=s?await n.refresh(r):await n.list(r);return o.NextResponse.json([...a,...e])}catch(e){return console.error("Native session discovery failed:",e),o.NextResponse.json(a)}}async function h(e){let t=await e.json(),r=t.agentType??"customer-agent";if("customer-agent"!==r)try{if(!t.projectId&&!t.cwd?.trim())throw new l.B("请选择宿主机项目","PROJECT_PATH_REQUIRED",400);let e=t.cwd?.trim()||(t.projectId?await l.agentHost.resolveProjectWorkingDirectory(t.projectId,!0):""),s=await (0,c.NL)().create({agentType:r,title:t.title??"新会话",cwd:e,...t.projectId?{projectId:t.projectId}:{}});return o.NextResponse.json(s,{status:201})}catch(e){if(e instanceof l.B)return o.NextResponse.json({error:{code:e.code,message:e.message}},{status:e.status});return o.NextResponse.json({error:e instanceof Error?e.message:"Internal error"},{status:(0,c.WW)(e)})}let s=await l.agentHost.createSession(t.title??"Untitled",t.projectId??"");return o.NextResponse.json({...s,agentType:"customer-agent",messageQueueVersion:1},{status:201})}let d=new i.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:"app/api/sessions/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/sessions/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:m,staticGenerationAsyncStorage:g,serverHooks:w}=d,f="/api/sessions/route";function N(){return(0,a.patchFetch)({serverHooks:w,staticGenerationAsyncStorage:g})}},1614:(e,t,r)=>{r.d(t,{NL:()=>N,V_:()=>T,WW:()=>E});var s=r(7561),i=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,s.accessSync)(e,s.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let s=u(r);t.push({source:"pin",path:r,executable:s,version:s?l(r):void 0,error:s?void 0:`${e.environmentVariable} "${r}" is not executable`})}let s=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return s&&s!==r&&t.push({source:"path",path:s,executable:!0,version:l(s)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var p=r(535),h=r(6279),d=r(785);let m=globalThis;class g{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new h.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let s=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return s;let i=new Set(s.data.map(e=>e.id)),n=s.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),w(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||i.has(r.id)||n.unshift(r);return{...s,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return O(this.withPendingCreations(t).map(e=>P(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return O(this.withPendingCreations(t).map(e=>P(e,r,this.platform)),e)}async create(e){let t=P(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!T(e))throw new h.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=P(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(s){let r=this.pendingCreations.get(e);if(!r)throw s;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return P(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:s}=await Promise.resolve().then(r.bind(r,1322));return s(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,s,i){return this.runtime.run(e,t,r,s,i)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new h.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,s="web",i){if(!this.runtime.startRun)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,s,i)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new h.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new h.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new h.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,s="web"){if(!this.runtime.enqueueGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,s)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new h.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,s){if(!this.runtime.updateMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,s)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new h.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?w(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function w(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function f(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function N(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,i.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,s.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,d.kO)());m.__nativeRuntimeService=new g((0,h.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,f("AGENT_CODEX_RUNTIME_ERROR",t),f("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,p.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,h.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function P(e,t,r=process.platform){let{projectId:s,...i}=e;if(!e.cwd)return i;let a=v(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:v(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...i,projectId:u.project.id}:i}function v(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),s=n.win32.parse(r).root;return(r.length>s.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function O(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function T(e){try{return"customer-agent"!==(0,h.Vu)(e).agentType}catch{return!1}}function E(e){if(e instanceof h.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var s=r(1322),i=r(6279),n=r(785);class a{constructor(){this.tasks=new s.vo4((0,n.kO)()),this.scheduler=new i.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(7519).then(r.bind(r,7519)),{getCustomerGoalCoordinator:s}=await Promise.all([r.e(7519),r.e(732)]).then(r.bind(r,732)),i=e.sessionId;i&&await t.getSessionStore().get(i)||(i=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:i})),await s().enqueue(i,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let o=globalThis;function u(){return o.__sharedCronService??=new a}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,1773,4621,7519],()=>r(1439));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=1772,e.ids=[1772],e.modules={7728:e=>{e.exports=require("@anthropic-ai/claude-agent-sdk")},5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},1282:e=>{e.exports=require("child_process")},2048:e=>{e.exports=require("fs")},9801:e=>{e.exports=require("os")},5315:e=>{e.exports=require("path")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},4492:e=>{e.exports=require("node:stream")},6915:e=>{e.exports=require("node:string_decoder")},1041:e=>{e.exports=require("node:url")},7261:e=>{e.exports=require("node:util")},8682:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>N,patchFetch:()=>v,requestAsyncStorage:()=>g,routeModule:()=>m,serverHooks:()=>f,staticGenerationAsyncStorage:()=>w});var s={};r.r(s),r.d(s,{GET:()=>d,POST:()=>h});var i=r(7786),n=r(5042),a=r(2184),o=r(1890),u=r(1322),l=r(7519),c=r(355),p=r(1614);async function d(e){let t=new URL(e.url),r=t.searchParams.get("projectId")||void 0,s="1"===t.searchParams.get("refresh"),i=(0,c.v)(),n=(await l.agentHost.getSessionStore().list(r)).filter(e=>!i.has(e.id)),a=(0,p.NL)(),d=n.map(({messages:e,events:t,...r})=>({...r,agentType:"customer-agent",messageQueueVersion:1,canDelete:!l.agentHost.isSessionRunning(r.id),permissionMode:(0,u.NyU)(r.metadata.permissionMode)}));try{let e=s?await a.refresh(r):await a.list(r);return o.NextResponse.json([...d,...e.filter(e=>!i.has(e.id))])}catch(e){return console.error("Native session discovery failed:",e),o.NextResponse.json(d)}}async function h(e){let t=await e.json(),r=t.agentType??"customer-agent";if("customer-agent"!==r)try{if(!t.projectId&&!t.cwd?.trim())throw new l.B("请选择宿主机项目","PROJECT_PATH_REQUIRED",400);let e=t.cwd?.trim()||(t.projectId?await l.agentHost.resolveProjectWorkingDirectory(t.projectId,!0):""),s=await (0,p.NL)().create({agentType:r,title:t.title??"新会话",cwd:e,...t.projectId?{projectId:t.projectId}:{}});return o.NextResponse.json(s,{status:201})}catch(e){if(e instanceof l.B)return o.NextResponse.json({error:{code:e.code,message:e.message}},{status:e.status});return o.NextResponse.json({error:e instanceof Error?e.message:"Internal error"},{status:(0,p.WW)(e)})}let s=await l.agentHost.createSession(t.title??"Untitled",t.projectId??"");return o.NextResponse.json({...s,agentType:"customer-agent",messageQueueVersion:1},{status:201})}let m=new i.AppRouteRouteModule({definition:{kind:n.x.APP_ROUTE,page:"/api/sessions/route",pathname:"/api/sessions",filename:"route",bundlePath:"app/api/sessions/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/sessions/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:g,staticGenerationAsyncStorage:w,serverHooks:f}=m,N="/api/sessions/route";function v(){return(0,a.patchFetch)({serverHooks:f,staticGenerationAsyncStorage:w})}},355:(e,t,r)=>{r.d(t,{v:()=>n});var s=r(1322),i=r(785);function n(){return new s.BYZ((0,i.kO)()).memberSessionIds()}},1614:(e,t,r)=>{r.d(t,{NL:()=>N,V_:()=>T,WW:()=>E});var s=r(7561),i=r(612),n=r(9411),a=r(7718),o=r(1322);function u(e){if(!e.trim())return!1;try{return(0,s.accessSync)(e,s.constants.X_OK),!0}catch{return!1}}function l(e){try{return(0,o.wyD)((0,a.execFileSync)(e,["--version"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}))}catch{return}}function c(e){let t=[],r=process.env[e.environmentVariable]?.trim();if(r){let s=u(r);t.push({source:"pin",path:r,executable:s,version:s?l(r):void 0,error:s?void 0:`${e.environmentVariable} "${r}" is not executable`})}let s=function(e){for(let t of(process.env.PATH??"").split(n.delimiter).filter(Boolean)){let r=(0,n.resolve)(t,e);if(u(r))return r}}(e.name);return s&&s!==r&&t.push({source:"path",path:s,executable:!0,version:l(s)}),(0,o.neJ)(t,{name:e.name,minimumVersion:e.minimumVersion})}var p=r(535),d=r(6279),h=r(785);let m=globalThis;class g{constructor(e,t=async()=>[],r=process.platform){this.runtime=e,this.listProjects=t,this.platform=r,this.pendingCreations=new Map}health(){return this.runtime.health()}listModels(e){return this.runtime.listModels(e)}listWorkspaces(e,t){return this.runtime.listWorkspaces(e,t)}importWorkspace(e,t,r){if(!this.runtime.importWorkspace)throw new d.no("Native workspace import is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.importWorkspace(e,t,r)}async listWorkspaceSessions(e,t,r){let s=await this.runtime.listWorkspaceSessions(e,t,r);if(r?.cursor)return s;let i=new Set(s.data.map(e=>e.id)),n=s.data.map(e=>{let t=this.pendingCreations.get(e.id);return t?(this.pendingCreations.delete(e.id),w(e,t)):e});for(let r of this.pendingCreations.values())r.agentType!==e||r.projectId!==t||i.has(r.id)||n.unshift(r);return{...s,data:n}}async list(e){let[t,r]=await Promise.all([this.runtime.list(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>v(e,r,this.platform)),e)}async refresh(e){let[t,r]=await Promise.all([this.runtime.refresh(),this.listProjects()]);return P(this.withPendingCreations(t).map(e=>v(e,r,this.platform)),e)}async create(e){let t=v(await this.runtime.create(e),await this.listProjects(),this.platform),r=e.projectId?{...t,projectId:e.projectId}:t;return this.pendingCreations.set(r.id,r),r}async fork(e,t){if(!T(e))throw new d.no("Customer Agent sessions do not support native forks","OPERATION_NOT_SUPPORTED");let r=v(t?await this.runtime.fork(e,t):await this.runtime.fork(e),await this.listProjects(),this.platform);return this.pendingCreations.set(r.id,r),r}async delete(e){await this.runtime.delete(e),this.pendingCreations.delete(e)}async get(e,t){let r;try{r=await this.runtime.get(e,t)}catch(s){let r=this.pendingCreations.get(e);if(!r)throw s;return t?{...r,messages:[],events:[],history:{nextCursor:null,hasMore:!1,pageSize:0,totalItems:0}}:{...r,messages:[],events:[]}}return v(r,await this.listProjects(),this.platform)}async getQueryIndex(e){if(this.runtime.getQueryIndex)return this.runtime.getQueryIndex(e);let t=await this.runtime.get(e),{buildSessionQueryIndex:s}=await Promise.resolve().then(r.bind(r,1322));return s(e,t.messages)}getSessionToolResult(e,t){return this.runtime.getSessionToolResult(e,t)}getSessionWatchPath(e){return this.runtime.getSessionWatchPath(e)}run(e,t,r,s,i){return this.runtime.run(e,t,r,s,i)}steer(e,t){return this.runtime.steer(e,t)}abort(e){return this.runtime.abort(e)}async release(e){if(!this.runtime.release)throw new d.no("Native runtime release is unavailable","RUNTIME_UNAVAILABLE");await this.runtime.release(e)}answerQuestion(e,t){return this.runtime.answerQuestion(e,t)}async startRun(e,t,r,s="web",i){if(!this.runtime.startRun)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.startRun(e,t,r,s,i)}async subscribe(e,t,r){if(!this.runtime.subscribe)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.subscribe(e,t,r)}async snapshot(e,t=0){if(!this.runtime.snapshot)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.snapshot(e,t)}async setPermissionMode(e,t){if(!this.runtime.setPermissionMode)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.setPermissionMode(e,t)}async setNativeMode(e,t){if(!this.runtime.setNativeMode)throw new d.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativeMode(e,t)}async setNativePermissionPreset(e,t){if(!this.runtime.setNativePermissionPreset)throw new d.no("Native permission presets are unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.setNativePermissionPreset(e,t)}async getNativeGoal(e){if(!this.runtime.getNativeGoal)throw new d.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.getNativeGoal(e)}async mutateNativeGoal(e,t){if(!this.runtime.mutateNativeGoal)throw new d.no("此运行时未提供原生目标","OPERATION_NOT_SUPPORTED");return this.runtime.mutateNativeGoal(e,t)}async handoff(e,t){if(!this.runtime.handoff)throw new d.no("Native runtime broker is unavailable","RUNTIME_UNAVAILABLE");return this.runtime.handoff(e,t)}async getGoals(e,t="web"){if(!this.runtime.getGoals)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.getGoals(e,t)}async enqueueGoal(e,t,r,s="web"){if(!this.runtime.enqueueGoal)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueGoal(e,t,r,s)}async reorderGoals(e,t){if(!this.runtime.reorderGoals)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderGoals(e,t)}async cancelGoal(e,t){if(!this.runtime.cancelGoal)throw new d.no("Goal mode is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelGoal(e,t,"web")}async enqueueMessage(e,t,r="web"){if(!this.runtime.enqueueMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.enqueueMessage(e,t,r)}async reorderMessages(e,t){if(!this.runtime.reorderMessages)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.reorderMessages(e,t)}async updateMessage(e,t,r,s){if(!this.runtime.updateMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.updateMessage(e,t,r,s)}async cancelMessage(e,t){if(!this.runtime.cancelMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.cancelMessage(e,t)}async steerMessage(e,t){if(!this.runtime.steerMessage)throw new d.no("Message queue is unavailable","OPERATION_NOT_SUPPORTED");return this.runtime.steerMessage(e,t)}withPendingCreations(e){let t=new Set,r=e.map(e=>{t.add(e.id);let r=this.pendingCreations.get(e.id);return this.pendingCreations.delete(e.id),r?w(e,r):e});return[...[...this.pendingCreations.values()].filter(e=>!t.has(e.id)).sort((e,t)=>t.updated.localeCompare(e.updated)),...r]}}function w(e,t){return{...e,cwd:e.cwd||t.cwd,projectId:e.projectId??t.projectId}}function f(e,t){t.executable?delete process.env[e]:process.env[e]=t.detail}function N(){if(!m.__nativeRuntimeService){!function(){let e=[(0,n.join)((0,i.homedir)(),".local","bin"),"/opt/homebrew/bin","/usr/local/bin"],t=(process.env.PATH??"").split(n.delimiter),r=e.filter(e=>(0,s.existsSync)(e)&&!t.includes(e));r.length>0&&(process.env.PATH=[...t,...r].join(n.delimiter))}();let e=new o.XWE((0,h.kO)());m.__nativeRuntimeService=new g((0,d.v6)({runtimeFactory:e=>{let t=c({name:"codex",environmentVariable:"AGENT_CODEX_BIN",minimumVersion:o.hix}),r=c({name:"opencode",environmentVariable:"AGENT_OPENCODE_BIN"});return process.pid,f("AGENT_CODEX_RUNTIME_ERROR",t),f("AGENT_OPENCODE_RUNTIME_ERROR",r),(0,p.L)().info("native runtime host elected",{pid:process.pid,codex:t.executable??null,codexSource:t.source??null,codexDetail:t.detail,opencode:r.executable??null,opencodeDetail:r.detail}),(0,d.WH)(t.executable??"codex",e,r.executable??"opencode")}}),()=>e.list())}return m.__nativeRuntimeService}function v(e,t,r=process.platform){let{projectId:s,...i}=e;if(!e.cwd)return i;let a=O(e.cwd,r),o="win32"===r?n.win32.sep:n.sep,u=t.filter(e=>e.description).map(e=>({project:e,path:O(e.description,r)})).filter(({path:e})=>a===e||a.startsWith(`${e}${o}`)).sort((e,t)=>t.path.length-e.path.length)[0];return u?{...i,projectId:u.project.id}:i}function O(e,t=process.platform){if("win32"!==t)return(0,n.resolve)(e);let r=n.win32.resolve(e),s=n.win32.parse(r).root;return(r.length>s.length?r.replace(/[\\/]+$/,""):r).toLowerCase()}function P(e,t){return void 0===t?e:e.filter(e=>e.projectId===t)}function T(e){try{return"customer-agent"!==(0,d.Vu)(e).agentType}catch{return!1}}function E(e){if(e instanceof d.no)switch(e.code){case"SESSION_NOT_FOUND":return 404;case"SESSION_OCCUPIED":case"SESSION_ALREADY_RUNNING":case"APPROVAL_EXPIRED":case"CODEX_SESSION_VERSION_INCOMPATIBLE":case"STALE_SESSION_ANCHOR":case"NATIVE_GOAL_CONFLICT":return 409;case"RUNTIME_UNAVAILABLE":return 503;case"OPERATION_NOT_SUPPORTED":return 405;default:return 400}return 500}},1489:(e,t,r)=>{r.d(t,{N:()=>u});var s=r(1322),i=r(6279),n=r(785);class a{constructor(){this.tasks=new s.vo4((0,n.kO)()),this.scheduler=new i.ST(this.tasks,e=>{this.fire(e).catch(e=>console.error("Scheduled Customer Agent run failed",e))},()=>{}),this.scheduler.start()}async fire(e){let{agentHost:t}=await r.e(7519).then(r.bind(r,7519)),{getCustomerGoalCoordinator:s}=await Promise.all([r.e(7519),r.e(732)]).then(r.bind(r,732)),i=e.sessionId;i&&await t.getSessionStore().get(i)||(i=(await t.createSession(e.label||"定时任务")).id,this.tasks.update(e.id,{sessionId:i})),await s().enqueue(i,e.prompt)}call(e,t){let r=String(t[0]||"");switch(e){case"cronList":return this.tasks.list();case"cronCreate":{if("string"!=typeof t[0]||"string"!=typeof t[1]||!t[1].trim())throw Error("cron and prompt required");let e=t[2]&&"object"==typeof t[2]?t[2]:{};return this.tasks.create({cron:t[0],prompt:t[1],recurring:!1!==e.recurring,enabled:!0,durable:!0,..."string"==typeof e.sessionId?{sessionId:e.sessionId}:{},..."string"==typeof e.label?{label:e.label}:{}})}case"cronPause":return this.tasks.pause(r);case"cronResume":return this.tasks.resume(r);case"cronDelete":return this.tasks.delete(r);case"cronDeleteAll":return this.tasks.deleteAll(),{ok:!0};default:throw Error("Unsupported schedule operation")}}}let o=globalThis;function u(){return o.__sharedCronService??=new a}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[8375,6703,6244,1322,1773,4621,7519],()=>r(8682));module.exports=s})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=6668,e.ids=[6668],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},9801:e=>{e.exports=require("os")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},1041:e=>{e.exports=require("node:url")},8310:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>v,patchFetch:()=>g,requestAsyncStorage:()=>f,routeModule:()=>c,serverHooks:()=>m,staticGenerationAsyncStorage:()=>h});var o={};r.r(o),r.d(o,{GET:()=>u,POST:()=>l,dynamic:()=>p});var i=r(7786),s=r(5042),n=r(2184),a=r(1982),d=r(9001);let p="force-dynamic";async function u(){return Response.json((0,a.dp)().publicView(),{headers:{"cache-control":"no-store"}})}async function l(e){let t=(0,d.o)(e);if(t)return t;try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw new a.kg("设置必须是对象");return Response.json((0,a.dp)().save(t),{headers:{"cache-control":"no-store"}})}catch(e){return Response.json({error:e instanceof Error?e.message:"保存失败"},{status:e instanceof a.kg?e.status:400})}}let c=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/settings/route",pathname:"/api/settings",filename:"route",bundlePath:"app/api/settings/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/settings/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:f,staticGenerationAsyncStorage:h,serverHooks:m}=c,v="/api/settings/route";function g(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:h})}},7786:(e,t,r)=>{e.exports=r(517)},785:(e,t,r)=>{r.d(t,{ME:()=>a,kO:()=>n,sr:()=>d});var o=r(9411);let i=function(){let e=process.argv[1];if(e){let t=(0,o.dirname)((0,o.resolve)(e)),r=`${o.sep}node_modules${o.sep}.bin`;return t.endsWith(r)?(0,o.resolve)(t,"..",".."):t}return(0,o.resolve)(process.cwd())}();function s(e=process.env,t=i){return(0,o.resolve)(e.AGENT_DATA_DIR?.trim()||t)}function n(){return s()}function a(e=process.env,t=s(e)){let r=e.AGENT_LOG_DIR?.trim();if(r)return(0,o.resolve)(r);let i=e.AGENTROAM_DATA_DIR?.trim();return i?(0,o.resolve)(i,"logs"):(0,o.join)(t,".agent-data","logs")}function d(){return function(e=process.env,t=i){return(0,o.resolve)(e.AGENT_WORKING_DIRECTORY?.trim()||t)}(process.env,n())}},1982:(e,t,r)=>{let o;r.d(t,{dp:()=>l,kg:()=>d});var i=r(1322),s=r(785),n=r(6005);let a="__agentroam_stored_secret__";class d extends Error{constructor(e,t=400){super(e),this.status=t}}class p{constructor(e,t=process.env){this.baseDir=e,this.store=new i.nAl(e),null===this.store.get("sharedSettingsInitialized")&&(0,i.N8n)(e).db.transaction(()=>{if(!this.store.get("profiles")&&!this.store.get("apiKey")&&t.AGENT_API_KEY){let e={id:"server-default",name:"服务端默认",provider:t.AGENT_MODEL_PROVIDER||"openai",modelId:t.AGENT_MODEL_ID||"gpt-4o",apiKey:t.AGENT_API_KEY,baseUrl:t.AGENT_BASE_URL||""};this.store.saveAll({...this.store.getAll(),profiles:[e],activeProfileId:e.id,modelProvider:e.provider,modelId:e.modelId,apiKey:e.apiKey,baseUrl:e.baseUrl,isConfigured:!0})}this.store.set("sharedSettingsInitialized","1")})()}read(){let e=[];try{e=JSON.parse(this.store.get("activeAgentIds")||"[]")}catch{}return{...this.store.getAll(),activeAgentIds:e,revision:Number(this.store.get("sharedSettingsRevision")||0)}}publicView(){let e=this.read();return{...e,settingsSpaceId:(0,n.createHash)("sha256").update(this.baseDir).digest("hex").slice(0,24),apiKey:e.apiKey?a:"",profiles:e.profiles.map(e=>({...e,apiKey:e.apiKey?a:""}))}}save(e){return(0,i.N8n)(this.baseDir).db.transaction(()=>{let t=this.read();if(void 0!==e.revision&&e.revision!==t.revision)throw new d("设置已被另一端修改,请重新加载后保存",409);let r={...t};for(let t of["modelProvider","modelId","baseUrl","workingDirectory","activeProfileId"])if(void 0!==e[t]){if("string"!=typeof e[t])throw new d(`${t} 必须是字符串`);r[t]=e[t]}if(void 0!==e.maxIterations){if("number"!=typeof e.maxIterations||!Number.isSafeInteger(e.maxIterations)||e.maxIterations<0)throw new d("maxIterations 必须是非负整数");r.maxIterations=e.maxIterations}if(void 0!==e.contextWindow){if("number"!=typeof e.contextWindow||!Number.isFinite(e.contextWindow)||e.contextWindow<8||e.contextWindow>2e3)throw new d("contextWindow 超出范围");r.contextWindow=e.contextWindow}if(void 0!==e.reasoningEffort){if(!["off","low","medium","high"].includes(String(e.reasoningEffort)))throw new d("reasoningEffort 无效");r.reasoningEffort=e.reasoningEffort}if(void 0!==e.taskNotifications){if(!e.taskNotifications||"object"!=typeof e.taskNotifications||Array.isArray(e.taskNotifications))throw new d("taskNotifications 必须是对象");let t=e.taskNotifications;for(let e of["completionEnabled","soundEnabled","notifyWhileForeground"])if(void 0!==t[e]&&"boolean"!=typeof t[e])throw new d(`taskNotifications.${e} 必须是布尔值`);r.taskNotifications=(0,i.mDL)({...r.taskNotifications,...t})}if(void 0!==e.apiKey&&(r.apiKey=u(e.apiKey,t.apiKey)),void 0!==e.profiles){if(!Array.isArray(e.profiles)||e.profiles.length>100)throw new d("profiles 必须是数组");let o=new Set;r.profiles=e.profiles.map(e=>{if(!e||"object"!=typeof e)throw new d("profile 无效");for(let t of["id","name","provider","modelId","baseUrl"])if("string"!=typeof e[t])throw new d(`profile.${t} 无效`);if(!e.id||o.has(e.id))throw new d("profile.id 重复或为空");if(o.add(e.id),!["openai","anthropic","deepseek","aihub"].includes(e.provider))throw new d("不支持的模型提供方");if(void 0!==e.maxOutputTokens&&("number"!=typeof e.maxOutputTokens||!Number.isInteger(e.maxOutputTokens)||e.maxOutputTokens<256||e.maxOutputTokens>131072))throw new d("profile.maxOutputTokens 超出范围");if(void 0!==e.requestTimeoutSeconds&&("number"!=typeof e.requestTimeoutSeconds||!Number.isInteger(e.requestTimeoutSeconds)||e.requestTimeoutSeconds<30||e.requestTimeoutSeconds>1800))throw new d("profile.requestTimeoutSeconds 超出范围");return{id:e.id,name:e.name,provider:e.provider,modelId:e.modelId,baseUrl:e.baseUrl,apiKey:u(e.apiKey,t.profiles.find(t=>t.id===e.id)?.apiKey||""),...void 0===e.maxOutputTokens?{}:{maxOutputTokens:e.maxOutputTokens},...void 0===e.requestTimeoutSeconds?{}:{requestTimeoutSeconds:e.requestTimeoutSeconds}}})}let o=r.profiles.find(e=>e.id===r.activeProfileId);if(r.activeProfileId&&!o)throw new d("找不到当前配置档案");if(o&&Object.assign(r,{modelProvider:o.provider,modelId:o.modelId,apiKey:o.apiKey,baseUrl:o.baseUrl}),void 0!==e.activeAgentIds){if(!Array.isArray(e.activeAgentIds)||!e.activeAgentIds.every(e=>"string"==typeof e))throw new d("activeAgentIds 无效");r.activeAgentIds=[...new Set(e.activeAgentIds)]}return r.isConfigured="aihub"===r.modelProvider?!!r.modelId:!!(r.apiKey&&r.modelId),this.store.saveAll(r),this.store.set("activeAgentIds",JSON.stringify(r.activeAgentIds)),this.store.set("sharedSettingsRevision",String(t.revision+1)),this.publicView()})()}}function u(e,t){if(void 0===e||""===e||e===a)return t;if("string"!=typeof e||e.length>16384)throw new d("apiKey 无效");return e}function l(){return o??=new p((0,s.kO)())}},9001:(e,t,r)=>{r.d(t,{o:()=>i});let o=new Set(["capacitor://localhost","ionic://localhost"]);function i(e){if(!e.headers.get("content-type")?.toLowerCase().startsWith("application/json"))return Response.json({error:"JSON required"},{status:415});let t=e.headers.get("origin");if(!t||o.has(t))return null;let r=new URL(e.url),i="1"===process.env.AGENT_TRUST_TUNNEL_PROXY,s=i?e.headers.get("x-forwarded-host")?.split(",")[0].trim()||e.headers.get("host")||r.host:e.headers.get("host")||r.host,n=i&&e.headers.get("x-forwarded-proto")?.split(",")[0].trim()||r.protocol.slice(0,-1);return t!==`${n}://${s}`?Response.json({error:"Cross-origin write denied"},{status:403}):null}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[8375,1322],()=>r(8310));module.exports=o})();
1
+ "use strict";(()=>{var e={};e.id=6668,e.ids=[6668],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},9801:e=>{e.exports=require("os")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},1041:e=>{e.exports=require("node:url")},9015:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>v,patchFetch:()=>g,requestAsyncStorage:()=>f,routeModule:()=>c,serverHooks:()=>m,staticGenerationAsyncStorage:()=>h});var o={};r.r(o),r.d(o,{GET:()=>u,POST:()=>l,dynamic:()=>p});var i=r(7786),s=r(5042),n=r(2184),a=r(1982),d=r(9001);let p="force-dynamic";async function u(){return Response.json((0,a.dp)().publicView(),{headers:{"cache-control":"no-store"}})}async function l(e){let t=(0,d.o)(e);if(t)return t;try{let t=await e.json();if(!t||"object"!=typeof t||Array.isArray(t))throw new a.kg("设置必须是对象");return Response.json((0,a.dp)().save(t),{headers:{"cache-control":"no-store"}})}catch(e){return Response.json({error:e instanceof Error?e.message:"保存失败"},{status:e instanceof a.kg?e.status:400})}}let c=new i.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/settings/route",pathname:"/api/settings",filename:"route",bundlePath:"app/api/settings/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/settings/route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:f,staticGenerationAsyncStorage:h,serverHooks:m}=c,v="/api/settings/route";function g(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:h})}},7786:(e,t,r)=>{e.exports=r(517)},785:(e,t,r)=>{r.d(t,{ME:()=>a,kO:()=>n,sr:()=>d});var o=r(9411);let i=function(){let e=process.argv[1];if(e){let t=(0,o.dirname)((0,o.resolve)(e)),r=`${o.sep}node_modules${o.sep}.bin`;return t.endsWith(r)?(0,o.resolve)(t,"..",".."):t}return(0,o.resolve)(process.cwd())}();function s(e=process.env,t=i){return(0,o.resolve)(e.AGENT_DATA_DIR?.trim()||t)}function n(){return s()}function a(e=process.env,t=s(e)){let r=e.AGENT_LOG_DIR?.trim();if(r)return(0,o.resolve)(r);let i=e.AGENTROAM_DATA_DIR?.trim();return i?(0,o.resolve)(i,"logs"):(0,o.join)(t,".agent-data","logs")}function d(){return function(e=process.env,t=i){return(0,o.resolve)(e.AGENT_WORKING_DIRECTORY?.trim()||t)}(process.env,n())}},1982:(e,t,r)=>{let o;r.d(t,{dp:()=>l,kg:()=>d});var i=r(1322),s=r(785),n=r(6005);let a="__agentroam_stored_secret__";class d extends Error{constructor(e,t=400){super(e),this.status=t}}class p{constructor(e,t=process.env){this.baseDir=e,this.store=new i.nAl(e),null===this.store.get("sharedSettingsInitialized")&&(0,i.N8n)(e).db.transaction(()=>{if(!this.store.get("profiles")&&!this.store.get("apiKey")&&t.AGENT_API_KEY){let e={id:"server-default",name:"服务端默认",provider:t.AGENT_MODEL_PROVIDER||"openai",modelId:t.AGENT_MODEL_ID||"gpt-4o",apiKey:t.AGENT_API_KEY,baseUrl:t.AGENT_BASE_URL||""};this.store.saveAll({...this.store.getAll(),profiles:[e],activeProfileId:e.id,modelProvider:e.provider,modelId:e.modelId,apiKey:e.apiKey,baseUrl:e.baseUrl,isConfigured:!0})}this.store.set("sharedSettingsInitialized","1")})()}read(){let e=[];try{e=JSON.parse(this.store.get("activeAgentIds")||"[]")}catch{}return{...this.store.getAll(),activeAgentIds:e,revision:Number(this.store.get("sharedSettingsRevision")||0)}}publicView(){let e=this.read();return{...e,settingsSpaceId:(0,n.createHash)("sha256").update(this.baseDir).digest("hex").slice(0,24),apiKey:e.apiKey?a:"",profiles:e.profiles.map(e=>({...e,apiKey:e.apiKey?a:""}))}}save(e){return(0,i.N8n)(this.baseDir).db.transaction(()=>{let t=this.read();if(void 0!==e.revision&&e.revision!==t.revision)throw new d("设置已被另一端修改,请重新加载后保存",409);let r={...t};for(let t of["modelProvider","modelId","baseUrl","workingDirectory","activeProfileId"])if(void 0!==e[t]){if("string"!=typeof e[t])throw new d(`${t} 必须是字符串`);r[t]=e[t]}if(void 0!==e.maxIterations){if("number"!=typeof e.maxIterations||!Number.isSafeInteger(e.maxIterations)||e.maxIterations<0)throw new d("maxIterations 必须是非负整数");r.maxIterations=e.maxIterations}if(void 0!==e.contextWindow){if("number"!=typeof e.contextWindow||!Number.isFinite(e.contextWindow)||e.contextWindow<8||e.contextWindow>2e3)throw new d("contextWindow 超出范围");r.contextWindow=e.contextWindow}if(void 0!==e.reasoningEffort){if(!["off","low","medium","high"].includes(String(e.reasoningEffort)))throw new d("reasoningEffort 无效");r.reasoningEffort=e.reasoningEffort}if(void 0!==e.taskNotifications){if(!e.taskNotifications||"object"!=typeof e.taskNotifications||Array.isArray(e.taskNotifications))throw new d("taskNotifications 必须是对象");let t=e.taskNotifications;for(let e of["completionEnabled","soundEnabled","notifyWhileForeground"])if(void 0!==t[e]&&"boolean"!=typeof t[e])throw new d(`taskNotifications.${e} 必须是布尔值`);r.taskNotifications=(0,i.mDL)({...r.taskNotifications,...t})}if(void 0!==e.apiKey&&(r.apiKey=u(e.apiKey,t.apiKey)),void 0!==e.profiles){if(!Array.isArray(e.profiles)||e.profiles.length>100)throw new d("profiles 必须是数组");let o=new Set;r.profiles=e.profiles.map(e=>{if(!e||"object"!=typeof e)throw new d("profile 无效");for(let t of["id","name","provider","modelId","baseUrl"])if("string"!=typeof e[t])throw new d(`profile.${t} 无效`);if(!e.id||o.has(e.id))throw new d("profile.id 重复或为空");if(o.add(e.id),!["openai","anthropic","deepseek","aihub"].includes(e.provider))throw new d("不支持的模型提供方");if(void 0!==e.maxOutputTokens&&("number"!=typeof e.maxOutputTokens||!Number.isInteger(e.maxOutputTokens)||e.maxOutputTokens<256||e.maxOutputTokens>131072))throw new d("profile.maxOutputTokens 超出范围");if(void 0!==e.requestTimeoutSeconds&&("number"!=typeof e.requestTimeoutSeconds||!Number.isInteger(e.requestTimeoutSeconds)||e.requestTimeoutSeconds<30||e.requestTimeoutSeconds>1800))throw new d("profile.requestTimeoutSeconds 超出范围");return{id:e.id,name:e.name,provider:e.provider,modelId:e.modelId,baseUrl:e.baseUrl,apiKey:u(e.apiKey,t.profiles.find(t=>t.id===e.id)?.apiKey||""),...void 0===e.maxOutputTokens?{}:{maxOutputTokens:e.maxOutputTokens},...void 0===e.requestTimeoutSeconds?{}:{requestTimeoutSeconds:e.requestTimeoutSeconds}}})}let o=r.profiles.find(e=>e.id===r.activeProfileId);if(r.activeProfileId&&!o)throw new d("找不到当前配置档案");if(o&&Object.assign(r,{modelProvider:o.provider,modelId:o.modelId,apiKey:o.apiKey,baseUrl:o.baseUrl}),void 0!==e.activeAgentIds){if(!Array.isArray(e.activeAgentIds)||!e.activeAgentIds.every(e=>"string"==typeof e))throw new d("activeAgentIds 无效");r.activeAgentIds=[...new Set(e.activeAgentIds)]}return r.isConfigured="aihub"===r.modelProvider?!!r.modelId:!!(r.apiKey&&r.modelId),this.store.saveAll(r),this.store.set("activeAgentIds",JSON.stringify(r.activeAgentIds)),this.store.set("sharedSettingsRevision",String(t.revision+1)),this.publicView()})()}}function u(e,t){if(void 0===e||""===e||e===a)return t;if("string"!=typeof e||e.length>16384)throw new d("apiKey 无效");return e}function l(){return o??=new p((0,s.kO)())}},9001:(e,t,r)=>{r.d(t,{o:()=>i});let o=new Set(["capacitor://localhost","ionic://localhost"]);function i(e){if(!e.headers.get("content-type")?.toLowerCase().startsWith("application/json"))return Response.json({error:"JSON required"},{status:415});let t=e.headers.get("origin");if(!t||o.has(t))return null;let r=new URL(e.url),i="1"===process.env.AGENT_TRUST_TUNNEL_PROXY,s=i?e.headers.get("x-forwarded-host")?.split(",")[0].trim()||e.headers.get("host")||r.host:e.headers.get("host")||r.host,n=i&&e.headers.get("x-forwarded-proto")?.split(",")[0].trim()||r.protocol.slice(0,-1);return t!==`${n}://${s}`?Response.json({error:"Cross-origin write denied"},{status:403}):null}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[8375,1322],()=>r(9015));module.exports=o})();
@@ -1 +1 @@
1
- "use strict";(()=>{var e={};e.id=1731,e.ids=[1731],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},9801:e=>{e.exports=require("os")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},1041:e=>{e.exports=require("node:url")},9204:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>v,patchFetch:()=>x,requestAsyncStorage:()=>m,routeModule:()=>c,serverHooks:()=>h,staticGenerationAsyncStorage:()=>f});var s={};t.r(s),t.d(s,{GET:()=>u,POST:()=>d});var o=t(7786),i=t(5042),n=t(2184),a=t(1890),p=t(1322),l=t(4621);async function u(){let e=await (0,l.i)().call("listSkills",[]);return a.NextResponse.json(e.map(e=>({name:e.name,description:e.description,triggers:e.triggers,filePath:e.filePath})))}async function d(e){try{let r=await e.json(),t=new p.N78,s=(0,l.i)().skills,o=[];if(r.filePath){let e=await t.loadFromFile(r.filePath);await s.save(e),o.push({name:e.name,description:e.description})}else if(!r.dirPath)return a.NextResponse.json({error:"filePath or dirPath is required"},{status:400});else for(let e of(await t.loadFromDirectory(r.dirPath)))await s.save(await t.loadFromFile(e.filePath)),o.push({name:e.name,description:e.description});return a.NextResponse.json({status:"imported",count:o.length,skills:o})}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Skill import failed"},{status:500})}}let c=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release44-hdZsY9/repository/packages/server/app/api/skills/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:m,staticGenerationAsyncStorage:f,serverHooks:h}=c,v="/api/skills/route";function x(){return(0,n.patchFetch)({serverHooks:h,staticGenerationAsyncStorage:f})}},785:(e,r,t)=>{t.d(r,{ME:()=>a,kO:()=>n,sr:()=>p});var s=t(9411);let o=function(){let e=process.argv[1];if(e){let r=(0,s.dirname)((0,s.resolve)(e)),t=`${s.sep}node_modules${s.sep}.bin`;return r.endsWith(t)?(0,s.resolve)(r,"..",".."):r}return(0,s.resolve)(process.cwd())}();function i(e=process.env,r=o){return(0,s.resolve)(e.AGENT_DATA_DIR?.trim()||r)}function n(){return i()}function a(e=process.env,r=i(e)){let t=e.AGENT_LOG_DIR?.trim();if(t)return(0,s.resolve)(t);let o=e.AGENTROAM_DATA_DIR?.trim();return o?(0,s.resolve)(o,"logs"):(0,s.join)(r,".agent-data","logs")}function p(){return function(e=process.env,r=o){return(0,s.resolve)(e.AGENT_WORKING_DIRECTORY?.trim()||r)}(process.env,n())}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8375,6703,1322,4621],()=>t(9204));module.exports=s})();
1
+ "use strict";(()=>{var e={};e.id=1731,e.ids=[1731],e.modules={5890:e=>{e.exports=require("better-sqlite3")},399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},9801:e=>{e.exports=require("os")},7718:e=>{e.exports=require("node:child_process")},6005:e=>{e.exports=require("node:crypto")},5673:e=>{e.exports=require("node:events")},7561:e=>{e.exports=require("node:fs")},3977:e=>{e.exports=require("node:fs/promises")},8849:e=>{e.exports=require("node:http")},2286:e=>{e.exports=require("node:https")},2033:e=>{e.exports=require("node:module")},7503:e=>{e.exports=require("node:net")},612:e=>{e.exports=require("node:os")},9411:e=>{e.exports=require("node:path")},1747:e=>{e.exports=require("node:readline")},1041:e=>{e.exports=require("node:url")},2206:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>x,patchFetch:()=>h,requestAsyncStorage:()=>m,routeModule:()=>c,serverHooks:()=>v,staticGenerationAsyncStorage:()=>f});var s={};t.r(s),t.d(s,{GET:()=>u,POST:()=>d});var o=t(7786),i=t(5042),n=t(2184),a=t(1890),p=t(1322),l=t(4621);async function u(){let e=await (0,l.i)().call("listSkills",[]);return a.NextResponse.json(e.map(e=>({name:e.name,description:e.description,triggers:e.triggers,filePath:e.filePath})))}async function d(e){try{let r=await e.json(),t=new p.N78,s=(0,l.i)().skills,o=[];if(r.filePath){let e=await t.loadFromFile(r.filePath);await s.save(e),o.push({name:e.name,description:e.description})}else if(!r.dirPath)return a.NextResponse.json({error:"filePath or dirPath is required"},{status:400});else for(let e of(await t.loadFromDirectory(r.dirPath)))await s.save(await t.loadFromFile(e.filePath)),o.push({name:e.name,description:e.description});return a.NextResponse.json({status:"imported",count:o.length,skills:o})}catch(e){return a.NextResponse.json({error:e instanceof Error?e.message:"Skill import failed"},{status:500})}}let c=new o.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/skills/route",pathname:"/api/skills",filename:"route",bundlePath:"app/api/skills/route"},resolvedPagePath:"/private/var/folders/6r/m9bbktwj1pvbr6hbzpxqkq3h0000gn/T/agentroam-release46-ky7L12/repository/packages/server/app/api/skills/route.ts",nextConfigOutput:"standalone",userland:s}),{requestAsyncStorage:m,staticGenerationAsyncStorage:f,serverHooks:v}=c,x="/api/skills/route";function h(){return(0,n.patchFetch)({serverHooks:v,staticGenerationAsyncStorage:f})}},785:(e,r,t)=>{t.d(r,{ME:()=>a,kO:()=>n,sr:()=>p});var s=t(9411);let o=function(){let e=process.argv[1];if(e){let r=(0,s.dirname)((0,s.resolve)(e)),t=`${s.sep}node_modules${s.sep}.bin`;return r.endsWith(t)?(0,s.resolve)(r,"..",".."):r}return(0,s.resolve)(process.cwd())}();function i(e=process.env,r=o){return(0,s.resolve)(e.AGENT_DATA_DIR?.trim()||r)}function n(){return i()}function a(e=process.env,r=i(e)){let t=e.AGENT_LOG_DIR?.trim();if(t)return(0,s.resolve)(t);let o=e.AGENTROAM_DATA_DIR?.trim();return o?(0,s.resolve)(o,"logs"):(0,s.join)(r,".agent-data","logs")}function p(){return function(e=process.env,r=o){return(0,s.resolve)(e.AGENT_WORKING_DIRECTORY?.trim()||r)}(process.env,n())}}};var r=require("../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[8375,6703,1322,4621],()=>t(2206));module.exports=s})();