@alook/app 0.1.44 → 0.1.45

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 (549) hide show
  1. package/bundled/email-worker/index.js +2 -2
  2. package/bundled/queue-worker/index.js +2 -2
  3. package/bundled/web/.open-next/.build/durable-objects/queue.js +5 -5
  4. package/bundled/web/.open-next/assets/BUILD_ID +1 -1
  5. package/bundled/web/.open-next/assets/_next/static/chunks/02g5jh11jx4_5.js +1 -0
  6. package/bundled/web/.open-next/assets/_next/static/chunks/{2wf5gbdbahwa0.js → 0am8-lzk5f6so.js} +1 -1
  7. package/bundled/web/.open-next/assets/_next/static/chunks/0csk1455e9fp2.js +1 -0
  8. package/bundled/web/.open-next/assets/_next/static/chunks/0et8ivobhk5t6.js +1 -0
  9. package/bundled/web/.open-next/assets/_next/static/chunks/0k-0k02t-ypho.js +3 -0
  10. package/bundled/web/.open-next/assets/_next/static/chunks/{2ioawm1i39tw_.js → 0rxu1bnbdbimp.js} +1 -1
  11. package/bundled/web/.open-next/assets/_next/static/chunks/1_9zxh2xgrrvj.js +1 -0
  12. package/bundled/web/.open-next/assets/_next/static/chunks/{3v5al433woov_.js → 1bvn3-oo_znts.js} +1 -1
  13. package/bundled/web/.open-next/assets/_next/static/chunks/1eu1tzctm4zh-.js +1 -0
  14. package/bundled/web/.open-next/assets/_next/static/chunks/{2dvg72pgc-1ko.js → 1ns803r2yu_hi.js} +1 -1
  15. package/bundled/web/.open-next/assets/_next/static/chunks/1y9hfnbubu5g5.js +1 -0
  16. package/bundled/web/.open-next/assets/_next/static/chunks/{1djbgjs1dwo8y.css → 2-_i2avdhx3nz.css} +1 -0
  17. package/bundled/web/.open-next/assets/_next/static/chunks/2-u65ftauxhdo.js +1 -0
  18. package/bundled/web/.open-next/assets/_next/static/chunks/{2-zk1hjtqcatp.js → 2_l-aub9uxjxr.js} +1 -1
  19. package/bundled/web/.open-next/assets/_next/static/chunks/2wfc21--avj1t.js +1 -0
  20. package/bundled/web/.open-next/assets/_next/static/chunks/{0ovnzevl9qdqv.js → 31wxlskc8rzba.js} +2 -2
  21. package/bundled/web/.open-next/assets/_next/static/chunks/32gz36n25q6ze.css +1 -0
  22. package/bundled/web/.open-next/assets/_next/static/chunks/38d630677bfwv.js +1 -0
  23. package/bundled/web/.open-next/assets/_next/static/chunks/{2ty1bn80gvhok.js → 3_d3s5i7ps-gw.js} +1 -1
  24. package/bundled/web/.open-next/assets/_next/static/chunks/3za4bh6g8aaq7.js +31 -0
  25. package/bundled/web/.open-next/assets/_next/static/chunks/{1mexrl2c3-chp.js → 4427nk1it0jy3.js} +1 -1
  26. package/bundled/web/.open-next/assets/_next/static/chunks/{3pms2zy3gn5_9.js → 44t2-rpluyq3y.js} +2 -2
  27. package/bundled/web/.open-next/assets/_next/static/chunks/{turbopack-1u3gua-cedwvm.js → turbopack-3ac7ksrv5iak1.js} +1 -1
  28. package/bundled/web/.open-next/assets/contact/gus-photo.jpeg +0 -0
  29. package/bundled/web/.open-next/assets/social/readme-card-58c75311e5ba.png +0 -0
  30. package/bundled/web/.open-next/assets/sw.js +1 -1
  31. package/bundled/web/.open-next/cache/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/_global-error.cache +1 -1
  32. package/bundled/web/.open-next/cache/njJipIrXiCtovklQutaYz/_not-found.cache +1 -0
  33. package/bundled/web/.open-next/cache/njJipIrXiCtovklQutaYz/contact.cache +1 -0
  34. package/bundled/web/.open-next/cache/njJipIrXiCtovklQutaYz/device.cache +1 -0
  35. package/bundled/web/.open-next/cache/njJipIrXiCtovklQutaYz/onboarding-preview.cache +1 -0
  36. package/bundled/web/.open-next/cache/njJipIrXiCtovklQutaYz/pricing-concept.cache +1 -0
  37. package/bundled/web/.open-next/cache/njJipIrXiCtovklQutaYz/pricing.cache +1 -0
  38. package/bundled/web/.open-next/cache/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/privacy.cache +1 -1
  39. package/bundled/web/.open-next/cache/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/serwist/sw.js.cache +1 -1
  40. package/bundled/web/.open-next/cloudflare/cache-assets-manifest.sql +1 -1
  41. package/bundled/web/.open-next/cloudflare/init.js +1 -1
  42. package/bundled/web/.open-next/dynamodb-provider/dynamodb-cache.json +1 -1
  43. package/bundled/web/.open-next/middleware/handler.mjs +8 -8
  44. package/bundled/web/.open-next/server-functions/default/src/web/.next/BUILD_ID +1 -1
  45. package/bundled/web/.open-next/server-functions/default/src/web/.next/app-path-routes-manifest.json +1 -2
  46. package/bundled/web/.open-next/server-functions/default/src/web/.next/build-manifest.json +8 -8
  47. package/bundled/web/.open-next/server-functions/default/src/web/.next/prerender-manifest.json +36 -8
  48. package/bundled/web/.open-next/server-functions/default/src/web/.next/required-server-files.json +2 -2
  49. package/bundled/web/.open-next/server-functions/default/src/web/.next/routes-manifest.json +6 -12
  50. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(auth)/sign-in/page.js +1 -2
  51. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(auth)/sign-in/page_client-reference-manifest.js +1 -1
  52. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(home)/page.js +9 -13
  53. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(home)/page_client-reference-manifest.js +1 -1
  54. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  55. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_not-found/page.js +1 -2
  56. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  57. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agent-links/[id]/route.js +2 -2
  58. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agent-links/route.js +2 -2
  59. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/access/[userId]/route.js +2 -2
  60. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/access/route.js +2 -2
  61. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/active-tasks/route.js +2 -2
  62. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/activity/route.js +2 -2
  63. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/chat-init/route.js +2 -2
  64. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/conversation/route.js +2 -2
  65. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/conversations/route.js +2 -2
  66. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/[accountId]/route.js +2 -2
  67. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/[accountId]/sync/route.js +2 -2
  68. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/[accountId]/test/route.js +2 -2
  69. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/email-accounts/route.js +2 -2
  70. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/[meetingId]/approve/route.js +2 -2
  71. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/[meetingId]/route.js +2 -2
  72. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/[meetingId]/stop/route.js +2 -2
  73. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/meetings/route.js +2 -2
  74. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/pin/route.js +2 -2
  75. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/route.js +2 -2
  76. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/skills/route.js +2 -2
  77. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/threads/route.js +2 -2
  78. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/whitelist/[whitelistId]/route.js +2 -2
  79. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/whitelist/route.js +2 -2
  80. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/[id]/workspace/browse/route.js +2 -2
  81. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/active-task-counts/route.js +2 -2
  82. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/active-tasks/route.js +2 -2
  83. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/pins/reorder/route.js +2 -2
  84. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/pins/route.js +2 -2
  85. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/recruit/route.js +2 -2
  86. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/route.js +2 -2
  87. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/agents/sidebar/reorder/route.js +2 -2
  88. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/[id]/content/route.js +2 -2
  89. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/[id]/route.js +2 -2
  90. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/[id]/thumbnail/route.js +2 -2
  91. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/route.js +2 -2
  92. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/artifacts/upload/route.js +2 -2
  93. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/calendar/[id]/route.js +2 -2
  94. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/calendar/route.js +2 -2
  95. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/channels/[id]/route.js +2 -2
  96. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/channels/reorder/route.js +2 -2
  97. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/channels/route.js +2 -2
  98. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/cli/latest-version/route.js +1 -1
  99. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/analytics/funnel-events/route.js +2 -2
  100. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/billing/cancel-change/route.js +2 -2
  101. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/billing/checkout/route.js +2 -2
  102. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/billing/portal/route.js +2 -2
  103. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/billing/route.js +2 -2
  104. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/active/route.js +3 -3
  105. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/approval-requests/[requestId]/approve/route.js +2 -2
  106. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/approval-requests/[requestId]/deny/route.js +2 -2
  107. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/audit-log/route.js +2 -2
  108. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/avatar/route.js +2 -2
  109. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/diagnostics/route.js +2 -2
  110. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/marks/route.js +2 -2
  111. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/notifications/channel/[scopeId]/route.js +2 -2
  112. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/notifications/server/[scopeId]/route.js +2 -2
  113. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/reset-session/route.js +2 -2
  114. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/[id]/route.js +2 -2
  115. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/me/nap/route.js +2 -2
  116. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/bots/route.js +2 -2
  117. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/attachments/[attachmentId]/route.js +2 -2
  118. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/attachments/[attachmentId]/thumbnail/route.js +2 -2
  119. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/attachments/route.js +2 -2
  120. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/members/[userId]/route.js +2 -2
  121. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/members/route.js +2 -2
  122. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/messages/route.js +2 -2
  123. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/messages/seq/[seq]/route.js +2 -2
  124. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/messages/tags/route.js +2 -2
  125. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/participants/[userId]/route.js +2 -2
  126. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/participants/route.js +2 -2
  127. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/pins/[messageId]/route.js +3 -3
  128. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/pins/route.js +2 -2
  129. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/read/route.js +2 -2
  130. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/read-state/route.js +2 -2
  131. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/route.js +2 -2
  132. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/threads/route.js +2 -2
  133. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/[id]/upload/route.js +2 -2
  134. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/participants/batch/route.js +2 -2
  135. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/channels/route.js +2 -2
  136. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/activate/route.js +2 -2
  137. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/bots/route.js +2 -2
  138. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/diagnostics/[reportId]/bundle/route.js +2 -2
  139. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/diagnostics/[reportId]/route.js +2 -2
  140. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/enroll-agent/route.js +4 -3
  141. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/identity/route.js +2 -2
  142. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/resync-diagnostics/route.js +2 -2
  143. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/daemon/resync-wakes/route.js +4 -3
  144. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/diagnostics/[reportId]/route.js +2 -2
  145. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/[id]/accept/route.js +2 -2
  146. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/[id]/owner-decision/route.js +2 -2
  147. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/[id]/reject/route.js +2 -2
  148. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/[id]/route.js +2 -2
  149. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/accepted/route.js +2 -2
  150. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/blocked/route.js +2 -2
  151. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/pending/route.js +2 -2
  152. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/presence/route.js +2 -2
  153. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/friends/request/route.js +2 -2
  154. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/invites/[token]/info/route.js +2 -2
  155. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/invites/[token]/join/route.js +2 -2
  156. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/invites/[token]/route.js +2 -2
  157. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/machines/[id]/reconnect/route.js +2 -2
  158. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/machines/[id]/reset-agents/route.js +2 -2
  159. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/machines/[id]/route.js +2 -2
  160. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/machines/[id]/update/route.js +2 -2
  161. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/machines/pair/route.js +2 -2
  162. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/machines/route.js +2 -2
  163. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/[id]/marks/route.js +2 -2
  164. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/[id]/properties/route.js +2 -2
  165. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/[id]/reactions/[emoji]/route.js +2 -2
  166. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/[id]/reactions/route.js +2 -2
  167. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/[id]/route.js +2 -2
  168. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/[id]/tags/route.js +2 -2
  169. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/batch/route.js +2 -2
  170. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/search/route.js +2 -2
  171. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/messages/tags/batch/route.js +2 -2
  172. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/notifications/devices/[installationId]/route.js +2 -2
  173. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/notifications/devices/route.js +2 -2
  174. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/bots/route.js +2 -2
  175. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/categories/[catId]/route.js +2 -2
  176. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/categories/reorder/route.js +2 -2
  177. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/categories/route.js +2 -2
  178. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/channels/admin/route.js +2 -2
  179. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/channels/reorder/route.js +2 -2
  180. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/channels/route.js +2 -2
  181. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/icon/route.js +2 -2
  182. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/invites/route.js +2 -2
  183. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/leave/route.js +2 -2
  184. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/members/[memberId]/route.js +2 -2
  185. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/members/route.js +2 -2
  186. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/members/search/route.js +2 -2
  187. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/onboard/route.js +2 -2
  188. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/presence/route.js +2 -2
  189. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/route.js +2 -2
  190. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/[id]/unreads/route.js +2 -2
  191. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/channels/route.js +2 -2
  192. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/servers/route.js +2 -2
  193. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/share-image/avatar/[userId]/route.js +2 -2
  194. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/[userId]/avatar/route.js +2 -2
  195. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/[userId]/block/route.js +2 -2
  196. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/[userId]/profile/route.js +2 -2
  197. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/[userId]/unblock/route.js +2 -2
  198. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/account-deletion/code/route.js +2 -2
  199. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/account-deletion/route.js +2 -2
  200. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/attention/route.js +3 -3
  201. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/avatar/route.js +2 -2
  202. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/channel-directory/route.js +2 -2
  203. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/dms/route.js +2 -2
  204. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/ack/route.js +2 -2
  205. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/dms/read-all/route.js +2 -2
  206. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/mentions/[id]/route.js +2 -2
  207. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/mentions/read-all/route.js +2 -2
  208. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/pull/route.js +2 -2
  209. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/snapshot/route.js +2 -2
  210. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/inbox/unreads/read-all/route.js +2 -2
  211. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/marks/route.js +2 -2
  212. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/notifications/channel/[id]/route.js +2 -2
  213. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/notifications/route.js +2 -2
  214. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/notifications/server/[id]/route.js +2 -2
  215. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/profile/route.js +2 -2
  216. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/read-state/route.js +2 -2
  217. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/server-folders/[id]/route.js +2 -2
  218. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/server-folders/reorder/route.js +2 -2
  219. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/server-folders/route.js +2 -2
  220. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/me/server-rail/route.js +2 -2
  221. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/community/users/search/route.js +2 -2
  222. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/config/min-version/route.js +3 -3
  223. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/config/model-options/route.js +2 -2
  224. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/active-task/route.js +2 -2
  225. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/init/route.js +2 -2
  226. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/messages/route.js +2 -2
  227. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/route.js +2 -2
  228. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/[id]/threads/route.js +2 -2
  229. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/check-fresh/route.js +2 -2
  230. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/conversations/route.js +2 -2
  231. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/conversations/[id]/messages/route.js +2 -2
  232. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/deregister/route.js +2 -2
  233. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/heartbeat/route.js +2 -2
  234. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/latest-version/route.js +1 -1
  235. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/register/route.js +2 -2
  236. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/skills/sync/route.js +2 -2
  237. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/sweep/route.js +2 -2
  238. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/complete/route.js +2 -2
  239. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/fail/route.js +2 -2
  240. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/messages/route.js +2 -2
  241. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/progress/route.js +2 -2
  242. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/start/route.js +2 -2
  243. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/status/route.js +2 -2
  244. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/[taskId]/supersede/route.js +2 -2
  245. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/tasks/poll/route.js +2 -2
  246. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/daemon/workspace/report/route.js +2 -2
  247. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/attachment/[index]/route.js +2 -2
  248. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/body/route.js +2 -2
  249. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/raw/route.js +2 -2
  250. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/route.js +2 -2
  251. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/thread/route.js +2 -2
  252. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/[id]/trust/route.js +2 -2
  253. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/notify/route.js +2 -2
  254. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/route.js +2 -2
  255. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/send/route.js +2 -2
  256. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/email/upload/route.js +2 -2
  257. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/flags/[messageId]/route.js +2 -2
  258. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/flags/count/route.js +2 -2
  259. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/flags/route.js +2 -2
  260. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/count/route.js +2 -2
  261. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/read/route.js +2 -2
  262. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/read-all/route.js +2 -2
  263. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/inbox/route.js +2 -2
  264. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/invite/[token]/route.js +2 -2
  265. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/issues/[id]/comments/route.js +2 -2
  266. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/issues/[id]/route.js +2 -2
  267. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/issues/route.js +2 -2
  268. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/[id]/route.js +2 -2
  269. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/activate/route.js +2 -2
  270. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/route.js +2 -2
  271. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/machine-tokens/status/route.js +2 -2
  272. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/me/route.js +2 -2
  273. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/meeting/callback/route.js +2 -2
  274. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/members/me/route.js +2 -2
  275. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/pricing/route.js +2 -2
  276. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/privacy/analytics-consent/route.js +2 -2
  277. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/[runtimeId]/rescan/route.js +2 -2
  278. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/[runtimeId]/update/route.js +2 -2
  279. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/machine/route.js +2 -2
  280. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/runtimes/route.js +2 -2
  281. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/stripe/webhook/route.js +2 -2
  282. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/studios/check-handles/route.js +2 -2
  283. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/studios/check-name/route.js +2 -2
  284. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/studios/route.js +2 -2
  285. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/tasks/[id]/messages/route.js +2 -2
  286. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/tasks/[id]/retry/route.js +2 -2
  287. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/tasks/[id]/route.js +2 -2
  288. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/traces/[traceId]/route.js +2 -2
  289. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/traces/route.js +2 -2
  290. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/invites/[inviteId]/route.js +2 -2
  291. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/invites/route.js +2 -2
  292. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/members/[memberId]/route.js +2 -2
  293. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/members/route.js +2 -2
  294. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/onboarded/route.js +2 -2
  295. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/overview/route.js +2 -2
  296. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/[id]/route.js +2 -2
  297. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/api/workspaces/route.js +2 -2
  298. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/channels/[serverId]/[channelId]/page.js +1 -2
  299. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/channels/[serverId]/[channelId]/page_client-reference-manifest.js +1 -1
  300. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/channels/[serverId]/page.js +1 -2
  301. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/channels/[serverId]/page_client-reference-manifest.js +1 -1
  302. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/channels/[serverId]/settings/page.js +1 -2
  303. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/channels/[serverId]/settings/page_client-reference-manifest.js +1 -1
  304. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/invite/[token]/page.js +1 -2
  305. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/invite/[token]/page_client-reference-manifest.js +1 -1
  306. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/[dmId]/page.js +1 -2
  307. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/[dmId]/page_client-reference-manifest.js +1 -1
  308. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/bots/page.js +1 -2
  309. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/bots/page_client-reference-manifest.js +1 -1
  310. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/friends/page.js +1 -2
  311. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/friends/page_client-reference-manifest.js +1 -1
  312. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/machines/page.js +1 -2
  313. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/machines/page_client-reference-manifest.js +1 -1
  314. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/page.js +1 -2
  315. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/me/page_client-reference-manifest.js +1 -1
  316. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/onboarding-preview/page.js +1 -2
  317. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/onboarding-preview/page_client-reference-manifest.js +1 -1
  318. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/page.js +1 -2
  319. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/@sidebar/page_client-reference-manifest.js +1 -1
  320. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/channels/[serverId]/[channelId]/page.js +1 -2
  321. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/channels/[serverId]/[channelId]/page_client-reference-manifest.js +1 -1
  322. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/channels/[serverId]/page.js +1 -2
  323. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/channels/[serverId]/page_client-reference-manifest.js +1 -1
  324. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/channels/[serverId]/settings/page.js +1 -2
  325. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/channels/[serverId]/settings/page_client-reference-manifest.js +1 -1
  326. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/invite/[token]/page.js +1 -2
  327. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/invite/[token]/page_client-reference-manifest.js +1 -1
  328. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/[dmId]/page.js +1 -2
  329. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/[dmId]/page_client-reference-manifest.js +1 -1
  330. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/bots/page.js +1 -2
  331. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/bots/page_client-reference-manifest.js +1 -1
  332. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/friends/page.js +1 -2
  333. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/friends/page_client-reference-manifest.js +1 -1
  334. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/machines/page.js +1 -2
  335. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/machines/page_client-reference-manifest.js +1 -1
  336. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/page.js +1 -2
  337. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/me/page_client-reference-manifest.js +1 -1
  338. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/onboarding-preview/page.js +1 -2
  339. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/onboarding-preview/page_client-reference-manifest.js +1 -1
  340. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/page.js +1 -2
  341. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/c/page_client-reference-manifest.js +1 -1
  342. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/contact/page/react-loadable-manifest.json +1 -0
  343. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/contact/page.js +15 -0
  344. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/contact/page_client-reference-manifest.js +3 -0
  345. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/device/page.js +1 -2
  346. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/device/page_client-reference-manifest.js +1 -1
  347. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/landing-legacy/page.js +1 -2
  348. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/landing-legacy/page_client-reference-manifest.js +1 -1
  349. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/og/route.js +1 -4
  350. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/onboarding-preview/page.js +1 -2
  351. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/onboarding-preview/page_client-reference-manifest.js +1 -1
  352. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/pricing/page.js +1 -2
  353. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/pricing/page_client-reference-manifest.js +1 -1
  354. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/pricing-concept/page.js +1 -2
  355. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/pricing-concept/page_client-reference-manifest.js +1 -1
  356. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/privacy/page.js +2 -4
  357. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  358. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/[id]/page.js +1 -2
  359. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/[id]/page_client-reference-manifest.js +1 -1
  360. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/page.js +1 -2
  361. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/templates/page_client-reference-manifest.js +1 -1
  362. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app-paths-manifest.json +1 -2
  363. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/19t-_nanoid_index_1c786ik.js +3 -0
  364. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/19t-_nanoid_index_1vcp83o.js +3 -0
  365. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__06symwo._.js +3 -0
  366. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__07gdjvh._.js +19 -0
  367. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0bmmi6e._.js +19 -0
  368. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0bpemo8._.js +1 -1
  369. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0gx-2-t._.js +19 -0
  370. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0hihfzx._.js +3 -0
  371. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0mbgepv._.js +3 -0
  372. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{[root-of-the-server]__0l3sw-k._.js → [root-of-the-server]__0p7c9j1._.js} +1 -1
  373. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0pzo8n3._.js +3 -0
  374. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0rb8j49._.js +3 -0
  375. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__11ak0gl._.js +3 -0
  376. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1cripew._.js +19 -0
  377. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1foieci._.js +3 -0
  378. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1jxir0t._.js +3 -0
  379. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1m4ew76._.js +3 -0
  380. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1n4_8jf._.js +3 -0
  381. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1nngx5a._.js +3 -0
  382. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1qp-usz._.js +3 -0
  383. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1uqy4xy._.js +3 -0
  384. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__209ww8l._.js +1 -1
  385. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[turbopack]_runtime.js +89 -92
  386. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_07x57ao._.js +1 -1
  387. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/{_161c2ym._.js → _0a5sb3w._.js} +1 -1
  388. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1gy2i-f._.js +1 -1
  389. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1le5ldb._.js +1 -1
  390. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1ns8m6i._.js +1 -1
  391. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{0iuv_@mermaid-js_parser_dist_chunks_mermaid-parser_core_11_zxmd._.js → 0iuv_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0870z_n._.js} +1 -1
  392. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{0iuv_@mermaid-js_parser_dist_chunks_mermaid-parser_core_19gjbci._.js → 0iuv_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1572igk._.js} +1 -1
  393. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{0iuv_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0yqoiwt._.js → 0iuv_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1wjzmxm._.js} +1 -1
  394. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__1-_yk2c._.js +3 -0
  395. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{[root-of-the-server]__152ahvj._.js → [root-of-the-server]__13n46gl._.js} +1 -1
  396. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{[root-of-the-server]__0xixi6n._.js → [root-of-the-server]__1eqa66n._.js} +1 -1
  397. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__1qj1l3h._.js +19 -0
  398. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__20y9mhb._.js +5 -0
  399. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[turbopack]_runtime.js +89 -92
  400. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0819w4u._.js +1 -1
  401. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_086-1v_._.js +1 -1
  402. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0_k5-th._.js +1 -1
  403. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_1_xycaz._.js → _0bqeszb._.js} +1 -1
  404. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0j_raci._.js +1 -1
  405. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_158z_cd._.js → _0llbugy._.js} +1 -1
  406. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0q7wmez._.js +1 -1
  407. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0tq2i1w._.js +3 -0
  408. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_09wwjn9._.js → _0ufzncn._.js} +1 -1
  409. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0ulh9qf._.js +3 -0
  410. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_0tt0dcb._.js → _0vk8zvw._.js} +1 -1
  411. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0w9yjze._.js +1 -1
  412. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_09_h_34._.js → _0y0eqoe._.js} +3 -3
  413. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_14h8vwq._.js +1 -1
  414. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1627q-i._.js +3 -0
  415. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_16dsnww._.js +1 -1
  416. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_195r70s._.js +1 -1
  417. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_19kvvyn._.js +1 -1
  418. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_19rebrh._.js +1 -1
  419. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1aq_m_k._.js +1 -1
  420. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1drx8av._.js +1 -1
  421. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_14amjeq._.js → _1gxezrg._.js} +2 -2
  422. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1h0ocvt._.js +1 -1
  423. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_1zmgg5s._.js → _1ha-h78._.js} +1 -1
  424. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_12mfu95._.js → _1i77tft._.js} +1 -1
  425. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_1b-j_ck._.js → _1nyqoql._.js} +1 -1
  426. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1o_mekg._.js +1 -1
  427. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1pi_9tg._.js +1 -1
  428. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1q6lqfs._.js +23 -0
  429. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1tctz6-._.js +1 -1
  430. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_060-egq._.js → _1yoqaop._.js} +1 -1
  431. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{_15mmx_q._.js → _20ss5hf._.js} +2 -2
  432. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_10h71xi._.js → node_modules__pnpm_02451tp._.js} +1 -1
  433. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1o77xbm._.js → node_modules__pnpm_04bhv2w._.js} +1 -1
  434. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1w26axk._.js → node_modules__pnpm_04mpufc._.js} +1 -1
  435. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0-c4w7z._.js → node_modules__pnpm_0982n5o._.js} +1 -1
  436. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1n4pliy._.js → node_modules__pnpm_0a5sf9x._.js} +1 -1
  437. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_11vj9cs._.js → node_modules__pnpm_0aj2kk_._.js} +1 -1
  438. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_07r7ec7._.js → node_modules__pnpm_0g71sw7._.js} +1 -1
  439. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_17-n3fr._.js → node_modules__pnpm_0kqhm8d._.js} +1 -1
  440. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1oogqxc._.js → node_modules__pnpm_0ks_0d2._.js} +1 -1
  441. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_05taii0._.js → node_modules__pnpm_0kzno3w._.js} +1 -1
  442. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0z3jnp7._.js → node_modules__pnpm_0m7_f1y._.js} +1 -1
  443. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_06yeh4t._.js → node_modules__pnpm_0m_ddba._.js} +1 -1
  444. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1y80bp9._.js → node_modules__pnpm_0mod0eh._.js} +1 -1
  445. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1zuc_bp._.js → node_modules__pnpm_0o23c40._.js} +1 -1
  446. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0kt-xrn._.js → node_modules__pnpm_0tbd24e._.js} +1 -1
  447. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_08xpghe._.js → node_modules__pnpm_0tuhje5._.js} +1 -1
  448. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_16fg392._.js → node_modules__pnpm_0x4r179._.js} +1 -1
  449. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_134ajzz._.js → node_modules__pnpm_0y2t8mt._.js} +1 -1
  450. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0odgcfh._.js → node_modules__pnpm_107oy1b._.js} +1 -1
  451. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_059qo-h._.js → node_modules__pnpm_10go8h2._.js} +2 -2
  452. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_15_2kwi._.js → node_modules__pnpm_10i7dh7._.js} +1 -1
  453. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0y7uh_w._.js → node_modules__pnpm_11_zkne._.js} +1 -1
  454. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1oecptr._.js → node_modules__pnpm_12j0yfg._.js} +1 -1
  455. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_20j6szi._.js → node_modules__pnpm_14pyjdw._.js} +2 -2
  456. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1e9w-qj._.js → node_modules__pnpm_1579t9g._.js} +1 -1
  457. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1v-mw7c._.js → node_modules__pnpm_15o-fw-._.js} +1 -1
  458. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0enlfhs._.js → node_modules__pnpm_180umlo._.js} +1 -1
  459. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0ul7hoo._.js → node_modules__pnpm_1cqz94l._.js} +1 -1
  460. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0vvjdku._.js → node_modules__pnpm_1dbz0rf._.js} +1 -1
  461. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1u-2gwv._.js → node_modules__pnpm_1egnulj._.js} +1 -1
  462. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_04t65-s._.js → node_modules__pnpm_1hjb0-a._.js} +1 -1
  463. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1w33_f4._.js → node_modules__pnpm_1j595qx._.js} +1 -1
  464. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0gbarad._.js → node_modules__pnpm_1jip_kw._.js} +1 -1
  465. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_07cbuin._.js → node_modules__pnpm_1m6clkz._.js} +1 -1
  466. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1g-wxqn._.js → node_modules__pnpm_1mxck6f._.js} +1 -1
  467. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0is37m_._.js → node_modules__pnpm_1ogc3rj._.js} +1 -1
  468. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_04_p07z._.js → node_modules__pnpm_1p0-2rs._.js} +1 -1
  469. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0kax2up._.js → node_modules__pnpm_1rtl500._.js} +1 -1
  470. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_0x8swqu._.js → node_modules__pnpm_1s9nla6._.js} +1 -1
  471. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_1mfa5r-._.js → node_modules__pnpm_1ub0j9y._.js} +1 -1
  472. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/{node_modules__pnpm_08e00rr._.js → node_modules__pnpm_1xbpo1h._.js} +1 -1
  473. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web__next-internal_server_app_contact_page_actions_1yu4-yo.js +3 -0
  474. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_0fu2y18._.js +45 -0
  475. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_home_1_hk_b6._.js +1 -1
  476. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_home_1bez_8l._.js +3 -0
  477. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-build-manifest.js +8 -8
  478. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/middleware-manifest.json +5 -5
  479. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/next-font-manifest.js +1 -1
  480. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/next-font-manifest.json +9 -0
  481. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/prefetch-hints.json +14 -0
  482. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.js +1 -1
  483. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/server-reference-manifest.json +1 -1
  484. package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs +2 -2
  485. package/bundled/web/.open-next/server-functions/default/src/web/handler.mjs.meta.json +1993 -1540
  486. package/bundled/web/.open-next/server-functions/default/src/web/index.mjs +6 -6
  487. package/bundled/web/migrations/0105_community_machine_backend_quota_antigravity.sql +51 -0
  488. package/bundled/ws-do/index.js +2 -2
  489. package/dist/daemon/index.js +2353 -878
  490. package/dist/index.js +2 -2
  491. package/package.json +1 -1
  492. package/bundled/web/.open-next/assets/_next/static/chunks/0lz5bw7is23wy.js +0 -1
  493. package/bundled/web/.open-next/assets/_next/static/chunks/0ooxk7ka5qsoh.js +0 -1
  494. package/bundled/web/.open-next/assets/_next/static/chunks/0pnnmxf8-felq.js +0 -1
  495. package/bundled/web/.open-next/assets/_next/static/chunks/1kc0ngu550wq0.js +0 -1
  496. package/bundled/web/.open-next/assets/_next/static/chunks/1rt1fn7mkcr_z.js +0 -1
  497. package/bundled/web/.open-next/assets/_next/static/chunks/1u1ruuc8lxhwv.js +0 -1
  498. package/bundled/web/.open-next/assets/_next/static/chunks/333xt9kn5_dzn.js +0 -1
  499. package/bundled/web/.open-next/assets/_next/static/chunks/37fv9tvez8s7c.js +0 -1
  500. package/bundled/web/.open-next/assets/_next/static/chunks/3nszzx73xzk3u.js +0 -31
  501. package/bundled/web/.open-next/assets/_next/static/chunks/3o7-85vf-tl-w.js +0 -3
  502. package/bundled/web/.open-next/assets/_next/static/chunks/3rsex3qmdxc2w.css +0 -1
  503. package/bundled/web/.open-next/assets/_next/static/chunks/3w___jegxrcol.js +0 -1
  504. package/bundled/web/.open-next/cache/h-xDFwAGyFZWCul5ZL2UD/_not-found.cache +0 -1
  505. package/bundled/web/.open-next/cache/h-xDFwAGyFZWCul5ZL2UD/device.cache +0 -1
  506. package/bundled/web/.open-next/cache/h-xDFwAGyFZWCul5ZL2UD/onboarding-preview.cache +0 -1
  507. package/bundled/web/.open-next/cache/h-xDFwAGyFZWCul5ZL2UD/pricing-concept.cache +0 -1
  508. package/bundled/web/.open-next/cache/h-xDFwAGyFZWCul5ZL2UD/pricing.cache +0 -1
  509. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(home)/opengraph-image-12gd74/route.js +0 -10
  510. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(home)/opengraph-image-12gd74/route_client-reference-manifest.js +0 -3
  511. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(home)/twitter-image-12gd74/route.js +0 -10
  512. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/app/(home)/twitter-image-12gd74/route_client-reference-manifest.js +0 -3
  513. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/0_kl__next-internal_server_app_(home)_opengraph-image-12gd74_route_actions_1bkeokl.js +0 -3
  514. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/1fos_web__next-internal_server_app_(home)_twitter-image-12gd74_route_actions_1fvox77.js +0 -3
  515. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0169v-l._.js +0 -3
  516. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0a9g8-u._.js +0 -3
  517. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0c8r_iv._.js +0 -3
  518. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0cg4itg._.js +0 -3
  519. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__0uo1jvv._.js +0 -19
  520. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1-u9pnd._.js +0 -3
  521. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__18l5erk._.js +0 -19
  522. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1fsg32m._.js +0 -19
  523. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/[root-of-the-server]__1hr6k18._.js +0 -19
  524. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0hpybhx._.js +0 -3
  525. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0t99l75._.js +0 -3
  526. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_0uz8aig._.js +0 -3
  527. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_15d9t2k._.js +0 -3
  528. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_17pci61._.js +0 -3
  529. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1_0fu5w._.js +0 -3
  530. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1dep-km._.js +0 -3
  531. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/_1tp7p0u._.js +0 -3
  532. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/src_web_src_lib_00_xsnr._.js +0 -3
  533. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/src_web_src_lib_04k4wpr._.js +0 -3
  534. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/0zix_@swc_helpers_cjs__interop_require_default_cjs_1t5823z._.js +0 -3
  535. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0e81cc8._.js +0 -3
  536. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__0j8bgph._.js +0 -3
  537. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/[root-of-the-server]__1dhg3hk._.js +0 -19
  538. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_0nai4j9._.js +0 -3
  539. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1hjhp4i._.js +0 -23
  540. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/_1xokjvn._.js +0 -3
  541. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_15vbp8f._.js +0 -3
  542. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_1_qbjc6._.js +0 -45
  543. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_app_(home)_opengraph-image--metadata_1w9jw5q.js +0 -3
  544. package/bundled/web/.open-next/server-functions/default/src/web/.next/server/chunks/ssr/src_web_src_components_home_1wdg9kk._.js +0 -3
  545. /package/bundled/web/.open-next/assets/_next/static/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/_buildManifest.js +0 -0
  546. /package/bundled/web/.open-next/assets/_next/static/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/_clientMiddlewareManifest.js +0 -0
  547. /package/bundled/web/.open-next/assets/_next/static/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/_ssgManifest.js +0 -0
  548. /package/bundled/web/.open-next/cache/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/favicon.ico.cache +0 -0
  549. /package/bundled/web/.open-next/cache/{h-xDFwAGyFZWCul5ZL2UD → njJipIrXiCtovklQutaYz}/robots.txt.cache +0 -0
@@ -1,2 +1,2 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,328076,e=>{"use strict";var t=e.i(248933),n=e.i(382416);e.s(["useCreateStore",0,function(e,a){let[i]=(0,n.useState)(()=>"function"==typeof e?(0,t.createStore)(e):a?(0,t.createStore)(e,a):(0,t.createStore)(e));return i}])},383275,e=>{"use strict";var t=e.i(1087);let n={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};n.node;let a=(0,t.default)(n);e.s(["ChevronLeft",0,a],383275)},846367,e=>{"use strict";e.s(["isPresenceOffline",0,function(e){return"offline"===e},"isPresenceOnline",0,function(e){return"online"===e}])},989621,e=>{e.v({action:"billing-plan-module__2wDEuW__action",botDots:"billing-plan-module__2wDEuW__botDots",content:"billing-plan-module__2wDEuW__content",currentName:"billing-plan-module__2wDEuW__currentName",house:"billing-plan-module__2wDEuW__house",limit:"billing-plan-module__2wDEuW__limit",name:"billing-plan-module__2wDEuW__name",offer:"billing-plan-module__2wDEuW__offer",offers:"billing-plan-module__2wDEuW__offers",price:"billing-plan-module__2wDEuW__price",stub:"billing-plan-module__2wDEuW__stub",studio:"billing-plan-module__2wDEuW__studio"})},166037,e=>{"use strict";var t=e.i(237649),n=e.i(779646),a=e.i(186339);e.s(["FounderPlanChangeDialog",0,function({offer:e,busy:i,onCancel:s,onConfirm:r}){return(0,t.jsx)(n.Dialog,{open:null!==e,onOpenChange:e=>{e||i||s()},children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-md",showCloseButton:!i,children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsxs)(n.DialogTitle,{children:["Leave Founder for ",e?.plan.displayName,"?"]}),(0,t.jsx)(n.DialogDescription,{children:"Completing this purchase permanently ends your Founder access. You can’t restore it, even if you later cancel your subscription. If you leave checkout without paying, you keep Founder."})]}),(0,t.jsxs)(n.DialogFooter,{children:[(0,t.jsx)(a.Button,{variant:"outline",disabled:i,onClick:s,children:"Keep Founder"}),(0,t.jsx)(a.Button,{disabled:i,onClick:r,children:i?"Opening…":"Continue to checkout"})]})]})})}])},765867,690887,e=>{"use strict";var t=e.i(237649),n=e.i(383275),a=e.i(1087);let i={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};i.node;let s=(0,a.default)(i);var r=e.i(186339),o=e.i(934351),l=e.i(728886),d=e.i(382416),c=e.i(732919),u=e.i(904550),m=e.i(909850),p=e.i(621202);function h({idPrefix:e="ot-create"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);return(0,u.useGSAP)(()=>{if(!n.current)return;c.default.set(".ot-bot",{opacity:0,scale:.9}),c.default.set(".ot-dot",{opacity:0}),c.default.set(".ot-say",{opacity:0}),c.default.set(".ot-av",{x:0,y:0,scale:1,svgOrigin:"100 65"});let e=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});e.fromTo(".ot-plus",{scale:.9},{scale:1.12,duration:.9,yoyo:!0,repeat:1}).to(".ot-ph",{opacity:0,scale:1.06,duration:.55},"+=0.15").to(".ot-bot",{opacity:1,scale:1,duration:.55},"<"),(0,p.comeOnline)(e,".ot-dot",120.5,85.5,"-=0.1"),e.to(".ot-av",{scale:.77,x:-50,y:-4,duration:.6,svgOrigin:"100 65"},"+=0.5").from(".ot-say",{x:-8,duration:.5},"<0.15").to(".ot-say",{opacity:1,duration:.4},"<").to({},{duration:1.6}).to(".ot-say",{opacity:0,x:-8,duration:.4}).to(".ot-av",{scale:.9,x:0,y:0,duration:.45,svgOrigin:"100 65"},"<0.1").to(".ot-bot",{opacity:0,duration:.4}).set(".ot-dot",{opacity:0}).set(".ot-av",{scale:1}).to(".ot-ph",{opacity:1,scale:1,duration:.5},"<0.1").to({},{duration:.5})},{scope:n}),(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsxs)("g",{className:"ot-ph ot-center",children:[(0,t.jsx)("rect",{className:"ot-art",x:"74",y:"39",width:"52",height:"52",rx:"16",strokeDasharray:"7 7",opacity:"0.65"}),(0,t.jsxs)("g",{className:"ot-plus ot-center",children:[(0,t.jsx)("line",{className:"ot-art",x1:"100",y1:"55",x2:"100",y2:"75"}),(0,t.jsx)("line",{className:"ot-art",x1:"90",y1:"65",x2:"110",y2:"65"})]})]}),(0,t.jsxs)("g",{className:"ot-bot ot-center",opacity:"0",children:[(0,t.jsxs)("g",{className:"ot-av",children:[(0,t.jsx)("svg",{x:"74",y:"39",width:"52",height:"52",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceB}`})})}),(0,t.jsxs)("g",{className:"ot-online",children:[(0,t.jsx)("circle",{cx:"120.5",cy:"85.5",r:"8.5",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"120.5",cy:"85.5",r:"5.5",fill:"var(--muted-foreground)"}),(0,t.jsx)("circle",{className:"ot-dot",cx:"120.5",cy:"85.5",r:"5.5",fill:"var(--status-online)"})]})]}),(0,t.jsxs)("g",{className:"ot-say",opacity:"0",children:[(0,t.jsx)("text",{x:"82",y:"60",fontFamily:"DM Sans, sans-serif",fontSize:"15",fontWeight:"600",fill:"var(--foreground)",children:"Alli"}),(0,t.jsx)("text",{x:"112",y:"60",fontFamily:"DM Sans, sans-serif",fontSize:"12",fill:"var(--muted-foreground)",children:"now"}),(0,t.jsx)("text",{x:"82",y:"80",fontFamily:"DM Sans, sans-serif",fontSize:"15",fill:"var(--foreground)",children:"Hello World"})]})]})]})}var x=e.i(381153),f=e.i(224950),g=e.i(592941);function b({summary:e,isFounder:n=!1,onViewPlan:a}){let i=e?.activeCount??0,s=e?.ownedCount??0,o=e?.limit??0,l=o>0?Math.min(100,Math.max(0,i/o*100)):0;return(0,t.jsxs)(f.Popover,{children:[(0,t.jsx)(f.PopoverTrigger,{openOnHover:!0,delay:150,render:(0,t.jsxs)("button",{type:"button","data-testid":x.tid.myBotsPlanSummary,disabled:!e,"aria-label":e?`Active Bots: ${i} of ${e.limit} allowed, ${s} owned, ${n?"Founder":e.plan.displayName} plan`:"Active Bots loading",className:"flex min-h-11 w-fit items-center gap-2 rounded-sm text-sm text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:min-h-6",children:["Active Bots",(0,t.jsxs)("svg",{"aria-hidden":"true",className:"size-4 -rotate-90",viewBox:"0 0 20 20",fill:"none",children:[(0,t.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:"2",className:"text-border"}),(0,t.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:"2",pathLength:"100",strokeDasharray:`${l} 100`,strokeLinecap:l>0?"round":"butt"})]})]})}),(0,t.jsx)(f.PopoverContent,{className:"w-64 overflow-hidden p-0",side:"bottom",align:"start",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 p-5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Active bots"}),(0,t.jsx)("span",{className:"font-brand text-xl font-bold leading-none",children:n?"Founder":e?.plan.displayName})]}),(0,t.jsxs)("p",{className:"text-2xl font-semibold leading-none tracking-tight tabular-nums","aria-label":`${i} of ${o} active bot slots used`,children:[i,(0,t.jsxs)("span",{className:"text-lg font-normal text-muted-foreground",children:[" / ",o]})]}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[s," bots owned"]}),a&&(0,t.jsxs)(f.PopoverClose,{onClick:a,render:(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",className:"-mx-2 min-h-11 justify-between sm:min-h-8"}),children:["View plan",(0,t.jsx)(g.ArrowRight,{className:"size-3.5"})]})]})})]})}var y=e.i(248933),v=e.i(777104),j=e.i(561261),N=e.i(159514),C=e.i(374402),w=e.i(636557),k=e.i(51201),A=e.i(506607),D=e.i(849050);e.i(954194);var S=e.i(846367),B=e.i(130901),_=e.i(972525),T=e.i(473131),P=e.i(435355),O=e.i(939088),I=e.i(855372),M=e.i(617527),R=e.i(985885),E=e.i(551095),$=e.i(521073),z=e.i(613349);let F=(0,P.serializeBeamSeed)("initial");function L(e){return(e?.availableRuntimes??[]).map(e=>"string"==typeof e?{id:e,unhealthy:!1}:{id:e.id,...void 0!==e.reasoning?{reasoning:e.reasoning}:{},unhealthy:"unhealthy"===e.status}).sort((e,t)=>Number(e.unhealthy)-Number(t.unhealthy))}function q(e){return e.find(e=>!e.unhealthy)?.id??""}function U({open:e,onOpenChange:n,onCreated:a,guided:i=!1,avatarSeed:s}){let o=(0,k.useCommunityViewSource)("create-bot",e),l=(0,N.useQueryClient)(),c=e=>{e||o.retire(),n(e)},{machines:u}=(0,M.useMachines)(),m=(0,R.useCreateBot)(),p=(0,R.useUploadBotAvatar)(),[h,x]=(0,v.useAtom)((0,j.useCreateAtom)("")),[f,g]=(0,v.useAtom)((0,j.useCreateAtom)("")),[b,K]=(0,v.useAtom)((0,j.useCreateAtom)("")),[Q,W]=(0,v.useAtom)((0,j.useCreateAtom)("")),[H,V]=(0,v.useAtom)((0,j.useCreateAtom)(null)),[Y,G]=(0,v.useAtom)((0,j.useCreateAtom)(null)),[J,X]=(0,v.useAtom)((0,j.useCreateAtom)({})),[Z,ee]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[et,en]=(0,v.useAtom)((0,j.useCreateAtom)({kind:"procedural",image:F})),ea=u.find(e=>e.id===b),ei=(0,d.useMemo)(()=>L(ea),[ea]),es=i&&!!(ea&&Q)&&1===u.filter(e=>(0,S.isPresenceOnline)(e.status)).length&&1===ei.filter(e=>!e.unhealthy).length,er=(0,d.useMemo)(()=>({scope:[o.signal],store:(0,y.createStore)(!1)}),[o.signal]).store;async function eo(){if(["create-command","avatar-command"].some(e=>l.isMutating({mutationKey:[...C.communityKeys.bots(),e],exact:!0,predicate:e=>e.state.variables.input?.assertActive?.signal===o.signal})>0))return;let e=o.capture();e();let t=function({name:e,machineId:t,runtime:n}){let a={};return e.trim()||(a.name="Name is required"),t||(a.machineId="Pick a machine"),n||(a.runtime="Pick a runtime"),a}({name:h,machineId:b,runtime:Q});if(X(t),!(t.name||t.machineId||t.runtime))try{let t=await m.mutateAsync({assertActive:e,name:h.trim(),description:f.trim()||void 0,machineId:b,runtime:Q,image:"procedural"===et.kind?et.image:void 0,model:H,reasoningEffort:Y});e();let n=!1;if("photo"===et.kind&&et.file)try{await p.mutateAsync({botId:t.bot.id,file:et.file,assertActive:e}),e()}catch(t){try{e()}catch{return}if((0,w.isAbortError)(t))return;n=!0,(0,D.toastApiError)(t,"Bot created, but the avatar photo failed to upload",e)}n||A.toast.success(`Created ${h.trim()}`),e(),await a?.(t.bot),e(),c(!1)}catch(t){if((0,w.isAbortError)(t))return;(0,D.toastApiError)(t,"Couldn't create the bot",e)}}return(0,d.useEffect)(()=>{!e||er.get()||(er.setState(()=>!0),x((0,O.randomBotName)()),en({kind:"procedural",image:(0,P.serializeBeamSeed)(s??crypto.randomUUID())}),g(""),K(""),W(""),V(null),G(null),X({}),ee(!1))},[e,s,er,x,en,g,K,W,V,G,X,ee]),(0,d.useEffect)(()=>{if(e){if(""===b){let e=u.find(e=>(0,S.isPresenceOnline)(e.status))?.id??"";e&&K(e);return}if(""===Q){let e=q(ei);e&&W(e)}}},[e,u,ei,b,Q,K,W]),(0,t.jsxs)(_.CommunitySheet,{open:e,onOpenChange:c,title:"Create a bot",bodyClassName:"flex flex-col gap-6",footer:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:e,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:eo,disabled:m.isPending||p.isPending,children:m.isPending?"Creating…":"Create bot"})]}),children:[(0,t.jsx)(E.BotFormFields,{avatarDraft:et,onAvatarChange:en,name:h,setName:function(e){x(e),J.name&&e.trim()&&X(e=>({...e,name:void 0}))},onShuffle:function(){x((0,O.randomBotName)()),X(e=>({...e,name:void 0}))},description:f,setDescription:g,nameError:J.name}),es&&!Z?(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-lg bg-muted/60 px-3 py-2.5",children:[(0,t.jsx)(I.ProviderLogo,{provider:Q,className:"size-5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"truncate text-sm font-medium",children:["Ready on ",ea?(0,B.machineName)(ea):"your machine"]}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[Q," · Default model"]})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>ee(!0),children:"Change"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(T.Label,{className:"text-xs text-muted-foreground",children:"Machine"}),0===u.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No paired machines — pair one first."}):(0,t.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":"Machine","data-testid":"bot-machine-picker",children:u.map(e=>{let n=(0,S.isPresenceOnline)(e.status),a=b===e.id;return(0,t.jsxs)("label",{className:(0,z.cn)("flex items-center gap-2 rounded-lg border p-2 cursor-pointer transition-colors",a?"border-primary bg-primary/5":"border-border/50 hover:border-foreground/20",!n&&"opacity-40 pointer-events-none"),children:[(0,t.jsx)("input",{type:"radio",name:"bot-machine",value:e.id,checked:a,disabled:!n,onChange:()=>{var t;K(t=e.id),W(q(L(u.find(e=>e.id===t)))),V(null),G(null),X(e=>({...e,machineId:void 0}))},className:"accent-primary size-3.5"}),(0,t.jsx)("span",{className:"text-sm",children:(0,B.machineName)(e)}),(0,t.jsxs)("span",{className:(0,z.cn)("ml-auto inline-flex items-center gap-1 text-xs",n?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground"),children:[(0,t.jsx)("span",{className:(0,z.cn)("inline-block size-1.5 rounded-full",n?"bg-status-online":"bg-muted-foreground")}),n?"Online":"Offline"]})]},e.id)})}),J.machineId&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:J.machineId})]}),ea&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:(0,t.jsx)($.BotRuntimeFields,{options:ei,runtime:Q,model:H,daemonVersion:ea?.daemonVersion,reasoningEffort:Y,onRuntimeChange:function(e){W(e),X(e=>({...e,runtime:void 0}))},onModelChange:V,onReasoningEffortChange:G,radioName:"bot-runtime",runtimeError:J.runtime,disableUnhealthyOptions:!0})})]})]})}var K=e.i(484065),Q=e.i(569697),W=e.i(48920),H=e.i(606261),V=e.i(746069),Y=e.i(168614);e.i(400175);var G=e.i(261819),J=e.i(89164),X=e.i(344431),Z=e.i(450463);let ee=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});function et(e){return"reported"===e.bucket.product.kind?`reported:${e.bucket.product.id}`:"unknown"}function en(e){let t=e.bucket.model;return"reported"===t.kind?`reported:${t.id}`:t.kind}function ea(e){let t;return[et(e),en(e),"rolling"===(t=e.bucket.window).kind?`rolling:${t.durationSeconds}`:"calendar"===t.kind?`calendar:${t.period}`:`provider_defined:${t.id}:${void 0===t.durationSeconds?"absent":t.durationSeconds}`,e.bucket.limitId].join("\0")}function ei(e){let t=Math.min(12,function(e){let t=String(e).toLowerCase();if(t.includes("e-")){let[e,n]=t.split("e-");return Number(n)+(e.split(".")[1]?.length??0)}return t.split(".")[1]?.length??0}(e.usedPercent));return Number((100-e.usedPercent).toFixed(t))}function es(e){return`${ei(e)}% left`}function er(e){if(!e.resetsAt)return 1/0;let t=Date.parse(e.resetsAt);return Number.isNaN(t)?1/0:t}function eo(e){return"supported"===e.capability&&("available"===e.snapshot.status||"stale"===e.snapshot.status)&&e.snapshot.limits.length>0}function el(e){return e.split(/[-_]/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(" ")}function ed({machineId:e,entries:n}){let[a,i]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),s=n?.some(eo)?null:n?.length?n.some(e=>"supported"===e.capability&&"pending"===e.snapshot.status)?"Quota pending":n.every(e=>"unsupported"===e.capability)?"Quota not supported":"Quota unavailable":"Quota unavailable";if(s||!n)return(0,t.jsxs)("div",{"data-testid":x.tid.machineQuota(e),className:"flex h-7 min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n?.map(e=>(0,t.jsx)(I.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"},e.scope.agentBackendId)),(0,t.jsx)("span",{className:"truncate",children:s??"Quota unavailable"})]});let r=n.filter(eo).toSorted((e,t)=>e.scope.agentBackendId.localeCompare(t.scope.agentBackendId)).flatMap(e=>{if("available"!==e.snapshot.status&&"stale"!==e.snapshot.status)return[];let t=e.snapshot.limits.toSorted((e,t)=>{let n=ei(e)-ei(t);if(0!==n)return n;let a=er(e),i=er(t);return a!==i?a<i?-1:1:ea(e).localeCompare(ea(t))})[0]??null;return t?[{entry:e,limit:t}]:[]});if(0===r.length)return null;let o=n.reduce((e,t)=>"available"===t.snapshot.status||"stale"===t.snapshot.status?e+t.snapshot.limits.length:e,0),l=r.map(({entry:e,limit:t})=>{let n="stale"===e.snapshot.status?", stale":"";return`${el(e.scope.agentBackendId)} ${es(t)}${n}`}).join("; "),d=n.toSorted((e,t)=>{let n=Number(eo(t))-Number(eo(e));return 0!==n?n:e.scope.agentBackendId.localeCompare(t.scope.agentBackendId)});return(0,t.jsxs)(f.Popover,{open:a,onOpenChange:i,children:[(0,t.jsx)(f.PopoverTrigger,{render:(0,t.jsxs)("button",{type:"button","aria-expanded":a,"aria-label":`Quota details: ${l}. ${o} ${1===o?"limit":"limits"}`,"data-testid":x.tid.machineQuota(e),className:"group flex min-h-11 max-w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1 rounded-md py-2 text-left text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:min-h-7 sm:py-1",children:[(0,t.jsx)("span",{className:"shrink-0 text-foreground/70",children:"Quota"}),(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-border",children:"·"}),r.map(({entry:e,limit:n},a)=>{let i="stale"===e.snapshot.status,s=`${el(e.scope.agentBackendId)}: ${es(n)}${i?" (stale)":""}`;return(0,t.jsxs)("span",{className:"contents",children:[a>0&&(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-border",children:"·"}),(0,t.jsxs)("span",{"aria-label":s,title:s,className:"inline-flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(I.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"}),(0,t.jsxs)("span",{className:i?"font-mono tabular-nums text-warning":"font-mono tabular-nums text-foreground/85",children:[ei(n),"%"]}),i&&(0,t.jsx)("span",{className:"text-[10px] text-warning",children:"stale"})]})]},e.scope.agentBackendId)}),(0,t.jsx)(Q.ChevronDown,{className:"size-3 shrink-0 transition-transform group-data-popup-open:rotate-180"})]})}),(0,t.jsx)(f.PopoverContent,{align:"start",className:"max-h-[min(32rem,calc(100vh-2rem))] w-80 max-w-[calc(100vw-1rem)] overflow-y-auto p-4 thin-scrollbar","data-testid":x.tid.machineQuotaDetail(e),children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:"Machine quota"}),d.map(e=>{let n=e.snapshot;if("available"!==n.status&&"stale"!==n.status)return(0,t.jsxs)("section",{"data-quota-backend":e.scope.agentBackendId,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(I.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-medium text-foreground",children:el(e.scope.agentBackendId)})]}),(0,t.jsx)("div",{className:"rounded-md border border-border/70 px-3 py-2 text-xs text-muted-foreground",children:"unsupported"===e.capability?"Not supported":"supported"===e.capability&&"pending"===e.snapshot.status?"Pending":"Unavailable"})]},e.scope.agentBackendId);let a=function(e){let t=new Map;for(let n of e){let e=`${et(n)}\u0000${en(n)}`,a=t.get(e);a?a.limits.push(n):t.set(e,{key:e,product:n.bucket.product.displayName,model:function(e){let t=e.bucket.model;return"not_applicable"===t.kind?null:"unknown"===t.kind?"Model unavailable":t.id}(n),limits:[n]})}return[...t.values()]}(n.limits);return(0,t.jsxs)("section",{"data-quota-backend":e.scope.agentBackendId,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(I.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-medium text-foreground",children:el(e.scope.agentBackendId)})]}),(0,t.jsx)("span",{className:"stale"===n.status?"shrink-0 text-[11px] text-warning":"shrink-0 text-[11px] text-muted-foreground",children:[n.planName,"stale"===n.status?"Stale":null].filter(Boolean).join(" · ")})]}),0===a.length?(0,t.jsx)("div",{className:"rounded-md border border-border/70 px-3 py-2 text-xs text-muted-foreground",children:"Unavailable"}):a.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-xs text-foreground",children:e.product}),e.model&&(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.model})]}),(0,t.jsx)("div",{className:"flex flex-col divide-y divide-border/60 rounded-md border border-border/70",children:e.limits.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-foreground",children:e.bucket.window.displayName}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-xs font-medium tabular-nums text-foreground",children:es(e)})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{children:function(e){if(!e.resetsAt)return"Reset unavailable";let t=new Date(e.resetsAt);return Number.isNaN(t.getTime())?"Reset unavailable":`Resets ${ee.format(t)}`}(e)}),(0,t.jsxs)("span",{className:"shrink-0",children:["Updated ",(0,Z.timeAgo)(n.observedAt)]})]})]},ea(e)))})]},e.key))]},e.scope.agentBackendId)})]})})]})}var ec=e.i(329686),eu=e.i(779646),em=e.i(996718);let ep=new Intl.NumberFormat(void 0),eh=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"}),ex=["bg-muted-foreground/15","bg-status-online/30","bg-status-online/55","bg-status-online/80","bg-status-online"],ef=[{key:"input",label:"Input"},{key:"output",label:"Output"},{key:"cache",label:"Cache"}];function eg(e){var t;let n=(t=e.day,new Date(`${t}T00:00:00.000Z`));return Number.isNaN(n.getTime())?e.day:eh.format(n)}function eb(e){return null===e?"Unavailable":ep.format(e)}function ey(e){let t=Object.values(e.metrics).filter(e=>null!==e);return{knownTotal:t.reduce((e,t)=>e+t,0),unavailable:0===t.length}}function ev({day:e,includeTotal:n=!1}){let a=ey(e);return(0,t.jsxs)("span",{className:"flex min-w-44 flex-col gap-1",children:[(0,t.jsx)("span",{className:"font-medium",children:eg(e)}),n&&(0,t.jsxs)("span",{className:"flex items-center justify-between gap-4 font-medium",children:[(0,t.jsx)("span",{children:"Total"}),(0,t.jsx)("span",{className:"font-mono tabular-nums",children:a.unavailable?"Unavailable":ep.format(a.knownTotal)})]}),ef.map(n=>(0,t.jsxs)("span",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)("span",{children:n.label}),(0,t.jsx)("span",{className:"font-mono tabular-nums",children:eb(e.metrics[n.key])})]},n.key))]})}function ej({botId:e,days:n,interactive:a,ariaLabel:i,className:s}){return(0,t.jsx)("span",{role:a?"img":void 0,"aria-label":a?i:void 0,"aria-hidden":!a||void 0,"data-testid":x.tid.botUsage(e),className:["grid w-fit grid-flow-col gap-[3px] [grid-template-rows:repeat(3,minmax(0,1fr))]",s??""].join(" "),children:n.map(n=>{var i;let s=(i=ey(n)).unavailable||i.knownTotal<=0?0:i.knownTotal<1e7?1:i.knownTotal<1e8?2:i.knownTotal<5e8?3:4,r=(0,t.jsx)("span",{"aria-label":a?[eg(n),`Input ${eb(n.metrics.input)}`,`Output ${eb(n.metrics.output)}`,`Cache ${eb(n.metrics.cache)}`].join(". "):void 0,"data-testid":x.tid.botUsageDay(e,n.day),className:["size-3 rounded-[2px]",ex[s]].join(" ")},n.day);return a?(0,t.jsxs)(ec.Tooltip,{children:[(0,t.jsx)(ec.TooltipTrigger,{render:r}),(0,t.jsx)(ec.TooltipContent,{className:"items-start",children:(0,t.jsx)(ev,{day:n})})]},n.day):r})})}function eN({botId:e,usage:n,className:a}){let i=(0,em.useBreakpoint)(),s=n?.capability==="supported"?n.days.at(-1):void 0,[r,o]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[l,c]=(0,v.useAtom)((0,j.useCreateAtom)(s?.day??""));if((0,d.useEffect)(()=>{!s||n?.days.some(e=>e.day===l)||c(s.day)},[s,l,c,n]),(0,d.useEffect)(()=>{"mobile"!==i&&o(!1)},[i,o]),!n||"supported"!==n.capability)return null;let u=n.days.reduce((e,t)=>e+ey(t).knownTotal,0),m=`Token usage over the last 30 days: ${ep.format(u)} known tokens total`;if("mobile"===i){let i=n.days.find(e=>e.day===l)??s,d=[...n.days].reverse();return(0,t.jsxs)(eu.Dialog,{open:r,onOpenChange:e=>{e&&s&&c(s.day),o(e)},children:[(0,t.jsx)(eu.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Open token usage details","aria-haspopup":"dialog","data-testid":x.tid.botUsageTrigger(e),className:["grid min-h-11 place-items-center rounded-md px-1 outline-none active:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a??""].join(" ")}),children:(0,t.jsx)(ej,{botId:e,days:n.days,interactive:!1})}),(0,t.jsxs)(eu.DialogContent,{"data-testid":x.tid.botUsageDialog(e),className:"gap-4",children:[(0,t.jsxs)(eu.DialogHeader,{children:[(0,t.jsx)(eu.DialogTitle,{children:"Token usage"}),(0,t.jsx)(eu.DialogDescription,{children:"Choose a date to view exact token totals."})]}),(0,t.jsx)("div",{"data-testid":x.tid.botUsageDateRail(e),className:"-mx-1 flex min-w-0 gap-2 overflow-x-auto px-1 pb-1 overscroll-x-contain thin-scrollbar scrollbar-none",children:d.map(n=>{let a=n.day===i?.day;return(0,t.jsx)("button",{type:"button","aria-pressed":a,"data-testid":x.tid.botUsageDialogDay(e,n.day),className:["h-11 shrink-0 whitespace-nowrap rounded-md border px-3 text-sm outline-none active:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?"border-foreground bg-foreground font-medium text-background":"border-border bg-background text-muted-foreground hover:bg-accent hover:text-foreground"].join(" "),onClick:()=>c(n.day),children:eg(n)},n.day)})}),i&&(0,t.jsx)("div",{"aria-live":"polite","data-testid":x.tid.botUsageDialogSummary(e),className:"border-t pt-4",children:(0,t.jsx)(ev,{day:i,includeTotal:!0})})]})]})}return(0,t.jsx)(ej,{botId:e,days:n.days,interactive:!0,ariaLabel:m,className:a})}var eC=e.i(575695),ew=e.i(962726),ek=e.i(731517);let eA=[{key:"memory",title:"Memory",tile:function({idPrefix:e="ot-memory"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);(0,u.useGSAP)(()=>{let e=n.current;if(!e)return;let t=[".ot-src0",".ot-src1",".ot-src2"].map((t,n)=>{let a=e.querySelector(t);return{g:a,lbl:a.querySelector(".ot-lbl"),base:-90+120*n}}),a=(e,t)=>{let n=t*Math.PI/180,a=100+40*Math.cos(n),i=62+40*Math.sin(n),s=Math.max(0,1-Math.abs(((t- -90)%360+540)%360-180)/60);e.g.setAttribute("transform",`translate(${a.toFixed(2)} ${i.toFixed(2)})`),e.g.style.opacity=(.5+.5*s).toFixed(3)},i={a:0};c.default.set(".ot-dot",{opacity:1}),c.default.set(".ot-lbl",{opacity:0}),t.forEach(e=>a(e,e.base)),(0,p.breathe)(e,".ot-agent",1.02,3.4);let s=c.default.timeline({repeat:-1});for(let e=0;e<3;e++){let n=t[(-e%3+3)%3];s.to(n.lbl,{opacity:1,duration:.3}).to({},{duration:.6}).to(n.lbl,{opacity:0,duration:.25}).to(i,{a:"+=120",duration:.85,ease:"power2.inOut",onUpdate:()=>t.forEach(e=>a(e,e.base+i.a))})}let r=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});r.to({},{duration:3}).to(".ot-agent",{opacity:.3,duration:.5}),(0,p.goOffline)(r,".ot-dot",112,73,"<"),r.to({},{duration:1.1}).to(".ot-agent",{opacity:1,duration:.5}),(0,p.comeOnline)(r,".ot-dot",112,73,"<"),r.to({},{duration:1.5})},{scope:n});let i=[{cls:"ot-src0",icon:a.book,label:"memory.md"},{cls:"ot-src1",icon:a.layers,label:"experiences"},{cls:"ot-src2",icon:a.clock,label:"timeline"}];return(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsx)("circle",{cx:"100",cy:"62",r:"40",className:"ot-art",opacity:"0.14",strokeDasharray:"2 5"}),(0,t.jsx)("g",{className:"ot-agent ot-center",children:(0,t.jsx)("svg",{x:"83",y:"45",width:"34",height:"34",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceA}`})})})}),(0,t.jsxs)("g",{className:"ot-online",children:[(0,t.jsx)("circle",{cx:"112",cy:"73",r:"6",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"112",cy:"73",r:"4",fill:"var(--muted-foreground)"}),(0,t.jsx)("circle",{className:"ot-dot",cx:"112",cy:"73",r:"4",fill:"var(--status-online)"})]}),i.map(e=>(0,t.jsxs)("g",{className:`ot-src ${e.cls}`,children:[(0,t.jsx)("circle",{className:"ot-pill",cx:"0",cy:"0",r:"12",fill:"var(--muted)"}),(0,t.jsx)("svg",{className:"ot-ic ot-accent",x:"-8",y:"-8",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,t.jsx)("use",{href:`#${e.icon}`})}),(0,t.jsx)("text",{className:"ot-lbl",x:"16",y:"4",textAnchor:"start",fontFamily:"DM Mono, monospace",fontSize:"8.5",fill:"var(--foreground)",opacity:"0",children:e.label})]},e.cls))]})},body:"Your agent has a built-in memory: it writes to memory.md, experiences, and a timeline. These survive a reset and load back on wake."},{key:"workspace",title:"Local workspace",tile:function({idPrefix:e="ot-workspace"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);return(0,u.useGSAP)(()=>{if(!n.current)return;let e=[".ot-f0",".ot-f1",".ot-f2"];c.default.set(e,{opacity:0});let t=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});e.forEach((e,n)=>{t.fromTo(e,{opacity:0},{opacity:1,duration:.5},0===n?">":"+=0.5")}),t.to({},{duration:1.7}).to(e,{opacity:0,duration:.5,stagger:.08}).to({},{duration:.5})},{scope:n}),(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsx)("rect",{className:"ot-art",x:"20",y:"20",width:"160",height:"100",rx:"9",opacity:"0.9"}),(0,t.jsx)("svg",{x:"29",y:"30",width:"22",height:"22",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceA}`})})}),(0,t.jsxs)("g",{className:"ot-oon",children:[(0,t.jsx)("circle",{cx:"48",cy:"49",r:"4",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"48",cy:"49",r:"2.5",fill:"var(--status-online)"})]}),(0,t.jsx)("text",{x:"60",y:"45",fontFamily:"DM Mono, monospace",fontSize:"10",fill:"var(--foreground)",children:"~/.alook/agent"}),(0,t.jsx)("line",{className:"ot-art",x1:"20",y1:"58",x2:"180",y2:"58",opacity:"0.35"}),[{cls:"ot-f0",ty:"65.5",name:"memory.md"},{cls:"ot-f1",ty:"83.5",name:"work.pdf"},{cls:"ot-f2",ty:"101.5",name:"todo.md"}].map(e=>(0,t.jsxs)("g",{className:`ot-wfile ${e.cls}`,transform:`translate(34.5 ${e.ty})`,children:[(0,t.jsx)("svg",{x:"0",y:"0",width:"11",height:"11",viewBox:"0 0 24 24",className:"ot-accent",children:(0,t.jsx)("use",{href:`#${a.file}`})}),(0,t.jsx)("text",{x:"17",y:"9.5",fontFamily:"DM Mono, monospace",fontSize:"10",fill:"var(--foreground)",children:e.name})]},e.cls))]})},body:"Each agent gets a private folder on your machine. Its files — and the runtime itself — stay local; nothing is uploaded."},{key:"nap",title:"Nap",tile:function({idPrefix:e="ot-nap"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);return(0,u.useGSAP)(()=>{let e=n.current;if(!e)return;let t=e.querySelector(".ot-ring"),a=e.querySelector(".ot-pct");c.default.set(".ot-sleep",{opacity:0,y:4}),c.default.set(".ot-dot",{opacity:1}),c.default.set(t,{attr:{"stroke-dashoffset":188.5}}),a.textContent="context 0%";let i=c.default.to(".ot-agent",{scale:1.03,duration:2,ease:p.OT_EASE,yoyo:!0,repeat:-1,transformOrigin:"center"}),s={v:0},r=()=>{a.textContent="context "+Math.round(s.v)+"%",t.setAttribute("stroke-dashoffset",(188.5*(1-s.v/100)).toFixed(1))},o=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});o.to(s,{v:100,duration:3.2,ease:"power1.in",onUpdate:()=>{r(),i.timeScale(1-s.v/100*.7)}}).to({},{duration:.5}).to(".ot-agent",{opacity:.32,duration:.5}).to(".ot-sleep",{opacity:.9,y:-6,duration:.9,ease:"power1.out"},"<0.1"),(0,p.goOffline)(o,".ot-dot",112,71,"<"),o.to(s,{v:0,duration:.7,ease:"power2.inOut",onUpdate:r},"<0.1").to(".ot-sleep",{opacity:0,duration:.4}).to(".ot-agent",{opacity:1,duration:.5,onStart:()=>i.timeScale(1)},"+=0.3"),(0,p.comeOnline)(o,".ot-dot",112,71,"<"),o.to({},{duration:1})},{scope:n}),(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsx)("circle",{cx:"100",cy:"60",r:"30",fill:"none",stroke:"var(--muted)",strokeWidth:"5"}),(0,t.jsx)("circle",{className:"ot-ring",cx:"100",cy:"60",r:"30",fill:"none",stroke:"var(--status-online)",strokeWidth:"5",strokeLinecap:"round",transform:"rotate(-90 100 60)",strokeDasharray:"188.5",strokeDashoffset:"188.5"}),(0,t.jsx)("g",{className:"ot-agent ot-center",children:(0,t.jsx)("svg",{x:"83",y:"43",width:"34",height:"34",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceA}`})})})}),(0,t.jsxs)("g",{className:"ot-online",children:[(0,t.jsx)("circle",{cx:"112",cy:"71",r:"6",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"112",cy:"71",r:"4",fill:"var(--muted-foreground)"}),(0,t.jsx)("circle",{className:"ot-dot",cx:"112",cy:"71",r:"4",fill:"var(--status-online)"})]}),(0,t.jsx)("text",{className:"ot-pct",x:"100",y:"106",textAnchor:"middle",fontFamily:"DM Mono, monospace",fontSize:"10",fill:"var(--muted-foreground)",children:"context 0%"}),(0,t.jsxs)("g",{className:"ot-sleep ot-accent ot-center",opacity:"0",children:[(0,t.jsx)("svg",{x:"140",y:"30",width:"20",height:"20",viewBox:"0 0 24 24",children:(0,t.jsx)("use",{href:`#${a.moon}`})}),(0,t.jsx)("text",{x:"163",y:"40",fontFamily:"DM Mono, monospace",fontSize:"12",fill:"currentColor",children:"z"}),(0,t.jsx)("text",{x:"172",y:"32",fontFamily:"DM Mono, monospace",fontSize:"8",fill:"currentColor",children:"z"})]})]})},body:'With time and work, your agent piles up context from every turn. Tell it to "nap" to clear that short-term context and start fresh — it leaves a handoff note first.'}];function eD({open:e,onOpenChange:a}){let[i,s]=(0,v.useAtom)((0,j.useCreateAtom)(0)),o=eA[i],l=o.tile,d=e=>s(t=>(t+e+eA.length)%eA.length);return(0,t.jsx)(eu.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(eu.DialogContent,{showCloseButton:!1,className:"flex w-full max-w-lg flex-col gap-0 overflow-hidden p-0 sm:max-w-lg",children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3 px-5 pt-4 pb-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(eu.DialogTitle,{className:"text-base font-medium",children:"How your agent works"}),(0,t.jsx)(eu.DialogDescription,{className:"text-xs text-muted-foreground",children:"A few mechanics worth knowing about the agents you own."})]}),(0,t.jsx)(eu.DialogClose,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm","aria-label":"Close",className:"-mr-1 shrink-0 text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(ek.X,{className:"size-4"})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 px-5 pb-5",children:[(0,t.jsx)("div",{className:"overflow-hidden rounded-xl bg-muted/40",children:(0,t.jsx)("div",{className:"aspect-200/130 w-full",children:(0,t.jsx)(l,{},o.key)})}),(0,t.jsxs)("div",{className:"flex h-28 flex-col gap-1 text-center",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:o.title}),(0,t.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:o.body})]}),(0,t.jsxs)("div",{className:"mt-1 flex items-center justify-between",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous",onClick:()=>d(-1),className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(n.ChevronLeft,{className:"size-5"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eA.map((e,n)=>(0,t.jsx)("button",{type:"button","aria-label":`Go to ${e.title}`,"aria-current":n===i,onClick:()=>s(n),className:"size-1.5 rounded-full transition-colors "+(n===i?"bg-foreground":"bg-border hover:bg-muted-foreground")},e.key))}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next",onClick:()=>d(1),className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(ew.ChevronRight,{className:"size-5"})})]})]})]})})}var eS=e.i(86694),eB=e.i(678401),e_=e.i(183866);function eT({event:e}){let n,a,i,s;return(0,t.jsxs)("div",{"data-testid":"bot-activity-row",className:"group grid min-h-11 grid-cols-[64px_56px_minmax(0,1fr)] items-center gap-x-3 px-4 hover:bg-accent/30 sm:min-h-0 sm:items-baseline sm:py-1.5",children:[(0,t.jsx)("time",{dateTime:e.createdAt,title:new Date(e.createdAt).toLocaleString(),className:"font-mono text-[11px] tabular-nums text-muted-foreground/70",children:(a=String((n=new Date(e.createdAt)).getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0"),s=String(n.getSeconds()).padStart(2,"0"),`${a}:${i}:${s}`)}),(0,t.jsx)(eP,{kind:e.kind}),(0,t.jsx)("div",{className:"min-w-0 text-left",children:(0,t.jsx)(eO,{event:e})})]})}function eP({kind:e}){var n;let{label:a,tone:i}="cli_invocation"===(n=e)?{label:"daemon",tone:"text-foreground/70"}:"tool_call"===n?{label:"tool",tone:"text-muted-foreground"}:"turn_interrupt"===n?{label:"stop",tone:"text-foreground/70"}:"wake_trigger"===n?{label:"wake",tone:"text-foreground/70"}:"session_reset"===n?{label:"reset",tone:"text-foreground/70"}:"nap"===n?{label:"nap",tone:"text-foreground/70"}:"model_changed"===n?{label:"model",tone:"text-foreground/70"}:"provider_changed"===n?{label:"provider",tone:"text-foreground/70"}:"error"===n?{label:"err",tone:"text-destructive"}:{label:"think",tone:"text-muted-foreground/70"};return(0,t.jsx)("span",{className:`select-none font-mono text-[10px] font-medium uppercase tracking-wider ${i}`,"aria-label":a,children:a})}function eO({event:e}){if("cli_invocation"===e.kind){let n=(0,e_.formatAlookAuditCommand)(e.payload),a=n.replace(/^alook\s+/,"");return(0,t.jsxs)(eI,{fullText:n,children:["alook ",(0,t.jsx)("span",{className:"text-muted-foreground",children:a})]})}if("tool_call"===e.kind){let n=e.payload,a=(0,e_.formatAuditToolName)(e.payload);return n?.target?(0,t.jsxs)(eI,{fullText:`${a} \xb7 ${n.target}`,children:[a," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"·"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:n.target})]}):(0,t.jsx)(eI,{fullText:a,children:a})}if("turn_interrupt"===e.kind)return(0,t.jsxs)(eI,{fullText:"Stop accepted by daemon — waiting for the active turn to become idle.","data-testid":"bot-activity-event-turn_interrupt",children:[(0,t.jsx)("span",{children:"Stop accepted by daemon"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"— waiting for the active turn to become idle."})]});if("session_reset"===e.kind)return(0,t.jsxs)(eI,{fullText:"Session reset requested — the bot will start a fresh session on its next message.","data-testid":"bot-activity-event-session_reset",children:[(0,t.jsx)("span",{children:"Session reset requested"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"— the bot will start a fresh session on its next message."})]});if("nap"===e.kind)return(0,t.jsxs)(eI,{fullText:"Reset its own session — the bot napped and will start fresh on its next message.","data-testid":"bot-activity-event-nap",children:[(0,t.jsx)("span",{children:"Reset its own session"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"— the bot napped and will start fresh on its next message."})]});if("model_changed"===e.kind){let n=e.payload,a=n?.from??"default",i=n?.to??"default";return(0,t.jsxs)(eI,{fullText:`${a} → ${i}`,"data-testid":"bot-activity-event-model_changed",children:[a," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"→"})," ",i]})}if("provider_changed"===e.kind){let n=e.payload,a=n?.from??"?",i=n?.to??"?";return(0,t.jsxs)(eI,{fullText:`${a} → ${i}`,"data-testid":"bot-activity-event-provider_changed",children:[a," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"→"})," ",i]})}if("error"===e.kind){let n=e.payload,a=n?.message||"Something went wrong",i=n?.model?`${n?.code??"error"} \xb7 ${n.model}`:n?.code??n?.scope??"error";return(0,t.jsxs)(eI,{fullText:`${a} \xb7 ${i}`,"data-testid":"bot-activity-event-error",children:[(0,t.jsx)("span",{className:"text-destructive",children:a})," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"·"})," ",(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground/70",children:i})]})}if("wake_trigger"===e.kind){let n=e.payload,a=n?.senderHandle??"Sender unavailable",i=n?.channel??"Conversation unavailable",s=n?.seq!=null?`#${n.seq}`:"",r=n?.reason==="mention"?"Mentioned by":"Woken by",o=`${r} ${a} in ${i}${s?` ${s}`:""}`;return(0,t.jsxs)(eI,{fullText:o,children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:r})," ",a," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"in"})," ",i,s?(0,t.jsxs)("span",{className:"text-muted-foreground/70",children:[" ",s]}):null]})}let n=e.payload,a=n?.text??"",i=n?.truncated??!1,s=n?.chars??eM(a),r=i?Math.max(0,s-eM(a)):0,o=r>0?`${a}
2
- … ${r} character${1===r?"":"s"} not retained in the audit log`:a;return(0,t.jsx)(eI,{fullText:o,className:"text-[12.5px] text-muted-foreground",children:a})}function eI({children:e,fullText:n,className:a="",...i}){let s=(0,d.useId)(),r=(0,d.useRef)(null),o=(0,d.useRef)(null),[l,c]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[u,m]=(0,v.useAtom)((0,j.useCreateAtom)(!1));(0,d.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth+1;c(t),t||m(!1)};if(t(),"u"<typeof ResizeObserver)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[n,c,m]);let p=(0,t.jsx)("button",{type:"button",disabled:!l,"data-activity-tooltip-trigger":l||void 0,onPointerDown:e=>{o.current=e.pointerType},onClick:()=>{l&&("touch"===o.current||"pen"===o.current)&&m(!0)},className:"block min-h-11 w-full min-w-0 cursor-default rounded-sm text-left outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 sm:min-h-0",children:(0,t.jsx)("span",{ref:r,className:`block truncate font-mono text-[13px] text-foreground ${a}`,...i,children:e})});return(0,t.jsxs)(ec.Tooltip,{disabled:!l,open:u&&l,triggerId:s,onOpenChange:m,children:[(0,t.jsx)(ec.TooltipTrigger,{id:s,disabled:!l,closeOnClick:!1,render:p}),(0,t.jsx)(ec.TooltipContent,{role:"tooltip",side:"bottom",align:"start",className:"thin-scrollbar max-h-[min(24rem,calc(100dvh-2rem))] max-w-[min(32rem,calc(100vw-2rem))] overflow-y-auto whitespace-pre-wrap wrap-break-word font-mono text-[12px] leading-relaxed",children:n})]})}function eM(e){return[...e].length}function eR({bot:e,open:n,onOpenChange:a,onOpenChangeComplete:i}){let s=(0,eS.useCanonicalCommunityProfile)(e?.id),r=s?.presence==="online",{events:o,isLoading:l,fetchNextPage:c,hasNextPage:u,isFetchingNextPage:m}=(0,eB.useBotAuditLog)(e?.id??null),p=(0,d.useMemo)(()=>[...o].sort((e,t)=>e.createdAt!==t.createdAt?e.createdAt<t.createdAt?-1:1:e.id<t.id?-1:+(e.id>t.id)),[o]),h=(0,d.useMemo)(()=>(function(e){let t=[];for(let n of e){let e=function(e){let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}(n.createdAt),a=t[t.length-1];a&&a.dayKey===e?a.events.push(n):t.push({dayKey:e,label:function(e){let t=new Date(e),n=new Date,a=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=Math.round((a(n)-a(t))/864e5);return 0===i?"Today":1===i?"Yesterday":i<7?t.toLocaleDateString(void 0,{weekday:"long"}):t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:t.getFullYear()===n.getFullYear()?void 0:"numeric"})}(n.createdAt),events:[n]})}return t})(p),[p]),f=(0,d.useRef)(null),g=(0,d.useRef)(null),b=(0,d.useRef)(0),y=(0,d.useRef)(null),v=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{n||(b.current=0,y.current=null,v.current=!1)},[n,e?.id]),(0,d.useEffect)(()=>{if(!n||v.current||0===p.length)return;let e=g.current,t=f.current;e&&t&&(v.current=!0,b.current=p.length,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.scrollIntoView({block:"end"}),t.scrollTop=t.scrollHeight})}))},[n,p.length]),(0,d.useLayoutEffect)(()=>{let e=f.current;if(!e)return;let t=b.current,n=p.length;if(b.current=n,0===n)return;if(null!==y.current){if(n>t){let t=e.scrollHeight-y.current;e.scrollTop=e.scrollTop+t}y.current=null;return}if(!v.current)return;let a=e.scrollHeight-(e.scrollTop+e.clientHeight)<80;n>t&&a&&(e.scrollTop=e.scrollHeight)},[p.length]),(0,t.jsx)(_.CommunitySheet,{open:n,onOpenChange:a,onOpenChangeComplete:i,title:e?.name??"Bot",headerLeading:(0,t.jsx)(G.AgentAvatar,{name:e?.name??"",avatarUrl:e?.image??null,seed:e?.id,size:32}),description:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:["inline-block size-1.5 rounded-full",r?"bg-status-online":"bg-muted-foreground/60"].join(" "),"aria-hidden":!0}),(0,t.jsx)("span",{children:r?"Live":"Offline"}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground/40",children:"·"}),(0,t.jsx)("span",{children:"Activity log"})]}),desktopWidth:672,resizable:!0,contentTestId:x.tid.botActivityModal,bodyRef:f,bodyClassName:"bg-background p-0",children:l&&0===p.length?(0,t.jsx)(e$,{}):0===p.length?(0,t.jsx)(ez,{}):(0,t.jsxs)("div",{className:"pb-3",children:[u?(0,t.jsx)("div",{className:"flex justify-center py-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>{if(!u||m)return;let e=f.current;e&&(y.current=e.scrollHeight),c()},disabled:m,className:"min-h-11 rounded-md px-3 py-1 font-mono text-[10px] uppercase tracking-wider text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-8",children:m?"Loading older":"Load older"})}):(0,t.jsx)("div",{className:"py-2 text-center font-mono text-[10px] uppercase tracking-wider text-muted-foreground/40",children:"Beginning of log"}),h.map(e=>(0,t.jsxs)("section",{children:[(0,t.jsx)(eE,{label:e.label}),e.events.map(e=>(0,t.jsx)(eT,{event:e},e.id))]},e.dayKey)),(0,t.jsx)("div",{ref:g,"aria-hidden":!0})]})})}function eE({label:e}){return(0,t.jsx)("div",{className:"sticky top-0 z-10 border-b border-border/40 bg-background/95 px-4 py-1 backdrop-blur supports-backdrop-filter:bg-background/80",children:(0,t.jsx)("span",{className:"font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:e})})}function e$(){return(0,t.jsx)("div",{className:"flex flex-col gap-2 p-4",children:Array.from({length:8}).map((e,n)=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-3 w-16 animate-pulse rounded bg-muted/40"}),(0,t.jsx)("div",{className:"h-3 w-10 animate-pulse rounded bg-muted/30"}),(0,t.jsx)("div",{className:"h-3 flex-1 animate-pulse rounded bg-muted/40"})]},n))})}function ez(){return(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center",children:[(0,t.jsx)("div",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60",children:"No activity yet"}),(0,t.jsx)("p",{className:"max-w-xs text-xs text-muted-foreground",children:"This bot hasn't run since audit logging was enabled. New runs will stream in here as they happen."})]})}var eF=e.i(557922),eL=e.i(362790),eq=e.i(328076),eU=e.i(152961),eK=e.i(193497),eQ=e.i(562088);let eW=["rate_limited","target_unavailable","nonce_conflict","network_error"],eH={phase:"confirm",terminal:!1,clientNonce:null,reportId:null,deadlineAt:null,completedAt:null,errorCode:null,objectExpired:!1},eV={offline:"Bring the daemon online, then try again.",timeout:"Collection timed out. Try again.",upload_conflict:"The report could not be uploaded safely. Try again.",invalid_upload:"The report upload was rejected. Try again.",diagnostics_unavailable:"Diagnostics are unavailable right now. Try again.",collector_busy:"Another report is being collected. Try again shortly.",bot_not_bound:"This bot is no longer available on that machine.",collection_failed:"Diagnostics could not be collected. Try again.",local_artifact_invalid:"The local diagnostic bundle could not be verified.",bundle_too_large:"The diagnostic bundle was too large to upload.",upload_failed:"The report upload failed. Try again.",internal_error:"The report could not be completed. Try again.",rate_limited:"You can send another report in a minute.",target_unavailable:"Diagnostics aren't available for this bot right now.",nonce_conflict:"That report already belongs to another bot. Try again.",network_error:"Unable to connect — check your network"};function eY(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function eG(e){return eQ.DiagnosticReportFailureCodeSchema.safeParse(e).success}function eJ(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function eX(e,t){let n={...e,reportId:t.reportId,deadlineAt:t.deadlineAt,completedAt:t.completedAt,errorCode:t.failureCode,objectExpired:t.objectExpired};return"pending"===t.status?{...n,phase:"collecting",terminal:!1}:"uploaded"===t.status?{...n,phase:"uploaded",terminal:!0}:{...n,phase:"timeout"===t.failureCode?"timeout":"failed",terminal:!0}}function eZ(e,t){if("created"===t.type||"status"===t.type)return eX(e,t.report);if("create_error"===t.type)return{...e,phase:"failed",terminal:!1,errorCode:"internal_error"};if("create_rejected"===t.type){var n;return{...e,phase:"failed",terminal:"rate_limited"===(n=t.code)||"nonce_conflict"===n,errorCode:t.code}}return"invalid_payload"===t.type?{...e,phase:"failed",terminal:!0,errorCode:"internal_error"}:"deadline"===t.type?{...e,phase:"timeout",terminal:!0,errorCode:"timeout"}:e}function e0(e){var t;return eY(e)?eY(t=e.report)&&"string"==typeof t.reportId&&t.reportId.startsWith("dbr_")&&("pending"===t.status||"uploaded"===t.status||"failed"===t.status)&&eJ(t.deadlineAt)&&"boolean"==typeof t.objectExpired&&(null===t.completedAt||void 0===t.completedAt||eJ(t.completedAt))&&(null===t.failureCode||void 0===t.failureCode||eG(t.failureCode))&&("failed"!==t.status||eG(t.failureCode))&&("failed"===t.status||null===t.failureCode||void 0===t.failureCode)?{reportId:t.reportId,status:t.status,deadlineAt:t.deadlineAt,completedAt:t.completedAt??null,failureCode:t.failureCode??null,objectExpired:t.objectExpired}:null:null}class e1 extends Error{}function e2({reportId:e}){let[n,a]=(0,v.useAtom)((0,j.useCreateAtom)("idle")),i=async()=>{try{await navigator.clipboard.writeText(e),a("copied")}catch{a("failed")}};return(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:"Report ID"}),(0,t.jsx)("code",{className:"font-mono text-xs text-muted-foreground",children:e}),(0,t.jsx)(r.Button,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs","aria-label":"Copy report ID",onClick:()=>void i(),children:"Copy"}),"copied"===n&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Copied"}),"failed"===n&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Couldn’t copy. Select the ID instead."})]})}function e5(e){var n,a,i,s,o;let l="confirm"!==e.phase&&"submitting"!==e.phase,d="failed"===e.phase||"timeout"===e.phase?"Try again":e.isSubmitting?"Submitting…":"Confirm",c="collecting"!==e.phase&&"uploaded"!==e.phase&&("failed"!==e.phase||"rate_limited"!==e.errorCode);return(0,t.jsx)(eC.AlertDialog,{open:e.open,onOpenChange:e.onOpenChange,children:(0,t.jsxs)(eC.AlertDialogContent,{"data-testid":x.tid.botReportProblemDialog,children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsxs)(eC.AlertDialogTitle,{children:["Report a problem with ",e.bot.name,"?"]}),(0,t.jsxs)(eC.AlertDialogDescription,{className:"space-y-3 text-left",children:[(0,t.jsx)("span",{className:"block",children:"We’ll upload only program logs needed to diagnose the problem."}),(0,t.jsx)("span",{className:"block",children:"We won’t read or upload your agent’s local chat history or files."}),(0,t.jsx)("span",{className:"block",children:"Reports are deleted after 7 days."})]})]}),l&&(0,t.jsxs)("div",{"data-testid":x.tid.botReportProblemStatus,className:"rounded-md bg-muted/60 px-3 py-2 text-sm",children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:(n=e.phase,a=e.errorCode,"failed"===n&&"rate_limited"===a?"A report was sent recently":"collecting"===n?"Collecting diagnostics":"uploaded"===n?"Report uploaded":"timeout"===n?"Collection timed out":"Report failed")}),"failed"===e.phase&&(0,t.jsx)("p",{className:"mt-1 text-muted-foreground",children:"string"==typeof(o=s=i=e.errorCode)&&eW.includes(o)||eG(s)?eV[i]:eV.internal_error}),e.reportId&&(0,t.jsx)(e2,{reportId:e.reportId},e.reportId)]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Close"}),c&&(0,t.jsx)(r.Button,{"data-testid":x.tid.botReportProblemSubmit,disabled:e.isSubmitting,onClick:()=>void e.onConfirm(),children:d})]})]})})}function e3({bot:e,open:n,onOpenChange:a}){let{state:i,confirm:s}=function({agentId:e,open:t}){let n=(0,eK.useCommunityMutationOrigin)(),a=(0,N.useQueryClient)(),i=(0,k.useCommunityViewSource)(`bug-report:${e}`),s=(0,eq.useCreateStore)({nonce:null,expiredReportId:null}),r=(0,eU.useSelector)(s,e=>e),o=["community","bug-report-create",e],l=(0,eL.useMutation)({meta:{observabilityAction:"bot.bug_report.submit"},mutationKey:o,mutationFn:async({nonce:t,token:i,assert:s})=>{s();let r={path:`/api/community/bots/${e}/diagnostics`,init:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientNonce:t})}},o=await n.request(i,r.path,{...r.init,signal:s.signal,assertActive:s});s();let l=e0(o);if(!l)throw new e1("Invalid diagnostics response");let d=C.communityKeys.bugReport(l.reportId),c=a.getQueryCache().build(a,{queryKey:d,gcTime:3e5});return c.state.data||c.setData(l),n.assert(i),{nonce:t,reportId:l.reportId}}}),c=l.reset,u=l.data?.nonce===r.nonce?l.data.reportId:null,m=t&&!!u&&r.expiredReportId!==u,p=(0,eF.useQuery)({queryKey:C.communityKeys.bugReport(u??"inactive"),subscribed:m,gcTime:3e5,enabled:e=>m&&e.state.data?.status==="pending"&&Date.now()<e.state.data.deadlineAt&&!(e.state.error instanceof e1),retry:!1,queryFn:async({signal:e})=>{let t=n.begin().token,a={path:`/api/community/diagnostics/${u}`,init:{method:"GET"}},i=await n.request(t,a.path,{...a.init,signal:e});n.assert(t);let s=e0(i);if(!s)throw new e1("Invalid diagnostics response");return s},refetchInterval:e=>{let t=e.state.data;return!!(m&&!(e.state.error instanceof e1)&&t?.status==="pending"&&Date.now()<t.deadlineAt)&&1e3}}),h={...eH,clientNonce:r.nonce};l.variables?.nonce===r.nonce&&(l.isPending?h={...h,phase:"submitting"}:l.error&&!(l.error instanceof DOMException&&"AbortError"===l.error.name)&&(h=eZ(h,l.error instanceof e1?{type:"invalid_payload"}:function(e){if(e instanceof w.ApiError){if(e.isNetworkError||0===e.status)return{type:"create_rejected",code:"network_error"};if(e.isRateLimit)return{type:"create_rejected",code:"rate_limited"};if(404===e.status)return{type:"create_rejected",code:"target_unavailable"};if(409===e.status)return{type:"create_rejected",code:"nonce_conflict"}}return{type:"create_error"}}(l.error)))),p.data&&p.data.reportId===u&&(h=eX(h,p.data)),p.error instanceof e1&&(h=eZ(h,{type:"invalid_payload"})),r.expiredReportId===u&&"collecting"===h.phase&&(h=eZ(h,{type:"deadline"})),(0,d.useEffect)(()=>{let e=p.data;if(!t||!e||"pending"!==e.status)return;let n=i.capture(),a=()=>{try{n()}catch{return}s.setState(t=>({...t,expiredReportId:e.reportId}))},r=e.deadlineAt-Date.now();if(r<=0)return void a();let o=setTimeout(a,r);return()=>clearTimeout(o)},[t,p.data,i,s]),(0,d.useEffect)(()=>{!t&&h.terminal&&(s.setState(()=>({nonce:null,expiredReportId:null})),c())},[t,h.terminal,s,c]);let x=async()=>{if("submitting"!==h.phase&&"collecting"!==h.phase&&!a.getMutationCache().findAll({mutationKey:o,status:"pending"}).length)try{let e=i.capture(),t=n.begin().token;e();let a=function(e,t=()=>globalThis.crypto.randomUUID()){return"submitting"===e.phase||"collecting"===e.phase?e:!e.terminal&&e.clientNonce?{...e,phase:"submitting",errorCode:null}:{...eH,phase:"submitting",clientNonce:t()}}({...h,clientNonce:s.get().nonce});if(!a.clientNonce)return;s.setState(()=>({nonce:a.clientNonce,expiredReportId:null})),await l.mutateAsync({nonce:a.clientNonce,token:t,assert:e})}catch{}};return{state:h,confirm:x}}({agentId:e.id,open:n});return(0,t.jsx)(e5,{bot:e,open:n,phase:i.phase,isSubmitting:"submitting"===i.phase,reportId:i.reportId,errorCode:i.errorCode,onConfirm:s,onOpenChange:a})}function e4(e){return void 0!==e.phase?(0,t.jsx)(e5,{...e}):(0,t.jsx)(e3,{...e})}var e6=e.i(540604),e8=e.i(909832);function e7(e){return(0,e6.isPhotoAvatarUrl)(e.image)?{kind:"photo",file:null,previewUrl:e.image}:{kind:"procedural",image:(0,P.parseBeamSeed)(e.image)?e.image:(0,P.serializeBeamSeed)(e.id)}}function e9({bot:e,open:n,onOpenChange:a}){let i=(0,k.useCommunityViewSource)("edit-bot:"+(e?.id??"none"),n&&!!e),s=(0,N.useQueryClient)(),o=e=>{e||i.retire(),a(e)},[l,c]=(0,v.useAtom)((0,j.useCreateAtom)(e?.name??"")),[u,m]=(0,v.useAtom)((0,j.useCreateAtom)(e?.description??"")),[p,h]=(0,v.useAtom)((0,j.useCreateAtom)(e?.modelName??null)),[x,f]=(0,v.useAtom)((0,j.useCreateAtom)(e?.reasoningEffort??null)),[g,b]=(0,v.useAtom)((0,j.useCreateAtom)(e?.runtime??"")),[S,B]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[T,O]=(0,v.useAtom)((0,j.useCreateAtom)(void 0)),[I,z]=(0,v.useAtom)((0,j.useCreateAtom)(e?e7(e):{kind:"procedural",image:(0,P.serializeBeamSeed)("initial")})),F=(0,R.useUpdateBot)(),q=(0,R.useUploadBotAvatar)(),{machines:U}=(0,M.useMachines)(),K=U.find(t=>t.id===e?.machineId),Q=(0,d.useMemo)(()=>{let e=L(K);return g&&!e.some(e=>e.id===g)&&e.push({id:g,unhealthy:!0}),e},[K,g]),W=(0,d.useMemo)(()=>({scope:[i.signal],store:(0,y.createStore)(!1)}),[i.signal]).store;async function H(){if(!e||["update-command","avatar-command"].some(e=>s.isMutating({mutationKey:[...C.communityKeys.bots(),e],exact:!0,predicate:e=>e.state.variables.input?.assertActive?.signal===i.signal})>0))return;let t=i.capture();if(t(),!l.trim())return void O("Name is required");let n=function(e){if(null!==e){if(0===e.trim().length)return"Enter a model name";if(e.length>100)return"Model name must be 100 characters or fewer"}}(p);if(n)return void A.toast.error(n);let a=p!==(e.modelName??null),r=g!==e.runtime,d=x!==(e.reasoningEffort??null);try{let n=await F.mutateAsync({assertActive:t,id:e.id,name:l.trim(),description:u.trim(),image:"procedural"===I.kind?I.image:void 0,...a?{model:p}:{},...r?{runtime:g}:{},...d?{reasoningEffort:x}:{}});t();let i=!1;if("photo"===I.kind&&I.file)try{await q.mutateAsync({botId:e.id,file:I.file,assertActive:t}),t()}catch(e){try{t()}catch{return}if((0,w.isAbortError)(e))return;i=!0,(0,D.toastApiError)(e,"Bot updated, but the avatar photo failed to upload",t)}if(!i)if((r||a)&&"saved_not_applied"===n.application)A.toast.success("Runtime settings saved for next start.");else if(r)A.toast.success(`Provider switch to ${g} dispatched`);else if(a){let e=p??"the runtime default";A.toast.success(`Model switch to ${e} dispatched`)}else d?A.toast.success("next_turn"===n.application?"Reasoning effort saved. Next turn takes effect.":"Reasoning effort saved for next start."):A.toast.success("Bot updated");t(),o(!1)}catch(e){if((0,w.isAbortError)(e))return;(0,D.toastApiError)(e,"Update failed",t)}}function V(){if(e){if(!l.trim())return void O("Name is required");if(g!==e.runtime)return void B(!0);H()}}return(0,d.useEffect)(()=>{n&&e&&(W.get()||(W.setState(()=>!0),c(e.name),m(e.description??""),h(e.modelName??null),f(e.reasoningEffort??null),b(e.runtime),z(e7(e)),O(void 0),B(!1)))},[n,e,W,c,m,h,f,b,z,O,B]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(_.CommunitySheet,{open:n,onOpenChange:o,title:`Edit ${e?.name??"bot"}`,description:"Name and description edits take effect on the next wake. Reasoning effort applies on the next turn when online, or the next start when offline. Provider and model switches require the bot to be online.",bodyClassName:"flex flex-col gap-6",footer:n=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:n,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:V,disabled:F.isPending||q.isPending||!e,children:F.isPending?"Saving…":"Save"})]}),children:[(0,t.jsx)(E.BotFormFields,{avatarDraft:I,onAvatarChange:z,name:l,setName:function(e){c(e),T&&e.trim()&&O(void 0)},onShuffle:function(){c((0,e8.uniqueNamesGenerator)({dictionaries:[e8.names],length:1,style:"capital"})),O(void 0)},description:u,setDescription:m,nameError:T}),e&&(0,t.jsx)($.BotRuntimeFields,{options:Q,runtime:g,model:p,daemonVersion:K?.daemonVersion,reasoningEffort:x,onRuntimeChange:b,onModelChange:h,onReasoningEffortChange:f})]}),(0,t.jsx)(eC.AlertDialog,{open:S,onOpenChange:B,children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsx)(eC.AlertDialogTitle,{children:"Switch provider and reset this session?"}),(0,t.jsxs)(eC.AlertDialogDescription,{children:["Switching from ",e?.runtime," to ",g," starts a fresh session. The bot cannot resume its current provider session."]})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{onClick:()=>{B(!1),H()},children:"Switch provider"})]})]})})]})}var te=e.i(166037),tt=e.i(820655),tn=e.i(49980);function ta({count:e,className:n}){let a=e<=10?5:10,i=Math.max(1,Math.ceil(e/a)),s=Math.max(32,8*i),r=(80-(Math.min(e,a)-1)*8)/2,o=(s-(i-1)*8)/2;return(0,t.jsx)("svg",{className:n,viewBox:`0 0 80 ${s}`,role:"img","aria-label":`${e} bot slots`,children:Array.from({length:e},(e,n)=>(0,t.jsx)("circle",{cx:r+n%a*8,cy:o+8*Math.floor(n/a),r:"1.5",fill:"currentColor"},n))})}var ti=e.i(989621),ts=e.i(205189);function tr(e){let t=e.currency.toUpperCase(),n=new Intl.NumberFormat("en",{style:"currency",currency:t}).resolvedOptions().maximumFractionDigits??2,a=new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e.unitAmount/10**n),i=1===e.intervalCount?e.interval:`${e.intervalCount} ${e.interval}s`;return`${a} ${t} / ${i}`}function to(e){return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric"}).format(new Date(e))}function tl({open:e,onOpenChange:n,limit:a,onViewPlan:i}){return(0,t.jsx)(eu.Dialog,{open:e,onOpenChange:n,children:(0,t.jsxs)(eu.DialogContent,{className:"sm:max-w-md","data-testid":"upgrade-plan-modal",children:[(0,t.jsxs)(eu.DialogHeader,{children:[(0,t.jsx)(eu.DialogTitle,{children:"Plan limit reached"}),(0,t.jsxs)(eu.DialogDescription,{children:["Your owned bots have reached your plan’s limit of ",a,". You can’t create another bot. Delete bots until you own fewer than ",a," to make room."]})]}),(0,t.jsxs)(eu.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>n(!1),children:"Got it"}),(0,t.jsx)(r.Button,{onClick:()=>{n(!1),i()},children:"View plan"})]})]})})}function td(){return(0,t.jsx)(o.Card,{className:"flex flex-col gap-3 p-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)(l.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2.5 sm:items-end",children:(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:min-w-55",children:[(0,t.jsx)(l.Skeleton,{className:"h-6 w-40 max-w-full rounded"}),(0,t.jsx)(l.Skeleton,{className:"h-4 w-48 max-w-full rounded"})]})}),(0,t.jsx)(l.Skeleton,{className:"size-8 shrink-0 rounded-md"})]})})}function tc(e,a=!1){return e||a?(0,t.jsxs)("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b border-border/40 px-6",children:[e?(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:e,className:"text-muted-foreground hover:text-foreground","aria-label":"Back",children:(0,t.jsx)(n.ChevronLeft,{className:"size-5"})}):(0,t.jsx)(l.Skeleton,{"data-slot":"loading-back-placeholder","aria-hidden":!0,className:"size-8 shrink-0 rounded-md"}),(0,t.jsx)("span",{className:"ml-1 truncate text-base font-semibold",children:"My Bots"})]}):null}function tu({onBack:e,reserveBackSlot:n=!1}={}){return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[tc(void 0,n||!!e),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-6 overflow-y-auto p-6 thin-scrollbar",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)(l.Skeleton,{className:"h-6 w-24 rounded"}),(0,t.jsx)(l.Skeleton,{className:"h-4 w-full max-w-80 rounded"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.Skeleton,{className:"size-9 rounded-md"}),(0,t.jsx)(l.Skeleton,{className:"h-9 w-28 rounded-md"})]})]}),(0,t.jsx)("div",{className:"flex flex-col gap-6",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg p-1",children:[(0,t.jsxs)("div",{className:"flex h-7 items-center gap-2 px-1",children:[(0,t.jsx)(l.Skeleton,{className:"size-3 rounded"}),(0,t.jsx)(l.Skeleton,{className:"size-3.5 rounded"}),(0,t.jsx)(l.Skeleton,{className:"h-3 w-28 rounded"}),(0,t.jsx)(l.Skeleton,{className:"size-1.5 rounded-full"}),(0,t.jsx)(l.Skeleton,{className:"ml-auto h-7 w-20 rounded-md"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(td,{}),(0,t.jsx)(td,{}),(0,t.jsx)(td,{})]})]})})]})]})}e.s(["BillingContent",0,function({billing:e}){let[n,a]=(0,v.useAtom)((0,j.useCreateAtom)(null)),i=e=>a(e?.priceId??null),s=e.data,o=s?.offers.find(e=>e.priceId===n)??null,d=s?.isFounder?null:s?.subscription,c=s?.offers.find(e=>e.plan.id===s.plan.id),u="checkout"===e.returnFrom&&(s?.isFounder||!d||d.plan.id!==s?.plan.id);return(0,t.jsxs)("div",{className:ti.default.content,"data-testid":x.tid.billingSheet,children:[(0,t.jsxs)("section",{className:"pb-2","aria-label":"Current plan",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[e.isPending&&(0,t.jsx)(l.Skeleton,{className:"h-14 w-36","aria-label":"Loading billing"}),s&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[(0,t.jsx)("h2",{className:ti.default.currentName,children:s.isFounder?"Founder":s.plan.displayName}),(0,t.jsx)("span",{className:"mt-1 rounded-md bg-muted px-2 py-1 text-xs font-medium leading-none text-muted-foreground",children:"Current"})]})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",className:"size-11 shrink-0 text-muted-foreground sm:size-8",onClick:e.refresh,disabled:e.isFetching,"aria-label":"Refresh status","data-testid":x.tid.billingRefresh,children:(0,t.jsx)(tn.RefreshCw,{className:`size-4 ${e.isFetching?"animate-spin motion-reduce:animate-none":""}`})})]}),s&&(0,t.jsxs)(t.Fragment,{children:[(s.isFounder||c||d)&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-3",children:[s.isFounder?(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Permanent ",s.plan.displayName," access"]}):c&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:tr(c)}),d&&!s.isFounder&&(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>void e.portal(),disabled:e.isBusy,"data-testid":x.tid.billingPortal,children:["Manage billing",(0,t.jsx)(tt.ExternalLink,{className:"size-3.5"})]})]}),(d?.scheduledChange||d?.cancelAt||d?.currentPeriodEnd||d?.status==="past_due")&&(0,t.jsxs)("div",{className:"mt-5 flex flex-col gap-3 border-t border-border pt-4 text-sm",children:[d?.scheduledChange&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("p",{children:["Changes to ",d.scheduledChange.plan.displayName," on ",to(d.scheduledChange.effectiveAt)]}),!s.isFounder&&(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>void e.cancelChange(),disabled:e.isBusy,"data-testid":x.tid.billingCancelChange,children:e.isCancelingChange?"Keeping current plan…":"Keep current plan"})]}),d?.cancelAt&&(0,t.jsxs)("p",{children:["Ends ",to(d.cancelAt),". Your current access stays until then."]}),d&&!d.cancelAt&&!d.scheduledChange&&d.currentPeriodEnd&&(0,t.jsxs)("p",{className:"text-muted-foreground",children:["Current period ends ",to(d.currentPeriodEnd)]}),d?.status==="past_due"&&(0,t.jsx)("p",{children:"Your renewal payment needs attention. Update your payment method in billing management."})]})]})]}),e.isError&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Couldn't refresh your plan. Check your connection and refresh status."}),e.returnFrom&&(0,t.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"cancel"===e.returnFrom?"Checkout closed. Your current plan is shown above.":u?e.polling?"Waiting for payment confirmation. Your current access stays in place.":"Payment confirmation hasn't arrived yet. Refresh status to check again.":e.polling?"Refreshing your plan and billing status…":"Your current plan is shown above. Refresh status to check for further changes."}),s&&(0,t.jsxs)("section",{className:"flex flex-col gap-4","aria-label":"Available plans",children:[(0,t.jsx)("h2",{className:"text-base font-medium",children:d?"Change plan":"Choose a plan"}),0===s.offers.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Paid plans are unavailable right now. Refresh status to try again."}),(0,t.jsx)("div",{className:ti.default.offers,children:s.offers.map(n=>{let a=!!(d&&n.plan.id===s.plan.id),o=d?.scheduledChange?.plan.id===n.plan.id;return(0,t.jsxs)("article",{className:`${ti.default.offer} ${"house"===n.plan.id?ti.default.house:ti.default.studio}`,children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:ti.default.name,children:n.plan.displayName}),(0,t.jsx)("p",{className:ti.default.price,children:tr(n)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("p",{className:ti.default.limit,children:["Up to ",(0,t.jsx)("strong",{children:n.botLimit})," active bots"]}),(0,t.jsxs)("p",{className:ti.default.limit,children:["Up to ",(0,t.jsx)("strong",{children:n.machineLimit})," online machine",1===n.machineLimit?"":"s"]})]}),(0,t.jsx)(r.Button,{className:ti.default.action,variant:a||o?"outline":"default",onClick:()=>(t=>{if(!s)return;let n=(0,ts.toAnalyticsPlanId)(t.plan.id);n&&"free"!==n&&(0,ts.trackPricingCtaClick)({plan_id:n,cta_action:"choose_plan",auth_state:"signed_in",current_plan:(0,ts.toAnalyticsCurrentPlan)(s.plan.id,s.isFounder),entry_point:"billing_sheet"}),s.isFounder?i(t):d?e.portal(t.priceId):e.checkout(t.priceId,!1,"billing_sheet")})(n),disabled:e.isBusy||!!u||a||o,"data-testid":d?x.tid.billingChangePlan:x.tid.billingCheckout,"data-price-id":n.priceId,children:e.isBusy&&!e.isCancelingChange?"Opening…":o?"Scheduled":a?"Current plan":`Choose ${n.plan.displayName}`}),(0,t.jsxs)("div",{className:ti.default.stub,children:[(0,t.jsxs)("span",{children:["Alook · ",n.botLimit," bots"]}),(0,t.jsx)(ta,{count:n.botLimit,className:ti.default.botDots})]})]},n.priceId)})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:d?"Review changes and any payment on Stripe.":"Continue to Stripe to review and pay."})]}),(0,t.jsx)(te.FounderPlanChangeDialog,{offer:o,busy:e.isBusy,onCancel:()=>i(null),onConfirm:()=>{if(!o)return;let t=o.priceId;i(null),e.checkout(t,!0,"billing_sheet")}}),e.actionError&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:e.actionError})]})},"BillingSheet",0,tl],690887),e.s(["BotListSkeleton",0,tu,"renderBotListView",0,function({onBack:e},n){let a=tc(e);if((n.isLoading||n.machinesLoading)&&0===n.bots.length)return(0,t.jsx)(tu,{onBack:e});if(0===n.bots.length){let e=0===n.machines.length;return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[a,(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 p-12 text-center",children:[(0,t.jsx)("div",{className:"w-full max-w-70 overflow-hidden rounded-xl",children:(0,t.jsx)("div",{className:"aspect-200/130 w-full",children:(0,t.jsx)(h,{})})}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-lg font-medium text-foreground",children:e?"Connect a machine first":"No bots yet"}),(0,t.jsx)("p",{className:"max-w-md text-sm text-muted-foreground",children:e?"Bots need a connected machine to run. Connect one first, then come back to create your bot.":"Create a bot and chat with it from anywhere — spin up servers and share it with family and friends."})]}),(0,t.jsx)("div",{"data-onboarding-target":"create-bot",className:"w-fit",children:(0,t.jsx)(r.Button,{onClick:e?n.openMachines:n.openGuidedCreate,disabled:!e&&n.isCreateDisabled&&!n.canShowLimit,"data-testid":e?void 0:x.tid.createBot,children:e?"Connect a machine":n.guidedCreateLabel})}),n.planSummary?.isFounder&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Founder plan"})]}),(0,t.jsx)(U,{open:n.createOpen,onOpenChange:n.setCreateOpen,onCreated:n.onBotCreated,guided:n.guidedActive,avatarSeed:n.guidedAvatarSeed}),(0,t.jsx)(tl,{open:n.billingOpen&&n.canShowLimit,onOpenChange:n.setBillingOpen,limit:n.planSummary?.limit??0,onViewPlan:n.viewPlan})]})}let i={billing:(0,t.jsx)(tl,{open:n.billingOpen&&n.canShowLimit,onOpenChange:n.setBillingOpen,limit:n.planSummary?.limit??0,onViewPlan:n.viewPlan}),create:(0,t.jsx)(U,{open:n.createOpen,onOpenChange:n.setCreateOpen,onCreated:n.onBotCreated,guided:n.guidedActive,avatarSeed:n.guidedAvatarSeed}),help:(0,t.jsx)(eD,{open:n.helpOpen,onOpenChange:n.setHelpOpen}),edit:(0,t.jsx)(e9,{bot:n.editingBot,open:n.editOpen,onOpenChange:n.setEditOpen}),activity:(0,t.jsx)(eR,{bot:n.activityBot,open:n.activityOpen,onOpenChange:n.onActivityOpenChange,onOpenChangeComplete:e=>n.onActivityOpenChangeComplete(e,n.activityGeneration)},n.activityGeneration),bug:n.bugReportBot?(0,t.jsx)(e4,{bot:n.bugReportBot,open:n.bugReportOpen,onOpenChange:n.setBugReportOpen},n.bugReportBot.id):null,deleteDialog:(0,t.jsx)(eC.AlertDialog,{open:!!n.confirmDelete,onOpenChange:e=>!e&&n.setConfirmDelete(null),children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsxs)(eC.AlertDialogTitle,{children:["Delete ",n.confirmDelete?.name,"?"]}),(0,t.jsx)(eC.AlertDialogDescription,{children:"The bot will leave every server it's in and its runner key will be revoked. Past messages remain in history with the bot's current name and avatar."})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{onClick:n.deleteConfirmedBot,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),resetDialog:(0,t.jsx)(eC.AlertDialog,{open:!!n.confirmReset,onOpenChange:e=>!e&&n.setConfirmReset(null),children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsx)(eC.AlertDialogTitle,{children:"Reset this bot's session?"}),(0,t.jsx)(eC.AlertDialogDescription,{children:"Its running process will stop and it'll start a fresh session that picks up unfinished work from its notes."})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{"data-testid":"bot-reset-confirm",onClick:n.resetConfirmedBot,children:"Reset"})]})]})}),resetMachineDialog:(0,t.jsx)(eC.AlertDialog,{open:!!n.confirmResetMachine,onOpenChange:e=>!e&&n.setConfirmResetMachine(null),children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsxs)(eC.AlertDialogTitle,{children:["Reset all agents on ",n.confirmResetMachine?n.machineName(n.confirmResetMachine):"this machine","?"]}),(0,t.jsx)(eC.AlertDialogDescription,{children:"Every agent on this machine will start a fresh session. Any that aren't currently running will be woken too."})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{"data-testid":"machine-reset-all-confirm",onClick:n.resetConfirmedMachine,children:"Reset all"})]})]})})};return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[a,(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-6 overflow-y-auto thin-scrollbar p-6",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-xl font-medium text-foreground",children:"My Bots"}),(0,t.jsx)(b,{onViewPlan:n.viewPlan,summary:n.planSummary,isFounder:n.planSummary?.isFounder})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon","aria-label":"How your agent works",onClick:()=>n.setHelpOpen(!0),className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(s,{className:"size-5"})}),(0,t.jsx)("div",{"data-onboarding-target":"create-bot",className:"w-fit",children:(0,t.jsx)(r.Button,{onClick:n.openGuidedCreate,disabled:n.isCreateDisabled&&!n.canShowLimit,"data-testid":x.tid.createBot,title:n.isCreateDisabled?"Bot limit reached. Delete a bot or change plan to create another.":void 0,children:n.guidedCreateLabel})})]})]}),(0,t.jsx)("div",{className:"flex flex-col gap-6",children:n.groups.map(e=>(function({machineId:e,machine:n,bots:a},i){let s=(0,S.isPresenceOnline)(n?.status),l=i.collapsedMachines.has(e),d=i.machineName(e);return(0,t.jsxs)("div",{ref:t=>{i.groupRefs.current[e]=t},className:["flex flex-col gap-3 rounded-lg p-1 transition-colors duration-500",i.highlightId===e?"bg-primary/5 ring-2 ring-primary/40":""].join(" "),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 rounded-md text-left focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none","aria-expanded":!l,"aria-label":`${l?"Expand":"Collapse"} ${d}`,onClick:()=>{i.setCollapsedMachines(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},children:[(0,t.jsx)(Q.ChevronDown,{className:`size-3 shrink-0 text-muted-foreground transition-transform ${l?"-rotate-90":""}`}),(0,t.jsx)(W.Monitor,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs font-medium text-muted-foreground",children:d}),(0,t.jsx)("span",{className:["inline-block size-1.5 shrink-0 rounded-full",s?"bg-status-online":"bg-muted-foreground"].join(" ")})]}),(0,t.jsxs)(r.Button,{variant:"ghost",size:"sm",className:"ml-auto h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>i.setConfirmResetMachine(e),children:[(0,t.jsx)(V.RotateCcw,{className:"size-3.5"}),"Reset all"]})]}),(0,t.jsx)("div",{className:"pl-5",children:(0,t.jsx)(ed,{machineId:e,entries:n?.quota})})]}),(0,t.jsx)("div",{className:"flex flex-col gap-3",hidden:l,children:a.map(e=>{let a=e.isActive&&i.profilesByUserId.get(e.id)?.presence==="online",s=i.pendingActiveBotIds.has(e.id);return(0,t.jsx)(o.Card,{className:"flex flex-col gap-3 p-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)(G.AgentAvatar,{name:e.name,avatarUrl:e.image,seed:e.id,size:40}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2.5",children:[(0,t.jsxs)("div",{className:"flex min-w-55 flex-1 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-[15px] font-medium text-foreground",children:e.name}),(0,t.jsxs)("span",{className:["inline-flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium",a?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-muted text-muted-foreground"].join(" "),children:[(0,t.jsx)("span",{className:["inline-block size-1.5 rounded-full",a?"bg-status-online":"bg-muted-foreground"].join(" ")}),a?"Online":"Offline"]}),(!e.isActive||!a&&n)&&(0,t.jsx)(r.Button,{size:"sm",variant:"outline",className:"h-6 shrink-0 px-2 text-xs",disabled:!e.isActive&&s,"aria-busy":!e.isActive&&s||void 0,onClick:t=>{t.stopPropagation(),e.isActive?n&&i.bringMachineOnline(n.id):i.setBotActive(e,!0)},children:e.isActive?"Bring online":"Activate"})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(I.ProviderLogo,{provider:e.runtime,className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{children:e.runtime})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0",children:"·"}),(0,Y.formatModelLabel)(e.runtime,e.modelName)?(0,t.jsx)("span",{"data-testid":x.tid.botCardModel,className:"font-mono",children:(0,Y.formatModelLabel)(e.runtime,e.modelName)}):(0,t.jsx)("span",{"data-testid":x.tid.botCardModel,className:"font-mono text-muted-foreground/70",title:"No model set — uses the machine's local default",children:"local default"}),e.lastRefreshContextAt&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0",children:"·"}),(0,t.jsx)("span",{className:"shrink-0",children:(0,X.formatAwakeDuration)(e.lastRefreshContextAt)})]})]})]}),e.usage?.capability==="supported"&&(0,t.jsx)(eN,{botId:e.id,usage:e.usage,className:"self-center"})]}),(0,t.jsxs)(J.DropdownMenu,{children:[(0,t.jsx)(J.DropdownMenuTrigger,{render:(0,t.jsx)("button",{"aria-label":"Bot actions",className:"grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground",children:(0,t.jsx)(H.MoreVertical,{className:"size-4"})})}),(0,t.jsxs)(J.DropdownMenuContent,{align:"end",className:"w-auto min-w-36 max-w-56",children:[(0,t.jsxs)(J.DropdownMenuItem,{onClick:()=>i.chatWithBot(e),children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Chat"]}),(0,t.jsxs)(J.DropdownMenuItem,{onClick:()=>i.openActivity(e),children:[(0,t.jsx)(K.Activity,{className:"size-4"})," View activity"]}),(0,t.jsxs)(J.DropdownMenuItem,{onClick:()=>{i.setEditingBot(e),i.setEditOpen(!0)},children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Edit"]}),(0,t.jsxs)(J.DropdownMenuItem,{"data-testid":"bot-reset-session-item",onClick:()=>i.setConfirmReset(e),children:[(0,t.jsx)(V.RotateCcw,{className:"size-4"})," Reset"]}),(0,t.jsxs)(J.DropdownMenuItem,{"data-testid":x.tid.botReportProblemItem,onClick:()=>{i.setBugReportBot({id:e.id,name:e.name}),i.setBugReportOpen(!0)},children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Report a problem"]}),(0,t.jsxs)(J.DropdownMenuItem,{"data-testid":x.tid.botActive(e.id),disabled:s,"aria-busy":s||void 0,onClick:()=>{i.setBotActive(e,!e.isActive)},children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," ",e.isActive?"Deactivate":"Activate"]}),(0,t.jsxs)(J.DropdownMenuItem,{variant:"destructive",onClick:()=>i.setConfirmDelete(e),children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Delete"]})]})]})]})},e.id)})})]},e)})(e,n))})]}),i.create,i.billing,i.help,i.edit,i.activity,i.bug,i.deleteDialog,i.resetDialog,i.resetMachineDialog]})}],765867)},972525,e=>{"use strict";var t=e.i(237649),n=e.i(382416),a=e.i(873120),i=e.i(186339),s=e.i(332680),r=e.i(777104),o=e.i(561261),l=e.i(613349);function d({onPointerDown:e,onPointerMove:n,onPointerUp:a,className:i,withHandle:s=!0}){return(0,t.jsx)("div",{onPointerDown:e,onPointerMove:n,onPointerUp:a,onLostPointerCapture:a,className:(0,l.cn)("hidden sm:flex absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize z-10 items-center justify-center hover:bg-primary/10 active:bg-primary/20 transition-colors rounded-l-xl",i),children:s&&(0,t.jsx)("div",{className:"h-6 w-1 rounded-lg bg-border"})})}function c({width:e,maxWidth:n,resize:r,title:o,description:u,headerLeading:m,footer:p,children:h,bodyClassName:x,bodyRef:f,closeLabel:g,contentTestId:b,bodyTestId:y,requestClose:v}){let j="function"==typeof p?p(v):p;return(0,t.jsxs)(s.SheetContent,{"data-testid":b,side:"right",showOverlay:!0,showCloseButton:!1,style:{"--community-sheet-width":`${e}px`,"--community-sheet-max-width":n,maxWidth:"none"},className:(0,l.cn)("data-[side=right]:h-dvh data-[side=right]:w-screen data-[side=right]:max-w-none data-[side=right]:overflow-hidden","data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:w-[clamp(20rem,var(--community-sheet-width),min(var(--community-sheet-max-width),calc(100vw-1rem)))] data-[side=right]:sm:rounded-xl data-[side=right]:sm:border"),children:[r&&(0,t.jsx)(d,{...r}),(0,t.jsx)(s.SheetHeader,{className:"pr-14 sm:pr-14",children:null==m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.SheetTitle,{className:"truncate",children:o}),null!=u&&(0,t.jsx)(s.SheetDescription,{children:u})]}):(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,t.jsx)("div",{"data-slot":"sheet-header-leading",className:"shrink-0",children:m}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)(s.SheetTitle,{className:"truncate",children:o}),null!=u&&(0,t.jsx)(s.SheetDescription,{children:u})]})]})}),(0,t.jsx)(s.SheetBody,{ref:f,"data-testid":y,className:x,children:h}),null!=j&&(0,t.jsx)(s.SheetFooter,{className:"flex-row items-center justify-end **:data-[slot=button]:min-h-11 sm:**:data-[slot=button]:min-h-0",children:j}),(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-0.5 right-0.5 z-20 size-11 sm:top-3 sm:right-3 sm:size-7","aria-label":g,onClick:v,children:[(0,t.jsx)(a.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:g})]})]})}function u({desktopWidth:e,...a}){let i=function({defaultWidth:e=480,minWidth:t=320,maxWidthRatio:a=.8}={}){let[i,s]=(0,r.useAtom)((0,o.useCreateAtom)(e)),l=(0,n.useRef)(!1),d=(0,n.useCallback)(e=>{e.preventDefault(),e.target.setPointerCapture(e.pointerId),l.current=!0},[]);return{width:i,onPointerDown:d,onPointerMove:(0,n.useCallback)(e=>{l.current&&s(Math.min(window.innerWidth*a,Math.max(t,window.innerWidth-e.clientX)))},[a,s,t]),onPointerUp:(0,n.useCallback)(e=>{l.current=!1,e.target.releasePointerCapture(e.pointerId)},[])}}({defaultWidth:m(e)});return(0,t.jsx)(c,{...a,width:i.width,maxWidth:"80vw",resize:i})}function m(e){return Number.isFinite(e)?Math.max(320,e):480}e.s(["CommunitySheet",0,function({open:e,onOpenChange:a,onOpenChangeComplete:i,title:r,description:o,headerLeading:l,footer:d,children:p,bodyClassName:h,bodyRef:x,desktopWidth:f=480,resizable:g=!1,closeLabel:b="Close",contentTestId:y,bodyTestId:v}){let j=n.useCallback(()=>a(!1),[a]),N=n.useCallback(e=>{e?a(!0):j()},[a,j]);return(0,t.jsx)(s.Sheet,{open:e,onOpenChange:N,onOpenChangeComplete:i,modal:!0,children:g?(0,t.jsx)(u,{title:r,description:o,headerLeading:l,footer:d,bodyClassName:h,bodyRef:x,desktopWidth:f,closeLabel:b,contentTestId:y,bodyTestId:v,requestClose:j,children:p}):(0,t.jsx)(c,{width:m(f),maxWidth:"80vw",title:r,description:o,headerLeading:l,footer:d,bodyClassName:h,bodyRef:x,closeLabel:b,contentTestId:y,bodyTestId:v,requestClose:j,children:p})})}],972525)},678401,e=>{"use strict";var t=e.i(204779),n=e.i(382416),a=e.i(765686),i=e.i(159514),s=e.i(343699),r=e.i(849050),o=e.i(374402),l=e.i(323512),d=e.i(636557);let c=(e,t)=>e.createdAt===t.createdAt?e.id>t.id?-1:+(e.id<t.id):e.createdAt>t.createdAt?-1:1;e.s(["appendBotAuditEvent",0,function(e,t,n){let a=o.communityKeys.botAuditLog(t),i=e.getQueryCache().find({queryKey:a,exact:!0}),s=i?.state.dataUpdatedAt??0,r=!i?.getObserversCount(),l=!1;e.setQueryData(a,e=>{let[t,...a]=e?.pages??[],i=new Map((t?.events??[]).map(e=>[e.id,e])),s=i.get(n.id);if(s&&0>=c(s,n))return e;i.set(n.id,n);let o=[...i.values()].sort(c),d=(l=r&&o.length>200)?o.slice(0,200):o,u=new Set(d.map(e=>e.id)),m=[...new Set([n.id,...t?.liveIds??[]])].filter(e=>u.has(e));return{pages:[{...t,events:d,nextCursor:t?.nextCursor??null,liveIds:m},...a],pageParams:e?.pageParams??[null]}},{updatedAt:s}),l&&e.invalidateQueries({queryKey:a,exact:!0,refetchType:"none"})},"useBotAuditLog",0,function(e){let u=(0,i.useQueryClient)(),m=(0,a.useInfiniteQuery)({enabled:!!e,queryKey:e?o.communityKeys.botAuditLog(e):["disabled-bot-audit-log"],structuralSharing:(t,n)=>(function(e,t,n=!1){if(!t?.pages[0])return(0,s.replaceEqualDeep)(e,t);let a=new Set(t.pages[0].liveIds),i=new Set(t.pages.flatMap(e=>e.events.filter(e=>!a.has(e.id)).map(e=>e.id))),r=new Set([...e?.pages[0]?.liveIds??[],...a].filter(e=>!i.has(e))),o=new Map(t.pages[0].events.map(e=>[e.id,e])),l=new Set(t.pages.slice(1).flatMap(e=>e.events.map(e=>e.id)));for(let t of e?.pages[0]?.events??[])!r.has(t.id)||o.has(t.id)||l.has(t.id)||o.set(t.id,t);let d=[...o.values()].sort(c),u=n?d.slice(0,200):d,m=new Set(u.map(e=>e.id)),[p,...h]=t.pages;return(0,s.replaceEqualDeep)(e,{...t,pages:[{...p,events:u,liveIds:[...r].filter(e=>m.has(e))},...h]})})(t,n,!u.getQueryCache().find({queryKey:o.communityKeys.botAuditLog(e),exact:!0})?.getObserversCount()),initialPageParam:null,queryFn:async({pageParam:n,signal:a})=>{let i=(0,l.captureCommunityLiveSnapshotToken)(u),s=new URLSearchParams;s.set("limit",String(50)),n&&(s.set("beforeCreatedAt",n.beforeCreatedAt),s.set("beforeId",n.beforeId));let d=await (0,r.apiFetch)(`/api/community/bots/${e}/audit-log?${s.toString()}`,(0,t.communityRequestOptions)(u,i,a));if(n)return d;let c=new Set(d.events.map(e=>e.id)),m=u.getQueryData(o.communityKeys.botAuditLog(e))?.pages[0],p=new Set(m?.liveIds),h=m?.events.filter(e=>p.has(e.id)&&!c.has(e.id))??[];return h.length?{...d,events:[...h,...d.events],liveIds:h.map(e=>e.id)}:d},retry:(e,t)=>!(t instanceof d.ApiError&&404===t.status)&&e<1,staleTime:3e4,getNextPageParam:e=>e.nextCursor});return{events:(0,n.useMemo)(()=>{if(!m.data)return[];let e=new Set,t=[];for(let n of m.data.pages)for(let a of n.events)e.has(a.id)||(e.add(a.id),t.push(a));return t},[m.data]),error:m.error,isError:m.isError,isLoading:m.isLoading,fetchNextPage:m.fetchNextPage,hasNextPage:m.hasNextPage,isFetchingNextPage:m.isFetchingNextPage}}])},985885,e=>{"use strict";var t=e.i(693760),n=e.i(984858),a=e.i(557922),i=e.i(362790),s=e.i(159514),r=e.i(152845),o=e.i(374402),l=e.i(280958),d=e.i(382416),c=e.i(902429),u=e.i(351777),m=e.i(86694),p=e.i(695230),h=e.i(193497);function x(e){return{id:e.id,identityAbout:{name:e.name,kind:"bot",..."discriminator"in e&&"string"==typeof e.discriminator?{discriminator:e.discriminator}:{},...void 0===e.description?{}:{aboutMe:e.description}},avatar:{avatar:e.image??(0,l.avatarInitial)(e.name),avatarVersion:e.avatarVersion}}}let f=e=>[o.communityKeys.bots(),o.communityKeys.friends(),o.communityKeys.dms(),...e?[o.communityKeys.profile(e)]:[]],g=()=>f(),b=({id:e})=>f(e),y=({botId:e})=>f(e),v=({id:e})=>[o.communityKeys.botAuditLog(e)],j=()=>[];function N(e,t,a){let l=(0,s.useQueryClient)(),u=(0,h.useCommunityMutationOrigin)(),m=(0,i.useMutation)({meta:{observabilityAction:(0,n.resolveActionName)("bot.command",{kind:e})},mutationKey:[...o.communityKeys.bots(),e],scope:{id:"community-bot-command"},gcTime:0,mutationFn:async({input:e,original:n,resources:a})=>{let i=()=>{u.assert(n),e.assertActive?.()};i();let s=(0,r.beginCommunityProfileSeed)(u.registry);try{for(let e of a)l.getQueryCache().find({queryKey:e.queryKey,exact:!0})===e&&await l.cancelQueries({queryKey:e.queryKey,exact:!0});i(),await u.registry.collections.profiles.preload(),i();let o=await t(e,{client:l,resources:a,assert:i,request:(t,a)=>u.request(n,t,{...a,signal:e.assertActive?.signal,assertActive:i}),publishProfile:e=>{i(),(0,r.writeCommunityProfilePatches)([e],u.registry,{snapshot:s,command:!0})}});return i(),o}finally{try{for(let e of(u.assert(n),a))l.getQueryCache().find({queryKey:e.queryKey,exact:!0})===e&&l.invalidateQueries({queryKey:e.queryKey,exact:!0}).catch(()=>void 0)}catch{}}}}),p=(0,d.useCallback)(e=>(e.assertActive?.(),{input:e,original:u.begin().token,resources:[...new Set(a(e).flatMap(e=>l.getQueryCache().findAll({queryKey:e})))]}),[u,l,a]),x=(0,d.useCallback)(e=>{u.assert(e.original),e.input.assertActive?.()},[u]);return(0,c.useNativeMutationFacade)(m,p,x)}let C=e=>"string"==typeof e?{id:e}:e;function w(e){let t=(0,d.useCallback)((e,t)=>t&&{onSuccess:(n,a,i,s)=>t.onSuccess?.(n,e,i,s),onError:(n,a,i,s)=>t.onError?.(n,e,i,s),onSettled:(n,a,i,s,r)=>t.onSettled?.(n,a,e,s,r)},[]),n=e.mutate,a=e.mutateAsync,i=(0,d.useCallback)((e,a)=>n(C(e),t(e,a)),[n,t]),s=(0,d.useCallback)((e,n)=>a(C(e),t(e,n)),[a,t]);return{...e,mutate:i,mutateAsync:s}}e.s(["useBots",0,function(){let e=(0,s.useQueryClient)(),n=(0,a.useQuery)({queryKey:o.communityKeys.bots(),queryFn:async({client:e,signal:t})=>{let n=await (0,r.apiFetchProfiles)("/api/community/bots",e=>e.bots.map(e=>({...x(e),presence:e.presence})),{signal:t},(0,p.getCommunityDbRegistry)(e));return{...n,bots:n.bots.map(({name:e,description:t,image:n,avatarVersion:a,presence:i,...s})=>s)}}}),i=(0,m.useCanonicalProfilesByUserId)(n.data?.bots.map(e=>e.id)??[]),l=(0,d.useMemo)(()=>(n.data?.bots??[]).map(a=>{let s=(0,u.readCommunityProfile)(i.get(a.id),a.id);return(0,t.deriveView)({...a,name:s.name,description:s.aboutMe,image:s.avatar,avatarVersion:s.avatarVersion,presence:s.presence},[(0,t.valueEvidence)(e,n.data),(0,t.viewEvidence)(s)])}),[i,n.data,e]);return(0,t.deriveView)(l,[(0,t.valueEvidence)(e,n.data),...l.map(t.viewEvidence)]),{...n,bots:l}},"useCreateBot",0,function(){return N("create-command",async({assertActive:e,...t},n)=>{let a=await n.request("/api/community/bots",{method:"POST",body:JSON.stringify(t)});return n.publishProfile(x(a.bot)),a},g)},"useDeleteBot",0,function(){return w(N("delete-command",async({id:e},t)=>{await t.request("/api/community/bots/"+e,{method:"DELETE"})},b))},"useResetBotSession",0,function(){return w(N("reset-command",({id:e},t)=>t.request("/api/community/bots/"+e+"/reset-session",{method:"POST"}),v))},"useResetMachineAgents",0,function(){return w(N("machine-reset-command",({id:e},t)=>t.request("/api/community/machines/"+e+"/reset-agents",{method:"POST"}),j))},"useSetBotActive",0,function(){return N("active-command",async({id:e,active:t},n)=>{let a=o.communityKeys.bots(),i=n.resources.find(e=>e.queryHash===n.client.getQueryCache().find({queryKey:a,exact:!0})?.queryHash),s=i?.state.dataUpdateCount,r=await n.request("/api/community/bots/"+e+"/active",{method:"PATCH",body:JSON.stringify({active:t})});return n.assert(),i&&n.client.getQueryCache().find({queryKey:a,exact:!0})===i&&i.state.dataUpdateCount===s&&n.client.setQueryData(a,e=>{if(!e)return e;let t=e.bots.find(e=>e.id===r.bot.id);return t&&t.isActive!==r.bot.isActive?{...e,activeCount:Math.max(0,e.activeCount+(r.bot.isActive?1:-1)),bots:e.bots.map(e=>e.id===r.bot.id?{...e,isActive:r.bot.isActive}:e)}:e}),r},b)},"useUpdateBot",0,function(){return N("update-command",async({id:e,assertActive:t,...n},a)=>{let i=await a.request("/api/community/bots/"+e,{method:"PATCH",body:JSON.stringify(n)});a.publishProfile(x(i.bot));let s=o.communityKeys.bots();return a.resources.find(e=>a.client.getQueryCache().find({queryKey:s,exact:!0})===e)&&a.client.setQueryData(s,t=>t?{...t,bots:t.bots.map(t=>t.id===e&&t.runtimeConfigRevision<=i.bot.runtimeConfigRevision?{...t,runtime:i.bot.runtime,modelName:i.bot.modelName,reasoningEffort:i.bot.reasoningEffort,runtimeConfigRevision:i.bot.runtimeConfigRevision}:t)}:t),i},b)},"useUploadBotAvatar",0,function(){return N("avatar-command",async({botId:e,file:t},n)=>{let a=new FormData;a.append("file",t);let i=await n.request("/api/community/bots/"+e+"/avatar",{method:"POST",body:a});return n.publishProfile({id:e,avatar:{avatar:i.url,avatarVersion:i.avatarVersion}}),i},y)}])},617527,e=>{"use strict";var t=e.i(693760),n=e.i(159514),a=e.i(557922);e.i(954194);var i=e.i(846367),s=e.i(323512),r=e.i(849050),o=e.i(374402);let l=Object.freeze([]),d=e=>(0,r.apiFetch)("/api/community/machines",(0,s.communityRequestOptions)(e.client,e.signal));e.s(["machinesQueryFn",0,d,"replaceMachines",0,function(e,t){return{...e,machines:t,...e.machineCapacity?{machineCapacity:{...e.machineCapacity,ownedCount:t.length,onlineCount:t.filter(e=>(0,i.isPresenceOnline)(e.status)).length}}:{}}},"useMachines",0,function(e){let i=(0,n.useQueryClient)(),s=(0,a.useQuery)({queryKey:o.communityKeys.machines(),queryFn:d,...e}),r=s.data?.machines??l;return(0,t.deriveView)(r,[(0,t.valueEvidence)(i,s.data)]),{...s,machines:r}}])},902429,e=>{"use strict";var t=e.i(382416);e.s(["useNativeMutationFacade",0,function(e,n,a){let i=(0,t.useCallback)((e,t)=>t&&{onSuccess:(n,i,s,r)=>{try{a(i)}catch{return}t.onSuccess?.(n,e,s,r)},onError:(n,i,s,r)=>{try{a(i)}catch{return}t.onError?.(n,e,s,r)},onSettled:(n,i,s,r,o)=>{try{a(s)}catch{return}t.onSettled?.(n,i,e,r,o)}},[a]),s=e.mutate,r=e.mutateAsync,o=(0,t.useCallback)((e,t)=>s(n(e),i(e,t)),[s,n,i]),l=(0,t.useCallback)((e,t)=>r(n(e),i(e,t)),[r,n,i]);return{...e,mutate:o,mutateAsync:l}}])},366020,e=>{"use strict";var t=e.i(152961),n=e.i(474707),a=e.i(205189);function i(e,t){if(!e.lifecycle.get().active)throw new DOMException("Retired onboarding owner","AbortError");return e.ui.setState(e=>({...e,onboardingState:t})),t}function s(e){return e.ui.get().onboardingState}e.s(["advanceCommunityOnboarding",0,function(e,t,n,r={}){let o=s(e);if(o?.status!=="active"||o.stage!==t)return o;let l={...o,...r,status:"active",stage:n};return i(e,l),(0,a.trackCommunityOnboardingStageCompleted)(t),l},"completeCommunityOnboarding",0,function(e){let t=s(e);return t?.status!=="active"||"initializing"!==t.stage?t:(i(e,null),(0,a.trackCommunityOnboardingStageCompleted)("initializing"),(0,a.trackCommunityOnboardingCompleted)(),null)},"isCommunityOnboardingStage",0,function(e,t){let n=s(e);return n?.status==="active"&&n.stage===t},"readCommunityOnboardingState",0,s,"recoverCommunityOnboardingHarness",0,function(e){let t=s(e);if(t?.status!=="active"||"machine"!==t.stage)return t;let{harness:n,machineId:a,...r}=t;return i(e,{...r,stage:"harness"})},"recoverCommunityOnboardingMachine",0,function(e){let t=s(e);return t?.status!=="active"||"bot"!==t.stage?t:i(e,{...t,machineRecovery:!0})},"skipCommunityOnboarding",0,function(e){let t=s(e);if(!t)return null;let n=t.stage;return i(e,null),(0,a.trackCommunityOnboardingSkipped)(n),null},"startCommunityOnboarding",0,function(e,t={}){let n=s(e);if(n)return n;let r={...t,status:"active",stage:"harness"};return i(e,r),(0,a.trackCommunityOnboardingStarted)(),r},"updateCommunityOnboardingInitialization",0,function(e,t){let n=s(e);if(n?.stage!=="initializing")throw new DOMException("Retired onboarding initialization","AbortError");return i(e,{...n,initialization:t(n.initialization??{checkpoint:{},step:"creating-bots",result:null,pendingDestination:null})})},"updateCommunityOnboardingResources",0,function(e,t){let n=s(e);return n?.status!=="active"?n:i(e,{...n,...t})},"useCommunityOnboarding",0,function(){return(0,t.useSelector)((0,n.useCommunityRuntime)().ui,e=>e.onboardingState)}])},183866,e=>{"use strict";let t={cli_invocation:"alook command",tool_call:"tool",thinking:"Updated its reasoning",turn_interrupt:"Stop accepted by daemon",wake_trigger:"Woke for a new message",session_reset:"Session reset requested",nap:"Started a fresh session",model_changed:"Model changed",provider_changed:"Provider changed",error:"Encountered an error"},n={send:"message send",read:"channel history",resolve:"channel history",reactAdd:"message emoji",messagePropertySet:"message property set",messagePropertyList:"message property list",messagePropertyRemove:"message property remove",markSet:"message mark set",markRemove:"message mark remove",markList:"message mark list",channelMember:"channel member",attachmentUpload:"message attachment upload",attachmentDownload:"message attachment download",listMembers:"server member",listChannels:"channel list",listFriends:"friend list",friendRequest:"friend request",inboxPull:"inbox pull",inboxSnapshot:"inbox pull",profileBioUpdate:"setting profile",profileAvatarUpdate:"setting profile",nap:"nap"};function a(e){let t=e&&"object"==typeof e&&"subcommand"in e&&"string"==typeof e.subcommand?e.subcommand:null;if(!t)return"alook command";let a=n[t]??t.replace(/([a-z\d])([A-Z])/g,"$1 $2").toLowerCase(),i=e&&"object"==typeof e&&"propertyType"in e&&("emoji"===e.propertyType||"tag"===e.propertyType||"mark"===e.propertyType)&&("messagePropertySet"===t||"messagePropertyRemove"===t)?e.propertyType:null;return`alook ${a}${i?` ${i}`:""}`}function i(e){return(e&&"object"==typeof e&&"name"in e&&"string"==typeof e.name?e.name.trim().toLowerCase():"")||"tool"}e.s(["formatAlookAuditCommand",0,a,"formatAuditPreviewTime",0,function(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})},"formatAuditToolName",0,i,"summarizeAuditEvent",0,function(e){return"cli_invocation"===e.kind?a(e.payload):"tool_call"===e.kind?i(e.payload):t[e.kind]}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,328076,e=>{"use strict";var t=e.i(248933),n=e.i(382416);e.s(["useCreateStore",0,function(e,a){let[i]=(0,n.useState)(()=>"function"==typeof e?(0,t.createStore)(e):a?(0,t.createStore)(e,a):(0,t.createStore)(e));return i}])},383275,e=>{"use strict";var t=e.i(1087);let n={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};n.node;let a=(0,t.default)(n);e.s(["ChevronLeft",0,a],383275)},846367,e=>{"use strict";e.s(["isPresenceOffline",0,function(e){return"offline"===e},"isPresenceOnline",0,function(e){return"online"===e}])},989621,e=>{e.v({action:"billing-plan-module__2wDEuW__action",botDots:"billing-plan-module__2wDEuW__botDots",content:"billing-plan-module__2wDEuW__content",currentName:"billing-plan-module__2wDEuW__currentName",house:"billing-plan-module__2wDEuW__house",limit:"billing-plan-module__2wDEuW__limit",name:"billing-plan-module__2wDEuW__name",offer:"billing-plan-module__2wDEuW__offer",offers:"billing-plan-module__2wDEuW__offers",price:"billing-plan-module__2wDEuW__price",stub:"billing-plan-module__2wDEuW__stub",studio:"billing-plan-module__2wDEuW__studio"})},166037,e=>{"use strict";var t=e.i(237649),n=e.i(779646),a=e.i(186339);e.s(["FounderPlanChangeDialog",0,function({offer:e,busy:i,onCancel:s,onConfirm:r}){return(0,t.jsx)(n.Dialog,{open:null!==e,onOpenChange:e=>{e||i||s()},children:(0,t.jsxs)(n.DialogContent,{className:"sm:max-w-md",showCloseButton:!i,children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsxs)(n.DialogTitle,{children:["Leave Founder for ",e?.plan.displayName,"?"]}),(0,t.jsx)(n.DialogDescription,{children:"Completing this purchase permanently ends your Founder access. You can’t restore it, even if you later cancel your subscription. If you leave checkout without paying, you keep Founder."})]}),(0,t.jsxs)(n.DialogFooter,{children:[(0,t.jsx)(a.Button,{variant:"outline",disabled:i,onClick:s,children:"Keep Founder"}),(0,t.jsx)(a.Button,{disabled:i,onClick:r,children:i?"Opening…":"Continue to checkout"})]})]})})}])},765867,690887,e=>{"use strict";var t=e.i(237649),n=e.i(383275),a=e.i(1087);let i={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};i.node;let s=(0,a.default)(i);var r=e.i(186339),o=e.i(934351),l=e.i(728886),d=e.i(382416),c=e.i(732919),u=e.i(904550),m=e.i(909850),p=e.i(621202);function h({idPrefix:e="ot-create"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);return(0,u.useGSAP)(()=>{if(!n.current)return;c.default.set(".ot-bot",{opacity:0,scale:.9}),c.default.set(".ot-dot",{opacity:0}),c.default.set(".ot-say",{opacity:0}),c.default.set(".ot-av",{x:0,y:0,scale:1,svgOrigin:"100 65"});let e=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});e.fromTo(".ot-plus",{scale:.9},{scale:1.12,duration:.9,yoyo:!0,repeat:1}).to(".ot-ph",{opacity:0,scale:1.06,duration:.55},"+=0.15").to(".ot-bot",{opacity:1,scale:1,duration:.55},"<"),(0,p.comeOnline)(e,".ot-dot",120.5,85.5,"-=0.1"),e.to(".ot-av",{scale:.77,x:-50,y:-4,duration:.6,svgOrigin:"100 65"},"+=0.5").from(".ot-say",{x:-8,duration:.5},"<0.15").to(".ot-say",{opacity:1,duration:.4},"<").to({},{duration:1.6}).to(".ot-say",{opacity:0,x:-8,duration:.4}).to(".ot-av",{scale:.9,x:0,y:0,duration:.45,svgOrigin:"100 65"},"<0.1").to(".ot-bot",{opacity:0,duration:.4}).set(".ot-dot",{opacity:0}).set(".ot-av",{scale:1}).to(".ot-ph",{opacity:1,scale:1,duration:.5},"<0.1").to({},{duration:.5})},{scope:n}),(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsxs)("g",{className:"ot-ph ot-center",children:[(0,t.jsx)("rect",{className:"ot-art",x:"74",y:"39",width:"52",height:"52",rx:"16",strokeDasharray:"7 7",opacity:"0.65"}),(0,t.jsxs)("g",{className:"ot-plus ot-center",children:[(0,t.jsx)("line",{className:"ot-art",x1:"100",y1:"55",x2:"100",y2:"75"}),(0,t.jsx)("line",{className:"ot-art",x1:"90",y1:"65",x2:"110",y2:"65"})]})]}),(0,t.jsxs)("g",{className:"ot-bot ot-center",opacity:"0",children:[(0,t.jsxs)("g",{className:"ot-av",children:[(0,t.jsx)("svg",{x:"74",y:"39",width:"52",height:"52",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceB}`})})}),(0,t.jsxs)("g",{className:"ot-online",children:[(0,t.jsx)("circle",{cx:"120.5",cy:"85.5",r:"8.5",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"120.5",cy:"85.5",r:"5.5",fill:"var(--muted-foreground)"}),(0,t.jsx)("circle",{className:"ot-dot",cx:"120.5",cy:"85.5",r:"5.5",fill:"var(--status-online)"})]})]}),(0,t.jsxs)("g",{className:"ot-say",opacity:"0",children:[(0,t.jsx)("text",{x:"82",y:"60",fontFamily:"DM Sans, sans-serif",fontSize:"15",fontWeight:"600",fill:"var(--foreground)",children:"Alli"}),(0,t.jsx)("text",{x:"112",y:"60",fontFamily:"DM Sans, sans-serif",fontSize:"12",fill:"var(--muted-foreground)",children:"now"}),(0,t.jsx)("text",{x:"82",y:"80",fontFamily:"DM Sans, sans-serif",fontSize:"15",fill:"var(--foreground)",children:"Hello World"})]})]})]})}var x=e.i(381153),f=e.i(224950),g=e.i(592941);function b({summary:e,isFounder:n=!1,onViewPlan:a}){let i=e?.activeCount??0,s=e?.ownedCount??0,o=e?.limit??0,l=o>0?Math.min(100,Math.max(0,i/o*100)):0;return(0,t.jsxs)(f.Popover,{children:[(0,t.jsx)(f.PopoverTrigger,{openOnHover:!0,delay:150,render:(0,t.jsxs)("button",{type:"button","data-testid":x.tid.myBotsPlanSummary,disabled:!e,"aria-label":e?`Active Bots: ${i} of ${e.limit} allowed, ${s} owned, ${n?"Founder":e.plan.displayName} plan`:"Active Bots loading",className:"flex min-h-11 w-fit items-center gap-2 rounded-sm text-sm text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:min-h-6",children:["Active Bots",(0,t.jsxs)("svg",{"aria-hidden":"true",className:"size-4 -rotate-90",viewBox:"0 0 20 20",fill:"none",children:[(0,t.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:"2",className:"text-border"}),(0,t.jsx)("circle",{cx:"10",cy:"10",r:"8",stroke:"currentColor",strokeWidth:"2",pathLength:"100",strokeDasharray:`${l} 100`,strokeLinecap:l>0?"round":"butt"})]})]})}),(0,t.jsx)(f.PopoverContent,{className:"w-64 overflow-hidden p-0",side:"bottom",align:"start",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4 p-5",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:"Active bots"}),(0,t.jsx)("span",{className:"font-brand text-xl font-bold leading-none",children:n?"Founder":e?.plan.displayName})]}),(0,t.jsxs)("p",{className:"text-2xl font-semibold leading-none tracking-tight tabular-nums","aria-label":`${i} of ${o} active bot slots used`,children:[i,(0,t.jsxs)("span",{className:"text-lg font-normal text-muted-foreground",children:[" / ",o]})]}),(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:[s," bots owned"]}),a&&(0,t.jsxs)(f.PopoverClose,{onClick:a,render:(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",className:"-mx-2 min-h-11 justify-between sm:min-h-8"}),children:["View plan",(0,t.jsx)(g.ArrowRight,{className:"size-3.5"})]})]})})]})}var y=e.i(248933),v=e.i(777104),j=e.i(561261),N=e.i(159514),C=e.i(374402),w=e.i(636557),k=e.i(51201),A=e.i(506607),D=e.i(849050);e.i(954194);var S=e.i(846367),B=e.i(130901),_=e.i(972525),T=e.i(473131),P=e.i(435355),I=e.i(939088),O=e.i(855372),M=e.i(617527),R=e.i(985885),E=e.i(551095),$=e.i(521073),z=e.i(613349);let F=(0,P.serializeBeamSeed)("initial");function L(e){return(e?.availableRuntimes??[]).map(e=>"string"==typeof e?{id:e,unhealthy:!1}:{id:e.id,...void 0!==e.reasoning?{reasoning:e.reasoning}:{},unhealthy:"unhealthy"===e.status}).sort((e,t)=>Number(e.unhealthy)-Number(t.unhealthy))}function q(e){return e.find(e=>!e.unhealthy)?.id??""}function K({open:e,onOpenChange:n,onCreated:a,guided:i=!1,avatarSeed:s}){let o=(0,k.useCommunityViewSource)("create-bot",e),l=(0,N.useQueryClient)(),c=e=>{e||o.retire(),n(e)},{machines:u}=(0,M.useMachines)(),m=(0,R.useCreateBot)(),p=(0,R.useUploadBotAvatar)(),[h,x]=(0,v.useAtom)((0,j.useCreateAtom)("")),[f,g]=(0,v.useAtom)((0,j.useCreateAtom)("")),[b,U]=(0,v.useAtom)((0,j.useCreateAtom)("")),[Q,W]=(0,v.useAtom)((0,j.useCreateAtom)("")),[H,V]=(0,v.useAtom)((0,j.useCreateAtom)(null)),[Y,G]=(0,v.useAtom)((0,j.useCreateAtom)(null)),[J,X]=(0,v.useAtom)((0,j.useCreateAtom)({})),[Z,ee]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[et,en]=(0,v.useAtom)((0,j.useCreateAtom)({kind:"procedural",image:F})),ea=u.find(e=>e.id===b),ei=(0,d.useMemo)(()=>L(ea),[ea]),es=i&&!!(ea&&Q)&&1===u.filter(e=>(0,S.isPresenceOnline)(e.status)).length&&1===ei.filter(e=>!e.unhealthy).length,er=(0,d.useMemo)(()=>({scope:[o.signal],store:(0,y.createStore)(!1)}),[o.signal]).store;async function eo(){if(["create-command","avatar-command"].some(e=>l.isMutating({mutationKey:[...C.communityKeys.bots(),e],exact:!0,predicate:e=>e.state.variables.input?.assertActive?.signal===o.signal})>0))return;let e=o.capture();e();let t=function({name:e,machineId:t,runtime:n}){let a={};return e.trim()||(a.name="Name is required"),t||(a.machineId="Pick a machine"),n||(a.runtime="Pick a runtime"),a}({name:h,machineId:b,runtime:Q});if(X(t),!(t.name||t.machineId||t.runtime))try{let t=await m.mutateAsync({assertActive:e,name:h.trim(),description:f.trim()||void 0,machineId:b,runtime:Q,image:"procedural"===et.kind?et.image:void 0,model:H,reasoningEffort:Y});e();let n=!1;if("photo"===et.kind&&et.file)try{await p.mutateAsync({botId:t.bot.id,file:et.file,assertActive:e}),e()}catch(t){try{e()}catch{return}if((0,w.isAbortError)(t))return;n=!0,(0,D.toastApiError)(t,"Bot created, but the avatar photo failed to upload",e)}n||A.toast.success(`Created ${h.trim()}`),e(),await a?.(t.bot),e(),c(!1)}catch(t){if((0,w.isAbortError)(t))return;(0,D.toastApiError)(t,"Couldn't create the bot",e)}}return(0,d.useEffect)(()=>{!e||er.get()||(er.setState(()=>!0),x((0,I.randomBotName)()),en({kind:"procedural",image:(0,P.serializeBeamSeed)(s??crypto.randomUUID())}),g(""),U(""),W(""),V(null),G(null),X({}),ee(!1))},[e,s,er,x,en,g,U,W,V,G,X,ee]),(0,d.useEffect)(()=>{if(e){if(""===b){let e=u.find(e=>(0,S.isPresenceOnline)(e.status))?.id??"";e&&U(e);return}if(""===Q){let e=q(ei);e&&W(e)}}},[e,u,ei,b,Q,U,W]),(0,t.jsxs)(_.CommunitySheet,{open:e,onOpenChange:c,title:"Create a bot",bodyClassName:"flex flex-col gap-6",footer:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:e,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:eo,disabled:m.isPending||p.isPending,children:m.isPending?"Creating…":"Create bot"})]}),children:[(0,t.jsx)(E.BotFormFields,{avatarDraft:et,onAvatarChange:en,name:h,setName:function(e){x(e),J.name&&e.trim()&&X(e=>({...e,name:void 0}))},onShuffle:function(){x((0,I.randomBotName)()),X(e=>({...e,name:void 0}))},description:f,setDescription:g,nameError:J.name}),es&&!Z?(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-lg bg-muted/60 px-3 py-2.5",children:[(0,t.jsx)(O.ProviderLogo,{provider:Q,className:"size-5 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"truncate text-sm font-medium",children:["Ready on ",ea?(0,B.machineName)(ea):"your machine"]}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[Q," · Default model"]})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"sm",onClick:()=>ee(!0),children:"Change"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(T.Label,{className:"text-xs text-muted-foreground",children:"Machine"}),0===u.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No paired machines — pair one first."}):(0,t.jsx)("div",{className:"flex flex-col gap-2",role:"radiogroup","aria-label":"Machine","data-testid":"bot-machine-picker",children:u.map(e=>{let n=(0,S.isPresenceOnline)(e.status),a=b===e.id;return(0,t.jsxs)("label",{className:(0,z.cn)("flex items-center gap-2 rounded-lg border p-2 cursor-pointer transition-colors",a?"border-primary bg-primary/5":"border-border/50 hover:border-foreground/20",!n&&"opacity-40 pointer-events-none"),children:[(0,t.jsx)("input",{type:"radio",name:"bot-machine",value:e.id,checked:a,disabled:!n,onChange:()=>{var t;U(t=e.id),W(q(L(u.find(e=>e.id===t)))),V(null),G(null),X(e=>({...e,machineId:void 0}))},className:"accent-primary size-3.5"}),(0,t.jsx)("span",{className:"text-sm",children:(0,B.machineName)(e)}),(0,t.jsxs)("span",{className:(0,z.cn)("ml-auto inline-flex items-center gap-1 text-xs",n?"text-emerald-600 dark:text-emerald-400":"text-muted-foreground"),children:[(0,t.jsx)("span",{className:(0,z.cn)("inline-block size-1.5 rounded-full",n?"bg-status-online":"bg-muted-foreground")}),n?"Online":"Offline"]})]},e.id)})}),J.machineId&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:J.machineId})]}),ea&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:(0,t.jsx)($.BotRuntimeFields,{options:ei,runtime:Q,model:H,daemonVersion:ea?.daemonVersion,reasoningEffort:Y,onRuntimeChange:function(e){W(e),X(e=>({...e,runtime:void 0}))},onModelChange:V,onReasoningEffortChange:G,radioName:"bot-runtime",runtimeError:J.runtime,disableUnhealthyOptions:!0})})]})]})}var U=e.i(484065),Q=e.i(569697),W=e.i(48920),H=e.i(606261),V=e.i(746069),Y=e.i(168614);e.i(400175);var G=e.i(261819),J=e.i(89164),X=e.i(344431),Z=e.i(450463);let ee=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"});function et(e){return"reported"===e.bucket.product.kind?`reported:${e.bucket.product.id}`:"unknown"}function en(e){let t=e.bucket.model;return"reported"===t.kind?`reported:${t.id}`:t.kind}function ea(e){let t;return[et(e),en(e),"rolling"===(t=e.bucket.window).kind?`rolling:${t.durationSeconds}`:"calendar"===t.kind?`calendar:${t.period}`:`provider_defined:${t.id}:${void 0===t.durationSeconds?"absent":t.durationSeconds}`,e.bucket.limitId].join("\0")}function ei(e){let t=Math.min(12,function(e){let t=String(e).toLowerCase();if(t.includes("e-")){let[e,n]=t.split("e-");return Number(n)+(e.split(".")[1]?.length??0)}return t.split(".")[1]?.length??0}(e.usedPercent));return Number((100-e.usedPercent).toFixed(t))}function es(e){return`${ei(e)}% left`}function er(e){if(!e.resetsAt)return 1/0;let t=Date.parse(e.resetsAt);return Number.isNaN(t)?1/0:t}function eo(e){return"supported"===e.capability&&("available"===e.snapshot.status||"stale"===e.snapshot.status)&&e.snapshot.limits.length>0}function el(e){return e.split(/[-_]/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(" ")}function ed({machineId:e,entries:n}){let[a,i]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),s=n?.some(eo)?null:n?.length?n.some(e=>"supported"===e.capability&&"pending"===e.snapshot.status)?"Quota pending":n.every(e=>"unsupported"===e.capability)?"Quota not supported":"Quota unavailable":"Quota unavailable";if(!n?.length)return(0,t.jsxs)("div",{"data-testid":x.tid.machineQuota(e),className:"flex h-7 min-w-0 items-center gap-1.5 text-xs text-muted-foreground",children:[n?.map(e=>(0,t.jsx)(O.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"},e.scope.agentBackendId)),(0,t.jsx)("span",{className:"truncate",children:s??"Quota unavailable"})]});let r=n.filter(eo).toSorted((e,t)=>e.scope.agentBackendId.localeCompare(t.scope.agentBackendId)).flatMap(e=>{if("available"!==e.snapshot.status&&"stale"!==e.snapshot.status)return[];let t=e.snapshot.limits.toSorted((e,t)=>{let n=ei(e)-ei(t);if(0!==n)return n;let a=er(e),i=er(t);return a!==i?a<i?-1:1:ea(e).localeCompare(ea(t))})[0]??null;return t?[{entry:e,limit:t}]:[]}),o=n.reduce((e,t)=>"available"===t.snapshot.status||"stale"===t.snapshot.status?e+t.snapshot.limits.length:e,0),l=r.map(({entry:e,limit:t})=>{let n="stale"===e.snapshot.status?", stale":"";return`${el(e.scope.agentBackendId)} ${es(t)}${n}`}).join("; "),d=n.toSorted((e,t)=>{let n=Number(eo(t))-Number(eo(e));return 0!==n?n:e.scope.agentBackendId.localeCompare(t.scope.agentBackendId)});return(0,t.jsxs)(f.Popover,{open:a,onOpenChange:i,children:[(0,t.jsx)(f.PopoverTrigger,{render:(0,t.jsxs)("button",{type:"button","aria-expanded":a,"aria-label":s?`Quota details: ${s}`:`Quota details: ${l}. ${o} ${1===o?"limit":"limits"}`,"data-testid":x.tid.machineQuota(e),className:"group flex min-h-11 max-w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1 rounded-md py-2 text-left text-xs text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:min-h-7 sm:py-1",children:[s?(0,t.jsxs)(t.Fragment,{children:[n.map(e=>(0,t.jsx)(O.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"},e.scope.agentBackendId)),(0,t.jsx)("span",{className:"truncate",children:s})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"shrink-0 text-foreground/70",children:"Quota"}),(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-border",children:"·"})]}),r.map(({entry:e,limit:n},a)=>{let i="stale"===e.snapshot.status,s=`${el(e.scope.agentBackendId)}: ${es(n)}${i?" (stale)":""}`;return(0,t.jsxs)("span",{className:"contents",children:[a>0&&(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-border",children:"·"}),(0,t.jsxs)("span",{"aria-label":s,title:s,className:"inline-flex shrink-0 items-center gap-1.5",children:[(0,t.jsx)(O.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"}),(0,t.jsxs)("span",{className:i?"font-mono tabular-nums text-warning":"font-mono tabular-nums text-foreground/85",children:[ei(n),"%"]}),i&&(0,t.jsx)("span",{className:"text-[10px] text-warning",children:"stale"})]})]},e.scope.agentBackendId)}),(0,t.jsx)(Q.ChevronDown,{className:"size-3 shrink-0 transition-transform group-data-popup-open:rotate-180"})]})}),(0,t.jsx)(f.PopoverContent,{align:"start",className:"max-h-[min(32rem,calc(100vh-2rem))] w-80 max-w-[calc(100vw-1rem)] overflow-y-auto p-4 thin-scrollbar","data-testid":x.tid.machineQuotaDetail(e),children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:"Machine quota"}),d.map(e=>{let n=e.snapshot;if("available"!==n.status&&"stale"!==n.status)return(0,t.jsxs)("section",{"data-quota-backend":e.scope.agentBackendId,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(O.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-medium text-foreground",children:el(e.scope.agentBackendId)})]}),(0,t.jsx)("div",{className:"rounded-md border border-border/70 px-3 py-2 text-xs text-muted-foreground",children:"unsupported"===e.capability?"Not supported":"supported"===e.capability&&"pending"===e.snapshot.status?"Pending":"Unavailable"})]},e.scope.agentBackendId);let a=function(e){let t=new Map;for(let n of e){let e=`${et(n)}\u0000${en(n)}`,a=t.get(e);a?a.limits.push(n):t.set(e,{key:e,product:n.bucket.product.displayName,model:function(e){let t=e.bucket.model;return"not_applicable"===t.kind?null:"unknown"===t.kind?"Model unavailable":t.id}(n),limits:[n]})}return[...t.values()]}(n.limits);return(0,t.jsxs)("section",{"data-quota-backend":e.scope.agentBackendId,className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)(O.ProviderLogo,{provider:e.scope.agentBackendId,className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate text-xs font-medium text-foreground",children:el(e.scope.agentBackendId)})]}),(0,t.jsx)("span",{className:"stale"===n.status?"shrink-0 text-[11px] text-warning":"shrink-0 text-[11px] text-muted-foreground",children:[n.planName,"stale"===n.status?"Stale":null].filter(Boolean).join(" · ")})]}),0===a.length?(0,t.jsx)("div",{className:"rounded-md border border-border/70 px-3 py-2 text-xs text-muted-foreground",children:"Unavailable"}):a.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate text-xs text-foreground",children:e.product}),e.model&&(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.model})]}),(0,t.jsx)("div",{className:"flex flex-col divide-y divide-border/60 rounded-md border border-border/70",children:e.limits.map(e=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 p-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-xs text-foreground",children:e.bucket.window.displayName}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-xs font-medium tabular-nums text-foreground",children:es(e)})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{children:function(e){if(!e.resetsAt)return"Reset unavailable";let t=new Date(e.resetsAt);return Number.isNaN(t.getTime())?"Reset unavailable":`Resets ${ee.format(t)}`}(e)}),(0,t.jsxs)("span",{className:"shrink-0",children:["Updated ",(0,Z.timeAgo)(n.observedAt)]})]})]},ea(e)))})]},e.key))]},e.scope.agentBackendId)})]})})]})}var ec=e.i(329686),eu=e.i(779646),em=e.i(996718);let ep=new Intl.NumberFormat(void 0),eh=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",timeZone:"UTC"}),ex=["bg-muted-foreground/15","bg-status-online/30","bg-status-online/55","bg-status-online/80","bg-status-online"],ef=[{key:"input",label:"Input"},{key:"output",label:"Output"},{key:"cache",label:"Cache"}];function eg(e){var t;let n=(t=e.day,new Date(`${t}T00:00:00.000Z`));return Number.isNaN(n.getTime())?e.day:eh.format(n)}function eb(e){return null===e?"Unavailable":ep.format(e)}function ey(e){let t=Object.values(e.metrics).filter(e=>null!==e);return{knownTotal:t.reduce((e,t)=>e+t,0),unavailable:0===t.length}}function ev({day:e,includeTotal:n=!1}){let a=ey(e);return(0,t.jsxs)("span",{className:"flex min-w-44 flex-col gap-1",children:[(0,t.jsx)("span",{className:"font-medium",children:eg(e)}),n&&(0,t.jsxs)("span",{className:"flex items-center justify-between gap-4 font-medium",children:[(0,t.jsx)("span",{children:"Known total"}),(0,t.jsx)("span",{className:"font-mono tabular-nums",children:a.unavailable?"Unavailable":ep.format(a.knownTotal)})]}),ef.map(n=>(0,t.jsxs)("span",{className:"flex items-center justify-between gap-4",children:[(0,t.jsx)("span",{children:n.label}),(0,t.jsx)("span",{className:"font-mono tabular-nums",children:eb(e.metrics[n.key])})]},n.key))]})}function ej({botId:e,days:n,interactive:a,ariaLabel:i,className:s}){return(0,t.jsx)("span",{role:a?"img":void 0,"aria-label":a?i:void 0,"aria-hidden":!a||void 0,"data-testid":x.tid.botUsage(e),className:["grid w-fit grid-flow-col gap-[3px] [grid-template-rows:repeat(3,minmax(0,1fr))]",s??""].join(" "),children:n.map(n=>{var i;let s=(i=ey(n)).unavailable||i.knownTotal<=0?0:i.knownTotal<1e7?1:i.knownTotal<1e8?2:i.knownTotal<5e8?3:4,r=(0,t.jsx)("span",{"aria-label":a?[eg(n),`Input ${eb(n.metrics.input)}`,`Output ${eb(n.metrics.output)}`,`Cache ${eb(n.metrics.cache)}`].join(". "):void 0,"data-testid":x.tid.botUsageDay(e,n.day),className:["size-3 rounded-[2px]",ex[s]].join(" ")},n.day);return a?(0,t.jsxs)(ec.Tooltip,{children:[(0,t.jsx)(ec.TooltipTrigger,{render:r}),(0,t.jsx)(ec.TooltipContent,{className:"items-start",children:(0,t.jsx)(ev,{day:n})})]},n.day):r})})}function eN({botId:e,usage:n,className:a}){let i=(0,em.useBreakpoint)(),s=n?.capability==="supported"?n.days.at(-1):void 0,[r,o]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[l,c]=(0,v.useAtom)((0,j.useCreateAtom)(s?.day??""));if((0,d.useEffect)(()=>{!s||n?.days.some(e=>e.day===l)||c(s.day)},[s,l,c,n]),(0,d.useEffect)(()=>{"mobile"!==i&&o(!1)},[i,o]),!n||"supported"!==n.capability)return null;let u=n.days.reduce((e,t)=>e+ey(t).knownTotal,0),m=`Token usage over the last 30 days: ${ep.format(u)} known tokens total`;if("mobile"===i){let i=n.days.find(e=>e.day===l)??s,d=[...n.days].reverse();return(0,t.jsxs)(eu.Dialog,{open:r,onOpenChange:e=>{e&&s&&c(s.day),o(e)},children:[(0,t.jsx)(eu.DialogTrigger,{render:(0,t.jsx)("button",{type:"button","aria-label":"Open token usage details","aria-haspopup":"dialog","data-testid":x.tid.botUsageTrigger(e),className:["grid min-h-11 place-items-center rounded-md px-1 outline-none active:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a??""].join(" ")}),children:(0,t.jsx)(ej,{botId:e,days:n.days,interactive:!1})}),(0,t.jsxs)(eu.DialogContent,{"data-testid":x.tid.botUsageDialog(e),className:"gap-4",children:[(0,t.jsxs)(eu.DialogHeader,{children:[(0,t.jsx)(eu.DialogTitle,{children:"Token usage"}),(0,t.jsx)(eu.DialogDescription,{children:"Choose a date to view token usage. Known total excludes unavailable values."})]}),(0,t.jsx)("div",{"data-testid":x.tid.botUsageDateRail(e),className:"-mx-1 flex min-w-0 gap-2 overflow-x-auto px-1 pb-1 overscroll-x-contain thin-scrollbar scrollbar-none",children:d.map(n=>{let a=n.day===i?.day;return(0,t.jsx)("button",{type:"button","aria-pressed":a,"data-testid":x.tid.botUsageDialogDay(e,n.day),className:["h-11 shrink-0 whitespace-nowrap rounded-md border px-3 text-sm outline-none active:bg-accent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a?"border-foreground bg-foreground font-medium text-background":"border-border bg-background text-muted-foreground hover:bg-accent hover:text-foreground"].join(" "),onClick:()=>c(n.day),children:eg(n)},n.day)})}),i&&(0,t.jsx)("div",{"aria-live":"polite","data-testid":x.tid.botUsageDialogSummary(e),className:"border-t pt-4",children:(0,t.jsx)(ev,{day:i,includeTotal:!0})})]})]})}return(0,t.jsx)(ej,{botId:e,days:n.days,interactive:!0,ariaLabel:m,className:a})}var eC=e.i(575695),ew=e.i(962726),ek=e.i(731517);let eA=[{key:"memory",title:"Memory",tile:function({idPrefix:e="ot-memory"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);(0,u.useGSAP)(()=>{let e=n.current;if(!e)return;let t=[".ot-src0",".ot-src1",".ot-src2"].map((t,n)=>{let a=e.querySelector(t);return{g:a,lbl:a.querySelector(".ot-lbl"),base:-90+120*n}}),a=(e,t)=>{let n=t*Math.PI/180,a=100+40*Math.cos(n),i=62+40*Math.sin(n),s=Math.max(0,1-Math.abs(((t- -90)%360+540)%360-180)/60);e.g.setAttribute("transform",`translate(${a.toFixed(2)} ${i.toFixed(2)})`),e.g.style.opacity=(.5+.5*s).toFixed(3)},i={a:0};c.default.set(".ot-dot",{opacity:1}),c.default.set(".ot-lbl",{opacity:0}),t.forEach(e=>a(e,e.base)),(0,p.breathe)(e,".ot-agent",1.02,3.4);let s=c.default.timeline({repeat:-1});for(let e=0;e<3;e++){let n=t[(-e%3+3)%3];s.to(n.lbl,{opacity:1,duration:.3}).to({},{duration:.6}).to(n.lbl,{opacity:0,duration:.25}).to(i,{a:"+=120",duration:.85,ease:"power2.inOut",onUpdate:()=>t.forEach(e=>a(e,e.base+i.a))})}let r=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});r.to({},{duration:3}).to(".ot-agent",{opacity:.3,duration:.5}),(0,p.goOffline)(r,".ot-dot",112,73,"<"),r.to({},{duration:1.1}).to(".ot-agent",{opacity:1,duration:.5}),(0,p.comeOnline)(r,".ot-dot",112,73,"<"),r.to({},{duration:1.5})},{scope:n});let i=[{cls:"ot-src0",icon:a.book,label:"memory.md"},{cls:"ot-src1",icon:a.layers,label:"experiences"},{cls:"ot-src2",icon:a.clock,label:"timeline"}];return(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsx)("circle",{cx:"100",cy:"62",r:"40",className:"ot-art",opacity:"0.14",strokeDasharray:"2 5"}),(0,t.jsx)("g",{className:"ot-agent ot-center",children:(0,t.jsx)("svg",{x:"83",y:"45",width:"34",height:"34",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceA}`})})})}),(0,t.jsxs)("g",{className:"ot-online",children:[(0,t.jsx)("circle",{cx:"112",cy:"73",r:"6",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"112",cy:"73",r:"4",fill:"var(--muted-foreground)"}),(0,t.jsx)("circle",{className:"ot-dot",cx:"112",cy:"73",r:"4",fill:"var(--status-online)"})]}),i.map(e=>(0,t.jsxs)("g",{className:`ot-src ${e.cls}`,children:[(0,t.jsx)("circle",{className:"ot-pill",cx:"0",cy:"0",r:"12",fill:"var(--muted)"}),(0,t.jsx)("svg",{className:"ot-ic ot-accent",x:"-8",y:"-8",width:"16",height:"16",viewBox:"0 0 24 24",children:(0,t.jsx)("use",{href:`#${e.icon}`})}),(0,t.jsx)("text",{className:"ot-lbl",x:"16",y:"4",textAnchor:"start",fontFamily:"DM Mono, monospace",fontSize:"8.5",fill:"var(--foreground)",opacity:"0",children:e.label})]},e.cls))]})},body:"Your agent has a built-in memory: it writes to memory.md, experiences, and a timeline. These survive a reset and load back on wake."},{key:"workspace",title:"Local workspace",tile:function({idPrefix:e="ot-workspace"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);return(0,u.useGSAP)(()=>{if(!n.current)return;let e=[".ot-f0",".ot-f1",".ot-f2"];c.default.set(e,{opacity:0});let t=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});e.forEach((e,n)=>{t.fromTo(e,{opacity:0},{opacity:1,duration:.5},0===n?">":"+=0.5")}),t.to({},{duration:1.7}).to(e,{opacity:0,duration:.5,stagger:.08}).to({},{duration:.5})},{scope:n}),(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsx)("rect",{className:"ot-art",x:"20",y:"20",width:"160",height:"100",rx:"9",opacity:"0.9"}),(0,t.jsx)("svg",{x:"29",y:"30",width:"22",height:"22",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceA}`})})}),(0,t.jsxs)("g",{className:"ot-oon",children:[(0,t.jsx)("circle",{cx:"48",cy:"49",r:"4",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"48",cy:"49",r:"2.5",fill:"var(--status-online)"})]}),(0,t.jsx)("text",{x:"60",y:"45",fontFamily:"DM Mono, monospace",fontSize:"10",fill:"var(--foreground)",children:"~/.alook/agent"}),(0,t.jsx)("line",{className:"ot-art",x1:"20",y1:"58",x2:"180",y2:"58",opacity:"0.35"}),[{cls:"ot-f0",ty:"65.5",name:"memory.md"},{cls:"ot-f1",ty:"83.5",name:"work.pdf"},{cls:"ot-f2",ty:"101.5",name:"todo.md"}].map(e=>(0,t.jsxs)("g",{className:`ot-wfile ${e.cls}`,transform:`translate(34.5 ${e.ty})`,children:[(0,t.jsx)("svg",{x:"0",y:"0",width:"11",height:"11",viewBox:"0 0 24 24",className:"ot-accent",children:(0,t.jsx)("use",{href:`#${a.file}`})}),(0,t.jsx)("text",{x:"17",y:"9.5",fontFamily:"DM Mono, monospace",fontSize:"10",fill:"var(--foreground)",children:e.name})]},e.cls))]})},body:"Each agent gets a private folder on your machine. Its files — and the runtime itself — stay local; nothing is uploaded."},{key:"nap",title:"Nap",tile:function({idPrefix:e="ot-nap"}){let n=(0,d.useRef)(null),a=(0,m.tileIds)(e);return(0,u.useGSAP)(()=>{let e=n.current;if(!e)return;let t=e.querySelector(".ot-ring"),a=e.querySelector(".ot-pct");c.default.set(".ot-sleep",{opacity:0,y:4}),c.default.set(".ot-dot",{opacity:1}),c.default.set(t,{attr:{"stroke-dashoffset":188.5}}),a.textContent="context 0%";let i=c.default.to(".ot-agent",{scale:1.03,duration:2,ease:p.OT_EASE,yoyo:!0,repeat:-1,transformOrigin:"center"}),s={v:0},r=()=>{a.textContent="context "+Math.round(s.v)+"%",t.setAttribute("stroke-dashoffset",(188.5*(1-s.v/100)).toFixed(1))},o=c.default.timeline({repeat:-1,defaults:{ease:p.OT_EASE}});o.to(s,{v:100,duration:3.2,ease:"power1.in",onUpdate:()=>{r(),i.timeScale(1-s.v/100*.7)}}).to({},{duration:.5}).to(".ot-agent",{opacity:.32,duration:.5}).to(".ot-sleep",{opacity:.9,y:-6,duration:.9,ease:"power1.out"},"<0.1"),(0,p.goOffline)(o,".ot-dot",112,71,"<"),o.to(s,{v:0,duration:.7,ease:"power2.inOut",onUpdate:r},"<0.1").to(".ot-sleep",{opacity:0,duration:.4}).to(".ot-agent",{opacity:1,duration:.5,onStart:()=>i.timeScale(1)},"+=0.3"),(0,p.comeOnline)(o,".ot-dot",112,71,"<"),o.to({},{duration:1})},{scope:n}),(0,t.jsxs)("svg",{ref:n,viewBox:"0 0 200 130",className:"ot-svg h-full w-full",children:[(0,t.jsx)(m.TileDefs,{idPrefix:e}),(0,t.jsx)("circle",{cx:"100",cy:"60",r:"30",fill:"none",stroke:"var(--muted)",strokeWidth:"5"}),(0,t.jsx)("circle",{className:"ot-ring",cx:"100",cy:"60",r:"30",fill:"none",stroke:"var(--status-online)",strokeWidth:"5",strokeLinecap:"round",transform:"rotate(-90 100 60)",strokeDasharray:"188.5",strokeDashoffset:"188.5"}),(0,t.jsx)("g",{className:"ot-agent ot-center",children:(0,t.jsx)("svg",{x:"83",y:"43",width:"34",height:"34",viewBox:"0 0 36 36",children:(0,t.jsx)("g",{clipPath:`url(#${a.disc})`,children:(0,t.jsx)("use",{href:`#${a.faceA}`})})})}),(0,t.jsxs)("g",{className:"ot-online",children:[(0,t.jsx)("circle",{cx:"112",cy:"71",r:"6",fill:"var(--card)"}),(0,t.jsx)("circle",{cx:"112",cy:"71",r:"4",fill:"var(--muted-foreground)"}),(0,t.jsx)("circle",{className:"ot-dot",cx:"112",cy:"71",r:"4",fill:"var(--status-online)"})]}),(0,t.jsx)("text",{className:"ot-pct",x:"100",y:"106",textAnchor:"middle",fontFamily:"DM Mono, monospace",fontSize:"10",fill:"var(--muted-foreground)",children:"context 0%"}),(0,t.jsxs)("g",{className:"ot-sleep ot-accent ot-center",opacity:"0",children:[(0,t.jsx)("svg",{x:"140",y:"30",width:"20",height:"20",viewBox:"0 0 24 24",children:(0,t.jsx)("use",{href:`#${a.moon}`})}),(0,t.jsx)("text",{x:"163",y:"40",fontFamily:"DM Mono, monospace",fontSize:"12",fill:"currentColor",children:"z"}),(0,t.jsx)("text",{x:"172",y:"32",fontFamily:"DM Mono, monospace",fontSize:"8",fill:"currentColor",children:"z"})]})]})},body:'With time and work, your agent piles up context from every turn. Tell it to "nap" to clear that short-term context and start fresh — it leaves a handoff note first.'}];function eD({open:e,onOpenChange:a}){let[i,s]=(0,v.useAtom)((0,j.useCreateAtom)(0)),o=eA[i],l=o.tile,d=e=>s(t=>(t+e+eA.length)%eA.length);return(0,t.jsx)(eu.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(eu.DialogContent,{showCloseButton:!1,className:"flex w-full max-w-lg flex-col gap-0 overflow-hidden p-0 sm:max-w-lg",children:[(0,t.jsxs)("header",{className:"flex items-start justify-between gap-3 px-5 pt-4 pb-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)(eu.DialogTitle,{className:"text-base font-medium",children:"How your agent works"}),(0,t.jsx)(eu.DialogDescription,{className:"text-xs text-muted-foreground",children:"A few mechanics worth knowing about the agents you own."})]}),(0,t.jsx)(eu.DialogClose,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm","aria-label":"Close",className:"-mr-1 shrink-0 text-muted-foreground hover:text-foreground"}),children:(0,t.jsx)(ek.X,{className:"size-4"})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 px-5 pb-5",children:[(0,t.jsx)("div",{className:"overflow-hidden rounded-xl bg-muted/40",children:(0,t.jsx)("div",{className:"aspect-200/130 w-full",children:(0,t.jsx)(l,{},o.key)})}),(0,t.jsxs)("div",{className:"flex h-28 flex-col gap-1 text-center",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:o.title}),(0,t.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:o.body})]}),(0,t.jsxs)("div",{className:"mt-1 flex items-center justify-between",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous",onClick:()=>d(-1),className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(n.ChevronLeft,{className:"size-5"})}),(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:eA.map((e,n)=>(0,t.jsx)("button",{type:"button","aria-label":`Go to ${e.title}`,"aria-current":n===i,onClick:()=>s(n),className:"size-1.5 rounded-full transition-colors "+(n===i?"bg-foreground":"bg-border hover:bg-muted-foreground")},e.key))}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next",onClick:()=>d(1),className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(ew.ChevronRight,{className:"size-5"})})]})]})]})})}var eS=e.i(86694),eB=e.i(678401),e_=e.i(183866);function eT({event:e}){let n,a,i,s;return(0,t.jsxs)("div",{"data-testid":"bot-activity-row",className:"group grid min-h-11 grid-cols-[64px_56px_minmax(0,1fr)] items-center gap-x-3 px-4 hover:bg-accent/30 sm:min-h-0 sm:items-baseline sm:py-1.5",children:[(0,t.jsx)("time",{dateTime:e.createdAt,title:new Date(e.createdAt).toLocaleString(),className:"font-mono text-[11px] tabular-nums text-muted-foreground/70",children:(a=String((n=new Date(e.createdAt)).getHours()).padStart(2,"0"),i=String(n.getMinutes()).padStart(2,"0"),s=String(n.getSeconds()).padStart(2,"0"),`${a}:${i}:${s}`)}),(0,t.jsx)(eP,{kind:e.kind}),(0,t.jsx)("div",{className:"min-w-0 text-left",children:(0,t.jsx)(eI,{event:e})})]})}function eP({kind:e}){var n;let{label:a,tone:i}="cli_invocation"===(n=e)?{label:"daemon",tone:"text-foreground/70"}:"tool_call"===n?{label:"tool",tone:"text-muted-foreground"}:"turn_interrupt"===n?{label:"stop",tone:"text-foreground/70"}:"wake_trigger"===n?{label:"wake",tone:"text-foreground/70"}:"session_reset"===n?{label:"reset",tone:"text-foreground/70"}:"nap"===n?{label:"nap",tone:"text-foreground/70"}:"model_changed"===n?{label:"model",tone:"text-foreground/70"}:"provider_changed"===n?{label:"provider",tone:"text-foreground/70"}:"error"===n?{label:"err",tone:"text-destructive"}:{label:"think",tone:"text-muted-foreground/70"};return(0,t.jsx)("span",{className:`select-none font-mono text-[10px] font-medium uppercase tracking-wider ${i}`,"aria-label":a,children:a})}function eI({event:e}){if("cli_invocation"===e.kind){let n=(0,e_.formatAlookAuditCommand)(e.payload),a=n.replace(/^alook\s+/,"");return(0,t.jsxs)(eO,{fullText:n,children:["alook ",(0,t.jsx)("span",{className:"text-muted-foreground",children:a})]})}if("tool_call"===e.kind){let n=e.payload,a=(0,e_.formatAuditToolName)(e.payload);return n?.target?(0,t.jsxs)(eO,{fullText:`${a} \xb7 ${n.target}`,children:[a," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"·"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:n.target})]}):(0,t.jsx)(eO,{fullText:a,children:a})}if("turn_interrupt"===e.kind)return(0,t.jsxs)(eO,{fullText:"Stop accepted by daemon — waiting for the active turn to become idle.","data-testid":"bot-activity-event-turn_interrupt",children:[(0,t.jsx)("span",{children:"Stop accepted by daemon"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"— waiting for the active turn to become idle."})]});if("session_reset"===e.kind)return(0,t.jsxs)(eO,{fullText:"Session reset requested — the bot will start a fresh session on its next message.","data-testid":"bot-activity-event-session_reset",children:[(0,t.jsx)("span",{children:"Session reset requested"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"— the bot will start a fresh session on its next message."})]});if("nap"===e.kind)return(0,t.jsxs)(eO,{fullText:"Reset its own session — the bot napped and will start fresh on its next message.","data-testid":"bot-activity-event-nap",children:[(0,t.jsx)("span",{children:"Reset its own session"})," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"— the bot napped and will start fresh on its next message."})]});if("model_changed"===e.kind){let n=e.payload,a=n?.from??"default",i=n?.to??"default";return(0,t.jsxs)(eO,{fullText:`${a} → ${i}`,"data-testid":"bot-activity-event-model_changed",children:[a," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"→"})," ",i]})}if("provider_changed"===e.kind){let n=e.payload,a=n?.from??"?",i=n?.to??"?";return(0,t.jsxs)(eO,{fullText:`${a} → ${i}`,"data-testid":"bot-activity-event-provider_changed",children:[a," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"→"})," ",i]})}if("error"===e.kind){let n=e.payload,a=n?.message||"Something went wrong",i=n?.model?`${n?.code??"error"} \xb7 ${n.model}`:n?.code??n?.scope??"error";return(0,t.jsxs)(eO,{fullText:`${a} \xb7 ${i}`,"data-testid":"bot-activity-event-error",children:[(0,t.jsx)("span",{className:"text-destructive",children:a})," ",(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"·"})," ",(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground/70",children:i})]})}if("wake_trigger"===e.kind){let n=e.payload,a=n?.senderHandle??"Sender unavailable",i=n?.channel??"Conversation unavailable",s=n?.seq!=null?`#${n.seq}`:"",r=n?.reason==="mention"?"Mentioned by":"Woken by",o=`${r} ${a} in ${i}${s?` ${s}`:""}`;return(0,t.jsxs)(eO,{fullText:o,children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:r})," ",a," ",(0,t.jsx)("span",{className:"text-muted-foreground",children:"in"})," ",i,s?(0,t.jsxs)("span",{className:"text-muted-foreground/70",children:[" ",s]}):null]})}let n=e.payload,a=n?.text??"",i=n?.truncated??!1,s=n?.chars??eM(a),r=i?Math.max(0,s-eM(a)):0,o=r>0?`${a}
2
+ … ${r} character${1===r?"":"s"} not retained in the audit log`:a;return(0,t.jsx)(eO,{fullText:o,className:"text-[12.5px] text-muted-foreground",children:a})}function eO({children:e,fullText:n,className:a="",...i}){let s=(0,d.useId)(),r=(0,d.useRef)(null),o=(0,d.useRef)(null),[l,c]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[u,m]=(0,v.useAtom)((0,j.useCreateAtom)(!1));(0,d.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>{let t=e.scrollWidth>e.clientWidth+1;c(t),t||m(!1)};if(t(),"u"<typeof ResizeObserver)return;let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[n,c,m]);let p=(0,t.jsx)("button",{type:"button",disabled:!l,"data-activity-tooltip-trigger":l||void 0,onPointerDown:e=>{o.current=e.pointerType},onClick:()=>{l&&("touch"===o.current||"pen"===o.current)&&m(!0)},className:"block min-h-11 w-full min-w-0 cursor-default rounded-sm text-left outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 sm:min-h-0",children:(0,t.jsx)("span",{ref:r,className:`block truncate font-mono text-[13px] text-foreground ${a}`,...i,children:e})});return(0,t.jsxs)(ec.Tooltip,{disabled:!l,open:u&&l,triggerId:s,onOpenChange:m,children:[(0,t.jsx)(ec.TooltipTrigger,{id:s,disabled:!l,closeOnClick:!1,render:p}),(0,t.jsx)(ec.TooltipContent,{role:"tooltip",side:"bottom",align:"start",className:"thin-scrollbar max-h-[min(24rem,calc(100dvh-2rem))] max-w-[min(32rem,calc(100vw-2rem))] overflow-y-auto whitespace-pre-wrap wrap-break-word font-mono text-[12px] leading-relaxed",children:n})]})}function eM(e){return[...e].length}function eR({bot:e,open:n,onOpenChange:a,onOpenChangeComplete:i}){let s=(0,eS.useCanonicalCommunityProfile)(e?.id),r=s?.presence==="online",{events:o,isLoading:l,fetchNextPage:c,hasNextPage:u,isFetchingNextPage:m}=(0,eB.useBotAuditLog)(e?.id??null),p=(0,d.useMemo)(()=>[...o].sort((e,t)=>e.createdAt!==t.createdAt?e.createdAt<t.createdAt?-1:1:e.id<t.id?-1:+(e.id>t.id)),[o]),h=(0,d.useMemo)(()=>(function(e){let t=[];for(let n of e){let e=function(e){let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`}(n.createdAt),a=t[t.length-1];a&&a.dayKey===e?a.events.push(n):t.push({dayKey:e,label:function(e){let t=new Date(e),n=new Date,a=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),i=Math.round((a(n)-a(t))/864e5);return 0===i?"Today":1===i?"Yesterday":i<7?t.toLocaleDateString(void 0,{weekday:"long"}):t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:t.getFullYear()===n.getFullYear()?void 0:"numeric"})}(n.createdAt),events:[n]})}return t})(p),[p]),f=(0,d.useRef)(null),g=(0,d.useRef)(null),b=(0,d.useRef)(0),y=(0,d.useRef)(null),v=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{n||(b.current=0,y.current=null,v.current=!1)},[n,e?.id]),(0,d.useEffect)(()=>{if(!n||v.current||0===p.length)return;let e=g.current,t=f.current;e&&t&&(v.current=!0,b.current=p.length,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.scrollIntoView({block:"end"}),t.scrollTop=t.scrollHeight})}))},[n,p.length]),(0,d.useLayoutEffect)(()=>{let e=f.current;if(!e)return;let t=b.current,n=p.length;if(b.current=n,0===n)return;if(null!==y.current){if(n>t){let t=e.scrollHeight-y.current;e.scrollTop=e.scrollTop+t}y.current=null;return}if(!v.current)return;let a=e.scrollHeight-(e.scrollTop+e.clientHeight)<80;n>t&&a&&(e.scrollTop=e.scrollHeight)},[p.length]),(0,t.jsx)(_.CommunitySheet,{open:n,onOpenChange:a,onOpenChangeComplete:i,title:e?.name??"Bot",headerLeading:(0,t.jsx)(G.AgentAvatar,{name:e?.name??"",avatarUrl:e?.image??null,seed:e?.id,size:32}),description:(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:["inline-block size-1.5 rounded-full",r?"bg-status-online":"bg-muted-foreground/60"].join(" "),"aria-hidden":!0}),(0,t.jsx)("span",{children:r?"Live":"Offline"}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-muted-foreground/40",children:"·"}),(0,t.jsx)("span",{children:"Activity log"})]}),desktopWidth:672,resizable:!0,contentTestId:x.tid.botActivityModal,bodyRef:f,bodyClassName:"bg-background p-0",children:l&&0===p.length?(0,t.jsx)(e$,{}):0===p.length?(0,t.jsx)(ez,{}):(0,t.jsxs)("div",{className:"pb-3",children:[u?(0,t.jsx)("div",{className:"flex justify-center py-2",children:(0,t.jsx)("button",{type:"button",onClick:()=>{if(!u||m)return;let e=f.current;e&&(y.current=e.scrollHeight),c()},disabled:m,className:"min-h-11 rounded-md px-3 py-1 font-mono text-[10px] uppercase tracking-wider text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60 sm:min-h-8",children:m?"Loading older":"Load older"})}):(0,t.jsx)("div",{className:"py-2 text-center font-mono text-[10px] uppercase tracking-wider text-muted-foreground/40",children:"Beginning of log"}),h.map(e=>(0,t.jsxs)("section",{children:[(0,t.jsx)(eE,{label:e.label}),e.events.map(e=>(0,t.jsx)(eT,{event:e},e.id))]},e.dayKey)),(0,t.jsx)("div",{ref:g,"aria-hidden":!0})]})})}function eE({label:e}){return(0,t.jsx)("div",{className:"sticky top-0 z-10 border-b border-border/40 bg-background/95 px-4 py-1 backdrop-blur supports-backdrop-filter:bg-background/80",children:(0,t.jsx)("span",{className:"font-mono text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:e})})}function e$(){return(0,t.jsx)("div",{className:"flex flex-col gap-2 p-4",children:Array.from({length:8}).map((e,n)=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"h-3 w-16 animate-pulse rounded bg-muted/40"}),(0,t.jsx)("div",{className:"h-3 w-10 animate-pulse rounded bg-muted/30"}),(0,t.jsx)("div",{className:"h-3 flex-1 animate-pulse rounded bg-muted/40"})]},n))})}function ez(){return(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center",children:[(0,t.jsx)("div",{className:"font-mono text-[10px] uppercase tracking-wider text-muted-foreground/60",children:"No activity yet"}),(0,t.jsx)("p",{className:"max-w-xs text-xs text-muted-foreground",children:"This bot hasn't run since audit logging was enabled. New runs will stream in here as they happen."})]})}var eF=e.i(557922),eL=e.i(362790),eq=e.i(328076),eK=e.i(152961),eU=e.i(193497),eQ=e.i(562088);let eW=["rate_limited","target_unavailable","nonce_conflict","network_error"],eH={phase:"confirm",terminal:!1,clientNonce:null,reportId:null,deadlineAt:null,completedAt:null,errorCode:null,objectExpired:!1},eV={offline:"Bring the daemon online, then try again.",timeout:"Collection timed out. Try again.",upload_conflict:"The report could not be uploaded safely. Try again.",invalid_upload:"The report upload was rejected. Try again.",diagnostics_unavailable:"Diagnostics are unavailable right now. Try again.",collector_busy:"Another report is being collected. Try again shortly.",bot_not_bound:"This bot is no longer available on that machine.",collection_failed:"Diagnostics could not be collected. Try again.",local_artifact_invalid:"The local diagnostic bundle could not be verified.",bundle_too_large:"The diagnostic bundle was too large to upload.",upload_failed:"The report upload failed. Try again.",internal_error:"The report could not be completed. Try again.",rate_limited:"You can send another report in a minute.",target_unavailable:"Diagnostics aren't available for this bot right now.",nonce_conflict:"That report already belongs to another bot. Try again.",network_error:"Unable to connect — check your network"};function eY(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function eG(e){return eQ.DiagnosticReportFailureCodeSchema.safeParse(e).success}function eJ(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function eX(e,t){let n={...e,reportId:t.reportId,deadlineAt:t.deadlineAt,completedAt:t.completedAt,errorCode:t.failureCode,objectExpired:t.objectExpired};return"pending"===t.status?{...n,phase:"collecting",terminal:!1}:"uploaded"===t.status?{...n,phase:"uploaded",terminal:!0}:{...n,phase:"timeout"===t.failureCode?"timeout":"failed",terminal:!0}}function eZ(e,t){if("created"===t.type||"status"===t.type)return eX(e,t.report);if("create_error"===t.type)return{...e,phase:"failed",terminal:!1,errorCode:"internal_error"};if("create_rejected"===t.type){var n;return{...e,phase:"failed",terminal:"rate_limited"===(n=t.code)||"nonce_conflict"===n,errorCode:t.code}}return"invalid_payload"===t.type?{...e,phase:"failed",terminal:!0,errorCode:"internal_error"}:"deadline"===t.type?{...e,phase:"timeout",terminal:!0,errorCode:"timeout"}:e}function e0(e){var t;return eY(e)?eY(t=e.report)&&"string"==typeof t.reportId&&t.reportId.startsWith("dbr_")&&("pending"===t.status||"uploaded"===t.status||"failed"===t.status)&&eJ(t.deadlineAt)&&"boolean"==typeof t.objectExpired&&(null===t.completedAt||void 0===t.completedAt||eJ(t.completedAt))&&(null===t.failureCode||void 0===t.failureCode||eG(t.failureCode))&&("failed"!==t.status||eG(t.failureCode))&&("failed"===t.status||null===t.failureCode||void 0===t.failureCode)?{reportId:t.reportId,status:t.status,deadlineAt:t.deadlineAt,completedAt:t.completedAt??null,failureCode:t.failureCode??null,objectExpired:t.objectExpired}:null:null}class e1 extends Error{}function e2({reportId:e}){let[n,a]=(0,v.useAtom)((0,j.useCreateAtom)("idle")),i=async()=>{try{await navigator.clipboard.writeText(e),a("copied")}catch{a("failed")}};return(0,t.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-foreground",children:"Report ID"}),(0,t.jsx)("code",{className:"font-mono text-xs text-muted-foreground",children:e}),(0,t.jsx)(r.Button,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs","aria-label":"Copy report ID",onClick:()=>void i(),children:"Copy"}),"copied"===n&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Copied"}),"failed"===n&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:"Couldn’t copy. Select the ID instead."})]})}function e5(e){var n,a,i,s,o;let l="confirm"!==e.phase&&"submitting"!==e.phase,d="failed"===e.phase||"timeout"===e.phase?"Try again":e.isSubmitting?"Submitting…":"Confirm",c="collecting"!==e.phase&&"uploaded"!==e.phase&&("failed"!==e.phase||"rate_limited"!==e.errorCode);return(0,t.jsx)(eC.AlertDialog,{open:e.open,onOpenChange:e.onOpenChange,children:(0,t.jsxs)(eC.AlertDialogContent,{"data-testid":x.tid.botReportProblemDialog,children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsxs)(eC.AlertDialogTitle,{children:["Report a problem with ",e.bot.name,"?"]}),(0,t.jsxs)(eC.AlertDialogDescription,{className:"space-y-3 text-left",children:[(0,t.jsx)("span",{className:"block",children:"We’ll upload only program logs needed to diagnose the problem."}),(0,t.jsx)("span",{className:"block",children:"We won’t read or upload your agent’s local chat history or files."}),(0,t.jsx)("span",{className:"block",children:"Reports are deleted after 7 days."})]})]}),l&&(0,t.jsxs)("div",{"data-testid":x.tid.botReportProblemStatus,className:"rounded-md bg-muted/60 px-3 py-2 text-sm",children:[(0,t.jsx)("p",{className:"font-medium text-foreground",children:(n=e.phase,a=e.errorCode,"failed"===n&&"rate_limited"===a?"A report was sent recently":"collecting"===n?"Collecting diagnostics":"uploaded"===n?"Report uploaded":"timeout"===n?"Collection timed out":"Report failed")}),"failed"===e.phase&&(0,t.jsx)("p",{className:"mt-1 text-muted-foreground",children:"string"==typeof(o=s=i=e.errorCode)&&eW.includes(o)||eG(s)?eV[i]:eV.internal_error}),e.reportId&&(0,t.jsx)(e2,{reportId:e.reportId},e.reportId)]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Close"}),c&&(0,t.jsx)(r.Button,{"data-testid":x.tid.botReportProblemSubmit,disabled:e.isSubmitting,onClick:()=>void e.onConfirm(),children:d})]})]})})}function e3({bot:e,open:n,onOpenChange:a}){let{state:i,confirm:s}=function({agentId:e,open:t}){let n=(0,eU.useCommunityMutationOrigin)(),a=(0,N.useQueryClient)(),i=(0,k.useCommunityViewSource)(`bug-report:${e}`),s=(0,eq.useCreateStore)({nonce:null,expiredReportId:null}),r=(0,eK.useSelector)(s,e=>e),o=["community","bug-report-create",e],l=(0,eL.useMutation)({meta:{observabilityAction:"bot.bug_report.submit"},mutationKey:o,mutationFn:async({nonce:t,token:i,assert:s})=>{s();let r={path:`/api/community/bots/${e}/diagnostics`,init:{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientNonce:t})}},o=await n.request(i,r.path,{...r.init,signal:s.signal,assertActive:s});s();let l=e0(o);if(!l)throw new e1("Invalid diagnostics response");let d=C.communityKeys.bugReport(l.reportId),c=a.getQueryCache().build(a,{queryKey:d,gcTime:3e5});return c.state.data||c.setData(l),n.assert(i),{nonce:t,reportId:l.reportId}}}),c=l.reset,u=l.data?.nonce===r.nonce?l.data.reportId:null,m=t&&!!u&&r.expiredReportId!==u,p=(0,eF.useQuery)({queryKey:C.communityKeys.bugReport(u??"inactive"),subscribed:m,gcTime:3e5,enabled:e=>m&&e.state.data?.status==="pending"&&Date.now()<e.state.data.deadlineAt&&!(e.state.error instanceof e1),retry:!1,queryFn:async({signal:e})=>{let t=n.begin().token,a={path:`/api/community/diagnostics/${u}`,init:{method:"GET"}},i=await n.request(t,a.path,{...a.init,signal:e});n.assert(t);let s=e0(i);if(!s)throw new e1("Invalid diagnostics response");return s},refetchInterval:e=>{let t=e.state.data;return!!(m&&!(e.state.error instanceof e1)&&t?.status==="pending"&&Date.now()<t.deadlineAt)&&1e3}}),h={...eH,clientNonce:r.nonce};l.variables?.nonce===r.nonce&&(l.isPending?h={...h,phase:"submitting"}:l.error&&!(l.error instanceof DOMException&&"AbortError"===l.error.name)&&(h=eZ(h,l.error instanceof e1?{type:"invalid_payload"}:function(e){if(e instanceof w.ApiError){if(e.isNetworkError||0===e.status)return{type:"create_rejected",code:"network_error"};if(e.isRateLimit)return{type:"create_rejected",code:"rate_limited"};if(404===e.status)return{type:"create_rejected",code:"target_unavailable"};if(409===e.status)return{type:"create_rejected",code:"nonce_conflict"}}return{type:"create_error"}}(l.error)))),p.data&&p.data.reportId===u&&(h=eX(h,p.data)),p.error instanceof e1&&(h=eZ(h,{type:"invalid_payload"})),r.expiredReportId===u&&"collecting"===h.phase&&(h=eZ(h,{type:"deadline"})),(0,d.useEffect)(()=>{let e=p.data;if(!t||!e||"pending"!==e.status)return;let n=i.capture(),a=()=>{try{n()}catch{return}s.setState(t=>({...t,expiredReportId:e.reportId}))},r=e.deadlineAt-Date.now();if(r<=0)return void a();let o=setTimeout(a,r);return()=>clearTimeout(o)},[t,p.data,i,s]),(0,d.useEffect)(()=>{!t&&h.terminal&&(s.setState(()=>({nonce:null,expiredReportId:null})),c())},[t,h.terminal,s,c]);let x=async()=>{if("submitting"!==h.phase&&"collecting"!==h.phase&&!a.getMutationCache().findAll({mutationKey:o,status:"pending"}).length)try{let e=i.capture(),t=n.begin().token;e();let a=function(e,t=()=>globalThis.crypto.randomUUID()){return"submitting"===e.phase||"collecting"===e.phase?e:!e.terminal&&e.clientNonce?{...e,phase:"submitting",errorCode:null}:{...eH,phase:"submitting",clientNonce:t()}}({...h,clientNonce:s.get().nonce});if(!a.clientNonce)return;s.setState(()=>({nonce:a.clientNonce,expiredReportId:null})),await l.mutateAsync({nonce:a.clientNonce,token:t,assert:e})}catch{}};return{state:h,confirm:x}}({agentId:e.id,open:n});return(0,t.jsx)(e5,{bot:e,open:n,phase:i.phase,isSubmitting:"submitting"===i.phase,reportId:i.reportId,errorCode:i.errorCode,onConfirm:s,onOpenChange:a})}function e4(e){return void 0!==e.phase?(0,t.jsx)(e5,{...e}):(0,t.jsx)(e3,{...e})}var e6=e.i(540604),e8=e.i(909832);function e7(e){return(0,e6.isPhotoAvatarUrl)(e.image)?{kind:"photo",file:null,previewUrl:e.image}:{kind:"procedural",image:(0,P.parseBeamSeed)(e.image)?e.image:(0,P.serializeBeamSeed)(e.id)}}function e9({bot:e,open:n,onOpenChange:a}){let i=(0,k.useCommunityViewSource)("edit-bot:"+(e?.id??"none"),n&&!!e),s=(0,N.useQueryClient)(),o=e=>{e||i.retire(),a(e)},[l,c]=(0,v.useAtom)((0,j.useCreateAtom)(e?.name??"")),[u,m]=(0,v.useAtom)((0,j.useCreateAtom)(e?.description??"")),[p,h]=(0,v.useAtom)((0,j.useCreateAtom)(e?.modelName??null)),[x,f]=(0,v.useAtom)((0,j.useCreateAtom)(e?.reasoningEffort??null)),[g,b]=(0,v.useAtom)((0,j.useCreateAtom)(e?.runtime??"")),[S,B]=(0,v.useAtom)((0,j.useCreateAtom)(!1)),[T,I]=(0,v.useAtom)((0,j.useCreateAtom)(void 0)),[O,z]=(0,v.useAtom)((0,j.useCreateAtom)(e?e7(e):{kind:"procedural",image:(0,P.serializeBeamSeed)("initial")})),F=(0,R.useUpdateBot)(),q=(0,R.useUploadBotAvatar)(),{machines:K}=(0,M.useMachines)(),U=K.find(t=>t.id===e?.machineId),Q=(0,d.useMemo)(()=>{let e=L(U);return g&&!e.some(e=>e.id===g)&&e.push({id:g,unhealthy:!0}),e},[U,g]),W=(0,d.useMemo)(()=>({scope:[i.signal],store:(0,y.createStore)(!1)}),[i.signal]).store;async function H(){if(!e||["update-command","avatar-command"].some(e=>s.isMutating({mutationKey:[...C.communityKeys.bots(),e],exact:!0,predicate:e=>e.state.variables.input?.assertActive?.signal===i.signal})>0))return;let t=i.capture();if(t(),!l.trim())return void I("Name is required");let n=function(e){if(null!==e){if(0===e.trim().length)return"Enter a model name";if(e.length>100)return"Model name must be 100 characters or fewer"}}(p);if(n)return void A.toast.error(n);let a=p!==(e.modelName??null),r=g!==e.runtime,d=x!==(e.reasoningEffort??null);try{let n=await F.mutateAsync({assertActive:t,id:e.id,name:l.trim(),description:u.trim(),image:"procedural"===O.kind?O.image:void 0,...a?{model:p}:{},...r?{runtime:g}:{},...d?{reasoningEffort:x}:{}});t();let i=!1;if("photo"===O.kind&&O.file)try{await q.mutateAsync({botId:e.id,file:O.file,assertActive:t}),t()}catch(e){try{t()}catch{return}if((0,w.isAbortError)(e))return;i=!0,(0,D.toastApiError)(e,"Bot updated, but the avatar photo failed to upload",t)}if(!i)if((r||a)&&"saved_not_applied"===n.application)A.toast.success("Runtime settings saved for next start.");else if(r)A.toast.success(`Provider switch to ${g} dispatched`);else if(a){let e=p??"the runtime default";A.toast.success(`Model switch to ${e} dispatched`)}else d?A.toast.success("next_turn"===n.application?"Reasoning effort saved. Next turn takes effect.":"Reasoning effort saved for next start."):A.toast.success("Bot updated");t(),o(!1)}catch(e){if((0,w.isAbortError)(e))return;(0,D.toastApiError)(e,"Update failed",t)}}function V(){if(e){if(!l.trim())return void I("Name is required");if(g!==e.runtime)return void B(!0);H()}}return(0,d.useEffect)(()=>{n&&e&&(W.get()||(W.setState(()=>!0),c(e.name),m(e.description??""),h(e.modelName??null),f(e.reasoningEffort??null),b(e.runtime),z(e7(e)),I(void 0),B(!1)))},[n,e,W,c,m,h,f,b,z,I,B]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(_.CommunitySheet,{open:n,onOpenChange:o,title:`Edit ${e?.name??"bot"}`,description:"Name and description edits take effect on the next wake. Reasoning effort applies on the next turn when online, or the next start when offline. Provider and model switches require the bot to be online.",bodyClassName:"flex flex-col gap-6",footer:n=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:n,children:"Cancel"}),(0,t.jsx)(r.Button,{onClick:V,disabled:F.isPending||q.isPending||!e,children:F.isPending?"Saving…":"Save"})]}),children:[(0,t.jsx)(E.BotFormFields,{avatarDraft:O,onAvatarChange:z,name:l,setName:function(e){c(e),T&&e.trim()&&I(void 0)},onShuffle:function(){c((0,e8.uniqueNamesGenerator)({dictionaries:[e8.names],length:1,style:"capital"})),I(void 0)},description:u,setDescription:m,nameError:T}),e&&(0,t.jsx)($.BotRuntimeFields,{options:Q,runtime:g,model:p,daemonVersion:U?.daemonVersion,reasoningEffort:x,onRuntimeChange:b,onModelChange:h,onReasoningEffortChange:f})]}),(0,t.jsx)(eC.AlertDialog,{open:S,onOpenChange:B,children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsx)(eC.AlertDialogTitle,{children:"Switch provider and reset this session?"}),(0,t.jsxs)(eC.AlertDialogDescription,{children:["Switching from ",e?.runtime," to ",g," starts a fresh session. The bot cannot resume its current provider session."]})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{onClick:()=>{B(!1),H()},children:"Switch provider"})]})]})})]})}var te=e.i(166037),tt=e.i(820655),tn=e.i(49980);function ta({count:e,className:n}){let a=e<=10?5:10,i=Math.max(1,Math.ceil(e/a)),s=Math.max(32,8*i),r=(80-(Math.min(e,a)-1)*8)/2,o=(s-(i-1)*8)/2;return(0,t.jsx)("svg",{className:n,viewBox:`0 0 80 ${s}`,role:"img","aria-label":`${e} bot slots`,children:Array.from({length:e},(e,n)=>(0,t.jsx)("circle",{cx:r+n%a*8,cy:o+8*Math.floor(n/a),r:"1.5",fill:"currentColor"},n))})}var ti=e.i(989621),ts=e.i(205189);function tr(e){let t=e.currency.toUpperCase(),n=new Intl.NumberFormat("en",{style:"currency",currency:t}).resolvedOptions().maximumFractionDigits??2,a=new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e.unitAmount/10**n),i=1===e.intervalCount?e.interval:`${e.intervalCount} ${e.interval}s`;return`${a} ${t} / ${i}`}function to(e){return new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric"}).format(new Date(e))}function tl({open:e,onOpenChange:n,limit:a,onViewPlan:i}){return(0,t.jsx)(eu.Dialog,{open:e,onOpenChange:n,children:(0,t.jsxs)(eu.DialogContent,{className:"sm:max-w-md","data-testid":"upgrade-plan-modal",children:[(0,t.jsxs)(eu.DialogHeader,{children:[(0,t.jsx)(eu.DialogTitle,{children:"Plan limit reached"}),(0,t.jsxs)(eu.DialogDescription,{children:["Your owned bots have reached your plan’s limit of ",a,". You can’t create another bot. Delete bots until you own fewer than ",a," to make room."]})]}),(0,t.jsxs)(eu.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>n(!1),children:"Got it"}),(0,t.jsx)(r.Button,{onClick:()=>{n(!1),i()},children:"View plan"})]})]})})}function td(){return(0,t.jsx)(o.Card,{className:"flex flex-col gap-3 p-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)(l.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2.5 sm:items-end",children:(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:min-w-55",children:[(0,t.jsx)(l.Skeleton,{className:"h-6 w-40 max-w-full rounded"}),(0,t.jsx)(l.Skeleton,{className:"h-4 w-48 max-w-full rounded"})]})}),(0,t.jsx)(l.Skeleton,{className:"size-8 shrink-0 rounded-md"})]})})}function tc(e,a=!1){return e||a?(0,t.jsxs)("header",{className:"flex h-12 shrink-0 items-center gap-2 border-b border-border/40 px-6",children:[e?(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",onClick:e,className:"text-muted-foreground hover:text-foreground","aria-label":"Back",children:(0,t.jsx)(n.ChevronLeft,{className:"size-5"})}):(0,t.jsx)(l.Skeleton,{"data-slot":"loading-back-placeholder","aria-hidden":!0,className:"size-8 shrink-0 rounded-md"}),(0,t.jsx)("span",{className:"ml-1 truncate text-base font-semibold",children:"My Bots"})]}):null}function tu({onBack:e,reserveBackSlot:n=!1}={}){return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[tc(void 0,n||!!e),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-6 overflow-y-auto p-6 thin-scrollbar",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)(l.Skeleton,{className:"h-6 w-24 rounded"}),(0,t.jsx)(l.Skeleton,{className:"h-4 w-full max-w-80 rounded"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(l.Skeleton,{className:"size-9 rounded-md"}),(0,t.jsx)(l.Skeleton,{className:"h-9 w-28 rounded-md"})]})]}),(0,t.jsx)("div",{className:"flex flex-col gap-6",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg p-1",children:[(0,t.jsxs)("div",{className:"flex h-7 items-center gap-2 px-1",children:[(0,t.jsx)(l.Skeleton,{className:"size-3 rounded"}),(0,t.jsx)(l.Skeleton,{className:"size-3.5 rounded"}),(0,t.jsx)(l.Skeleton,{className:"h-3 w-28 rounded"}),(0,t.jsx)(l.Skeleton,{className:"size-1.5 rounded-full"}),(0,t.jsx)(l.Skeleton,{className:"ml-auto h-7 w-20 rounded-md"})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(td,{}),(0,t.jsx)(td,{}),(0,t.jsx)(td,{})]})]})})]})]})}e.s(["BillingContent",0,function({billing:e}){let[n,a]=(0,v.useAtom)((0,j.useCreateAtom)(null)),i=e=>a(e?.priceId??null),s=e.data,o=s?.offers.find(e=>e.priceId===n)??null,d=s?.isFounder?null:s?.subscription,c=s?.offers.find(e=>e.plan.id===s.plan.id),u="checkout"===e.returnFrom&&(s?.isFounder||!d||d.plan.id!==s?.plan.id);return(0,t.jsxs)("div",{className:ti.default.content,"data-testid":x.tid.billingSheet,children:[(0,t.jsxs)("section",{className:"pb-2","aria-label":"Current plan",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[e.isPending&&(0,t.jsx)(l.Skeleton,{className:"h-14 w-36","aria-label":"Loading billing"}),s&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[(0,t.jsx)("h2",{className:ti.default.currentName,children:s.isFounder?"Founder":s.plan.displayName}),(0,t.jsx)("span",{className:"mt-1 rounded-md bg-muted px-2 py-1 text-xs font-medium leading-none text-muted-foreground",children:"Current"})]})]}),(0,t.jsx)(r.Button,{variant:"ghost",size:"icon-sm",className:"size-11 shrink-0 text-muted-foreground sm:size-8",onClick:e.refresh,disabled:e.isFetching,"aria-label":"Refresh status","data-testid":x.tid.billingRefresh,children:(0,t.jsx)(tn.RefreshCw,{className:`size-4 ${e.isFetching?"animate-spin motion-reduce:animate-none":""}`})})]}),s&&(0,t.jsxs)(t.Fragment,{children:[(s.isFounder||c||d)&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-3",children:[s.isFounder?(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Permanent ",s.plan.displayName," access"]}):c&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:tr(c)}),d&&!s.isFounder&&(0,t.jsxs)(r.Button,{variant:"outline",onClick:()=>void e.portal(),disabled:e.isBusy,"data-testid":x.tid.billingPortal,children:["Manage billing",(0,t.jsx)(tt.ExternalLink,{className:"size-3.5"})]})]}),(d?.scheduledChange||d?.cancelAt||d?.currentPeriodEnd||d?.status==="past_due")&&(0,t.jsxs)("div",{className:"mt-5 flex flex-col gap-3 border-t border-border pt-4 text-sm",children:[d?.scheduledChange&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("p",{children:["Changes to ",d.scheduledChange.plan.displayName," on ",to(d.scheduledChange.effectiveAt)]}),!s.isFounder&&(0,t.jsx)(r.Button,{variant:"outline",size:"sm",onClick:()=>void e.cancelChange(),disabled:e.isBusy,"data-testid":x.tid.billingCancelChange,children:e.isCancelingChange?"Keeping current plan…":"Keep current plan"})]}),d?.cancelAt&&(0,t.jsxs)("p",{children:["Ends ",to(d.cancelAt),". Your current access stays until then."]}),d&&!d.cancelAt&&!d.scheduledChange&&d.currentPeriodEnd&&(0,t.jsxs)("p",{className:"text-muted-foreground",children:["Current period ends ",to(d.currentPeriodEnd)]}),d?.status==="past_due"&&(0,t.jsx)("p",{children:"Your renewal payment needs attention. Update your payment method in billing management."})]})]})]}),e.isError&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Couldn't refresh your plan. Check your connection and refresh status."}),e.returnFrom&&(0,t.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"cancel"===e.returnFrom?"Checkout closed. Your current plan is shown above.":u?e.polling?"Waiting for payment confirmation. Your current access stays in place.":"Payment confirmation hasn't arrived yet. Refresh status to check again.":e.polling?"Refreshing your plan and billing status…":"Your current plan is shown above. Refresh status to check for further changes."}),s&&(0,t.jsxs)("section",{className:"flex flex-col gap-4","aria-label":"Available plans",children:[(0,t.jsx)("h2",{className:"text-base font-medium",children:d?"Change plan":"Choose a plan"}),0===s.offers.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Paid plans are unavailable right now. Refresh status to try again."}),(0,t.jsx)("div",{className:ti.default.offers,children:s.offers.map(n=>{let a=!!(d&&n.plan.id===s.plan.id),o=d?.scheduledChange?.plan.id===n.plan.id;return(0,t.jsxs)("article",{className:`${ti.default.offer} ${"house"===n.plan.id?ti.default.house:ti.default.studio}`,children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:ti.default.name,children:n.plan.displayName}),(0,t.jsx)("p",{className:ti.default.price,children:tr(n)})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("p",{className:ti.default.limit,children:["Up to ",(0,t.jsx)("strong",{children:n.botLimit})," active bots"]}),(0,t.jsxs)("p",{className:ti.default.limit,children:["Up to ",(0,t.jsx)("strong",{children:n.machineLimit})," online machine",1===n.machineLimit?"":"s"]})]}),(0,t.jsx)(r.Button,{className:ti.default.action,variant:a||o?"outline":"default",onClick:()=>(t=>{if(!s)return;let n=(0,ts.toAnalyticsPlanId)(t.plan.id);n&&"free"!==n&&(0,ts.trackPricingCtaClick)({plan_id:n,cta_action:"choose_plan",auth_state:"signed_in",current_plan:(0,ts.toAnalyticsCurrentPlan)(s.plan.id,s.isFounder),entry_point:"billing_sheet"}),s.isFounder?i(t):d?e.portal(t.priceId):e.checkout(t.priceId,!1,"billing_sheet")})(n),disabled:e.isBusy||!!u||a||o,"data-testid":d?x.tid.billingChangePlan:x.tid.billingCheckout,"data-price-id":n.priceId,children:e.isBusy&&!e.isCancelingChange?"Opening…":o?"Scheduled":a?"Current plan":`Choose ${n.plan.displayName}`}),(0,t.jsxs)("div",{className:ti.default.stub,children:[(0,t.jsxs)("span",{children:["Alook · ",n.botLimit," bots"]}),(0,t.jsx)(ta,{count:n.botLimit,className:ti.default.botDots})]})]},n.priceId)})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:d?"Review changes and any payment on Stripe.":"Continue to Stripe to review and pay."})]}),(0,t.jsx)(te.FounderPlanChangeDialog,{offer:o,busy:e.isBusy,onCancel:()=>i(null),onConfirm:()=>{if(!o)return;let t=o.priceId;i(null),e.checkout(t,!0,"billing_sheet")}}),e.actionError&&(0,t.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:e.actionError})]})},"BillingSheet",0,tl],690887),e.s(["BotListSkeleton",0,tu,"renderBotListView",0,function({onBack:e},n){let a=tc(e);if((n.isLoading||n.machinesLoading)&&0===n.bots.length)return(0,t.jsx)(tu,{onBack:e});if(0===n.bots.length){let e=0===n.machines.length;return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[a,(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-4 p-12 text-center",children:[(0,t.jsx)("div",{className:"w-full max-w-70 overflow-hidden rounded-xl",children:(0,t.jsx)("div",{className:"aspect-200/130 w-full",children:(0,t.jsx)(h,{})})}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-lg font-medium text-foreground",children:e?"Connect a machine first":"No bots yet"}),(0,t.jsx)("p",{className:"max-w-md text-sm text-muted-foreground",children:e?"Bots need a connected machine to run. Connect one first, then come back to create your bot.":"Create a bot and chat with it from anywhere — spin up servers and share it with family and friends."})]}),(0,t.jsx)("div",{"data-onboarding-target":"create-bot",className:"w-fit",children:(0,t.jsx)(r.Button,{onClick:e?n.openMachines:n.openGuidedCreate,disabled:!e&&n.isCreateDisabled&&!n.canShowLimit,"data-testid":e?void 0:x.tid.createBot,children:e?"Connect a machine":n.guidedCreateLabel})}),n.planSummary?.isFounder&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Founder plan"})]}),(0,t.jsx)(K,{open:n.createOpen,onOpenChange:n.setCreateOpen,onCreated:n.onBotCreated,guided:n.guidedActive,avatarSeed:n.guidedAvatarSeed}),(0,t.jsx)(tl,{open:n.billingOpen&&n.canShowLimit,onOpenChange:n.setBillingOpen,limit:n.planSummary?.limit??0,onViewPlan:n.viewPlan})]})}let i={billing:(0,t.jsx)(tl,{open:n.billingOpen&&n.canShowLimit,onOpenChange:n.setBillingOpen,limit:n.planSummary?.limit??0,onViewPlan:n.viewPlan}),create:(0,t.jsx)(K,{open:n.createOpen,onOpenChange:n.setCreateOpen,onCreated:n.onBotCreated,guided:n.guidedActive,avatarSeed:n.guidedAvatarSeed}),help:(0,t.jsx)(eD,{open:n.helpOpen,onOpenChange:n.setHelpOpen}),edit:(0,t.jsx)(e9,{bot:n.editingBot,open:n.editOpen,onOpenChange:n.setEditOpen}),activity:(0,t.jsx)(eR,{bot:n.activityBot,open:n.activityOpen,onOpenChange:n.onActivityOpenChange,onOpenChangeComplete:e=>n.onActivityOpenChangeComplete(e,n.activityGeneration)},n.activityGeneration),bug:n.bugReportBot?(0,t.jsx)(e4,{bot:n.bugReportBot,open:n.bugReportOpen,onOpenChange:n.setBugReportOpen},n.bugReportBot.id):null,deleteDialog:(0,t.jsx)(eC.AlertDialog,{open:!!n.confirmDelete,onOpenChange:e=>!e&&n.setConfirmDelete(null),children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsxs)(eC.AlertDialogTitle,{children:["Delete ",n.confirmDelete?.name,"?"]}),(0,t.jsx)(eC.AlertDialogDescription,{children:"The bot will leave every server it's in and its runner key will be revoked. Past messages remain in history with the bot's current name and avatar."})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{onClick:n.deleteConfirmedBot,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})}),resetDialog:(0,t.jsx)(eC.AlertDialog,{open:!!n.confirmReset,onOpenChange:e=>!e&&n.setConfirmReset(null),children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsx)(eC.AlertDialogTitle,{children:"Reset this bot's session?"}),(0,t.jsx)(eC.AlertDialogDescription,{children:"Its running process will stop and it'll start a fresh session that picks up unfinished work from its notes."})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{"data-testid":"bot-reset-confirm",onClick:n.resetConfirmedBot,children:"Reset"})]})]})}),resetMachineDialog:(0,t.jsx)(eC.AlertDialog,{open:!!n.confirmResetMachine,onOpenChange:e=>!e&&n.setConfirmResetMachine(null),children:(0,t.jsxs)(eC.AlertDialogContent,{children:[(0,t.jsxs)(eC.AlertDialogHeader,{children:[(0,t.jsxs)(eC.AlertDialogTitle,{children:["Reset all agents on ",n.confirmResetMachine?n.machineName(n.confirmResetMachine):"this machine","?"]}),(0,t.jsx)(eC.AlertDialogDescription,{children:"Every agent on this machine will start a fresh session. Any that aren't currently running will be woken too."})]}),(0,t.jsxs)(eC.AlertDialogFooter,{children:[(0,t.jsx)(eC.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(eC.AlertDialogAction,{"data-testid":"machine-reset-all-confirm",onClick:n.resetConfirmedMachine,children:"Reset all"})]})]})})};return(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[a,(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-6 overflow-y-auto thin-scrollbar p-6",children:[(0,t.jsxs)("header",{className:"flex items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-xl font-medium text-foreground",children:"My Bots"}),(0,t.jsx)(b,{onViewPlan:n.viewPlan,summary:n.planSummary,isFounder:n.planSummary?.isFounder})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)(r.Button,{variant:"ghost",size:"icon","aria-label":"How your agent works",onClick:()=>n.setHelpOpen(!0),className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(s,{className:"size-5"})}),(0,t.jsx)("div",{"data-onboarding-target":"create-bot",className:"w-fit",children:(0,t.jsx)(r.Button,{onClick:n.openGuidedCreate,disabled:n.isCreateDisabled&&!n.canShowLimit,"data-testid":x.tid.createBot,title:n.isCreateDisabled?"Bot limit reached. Delete a bot or change plan to create another.":void 0,children:n.guidedCreateLabel})})]})]}),(0,t.jsx)("div",{className:"flex flex-col gap-6",children:n.groups.map(e=>(function({machineId:e,machine:n,bots:a},i){let s=(0,S.isPresenceOnline)(n?.status),l=i.collapsedMachines.has(e),d=i.machineName(e);return(0,t.jsxs)("div",{ref:t=>{i.groupRefs.current[e]=t},className:["flex flex-col gap-3 rounded-lg p-1 transition-colors duration-500",i.highlightId===e?"bg-primary/5 ring-2 ring-primary/40":""].join(" "),children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1 px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 rounded-md text-left focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none","aria-expanded":!l,"aria-label":`${l?"Expand":"Collapse"} ${d}`,onClick:()=>{i.setCollapsedMachines(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},children:[(0,t.jsx)(Q.ChevronDown,{className:`size-3 shrink-0 text-muted-foreground transition-transform ${l?"-rotate-90":""}`}),(0,t.jsx)(W.Monitor,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs font-medium text-muted-foreground",children:d}),(0,t.jsx)("span",{className:["inline-block size-1.5 shrink-0 rounded-full",s?"bg-status-online":"bg-muted-foreground"].join(" ")})]}),(0,t.jsxs)(r.Button,{variant:"ghost",size:"sm",className:"ml-auto h-7 gap-1.5 px-2 text-xs text-muted-foreground hover:text-foreground",onClick:()=>i.setConfirmResetMachine(e),children:[(0,t.jsx)(V.RotateCcw,{className:"size-3.5"}),"Reset all"]})]}),(0,t.jsx)("div",{className:"pl-5",children:(0,t.jsx)(ed,{machineId:e,entries:n?.quota})})]}),(0,t.jsx)("div",{className:"flex flex-col gap-3",hidden:l,children:a.map(e=>{let a=e.isActive&&i.profilesByUserId.get(e.id)?.presence==="online",s=i.pendingActiveBotIds.has(e.id);return(0,t.jsx)(o.Card,{className:"flex flex-col gap-3 p-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsx)(G.AgentAvatar,{name:e.name,avatarUrl:e.image,seed:e.id,size:40}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-wrap items-start gap-x-3 gap-y-2.5",children:[(0,t.jsxs)("div",{className:"flex min-w-55 flex-1 flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-[15px] font-medium text-foreground",children:e.name}),(0,t.jsxs)("span",{className:["inline-flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium",a?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-muted text-muted-foreground"].join(" "),children:[(0,t.jsx)("span",{className:["inline-block size-1.5 rounded-full",a?"bg-status-online":"bg-muted-foreground"].join(" ")}),a?"Online":"Offline"]}),(!e.isActive||!a&&n)&&(0,t.jsx)(r.Button,{size:"sm",variant:"outline",className:"h-6 shrink-0 px-2 text-xs",disabled:!e.isActive&&s,"aria-busy":!e.isActive&&s||void 0,onClick:t=>{t.stopPropagation(),e.isActive?n&&i.bringMachineOnline(n.id):i.setBotActive(e,!0)},children:e.isActive?"Bring online":"Activate"})]}),(0,t.jsxs)("span",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(O.ProviderLogo,{provider:e.runtime,className:"size-3.5 shrink-0"}),(0,t.jsx)("span",{children:e.runtime})]}),(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0",children:"·"}),(0,Y.formatModelLabel)(e.runtime,e.modelName)?(0,t.jsx)("span",{"data-testid":x.tid.botCardModel,className:"font-mono",children:(0,Y.formatModelLabel)(e.runtime,e.modelName)}):(0,t.jsx)("span",{"data-testid":x.tid.botCardModel,className:"font-mono text-muted-foreground/70",title:"No model set — uses the machine's local default",children:"local default"}),e.lastRefreshContextAt&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0",children:"·"}),(0,t.jsx)("span",{className:"shrink-0",children:(0,X.formatAwakeDuration)(e.lastRefreshContextAt)})]})]})]}),e.usage?.capability==="supported"&&(0,t.jsx)(eN,{botId:e.id,usage:e.usage,className:"self-center"})]}),(0,t.jsxs)(J.DropdownMenu,{children:[(0,t.jsx)(J.DropdownMenuTrigger,{render:(0,t.jsx)("button",{"aria-label":"Bot actions",className:"grid size-8 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground",children:(0,t.jsx)(H.MoreVertical,{className:"size-4"})})}),(0,t.jsxs)(J.DropdownMenuContent,{align:"end",className:"w-auto min-w-36 max-w-56",children:[(0,t.jsxs)(J.DropdownMenuItem,{onClick:()=>i.chatWithBot(e),children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Chat"]}),(0,t.jsxs)(J.DropdownMenuItem,{onClick:()=>i.openActivity(e),children:[(0,t.jsx)(U.Activity,{className:"size-4"})," View activity"]}),(0,t.jsxs)(J.DropdownMenuItem,{onClick:()=>{i.setEditingBot(e),i.setEditOpen(!0)},children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Edit"]}),(0,t.jsxs)(J.DropdownMenuItem,{"data-testid":"bot-reset-session-item",onClick:()=>i.setConfirmReset(e),children:[(0,t.jsx)(V.RotateCcw,{className:"size-4"})," Reset"]}),(0,t.jsxs)(J.DropdownMenuItem,{"data-testid":x.tid.botReportProblemItem,onClick:()=>{i.setBugReportBot({id:e.id,name:e.name}),i.setBugReportOpen(!0)},children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Report a problem"]}),(0,t.jsxs)(J.DropdownMenuItem,{"data-testid":x.tid.botActive(e.id),disabled:s,"aria-busy":s||void 0,onClick:()=>{i.setBotActive(e,!e.isActive)},children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," ",e.isActive?"Deactivate":"Activate"]}),(0,t.jsxs)(J.DropdownMenuItem,{variant:"destructive",onClick:()=>i.setConfirmDelete(e),children:[(0,t.jsx)("span",{className:"size-4","aria-hidden":!0})," Delete"]})]})]})]})},e.id)})})]},e)})(e,n))})]}),i.create,i.billing,i.help,i.edit,i.activity,i.bug,i.deleteDialog,i.resetDialog,i.resetMachineDialog]})}],765867)},972525,e=>{"use strict";var t=e.i(237649),n=e.i(382416),a=e.i(873120),i=e.i(186339),s=e.i(332680),r=e.i(777104),o=e.i(561261),l=e.i(613349);function d({onPointerDown:e,onPointerMove:n,onPointerUp:a,className:i,withHandle:s=!0}){return(0,t.jsx)("div",{onPointerDown:e,onPointerMove:n,onPointerUp:a,onLostPointerCapture:a,className:(0,l.cn)("hidden sm:flex absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize z-10 items-center justify-center hover:bg-primary/10 active:bg-primary/20 transition-colors rounded-l-xl",i),children:s&&(0,t.jsx)("div",{className:"h-6 w-1 rounded-lg bg-border"})})}function c({width:e,maxWidth:n,resize:r,title:o,description:u,headerLeading:m,footer:p,children:h,bodyClassName:x,bodyRef:f,closeLabel:g,contentTestId:b,bodyTestId:y,requestClose:v}){let j="function"==typeof p?p(v):p;return(0,t.jsxs)(s.SheetContent,{"data-testid":b,side:"right",showOverlay:!0,showCloseButton:!1,style:{"--community-sheet-width":`${e}px`,"--community-sheet-max-width":n,maxWidth:"none"},className:(0,l.cn)("data-[side=right]:h-dvh data-[side=right]:w-screen data-[side=right]:max-w-none data-[side=right]:overflow-hidden","data-[side=right]:sm:inset-y-2 data-[side=right]:sm:right-2 data-[side=right]:sm:h-auto data-[side=right]:sm:w-[clamp(20rem,var(--community-sheet-width),min(var(--community-sheet-max-width),calc(100vw-1rem)))] data-[side=right]:sm:rounded-xl data-[side=right]:sm:border"),children:[r&&(0,t.jsx)(d,{...r}),(0,t.jsx)(s.SheetHeader,{className:"pr-14 sm:pr-14",children:null==m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.SheetTitle,{className:"truncate",children:o}),null!=u&&(0,t.jsx)(s.SheetDescription,{children:u})]}):(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,t.jsx)("div",{"data-slot":"sheet-header-leading",className:"shrink-0",children:m}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)(s.SheetTitle,{className:"truncate",children:o}),null!=u&&(0,t.jsx)(s.SheetDescription,{children:u})]})]})}),(0,t.jsx)(s.SheetBody,{ref:f,"data-testid":y,className:x,children:h}),null!=j&&(0,t.jsx)(s.SheetFooter,{className:"flex-row items-center justify-end **:data-[slot=button]:min-h-11 sm:**:data-[slot=button]:min-h-0",children:j}),(0,t.jsxs)(i.Button,{type:"button",variant:"ghost",size:"icon-sm",className:"absolute top-0.5 right-0.5 z-20 size-11 sm:top-3 sm:right-3 sm:size-7","aria-label":g,onClick:v,children:[(0,t.jsx)(a.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:g})]})]})}function u({desktopWidth:e,...a}){let i=function({defaultWidth:e=480,minWidth:t=320,maxWidthRatio:a=.8}={}){let[i,s]=(0,r.useAtom)((0,o.useCreateAtom)(e)),l=(0,n.useRef)(!1),d=(0,n.useCallback)(e=>{e.preventDefault(),e.target.setPointerCapture(e.pointerId),l.current=!0},[]);return{width:i,onPointerDown:d,onPointerMove:(0,n.useCallback)(e=>{l.current&&s(Math.min(window.innerWidth*a,Math.max(t,window.innerWidth-e.clientX)))},[a,s,t]),onPointerUp:(0,n.useCallback)(e=>{l.current=!1,e.target.releasePointerCapture(e.pointerId)},[])}}({defaultWidth:m(e)});return(0,t.jsx)(c,{...a,width:i.width,maxWidth:"80vw",resize:i})}function m(e){return Number.isFinite(e)?Math.max(320,e):480}e.s(["CommunitySheet",0,function({open:e,onOpenChange:a,onOpenChangeComplete:i,title:r,description:o,headerLeading:l,footer:d,children:p,bodyClassName:h,bodyRef:x,desktopWidth:f=480,resizable:g=!1,closeLabel:b="Close",contentTestId:y,bodyTestId:v}){let j=n.useCallback(()=>a(!1),[a]),N=n.useCallback(e=>{e?a(!0):j()},[a,j]);return(0,t.jsx)(s.Sheet,{open:e,onOpenChange:N,onOpenChangeComplete:i,modal:!0,children:g?(0,t.jsx)(u,{title:r,description:o,headerLeading:l,footer:d,bodyClassName:h,bodyRef:x,desktopWidth:f,closeLabel:b,contentTestId:y,bodyTestId:v,requestClose:j,children:p}):(0,t.jsx)(c,{width:m(f),maxWidth:"80vw",title:r,description:o,headerLeading:l,footer:d,bodyClassName:h,bodyRef:x,closeLabel:b,contentTestId:y,bodyTestId:v,requestClose:j,children:p})})}],972525)},678401,e=>{"use strict";var t=e.i(204779),n=e.i(382416),a=e.i(765686),i=e.i(159514),s=e.i(343699),r=e.i(849050),o=e.i(374402),l=e.i(323512),d=e.i(636557);let c=(e,t)=>e.createdAt===t.createdAt?e.id>t.id?-1:+(e.id<t.id):e.createdAt>t.createdAt?-1:1;e.s(["appendBotAuditEvent",0,function(e,t,n){let a=o.communityKeys.botAuditLog(t),i=e.getQueryCache().find({queryKey:a,exact:!0}),s=i?.state.dataUpdatedAt??0,r=!i?.getObserversCount(),l=!1;e.setQueryData(a,e=>{let[t,...a]=e?.pages??[],i=new Map((t?.events??[]).map(e=>[e.id,e])),s=i.get(n.id);if(s&&0>=c(s,n))return e;i.set(n.id,n);let o=[...i.values()].sort(c),d=(l=r&&o.length>200)?o.slice(0,200):o,u=new Set(d.map(e=>e.id)),m=[...new Set([n.id,...t?.liveIds??[]])].filter(e=>u.has(e));return{pages:[{...t,events:d,nextCursor:t?.nextCursor??null,liveIds:m},...a],pageParams:e?.pageParams??[null]}},{updatedAt:s}),l&&e.invalidateQueries({queryKey:a,exact:!0,refetchType:"none"})},"useBotAuditLog",0,function(e){let u=(0,i.useQueryClient)(),m=(0,a.useInfiniteQuery)({enabled:!!e,queryKey:e?o.communityKeys.botAuditLog(e):["disabled-bot-audit-log"],structuralSharing:(t,n)=>(function(e,t,n=!1){if(!t?.pages[0])return(0,s.replaceEqualDeep)(e,t);let a=new Set(t.pages[0].liveIds),i=new Set(t.pages.flatMap(e=>e.events.filter(e=>!a.has(e.id)).map(e=>e.id))),r=new Set([...e?.pages[0]?.liveIds??[],...a].filter(e=>!i.has(e))),o=new Map(t.pages[0].events.map(e=>[e.id,e])),l=new Set(t.pages.slice(1).flatMap(e=>e.events.map(e=>e.id)));for(let t of e?.pages[0]?.events??[])!r.has(t.id)||o.has(t.id)||l.has(t.id)||o.set(t.id,t);let d=[...o.values()].sort(c),u=n?d.slice(0,200):d,m=new Set(u.map(e=>e.id)),[p,...h]=t.pages;return(0,s.replaceEqualDeep)(e,{...t,pages:[{...p,events:u,liveIds:[...r].filter(e=>m.has(e))},...h]})})(t,n,!u.getQueryCache().find({queryKey:o.communityKeys.botAuditLog(e),exact:!0})?.getObserversCount()),initialPageParam:null,queryFn:async({pageParam:n,signal:a})=>{let i=(0,l.captureCommunityLiveSnapshotToken)(u),s=new URLSearchParams;s.set("limit",String(50)),n&&(s.set("beforeCreatedAt",n.beforeCreatedAt),s.set("beforeId",n.beforeId));let d=await (0,r.apiFetch)(`/api/community/bots/${e}/audit-log?${s.toString()}`,(0,t.communityRequestOptions)(u,i,a));if(n)return d;let c=new Set(d.events.map(e=>e.id)),m=u.getQueryData(o.communityKeys.botAuditLog(e))?.pages[0],p=new Set(m?.liveIds),h=m?.events.filter(e=>p.has(e.id)&&!c.has(e.id))??[];return h.length?{...d,events:[...h,...d.events],liveIds:h.map(e=>e.id)}:d},retry:(e,t)=>!(t instanceof d.ApiError&&404===t.status)&&e<1,staleTime:3e4,getNextPageParam:e=>e.nextCursor});return{events:(0,n.useMemo)(()=>{if(!m.data)return[];let e=new Set,t=[];for(let n of m.data.pages)for(let a of n.events)e.has(a.id)||(e.add(a.id),t.push(a));return t},[m.data]),error:m.error,isError:m.isError,isLoading:m.isLoading,fetchNextPage:m.fetchNextPage,hasNextPage:m.hasNextPage,isFetchingNextPage:m.isFetchingNextPage}}])},985885,e=>{"use strict";var t=e.i(693760),n=e.i(984858),a=e.i(557922),i=e.i(362790),s=e.i(159514),r=e.i(152845),o=e.i(374402),l=e.i(280958),d=e.i(382416),c=e.i(902429),u=e.i(351777),m=e.i(86694),p=e.i(695230),h=e.i(193497);function x(e){return{id:e.id,identityAbout:{name:e.name,kind:"bot",..."discriminator"in e&&"string"==typeof e.discriminator?{discriminator:e.discriminator}:{},...void 0===e.description?{}:{aboutMe:e.description}},avatar:{avatar:e.image??(0,l.avatarInitial)(e.name),avatarVersion:e.avatarVersion}}}let f=e=>[o.communityKeys.bots(),o.communityKeys.friends(),o.communityKeys.dms(),...e?[o.communityKeys.profile(e)]:[]],g=()=>f(),b=({id:e})=>f(e),y=({botId:e})=>f(e),v=({id:e})=>[o.communityKeys.botAuditLog(e)],j=()=>[];function N(e,t,a){let l=(0,s.useQueryClient)(),u=(0,h.useCommunityMutationOrigin)(),m=(0,i.useMutation)({meta:{observabilityAction:(0,n.resolveActionName)("bot.command",{kind:e})},mutationKey:[...o.communityKeys.bots(),e],scope:{id:"community-bot-command"},gcTime:0,mutationFn:async({input:e,original:n,resources:a})=>{let i=()=>{u.assert(n),e.assertActive?.()};i();let s=(0,r.beginCommunityProfileSeed)(u.registry);try{for(let e of a)l.getQueryCache().find({queryKey:e.queryKey,exact:!0})===e&&await l.cancelQueries({queryKey:e.queryKey,exact:!0});i(),await u.registry.collections.profiles.preload(),i();let o=await t(e,{client:l,resources:a,assert:i,request:(t,a)=>u.request(n,t,{...a,signal:e.assertActive?.signal,assertActive:i}),publishProfile:e=>{i(),(0,r.writeCommunityProfilePatches)([e],u.registry,{snapshot:s,command:!0})}});return i(),o}finally{try{for(let e of(u.assert(n),a))l.getQueryCache().find({queryKey:e.queryKey,exact:!0})===e&&l.invalidateQueries({queryKey:e.queryKey,exact:!0}).catch(()=>void 0)}catch{}}}}),p=(0,d.useCallback)(e=>(e.assertActive?.(),{input:e,original:u.begin().token,resources:[...new Set(a(e).flatMap(e=>l.getQueryCache().findAll({queryKey:e})))]}),[u,l,a]),x=(0,d.useCallback)(e=>{u.assert(e.original),e.input.assertActive?.()},[u]);return(0,c.useNativeMutationFacade)(m,p,x)}let C=e=>"string"==typeof e?{id:e}:e;function w(e){let t=(0,d.useCallback)((e,t)=>t&&{onSuccess:(n,a,i,s)=>t.onSuccess?.(n,e,i,s),onError:(n,a,i,s)=>t.onError?.(n,e,i,s),onSettled:(n,a,i,s,r)=>t.onSettled?.(n,a,e,s,r)},[]),n=e.mutate,a=e.mutateAsync,i=(0,d.useCallback)((e,a)=>n(C(e),t(e,a)),[n,t]),s=(0,d.useCallback)((e,n)=>a(C(e),t(e,n)),[a,t]);return{...e,mutate:i,mutateAsync:s}}e.s(["useBots",0,function(){let e=(0,s.useQueryClient)(),n=(0,a.useQuery)({queryKey:o.communityKeys.bots(),queryFn:async({client:e,signal:t})=>{let n=await (0,r.apiFetchProfiles)("/api/community/bots",e=>e.bots.map(e=>({...x(e),presence:e.presence})),{signal:t},(0,p.getCommunityDbRegistry)(e));return{...n,bots:n.bots.map(({name:e,description:t,image:n,avatarVersion:a,presence:i,...s})=>s)}}}),i=(0,m.useCanonicalProfilesByUserId)(n.data?.bots.map(e=>e.id)??[]),l=(0,d.useMemo)(()=>(n.data?.bots??[]).map(a=>{let s=(0,u.readCommunityProfile)(i.get(a.id),a.id);return(0,t.deriveView)({...a,name:s.name,description:s.aboutMe,image:s.avatar,avatarVersion:s.avatarVersion,presence:s.presence},[(0,t.valueEvidence)(e,n.data),(0,t.viewEvidence)(s)])}),[i,n.data,e]);return(0,t.deriveView)(l,[(0,t.valueEvidence)(e,n.data),...l.map(t.viewEvidence)]),{...n,bots:l}},"useCreateBot",0,function(){return N("create-command",async({assertActive:e,...t},n)=>{let a=await n.request("/api/community/bots",{method:"POST",body:JSON.stringify(t)});return n.publishProfile(x(a.bot)),a},g)},"useDeleteBot",0,function(){return w(N("delete-command",async({id:e},t)=>{await t.request("/api/community/bots/"+e,{method:"DELETE"})},b))},"useResetBotSession",0,function(){return w(N("reset-command",({id:e},t)=>t.request("/api/community/bots/"+e+"/reset-session",{method:"POST"}),v))},"useResetMachineAgents",0,function(){return w(N("machine-reset-command",({id:e},t)=>t.request("/api/community/machines/"+e+"/reset-agents",{method:"POST"}),j))},"useSetBotActive",0,function(){return N("active-command",async({id:e,active:t},n)=>{let a=o.communityKeys.bots(),i=n.resources.find(e=>e.queryHash===n.client.getQueryCache().find({queryKey:a,exact:!0})?.queryHash),s=i?.state.dataUpdateCount,r=await n.request("/api/community/bots/"+e+"/active",{method:"PATCH",body:JSON.stringify({active:t})});return n.assert(),i&&n.client.getQueryCache().find({queryKey:a,exact:!0})===i&&i.state.dataUpdateCount===s&&n.client.setQueryData(a,e=>{if(!e)return e;let t=e.bots.find(e=>e.id===r.bot.id);return t&&t.isActive!==r.bot.isActive?{...e,activeCount:Math.max(0,e.activeCount+(r.bot.isActive?1:-1)),bots:e.bots.map(e=>e.id===r.bot.id?{...e,isActive:r.bot.isActive}:e)}:e}),r},b)},"useUpdateBot",0,function(){return N("update-command",async({id:e,assertActive:t,...n},a)=>{let i=await a.request("/api/community/bots/"+e,{method:"PATCH",body:JSON.stringify(n)});a.publishProfile(x(i.bot));let s=o.communityKeys.bots();return a.resources.find(e=>a.client.getQueryCache().find({queryKey:s,exact:!0})===e)&&a.client.setQueryData(s,t=>t?{...t,bots:t.bots.map(t=>t.id===e&&t.runtimeConfigRevision<=i.bot.runtimeConfigRevision?{...t,runtime:i.bot.runtime,modelName:i.bot.modelName,reasoningEffort:i.bot.reasoningEffort,runtimeConfigRevision:i.bot.runtimeConfigRevision}:t)}:t),i},b)},"useUploadBotAvatar",0,function(){return N("avatar-command",async({botId:e,file:t},n)=>{let a=new FormData;a.append("file",t);let i=await n.request("/api/community/bots/"+e+"/avatar",{method:"POST",body:a});return n.publishProfile({id:e,avatar:{avatar:i.url,avatarVersion:i.avatarVersion}}),i},y)}])},617527,e=>{"use strict";var t=e.i(693760),n=e.i(159514),a=e.i(557922);e.i(954194);var i=e.i(846367),s=e.i(323512),r=e.i(849050),o=e.i(374402);let l=Object.freeze([]),d=e=>(0,r.apiFetch)("/api/community/machines",(0,s.communityRequestOptions)(e.client,e.signal));e.s(["machinesQueryFn",0,d,"replaceMachines",0,function(e,t){return{...e,machines:t,...e.machineCapacity?{machineCapacity:{...e.machineCapacity,ownedCount:t.length,onlineCount:t.filter(e=>(0,i.isPresenceOnline)(e.status)).length}}:{}}},"useMachines",0,function(e){let i=(0,n.useQueryClient)(),s=(0,a.useQuery)({queryKey:o.communityKeys.machines(),queryFn:d,...e}),r=s.data?.machines??l;return(0,t.deriveView)(r,[(0,t.valueEvidence)(i,s.data)]),{...s,machines:r}}])},902429,e=>{"use strict";var t=e.i(382416);e.s(["useNativeMutationFacade",0,function(e,n,a){let i=(0,t.useCallback)((e,t)=>t&&{onSuccess:(n,i,s,r)=>{try{a(i)}catch{return}t.onSuccess?.(n,e,s,r)},onError:(n,i,s,r)=>{try{a(i)}catch{return}t.onError?.(n,e,s,r)},onSettled:(n,i,s,r,o)=>{try{a(s)}catch{return}t.onSettled?.(n,i,e,r,o)}},[a]),s=e.mutate,r=e.mutateAsync,o=(0,t.useCallback)((e,t)=>s(n(e),i(e,t)),[s,n,i]),l=(0,t.useCallback)((e,t)=>r(n(e),i(e,t)),[r,n,i]);return{...e,mutate:o,mutateAsync:l}}])},366020,e=>{"use strict";var t=e.i(152961),n=e.i(474707),a=e.i(205189);function i(e,t){if(!e.lifecycle.get().active)throw new DOMException("Retired onboarding owner","AbortError");return e.ui.setState(e=>({...e,onboardingState:t})),t}function s(e){return e.ui.get().onboardingState}e.s(["advanceCommunityOnboarding",0,function(e,t,n,r={}){let o=s(e);if(o?.status!=="active"||o.stage!==t)return o;let l={...o,...r,status:"active",stage:n};return i(e,l),(0,a.trackCommunityOnboardingStageCompleted)(t),l},"completeCommunityOnboarding",0,function(e){let t=s(e);return t?.status!=="active"||"initializing"!==t.stage?t:(i(e,null),(0,a.trackCommunityOnboardingStageCompleted)("initializing"),(0,a.trackCommunityOnboardingCompleted)(),null)},"isCommunityOnboardingStage",0,function(e,t){let n=s(e);return n?.status==="active"&&n.stage===t},"readCommunityOnboardingState",0,s,"recoverCommunityOnboardingHarness",0,function(e){let t=s(e);if(t?.status!=="active"||"machine"!==t.stage)return t;let{harness:n,machineId:a,...r}=t;return i(e,{...r,stage:"harness"})},"recoverCommunityOnboardingMachine",0,function(e){let t=s(e);return t?.status!=="active"||"bot"!==t.stage?t:i(e,{...t,machineRecovery:!0})},"skipCommunityOnboarding",0,function(e){let t=s(e);if(!t)return null;let n=t.stage;return i(e,null),(0,a.trackCommunityOnboardingSkipped)(n),null},"startCommunityOnboarding",0,function(e,t={}){let n=s(e);if(n)return n;let r={...t,status:"active",stage:"harness"};return i(e,r),(0,a.trackCommunityOnboardingStarted)(),r},"updateCommunityOnboardingInitialization",0,function(e,t){let n=s(e);if(n?.stage!=="initializing")throw new DOMException("Retired onboarding initialization","AbortError");return i(e,{...n,initialization:t(n.initialization??{checkpoint:{},step:"creating-bots",result:null,pendingDestination:null})})},"updateCommunityOnboardingResources",0,function(e,t){let n=s(e);return n?.status!=="active"?n:i(e,{...n,...t})},"useCommunityOnboarding",0,function(){return(0,t.useSelector)((0,n.useCommunityRuntime)().ui,e=>e.onboardingState)}])},183866,e=>{"use strict";let t={cli_invocation:"alook command",tool_call:"tool",thinking:"Updated its reasoning",turn_interrupt:"Stop accepted by daemon",wake_trigger:"Woke for a new message",session_reset:"Session reset requested",nap:"Started a fresh session",model_changed:"Model changed",provider_changed:"Provider changed",error:"Encountered an error"},n={send:"message send",read:"channel history",resolve:"channel history",reactAdd:"message emoji",messagePropertySet:"message property set",messagePropertyList:"message property list",messagePropertyRemove:"message property remove",markSet:"message mark set",markRemove:"message mark remove",markList:"message mark list",channelMember:"channel member",attachmentUpload:"message attachment upload",attachmentDownload:"message attachment download",listMembers:"server member",listChannels:"channel list",listFriends:"friend list",friendRequest:"friend request",inboxPull:"inbox pull",inboxSnapshot:"inbox pull",profileBioUpdate:"setting profile",profileAvatarUpdate:"setting profile",nap:"nap"};function a(e){let t=e&&"object"==typeof e&&"subcommand"in e&&"string"==typeof e.subcommand?e.subcommand:null;if(!t)return"alook command";let a=n[t]??t.replace(/([a-z\d])([A-Z])/g,"$1 $2").toLowerCase(),i=e&&"object"==typeof e&&"propertyType"in e&&("emoji"===e.propertyType||"tag"===e.propertyType||"mark"===e.propertyType)&&("messagePropertySet"===t||"messagePropertyRemove"===t)?e.propertyType:null;return`alook ${a}${i?` ${i}`:""}`}function i(e){return(e&&"object"==typeof e&&"name"in e&&"string"==typeof e.name?e.name.trim().toLowerCase():"")||"tool"}e.s(["formatAlookAuditCommand",0,a,"formatAuditPreviewTime",0,function(e){return new Date(e).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})},"formatAuditToolName",0,i,"summarizeAuditEvent",0,function(e){return"cli_invocation"===e.kind?a(e.payload):"tool_call"===e.kind?i(e.payload):t[e.kind]}])}]);