botmancers 0.7.0 → 0.9.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 (389) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +5 -5
  3. package/app/.next/BUILD_ID +1 -1
  4. package/app/.next/app-path-routes-manifest.json +12 -1
  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 +90 -0
  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/agents/[id]/activity/page/app-paths-manifest.json +3 -0
  22. package/app/.next/server/app/agents/[id]/activity/page/next-font-manifest.json +11 -0
  23. package/app/.next/server/app/agents/[id]/activity/page.js +14 -0
  24. package/app/.next/server/app/agents/[id]/activity/page.js.nft.json +1 -0
  25. package/app/.next/server/app/agents/[id]/activity/page_client-reference-manifest.js +3 -0
  26. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page/app-paths-manifest.json +3 -0
  27. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page/build-manifest.json +20 -0
  28. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page/next-font-manifest.json +11 -0
  29. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page/react-loadable-manifest.json +1 -0
  30. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page/server-reference-manifest.json +4 -0
  31. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page.js +14 -0
  32. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page.js.nft.json +1 -0
  33. package/app/.next/server/app/agents/[id]/conversations/[conversationId]/page_client-reference-manifest.js +3 -0
  34. package/app/.next/server/app/agents/[id]/conversations/page/app-paths-manifest.json +3 -0
  35. package/app/.next/server/app/agents/[id]/conversations/page/build-manifest.json +20 -0
  36. package/app/.next/server/app/agents/[id]/conversations/page/next-font-manifest.json +11 -0
  37. package/app/.next/server/app/agents/[id]/conversations/page/react-loadable-manifest.json +1 -0
  38. package/app/.next/server/app/agents/[id]/conversations/page/server-reference-manifest.json +4 -0
  39. package/app/.next/server/app/agents/[id]/conversations/page.js +14 -0
  40. package/app/.next/server/app/agents/[id]/conversations/page.js.nft.json +1 -0
  41. package/app/.next/server/app/agents/[id]/conversations/page_client-reference-manifest.js +3 -0
  42. package/app/.next/server/app/agents/[id]/page/app-paths-manifest.json +3 -0
  43. package/app/.next/server/app/agents/[id]/page/build-manifest.json +20 -0
  44. package/app/.next/server/app/{threads → agents}/[id]/page/next-font-manifest.json +1 -1
  45. package/app/.next/server/app/agents/[id]/page/react-loadable-manifest.json +1 -0
  46. package/app/.next/server/app/agents/[id]/page/server-reference-manifest.json +4 -0
  47. package/app/.next/server/app/{threads → agents}/[id]/page.js +6 -5
  48. package/app/.next/server/app/{threads → agents}/[id]/page.js.nft.json +1 -1
  49. package/app/.next/server/app/agents/[id]/page_client-reference-manifest.js +3 -0
  50. package/app/.next/server/app/agents/[id]/sessions/page/app-paths-manifest.json +3 -0
  51. package/app/.next/server/app/agents/[id]/sessions/page/build-manifest.json +20 -0
  52. package/app/.next/server/app/agents/[id]/sessions/page/next-font-manifest.json +11 -0
  53. package/app/.next/server/app/agents/[id]/sessions/page/react-loadable-manifest.json +1 -0
  54. package/app/.next/server/app/agents/[id]/sessions/page/server-reference-manifest.json +4 -0
  55. package/app/.next/server/app/agents/[id]/sessions/page.js +14 -0
  56. package/app/.next/server/app/agents/[id]/sessions/page.js.nft.json +1 -0
  57. package/app/.next/server/app/agents/[id]/sessions/page_client-reference-manifest.js +3 -0
  58. package/app/.next/server/app/agents/[id]/slack/page/app-paths-manifest.json +3 -0
  59. package/app/.next/server/app/agents/[id]/slack/page/build-manifest.json +20 -0
  60. package/app/.next/server/app/agents/[id]/slack/page/next-font-manifest.json +11 -0
  61. package/app/.next/server/app/agents/[id]/slack/page/react-loadable-manifest.json +1 -0
  62. package/app/.next/server/app/agents/[id]/slack/page/server-reference-manifest.json +4 -0
  63. package/app/.next/server/app/agents/[id]/slack/page.js +14 -0
  64. package/app/.next/server/app/agents/[id]/slack/page.js.nft.json +1 -0
  65. package/app/.next/server/app/agents/[id]/slack/page_client-reference-manifest.js +3 -0
  66. package/app/.next/server/app/api/bots/[id]/activity/route/app-paths-manifest.json +3 -0
  67. package/app/.next/server/app/api/bots/[id]/activity/route/build-manifest.json +12 -0
  68. package/app/.next/server/app/api/bots/[id]/activity/route/server-reference-manifest.json +4 -0
  69. package/app/.next/server/app/api/bots/[id]/activity/route.js +9 -0
  70. package/app/.next/server/app/api/bots/[id]/activity/route.js.nft.json +1 -0
  71. package/app/.next/server/app/api/bots/[id]/activity/route_client-reference-manifest.js +3 -0
  72. package/app/.next/server/app/api/bots/[id]/config/route.js +1 -1
  73. package/app/.next/server/app/api/bots/[id]/config/route.js.nft.json +1 -1
  74. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route/app-paths-manifest.json +3 -0
  75. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route/build-manifest.json +12 -0
  76. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route/server-reference-manifest.json +4 -0
  77. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route.js +12 -0
  78. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route.js.nft.json +1 -0
  79. package/app/.next/server/app/api/bots/[id]/conversations/[conversationId]/route_client-reference-manifest.js +3 -0
  80. package/app/.next/server/app/api/bots/[id]/conversations/route/app-paths-manifest.json +3 -0
  81. package/app/.next/server/app/api/bots/[id]/conversations/route/build-manifest.json +12 -0
  82. package/app/.next/server/app/api/bots/[id]/conversations/route/server-reference-manifest.json +4 -0
  83. package/app/.next/server/app/api/bots/[id]/conversations/route.js +12 -0
  84. package/app/.next/server/app/api/bots/[id]/conversations/route.js.nft.json +1 -0
  85. package/app/.next/server/app/api/bots/[id]/conversations/route_client-reference-manifest.js +3 -0
  86. package/app/.next/server/app/api/bots/[id]/overview/route/app-paths-manifest.json +3 -0
  87. package/app/.next/server/app/api/bots/[id]/overview/route/build-manifest.json +12 -0
  88. package/app/.next/server/app/api/bots/[id]/overview/route/server-reference-manifest.json +4 -0
  89. package/app/.next/server/app/api/bots/[id]/overview/route.js +12 -0
  90. package/app/.next/server/app/api/bots/[id]/overview/route.js.nft.json +1 -0
  91. package/app/.next/server/app/api/bots/[id]/overview/route_client-reference-manifest.js +3 -0
  92. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js +2 -2
  93. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/pins/route.js.nft.json +1 -1
  94. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js +2 -2
  95. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/route.js.nft.json +1 -1
  96. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js +1 -1
  97. package/app/.next/server/app/api/bots/[id]/sessions/[ref]/shares/route.js.nft.json +1 -1
  98. package/app/.next/server/app/api/bots/[id]/sessions/route.js +3 -3
  99. package/app/.next/server/app/api/bots/[id]/sessions/route.js.nft.json +1 -1
  100. package/app/.next/server/app/api/bots/[id]/sessions/sync/route/app-paths-manifest.json +3 -0
  101. package/app/.next/server/app/api/bots/[id]/sessions/sync/route/build-manifest.json +12 -0
  102. package/app/.next/server/app/api/bots/[id]/sessions/sync/route/server-reference-manifest.json +4 -0
  103. package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js +11 -0
  104. package/app/.next/server/app/api/bots/[id]/sessions/sync/route.js.nft.json +1 -0
  105. package/app/.next/server/app/api/bots/[id]/sessions/sync/route_client-reference-manifest.js +3 -0
  106. package/app/.next/server/app/api/bots/[id]/share-policy/route.js +1 -1
  107. package/app/.next/server/app/api/bots/[id]/share-policy/route.js.nft.json +1 -1
  108. package/app/.next/server/app/api/bots/[id]/skill/route.js +1 -1
  109. package/app/.next/server/app/api/bots/[id]/skill/route.js.nft.json +1 -1
  110. package/app/.next/server/app/api/bots/availability/route.js.nft.json +1 -1
  111. package/app/.next/server/app/api/bots/delete-preview/route.js +1 -1
  112. package/app/.next/server/app/api/bots/delete-preview/route.js.nft.json +1 -1
  113. package/app/.next/server/app/api/bots/import/route.js +1 -1
  114. package/app/.next/server/app/api/bots/import/route.js.nft.json +1 -1
  115. package/app/.next/server/app/api/bots/manage/route.js +1 -1
  116. package/app/.next/server/app/api/bots/manage/route.js.nft.json +1 -1
  117. package/app/.next/server/app/api/bots/name-migrations/route.js +1 -1
  118. package/app/.next/server/app/api/bots/name-migrations/route.js.nft.json +1 -1
  119. package/app/.next/server/app/api/bots/route.js +5 -5
  120. package/app/.next/server/app/api/bots/route.js.nft.json +1 -1
  121. package/app/.next/server/app/api/conversations/[id]/approve/route.js.nft.json +1 -1
  122. package/app/.next/server/app/api/conversations/[id]/deny/route.js.nft.json +1 -1
  123. package/app/.next/server/app/api/conversations/[id]/draft/route.js +1 -1
  124. package/app/.next/server/app/api/conversations/[id]/draft/route.js.nft.json +1 -1
  125. package/app/.next/server/app/api/conversations/[id]/messages/[messageId]/stop/route.js.nft.json +1 -1
  126. package/app/.next/server/app/api/conversations/[id]/messages/route.js +5 -5
  127. package/app/.next/server/app/api/conversations/[id]/messages/route.js.nft.json +1 -1
  128. package/app/.next/server/app/api/conversations/[id]/route.js +1 -1
  129. package/app/.next/server/app/api/conversations/[id]/route.js.nft.json +1 -1
  130. package/app/.next/server/app/api/conversations/[id]/stop/route.js +6 -6
  131. package/app/.next/server/app/api/conversations/[id]/stop/route.js.nft.json +1 -1
  132. package/app/.next/server/app/api/conversations/route.js +1 -1
  133. package/app/.next/server/app/api/conversations/route.js.nft.json +1 -1
  134. package/app/.next/server/app/api/exchanges/[id]/cancel/route.js +1 -1
  135. package/app/.next/server/app/api/exchanges/[id]/cancel/route.js.nft.json +1 -1
  136. package/app/.next/server/app/api/exchanges/[id]/route.js +1 -1
  137. package/app/.next/server/app/api/exchanges/[id]/route.js.nft.json +1 -1
  138. package/app/.next/server/app/api/exchanges/route.js +2 -2
  139. package/app/.next/server/app/api/exchanges/route.js.nft.json +1 -1
  140. package/app/.next/server/app/api/files/[name]/route.js +1 -1
  141. package/app/.next/server/app/api/files/[name]/route.js.nft.json +1 -1
  142. package/app/.next/server/app/api/groups/route.js +1 -1
  143. package/app/.next/server/app/api/groups/route.js.nft.json +1 -1
  144. package/app/.next/server/app/api/health/route.js +1 -1
  145. package/app/.next/server/app/api/health/route.js.nft.json +1 -1
  146. package/app/.next/server/app/api/import-capabilities/route.js.nft.json +1 -1
  147. package/app/.next/server/app/api/marketplace-handoff/route.js.nft.json +1 -1
  148. package/app/.next/server/app/api/marketplace-handoff/status/route.js.nft.json +1 -1
  149. package/app/.next/server/app/api/mcp/route.js +1 -1
  150. package/app/.next/server/app/api/mcp/route.js.nft.json +1 -1
  151. package/app/.next/server/app/api/messages/[id]/between/route.js +1 -1
  152. package/app/.next/server/app/api/messages/[id]/between/route.js.nft.json +1 -1
  153. package/app/.next/server/app/api/runtime-connections/route.js +1 -1
  154. package/app/.next/server/app/api/runtime-connections/route.js.nft.json +1 -1
  155. package/app/.next/server/app/api/service-grants/route.js.nft.json +1 -1
  156. package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js +1 -1
  157. package/app/.next/server/app/api/shares/[shareRef]/revoke/route.js.nft.json +1 -1
  158. package/app/.next/server/app/api/shares/route.js +1 -1
  159. package/app/.next/server/app/api/shares/route.js.nft.json +1 -1
  160. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js +4 -3
  161. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/[conversationId]/route.js.nft.json +1 -1
  162. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js +4 -3
  163. package/app/.next/server/app/api/v0/agents/[agentId]/conversations/route.js.nft.json +1 -1
  164. package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js +1 -1
  165. package/app/.next/server/app/api/v0/agents/[agentId]/messages/route.js.nft.json +1 -1
  166. package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js +4 -3
  167. package/app/.next/server/app/api/v0/agents/[agentId]/pins/route.js.nft.json +1 -1
  168. package/app/.next/server/app/api/v0/agents/[agentId]/route.js +4 -3
  169. package/app/.next/server/app/api/v0/agents/[agentId]/route.js.nft.json +1 -1
  170. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js +4 -3
  171. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/[ref]/route.js.nft.json +1 -1
  172. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js +4 -3
  173. package/app/.next/server/app/api/v0/agents/[agentId]/sessions/route.js.nft.json +1 -1
  174. package/app/.next/server/app/api/v0/agents/route.js +4 -3
  175. package/app/.next/server/app/api/v0/agents/route.js.nft.json +1 -1
  176. package/app/.next/server/app/api/v0/capabilities/route.js +4 -3
  177. package/app/.next/server/app/api/v0/capabilities/route.js.nft.json +1 -1
  178. package/app/.next/server/app/api/v0/conversations/[id]/route.js +1 -1
  179. package/app/.next/server/app/api/v0/conversations/[id]/route.js.nft.json +1 -1
  180. package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js +4 -3
  181. package/app/.next/server/app/api/v0/exchanges/[id]/cancel/route.js.nft.json +1 -1
  182. package/app/.next/server/app/api/v0/exchanges/[id]/route.js +4 -3
  183. package/app/.next/server/app/api/v0/exchanges/[id]/route.js.nft.json +1 -1
  184. package/app/.next/server/app/api/v0/exchanges/route.js +4 -3
  185. package/app/.next/server/app/api/v0/exchanges/route.js.nft.json +1 -1
  186. package/app/.next/server/app/api/v0/mcp/route.js +6 -5
  187. package/app/.next/server/app/api/v0/mcp/route.js.nft.json +1 -1
  188. package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js +4 -3
  189. package/app/.next/server/app/api/v0/pins/[pinRef]/detach/route.js.nft.json +1 -1
  190. package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js +4 -3
  191. package/app/.next/server/app/api/v0/pins/[pinRef]/messages/route.js.nft.json +1 -1
  192. package/app/.next/server/app/api/v0/pins/[pinRef]/route.js +4 -3
  193. package/app/.next/server/app/api/v0/pins/[pinRef]/route.js.nft.json +1 -1
  194. package/app/.next/server/app/api/v0/requests/[id]/route.js +1 -1
  195. package/app/.next/server/app/api/v0/requests/[id]/route.js.nft.json +1 -1
  196. package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js +4 -3
  197. package/app/.next/server/app/api/v0/sessions/[ref]/messages/route.js.nft.json +1 -1
  198. package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js +4 -3
  199. package/app/.next/server/app/api/v0/sessions/[ref]/pins/route.js.nft.json +1 -1
  200. package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js +4 -3
  201. package/app/.next/server/app/api/v0/sessions/[ref]/shares/route.js.nft.json +1 -1
  202. package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js +4 -3
  203. package/app/.next/server/app/api/v0/shares/[shareRef]/revoke/route.js.nft.json +1 -1
  204. package/app/.next/server/app/api/v0/shares/[shareRef]/route.js +4 -3
  205. package/app/.next/server/app/api/v0/shares/[shareRef]/route.js.nft.json +1 -1
  206. package/app/.next/server/app/api/v0/shares/current/route.js +4 -3
  207. package/app/.next/server/app/api/v0/shares/current/route.js.nft.json +1 -1
  208. package/app/.next/server/app/api/v0/shares/route.js +4 -3
  209. package/app/.next/server/app/api/v0/shares/route.js.nft.json +1 -1
  210. package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js +1 -1
  211. package/app/.next/server/app/api/wake-grants/[id]/revoke/route.js.nft.json +1 -1
  212. package/app/.next/server/app/api/wakes/[id]/decision/route.js +1 -1
  213. package/app/.next/server/app/api/wakes/[id]/decision/route.js.nft.json +1 -1
  214. package/app/.next/server/app/api/wakes/[id]/retry/route.js +1 -1
  215. package/app/.next/server/app/api/wakes/[id]/retry/route.js.nft.json +1 -1
  216. package/app/.next/server/app/bots/[id]/config/page.js.nft.json +1 -1
  217. package/app/.next/server/app/bots/[id]/config/page_client-reference-manifest.js +1 -1
  218. package/app/.next/server/app/exchanges/page.js.nft.json +1 -1
  219. package/app/.next/server/app/exchanges/page_client-reference-manifest.js +1 -1
  220. package/app/.next/server/app/exchanges.html +1 -1
  221. package/app/.next/server/app/exchanges.rsc +3 -3
  222. package/app/.next/server/app/exchanges.segments/_full.segment.rsc +3 -3
  223. package/app/.next/server/app/exchanges.segments/_tree.segment.rsc +2 -2
  224. package/app/.next/server/app/exchanges.segments/exchanges/__PAGE__.segment.rsc +3 -3
  225. package/app/.next/server/app/index.html +1 -1
  226. package/app/.next/server/app/index.rsc +3 -3
  227. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  228. package/app/.next/server/app/index.segments/_full.segment.rsc +3 -3
  229. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  230. package/app/.next/server/app/page.js.nft.json +1 -1
  231. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  232. package/app/.next/server/app/settings/page.js.nft.json +1 -1
  233. package/app/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  234. package/app/.next/server/app/settings.html +1 -1
  235. package/app/.next/server/app/settings.rsc +2 -2
  236. package/app/.next/server/app/settings.segments/_full.segment.rsc +2 -2
  237. package/app/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  238. package/app/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  239. package/app/.next/server/app/threads/[id]/route/app-paths-manifest.json +3 -0
  240. package/app/.next/server/app/threads/[id]/route/build-manifest.json +12 -0
  241. package/app/.next/server/app/threads/[id]/route/server-reference-manifest.json +4 -0
  242. package/app/.next/server/app/threads/[id]/route.js +10 -0
  243. package/app/.next/server/app/threads/[id]/route.js.nft.json +1 -0
  244. package/app/.next/server/app/threads/[id]/route_client-reference-manifest.js +3 -0
  245. package/app/.next/server/app-paths-manifest.json +12 -1
  246. package/app/.next/server/chunks/1oeh_server_app_api_bots_[id]_conversations_[conversationId]_route_actions_11cb2lr.js +3 -0
  247. package/app/.next/server/chunks/{[root-of-the-server]__17xl_55._.js → [root-of-the-server]__03pk_x_._.js} +1 -1
  248. package/app/.next/server/chunks/{[root-of-the-server]__0mp8bap._.js → [root-of-the-server]__05ds5md._.js} +1 -1
  249. package/app/.next/server/chunks/[root-of-the-server]__0anfwiu._.js +52 -0
  250. package/app/.next/server/chunks/{[root-of-the-server]__0-w_t2y._.js → [root-of-the-server]__0atpy-s._.js} +1 -1
  251. package/app/.next/server/chunks/[root-of-the-server]__0hhill-._.js +3 -0
  252. package/app/.next/server/chunks/{[root-of-the-server]__06w5xhe._.js → [root-of-the-server]__0hiikkz._.js} +1 -1
  253. package/app/.next/server/chunks/[root-of-the-server]__0k8wfe2._.js +3 -0
  254. package/app/.next/server/chunks/{[root-of-the-server]__1eps2a4._.js → [root-of-the-server]__0pp5x67._.js} +1 -1
  255. package/app/.next/server/chunks/[root-of-the-server]__0qqsovi._.js +3 -0
  256. package/app/.next/server/chunks/{[root-of-the-server]__1dxr858._.js → [root-of-the-server]__0thkp5l._.js} +1 -1
  257. package/app/.next/server/chunks/[root-of-the-server]__0xhwlr4._.js +3 -0
  258. package/app/.next/server/chunks/{[root-of-the-server]__0-vcyi-._.js → [root-of-the-server]__11yt1hv._.js} +1 -1
  259. package/app/.next/server/chunks/[root-of-the-server]__1280ke1._.js +46 -0
  260. package/app/.next/server/chunks/{[root-of-the-server]__0iqh5ta._.js → [root-of-the-server]__12wk406._.js} +1 -1
  261. package/app/.next/server/chunks/[root-of-the-server]__13wghn3._.js +46 -0
  262. package/app/.next/server/chunks/{[root-of-the-server]__0lwsto-._.js → [root-of-the-server]__14cwco7._.js} +3 -3
  263. package/app/.next/server/chunks/{[root-of-the-server]__1kczttr._.js → [root-of-the-server]__185i_bv._.js} +1 -1
  264. package/app/.next/server/chunks/[root-of-the-server]__1byhehl._.js +3 -0
  265. package/app/.next/server/chunks/{[root-of-the-server]__10b5-i-._.js → [root-of-the-server]__1ez_5xy._.js} +1 -1
  266. package/app/.next/server/chunks/[root-of-the-server]__1jxwu9_._.js +52 -0
  267. package/app/.next/server/chunks/{[root-of-the-server]__0o9ijih._.js → [root-of-the-server]__1mxp6z6._.js} +1 -1
  268. package/app/.next/server/chunks/{[root-of-the-server]__0ey3_2x._.js → [root-of-the-server]__1s2-vw3._.js} +1 -1
  269. package/app/.next/server/chunks/{[root-of-the-server]__1hwy3jx._.js → [root-of-the-server]__1xq61ti._.js} +1 -1
  270. package/app/.next/server/chunks/{[root-of-the-server]__04b3ml2._.js → [root-of-the-server]__20om7um._.js} +1 -1
  271. package/app/.next/server/chunks/_0061c2q._.js +1 -1
  272. package/app/.next/server/chunks/_0_b7py8._.js +3 -0
  273. package/app/.next/server/chunks/_0a2do3x._.js +1 -1
  274. package/app/.next/server/chunks/_1-5mthb._.js +1 -1
  275. package/app/.next/server/chunks/_12i5gam._.js +7 -0
  276. package/app/.next/server/chunks/_1a0er16._.js +18 -0
  277. package/app/.next/server/chunks/_1uxmsh3._.js +18 -0
  278. package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_activity_route_actions_06oyah6.js +3 -0
  279. package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_conversations_route_actions_0op0mjv.js +3 -0
  280. package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_overview_route_actions_20nuetv.js +3 -0
  281. package/app/.next/server/chunks/_next-internal_server_app_api_bots_[id]_sessions_sync_route_actions_00y6n-f.js +3 -0
  282. package/app/.next/server/chunks/{ssr/_next-internal_server_app_threads_[id]_page_actions_1fte2n3.js → _next-internal_server_app_threads_[id]_route_actions_13zq3u6.js} +2 -2
  283. package/app/.next/server/chunks/lib_0-opbv7._.js +69 -55
  284. package/app/.next/server/chunks/lib_0aejojj._.js +69 -55
  285. package/app/.next/server/chunks/lib_0al5wbc._.js +330 -0
  286. package/app/.next/server/chunks/lib_0i8cm07._.js +3 -0
  287. package/app/.next/server/chunks/lib_0il0ml1._.js +69 -55
  288. package/app/.next/server/chunks/lib_0iujsdg._.js +69 -55
  289. package/app/.next/server/chunks/{lib_15adnlz._.js → lib_15a9ejf._.js} +53 -44
  290. package/app/.next/server/chunks/{lib_1zc7-gl._.js → lib_19pzc33._.js} +53 -44
  291. package/app/.next/server/chunks/lib_1a4ucxv._.js +330 -0
  292. package/app/.next/server/chunks/lib_1dehbst._.js +69 -55
  293. package/app/.next/server/chunks/lib_1z4vnh4._.js +69 -55
  294. package/app/.next/server/chunks/lib_1z7d95m._.js +2181 -0
  295. package/app/.next/server/chunks/lib_service-api-http_ts_0xzqhny._.js +1 -23
  296. package/app/.next/server/chunks/lib_service-api_ts_18eok4w._.js +25 -0
  297. package/app/.next/server/chunks/node_modules_next_1zc5q0a._.js +11 -11
  298. package/app/.next/server/chunks/ssr/1oeh_server_app_agents_[id]_conversations_[conversationId]_page_actions_08lev_i.js +3 -0
  299. package/app/.next/server/chunks/ssr/[root-of-the-server]__06s7ons._.js +3 -0
  300. package/app/.next/server/chunks/ssr/[root-of-the-server]__0r8nmcc._.js +3 -0
  301. package/app/.next/server/chunks/ssr/[root-of-the-server]__19qlmru._.js +3 -0
  302. package/app/.next/server/chunks/ssr/[root-of-the-server]__1dpye-p._.js +3 -0
  303. package/app/.next/server/chunks/ssr/[root-of-the-server]__1fxu3a8._.js +3 -0
  304. package/app/.next/server/chunks/ssr/[root-of-the-server]__1t9ljq3._.js +3 -0
  305. package/app/.next/server/chunks/ssr/_0_u9-u6._.js +3 -0
  306. package/app/.next/server/chunks/ssr/_0g3y1u9._.js +3 -0
  307. package/app/.next/server/chunks/ssr/{node_modules_next_0x3i8za._.js → _0gzxfz3._.js} +2 -2
  308. package/app/.next/server/chunks/ssr/_0rvu-il._.js +131 -0
  309. package/app/.next/server/chunks/ssr/_0u7urta._.js +5 -0
  310. package/app/.next/server/chunks/ssr/_17ngohj._.js +3 -0
  311. package/app/.next/server/chunks/ssr/_1iq-7cn._.js +3 -0
  312. package/app/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_activity_page_actions_1a_v567.js +3 -0
  313. package/app/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_conversations_page_actions_1dpbbj-.js +3 -0
  314. package/app/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_page_actions_0k__y7g.js +3 -0
  315. package/app/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_sessions_page_actions_1hft42g.js +3 -0
  316. package/app/.next/server/chunks/ssr/_next-internal_server_app_agents_[id]_slack_page_actions_0dmtbj_.js +3 -0
  317. package/app/.next/server/chunks/ssr/app_1-nwnha._.js +3 -0
  318. package/app/.next/server/chunks/ssr/app_agents_[id]_009y8_j._.js +3 -0
  319. package/app/.next/server/chunks/ssr/app_agents_[id]_0sr4fdg._.js +3 -0
  320. package/app/.next/server/chunks/ssr/app_agents_[id]_activity_AgentActivityPage_tsx_042-590._.js +3 -0
  321. package/app/.next/server/chunks/ssr/app_agents_[id]_conversations_page_tsx_15zl_c8._.js +3 -0
  322. package/app/.next/server/chunks/ssr/app_agents_[id]_sessions_page_tsx_0tfup-2._.js +10 -0
  323. package/app/.next/server/chunks/ssr/app_agents_[id]_slack_AgentSlackPage_tsx_20njhs1._.js +3 -0
  324. package/app/.next/server/chunks/ssr/app_bots_[id]_config_page_tsx_1e0uue9._.js +1 -1
  325. package/app/.next/server/chunks/ssr/app_page_tsx_0pxmutw._.js +3 -0
  326. package/app/.next/server/chunks/ssr/lib_0pfn9gs._.js +3 -0
  327. package/app/.next/server/chunks/ssr/lib_agent-registration-ui_ts_1z582mm._.js +3 -0
  328. package/app/.next/server/chunks/ssr/lib_exchange-view_ts_1a4q9ju._.js +3 -0
  329. package/app/.next/server/chunks/ssr/lib_share-view_ts_08psw5o._.js +3 -0
  330. package/app/.next/server/instrumentation.js +1 -1
  331. package/app/.next/server/middleware-build-manifest.js +3 -3
  332. package/app/.next/server/next-font-manifest.js +1 -1
  333. package/app/.next/server/next-font-manifest.json +24 -4
  334. package/app/.next/server/pages/404.html +1 -1
  335. package/app/.next/server/pages/500.html +1 -1
  336. package/app/.next/server/server-reference-manifest.js +1 -1
  337. package/app/.next/server/server-reference-manifest.json +1 -1
  338. package/app/.next/static/chunks/02q7gb87r2ca3.css +3 -0
  339. package/app/.next/static/chunks/06i_6p0-ipitj.js +1 -0
  340. package/app/.next/static/chunks/0cjh4u-f7mlwd.js +1 -0
  341. package/app/.next/static/chunks/1dhk3pcv7yvm6.js +1 -0
  342. package/app/.next/static/chunks/1ka9dp1l6c0ga.js +3 -0
  343. package/app/.next/static/chunks/1ttvnc6qdye8s.js +1 -0
  344. package/app/.next/static/chunks/1ypwptc0fsn4w.js +1 -0
  345. package/app/.next/static/chunks/2-fhbx41zyanc.js +1 -0
  346. package/app/.next/static/chunks/2cc4uzbhs_v23.js +1 -0
  347. package/app/.next/static/chunks/2n1u8a2efnt88.js +1 -0
  348. package/app/.next/static/chunks/34v8aumua0x5n.js +1 -0
  349. package/app/.next/static/chunks/3aasli1i-eiio.js +1 -0
  350. package/app/.next/static/chunks/3p_p4gnr0d2-x.js +1 -0
  351. package/app/.next/static/chunks/3s9t477v-z09o.js +1 -0
  352. package/app/.next/static/chunks/3y5bo6syunkzn.js +8 -0
  353. package/app/BUILD_INFO.json +2 -2
  354. package/app/package.json +1 -1
  355. package/app/server.js +1 -1
  356. package/package.json +1 -1
  357. package/app/.next/server/app/threads/[id]/page/app-paths-manifest.json +0 -3
  358. package/app/.next/server/app/threads/[id]/page_client-reference-manifest.js +0 -3
  359. package/app/.next/server/chunks/[root-of-the-server]__0792yb1._.js +0 -44
  360. package/app/.next/server/chunks/[root-of-the-server]__0d3fjix._.js +0 -3
  361. package/app/.next/server/chunks/[root-of-the-server]__0e_agq4._.js +0 -3
  362. package/app/.next/server/chunks/[root-of-the-server]__0qaiqut._.js +0 -44
  363. package/app/.next/server/chunks/[root-of-the-server]__17mum5-._.js +0 -3
  364. package/app/.next/server/chunks/[root-of-the-server]__1x8phwp._.js +0 -44
  365. package/app/.next/server/chunks/_0qv-4by._.js +0 -3
  366. package/app/.next/server/chunks/lib_0v6lblw._.js +0 -5
  367. package/app/.next/server/chunks/lib_agent-api_ts_0iv52-o._.js +0 -3
  368. package/app/.next/server/chunks/ssr/[root-of-the-server]__1t063pe._.js +0 -3
  369. package/app/.next/server/chunks/ssr/_0_fa0na._.js +0 -3
  370. package/app/.next/server/chunks/ssr/_0a6r_bx._.js +0 -3
  371. package/app/.next/server/chunks/ssr/_0epgorw._.js +0 -3
  372. package/app/.next/server/chunks/ssr/_1cvuhjt._.js +0 -3
  373. package/app/.next/server/chunks/ssr/_1is_iwu._.js +0 -3
  374. package/app/.next/server/chunks/ssr/_1n5mvo5._.js +0 -3
  375. package/app/.next/server/chunks/ssr/_1o94bnv._.js +0 -5
  376. package/app/.next/server/chunks/ssr/app_exchanges_page_tsx_0j-n2a1._.js +0 -3
  377. package/app/.next/static/chunks/1ouuczm-gmvxs.js +0 -1
  378. package/app/.next/static/chunks/1w72fds3-utrx.js +0 -1
  379. package/app/.next/static/chunks/2095-o17ji0fs.css +0 -3
  380. package/app/.next/static/chunks/2q-tgwkalrnms.js +0 -1
  381. package/app/.next/static/chunks/34bv9o9bjkwk0.js +0 -3
  382. package/app/.next/static/chunks/3rwwunh5sdjzg.js +0 -1
  383. package/app/.next/static/chunks/3z3mn526_3fwd.js +0 -1
  384. /package/app/.next/server/app/{threads/[id] → agents/[id]/activity}/page/build-manifest.json +0 -0
  385. /package/app/.next/server/app/{threads/[id] → agents/[id]/activity}/page/react-loadable-manifest.json +0 -0
  386. /package/app/.next/server/app/{threads/[id] → agents/[id]/activity}/page/server-reference-manifest.json +0 -0
  387. /package/app/.next/static/{A9sQnaf9i6YzjHNoPgRfU → nOdd5VXbf23ohQcBBjvHa}/_buildManifest.js +0 -0
  388. /package/app/.next/static/{A9sQnaf9i6YzjHNoPgRfU → nOdd5VXbf23ohQcBBjvHa}/_clientMiddlewareManifest.js +0 -0
  389. /package/app/.next/static/{A9sQnaf9i6YzjHNoPgRfU → nOdd5VXbf23ohQcBBjvHa}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13978,e=>{"use strict";var t=e.i(43476),n=e.i(71645),a=e.i(22016),s=e.i(18566),r=e.i(15983),i=e.i(24204);function l({agentId:e,agentName:a}){let s=(0,n.useId)(),r=(0,n.useId)(),o=(0,n.useId)(),[c,d]=(0,n.useState)(null),[u,m]=(0,n.useState)(""),[f,h]=(0,n.useState)(0),[p,g]=(0,n.useState)("idle"),[x,b]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[y,N]=(0,n.useState)(""),[k,_]=(0,n.useState)(""),[w,S]=(0,n.useState)("");(0,n.useEffect)(()=>{let t=!1;return fetch(`/api/bots/${encodeURIComponent(e)}/share-policy`,{cache:"no-store"}).then(async e=>{let n=await e.json().catch(()=>null);t||(e.ok&&n?.policy?(m(""),d(n.policy)):m("Could not load the share policy."))}).catch(()=>{t||m("Could not load the share policy.")}),()=>{t=!0}},[e,f]);let C=()=>{b(""),g("idle"),h(e=>e+1)},$=async(t,n)=>{if(!c)return!1;g("saving"),b(""),j("");try{let a=await fetch(`/api/bots/${encodeURIComponent(e)}/share-policy`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({revision:c.revision,...t})}),s=await a.json().catch(()=>null);if(!a.ok||!s?.policy)return g("error"),b("string"==typeof s?.error?.message?s.error.message:"The share policy could not be saved."),!1;return d(s.policy),g("idle"),j(n("number"==typeof s.revoked_contexts?s.revoked_contexts:0)),!0}catch{return g("error"),b("The share policy could not be saved."),!1}},A=async e=>{if(e.preventDefault(),!c)return;let t=(0,i.audienceInputError)(y,k,c.audiences);if(S(t??""),t)return;let n={kind:"slack",team_id:y.trim(),channel_id:k.trim()};await $({audiences:[...c.audiences,n]},()=>`Added ${(0,i.audienceLabel)(n)}.`)&&(N(""),_(""))},T="saving"===p,E=!!c&&"invalid"!==c.state;return(0,t.jsxs)("section",{className:"cfg-card share-policy",id:"session-sharing","aria-labelledby":"cfg-sharing-title",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h2",{id:"cfg-sharing-title",className:"cfg-title",children:"Session sharing"}),T?(0,t.jsx)("span",{className:"text-sm cfg-faint",role:"status",children:"Saving…"}):null]}),(0,t.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:["A share lets people in one Slack channel ask one of ",a,"’s sessions questions, read-only, until it expires or you revoke it. Create and revoke shares from Sessions."]}),u?(0,t.jsxs)("p",{className:"text-sm cfg-error",role:"alert",children:[u," ",(0,t.jsx)("button",{type:"button",onClick:C,className:"underline hover:no-underline",children:"Retry"})]}):null,c||u?null:(0,t.jsx)("p",{className:"text-sm cfg-faint",role:"status",children:"Loading…"}),c?.state==="invalid"?(0,t.jsxs)("p",{className:"text-sm cfg-error mb-3",role:"alert",children:["The share policy file is invalid, so nothing can be shared: ",c.reason," Fix or remove config/session-shares.json, then"," ",(0,t.jsx)("button",{type:"button",onClick:C,className:"underline hover:no-underline",children:"reload"}),"."]}):null,c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"share-policy-toggle",children:[(0,t.jsx)("input",{id:s,type:"checkbox",role:"switch",checked:c.agent.share_from_turn,"aria-checked":c.agent.share_from_turn,disabled:!E||T||!c.agent.share_current.supported&&!c.agent.share_from_turn,"data-share-policy":"share_from_turn",onChange:e=>{let t=e.target.checked;$({share_from_turn:t},e=>t?"Share from a turn is on.":`Share from a turn is off.${e?` Revoked ${e} live turn context${1===e?"":"s"}.`:""}`)}}),(0,t.jsxs)("label",{htmlFor:s,className:"text-sm",children:[(0,t.jsx)("span",{className:"font-medium",children:"Share from a turn"})," (",(0,t.jsx)("code",{className:"cfg-code",children:"share_from_turn"}),")"]})]}),(0,t.jsx)("p",{className:"text-sm cfg-faint share-policy-hint",children:(0,i.shareFromTurnNote)(c)}),c.agent.live_contexts>0?(0,t.jsxs)("p",{className:"text-sm cfg-faint share-policy-hint",children:[c.agent.live_contexts," live turn context",1===c.agent.live_contexts?"":"s"," now."]}):null,(0,t.jsx)("h3",{className:"cfg-title share-policy-sub",children:"Slack channel allowlist"}),(0,t.jsx)("p",{className:"text-sm cfg-faint",children:"Every Agent’s shares use this list. A share can only go to a channel on it."}),0===c.audiences.length?(0,t.jsx)("p",{className:"text-sm cfg-muted share-policy-empty",children:"No channel yet: nothing can be shared to Slack."}):(0,t.jsx)("ul",{className:"share-policy-list","aria-label":"Allowed Slack channels",children:c.audiences.map(e=>(0,t.jsxs)("li",{className:"share-policy-entry",children:[(0,t.jsx)("span",{className:"cfg-code",children:e.channel_id}),(0,t.jsxs)("span",{className:"cfg-faint",children:["workspace ",e.team_id]}),(0,t.jsx)("button",{type:"button",className:"cfg-link text-sm share-policy-remove",disabled:!E||T,"aria-label":`Remove ${(0,i.audienceLabel)(e)}`,onClick:()=>{c&&$({audiences:c.audiences.filter(t=>t.team_id!==e.team_id||t.channel_id!==e.channel_id)},()=>`Removed ${(0,i.audienceLabel)(e)}. Its Slack threads stop being answered.`)},children:"Remove"})]},`${e.team_id}:${e.channel_id}`))}),(0,t.jsxs)("form",{className:"share-policy-add",onSubmit:e=>{A(e)},"aria-label":"Add a Slack channel",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:r,className:"text-sm",children:"Workspace ID"}),(0,t.jsx)("input",{id:r,className:"cfg-input",value:y,placeholder:"T0123ABCD",autoComplete:"off",spellCheck:!1,disabled:!E||T,"aria-invalid":!!w,onChange:e=>{N(e.target.value),S("")}})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:o,className:"text-sm",children:"Channel ID"}),(0,t.jsx)("input",{id:o,className:"cfg-input",value:k,placeholder:"C0123ABCD",autoComplete:"off",spellCheck:!1,disabled:!E||T,"aria-invalid":!!w,onChange:e=>{_(e.target.value),S("")}})]}),(0,t.jsx)("button",{type:"submit",className:"cfg-btn-primary text-sm",disabled:!E||T||!y.trim()||!k.trim(),children:"Add channel"})]}),w?(0,t.jsx)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:w}):null,"error"===p?(0,t.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:["Couldn't save: ",x," ",(0,t.jsx)("button",{type:"button",onClick:C,className:"underline hover:no-underline",children:"Reload"})]}):null,(0,t.jsx)("p",{className:"mt-2 text-sm cfg-ok",role:"status",children:v})]}):null]})}var o=e.i(10718),c=e.i(74904),d=e.i(33851),u=e.i(44079),m=e.i(52900),f=e.i(87303);function h({attribute:e,label:a,options:s,current:r,onPick:i,className:l}){let o=(0,n.useId)(),c=`avatar-${e}`;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{id:o,className:"avatar-group-label",children:a}),(0,t.jsx)("div",{className:l?`avatar-opt-grid ${l}`:"avatar-opt-grid",role:"radiogroup","aria-labelledby":o,children:s.map(n=>(0,t.jsxs)("label",{title:n.label,className:"avatar-opt",children:[(0,t.jsx)("input",{type:"radio",name:c,value:n.id,checked:r[e]===n.id,onChange:()=>i({[e]:n.id}),className:"avatar-opt-input"}),(0,t.jsx)("span",{className:"avatar-opt-art","aria-hidden":"true",children:(0,t.jsx)(f.default,{config:{...r,[e]:n.id},size:44})}),(0,t.jsx)("span",{children:n.label})]},n.id))})]})}var p=e.i(68541);function g({phase:e,onImport:n}){let a=(0,p.marketImportView)(e);return(0,t.jsxs)("div",{className:"mt-3","data-field":"marketplace-import",children:[(0,t.jsx)("button",{type:"button",onClick:n,disabled:a.busy,"aria-busy":a.busy,"aria-describedby":"cfg-market-import-status",className:"cfg-btn-ghost text-sm w-full sm:w-auto",children:"Import from Grok Marketplace"}),(0,t.jsx)("p",{id:"cfg-market-import-status",role:"status","aria-live":"polite",className:"error"===a.tone?"mt-2 text-sm cfg-error":"mt-2 text-xs cfg-faint",children:a.message})]})}var x=e.i(37947);let b="Fix the highlighted fields.",v=[{key:"avatar_accessory",label:"Avatar accessory"},{key:"avatar_color",label:"Avatar color"},{key:"avatar_eyes",label:"Avatar eyes"},{key:"avatar_hands",label:"Avatar hands"},{key:"description",label:"Description (rules)"},{key:"import_operation_id",label:"Import operation ID"},{key:"import_schema_version",label:"Import schema version"},{key:"memories",label:"Remembered facts"},{key:"name",label:"Name"},{key:"skill_content",label:"Skill content"},{key:"skill_path",label:"Skill path"},{key:"skill_present",label:"Skill present"},{key:"source_provider",label:"Source provider"},{key:"template_id",label:"Template ID"},{key:"template_url",label:"Template URL"},{key:"title",label:"Title"}];function j(e){return String(e).padStart(2,"0")}function y(e){let t=new Date(e);return`${t.getFullYear()}-${j(t.getMonth()+1)}-${j(t.getDate())} ${j(t.getHours())}:${j(t.getMinutes())}`}function N(e){let t=new Date(e);return`${j(t.getHours())}:${j(t.getMinutes())}:${j(t.getSeconds())}`}async function k(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}e.s(["default",0,function(){var e;let i=String((0,s.useParams)().id??""),j=(0,s.useRouter)(),[_,w]=(0,n.useState)(!1),[S,C]=(0,n.useState)(null),[$,A]=(0,n.useState)(!0),[T,E]=(0,n.useState)(!1),[R,I]=(0,n.useState)(!1),[D,P]=(0,n.useState)(0),[L,O]=(0,n.useState)(null),[U,F]=(0,n.useState)("clean"),[q,M]=(0,n.useState)(""),[H,B]=(0,n.useState)(0),[K,W]=(0,n.useState)(!1),[V,z]=(0,n.useState)(""),[J,Y]=(0,n.useState)("clean"),[G,Q]=(0,n.useState)(""),[X,Z]=(0,n.useState)(0),[ee,et]=(0,n.useState)({}),[en,ea]=(0,n.useState)(""),[es,er]=(0,n.useState)(!1),[ei,el]=(0,n.useState)(null),[eo,ec]=(0,n.useState)(!1),ed=(0,m.useRuntimeConnections)(),[eu,em]=(0,n.useState)(void 0),[ef,eh]=(0,n.useState)("clean"),[ep,eg]=(0,n.useState)(""),[ex,eb]=(0,n.useState)(0),[ev,ej]=(0,n.useState)(null),[ey,eN]=(0,n.useState)("clean"),[ek,e_]=(0,n.useState)(""),[ew,eS]=(0,n.useState)(0),{phase:eC,startImport:e$}=function(e){let[t,a]=(0,n.useState)("idle");return(0,n.useEffect)(()=>{let t=window.location.search;if(null===(0,p.importedBotId)(t))return;let n=new URL(window.location.href);n.searchParams.delete(p.IMPORT_RETURN_QUERY),window.history.replaceState(null,"",n.pathname+n.search);let s=!1;return(0,p.resolveImportReturn)(t,e,async e=>(await fetch(`/api/bots/${encodeURIComponent(e)}/config`,{cache:"no-store"})).ok).then(e=>{s||("open"===e.kind?window.location.replace(e.path):"missing"===e.kind&&a("missing"))}),()=>{s=!0}},[e]),{phase:t,startImport:async function(){a("checking");try{let e=await fetch(p.HANDOFF_STATUS_PATH,{cache:"no-store"}),t=await e.json().catch(()=>null);if(!e.ok)return void a("failed");if(t?.configured!==!0)return void a("unavailable");a("redirecting"),window.location.href=(0,p.handoffStartPath)(window.location.origin,window.location.pathname),setTimeout(()=>a(e=>"redirecting"===e?"idle":e),4e3)}catch{a("failed")}}}}(i);function eA(){A(!0),E(!1),P(e=>e+1)}(0,n.useEffect)(()=>{if(!i)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(i)}/sessions?status=all`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(t=>{e||em((t?.sessions??[]).map(e=>({ref:e.ref,title:e.title,status:e.status})))}).catch(()=>{e||em([])}),()=>{e=!0}},[i,D]),(0,n.useEffect)(()=>{if(!i)return;let e=!1;return fetch(`/api/bots/${encodeURIComponent(i)}/config`).then(async t=>{if(e)return;if(404===t.status){I(!0),C(null);return}if(!t.ok)throw Error("request failed");let n=await t.json();e||(C(n),O(n.bot.description??""),I(!1),E(!1))}).catch(()=>{e||E(!0)}).finally(()=>{e||A(!1)}),()=>{e=!0}},[i,D]);let eT=S?.bot.description??"",eE=null!==L&&L!==eT,eR=S?.skill.content??"",eI=K&&V!==eR,eD=S?(0,d.registrationFormFromBot)(S.bot):null,eP=es&&null!==ei&&JSON.stringify(ei)!==JSON.stringify(eD),eL=S?.bot.avatar_config??(0,x.resolveAvatar)(S?.bot??{}),eO=ev??eL,eU=null!==ev&&JSON.stringify(ev)!==JSON.stringify(eL),eF=eE||eI||eP||eU;function eq(e,t){k(t).then(t=>{t&&(ea(e),setTimeout(()=>ea(t=>t===e?"":t),2e3))})}async function eM(){if(S&&null!==L){F("saving"),M("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:S.bot.id,description:L})});if(!e.ok){let t="request failed";try{let n=await e.json();n.error&&(t=n.error)}catch{}throw Error(t)}let t=await fetch(`/api/bots/${encodeURIComponent(i)}/config`);if(!t.ok)throw Error("request failed");C(await t.json()),F("confirmed"),B(Date.now()),setTimeout(()=>{F(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){F("error"),M(e instanceof Error?e.message:"request failed")}}}function eH(){S&&(el((0,d.registrationFormFromBot)(S.bot)),er(!0),ec(!1),eh("clean"),eg(""),ed.retry())}function eB(e){el(t=>t?{...t,...e}:t),eg(""),eh(e=>"error"===e?"clean":e)}function eK(){er(!1),el(null),eh("clean"),eg("")}function eW(e){ej({...ev??eL,...e}),eN("clean"),e_("")}async function eV(){if(S&&ev){eN("saving"),e_("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:S.bot.id,avatar:ev})});if(!e.ok){let t="request failed";try{let n=await e.json();n.error&&(t=n.error)}catch{}throw Error(t)}let t=await fetch(`/api/bots/${encodeURIComponent(i)}/config`);if(!t.ok)throw Error("request failed");C(await t.json()),ej(null),eN("confirmed"),eS(Date.now()),setTimeout(()=>{eN(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){eN("error"),e_(e instanceof Error?e.message:"request failed")}}}async function ez(){if(S&&ei){if((0,d.hasRegistrationErrors)((0,d.registrationFormView)(ei,ed.state))){ec(!0),eh("error"),eg(b);return}eh("saving"),eg("");try{let e=await fetch("/api/bots",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,d.registrationPatchBody)(S.bot.id,ei))});if(!e.ok){let t="request failed";try{let n=await e.json();n.error&&(t=n.error)}catch{}throw Error(t)}let t=await fetch(`/api/bots/${encodeURIComponent(i)}/config`);if(!t.ok)throw Error("request failed");C(await t.json()),er(!1),el(null),eh("confirmed"),eb(Date.now()),setTimeout(()=>{eh(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){eh("error"),eg(e instanceof Error?e.message:"request failed")}}}function eJ(){z(S?.skill.content??""),W(!0),Y("clean"),Q("")}async function eY(){if(S&&(V.trim()||window.confirm("Delete this skill file?"))){Y("saving"),Q("");try{let e=await fetch(`/api/bots/${encodeURIComponent(i)}/skill`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:V})});if(!e.ok){let t="request failed";try{let n=await e.json();n.error&&(t=n.error)}catch{}throw Error(t)}let t=await e.json();C(e=>e?{...e,skill:t.skill,currentHash:t.currentHash}:e),W(!1),Y("confirmed"),Z(Date.now()),setTimeout(()=>{Y(e=>"confirmed"===e?"clean":e)},5e3)}catch(e){Y("error"),Q(e instanceof Error?e.message:"request failed")}}}if((0,n.useEffect)(()=>{if(!eF)return;let e=e=>{e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[eF]),R)return(0,t.jsx)("div",{className:"cfg-page flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"mb-4",children:"Agent not found."}),(0,t.jsx)(a.default,{href:"/",className:"cfg-link",children:"← Back to chat"})]})});if($&&!S)return(0,t.jsx)("div",{className:"cfg-page",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto space-y-6",children:[(0,t.jsx)("div",{className:"h-6 w-32 rounded animate-pulse cfg-skel"}),(0,t.jsx)("div",{className:"h-20 rounded-lg animate-pulse cfg-skel"}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsx)("div",{className:"space-y-6",children:[0,1,2].map(e=>(0,t.jsx)("div",{className:"h-48 rounded-lg animate-pulse cfg-skel"},e))}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)("div",{className:"h-64 rounded-lg animate-pulse cfg-skel"}),(0,t.jsx)("div",{className:"h-80 rounded-lg animate-pulse cfg-skel"})]})]})]})});if(T&&!S)return(0,t.jsx)("div",{className:"cfg-page",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,t.jsx)(a.default,{href:"/",className:"cfg-link cfg-back text-sm",children:"← Back to chat"}),(0,t.jsxs)("header",{className:"mt-3 mb-6 flex flex-wrap items-center gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl font-bold truncate",children:"Agent configuration"}),(0,t.jsx)("p",{className:"text-sm cfg-faint truncate",children:"Couldn't load agent details."})]}),(0,t.jsxs)("div",{className:"ml-auto text-right",children:[(0,t.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash: ",(0,t.jsx)("code",{className:"cfg-code",children:"—"})]}),(0,t.jsx)("p",{className:"text-sm mt-1",children:(0,t.jsx)("span",{className:"cfg-faint",children:"○ Not loaded"})})]})]}),(0,t.jsx)("div",{className:"grid gap-6 lg:grid-cols-2 items-start",children:[["Skills","Rules","Agent","Template source"],["Launch snapshots","Avatar"]].map(e=>(0,t.jsx)("div",{className:"min-w-0 space-y-6",children:e.map(e=>(0,t.jsxs)("div",{className:"cfg-card",children:[(0,t.jsx)("h2",{className:"cfg-title mb-2",children:e}),(0,t.jsxs)("p",{className:"text-sm cfg-muted",children:["Couldn't load this section."," ",(0,t.jsx)("button",{onClick:eA,className:"cfg-link",children:"Retry"})]})]},e))},e[0]))})]})});if(!S)return null;let{bot:eG,skill:eQ,currentHash:eX,snapshots:eZ}=S,e0=!!(eG.source_provider||eG.template_id||eG.template_url||eG.import_schema_version||eG.import_operation_id),e1="saving"===U?(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eE||"error"===U?(0,t.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===U?(0,t.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",N(H)]}):(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e3="saving"===J?(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eI||"error"===J?(0,t.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===J?(0,t.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",N(X)]}):(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e2="saving"===ef?(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eP||"error"===ef?(0,t.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===ef?(0,t.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",N(ex)]}):(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"}),e4="saving"===ey?(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saving…"}):eU||"error"===ey?(0,t.jsxs)("span",{className:"text-sm cfg-dirty",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):"confirmed"===ey?(0,t.jsxs)("span",{className:"text-sm cfg-faint",children:["Saved ",N(ew)]}):(0,t.jsx)("span",{className:"text-sm cfg-faint",children:"Saved"});return(0,t.jsxs)("div",{className:"cfg-page",children:[(0,t.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,t.jsx)(a.default,{href:"/",onClick:function(e){eF&&!window.confirm("You have unsaved changes. Leave without saving?")&&e.preventDefault()},className:"cfg-link cfg-back text-sm",children:"← Back to chat"}),(0,t.jsxs)("header",{className:"mt-3 mb-6 flex flex-wrap items-center gap-4",children:[(0,t.jsx)(f.default,{bot:eG,size:48,title:`${eG.name} avatar`}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl font-bold truncate",children:eG.name}),(0,t.jsx)("p",{className:"text-sm cfg-faint truncate",children:eG.title||" "})]}),(0,t.jsxs)("div",{className:"ml-auto text-right",children:[(0,t.jsxs)("p",{className:"text-sm cfg-muted",children:["Current config hash:"," ",(0,t.jsx)("code",{className:"cfg-code",title:eX,children:eX.slice(0,8)})," ",(0,t.jsx)("button",{onClick:()=>eq("header",eX),className:"cfg-link text-sm",children:"header"===en?"Copied":"Copy"})]}),(0,t.jsx)("p",{className:"text-sm mt-1",children:eF?(0,t.jsxs)("span",{className:"cfg-dirty",children:[(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full cfg-dot-amber mr-1"}),"Unsaved changes"]}):(0,t.jsx)("span",{className:"cfg-faint",children:"● Saved"})})]})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2 items-start","data-cfg-layout":"columns",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"primary",children:[(0,t.jsxs)("section",{className:"cfg-card",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h2",{className:"cfg-title",children:"Skills"}),e3]}),"unsupported"===eQ.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Unsupported name"}),(0,t.jsx)("p",{className:"text-sm cfg-muted",children:"Skill files need an agent name matching /^[A-Za-z0-9_-]+$/ — this name cannot map to a skill path."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"text-sm cfg-muted mb-3",children:[eQ.path," · ","present"===eQ.status?"Present":"Not present"]}),K?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("textarea",{value:V,onChange:e=>z(e.target.value),rows:8,className:"cfg-input text-sm"}),"error"===J&&(0,t.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",G,"."," ",(0,t.jsx)("button",{onClick:eY,className:"underline hover:no-underline",children:"Retry"})]}),(0,t.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,t.jsx)("button",{onClick:eY,disabled:!eI||"saving"===J,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===J?"Saving…":"Save"}),(0,t.jsx)("button",{onClick:function(){W(!1),Y("clean"),Q("")},disabled:!eI||"saving"===J,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}):"present"===eQ.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"text-sm cfg-pre max-h-64 overflow-y-auto",children:eQ.content}),(0,t.jsx)("button",{onClick:eJ,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm cfg-muted",children:"No skill file yet. Create SKILL.md to give this agent standing instructions."}),(0,t.jsx)("button",{onClick:eJ,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Create"})]}),(0,t.jsx)("p",{className:"mt-3 text-xs cfg-faint",children:"Appended verbatim as a system message at launch."})]})]}),(0,t.jsxs)("section",{className:"cfg-card",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h2",{className:"cfg-title",children:"Rules"}),e1]}),(0,t.jsx)("textarea",{value:L??"",onChange:e=>O(e.target.value),rows:8,className:"cfg-input cfg-input-sans text-sm"}),(0,t.jsx)("p",{className:"mt-2 text-xs cfg-faint",children:"Sent verbatim as the standing-rules system message on every turn. This beats the user's request for detail or length."}),"error"===U&&(0,t.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",q,"."," ",(0,t.jsx)("button",{onClick:eM,className:"underline hover:no-underline",children:"Retry"})]}),(0,t.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,t.jsx)("button",{onClick:eM,disabled:!eE||"saving"===U,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===U?"Saving…":"Save"}),(0,t.jsx)("button",{onClick:function(){O(eT),F("clean"),M("")},disabled:!eE||"saving"===U,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,t.jsxs)("section",{className:"cfg-card",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h2",{className:"cfg-title",children:"Agent"}),e2]}),(()=>{if(!es||!ei){let e=(0,d.registrationReadView)(eG,eu);return(0,t.jsxs)("div",{"data-field":"runtime-read",children:[(0,t.jsx)("dl",{className:"text-sm",children:e.rows.map(e=>(0,t.jsxs)("div",{"data-row":e.key,className:"flex flex-col sm:flex-row sm:justify-between gap-x-4 py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:e.label}),(0,t.jsx)("dd",{className:"sm:text-right break-words cfg-muted",children:e.value})]},e.key))}),e.notices.map(e=>(0,t.jsx)("p",{className:"text-sm cfg-dirty mt-2",children:e},e)),(0,t.jsx)("button",{onClick:eH,className:"mt-3 cfg-btn-ghost text-sm w-full sm:w-auto",children:"Edit"})]})}let e=(0,d.registrationFormView)(ei,ed.state);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.RegistrationFields,{idPrefix:"cfg",variant:"config",form:ei,onChange:eB,view:e,showErrors:eo,connections:ed.state,onRetryConnections:ed.retry,onAddConnection:ed.add,workspacePlaceholder:(0,c.defaultWorkdirFor)(eG.id),workspaceHint:(0,c.configWorkspaceHint)(eG.id),sessions:eu,includeHomeSession:!0}),"error"===ef&&(0,t.jsxs)("p",{className:"mt-2 text-sm cfg-error",role:"alert",children:[ep===b?ep:`Couldn't save: ${ep}.`," ",ep===b?null:(0,t.jsx)("button",{onClick:ez,className:"underline hover:no-underline",children:"Retry"})]}),(0,t.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,t.jsx)("button",{onClick:ez,disabled:!eP||"saving"===ef||e.submitDisabled,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===ef?"Saving…":"Save"}),(0,t.jsx)("button",{onClick:eK,disabled:"saving"===ef,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:eP?"Discard":"Cancel"})]})]})})()]}),(0,t.jsxs)("section",{className:"cfg-card",children:[(0,t.jsx)("h2",{className:"cfg-title mb-3",children:"Template source"}),!e0&&(0,t.jsx)("p",{className:"text-sm cfg-muted mb-3",children:"Created manually in Botmancers — no template source."}),(0,t.jsxs)("dl",{className:"text-sm",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:"Source provider"}),(0,t.jsx)("dd",{className:"text-right",children:eG.source_provider??"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:"Template ID"}),(0,t.jsx)("dd",{className:"text-right",children:eG.template_id??"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:"Template URL"}),(0,t.jsx)("dd",{className:"text-right break-all",children:eG.template_url?(e=eG.template_url).startsWith("http://")||e.startsWith("https://")?(0,t.jsx)("a",{href:eG.template_url,className:"cfg-link",children:eG.template_url}):eG.template_url:"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:"Import schema version"}),(0,t.jsx)("dd",{className:"text-right",children:eG.import_schema_version??"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:"Import operation ID"}),(0,t.jsx)("dd",{className:"text-right break-all",children:eG.import_operation_id??"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between gap-4 py-1 border-y cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:"Imported at"}),(0,t.jsx)("dd",{className:"text-right",children:eG.import_timestamp?y(eG.import_timestamp):"—"})]})]}),(0,t.jsx)(g,{phase:eC,onImport:()=>{e$()}})]})]}),(0,t.jsxs)("div",{className:"min-w-0 space-y-6","data-cfg-column":"secondary",children:[(0,t.jsxs)("section",{className:"cfg-card",children:[(0,t.jsx)("h2",{className:"cfg-title mb-3",children:"Launch snapshots"}),0===eZ.length?(0,t.jsx)("p",{className:"text-sm cfg-muted",children:"No launches recorded yet."}):(0,t.jsx)("ul",{className:"space-y-3",children:eZ.map(e=>{let n=e.hash===eX,a=!!ee[e.id];return(0,t.jsxs)("li",{className:"cfg-row",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsxs)("p",{className:"text-sm",children:[y(e.created_at)," · ",e.id.slice(0,4),e.transport?` \xb7 ${e.transport}`:null]}),(0,t.jsx)("button",{onClick:()=>et(t=>({...t,[e.id]:!t[e.id]})),"aria-label":a?"Collapse snapshot detail":"Expand snapshot detail",className:"cfg-chevron px-1",children:a?"▾":"▸"})]}),(0,t.jsxs)("p",{className:"mt-1 text-sm",children:[(0,t.jsx)("code",{className:"cfg-code",children:e.hash.slice(0,12)})," ",(0,t.jsx)("button",{onClick:()=>eq(e.id,e.hash),className:"cfg-link text-sm",children:en===e.id?"Copied":"Copy"})]}),(0,t.jsx)("p",{className:"mt-1 text-sm",children:n?(0,t.jsx)("span",{className:"cfg-ok",children:"● Matches current config"}):(0,t.jsx)("span",{className:"cfg-faint",children:"○ Config changed since"})}),a&&(0,t.jsxs)("div",{className:"mt-3 pt-3 border-t cfg-line text-sm",children:[(0,t.jsxs)("p",{className:"cfg-muted break-all",children:[(0,t.jsx)("span",{className:"font-medium",children:"Launch ID:"})," ",e.id]}),(0,t.jsxs)("p",{className:"mt-1 cfg-muted break-all",children:[(0,t.jsx)("span",{className:"font-medium",children:"Hash:"})," ",(0,t.jsx)("code",{className:"cfg-code",children:e.hash})]}),(0,t.jsx)("dl",{className:"mt-2",children:v.map(n=>{let a=e.snapshot[n.key];return(0,t.jsxs)("div",{className:"py-1 border-t cfg-line",children:[(0,t.jsx)("dt",{className:"cfg-faint",children:n.label}),(0,t.jsx)("dd",{className:"whitespace-pre-wrap break-words",children:null==a?(0,t.jsx)("span",{className:"cfg-faint",children:"null"}):Array.isArray(a)?0===a.length?(0,t.jsx)("span",{className:"cfg-faint",children:"(none)"}):(0,t.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:a.map(e=>`- ${e}`).join("\n")}):"boolean"==typeof a?String(a):""===a?(0,t.jsx)("span",{className:"cfg-faint",children:"(empty)"}):(0,t.jsx)("span",{className:"block max-h-32 overflow-y-auto",children:a})})]},n.key)})})]})]},e.id)})})]}),(0,t.jsx)(l,{agentId:eG.id,agentName:eG.name}),(0,t.jsxs)("section",{className:"cfg-card",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,t.jsx)("h2",{className:"cfg-title",children:"Avatar"}),e4]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-4",children:[(0,t.jsx)(f.default,{config:eO,size:96,title:"Avatar live preview"}),(0,t.jsx)("p",{className:"text-sm cfg-muted",children:"Outline style: the color is the line color, nothing is filled. Pick an option to preview, then Save."})]}),(0,t.jsx)(h,{attribute:"color",label:"Color",options:x.AVATAR_COLORS,current:eO,onPick:eW,className:"mb-3"}),(0,t.jsx)(h,{attribute:"eyes",label:"Eyes",options:x.AVATAR_EYES,current:eO,onPick:eW,className:"mb-3"}),(0,t.jsx)(h,{attribute:"hands",label:"Hands",options:x.AVATAR_HANDS,current:eO,onPick:eW,className:"mb-3"}),(0,t.jsx)(h,{attribute:"accessory",label:"Accessory",options:x.AVATAR_ACCESSORIES,current:eO,onPick:eW}),"error"===ey&&(0,t.jsxs)("p",{className:"mt-2 text-sm cfg-error",children:["Couldn't save: ",ek,"."," ",(0,t.jsx)("button",{onClick:eV,className:"underline hover:no-underline",children:"Retry"})]}),(0,t.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,t.jsx)("button",{onClick:eV,disabled:!eU||"saving"===ey,className:"flex-1 sm:flex-none cfg-btn-primary text-sm",children:"saving"===ey?"Saving…":"Save"}),(0,t.jsx)("button",{onClick:function(){ej(null),eN("clean"),e_("")},disabled:!eU||"saving"===ey,className:"flex-1 sm:flex-none cfg-btn-ghost text-sm",children:"Discard"})]})]}),(0,t.jsxs)("section",{className:"cfg-card cfg-danger","aria-labelledby":"cfg-danger-title",children:[(0,t.jsx)("h2",{id:"cfg-danger-title",className:"cfg-title mb-3",children:"Danger zone"}),(0,t.jsx)("p",{className:"text-sm cfg-muted",children:o.DELETE_REMOVES_COPY}),(0,t.jsx)("p",{className:"text-sm cfg-faint mt-2",children:o.DELETE_KEEPS_COPY}),(0,t.jsx)("button",{type:"button",onClick:()=>w(!0),className:"mt-3 delete-btn text-sm w-full sm:w-auto",children:"Delete agent"})]})]})]})]}),_?(0,t.jsx)(r.default,{ids:[eG.id],onCancel:()=>w(!1),onDeleted:e=>j.push(`/?deleted=${Math.max(e.length,1)}`)}):null]})}],13978)},74904,3136,e=>{"use strict";let t=["hermes","cursor","claude","codex","muse"],n={hermes:"Hermes",cursor:"Cursor",claude:"Claude",codex:"Codex",muse:"Muse Code"},a="hermes";function s(e){return t.includes(String(e))?n[e]:String(e??"")}t.join("|"),e.s(["AGENTS",0,t,"AGENT_LABELS",0,n,"DEFAULT_AGENT",0,a,"agentLabel",0,s],3136);let r=t.map(e=>({value:e,label:n[e]}));function i(e){return s((e.agent??"").trim()||a)}function l(e){let t=e.runtime_connection;return t&&t.label.trim()?t.label.trim():(e.runtime_connection_id??"").trim()?(e.runtime_connection_id??"").trim():null}function o(e){return`~/.botmancers/${e}`}let c="~/.botmancers/{agentID}",d=`Default: ${c} — {agentID} is this agent's ID, assigned at creation.`;function u(e){return String(e).padStart(2,"0")}let m=[{prefix:"[Agent failed]",kind:"failed",label:"Agent failed"},{prefix:"[Deck handoff]",kind:"handoff",label:"Agent launch"},{prefix:"[Deck run]",kind:"run",label:"Agent run"},{prefix:"[Deck review]",kind:"review",label:"Agent review"},{prefix:"[Deck resume]",kind:"resume",label:"Agent resume"},{prefix:"[Deck result]",kind:"result",label:"Agent result"},{prefix:"[Deck failed]",kind:"failed",label:"Agent failed"},{prefix:"[Deck needs selection]",kind:"reselection",label:"Agent needs setup"},{prefix:"[Deck needs reselection]",kind:"reselection",label:"Agent needs setup"}];e.s(["AGENT_OPTIONS",0,r,"NEW_AGENT_WORKSPACE_HINT",0,d,"WORKSPACE_TEMPLATE",0,c,"agentEventDisplay",0,function(e){let t=String(e??"").trimStart(),n=m.find(e=>t.startsWith(e.prefix));return n?{label:n.label,detail:t.slice(n.prefix.length).trim()}:null},"botAgentLabel",0,i,"botConnectionLabel",0,l,"configWorkspaceHint",0,function(e){return`Default: ${o(e)} — leave blank to use it.`},"defaultWorkdirFor",0,o,"formatClock",0,function(e){let t=new Date(e);return`${u(t.getHours())}:${u(t.getMinutes())}:${u(t.getSeconds())}`},"rosterRuntimeLine",0,function(e){let t=`Agent: ${i(e)} \xb7 `+(l(e)??"No connection");return!1===e.launchable?t+" — see Config":t}],74904)},50814,63352,e=>{"use strict";function t(e){return`${new Date(e).toISOString().slice(0,16).replace("T"," ")} UTC`}let n="Not reported";function a(e){return e.toFixed(1).replace(/\.0$/,"")}function s(e){return e.toLocaleString("en-US")}function r(e){return 0===e?"$0.00":e>=.01?`$${e.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`:e<1e-4?"<$0.0001":`$${e.toFixed(4)}`}let i={input_tokens:"Input tokens",output_tokens:"Output tokens",cost_usd:"Cost"};function l(e,t,n){return"cost_usd"===e?r(t):n?s(t):t<1e3?String(t):t<999950?`${a(t/1e3)}k`:t<99995e4?`${a(t/1e6)}M`:`${a(t/1e9)}B`}function o(e){return`${e} ${1===e?"run":"runs"}`}function c(e,t,a=!1){let s=i[e];if(!t||"unavailable"===t.quality||null===t.sum)return{name:s,text:n,quality:"unavailable",coverage:t&&t.total>0?`0 of ${o(t.total)} reported`:"No runs recorded",label:`${s}: not reported`};let r=l(e,t.sum,a),d=l(e,t.sum,!0);return"partial"===t.quality?{name:s,text:r,quality:"partial",coverage:`Partial: ${t.known} of ${o(t.total)} reported`,label:`${s}: at least ${d}, partial, reported by ${t.known} of ${o(t.total)}`}:{name:s,text:r,quality:"complete",coverage:`All ${o(t.total)} reported`,label:`${s}: ${d}, reported by all ${o(t.total)}`}}e.s(["SESSION_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"ended",label:"Ended"}],"attemptLabel",0,function(e){let t="source"===e.role?"Started the session":"Resumed the session";return`${t} \xb7 ${e.outcome??"running"}`},"emptySessionsCopy",0,function(e,t){return"active"===e?`${t} has no active sessions.`:"ended"===e?`${t} has no ended sessions.`:`${t} has no sessions yet. One appears after a coding run keeps its runtime context.`},"formatSessionDate",0,t,"runtimeLabel",0,function(e){return e.agent.transport?`${e.agent.adapter} \xb7 ${e.agent.transport}`:e.agent.adapter},"sessionStateTags",0,function(e){let t=[];return(e.home&&t.push("Home"),e.state?.availability==="missing")?[...t,"Missing"]:(e.state?.lifecycle==="archived"&&t.push("Archived"),e.state?.busy&&t.push("Busy"),(e.resumable||e.state?.resumable===!0)&&t.push("Resumable"),t)},"sessionUsageLine",0,function(e){let t=c("input_tokens",e?.input_tokens),a=c("output_tokens",e?.output_tokens),s=c("cost_usd",e?.cost_usd),r=[t,a,s];if(r.every(e=>"unavailable"===e.quality))return{text:n,label:"Usage: not reported",quality:"unavailable",partial:!1};let i=["unavailable"===t.quality?"input not reported":`${t.text} in`,"unavailable"===a.quality?"output not reported":`${a.text} out`,"unavailable"===s.quality?"cost not reported":s.text].join(" · "),l=r.some(e=>"partial"===e.quality),o=l||r.some(e=>"unavailable"===e.quality)?"partial":"complete";return{text:i,label:`Reported usage: ${r.map(e=>e.label).join("; ")}`,quality:o,partial:l}},"statusLabel",0,function(e){return"active"===e.status?"Active":"Ended"},"usageMetricView",0,c,"usageSampleLabel",0,function(e,t){let n="turn"===e.kind?"start"===e.turn_kind?"provider turn, started":"provider turn":"resume"===e.turn_kind?"resumed":"started";return`Run ${t+1} \xb7 ${n}`},"usageSampleValues",0,function(e){return{input:null===e.input_tokens?n:s(e.input_tokens),output:null===e.output_tokens?n:s(e.output_tokens),cost:null===e.cost_usd?n:r(e.cost_usd)}},"workRequestLabel",0,function(e){var t;let n=e.origin.work_request;return n?`${(t=n.execution_kind)?t[0].toUpperCase()+t.slice(1):t} \xb7 ${n.state}`:null}],63352);let d={ask:"Ask from this context",resume:"Resume work here",handoff:"Hand off to…"},u=["queued","extracting","delivering","completed","failed","cancelled"],m=["completed","failed","cancelled"];function f(e,t){switch(t){case"queued":return"Queued";case"extracting":return"ask"===e?"Asking the session":"Extracting handoff";case"delivering":return"Delivering handoff";case"completed":return"ask"===e?"Answered":"Handed off";case"failed":return"Failed";case"cancelled":return"Cancelled"}}function h(e,t=140){let n=String(e??"").split("\n").map(e=>e.trim()).filter(e=>e.length>0).join(" ");return n.length>t?`${n.slice(0,t-1).trimEnd()}…`:n}function p(e,t){return t.updated_at-e.updated_at||t.created_at-e.created_at||(e.id<t.id?-1:+(e.id>t.id))}e.s(["DEFAULT_LEDGER_FILTER",0,{mode:"all",state:"all",agentId:""},"INSTRUCTION_LIMIT",0,4e3,"MODE_FILTER_OPTIONS",0,[{value:"all",label:"All"},{value:"ask",label:"Ask"},{value:"continue",label:"Continue"}],"STATE_FILTER_OPTIONS",0,[{value:"all",label:"Any status"},{value:"active",label:"In progress"},{value:"queued",label:"Queued"},{value:"extracting",label:"Asking / extracting"},{value:"delivering",label:"Delivering"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}],"detailsHref",0,function(e){return`/exchanges?id=${encodeURIComponent(e)}`},"eventLabel",0,function(e,t){let n=e.data??{},a=t.source.agent_name,s=t.destination?.agent_name??"the destination Agent",r="string"==typeof n.hop?n.hop:null;switch(e.type){case"created":return"ask"===t.mode?`You asked ${a}'s session a question`:`You handed ${a}'s session to ${s}`;case"hop_queued":if("deliver"===r)return`Handoff queued for ${s}'s new session`;return"extract"===r?`Handoff extraction queued in ${a}'s session`:`Question queued for ${a}'s session`;case"hop_started":if("deliver"===r)return`${s} started a new session`;return"extract"===r?`${a}'s session started extracting the handoff`:`${a}'s session started answering`;case"state_changed":{let e="string"==typeof n.to&&u.includes(n.to)?n.to:null;return e?`Now ${f(t.mode,e).toLowerCase()}`:"State changed"}case"answer_returned":return`Answer returned to ${t.origin?.label??"the origin thread"}${n.truncated?" (shortened)":""}`;case"packet_extracted":return"Handoff packet extracted";case"packet_rejected":return`Handoff packet refused${"string"==typeof n.reason?`: ${n.reason}`:""}`;case"destination_replied":return`${s} replied in ${t.destination?.conversation?.label??"its thread"}`;case"destination_session_rejected":return`${s}'s session was not new; the handoff stopped`;case"cancel_requested":return"You asked to cancel";case"hop_result_discarded":return"A late result was discarded";default:return e.type.replace(/_/g," ")}},"excerpt",0,h,"exchangeRequestBody",0,function(e,t,n){let a={mode:e.mode,idempotency_key:n,origin_conversation_id:e.originConversationId,source:{agent_id:t.agentId,session_ref:t.sessionRef},instruction:e.instruction.trim()};return"continue"===e.mode&&(a.destination={agent_id:e.destinationAgentId}),a},"failureAdvice",0,function(e){if("failed"!==e.state)return null;switch(e.failure?.code){case"packet_invalid":case"packet_missing":return"The source session did not return a usable handoff. Start a new Continue with a clearer objective.";case"destination_session_invalid":return"The destination did not start a fresh session. Check its runtime, then start a new Continue.";case"destination_turn_failed":return"Check the destination Agent’s runtime, then start a new Continue from the source session.";case"source_turn_failed":return"Check the source Agent’s runtime, then start a new exchange from its Sessions.";default:return"Start a new exchange from the session to try again."}},"formatExchangeTime",0,function(e){return t(e)},"instructionHeading",0,function(e){return"ask"===e?"Question":"Objective"},"ledgerAgents",0,function(e){let t=new Map;for(let n of e)t.set(n.source.agent_id,n.source.agent_name),n.destination&&t.set(n.destination.agent_id,n.destination.agent_name);return[...t.entries()].map(([e,t])=>({id:e,name:t})).sort((e,t)=>e.name.localeCompare(t.name)||e.id.localeCompare(t.id))},"ledgerRows",0,function(e,t){return e.filter(e=>("all"===t.mode||e.mode===t.mode)&&("active"!==t.state||!e.terminal)&&("all"===t.state||"active"===t.state||e.state===t.state)&&(!t.agentId||e.source.agent_id===t.agentId||e.destination?.agent_id===t.agentId)).sort(p)},"ledgerView",0,function(e,t,n){return null===e?t?"error":"loading":0===e.length?"empty":0===n.length?"filtered-out":"rows"},"linkRoleLabel",0,function(e){let t={origin:"Started here",source:"Source session",destination:"Destination"};return e.map(e=>t[e]).join(" · ")},"liveStateLabel",0,function(e){var t;return e.cancel_requested&&(t=e.state,!m.includes(t))?"Cancelling…":f(e.mode,e.state)},"modeLabel",0,function(e){return"ask"===e?"Ask":"Continue"},"outcomeLine",0,function(e){if("completed"===e.state){if("ask"===e.mode){let t=e.origin?.label??"the origin thread";return e.outcome.answer?`Answer in ${t}: ${h(e.outcome.answer,200)}`:`Answered in ${t}.`}let t=e.destination?.agent_name??"The destination Agent";return e.outcome.reply?`${t} picked it up in a new session: ${h(e.outcome.reply,200)}`:`${t} picked it up in a new session.`}return"failed"===e.state?e.failure?.message||"The exchange failed.":"cancelled"===e.state?"Cancelled before it finished. Nothing more will run.":null},"participantsLabel",0,function(e){return"ask"===e.mode?`You → ${e.source.agent_name}`:`${e.source.agent_name} → ${e.destination?.agent_name??"another Agent"}`},"pinRequestBody",0,function(e,t,n,a,s){return{action:e,content:t.trim(),conversation_id:n,idempotency_key:s,..."resume"===e?{approve_write:a}:{}}},"sessionDialogMode",0,function(e){return"handoff"===e?"continue":e},"sessionDialogTitle",0,function(e){return d["continue"===e?"handoff":e]},"sessionDialogUsesPin",0,function(e,t){return"resume"===e||"ask"===e&&"provider"===t},"sessionLabel",0,function(e){return`${e.source.agent_name}'s session “${e.source.session_title}”`},"sessionRowActions",0,function(e){let t;if(e.actions)t=e.actions;else{let n="ended"===e.status?{available:!1,reason:"Ask from this context and Hand off to… are unavailable: this session has ended. Its history stays here."}:e.resumable?{available:!0}:{available:!1,reason:`Ask from this context and Hand off to… are unavailable: Botmancers can’t resume this session under ${e.agent.name}’s current runtime.`},a=n.available?{available:!0}:{available:!1,code:"ended"===e.status?"session_ended":"session_not_resumable",reason:n.reason,recovery:"choose_session"};t={ask:a,resume:{available:!1,code:"action_unavailable",reason:`${d.resume} is unavailable: this runtime can’t resume a session with edits.`,recovery:"choose_action"},handoff:a}}return["ask","resume","handoff"].map(e=>({action:e,label:d[e],availability:t[e]}))},"stateTone",0,function(e){return"completed"===e?"done":"failed"===e||"cancelled"===e?"stopped":"active"},"submitErrorMessage",0,function(e,t){switch(e){case"session_ended":return"This session has ended and can’t be resumed.";case"session_not_resumable":return"Botmancers can’t resume this session under the Agent’s current runtime.";case"source_session_busy":return"This session already has an exchange in progress. Wait for it or cancel it from its card.";case"agent_unavailable":return t||"That Agent can’t launch yet. Choose its runtime connection and session scope in Config.";case"idempotency_conflict":return"This request changed while it was being sent. Send again.";case"session_missing":return"The runtime no longer has this session. Its history stays here; choose another session.";case"approval_required":return"Resume work here needs your approval of edits. Tick the approval, then send again.";case"authority_not_allowed":return t||"This Agent’s policy doesn’t allow edits in a resumed session. Change it in Config.";case"action_unavailable":return t||"This runtime can’t do that in this session. Choose another action.";case"provider_failed":return"The runtime failed this turn. Nothing moved to another session; try again later.";default:return t||"The exchange could not be started. Your draft is kept; try again."}},"threadHref",0,function(e,t){let n=new URLSearchParams;if(e.thread_agent_id)return n.set("agent",e.thread_agent_id),t&&n.set("exchange",t),`/?${n.toString()}`;if("group"!==e.kind)return null;t&&n.set("exchange",t);let a=n.toString();return`/threads/${encodeURIComponent(e.id)}${a?`?${a}`:""}`},"validateDraft",0,function(e){let t={},n=e.instruction.trim(),a="ask"===e.mode?"a question":"an objective";return n?e.instruction.length>4e3&&(t.instruction="Keep it under 4000 characters."):t.instruction=`Enter ${a}.`,e.originConversationId||(t.origin="Choose the thread that follows this exchange."),"continue"!==e.mode||e.destinationAgentId||(t.destination="Choose the Agent who continues the work."),t},"validateResumeDraft",0,function(e,t){let n={};return e.trim()?e.length>4e3&&(n.instruction="Keep it under 4000 characters."):n.instruction="Enter what to work on.",t||(n.approval="Approve edits in this session to resume work here."),n}],50814)},22016,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var a={default:function(){return x},useLinkStatus:function(){return v}};for(var s in a)Object.defineProperty(n,s,{enumerable:!0,get:a[s]});let r=e.r(90809),i=e.r(43476),l=r._(e.r(71645)),o=e.r(95057),c=e.r(8372),d=e.r(18581),u=e.r(18967),m=e.r(5550),f=e.r(88540),h=e.r(91949),p=e.r(73668),g=e.r(9396);function x(t){var n;let a,s,r,[x,v]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),j=(0,l.useRef)(null),{href:y,as:N,children:k,prefetch:_=null,passHref:w,replace:S,shallow:C,scroll:$,onClick:A,onMouseEnter:T,onTouchStart:E,legacyBehavior:R=!1,onNavigate:I,transitionTypes:D,ref:P,unstable_dynamicOnHover:L,...O}=t;a=k,R&&("string"==typeof a||"number"==typeof a)&&(a=(0,i.jsx)("a",{children:a}));let U=l.default.useContext(c.AppRouterContext),F=!1!==_,q=!1===_?"none":!0===_?"full":"auto",M="none"!==q?"auto"===q?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,H="string"==typeof(n=N||y)?n:(0,o.formatUrl)(n);if(R){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=l.default.Children.only(a)}let B=R?s&&"object"==typeof s&&s.ref:P,K,W=l.default.useCallback(e=>(null!==U&&(j.current=(0,h.mountLinkInstance)(e,H,U,M,F,v,K)),()=>{j.current&&((0,h.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,h.unmountPrefetchableInstance)(e)}),[F,H,U,M,v,K]),V={ref:(0,d.useMergedRef)(W,B),onClick(t){R||"function"!=typeof A||A(t),R&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!U||t.defaultPrevented||function(t,n,a,s,r,i,o,c="none"){if("u">typeof window){let d,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(n)){s&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:m}=e.r(99781);l.default.startTransition(()=>{m(n,s?"replace":"push",!1===r?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,a.current,o,c)})}}(t,H,j,S,$,I,D,q)},onMouseEnter(e){R||"function"!=typeof T||T(e),R&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),U&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){R||"function"!=typeof E||E(e),R&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),U&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,u.isAbsoluteUrl)(H)?V.href=H:R&&!w&&("a"!==s.type||"href"in s.props)||(V.href=(0,m.addBasePath)(H)),r=R?l.default.cloneElement(s,V):(0,i.jsx)("a",{...O,...V,children:a}),(0,i.jsx)(b.Provider,{value:x,children:r})}let b=(0,l.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,l.useContext)(b);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return s}});let a=e.r(71645);function s(e,t){let n=(0,a.useRef)(null),s=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=n.current;e&&(n.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(n.current=r(e,a)),t&&(s.current=r(t,a))},[e,t])}function r(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return r}});let a=e.r(18967),s=e.r(52817);function r(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,s.hasBasePath)(n.pathname)}catch(e){return!1}}},98183,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a={assign:function(){return o},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return l}};for(var s in a)Object.defineProperty(n,s,{enumerable:!0,get:a[s]});function r(e){let t={};for(let[n,a]of e.entries()){let e=t[n];void 0===e?t[n]=a:Array.isArray(e)?e.push(a):t[n]=[e,a]}return t}function i(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[n,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(n,i(e));else t.set(n,i(a));return t}function o(e,...t){for(let n of t){for(let t of n.keys())e.delete(t);for(let[t,a]of n.entries())e.append(t,a)}return e}},95057,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var s in a)Object.defineProperty(n,s,{enumerable:!0,get:a[s]});let r=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:n}=e,a=e.protocol||"",s=e.pathname||"",l=e.hash||"",o=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:n&&(c=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(c+=":"+e.port)),o&&"object"==typeof o&&(o=String(r.urlQueryToSearchParams(o)));let d=e.search||o&&`?${o}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||i.test(a))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),d&&"?"!==d[0]&&(d="?"+d),s=s.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${a}${c}${s}${d}${l}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},18967,(e,t,n)=>{"use strict";e.i(47167),Object.defineProperty(n,"__esModule",{value:!0});var a={DecodeError:function(){return x},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return j},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return p},ST:function(){return g},WEB_VITALS:function(){return r},execOnce:function(){return i},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return o},isResSent:function(){return m},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return f},stringifyError:function(){return N}};for(var s in a)Object.defineProperty(n,s,{enumerable:!0,get:a[s]});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function i(e){let t,n=!1;return(...a)=>(n||(n=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,o=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&l.test(e)};function c(){let{protocol:e,hostname:t,port:n}=window.location;return`${e}//${t}${n?":"+n:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function m(e){return e.finished||e.headersSent}function f(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(n&&m(n))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let p="u">typeof performance,g=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class x extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class j extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function N(e){return JSON.stringify({message:e.message,stack:e.stack})}},18566,(e,t,n)=>{t.exports=e.r(76562)}]);