@sapienx/agentos 0.6.6 → 0.6.8

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 (289) hide show
  1. package/README.md +1 -1
  2. package/bundle/.next/BUILD_ID +1 -1
  3. package/bundle/.next/app-path-routes-manifest.json +17 -16
  4. package/bundle/.next/build-manifest.json +3 -3
  5. package/bundle/.next/prerender-manifest.json +3 -3
  6. package/bundle/.next/react-loadable-manifest.json +3 -2
  7. package/bundle/.next/required-server-files.json +2 -2
  8. package/bundle/.next/routes-manifest.json +6 -0
  9. package/bundle/.next/server/app/_global-error/page.js +2 -2
  10. package/bundle/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/bundle/.next/server/app/_global-error.html +1 -1
  12. package/bundle/.next/server/app/_global-error.rsc +1 -1
  13. package/bundle/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/bundle/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/bundle/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/bundle/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/bundle/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/bundle/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/bundle/.next/server/app/_not-found/page.js +2 -2
  20. package/bundle/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/bundle/.next/server/app/_not-found.html +2 -2
  22. package/bundle/.next/server/app/_not-found.rsc +2 -2
  23. package/bundle/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  24. package/bundle/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  25. package/bundle/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  26. package/bundle/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  27. package/bundle/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  28. package/bundle/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  29. package/bundle/.next/server/app/accounts/page.js +2 -2
  30. package/bundle/.next/server/app/accounts/page.js.nft.json +1 -1
  31. package/bundle/.next/server/app/accounts/page_client-reference-manifest.js +1 -1
  32. package/bundle/.next/server/app/agents/page.js +2 -2
  33. package/bundle/.next/server/app/agents/page.js.nft.json +1 -1
  34. package/bundle/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  35. package/bundle/.next/server/app/api/accounts/access-rules/route.js +1 -1
  36. package/bundle/.next/server/app/api/accounts/access-rules/route.js.nft.json +1 -1
  37. package/bundle/.next/server/app/api/accounts/browser-profiles/route.js +1 -1
  38. package/bundle/.next/server/app/api/accounts/browser-profiles/route.js.nft.json +1 -1
  39. package/bundle/.next/server/app/api/accounts/login-targets/route.js +2 -2
  40. package/bundle/.next/server/app/api/accounts/login-targets/route.js.nft.json +1 -1
  41. package/bundle/.next/server/app/api/agents/[agentId]/chat/route.js +4 -4
  42. package/bundle/.next/server/app/api/agents/[agentId]/chat/route.js.nft.json +1 -1
  43. package/bundle/.next/server/app/api/agents/route.js +1 -1
  44. package/bundle/.next/server/app/api/agents/route.js.nft.json +1 -1
  45. package/bundle/.next/server/app/api/diagnostics/route.js +1 -1
  46. package/bundle/.next/server/app/api/diagnostics/route.js.nft.json +1 -1
  47. package/bundle/.next/server/app/api/files/reveal/route.js +1 -1
  48. package/bundle/.next/server/app/api/gateway/control/route.js +1 -1
  49. package/bundle/.next/server/app/api/gateway/control/route.js.nft.json +1 -1
  50. package/bundle/.next/server/app/api/integrations/[integrationId]/status/route.js +1 -1
  51. package/bundle/.next/server/app/api/integrations/[integrationId]/status/route.js.nft.json +1 -1
  52. package/bundle/.next/server/app/api/mission/route.js +3 -3
  53. package/bundle/.next/server/app/api/mission/route.js.nft.json +1 -1
  54. package/bundle/.next/server/app/api/models/catalog/route.js +1 -2
  55. package/bundle/.next/server/app/api/models/catalog/route.js.nft.json +1 -1
  56. package/bundle/.next/server/app/api/models/providers/route.js +1 -2
  57. package/bundle/.next/server/app/api/models/providers/route.js.nft.json +1 -1
  58. package/bundle/.next/server/app/api/onboarding/models/route.js +8 -9
  59. package/bundle/.next/server/app/api/onboarding/models/route.js.nft.json +1 -1
  60. package/bundle/.next/server/app/api/onboarding/route.js +8 -8
  61. package/bundle/.next/server/app/api/onboarding/route.js.nft.json +1 -1
  62. package/bundle/.next/server/app/api/openclaw/capabilities/route.js +1 -1
  63. package/bundle/.next/server/app/api/openclaw/capabilities/route.js.nft.json +1 -1
  64. package/bundle/.next/server/app/api/openclaw/compatibility-smoke/route.js +1 -1
  65. package/bundle/.next/server/app/api/openclaw/compatibility-smoke/route.js.nft.json +1 -1
  66. package/bundle/.next/server/app/api/planner/[planId]/deploy/route.js +2 -2
  67. package/bundle/.next/server/app/api/planner/[planId]/deploy/route.js.nft.json +1 -1
  68. package/bundle/.next/server/app/api/planner/[planId]/document-rewrite/route.js +1 -1
  69. package/bundle/.next/server/app/api/planner/[planId]/document-rewrite/route.js.nft.json +1 -1
  70. package/bundle/.next/server/app/api/planner/[planId]/route.js +1 -1
  71. package/bundle/.next/server/app/api/planner/[planId]/route.js.nft.json +1 -1
  72. package/bundle/.next/server/app/api/planner/[planId]/simulate/route.js +1 -1
  73. package/bundle/.next/server/app/api/planner/[planId]/simulate/route.js.nft.json +1 -1
  74. package/bundle/.next/server/app/api/planner/[planId]/turn/route.js +1 -1
  75. package/bundle/.next/server/app/api/planner/[planId]/turn/route.js.nft.json +1 -1
  76. package/bundle/.next/server/app/api/planner/route.js +1 -1
  77. package/bundle/.next/server/app/api/planner/route.js.nft.json +1 -1
  78. package/bundle/.next/server/app/api/reset/route.js +2 -2
  79. package/bundle/.next/server/app/api/reset/route.js.nft.json +1 -1
  80. package/bundle/.next/server/app/api/runtimes/[runtimeId]/route.js +1 -1
  81. package/bundle/.next/server/app/api/runtimes/[runtimeId]/route.js.nft.json +1 -1
  82. package/bundle/.next/server/app/api/settings/config-pacing/route.js +1 -0
  83. package/bundle/.next/server/app/api/settings/config-pacing/route.js.nft.json +1 -0
  84. package/bundle/.next/server/app/api/settings/config-pacing/route_client-reference-manifest.js +1 -0
  85. package/bundle/.next/server/app/api/settings/gateway/route.js +1 -1
  86. package/bundle/.next/server/app/api/settings/gateway/route.js.nft.json +1 -1
  87. package/bundle/.next/server/app/api/settings/openclaw-binary/route.js +1 -1
  88. package/bundle/.next/server/app/api/settings/openclaw-binary/route.js.nft.json +1 -1
  89. package/bundle/.next/server/app/api/settings/workspace-root/route.js +1 -1
  90. package/bundle/.next/server/app/api/settings/workspace-root/route.js.nft.json +1 -1
  91. package/bundle/.next/server/app/api/snapshot/route.js +1 -1
  92. package/bundle/.next/server/app/api/snapshot/route.js.nft.json +1 -1
  93. package/bundle/.next/server/app/api/stream/route.js +2 -2
  94. package/bundle/.next/server/app/api/stream/route.js.nft.json +1 -1
  95. package/bundle/.next/server/app/api/system/open-terminal/route.js +1 -1
  96. package/bundle/.next/server/app/api/tasks/[taskId]/abort/route.js +1 -1
  97. package/bundle/.next/server/app/api/tasks/[taskId]/abort/route.js.nft.json +1 -1
  98. package/bundle/.next/server/app/api/tasks/[taskId]/control/route.js +1 -1
  99. package/bundle/.next/server/app/api/tasks/[taskId]/control/route.js.nft.json +1 -1
  100. package/bundle/.next/server/app/api/tasks/[taskId]/stream/route.js +2 -2
  101. package/bundle/.next/server/app/api/tasks/[taskId]/stream/route.js.nft.json +1 -1
  102. package/bundle/.next/server/app/api/update/route.js +7 -7
  103. package/bundle/.next/server/app/api/update/route.js.nft.json +1 -1
  104. package/bundle/.next/server/app/api/workspaces/[workspaceId]/channels/discovered-groups/route.js +1 -1
  105. package/bundle/.next/server/app/api/workspaces/[workspaceId]/channels/discovered-groups/route.js.nft.json +1 -1
  106. package/bundle/.next/server/app/api/workspaces/[workspaceId]/channels/route.js +1 -1
  107. package/bundle/.next/server/app/api/workspaces/[workspaceId]/channels/route.js.nft.json +1 -1
  108. package/bundle/.next/server/app/api/workspaces/[workspaceId]/edit-draft/route.js +1 -1
  109. package/bundle/.next/server/app/api/workspaces/[workspaceId]/edit-draft/route.js.nft.json +1 -1
  110. package/bundle/.next/server/app/api/workspaces/[workspaceId]/files/route.js +1 -1
  111. package/bundle/.next/server/app/api/workspaces/[workspaceId]/files/route.js.nft.json +1 -1
  112. package/bundle/.next/server/app/api/workspaces/[workspaceId]/surfaces/discovery/route.js +1 -1
  113. package/bundle/.next/server/app/api/workspaces/[workspaceId]/surfaces/discovery/route.js.nft.json +1 -1
  114. package/bundle/.next/server/app/api/workspaces/[workspaceId]/surfaces/reconcile/route.js +1 -1
  115. package/bundle/.next/server/app/api/workspaces/[workspaceId]/surfaces/reconcile/route.js.nft.json +1 -1
  116. package/bundle/.next/server/app/api/workspaces/route.js +2 -2
  117. package/bundle/.next/server/app/api/workspaces/route.js.nft.json +1 -1
  118. package/bundle/.next/server/app/files/page.js +2 -2
  119. package/bundle/.next/server/app/files/page.js.nft.json +1 -1
  120. package/bundle/.next/server/app/files/page_client-reference-manifest.js +1 -1
  121. package/bundle/.next/server/app/integrations/page.js +2 -2
  122. package/bundle/.next/server/app/integrations/page.js.nft.json +1 -1
  123. package/bundle/.next/server/app/integrations/page_client-reference-manifest.js +1 -1
  124. package/bundle/.next/server/app/models/page.js +2 -2
  125. package/bundle/.next/server/app/models/page.js.nft.json +1 -1
  126. package/bundle/.next/server/app/models/page_client-reference-manifest.js +1 -1
  127. package/bundle/.next/server/app/page.js +2 -2
  128. package/bundle/.next/server/app/page.js.nft.json +1 -1
  129. package/bundle/.next/server/app/page_client-reference-manifest.js +1 -1
  130. package/bundle/.next/server/app/settings/page.js +2 -2
  131. package/bundle/.next/server/app/settings/page.js.nft.json +1 -1
  132. package/bundle/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  133. package/bundle/.next/server/app/tasks/page.js +2 -2
  134. package/bundle/.next/server/app/tasks/page.js.nft.json +1 -1
  135. package/bundle/.next/server/app/tasks/page_client-reference-manifest.js +1 -1
  136. package/bundle/.next/server/app-paths-manifest.json +17 -16
  137. package/bundle/.next/server/chunks/1718.js +1 -1
  138. package/bundle/.next/server/chunks/1752.js +12 -0
  139. package/bundle/.next/server/chunks/4391.js +36 -36
  140. package/bundle/.next/server/chunks/4767.js +20 -19
  141. package/bundle/.next/server/chunks/4983.js +3 -1
  142. package/bundle/.next/server/chunks/5010.js +14 -0
  143. package/bundle/.next/server/chunks/{7396.js → 5271.js} +2 -2
  144. package/bundle/.next/server/chunks/{6320.js → 6637.js} +1 -1
  145. package/bundle/.next/server/chunks/7092.js +2 -0
  146. package/bundle/.next/server/chunks/{4466.js → 8215.js} +1 -1
  147. package/bundle/.next/server/chunks/8533.js +182 -0
  148. package/bundle/.next/server/functions-config-manifest.json +1 -0
  149. package/bundle/.next/server/middleware-build-manifest.js +1 -1
  150. package/bundle/.next/server/middleware-react-loadable-manifest.js +1 -1
  151. package/bundle/.next/server/pages/404.html +2 -2
  152. package/bundle/.next/server/pages/500.html +1 -1
  153. package/bundle/.next/server/server-reference-manifest.json +1 -1
  154. package/bundle/.next/static/chunks/2083-3f878fa838a1a0ca.js +1 -0
  155. package/bundle/.next/static/chunks/2125-162d48301a8f53b4.js +3 -0
  156. package/bundle/.next/static/chunks/2207-4f66fd1ddff2aba5.js +1 -0
  157. package/bundle/.next/static/chunks/{3315-597211dffe007157.js → 2366-16384dc528c25ced.js} +4 -4
  158. package/bundle/.next/static/chunks/4137.19010bab7fabf352.js +1 -0
  159. package/bundle/.next/static/chunks/7197.ddf4cc08de4fe3ee.js +1 -0
  160. package/bundle/.next/static/chunks/7442-2c0e6d9ebff0ac6a.js +198 -0
  161. package/bundle/.next/static/chunks/9069-70706bf0dcf0a557.js +1 -0
  162. package/bundle/.next/static/chunks/{6276-fdd5e81abda749e8.js → 9679-b7f81b3d55f1ea2d.js} +2 -2
  163. package/bundle/.next/static/chunks/app/_global-error/{page-32f399461697d08e.js → page-f27867b999a8b8f9.js} +1 -1
  164. package/bundle/.next/static/chunks/app/_not-found/{page-32f399461697d08e.js → page-f27867b999a8b8f9.js} +1 -1
  165. package/bundle/.next/static/chunks/app/accounts/page-28d2ce28785650e2.js +1 -0
  166. package/bundle/.next/static/chunks/app/agents/page-00e158069677f65e.js +1 -0
  167. package/bundle/.next/static/chunks/app/api/accounts/access-rules/{route-32f399461697d08e.js → route-f27867b999a8b8f9.js} +1 -1
  168. package/bundle/.next/static/chunks/app/api/accounts/browser-profiles/{route-32f399461697d08e.js → route-f27867b999a8b8f9.js} +1 -1
  169. package/bundle/.next/static/chunks/app/api/accounts/login-targets/route-f27867b999a8b8f9.js +1 -0
  170. package/bundle/.next/static/chunks/app/api/agents/[agentId]/chat/route-f27867b999a8b8f9.js +1 -0
  171. package/bundle/.next/static/chunks/app/api/agents/route-f27867b999a8b8f9.js +1 -0
  172. package/bundle/.next/static/chunks/app/api/diagnostics/route-f27867b999a8b8f9.js +1 -0
  173. package/bundle/.next/static/chunks/app/api/files/reveal/route-f27867b999a8b8f9.js +1 -0
  174. package/bundle/.next/static/chunks/app/api/gateway/control/route-f27867b999a8b8f9.js +1 -0
  175. package/bundle/.next/static/chunks/app/api/integrations/[integrationId]/status/route-f27867b999a8b8f9.js +1 -0
  176. package/bundle/.next/static/chunks/app/api/mission/route-f27867b999a8b8f9.js +1 -0
  177. package/bundle/.next/static/chunks/app/api/models/catalog/route-f27867b999a8b8f9.js +1 -0
  178. package/bundle/.next/static/chunks/app/api/models/providers/route-f27867b999a8b8f9.js +1 -0
  179. package/bundle/.next/static/chunks/app/api/onboarding/models/route-f27867b999a8b8f9.js +1 -0
  180. package/bundle/.next/static/chunks/app/api/onboarding/route-f27867b999a8b8f9.js +1 -0
  181. package/bundle/.next/static/chunks/app/api/openclaw/capabilities/route-f27867b999a8b8f9.js +1 -0
  182. package/bundle/.next/static/chunks/app/api/openclaw/compatibility-smoke/route-f27867b999a8b8f9.js +1 -0
  183. package/bundle/.next/static/chunks/app/api/planner/[planId]/deploy/route-f27867b999a8b8f9.js +1 -0
  184. package/bundle/.next/static/chunks/app/api/planner/[planId]/document-rewrite/route-f27867b999a8b8f9.js +1 -0
  185. package/bundle/.next/static/chunks/app/api/planner/[planId]/route-f27867b999a8b8f9.js +1 -0
  186. package/bundle/.next/static/chunks/app/api/planner/[planId]/simulate/route-f27867b999a8b8f9.js +1 -0
  187. package/bundle/.next/static/chunks/app/api/planner/[planId]/turn/route-f27867b999a8b8f9.js +1 -0
  188. package/bundle/.next/static/chunks/app/api/planner/route-f27867b999a8b8f9.js +1 -0
  189. package/bundle/.next/static/chunks/app/api/reset/route-f27867b999a8b8f9.js +1 -0
  190. package/bundle/.next/static/chunks/app/api/runtimes/[runtimeId]/route-f27867b999a8b8f9.js +1 -0
  191. package/bundle/.next/static/chunks/app/api/settings/config-pacing/route-f27867b999a8b8f9.js +1 -0
  192. package/bundle/.next/static/chunks/app/api/settings/gateway/route-f27867b999a8b8f9.js +1 -0
  193. package/bundle/.next/static/chunks/app/api/settings/openclaw-binary/route-f27867b999a8b8f9.js +1 -0
  194. package/bundle/.next/static/chunks/app/api/settings/workspace-root/route-f27867b999a8b8f9.js +1 -0
  195. package/bundle/.next/static/chunks/app/api/snapshot/route-f27867b999a8b8f9.js +1 -0
  196. package/bundle/.next/static/chunks/app/api/stream/route-f27867b999a8b8f9.js +1 -0
  197. package/bundle/.next/static/chunks/app/api/system/open-terminal/route-f27867b999a8b8f9.js +1 -0
  198. package/bundle/.next/static/chunks/app/api/tasks/[taskId]/abort/route-f27867b999a8b8f9.js +1 -0
  199. package/bundle/.next/static/chunks/app/api/tasks/[taskId]/control/route-f27867b999a8b8f9.js +1 -0
  200. package/bundle/.next/static/chunks/app/api/tasks/[taskId]/stream/route-f27867b999a8b8f9.js +1 -0
  201. package/bundle/.next/static/chunks/app/api/update/route-f27867b999a8b8f9.js +1 -0
  202. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/channels/discovered-groups/route-f27867b999a8b8f9.js +1 -0
  203. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/channels/route-f27867b999a8b8f9.js +1 -0
  204. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/edit-draft/route-f27867b999a8b8f9.js +1 -0
  205. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/files/route-f27867b999a8b8f9.js +1 -0
  206. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/surfaces/discovery/route-f27867b999a8b8f9.js +1 -0
  207. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/surfaces/reconcile/route-f27867b999a8b8f9.js +1 -0
  208. package/bundle/.next/static/chunks/app/api/workspaces/route-f27867b999a8b8f9.js +1 -0
  209. package/bundle/.next/static/chunks/app/files/page-ad284ddbf86c04e5.js +1 -0
  210. package/bundle/.next/static/chunks/app/integrations/page-4f68bceee5abc789.js +1 -0
  211. package/bundle/.next/static/chunks/app/models/page-66e93f913af5e8e2.js +1 -0
  212. package/bundle/.next/static/chunks/app/not-found-f27867b999a8b8f9.js +1 -0
  213. package/bundle/.next/static/chunks/app/page-caa416df80d1e4aa.js +1 -0
  214. package/bundle/.next/static/chunks/app/settings/page-87e643a9b8cbb811.js +1 -0
  215. package/bundle/.next/static/chunks/app/tasks/page-f3ff8c14f4e6516d.js +1 -0
  216. package/bundle/.next/static/chunks/next/dist/client/components/builtin/app-error-f27867b999a8b8f9.js +1 -0
  217. package/bundle/.next/static/chunks/next/dist/client/components/builtin/forbidden-f27867b999a8b8f9.js +1 -0
  218. package/bundle/.next/static/chunks/next/dist/client/components/builtin/unauthorized-f27867b999a8b8f9.js +1 -0
  219. package/bundle/.next/static/chunks/webpack-4c600b16521adac0.js +1 -0
  220. package/bundle/.next/static/css/90ba0f48862473e6.css +3 -0
  221. package/bundle/.next/static/hXnwH-mOOsX_EiS-3twK3/_buildManifest.js +1 -0
  222. package/bundle/package.json +1 -0
  223. package/bundle/server.js +1 -1
  224. package/package.json +1 -1
  225. package/bundle/.next/server/chunks/2082.js +0 -183
  226. package/bundle/.next/server/chunks/6476.js +0 -14
  227. package/bundle/.next/server/chunks/707.js +0 -12
  228. package/bundle/.next/static/Pe2Qv8_zpxfA-X03dV603/_buildManifest.js +0 -1
  229. package/bundle/.next/static/chunks/2083-42815fbe60a1bf82.js +0 -1
  230. package/bundle/.next/static/chunks/2842.b8d0551fd4d397d4.js +0 -1
  231. package/bundle/.next/static/chunks/6672-f468873ca90420ef.js +0 -1
  232. package/bundle/.next/static/chunks/6848-bf85a5b7d7c1e82b.js +0 -1
  233. package/bundle/.next/static/chunks/7197.f130bbf23030eec7.js +0 -1
  234. package/bundle/.next/static/chunks/7442-4cc100ec1115e55d.js +0 -198
  235. package/bundle/.next/static/chunks/app/accounts/page-c9e49f6fc4ec8e1e.js +0 -1
  236. package/bundle/.next/static/chunks/app/agents/page-6729705e1231670f.js +0 -1
  237. package/bundle/.next/static/chunks/app/api/accounts/login-targets/route-32f399461697d08e.js +0 -1
  238. package/bundle/.next/static/chunks/app/api/agents/[agentId]/chat/route-32f399461697d08e.js +0 -1
  239. package/bundle/.next/static/chunks/app/api/agents/route-32f399461697d08e.js +0 -1
  240. package/bundle/.next/static/chunks/app/api/diagnostics/route-32f399461697d08e.js +0 -1
  241. package/bundle/.next/static/chunks/app/api/files/reveal/route-32f399461697d08e.js +0 -1
  242. package/bundle/.next/static/chunks/app/api/gateway/control/route-32f399461697d08e.js +0 -1
  243. package/bundle/.next/static/chunks/app/api/integrations/[integrationId]/status/route-32f399461697d08e.js +0 -1
  244. package/bundle/.next/static/chunks/app/api/mission/route-32f399461697d08e.js +0 -1
  245. package/bundle/.next/static/chunks/app/api/models/catalog/route-32f399461697d08e.js +0 -1
  246. package/bundle/.next/static/chunks/app/api/models/providers/route-32f399461697d08e.js +0 -1
  247. package/bundle/.next/static/chunks/app/api/onboarding/models/route-32f399461697d08e.js +0 -1
  248. package/bundle/.next/static/chunks/app/api/onboarding/route-32f399461697d08e.js +0 -1
  249. package/bundle/.next/static/chunks/app/api/openclaw/capabilities/route-32f399461697d08e.js +0 -1
  250. package/bundle/.next/static/chunks/app/api/openclaw/compatibility-smoke/route-32f399461697d08e.js +0 -1
  251. package/bundle/.next/static/chunks/app/api/planner/[planId]/deploy/route-32f399461697d08e.js +0 -1
  252. package/bundle/.next/static/chunks/app/api/planner/[planId]/document-rewrite/route-32f399461697d08e.js +0 -1
  253. package/bundle/.next/static/chunks/app/api/planner/[planId]/route-32f399461697d08e.js +0 -1
  254. package/bundle/.next/static/chunks/app/api/planner/[planId]/simulate/route-32f399461697d08e.js +0 -1
  255. package/bundle/.next/static/chunks/app/api/planner/[planId]/turn/route-32f399461697d08e.js +0 -1
  256. package/bundle/.next/static/chunks/app/api/planner/route-32f399461697d08e.js +0 -1
  257. package/bundle/.next/static/chunks/app/api/reset/route-32f399461697d08e.js +0 -1
  258. package/bundle/.next/static/chunks/app/api/runtimes/[runtimeId]/route-32f399461697d08e.js +0 -1
  259. package/bundle/.next/static/chunks/app/api/settings/gateway/route-32f399461697d08e.js +0 -1
  260. package/bundle/.next/static/chunks/app/api/settings/openclaw-binary/route-32f399461697d08e.js +0 -1
  261. package/bundle/.next/static/chunks/app/api/settings/workspace-root/route-32f399461697d08e.js +0 -1
  262. package/bundle/.next/static/chunks/app/api/snapshot/route-32f399461697d08e.js +0 -1
  263. package/bundle/.next/static/chunks/app/api/stream/route-32f399461697d08e.js +0 -1
  264. package/bundle/.next/static/chunks/app/api/system/open-terminal/route-32f399461697d08e.js +0 -1
  265. package/bundle/.next/static/chunks/app/api/tasks/[taskId]/abort/route-32f399461697d08e.js +0 -1
  266. package/bundle/.next/static/chunks/app/api/tasks/[taskId]/control/route-32f399461697d08e.js +0 -1
  267. package/bundle/.next/static/chunks/app/api/tasks/[taskId]/stream/route-32f399461697d08e.js +0 -1
  268. package/bundle/.next/static/chunks/app/api/update/route-32f399461697d08e.js +0 -1
  269. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/channels/discovered-groups/route-32f399461697d08e.js +0 -1
  270. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/channels/route-32f399461697d08e.js +0 -1
  271. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/edit-draft/route-32f399461697d08e.js +0 -1
  272. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/files/route-32f399461697d08e.js +0 -1
  273. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/surfaces/discovery/route-32f399461697d08e.js +0 -1
  274. package/bundle/.next/static/chunks/app/api/workspaces/[workspaceId]/surfaces/reconcile/route-32f399461697d08e.js +0 -1
  275. package/bundle/.next/static/chunks/app/api/workspaces/route-32f399461697d08e.js +0 -1
  276. package/bundle/.next/static/chunks/app/files/page-88c9118871e40c6f.js +0 -1
  277. package/bundle/.next/static/chunks/app/integrations/page-b0541340ce23ac08.js +0 -1
  278. package/bundle/.next/static/chunks/app/models/page-d46f533a6ad10e54.js +0 -1
  279. package/bundle/.next/static/chunks/app/not-found-32f399461697d08e.js +0 -1
  280. package/bundle/.next/static/chunks/app/page-78b8c43dceba02d6.js +0 -1
  281. package/bundle/.next/static/chunks/app/settings/page-dc8c5f99e93317b5.js +0 -1
  282. package/bundle/.next/static/chunks/app/tasks/page-2d8a967801747f41.js +0 -1
  283. package/bundle/.next/static/chunks/next/dist/client/components/builtin/app-error-32f399461697d08e.js +0 -1
  284. package/bundle/.next/static/chunks/next/dist/client/components/builtin/forbidden-32f399461697d08e.js +0 -1
  285. package/bundle/.next/static/chunks/next/dist/client/components/builtin/unauthorized-32f399461697d08e.js +0 -1
  286. package/bundle/.next/static/chunks/webpack-6d3da3859b096ce1.js +0 -1
  287. package/bundle/.next/static/css/2755afb6503b0e79.css +0 -3
  288. package/bundle/public/readme/banner.jpeg +0 -0
  289. /package/bundle/.next/static/{Pe2Qv8_zpxfA-X03dV603 → hXnwH-mOOsX_EiS-3twK3}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2083],{13007:(e,t,s)=>{"use strict";s.d(t,{OperationsPage:()=>sf});var a=s(36366),n=s(70430),r=s(16055),l=s(76077),i=s(94261),o=s(47882),c=s(2946),d=s(75167),p=s(87618),u=s(15411),m=s(2452),h=s(38402),x=s(52493),g=s(95433),b=s(86247),f=s(84731),w=s(99261),v=s(53002),j=s(33295),y=s(30394),N=s(21600),k=s(79613),C=s(35604),A=s(14247),S=s(28072),L=s(66761),O=s(8120),T=s(85844),M=s(23351);let I="border border-white/[0.08] bg-[linear-gradient(180deg,rgba(13,24,42,0.86),rgba(6,12,23,0.82))] shadow-[inset_0_1px_0_rgba(255,255,255,0.045),0_20px_64px_rgba(0,0,0,0.30)] backdrop-blur-xl",P={success:"border-emerald-400/25 bg-emerald-400/10 text-emerald-200",info:"border-sky-400/25 bg-sky-400/10 text-sky-200",warning:"border-amber-400/25 bg-amber-400/10 text-amber-100",danger:"border-rose-400/30 bg-rose-400/10 text-rose-100",muted:"border-white/10 bg-white/[0.06] text-slate-300",purple:"border-violet-400/25 bg-violet-400/10 text-violet-200"},R={success:"bg-emerald-400",info:"bg-sky-400",warning:"bg-amber-300",danger:"bg-rose-400",muted:"bg-slate-400",purple:"bg-violet-400"},U={success:"border-emerald-300/20 bg-emerald-400/10 text-emerald-200 shadow-emerald-500/10",info:"border-sky-300/20 bg-sky-400/10 text-sky-200 shadow-sky-500/10",warning:"border-amber-300/20 bg-amber-400/10 text-amber-100 shadow-amber-500/10",danger:"border-rose-300/20 bg-rose-400/10 text-rose-100 shadow-rose-500/10",muted:"border-white/10 bg-white/[0.065] text-slate-200 shadow-black/20",purple:"border-violet-300/20 bg-violet-400/10 text-violet-200 shadow-violet-500/10"};function $({snapshot:e,connectionState:t,surfaceTheme:s,onToggleTheme:n}){let r=e.diagnostics.version??e.diagnostics.latestVersion??"unknown",l="live"===t&&"healthy"===e.diagnostics.health,i="light"===s?w.A:v.A;return(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 text-[0.58rem] font-semibold uppercase tracking-[0.22em] text-slate-400",children:[(0,a.jsx)("span",{className:"hidden sm:inline",children:"OpenClaw"}),(0,a.jsxs)("span",{className:"hidden font-mono text-slate-500 sm:inline",children:["v",r]}),(0,a.jsxs)("span",{className:(0,M.cn)("inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 tracking-[0.16em]",l?"border-emerald-300/18 bg-emerald-400/10 text-emerald-200":"border-amber-300/18 bg-amber-400/10 text-amber-100"),children:[(0,a.jsx)("span",{className:(0,M.cn)("h-1.5 w-1.5 rounded-full",l?"bg-emerald-400":"bg-amber-300")}),l?"Online":"retrying"===t?"Retrying":"Connecting"]}),(0,a.jsx)(V,{ariaLabel:"Refresh status",icon:j.A}),(0,a.jsx)(V,{ariaLabel:"light"===s?"Switch to dark theme":"Switch to light theme",icon:i,active:"light"===s,onClick:n}),(0,a.jsx)(V,{ariaLabel:"Notifications",icon:y.A,dot:!0})]})}function D({title:e,subtitle:t,primaryAction:s,secondaryAction:n,actions:r,children:l}){let i=s?.icon,o=n?.icon;return(0,a.jsxs)("header",{className:"border-b border-white/[0.07] pb-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 xl:flex-row xl:items-end xl:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h1",{className:"font-display text-[1.48rem] font-semibold leading-tight tracking-normal text-white",children:e}),(0,a.jsx)("p",{className:"mt-1.5 max-w-3xl text-[0.78rem] leading-5 text-slate-300",children:t})]}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:r??(0,a.jsxs)(a.Fragment,{children:[n?(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[10px] px-3 text-xs",onClick:n.onClick,children:[o?(0,a.jsx)(o,{className:"mr-1.5 h-3.5 w-3.5"}):null,n.label]}):null,s?(0,a.jsxs)(O.$,{size:"sm",className:"h-8 rounded-[10px] bg-blue-500 px-3 text-xs text-white shadow-blue-500/20 hover:bg-blue-400",onClick:s.onClick,disabled:s.disabled,title:s.title,children:[i?(0,a.jsx)(i,{className:"mr-1.5 h-3.5 w-3.5"}):null,s.label]}):null]})})]}),l?(0,a.jsx)("div",{className:"mt-4",children:l}):null]})}function _({label:e,value:t,detail:s,icon:n,tone:r="info"}){return(0,a.jsxs)("div",{className:(0,M.cn)("flex min-h-[72px] items-center gap-3 rounded-[12px] p-3",I),children:[(0,a.jsx)("span",{className:(0,M.cn)("flex h-9 w-9 shrink-0 items-center justify-center rounded-[11px] border shadow-lg",U[r]),children:(0,a.jsx)(n,{className:"h-4 w-4"})}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block text-[0.55rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:e}),(0,a.jsx)("span",{className:"mt-1 block truncate text-[1.05rem] font-semibold leading-none text-white",children:t}),(0,a.jsx)("span",{className:"mt-1 block truncate text-[0.63rem] text-slate-400",children:s})]})]})}function z({children:e,columns:t=5}){return(0,a.jsx)("div",{className:(0,M.cn)("grid gap-2.5 sm:grid-cols-2 lg:grid-cols-3",6===t?"xl:grid-cols-6":4===t?"xl:grid-cols-4":"xl:grid-cols-5"),children:e})}function F({search:e,onSearchChange:t,searchPlaceholder:s,children:n,right:r}){return(0,a.jsxs)("div",{className:"flex flex-col gap-2 lg:flex-row lg:items-center lg:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2 sm:flex-row sm:items-center",children:[(0,a.jsxs)("div",{className:"relative min-w-[220px] flex-1",children:[(0,a.jsx)(b.A,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-500"}),(0,a.jsx)(T.p,{value:e,onChange:e=>t(e.target.value),placeholder:s,className:"h-8 rounded-[10px] border-white/[0.09] bg-slate-950/42 pl-8 pr-11 text-[0.74rem]"}),(0,a.jsxs)("span",{className:"pointer-events-none absolute right-2.5 top-1/2 hidden -translate-y-1/2 items-center gap-1 rounded-md border border-white/[0.08] bg-white/[0.04] px-1.5 py-0.5 font-mono text-[0.56rem] text-slate-500 sm:flex",children:[(0,a.jsx)(N.A,{className:"h-2.5 w-2.5"})," K"]})]}),n]}),r?(0,a.jsx)("div",{className:"flex items-center gap-2",children:r}):null]})}function E({main:e,inspector:t}){return(0,a.jsxs)("div",{className:(0,M.cn)("grid gap-3",t?"xl:grid-cols-[minmax(0,1fr)_320px]":"xl:grid-cols-1"),children:[(0,a.jsx)("div",{className:"flex min-w-0 flex-col gap-3",children:e}),t]})}function W({icon:e=p.A,label:t,chevron:s,active:n,onClick:r,disabled:l,title:i}){return(0,a.jsxs)("button",{type:"button",onClick:r,disabled:l,title:i,className:(0,M.cn)("inline-flex h-8 shrink-0 items-center gap-1.5 rounded-[10px] border px-2.5 text-[0.74rem] font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300/40",l?"cursor-not-allowed border-white/[0.06] bg-white/[0.025] text-slate-600":n?"border-sky-300/30 bg-sky-400/14 text-sky-100":"border-white/[0.09] bg-white/[0.045] text-slate-300 hover:border-white/[0.14] hover:bg-white/[0.075] hover:text-white"),children:[(0,a.jsx)(e,{className:"h-3.5 w-3.5"}),t,s?(0,a.jsx)(k.A,{className:"h-3 w-3 text-slate-500"}):null]})}function q({value:e,onChange:t,labels:s=["Grid","List"]}){return(0,a.jsxs)("div",{className:"inline-flex h-8 items-center rounded-[10px] border border-white/[0.09] bg-white/[0.045] p-0.5",children:[(0,a.jsx)("button",{type:"button","aria-label":s[0],onClick:()=>t("grid"),className:(0,M.cn)("inline-flex h-6 w-6 items-center justify-center rounded-[8px] text-slate-400 transition-colors hover:text-white",("grid"===e||"board"===e)&&"bg-sky-400/14 text-sky-200"),children:(0,a.jsx)(C.A,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{type:"button","aria-label":s[1],onClick:()=>t("list"),className:(0,M.cn)("inline-flex h-6 w-6 items-center justify-center rounded-[8px] text-slate-400 transition-colors hover:text-white","list"===e&&"bg-sky-400/14 text-sky-200"),children:(0,a.jsx)(A.A,{className:"h-3.5 w-3.5"})})]})}function B({label:e,count:t,active:s,tone:n="info",onClick:r}){return(0,a.jsxs)("button",{type:"button",onClick:r,className:(0,M.cn)("inline-flex h-7 items-center gap-1.5 rounded-[9px] border px-2.5 text-[0.72rem] font-semibold transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300/40",s?P[n]:"border-white/[0.08] bg-white/[0.035] text-slate-300 hover:bg-white/[0.07] hover:text-white"),children:[e,"number"==typeof t?(0,a.jsx)("span",{className:"rounded-full bg-white/[0.08] px-1.5 py-0.5 text-[0.58rem] text-slate-300",children:t}):null]})}function H({title:e,action:t,children:s,className:n}){return(0,a.jsxs)("section",{className:(0,M.cn)("rounded-[12px]",I,n),children:[e||t?(0,a.jsxs)("div",{className:"flex min-h-10 items-center justify-between gap-2 border-b border-white/[0.07] px-3 py-2",children:[e?(0,a.jsx)("h2",{className:"text-[0.82rem] font-semibold text-white",children:e}):(0,a.jsx)("span",{}),t]}):null,s]})}function G({title:e,onClose:t,children:s,className:n}){return(0,a.jsxs)("aside",{className:(0,M.cn)("sticky top-4 hidden max-h-[calc(100dvh-32px)] min-h-[calc(100dvh-32px)] overflow-hidden rounded-[12px] xl:block",I,n),children:[e?(0,a.jsxs)("div",{className:"flex h-10 items-center justify-between border-b border-white/[0.08] px-3",children:[(0,a.jsx)("h2",{className:"text-xs font-semibold text-white",children:e}),t?(0,a.jsx)(V,{ariaLabel:"Close details",icon:S.A,onClick:t}):null]}):null,(0,a.jsx)("div",{className:"h-full overflow-y-auto p-3",children:s})]})}function J({label:e,tone:t="muted",dot:s=!0,className:n}){return(0,a.jsxs)("span",{className:(0,M.cn)("inline-flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-[0.56rem] font-semibold uppercase tracking-[0.11em]",P[t],n),children:[s?(0,a.jsx)("span",{className:(0,M.cn)("h-1.5 w-1.5 rounded-full",R[t])}):null,e]})}function K({icon:e,label:t,tone:s="info",size:n="md"}){return(0,a.jsx)("span",{className:(0,M.cn)("flex shrink-0 items-center justify-center border shadow-lg","lg"===n?"h-12 w-12 rounded-[14px]":"sm"===n?"h-7 w-7 rounded-[9px]":"h-10 w-10 rounded-[12px]",U[s]),children:e?(0,a.jsx)(e,{className:(0,M.cn)("lg"===n?"h-6 w-6":"sm"===n?"h-3.5 w-3.5":"h-5 w-5")}):(0,a.jsx)("span",{className:(0,M.cn)("font-semibold uppercase","lg"===n?"text-lg":"sm"===n?"text-xs":"text-base"),children:t.slice(0,1)})})}function X({label:e,value:t,action:s}){return(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 border-b border-white/[0.07] py-2 last:border-b-0",children:[(0,a.jsx)("span",{className:"text-[0.58rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:e}),(0,a.jsxs)("span",{className:"min-w-0 text-right text-[0.74rem] font-medium text-slate-100",children:[t,s?(0,a.jsx)("span",{className:"ml-2",children:s}):null]})]})}function Y({value:e,tone:t="info",className:s}){return(0,a.jsx)("div",{className:(0,M.cn)("h-1.5 overflow-hidden rounded-full bg-white/[0.08]",s),children:(0,a.jsx)("div",{className:(0,M.cn)("h-full rounded-full",{success:"bg-emerald-400",info:"bg-blue-400",warning:"bg-amber-300",danger:"bg-rose-400",muted:"bg-slate-400",purple:"bg-violet-400"}[t]),style:{width:`${Math.max(0,Math.min(100,e))}%`}})})}function V({ariaLabel:e,icon:t,active:s,dot:n,onClick:r,disabled:l,title:i}){return(0,a.jsxs)("button",{type:"button","aria-label":e,onClick:r,disabled:l,title:i,className:(0,M.cn)("relative inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-[9px] border transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300/40",l?"cursor-not-allowed border-white/[0.06] bg-white/[0.025] text-slate-600":s?"border-sky-300/30 bg-sky-400/14 text-sky-200":"border-white/[0.08] bg-white/[0.035] text-slate-400 hover:border-white/[0.14] hover:bg-white/[0.07] hover:text-white"),children:[(0,a.jsx)(t,{className:"h-3.5 w-3.5"}),n?(0,a.jsx)("span",{className:"absolute right-1.5 top-1.5 h-1.5 w-1.5 rounded-full bg-emerald-400"}):null]})}function Q({onClick:e,title:t="More actions require backend support."}){return(0,a.jsx)(V,{ariaLabel:"More actions",icon:S.A,onClick:e,disabled:!e,title:t})}function Z({title:e,description:t}){return(0,a.jsxs)("div",{className:"flex min-h-[170px] flex-col items-center justify-center rounded-[12px] border border-dashed border-white/[0.10] bg-white/[0.025] p-6 text-center",children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-white",children:e}),(0,a.jsx)("p",{className:"mt-2 max-w-md text-xs leading-5 text-slate-400",children:t})]})}function ee({children:e}){return(0,a.jsx)(L.E,{variant:"muted",className:"border-white/[0.08] bg-white/[0.055] px-1.5 py-0 text-[0.56rem] tracking-normal text-slate-300",children:e})}let et=[{id:"product-hunt",label:"Product Hunt",service:"Product Hunt",loginUrl:"https://www.producthunt.com/login",domains:["producthunt.com"]},{id:"gmail",label:"Gmail",service:"Gmail",loginUrl:"https://accounts.google.com/",domains:["accounts.google.com","mail.google.com"]},{id:"x-twitter",label:"X / Twitter",service:"X / Twitter",loginUrl:"https://x.com/login",domains:["x.com","twitter.com"]},{id:"github",label:"GitHub",service:"GitHub",loginUrl:"https://github.com/login",domains:["github.com"]},{id:"linkedin",label:"LinkedIn",service:"LinkedIn",loginUrl:"https://www.linkedin.com/login",domains:["linkedin.com"]},{id:"discord",label:"Discord",service:"Discord",loginUrl:"https://discord.com/login",domains:["discord.com"]},{id:"telegram",label:"Telegram",service:"Telegram",loginUrl:"https://web.telegram.org/",domains:["web.telegram.org"]},{id:"slack",label:"Slack",service:"Slack",loginUrl:"https://slack.com/signin",domains:["slack.com"]},{id:"notion",label:"Notion",service:"Notion",loginUrl:"https://www.notion.so/login",domains:["notion.so"]},{id:"figma",label:"Figma",service:"Figma",loginUrl:"https://www.figma.com/login",domains:["figma.com"]},{id:"canva",label:"Canva",service:"Canva",loginUrl:"https://www.canva.com/login",domains:["canva.com"]},{id:"chatgpt",label:"ChatGPT",service:"ChatGPT",loginUrl:"https://chatgpt.com/auth/login",domains:["chatgpt.com","openai.com"]},{id:"microsoft",label:"Microsoft",service:"Microsoft",loginUrl:"https://login.microsoftonline.com/",domains:["login.microsoftonline.com","microsoft.com","live.com","outlook.live.com"]},{id:"facebook",label:"Facebook",service:"Facebook",loginUrl:"https://www.facebook.com/login/",domains:["facebook.com"]},{id:"instagram",label:"Instagram",service:"Instagram",loginUrl:"https://www.instagram.com/accounts/login/",domains:["instagram.com"]},{id:"reddit",label:"Reddit",service:"Reddit",loginUrl:"https://www.reddit.com/login",domains:["reddit.com"]},{id:"youtube",label:"YouTube",service:"YouTube",loginUrl:"https://www.youtube.com/signin",domains:["youtube.com"]},{id:"amazon",label:"Amazon",service:"Amazon",loginUrl:"https://www.amazon.com/ap/signin",domains:["amazon.com"]},{id:"shopify",label:"Shopify",service:"Shopify",loginUrl:"https://accounts.shopify.com/store-login",domains:["accounts.shopify.com","shopify.com"]},{id:"stripe",label:"Stripe",service:"Stripe",loginUrl:"https://dashboard.stripe.com/login",domains:["dashboard.stripe.com","stripe.com"]}];function es(e){let t=e.trim().toLowerCase().replace(/^www\./,"");return t&&"localhost"!==t&&t.includes(".")&&/^[a-z0-9.-]+$/.test(t)?t:null}function ea(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64)}var en=s(64248),er=s(95506),el=s(50243),ei=s(19306);function eo(e,t){return e instanceof Error&&e.message?e.message:t}function ec({snapshot:e,activeWorkspace:t,activeWorkspaceId:s}){let{profiles:h,loginTargets:x,accessRules:g,loading:b,targetsLoading:f,accessRulesLoading:w,error:v,targetsError:j,accessRulesError:y,loadProfiles:N,loadLoginTargets:k,loadAccessRules:C,postProfileMutation:A,saveLoginTarget:S,saveAccessRulesForTarget:L,deleteLoginTarget:T}=function(e){let[t,s]=(0,n.useState)([]),[a,r]=(0,n.useState)([]),[l,i]=(0,n.useState)([]),[o,c]=(0,n.useState)(!0),[d,p]=(0,n.useState)(!0),[u,m]=(0,n.useState)(!0),[h,x]=(0,n.useState)(null),[g,b]=(0,n.useState)(null),[f,w]=(0,n.useState)(null),v=(0,n.useCallback)(async()=>{c(!0),x(null);try{let e=await fetch("/api/accounts/browser-profiles",{cache:"no-store"}),t=await e.json().catch(()=>null);if(!e.ok||!t?.ok)throw Error(t?.error??"Unable to read OpenClaw browser profiles.");s(t.profiles)}catch(e){s([]),x(eo(e,"Unable to read OpenClaw browser profiles."))}finally{c(!1)}},[]),j=(0,n.useCallback)(async()=>{p(!0),b(null);try{let t=e?`?workspaceId=${encodeURIComponent(e)}`:"",s=await fetch(`/api/accounts/login-targets${t}`,{cache:"no-store"}),a=await s.json().catch(()=>null);if(!s.ok||!a?.ok)throw Error(a?.error??"Unable to read account login targets.");r(a.targets)}catch(e){r([]),b(eo(e,"Unable to read account login targets."))}finally{p(!1)}},[e]),y=(0,n.useCallback)(async()=>{m(!0),w(null);try{let t=e?`?workspaceId=${encodeURIComponent(e)}`:"",s=await fetch(`/api/accounts/access-rules${t}`,{cache:"no-store"}),a=await s.json().catch(()=>null);if(!s.ok||!a?.ok)throw Error(a?.error??"Unable to read account access rules.");i(a.rules)}catch(e){i([]),w(eo(e,"Unable to read account access rules."))}finally{m(!1)}},[e]);return(0,n.useEffect)(()=>{v()},[v]),(0,n.useEffect)(()=>{j()},[j]),(0,n.useEffect)(()=>{y()},[y]),{profiles:t,loginTargets:a,accessRules:l,loading:o,targetsLoading:d,accessRulesLoading:u,error:h,targetsError:g,accessRulesError:f,loadProfiles:v,loadLoginTargets:j,loadAccessRules:y,postProfileMutation:async(e,t)=>{let s=await fetch("/api/accounts/browser-profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await s.json().catch(()=>null);if(!s.ok||!a?.ok)throw Error(a?.error??t);return a},saveLoginTarget:async e=>{let t=await fetch("/api/accounts/login-targets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json().catch(()=>null);if(!t.ok||!s?.ok)throw Error(s?.error??"Unable to save account login target.");return r(s.targets),s},saveAccessRulesForTarget:async(e,t)=>{let s=await fetch("/api/accounts/access-rules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceId:e.workspaceId,targetId:e.id,rules:t})}),a=await s.json().catch(()=>null);if(!s.ok||!a?.ok)throw Error(a?.error??"Unable to save account access rules.");return i(a.rules),a},deleteLoginTarget:async t=>{let s=await fetch("/api/accounts/login-targets",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:t.id,workspaceId:e})}),a=await s.json().catch(()=>null);if(!s.ok||!a?.ok)throw Error(a?.error??"Unable to remove account login target.");return r(a.targets),a}}}(s),[M,I]=(0,n.useState)(""),[P,R]=(0,n.useState)("all"),[U,$]=(0,n.useState)("all"),[q,G]=(0,n.useState)(!1),[J,X]=(0,n.useState)(null),[Y,V]=(0,n.useState)(null),[Q,et]=(0,n.useState)(null),[es,ea]=(0,n.useState)(null),en=(0,n.useMemo)(()=>e.agents.filter(e=>!s||e.workspaceId===s),[s,e.agents]).filter(eC).length,er=g.filter(e=>"use_browser_profile"===e.permission).length,ei=g.filter(e=>"requires_approval"===e.permission).length,ex=(0,n.useMemo)(()=>h.filter(eN),[h]),eg=(0,n.useMemo)(()=>h.filter(e=>!eN(e)),[h]),eb=ex.filter(e=>e.running).length,ef=ex.filter(e=>"openclaw"===e.driver).length,ew=ex.filter(e=>"existing-session"===e.driver).length,eA=ex.reduce((e,t)=>e+t.tabCount,0),eS=["all","openclaw","existing-session"],eL=["all","running","stopped"],eO=(0,n.useMemo)(()=>new Set(ex.map(e=>e.name)),[ex]),eT=(0,n.useMemo)(()=>{let e=new Map;for(let t of g){let s=e.get(t.targetId)??[];s.push(t),e.set(t.targetId,s)}return e},[g]),eM=(0,n.useMemo)(()=>{let t=new Map;for(let s of e.agents){let e=t.get(s.workspaceId)??[];e.push(s),t.set(s.workspaceId,e)}return t},[e.agents]),eI=M.trim().toLowerCase(),eP=x.filter(e=>!eI||[e.serviceName,e.primaryDomain,e.browserProfileName,e.workspaceName,e.statusLabel,e.loginUrl].join(" ").toLowerCase().includes(eI)),eR=ex.filter(e=>{let t=!eI||[e.name,e.driverLabel,e.transportLabel,e.statusLabel,e.cdpUrl??"",e.reconcileReason??""].join(" ").toLowerCase().includes(eI),s="all"===P||e.driver===P,a="all"===U||("running"===U?e.running:!e.running);return t&&s&&a});(0,n.useEffect)(()=>{s&&"1"===new URLSearchParams(window.location.search).get("connect")&&G(!0)},[s]);let eU=async e=>{ea(e.id);try{await T(e),await C(),el.o.success("Login target forgotten.",{description:"Only the AgentOS account list entry was removed. Browser profile sessions were not changed."})}catch(e){el.o.error("Login target was not removed.",{description:ek(e,"Unable to remove account login target.")})}finally{ea(null)}},e$=async e=>{ea(e.id);try{await A({action:"open-login",profileName:e.browserProfileName,loginUrl:e.loginUrl,label:ev(e.serviceId)},"Unable to open the login URL in OpenClaw."),await S({workspaceId:e.workspaceId,workspaceName:e.workspaceName,workspacePath:e.workspacePath,serviceId:e.serviceId,serviceName:e.serviceName,primaryDomain:e.primaryDomain,loginUrl:e.loginUrl,browserProfileName:e.browserProfileName}),await N(),el.o.success("Login browser opened.",{description:`${e.serviceName} opened in ${e.browserProfileName}.`})}catch(e){el.o.error("Login browser did not open.",{description:ek(e,"Unable to open the login URL in OpenClaw.")})}finally{ea(null)}},eD=async e=>{et(e.name);try{await A({action:"start-profile",profileName:e.name},`Unable to start ${e.name}.`),el.o.success("Browser profile started.",{description:`${e.name} is now available through OpenClaw.`}),await N()}catch(t){el.o.error("Browser profile did not start.",{description:ek(t,`Unable to start ${e.name}.`)})}finally{et(null)}},e_=async e=>{if(!t)return void el.o.error("Select a workspace before connecting an account.");et(e.profileName);try{await A({action:"open-login",profileName:e.profileName,loginUrl:e.loginUrl,label:e.label},"Unable to open the login URL in OpenClaw."),await S({workspaceId:t.id,workspaceName:t.name,workspacePath:t.path??null,serviceId:e.serviceId,serviceName:e.serviceName,primaryDomain:e.primaryDomain,loginUrl:e.loginUrl,browserProfileName:e.profileName}),el.o.success("Login browser opened.",{description:"Complete the login in the OpenClaw browser profile. AgentOS saved only the login target."}),G(!1),await N()}catch(e){el.o.error("Connect Account did not complete.",{description:ek(e,"Unable to open the login browser.")})}finally{et(null)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{main:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{title:"Accounts",subtitle:"Manage real OpenClaw browser profiles used for reusable account sessions.",primaryAction:{label:"Connect Account",icon:r.A,onClick:()=>G(!0),disabled:!s,title:s?"Open a login flow in an OpenClaw browser profile for this workspace.":"Select a workspace before connecting account sessions."},children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(ee,{children:["Workspace: ",t?.name??"All workspaces"]}),(0,a.jsx)(ee,{children:t?.path??t?.slug??"Read-only overview"}),(0,a.jsx)(ee,{children:"Source: OpenClaw profiles + AgentOS login targets"})]})}),(0,a.jsxs)(z,{columns:5,children:[(0,a.jsx)(_,{label:"Profiles",value:b?"-":String(ex.length),detail:`${ef} managed, ${ew} attached session`,icon:l.A,tone:"info"}),(0,a.jsx)(_,{label:"Login Targets",value:f?"-":String(x.length),detail:"Created through Connect Account",icon:r.A,tone:x.length>0?"success":"muted"}),(0,a.jsx)(_,{label:"Running",value:b?"-":String(eb),detail:`${eA} open browser tabs`,icon:i.A,tone:eb>0?"success":"muted"}),(0,a.jsx)(_,{label:"Runnable Access",value:w?"-":String(er),detail:`${en} browser-capable agents \xb7 ${ei} approval-blocked`,icon:o.A,tone:er>0?"success":"muted"}),(0,a.jsx)(_,{label:"Gateway State",value:v?"Blocked":b?"Checking":"Ready",detail:v?"OpenClaw browser unavailable":"Real browser profile API",icon:c.A,tone:v?"warning":"success"})]}),(0,a.jsx)("div",{className:"rounded-[12px] border border-cyan-300/18 bg-cyan-400/10 px-3 py-2.5 text-xs leading-5 text-cyan-100",children:"AgentOS does not store raw passwords. Sessions are stored in OpenClaw browser profiles."}),eg.length>0?(0,a.jsxs)("div",{className:"rounded-[12px] border border-amber-300/20 bg-amber-400/10 px-3 py-2.5 text-xs leading-5 text-amber-100",children:[eg.length," OpenClaw browser profile",1===eg.length?"":"s"," reported by Gateway are hidden because they are not attached or usable for account login yet."]}):null,(0,a.jsx)(H,{title:"Browser Profile Access",children:(0,a.jsxs)("div",{className:"grid gap-3 p-3 text-xs leading-5 text-slate-300 lg:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-white",children:"What works here"}),(0,a.jsx)("p",{className:"mt-1 text-slate-400",children:"AgentOS reads OpenClaw browser profiles, starts a profile, opens a login URL, and records the workspace login target after that browser action succeeds."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-semibold text-white",children:"What is not exposed yet"}),(0,a.jsx)("p",{className:"mt-1 text-slate-400",children:"OpenClaw does not expose verified website account identities or a direct browser-profile dispatch parameter to AgentOS. Agent access is enforced by AgentOS before account-target task launch."})]})]})}),(0,a.jsxs)(F,{search:M,onSearchChange:I,searchPlaceholder:"Search login targets and browser profiles...",children:[(0,a.jsx)(W,{icon:d.A,label:`State: ${ej(U)}`,active:"all"!==U,chevron:!0,onClick:()=>$(e=>eL[(eL.indexOf(e)+1)%eL.length])}),(0,a.jsx)(W,{icon:p.A,label:`Driver: ${ey(P)}`,active:"all"!==P,chevron:!0,onClick:()=>R(e=>eS[(eS.indexOf(e)+1)%eS.length])}),(0,a.jsx)(W,{icon:u.A,label:b||f||w?"Refreshing":"Refresh",active:b||f||w,onClick:()=>{N(),k(),C()}})]}),(0,a.jsx)(H,{title:"Connected Login Targets",children:j||y?(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)(K,{icon:m.A,label:"Login targets unavailable",tone:"warning"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-white",children:"Account login targets are unavailable"}),(0,a.jsx)("p",{className:"mt-1 text-xs leading-5 text-slate-400",children:j??y})]})]}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:()=>{k(),C()},children:"Retry"})]}):f||w?(0,a.jsx)("div",{className:"p-4 text-xs text-slate-400",children:"Loading login targets..."}):0===eP.length?(0,a.jsx)("div",{className:"p-4",children:(0,a.jsx)(Z,{title:0===x.length?"No login targets connected":"No login targets match",description:0===x.length?"Use Connect Account to open a login page in a real OpenClaw browser profile. AgentOS will list the target here after the browser action succeeds.":"Clear search to inspect another login target."})}):(0,a.jsx)("div",{className:"grid gap-2.5 p-3 lg:grid-cols-2 min-[1500px]:grid-cols-3",children:eP.map(e=>(0,a.jsx)(ep,{target:e,profileAvailable:eO.has(e.browserProfileName),accessRules:eT.get(e.id)??[],workspaceAgents:eM.get(e.workspaceId)??[],busy:es===e.id,onOpen:()=>void e$(e),onForget:()=>void eU(e),onManageAccess:()=>X(e),onRunTask:()=>V(e)},e.id))})}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[eL.map(e=>(0,a.jsx)(B,{label:ej(e),count:"all"===e?ex.length:ex.filter(t=>"running"===e?t.running:!t.running).length,active:U===e,tone:"running"===e?"success":"stopped"===e?"muted":"info",onClick:()=>$(e)},e)),eS.map(e=>(0,a.jsx)(B,{label:ey(e),count:"all"===e?ex.length:ex.filter(t=>t.driver===e).length,active:P===e,tone:"existing-session"===e?"warning":"openclaw"===e?"info":"purple",onClick:()=>R(e)},e))]}),v?(0,a.jsx)(H,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)(K,{icon:m.A,label:"OpenClaw browser unavailable",tone:"warning"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-white",children:"OpenClaw browser profiles are unavailable"}),(0,a.jsx)("p",{className:"mt-1 text-xs leading-5 text-slate-400",children:v})]})]}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:()=>void N(),children:"Retry"})]})}):b?(0,a.jsx)(Z,{title:"Loading browser profiles",description:"Reading OpenClaw browser profile state through the Gateway."}):0===eR.length?(0,a.jsx)(Z,{title:0===h.length?"No browser profiles reported":0===ex.length?"No usable browser profiles":"No profiles match",description:0===h.length||0===ex.length?"Create, enable, or attach a usable OpenClaw browser profile first, then use Connect Account to open a manual login flow in that profile.":"Clear search or filters to inspect another OpenClaw browser profile."}):(0,a.jsx)("div",{className:"grid gap-2.5 lg:grid-cols-2 min-[1500px]:grid-cols-3",children:eR.map(e=>(0,a.jsx)(ed,{profile:e,busy:Q===e.name,onStart:()=>void eD(e)},e.name))})]}),inspector:null}),(0,a.jsx)(eh,{open:q,workspace:t,onOpenChange:G,onSubmit:e_,profiles:ex}),(0,a.jsx)(eu,{open:!!J,target:J,agents:J?eM.get(J.workspaceId)??[]:[],accessRules:J?eT.get(J.id)??[]:[],onOpenChange:e=>X(e?J:null),onSave:L}),(0,a.jsx)(em,{open:!!Y,target:Y,agents:Y?eM.get(Y.workspaceId)??[]:[],accessRules:Y?eT.get(Y.id)??[]:[],onOpenChange:e=>V(e?Y:null),onSubmitted:async()=>{V(null),await N()}})]})}function ed({profile:e,busy:t,onStart:s}){return(0,a.jsxs)(H,{children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 p-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)(K,{icon:l.A,label:e.name,tone:"info"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"truncate text-sm font-semibold text-white",children:e.name}),(0,a.jsx)("p",{className:"mt-1 truncate text-[0.7rem] text-slate-400",children:e.driverLabel})]})]}),(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone})]}),(0,a.jsxs)("div",{className:"grid gap-2 border-t border-white/[0.07] p-3 sm:grid-cols-2",children:[(0,a.jsx)(X,{label:"Transport",value:e.transportLabel}),(0,a.jsx)(X,{label:"Tabs",value:String(e.tabCount)}),(0,a.jsx)(X,{label:"Default",value:e.isDefault?"Yes":"No"}),(0,a.jsx)(X,{label:"Remote",value:e.isRemote?"Yes":"No"}),(0,a.jsx)(X,{label:"CDP Port",value:null==e.cdpPort?"Not reported":String(e.cdpPort)}),(0,a.jsx)(X,{label:"CDP URL",value:e.cdpUrl??"Not reported"})]}),e.missingFromConfig||e.reconcileReason?(0,a.jsx)("div",{className:"border-t border-white/[0.07] px-3 py-2 text-[0.68rem] leading-5 text-amber-100",children:e.reconcileReason??"This profile was reported by OpenClaw but is missing from config."}):null,(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-white/[0.07] p-3",children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:t,onClick:s,children:e.running?"Restart / attach":"Start profile"}),(0,a.jsx)(ee,{children:e.driver}),(0,a.jsx)(ee,{children:e.running?"Browser control active":"Browser control stopped"})]})]})}function ep({target:e,profileAvailable:t,accessRules:s,workspaceAgents:n,busy:l,onOpen:i,onForget:c,onManageAccess:d,onRunTask:p}){let u,m=new Set(n.map(e=>e.id)),b=s.filter(e=>m.has(e.agentId)&&"use_browser_profile"===e.permission),f=s.filter(e=>m.has(e.agentId)&&"requires_approval"===e.permission),w=b.filter(e=>{let t=n.find(t=>t.id===e.agentId);return!!t&&eC(t)});return(0,a.jsxs)("div",{className:"rounded-[12px] border border-white/[0.08] bg-white/[0.035]",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 p-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,a.jsx)(K,{icon:r.A,label:e.serviceName,tone:"warning"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"truncate text-sm font-semibold text-white",children:e.serviceName}),(0,a.jsx)("p",{className:"mt-1 truncate text-[0.7rem] text-slate-400",children:e.primaryDomain})]})]}),(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone})]}),(0,a.jsxs)("div",{className:"grid gap-2 border-t border-white/[0.07] p-3 sm:grid-cols-2",children:[(0,a.jsx)(X,{label:"Browser profile",value:e.browserProfileName}),(0,a.jsx)(X,{label:"Workspace",value:e.workspaceName}),(0,a.jsx)(X,{label:"Last opened",value:Number.isNaN((u=new Date(e.lastOpenedAt)).getTime())?"Unknown":new Intl.DateTimeFormat("en",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(u)}),(0,a.jsx)(X,{label:"Opened",value:`${e.openCount} time${1===e.openCount?"":"s"}`}),(0,a.jsx)(X,{label:"Login URL",value:e.loginUrl}),(0,a.jsx)(X,{label:"Source",value:"Connect Account"})]}),(0,a.jsx)("div",{className:"border-t border-white/[0.07] px-3 py-2 text-[0.68rem] leading-5 text-slate-400",children:"AgentOS records that this login target was opened in the selected browser profile. Website account identity is not verified by OpenClaw."}),(0,a.jsxs)("div",{className:"border-t border-white/[0.07] px-3 py-2",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[0.58rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:"Agent Access"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[(0,a.jsxs)(ee,{children:[b.length," runnable"]}),f.length>0?(0,a.jsxs)(ee,{children:[f.length," approval-blocked"]}):null]})]}),0===b.length&&0===f.length?(0,a.jsx)("p",{className:"mt-2 text-[0.68rem] leading-5 text-slate-500",children:"No agent can use this account target until access is granted."}):(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:[b.slice(0,4).map(e=>(0,a.jsx)(ee,{children:e.agentName},e.id)),b.length>4?(0,a.jsxs)(ee,{children:["+",b.length-4," more"]}):null,f.length>0?(0,a.jsx)(ee,{children:"Approval required until dispatch support exists"}):null]}),(0,a.jsx)("p",{className:"mt-2 text-[0.66rem] leading-5 text-slate-500",children:"AgentOS blocks account-target dispatch for agents without access. OpenClaw does not expose a direct browser-profile dispatch parameter yet."})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-white/[0.07] p-3",children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:l||!t,title:t?"Open this login page in its OpenClaw browser profile.":"The saved browser profile is not reported by OpenClaw.",onClick:i,children:[(0,a.jsx)(h.A,{className:"mr-1 h-3 w-3"}),"Open login"]}),(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:l||!t,title:"Select which workspace agents can use this account target.",onClick:d,children:[(0,a.jsx)(o.A,{className:"mr-1 h-3 w-3"}),"Manage access"]}),(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:l||!t||0===w.length,title:w.length>0?"Run a task with an allowed browser-capable agent.":"Grant runnable access to a browser-capable agent first.",onClick:p,children:[(0,a.jsx)(x.A,{className:"mr-1 h-3 w-3"}),"Run task"]}),(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:l,title:"Remove this AgentOS list entry only. Browser profile sessions are not changed.",onClick:c,children:[(0,a.jsx)(g.A,{className:"mr-1 h-3 w-3"}),"Forget"]}),(0,a.jsx)(ee,{children:t?"Profile available":"Profile missing"})]})]})}function eu({open:e,target:t,agents:s,accessRules:r,onOpenChange:l,onSave:i}){let[o,c]=(0,n.useState)({}),[d,p]=(0,n.useState)(!1),[u,m]=(0,n.useState)(null),h=(0,n.useMemo)(()=>[...s].sort((e,t)=>e.name.localeCompare(t.name)),[s]);(0,n.useEffect)(()=>{if(!e||!t)return;let s={};for(let e of h){let t=r.find(t=>t.agentId===e.id);s[e.id]={permission:t?.permission==="requires_approval"?"requires_approval":t?.permission==="use_browser_profile"?"use_browser_profile":"no_access",notes:t?.notes??""}}c(s),m(null)},[r,e,h,t]);let x=async()=>{if(t){p(!0),m(null);try{await i(t,h.map(e=>{let t=o[e.id]??{permission:"no_access",notes:""};return{agentId:e.id,agentName:e.name,permission:eC(e)?t.permission:"no_access",notes:t.notes}})),el.o.success("Account access saved.",{description:`Agent access for ${t.serviceName} now uses AgentOS policy state.`}),l(!1)}catch(t){let e=ek(t,"Unable to save account access rules.");m(e),el.o.error("Account access was not saved.",{description:e})}finally{p(!1)}}};return(0,a.jsx)(en.lG,{open:e,onOpenChange:l,children:t?(0,a.jsxs)(en.Cf,{className:"max-h-[92vh] max-w-3xl overflow-y-auto rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:"Manage Account Access"}),(0,a.jsx)(en.rr,{children:"Select which workspace agents may use this saved browser profile session."})]}),(0,a.jsx)("div",{className:"rounded-[10px] border border-cyan-300/18 bg-cyan-400/10 px-3 py-2 text-xs leading-5 text-cyan-100",children:"AgentOS enforces this before account-target task launch. Requires approval rules stay blocked until approval dispatch exists."}),(0,a.jsx)(H,{children:(0,a.jsxs)("div",{className:"grid gap-2 p-3 sm:grid-cols-2",children:[(0,a.jsx)(X,{label:"Account target",value:t.serviceName}),(0,a.jsx)(X,{label:"Domain",value:t.primaryDomain}),(0,a.jsx)(X,{label:"Browser profile",value:t.browserProfileName}),(0,a.jsx)(X,{label:"Workspace",value:t.workspaceName})]})}),0===h.length?(0,a.jsx)(Z,{title:"No workspace agents",description:"Create an agent in this workspace before granting account access."}):(0,a.jsx)("div",{className:"rounded-[12px] border border-white/[0.08] bg-white/[0.03]",children:h.map(e=>{let s=eC(e),n=o[e.id]??{permission:"no_access",notes:""};return(0,a.jsxs)("div",{className:"grid gap-3 border-b border-white/[0.07] p-3 last:border-b-0 md:grid-cols-[minmax(0,1fr)_180px]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-semibold text-white",children:e.name}),(0,a.jsx)(ee,{children:s?"Browser-capable":"Browser tools missing"})]}),(0,a.jsx)("p",{className:"mt-1 text-[0.68rem] leading-5 text-slate-500",children:s?"This agent can be granted account-target task access.":"Enable browser/chrome tools before this agent can use account sessions."}),(0,a.jsx)(T.p,{value:n.notes,disabled:!s||"no_access"===n.permission,onChange:t=>{let s=t.target.value;c(t=>({...t,[e.id]:{...t[e.id]??{permission:"no_access",notes:""},notes:s}}))},placeholder:"Optional policy note",className:"mt-2 h-8 rounded-[9px] bg-slate-950/50 text-xs"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(er.J,{htmlFor:`access-${t.id}-${e.id}`,children:"Permission"}),(0,a.jsxs)("select",{id:`access-${t.id}-${e.id}`,value:n.permission,disabled:!s,onChange:t=>{var s;let a="use_browser_profile"===(s=t.target.value)||"requires_approval"===s?s:"no_access";c(t=>({...t,[e.id]:{...t[e.id]??{permission:"no_access",notes:""},permission:a}}))},className:"h-9 rounded-[10px] border border-white/[0.10] bg-slate-950/50 px-3 text-xs text-white disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("option",{value:"no_access",children:"No access"}),(0,a.jsx)("option",{value:"use_browser_profile",children:"Can use profile"}),(0,a.jsx)("option",{value:"requires_approval",disabled:!0,children:"Requires approval (coming soon)"})]})]})]},e.id)})}),u?(0,a.jsx)("div",{className:"rounded-[10px] border border-rose-300/20 bg-rose-400/10 px-3 py-2 text-xs text-rose-100",children:u}):null,(0,a.jsxs)(en.Es,{children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:()=>l(!1),children:"Cancel"}),(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:d||0===h.length,onClick:()=>void x(),children:d?"Saving...":"Save access"})]})]}):null})}function em({open:e,target:t,agents:s,accessRules:r,onOpenChange:l,onSubmitted:i}){let o=(0,n.useMemo)(()=>{let e=new Map(r.map(e=>[e.agentId,e]));return s.filter(e=>eC(e)).filter(t=>{let s=e.get(t.id);return s?.permission==="use_browser_profile"}).sort((e,t)=>e.name.localeCompare(t.name))},[r,s]),[c,d]=(0,n.useState)(""),[p,u]=(0,n.useState)(""),[m,h]=(0,n.useState)(!1),[x,g]=(0,n.useState)(null);(0,n.useEffect)(()=>{e&&(d(o[0]?.id??""),u(""),g(null))},[o,e]);let b=async()=>{if(t&&c&&p.trim()){h(!0),g(null);try{let e=await fetch("/api/mission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mission:p.trim(),agentId:c,workspaceId:t.workspaceId,accountTargetId:t.id})}),s=await e.json().catch(()=>null);if(!e.ok||s?.error)throw Error(s?.error||"Mission dispatch failed.");el.o.success("Task submitted.",{description:s?.summary??`${t.serviceName} account target context was attached.`}),l(!1),await i()}catch(t){let e=ek(t,"Mission dispatch failed.");g(e),el.o.error("Task was not submitted.",{description:e})}finally{h(!1)}}};return(0,a.jsx)(en.lG,{open:e,onOpenChange:l,children:t?(0,a.jsxs)(en.Cf,{className:"max-w-xl rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:"Run Task With Account"}),(0,a.jsx)(en.rr,{children:"Dispatch to an allowed browser-capable agent with account target context."})]}),(0,a.jsx)(H,{children:(0,a.jsxs)("div",{className:"grid gap-2 p-3 sm:grid-cols-2",children:[(0,a.jsx)(X,{label:"Account target",value:t.serviceName}),(0,a.jsx)(X,{label:"Browser profile",value:t.browserProfileName}),(0,a.jsx)(X,{label:"Domain",value:t.primaryDomain}),(0,a.jsx)(X,{label:"Dispatch enforcement",value:"AgentOS policy guard"})]})}),(0,a.jsx)("div",{className:"rounded-[10px] border border-amber-300/20 bg-amber-400/10 px-3 py-2 text-xs leading-5 text-amber-100",children:"OpenClaw does not expose a direct browser-profile dispatch parameter yet. AgentOS blocks unauthorized agents and includes the selected profile/session as task context."}),0===o.length?(0,a.jsx)(Z,{title:"No allowed browser-capable agents",description:"Grant account access to a browser-capable agent before running a task with this login target."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(er.J,{htmlFor:`account-task-agent-${t.id}`,children:"Agent"}),(0,a.jsx)("select",{id:`account-task-agent-${t.id}`,value:c,onChange:e=>d(e.target.value),className:"h-9 rounded-[10px] border border-white/[0.10] bg-slate-950/50 px-3 text-xs text-white",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,a.jsx)(ei.T,{value:p,onChange:e=>u(e.target.value),placeholder:`Describe what the agent should do using ${t.serviceName}...`,className:"min-h-32 rounded-[12px] border-white/[0.10] bg-slate-950/50 text-sm text-slate-100"})]}),x?(0,a.jsx)("div",{className:"rounded-[10px] border border-rose-300/20 bg-rose-400/10 px-3 py-2 text-xs text-rose-100",children:x}):null,(0,a.jsxs)(en.Es,{children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:()=>l(!1),children:"Cancel"}),(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:m||0===o.length||!c||!p.trim(),onClick:()=>void b(),children:m?"Submitting...":"Submit task"})]})]}):null})}function eh({open:e,workspace:t,onOpenChange:s,onSubmit:n,profiles:r}){return(0,a.jsx)(en.lG,{open:e,onOpenChange:s,children:e?(0,a.jsx)(ex,{workspace:t,profiles:r,onCancel:()=>s(!1),onSubmit:n},t?.id??"no-workspace"):null})}function ex({workspace:e,profiles:t,onCancel:s,onSubmit:r}){var l;let i=t.find(e=>"openclaw"===e.name)?.name??t[0]?.name??"",o=t.find(e=>"user"===e.name)??null,c=!!o,d=o?.running===!0,[p,u]=(0,n.useState)(""),[m,h]=(0,n.useState)("existing"),[x,g]=(0,n.useState)(i),[w,v]=(0,n.useState)(!1),j=(0,n.useMemo)(()=>(function(e,t=et){var s;let a=function(e){let t=e.trim();if(!t||/\s/.test(t))return null;let s=/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:`https://${t}`;try{let e=new URL(s);if("http:"!==e.protocol&&"https:"!==e.protocol||!es(e.hostname))return null;return e.search="",e.hash="",e}catch{return null}}(e);if(!a)return null;let n=es(a.hostname);if(!n)return null;let r=(s=n,t.find(e=>e.domains.some(e=>{let t=es(e);return t===s||!!t&&s.endsWith(`.${t}`)}))??null),l=r?.service??function(e){let[t=e]=e.split(".");return t.split(/[-_]+/).filter(Boolean).map(e=>e.slice(0,1).toUpperCase()+e.slice(1)).join(" ")||"Website"}(n),i=r?.id??(ea(n)||"website");return{serviceId:i,serviceName:l,loginUrl:a.toString(),primaryDomain:n,label:`${ea(l)||i}-login`}})(p),[p]),y=j?.serviceName??"Website",N=j?.loginUrl??"",k=j?.primaryDomain??"",C="signed-in-chrome"===m?"user":x.trim(),A=(l={workspace:e,website:j,mode:m,profileName:C,existingProfileName:x,hasSignedInChromeProfile:c,signedInChromeReady:d}).workspace?l.website?"existing"!==l.mode||l.existingProfileName.trim()?"signed-in-chrome"!==l.mode||l.hasSignedInChromeProfile?"signed-in-chrome"!==l.mode||l.signedInChromeReady?null:"Signed-in Chrome is reported by OpenClaw but is not attached yet. Start or attach the user browser profile first, or use the managed openclaw profile.":"The signed-in Chrome profile is not reported by OpenClaw.":"Select an existing OpenClaw browser profile.":"Enter a valid website URL.":"Select a workspace before connecting accounts.",S=async()=>{if(!A&&e&&j){v(!0);try{await r({mode:m,profileName:C,loginUrl:j.loginUrl,label:ev(j.serviceId),serviceId:j.serviceId,serviceName:j.serviceName,primaryDomain:j.primaryDomain})}finally{v(!1)}}};return(0,a.jsxs)(en.Cf,{className:"max-h-[92vh] w-[calc(100vw-2rem)] max-w-3xl overflow-y-auto rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)("div",{className:"border-b border-white/[0.08] p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:"Connect Account"}),(0,a.jsx)(en.rr,{children:"Open a login flow in a real OpenClaw browser profile for this workspace."})]}),(0,a.jsx)("div",{className:"mt-3 rounded-[10px] border border-amber-300/20 bg-amber-400/10 px-3 py-2 text-xs leading-5 text-amber-100",children:"AgentOS does not store raw passwords. Use manual login inside the assigned browser profile or connect through supported integrations."})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-4 p-4",children:[(0,a.jsx)(ef,{title:"Login Target",description:"Type one website or choose a shortcut. AgentOS opens that URL in the selected OpenClaw browser profile."}),(0,a.jsxs)("div",{className:"min-w-0 max-w-full rounded-[22px] border border-white/[0.08] bg-white/[0.035] p-3 shadow-[0_20px_48px_rgba(0,0,0,0.24)]",children:[(0,a.jsxs)("div",{className:"flex h-12 items-center gap-3 rounded-full border border-white/[0.10] bg-slate-950/70 px-4 shadow-[0_0_0_1px_rgba(255,255,255,0.03),0_18px_40px_rgba(15,23,42,0.25)]",children:[(0,a.jsx)(b.A,{className:"h-4 w-4 shrink-0 text-slate-400"}),(0,a.jsx)(T.p,{id:"connect-website-url",value:p,onChange:e=>u(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),S())},placeholder:"Search or type a website URL",className:"h-10 min-w-0 border-0 bg-transparent px-0 text-sm text-white shadow-none outline-none placeholder:text-slate-500 focus-visible:ring-0"}),j?(0,a.jsx)(f.J,{serviceId:j.serviceId,serviceName:j.serviceName,primaryDomain:j.primaryDomain,className:"h-7 w-7 shrink-0 border-white/10 bg-slate-950/40 shadow-none"}):null]}),(0,a.jsx)("div",{className:"mt-4 w-full min-w-0 max-w-full overflow-x-auto pb-1","aria-label":"Common login targets",children:(0,a.jsx)("div",{className:"flex w-max gap-2 pr-1",children:et.map(e=>(0,a.jsx)(eb,{example:e,active:j?.serviceId===e.id,onClick:()=>u(e.loginUrl)},e.id))})})]}),(0,a.jsx)(ef,{title:"Browser Profile",description:"Select a profile reported by OpenClaw. AgentOS cannot create persistent browser profiles through the current Gateway browser request API."}),(0,a.jsxs)("div",{className:"grid gap-2 md:grid-cols-2",children:[(0,a.jsx)(eg,{active:"existing"===m,title:"Existing profile",description:"Use a profile reported by OpenClaw.",onClick:()=>h("existing")}),c?(0,a.jsx)(eg,{active:"signed-in-chrome"===m,title:"Signed-in Chrome",description:"Attach to the already-open signed-in Chrome profile reported as user.",onClick:()=>h("signed-in-chrome")}):null]}),"existing"===m?(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(er.J,{htmlFor:"connect-existing-profile",children:"Existing browser profile"}),(0,a.jsxs)("select",{id:"connect-existing-profile",value:x,onChange:e=>g(e.target.value),className:"h-9 rounded-[10px] border border-white/[0.10] bg-slate-950/50 px-3 text-xs text-white",children:[(0,a.jsx)("option",{value:"",children:"Select a browser profile"}),t.map(e=>(0,a.jsxs)("option",{value:e.name,children:[e.name," (",e.driverLabel,")"]},e.name))]})]}):null,"signed-in-chrome"===m?(0,a.jsx)("div",{className:"rounded-[12px] border border-amber-300/20 bg-amber-400/10 px-3 py-2 text-xs leading-5 text-amber-100",children:d?"Signed-in Chrome is attached through OpenClaw. Use it only when existing cookies matter and the operator is present.":"Signed-in Chrome is not attached through OpenClaw yet. Start or attach the user profile from Browser Profiles after launching Chrome with remote debugging, or use the managed openclaw profile."}):null,(0,a.jsx)(H,{children:(0,a.jsxs)("div",{className:"grid gap-2 p-3 sm:grid-cols-2",children:[(0,a.jsx)(X,{label:"Workspace",value:e?.name??"No workspace selected"}),(0,a.jsx)(X,{label:"Login target",value:y}),(0,a.jsx)(X,{label:"Login URL",value:N||"Not set"}),(0,a.jsx)(X,{label:"Primary domain",value:k||"Not set"}),(0,a.jsx)(X,{label:"Browser profile",value:C||"Not set"}),(0,a.jsx)(X,{label:"Action",value:"Open login URL in selected profile"})]})}),(0,a.jsx)(ew,{message:A})]}),(0,a.jsx)(en.Es,{className:"border-t border-white/[0.08] p-4",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-[0.7rem] text-slate-500",children:A??"Ready to open a real OpenClaw browser login flow."}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:s,children:"Cancel"}),(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:!!A||w,onClick:()=>void S(),children:w?"Opening...":"Connect Account"})]})]})})]})}function eg({active:e,title:t,description:s,onClick:n}){return(0,a.jsxs)("button",{type:"button",onClick:n,className:(0,M.cn)("rounded-[12px] border p-3 text-left",e?"border-blue-300/45 bg-blue-400/12":"border-white/[0.08] bg-white/[0.035]"),children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-white",children:t}),(0,a.jsx)("p",{className:"mt-1 text-[0.68rem] leading-5 text-slate-500",children:s})]})}function eb({example:e,active:t,onClick:s}){let n=e.domains[0]??e.loginUrl;return(0,a.jsxs)("button",{type:"button",onClick:s,className:(0,M.cn)("group flex w-[76px] shrink-0 flex-col items-center gap-2 rounded-[14px] border border-transparent px-2 py-2 text-center transition hover:border-blue-300/24 hover:bg-blue-400/10",t&&"border-blue-300/35 bg-blue-400/12"),title:e.loginUrl,children:[(0,a.jsx)(f.J,{serviceId:e.id,serviceName:e.service,primaryDomain:n,className:"h-11 w-11 border-white/12 bg-white/[0.04] shadow-[0_10px_22px_rgba(0,0,0,0.18)] transition group-hover:border-blue-200/28"}),(0,a.jsx)("span",{className:"w-full truncate text-[0.68rem] font-medium text-slate-300",children:e.label})]})}function ef({title:e,description:t}){return(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-white",children:e}),(0,a.jsx)("p",{className:"mt-1 text-xs leading-5 text-slate-400",children:t})]})}function ew({message:e}){return e?(0,a.jsx)("div",{className:"rounded-[10px] border border-amber-300/20 bg-amber-400/10 px-3 py-2 text-xs text-amber-100",children:e}):null}function ev(e){let t=e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64)||"account";return`${t}-login-${Date.now().toString(36)}`}function ej(e){return"all"===e?"All":"running"===e?"Running":"Stopped"}function ey(e){return"all"===e?"All":"existing-session"===e?"Existing session":"Managed"}function eN(e){return!("user"===e.name&&"existing-session"===e.driver&&!e.running)}function ek(e,t){return e instanceof Error&&e.message?e.message:t}function eC(e){let t=[...e.tools??[],...e.observedTools??[]].map(e=>e.toLowerCase());return"browser"===e.policy.preset||t.some(e=>"browser"===e||e.includes("chrome"))}var eA=s(85134),eS=s(73875),eL=s(3324),eO=s(48758),eT=s(96551),eM=s(87408),eI=s(33494),eP=s(8894),eR=s(47183),eU=s(50592),e$=s(47697),eD=s(91980),e_=s(74213),ez=s(75544),eF=s(38413),eE=s(63956),eW=s(93479),eq=s(45927),eB=s(25336),eH=s(4606),eG=s(8482),eJ=s(75903),eK=s(19443),eX=s(24687),eY=s(1033),eV=s(42394),eQ=s(10910),eZ=s(63406),e0=s(81210),e1=s(41363),e2=s(95236),e5=s(66159),e3=s(99350),e4=s(1214),e8=s(6246),e6=s(23083),e9=s(87515),e7=s(1674),te=s(82711),tt=s(72427);let ts="https://docs.openclaw.ai/cli/models";function ta(e){let t=(0,tt.rY)(e.provider),s=t.provisionFields.filter(e=>e.required).map(e=>e.label);return{id:e.id,name:e.name??t.label,category:e.category,description:e.description??t.description,managedBy:"openclaw",providerType:t.kind,surfaceProvider:e.provider,surfaceKind:t.kind,permissions:e.permissions,setupRequirements:s.length>0?s:t.provisionFields.map(e=>e.label).slice(0,4),configure:{supported:t.supportsProvisioning,reason:t.supportsProvisioning?"Managed by the existing AgentOS workspace surface setup flow.":"OpenClaw does not expose provisioning fields for this surface yet."},reconnect:{supported:!0,reason:"Uses OpenClaw Gateway channels.status when available, with the existing adapter fallback."},disable:{supported:!0,reason:"Can disconnect the workspace surface binding through the existing workspace channels API."},docsUrl:null}}let tn=[ta({id:"telegram",provider:"telegram",category:"Communication",permissions:["Chat routing","Group routing","Bot token required","Route discovery"]}),ta({id:"discord",provider:"discord",category:"Communication",permissions:["Server routing","Channel routing","Bot token required","Route discovery"]}),ta({id:"gmail",provider:"gmail",category:"Communication",permissions:["Inbox access","Webhook triggers","Draft/send workflow","OAuth or Pub/Sub configuration"]}),ta({id:"slack",provider:"slack",category:"Productivity",permissions:["Workspace chat","Channel alerts","Bot token required"]}),ta({id:"google-chat",provider:"googlechat",name:"Google Chat",category:"Communication",permissions:["Space alerts","Webhook delivery","Webhook URL required"]}),ta({id:"email",provider:"email",name:"Email",category:"Communication",permissions:["Inbox access","Outbound mail when configured","OAuth or IMAP/SMTP configuration"]}),{id:"notion",name:"Notion",category:"Productivity",description:"Sync knowledge bases, briefs, and planning pages.",managedBy:"unsupported",providerType:"external-app",permissions:["Unavailable until an AgentOS/OpenClaw Notion connector exists."],setupRequirements:["OpenClaw connector support"],configure:{supported:!1,reason:"No Notion setup route or OpenClaw connector is exposed in this codebase."},reconnect:{supported:!1,reason:"No Notion health check method is exposed in this codebase."},disable:{supported:!1,reason:"No Notion connection record exists to disable."},docsUrl:null},{id:"google-drive",name:"Google Drive",category:"Productivity",description:"Use shared documents and generated outputs as workspace context.",managedBy:"unsupported",providerType:"external-app",permissions:["Unavailable until a Drive connector is exposed."],setupRequirements:["OpenClaw connector support"],configure:{supported:!1,reason:"Workspace files are local AgentOS/OpenClaw files; no Google Drive connector is exposed yet."},reconnect:{supported:!1,reason:"No Google Drive health check method is exposed in this codebase."},disable:{supported:!1,reason:"No Google Drive connection record exists to disable."},docsUrl:null},{id:"github",name:"GitHub",category:"Developer Tools",description:"Connect repositories, issues, pull requests, and release automation.",managedBy:"unsupported",providerType:"external-app",permissions:["Unavailable until a GitHub connector is exposed."],setupRequirements:["OpenClaw connector support"],configure:{supported:!1,reason:"No GitHub setup route or OpenClaw connector is exposed in this codebase."},reconnect:{supported:!1,reason:"No GitHub health check method is exposed in this codebase."},disable:{supported:!1,reason:"No GitHub connection record exists to disable."},docsUrl:null},{id:"linear",name:"Linear",category:"Developer Tools",description:"Sync tasks, roadmaps, and delivery queues.",managedBy:"unsupported",providerType:"external-app",permissions:["Unavailable until a Linear connector is exposed."],setupRequirements:["OpenClaw connector support"],configure:{supported:!1,reason:"No Linear setup route or OpenClaw connector is exposed in this codebase."},reconnect:{supported:!1,reason:"No Linear health check method is exposed in this codebase."},disable:{supported:!1,reason:"No Linear connection record exists to disable."},docsUrl:null},{id:"chrome",name:"Chrome / Browser Automation",category:"Browser / Automation",description:"Give browser agents controlled web automation access.",managedBy:"agentos",providerType:"tool",toolHints:["browser","chrome","web_search","web_fetch"],permissions:["Agent tool declarations","Runtime tool usage metadata"],setupRequirements:["Agent with browser-capable tools"],configure:{supported:!1,reason:"Browser automation is inferred from agent tool configuration; no dedicated connector setup flow exists."},reconnect:{supported:!1,reason:"OpenClaw exposes tool catalogs, but no browser connector retest action is wired here."},disable:{supported:!1,reason:"Disable browser tools from the agent capability editor instead of this integration card."},docsUrl:null},ta({id:"webhooks",provider:"webhook",name:"Webhooks",category:"Browser / Automation",permissions:["Inbound triggers","Shared hook token","Path configuration"]}),ta({id:"cron",provider:"cron",name:"Cron",category:"Browser / Automation",permissions:["Scheduled triggers","Run log metadata","Webhook token required"]}),{id:"x-twitter",name:"X / Twitter",category:"Browser / Automation",description:"Monitor social trends and route campaign signals.",managedBy:"unsupported",providerType:"external-app",permissions:["Unavailable until an X/Twitter connector is exposed."],setupRequirements:["OpenClaw connector support"],configure:{supported:!1,reason:"No X/Twitter setup route or OpenClaw connector is exposed in this codebase."},reconnect:{supported:!1,reason:"No X/Twitter health check method is exposed in this codebase."},disable:{supported:!1,reason:"No X/Twitter connection record exists to disable."},docsUrl:null},{id:"openrouter",name:"OpenRouter",category:"AI / Model Providers",description:"Route agents across broad hosted model catalogs.",managedBy:"openclaw",providerType:"model-provider",modelProvider:"openrouter",permissions:["Model catalog discovery","Configured model routes","API key stored by OpenClaw"],setupRequirements:["OpenRouter API key","At least one configured model route"],configure:{supported:!0,reason:"Uses the existing Add Models provider setup flow."},reconnect:{supported:!0,reason:"Uses the existing /api/models/providers status action."},disable:{supported:!1,reason:"Model provider removal/disable is not exposed by AgentOS or OpenClaw here yet."},docsUrl:ts},{id:"ollama",name:"Ollama",category:"AI / Model Providers",description:"Use local models for private and low-cost background tasks.",managedBy:"openclaw",providerType:"model-provider",modelProvider:"ollama",permissions:["Local model discovery","Configured model routes"],setupRequirements:["Ollama installed locally","At least one pulled local model"],configure:{supported:!0,reason:"Uses the existing Add Models provider setup flow."},reconnect:{supported:!0,reason:"Uses the existing /api/models/providers status action."},disable:{supported:!1,reason:"Ollama is a local runtime dependency; disabling is not exposed by AgentOS here."},docsUrl:ts}];function tr(e){let t=e.trim().toLowerCase().replace(/_/g,"-");return"webhook"===t?"webhooks":"googlechat"===t?"google-chat":"browser"===t?"chrome":"x"===t||"twitter"===t?"x-twitter":t}tn.map(e=>[e.id,e]);let tl={connected:"Connected",disabled:"Disabled","pending-setup":"Pending Setup",failed:"Failed","needs-authentication":"Needs Authentication","missing-credentials":"Missing Credentials",unsupported:"Unsupported",unknown:"Unknown"};function ti(e,t,s){return{id:e.id,name:(0,te.CK)(e),workspaceName:t.get(e.workspaceId)??e.workspaceId,reason:s}}function to(e){return e.trim().toLowerCase().split("/")[0].replace(/^openai-codex$/,"openai")}function tc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}let td={connected:"success",disabled:"muted","pending-setup":"warning",failed:"danger","needs-authentication":"warning","missing-credentials":"warning",unsupported:"muted",unknown:"muted"},tp={telegram:{icon:eF.A,iconTone:"info"},discord:{icon:eF.A,iconTone:"purple"},gmail:{icon:eE.A,iconTone:"danger"},slack:{icon:eF.A,iconTone:"success"},"google-chat":{icon:eF.A,iconTone:"success"},email:{icon:eE.A,iconTone:"info"},notion:{icon:eW.A,iconTone:"muted"},"google-drive":{icon:eq.A,iconTone:"warning"},github:{icon:eB.A,iconTone:"muted"},linear:{icon:eH.A,iconTone:"purple"},chrome:{icon:l.A,iconTone:"warning"},webhooks:{icon:eG.A,iconTone:"danger"},cron:{icon:eO.A,iconTone:"warning"},"x-twitter":{icon:eJ.A,iconTone:"muted"},openrouter:{icon:eK.A,iconTone:"muted"},ollama:{icon:eX.A,iconTone:"muted"}};function tu(e){return e.runtimes.reduce((e,t)=>e+(t.tokenUsage?.total??0),0)}function tm(e){return e>=1e9?`${(e/1e9).toFixed(2)}B`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)}function th(e){return"number"!=typeof e||Number.isNaN(e)?"-":e>=0x40000000?`${(e/0x40000000).toFixed(2)} GB`:e>=1048576?`${(e/1048576).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}function tx(e){return"ready"===e?"success":"running"===e?"info":"needs-approval"===e?"danger":"idle"===e?"warning":"muted"}function tg(e,t){for(let s of t){let t=e[s];if("string"==typeof t&&t.trim())return t.trim()}return null}function tb(e){let t=e.toLowerCase().replace(/_/g,"-");return"webhook"===t?"webhooks":"googlechat"===t?"google-chat":"browser"===t?"chrome":"x"===t||"twitter"===t?"x-twitter":t}function tf(e){return e.split(/[\s-]+/).filter(Boolean).map(e=>e.slice(0,1).toUpperCase()+e.slice(1)).join(" ")}eL.A,eI.A,eO.A,e2.A,eT.A;let tw={queued:e5.A,running:e3.A,approval:e4.A,completed:eI.A,cancelled:e8.A,stalled:e2.A},tv={connected:eI.A,disabled:e6.A,"pending-setup":e5.A,failed:e8.A,"needs-authentication":eT.A,"missing-credentials":eT.A,unsupported:e6.A,unknown:e5.A},tj={"All Files":e1.A,"Core Knowledge":eW.A,Memory:e9.A,"Generated Outputs":eM.A,Reports:eH.A,Screenshots:eq.A,Datasets:e7.A,Campaigns:eJ.A,Archived:e6.A,Trash:e8.A},ty={connected:"success",disabled:"muted","pending-setup":"warning",failed:"danger","needs-authentication":"warning","missing-credentials":"warning",unsupported:"muted",unknown:"muted"};function tN(e){switch(e){case"connected":return"Connected";case"disabled":return"Disabled";case"pending-setup":return"Pending Setup";case"failed":return"Failed";case"needs-authentication":return"Needs Authentication";case"missing-credentials":return"Missing Credentials";case"unsupported":return"Unsupported";case"unknown":return"Unknown"}}function tk(e){return e instanceof Error?e.message:"Unknown integration error."}function tC({label:e,value:t}){return(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-[0.56rem] font-semibold uppercase tracking-[0.14em] text-slate-500",children:e}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs font-semibold text-white",children:t})]})}function tA({icon:e,label:t,value:s,detail:n,tone:r}){return(0,a.jsxs)("div",{className:"rounded-[10px] border border-white/[0.08] bg-white/[0.03] p-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(K,{icon:e,label:t,tone:r}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block text-base font-semibold text-white",children:s}),(0,a.jsx)("span",{className:"block truncate text-[0.68rem] text-slate-400",children:t})]})]}),(0,a.jsx)("p",{className:"mt-1.5 text-[0.68rem] text-slate-500",children:n})]})}function tS({title:e,description:t,className:s}){return(0,a.jsxs)("div",{className:(0,M.cn)("rounded-[12px] border border-white/[0.08] bg-white/[0.03] p-3",s),children:[(0,a.jsx)("p",{className:"text-xs font-semibold text-white",children:e}),(0,a.jsx)("p",{className:"mt-2 text-xs leading-5 text-slate-400",children:t})]})}function tL({open:e,agent:t,defaultWorkspaceId:s=null,onOpenChange:r,onSubmitted:l}){let[i,o]=(0,n.useState)(""),[c,d]=(0,n.useState)(!1),[p,u]=(0,n.useState)(null),m=t?.source?.workspaceId??s??void 0;(0,n.useEffect)(()=>{e&&(o(""),u(null))},[e]);let h=async()=>{let e=i.trim();if(!e)return void u("Enter a task brief before submitting.");d(!0),u(null);try{let s=await fetch("/api/mission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mission:e,agentId:t?.source?.id,workspaceId:m})}),a=await s.json().catch(()=>null);if(!s.ok||a?.error)throw Error(a?.error||"Mission dispatch failed.");el.o.success("Task submitted.",{description:a?.summary}),r(!1),await l()}catch(e){u(tk(e))}finally{d(!1)}};return(0,a.jsx)(en.lG,{open:e,onOpenChange:r,children:(0,a.jsxs)(en.Cf,{className:"max-w-xl rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:t?`Run task with ${t.name}`:"Create Task"}),(0,a.jsx)(en.rr,{children:"Submits through the existing AgentOS mission dispatch flow."})]}),p?(0,a.jsx)("div",{className:"rounded-[10px] border border-rose-300/20 bg-rose-400/10 px-3 py-2 text-xs text-rose-100",children:p}):null,(0,a.jsx)(ei.T,{value:i,onChange:e=>o(e.target.value),placeholder:"Describe the task to run...",className:"min-h-36 rounded-[12px] border-white/[0.10] bg-slate-950/50 text-sm text-slate-100"}),(0,a.jsxs)(en.Es,{children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:()=>r(!1),children:"Cancel"}),(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:c||!i.trim(),onClick:()=>void h(),children:c?"Submitting...":"Submit Task"})]})]})})}function tO(e){return"all"===e?"All":"approval"===e?"Awaiting Approval":tI(e)}function tT(e){return!!(e.source&&["queued","running","approval","stalled"].includes(e.status))}function tM(e){return"all"===e?"All":"needs-approval"===e?"Needs Approval":tI(e)}function tI(e){return e.split(/[\s-]+/).filter(Boolean).map(e=>e.slice(0,1).toUpperCase()+e.slice(1)).join(" ")}function tP({snapshot:e,rootSnapshot:t,activeWorkspaceId:s,surfaceTheme:r,refresh:l,setSnapshot:i}){let o=(0,n.useMemo)(()=>(function(e){if(0===e.agents.length)return[];let t=(0,te.hv)(e.generatedAt),s=new Map(e.workspaces.map(e=>[e.id,e])),a=new Map(e.models.map(e=>[e.id,e]));return e.agents.map(e=>{var n,r;let l=(n=e).currentAction.toLowerCase().includes("approval")||"standby"===n.status&&0===n.activeRuntimeIds.length&&n.heartbeat.enabled?"needs-approval":n.activeRuntimeIds.length>0||"engaged"===n.status||"monitoring"===n.status?"running":"ready"===n.status?"ready":"idle",i=s.get(e.workspaceId)?.name??e.workspaceId??"Unassigned";return{id:e.id,name:(0,te.CK)(e),purpose:e.profile.purpose||e.currentAction||"Not reported",status:l,statusLabel:"needs-approval"===l?"Needs Approval":"running"===l?"Running":tf(l),statusTone:tx(l),modelLabel:a.get(e.modelId)?.name||e.modelId||"Unassigned",policyLabel:tf(e.policy.preset),workspaceName:i,toolsCount:new Set([...e.tools||[],...e.observedTools||[]].filter(Boolean)).size,sessionsCount:e.sessionCount,lastActiveLabel:(0,te.fw)(e.lastActiveAt,t),online:"offline"!==e.status,icon:"browser"===(r=e).policy.preset||/browser|web/i.test(r.name)?eY.A:"monitoring"===r.policy.preset?eO.A:"setup"===r.policy.preset?eV.A:eL.A,iconTone:"needs-approval"===l?"danger":"running"===l?"info":"idle"===l?"warning":"success",source:e}})})(e),[e]),[c,u]=(0,n.useState)(""),[m,h]=(0,n.useState)("all"),[x,g]=(0,n.useState)("last-active"),[b,f]=(0,n.useState)("grid"),[w,v]=(0,n.useState)(o[0]?.id??""),[y,N]=(0,n.useState)(null),[k,C]=(0,n.useState)(null),[A,S]=(0,n.useState)(null),[L,T]=(0,n.useState)("skills"),[I,P]=(0,n.useState)(null),[R,U]=(0,n.useState)(null),[$,H]=(0,n.useState)(!1),G=o.filter(e=>{let t=c.trim().toLowerCase(),s=!t||[e.name,e.purpose,e.modelLabel,e.policyLabel,e.workspaceName].join(" ").toLowerCase().includes(t),a="all"===m||e.status===m;return s&&a}).sort((e,t)=>"name"===x?e.name.localeCompare(t.name):"status"===x?e.statusLabel.localeCompare(t.statusLabel)||e.name.localeCompare(t.name):"workspace"===x?e.workspaceName.localeCompare(t.workspaceName)||e.name.localeCompare(t.name):(t.source?.lastActiveAt??0)-(e.source?.lastActiveAt??0)||e.name.localeCompare(t.name)),J=G.find(e=>e.id===w)??G[0]??null,K=y?t.agents.find(e=>e.id===y)??null:null,X=o.filter(e=>"running"===e.status).length,Y=o.filter(e=>"ready"===e.status).length,V=o.filter(e=>"idle"===e.status).length,Q=o.filter(e=>"needs-approval"===e.status).length,ee=tu(e),et={all:o.length,ready:Y,running:X,idle:V,"needs-approval":Q},es=["last-active","name","status","workspace"],ea=(e,t)=>{S(e),T(t)},er=async e=>{if(!e.source)return void el.o.message("Delete is unavailable.",{description:"This row is not backed by an AgentOS agent record."});if(window.confirm(`Delete ${e.name}? This removes the OpenClaw agent from AgentOS.`)){U(e.id);try{let t=await fetch("/api/agents",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentId:e.source.id})}),s=await t.json().catch(()=>null);if(!t.ok||s?.error)throw Error(s?.error||"Agent deletion failed.");el.o.success("Agent deleted."),v(""),await l()}catch(e){el.o.error("Agent deletion failed.",{description:tk(e)})}finally{U(null)}}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{main:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{title:"Agents",subtitle:"Manage your AI workforce. Monitor health, configure capabilities, and run agents at scale.",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[10px] px-3 text-xs",disabled:!0,title:"Agent import requires a backend import contract.",children:[(0,a.jsx)(eA.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Import Agent"]}),(0,a.jsx)(ez.O,{snapshot:t,defaultWorkspaceId:s,onRefresh:l,onSnapshotChange:e=>i(t=>e(t)),onAgentCreated:v,onAgentCreatedVisible:v,surfaceTheme:r,trigger:(0,a.jsxs)(O.$,{size:"sm",className:"h-8 rounded-[10px] bg-blue-500 px-3 text-xs text-white shadow-blue-500/20 hover:bg-blue-400",children:[(0,a.jsx)(eS.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Create Agent"]})})]})}),(0,a.jsxs)(z,{columns:5,children:[(0,a.jsx)(_,{label:"Total Agents",value:String(o.length),detail:`${e.workspaces.length} workspaces`,icon:eL.A,tone:"info"}),(0,a.jsx)(_,{label:"Active",value:String(X),detail:`${Math.round(X/Math.max(1,o.length)*100)}% of total`,icon:eO.A,tone:"success"}),(0,a.jsx)(_,{label:"Idle",value:String(V),detail:`${Math.round(V/Math.max(1,o.length)*100)}% of total`,icon:j.A,tone:"warning"}),(0,a.jsx)(_,{label:"Needs Approval",value:String(Q),detail:`${Math.round(Q/Math.max(1,o.length)*100)}% of total`,icon:eT.A,tone:"danger"}),(0,a.jsx)(_,{label:"Runtime Tokens",value:tm(ee),detail:ee?"From live runtimes":"No runtime token usage reported",icon:eM.A,tone:"purple"})]}),(0,a.jsxs)(F,{search:c,onSearchChange:u,searchPlaceholder:"Search agents...",right:(0,a.jsx)(q,{value:b,onChange:f}),children:[(0,a.jsx)(W,{icon:d.A,label:`Filter: ${tM(m)}`,active:"all"!==m,onClick:()=>h("all")}),(0,a.jsx)(W,{icon:p.A,label:`Sort: ${"last-active"===x?"Last active":tI(x)}`,chevron:!0,onClick:()=>g(e=>es[(es.indexOf(e)+1)%es.length])})]}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:["all","ready","running","idle","needs-approval"].map(e=>(0,a.jsx)(B,{label:tM(e),count:et[e],active:m===e,tone:tx(e),onClick:()=>h(e)},e))}),G.length>0?(0,a.jsx)("div",{className:(0,M.cn)("grid"===b?"grid gap-2.5 lg:grid-cols-2 min-[1400px]:grid-cols-3":"flex flex-col gap-2.5"),children:G.map(e=>(0,a.jsx)(tR,{agent:e,selected:J?.id===e.id,list:"list"===b,onSelect:()=>v(e.id),onMessage:()=>N(e.id),onRunTask:()=>P(e)},e.id))}):(0,a.jsx)(Z,{title:"No agents match your filters",description:"Clear search or switch back to All to see every OpenClaw agent in this workspace."}),(0,a.jsx)(t$,{snapshot:e,agents:o})]}),inspector:J?(0,a.jsx)(tU,{agent:J,deleting:R===J.id,onMessage:()=>N(J.id),onRunTask:()=>P(J),onChangeModel:()=>C(J.id),onManagePolicy:()=>ea(J.id,"skills"),onManageTools:()=>ea(J.id,"tools"),onDelete:()=>void er(J)}):null}),(0,a.jsx)(en.lG,{open:!!K,onOpenChange:e=>N(e?y:null),children:(0,a.jsxs)(en.Cf,{className:"flex h-[min(82dvh,760px)] max-w-3xl flex-col rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:K?`Message ${K.identityName?.trim()||K.name||K.id}`:"Agent Chat"}),(0,a.jsx)(en.rr,{children:"Messages are sent through the existing AgentOS/OpenClaw agent chat runner."})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1",children:K?(0,a.jsx)(eD.d,{agent:K,snapshot:t,surfaceTheme:r,isVisible:!!K,onRefresh:l,onSnapshotChange:e=>i(t=>e(t))}):null})]})}),(0,a.jsx)(e_.r,{open:!!k,agentId:k,snapshot:t,onOpenChange:e=>C(e?k:null),onSnapshotChange:e=>i(t=>e(t)),onRefresh:l,onOpenAddModels:()=>H(!0)}),(0,a.jsx)(eU.o,{open:$,onOpenChange:H,snapshot:t,onSnapshotChange:i}),(0,a.jsx)(e$.z,{open:!!A,agentId:A,initialFocus:L,snapshot:t,onOpenChange:e=>S(e?A:null),onSnapshotChange:e=>i(t=>e(t)),onRefresh:l}),(0,a.jsx)(tL,{open:!!I,agent:I,onOpenChange:e=>P(e?I:null),onSubmitted:l})]})}function tR({agent:e,selected:t,list:s,onSelect:n,onMessage:r,onRunTask:l}){return(0,a.jsx)("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),n())},className:(0,M.cn)("group rounded-[12px] border p-3 text-left transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300/40",I,t&&"border-blue-400/70 bg-blue-500/[0.08] shadow-[0_0_0_1px_rgba(59,130,246,0.22),0_22px_64px_rgba(37,99,235,0.16)]"),children:(0,a.jsxs)("div",{className:(0,M.cn)("flex gap-3",s?"items-center":"items-start"),children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone,size:"lg"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone}),(0,a.jsx)("h3",{className:"mt-1.5 truncate text-[0.88rem] font-semibold text-white",children:e.name}),(0,a.jsx)("p",{className:"mt-1 line-clamp-2 text-[0.72rem] leading-4 text-slate-300",children:e.purpose})]}),t?(0,a.jsx)(eI.A,{className:"h-4 w-4 shrink-0 text-blue-300"}):null]}),(0,a.jsxs)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:[(0,a.jsx)(ee,{children:e.modelLabel}),(0,a.jsxs)(ee,{children:["Policy: ",e.policyLabel]})]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2 border-t border-white/[0.07] pt-2.5 text-[0.58rem] uppercase tracking-[0.11em] text-slate-500",children:[(0,a.jsxs)("span",{children:["Tools ",(0,a.jsx)("b",{className:"ml-1 text-slate-200",children:e.toolsCount})]}),(0,a.jsxs)("span",{children:["Sessions ",(0,a.jsx)("b",{className:"ml-1 text-slate-200",children:e.sessionsCount})]}),(0,a.jsxs)("span",{children:["Last active ",(0,a.jsx)("b",{className:"ml-1 normal-case tracking-normal text-slate-200",children:e.lastActiveLabel})]})]}),(0,a.jsxs)("div",{className:"mt-2.5 grid grid-cols-[1fr_1fr_auto] gap-2",children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",onClick:e=>{e.stopPropagation(),r()},children:[(0,a.jsx)(eP.A,{className:"mr-1.5 h-3.5 w-3.5"})," Message"]}),(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",onClick:e=>{e.stopPropagation(),l()},children:[(0,a.jsx)(x.A,{className:"mr-1.5 h-3.5 w-3.5"})," Run Task"]}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2.5",disabled:!0,title:"Following agents requires backend support.",onClick:e=>e.stopPropagation(),children:(0,a.jsx)(eR.A,{className:"h-3.5 w-3.5"})})]})]})]})})}function tU({agent:e,deleting:t,onMessage:s,onRunTask:n,onChangeModel:r,onManagePolicy:l,onManageTools:i,onDelete:o}){return(0,a.jsxs)(G,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone,size:"lg"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsx)("h2",{className:"text-base font-semibold leading-tight text-white",children:e.name}),(0,a.jsx)(Q,{})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-2",children:[(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-slate-400",children:[(0,a.jsx)("span",{className:(0,M.cn)("h-1.5 w-1.5 rounded-full",e.online?"bg-emerald-400":"bg-slate-500")}),e.online?"Online":"Offline"]})]}),(0,a.jsx)("p",{className:"mt-2.5 text-xs leading-5 text-slate-300",children:e.purpose})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",onClick:s,children:"Message"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",onClick:n,children:"Run Task"}),(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-amber-400 px-2 text-xs text-slate-950 hover:bg-amber-300",disabled:!0,title:"Following agents requires backend support.",children:"Follow"})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-[10px] border border-white/[0.08] bg-white/[0.03] px-3",children:[(0,a.jsx)(X,{label:"Role",value:e.source?.policy.preset?tI(e.source.policy.preset):e.policyLabel}),(0,a.jsx)(X,{label:"Policy Mode",value:e.policyLabel,action:(0,a.jsx)("button",{className:"text-blue-300",onClick:l,children:"Manage"})}),(0,a.jsx)(X,{label:"Workspace Scope",value:`${e.workspaceName} (Full Access)`}),(0,a.jsx)(X,{label:"Default Model",value:e.modelLabel,action:(0,a.jsx)("button",{className:"text-blue-300",onClick:r,children:"Change"})}),(0,a.jsx)(X,{label:"Tools Enabled",value:`${e.toolsCount} tools`,action:(0,a.jsx)("button",{className:"text-blue-300",onClick:i,children:"Manage"})})]}),(0,a.jsx)(H,{title:"Runtime Summary",className:"mt-3",children:(0,a.jsxs)("div",{className:"px-3 py-2 text-xs",children:[(0,a.jsx)(X,{label:"Sessions",value:String(e.sessionsCount)}),(0,a.jsx)(X,{label:"Active runtimes",value:String(e.source?.activeRuntimeIds.length??0)}),(0,a.jsx)(X,{label:"Status",value:e.source?.status??e.statusLabel}),(0,a.jsx)(X,{label:"Heartbeat",value:e.source?.heartbeat.enabled?e.source.heartbeat.every??"Enabled":"Disabled"}),(0,a.jsx)(X,{label:"Last active",value:e.lastActiveLabel})]})}),(0,a.jsx)(H,{title:"Backend Support",className:"mt-3",children:(0,a.jsxs)("div",{className:"space-y-2 p-3 text-xs leading-5 text-slate-300",children:[(0,a.jsx)("p",{children:"Message, model changes, capability management, mission dispatch, and delete are connected to existing AgentOS/OpenClaw APIs."}),(0,a.jsx)("p",{className:"text-slate-500",children:"Follow/import actions are disabled because this codebase does not expose persistence or import contracts for them."})]})}),(0,a.jsx)(O.$,{variant:"destructive",size:"sm",className:"mt-3 h-8 w-full rounded-[9px] text-xs",disabled:t||!e.source,title:e.source?"Delete this AgentOS/OpenClaw agent.":"Delete requires a real agent record.",onClick:o,children:t?"Deleting...":"Delete Agent"})]})}function t$({snapshot:e,agents:t}){let s=e.runtimes.slice(0,4).map(e=>{let s=t.find(t=>t.id===e.agentId);return{agent:s?.name||e.agentId||"OpenClaw",event:"completed"===e.status?"Completed task":"running"===e.status?"Running task":"Updated session",status:e.status,task:e.title||e.subtitle||e.id,time:e.updatedAt?"recently":"no activity"}});return(0,a.jsx)(H,{title:"Recent Activity",children:0===s.length?(0,a.jsx)(Z,{title:"No runtime activity",description:"No agent runtime events were reported in the current AgentOS snapshot."}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[680px] text-left text-xs",children:[(0,a.jsx)("thead",{className:"border-b border-white/[0.07] text-[0.58rem] uppercase tracking-[0.14em] text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:"Agent"}),(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:"Event"}),(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:"Task"}),(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:"Time"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-white/[0.06] text-slate-300",children:s.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-white/[0.025]",children:[(0,a.jsx)("td",{className:"px-3 py-2.5 text-white",children:e.agent}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:e.event}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsx)(J,{label:e.status,tone:"completed"===e.status?"success":"running"===e.status?"info":"warning"})}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:e.task}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:e.time})]},`${e.agent}-${e.task}-${t}`))})]})})})}var tD=s(78318),t_=s(72279),tz=s(47180),tF=s(82625),tE=s(47322);function tW({snapshot:e,activeWorkspaceId:t}){let s=t?e.workspaces.find(e=>e.id===t)??null:null,r=(0,n.useMemo)(()=>t?s?[s]:[]:e.workspaces,[s,t,e.workspaces]),[l,i]=(0,n.useState)({}),[o,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(null),[h,x]=(0,n.useState)(""),[g,b]=(0,n.useState)("All Files"),[f,w]=(0,n.useState)("path"),[v,j]=(0,n.useState)("list"),[y,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(null),[A,S]=(0,n.useState)(!1),[L,T]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(0===r.length){i({}),m(null);return}let e=!1;return c(!0),m(null),(async()=>{let t=await Promise.all(r.map(async e=>{try{let t=await fetch(`/api/workspaces/${encodeURIComponent(e.id)}/files`,{cache:"no-store"}),s=await t.json();if(!t.ok||s.error)throw Error(s.error||"Workspace files could not be loaded.");return{workspaceId:e.id,files:s.files,error:null}}catch(t){return{workspaceId:e.id,files:[],error:`${e.name}: ${t instanceof Error?t.message:"Workspace files could not be loaded."}`}}}));if(!e){i(Object.fromEntries(t.map(e=>[e.workspaceId,e.files])));let e=t.map(e=>e.error).filter(e=>!!e);e.length>0&&m(e.join(" ")),c(!1)}})(),()=>{e=!0}},[L,r]);let I=(0,n.useMemo)(()=>r.flatMap(t=>{var s,a;return s=l[t.id]??[],a=e.agents.filter(e=>e.workspaceId===t.id),0===s.length?[]:s.map(e=>{var s,n,r,l,i;let o,c="memory"===(s=e).category?"Memory":"context"===s.category||"identity"===s.category||"tools"===s.category||"boot"===s.category||"project-config"===s.category||"agent-policy-config"===s.category?"Core Knowledge":"skills"===s.category?"Generated Outputs":"All Files",d=function(e,t){let s=/^agents\/([^/]+)\/PROFILE\.md$/.exec(e.path),a=s?.[1]?t.find(e=>e.id===s[1]):null;if(a)return a;let n=/^\.openclaw\/agents\/([^/]+)\/agent\//.exec(e.path),r=n?.[1]?t.find(e=>e.id===n[1]):null;return r||(t.find(t=>{var s;return e.path===`skills/${s=t.id,`agent-policy-${s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,64)||"agent"}`}/SKILL.md`})??null)}(e,a);return{id:`${t?.id??"global"}:${e.path}`,name:e.label,path:`/${e.path}`,relativePath:e.path,type:"json"===e.language?"JSON":"Markdown",category:e.category,collection:c,updatedLabel:e.exists?"Not reported":"Not created",owner:d?(0,te.CK)(d):"Workspace",workspaceId:t?.id??null,workspaceName:t?.name??"All workspaces",workspacePath:t?.path??null,sizeLabel:null==e.size?"-":th(e.size),sizeBytes:e.size,tags:(o=[(n=e).category.replace("-config",""),n.source],n.editable||o.push("read-only"),o.slice(0,3)),tasks:0,icon:(r=e.path,l=e.language,r.endsWith(".json")?eQ.A:r.endsWith(".csv")?eZ.A:r.endsWith(".zip")?e0.A:r.endsWith("/")?e1.A:"json"===l?eQ.A:eW.A),iconTone:(i=e).exists?"memory"===i.category?"purple":"project-config"===i.category||"agent-policy-config"===i.category?"warning":"info":"muted",source:e}})}),[l,e.agents,r]),P=I.filter(e=>{let t=h.trim().toLowerCase(),s=!t||[e.name,e.path,e.type,e.owner,e.workspaceName,...e.tags].join(" ").toLowerCase().includes(t),a="All Files"===g||e.collection===g;return s&&a}).sort((e,t)=>"name"===f?e.name.localeCompare(t.name):"collection"===f?e.collection.localeCompare(t.collection)||e.name.localeCompare(t.name):"size"===f?(t.sizeBytes??-1)-(e.sizeBytes??-1)||e.name.localeCompare(t.name):e.relativePath.localeCompare(t.relativePath)),R=P.find(e=>e.id===y)??P[0]??null,U=I.reduce((e,t)=>e+(t.sizeBytes??0),0),$=I.filter(e=>"Generated Outputs"===e.collection).length,B=I.filter(e=>"Memory"===e.collection).length,G=I.filter(e=>"Core Knowledge"===e.collection).length,J=["All Files",...Array.from(new Set(I.map(e=>e.collection))).sort()],X=["path","name","collection","size"],V=async e=>{if(!e.workspacePath)return void el.o.message("This file is not attached to a workspace.");try{let t=await fetch("/api/files/reveal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.source?.path??e.relativePath,basePath:e.workspacePath})}),s=await t.json();if(!t.ok||s.error)throw Error(s.error||"Unable to reveal file.");el.o.success("File revealed in Finder.")}catch(e){el.o.error("File open failed.",{description:e instanceof Error?e.message:"Unknown file error."})}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{main:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{title:"Files",subtitle:"Manage workspace documents, knowledge files, memory, and generated outputs.",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[10px] px-3 text-xs",disabled:!0,title:"Runtime artifact import is not exposed by the current workspace file API.",children:[(0,a.jsx)(eA.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Import from Agent"]}),(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[10px] px-3 text-xs",disabled:!0,title:"Uploads are not exposed by the current workspace file API.",children:[(0,a.jsx)(tD.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Upload Files"]}),(0,a.jsxs)(O.$,{size:"sm",className:"h-8 rounded-[10px] bg-blue-500 px-3 text-xs text-white shadow-blue-500/20 hover:bg-blue-400",disabled:!t,title:t?"Open the existing workspace file reader/editor.":"Select a workspace to open workspace files.",onClick:()=>S(!0),children:[(0,a.jsx)(eW.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Workspace Files"]})]})}),(0,a.jsxs)(z,{columns:5,children:[(0,a.jsx)(_,{label:"Total Files",value:String(I.length),detail:o?"Loading workspace files":`${P.length} visible`,icon:eW.A,tone:"info"}),(0,a.jsx)(_,{label:"Core Files",value:String(G),detail:`${Math.round(G/Math.max(1,I.length)*100)}% of total`,icon:t_.A,tone:"success"}),(0,a.jsx)(_,{label:"Generated Outputs",value:String($),detail:"Managed workspace files",icon:e9.A,tone:"purple"}),(0,a.jsx)(_,{label:"Memory Docs",value:String(B),detail:"Durable context",icon:e7.A,tone:"warning"}),(0,a.jsx)(_,{label:"Storage Used",value:th(U),detail:I.some(e=>null!=e.sizeBytes)?"From file metadata":"No file sizes reported",icon:eq.A,tone:"info"})]}),(0,a.jsxs)(F,{search:h,onSearchChange:x,searchPlaceholder:"Search files...",right:(0,a.jsx)(q,{value:v,onChange:j}),children:[(0,a.jsx)(W,{icon:d.A,label:`Collection: ${g}`,active:"All Files"!==g,onClick:()=>b("All Files")}),(0,a.jsx)(W,{icon:tz.A,label:"Workspace managed files",disabled:!0,title:"Only managed workspace files are exposed by the current file API."}),(0,a.jsx)(W,{icon:p.A,label:`Sort: ${"path"===f?"Path":tI(f)}`,chevron:!0,onClick:()=>w(e=>X[(X.indexOf(e)+1)%X.length])})]}),u?(0,a.jsx)("div",{className:"rounded-[10px] border border-amber-300/20 bg-amber-400/10 px-3 py-2.5 text-xs text-amber-100",children:u}):null,(0,a.jsxs)("div",{className:"grid gap-2.5 xl:grid-cols-[180px_minmax(0,1fr)]",children:[(0,a.jsxs)(H,{title:"Collections",action:(0,a.jsx)("button",{className:"text-slate-500",disabled:!0,title:"Custom collections are not exposed by the workspace file API.",children:(0,a.jsx)(eS.A,{className:"h-3.5 w-3.5"})}),children:[(0,a.jsx)("div",{className:"flex flex-col gap-1 p-2.5",children:J.map(e=>{let t=tj[e]??e1.A,s="All Files"===e?I.length:I.filter(t=>t.collection===e).length;return(0,a.jsxs)("button",{type:"button",onClick:()=>b(e),className:(0,M.cn)("flex items-center justify-between gap-2 rounded-[9px] px-2.5 py-2 text-left text-xs transition-colors",g===e?"bg-blue-500/[0.14] text-blue-200":"text-slate-300 hover:bg-white/[0.05] hover:text-white"),children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(t,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e})]}),(0,a.jsx)("span",{className:"text-[0.68rem] text-slate-500",children:s})]},e)})}),(0,a.jsxs)("div",{className:"mt-auto border-t border-white/[0.07] p-3",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between text-[0.68rem] text-slate-400",children:[(0,a.jsx)("span",{children:"Storage"}),(0,a.jsx)("span",{children:I.some(e=>null!=e.sizeBytes)?"Reported":"Unknown"})]}),(0,a.jsx)(Y,{value:I.some(e=>null!=e.sizeBytes)?Math.min(100,U/1e10*100):0}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"mt-3 h-7 w-full rounded-[8px] px-2 text-[0.7rem]",disabled:!0,title:"Storage quota management is not exposed by the current workspace file API.",children:"Manage Storage"})]})]}),(0,a.jsxs)(H,{title:`Files (${I.length})`,children:[o?(0,a.jsx)("div",{className:"p-6 text-center text-xs text-slate-400",children:"Loading workspace files..."}):0===P.length?(0,a.jsx)(Z,{title:"No files found",description:0===I.length?"No managed workspace files were returned by the current workspace file API.":"Clear search or collection filters to inspect another file set."}):"list"===v?(0,a.jsx)(tq,{files:P,selectedId:R?.id,onSelect:N,onPreview:C,onReveal:V}):(0,a.jsx)("div",{className:"grid gap-2.5 p-3 lg:grid-cols-2 2xl:grid-cols-3",children:P.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>N(e.id),className:(0,M.cn)("rounded-[10px] border p-3 text-left hover:bg-white/[0.05]",e.id===R?.id?"border-blue-400/60 bg-blue-500/[0.08]":"border-white/[0.08] bg-white/[0.03]"),children:[(0,a.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block truncate text-xs font-semibold text-white",children:e.name}),(0,a.jsx)("span",{className:"mt-1 block truncate text-[0.68rem] text-slate-500",children:e.path})]})]}),(0,a.jsx)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:e.tags.map(e=>(0,a.jsx)(ee,{children:e},e))})]},e.id))}),(0,a.jsxs)("div",{className:"flex items-center justify-between border-t border-white/[0.07] px-3 py-2.5 text-[0.68rem] text-slate-400",children:[(0,a.jsxs)("span",{children:["Showing ",P.length," of ",I.length," files"]}),(0,a.jsx)("span",{children:"Workspace managed files only"})]})]})]})]}),inspector:R?(0,a.jsx)(tB,{file:R,onReveal:()=>V(R),onPreview:()=>C(R)}):null}),(0,a.jsx)(tE.W,{snapshot:e,workspaceId:t,open:A,onOpenChange:S}),(0,a.jsx)(tH,{file:k,open:!!k,onOpenChange:e=>C(e?k:null),onSaved:()=>{C(null),T(e=>e+1)}})]})}function tq({files:e,selectedId:t,onSelect:s,onPreview:n,onReveal:r}){return(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[700px] text-left text-[0.72rem]",children:[(0,a.jsx)("thead",{className:"border-b border-white/[0.07] text-[0.56rem] uppercase tracking-[0.14em] text-slate-500",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"w-8 px-3 py-2.5",children:(0,a.jsx)("span",{className:"block h-3.5 w-3.5 rounded border border-white/[0.14]"})}),(0,a.jsx)("th",{className:"px-2 py-2.5 font-semibold",children:"Name"}),(0,a.jsx)("th",{className:"px-2 py-2.5 font-semibold",children:"Type"}),(0,a.jsx)("th",{className:"px-2 py-2.5 font-semibold",children:"Last Updated"}),(0,a.jsx)("th",{className:"px-2 py-2.5 font-semibold",children:"Owner / Agent"}),(0,a.jsx)("th",{className:"px-2 py-2.5 font-semibold",children:"Size"}),(0,a.jsx)("th",{className:"px-2 py-2.5 font-semibold",children:"Tags"}),(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-white/[0.06] text-slate-300",children:e.map(e=>(0,a.jsxs)("tr",{onClick:()=>s(e.id),className:(0,M.cn)("cursor-pointer hover:bg-white/[0.035]",e.id===t&&"bg-blue-500/[0.10] outline outline-1 outline-blue-400/50"),children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsx)("span",{className:(0,M.cn)("flex h-3.5 w-3.5 items-center justify-center rounded border",e.id===t?"border-blue-400 bg-blue-500 text-white":"border-white/[0.14]"),children:(0,a.jsx)(tF.A,{className:"h-2.5 w-2.5"})})}),(0,a.jsx)("td",{className:"px-2 py-2.5",children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone,size:"sm"}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block truncate font-semibold text-white",children:e.name}),(0,a.jsxs)("span",{className:"mt-0.5 block truncate text-[0.66rem] text-slate-500",children:[e.workspaceName," \xb7 ",e.path]})]})]})}),(0,a.jsx)("td",{className:"px-2 py-2.5",children:(0,a.jsx)(ee,{children:e.type})}),(0,a.jsx)("td",{className:"px-2 py-2.5",children:e.updatedLabel}),(0,a.jsx)("td",{className:"px-2 py-2.5",children:(0,a.jsx)("span",{className:"line-clamp-2 max-w-24",children:e.owner})}),(0,a.jsx)("td",{className:"px-2 py-2.5",children:e.sizeLabel}),(0,a.jsx)("td",{className:"px-2 py-2.5",children:(0,a.jsx)("div",{className:"flex max-w-28 flex-wrap gap-1",children:e.tags.slice(0,2).map(e=>(0,a.jsx)(ee,{children:e},e))})}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:!e.source?.exists,title:e.source?.exists?"Read this managed workspace file.":"File is not created yet.",onClick:t=>{t.stopPropagation(),n(e)},children:"Preview"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:!e.workspacePath,title:e.workspacePath?"Reveal this file in Finder.":"Reveal requires a workspace path.",onClick:t=>{t.stopPropagation(),r(e)},children:"Reveal"})]})})]},e.id))})]})})}function tB({file:e,onReveal:t,onPreview:s}){return(0,a.jsxs)(G,{children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone,size:"lg"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"truncate text-base font-semibold text-white",children:e.name}),(0,a.jsxs)("div",{className:"mt-1.5 flex gap-1.5",children:[(0,a.jsx)(ee,{children:e.type}),(0,a.jsx)(ee,{children:e.sizeLabel})]})]})]}),(0,a.jsx)(Q,{})]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[(0,a.jsxs)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 px-2 text-xs text-white hover:bg-blue-400",onClick:t,children:[(0,a.jsx)(h.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Open"]}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:!e.source?.exists,title:e.source?.exists?"Read this managed workspace file.":"File is not created yet.",onClick:s,children:"Preview"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:!0,title:"Additional file actions require backend support.",children:"More"})]}),(0,a.jsx)("div",{className:"mt-3 border-b border-white/[0.08] px-3 py-2.5 text-xs text-blue-200",children:"Details"}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-3 rounded-[10px] border border-white/[0.08] bg-white/[0.03] px-3",children:[(0,a.jsx)(X,{label:"File Path",value:e.path}),(0,a.jsx)(X,{label:"Type",value:e.type}),(0,a.jsx)(X,{label:"Size",value:e.sizeLabel}),(0,a.jsx)(X,{label:"Last Updated",value:e.updatedLabel}),(0,a.jsx)(X,{label:"Workspace",value:e.workspaceName}),(0,a.jsx)(X,{label:"Owner / Agent",value:e.owner}),(0,a.jsx)(X,{label:"Workspace API",value:e.source?"Managed file":"Not reported"})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-[0.58rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:"Tags"}),(0,a.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:e.tags.map(e=>(0,a.jsx)(ee,{children:e},e))})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("p",{className:"text-[0.58rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:"Description"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs leading-5 text-slate-300",children:e.source?.description??"Workspace context file managed by AgentOS and OpenClaw."})]})]}),(0,a.jsx)(H,{title:"Quick Actions",className:"mt-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-2.5",children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:!0,title:"Share requires backend support.",children:"Share"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:!0,title:"Context selection persistence is not exposed by the workspace file API.",children:"Add to Context"}),(0,a.jsx)(O.$,{variant:"destructive",size:"sm",className:"col-span-2 h-8 rounded-[9px] px-2 text-xs",disabled:!0,title:"Trash/delete is not exposed by the workspace file API.",children:"Move to Trash"})]})})]})}function tH({file:e,open:t,onOpenChange:s,onSaved:r}){let[l,i]=(0,n.useState)(""),[o,c]=(0,n.useState)(""),[d,p]=(0,n.useState)(!1),[u,m]=(0,n.useState)(!1),[h,x]=(0,n.useState)(null),g=!!(e?.workspaceId&&e?.source?.exists),b=!!(e?.workspaceId&&e?.source?.editable&&l!==o&&!d&&!u);(0,n.useEffect)(()=>{if(!t||!e){i(""),c(""),x(null);return}if(!g)return void x("This file cannot be read because it is not created yet or is not attached to a workspace.");let s=!1;return p(!0),x(null),(async()=>{try{let t=await fetch(`/api/workspaces/${encodeURIComponent(e.workspaceId??"")}/files?path=${encodeURIComponent(e.relativePath)}`,{cache:"no-store"}),a=await t.json();if(!t.ok||a.error)throw Error(a.error||"Workspace file could not be read.");s||(i(a.content),c(a.content))}catch(e){s||x(tk(e))}finally{s||p(!1)}})(),()=>{s=!0}},[g,e,t]);let f=async()=>{if(!e?.workspaceId)return void x("This file is not attached to a workspace.");m(!0),x(null);try{let t=await fetch(`/api/workspaces/${encodeURIComponent(e.workspaceId)}/files`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e.relativePath,content:l})}),s=await t.json();if(!t.ok||s.error)throw Error(s.error||"Workspace file could not be saved.");c(s.content),i(s.content),el.o.success("Workspace file saved."),r()}catch(e){x(tk(e))}finally{m(!1)}};return(0,a.jsx)(en.lG,{open:t,onOpenChange:s,children:(0,a.jsxs)(en.Cf,{className:"flex h-[min(82dvh,780px)] max-w-4xl flex-col rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:e?.name??"Workspace File"}),(0,a.jsx)(en.rr,{children:"Reads and saves through the existing workspace file API with workspace path safety checks."})]}),h?(0,a.jsx)("div",{className:"rounded-[10px] border border-rose-300/20 bg-rose-400/10 px-3 py-2 text-xs text-rose-100",children:h}):null,(0,a.jsx)(ei.T,{value:l,onChange:e=>i(e.target.value),readOnly:d||u||!e?.source?.editable,placeholder:d?"Loading workspace file...":"File content",className:"min-h-0 flex-1 resize-none rounded-[12px] border-white/[0.10] bg-slate-950/50 font-mono text-xs leading-5 text-slate-100"}),(0,a.jsxs)(en.Es,{children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:()=>s(!1),children:"Close"}),(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:!b,title:e?.source?.editable?"Save this managed workspace file.":"This managed file is read-only.",onClick:()=>void f(),children:u?"Saving...":"Save"})]})]})})}var tG=s(22937),tJ=s(6734),tK=s(8087),tX=s(38958);function tY({snapshot:e,rootSnapshot:t,activeWorkspaceId:s,refresh:r,setSnapshot:l}){let i=(0,n.useMemo)(()=>{let t,s,a,n,r,l,i;return(t=(0,te.hv)(e.generatedAt),s=Date.parse(e.generatedAt),a=new Map(e.workspaces.map(e=>[e.id,e.name])),n=new Map(e.agents.map(e=>[e.id,e])),r=function(e){let t=new Map;for(let s of e){let e=tr(s.type);t.set(e,[...t.get(e)??[],s])}return t}(e.channelRegistry.channels),l=function(e){let t=new Map;for(let s of e){let e=tr(s.type);t.set(e,[...t.get(e)??[],s])}return t}(e.channelAccounts),i=function(e){let t=new Map;for(let s of e){let e=to(s.provider||s.id);t.set(e,[...t.get(e)??[],s])}return t}(e.models),tn.map(o=>{let c=["integrationRegistry"];o.surfaceProvider&&c.push("OPENCLAW_SURFACE_CATALOG");let d=o.surfaceProvider?r.get(tr(o.surfaceProvider))??[]:[],p=o.surfaceProvider?l.get(tr(o.surfaceProvider))??[]:[],u=o.modelProvider?i.get(o.modelProvider)??[]:[];p.length>0&&c.push("snapshot.channelAccounts"),d.length>0&&c.push("snapshot.channelRegistry.channels"),u.length>0&&c.push("snapshot.models");let m=function(e){let t=new Map;for(let s of e.channels){let a=new Set;for(let e of(s.primaryAgentId&&a.add(s.primaryAgentId),s.workspaces)){for(let t of e.agentIds)a.add(t);for(let t of e.groupAssignments)t.agentId&&a.add(t.agentId)}for(let n of a){let a=e.agentsById.get(n);a&&t.set(a.id,ti(a,e.workspaceNameById,`Workspace surface: ${s.name}`))}}if(e.descriptor.modelProvider)for(let s of e.agents)to(s.modelId)===e.descriptor.modelProvider&&t.set(s.id,ti(s,e.workspaceNameById,`Model route: ${s.modelId}`));if(e.descriptor.toolHints?.length){let s=RegExp(e.descriptor.toolHints.map(tc).join("|"),"i");for(let a of e.agents){let n=[...a.tools,...a.observedTools??[]].join(" ");(s.test(n)||s.test(a.policy.preset)||s.test(a.name))&&t.set(a.id,ti(a,e.workspaceNameById,"Agent tool configuration"))}}return Array.from(t.values()).sort((e,t)=>e.name.localeCompare(t.name))}({descriptor:o,channels:d,models:u,agents:e.agents,agentsById:n,workspaceNameById:a});m.length>0&&c.push("snapshot.agents");let h=function(e){let{descriptor:t,accounts:s,channels:a,models:n,linkedAgents:r,snapshot:l}=e,i=function(e){for(let t of e){let e=t.metadata??{},s=function(e,t){for(let s of t){let t=e[s];if("string"==typeof t&&t.trim())return t.trim()}return null}(e,["lastError","error","healthError","reason"])??("string"==typeof e.healthState&&/fail|error/i.test(e.healthState)?e.healthState:null);if(s)return s}return null}(s);if("unsupported"===t.managedBy)return{status:"unsupported",connectionHealth:{label:"Unsupported",detail:t.configure.reason},missingConfiguration:t.setupRequirements,errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!1};if(!l.diagnostics.installed)return{status:"unknown",connectionHealth:{label:"OpenClaw not installed",detail:"AgentOS cannot resolve live integration state until OpenClaw is installed."},missingConfiguration:["OpenClaw installation"],errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!1};if(i)return{status:"failed",connectionHealth:{label:"OpenClaw reported an error",detail:i},missingConfiguration:[],errorMessage:i,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!0};if(t.modelProvider){var o=t,c=n,d=l;if(0===c.length)return{status:"ollama"===o.modelProvider?"pending-setup":"missing-credentials",connectionHealth:{label:"ollama"===o.modelProvider?"No local models detected":"No configured model routes",detail:"ollama"===o.modelProvider?"Ollama may be installed, but this snapshot does not include any local Ollama model routes.":"Connect the provider and add at least one model route in the existing Add Models flow."},missingConfiguration:o.setupRequirements,errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!1};if(c.every(e=>e.missing||!1===e.available))return{status:"failed",connectionHealth:{label:"Configured routes unavailable",detail:"OpenClaw returned model routes for this provider, but none are currently available."},missingConfiguration:[],errorMessage:"Configured model routes are missing or unavailable.",uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!0};let e=d.diagnostics.modelReadiness.resolvedDefaultModel??d.diagnostics.modelReadiness.defaultModel;return{status:"connected",connectionHealth:{label:e&&to(e)===o.modelProvider?"Connected and default-capable":"Connected",detail:`${c.length} configured model route${1===c.length?"":"s"} found in the OpenClaw model snapshot.`},missingConfiguration:[],errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Provider-specific limits are not exposed in the snapshot",hasOperationalData:!0}}return"tool"===t.providerType?r.length>0?{status:"connected",connectionHealth:{label:"Configured on agents",detail:"This state is inferred from real agent tool declarations and runtime tool metadata."},missingConfiguration:[],errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!0}:{status:"unknown",connectionHealth:{label:"No linked agent tools",detail:"No agent currently declares or recently used a matching tool."},missingConfiguration:t.setupRequirements,errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!1}:s.length>0&&s.every(e=>!1===e.enabled)?{status:"disabled",connectionHealth:{label:"Disabled in OpenClaw config",detail:"The integration account exists but is disabled."},missingConfiguration:[],errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!0}:s.some(e=>!1!==e.enabled)?{status:"unknown",connectionHealth:{label:"Configured, not verified",detail:"OpenClaw configuration exists, but this snapshot does not include a live connector health probe. Use Reconnect to run channels.status."},missingConfiguration:[],errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!0}:a.length>0?{status:"unknown",connectionHealth:{label:"Workspace binding found",detail:"A workspace binding exists, but OpenClaw account configuration was not returned in the snapshot."},missingConfiguration:t.setupRequirements,errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!0}:{status:t.surfaceProvider?"missing-credentials":"pending-setup",connectionHealth:{label:"Not configured",detail:"No OpenClaw account, workspace binding, or runtime state was found for this integration."},missingConfiguration:t.setupRequirements,errorMessage:null,uptimeLabel:"Unavailable",rateLimitLabel:"Unavailable",hasOperationalData:!1}}({descriptor:o,accounts:p,channels:d,models:u,linkedAgents:m,snapshot:e}),x=h.hasOperationalData&&Number.isFinite(s)?s:null;return{id:o.id,name:o.name,category:o.category,description:o.description,managedBy:o.managedBy,providerType:o.providerType,surfaceProvider:o.surfaceProvider??null,modelProvider:o.modelProvider??null,status:h.status,statusLabel:tl[h.status],connectionHealth:h.connectionHealth,lastSyncLabel:x?`Snapshot ${(0,te.fw)(x,t)}`:"Unavailable",lastActiveMs:x,uptimeLabel:h.uptimeLabel,rateLimitLabel:h.rateLimitLabel,linkedAgents:m,linkedAgentCount:m.length,permissions:o.permissions,setupRequirements:o.setupRequirements,missingConfiguration:h.missingConfiguration,sourceMethods:Array.from(new Set(c.filter(Boolean))),accountIds:p.map(e=>e.id),channelIds:d.map(e=>e.id),modelIds:u.map(e=>e.id),errorMessage:h.errorMessage,docsUrl:o.docsUrl??null,actionSupport:{configure:o.configure,reconnect:o.reconnect,disable:o.disable},source:p[0]}})).map(e=>{let t=tp[e.id]??{icon:eK.A,iconTone:"muted"};return{...e,...t,statusTone:td[e.status]}})},[e]),[o,c]=(0,n.useState)({}),[d,u]=(0,n.useState)(""),[m,h]=(0,n.useState)("All Categories"),[x,b]=(0,n.useState)("All Statuses"),[f,w]=(0,n.useState)("last-active"),[v,y]=(0,n.useState)("grid"),[N,k]=(0,n.useState)(i[0]?.id??""),[C,A]=(0,n.useState)(null),[S,L]=(0,n.useState)(!1),[O,T]=(0,n.useState)(!1),[I,P]=(0,n.useState)(!1),[R,U]=(0,n.useState)(!1),[$,B]=(0,n.useState)(null),[H,G]=(0,n.useState)(null),J=(0,n.useMemo)(()=>i.map(e=>{let t=o[e.id];if(!t)return e;let s=t.status?{status:t.status,statusLabel:t.statusLabel??e.statusLabel,statusTone:t.statusTone??ty[t.status]}:{};return{...e,...t,...s,sourceMethods:Array.from(new Set([...e.sourceMethods,...t.sourceMethods??[]]))}}),[i,o]),K=["All Categories",...Array.from(new Set(J.map(e=>e.category)))],X=["All Statuses","connected","unknown","pending-setup","missing-credentials","needs-authentication","failed","disabled","unsupported"],Y=["last-active","name","status","category"],V=J.filter(e=>{let t=d.trim().toLowerCase(),s=!t||[e.name,e.category,e.description,e.statusLabel,e.managedBy,e.providerType,e.permissions.join(" "),e.setupRequirements.join(" ")].join(" ").toLowerCase().includes(t),a="All Categories"===m||e.category===m,n="All Statuses"===x||e.status===x;return s&&a&&n}).sort((e,t)=>(function(e,t,s){if("name"===s)return e.name.localeCompare(t.name);if("status"===s)return e.statusLabel.localeCompare(t.statusLabel)||e.name.localeCompare(t.name);if("category"===s)return e.category.localeCompare(t.category)||e.name.localeCompare(t.name);let a=e.lastActiveMs??0;return(t.lastActiveMs??0)-a||e.name.localeCompare(t.name)})(e,t,f)),Q=V.find(e=>e.id===N)??V[0]??null,ee=V.filter(e=>"connected"===e.status).length,et=V.filter(e=>"pending-setup"===e.status||"missing-credentials"===e.status||"needs-authentication"===e.status).length,es=V.filter(e=>"failed"===e.status).length,ea=(e=null)=>{s?(G(e),P(!0)):el.o.error("Select a workspace before configuring workspace surfaces.",{description:"All Workspaces is read-only for surface setup. Pick a workspace from the sidebar first."})},en=(e=null)=>{B(e),U(!0)},er=e=>{e.actionSupport.configure.supported?e.modelProvider?en(e.modelProvider):e.surfaceProvider?ea(e.surfaceProvider):el.o.message("No setup flow is wired for this integration.",{description:e.actionSupport.configure.reason}):el.o.message("Configure is not available.",{description:e.actionSupport.configure.reason})},ei=async e=>{if(!e.actionSupport.reconnect.supported)return void el.o.message("Reconnect is not available.",{description:e.actionSupport.reconnect.reason});A(`${e.id}:reconnect`);try{if(e.modelProvider){let t=await fetch("/api/models/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"status",provider:e.modelProvider,includeSnapshot:!0})}),s=await t.json().catch(()=>null);if(!t.ok||!s)throw Error(s?.error||"Model provider status check failed.");s.snapshot&&l(s.snapshot);let a=s.connection?.connected?"connected":"ollama"===e.modelProvider?"pending-setup":"missing-credentials";c(t=>({...t,[e.id]:{status:a,statusLabel:tN(a),statusTone:ty[a],connectionHealth:{label:s.connection?.connected?"Provider status verified":"Provider not connected",detail:s.connection?.detail??s.message??"Provider status was refreshed through /api/models/providers."},lastSyncLabel:"Checked just now",sourceMethods:["/api/models/providers"]}})),el.o.message(s.connection?.connected?"Provider is ready.":"Provider needs setup.",{description:s.connection?.detail??s.message});return}if(e.surfaceProvider){let t=await fetch(`/api/integrations/${encodeURIComponent(e.id)}/status`,{method:"POST",headers:{"Content-Type":"application/json"}}),s=await t.json().catch(()=>null),a=s?.status;if(!t.ok||!a)throw Error(s?.error||"Integration status check failed.");c(t=>({...t,[e.id]:{status:a,statusLabel:s.statusLabel??tN(a),statusTone:ty[a],connectionHealth:s.connectionHealth??{label:tN(a),detail:"OpenClaw channel status was refreshed."},lastSyncLabel:s.lastSyncLabel??"Checked just now",uptimeLabel:s.uptimeLabel,rateLimitLabel:s.rateLimitLabel,errorMessage:s.errorMessage,sourceMethods:s.sourceMethods}})),el.o.message("connected"===s.status?"Integration status verified.":"Status check completed.",{description:s.connectionHealth?.detail});return}el.o.message("Reconnect is not wired for this integration.",{description:e.actionSupport.reconnect.reason})}catch(s){let t=tk(s);c(s=>({...s,[e.id]:{status:"unknown",statusLabel:"Unknown",statusTone:"muted",connectionHealth:{label:"Status check failed",detail:t},lastSyncLabel:"Check failed",errorMessage:t}})),el.o.error("Reconnect failed.",{description:t})}finally{A(null)}},eo=async e=>{if(!e.actionSupport.disable.supported)return void el.o.message("Disable is not available.",{description:e.actionSupport.disable.reason});if(!s)return void el.o.error("Select a workspace before disabling a surface.",{description:"All Workspaces cannot safely remove a workspace-specific binding."});if(0===e.channelIds.length)return void el.o.message("No workspace binding found.",{description:"There is no AgentOS workspace surface binding to disconnect."});A(`${e.id}:disable`);try{for(let t of e.channelIds){let e=await fetch(`/api/workspaces/${encodeURIComponent(s)}/channels`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({channelId:t,scope:"workspace"})}),a=await e.json().catch(()=>null);if(!e.ok)throw Error(a?.error||`Unable to disconnect ${t}.`)}await r(),c(t=>({...t,[e.id]:{status:"disabled",statusLabel:"Disabled",statusTone:"muted",connectionHealth:{label:"Disconnected from workspace",detail:"The workspace surface binding was removed through the channels API."},lastSyncLabel:"Updated just now",sourceMethods:["/api/workspaces/[workspaceId]/channels DELETE"]}})),el.o.success(`${e.name} disconnected from this workspace.`)}catch(e){el.o.error("Disable failed.",{description:tk(e)})}finally{A(null)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{main:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{title:"Integrations",subtitle:"Connect channels, tools, and external systems to extend AgentOS capabilities and power automations.",secondaryAction:{label:"Import Integration",icon:eA.A,onClick:()=>T(!0)},primaryAction:{label:"Add Integration",icon:eS.A,onClick:()=>L(!0)}}),(0,a.jsxs)(F,{search:d,onSearchChange:u,searchPlaceholder:"Search integrations...",right:(0,a.jsx)(q,{value:v,onChange:y}),children:[(0,a.jsx)(W,{icon:tG.A,label:m,chevron:!0,onClick:()=>h(e=>K[(K.indexOf(e)+1)%K.length])}),(0,a.jsx)(W,{icon:tJ.A,label:"All Statuses"===x?x:tN(x),chevron:!0,onClick:()=>b(e=>X[(X.indexOf(e)+1)%X.length])}),(0,a.jsx)(W,{icon:p.A,label:`Sort: ${function(e){switch(e){case"last-active":return"Last active";case"name":return"Name";case"status":return"Status";case"category":return"Category"}}(f)}`,chevron:!0,onClick:()=>w(e=>Y[(Y.indexOf(e)+1)%Y.length])})]}),(0,a.jsxs)(z,{columns:5,children:[(0,a.jsx)(_,{label:"Total Integrations",value:String(V.length),detail:`${J.length} registered`,icon:tK.A,tone:"info"}),(0,a.jsx)(_,{label:"Connected",value:String(ee),detail:`${Math.round(ee/Math.max(1,V.length)*100)}% of filtered`,icon:eI.A,tone:"success"}),(0,a.jsx)(_,{label:"Pending Setup",value:String(et),detail:"Needs setup or credentials",icon:j.A,tone:"warning"}),(0,a.jsx)(_,{label:"Failed",value:String(es),detail:"Real errors only",icon:g.A,tone:"danger"}),(0,a.jsx)(_,{label:"Automations Using",value:"-",detail:"Metrics unavailable from snapshot",icon:eG.A,tone:"purple"})]}),0===V.length?(0,a.jsx)(Z,{title:"No integrations match",description:"Adjust search, category, or status filters to inspect another integration set."}):(0,a.jsx)("div",{className:"space-y-3",children:Array.from(new Set(V.map(e=>e.category))).map(e=>(0,a.jsxs)("section",{children:[(0,a.jsxs)("h2",{className:"mb-2 text-[0.62rem] font-bold uppercase tracking-[0.16em] text-slate-500",children:[e," (",V.filter(t=>t.category===e).length,")"]}),(0,a.jsx)("div",{className:(0,M.cn)("grid"===v?"grid gap-2.5 lg:grid-cols-2 min-[1400px]:grid-cols-3":"flex flex-col gap-2.5"),children:V.filter(t=>t.category===e).map(e=>(0,a.jsx)(tV,{integration:e,selected:e.id===Q?.id,list:"list"===v,actionBusy:C?.startsWith(`${e.id}:`)??!1,onSelect:()=>k(e.id),onConfigure:()=>er(e),onReconnect:()=>void ei(e)},e.id))})]},e))}),(0,a.jsx)(tZ,{integrations:J})]}),inspector:Q?(0,a.jsx)(tQ,{integration:Q,actionBusy:C?.startsWith(`${Q.id}:`)??!1,activeWorkspaceId:s,onConfigure:()=>er(Q),onReconnect:()=>void ei(Q),onDisable:()=>void eo(Q)}):null}),(0,a.jsx)(t0,{open:S,integrations:J,onOpenChange:L,onSelect:e=>{L(!1),er(e)}}),(0,a.jsx)(t1,{open:O,onOpenChange:T,onOpenSurfaceSetup:()=>{T(!1),ea(null)},onOpenModelSetup:()=>{T(!1),en(null)}}),(0,a.jsx)(tX._,{snapshot:t,workspaceId:s,open:I,initialProvider:H,onOpenChange:P,onRefresh:r,onSnapshotChange:e=>l(t=>e(t))}),(0,a.jsx)(eU.o,{open:R,onOpenChange:U,snapshot:t,initialProvider:$,onSnapshotChange:l})]})}function tV({integration:e,selected:t,list:s,actionBusy:n,onSelect:r,onConfigure:l,onReconnect:i}){return(0,a.jsx)("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),r())},className:(0,M.cn)("rounded-[12px] border p-3 text-left transition-all hover:bg-white/[0.055] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300/40",I,t&&"border-blue-400/70 bg-blue-500/[0.08]"),children:(0,a.jsxs)("div",{className:(0,M.cn)("flex gap-3",s?"items-center":"items-start"),children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone,size:"lg"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"truncate text-[0.88rem] font-semibold text-white",children:e.name}),(0,a.jsx)("p",{className:"mt-1 truncate text-[0.68rem] text-slate-400",children:e.connectionHealth.label}),(0,a.jsxs)("p",{className:"mt-1 text-[0.68rem] text-slate-400",children:["Linked: ",e.linkedAgentCount," agents"]})]}),(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone})]}),(0,a.jsxs)("div",{className:"mt-2.5 flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap gap-1.5",children:[(0,a.jsx)(ee,{children:e.category.split(" ")[0]}),(0,a.jsx)(ee,{children:e.managedBy})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2",disabled:n||!e.actionSupport.configure.supported,title:e.actionSupport.configure.reason,onClick:e=>{e.stopPropagation(),l()},children:(0,a.jsx)(c.A,{className:"h-3 w-3"})}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2",disabled:n||!e.actionSupport.reconnect.supported,title:e.actionSupport.reconnect.reason,onClick:e=>{e.stopPropagation(),i()},children:(0,a.jsx)(u.A,{className:(0,M.cn)("h-3 w-3",n&&"animate-spin")})}),(0,a.jsx)(Q,{})]})]})]})]})})}function tQ({integration:e,actionBusy:t,activeWorkspaceId:s,onConfigure:n,onReconnect:r,onDisable:l}){var i;let o=tv[e.status],c=s?e.actionSupport.disable.reason:"Select a workspace before disabling workspace-specific surface bindings.";return(0,a.jsxs)(G,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone,size:"lg"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-white",children:e.name}),(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone,className:"mt-1.5"})]}),(0,a.jsx)(Q,{})]}),(0,a.jsx)(ee,{children:e.category}),(0,a.jsx)("p",{className:"mt-2.5 text-xs leading-5 text-slate-300",children:e.description})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2",children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:t||!e.actionSupport.reconnect.supported,title:e.actionSupport.reconnect.reason,onClick:r,children:[(0,a.jsx)(u.A,{className:(0,M.cn)("mr-1.5 h-3.5 w-3.5",t&&"animate-spin")}),"Reconnect"]}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:t||!e.actionSupport.configure.supported,title:e.actionSupport.configure.reason,onClick:n,children:"Configure"}),(0,a.jsx)(O.$,{variant:"destructive",size:"sm",className:"h-8 rounded-[9px] px-2 text-xs",disabled:t||!e.actionSupport.disable.supported||!s,title:c,onClick:l,children:"Disable"})]}),(0,a.jsx)(H,{title:"Connection Health",className:"mt-3",children:(0,a.jsxs)("div",{className:"px-3 py-2.5",children:[(0,a.jsx)(X,{label:"Health",value:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(o,{className:(0,M.cn)("h-3.5 w-3.5","connected"===(i=e.status)?"text-emerald-300":"failed"===i?"text-red-300":"pending-setup"===i||"missing-credentials"===i||"needs-authentication"===i?"text-amber-300":"text-slate-400")}),e.connectionHealth.label]})}),(0,a.jsx)(X,{label:"Last sync",value:e.lastSyncLabel}),(0,a.jsx)(X,{label:"Uptime",value:e.uptimeLabel}),(0,a.jsx)(X,{label:"Rate limit",value:e.rateLimitLabel}),(0,a.jsx)(X,{label:"Source",value:e.sourceMethods.join(", ")}),(0,a.jsx)("p",{className:"border-t border-white/[0.07] py-2 text-xs leading-5 text-slate-400",children:e.connectionHealth.detail}),(0,a.jsx)(Y,{value:"connected"===e.status?84:"failed"===e.status?8:28,tone:e.statusTone})]})}),(0,a.jsx)(H,{title:"Scopes / Permissions",className:"mt-3",children:(0,a.jsx)("div",{className:"space-y-1.5 p-3 text-xs text-slate-300",children:e.permissions.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)(eI.A,{className:"h-3.5 w-3.5 text-emerald-300"}),e]},e))})}),(0,a.jsx)(H,{title:`Linked Agents (${e.linkedAgentCount})`,className:"mt-3",children:(0,a.jsx)("div",{className:"divide-y divide-white/[0.07] px-3",children:e.linkedAgents.length>0?e.linkedAgents.map(e=>(0,a.jsxs)("div",{className:"py-2.5 text-xs",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"truncate text-slate-200",children:e.name}),(0,a.jsx)("span",{className:"shrink-0 text-slate-500",children:e.workspaceName})]}),(0,a.jsx)("p",{className:"mt-1 truncate text-[0.66rem] text-slate-500",children:e.reason})]},e.id)):(0,a.jsx)("div",{className:"py-3 text-xs text-slate-500",children:"unsupported"===e.managedBy?"Linkage unavailable until this connector exists.":"No linked agents found in the current workspace snapshot."})})}),(0,a.jsx)(H,{title:"Setup Notes",className:"mt-3",children:(0,a.jsxs)("div",{className:"space-y-2 p-3 text-xs leading-5 text-slate-300",children:[(0,a.jsx)(X,{label:"Managed by",value:function(e){switch(e){case"openclaw":return"OpenClaw";case"agentos":return"AgentOS";case"external-config":return"External config";case"unsupported":return"Unsupported"}}(e.managedBy)}),(0,a.jsx)(X,{label:"Provider type",value:e.providerType}),(0,a.jsx)(X,{label:"Accounts",value:e.accountIds.length?e.accountIds.join(", "):"None"}),(0,a.jsx)(X,{label:"Channels",value:e.channelIds.length?e.channelIds.join(", "):"None"}),(0,a.jsx)(X,{label:"Models",value:e.modelIds.length?e.modelIds.join(", "):"None"}),e.errorMessage?(0,a.jsx)("p",{className:"rounded-[9px] border border-red-400/20 bg-red-500/10 p-2 text-red-200",children:e.errorMessage}):null,e.missingConfiguration.length>0?(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[0.62rem] font-semibold uppercase tracking-[0.14em] text-slate-500",children:"Required setup"}),(0,a.jsx)("div",{className:"mt-1 flex flex-wrap gap-1.5",children:e.missingConfiguration.map(e=>(0,a.jsx)(ee,{children:e},e))})]}):null,(0,a.jsxs)("div",{className:"rounded-[9px] border border-white/[0.07] bg-white/[0.03] p-2 text-slate-400",children:[(0,a.jsxs)("p",{children:["Configure: ",e.actionSupport.configure.reason]}),(0,a.jsxs)("p",{children:["Reconnect: ",e.actionSupport.reconnect.reason]}),(0,a.jsxs)("p",{children:["Disable: ",e.actionSupport.disable.reason]})]})]})})]})}function tZ({integrations:e}){let t=e.filter(e=>"connected"===e.status),s=e.filter(e=>e.linkedAgentCount>0).sort((e,t)=>t.linkedAgentCount-e.linkedAgentCount);return(0,a.jsx)(H,{title:"Automation Impact Summary",children:(0,a.jsxs)("div",{className:"grid gap-2.5 p-3 lg:grid-cols-[repeat(4,minmax(0,1fr))_1.4fr_0.8fr]",children:[(0,a.jsx)(tA,{icon:eG.A,label:"Automations",value:"-",detail:"OpenClaw metric unavailable",tone:"info"}),(0,a.jsx)(tA,{icon:eM.A,label:"Triggers fired",value:"-",detail:"OpenClaw metric unavailable",tone:"success"}),(0,a.jsx)(tA,{icon:eJ.A,label:"Actions executed",value:"-",detail:"OpenClaw metric unavailable",tone:"purple"}),(0,a.jsx)(tA,{icon:eT.A,label:"Success rate",value:"-",detail:"OpenClaw metric unavailable",tone:"success"}),(0,a.jsxs)("div",{className:"rounded-[10px] border border-white/[0.08] bg-white/[0.03] p-2.5",children:[(0,a.jsx)("p",{className:"mb-2.5 text-[0.58rem] font-semibold uppercase tracking-[0.14em] text-slate-500",children:"Top linked integrations"}),s.slice(0,3).map(e=>(0,a.jsxs)("div",{className:"mb-2 grid grid-cols-[80px_1fr_auto] items-center gap-2 text-[0.68rem]",children:[(0,a.jsx)("span",{className:"truncate text-slate-300",children:e.name}),(0,a.jsx)(Y,{value:Math.min(100,20+18*e.linkedAgentCount)}),(0,a.jsxs)("span",{className:"text-slate-500",children:[e.linkedAgentCount," agents"]})]},e.id)),0===s.length?(0,a.jsx)("p",{className:"text-[0.68rem] text-slate-500",children:"No linked integrations found in the current snapshot."}):null]}),(0,a.jsxs)("div",{className:"rounded-[10px] border border-white/[0.08] bg-white/[0.03] p-2.5",children:[(0,a.jsx)("p",{className:"mb-2.5 text-[0.58rem] font-semibold uppercase tracking-[0.14em] text-slate-500",children:"Recently observed"}),t.slice(0,3).map(e=>(0,a.jsxs)("div",{className:"flex justify-between gap-2 py-1 text-[0.68rem]",children:[(0,a.jsx)("span",{className:"text-slate-300",children:e.name}),(0,a.jsx)("span",{className:"text-slate-500",children:e.lastSyncLabel})]},e.id)),0===t.length?(0,a.jsx)("p",{className:"text-[0.68rem] text-slate-500",children:"No verified connected integrations yet."}):null]})]})})}function t0({open:e,integrations:t,onOpenChange:s,onSelect:n}){return(0,a.jsx)(en.lG,{open:e,onOpenChange:s,children:(0,a.jsxs)(en.Cf,{className:"max-w-3xl rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:"Add Integration"}),(0,a.jsx)(en.rr,{children:"Choose a real AgentOS/OpenClaw setup path. Unsupported connectors are shown with their blocking reason."})]}),(0,a.jsx)("div",{className:"grid max-h-[62vh] gap-2 overflow-y-auto pr-1 sm:grid-cols-2",children:t.map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>n(e),className:(0,M.cn)("rounded-[12px] border p-3 text-left transition hover:bg-white/[0.06]",I,!e.actionSupport.configure.supported&&"opacity-70"),children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(K,{icon:e.icon,label:e.name,tone:e.iconTone}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-white",children:e.name}),(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone})]}),(0,a.jsx)("p",{className:"mt-1 line-clamp-2 text-xs leading-5 text-slate-400",children:e.description}),(0,a.jsx)("p",{className:"mt-2 text-[0.68rem] text-slate-500",children:e.actionSupport.configure.reason})]})]})},e.id))})]})})}function t1({open:e,onOpenChange:t,onOpenSurfaceSetup:s,onOpenModelSetup:n}){return(0,a.jsx)(en.lG,{open:e,onOpenChange:t,children:(0,a.jsxs)(en.Cf,{className:"max-w-xl rounded-[18px] border-white/[0.10] bg-[#08111f]/95 p-4",children:[(0,a.jsxs)(en.c7,{children:[(0,a.jsx)(en.L3,{children:"Import Integration"}),(0,a.jsx)(en.rr,{children:"Secure bulk import is not available because this codebase does not expose a credential import contract or secret store handoff."})]}),(0,a.jsx)("div",{className:"rounded-[12px] border border-amber-300/20 bg-amber-400/10 p-3 text-xs leading-5 text-amber-100",children:"Importing tokens, OAuth secrets, bot credentials, or webhook secrets from the browser would expose sensitive values. Use the existing setup flows so OpenClaw handles credentials through its supported config paths."}),(0,a.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,a.jsx)(O.$,{className:"h-9 rounded-[9px] bg-blue-500 text-white hover:bg-blue-400",onClick:s,children:"Open Surface Setup"}),(0,a.jsx)(O.$,{variant:"secondary",className:"h-9 rounded-[9px]",onClick:n,children:"Open Model Setup"})]})]})})}var t2=s(23169);function t5({snapshot:e,rootSnapshot:t,refresh:s,setSnapshot:r}){let l=(0,n.useMemo)(()=>(function(e){if(0===e.models.length)return[];let t=e.diagnostics.modelReadiness.resolvedDefaultModel??e.diagnostics.modelReadiness.defaultModel;return e.models.map(e=>{var s,a,n,r;let l,i;return{id:e.id,name:e.name||e.id,provider:(s=e.provider)?"openai"===s?"OpenAI":"openrouter"===s?"OpenRouter":tf(s.replace(/[-_]/g," ")):"Unknown",statusLabel:e.local?"Local":e.missing||!1===e.available?"Unavailable":"Healthy",statusTone:e.missing||!1===e.available?"danger":e.local?"info":"success",latencyLabel:"Not reported",contextLabel:(0,te.FO)(e.contextWindow),costLabel:"Not reported",rateLimitLabel:"Not reported",role:(a=e,n=t,l=new Set(a.tags.map(e=>e.toLowerCase())),a.id===n||l.has("default")||l.has("primary")?"Primary":l.has("fallback")?"Fallback":l.has("experimental")||l.has("preview")||l.has("beta")?"Experimental":"Secondary"),lastActiveLabel:e.usageCount>0?`${e.usageCount} use${1===e.usageCount?"":"s"}`:"Not reported",capabilities:((i=(r=e).input.split(/[+,/|]+/).map(e=>e.trim()).filter(Boolean).map(e=>"image"===e?"Vision":tf(e))).push(...r.tags.map(tf)),Array.from(new Set(i))),source:e}})})(e),[e]),[i,o]=(0,n.useState)(""),[c,u]=(0,n.useState)("All Providers"),[m,h]=(0,n.useState)("provider"),[x,g]=(0,n.useState)(l[0]?.id??""),[b,f]=(0,n.useState)("Details"),[w,v]=(0,n.useState)(!1),[j,y]=(0,n.useState)(null),N=["All Providers",...Array.from(new Set(l.map(e=>e.provider)))],k=["provider","name","status","role"],C=l.filter(e=>{let t=i.trim().toLowerCase(),s=!t||[e.name,e.provider,e.id,e.role].join(" ").toLowerCase().includes(t),a="All Providers"===c||e.provider===c;return s&&a}).sort((e,t)=>"name"===m?e.name.localeCompare(t.name):"status"===m?e.statusLabel.localeCompare(t.statusLabel)||e.name.localeCompare(t.name):"role"===m?e.role.localeCompare(t.role)||e.name.localeCompare(t.name):e.provider.localeCompare(t.provider)||e.name.localeCompare(t.name)),A=C.find(e=>e.id===x)??C[0]??null,S=new Set(l.filter(e=>"danger"!==e.statusTone).map(e=>e.provider)).size,L=tu(e),T=e.diagnostics.modelReadiness.resolvedDefaultModel??e.diagnostics.modelReadiness.defaultModel,M=async e=>{let t=e.source?.provider;if(!t||!(0,t2.a3)(t))return void el.o.message("Default model change is unavailable.",{description:"This model provider is not supported by the model provider API."});y(e.id);try{let a=await fetch("/api/models/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"set-default",provider:t,modelId:e.id})}),n=await a.json().catch(()=>null);if(!a.ok||!n?.ok)throw Error(n?.error||n?.message||"Default model update failed.");n.snapshot?r(n.snapshot):await s(),el.o.success("Default model updated.",{description:n.message})}catch(e){el.o.error("Default model update failed.",{description:tk(e)})}finally{y(null)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{main:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{title:"Models",subtitle:"Configure default models, providers, routing, and runtime preferences for your AI agents.",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[10px] px-3 text-xs",disabled:!0,title:"Model import is handled by the Add Models flow; there is no separate import backend.",children:[(0,a.jsx)(eA.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Import Model"]}),(0,a.jsxs)(O.$,{size:"sm",className:"h-8 rounded-[10px] bg-blue-500 px-3 text-xs text-white shadow-blue-500/20 hover:bg-blue-400",onClick:()=>v(!0),children:[(0,a.jsx)(eS.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Add Model"]})]})}),(0,a.jsxs)(F,{search:i,onSearchChange:o,searchPlaceholder:"Search models...",children:[(0,a.jsx)(W,{icon:e7.A,label:c,chevron:!0,onClick:()=>u(e=>N[(N.indexOf(e)+1)%N.length])}),(0,a.jsx)(W,{icon:d.A,label:"Configured models",disabled:!0,title:"Only configured models are exposed by the current model snapshot."}),(0,a.jsx)(W,{icon:p.A,label:`Sort: ${tI(m)}`,chevron:!0,onClick:()=>h(e=>k[(k.indexOf(e)+1)%k.length])})]}),(0,a.jsxs)(z,{columns:4,children:[(0,a.jsx)(_,{label:"Providers",value:String(S),detail:`${N.length-1} configured providers`,icon:tK.A,tone:"info"}),(0,a.jsx)(_,{label:"Configured Models",value:String(l.length),detail:`${l.filter(e=>"danger"!==e.statusTone).length} available`,icon:e9.A,tone:"success"}),(0,a.jsx)(_,{label:"Default Model",value:T?"1":"0",detail:T??"No default configured",icon:eI.A,tone:"warning"}),(0,a.jsx)(_,{label:"Runtime Tokens",value:tm(L),detail:L?"From live runtimes":"No token usage reported",icon:eM.A,tone:"purple"})]}),(0,a.jsx)(H,{title:"Providers & Models",children:0===C.length?(0,a.jsx)(Z,{title:"No models found",description:"Add models through the existing model setup flow or clear the current search/provider filter."}):(0,a.jsx)(t3,{models:C,selectedId:A?.id,settingDefaultId:j,onSelect:g,onSetDefault:e=>void M(e)})}),(0,a.jsxs)("div",{className:"grid gap-2.5 xl:grid-cols-[0.9fr_1.6fr]",children:[(0,a.jsx)(H,{title:"Default Route",children:(0,a.jsxs)("div",{className:"divide-y divide-white/[0.07] px-3",children:[(0,a.jsx)(X,{label:"Configured default",value:T??"Not configured"}),(0,a.jsx)(X,{label:"Readiness",value:e.diagnostics.modelReadiness.ready?"Ready":"Needs setup"}),(0,a.jsx)(X,{label:"Available models",value:String(e.diagnostics.modelReadiness.availableModelCount)}),(0,a.jsx)(X,{label:"Missing models",value:String(e.diagnostics.modelReadiness.missingModelCount)})]})}),(0,a.jsx)(H,{title:"Model Usage",children:(0,a.jsxs)("div",{className:"p-3",children:[(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-3 text-xs",children:[(0,a.jsx)(tC,{label:"Requests",value:"Not reported"}),(0,a.jsx)(tC,{label:"Total Tokens",value:tm(L)}),(0,a.jsx)(tC,{label:"Avg Latency",value:"Not reported"})]}),(0,a.jsx)(tS,{className:"mt-4",title:"Live routing metrics unavailable",description:"The current snapshot does not expose model request, cost, latency, or route split analytics. AgentOS shows configured models and runtime token usage only."})]})})]})]}),inspector:A?(0,a.jsx)(t4,{model:A,tab:b,onTabChange:f,settingDefault:j===A.id,onSetDefault:()=>void M(A),onOpenAddModels:()=>v(!0)}):null}),(0,a.jsx)(eU.o,{open:w,onOpenChange:v,snapshot:t,onSnapshotChange:r})]})}function t3({models:e,selectedId:t,settingDefaultId:s,onSelect:n,onSetDefault:r}){return(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[900px] text-left text-xs",children:[(0,a.jsx)("thead",{className:"border-b border-white/[0.07] text-[0.56rem] uppercase tracking-[0.14em] text-slate-500",children:(0,a.jsx)("tr",{children:["Model / Provider","Status","Context Window","Role","Usage","Actions"].map(e=>(0,a.jsx)("th",{className:"px-3 py-2.5 font-semibold",children:e},e))})}),(0,a.jsx)("tbody",{className:"divide-y divide-white/[0.06] text-slate-300",children:e.map(e=>(0,a.jsxs)("tr",{onClick:()=>n(e.id),className:(0,M.cn)("cursor-pointer hover:bg-white/[0.035]",e.id===t&&"bg-blue-500/[0.10] outline outline-1 outline-blue-400/50"),children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(K,{icon:e9.A,label:e.name,tone:e.statusTone,size:"sm"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"block font-semibold text-white",children:e.name}),(0,a.jsx)("span",{className:"text-[0.66rem] text-slate-500",children:e.provider})]})]})}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone})}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:e.contextLabel}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsx)(J,{label:e.role,tone:"Primary"===e.role?"info":"Fallback"===e.role?"purple":"Secondary"===e.role?"success":"warning",dot:!1})}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:e.lastActiveLabel}),(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:s===e.id||"Primary"===e.role||"danger"===e.statusTone,title:"Primary"===e.role?"This model is already the default.":"danger"===e.statusTone?"Unavailable models cannot be selected as default.":"Set this configured model as the AgentOS default.",onClick:t=>{t.stopPropagation(),r(e)},children:s===e.id?"Saving...":"Set Default"})})]},e.id))})]})})}function t4({model:e,tab:t,onTabChange:s,settingDefault:n,onSetDefault:r,onOpenAddModels:l}){return(0,a.jsxs)(G,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,a.jsx)(K,{icon:e9.A,label:e.name,tone:e.statusTone,size:"lg"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-white",children:e.name}),(0,a.jsx)("p",{className:"mt-1 text-xs text-slate-300",children:e.provider})]}),(0,a.jsx)(J,{label:e.statusLabel,tone:e.statusTone})]}),(0,a.jsx)("p",{className:"mt-2.5 text-xs leading-5 text-slate-300",children:"Configured model route reported by AgentOS/OpenClaw."})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,a.jsx)(O.$,{size:"sm",className:"col-span-2 h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:n||"Primary"===e.role||"danger"===e.statusTone,title:"Primary"===e.role?"This model is already the default.":"danger"===e.statusTone?"Unavailable models cannot be selected as default.":"Set this configured model as the AgentOS default.",onClick:r,children:n?"Saving...":"Set as Default"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs text-violet-200",disabled:!0,title:"Fallback routing is not exposed by the current model provider API.",children:"Set as Fallback"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",onClick:l,children:"Add Models"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",disabled:!0,title:"Model removal/disable is not exposed by the current model provider API.",children:"Disable"})]}),(0,a.jsx)("div",{className:"mt-3 flex border-b border-white/[0.08]",children:["Details","Capabilities","Performance"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>s(e),className:(0,M.cn)("border-b-2 px-3 py-2.5 text-xs",t===e?"border-blue-400 text-blue-200":"border-transparent text-slate-400 hover:text-white"),children:e},e))}),"Details"===t?(0,a.jsxs)("div",{className:"mt-3 rounded-[10px] border border-white/[0.08] bg-white/[0.03] px-3",children:[(0,a.jsx)(X,{label:"Provider",value:e.provider}),(0,a.jsx)(X,{label:"API Status",value:e.statusLabel}),(0,a.jsx)(X,{label:"Model ID",value:e.id}),(0,a.jsx)(X,{label:"Context Window",value:e.contextLabel}),(0,a.jsx)(X,{label:"Latency",value:e.latencyLabel}),(0,a.jsx)(X,{label:"Rate Limit",value:e.rateLimitLabel}),(0,a.jsx)(X,{label:"Cost / 1M",value:e.costLabel})]}):"Capabilities"===t?(0,a.jsx)("div",{className:"mt-3 flex flex-wrap gap-1.5",children:e.capabilities.map(e=>(0,a.jsx)(ee,{children:e},e))}):(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)(tS,{title:"Performance metrics unavailable",description:"The current snapshot does not expose per-model latency, cost, request volume, or route split analytics."}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2.5",children:[(0,a.jsx)(tC,{label:"Latency",value:e.latencyLabel}),(0,a.jsx)(tC,{label:"Rate Limit",value:e.rateLimitLabel})]})]})]})}var t8=s(73294),t6=s(68903),t9=s(3342),t7=s(47936);function se({initialSnapshot:e,children:t}){let{snapshot:s,connectionState:r,refresh:l,setSnapshot:i}=(0,t7.v)(e),{surfaceTheme:o,setSurfaceTheme:c}=(0,t6.$)(),[d,p]=(0,n.useState)(e.workspaces[0]?.id??null),[u,m]=(0,n.useState)(!1),[h,x]=(0,n.useState)(!1),[g,b]=(0,n.useState)(null),f=(0,n.useMemo)(()=>d?s.workspaces.find(e=>e.id===d)??null:null,[d,s.workspaces]),w=(0,n.useMemo)(()=>(function(e,t){if(!t)return e;let s=e.workspaces.find(e=>e.id===t);if(!s)return{...e,workspaces:[],agents:[],tasks:[],runtimes:[],models:[],channelAccounts:[],channelRegistry:{...e.channelRegistry,channels:[]}};let a=e.agents.filter(e=>e.workspaceId===s.id),n=new Set(a.map(e=>e.id)),r=e.tasks.filter(e=>e.workspaceId===s.id||!!e.primaryAgentId&&n.has(e.primaryAgentId)||e.agentIds.some(e=>n.has(e))),l=new Set(r.map(e=>e.id)),i=new Set(r.flatMap(e=>e.runtimeIds)),o=e.runtimes.filter(e=>e.workspaceId===s.id||!!e.agentId&&n.has(e.agentId)||!!e.taskId&&l.has(e.taskId)||i.has(e.id)),c=new Set([...s.modelIds,...a.map(e=>e.modelId),...o.map(e=>e.modelId),e.diagnostics.modelReadiness.resolvedDefaultModel,e.diagnostics.modelReadiness.defaultModel].filter(e=>!!e)),d=e.models.filter(e=>c.has(e.id)),p=e.channelRegistry.channels.map(e=>({...e,workspaces:e.workspaces.filter(e=>e.workspaceId===s.id)})).filter(e=>e.workspaces.length>0),u=new Set(p.map(e=>tb(e.type))),m=e.channelAccounts.filter(e=>{var t;let s=tb(e.type);return u.has(s)||u.has("google-drive"===(t=s)?"drive":"x-twitter"===t?"twitter":t)});return{...e,workspaces:[s],agents:a,tasks:r,runtimes:o,models:d,channelAccounts:m,channelRegistry:{...e.channelRegistry,channels:p}}})(s,d),[d,s]);return(0,n.useEffect)(()=>{let e=s.diagnostics.workspaceRoot;if(g===e||(0,t9.DK)(s))return;let t=(0,t9.cY)(e),a=globalThis.localStorage?.getItem(t)??null,n=(0,t9.mr)(s.workspaces.map(e=>e.id),a,d);queueMicrotask(()=>{n!==d&&p(n),b(e)})},[d,g,s]),(0,n.useEffect)(()=>{let e=s.diagnostics.workspaceRoot;if(g!==e)return;let t=globalThis.localStorage;void 0!==t&&t.setItem((0,t9.cY)(e),(0,t9.SW)(d))},[d,g,s.diagnostics.workspaceRoot]),(0,a.jsxs)("div",{className:(0,M.cn)("mission-shell relative min-h-screen overflow-hidden bg-[#030814] text-slate-100","light"===o&&"mission-shell--light"),children:[(0,a.jsxs)("div",{className:"mission-canvas-backdrop fixed inset-0 z-0",children:[(0,a.jsx)("div",{"aria-hidden":"true",className:"mission-canvas-pattern absolute inset-0 z-0 opacity-60"}),(0,a.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 z-10 bg-[radial-gradient(circle_at_54%_0%,rgba(37,99,235,0.16),transparent_32%),linear-gradient(180deg,rgba(2,6,17,0.12),rgba(2,6,17,0.58))]"})]}),(0,a.jsx)("div",{className:(0,M.cn)("fixed left-0 top-0 z-30 hidden h-[100dvh] overflow-hidden bg-[#050a12] shadow-[18px_0_60px_rgba(0,0,0,0.36)] transition-[width] duration-200 ease-out lg:block",u?"w-[256px]":"w-[72px]"),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),onFocusCapture:()=>m(!0),onBlurCapture:e=>{e.currentTarget.contains(e.relatedTarget)||m(!1)},children:(0,a.jsx)(t8.z,{snapshot:s,surfaceTheme:o,activeWorkspaceId:d,requestedAgentAction:null,connectionState:r,collapsed:!u,modelManager:{runState:"idle",statusMessage:null,resultMessage:null,log:"",manualCommand:null,docsUrl:null,discoveredModels:[],systemReady:"healthy"===s.diagnostics.health},onExpandCollapsed:()=>m(!0),onToggleCollapsed:()=>m(e=>!e),onSelectWorkspace:p,onRefresh:l,onRunModelRefresh:()=>el.o.message("Model refresh is available from Mission Control setup."),onRunModelDiscover:()=>el.o.message("Model discovery is available from Mission Control setup."),onRunModelSetDefault:()=>el.o.message("Default model changes are not exposed on this page yet."),onConnectModelProvider:e=>el.o.message(`Open ${e} setup from Mission Control to connect it.`),onOpenModelSetup:()=>el.o.message("Model setup opens from Mission Control."),onOpenAddModels:()=>el.o.message("Add Models opens from Mission Control."),onOpenWorkspaceCreate:()=>el.o.message("Workspace creation opens from Mission Control."),onEditWorkspace:()=>el.o.message("Workspace editing opens from Mission Control."),onSnapshotChange:i,onAgentCreatedVisible:()=>{}})}),h?(0,a.jsx)("button",{type:"button","aria-label":"Close navigation",className:"fixed inset-0 z-40 bg-black/62 backdrop-blur-[2px] lg:hidden",onClick:()=>x(!1)}):null,(0,a.jsx)("div",{className:(0,M.cn)("fixed left-0 top-0 z-50 h-[100dvh] overflow-hidden bg-[#050a12] shadow-[18px_0_60px_rgba(0,0,0,0.42)] transition-[width] duration-200 ease-out lg:hidden",h?"w-[min(86vw,292px)]":"w-[56px]"),onClickCapture:e=>{h&&e.target instanceof Element&&e.target.closest("a")&&x(!1)},children:(0,a.jsx)(t8.z,{snapshot:s,surfaceTheme:o,activeWorkspaceId:d,requestedAgentAction:null,connectionState:r,collapsed:!h,modelManager:{runState:"idle",statusMessage:null,resultMessage:null,log:"",manualCommand:null,docsUrl:null,discoveredModels:[],systemReady:"healthy"===s.diagnostics.health},onExpandCollapsed:()=>x(!0),onToggleCollapsed:()=>x(e=>!e),onSelectWorkspace:p,onRefresh:l,onRunModelRefresh:()=>el.o.message("Model refresh is available from Mission Control setup."),onRunModelDiscover:()=>el.o.message("Model discovery is available from Mission Control setup."),onRunModelSetDefault:()=>el.o.message("Default model changes are not exposed on this page yet."),onConnectModelProvider:e=>el.o.message(`Open ${e} setup from Mission Control to connect it.`),onOpenModelSetup:()=>el.o.message("Model setup opens from Mission Control."),onOpenAddModels:()=>el.o.message("Add Models opens from Mission Control."),onOpenWorkspaceCreate:()=>el.o.message("Workspace creation opens from Mission Control."),onEditWorkspace:()=>el.o.message("Workspace editing opens from Mission Control."),onSnapshotChange:i,onAgentCreatedVisible:()=>{}})}),(0,a.jsx)("main",{className:(0,M.cn)("relative z-20 min-h-screen pb-4 pl-[68px] pr-3 pt-4 sm:pl-[76px] sm:pr-5 lg:pl-[92px] lg:pr-4"),children:(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-[1880px] flex-col gap-3",children:[(0,a.jsx)($,{snapshot:s,connectionState:r,surfaceTheme:o,onToggleTheme:()=>c(e=>"light"===e?"dark":"light")}),t({snapshot:w,rootSnapshot:s,activeWorkspace:f,activeWorkspaceId:d,connectionState:r,surfaceTheme:o,refresh:l,setSnapshot:i})]})})]})}var st=s(92172),ss=s(19469),sa=s(74318),sn=s(23688),sr=s(72125),sl=s(14474);function si({snapshot:e,activeWorkspaceId:t,refresh:s}){let r=(0,n.useMemo)(()=>(function(e){if(0===e.tasks.length)return[];let t=(0,te.hv)(e.generatedAt);return e.tasks.map(e=>{var s,a,n,r,l,i;let o,c,d=(s=e).warningCount>0&&"completed"!==s.status&&"cancelled"!==s.status?"approval":"running"===s.status?"running":"queued"===s.status||"idle"===s.status?"queued":"completed"===s.status?"completed":"cancelled"===s.status?"cancelled":"stalled"===s.status?"stalled":"queued",p=(a=e,n=d,null!=(o=function(e,t){for(let s of t){let t=e[s];if("number"==typeof t&&Number.isFinite(t))return t;if("string"==typeof t&&t.trim()){let e=Number(t);if(Number.isFinite(e))return e}}return null}(a.metadata,["progress","progressPercent","percentComplete"]))?Math.max(0,Math.min(100,Math.round(o))):100*("completed"===n)),u=e.subtitle||e.mission||e.title||e.id;return{id:e.id,title:e.title||e.mission||e.id,status:d,statusLabel:"approval"===(r=d)?"Awaiting Approval":"queued"===r?"Queued":tf(r),statusTone:"completed"===(l=d)?"success":"running"===l?"info":"approval"===l||"stalled"===l?"warning":"cancelled"===l?"danger":"muted",agentName:e.primaryAgentName||"Unassigned",category:tg(e.metadata,["category","type","source"])||"Uncategorized",priority:(c=tg((i=e).metadata,["priority"]))&&/high/i.test(c)?"High":c&&/low/i.test(c)?"Low":i.warningCount>0||i.liveRunCount>1?"High":i.runtimeCount>1?"Medium":"Low",progress:p,dueLabel:tg(e.metadata,["dueLabel","dueAt","scheduledAt"])||(0,te.fw)(e.updatedAt,t),tokenLabel:(0,te._y)(e.tokenUsage?.total),objective:e.mission||u,description:u,artifactCount:e.artifactCount,warningCount:e.warningCount,source:e}})})(e),[e]),[l,i]=(0,n.useState)(""),[o,c]=(0,n.useState)("all"),[u,m]=(0,n.useState)("updated"),[h,x]=(0,n.useState)("board"),[g,b]=(0,n.useState)(r[0]?.id??""),[f,w]=(0,n.useState)({}),[v,y]=(0,n.useState)(!1),N=r.filter(e=>{let t=l.trim().toLowerCase(),s=!t||[e.title,e.agentName,e.category,e.objective,e.description].join(" ").toLowerCase().includes(t),a="all"===o||e.status===o;return s&&a}).sort((e,t)=>"title"===u?e.title.localeCompare(t.title):"status"===u?e.statusLabel.localeCompare(t.statusLabel)||e.title.localeCompare(t.title):"agent"===u?e.agentName.localeCompare(t.agentName)||e.title.localeCompare(t.title):(t.source?.updatedAt??0)-(e.source?.updatedAt??0)||e.title.localeCompare(t.title)),k=N.find(e=>e.id===g)??N[0]??null,C=k?f[k.id]??null:null,A={queued:r.filter(e=>"queued"===e.status).length,running:r.filter(e=>"running"===e.status).length,approval:r.filter(e=>"approval"===e.status).length,completed:r.filter(e=>"completed"===e.status).length,cancelled:r.filter(e=>"cancelled"===e.status).length,stalled:r.filter(e=>"stalled"===e.status).length},S=e.tasks.reduce((e,t)=>e+(t.tokenUsage?.total??0),0)||tu(e),L=["updated","title","status","agent"],T=async e=>{if(!tT(e))return void el.o.message("Cancel is unavailable.",{description:"Only live, queued, stalled, or approval tasks can be cancelled through the current task API."});if(!e.source)return void el.o.message("Cancel is unavailable.",{description:"This row is not backed by an AgentOS task record."});try{let t=await fetch(`/api/tasks/${encodeURIComponent(e.source.id)}/abort`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"Cancelled from Tasks page.",dispatchId:e.source.dispatchId??null})}),a=await t.json();if(!t.ok||a.error)throw Error(a.error||"Unable to cancel task.");el.o.success("Task cancellation requested."),await s()}catch(e){el.o.error("Task cancellation failed.",{description:e instanceof Error?e.message:"Unknown task error."})}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{main:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(D,{title:"Tasks",subtitle:"Plan, monitor, and execute work across your agents. Track progress and manage approvals.",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[10px] px-3 text-xs",disabled:!0,title:"Task import requires a backend import contract.",children:[(0,a.jsx)(st.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Import Tasks"]}),(0,a.jsxs)(O.$,{size:"sm",className:"h-8 rounded-[10px] bg-blue-500 px-3 text-xs text-white shadow-blue-500/20 hover:bg-blue-400",onClick:()=>y(!0),children:[(0,a.jsx)(eS.A,{className:"mr-1.5 h-3.5 w-3.5"}),"Create Task"]})]})}),(0,a.jsxs)(z,{columns:4,children:[(0,a.jsx)(_,{label:"Total Tasks",value:String(r.length),detail:`${e.tasks.length} tracked from snapshot`,icon:eH.A,tone:"info"}),(0,a.jsx)(_,{label:"Running",value:String(A.running),detail:"Live task records",icon:eO.A,tone:"success"}),(0,a.jsx)(_,{label:"Queued",value:String(A.queued),detail:"Waiting to run",icon:j.A,tone:"warning"}),(0,a.jsx)(_,{label:"Needs Approval",value:String(A.approval),detail:"Warnings or review gates",icon:eT.A,tone:"danger"}),(0,a.jsx)(_,{label:"Completed",value:String(A.completed),detail:"Completed task records",icon:eI.A,tone:"purple"}),(0,a.jsx)(_,{label:"Runtime Tokens",value:tm(S),detail:S?"From live task/runtime usage":"No token usage reported",icon:eM.A,tone:"purple"})]}),(0,a.jsxs)(F,{search:l,onSearchChange:i,searchPlaceholder:"Search tasks...",right:(0,a.jsx)(q,{value:"board"===h?"board":"list",labels:["Board","List"],onChange:e=>x("grid"===e?"board":"list")}),children:[(0,a.jsx)(W,{icon:d.A,label:`Filter: ${tO(o)}`,active:"all"!==o,onClick:()=>c("all")}),(0,a.jsx)(W,{icon:p.A,label:`Sort: ${"updated"===u?"Last updated":tI(u)}`,chevron:!0,onClick:()=>m(e=>L[(L.indexOf(e)+1)%L.length])}),(0,a.jsx)(W,{icon:tG.A,label:"Group: Status",active:!0,disabled:!0,title:"The board is grouped by status."})]}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:["all","queued","running","approval","stalled","completed","cancelled"].map(e=>(0,a.jsx)(B,{label:tO(e),count:"all"===e?r.length:A[e],active:o===e,tone:"running"===e?"info":"completed"===e?"success":"approval"===e||"stalled"===e?"warning":"cancelled"===e?"danger":"muted",onClick:()=>c(e)},e))}),0===N.length?(0,a.jsx)(Z,{title:"No tasks match your filters",description:"Clear search or switch filters to inspect the current AgentOS task snapshot."}):"board"===h?(0,a.jsx)("div",{className:"grid gap-3 xl:grid-cols-2 min-[1800px]:grid-cols-3",children:["queued","running","approval","stalled","completed","cancelled"].map(e=>(0,a.jsx)(so,{status:e,tasks:N.filter(t=>t.status===e),selectedId:k?.id,onSelect:b,onAbort:T,onFollowUpComplete:s,onActiveFollowUpChange:(e,t)=>{b(e.id),w(s=>({...s,[e.id]:t}))}},e))}):(0,a.jsx)(H,{children:(0,a.jsx)("div",{className:"flex flex-col gap-3 p-3",children:N.map(e=>(0,a.jsx)(sc,{task:e,selected:e.id===k?.id,onSelect:()=>b(e.id),onAbort:()=>T(e),onFollowUpComplete:s,onActiveFollowUpChange:t=>{b(e.id),w(s=>({...s,[e.id]:t}))}},e.id))})}),(0,a.jsxs)("div",{className:"grid gap-2.5 xl:grid-cols-2",children:[(0,a.jsx)(sb,{tasks:r.slice(0,5)}),(0,a.jsx)(tS,{title:"Automation Controls",description:"Task scheduling toggles, approval decisions, pause, and retry controls are not exposed by the current Operations backend. Existing live cancellation and mission dispatch remain enabled."})]})]}),inspector:k?(0,a.jsx)(sp,{task:k,activeFollowUp:C,onAbort:()=>T(k),onFollowUpComplete:s,onActiveFollowUpChange:e=>{w(t=>({...t,[k.id]:e}))}}):null}),(0,a.jsx)(tL,{open:v,agent:null,defaultWorkspaceId:t,onOpenChange:y,onSubmitted:s})]})}function so({status:e,tasks:t,selectedId:s,onSelect:n,onAbort:r,onFollowUpComplete:l,onActiveFollowUpChange:i}){let o=tw[e];return(0,a.jsxs)("section",{className:(0,M.cn)("rounded-[12px] p-2.5",I),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 pb-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(o,{className:"h-3.5 w-3.5 text-blue-300"}),(0,a.jsx)("h2",{className:"text-[0.66rem] font-bold uppercase tracking-[0.13em] text-blue-200",children:tO(e)}),(0,a.jsx)("span",{className:"rounded-full bg-white/[0.08] px-1.5 py-0.5 text-[0.62rem] text-slate-400",children:t.length})]}),(0,a.jsx)("button",{className:"text-slate-500",type:"button",disabled:!0,title:"Use Create Task to submit a mission through the supported dispatch flow.",children:(0,a.jsx)(eS.A,{className:"h-3.5 w-3.5"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[t.map(e=>(0,a.jsx)(sc,{task:e,selected:e.id===s,onSelect:()=>n(e.id),onAbort:()=>r(e),onFollowUpComplete:l,onActiveFollowUpChange:t=>i(e,t)},e.id)),(0,a.jsxs)("button",{type:"button",disabled:!0,title:"Inline column creation is disabled; use Create Task to submit a mission through the supported dispatch flow.",className:"rounded-[10px] border border-white/[0.08] bg-white/[0.03] px-3 py-2.5 text-xs text-slate-500",children:[(0,a.jsx)(eS.A,{className:"mr-1.5 inline h-3.5 w-3.5"})," Add Task"]})]})]})}function sc({task:e,selected:t,onSelect:s,onAbort:r,onFollowUpComplete:l,onActiveFollowUpChange:i}){var o,c,d,p;let m,h,x,b,f,w,v=tT(e),j=sx(e),y=(0,n.useRef)(null),N=(0,n.useRef)(null),[C,A]=(0,n.useState)(!1),[S,L]=(0,n.useState)(!1),[T,I]=(0,n.useState)([]),[P,R]=(0,n.useState)(null),U=(0,n.useMemo)(()=>e.source?(0,sl.kT)(e.source.metadata):[],[e.source]),$=(0,n.useMemo)(()=>(0,sl.tt)(T,U),[T,U]),D=null!==P&&P<$.length?P:null,_=null!==D?$[D]??null:null,z=_?(0,sl.Rx)(_)??_.message:e.title,F=_?"Follow-up result":"Latest result",E=_?(0,sr.fs)(_):j,W=_?su(_.status):e.status,q=_?sm(W):e.statusLabel,B=_?sh(W):e.statusTone,H=_?(o=_,[{icon:ss.A,label:"Sessions",value:+!!o.sessionId},{icon:u.A,label:"Turns",value:+!!o.runId},{icon:eM.A,label:"Tokens",value:(0,te._y)(o.tokenUsage?.total),highlighted:!0},{icon:sa.A,label:"Feed",value:o.summary?1:"n/a"},{icon:sn.A,label:"Runs",value:+!!o.runId},{icon:eM.A,label:"Files",value:o.createdFiles?o.createdFiles.length:"n/a"}]):(x=(c=e).source,b=(d=c,"number"==typeof(m=d.source?.metadata.sessionCount)&&Number.isFinite(m)?m:d.source?.sessionIds.length??0),f=(p=c,"number"==typeof(h=p.source?.metadata.turnCount)&&Number.isFinite(h)?h:p.source?.runtimeCount??0),w=x?.updateCount??x?.runtimeCount??0,[{icon:ss.A,label:"Sessions",value:b},{icon:u.A,label:"Turns",value:f},{icon:eM.A,label:"Tokens",value:c.tokenLabel,highlighted:!0},{icon:sa.A,label:"Feed",value:w},{icon:sn.A,label:"Runs",value:c.source?.runtimeCount??f},{icon:eM.A,label:"Files",value:c.artifactCount}]),G=[{id:"task",index:null,kind:"task",label:"Task 1",title:(0,te.$m)(e.title,28)||"Original task",statusLabel:e.statusLabel},...$.map((e,t)=>({id:e.runId||e.id,index:t,kind:"follow-up",label:"Follow-up",title:(0,te.$m)((0,sl.Rx)(e)??e.message,28)||"Follow-up",statusLabel:sm(su(e.status))}))],K=_?_.runId||_.id:"task";return(0,n.useEffect)(()=>{if(!C)return;let e=e=>{y.current?.contains(e.target)||(A(!1),L(!1))};return window.addEventListener("pointerdown",e,!0),()=>window.removeEventListener("pointerdown",e,!0)},[C]),(0,a.jsxs)("div",{ref:y,role:"button",tabIndex:0,onClick:s,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),s())},className:(0,M.cn)("relative overflow-hidden rounded-[20px] border bg-[linear-gradient(180deg,rgba(12,19,33,0.96),rgba(5,10,20,0.96))] p-2.5 text-left shadow-[0_18px_50px_rgba(0,0,0,0.24)] transition-[transform,box-shadow,border-color,background-color] hover:border-cyan-200/22 hover:bg-white/[0.055] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-300/40 transform-gpu origin-center",t?"border-cyan-300/45 shadow-[0_0_0_1px_rgba(34,211,238,0.16),0_18px_50px_rgba(0,0,0,0.32)]":"border-white/[0.08]",C&&"z-30 scale-[1.03] shadow-[0_28px_90px_rgba(0,0,0,0.42)]"),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-y-5 left-0 w-1 rounded-r-full bg-cyan-300/45"}),(0,a.jsx)(sd,{activeTabId:K,tabs:G,onAdd:()=>{A(!0),N.current?.focus()},onSelect:e=>{var t;return t=e.index,void(L(!1),R(t),i(null===t?null:$[t]??null))}}),(0,a.jsxs)("div",{className:"min-w-0 rounded-[16px] border border-white/[0.06] bg-white/[0.025] p-3.5",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsx)("div",{className:"min-w-0",children:(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-[12px] border border-cyan-200/18 bg-cyan-300/[0.06] text-cyan-200 shadow-[0_0_18px_rgba(45,212,191,0.09)]",children:(0,a.jsx)(eH.A,{className:"h-[18px] w-[18px]"})}),(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsxs)("span",{className:"block truncate text-[0.68rem] font-semibold uppercase tracking-[0.18em] text-slate-400",children:["Task / ",(0,a.jsx)("span",{className:"text-emerald-300",children:e.agentName})]}),(0,a.jsx)("span",{className:"mt-1 block truncate text-[0.68rem] text-slate-500",children:e.category})]})]})}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,a.jsx)(J,{label:q,tone:B}),(0,a.jsx)(Q,{})]})]}),(0,a.jsxs)("button",{type:"button","aria-expanded":S,className:"group mt-3 flex w-full items-start gap-2 text-left",onClick:e=>{e.stopPropagation(),L(e=>!e)},onPointerDown:e=>e.stopPropagation(),children:[(0,a.jsx)("h3",{className:(0,M.cn)("min-w-0 flex-1 font-display text-[1.45rem] font-semibold leading-tight text-white",!S&&"line-clamp-2"),children:z}),(0,a.jsx)("span",{className:"mt-1 shrink-0 rounded-full border border-white/[0.08] bg-white/[0.04] p-1 text-slate-400 transition-colors group-hover:border-cyan-200/20 group-hover:text-slate-100",children:(0,a.jsx)(k.A,{className:(0,M.cn)("h-3.5 w-3.5 transition-transform",S&&"rotate-180")})})]}),(0,a.jsx)(sr.e4,{metrics:H,compact:!0,className:"mt-3"}),"running"===e.status?(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"mb-1 flex justify-between text-[0.68rem] text-slate-400",children:[(0,a.jsxs)("span",{children:[e.progress,"%"]}),(0,a.jsx)("span",{children:e.tokenLabel})]}),(0,a.jsx)(Y,{value:e.progress})]}):null,(0,a.jsx)(sr.D9,{title:F,result:E,compact:!0,className:"mt-3"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-[0.68rem] text-slate-500",children:e.dueLabel}),(0,a.jsxs)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] px-2.5 text-[0.7rem]",disabled:!v,title:v?"Cancel this task through the supported abort action.":"This task status cannot be cancelled.",onClick:e=>{e.stopPropagation(),r()},children:[(0,a.jsx)(g.A,{className:"mr-1.5 h-3 w-3"}),"Cancel"]})]})]}),e.source?(0,a.jsx)(sr._L,{task:e.source,latestResult:E,compact:!0,expanded:C,onExpandRequest:()=>A(!0),textareaRef:N,className:"mt-2.5",onSubmitted:e=>(R($.length),I(t=>(0,sl.tt)(t,[e])),i(e),l())}):null]})}function sd({activeTabId:e,tabs:t,onAdd:s,onSelect:n}){let r=Math.max(t.findIndex(t=>t.id===e),0),l=e=>{let s=t[(r+e+t.length)%t.length];s&&n(s)};return(0,a.jsxs)("div",{className:"mb-2 flex items-end gap-1.5 pb-px",onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{role:"tablist","aria-label":"Task workspace tabs",className:(0,M.cn)("min-w-0 items-end gap-1.5",t.length<=7?"grid flex-1":"flex min-w-max overflow-x-auto"),style:t.length<=7?{gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`}:void 0,children:t.map(s=>{let r=s.id===e,i="task"===s.kind?eH.A:eP.A;return(0,a.jsxs)("button",{type:"button",role:"tab","aria-selected":r,tabIndex:r?0:-1,title:`${s.label}: ${s.title}`,className:(0,M.cn)("group/tab relative flex h-[50px] items-center gap-2 rounded-t-[15px] border px-2.5 text-left outline-none transition-all duration-200 focus-visible:ring-2 focus-visible:ring-cyan-200/45",t.length<=7?"min-w-0 w-full":"min-w-[148px] max-w-[220px] shrink-0",r?"border-cyan-200/26 bg-cyan-300/[0.09] text-white shadow-[0_-8px_24px_rgba(45,212,191,0.12)]":"border-white/[0.075] bg-white/[0.025] text-slate-300 hover:border-cyan-200/16 hover:bg-white/[0.045]"),onClick:()=>n(s),onKeyDown:e=>{if("ArrowRight"===e.key)e.preventDefault(),l(1);else if("ArrowLeft"===e.key)e.preventDefault(),l(-1);else if("Home"===e.key)e.preventDefault(),t[0]&&n(t[0]);else if("End"===e.key){e.preventDefault();let s=t[t.length-1];s&&n(s)}},children:[(0,a.jsx)("span",{className:(0,M.cn)("flex h-8 w-8 shrink-0 items-center justify-center rounded-[10px] border transition-colors",r?"border-emerald-200/24 bg-emerald-300/[0.12] text-emerald-100":"border-white/[0.08] bg-white/[0.035] text-slate-400 group-hover/tab:text-slate-200"),children:(0,a.jsx)(i,{className:"h-4 w-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("span",{className:(0,M.cn)("flex items-center gap-1.5 text-[10px] font-semibold",r?"text-emerald-200":"text-slate-400"),children:[(0,a.jsx)("span",{className:"truncate",children:s.label}),(0,a.jsx)("span",{className:(0,M.cn)("h-1 w-1 shrink-0 rounded-full",function(e){switch(e.toLowerCase()){case"completed":return"bg-emerald-300";case"running":case"queued":return"bg-cyan-300";case"stalled":return"bg-amber-300";case"cancelled":return"bg-rose-300";default:return"bg-slate-500"}}(s.statusLabel))})]}),(0,a.jsx)("span",{className:"mt-0.5 block truncate text-[10px] font-semibold leading-4 text-slate-100",children:s.title})]}),(0,a.jsx)("span",{className:(0,M.cn)("absolute inset-x-2.5 bottom-0 h-0.5 rounded-full transition-all duration-200",r?"bg-emerald-300 shadow-[0_0_14px_rgba(52,211,153,0.75)]":"bg-transparent")})]},s.id)})}),(0,a.jsx)("button",{type:"button","aria-label":"Focus follow-up composer",title:"Focus follow-up composer",className:"mb-1 inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] border border-white/[0.08] bg-white/[0.045] text-slate-200 outline-none transition-all duration-200 hover:border-cyan-200/22 hover:bg-cyan-300/[0.08] hover:text-cyan-100 focus-visible:ring-2 focus-visible:ring-cyan-200/45",onClick:s,children:(0,a.jsx)(eS.A,{className:"h-[18px] w-[18px]"})})]})}function sp({task:e,activeFollowUp:t,onAbort:s,onFollowUpComplete:n,onActiveFollowUpChange:r}){let l=tT(e),i=t?su(t.status):e.status,o=t?sm(i):e.statusLabel,c=t?sh(i):e.statusTone,d=t?(0,sl.Rx)(t)??t.message:null,p=d||e.title,u=d||e.objective,m=t?t.summary||(0,sr.fs)(t):e.description,h=t?(0,sr.fs)(t):sx(e),x=t&&"completed"===i?100:t&&"running"===i?48:e.progress;return(0,a.jsxs)(G,{title:"Task Details",children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-white",children:p}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,a.jsx)(J,{label:o,tone:c}),t?(0,a.jsx)("span",{className:"rounded-full bg-cyan-300/10 px-2 py-1 text-[0.62rem] font-semibold uppercase tracking-[0.12em] text-cyan-100",children:"Follow-up"}):null,(0,a.jsxs)("span",{className:"font-mono text-[0.68rem] text-slate-500",children:["ID: ",e.id.slice(0,18)]})]}),(0,a.jsx)(H,{title:"Assigned Agent",className:"mt-3",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2.5",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-xs font-semibold text-white",children:e.agentName}),(0,a.jsxs)("p",{className:"mt-1 text-[0.68rem] text-slate-400",children:[e.category," work item"]})]}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-7 rounded-[8px] px-2 text-[0.7rem]",disabled:!0,title:"Task-to-agent messaging is not exposed from this inspector. Use the Agents page chat for direct messages.",children:"Message"})]})}),(0,a.jsxs)("div",{className:"mt-3 space-y-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[0.58rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:"Objective"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs leading-5 text-slate-300",children:u})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[0.58rem] font-semibold uppercase tracking-[0.16em] text-slate-500",children:"Description"}),(0,a.jsx)("p",{className:"mt-1.5 whitespace-pre-wrap text-xs leading-5 text-slate-300",children:m})]})]}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-3 gap-2 rounded-[10px] border border-white/[0.08] bg-white/[0.03] p-2.5",children:[(0,a.jsx)(tC,{label:"Status",value:o}),(0,a.jsx)(tC,{label:"Priority",value:e.priority}),(0,a.jsx)(tC,{label:"Due",value:e.dueLabel})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsxs)("div",{className:"mb-1.5 flex justify-between text-xs",children:[(0,a.jsx)("span",{className:"text-slate-400",children:"Progress"}),(0,a.jsxs)("span",{className:"text-blue-300",children:[x,"%"]})]}),(0,a.jsx)(Y,{value:x})]}),(0,a.jsx)(sr.D9,{title:t?"Follow-up result":"Latest result",result:h,compact:!0,className:"mt-3"}),e.source?(0,a.jsx)(sr._L,{task:e.source,latestResult:sx(e),compact:!0,className:"mt-3",onSubmitted:e=>(r(e),n())}):null,(0,a.jsxs)("div",{className:"mt-4 rounded-[10px] border border-white/[0.08] bg-white/[0.03] px-3",children:[(0,a.jsx)(X,{label:"Task Key",value:e.source?.key??"Not reported"}),(0,a.jsx)(X,{label:"Approvals",value:"approval"===e.status?"Review required by task warnings":"Not reported"}),(0,a.jsx)(X,{label:"Outputs / Files",value:`${e.artifactCount} files`}),(0,a.jsx)(X,{label:"Warnings",value:`${e.warningCount} warnings`})]}),(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2",children:[(0,a.jsx)(O.$,{size:"sm",className:"h-8 rounded-[9px] bg-blue-500 text-xs text-white hover:bg-blue-400",disabled:!0,title:"Task details are already shown in this inspector.",children:"Open"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",disabled:!0,title:"Pause is not exposed by the current task API.",children:"Pause"}),(0,a.jsx)(O.$,{variant:"secondary",size:"sm",className:"h-8 rounded-[9px] text-xs",disabled:!0,title:"Retry/run-again requires a supported replay contract for the original mission.",children:"Run Again"}),(0,a.jsx)(O.$,{variant:"destructive",size:"sm",className:"h-8 rounded-[9px] text-xs",disabled:!l,title:l?"Cancel this task through the supported abort action.":"This task status cannot be cancelled.",onClick:s,children:"Cancel"})]})]})}function su(e){switch(e){case"queued":case"running":case"stalled":case"completed":case"cancelled":return e;case"timeout":case"timed_out":case"failed":case"error":return"stalled";default:return"running"}}function sm(e){switch(e){case"queued":return"Queued";case"running":default:return"Running";case"stalled":return"Stalled";case"completed":return"Completed";case"cancelled":return"Cancelled";case"approval":return"Needs Approval"}}function sh(e){switch(e){case"completed":return"success";case"running":case"queued":return"info";case"stalled":return"warning";case"cancelled":return"danger";default:return"muted"}}function sx(e){let t=e.source,s=sg(t,"finalResponseText"),a=sg(t,"resultPreview");return s||a||t?.subtitle||e.description||"No result has been captured for this task yet."}function sg(e,t){let s=e?.metadata[t];return"string"==typeof s&&s.trim().length>0?s.trim():null}function sb({tasks:e}){return(0,a.jsx)(H,{title:"Recent Activity",children:0===e.length?(0,a.jsx)(Z,{title:"No task activity",description:"No task records were reported in the current AgentOS snapshot."}):(0,a.jsx)("div",{className:"divide-y divide-white/[0.06] px-3",children:e.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 py-2.5 text-[0.68rem]",children:[(0,a.jsx)("span",{className:"min-w-0 truncate text-slate-300",children:e.title}),(0,a.jsx)("span",{className:"shrink-0 text-slate-500",children:e.statusLabel})]},e.id))})})}function sf({initialSnapshot:e,page:t}){return(0,a.jsx)(se,{initialSnapshot:e,children:e=>"agents"===t?(0,a.jsx)(tP,{snapshot:e.snapshot,rootSnapshot:e.rootSnapshot,activeWorkspaceId:e.activeWorkspaceId,surfaceTheme:e.surfaceTheme,refresh:e.refresh,setSnapshot:e.setSnapshot}):"tasks"===t?(0,a.jsx)(si,{snapshot:e.snapshot,activeWorkspaceId:e.activeWorkspaceId,refresh:e.refresh}):"files"===t?(0,a.jsx)(tW,{snapshot:e.snapshot,activeWorkspaceId:e.activeWorkspaceId}):"accounts"===t?(0,a.jsx)(ec,{snapshot:e.snapshot,activeWorkspace:e.activeWorkspace,activeWorkspaceId:e.activeWorkspaceId}):"models"===t?(0,a.jsx)(t5,{snapshot:e.snapshot,rootSnapshot:e.rootSnapshot,refresh:e.refresh,setSnapshot:e.setSnapshot}):(0,a.jsx)(tY,{snapshot:e.snapshot,rootSnapshot:e.rootSnapshot,activeWorkspaceId:e.activeWorkspaceId,refresh:e.refresh,setSnapshot:e.setSnapshot})})}},92083:(e,t,s)=>{Promise.resolve().then(s.bind(s,13007))}}]);
@@ -0,0 +1,3 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2125],{14474:(e,t,n)=>{function s(e){let t=e.followUps;return Array.isArray(t)?t.map(e=>u(e)?function(e){let t=i(e.id),n=i(e.message),s=i(e.createdAt);if(!t||!n||!s)return null;let r=i(e.prompt)??n,l=i(e.summary),d=a({message:n,prompt:r,summary:l})??n;return{id:t,message:d,prompt:r||d,createdAt:s,taskId:i(e.taskId),dispatchId:i(e.dispatchId),runId:i(e.runId),sessionId:i(e.sessionId),status:i(e.status),summary:l,tokenUsage:function(e){if(!u(e))return;let t=o(e.input),n=o(e.output),s=o(e.total);if(null===t||null===n||null===s)return;let a=o(e.cacheRead);return{input:t,output:n,total:s,...null===a?{}:{cacheRead:a}}}(e.tokenUsage),createdFiles:function(e){if(Array.isArray(e))return e.flatMap(e=>{if(!u(e))return[];let t=i(e.path),n=i(e.displayPath)??t;return t&&n?[{path:t,displayPath:n}]:[]})}(e.createdFiles)}}(e):null).filter(e=>!!e):[]}function a(e){var t,n;let s,a=(s="string"==typeof(t=e.prompt)?t.trim():"").length>0?s:null;return l(e.message)??function(e){if(!e)return null;let t=e.match(/Operator follow-up:\s*([\s\S]*?)(?:\n\s*Original mission:|\n\s*Latest result:|\n\s*Output context:|\n\s*Existing output\/files:|$)/i);return t?.[1]?.trim()||null}(e.prompt)??(a&&(n=a,!(/^Continue this task in the existing task context\./i.test(n)||/^Operator follow-up:/i.test(n)||/Original mission:/i.test(n)||/Latest result:/i.test(n)||/Output context:/i.test(n)||/Existing output\/files:/i.test(n)))?a:null)??l(e.summary)??null}function r(e,t){let n=new Map;for(let s of[...e,...t]){let e=s.runId||s.id,t=n.get(e);n.set(e,t?function(e,t){let n={...e,...t,summary:t.summary??e.summary,status:t.status??e.status,sessionId:t.sessionId??e.sessionId,tokenUsage:t.tokenUsage??e.tokenUsage,createdFiles:t.createdFiles??e.createdFiles},s=a(n)??l(e.message)??e.prompt;return{...n,message:s,prompt:n.prompt||s}}(t,s):s)}return Array.from(n.values()).sort((e,t)=>Date.parse(e.createdAt)-Date.parse(t.createdAt))}function l(e){let t="string"==typeof e?e.trim():"";return!t||/^Follow-up \d+$/i.test(t)?null:t}function i(e){return"string"==typeof e&&e.trim().length>0?e.trim():null}function o(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function u(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}n.d(t,{Rx:()=>a,kT:()=>s,tt:()=>r})},72125:(e,t,n)=>{n.d(t,{D9:()=>y,_L:()=>b,e4:()=>w,fs:()=>x});var s=n(36366),a=n(70430),r=n(79613),l=n(8894),i=n(62071),o=n(2961),u=n(8120),d=n(19306),p=n(50243);function c(e,t){let n=e.metadata[t];return"string"==typeof n&&n.trim().length>0?n.trim():null}function m(e,t){let n=e.replace(/\s+\n/g,"\n").trim();return n.length<=t?n:`${n.slice(0,Math.max(t-39,1)).trimEnd()}
2
+
3
+ [truncated for task follow-up]`}var h=n(14474),f=n(82711),g=n(23351);function x(e){var t;let n,s,a=((0,h.Rx)(e)??e.message.trim())||"Follow-up";return e.summary?["Operator follow-up:",a,"\nAgent response:",e.summary].join("\n"):(t=e.status,"timeout"===(n=t?.trim().toLowerCase())||"timed_out"===n||"stalled"===n||"failed"===n)?["Operator follow-up:",a,"\nNo agent answer was captured before the OpenClaw wait window expired."].join("\n"):["Operator follow-up:",a,"",`Sent ${Number.isNaN(s=Date.parse(e.createdAt))?"just now":new Date(s).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}.`,e.runId?`OpenClaw run ${e.runId} is being tracked for this follow-up.`:"Waiting for the agent result to appear in the task feed and latest result."].join("\n")}function w({metrics:e,className:t,compact:n=!1}){return(0,s.jsx)("div",{className:(0,g.cn)("flex flex-wrap items-center gap-2.5",t),children:e.map((e,t)=>{let a=e.icon,r=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{className:(0,g.cn)("h-3.5 w-3.5 shrink-0",e.highlighted?"text-emerald-200":"text-slate-400")}),(0,s.jsx)("span",{children:e.label}),void 0!==e.value?(0,s.jsx)("span",{className:(0,g.cn)("ml-0.5 inline-flex min-w-5 items-center justify-center rounded-full px-1.5 py-0.5 font-mono text-[10px]",e.highlighted?"bg-emerald-300/12 text-emerald-100":"bg-white/[0.06] text-slate-200"),children:e.value}):null]});return e.onClick?(0,s.jsx)("button",{type:"button",className:(0,g.cn)(k(e,n),"transition-colors hover:border-cyan-200/24 hover:bg-white/[0.06] hover:text-slate-100"),onClick:t=>{t.stopPropagation(),e.onClick?.()},onPointerDown:e=>e.stopPropagation(),children:r},`${e.label}-${t}`):(0,s.jsx)("span",{className:k(e,n),children:r},`${e.label}-${t}`)})})}function y({title:e="Latest result",result:t,emptyText:n="No result has been captured for this task yet.",className:l,compact:i=!1}){let[o,u]=(0,a.useState)(!1),d=t?.trim()||n,p=(0,f.$m)(d,i?150:260)||d;return(0,s.jsxs)("section",{className:(0,g.cn)("rounded-[16px] border border-white/[0.08] bg-slate-950/28 px-3 py-2.5 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",l),onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[(0,s.jsxs)("button",{type:"button","aria-expanded":o,className:"flex w-full items-center justify-between gap-3 text-left",onClick:()=>u(e=>!e),children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-300 shadow-[0_0_10px_rgba(52,211,153,0.6)]"}),(0,s.jsx)("span",{className:"truncate text-[10px] font-semibold uppercase tracking-[0.18em] text-slate-400",children:e})]}),(0,s.jsx)(r.A,{className:(0,g.cn)("h-4 w-4 shrink-0 text-slate-400 transition-transform",o&&"rotate-180")})]}),(0,s.jsx)("p",{className:(0,g.cn)("mt-2 whitespace-pre-wrap text-slate-200/90",i?"text-[11.5px] leading-5":"text-sm leading-6",o?"max-h-56 overflow-y-auto pr-2":"line-clamp-2"),children:o?d:p})]})}function b({task:e,latestResult:t,createdFiles:n,outputSummary:r,onSubmitted:h,onExpandRequest:f,textareaRef:x,expanded:w=!1,className:y,compact:k=!1}){var v;let[N,A]=(0,a.useState)(""),[C,O]=(0,a.useState)(!1),_="queued"!==(v=e.status)&&"running"!==v&&"stalled"!==v&&"completed"!==v?{available:!1,reason:"Follow-up is available for queued, running, stalled, or completed tasks."}:e.primaryAgentId||0!==e.agentIds.length?e.dispatchId||0!==e.sessionIds.length?{available:!0,reason:null}:{available:!1,reason:"This task does not expose an OpenClaw session or dispatch to continue."}:{available:!1,reason:"This task does not expose an OpenClaw agent to continue."},$=N.trim(),F=_.reason||(C?"Follow-up is being sent.":null)||($?null:"Enter a follow-up before sending."),S=!!F,P=async()=>{if(!S&&!C){O(!0);try{var s,a,l,i,o;let u,d,f,g,x,w,y,b,k=(s={task:e,operatorMessage:$,latestResult:t,createdFiles:n,outputSummary:r},g=m(s.operatorMessage,3e3),x=m((a=s.task,a.mission?.trim()||a.title.trim()||"Untitled task"),2600),w=m(s.latestResult||c(s.task,"finalResponseText")||c(s.task,"resultPreview")||s.task.subtitle,4200),y=m((l=s.task,(u=(s.createdFiles??[]).map(e=>e.displayPath||e.path).filter(e=>"string"==typeof e&&e.trim().length>0).slice(0,8)).length>0?u.join("\n"):l.artifactCount>0?`${l.artifactCount} file${1===l.artifactCount?"":"s"} reported by this task.`:""),1e3),b=m(s.outputSummary??"",4200),m(["Continue this task in the existing task context. Use the current OpenClaw session state and previous result; do not restart unless the operator explicitly asks for a retry.","","Operator follow-up:",g,"","Original mission:",x,w?"":null,w?"Latest result:":null,w||null,b?"":null,b?"Output context:":null,b||null,y?"":null,y?"Existing output/files:":null,y||null].filter(e=>"string"==typeof e).join("\n"),11600)),v=await fetch(`/api/tasks/${encodeURIComponent(e.id)}/control`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"continue",message:k,dispatchId:e.dispatchId??null})}),N=await v.json().catch(()=>null);if(!v.ok||N?.error)throw Error(N?.error||"Unable to send follow-up.");let C=(i=N,d=i?.result,f=d?.result??{},{taskId:I(d?.taskId),runId:I(f.runId)??I(d?.target?.runId),sessionId:I(f.sessionId)??I(d?.target?.sessionId)??I(d?.target?.sessionKey),status:I(f.status),summary:I(f.summary)??(o=f,(Array.isArray(o.payloads)?o.payloads:j(o.result)&&Array.isArray(o.result.payloads)?o.result.payloads:[]).map(e=>j(e)?I(e.text):null).filter(e=>!!e).join("\n").trim()||null)});A("");let O={id:`follow-up:${e.id}:${Date.now()}`,message:$,prompt:k,createdAt:new Date().toISOString(),taskId:C.taskId,dispatchId:e.dispatchId??null,runId:C.runId,sessionId:C.sessionId,status:C.status,summary:C.summary};p.o.success("Follow-up sent.",{description:"AgentOS will continue this task in the existing OpenClaw context."}),await h?.(O)}catch(e){p.o.error("Follow-up failed.",{description:e instanceof Error?e.message:"Unknown task continuation error."})}finally{O(!1)}}};return(0,s.jsxs)("div",{className:(0,g.cn)("rounded-[16px] border border-cyan-200/14 bg-slate-950/36 p-2 shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]",w&&"border-cyan-200/24 bg-slate-950/46",y),onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("div",{className:(0,g.cn)("flex min-h-11 flex-1 items-start gap-2 rounded-[13px] border border-white/[0.07] bg-black/18 px-2.5 py-2 transition-[min-height,border-color,background-color] duration-200",w&&"min-h-14 border-cyan-200/20 bg-black/24"),children:[(0,s.jsx)(l.A,{className:(0,g.cn)("mt-1 h-4 w-4 shrink-0 text-slate-400 transition-transform duration-200",w&&"scale-110 text-cyan-100")}),(0,s.jsx)(d.T,{ref:x,value:N,maxLength:4e3,disabled:C||!_.available,placeholder:"Ask a follow-up...",className:(0,g.cn)("min-h-8 resize-none border-0 bg-transparent p-0 font-medium text-slate-100 caret-emerald-200 shadow-none placeholder:font-medium placeholder:text-slate-400 focus-visible:ring-0",k?"text-base leading-7":"text-[16px] leading-7",w&&"text-[17px]"),rows:w?3:k?1:2,title:_.reason??void 0,onFocus:()=>f?.(),onChange:e=>A(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),P())}})]}),(0,s.jsx)(u.$,{type:"button",size:"icon",disabled:S,title:F??"Send follow-up",className:(0,g.cn)("h-11 w-11 shrink-0 rounded-[13px] border border-cyan-200/16 bg-slate-800 text-emerald-200 shadow-[0_0_24px_rgba(45,212,191,0.08)] hover:bg-slate-700 hover:text-emerald-100",S&&"opacity-55"),onClick:()=>void P(),children:C?(0,s.jsx)(i.A,{className:"h-4 w-4 animate-spin"}):(0,s.jsx)(o.A,{className:"h-4 w-4"})})]}),_.reason?(0,s.jsx)("p",{className:"mt-1.5 px-1 text-[10px] leading-4 text-amber-200/80",children:_.reason}):null]})}function k(e,t){return(0,g.cn)("inline-flex min-w-0 items-center gap-1.5 rounded-full border font-medium",t?"px-2 py-1 text-[10px]":"px-3 py-1.5 text-xs",e.highlighted?"border-emerald-300/18 bg-emerald-300/[0.07] text-emerald-100":"border-white/[0.08] bg-white/[0.03] text-slate-300",e.active&&"border-cyan-200/25 bg-cyan-300/[0.08] text-cyan-100")}function I(e){return"string"==typeof e&&e.trim().length>0?e.trim():null}function j(e){return!!(e&&"object"==typeof e&&!Array.isArray(e))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2207],{1033:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},1214:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("clipboard-check",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]])},1674:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},2961:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},6734:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},8894:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},14247:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},19443:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]])},21600:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]])},22937:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},23083:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]])},24687:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]])},25336:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]])},28072:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},30394:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},33295:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]])},35604:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]])},38402:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("square-arrow-out-up-right",[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]])},38413:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},42394:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},45927:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},47180:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("list-filter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]])},47183:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},47882:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("user-cog",[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])},52493:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},53002:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]])},63406:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("file-spreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]])},63956:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},66159:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("circle-dashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]])},72279:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("file-plus-2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 15h6",key:"4e2qda"}],["path",{d:"M6 12v6",key:"1u72j0"}]])},74318:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("rows-3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]])},75167:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]])},75903:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("bell-ring",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]])},76077:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("chrome",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["line",{x1:"21.17",x2:"12",y1:"8",y2:"8",key:"a0cw5f"}],["line",{x1:"3.95",x2:"8.54",y1:"6.06",y2:"14",key:"1kftof"}],["line",{x1:"10.88",x2:"15.46",y1:"21.94",y2:"14",key:"1ymyh8"}]])},78318:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},81210:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("file-archive",[["path",{d:"M10 12v-1",key:"v7bkov"}],["path",{d:"M10 18v-2",key:"1cjy8d"}],["path",{d:"M10 7V6",key:"dljcrl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 .274 1.01",key:"gkbcor"}],["circle",{cx:"10",cy:"20",r:"2",key:"1xzdoj"}]])},85134:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("import",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]])},87515:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("brain-circuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]])},92172:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("file-input",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 15h10",key:"jfw4w8"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]])},94261:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]])},95236:(e,a,y)=>{y.d(a,{A:()=>t});let t=(0,y(19163).A)("circle-pause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]])}}]);