botmancers 0.6.1 → 0.8.0

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 (266) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +13 -12
  3. package/app/.next/BUILD_ID +1 -1
  4. package/app/.next/app-path-routes-manifest.json +1 -2
  5. package/app/.next/build-manifest.json +3 -3
  6. package/app/.next/prerender-manifest.json +4 -4
  7. package/app/.next/required-server-files.json +2 -2
  8. package/app/.next/routes-manifest.json +8 -12
  9. package/app/.next/server/app/_global-error.html +1 -1
  10. package/app/.next/server/app/_global-error.rsc +1 -1
  11. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/_not-found.html +1 -1
  17. package/app/.next/server/app/_not-found.rsc +2 -2
  18. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  19. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  20. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
  22. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js +2 -2
  23. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
  24. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
  25. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js +3 -3
  26. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -1
  27. package/app/.next/server/app/api/bots/[id]/sessions/route.js +5 -5
  28. package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
  29. package/app/.next/server/app/api/bots/[id]/sessions/sync/route/app-paths-manifest.json +3 -0
  30. package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js +11 -0
  31. package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js.nft.json +1 -0
  32. package/app/.next/server/app/api/bots/[id]/sessions/sync/route_client-reference-manifest.js +3 -0
  33. package/app/.next/server/app/api/bots/[id]/share-policy/route.js +3 -3
  34. package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -1
  35. package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
  36. package/app/.next/server/app/api/bots/availability/route.js +3 -2
  37. package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
  38. package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
  39. package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
  40. package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
  41. package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
  42. package/app/.next/server/app/api/bots/route.js +4 -4
  43. package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
  44. package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
  45. package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
  46. package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
  47. package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
  48. package/app/.next/server/app/api/conversations/[id]/messages/route.js +5 -5
  49. package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
  50. package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
  51. package/app/.next/server/app/api/conversations/[id]/stop/route.js +6 -6
  52. package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
  53. package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
  54. package/app/.next/server/app/api/exchanges/[id]/cancel/route.js +2 -2
  55. package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
  56. package/app/.next/server/app/api/exchanges/[id]/route.js +3 -3
  57. package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
  58. package/app/.next/server/app/api/exchanges/route.js +2 -2
  59. package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
  60. package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
  61. package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
  62. package/app/.next/server/app/api/health/route.js +2 -2
  63. package/app/.next/server/app/api/health/route.js.nft.json +1 -1
  64. package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
  65. package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
  66. package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
  67. package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
  68. package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js +3 -3
  69. package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -1
  70. package/app/.next/server/app/api/shares/route.js +3 -3
  71. package/app/.next/server/app/api/shares/route.js.nft.json +1 -1
  72. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +3 -3
  73. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
  74. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js +3 -3
  75. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
  76. package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js +2 -2
  77. package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
  78. package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js +3 -3
  79. package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
  80. package/app/.next/server/app/api/v0/agents/[agentId]/route.js +3 -3
  81. package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
  82. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js +3 -3
  83. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
  84. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js +3 -3
  85. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
  86. package/app/.next/server/app/api/v0/agents/route.js +3 -3
  87. package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
  88. package/app/.next/server/app/api/v0/capabilities/route.js +3 -3
  89. package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
  90. package/app/.next/server/app/api/v0/conversations/[id]/route.js +2 -2
  91. package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
  92. package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js +3 -3
  93. package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
  94. package/app/.next/server/app/api/v0/exchanges/[id]/route.js +3 -3
  95. package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
  96. package/app/.next/server/app/api/v0/exchanges/route.js +3 -3
  97. package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
  98. package/app/.next/server/app/api/v0/mcp/route.js +4 -4
  99. package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
  100. package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js +3 -3
  101. package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
  102. package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +3 -3
  103. package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
  104. package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +3 -3
  105. package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/v0/requests/[id]/route.js +2 -2
  107. package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
  108. package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js +3 -3
  109. package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
  110. package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js +3 -3
  111. package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
  112. package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js +3 -3
  113. package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -1
  114. package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js +3 -3
  115. package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -1
  116. package/app/.next/server/app/api/v0/shares/[shareRef]/route.js +3 -3
  117. package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -1
  118. package/app/.next/server/app/api/v0/shares/current/route.js +3 -3
  119. package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -1
  120. package/app/.next/server/app/api/v0/shares/route.js +3 -3
  121. package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -1
  122. package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js +2 -2
  123. package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
  124. package/app/.next/server/app/api/wakes/[id]/decision/route.js +2 -2
  125. package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
  126. package/app/.next/server/app/api/wakes/[id]/retry/route.js +2 -2
  127. package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
  128. package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
  129. package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
  130. package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
  131. package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
  132. package/app/.next/server/app/exchanges.html +1 -1
  133. package/app/.next/server/app/exchanges.rsc +3 -3
  134. package/app/.next/server/app/exchanges.segments/_full.segment.rsc +3 -3
  135. package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
  136. package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +3 -3
  137. package/app/.next/server/app/index.html +1 -1
  138. package/app/.next/server/app/index.rsc +3 -3
  139. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  140. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  141. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  142. package/app/.next/server/app/page.js.nft.json +1 -1
  143. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  144. package/app/.next/server/app/settings/page.js.nft.json +1 -1
  145. package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  146. package/app/.next/server/app/settings.html +1 -1
  147. package/app/.next/server/app/settings.rsc +3 -3
  148. package/app/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  149. package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  150. package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +3 -3
  151. package/app/.next/server/app/threads/[id]/page.js.nft.json +1 -1
  152. package/app/.next/server/app/threads/[id]/page_client-reference-manifest.js +1 -1
  153. package/app/.next/server/app-paths-manifest.json +1 -2
  154. package/app/.next/server/chunks/[root-of-the-server]__0d3fjix._.js +1 -1
  155. package/app/.next/server/chunks/[root-of-the-server]__0hhill-._.js +3 -0
  156. package/app/.next/server/chunks/[root-of-the-server]__0k8wfe2._.js +3 -0
  157. package/app/.next/server/chunks/[root-of-the-server]__0mp8bap._.js +1 -1
  158. package/app/.next/server/chunks/[root-of-the-server]__0qaiqut._.js +5 -5
  159. package/app/.next/server/chunks/[root-of-the-server]__0qqsovi._.js +3 -0
  160. package/app/.next/server/chunks/[root-of-the-server]__0zrx1iz._.js +1 -1
  161. package/app/.next/server/chunks/[root-of-the-server]__10b5-i-._.js +1 -1
  162. package/app/.next/server/chunks/[root-of-the-server]__17xl_55._.js +1 -1
  163. package/app/.next/server/chunks/[root-of-the-server]__1j8fg_n._.js +3 -0
  164. package/app/.next/server/chunks/[root-of-the-server]__1x8phwp._.js +44 -0
  165. package/app/.next/server/chunks/[root-of-the-server]__200ep0k._.js +1 -1
  166. package/app/.next/server/chunks/_0061c2q._.js +1 -1
  167. package/app/.next/server/chunks/_057h7zr._.js +3 -0
  168. package/app/.next/server/chunks/_0_b7py8._.js +3 -0
  169. package/app/.next/server/chunks/_0a2do3x._.js +1 -1
  170. package/app/.next/server/chunks/_1-5mthb._.js +1 -1
  171. package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_sessions_sync_route_actions_00y6n-f.js +3 -0
  172. package/app/.next/server/chunks/lib_0-opbv7._.js +330 -0
  173. package/app/.next/server/chunks/lib_0aejojj._.js +330 -0
  174. package/app/.next/server/chunks/lib_0il0ml1._.js +330 -0
  175. package/app/.next/server/chunks/lib_0iujsdg._.js +330 -0
  176. package/app/.next/server/chunks/lib_0kik6bx._.js +20 -20
  177. package/app/.next/server/chunks/lib_0pe3tiv._.js +20 -20
  178. package/app/.next/server/chunks/{lib_1zc7-gl._.js → lib_15a9ejf._.js} +122 -130
  179. package/app/.next/server/chunks/{lib_15adnlz._.js → lib_19pzc33._.js} +122 -130
  180. package/app/.next/server/chunks/lib_1a4ucxv._.js +330 -0
  181. package/app/.next/server/chunks/lib_1dehbst._.js +330 -0
  182. package/app/.next/server/chunks/lib_1z4vnh4._.js +330 -0
  183. package/app/.next/server/chunks/lib_1z7d95m._.js +2181 -0
  184. package/app/.next/server/chunks/lib_db_ts_1ttuckb._.js +58 -56
  185. package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +5 -5
  186. package/app/.next/server/chunks/ssr/_00ysoah._.js +3 -0
  187. package/app/.next/server/chunks/ssr/_14d-lxn._.js +3 -0
  188. package/app/.next/server/chunks/ssr/_1cvuhjt._.js +1 -1
  189. package/app/.next/server/chunks/ssr/_1lkd0ui._.js +3 -0
  190. package/app/.next/server/chunks/ssr/_1n5mvo5._.js +1 -1
  191. package/app/.next/server/chunks/ssr/_1o94bnv._.js +8 -1
  192. package/app/.next/server/chunks/ssr/_1r5kd5j._.js +3 -0
  193. package/app/.next/server/chunks/ssr/app_1-nwnha._.js +3 -0
  194. package/app/.next/server/chunks/ssr/app_bots_[id]_config_page_tsx_1e0uue9._.js +1 -1
  195. package/app/.next/server/chunks/ssr/lib_exchange-view_ts_1a4q9ju._.js +3 -0
  196. package/app/.next/server/instrumentation.js +1 -1
  197. package/app/.next/server/middleware-build-manifest.js +3 -3
  198. package/app/.next/server/pages/404.html +1 -1
  199. package/app/.next/server/pages/500.html +1 -1
  200. package/app/.next/server/server-reference-manifest.js +1 -1
  201. package/app/.next/server/server-reference-manifest.json +1 -1
  202. package/app/.next/static/chunks/0y1ihx4vq8du3.js +10 -0
  203. package/app/.next/static/chunks/1c2dl2ga-lqcb.css +3 -0
  204. package/app/.next/static/chunks/2q-tgwkalrnms.js +1 -0
  205. package/app/.next/static/chunks/2qf-mb__71dkk.js +1 -0
  206. package/app/.next/static/chunks/399dvlpyl00wn.js +1 -0
  207. package/app/.next/static/chunks/3b7r6u9nfsjb1.js +1 -0
  208. package/app/.next/static/chunks/3f1v-zuki9k7k.js +1 -0
  209. package/app/.next/static/chunks/3whw2-l4a2sli.js +1 -0
  210. package/app/BUILD_INFO.json +2 -2
  211. package/app/package.json +1 -1
  212. package/app/server.js +1 -1
  213. package/dist/cli.d.ts +1 -1
  214. package/dist/cli.js +2 -2
  215. package/dist/product.d.ts +0 -1
  216. package/dist/product.js +12 -22
  217. package/dist/setup.js +9 -9
  218. package/package.json +1 -2
  219. package/schemas/botmancers.mcp.v2.tools.json +3 -3
  220. package/app/.next/server/app/api/agent-deck/decks/route/app-paths-manifest.json +0 -3
  221. package/app/.next/server/app/api/agent-deck/decks/route.js +0 -9
  222. package/app/.next/server/app/api/agent-deck/decks/route.js.nft.json +0 -1
  223. package/app/.next/server/app/api/agent-deck/decks/route_client-reference-manifest.js +0 -3
  224. package/app/.next/server/app/api/agent-deck/settings/route/app-paths-manifest.json +0 -3
  225. package/app/.next/server/app/api/agent-deck/settings/route/build-manifest.json +0 -12
  226. package/app/.next/server/app/api/agent-deck/settings/route/server-reference-manifest.json +0 -4
  227. package/app/.next/server/app/api/agent-deck/settings/route.js +0 -9
  228. package/app/.next/server/app/api/agent-deck/settings/route.js.nft.json +0 -1
  229. package/app/.next/server/app/api/agent-deck/settings/route_client-reference-manifest.js +0 -3
  230. package/app/.next/server/chunks/[root-of-the-server]__0e_agq4._.js +0 -3
  231. package/app/.next/server/chunks/[root-of-the-server]__0j4pjyg._.js +0 -3
  232. package/app/.next/server/chunks/[root-of-the-server]__0mo_kn3._.js +0 -48
  233. package/app/.next/server/chunks/[root-of-the-server]__17mum5-._.js +0 -3
  234. package/app/.next/server/chunks/[root-of-the-server]__1bhzfu_._.js +0 -7
  235. package/app/.next/server/chunks/[root-of-the-server]__1g_n99l._.js +0 -3
  236. package/app/.next/server/chunks/[root-of-the-server]__1t4ybp2._.js +0 -48
  237. package/app/.next/server/chunks/_0qv-4by._.js +0 -3
  238. package/app/.next/server/chunks/_next-internal_server_app_api_agent-deck_decks_route_actions_0yguyfv.js +0 -3
  239. package/app/.next/server/chunks/_next-internal_server_app_api_agent-deck_settings_route_actions_0z_nbkb.js +0 -3
  240. package/app/.next/server/chunks/lib_0v4d9w0._.js +0 -339
  241. package/app/.next/server/chunks/lib_0v6lblw._.js +0 -5
  242. package/app/.next/server/chunks/lib_0zzo6zb._.js +0 -339
  243. package/app/.next/server/chunks/lib_1_u7n-u._.js +0 -339
  244. package/app/.next/server/chunks/lib_1muhwn7._.js +0 -339
  245. package/app/.next/server/chunks/lib_1xnxg-q._.js +0 -339
  246. package/app/.next/server/chunks/ssr/_0_fa0na._.js +0 -3
  247. package/app/.next/server/chunks/ssr/_0epgorw._.js +0 -3
  248. package/app/.next/server/chunks/ssr/_1i02yyi._.js +0 -3
  249. package/app/.next/server/chunks/ssr/app_components_AgentDeckRuntime_tsx_024janf._.js +0 -3
  250. package/app/.next/server/chunks/ssr/app_exchanges_page_tsx_0j-n2a1._.js +0 -3
  251. package/app/.next/server/chunks/ssr/app_settings_page_tsx_1t-rdz-._.js +0 -3
  252. package/app/.next/server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_1ztp13a._.js +0 -3
  253. package/app/.next/static/chunks/0jon21u-9j2aw.css +0 -3
  254. package/app/.next/static/chunks/14k6cvywgknx2.js +0 -3
  255. package/app/.next/static/chunks/1ku9himlsx-hn.js +0 -1
  256. package/app/.next/static/chunks/1r5tqd-7h1xjn.js +0 -1
  257. package/app/.next/static/chunks/21aqekm5z0j47.js +0 -1
  258. package/app/.next/static/chunks/22xbkclbkct3s.js +0 -1
  259. package/app/.next/static/chunks/2c953okoei6ip.js +0 -1
  260. package/app/.next/static/chunks/2t_2gf3xoxz_m.js +0 -1
  261. package/app/.next/static/chunks/34vnvo1qssbaj.js +0 -1
  262. /package/app/.next/server/app/api/{agent-deck/decks → bots/[id]/sessions/sync}/route/build-manifest.json +0 -0
  263. /package/app/.next/server/app/api/{agent-deck/decks → bots/[id]/sessions/sync}/route/server-reference-manifest.json +0 -0
  264. /package/app/.next/static/{_yrIZIFsIbXA0Gaxkytjd → 3rSDqQK0KGcTDI98uoZRy}/_buildManifest.js +0 -0
  265. /package/app/.next/static/{_yrIZIFsIbXA0Gaxkytjd → 3rSDqQK0KGcTDI98uoZRy}/_clientMiddlewareManifest.js +0 -0
  266. /package/app/.next/static/{_yrIZIFsIbXA0Gaxkytjd → 3rSDqQK0KGcTDI98uoZRy}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,87303,37947,e=>{"use strict";var t=e.i(43476),s=e.i(71645);let a=[{id:"purple",label:"Purple",hex:"#7C3AED"},{id:"blue",label:"Blue",hex:"#2563EB"},{id:"teal",label:"Teal",hex:"#0D9488"},{id:"green",label:"Green",hex:"#16A34A"},{id:"amber",label:"Amber",hex:"#B45309"},{id:"orange",label:"Orange",hex:"#EA580C"},{id:"pink",label:"Pink",hex:"#DB2777"},{id:"slate",label:"Slate",hex:"#64748B"}],n=[{id:"dots",label:"Round dots"},{id:"sleepy",label:"Sleepy"},{id:"happy",label:"Happy arcs"},{id:"wide",label:"Wide ovals"}],r=[{id:"folded",label:"Folded arms"},{id:"reaching",label:"Reaching right"},{id:"waving",label:"Waving"}],i=[{id:"none",label:"None"},{id:"crown",label:"Crown"},{id:"glasses",label:"Glasses"},{id:"headset",label:"Headset"},{id:"hat",label:"Hat"},{id:"bow",label:"Bow"}],o={color:"purple",eyes:"dots",hands:"folded",accessory:"none"},l={...o,accessory:"crown"};function c(e,t){return"string"==typeof t&&e.some(e=>e.id===t)}function d(e){let t=c(a,e.avatar_color)?e.avatar_color:o.color,s=c(n,e.avatar_eyes)?e.avatar_eyes:o.eyes;return{color:t,eyes:s,hands:c(r,e.avatar_hands)?e.avatar_hands:o.hands,accessory:c(i,e.avatar_accessory)?e.avatar_accessory:"chief-of-staff"===String(e.name??"").trim().toLowerCase()?l.accessory:o.accessory}}let u=[{x:70,y:70.5,w:38,h:6},{x:70,y:82,w:38,h:6}];function h(e){return u.map(t=>`<rect x="${t.x}" y="${t.y}" width="${t.w}" height="${t.h}" rx="${t.h/2}" ${e}/>`).join("")}function p(e,t="static"){var s,n;let r,i,o=a.find(t=>t.id===e.color)?.hex??a[0].hex,l=String(t).replace(/[^A-Za-z0-9_-]/g,"")||"static",c=`avatar-knockout-${l}`,d=`fill="none" stroke="${o}" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"`,u=(s=e.hands,n=e.accessory,r=[],"reaching"===s&&r.push({x1:87.6,y1:69,x2:90.4,y2:86.5,w:8}),"waving"===s&&r.push({x1:35,y1:59,x2:28,y2:72,w:10}),"crown"===n&&r.push({x1:44,y1:30,x2:76,y2:30,w:9}),"hat"===n&&r.push({x1:38,y1:34,x2:82,y2:34,w:9}),"bow"===n&&r.push({x1:60,y1:28.5,x2:84,y2:28,w:10}),"headset"===n&&(r.push({x1:42,y1:24.5,x2:78,y2:24.5,w:10}),r.push({x1:33,y1:55,x2:37,y2:64,w:8}),r.push({x1:83,y1:55,x2:87,y2:64,w:8})),"glasses"===n&&(r.push({x1:29,y1:56,x2:34,y2:62,w:8}),r.push({x1:86,y1:62,x2:91,y2:56,w:8})),r).map(e=>`<line x1="${e.x1}" y1="${e.y1}" x2="${e.x2}" y2="${e.y2}" stroke="#000000" stroke-width="${e.w}" stroke-linecap="round"/>`).join(""),f=`avatar-arms-${l}`,m="reaching"===e.hands,g=m?`<mask id="${f}"><rect x="0" y="0" width="120" height="120" fill="#ffffff"/>${h('fill="#000000" stroke="#000000" stroke-width="7"')}</mask>`:"",k=function(e,t){let s=`fill="none" stroke="${t}" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"`;switch(e){case"sleepy":return`<g data-avatar-layer="eyes" data-avatar-eyes="sleepy"><path d="M42 61 Q48 64 54 61" ${s}/><path d="M66 61 Q72 64 78 61" ${s}/></g>`;case"happy":return`<g data-avatar-layer="eyes" data-avatar-eyes="happy"><path d="M42 63 Q48 54 54 63" ${s}/><path d="M66 63 Q72 54 78 63" ${s}/></g>`;case"wide":return`<g data-avatar-layer="eyes" data-avatar-eyes="wide"><ellipse cx="48" cy="60" rx="5.5" ry="8" ${s}/><ellipse cx="72" cy="60" rx="5.5" ry="8" ${s}/></g>`;default:return`<g data-avatar-layer="eyes" data-avatar-eyes="dots"><circle cx="48" cy="60" r="3.5" ${s}/><circle cx="72" cy="60" r="3.5" ${s}/></g>`}}(e.eyes,o),y=function(e,t){let s=`fill="none" stroke="${t}" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"`;switch(e){case"crown":return`<g data-avatar-layer="accessory" data-avatar-accessory="crown"><path d="M44 31 L46.5 14 L54 24 L60 10 L66 24 L73.5 14 L76 31 Z" ${s}/></g>`;case"glasses":return`<g data-avatar-layer="accessory" data-avatar-accessory="glasses"><circle cx="48" cy="60" r="9" ${s}/><circle cx="72" cy="60" r="9" ${s}/><path d="M57 60 Q60 57 63 60" ${s}/><path d="M39 59 L32 57" ${s}/><path d="M81 59 L88 57" ${s}/></g>`;case"headset":return`<g data-avatar-layer="accessory" data-avatar-accessory="headset"><path d="M36 62 Q34 24 60 24 Q86 24 84 62" ${s}/><rect x="79" y="54" width="10" height="17" rx="5" ${s}/><path d="M84 71 Q80 84 66 84" ${s}/></g>`;case"hat":return`<g data-avatar-layer="accessory" data-avatar-accessory="hat"><path d="M38 34 Q60 40 82 34" ${s}/><path d="M46 34 Q48 14 60 14 Q72 14 74 34" ${s}/></g>`;case"bow":return`<g data-avatar-layer="accessory" data-avatar-accessory="bow"><circle cx="79" cy="29" r="3.5" ${s}/><path d="M76 27 L62 18 Q60 26 66 32 Z" ${s}/><path d="M82 27 L95 19 Q97 27 91 32 Z" ${s}/></g>`;default:return'<g data-avatar-layer="accessory" data-avatar-accessory="none"></g>'}}(e.accessory,o);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" role="img" data-avatar-color="${e.color}" data-avatar-eyes="${e.eyes}" data-avatar-hands="${e.hands}" data-avatar-accessory="${e.accessory}"><mask id="${c}"><rect x="0" y="0" width="120" height="120" fill="#ffffff"/>${u}</mask>`+g+`<g data-avatar-layer="body" mask="url(#${c})">`+`<path d="M60 28 C75 28 84 39 85.5 56 L91 90 C92.5 98 87 102 79 102 L41 102 C33 102 27.5 98 29 90 L34.5 56 C36 39 45 28 60 28 Z" ${d}/>`+`<path d="M54 71 Q60 75.5 66 71" ${d}/>`+`<path data-avatar-brows="straight" d="${i="wide"===e.eyes?45:46,`M42 ${i} H54 M66 ${i} H78`}" fill="none" stroke="${o}" stroke-width="4.8" stroke-linecap="round"/>`+"</g>"+(m?`<g mask="url(#${f})">${k}</g>`:k)+function(e,t){let s=`fill="none" stroke="${t}" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"`;switch(e){case"reaching":return'<g data-avatar-layer="hands" data-avatar-hands="reaching">'+h(s)+"</g>";case"waving":return`<g data-avatar-layer="hands" data-avatar-hands="waving"><path d="M32 68 Q24 60 22 48" ${s}/><circle cx="21" cy="41" r="5" ${s}/><path d="M11 36 Q9 46 12 54" ${s}/></g>`;default:return`<g data-avatar-layer="hands" data-avatar-hands="folded"><rect x="44" y="79" width="32" height="9" rx="4.5" ${s}/><rect x="46" y="90" width="28" height="9" rx="4.5" ${s}/></g>`}}(e.hands,o)+(m?`<g mask="url(#${f})">${y}</g>`:y)+"</svg>"}e.s(["AVATAR_ACCESSORIES",0,i,"AVATAR_COLORS",0,a,"AVATAR_EYES",0,n,"AVATAR_HANDS",0,r,"renderAvatarSvg",0,p,"resolveAvatar",0,d],37947),e.s(["default",0,function({bot:e,config:a,size:n=28,className:r,title:i}){let o=(0,s.useId)().replace(/[^A-Za-z0-9_-]/g,"")||"avatar",l=p(a??e?.avatar_config??d(e??{}),o).replace("<svg ",`<svg width="${n}" height="${n}" `);return(0,t.jsx)("span",{className:r??"bot-avatar",style:{display:"inline-flex",width:n,height:n,flex:"none"},title:i,"aria-label":i??"Agent avatar",role:"img",dangerouslySetInnerHTML:{__html:l}})}],87303)},15983,10718,24204,e=>{"use strict";var t=e.i(43476),s=e.i(71645);let a="Permanently removes each agent with its direct conversation, messages, queue rows, approvals, launch snapshots, memories, one-shots, routines, and pending questions. There is no undo.",n="Skill files, working directories, Hermes profiles, and imported source files stay on disk.";function r(e){return"chief"===e?"Chief of Staff cannot be deleted.":"Working now — stop it or let it finish before deleting."}function i(e){return 1===e?"Delete agent":`Delete ${e} agents`}e.s(["DELETE_KEEPS_COPY",0,n,"DELETE_REMOVES_COPY",0,a,"blockedReasonCopy",0,r,"deleteConfirmLabel",0,i,"deletedStatusLine",0,function(e){return 1===e?"Deleted 1 agent.":`Deleted ${e} agents.`}],10718),e.s(["default",0,function({ids:e,onCancel:o,onDeleted:l}){let c=(0,s.useId)(),[d,u]=(0,s.useState)(null),[h,p]=(0,s.useState)(""),[f,m]=(0,s.useState)(""),[g,k]=(0,s.useState)(!1),y=(0,s.useRef)(null),w=(0,s.useRef)(null),v=e.join("\n");(0,s.useEffect)(()=>{let e=!1;return fetch("/api/bots/delete-preview",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:v.split("\n")})}).then(async t=>{let s=await t.json().catch(()=>null);if(!e){if(!t.ok)return void p("string"==typeof s?.error?s.error:"Could not load the deletion preview.");u(s)}}).catch(()=>{e||p("Could not load the deletion preview.")}),()=>{e=!0}},[v]),(0,s.useEffect)(()=>{y.current?.focus()},[]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&(e.stopPropagation(),g||o())};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[g,o]);let b=e.length,x=!d||d.blocked.length>0||d.missing.length>0,_=async()=>{if(!g&&!x){k(!0),m("");try{let t=await fetch("/api/bots",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:e})}),s=await t.json().catch(()=>null);if(!t.ok){m("string"==typeof s?.error&&s.error?s.error:`Delete failed (${t.status}).`),k(!1),requestAnimationFrame(()=>y.current?.focus());return}l(Array.isArray(s?.deleted)?s.deleted:[])}catch{m("Delete failed: the server did not respond."),k(!1),requestAnimationFrame(()=>y.current?.focus())}}};return(0,t.jsx)("div",{className:"modal-scrim delete-scrim",onKeyDown:e=>{if("Tab"!==e.key||!w.current)return;let t=Array.from(w.current.querySelectorAll("button:not(:disabled)"));if(0===t.length)return;let s=t[0],a=t[t.length-1];e.shiftKey&&document.activeElement===s?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),s.focus())},children:(0,t.jsxs)("div",{ref:w,className:"delete-card",role:"alertdialog","aria-modal":"true","aria-labelledby":c,"data-testid":"delete-agents-dialog",children:[(0,t.jsx)("h2",{id:c,className:"delete-title",children:1===b?"Delete this agent permanently?":`Delete ${b} agents permanently?`}),h?(0,t.jsx)("p",{className:"delete-error",role:"alert",children:h}):null,d||h?null:(0,t.jsx)("p",{className:"delete-copy",children:"Checking what will be removed…"}),d?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("ul",{className:"delete-names","aria-label":"Agents to delete",children:[d.agents.map(e=>(0,t.jsx)("li",{children:e.name},e.id)),d.missing.map(e=>(0,t.jsxs)("li",{children:["Not found: ",e]},e))]}),d.blocked.length>0?(0,t.jsxs)("div",{className:"delete-blocked",role:"alert",children:[(0,t.jsx)("p",{children:"Nothing can be deleted until these are deselected:"}),(0,t.jsx)("ul",{children:d.blocked.map(e=>(0,t.jsxs)("li",{children:[e.name," — ",r(e.reason)]},e.id))})]}):null,(0,t.jsx)("p",{className:"delete-copy",children:a}),(0,t.jsx)("p",{className:"delete-copy delete-keeps",children:n})]}):null,f?(0,t.jsx)("p",{className:"delete-error",role:"alert",children:f}):null,(0,t.jsxs)("div",{className:"form-actions delete-actions",children:[(0,t.jsx)("button",{ref:y,type:"button",className:"cancel-btn",onClick:o,disabled:g,children:"Cancel"}),(0,t.jsx)("button",{type:"button",className:"delete-btn",onClick:()=>{_()},disabled:g||x,children:g?"Deleting…":i(b)})]})]})})}],15983);var o=e.i(63352),l=e.i(50814);function c(e){return"active"===e.state}let d=/^T[A-Z0-9]{2,20}$/,u=/^[CG][A-Z0-9]{2,20}$/;e.s(["SHARE_DURATIONS",0,[{label:"5 minutes",seconds:300},{label:"1 hour",seconds:3600},{label:"8 hours",seconds:28800},{label:"24 hours",seconds:86400}],"SHARE_STATUS_LABELS",0,{active:"Active",exhausted:"Questions used",answering:"Answering",recovering:"Recovering",expired:"Expired",revoked:"Revoked"},"audienceInputError",0,function(e,t,s){let a=e.trim(),n=t.trim();return d.test(a)?u.test(n)?s.some(e=>e.team_id===a&&e.channel_id===n)?"That channel is already on the allowlist.":null:"Channel ID must look like C0123ABCD (a public or private channel ID; no wildcards).":"Workspace ID must look like T0123ABCD (a Slack team ID; no wildcards)."},"audienceLabel",0,function(e){return`Slack channel ${e.channel_id} \xb7 workspace ${e.team_id}`},"createdByLabel",0,function(e){return"owner"===e.created_by?"Shared by you":"current_session"===e.created_by?"Shared from a turn of this session":"Shared by a service"},"expiryLabel",0,function(e,t=Date.now()){return"revoked"===e.state?`Revoked ${(0,o.formatSessionDate)(e.revoked_at??e.expires_at)}`:"expired"===e.state||e.expires_at<=t?`Expired ${(0,o.formatSessionDate)(e.expires_at)}`:`Expires ${(0,o.formatSessionDate)(e.expires_at)} (in ${function(e){let t=Math.max(1,Math.round(e/6e4));if(t<60)return`${t} min`;let s=Math.floor(t/60),a=t%60;return a?`${s} h ${a} min`:`${s} h`}(e.expires_at-t)})`},"sessionShares",0,function(e,t){let s=e.filter(e=>e.session_ref===t);return[...s.filter(c).sort((e,t)=>t.created_at-e.created_at),...s.filter(e=>!c(e)).sort((e,t)=>(t.revoked_at??t.expires_at)-(e.revoked_at??e.expires_at))]},"shareCreateAvailability",0,function(e,t){let s=`/bots/${encodeURIComponent(e.agent.id)}/config#session-sharing`;if(!t)return{available:!1,reason:"Share to Slack is unavailable: the share policy could not be loaded.",configHref:null};let a=(0,l.sessionRowActions)(e).find(e=>"ask"===e.action);return a&&!a.availability.available?{available:!1,reason:a.availability.reason.replace(/^Ask from this context is unavailable:/,"Share to Slack is unavailable:"),configHref:null}:"invalid"===t.state?{available:!1,reason:"Share to Slack is unavailable: the share policy file is invalid. Fix it in Config.",configHref:s}:0===t.audiences.length?{available:!1,reason:"Share to Slack needs a Slack channel on the share allowlist. Add one in Config.",configHref:s}:{available:!0}},"shareCreateBody",0,function(e,t,s,a){return{audience:{team_id:e.team_id,channel_id:e.channel_id},ttl_seconds:t,max_turns:s,idempotency_key:a}},"shareFromTurnNote",0,function(e){return e.agent.share_current.supported?e.agent.share_from_turn?"On: a turn Botmancers launches for this Agent can share its own session to an allowlisted channel. Turning it off revokes every live turn context at once.":"Off: no turn of this Agent can share its own session. Sessions can still be shared from the Sessions drawer.":e.agent.share_current.reason??"This runtime cannot share its own session from a turn."},"shareIsLive",0,c,"shareStatusNote",0,function(e){switch(e.status){case"active":return"Slack replies in its thread ask this session (read-only).";case"answering":return"A Slack question is being answered now. The next one waits until it finishes.";case"recovering":return"A question was interrupted by a Botmancers restart. The next Slack question clears it.";case"exhausted":return`All ${e.max_turns} questions are used. Slack questions get the limit notice; create a new share to keep going.`;case"expired":return"Expired: Slack questions get the expired notice. Its history stays here.";case"revoked":return"Revoked: Slack questions get the revoked notice. Its history stays here."}},"threadLabel",0,function(e){return e.thread.posted?`Slack thread posted ${(0,o.formatSessionDate)(e.thread.posted_at??0)}`:"active"===e.state?"Waiting for the Slack relay to post the thread":"No Slack thread was posted"},"turnsLabel",0,function(e){return`${e.turns_used} of ${e.max_turns} question${1===e.max_turns?"":"s"} used`}],24204)},33851,44079,52900,e=>{"use strict";var t=e.i(3136);let s="This computer",a={direct:"Direct",agent_deck:"Agent Deck"},n={read_only:"Read only",workspace_write:"Workspace write"},r={workspaces:"Selected workspaces",sessions:"Selected imported sessions",all_provider_sessions:"All sessions this runtime can see"};function i(e){return e.startsWith("/")||"~"===e||e.startsWith("~/")}function o(e){return e.length>1?e.replace(/\/+$/,""):e}t.AGENTS.join("|");var l=e.i(74904);let c="/api/runtime-connections",d={connection:"Runtime connection",scope:"Session scope",defaultWorkspace:"Default workspace (optional)",launchProfile:"Launch profile",policy:"Policy",homeSession:"Home session (optional)"},u={connection:"The runtime installation or account this Agent uses. Several Agents can share one.",workspaces:"One absolute path per line. An empty scope never means unrestricted.",sessions:"Only this Agent’s own Botmancers sessions can be selected.",noSessions:"This Agent has no sessions yet. Choose workspaces or all sessions for now.",allSessions:"Every session this runtime can see. Choose this only on purpose.",defaultWorkspace:"Where new sessions start. Convenience only — not a permission.",direct:"Launches the runtime directly. Agent Deck is not contacted.",agentDeck:"Launches through a verified Agent Deck from the configured server.",resumeEdits:"Needs Workspace write.",homeSession:"A stable session to return to. Must be one of this Agent’s sessions.",addConnection:"Stores a name and host only. Credentials stay with the runtime."},h="Loading runtime connections…",p="Couldn't load runtime connections — retry.";function f(){return{status:"loading",connections:[],error:""}}function m(e){return`${e.label} \xb7 ${t.AGENT_LABELS[e.provider]??e.provider}`}function g(e){if("object"!=typeof e||null===e)return null;let t=e.connections;if(!Array.isArray(t))return null;let s=[];for(let e of t){if("object"!=typeof e||null===e||"string"!=typeof e.id||"string"!=typeof e.provider||"string"!=typeof e.label)return null;s.push({id:e.id,provider:e.provider,label:e.label,host:"string"==typeof e.host?e.host:"",agent_count:"number"==typeof e.agent_count?e.agent_count:void 0})}return s}function k(e){let t=[];for(let s of e.split("\n")){let e=s.trim();e&&!t.includes(e)&&t.push(e)}return t}function y(e){return"workspaces"===e.scopeKind?{kind:"workspaces",workspaces:k(e.workspaces)}:"sessions"===e.scopeKind?{kind:"sessions",sessions:e.sessions}:{kind:e.scopeKind}}function w(e){return{mode:e.policyMode,allow_new_sessions:e.allowNewSessions,allow_resume_with_edits:e.allowResumeWithEdits}}e.s(["CONNECTIONS_ENDPOINT",0,c,"CONNECTIONS_ERROR_COPY",0,p,"CONNECTIONS_LOADING_COPY",0,h,"DEFAULT_REGISTRATION_FORM",0,{connectionId:"",scopeKind:"",workspaces:"",sessions:[],defaultWorkspace:"",launchProfile:"",deckId:"",workingDirectory:"",policyMode:"read_only",allowNewSessions:!0,allowResumeWithEdits:!1,homeSessionId:""},"HINTS",0,u,"LABELS",0,d,"connectionOptionLabel",0,m,"hasRegistrationErrors",0,function(e){return Object.keys(e.errors).length>0},"initialConnectionListState",0,f,"parseConnectionList",0,g,"registrationCreateBody",0,function(e,t){let s={name:String(e??"").trim(),runtime_connection_id:t.connectionId,launch_profile:t.launchProfile||null,session_scope:y(t),policy:w(t)},a=t.defaultWorkspace.trim();if(a&&(s.default_workspace=a),"agent_deck"===t.launchProfile){s.deck_id=t.deckId.trim();let e=t.workingDirectory.trim();e&&(s.working_directory=e)}return s},"registrationFormFromBot",0,function(e){let t=e.session_scope??null,s="direct"===e.launch_profile||"agent_deck"===e.launch_profile?e.launch_profile:"",a=!0===e.needs_deck_selection||1===e.needs_deck_selection,n=(e.working_directory??"").trim();return{connectionId:e.runtime_connection_id??"",scopeKind:t?.kind??"",workspaces:t?.kind==="workspaces"?t.workspaces.join("\n"):"",sessions:t?.kind==="sessions"?[...t.sessions]:[],defaultWorkspace:e.default_workspace??"",launchProfile:s,deckId:"agent_deck"!==s||a?"":(e.deck_id??"").trim(),workingDirectory:"agent_deck"===s&&n&&n!==(0,l.defaultWorkdirFor)(e.id??"")?n:"",policyMode:e.policy?.mode??"read_only",allowNewSessions:!e.policy||e.policy.allow_new_sessions,allowResumeWithEdits:!!e.policy&&e.policy.allow_resume_with_edits,homeSessionId:e.home_session_id??""}},"registrationFormView",0,function(e,t,s){let a={};e.connectionId||(a.connection="Pick a runtime connection.");let n=k(e.workspaces);e.scopeKind?"workspaces"===e.scopeKind?0===n.length?a.workspaces="Add at least one workspace.":n.every(i)||(a.workspaces="Workspaces must be absolute paths (or start with ~/)."):"sessions"===e.scopeKind&&0===e.sessions.length&&(a.sessions="Select at least one session."):a.scope="Choose a session scope.";let r=e.defaultWorkspace.trim();r&&(i(r)?"workspaces"!==e.scopeKind||a.workspaces||n.some(e=>{let t,s;return t=o(e),t===(s=o(r))||s.startsWith("/"===t?"/":`${t}/`)})||(a.defaultWorkspace="The default workspace must be inside one of the selected workspaces."):a.defaultWorkspace="The default workspace must be an absolute path (or start with ~/)."),e.launchProfile?"agent_deck"!==e.launchProfile||e.deckId.trim()||(a.deck="Select an Agent Deck for this agent."):a.launchProfile="Choose Direct or Agent Deck.",e.allowResumeWithEdits&&"workspace_write"!==e.policyMode&&(a.policy="Resume with edits needs the Workspace write policy.");let c="agent_deck"===e.launchProfile,d="",u=!1;return"ready"!==s.status?(u=!0,d="error"===s.status?p:""):c&&"connected"!==t.status&&(u=!0,d="loading"===t.status?"":l.DECK_SLOT_COPY[t.status]),{errors:a,showsAgentDeck:c,submitDisabled:u,blocker:d}},"registrationPatchBody",0,function(e,t){let s={id:e,runtime_connection_id:t.connectionId,launch_profile:t.launchProfile||null,session_scope:y(t),default_workspace:t.defaultWorkspace.trim(),policy:w(t),home_session_id:t.homeSessionId};if("agent_deck"===t.launchProfile){let a=t.workingDirectory.trim();s.deck_id=t.deckId.trim(),s.working_directory=a&&a!==(0,l.defaultWorkdirFor)(e)?a:""}return s},"registrationReadView",0,function(e,s,i){var o;let c,u=[{key:"connection",label:d.connection,value:(c=e.runtime_connection)?`${c.label} (${(0,t.agentLabel)(c.provider)} \xb7 ${c.host})`:"Not set"},{key:"scope",label:d.scope,value:function(e,t){if(!e)return"Not set — this Agent cannot launch until a scope is chosen.";if("all_provider_sessions"===e.kind)return r.all_provider_sessions;if("workspaces"===e.kind)return`${r.workspaces}: ${e.workspaces.join(", ")}`;let s=e.sessions.map(e=>t?.find(t=>t.ref===e)?.title??e);return`${r.sessions}: ${s.join(", ")}`}(e.session_scope,i)},{key:"defaultWorkspace",label:"Default workspace",value:e.default_workspace||"None"},{key:"launchProfile",label:d.launchProfile,value:"direct"===e.launch_profile?a.direct:"agent_deck"===e.launch_profile?a.agent_deck:"Not chosen"}],h=[];if("agent_deck"===e.launch_profile){let t=!0===e.needs_deck_selection||1===e.needs_deck_selection||!(e.deck_id??"").trim();u.push({key:"deck",label:"Agent Deck",value:t?"not selected":(0,l.deckLabel)(e.deck_id??"",s)});let a=(e.working_directory??"").trim();u.push({key:"workdir",label:"Working directory",value:a||(0,l.defaultWorkdirFor)(e.id??"{agentID}")}),!t&&(0,l.isDeckUnavailable)(e,s)&&h.push("This deck isn't on the configured server right now. Pick another deck, or fix the server in Settings.")}u.push({key:"policy",label:d.policy,value:(o=e.policy)?[n[o.mode],o.allow_new_sessions?"new sessions allowed":"no new sessions",o.allow_resume_with_edits?"resume with edits allowed":"no resume with edits"].join(" · "):"Not set"});let p=e.home_session_id?i?.find(t=>t.ref===e.home_session_id)?.title??e.home_session_id:"None";if(u.push({key:"homeSession",label:"Home session",value:p}),e.launch_profile)"direct_runtime"===e.launch_blocker&&h.push("Registered for direct launch. Direct sessions for this runtime arrive in a later Botmancers version.");else{let t=(e.deck_name??"").trim();h.push(`Choose Direct or Agent Deck before this Agent can run${t?` (was Agent Deck "${t}")`:""}.`)}return{rows:u,notices:h}}],33851);var v=e.i(43476),b=e.i(71645),x=e.i(10331);let _={modal:{fieldset:"agent-fieldset reg-fieldset",legend:"field-legend",label:"",picks:"runtime-picks",pick:"runtime-pick",stack:"reg-stack",control:"deck-control",input:"",hint:"runtime-hint",error:"form-error reg-error",button:"runtime-retry",note:"runtime-note"},config:{fieldset:"agent-fieldset reg-fieldset",legend:"block text-sm cfg-muted mt-3 mb-1 p-0",label:"block text-sm cfg-muted mt-3 mb-1",picks:"flex flex-wrap gap-x-4 gap-y-1 text-sm cfg-muted",pick:"text-sm cfg-muted",stack:"flex flex-col gap-1 text-sm cfg-muted",control:"cfg-input text-sm",input:"cfg-input text-sm",hint:"mt-1 text-xs cfg-faint",error:"mt-1 text-sm cfg-error",button:"cfg-link text-sm",note:"text-sm cfg-muted mt-1"}};function $({id:e,message:t,variant:s}){return t?(0,v.jsx)("p",{id:e,className:_[s].error,role:"alert",children:t}):null}function j({idPrefix:e,variant:t,onAdd:a}){let n=_[t],[r,i]=(0,b.useState)(!1),[o,c]=(0,b.useState)(l.AGENT_OPTIONS[0].value),[d,h]=(0,b.useState)(""),[p,f]=(0,b.useState)(""),[m,g]=(0,b.useState)(""),[k,y]=(0,b.useState)(!1),w=async()=>{if(k)return;y(!0),g("");let e=await a({provider:o,label:d,host:p.trim()||s});(y(!1),"string"==typeof e)?g(e):(i(!1),h(""),f(""))};return r?(0,v.jsxs)("div",{id:`${e}-add-connection`,className:"reg-add-connection",role:"group","aria-label":"Add connection",children:[(0,v.jsx)("label",{className:n.label,htmlFor:`${e}-add-provider`,children:"Provider"}),(0,v.jsx)("select",{id:`${e}-add-provider`,className:n.control,value:o,onChange:e=>c(e.target.value),children:l.AGENT_OPTIONS.map(e=>(0,v.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,v.jsx)("label",{className:n.label,htmlFor:`${e}-add-label`,children:"Connection name"}),(0,v.jsx)("input",{id:`${e}-add-label`,type:"text",className:n.input||void 0,value:d,placeholder:"Codex on my laptop",onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),w())}}),(0,v.jsx)("label",{className:n.label,htmlFor:`${e}-add-host`,children:"Host"}),(0,v.jsx)("input",{id:`${e}-add-host`,type:"text",className:n.input||void 0,value:p,placeholder:s,"aria-describedby":`${e}-add-hint`,onChange:e=>f(e.target.value)}),(0,v.jsx)("p",{id:`${e}-add-hint`,className:n.hint,children:u.addConnection}),m?(0,v.jsx)("p",{className:n.error,role:"alert",children:m}):null,(0,v.jsxs)("div",{className:"reg-actions",children:[(0,v.jsx)("button",{type:"button",className:n.button,onClick:()=>void w(),disabled:k,children:k?"Adding…":"Add"}),(0,v.jsx)("button",{type:"button",className:n.button,"aria-expanded":"true",onClick:()=>i(!1),children:"Cancel"})]})]}):(0,v.jsx)("button",{type:"button",className:n.button,"aria-expanded":"false","aria-controls":`${e}-add-connection`,onClick:()=>i(!0),children:"Add connection…"})}e.s(["RegistrationFields",0,function({idPrefix:e,variant:t,form:s,onChange:i,view:o,showErrors:l,connections:c,onRetryConnections:f,onAddConnection:g,deckState:k,onRetryDecks:y,savedDeckId:w,workdirPlaceholder:b,workdirHint:S,sessions:N,includeHomeSession:A}){let C=_[t],D=e=>l?o.errors[e]:void 0,E=t=>`${e}-${t}-error`,T=(e,...t)=>[...t,D(e)?E(e):""].filter(Boolean).join(" ")||void 0,I=!!(N&&N.length>0);return(0,v.jsxs)("div",{className:"registration-fields","data-registration":t,children:[(0,v.jsxs)("fieldset",{className:C.fieldset,"data-field":"connection","aria-describedby":T("connection",`${e}-connection-hint`),children:[(0,v.jsx)("legend",{className:C.legend,id:`${e}-connection-legend`,children:d.connection}),"loading"===c.status?(0,v.jsx)("p",{className:C.note,role:"status",children:h}):"error"===c.status?(0,v.jsxs)("p",{className:C.note,role:"status",children:[p," ",(0,v.jsx)("button",{type:"button",className:C.button,onClick:f,children:"Retry"})]}):(0,v.jsxs)("select",{id:`${e}-connection`,className:C.control,"aria-labelledby":`${e}-connection-legend`,"aria-required":"true","aria-invalid":!!D("connection")||void 0,value:s.connectionId,onChange:e=>i({connectionId:e.target.value}),children:[(0,v.jsx)("option",{value:"",disabled:!0,children:"Select a connection…"}),c.connections.map(e=>(0,v.jsx)("option",{value:e.id,children:m(e)},e.id))]}),(0,v.jsx)("p",{id:`${e}-connection-hint`,className:C.hint,children:u.connection}),(0,v.jsx)($,{id:E("connection"),message:D("connection"),variant:t}),"ready"===c.status?(0,v.jsx)(j,{idPrefix:e,variant:t,onAdd:async e=>{let t=await g(e);return"string"!=typeof t&&i({connectionId:t.id}),t}}):null]}),(0,v.jsxs)("fieldset",{className:C.fieldset,"data-field":"scope",children:[(0,v.jsx)("legend",{className:C.legend,id:`${e}-scope-legend`,children:d.scope}),(0,v.jsx)("div",{className:C.stack,role:"radiogroup","aria-labelledby":`${e}-scope-legend`,"aria-required":"true","aria-describedby":T("scope"),children:["workspaces","sessions","all_provider_sessions"].map(t=>(0,v.jsxs)("label",{className:C.pick,children:[(0,v.jsx)("input",{type:"radio",name:`${e}-scope`,value:t,checked:s.scopeKind===t,disabled:"sessions"===t&&!I,onChange:()=>i({scopeKind:t})})," "+r[t]]},t))}),I?null:(0,v.jsx)("p",{className:C.hint,children:u.noSessions}),(0,v.jsx)($,{id:E("scope"),message:D("scope"),variant:t}),"workspaces"===s.scopeKind?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("label",{className:C.label,htmlFor:`${e}-workspaces`,children:"Workspaces"}),(0,v.jsx)("textarea",{id:`${e}-workspaces`,className:C.input||void 0,rows:2,value:s.workspaces,placeholder:"/Users/you/work/project","aria-required":"true","aria-invalid":!!D("workspaces")||void 0,"aria-describedby":T("workspaces",`${e}-workspaces-hint`),onChange:e=>i({workspaces:e.target.value})}),(0,v.jsx)("p",{id:`${e}-workspaces-hint`,className:C.hint,children:u.workspaces}),(0,v.jsx)($,{id:E("workspaces"),message:D("workspaces"),variant:t})]}):null,"sessions"===s.scopeKind&&N?(0,v.jsxs)("div",{className:C.stack,role:"group","aria-label":"Sessions in scope","aria-describedby":T("sessions",`${e}-sessions-hint`),children:[N.map(e=>(0,v.jsxs)("label",{className:C.pick,children:[(0,v.jsx)("input",{type:"checkbox",checked:s.sessions.includes(e.ref),onChange:t=>i({sessions:t.target.checked?[...s.sessions,e.ref]:s.sessions.filter(t=>t!==e.ref)})}),` ${e.title} (${e.status})`]},e.ref)),(0,v.jsx)("p",{id:`${e}-sessions-hint`,className:C.hint,children:u.sessions}),(0,v.jsx)($,{id:E("sessions"),message:D("sessions"),variant:t})]}):null,"all_provider_sessions"===s.scopeKind?(0,v.jsx)("p",{className:C.hint,children:u.allSessions}):null]}),(0,v.jsxs)("div",{"data-field":"default-workspace",children:[(0,v.jsx)("label",{className:C.label,htmlFor:`${e}-default-workspace`,children:d.defaultWorkspace}),(0,v.jsx)("input",{id:`${e}-default-workspace`,type:"text",className:C.input||void 0,value:s.defaultWorkspace,"aria-invalid":!!D("defaultWorkspace")||void 0,"aria-describedby":T("defaultWorkspace",`${e}-default-workspace-hint`),onChange:e=>i({defaultWorkspace:e.target.value})}),(0,v.jsx)("p",{id:`${e}-default-workspace-hint`,className:C.hint,children:u.defaultWorkspace}),(0,v.jsx)($,{id:E("defaultWorkspace"),message:D("defaultWorkspace"),variant:t})]}),(0,v.jsxs)("fieldset",{className:C.fieldset,"data-field":"launch-profile",children:[(0,v.jsx)("legend",{className:C.legend,id:`${e}-profile-legend`,children:d.launchProfile}),(0,v.jsx)("div",{className:C.stack,role:"radiogroup","aria-labelledby":`${e}-profile-legend`,"aria-required":"true","aria-describedby":T("launchProfile"),children:["direct","agent_deck"].map(t=>(0,v.jsxs)("label",{className:C.pick,children:[(0,v.jsx)("input",{type:"radio",name:`${e}-profile`,value:t,checked:s.launchProfile===t,"aria-describedby":`${e}-profile-${t}-hint`,onChange:()=>i({launchProfile:t})})," "+a[t],(0,v.jsx)("span",{id:`${e}-profile-${t}-hint`,className:`reg-option-hint ${C.hint}`,children:"direct"===t?u.direct:u.agentDeck})]},t))}),(0,v.jsx)($,{id:E("launchProfile"),message:D("launchProfile"),variant:t}),o.showsAgentDeck?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(x.AgentDeckFields,{idPrefix:e,variant:t,deckId:s.deckId,onDeckId:e=>i({deckId:e}),deckState:k,onRetry:y,savedDeckId:w,workingDirectory:s.workingDirectory,onWorkingDirectory:e=>i({workingDirectory:e}),workdirPlaceholder:b,workdirHint:S}),(0,v.jsx)($,{id:E("deck"),message:D("deck"),variant:t})]}):null]}),(0,v.jsxs)("fieldset",{className:C.fieldset,"data-field":"policy",children:[(0,v.jsx)("legend",{className:C.legend,id:`${e}-policy-legend`,children:d.policy}),(0,v.jsx)("div",{className:C.picks,role:"radiogroup","aria-labelledby":`${e}-policy-legend`,children:["read_only","workspace_write"].map(t=>(0,v.jsxs)("label",{className:C.pick,children:[(0,v.jsx)("input",{type:"radio",name:`${e}-policy`,value:t,checked:s.policyMode===t,onChange:()=>i("read_only"===t?{policyMode:t,allowResumeWithEdits:!1}:{policyMode:t})})," "+n[t]]},t))}),(0,v.jsxs)("div",{className:C.stack,children:[(0,v.jsxs)("label",{className:C.pick,children:[(0,v.jsx)("input",{type:"checkbox",checked:s.allowNewSessions,onChange:e=>i({allowNewSessions:e.target.checked})})," Allow new sessions"]}),(0,v.jsxs)("label",{className:C.pick,children:[(0,v.jsx)("input",{type:"checkbox",checked:s.allowResumeWithEdits,disabled:"workspace_write"!==s.policyMode,"aria-describedby":`${e}-resume-hint`,onChange:e=>i({allowResumeWithEdits:e.target.checked})})," Allow resume with edits"]}),(0,v.jsx)("p",{id:`${e}-resume-hint`,className:C.hint,children:u.resumeEdits})]}),(0,v.jsx)($,{id:E("policy"),message:D("policy"),variant:t})]}),A?(0,v.jsxs)("div",{"data-field":"home-session",children:[(0,v.jsx)("label",{className:C.label,htmlFor:`${e}-home-session`,children:d.homeSession}),(0,v.jsxs)("select",{id:`${e}-home-session`,className:C.control,value:s.homeSessionId,"aria-describedby":`${e}-home-session-hint`,onChange:e=>i({homeSessionId:e.target.value}),children:[(0,v.jsx)("option",{value:"",children:"None"}),(N??[]).map(e=>(0,v.jsx)("option",{value:e.ref,children:`${e.title} (${e.status})`},e.ref))]}),(0,v.jsx)("p",{id:`${e}-home-session-hint`,className:C.hint,children:u.homeSession})]}):null]})}],44079),e.s(["useRuntimeConnections",0,function(){let[e,t]=(0,b.useState)(()=>f()),[s,a]=(0,b.useState)(0);return(0,b.useEffect)(()=>{let e=!1;return fetch(c,{cache:"no-store"}).then(async s=>{let a=s.ok?g(await s.json().catch(()=>null)):null;e||t(a?{status:"ready",connections:a,error:""}:{status:"error",connections:[],error:`HTTP ${s.status}`})}).catch(s=>{e||t({status:"error",connections:[],error:s instanceof Error?s.message:String(s)})}),()=>{e=!0}},[s]),{state:e,retry:(0,b.useCallback)(()=>{t(f()),a(e=>e+1)},[]),add:(0,b.useCallback)(async e=>{let s=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await s.json().catch(()=>null);if(!s.ok)return"string"==typeof a?.error?a.error:"Failed to add the connection";let n=g({connections:[a]})?.[0];return n?(t(e=>({status:"ready",connections:[...e.connections,n],error:""})),n):"Failed to add the connection"},[])}}],52900)},68541,e=>{"use strict";e.i(47167);let t="imported",s=/^[A-Za-z0-9_-]{1,128}$/;function a(e){let a=new URLSearchParams(e).get(t);if(null===a)return null;let n=a.trim();return s.test(n)?n:""}function n(e){return`/bots/${encodeURIComponent(e)}/config`}async function r(e,t,s){let r=a(e);if(null===r)return{kind:"none"};if(!r)return{kind:"missing"};if(r===t)return{kind:"stay"};try{return await s(r)?{kind:"open",path:n(r)}:{kind:"missing"}}catch{return{kind:"missing"}}}e.s(["HANDOFF_STATUS_PATH",0,"/api/marketplace-handoff/status","IMPORT_RETURN_QUERY",0,t,"handoffStartPath",0,function(e,t){return`/api/marketplace-handoff?return=${encodeURIComponent(e+t)}`},"importedBotId",0,a,"importedConfigPath",0,n,"marketImportView",0,function(e){switch(e){case"checking":return{busy:!0,tone:"muted",message:"Checking Grok Marketplace…"};case"redirecting":return{busy:!0,tone:"muted",message:"Opening Grok Marketplace…"};case"unavailable":return{busy:!1,tone:"error",message:"Grok Marketplace isn't configured. Set CLONE_MARKET_URL on the Botmancers server."};case"failed":return{busy:!1,tone:"error",message:"Couldn't reach Botmancers to start the import. Try again."};case"missing":return{busy:!1,tone:"error",message:"Imported agent not found. The import may not have completed."};default:return{busy:!1,tone:"muted",message:"Imports a new agent and opens its Config. This agent is not changed."}}},"resolveImportReturn",0,r])}]);