taskuary 0.3.4.2__tar.gz → 0.3.4.3__tar.gz

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 (401) hide show
  1. {taskuary-0.3.4.2/taskuary.egg-info → taskuary-0.3.4.3}/PKG-INFO +3 -3
  2. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/README.md +2 -2
  3. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/pyproject.toml +1 -1
  4. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/funnel.py +39 -2
  5. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/remote_assistant.py +56 -3
  6. taskuary-0.3.4.2/taskuary/web/assets/GeneralWorkspace-ByR6SrWm.js → taskuary-0.3.4.3/taskuary/web/assets/GeneralWorkspace-DsJJETRW.js +1 -1
  7. taskuary-0.3.4.2/taskuary/web/assets/HubView-Cg1MGv3V.js → taskuary-0.3.4.3/taskuary/web/assets/HubView-DJ7JWin2.js +1 -1
  8. taskuary-0.3.4.2/taskuary/web/assets/StudioScene-DcSntQzU.js → taskuary-0.3.4.3/taskuary/web/assets/StudioScene-C9afZdgy.js +1 -1
  9. taskuary-0.3.4.2/taskuary/web/assets/index-BvGrOZeZ.js → taskuary-0.3.4.3/taskuary/web/assets/index-tOOOCTXp.js +6 -6
  10. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/web/index.html +1 -1
  11. {taskuary-0.3.4.2 → taskuary-0.3.4.3/taskuary.egg-info}/PKG-INFO +3 -3
  12. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary.egg-info/SOURCES.txt +4 -4
  13. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_funnel.py +23 -0
  14. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_remote_assistant.py +31 -1
  15. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/LICENSE +0 -0
  16. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/setup.cfg +0 -0
  17. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/__init__.py +0 -0
  18. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/agents.py +0 -0
  19. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/aidefaults.py +0 -0
  20. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/aisetup.py +0 -0
  21. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/artifacts.py +0 -0
  22. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/assistant.py +0 -0
  23. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/aws.py +0 -0
  24. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/azure.py +0 -0
  25. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/blackboard.py +0 -0
  26. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/brief.py +0 -0
  27. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/browserview.py +0 -0
  28. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/calendar.py +0 -0
  29. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/categories.py +0 -0
  30. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/chains.py +0 -0
  31. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/channels.py +0 -0
  32. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/ci.py +0 -0
  33. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/cli.py +0 -0
  34. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/cliinstall.py +0 -0
  35. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/climodels.py +0 -0
  36. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/clis.py +0 -0
  37. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/clisetup.py +0 -0
  38. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/coder.py +0 -0
  39. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/compose.py +0 -0
  40. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/concierge.py +0 -0
  41. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/config.py +0 -0
  42. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/context.py +0 -0
  43. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/counsel.py +0 -0
  44. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/db.py +0 -0
  45. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/demo.py +0 -0
  46. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/deps.py +0 -0
  47. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/desktop.py +0 -0
  48. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/devtools.py +0 -0
  49. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/digest.py +0 -0
  50. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/docsync.py +0 -0
  51. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/evalset.py +0 -0
  52. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/evening.py +0 -0
  53. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/files.py +0 -0
  54. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/funnel_presentation.py +0 -0
  55. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/funnel_selection.py +0 -0
  56. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/general.py +0 -0
  57. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/github.py +0 -0
  58. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/guard.py +0 -0
  59. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/handbook.py +0 -0
  60. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/handraise.py +0 -0
  61. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/histgen.py +0 -0
  62. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/hooks.py +0 -0
  63. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/hub.py +0 -0
  64. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/imapmail.py +0 -0
  65. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/imessage.py +0 -0
  66. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/ingest.py +0 -0
  67. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/intacct.py +0 -0
  68. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/interview.py +0 -0
  69. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/invoice_workflow.py +0 -0
  70. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/knowledge.py +0 -0
  71. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/learn.py +0 -0
  72. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/learnedgraph.py +0 -0
  73. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/live.py +0 -0
  74. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/llm.py +0 -0
  75. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/logs.py +0 -0
  76. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/markets.py +0 -0
  77. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/mcp.py +0 -0
  78. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/messengers.py +0 -0
  79. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/msauth.py +0 -0
  80. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/mssql.py +0 -0
  81. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/operations.py +0 -0
  82. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/outbound.py +0 -0
  83. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/outbox.py +0 -0
  84. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/ownwork.py +0 -0
  85. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/phone.py +0 -0
  86. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/playbooks.py +0 -0
  87. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/pm.py +0 -0
  88. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/policy.py +0 -0
  89. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/problems.py +0 -0
  90. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing.py +0 -0
  91. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_all.py +0 -0
  92. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_inventory.py +0 -0
  93. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_membership.py +0 -0
  94. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_navigation.py +0 -0
  95. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_order.py +0 -0
  96. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_projection.py +0 -0
  97. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_reads.py +0 -0
  98. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_startup.py +0 -0
  99. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/processing_unread.py +0 -0
  100. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/projects.py +0 -0
  101. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/promptmap.py +0 -0
  102. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/proof.py +0 -0
  103. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/proposals.py +0 -0
  104. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/quickbooks.py +0 -0
  105. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/rank.py +0 -0
  106. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/reports.py +0 -0
  107. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/research.py +0 -0
  108. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/reshape.py +0 -0
  109. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/responder.py +0 -0
  110. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/retention.py +0 -0
  111. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/robinhood.py +0 -0
  112. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/routing.py +0 -0
  113. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/scopes.py +0 -0
  114. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/selfclose.py +0 -0
  115. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/semantic.py +0 -0
  116. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/senders.py +0 -0
  117. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/server.py +0 -0
  118. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/session_artifacts.py +0 -0
  119. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/setup.py +0 -0
  120. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/sharepoint.py +0 -0
  121. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/sheets.py +0 -0
  122. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/simplefin.py +0 -0
  123. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/skills/soul-interview/SKILL.md +0 -0
  124. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/skills/taskuary-setup/SKILL.md +0 -0
  125. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/spawn.py +0 -0
  126. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/store.py +0 -0
  127. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/teller.py +0 -0
  128. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/agent.md +0 -0
  129. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/analyst.md +0 -0
  130. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/coder.md +0 -0
  131. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/coordinator.md +0 -0
  132. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/counsel.md +0 -0
  133. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/digest.md +0 -0
  134. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/history/counsel-0.3.3.5.md +0 -0
  135. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/how-it-works.md +0 -0
  136. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/learned.md +0 -0
  137. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/marketer.md +0 -0
  138. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/playbook.md +0 -0
  139. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/researcher.md +0 -0
  140. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/soul.md +0 -0
  141. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/style.md +0 -0
  142. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/trader.md +0 -0
  143. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/templates/triage.md +0 -0
  144. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/terminal.py +0 -0
  145. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/testing.py +0 -0
  146. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/toil.py +0 -0
  147. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/toolcatalog.py +0 -0
  148. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/triage.py +0 -0
  149. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/update.py +0 -0
  150. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/verdicts.py +0 -0
  151. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/voice.py +0 -0
  152. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/wabridge.py +0 -0
  153. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/waitroom.py +0 -0
  154. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/web/assets/GeneralWorkspace-D6r5JDIs.css +0 -0
  155. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/web/assets/index-CUX94PZu.css +0 -0
  156. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/web/favicon.ico +0 -0
  157. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/web/favicon.png +0 -0
  158. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/webguard.py +0 -0
  159. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whatsapp/bridge.mjs +0 -0
  160. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whatsapp/package.json +0 -0
  161. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whatsapp/policy.mjs +0 -0
  162. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whatsapp/policy.test.mjs +0 -0
  163. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whatsapp/roster.mjs +0 -0
  164. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whatsapp/roster.test.mjs +0 -0
  165. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/whoami.py +0 -0
  166. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/witness.py +0 -0
  167. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/workerstate.py +0 -0
  168. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/workflows.py +0 -0
  169. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary/zoho.py +0 -0
  170. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary.egg-info/dependency_links.txt +0 -0
  171. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary.egg-info/entry_points.txt +0 -0
  172. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary.egg-info/requires.txt +0 -0
  173. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/taskuary.egg-info/top_level.txt +0 -0
  174. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_agent_answer_route.py +0 -0
  175. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_agent_environment.py +0 -0
  176. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_agent_identity.py +0 -0
  177. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_agent_profiles.py +0 -0
  178. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_agent_source.py +0 -0
  179. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_agent_wall.py +0 -0
  180. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_ai_defaults.py +0 -0
  181. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_aisetup.py +0 -0
  182. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_answered_yourself.py +0 -0
  183. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_answers.py +0 -0
  184. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_api.py +0 -0
  185. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_api_worker_signals.py +0 -0
  186. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_app_uptime.py +0 -0
  187. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_approval_interrupt.py +0 -0
  188. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant.py +0 -0
  189. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant_can_look_things_up.py +0 -0
  190. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant_notifications.py +0 -0
  191. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant_opens.py +0 -0
  192. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant_presentation.py +0 -0
  193. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant_reactions.py +0 -0
  194. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_assistant_verdicts.py +0 -0
  195. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_async_triage.py +0 -0
  196. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_audit_chain.py +0 -0
  197. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_audit_fixes.py +0 -0
  198. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_auto_start.py +0 -0
  199. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_aws_region.py +0 -0
  200. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_blackboard.py +0 -0
  201. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_browser_session.py +0 -0
  202. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_browserview.py +0 -0
  203. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_calendar.py +0 -0
  204. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_calendar_today.py +0 -0
  205. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_categories.py +0 -0
  206. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cc.py +0 -0
  207. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cc_triage.py +0 -0
  208. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_doors.py +0 -0
  209. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_freshness.py +0 -0
  210. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_is_not_one_task.py +0 -0
  211. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_proposals.py +0 -0
  212. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_queue.py +0 -0
  213. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_relationship.py +0 -0
  214. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_retention.py +0 -0
  215. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_chat_setup.py +0 -0
  216. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_clean_context.py +0 -0
  217. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cli_install.py +0 -0
  218. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cli_setup.py +0 -0
  219. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_climodels.py +0 -0
  220. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_clis.py +0 -0
  221. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cloud.py +0 -0
  222. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cloud_sources.py +0 -0
  223. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_completion_freshness.py +0 -0
  224. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_compose.py +0 -0
  225. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_compose_sources.py +0 -0
  226. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_compose_workflows.py +0 -0
  227. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_concierge.py +0 -0
  228. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_concierge_counsel.py +0 -0
  229. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_config.py +0 -0
  230. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_context.py +0 -0
  231. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_context_refresh_freshness.py +0 -0
  232. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_coordination.py +0 -0
  233. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_core.py +0 -0
  234. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_counsel.py +0 -0
  235. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_counsel_consumers.py +0 -0
  236. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_counsel_migration.py +0 -0
  237. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_counsel_sections.py +0 -0
  238. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_current_restore.py +0 -0
  239. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_cwlogs_paging.py +0 -0
  240. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_demo.py +0 -0
  241. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_deps.py +0 -0
  242. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_desktop.py +0 -0
  243. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_devtools.py +0 -0
  244. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_diff_review.py +0 -0
  245. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_digest_brief.py +0 -0
  246. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_dispatch_retries.py +0 -0
  247. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_docs_and_llm.py +0 -0
  248. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_docs_flow.py +0 -0
  249. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_duplicate_connectors.py +0 -0
  250. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_email_chains.py +0 -0
  251. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_email_identity_routing.py +0 -0
  252. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_evening_brief.py +0 -0
  253. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_explicit_completion.py +0 -0
  254. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_factory.py +0 -0
  255. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_feed_working.py +0 -0
  256. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_files.py +0 -0
  257. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_final_answer_capture.py +0 -0
  258. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_finished_chat_stays_finished.py +0 -0
  259. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_floating_assistant.py +0 -0
  260. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_follow_up_verdict.py +0 -0
  261. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_fresh_evaluation.py +0 -0
  262. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_freshness.py +0 -0
  263. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_freshness_walk.py +0 -0
  264. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_general.py +0 -0
  265. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_github_auto.py +0 -0
  266. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_github_images.py +0 -0
  267. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_guard.py +0 -0
  268. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_handbook.py +0 -0
  269. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_handbook_topics.py +0 -0
  270. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_handoff_channels.py +0 -0
  271. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_handraise.py +0 -0
  272. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_harvest.py +0 -0
  273. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_histgen.py +0 -0
  274. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_home_is_never_yours.py +0 -0
  275. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_hooks_version.py +0 -0
  276. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_ideas_triage.py +0 -0
  277. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_ignore_sender.py +0 -0
  278. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_imap_catchup.py +0 -0
  279. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_imap_history.py +0 -0
  280. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_imapmail.py +0 -0
  281. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_imessage.py +0 -0
  282. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_intacct.py +0 -0
  283. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_interrupted_work.py +0 -0
  284. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_invoice_workflow.py +0 -0
  285. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_kind_dispatch.py +0 -0
  286. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_knowledge.py +0 -0
  287. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_learnedgraph.py +0 -0
  288. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_lifecycle.py +0 -0
  289. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_live.py +0 -0
  290. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_local_file.py +0 -0
  291. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_mail_catchup.py +0 -0
  292. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_mail_folders.py +0 -0
  293. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_mark_read.py +0 -0
  294. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_markets.py +0 -0
  295. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_mcp.py +0 -0
  296. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_meeting_prep.py +0 -0
  297. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_message_thread.py +0 -0
  298. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_messengers.py +0 -0
  299. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_msauth.py +0 -0
  300. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_mssql.py +0 -0
  301. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_muse.py +0 -0
  302. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_noop_ending.py +0 -0
  303. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_not_coding.py +0 -0
  304. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_note_retrieval.py +0 -0
  305. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_operations.py +0 -0
  306. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_outbound_reports.py +0 -0
  307. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_outbox.py +0 -0
  308. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_own_rows_no_reply.py +0 -0
  309. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_peer_updates.py +0 -0
  310. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_playbooks.py +0 -0
  311. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_pm.py +0 -0
  312. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_poll_lanes.py +0 -0
  313. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_poll_overlap.py +0 -0
  314. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_poll_parallel.py +0 -0
  315. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_poll_sources.py +0 -0
  316. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_pr_comments.py +0 -0
  317. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_problems.py +0 -0
  318. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_problems_dismiss.py +0 -0
  319. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_procedure_selection.py +0 -0
  320. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_processing_demo_replay.py +0 -0
  321. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_processing_ledger.py +0 -0
  322. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_projects.py +0 -0
  323. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_promptmap_and_catalog.py +0 -0
  324. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_proof_ci_proposals.py +0 -0
  325. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_pypi_downloads.py +0 -0
  326. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_quickbooks.py +0 -0
  327. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_rank.py +0 -0
  328. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_rate_limit.py +0 -0
  329. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reclassify.py +0 -0
  330. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reply_always_drafts.py +0 -0
  331. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reply_channels.py +0 -0
  332. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reply_envelope.py +0 -0
  333. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reply_sources.py +0 -0
  334. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reply_voice.py +0 -0
  335. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_repo_choice_triage.py +0 -0
  336. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_report_alerts.py +0 -0
  337. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_report_order_and_research.py +0 -0
  338. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_report_prompt_isolation.py +0 -0
  339. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_report_refusal.py +0 -0
  340. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_report_triage.py +0 -0
  341. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_research.py +0 -0
  342. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_reviews.py +0 -0
  343. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_robinhood.py +0 -0
  344. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_scopes.py +0 -0
  345. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_seed_fits_a_tty.py +0 -0
  346. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_seeded_reports.py +0 -0
  347. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_selector_vocabulary.py +0 -0
  348. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_semantic.py +0 -0
  349. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_send_outcomes.py +0 -0
  350. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_send_targets.py +0 -0
  351. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_sender_trust.py +0 -0
  352. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_session_artifacts.py +0 -0
  353. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_setup.py +0 -0
  354. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_setup_skill.py +0 -0
  355. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_sheets_sharepoint.py +0 -0
  356. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_simplefin.py +0 -0
  357. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_someone_else_replied.py +0 -0
  358. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_soul_interview.py +0 -0
  359. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_startup_contract.py +0 -0
  360. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_stay_open.py +0 -0
  361. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_stay_open_doors.py +0 -0
  362. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_store_app_cli.py +0 -0
  363. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_store_hotpaths.py +0 -0
  364. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_sync_clock.py +0 -0
  365. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_task_ask.py +0 -0
  366. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_task_checklist.py +0 -0
  367. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_task_controls_operations.py +0 -0
  368. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_task_identity.py +0 -0
  369. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_teller.py +0 -0
  370. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_terminal.py +0 -0
  371. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_toil.py +0 -0
  372. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_triage_dataset.py +0 -0
  373. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_triage_errors.py +0 -0
  374. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_triage_images.py +0 -0
  375. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_update.py +0 -0
  376. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_update_refused.py +0 -0
  377. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_urgent_and_handoff.py +0 -0
  378. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_verdict_paths.py +0 -0
  379. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_verdict_sticks.py +0 -0
  380. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_vision.py +0 -0
  381. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_voice.py +0 -0
  382. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_wabridge.py +0 -0
  383. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_waitroom.py +0 -0
  384. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_walk_order.py +0 -0
  385. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_watermark.py +0 -0
  386. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_web_entrypoint.py +0 -0
  387. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_webguard.py +0 -0
  388. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_whatsapp_documents.py +0 -0
  389. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_whatsapp_images.py +0 -0
  390. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_whoami.py +0 -0
  391. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_withdrawn.py +0 -0
  392. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_witness.py +0 -0
  393. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_worker_brief.py +0 -0
  394. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_worker_events.py +0 -0
  395. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_worker_scenarios.py +0 -0
  396. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_worker_surfaces.py +0 -0
  397. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_workflows.py +0 -0
  398. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_zz_chipverbs.py +0 -0
  399. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_zz_lastword.py +0 -0
  400. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_zz_setupchat.py +0 -0
  401. {taskuary-0.3.4.2 → taskuary-0.3.4.3}/tests/test_zz_toolcatalog.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: taskuary
3
- Version: 0.3.4.2
3
+ Version: 0.3.4.3
4
4
  Summary: Automate your job - the local-first operating system for your work: AI triage in, coding agents out.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/ldbumble/taskuary
@@ -66,7 +66,7 @@ Dynamic: license-file
66
66
  # Taskuary
67
67
 
68
68
  [![CI](https://github.com/ldbumble/taskuary/actions/workflows/ci.yml/badge.svg)](https://github.com/ldbumble/taskuary/actions/workflows/ci.yml)
69
- [![PyPI](https://img.shields.io/pypi/v/taskuary.svg?cacheSeconds=300&release=0.3.4.2&asof=2026-09-10)](https://pypi.org/project/taskuary/)
69
+ [![PyPI](https://img.shields.io/pypi/v/taskuary.svg?cacheSeconds=300&release=0.3.4.3&asof=2026-09-10)](https://pypi.org/project/taskuary/)
70
70
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776ab.svg)](https://github.com/ldbumble/taskuary)
71
71
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
72
72
 
@@ -77,7 +77,7 @@ your agents, and brings decisions back to you. Nothing sends or ships without yo
77
77
 
78
78
  ![The Taskuary Studio assembling as work arrives and AI agents take their seats.](https://raw.githubusercontent.com/ldbumble/taskuary/master/docs/hero.gif?v=workspace)
79
79
 
80
- Taskuary is early—currently **v0.3.4.2**—so breaking changes are still possible before 1.0.
80
+ Taskuary is early—currently **v0.3.4.3**—so breaking changes are still possible before 1.0.
81
81
 
82
82
  <p align="center">
83
83
  <a href="https://taskuary.com/demo/"><img
@@ -1,7 +1,7 @@
1
1
  # Taskuary
2
2
 
3
3
  [![CI](https://github.com/ldbumble/taskuary/actions/workflows/ci.yml/badge.svg)](https://github.com/ldbumble/taskuary/actions/workflows/ci.yml)
4
- [![PyPI](https://img.shields.io/pypi/v/taskuary.svg?cacheSeconds=300&release=0.3.4.2&asof=2026-09-10)](https://pypi.org/project/taskuary/)
4
+ [![PyPI](https://img.shields.io/pypi/v/taskuary.svg?cacheSeconds=300&release=0.3.4.3&asof=2026-09-10)](https://pypi.org/project/taskuary/)
5
5
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776ab.svg)](https://github.com/ldbumble/taskuary)
6
6
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
7
 
@@ -12,7 +12,7 @@ your agents, and brings decisions back to you. Nothing sends or ships without yo
12
12
 
13
13
  ![The Taskuary Studio assembling as work arrives and AI agents take their seats.](https://raw.githubusercontent.com/ldbumble/taskuary/master/docs/hero.gif?v=workspace)
14
14
 
15
- Taskuary is early—currently **v0.3.4.2**—so breaking changes are still possible before 1.0.
15
+ Taskuary is early—currently **v0.3.4.3**—so breaking changes are still possible before 1.0.
16
16
 
17
17
  <p align="center">
18
18
  <a href="https://taskuary.com/demo/"><img
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "taskuary"
7
- version = "0.3.4.2"
7
+ version = "0.3.4.3"
8
8
  description = "Automate your job - the local-first operating system for your work: AI triage in, coding agents out."
9
9
  readme = "README.md"
10
10
  license = { text = "MIT" }
@@ -22,6 +22,24 @@ LANES = ('blocked', 'time', 'approve', 'asked', 'queued', 'broken', 'forgotten',
22
22
  LANE_WORDS = {'blocked': ('agent waiting', 'you'), 'broken': ('a check failed', 'bad'), 'time': ('coming up', 'working'), 'approve': ('needs your yes', 'you'),
23
23
  'asked': ('asked you', 'working'), 'queued': ('waiting to start', 'working'), 'forgotten': ('slipped', 'info'), 'report': ('landed', 'info'), 'fyi': ('fyi', None),
24
24
  'working': ('agent working', 'working')} # visible in band 5 until the agent stops or asks
25
+ # A chat cannot draw an icon, so it wears the emoji the desktop already uses - these ARE the marks in
26
+ # website/src/funnelPile.js (LANE_META/KIND_META), and the two tables must stay in step. A few KINDS
27
+ # outrank their lane: an agent's own finish and a report you set up share the 'report' lane.
28
+ LANE_MARKS = {'blocked': '👋', 'time': '⏱', 'approve': '✉️', 'broken': '🛠', 'asked': '🙋', 'queued': '⏳',
29
+ 'forgotten': '🧵', 'report': '📄', 'fyi': '👀', 'working': '⚙️'}
30
+ KIND_MARKS = {'agentdone': '✅', 'wrapup': '🗂'}
31
+ # ...and where it came from. The desktop paints a brand logo here; a chat gets one emoji per source,
32
+ # and a source we have no mark for gets NONE - an invented glyph says something untrue about it.
33
+ CHANNEL_MARKS = {'email': '📧', 'teams': '👥', 'slack': '💬', 'telegram': '✈️', 'whatsapp': '📱', 'imessage': '📱',
34
+ 'discord': '🎮', 'github': '🐙', 'gitlab': '🦊', 'jira': '🐞', 'sentry': '🚨', 'pagerduty': '📟',
35
+ 'report': '📄', 'own': '📝', 'assistant': '✨', 'ai': '✨', 'idea': '💡', 'meeting': '📅',
36
+ 'promise': '🤝', 'followup': '📨', 'prep': '📅', 'cold': '🥶'}
37
+
38
+
39
+ def mark_for(item: dict) -> str:
40
+ """The one emoji that identifies a row: its kind's when that says more than its lane's."""
41
+ if not item: return ''
42
+ return KIND_MARKS.get(str(item.get('kind') or '')) or LANE_MARKS.get(str(item.get('lane') or ''), '')
25
43
  SOON_MIN, ALERT_MIN, STARTED_MIN = 120, 15, 5 # calendar visibility window; attention boundary; grace after the start
26
44
  SETUP_GRACE_MIN = 15 # a walk-through the owner is still in does not raise its own hand
27
45
  LATER_HOURS = 3 # "not now" - it comes back this much later
@@ -892,15 +910,34 @@ def notify(store, e: dict, by: str = 'assistant'):
892
910
  store.set_funnel_state(f"notice:{e['tid']}", 'notice', by, None, json.dumps({k: v for k, v in e.items() if k != 'card'}))
893
911
 
894
912
 
913
+ def worked_now(store) -> set:
914
+ """The tasks an agent is on RIGHT NOW - a live session or a running run."""
915
+ from . import terminal as term
916
+ try: live = {t.get('taskId') for t in term.live_sessions(tail=0, details=False)}
917
+ except Exception: live = set()
918
+ return {t for t in live if t} | {r['TaskId'] for r in store.running_runs() if r.get('TaskId')}
919
+
920
+
895
921
  def notices(store, states: dict = None) -> list:
896
- """The strip's own notices: the watcher's events, in the shape of an alert, until Open or Later."""
922
+ """The strip's own notices: the watcher's events, in the shape of an alert, until Open or Later.
923
+
924
+ A `working` notice is a CLAIM about live state, so it is checked against live state when it is
925
+ read. The transition that would retire it (working -> done) is seen only by the in-memory watcher,
926
+ and a restart makes its first look remember instead of announce - so the row outlived its agent by
927
+ days and every fresh phone walk re-told it (the owner, 2026-09-10: "there are no agents open??").
928
+ A `done` notice is history and stands until the owner puts it down.
929
+ """
897
930
  states = states if states is not None else store.funnel_states()
898
- out = []
931
+ out, worked = [], None
899
932
  for k, st in states.items():
900
933
  if not k.startswith('notice:') or st.get('Status') != 'notice' or not st.get('Note'): continue
901
934
  try: e = json.loads(st['Note'])
902
935
  except ValueError: continue
903
936
  working = e.get('kind') == 'working'
937
+ if working:
938
+ if worked is None: worked = worked_now(store)
939
+ if e.get('tid') not in worked or (store.get_task(e.get('tid')) or {}).get('Status') in ('done', 'dropped'):
940
+ store.clear_funnel_state(k); continue
904
941
  out.append({'key': k, 'item': f"{'agent' if working else 'task'}:{e.get('tid')}", 'kind': e.get('kind'), 'lane': 'working' if working else 'report',
905
942
  'text': e.get('text') or '', 'notice': True, 'order_band': 3, 'at': st.get('At'), 'tid': e.get('tid'), 'ref': e.get('ref')})
906
943
  return sorted(out, key=lambda a: str(a.get('at') or ''))
@@ -186,7 +186,8 @@ def push_alerts(store, force: bool = False) -> int:
186
186
  fresh = [a for a in (p.get('alerts') or [])
187
187
  if a.get('key') not in told and a.get('item') != on_the_table][:3]
188
188
  if not fresh: return 0
189
- named = [f"{a['text']}{' (' + refs[a['item']] + ')' if refs.get(a['item']) and refs[a['item']] not in a['text'] else ''}"
189
+ named = [' '.join(x for x in (funnel.mark_for(a), f"{a['text']}"
190
+ f"{' (' + refs[a['item']] + ')' if refs.get(a['item']) and refs[a['item']] not in a['text'] else ''}") if x)
190
191
  for a in fresh]
191
192
  lead = 'By the way — ' # the same words the desktop strip uses, in the place he is reading
192
193
  say = lead + named[0] + '.' if len(named) == 1 else lead.rstrip() + '\n' + '\n'.join('· ' + n for n in named)
@@ -244,6 +245,7 @@ def respond(store, channel: str, chat: str, question: str, connector_id: int):
244
245
  # the item on the table is the walk's own, persisted and validated here - a phone has no
245
246
  # client state to send, and the key is all say() needs to build the item afresh
246
247
  item = concierge.restore_current(store, tid)
248
+ question = resolve_index(store, channel, chat, question) # "2" is the words we numbered
247
249
  out = concierge.say(store, question, key=concierge.current_key(store, tid) or None, actor='owner')
248
250
  text = carry_out(store, out, item)
249
251
  send(store, channel, chat, text, connector_id)
@@ -301,11 +303,59 @@ def choices(out: dict) -> list:
301
303
  return [str(o) for o in (out.get('options') or [])] or [c['label'] for c in (out.get('chips') or [])]
302
304
 
303
305
 
306
+ def source_line(item: dict | None) -> str:
307
+ """Where it came from, on its own line - the chat's version of the sender and channel icon the
308
+ desktop draws on the row. Nothing when the item has no human source (a report, an agent's own job)."""
309
+ from . import funnel
310
+ if not item: return ''
311
+ who = ' '.join(str(item.get('who') or '').split())
312
+ ch = str(item.get('channel') or '')
313
+ bits = ' · '.join(x for x in (who, ch.replace('_', ' ')) if x)
314
+ return ' '.join(x for x in (funnel.CHANNEL_MARKS.get(ch, ''), bits) if x) if bits else ''
315
+
316
+
304
317
  def turn_text(out: dict, lead: str = '') -> str:
305
- """One turn as one message: what was said, then what can be said back."""
318
+ """One turn as one message: where it came from, what was said, then what can be said back.
319
+
320
+ The options used to ride one line joined by dots, which read as a single run-on sentence on a
321
+ phone (the owner, 2026-09-10: "reply with should make it more clear they are separate"). Each owns
322
+ a line now, and carries the number that answers it - see resolve_index for why that number works.
323
+ """
324
+ from . import funnel
325
+ item = out.get('item') or {}
306
326
  say = _TASK_LINK.sub(r'\1', str(out.get('say') or '')).strip()
327
+ mark = funnel.mark_for(item)
328
+ if say and mark: say = f'{mark} {say}'
329
+ head = '\n'.join(x for x in (source_line(item), say) if x)
307
330
  words = choices(out)
308
- return '\n\n'.join(x for x in (lead.strip(), say, ('Reply with: ' + ' · '.join(words)) if words else '') if x)
331
+ opts = 'Reply with one of:\n' + '\n'.join(f'{i} · {w}' for i, w in enumerate(words, 1)) if words else ''
332
+ return '\n\n'.join(x for x in (lead.strip(), head, opts) if x)
333
+
334
+
335
+ OFFERED_KEY = 'remote_offered'
336
+ _OFFERED = re.compile(r'^\s*(\d+) · (.+?)\s*$', re.M)
337
+
338
+
339
+ def remember_offered(store, channel: str, chat: str, text: str) -> list:
340
+ """The options this message just numbered, kept against the chat that was sent them."""
341
+ words = [m.group(2) for m in _OFFERED.finditer(str(text or ''))]
342
+ if words: store.set_setting(f'{OFFERED_KEY}:{channel}:{chat}', json.dumps(words), 'assistant')
343
+ return words
344
+
345
+
346
+ def resolve_index(store, channel: str, chat: str, text: str) -> str:
347
+ """"2" as an answer - because WE numbered the options a moment ago.
348
+
349
+ The code indexes the list it offered; it reads no words and knows no verbs (the intent model still
350
+ does that, on whatever this returns). Anything that is not one of the numbers we just wrote comes
351
+ back untouched, as the owner's own words.
352
+ """
353
+ t = str(text or '').strip().lstrip('#').rstrip('.').strip()
354
+ if not t.isdigit(): return text
355
+ try: words = json.loads(store.get_settings().get(f'{OFFERED_KEY}:{channel}:{chat}') or '[]')
356
+ except ValueError: words = []
357
+ i = int(t)
358
+ return words[i - 1] if 1 <= i <= len(words) else text
309
359
 
310
360
 
311
361
  def _chunks(text: str, limit=3900) -> list[str]:
@@ -324,6 +374,9 @@ def _chunks(text: str, limit=3900) -> list[str]:
324
374
  def send(store, channel: str, chat: str, text: str, connector_id: int = None):
325
375
  from . import messengers
326
376
  out = messengers.tg_send if channel == 'telegram' else messengers.wa_send
377
+ # every road to this chat passes here, so this is where what we offered is written down
378
+ try: remember_offered(store, channel, chat, text)
379
+ except Exception as e: logger.debug(f'could not keep the offered options for {channel}: {e}')
327
380
  chunks = _chunks(text)
328
381
  for i, chunk in enumerate(chunks):
329
382
  prefix = 'Taskuary:\n' if i == 0 else f'Taskuary ({i + 1}/{len(chunks)}):\n'
@@ -1,4 +1,4 @@
1
- var ru=Object.defineProperty;var Wr=t=>{throw TypeError(t)};var iu=(t,e,s)=>e in t?ru(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var g=(t,e,s)=>iu(t,typeof e!="symbol"?e+"":e,s),Kr=(t,e,s)=>e.has(t)||Wr("Cannot "+s);var Me=(t,e,s)=>(Kr(t,e,"read from private field"),s?s.call(t):e.get(t)),Ue=(t,e,s)=>e.has(t)?Wr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),Ve=(t,e,s,n)=>(Kr(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s);import{c as _t,j as h,x as Ie,r as D,y as ou,z as au,E as cu,_ as lu,H as uu,a as de,B as H,C as _n,T as Z,D as Ye,w as Et,b as Qe,F as we,m as be,P as yn,I as At,o as Po,e as Rt,d as st,g as ce,J as du,K as hu,i as bn,L as pu,N as Qr,O as fu,Q as mu,U as gu,V as _u,W as yu,f as Jr,M as as,X as bu,Y as vu,Z as xu,$ as Su,a0 as Tu,a1 as wu,q as Iu,a2 as Yr,u as Cu,l as Eu,a3 as Au,a4 as Ru,a5 as ku,a6 as Mu,a7 as Pu}from"./index-BvGrOZeZ.js";const ju=_t(h.jsx("path",{d:"M17.65 6.35c-1.63-1.63-3.94-2.57-6.48-2.31-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20c3.19 0 5.93-1.87 7.21-4.56.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53-1.13 2.43-3.84 3.97-6.8 3.31-2.22-.49-4.01-2.3-4.48-4.52C5.31 9.44 8.26 6 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71z"}),"RefreshRounded");let kt=null;function $u(t,e){t.currentIndex=0,t.wipContextDeps=null,t.wipCommitCallbacks=[];const s=kt;kt=t;try{if(e(),t.isFirstRender=!1,t.cells.length!==t.currentIndex)throw new Error(`Rendered ${t.currentIndex} hooks but expected ${t.cells.length}. Hooks must be called in the exact same order in every render.`)}finally{kt=s}}function We(){if(!kt)throw new Error("No resource fiber available");return kt}function Mt(){return kt}const Du=t=>({version:0,committedVersion:0,dispatchUpdate:t,changelog:[],committedLog:[],unsettledCount:0,rollbackCallbacks:[]}),jo=t=>{t.committedVersion=t.version;for(const e of t.changelog)e.logged=!1,e.settled||(e.settled=!0,t.unsettledCount--),t.committedLog.push(e);t.changelog.length=0,t.unsettledCount===0&&(t.committedLog.length=0),t.rollbackCallbacks.length=0},Xr=(t,e)=>{const s=t.version>e;if(t.version=e,s){for(let n=0;n<t.rollbackCallbacks.length;n++)t.rollbackCallbacks[n]();if(t.rollbackCallbacks.length=0,e<=t.committedVersion){const n=[];for(;t.committedVersion-n.length>e;){const r=t.committedLog.pop();if(r===void 0)break;Kn(r.fiber,r.cell),r.cell.workInProgress=r.prevState,n.push({record:r,prevState:r.prevState,eagerState:r.eagerState,hasEagerState:r.hasEagerState})}if(n.length>0){const r=t.committedVersion;$s(t,()=>{for(let i=n.length-1;i>=0;i--){const o=n[i];o.record.prevState=o.prevState,o.record.eagerState=o.eagerState,o.record.hasEagerState=o.hasEagerState,t.committedLog.push(o.record)}t.committedVersion=r})}t.committedVersion=e;for(const r of t.changelog)r.logged=!1;t.changelog.length=0}else{for(;t.committedVersion+t.changelog.length>e;)t.changelog.pop().logged=!1;for(let n=0;n<t.changelog.length;n++)$o(t.changelog[n]);jo(t)}}},$o=t=>{var e;Kn(t.fiber,t.cell),t.queued||(t.queued=!0,((e=t.cell).queue??(e.queue=[])).push(t))},js=(t,e)=>{t.wipCommitCallbacks.push(e)},$s=(t,e)=>{t.rollbackCallbacks.push(e)},Kn=(t,e)=>{var s;e.isDirty||(e.isDirty=!0,(s=t.markDirty)==null||s.call(t),$s(t.root,()=>{if(e.queue!==null){for(const n of e.queue)n.queued=!1;e.queue=null}e.workInProgress=e.current,e.isDirty=!1}))},Do=Symbol.for("react.memo_cache_sentinel"),No=t=>new Array(t).fill(Do),Nu=(t,e)=>{const s=t.memoCache;let n=s.workInProgress;if(n===null){const o=s.current;n=o===null?[]:o.map(a=>a.slice()),s.workInProgress=n,$s(t.root,()=>{s.workInProgress=null})}const r=s.index++;let i=n[r];return i===void 0&&(i=No(e),n[r]=i),i},Oo=t=>Nu(We(),t),Ou=Ie,Bu=t=>D.useMemo(()=>{const e=No(t);return e[Do]=!0,e},[]);var So;const Lu=((So=Ou.__COMPILER_RUNTIME)==null?void 0:So.c)??Bu,Fu=()=>Mt()!==null,R=t=>Fu()?Oo(t):Lu(t),Qn=()=>{throw new Error("Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.")},Jn=()=>{throw new Error("Hook order changed between renders")},qu=()=>({type:"effect",setup:void 0,setupDeps:void 0,cleanup:void 0,deps:null,generation:0});function Be(t,e){const s=We(),n=s.currentIndex++,r=s.cells[n],i=r===void 0?qu():r.type==="effect"?r:Jn();if(r===void 0&&(s.isFirstRender||Qn(),s.cells[n]=i,s.effectCells.push(i)),i.deps!==null&&!!e!=!!i.deps)throw new Error("useEffect called with and without dependencies across re-renders");js(s,()=>{i.setup=t,i.setupDeps=e,i.generation++})}const Ds=(t,e)=>{for(let s=0;s<t.length&&s<e.length;s++)if(!Object.is(t[s],e[s]))return!1;return!0},Zr=(t,e)=>{js(t,()=>{e.current=e.wip,e.currentDeps=e.wipDeps,e.isDirty=!1})},Ns=(t,e)=>{const s=We(),n=s.currentIndex++;let r=s.cells[n];if(r===void 0){s.isFirstRender||Qn();const a=t();return r={type:"memo",current:a,currentDeps:e,wip:a,wipDeps:e,isDirty:!1},s.cells[n]=r,a}r.type!=="memo"&&Jn();const i=r;if(Ds(i.wipDeps,e))return i.isDirty&&Zr(s,i),i.wip;const o=t();return i.wip=o,i.wipDeps=e,i.isDirty||(i.isDirty=!0,$s(s.root,()=>{i.wip=i.current,i.wipDeps=i.currentDeps,i.isDirty=!1})),Zr(s,i),o};function Pt(t){return Ns(()=>({current:t}),[])}const Yn=Symbol("tap.Context.defaultValue"),Uu=t=>t;let Ct=new Map;const at=new Set,Bo=(t,e)=>{t[Yn]=e},Lo=t=>typeof t=="object"&&t!==null&&Yn in t,Fo=t=>typeof t=="object"&&t!==null&&"$$typeof"in t&&t.$$typeof===Symbol.for("react.context"),qo=t=>Lo(t)||Fo(t),Uo=t=>{if(!Lo(t)){if(Fo(t)){Bo(t,t._currentValue??t._currentValue2);return}throw new Error("A tap resource's `use()` only accepts a tap context.")}},Os=(t,e,s)=>{if(typeof t!="object"||t===null)throw new Error("useContextProvider only accepts a React context.");Uo(t);const n=t,r=We(),i=Pt(void 0),o=i.current===void 0||!Object.is(i.current.value,e);Be(()=>{i.current={value:e}},[e]);const a=Ct.get(n),c=a!==void 0||Ct.has(n);Ct.set(n,{value:e,source:r});try{return Vu(n,o,s)}finally{c?Ct.set(n,a):Ct.delete(n)}},Vu=(t,e,s)=>{const n=at.has(t);e?at.add(t):at.delete(t);try{return s()}finally{n?at.add(t):at.delete(t)}},Vo=t=>{Uo(t);const e=t,s=zu(e,t),n=We();return(n.wipContextDeps??(n.wipContextDeps=new Map)).set(e,s.source),s.value},zu=(t,e)=>Ct.get(t)??{value:Uu(e)[Yn],source:null},Gu=(t,e,s,n)=>{if(!n)return s;let r=s;for(const[i,o]of n)o===e||o===t||(r??(r=new Map)).set(i,o);return r},zo=(t,e=t.wipContextDeps)=>{const s=Mt();!s||!e||(s.wipContextDeps=Gu(s,t,s.wipContextDeps,e))},Go=()=>at.size>0,Xn=t=>{if(!t.contextDeps||!Go())return!1;for(const e of at.keys())if(t.contextDeps.has(e))return!0;return!1},Hu=(t,e,s)=>{if(t.isNeverMounted)throw new Error("Resource updated before mount");let n=!1,r=!0;t.root.unsettledCount++,t.root.dispatchUpdate(()=>(n||(n=!0,s&&t.root.changelog.length===0&&!e.cell.isDirty&&!e.hasEagerState&&(e.prevState=e.cell.workInProgress,e.eagerState=s(e.cell.workInProgress,e.action),e.hasEagerState=!0,r=!Object.is(e.cell.current,e.eagerState),!r&&!e.settled&&(e.settled=!0,t.root.unsettledCount--))),r),()=>(n=!0,r=!0,$o(e),e.logged||(e.logged=!0,t.root.changelog.push(e)),!0))},Wu=(t,e,s,n,r)=>{const i=n?n(s):s,o={type:"reducer",workInProgress:i,current:i,isDirty:!1,queue:null,renderQueue:null,reducer:e,dispatch:a=>{const c=Mt();if(c!==null){if(c!==t)throw new Error("Cannot update a resource while rendering a different resource.");(t.renderPendingCells??(t.renderPendingCells=new Set)).add(o),(o.renderQueue??(o.renderQueue=[])).push(a)}else{const l={fiber:t,cell:o,action:a,hasEagerState:!1,eagerState:void 0,prevState:o.current,settled:!1,queued:!1,logged:!1};Hu(t,l,r?e:void 0)}}};return o};function Ho(t,e,s,n){var l;const r=We(),i=r.currentIndex++,o=r.cells[i],a=(()=>{if(o!==void 0)return o.type==="reducer"?o:Jn();r.isFirstRender||Qn();const d=Wu(r,t,e,s,n);return r.cells[i]=d,d})(),c=a.queue;if(c!==null){const d=t===a.reducer;for(let p=0;p<c.length;p++){const u=c[p];(!u.hasEagerState||!d||!Object.is(u.prevState,a.workInProgress))&&(u.prevState=a.workInProgress,u.eagerState=t(a.workInProgress,u.action),u.hasEagerState=!0),u.queued=!1,a.workInProgress=u.eagerState}a.queue=null}if(a.reducer=t,a.renderQueue!==null){let d=a.workInProgress;for(const p of a.renderQueue)d=t(d,p);a.renderQueue=null,(l=r.renderPendingCells)==null||l.delete(a),Object.is(d,a.workInProgress)||(Kn(r,a),a.workInProgress=d)}return a.isDirty&&js(r,()=>{a.current=a.workInProgress,a.isDirty=!1}),[a.workInProgress,a.dispatch]}function Zn(t,e,s){return Ho(t,e,s,!1)}const Ku=(t,e)=>typeof e=="function"?e(t):e,Qu=t=>t===void 0?void 0:typeof t=="function"?t():t;function Wo(t){return Ho(Ku,t,Qu,!0)}const er=(t,e)=>Ns(()=>t,e);function tr(t){const e=We(),s=Pt(t);return s.current!==t&&js(e,()=>{s.current=t}),er((...n)=>s.current(...n),[])}const Ju=t=>t!==null&&typeof t=="object"&&typeof t.then=="function",ei=()=>{},Yu=t=>{const e=t;switch(typeof e.status!="string"?(e.status="pending",t.then(s=>{e.status==="pending"&&(e.status="fulfilled",e.value=s)},s=>{e.status==="pending"&&(e.status="rejected",e.reason=s)})):e.status!=="fulfilled"&&e.status!=="rejected"&&t.then(ei,ei),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw t}},sr=t=>Ju(t)?Yu(t):Vo(t),Ko=(t,e,s=e)=>{const r=We().isNeverMounted?s():e(),[,i]=Zn(c=>c+1,0),o=Pt(0),a=tr(()=>{try{if(Object.is(r,e()))return o.current=0,!1}catch{}return!0});return Be(()=>t(()=>{a()&&i()}),[t]),Be(()=>{if(a()){if(++o.current>50)throw o.current=0,new Error("Maximum update depth exceeded. The result of getSnapshot should be cached to avoid an infinite loop.");i()}},[t,r,e]),r},Qo=(t,e)=>{};let Xu=0;const Jo=()=>{const t=Pt(null);return t.current??(t.current=`:tap${Xu++}:`),t.current},Yo=(t,e,s)=>{const n=()=>{if(!t)return;const r=e();if(typeof t=="function"){const i=t(r);return typeof i=="function"?i:()=>t(null)}return t.current=r,()=>{t.current=null}};s==null?Be(n):Be(n,[...s,t])},Zu=Ie;function ed(t){const e=D.useRef(t);return D.useInsertionEffect(()=>{e.current=t}),D.useCallback((...s)=>e.current(...s),[])}const td=Zu.useEffectEvent??ed,ve=()=>Mt()!==null,re=Ie,se=t=>ve()?Wo(t):re.useState(t),sd=(t,e,s)=>ve()?Zn(t,e,s):re.useReducer(t,e,s),z=t=>ve()?Pt(t):re.useRef(t),ne=(t,e)=>ve()?Ns(t,e):re.useMemo(t,e),He=(t,e)=>ve()?er(t,e):re.useCallback(t,e),q=(t,e)=>ve()?Be(t,e):re.useEffect(t,e),ht=(t,e)=>ve()?Be(t,e):re.useLayoutEffect(t,e),Ce=t=>ve()?tr(t):td(t),yt=(t,e,s)=>ve()?Ko(t,e,s):re.useSyncExternalStore(t,e,s),nd=(t,e)=>ve()?Qo():re.useDebugValue(t,e),Xo=(t,e)=>ve()?Be(t,e):re.useInsertionEffect(t,e),Zo=()=>ve()?Jo():re.useId(),rd=(t,e,s)=>ve()?Yo(t,e,s):re.useImperativeHandle(t,e,s),ie=t=>re.forwardRef(t),pe=(t,e)=>re.memo(t,e),ea=re.Fragment,id=(...t)=>re.createElement(...t),nr=(...t)=>re.cloneElement(...t),rr=t=>re.isValidElement(t);re.Children;re.Suspense;const De=t=>{const e=re.createContext(t);return Bo(e,t),e},ta=t=>ve()&&qo(t)?sr(t):re.use(t),Re=t=>ve()&&qo(t)?sr(t):re.useContext(t);function ee(t){return(...e)=>({hook:t,args:e})}function je(t,e,s){return typeof e=="function"?(...n)=>je(t,e(...n)):s?{...e,key:t,deps:s}:{...e,key:t}}const Bs=(t,e)=>{if(t.length!==0){if(t.length===1)throw t[0];for(const s of t)console.error(s);throw new AggregateError(t,e)}};let Oe={schedulers:new Set,isScheduled:!1},Lt=null;const ti=[],od=()=>{Oe.isScheduled||(Oe.isScheduled=!0,ad())},vn=()=>{const t=Lt;Lt=new Map;const e=[];try{for(const s of Oe.schedulers)if(Oe.schedulers.delete(s),!!s.isDirty)try{s.runTask()}catch(n){e.push(n)}}finally{if(Lt=t,Oe.schedulers.clear(),Oe.isScheduled=!1,Lt===null)for(;ti.length>0;)try{ti.shift()()}catch(s){e.push(s)}}Bs(e,"Errors occurred during flushSync")},ad=(()=>{if(typeof MessageChannel<"u"){let t=null,e;return()=>{var s;if(!t){const n=new MessageChannel;n.port1.onmessage=()=>{var r;(r=t==null?void 0:t.unref)==null||r.call(t),vn()},t=n.port1,e=n.port2}(s=t.ref)==null||s.call(t),e.postMessage(null)}}return()=>setTimeout(vn,0)})(),si=t=>{if(Lt!==null)return t();const e=Oe;Oe={schedulers:new Set,isScheduled:!0};try{const s=t();return vn(),s}finally{const s=Oe.schedulers;if(Oe=e,s.size>0){for(const n of s)Oe.schedulers.add(n);od()}}};function cd(t){const e=[];for(let s=0;s<t.length;s++)try{t[s]()}catch(n){e.push(n)}Bs(e,"Errors during commit")}function ld(t){const e=t.setup,s=t.setupDeps,n=t.generation;let r;try{const i=e();if(i!==void 0&&typeof i!="function")throw new Error(`An effect function must either return a cleanup function or nothing. Received: ${typeof i}`);r=i}finally{t.generation===n?(t.cleanup=r,t.deps=s):r==null||r()}}const ud=t=>t.setup===void 0?!1:t.deps===null||t.setupDeps===void 0?!0:!Ds(t.deps,t.setupDeps);function dd(t){const e=[],s=[];for(const n of t.effectCells)ud(n)&&s.push(n);for(const n of s)if(n.deps=null,n.cleanup!==void 0)try{n.cleanup()}catch(r){e.push(r)}finally{n.cleanup=void 0}for(const n of s)try{ld(n)}catch(r){e.push(r)}Bs(e,"Errors during commit")}function hd(t){var s;const e=[];for(const n of t.effectCells)if(n.deps=null,n.cleanup)try{(s=n.cleanup)==null||s.call(n)}catch(r){e.push(r)}finally{n.cleanup=void 0}Bs(e,"Errors during cleanup")}const pd={useState:Wo,useReducer:Zn,useRef:Pt,useMemo:Ns,useCallback:er,useEffect:Be,useLayoutEffect:Be,useInsertionEffect:Be,useEffectEvent:tr,useContext:Vo,use:sr,useSyncExternalStore:Ko,useDebugValue:Qo,useId:Jo,useImperativeHandle:Yo,useMemoCache:Oo},ni=Ie,ot=ni.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE??ni.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cs=ot==null?null:"H"in ot?{get current(){return ot.H},set current(t){ot.H=t}}:"ReactCurrentDispatcher"in ot?{get current(){return ot.ReactCurrentDispatcher.current},set current(t){ot.ReactCurrentDispatcher.current=t}}:null;function fd(t){if(!cs)return t();const e=cs.current;cs.current=pd;try{return t()}finally{cs.current=e}}function md(t,e,s=void 0,n){return{hook:t,root:e,markDirty:s,devStrictMode:n,cells:[],effectCells:[],contextDeps:null,wipContextDeps:null,wipCommitCallbacks:null,memoCache:{current:null,workInProgress:null,index:0},renderPendingCells:null,currentIndex:0,isFirstRender:!0,isMounted:!1,isNeverMounted:!0}}function sa(t){t.wipCommitCallbacks=null,t.wipContextDeps=null,t.memoCache.workInProgress=null}function qt(t){t.isMounted&&(t.isMounted=!1,hd(t))}function Ut(t,e){var r;if(t.renderPendingCells!==null){for(const i of t.renderPendingCells)i.renderQueue=null;t.renderPendingCells.clear()}let s=0,n;try{do{if(++s>25)throw new Error("Too many re-renders. tap limits the number of renders to prevent an infinite loop.");t.memoCache.index=0,$u(t,()=>{n=fd(()=>t.hook(...e))})}while((((r=t.renderPendingCells)==null?void 0:r.size)??0)>0)}catch(i){throw sa(t),i}return zo(t),n}function bs(t){const e=t.wipCommitCallbacks;t.wipCommitCallbacks=null,t.isMounted=!0,t.isNeverMounted=!1,e!==null&&(t.contextDeps=t.wipContextDeps,jo(t.root),t.memoCache.workInProgress!==null&&(t.memoCache.current=t.memoCache.workInProgress,t.memoCache.workInProgress=null),cd(e)),dd(t)}const gd=()=>{const t=We();return t.devStrictMode?t.isFirstRender?"child":"root":null},_d=()=>null,yd=()=>_d,bd=()=>Mt()?gd:yd(),vd=()=>{const t=z(0),e=t.current,s=We();return{version:e,markDirty:ne(()=>()=>{var n;t.current++,(n=s.markDirty)==null||n.call(s)},[s]),root:s.root}},xd=()=>{const[t]=se(()=>Du((r,i)=>{let o=!1;n(a=>(o=!r(),o?a:a+1)),o||s(i)})),[e,s]=sd((r,i)=>(Xr(t,r),r+(i()?1:0)),0),[,n]=se(0);return Xr(t,e),{root:t,version:e,markDirty:void 0}},ir=()=>{const t=bd(),{root:e,version:s,markDirty:n}=Mt()?vd():xd();return{version:s,createFiber:He((r,i,o)=>md(r,e,o?()=>{o(),n==null||n()}:n,t()),[])}},na=(t,e,s)=>{const n=z(null),r=n.current??(n.current={wipDeps:null,wip:null,currentDeps:null,current:null});return r.wipDeps=r.currentDeps,r.wip=r.current,q(()=>{r.currentDeps=r.wipDeps,r.current=r.wip}),!s&&r.currentDeps&&Ds(r.currentDeps,e)?r.current:(r.wipDeps=e,r.wip=t(),r.wip)};function Ee(t){const{version:e,createFiber:s}=ir(),n=ne(()=>s(t.hook,t.key),[t.hook,t.key,s]),r=na(()=>({value:Ut(n,t.args)}),[n,e,t.args],Xn(n));return q(()=>()=>qt(n),[n]),q(()=>{bs(n)},[n,r]),r.value}const ri=(t,e)=>{const s=t.get(e);s&&(s.isDirty=!0)},Sd=(t,e)=>!t.isDirty&&!Xn(t.fiber)&&e!==void 0&&t.committedDeps!==void 0&&Ds(t.committedDeps,e),Td=t=>{if(!Go())return!1;for(const{fiber:e}of t.values())if(Xn(e))return!0;return!1};function Ls(t){const[e]=se(()=>new Map),{version:s,createFiber:n}=ir(),r=Td(e),i=na(()=>{const o=new Set,a=[];let c=0;for(let l=0;l<t.length;l++){const d=t[l],p=d.key;if(p===void 0)throw new Error(`useResources did not provide a key for array at index ${l}`);if(o.has(p))throw new Error(`Duplicate key ${p} in useResources`);o.add(p);let u=e.get(p);if(u)if(u.fiber.hook!==d.hook){const f=n(d.hook,d.key,()=>ri(e,p)),m=Ut(f,d.args);u.next={value:m,deps:d.deps,remount:f}}else if(Sd(u,d.deps))typeof u.next=="object"&&sa(u.fiber),u.fiber.contextDeps&&zo(u.fiber,u.fiber.contextDeps),u.next="skip";else{const f=Ut(u.fiber,d.args);u.next={value:f,deps:d.deps}}else{const f=n(d.hook,d.key,()=>ri(e,p));u={fiber:f,next:{value:Ut(f,d.args),deps:d.deps},isDirty:!1,committedDeps:void 0,committedValue:void 0},c++,e.set(p,u)}a.push(typeof u.next=="object"?u.next.value:u.committedValue)}if(e.size>a.length-c)for(const l of e.keys())o.has(l)||(e.get(l).next="delete");return a},[t,e,n,s],r);return q(()=>()=>{for(const o of e.keys())qt(e.get(o).fiber)},[e]),q(()=>{for(const[o,a]of e.entries()){const c=a.next;c==="delete"?(qt(a.fiber),e.delete(o)):c==="skip"?!a.fiber.isNeverMounted&&!a.fiber.isMounted&&bs(a.fiber):(c.remount&&(qt(a.fiber),a.fiber=c.remount),bs(a.fiber),a.committedDeps=c.deps,a.committedValue=c.value,a.isDirty=!1,a.next="skip")}},[i,e]),i}const wd=t=>t(),Id=t=>{const{createFiber:e}=ir(),s=ne(()=>e(wd,void 0),[e]),n=Ut(s,[t]);q(()=>()=>{qt(s)},[s]);let r=!1;const i=()=>{r&&s.isMounted||(r=!0,bs(s))};return q(i),{value:n,effects:i}},Cd=()=>{const t=R(4),[e,s]=se(Ad);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=(c,l)=>(s(d=>({...d,renderers:{...d.renderers,[c]:[...d.renderers[c]??[],l]}})),()=>{s(d=>{var p;return{...d,renderers:{...d.renderers,[c]:((p=d.renderers[c])==null?void 0:p.filter(u=>u!==l))??[]}}})}),t[0]=n):n=t[0];const r=n;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=c=>(s(l=>({...l,fallbacks:[...l.fallbacks,c]})),()=>{s(l=>({...l,fallbacks:l.fallbacks.filter(d=>d!==c)}))}),t[1]=i):i=t[1];const o=i;let a;return t[2]!==e?(a={getState:()=>e,setDataUI:r,setFallbackDataUI:o},t[2]=e,t[3]=a):a=t[3],a},Ed=ee(Cd);function Ad(){return{renderers:{},fallbacks:[]}}const Ys=t=>{if(!t.overwrite)return t;const{overwrite:e,...s}=t;return s},Rd=t=>{const e=Array.from(t).map(n=>n.getModelContext()).sort((n,r)=>(r.priority??0)-(n.priority??0)),s={};return e.reduce((n,r)=>{var o;const i=r.priority??0;if(r.system&&(n.system?n.system+=`
1
+ var ru=Object.defineProperty;var Wr=t=>{throw TypeError(t)};var iu=(t,e,s)=>e in t?ru(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var g=(t,e,s)=>iu(t,typeof e!="symbol"?e+"":e,s),Kr=(t,e,s)=>e.has(t)||Wr("Cannot "+s);var Me=(t,e,s)=>(Kr(t,e,"read from private field"),s?s.call(t):e.get(t)),Ue=(t,e,s)=>e.has(t)?Wr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),Ve=(t,e,s,n)=>(Kr(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s);import{c as _t,j as h,x as Ie,r as D,y as ou,z as au,E as cu,_ as lu,H as uu,a as de,B as H,C as _n,T as Z,D as Ye,w as Et,b as Qe,F as we,m as be,P as yn,I as At,o as Po,e as Rt,d as st,g as ce,J as du,K as hu,i as bn,L as pu,N as Qr,O as fu,Q as mu,U as gu,V as _u,W as yu,f as Jr,M as as,X as bu,Y as vu,Z as xu,$ as Su,a0 as Tu,a1 as wu,q as Iu,a2 as Yr,u as Cu,l as Eu,a3 as Au,a4 as Ru,a5 as ku,a6 as Mu,a7 as Pu}from"./index-tOOOCTXp.js";const ju=_t(h.jsx("path",{d:"M17.65 6.35c-1.63-1.63-3.94-2.57-6.48-2.31-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20c3.19 0 5.93-1.87 7.21-4.56.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53-1.13 2.43-3.84 3.97-6.8 3.31-2.22-.49-4.01-2.3-4.48-4.52C5.31 9.44 8.26 6 12 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71z"}),"RefreshRounded");let kt=null;function $u(t,e){t.currentIndex=0,t.wipContextDeps=null,t.wipCommitCallbacks=[];const s=kt;kt=t;try{if(e(),t.isFirstRender=!1,t.cells.length!==t.currentIndex)throw new Error(`Rendered ${t.currentIndex} hooks but expected ${t.cells.length}. Hooks must be called in the exact same order in every render.`)}finally{kt=s}}function We(){if(!kt)throw new Error("No resource fiber available");return kt}function Mt(){return kt}const Du=t=>({version:0,committedVersion:0,dispatchUpdate:t,changelog:[],committedLog:[],unsettledCount:0,rollbackCallbacks:[]}),jo=t=>{t.committedVersion=t.version;for(const e of t.changelog)e.logged=!1,e.settled||(e.settled=!0,t.unsettledCount--),t.committedLog.push(e);t.changelog.length=0,t.unsettledCount===0&&(t.committedLog.length=0),t.rollbackCallbacks.length=0},Xr=(t,e)=>{const s=t.version>e;if(t.version=e,s){for(let n=0;n<t.rollbackCallbacks.length;n++)t.rollbackCallbacks[n]();if(t.rollbackCallbacks.length=0,e<=t.committedVersion){const n=[];for(;t.committedVersion-n.length>e;){const r=t.committedLog.pop();if(r===void 0)break;Kn(r.fiber,r.cell),r.cell.workInProgress=r.prevState,n.push({record:r,prevState:r.prevState,eagerState:r.eagerState,hasEagerState:r.hasEagerState})}if(n.length>0){const r=t.committedVersion;$s(t,()=>{for(let i=n.length-1;i>=0;i--){const o=n[i];o.record.prevState=o.prevState,o.record.eagerState=o.eagerState,o.record.hasEagerState=o.hasEagerState,t.committedLog.push(o.record)}t.committedVersion=r})}t.committedVersion=e;for(const r of t.changelog)r.logged=!1;t.changelog.length=0}else{for(;t.committedVersion+t.changelog.length>e;)t.changelog.pop().logged=!1;for(let n=0;n<t.changelog.length;n++)$o(t.changelog[n]);jo(t)}}},$o=t=>{var e;Kn(t.fiber,t.cell),t.queued||(t.queued=!0,((e=t.cell).queue??(e.queue=[])).push(t))},js=(t,e)=>{t.wipCommitCallbacks.push(e)},$s=(t,e)=>{t.rollbackCallbacks.push(e)},Kn=(t,e)=>{var s;e.isDirty||(e.isDirty=!0,(s=t.markDirty)==null||s.call(t),$s(t.root,()=>{if(e.queue!==null){for(const n of e.queue)n.queued=!1;e.queue=null}e.workInProgress=e.current,e.isDirty=!1}))},Do=Symbol.for("react.memo_cache_sentinel"),No=t=>new Array(t).fill(Do),Nu=(t,e)=>{const s=t.memoCache;let n=s.workInProgress;if(n===null){const o=s.current;n=o===null?[]:o.map(a=>a.slice()),s.workInProgress=n,$s(t.root,()=>{s.workInProgress=null})}const r=s.index++;let i=n[r];return i===void 0&&(i=No(e),n[r]=i),i},Oo=t=>Nu(We(),t),Ou=Ie,Bu=t=>D.useMemo(()=>{const e=No(t);return e[Do]=!0,e},[]);var So;const Lu=((So=Ou.__COMPILER_RUNTIME)==null?void 0:So.c)??Bu,Fu=()=>Mt()!==null,R=t=>Fu()?Oo(t):Lu(t),Qn=()=>{throw new Error("Rendered more hooks than during the previous render. Hooks must be called in the exact same order in every render.")},Jn=()=>{throw new Error("Hook order changed between renders")},qu=()=>({type:"effect",setup:void 0,setupDeps:void 0,cleanup:void 0,deps:null,generation:0});function Be(t,e){const s=We(),n=s.currentIndex++,r=s.cells[n],i=r===void 0?qu():r.type==="effect"?r:Jn();if(r===void 0&&(s.isFirstRender||Qn(),s.cells[n]=i,s.effectCells.push(i)),i.deps!==null&&!!e!=!!i.deps)throw new Error("useEffect called with and without dependencies across re-renders");js(s,()=>{i.setup=t,i.setupDeps=e,i.generation++})}const Ds=(t,e)=>{for(let s=0;s<t.length&&s<e.length;s++)if(!Object.is(t[s],e[s]))return!1;return!0},Zr=(t,e)=>{js(t,()=>{e.current=e.wip,e.currentDeps=e.wipDeps,e.isDirty=!1})},Ns=(t,e)=>{const s=We(),n=s.currentIndex++;let r=s.cells[n];if(r===void 0){s.isFirstRender||Qn();const a=t();return r={type:"memo",current:a,currentDeps:e,wip:a,wipDeps:e,isDirty:!1},s.cells[n]=r,a}r.type!=="memo"&&Jn();const i=r;if(Ds(i.wipDeps,e))return i.isDirty&&Zr(s,i),i.wip;const o=t();return i.wip=o,i.wipDeps=e,i.isDirty||(i.isDirty=!0,$s(s.root,()=>{i.wip=i.current,i.wipDeps=i.currentDeps,i.isDirty=!1})),Zr(s,i),o};function Pt(t){return Ns(()=>({current:t}),[])}const Yn=Symbol("tap.Context.defaultValue"),Uu=t=>t;let Ct=new Map;const at=new Set,Bo=(t,e)=>{t[Yn]=e},Lo=t=>typeof t=="object"&&t!==null&&Yn in t,Fo=t=>typeof t=="object"&&t!==null&&"$$typeof"in t&&t.$$typeof===Symbol.for("react.context"),qo=t=>Lo(t)||Fo(t),Uo=t=>{if(!Lo(t)){if(Fo(t)){Bo(t,t._currentValue??t._currentValue2);return}throw new Error("A tap resource's `use()` only accepts a tap context.")}},Os=(t,e,s)=>{if(typeof t!="object"||t===null)throw new Error("useContextProvider only accepts a React context.");Uo(t);const n=t,r=We(),i=Pt(void 0),o=i.current===void 0||!Object.is(i.current.value,e);Be(()=>{i.current={value:e}},[e]);const a=Ct.get(n),c=a!==void 0||Ct.has(n);Ct.set(n,{value:e,source:r});try{return Vu(n,o,s)}finally{c?Ct.set(n,a):Ct.delete(n)}},Vu=(t,e,s)=>{const n=at.has(t);e?at.add(t):at.delete(t);try{return s()}finally{n?at.add(t):at.delete(t)}},Vo=t=>{Uo(t);const e=t,s=zu(e,t),n=We();return(n.wipContextDeps??(n.wipContextDeps=new Map)).set(e,s.source),s.value},zu=(t,e)=>Ct.get(t)??{value:Uu(e)[Yn],source:null},Gu=(t,e,s,n)=>{if(!n)return s;let r=s;for(const[i,o]of n)o===e||o===t||(r??(r=new Map)).set(i,o);return r},zo=(t,e=t.wipContextDeps)=>{const s=Mt();!s||!e||(s.wipContextDeps=Gu(s,t,s.wipContextDeps,e))},Go=()=>at.size>0,Xn=t=>{if(!t.contextDeps||!Go())return!1;for(const e of at.keys())if(t.contextDeps.has(e))return!0;return!1},Hu=(t,e,s)=>{if(t.isNeverMounted)throw new Error("Resource updated before mount");let n=!1,r=!0;t.root.unsettledCount++,t.root.dispatchUpdate(()=>(n||(n=!0,s&&t.root.changelog.length===0&&!e.cell.isDirty&&!e.hasEagerState&&(e.prevState=e.cell.workInProgress,e.eagerState=s(e.cell.workInProgress,e.action),e.hasEagerState=!0,r=!Object.is(e.cell.current,e.eagerState),!r&&!e.settled&&(e.settled=!0,t.root.unsettledCount--))),r),()=>(n=!0,r=!0,$o(e),e.logged||(e.logged=!0,t.root.changelog.push(e)),!0))},Wu=(t,e,s,n,r)=>{const i=n?n(s):s,o={type:"reducer",workInProgress:i,current:i,isDirty:!1,queue:null,renderQueue:null,reducer:e,dispatch:a=>{const c=Mt();if(c!==null){if(c!==t)throw new Error("Cannot update a resource while rendering a different resource.");(t.renderPendingCells??(t.renderPendingCells=new Set)).add(o),(o.renderQueue??(o.renderQueue=[])).push(a)}else{const l={fiber:t,cell:o,action:a,hasEagerState:!1,eagerState:void 0,prevState:o.current,settled:!1,queued:!1,logged:!1};Hu(t,l,r?e:void 0)}}};return o};function Ho(t,e,s,n){var l;const r=We(),i=r.currentIndex++,o=r.cells[i],a=(()=>{if(o!==void 0)return o.type==="reducer"?o:Jn();r.isFirstRender||Qn();const d=Wu(r,t,e,s,n);return r.cells[i]=d,d})(),c=a.queue;if(c!==null){const d=t===a.reducer;for(let p=0;p<c.length;p++){const u=c[p];(!u.hasEagerState||!d||!Object.is(u.prevState,a.workInProgress))&&(u.prevState=a.workInProgress,u.eagerState=t(a.workInProgress,u.action),u.hasEagerState=!0),u.queued=!1,a.workInProgress=u.eagerState}a.queue=null}if(a.reducer=t,a.renderQueue!==null){let d=a.workInProgress;for(const p of a.renderQueue)d=t(d,p);a.renderQueue=null,(l=r.renderPendingCells)==null||l.delete(a),Object.is(d,a.workInProgress)||(Kn(r,a),a.workInProgress=d)}return a.isDirty&&js(r,()=>{a.current=a.workInProgress,a.isDirty=!1}),[a.workInProgress,a.dispatch]}function Zn(t,e,s){return Ho(t,e,s,!1)}const Ku=(t,e)=>typeof e=="function"?e(t):e,Qu=t=>t===void 0?void 0:typeof t=="function"?t():t;function Wo(t){return Ho(Ku,t,Qu,!0)}const er=(t,e)=>Ns(()=>t,e);function tr(t){const e=We(),s=Pt(t);return s.current!==t&&js(e,()=>{s.current=t}),er((...n)=>s.current(...n),[])}const Ju=t=>t!==null&&typeof t=="object"&&typeof t.then=="function",ei=()=>{},Yu=t=>{const e=t;switch(typeof e.status!="string"?(e.status="pending",t.then(s=>{e.status==="pending"&&(e.status="fulfilled",e.value=s)},s=>{e.status==="pending"&&(e.status="rejected",e.reason=s)})):e.status!=="fulfilled"&&e.status!=="rejected"&&t.then(ei,ei),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw t}},sr=t=>Ju(t)?Yu(t):Vo(t),Ko=(t,e,s=e)=>{const r=We().isNeverMounted?s():e(),[,i]=Zn(c=>c+1,0),o=Pt(0),a=tr(()=>{try{if(Object.is(r,e()))return o.current=0,!1}catch{}return!0});return Be(()=>t(()=>{a()&&i()}),[t]),Be(()=>{if(a()){if(++o.current>50)throw o.current=0,new Error("Maximum update depth exceeded. The result of getSnapshot should be cached to avoid an infinite loop.");i()}},[t,r,e]),r},Qo=(t,e)=>{};let Xu=0;const Jo=()=>{const t=Pt(null);return t.current??(t.current=`:tap${Xu++}:`),t.current},Yo=(t,e,s)=>{const n=()=>{if(!t)return;const r=e();if(typeof t=="function"){const i=t(r);return typeof i=="function"?i:()=>t(null)}return t.current=r,()=>{t.current=null}};s==null?Be(n):Be(n,[...s,t])},Zu=Ie;function ed(t){const e=D.useRef(t);return D.useInsertionEffect(()=>{e.current=t}),D.useCallback((...s)=>e.current(...s),[])}const td=Zu.useEffectEvent??ed,ve=()=>Mt()!==null,re=Ie,se=t=>ve()?Wo(t):re.useState(t),sd=(t,e,s)=>ve()?Zn(t,e,s):re.useReducer(t,e,s),z=t=>ve()?Pt(t):re.useRef(t),ne=(t,e)=>ve()?Ns(t,e):re.useMemo(t,e),He=(t,e)=>ve()?er(t,e):re.useCallback(t,e),q=(t,e)=>ve()?Be(t,e):re.useEffect(t,e),ht=(t,e)=>ve()?Be(t,e):re.useLayoutEffect(t,e),Ce=t=>ve()?tr(t):td(t),yt=(t,e,s)=>ve()?Ko(t,e,s):re.useSyncExternalStore(t,e,s),nd=(t,e)=>ve()?Qo():re.useDebugValue(t,e),Xo=(t,e)=>ve()?Be(t,e):re.useInsertionEffect(t,e),Zo=()=>ve()?Jo():re.useId(),rd=(t,e,s)=>ve()?Yo(t,e,s):re.useImperativeHandle(t,e,s),ie=t=>re.forwardRef(t),pe=(t,e)=>re.memo(t,e),ea=re.Fragment,id=(...t)=>re.createElement(...t),nr=(...t)=>re.cloneElement(...t),rr=t=>re.isValidElement(t);re.Children;re.Suspense;const De=t=>{const e=re.createContext(t);return Bo(e,t),e},ta=t=>ve()&&qo(t)?sr(t):re.use(t),Re=t=>ve()&&qo(t)?sr(t):re.useContext(t);function ee(t){return(...e)=>({hook:t,args:e})}function je(t,e,s){return typeof e=="function"?(...n)=>je(t,e(...n)):s?{...e,key:t,deps:s}:{...e,key:t}}const Bs=(t,e)=>{if(t.length!==0){if(t.length===1)throw t[0];for(const s of t)console.error(s);throw new AggregateError(t,e)}};let Oe={schedulers:new Set,isScheduled:!1},Lt=null;const ti=[],od=()=>{Oe.isScheduled||(Oe.isScheduled=!0,ad())},vn=()=>{const t=Lt;Lt=new Map;const e=[];try{for(const s of Oe.schedulers)if(Oe.schedulers.delete(s),!!s.isDirty)try{s.runTask()}catch(n){e.push(n)}}finally{if(Lt=t,Oe.schedulers.clear(),Oe.isScheduled=!1,Lt===null)for(;ti.length>0;)try{ti.shift()()}catch(s){e.push(s)}}Bs(e,"Errors occurred during flushSync")},ad=(()=>{if(typeof MessageChannel<"u"){let t=null,e;return()=>{var s;if(!t){const n=new MessageChannel;n.port1.onmessage=()=>{var r;(r=t==null?void 0:t.unref)==null||r.call(t),vn()},t=n.port1,e=n.port2}(s=t.ref)==null||s.call(t),e.postMessage(null)}}return()=>setTimeout(vn,0)})(),si=t=>{if(Lt!==null)return t();const e=Oe;Oe={schedulers:new Set,isScheduled:!0};try{const s=t();return vn(),s}finally{const s=Oe.schedulers;if(Oe=e,s.size>0){for(const n of s)Oe.schedulers.add(n);od()}}};function cd(t){const e=[];for(let s=0;s<t.length;s++)try{t[s]()}catch(n){e.push(n)}Bs(e,"Errors during commit")}function ld(t){const e=t.setup,s=t.setupDeps,n=t.generation;let r;try{const i=e();if(i!==void 0&&typeof i!="function")throw new Error(`An effect function must either return a cleanup function or nothing. Received: ${typeof i}`);r=i}finally{t.generation===n?(t.cleanup=r,t.deps=s):r==null||r()}}const ud=t=>t.setup===void 0?!1:t.deps===null||t.setupDeps===void 0?!0:!Ds(t.deps,t.setupDeps);function dd(t){const e=[],s=[];for(const n of t.effectCells)ud(n)&&s.push(n);for(const n of s)if(n.deps=null,n.cleanup!==void 0)try{n.cleanup()}catch(r){e.push(r)}finally{n.cleanup=void 0}for(const n of s)try{ld(n)}catch(r){e.push(r)}Bs(e,"Errors during commit")}function hd(t){var s;const e=[];for(const n of t.effectCells)if(n.deps=null,n.cleanup)try{(s=n.cleanup)==null||s.call(n)}catch(r){e.push(r)}finally{n.cleanup=void 0}Bs(e,"Errors during cleanup")}const pd={useState:Wo,useReducer:Zn,useRef:Pt,useMemo:Ns,useCallback:er,useEffect:Be,useLayoutEffect:Be,useInsertionEffect:Be,useEffectEvent:tr,useContext:Vo,use:sr,useSyncExternalStore:Ko,useDebugValue:Qo,useId:Jo,useImperativeHandle:Yo,useMemoCache:Oo},ni=Ie,ot=ni.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE??ni.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cs=ot==null?null:"H"in ot?{get current(){return ot.H},set current(t){ot.H=t}}:"ReactCurrentDispatcher"in ot?{get current(){return ot.ReactCurrentDispatcher.current},set current(t){ot.ReactCurrentDispatcher.current=t}}:null;function fd(t){if(!cs)return t();const e=cs.current;cs.current=pd;try{return t()}finally{cs.current=e}}function md(t,e,s=void 0,n){return{hook:t,root:e,markDirty:s,devStrictMode:n,cells:[],effectCells:[],contextDeps:null,wipContextDeps:null,wipCommitCallbacks:null,memoCache:{current:null,workInProgress:null,index:0},renderPendingCells:null,currentIndex:0,isFirstRender:!0,isMounted:!1,isNeverMounted:!0}}function sa(t){t.wipCommitCallbacks=null,t.wipContextDeps=null,t.memoCache.workInProgress=null}function qt(t){t.isMounted&&(t.isMounted=!1,hd(t))}function Ut(t,e){var r;if(t.renderPendingCells!==null){for(const i of t.renderPendingCells)i.renderQueue=null;t.renderPendingCells.clear()}let s=0,n;try{do{if(++s>25)throw new Error("Too many re-renders. tap limits the number of renders to prevent an infinite loop.");t.memoCache.index=0,$u(t,()=>{n=fd(()=>t.hook(...e))})}while((((r=t.renderPendingCells)==null?void 0:r.size)??0)>0)}catch(i){throw sa(t),i}return zo(t),n}function bs(t){const e=t.wipCommitCallbacks;t.wipCommitCallbacks=null,t.isMounted=!0,t.isNeverMounted=!1,e!==null&&(t.contextDeps=t.wipContextDeps,jo(t.root),t.memoCache.workInProgress!==null&&(t.memoCache.current=t.memoCache.workInProgress,t.memoCache.workInProgress=null),cd(e)),dd(t)}const gd=()=>{const t=We();return t.devStrictMode?t.isFirstRender?"child":"root":null},_d=()=>null,yd=()=>_d,bd=()=>Mt()?gd:yd(),vd=()=>{const t=z(0),e=t.current,s=We();return{version:e,markDirty:ne(()=>()=>{var n;t.current++,(n=s.markDirty)==null||n.call(s)},[s]),root:s.root}},xd=()=>{const[t]=se(()=>Du((r,i)=>{let o=!1;n(a=>(o=!r(),o?a:a+1)),o||s(i)})),[e,s]=sd((r,i)=>(Xr(t,r),r+(i()?1:0)),0),[,n]=se(0);return Xr(t,e),{root:t,version:e,markDirty:void 0}},ir=()=>{const t=bd(),{root:e,version:s,markDirty:n}=Mt()?vd():xd();return{version:s,createFiber:He((r,i,o)=>md(r,e,o?()=>{o(),n==null||n()}:n,t()),[])}},na=(t,e,s)=>{const n=z(null),r=n.current??(n.current={wipDeps:null,wip:null,currentDeps:null,current:null});return r.wipDeps=r.currentDeps,r.wip=r.current,q(()=>{r.currentDeps=r.wipDeps,r.current=r.wip}),!s&&r.currentDeps&&Ds(r.currentDeps,e)?r.current:(r.wipDeps=e,r.wip=t(),r.wip)};function Ee(t){const{version:e,createFiber:s}=ir(),n=ne(()=>s(t.hook,t.key),[t.hook,t.key,s]),r=na(()=>({value:Ut(n,t.args)}),[n,e,t.args],Xn(n));return q(()=>()=>qt(n),[n]),q(()=>{bs(n)},[n,r]),r.value}const ri=(t,e)=>{const s=t.get(e);s&&(s.isDirty=!0)},Sd=(t,e)=>!t.isDirty&&!Xn(t.fiber)&&e!==void 0&&t.committedDeps!==void 0&&Ds(t.committedDeps,e),Td=t=>{if(!Go())return!1;for(const{fiber:e}of t.values())if(Xn(e))return!0;return!1};function Ls(t){const[e]=se(()=>new Map),{version:s,createFiber:n}=ir(),r=Td(e),i=na(()=>{const o=new Set,a=[];let c=0;for(let l=0;l<t.length;l++){const d=t[l],p=d.key;if(p===void 0)throw new Error(`useResources did not provide a key for array at index ${l}`);if(o.has(p))throw new Error(`Duplicate key ${p} in useResources`);o.add(p);let u=e.get(p);if(u)if(u.fiber.hook!==d.hook){const f=n(d.hook,d.key,()=>ri(e,p)),m=Ut(f,d.args);u.next={value:m,deps:d.deps,remount:f}}else if(Sd(u,d.deps))typeof u.next=="object"&&sa(u.fiber),u.fiber.contextDeps&&zo(u.fiber,u.fiber.contextDeps),u.next="skip";else{const f=Ut(u.fiber,d.args);u.next={value:f,deps:d.deps}}else{const f=n(d.hook,d.key,()=>ri(e,p));u={fiber:f,next:{value:Ut(f,d.args),deps:d.deps},isDirty:!1,committedDeps:void 0,committedValue:void 0},c++,e.set(p,u)}a.push(typeof u.next=="object"?u.next.value:u.committedValue)}if(e.size>a.length-c)for(const l of e.keys())o.has(l)||(e.get(l).next="delete");return a},[t,e,n,s],r);return q(()=>()=>{for(const o of e.keys())qt(e.get(o).fiber)},[e]),q(()=>{for(const[o,a]of e.entries()){const c=a.next;c==="delete"?(qt(a.fiber),e.delete(o)):c==="skip"?!a.fiber.isNeverMounted&&!a.fiber.isMounted&&bs(a.fiber):(c.remount&&(qt(a.fiber),a.fiber=c.remount),bs(a.fiber),a.committedDeps=c.deps,a.committedValue=c.value,a.isDirty=!1,a.next="skip")}},[i,e]),i}const wd=t=>t(),Id=t=>{const{createFiber:e}=ir(),s=ne(()=>e(wd,void 0),[e]),n=Ut(s,[t]);q(()=>()=>{qt(s)},[s]);let r=!1;const i=()=>{r&&s.isMounted||(r=!0,bs(s))};return q(i),{value:n,effects:i}},Cd=()=>{const t=R(4),[e,s]=se(Ad);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=(c,l)=>(s(d=>({...d,renderers:{...d.renderers,[c]:[...d.renderers[c]??[],l]}})),()=>{s(d=>{var p;return{...d,renderers:{...d.renderers,[c]:((p=d.renderers[c])==null?void 0:p.filter(u=>u!==l))??[]}}})}),t[0]=n):n=t[0];const r=n;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=c=>(s(l=>({...l,fallbacks:[...l.fallbacks,c]})),()=>{s(l=>({...l,fallbacks:l.fallbacks.filter(d=>d!==c)}))}),t[1]=i):i=t[1];const o=i;let a;return t[2]!==e?(a={getState:()=>e,setDataUI:r,setFallbackDataUI:o},t[2]=e,t[3]=a):a=t[3],a},Ed=ee(Cd);function Ad(){return{renderers:{},fallbacks:[]}}const Ys=t=>{if(!t.overwrite)return t;const{overwrite:e,...s}=t;return s},Rd=t=>{const e=Array.from(t).map(n=>n.getModelContext()).sort((n,r)=>(r.priority??0)-(n.priority??0)),s={};return e.reduce((n,r)=>{var o;const i=r.priority??0;if(r.system&&(n.system?n.system+=`
2
2
 
3
3
  ${r.system}`:n.system=r.system),r.tools)for(const[a,c]of Object.entries(r.tools)){const l=(o=n.tools)==null?void 0:o[a];if(l&&l!==c){const d=s[a];if(d===i){if(!c.overwrite)throw new Error(`You tried to define a tool with the name ${a}, but it already exists.`);n.tools[a]=Ys(c);continue}const p=d>i?l:c,u=d>i?c:l;n.tools[a]=Ys({...u,...p}),s[a]=Math.max(d,i);continue}n.tools||(n.tools={}),n.tools[a]=Ys(c),s[a]??(s[a]=i)}return r.config&&(n.config={...n.config,...r.config}),r.callSettings&&(n.callSettings={...n.callSettings,...r.callSettings}),r.unstable_composerMetadata&&(n.unstable_composerMetadata={...n.unstable_composerMetadata,...r.unstable_composerMetadata}),n},{})},dt=(t,e,s)=>{const n=r=>{console.error(`[assistant-ui] ${s} listener threw an error`,r)};for(const r of t)try{const i=r(typeof e=="function"?e():e);i!==null&&(typeof i=="object"||typeof i=="function")&&"then"in i&&typeof i.then=="function"&&Promise.resolve(i).catch(n)}catch(i){n(i)}},$e=Symbol("skip-update"),or=(t,...e)=>{const s=[];for(const n of t)try{n(...e)}catch(r){s.push(r)}if(s.length===1)throw s[0];if(s.length>1){for(const n of s)console.error(n);throw new AggregateError(s)}};function ra(t,e){if(t===void 0&&e===void 0)return!0;if(t===void 0||e===void 0)return!1;const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!1;for(const n of s){const r=t[n],i=e[n];if(!Object.is(r,i))return!1}return!0}var bt=class{constructor(){g(this,"_subscribers",new Set)}subscribe(t){return this._subscribers.add(t),()=>this._subscribers.delete(t)}waitForUpdate(){return new Promise(t=>{const e=this.subscribe(()=>{e(),t()})})}_notifySubscribers(){or(this._subscribers)}},Fs=class{constructor(){g(this,"_subscriptions",new Set);g(this,"_connection")}get isConnected(){return!!this._connection}notifySubscribers(t,e){if(e){dt(this._subscriptions,t,e);return}or(this._subscriptions,t)}_updateConnection(){var t;if(this._subscriptions.size>0){if(this._connection)return;this._connection=this._connect()}else(t=this._connection)==null||t.call(this),this._connection=void 0}subscribe(t){return this._subscriptions.add(t),this._updateConnection(),()=>{this._subscriptions.delete(t),this._updateConnection()}}},Pe=class extends Fs{constructor(e){super();g(this,"binding");g(this,"_previousState");g(this,"getState",()=>(this.isConnected||this._syncState(),this._previousState));this.binding=e;const s=e.getState();if(s===$e)throw new Error("Entry not available in the store");this._previousState=s}get path(){return this.binding.path}_syncState(){const e=this.binding.getState();return e===$e||ra(e,this._previousState)?!1:(this._previousState=e,!0)}_connect(){const e=()=>{this._syncState()&&this.notifySubscribers()},s=this.binding.subscribe(e);return this._syncState(),s}},ar=class extends Fs{constructor(e){super();g(this,"binding");g(this,"_previousStateDirty",!0);g(this,"_previousState");g(this,"getState",()=>{if(!this.isConnected||this._previousStateDirty){const e=this.binding.getState();e!==$e&&(this._previousState===void 0||!ra(e,this._previousState))&&(this._previousState=e),this._previousStateDirty=!1}if(this._previousState===void 0)throw new Error("Entry not available in the store");return this._previousState});this.binding=e}get path(){return this.binding.path}_connect(){const e=()=>{this._previousStateDirty=!0,this.notifySubscribers()},s=this.binding.subscribe(e);return this._previousStateDirty=!0,s}},vs=class extends Fs{constructor(e){super();g(this,"binding");this.binding=e}get path(){return this.binding.path}getState(){return this.binding.getState()}outerSubscribe(e){return this.binding.subscribe(e)}_connect(){const e=()=>{this.notifySubscribers()};let s=this.binding.getState(),n=s==null?void 0:s.subscribe(e);const r=()=>{const o=this.binding.getState();o!==s&&(s=o,n==null||n(),n=o==null?void 0:o.subscribe(e),e())},i=this.outerSubscribe(r);return()=>{i==null||i(),n==null||n()}}},ia=class extends Fs{constructor(e){super();g(this,"config");this.config=e}getState(){return this.config.binding.getState()}outerSubscribe(e){return this.config.binding.subscribe(e)}_connect(){const e=`Runtime event "${this.config.event}"`,s=a=>{this.notifySubscribers(a,e)};let n=this.config.binding.getState(),r=n==null?void 0:n.unstable_on(this.config.event,s);const i=()=>{const a=this.config.binding.getState();a!==n&&(n=a,r==null||r(),r=a==null?void 0:a.unstable_on(this.config.event,s))},o=this.outerSubscribe(i);return()=>{o==null||o(),r==null||r()}}},oa=class{constructor(){g(this,"_providers",new Map);g(this,"_providerUnsubscribes",new Map);g(this,"_subscribers",new Set)}getModelContext(){return Rd(new Set(this._providers.values()))}registerModelContextProvider(t){var n;const e=Symbol();this._providers.set(e,t);let s;try{s=(n=t.subscribe)==null?void 0:n.call(t,()=>{this.notifySubscribers()})}catch(r){this._providers.delete(e);try{this.notifySubscribers()}catch(i){console.error(i)}throw r}return this._providerUnsubscribes.set(e,s),this.notifySubscribers(),()=>{var r;this._providers.delete(e),(r=this._providerUnsubscribes.get(e))==null||r(),this._providerUnsubscribes.delete(e),this.notifySubscribers()}}notifySubscribers(){or(this._subscribers)}subscribe(t){return this._subscribers.add(t),()=>{this._subscribers.delete(t)}}};const xn=[],kd={modelName:void 0,toolNames:xn},Md=(t,e)=>t===e||t.length===e.length&&t.every((s,n)=>s===e[n]),ls=(t,e)=>{var o;const s=t.getModelContext(),n=(o=s.config)==null?void 0:o.modelName,r=s.tools?Object.keys(s.tools).sort():xn,i=r.length?r:xn;return n===e.modelName&&Md(i,e.toolNames)?e:{modelName:n,toolNames:i}},Pd=()=>{const t=R(11);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=new oa,t[0]=e):e=t[0];const s=e;let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>ls(s,kd),t[1]=n):n=t[1];const[r,i]=se(n);let o,a;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>(i(f=>ls(s,f)),s.subscribe(()=>{i(f=>ls(s,f))})),a=[s],t[2]=o,t[3]=a):(o=t[2],a=t[3]),q(o,a);let c;t[4]!==r?(c=()=>ls(s,r),t[4]=r,t[5]=c):c=t[5];let l,d,p;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=()=>s.getModelContext(),d=f=>s.subscribe(f),p=f=>s.registerModelContextProvider(f),t[6]=l,t[7]=d,t[8]=p):(l=t[6],d=t[7],p=t[8]);let u;return t[9]!==c?(u={getState:c,getModelContext:l,subscribe:d,register:p},t[9]=c,t[10]=u):u=t[10],u},aa=ee(Pd),jd=t=>t.display!==void 0?t.display==="standalone":t.type==="human",$d=(t,e)=>{var n,r;if(!(((n=e.status)==null?void 0:n.type)==="running"||((r=e.status)==null?void 0:r.type)==="requires-action")){const i=t.complete;return typeof i!="function"?i??null:i({args:e.args,result:e.result})}const s=t.running;return typeof s!="function"?s??null:s({args:e.args})},Dd=t=>function(s){return $d(t,s)},Ne=t=>t,Nd=new Set(["$$typeof","nodeType","then","__v_raw","__v_isRef","__v_isReactive","__v_isReadonly","__v_isShallow","__v_skip"]),pt=(t,e)=>{if(t===Symbol.toStringTag)return e;if(typeof t!="symbol"){if(t==="toJSON")return()=>e;if(!Nd.has(t))return!1}};var Gt=class{getOwnPropertyDescriptor(t,e){const s=this.get(t,e);if(s!==void 0)return{value:s,writable:!1,enumerable:!0,configurable:!0}}set(){return!1}setPrototypeOf(){return!1}defineProperty(){return!1}deleteProperty(){return!1}preventExtensions(){return!1}};const xs=Symbol("assistant-ui.store.clientId"),Sn=Symbol("assistant-ui.store.instanceTag"),ca=(t,e)=>{const s=new Proxy(()=>{},{apply:()=>(e(),s),get:(n,r)=>r==="source"?t.source:r==="query"?t.query:r==="name"?t.name:r===xs?Us(e()):e()[r],has:(n,r)=>r==="source"||r==="query"||r==="name"||r===xs||r in e(),ownKeys:()=>Reflect.ownKeys(e()),getOwnPropertyDescriptor:(n,r)=>{if(!(typeof r=="symbol"||!(r in e())))return{value:e()[r],writable:!1,enumerable:!0,configurable:!0}}});return s},la=(t,e)=>{const s=()=>{throw new Error(t)};return new Proxy(()=>{},{apply:s,get:(n,r)=>{if(r==="source"||r==="query")return null;if(r==="name")return e;if(r===xs)return s();const i=pt(r,"AssistantClientAccessor");return i!==!1?i:s()},has:(n,r)=>r==="source"||r==="query"||r==="name",ownKeys:()=>[],getOwnPropertyDescriptor:()=>{}})},qs=t=>(t==null?void 0:t.source)!=null,Tn=t=>(t==null?void 0:t.source)===null,Us=t=>t[xs]??t,Od=t=>t[Sn]??Us(t),lt=t=>t==="optional"||t==="subscribe"||t==="on"||t==="__proto__"||typeof t=="symbol",wn=t=>{const e=[];for(const s in t)lt(s)||e.push(s);return e};var ut,To,Bd=(To=class extends Gt{constructor(e){super();Ue(this,ut);Ve(this,ut,e)}get(e,s){const n=pt(s,"OptionalAssistantClient");if(n!==!1)return n;if(lt(s))return;const r=Me(this,ut)[s];return qs(r)?r:void 0}ownKeys(){return wn(Me(this,ut))}has(e,s){return!lt(s)&&s in Me(this,ut)}},ut=new WeakMap,To);const ua=t=>new Proxy({},new Bd(t)),ii=()=>()=>{},Ld="You are using a component or hook that requires an AuiProvider. Wrap your component in an <AuiProvider> component.";var Jt,Yt,Xt,Ps,wo,Fd=(wo=class extends Gt{constructor(e,s,n){super();Ue(this,Jt);Ue(this,Yt);Ue(this,Xt);Ue(this,Ps);Ve(this,Jt,e),Ve(this,Yt,s),Ve(this,Xt,n)}get(e,s){if(s==="subscribe"||s==="on")return ii;if(s==="optional")return Me(this,Ps)??Ve(this,Ps,ua(Me(this,Xt).call(this)));const n=pt(s,Me(this,Jt));return n!==!1?n:la(Me(this,Yt).call(this,String(s)),String(s))}ownKeys(){return["subscribe","on","optional"]}getOwnPropertyDescriptor(e,s){if(s!=="optional")return super.getOwnPropertyDescriptor(e,s);const n=this.get(e,s);if(n!==void 0)return{value:n,writable:!1,enumerable:!1,configurable:!0}}has(e,s){return s==="subscribe"||s==="on"||s==="optional"}},Jt=new WeakMap,Yt=new WeakMap,Xt=new WeakMap,Ps=new WeakMap,wo);const qd=(t,e)=>{const s=new Proxy({},new Fd(t,e,()=>s));return s},Ht=qd("DefaultAssistantClient",()=>Ld),Ud=()=>new Proxy({},{get(t,e){const s=pt(e,"AssistantClient");return s!==!1?s:la(`The current scope does not have a "${String(e)}" property.`,String(e))}}),cr=De(Ht),Vd=()=>{},zd=new WeakMap,Gd=t=>zd.get(t)??Vd,lr=()=>Re(cr),da=(t,e)=>Os(cr,t,e),In=Symbol("assistant-ui.transform-scopes");function ha(t,e){const s=t;if(s[In])throw new Error("transformScopes is already attached to this resource");s[In]=e}function Hd(t){return t[In]}const ur=t=>typeof t=="string"?{scope:t.split(".")[0],event:t}:{scope:t.scope,event:t.event},Wd=()=>{const t=new Map,e=new Set,s=new Set;return{on(n,r){const i=r;if(n==="*")return e.add(i),()=>e.delete(i);let o=t.get(n);return o||(o=new Set,t.set(n,o)),o.add(i),()=>{o.delete(i),o.size===0&&t.delete(n)}},emit(n,r,i){!t.has(n)&&e.size===0||queueMicrotask(()=>{const o=[],a=t.get(n);if(a)for(const c of a)try{c(r,i)}catch(l){o.push(l)}if(e.size>0){const c={event:n,payload:r};for(const l of e)try{l(c,i)}catch(d){o.push(d)}}if(o.length>0){if(o.length===1)throw o[0];for(const c of o)console.error(c);throw new AggregateError(o,"Errors occurred during event emission")}})},subscribe(n){return s.add(n),()=>s.delete(n)},notifySubscribers(){for(const n of s)try{n()}catch(r){console.error("NotificationManager: subscriber callback error",r)}}}},Kd=()=>se(Wd)[0],Cn=Symbol("assistant-ui.store.clientIndex"),Qd=t=>t[Cn],pa=De([]),dr=()=>ta(pa),Jd=(t,e)=>{const s=R(3),n=dr();let r;return s[0]!==t||s[1]!==n?(r=[...n,t],s[0]=t,s[1]=n,s[2]=r):r=s[2],Os(pa,r,e)},fa=De(null),oi=Symbol("aui.scope-effect-unapplied"),Yd=(t,e)=>Os(fa,t,e),hr=()=>{const t=ta(fa);if(!t)throw new Error("AssistantTapContext is not available");return t},ma=()=>hr().clientRef,ga=(t,e,s)=>{const n=R(8),{clientRef:r}=hr();let i;n[0]!==r||n[1]!==e||n[2]!==t?(i=()=>{const a=r.current;if(a===null)throw new Error("useAssistantScopeEffect ran before the client was committed. This is likely an internal bug in assistant-ui.");const c=()=>{var m;const f=(m=r.current)==null?void 0:m[t];return f!==void 0&&qs(f)?Od(f):void 0};let l=oi,d;const p=f=>{if(d==null||d(),d=void 0,l=oi,f!==void 0){const m=e();d=typeof m=="function"?m:void 0}l=f};p(c());const u=a.subscribe(()=>{const f=c();f!==l&&p(f)});return()=>{u(),d==null||d()}},n[0]=r,n[1]=e,n[2]=t,n[3]=i):i=n[3];let o;n[4]!==r||n[5]!==s||n[6]!==t?(o=[r,t,...s],n[4]=r,n[5]=s,n[6]=t,n[7]=o):o=n[7],q(i,o)},Vs=()=>{const t=R(3),{emit:e}=hr(),s=dr();let n;return t[0]!==s||t[1]!==e?(n=(r,i)=>{e(r,i,s)},t[0]=s,t[1]=e,t[2]=n):n=t[2],Ce(n)},Ss=Symbol("assistant-ui.store.getValue"),ai=t=>{var s;const e=t[Ss];if(!e)throw new Error("Client scope contains a non-client resource. Ensure your Derived get() returns a client created with useClientResource(), not a plain resource.");return(s=e.getState)==null?void 0:s.call(e)},ci=new Map;function Xd(t){let e=ci.get(t);return e||(e=function(...s){if(!this||typeof this!="object")throw new Error(`Method "${String(t)}" called without proper context. This may indicate the function was called incorrectly.`);const n=this[Ss];if(!n)throw new Error(`Method "${String(t)}" called on invalid client proxy. Ensure you are calling this method on a valid client instance.`);const r=n[t];if(!r)throw new Error(`Method "${String(t)}" is not implemented.`);if(typeof r!="function")throw new Error(`"${String(t)}" is not a function.`);return r(...s)},ci.set(t,e)),e}var Zd=class extends Gt{constructor(e,s,n){super();g(this,"boundFns");g(this,"cachedReceiver");g(this,"outputRef");g(this,"tagRef");g(this,"index");this.outputRef=e,this.tagRef=s,this.index=n}get(e,s,n){if(s===Ss)return this.outputRef.current;if(s===Cn)return this.index;if(s===Sn)return this.tagRef.current;const r=pt(s,"ClientProxy");if(r!==!1)return r;const i=this.outputRef.current[s];if(typeof i=="function"){if(n===void 0)return i;(!this.boundFns||this.cachedReceiver!==n)&&(this.boundFns=new Map,this.cachedReceiver=n);let o=this.boundFns.get(s);return o||(o=Xd(s).bind(n),this.boundFns.set(s,o)),o}return i}ownKeys(){return Object.keys(this.outputRef.current)}has(e,s){return s===Ss||s===Cn||s===Sn?!0:s in this.outputRef.current}};const Wt=t=>{var a;const e=z(null),s=z(null),n=ne(()=>({}),[t.hook,t.key]),r=dr().length,i=ne(()=>new Proxy({},new Zd(e,s,r)),[r]),o=Jd(i,function(){return Ee(t)});return e.current||(e.current=o,s.current=n),q(()=>{e.current=o,s.current=n}),{methods:i,state:(a=o.getState)==null?void 0:a.call(o),key:t.key}},_a=ee(Wt),eh=(t,e)=>{if(Array.isArray(t)!==Array.isArray(e))return!1;if(Array.isArray(t)&&Array.isArray(e))return t.length===e.length&&t.every((n,r)=>Object.is(n,e[r]));const s=Object.keys(t);return s.length===Object.keys(e).length&&s.every(n=>Object.hasOwn(e,n)&&Object.is(t[n],e[n]))},Ts=t=>{const e=ne(()=>({}),[]);return e.v!==void 0&&eh(e.v,t)?e.v:(e.v=t,t)},th=(t,e)=>{const s={...t},n=new Set;let r=!0;for(;r;){r=!1;for(const i of Object.values(s)){if(n.has(i.hook))continue;n.add(i.hook);const o=Hd(i.hook);if(o){o(s,e),r=!0;break}}}return s},pr=t=>t.hook===Sa,sh=t=>{if(!pr(t))return{source:"root",query:{}};const e=t.args[0];return{source:e.source,query:e.query??{}}},En=Symbol.for("aui.event-receiver-ref"),ya=(t,e)=>{const s=t===Ht?Ud():t,n=Object.create(s);Object.assign(n,e);let r;return Object.defineProperty(n,"optional",{get:()=>r??(r=ua(n)),enumerable:!1}),n},nh=({notifications:t,clientRef:e})=>ne(()=>({subscribe:t.subscribe,on:function(s,n){if(!this)throw new Error("const { on } = useAui() is not supported. Use aui.on() instead.");const{scope:r,event:i}=ur(s),o=s[En];if(r!=="*"&&!o&&Tn(this[r]))throw new Error(`Scope "${r}" is not available. Use { scope: "*", event: "${i}" } to listen globally.`);const a=t.on(i,(l,d)=>{if(r==="*"){n(l);return}const p=((o??e).current??this)[r];if(!qs(p))return;const u=Us(p);u===d[Qd(u)]&&n(l)});if(r!=="*"){if(o){if(e.parent===Ht)return a}else if(Tn(e.parent[r]))return a}const c=e.parent.on(s,n);return()=>{a(),c()}}}),[t,e]),ba=t=>{const e=R(5);let s;e[0]!==t?(s=sh(t),e[0]=t,e[1]=s):s=e[1];const{source:n,query:r}=s,i=Ts(r);let o;return e[2]!==n||e[3]!==i?(o={source:n,query:i},e[2]=n,e[3]=i,e[4]=o):o=e[4],Ts(o)},rh=(t,e)=>{const s=R(3);let n;return s[0]!==e||s[1]!==t?(n=e?t:_a(t),s[0]=e,s[1]=t,s[2]=n):n=s[2],Ee(n)},ih=(t,e)=>{const s=lr(),n=pr(e),r=rh(e,n),i=n?r:r.methods,o=ba(e),a=ne(()=>ca({name:t,...o},()=>i),[t,o,i]);return s[t]=a,a},oh=ee(ih),ah=t=>{const e=R(2);let s;return e[0]!==t?(s=t.map(fh),e[0]=t,e[1]=s):s=e[1],Ls(s)},va=(t,e)=>{const s=Ts(e),n=ne(()=>({}),[]);return n.deps!==s&&(n.deps=s,n.client=t),n.client},ch=({parent:t,entries:e,clientRef:s,notifications:n,destroySignal:r})=>{const i=nh({notifications:n,clientRef:s}),o=ya(t,i),a=Yd({clientRef:s,emit:n.emit,destroySignal:r},function(){return da(o,function(){return ah(e)})});return{client:va(o,[t,...a])}},lh=({parent:t,entries:e})=>{const s=z({parent:t,current:null}).current,{value:n,effects:r}=Id(function(){const o=Kd(),{client:a}=ch({parent:t,entries:e,clientRef:s,notifications:o});return q(()=>t.subscribe(o.notifySubscribers),[t,o]),q(()=>o.notifySubscribers()),a});return Xo(()=>{s.parent=t,s.current=n},[n,t,s]),{client:n,effects:r}},uh=(t,e,s,n)=>{const{get:r}=n.args[0],i=yt(t.subscribe,()=>r(t),()=>r(t)),o=ba(n),a=ne(()=>ca({name:s,...o},()=>i),[s,o,i]);return e[s]=a,a},dh=(t,e)=>{const s=z({parent:t,current:null}).current,n=function(a,c){if(!this)throw new Error("const { on } = useAui() is not supported. Use aui.on() instead.");const{scope:l,event:d}=ur(a);if(l==="*")return t.on(a,c);const p=a[En];if(!p&&Tn(this[l]))throw new Error(`Scope "${l}" is not available. Use { scope: "*", event: "${d}" } to listen globally.`);return t.on({scope:l,event:d,[En]:p??s},c)},r=ya(t,{subscribe:t.subscribe,on:n}),i=e.map(([a,c])=>uh(t,r,a,c)),o=va(r,[t,...i]);return Xo(()=>{s.parent=t,s.current=o},[o,t,s]),o},hh=(t,e)=>{const s=R(8);let n;s[0]!==e||s[1]!==t?(n=Object.entries(th(e,t)),s[0]=e,s[1]=t,s[2]=n):n=s[2];const r=n;let i;s[3]!==r?(i=()=>r.length===0||r.some(mh),s[3]=r,s[4]=i):i=s[4];const[o]=se(i);let a;return s[5]!==r||s[6]!==o?(a={entries:r,rooted:o},s[5]=r,s[6]=o,s[7]=a):a=s[7],a},ph=(t,e,s)=>{const{entries:n,rooted:r}=hh(t,e);return r?s({parent:t,entries:n}):{client:dh(t,n)}},xa=(t,e)=>ph(t,e,lh);function W(t){return lr()}function fh(t){const[e,s]=t;return je(e,oh(e,s))}function mh(t){const[,e]=t;return!pr(e)}const gh=t=>{let e;class s extends Gt{get(i,o){const a=pt(o,"OptionalAssistantState");if(a!==!1)return a;const c=o;if(!lt(c)&&qs(t[c]))return ai(t[c]())}ownKeys(){return wn(t)}has(i,o){return!lt(o)&&o in t}}class n extends Gt{get(i,o){const a=pt(o,"AssistantState");if(a!==!1)return a;if(o==="optional")return e??(e=new Proxy({},new s));const c=o;if(!lt(c))return ai(t[c]())}ownKeys(){return[...wn(t),"optional"]}has(i,o){return o==="optional"||!lt(o)&&o in t}}return new Proxy({},new n)},li=new WeakMap,_h=t=>{let e=li.get(t);return e||(e=gh(t),li.set(t,e)),e},N=t=>{const e=R(6),s=W();let n;e[0]!==s?(n=_h(s),e[0]=s,e[1]=n):n=e[1];const r=n;let i,o;e[2]!==r||e[3]!==t?(i=()=>t(r),o=()=>t(r),e[2]=r,e[3]=t,e[4]=i,e[5]=o):(i=e[4],o=e[5]);const a=yt(s.subscribe,i,o);if(typeof a=="object"&&a!==null&&(a===r||a===r.optional))throw new Error("You tried to return the entire AssistantState. This is not supported due to technical limitations.");return nd(a),a},Sa=t=>{const e=R(3),{get:s}=t,n=W();let r;return e[0]!==n||e[1]!==s?(r=()=>s(n),e[0]=n,e[1]=s,e[2]=r):r=e[2],N(r)},Ae=ee(Sa),Ta=t=>{if(t.key===void 0)throw new Error("useClientLookup: Element has no key");return t.key};function ft(t){const e=R(12);let s;e[0]!==t?(s=t.map(vh),e[0]=t,e[1]=s):s=e[1];const n=Ls(s);let r;e[2]!==t?(r=t.reduce(bh,{}),e[2]=t,e[3]=r):r=e[3];const i=r;let o;e[4]!==n?(o=n.map(yh),e[4]=n,e[5]=o):o=e[5];const a=o;let c;e[6]!==i||e[7]!==n?(c=d=>{if("index"in d){if(d.index<0||d.index>=n.length)throw new Error(`useClientLookup: index ${d.index} out of bounds (length: ${n.length}) (ignore if recovered)`);return n[d.index].methods}const p=i[d.key];if(p===void 0)throw new Error(`useClientLookup: key "${d.key}" not found (ignore if recovered)`);return n[p].methods},e[6]=i,e[7]=n,e[8]=c):c=e[8];let l;return e[9]!==a||e[10]!==c?(l={state:a,get:c},e[9]=a,e[10]=c,e[11]=l):l=e[11],l}function yh(t){return t.state}function bh(t,e,s){return t[Ta(e)]=s,t}function vh(t){return je(Ta(t),_a(t),t.deps)}const xh=(t,e)=>t.scrollTop>e.scrollTop&&t.scrollHeight===e.scrollHeight,wa=t=>{const e=R(16),{toolkit:s,mcpApp:n}=t;let r;e[0]!==n?(r=n?[je("mcpApp",n)]:[],e[0]=n,e[1]=r):r=e[1];const i=Ls(r)[0],[o,a]=se(Th);let c;e[2]!==i||e[3]!==o?(c={toolUIs:o,mcpApp:i},e[2]=i,e[3]=o,e[4]=c):c=e[4];const l=c,d=ma();let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(v,w,T)=>{const E={render:w,standalone:(T==null?void 0:T.standalone)??!1};return a(A=>({...A,[v]:[...A[v]??[],E]})),()=>{a(A=>{var k;const b=((k=A[v])==null?void 0:k.filter(x=>x!==E))??[];if(b.length>0)return{...A,[v]:b};const I={...A};return delete I[v],I})}},e[5]=p):p=e[5];const u=p;let f,m;e[6]!==s?(f=()=>{if(!s)return;const v=[];for(const[w,T]of Object.entries(s)){const E="render"in T?T.render:void 0,A="renderText"in T?T.renderText:void 0,b=E??(A?Dd(A):void 0);b&&v.push(u(w,b,{standalone:jd(T)}))}return()=>{v.forEach(wh)}},m=[s,u],e[6]=s,e[7]=f,e[8]=m):(f=e[7],m=e[8]),q(f,m);let y;e[9]!==d||e[10]!==s?(y=()=>{if(!s)return;const v=Object.entries(s).reduce(Ih,{});return d.current.modelContext().register({getModelContext:()=>({tools:v})})},e[9]=d,e[10]=s,e[11]=y):y=e[11];let _;e[12]!==s?(_=[s],e[12]=s,e[13]=_):_=e[13],ga("modelContext",y,_);let S;return e[14]!==l?(S={getState:()=>l,setToolUI:u},e[14]=l,e[15]=S):S=e[15],S},Sh=ee(wa);ha(wa,(t,e)=>{!t.modelContext&&e.modelContext.source===null&&(t.modelContext=aa())});function Th(){return{}}function wh(t){return t()}function Ih(t,e){const[s,n]=e;if(n.type==="mcp")return t;const{display:r,render:i,renderText:o,...a}=n;return t[s]=a,t}const vt=t=>yt(t.subscribe,t.getState),Ia=Symbol.for("assistant-ui.silent-runtime-action"),Ca=t=>typeof t=="object"&&t!==null&&Ia in t,Ea=(t,e)=>{const s=e();return s.catch(n=>{Ca(n)||console.error(`[assistant-ui] ${t} failed:`,n)}),s},Ch=t=>{const e=R(9),{runtime:s}=t,n=vt(s);let r;e[0]!==n?(r=()=>n,e[0]=n,e[1]=r):r=e[1];let i,o;e[2]!==s?(i=()=>Ea("attachment remove",s.remove),o=()=>s,e[2]=s,e[3]=i,e[4]=o):(i=e[3],o=e[4]);let a;return e[5]!==r||e[6]!==i||e[7]!==o?(a={getState:r,remove:i,__internal_getRuntime:o},e[5]=r,e[6]=i,e[7]=o,e[8]=a):a=e[8],a},Aa=ee(Ch),Eh=t=>{const e=R(5),{runtime:s,index:n}=t;let r;e[0]!==n||e[1]!==s?(r=s.getAttachmentByIndex(n),e[0]=n,e[1]=s,e[2]=r):r=e[2];const i=r;let o;return e[3]!==i?(o=Aa({runtime:i}),e[3]=i,e[4]=o):o=e[4],Ee(o)},Ah=ee(Eh),Rh=({item:t,onMove:e,onRemove:s})=>({getState:()=>t,steer:()=>e({lane:"steer",insertAfter:null}),move:e,remove:s}),kh=ee(Rh),Mh=t=>{const e=R(55),{threadIdRef:s,messageIdRef:n,runtime:r}=t,i=vt(r),o=Vs();let a,c;e[0]!==o||e[1]!==n||e[2]!==r||e[3]!==s?(a=()=>{const b=[];for(const I of["send","attachmentAdd"]){const k=r.unstable_on(I,()=>{o(`composer.${I}`,{threadId:s.current,...n&&{messageId:n.current}})});b.push(k)}return b.push(r.unstable_on("attachmentAddError",I=>{o("composer.attachmentAddError",{threadId:s.current,...n&&{messageId:n.current},...I.attachmentId&&{attachmentId:I.attachmentId},reason:I.reason,message:I.message})})),()=>{for(const I of b)I()}},c=[r,o,s,n],e[0]=o,e[1]=n,e[2]=r,e[3]=s,e[4]=a,e[5]=c):(a=e[4],c=e[5]),q(a,c);let l;if(e[6]!==r||e[7]!==i.attachments){let b;e[9]!==r?(b=(I,k)=>je(I.id,Ah({runtime:r,index:k}),[r,k]),e[9]=r,e[10]=b):b=e[10],l=i.attachments.map(b),e[6]=r,e[7]=i.attachments,e[8]=l}else l=e[8];const d=ft(l),p=i.queue;let u;if(e[11]!==p||e[12]!==r){let b;e[14]!==r?(b=I=>je(I.id,kh({item:I,onMove:k=>r.moveQueueItem(I.id,k),onRemove:()=>r.removeQueueItem(I.id)})),e[14]=r,e[15]=b):b=e[15],u=p.map(b),e[11]=p,e[12]=r,e[13]=u}else u=e[13];const f=ft(u),m=i.type??"thread";let y;e[16]!==d.state||e[17]!==p||e[18]!==i.attachmentAccept||e[19]!==i.canCancel||e[20]!==i.canSend||e[21]!==i.dictation||e[22]!==i.isEditing||e[23]!==i.isEmpty||e[24]!==i.quote||e[25]!==i.role||e[26]!==i.runConfig||e[27]!==i.text||e[28]!==m?(y={text:i.text,role:i.role,attachments:d.state,runConfig:i.runConfig,isEditing:i.isEditing,canCancel:i.canCancel,canSend:i.canSend,attachmentAccept:i.attachmentAccept,isEmpty:i.isEmpty,type:m,dictation:i.dictation,quote:i.quote,queue:p},e[16]=d.state,e[17]=p,e[18]=i.attachmentAccept,e[19]=i.canCancel,e[20]=i.canSend,e[21]=i.dictation,e[22]=i.isEditing,e[23]=i.isEmpty,e[24]=i.quote,e[25]=i.role,e[26]=i.runConfig,e[27]=i.text,e[28]=m,e[29]=y):y=e[29];const _=y;let S;e[30]!==_?(S=()=>_,e[30]=_,e[31]=S):S=e[31];const v=r.beginEdit??Ph;let w;e[32]!==d?(w=b=>"id"in b?d.get({key:b.id}):d.get(b),e[32]=d,e[33]=w):w=e[33];let T;e[34]!==f?(T=b=>"id"in b?f.get({key:b.id}):f.get(b),e[34]=f,e[35]=T):T=e[35];let E;e[36]!==r?(E=()=>r,e[36]=r,e[37]=E):E=e[37];let A;return e[38]!==r.addAttachment||e[39]!==r.cancel||e[40]!==r.clearAttachments||e[41]!==r.reset||e[42]!==r.send||e[43]!==r.setQuote||e[44]!==r.setRole||e[45]!==r.setRunConfig||e[46]!==r.setText||e[47]!==r.startDictation||e[48]!==r.stopDictation||e[49]!==T||e[50]!==E||e[51]!==S||e[52]!==v||e[53]!==w?(A={getState:S,setText:r.setText,setRole:r.setRole,setRunConfig:r.setRunConfig,addAttachment:r.addAttachment,reset:r.reset,clearAttachments:r.clearAttachments,send:r.send,cancel:r.cancel,beginEdit:v,startDictation:r.startDictation,stopDictation:r.stopDictation,setQuote:r.setQuote,attachment:w,queueItem:T,__internal_getRuntime:E},e[38]=r.addAttachment,e[39]=r.cancel,e[40]=r.clearAttachments,e[41]=r.reset,e[42]=r.send,e[43]=r.setQuote,e[44]=r.setRole,e[45]=r.setRunConfig,e[46]=r.setText,e[47]=r.startDictation,e[48]=r.stopDictation,e[49]=T,e[50]=E,e[51]=S,e[52]=v,e[53]=w,e[54]=A):A=e[54],A},Ra=ee(Mh);function Ph(){throw new Error("beginEdit is not supported in this runtime")}const ka=t=>({get current(){return t()}}),jh=t=>{const e=R(13),{runtime:s}=t,n=vt(s);let r;e[0]!==n?(r=()=>n,e[0]=n,e[1]=r):r=e[1];let i,o,a,c;e[2]!==s?(i=d=>s.addToolResult(d),o=d=>s.resumeToolCall(d),a=d=>s.respondToToolApproval(d),c=()=>s,e[2]=s,e[3]=i,e[4]=o,e[5]=a,e[6]=c):(i=e[3],o=e[4],a=e[5],c=e[6]);let l;return e[7]!==r||e[8]!==i||e[9]!==o||e[10]!==a||e[11]!==c?(l={getState:r,addToolResult:i,resumeToolCall:o,respondToToolApproval:a,__internal_getRuntime:c},e[7]=r,e[8]=i,e[9]=o,e[10]=a,e[11]=c,e[12]=l):l=e[12],l},$h=ee(jh),Dh=t=>{const e=R(5),{runtime:s,index:n}=t;let r;e[0]!==n||e[1]!==s?(r=s.getAttachmentByIndex(n),e[0]=n,e[1]=s,e[2]=r):r=e[2];const i=r;let o;return e[3]!==i?(o=Aa({runtime:i}),e[3]=i,e[4]=o):o=e[4],Ee(o)},Nh=ee(Dh),Oh=t=>{const e=R(5),{runtime:s,index:n}=t;let r;e[0]!==n||e[1]!==s?(r=s.getMessagePartByIndex(n),e[0]=n,e[1]=s,e[2]=r):r=e[2];const i=r;let o;return e[3]!==i?(o=$h({runtime:i}),e[3]=i,e[4]=o):o=e[4],Ee(o)},Bh=ee(Oh),Lh=t=>{const e=R(55),{runtime:s,threadIdRef:n}=t,r=vt(s),[i,o]=se(!1),[a,c]=se(!1);let l;e[0]!==s?(l=ka(()=>s.getState().id),e[0]=s,e[1]=l):l=e[1];const d=l;let p;e[2]!==d||e[3]!==s.composer||e[4]!==n?(p=Ra({runtime:s.composer,threadIdRef:n,messageIdRef:d}),e[2]=d,e[3]=s.composer,e[4]=n,e[5]=p):p=e[5];const u=Wt(p);let f;if(e[6]!==s||e[7]!==r.content){let U;e[9]!==s?(U=(K,L)=>je("toolCallId"in K&&K.toolCallId!=null?`toolCallId-${K.toolCallId}`:`index-${L}`,Bh({runtime:s,index:L}),[s,L]),e[9]=s,e[10]=U):U=e[10],f=r.content.map(U),e[6]=s,e[7]=r.content,e[8]=f}else f=e[8];const m=ft(f);let y;e[11]!==r.attachments?(y=r.attachments??[],e[11]=r.attachments,e[12]=y):y=e[12];let _;if(e[13]!==s||e[14]!==y){let U;e[16]!==s?(U=(K,L)=>je(K.id,Nh({runtime:s,index:L}),[s,L]),e[16]=s,e[17]=U):U=e[17],_=y.map(U),e[13]=s,e[14]=y,e[15]=_}else _=e[15];const S=ft(_),v=r;let w;e[18]!==u.state||e[19]!==i||e[20]!==a||e[21]!==m.state||e[22]!==v?(w={...v,parts:m.state,composer:u.state,isCopied:i,isHovering:a},e[18]=u.state,e[19]=i,e[20]=a,e[21]=m.state,e[22]=v,e[23]=w):w=e[23];const T=w;let E;e[24]!==T?(E=()=>T,e[24]=T,e[25]=E):E=e[25];let A;e[26]!==u.methods?(A=()=>u.methods,e[26]=u.methods,e[27]=A):A=e[27];let b,I,k,x,M,P,C;e[28]!==s?(b=()=>s.delete(),I=U=>s.reload(U),k=()=>s.speak(),x=()=>s.stopSpeaking(),M=U=>s.submitFeedback(U),P=U=>s.switchToBranch(U),C=()=>s.unstable_getCopyText(),e[28]=s,e[29]=b,e[30]=I,e[31]=k,e[32]=x,e[33]=M,e[34]=P,e[35]=C):(b=e[29],I=e[30],k=e[31],x=e[32],M=e[33],P=e[34],C=e[35]);let j;e[36]!==m?(j=U=>"index"in U?m.get({index:U.index}):m.get({key:`toolCallId-${U.toolCallId}`}),e[36]=m,e[37]=j):j=e[37];let $;e[38]!==S?($=U=>"id"in U?S.get({key:U.id}):S.get(U),e[38]=S,e[39]=$):$=e[39];let B;e[40]!==s?(B=()=>s,e[40]=s,e[41]=B):B=e[41];let V;return e[42]!==b||e[43]!==I||e[44]!==k||e[45]!==x||e[46]!==M||e[47]!==P||e[48]!==C||e[49]!==j||e[50]!==$||e[51]!==B||e[52]!==E||e[53]!==A?(V={getState:E,composer:A,delete:b,reload:I,speak:k,stopSpeaking:x,submitFeedback:M,switchToBranch:P,getCopyText:C,part:j,attachment:$,setIsCopied:o,setIsHovering:c,__internal_getRuntime:B},e[42]=b,e[43]=I,e[44]=k,e[45]=x,e[46]=M,e[47]=P,e[48]=C,e[49]=j,e[50]=$,e[51]=B,e[52]=E,e[53]=A,e[54]=V):V=e[54],V},Fh=ee(Lh),qh=t=>({getState:()=>t}),Uh=ee(qh),Vh=t=>{const e=R(9);let s;e[0]!==t.suggestions?(s=t.suggestions.map(Hh),e[0]=t.suggestions,e[1]=s):s=e[1];const n=ft(s);let r;e[2]!==t?(r=()=>t,e[2]=t,e[3]=r):r=e[3];let i;e[4]!==n?(i=a=>{const{index:c}=a;return n.get({index:c})},e[4]=n,e[5]=i):i=e[5];let o;return e[6]!==r||e[7]!==i?(o={getState:r,suggestion:i},e[6]=r,e[7]=i,e[8]=o):o=e[8],o},zh=t=>{const e=R(4);let s;e[0]!==t?(s=t.map(Wh),e[0]=t,e[1]=s):s=e[1];let n;return e[2]!==s?(n={suggestions:s},e[2]=s,e[3]=n):n=e[3],Vh(n)},Gh=ee(zh);function Hh(t,e){return je(e,Uh(t),[t])}function Wh(t){return{title:t.title??t.prompt,label:t.label??"",prompt:t.prompt}}const Kh=t=>{const e=R(6),{runtime:s,id:n,threadIdRef:r}=t;let i;e[0]!==n||e[1]!==s?(i=s.getMessageById(n),e[0]=n,e[1]=s,e[2]=i):i=e[2];const o=i;let a;return e[3]!==o||e[4]!==r?(a=Fh({runtime:o,threadIdRef:r}),e[3]=o,e[4]=r,e[5]=a):a=e[5],Ee(a)},Qh=ee(Kh),Jh=t=>{const e=R(64),{runtime:s}=t,n=vt(s),r=Vs();let i,o;e[0]!==r||e[1]!==s?(i=()=>{const I=[];for(const k of["runStart","runEnd","initialize","modelContextUpdate"]){const x=s.unstable_on(k,()=>{var P;const M=((P=s.getState())==null?void 0:P.threadId)||"unknown";r(`thread.${k}`,{threadId:M})});I.push(x)}return()=>{for(const k of I)k()}},o=[s,r],e[0]=r,e[1]=s,e[2]=i,e[3]=o):(i=e[2],o=e[3]),q(i,o);let a;e[4]!==s?(a=ka(()=>s.getState().threadId),e[4]=s,e[5]=a):a=e[5];const c=a;let l;e[6]!==s.composer||e[7]!==c?(l=Ra({runtime:s.composer,threadIdRef:c}),e[6]=s.composer,e[7]=c,e[8]=l):l=e[8];const d=Wt(l);let p;e[9]!==n.suggestions?(p=Gh(n.suggestions),e[9]=n.suggestions,e[10]=p):p=e[10];const u=Wt(p);let f;if(e[11]!==s||e[12]!==n.messages||e[13]!==c){let I;e[15]!==s||e[16]!==c?(I=k=>je(k.id,Qh({runtime:s,id:k.id,threadIdRef:c}),[s,k.id,c]),e[15]=s,e[16]=c,e[17]=I):I=e[17],f=n.messages.map(I),e[11]=s,e[12]=n.messages,e[13]=c,e[14]=f}else f=e[14];const m=ft(f),y=m.state.length===0&&!n.isLoading;let _;e[18]!==d.state||e[19]!==m.state||e[20]!==n.capabilities||e[21]!==n.extras||e[22]!==n.isDisabled||e[23]!==n.isLoading||e[24]!==n.isRunning||e[25]!==n.speech||e[26]!==n.state||e[27]!==n.suggestions||e[28]!==n.voice||e[29]!==y?(_={isEmpty:y,isDisabled:n.isDisabled,isLoading:n.isLoading,isRunning:n.isRunning,capabilities:n.capabilities,state:n.state,suggestions:n.suggestions,extras:n.extras,speech:n.speech,voice:n.voice,composer:d.state,messages:m.state},e[18]=d.state,e[19]=m.state,e[20]=n.capabilities,e[21]=n.extras,e[22]=n.isDisabled,e[23]=n.isLoading,e[24]=n.isRunning,e[25]=n.speech,e[26]=n.state,e[27]=n.suggestions,e[28]=n.voice,e[29]=y,e[30]=_):_=e[30];const S=_;let v;e[31]!==S?(v=()=>S,e[31]=S,e[32]=v):v=e[32];let w;e[33]!==d.methods?(w=()=>d.methods,e[33]=d.methods,e[34]=w):w=e[34];let T;e[35]!==u?(T=()=>u.methods,e[35]=u,e[36]=T):T=e[36];let E;e[37]!==m?(E=I=>"id"in I?m.get({key:I.id}):m.get(I),e[37]=m,e[38]=E):E=e[38];let A;e[39]!==s?(A=()=>s,e[39]=s,e[40]=A):A=e[40];let b;return e[41]!==s.append||e[42]!==s.cancelRun||e[43]!==s.connectVoice||e[44]!==s.deleteMessage||e[45]!==s.disconnectVoice||e[46]!==s.export||e[47]!==s.getModelContext||e[48]!==s.getVoiceVolume||e[49]!==s.import||e[50]!==s.importExternalState||e[51]!==s.muteVoice||e[52]!==s.reset||e[53]!==s.resumeRun||e[54]!==s.startRun||e[55]!==s.stopSpeaking||e[56]!==s.subscribeVoiceVolume||e[57]!==s.unmuteVoice||e[58]!==w||e[59]!==T||e[60]!==E||e[61]!==A||e[62]!==v?(b={getState:v,composer:w,suggestions:T,append:s.append,deleteMessage:s.deleteMessage,startRun:s.startRun,resumeRun:s.resumeRun,importExternalState:s.importExternalState,cancelRun:s.cancelRun,getModelContext:s.getModelContext,export:s.export,import:s.import,reset:s.reset,stopSpeaking:s.stopSpeaking,connectVoice:s.connectVoice,disconnectVoice:s.disconnectVoice,getVoiceVolume:s.getVoiceVolume,subscribeVoiceVolume:s.subscribeVoiceVolume,muteVoice:s.muteVoice,unmuteVoice:s.unmuteVoice,message:E,__internal_getRuntime:A},e[41]=s.append,e[42]=s.cancelRun,e[43]=s.connectVoice,e[44]=s.deleteMessage,e[45]=s.disconnectVoice,e[46]=s.export,e[47]=s.getModelContext,e[48]=s.getVoiceVolume,e[49]=s.import,e[50]=s.importExternalState,e[51]=s.muteVoice,e[52]=s.reset,e[53]=s.resumeRun,e[54]=s.startRun,e[55]=s.stopSpeaking,e[56]=s.subscribeVoiceVolume,e[57]=s.unmuteVoice,e[58]=w,e[59]=T,e[60]=E,e[61]=A,e[62]=v,e[63]=b):b=e[63],b},Yh=ee(Jh),Ke=(t,e)=>Ea(`thread list ${t}`,e),Xh=t=>{const e=R(35),{runtime:s,mainThreadIsRunning:n}=t,r=n===void 0?!1:n,i=vt(s);let o;e:{const k=i.isRunning||i.isMain&&r;if(k===i.isRunning){o=i;break e}let x;e[0]!==k||e[1]!==i?(x={...i,isRunning:k},e[0]=k,e[1]=i,e[2]=x):x=e[2],o=x}const a=o,c=Vs(),{isMain:l,id:d}=i;let p;e[3]!==l||e[4]!==d?(p={isMain:l,threadId:d},e[3]=l,e[4]=d,e[5]=p):p=e[5];const u=z(p);let f,m;e[6]!==c||e[7]!==l||e[8]!==d?(f=()=>{const k=u.current;k.isMain===l&&k.threadId===d||(u.current={isMain:l,threadId:d},c(l?"threadListItem.switchedTo":"threadListItem.switchedAway",{threadId:d}))},m=[l,d,c],e[6]=c,e[7]=l,e[8]=d,e[9]=f,e[10]=m):(f=e[9],m=e[10]),q(f,m);let y;e[11]!==a?(y=()=>a,e[11]=a,e[12]=y):y=e[12];let _,S,v,w,T,E,A;e[13]!==s?(T=k=>Ke("switch",()=>s.switchTo(k)),E=k=>Ke("rename",()=>s.rename(k)),A=k=>Ke("update custom metadata",()=>s.updateCustom(k)),_=()=>Ke("archive",()=>s.archive()),S=()=>Ke("unarchive",()=>s.unarchive()),v=()=>Ke("delete",()=>s.delete()),w=()=>Ke("generate title",()=>s.generateTitle()),e[13]=s,e[14]=_,e[15]=S,e[16]=v,e[17]=w,e[18]=T,e[19]=E,e[20]=A):(_=e[14],S=e[15],v=e[16],w=e[17],T=e[18],E=e[19],A=e[20]);let b;e[21]!==s?(b=()=>s,e[21]=s,e[22]=b):b=e[22];let I;return e[23]!==s.detach||e[24]!==s.initialize||e[25]!==_||e[26]!==S||e[27]!==v||e[28]!==w||e[29]!==b||e[30]!==y||e[31]!==T||e[32]!==E||e[33]!==A?(I={getState:y,switchTo:T,rename:E,updateCustom:A,archive:_,unarchive:S,delete:v,generateTitle:w,initialize:s.initialize,detach:s.detach,__internal_getRuntime:b},e[23]=s.detach,e[24]=s.initialize,e[25]=_,e[26]=S,e[27]=v,e[28]=w,e[29]=b,e[30]=y,e[31]=T,e[32]=E,e[33]=A,e[34]=I):I=e[34],I},fr=ee(Xh),Zh=t=>{const e=R(4),s=Vs(),n=z(t);let r,i;e[0]!==s||e[1]!==t?(r=()=>{const o=n.current;o!==t&&(n.current=t,s("threads.selectionChanged",{threadId:t,previousThreadId:o}))},i=[t,s],e[0]=s,e[1]=t,e[2]=r,e[3]=i):(r=e[2],i=e[3]),q(r,i)},ep=t=>{const e=R(6),{runtime:s,id:n,mainThreadIsRunning:r}=t;let i;e[0]!==n||e[1]!==s?(i=s.getItemById(n),e[0]=n,e[1]=s,e[2]=i):i=e[2];const o=i;let a;return e[3]!==r||e[4]!==o?(a=fr({runtime:o,mainThreadIsRunning:r}),e[3]=r,e[4]=o,e[5]=a):a=e[5],Ee(a)},tp=ee(ep),sp=t=>{const e=R(43),{runtime:s,__internal_assistantRuntime:n}=t,r=vt(s);Zh(r.mainThreadId);let i;e[0]!==s.main?(i=Yh({runtime:s.main}),e[0]=s.main,e[1]=i):i=e[1];const o=Wt(i);let a;e[2]!==o.state||e[3]!==s||e[4]!==r.threadItems?(a=Object.keys(r.threadItems).map(b=>je(b,tp({runtime:s,id:b,mainThreadIsRunning:o.state.isRunning}),[s,b,o.state.isRunning])),e[2]=o.state,e[3]=s,e[4]=r.threadItems,e[5]=a):a=e[5];const c=ft(a),l=r.newThreadId??null;let d;e[6]!==o.state||e[7]!==r.archivedThreadIds||e[8]!==r.hasMore||e[9]!==r.isLoading||e[10]!==r.isLoadingMore||e[11]!==r.mainThreadId||e[12]!==r.threadIds||e[13]!==l||e[14]!==c.state?(d={mainThreadId:r.mainThreadId,newThreadId:l,isLoading:r.isLoading,isLoadingMore:r.isLoadingMore,hasMore:r.hasMore,threadIds:r.threadIds,archivedThreadIds:r.archivedThreadIds,threadItems:c.state,main:o.state},e[6]=o.state,e[7]=r.archivedThreadIds,e[8]=r.hasMore,e[9]=r.isLoading,e[10]=r.isLoadingMore,e[11]=r.mainThreadId,e[12]=r.threadIds,e[13]=l,e[14]=c.state,e[15]=d):d=e[15];const p=d;let u;e[16]!==p?(u=()=>p,e[16]=p,e[17]=u):u=e[17];let f;e[18]!==o.methods?(f=()=>o.methods,e[18]=o.methods,e[19]=f):f=e[19];let m;e[20]!==p||e[21]!==c?(m=b=>{if(b==="main")return c.get({key:p.mainThreadId});if("id"in b)return c.get({key:b.id});const{index:I,archived:k}=b,x=k!==void 0&&k?p.archivedThreadIds[I]:p.threadIds[I];return c.get({key:x})},e[20]=p,e[21]=c,e[22]=m):m=e[22];let y,_,S,v,w,T;e[23]!==s?(w=(b,I)=>Ke("switch",()=>s.switchToThread(b,I)),T=()=>Ke("create",()=>s.switchToNewThread()),y=()=>s.getLoadThreadsPromise(),_=()=>s.reload(),S=()=>s.reloadMainThread(),v=()=>s.loadMore(),e[23]=s,e[24]=y,e[25]=_,e[26]=S,e[27]=v,e[28]=w,e[29]=T):(y=e[24],_=e[25],S=e[26],v=e[27],w=e[28],T=e[29]);let E;e[30]!==n?(E=()=>n,e[30]=n,e[31]=E):E=e[31];let A;return e[32]!==y||e[33]!==_||e[34]!==S||e[35]!==v||e[36]!==E||e[37]!==u||e[38]!==f||e[39]!==m||e[40]!==w||e[41]!==T?(A={getState:u,thread:f,item:m,switchToThread:w,switchToNewThread:T,getLoadThreadsPromise:y,reload:_,reloadMainThread:S,loadMore:v,__internal_getAssistantRuntime:E},e[32]=y,e[33]=_,e[34]=S,e[35]=v,e[36]=E,e[37]=u,e[38]=f,e[39]=m,e[40]=w,e[41]=T,e[42]=A):A=e[42],A},np=ee(sp),rp=(t,e)=>{t.thread??(t.thread=Ae({source:"threads",query:{type:"main"},get:s=>s.threads.thread("main")})),t.threadListItem??(t.threadListItem=Ae({source:"threads",query:{type:"main"},get:s=>s.threads.item("main")})),t.composer??(t.composer=Ae({source:"thread",query:{},get:s=>s.threads.thread("main").composer()})),!t.modelContext&&e.modelContext.source===null&&(t.modelContext=aa()),!t.suggestions&&e.suggestions.source===null&&(t.suggestions=Ae({source:"thread",query:{},get:s=>s.thread.suggestions()}))},Ma=t=>{const e=R(7),s=ma();let n;e[0]!==s||e[1]!==t?(n=()=>t.registerModelContextProvider(s.current.modelContext()),e[0]=s,e[1]=t,e[2]=n):n=e[2];let r;e[3]!==t?(r=[t],e[3]=t,e[4]=r):r=e[4],ga("modelContext",n,r);let i;return e[5]!==t?(i=np({runtime:t.threads,__internal_assistantRuntime:t}),e[5]=t,e[6]=i):i=e[6],Ee(i)},ip=ee(Ma),op=(t,e)=>{rp(t,e),!t.tools&&e.tools.source===null&&(t.tools=Sh({})),!t.dataRenderers&&e.dataRenderers.source===null&&(t.dataRenderers=Ed())};ha(Ma,op);const ap=Ne({}),ui=({effects:t})=>{"use no memo";return q(t),null},Fe=ie(function(e,s){"use no memo";const{config:n,children:r}=e,i="extends"in e,o="value"in e,a=lr(),c=i?e.extends??Ht:o?e.value??Ht:a,{client:l,effects:d}=xa(c,n??ap);return rd(s,()=>l,[l]),h.jsxs(cr.Provider,{value:l,children:[h.jsx(ui,{effects:Gd(c)}),d&&h.jsx(ui,{effects:d}),r]})}),cp=t=>{const e=W(),s=z(!1),n=s.current?null:t(e);return N(()=>s.current?t(e):n),()=>(s.current=!0,t(e))},lp=Object.freeze({});function jt(t){const e=R(3),{getItemState:s,children:n}=t,r=cp(s);let i;return e[0]!==n||e[1]!==r?(i=n(r),e[0]=n,e[1]=r,e[2]=i):i=e[2],up(i)}const up=t=>{const e=typeof t=="object"&&t!=null&&"type"in t?t:null,s=e==null?void 0:e.type,n=e==null?void 0:e.key,r=typeof(e==null?void 0:e.props)=="object"&&e.props!=null&&Object.entries(e.props).length===0?lp:e==null?void 0:e.props;return ne(()=>e,[s,n,r])??t},di=(t,e)=>{const s=R(11),n=W(),r=Ce(e);let i;s[0]!==t?(i=ur(t),s[0]=t,s[1]=i):i=s[1];const{scope:o,event:a}=i;let c;s[2]!==n||s[3]!==r||s[4]!==a||s[5]!==o?(c=()=>n.on({scope:o,event:a},r),s[2]=n,s[3]=r,s[4]=a,s[5]=o,s[6]=c):c=s[6];let l;s[7]!==n||s[8]!==a||s[9]!==o?(l=[n,o,a],s[7]=n,s[8]=a,s[9]=o,s[10]=l):l=s[10],q(c,l)},dp=t=>{var e;return(e=t._core)==null?void 0:e.RenderComponent},hp=({runtime:t,aui:e,config:s,children:n})=>{"use no memo";const r=dp(t),i=Ne({...s,threads:ip(t)});return h.jsxs(Fe,{extends:e,config:i,children:[r&&h.jsx(r,{}),n]})},pp=pe(t=>{const e=R(5),{runtime:s,aui:n,config:r,children:i}=t,o=n===void 0?null:n;let a;return e[0]!==o||e[1]!==i||e[2]!==r||e[3]!==s?(a=h.jsx(hp,{runtime:s,aui:o,config:r,children:i}),e[0]=o,e[1]=i,e[2]=r,e[3]=s,e[4]=a):a=e[4],a}),hi=t=>{let e;const s=new Set,n=(l,d)=>{const p=typeof l=="function"?l(e):l;if(!Object.is(p,e)){const u=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),s.forEach(f=>f(e,u))}},r=()=>e,a={setState:n,getState:r,getInitialState:()=>c,subscribe:l=>(s.add(l),()=>s.delete(l))},c=e=t(n,r,a);return a},fp=t=>t?hi(t):hi,mp=t=>t;function gp(t,e=mp){const s=Ie.useSyncExternalStore(t.subscribe,Ie.useCallback(()=>e(t.getState()),[t,e]),Ie.useCallback(()=>e(t.getInitialState()),[t,e]));return Ie.useDebugValue(s),s}const pi=t=>{const e=fp(t),s=n=>gp(e,n);return Object.assign(s,e),s},Kt=t=>t?pi(t):pi;function he(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}function mt(t,e=0){return e>100?!1:t===null||typeof t=="string"||typeof t=="boolean"?!0:typeof t=="number"?!Number.isNaN(t)&&Number.isFinite(t):Array.isArray(t)?t.every(s=>mt(s,e+1)):he(t)?Object.entries(t).every(([s,n])=>typeof s=="string"&&mt(n,e+1)):!1}const _p=100,An=(t,e,s)=>{if(t===e)return!0;if(s>_p||t==null||e==null)return!1;if(Array.isArray(t))return!Array.isArray(e)||t.length!==e.length?!1:t.every((i,o)=>An(i,e[o],s+1));if(Array.isArray(e)||!he(t)||!he(e))return!1;const n=Object.keys(t),r=Object.keys(e);return n.length!==r.length?!1:n.every(i=>Object.hasOwn(e,i)&&An(t[i],e[i],s+1))},Pa=(t,e)=>!mt(t)||!mt(e)?!1:An(t,e,0);function yp(t){const e=t.metadata;if(!e||typeof e!="object")return;const s=e.custom;if(!s||typeof s!="object")return;const n=s.interactables;return Array.isArray(n)?n:void 0}function bp(t){return`update_${t.replace(/[^a-zA-Z0-9_-]/g,"_")}`}const fi=t=>{if(!he(t))return;const e=t.id;return typeof e=="string"||typeof e=="number"?e:void 0};function vp(t,e,s){let n=Array.isArray(e.set)?[...e.set]:[...t];if(e.clear===!0&&(n=[]),Array.isArray(e.remove)&&e.remove.length>0){const i=new Set(e.remove);n=n.filter(o=>{const a=fi(o);return a!==void 0?!i.has(a):!i.has(o)})}const r=e.update;if(Array.isArray(r)&&r.length>0&&(n=n.map(i=>{const o=fi(i);if(o===void 0||!he(i))return i;const a=r.find(c=>he(c)&&c.id===o);return a?{...i,...a}:i})),Array.isArray(e.add)&&e.add.length>0){const i=s?e.add.map(o=>{if(!he(o)||o.id!==void 0)return o;const a=s();return a===void 0?o:{...o,id:a}}):e.add;n=[...n,...i]}return n}function Xs(t,e,s){if(!he(t)||!he(e))return e;const n=he(s==null?void 0:s.arrayBaseline)?s.arrayBaseline:t,r={...t};for(const[i,o]of Object.entries(e)){const a=n[i];Array.isArray(a)&&he(o)?r[i]=vp(a,o,s!=null&&s.idFactory&&(s.idKeyedFields===void 0||s.idKeyedFields.has(i))?()=>{var c;return(c=s.idFactory)==null?void 0:c.call(s,i)}:void 0):r[i]=o}return r}function xp(t,e){if(!he(t)||!he(e))return;for(const r of Object.keys(t))if(!(r in e))return;const s={};for(const[r,i]of Object.entries(e))(!(r in t)||!Pa(t[r],i))&&(s[r]=i);const n=Object.keys(s).length;if(!(n===0||n===Object.keys(e).length))return s}const Sp=t=>{if(!t||typeof t!="object")return;const e=t;return e.type==="tool-call"?e:void 0},Tp=(t,e)=>{if(!t.args||typeof t.args!="object")return!1;const s=he(t.result)?t.result:void 0;if((s==null?void 0:s.success)===!1)return!1;if(typeof(s==null?void 0:s.id)=="string")return s.id===e;const n=t.args.id;return n===e||n===void 0},wp=t=>{const e=he(t)?t.addedItemIds:void 0;if(!he(e))return;const s=new Map;for(const[n,r]of Object.entries(e)){if(!Array.isArray(r))continue;const i=r.filter(o=>typeof o=="string");i.length>0&&s.set(n,i)}if(s.size!==0)return n=>{var r;return(r=s.get(n))==null?void 0:r.shift()}},mi=new WeakMap;function Ip(t,e,s){var l;let n=mi.get(t);n||(n=new Map,mi.set(t,n));let r=n.get(s);r||(r=new Map,n.set(s,r));const i=r.get(e);if(i)return i;const o=bp(s),a=[],c=()=>a[a.length-1];for(const d of t){if(d.role==="user"){const p=(l=yp(d))==null?void 0:l.find(u=>u.id===e);if(!p)continue;if(p.partial){const u=c();u&&a.push({state:Xs(u.state,p.state),origin:"user-edit"})}else a.push({state:p.state,origin:"user-edit"});continue}if(d.role==="assistant")for(const p of d.content??[]){const u=Sp(p);if(u){if(u.toolCallId===e&&u.toolName===s)u.args&&typeof u.args=="object"&&a.push({state:u.args,origin:"create",toolCallId:e});else if(u.toolName===o&&Tp(u,e)){const f=c();if(f){const{id:m,...y}=u.args,_=wp(u.result);a.push({state:_?Xs(f.state,y,{idFactory:_}):Xs(f.state,y),origin:"update",toolCallId:u.toolCallId})}}}}}return r.set(e,a),a}function Cp(t,e,s){const n=Ip(t,e,s),r=n[n.length-1];return r?{state:r.state}:void 0}function Ep(t,e){if(!t)return;const{interactables:s,...n}=t,r={...n};if(Array.isArray(s)){const i=[];for(const o of s){const a=Cp(e,o.id,o.name);if(!a){i.push({id:o.id,name:o.name,state:o.state});continue}if(Pa(o.state,a.state))continue;const c=xp(a.state,o.state);i.push(c?{id:o.id,name:o.name,state:c,partial:!0}:{id:o.id,name:o.name,state:o.state})}i.length&&(r.interactables=i)}return Object.keys(r).length?r:void 0}const Rn={toResponse(t,e){return new Response(Rn.toByteStream(t,e),{headers:e.headers??{}})},fromResponse(t,e){return Rn.fromByteStream(t.body,e)},toByteStream(t,e){return t.pipeThrough(e)},fromByteStream(t,e){return t.pipeThrough(e)}},ja=()=>{let t,e;const s=new Promise((n,r)=>{t=n,e=r});if(!t||!e)throw new Error("Failed to create promise");return{promise:s,resolve:t,reject:e}},Ap=()=>{const t=[];let e=!1,s=!1,n=!1,r,i,o;const a=()=>(o??(o=Promise.all(t.splice(0).map(async l=>{try{await l.reader.cancel().catch(()=>{}),await l.pipeTask}finally{l.reader.releaseLock()}})).then(()=>{})),o),c=l=>{l.promise||(l.promise=l.reader.read().then(({done:d,value:p})=>{l.promise=void 0,!(s||n)&&(d?(t.splice(t.indexOf(l),1),l.reader.releaseLock(),e&&t.length===0&&r.close()):r.enqueue(p),i==null||i.resolve(),i=void 0)}).catch(d=>{s||n||(n=!0,console.error(d),a(),r.error(d),i==null||i.reject(d),i=void 0)}))};return{readable:new ReadableStream({start(l){r=l},pull(){return i=ja(),t.forEach(l=>{c(l)}),i.promise},async cancel(){s=!0;const l=a();i==null||i.resolve(),i=void 0,await l}}),isSealed(){return e},isCancelled(){return s},isErrored(){return n},seal(){e||s||n||(e=!0,t.length===0&&r.close())},addStream(l,d){const p=d==null?void 0:d.catch(()=>{});if(s||n){l.cancel().catch(()=>{});return}if(e)throw l.cancel().catch(()=>{}),new Error("Cannot add streams after the run callback has settled.");const u={reader:l.getReader(),pipeTask:p};t.push(u),c(u)},enqueue(l){this.addStream(new ReadableStream({start(d){d.enqueue(l),d.close()}}))}}},$a=t=>t instanceof TypeError,ct=(t,e,s)=>{try{t.enqueue(e)}catch(n){if(!$a(n))throw n;s==null||s(n)}},Da=t=>{try{t.close()}catch(e){if(!$a(e))throw e}},Na=(t,e)=>new ReadableStream({start(s){var n;return(n=t.start)==null?void 0:n.call(t,e(s))},pull(s){var n;return(n=t.pull)==null?void 0:n.call(t,e(s))},cancel(s){var n;return(n=t.cancel)==null?void 0:n.call(t,s)}}),Oa=(t,e)=>{let s;return[Na({start(n){s=n},cancel(n){return e==null?void 0:e(s,n)}},t),s]};var Ba=class{constructor(t,e={}){g(this,"_controller");g(this,"_strict");g(this,"_isClosed",!1);g(this,"_warnedDropped",!1);this._controller=t,this._strict=e.strict??!0}append(t){const e={type:"text-delta",path:[],textDelta:t};return this._strict?(this._controller.enqueue(e),this):(ct(this._controller,e,s=>{this._warnedDropped||(this._warnedDropped=!0,console.error(`Dropped text delta for closed stream: ${String(s)}`))}),this)}close(){this._isClosed||(this._isClosed=!0,ct(this._controller,{type:"part-finish",path:[]}),Da(this._controller))}};const Rp=(t,e={})=>Na(t,s=>new Ba(s,e)),gi=(t={})=>Oa(e=>new Ba(e,t)),_i=Symbol.for("aui.tool-response"),kn="<no result>";var kp=class Mn{constructor(e){g(this,"artifact");g(this,"result");g(this,"isError");g(this,"modelContent");g(this,"messages");e.artifact!==void 0&&(this.artifact=e.artifact);const s=e.result;this.result=s===void 0?kn:s,this.isError=e.isError??!1,e.modelContent!==void 0&&(this.modelContent=e.modelContent),e.messages!==void 0&&(this.messages=e.messages)}get[_i](){return!0}static[Symbol.hasInstance](e){return typeof e=="object"&&e!==null&&_i in e}static toResponse(e){return e instanceof Mn?e:new Mn({result:e===void 0?kn:e})}},Mp=class{constructor(t){g(this,"_isClosed",!1);g(this,"_mergeTask");g(this,"_controller");g(this,"_argsTextController");this._controller=t;const e=Rp({start:n=>{this._argsTextController=n}});let s=!1;this._mergeTask=e.pipeTo(new WritableStream({write:n=>{switch(n.type){case"text-delta":s=!0,ct(this._controller,n);break;case"part-finish":s||ct(this._controller,{type:"text-delta",textDelta:"{}",path:[]}),ct(this._controller,{type:"tool-call-args-text-finish",path:[]});break;default:throw new Error(`Unexpected chunk type: ${n.type}`)}}}))}get argsText(){return this._argsTextController}async setResponse(t){if(this._isClosed)return;const e=t.result;ct(this._controller,{type:"result",path:[],...t.artifact!==void 0?{artifact:t.artifact}:{},result:e===void 0?kn:e,isError:t.isError??!1,...t.modelContent!==void 0?{modelContent:t.modelContent}:{},...t.messages!==void 0?{messages:t.messages}:{}}),await this.close()}async close(){this._isClosed||(this._isClosed=!0,this._argsTextController.close(),await this._mergeTask,ct(this._controller,{type:"part-finish",path:[]}),Da(this._controller))}};const Pp=()=>Oa(t=>new Mp(t));var La=class{constructor(){g(this,"value",-1)}up(){return++this.value}},jp=class extends TransformStream{constructor(t){super({transform(e,s){s.enqueue({...e,path:[t,...e.path]})}})}};(class extends TransformStream{constructor(t){super({transform(e,s){const{path:[n,...r]}=e;if(t!==n)throw new Error(`Path mismatch: expected ${t}, got ${n}`);s.enqueue({...e,path:r})}})}});var $p=class extends TransformStream{constructor(t){const e=new La,s=new Map;super({transform(n,r){n.type==="part-start"&&n.path.length===0&&s.set(e.up(),t.up());const[i,...o]=n.path;if(i===void 0){r.enqueue(n);return}const a=s.get(i);if(a===void 0)throw new Error("Path not found");r.enqueue({...n,path:[a,...o]})}})}},Dp=class extends TransformStream{constructor(t){super();const e=t(super.readable);Object.defineProperty(this,"readable",{value:e,writable:!1})}},$t={exports:{}};const Np=typeof Buffer<"u",yi=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,bi=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Fa(t,e,s){s==null&&e!==null&&typeof e=="object"&&(s=e,e=void 0),Np&&Buffer.isBuffer(t)&&(t=t.toString()),t&&t.charCodeAt(0)===65279&&(t=t.slice(1));const n=JSON.parse(t,e);if(n===null||typeof n!="object")return n;const r=s&&s.protoAction||"error",i=s&&s.constructorAction||"error";if(r==="ignore"&&i==="ignore")return n;if(r!=="ignore"&&i!=="ignore"){if(yi.test(t)===!1&&bi.test(t)===!1)return n}else if(r!=="ignore"&&i==="ignore"){if(yi.test(t)===!1)return n}else if(bi.test(t)===!1)return n;return qa(n,{protoAction:r,constructorAction:i,safe:s&&s.safe})}function qa(t,{protoAction:e="error",constructorAction:s="error",safe:n}={}){let r=[t];for(;r.length;){const i=r;r=[];for(const o of i){if(e!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"__proto__")){if(n===!0)return null;if(e==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.__proto__}if(s!=="ignore"&&Object.prototype.hasOwnProperty.call(o,"constructor")&&o.constructor!==null&&typeof o.constructor=="object"&&Object.prototype.hasOwnProperty.call(o.constructor,"prototype")){if(n===!0)return null;if(s==="error")throw new SyntaxError("Object contains forbidden prototype property");delete o.constructor}for(const a in o){const c=o[a];c&&typeof c=="object"&&r.push(c)}}}return t}function mr(t,e,s){const{stackTraceLimit:n}=Error;Error.stackTraceLimit=0;try{return Fa(t,e,s)}finally{Error.stackTraceLimit=n}}function Op(t,e){const{stackTraceLimit:s}=Error;Error.stackTraceLimit=0;try{return Fa(t,e,{safe:!0})}catch{return}finally{Error.stackTraceLimit=s}}$t.exports=mr;$t.exports.default=mr;$t.exports.parse=mr;$t.exports.safeParse=Op;$t.exports.scan=qa;var Bp=$t.exports;const vi=ou(Bp);let Lp=(t,e=21)=>(s=e)=>{let n="",r=s|0;for(;r-- >0;)n+=t[Math.random()*t.length|0];return n};const Ua=Lp("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);var Fp=class Va{constructor(e,s={}){g(this,"_state");g(this,"_parentId");this._state=e||{strict:s.strict??!0,merger:Ap(),contentCounter:new La}}get __internal_isClosed(){return this._state.merger.isSealed()||this._state.merger.isCancelled()||this._state.merger.isErrored()}get __internal_isCancelled(){return this._state.merger.isCancelled()}__internal_getReadable(){return this._state.merger.readable}__internal_subscribeToClose(e){this._state.closeSubscriber=e}_addTransformedStream(e,s){if(e.locked)throw new TypeError("Cannot merge a stream that is already locked to a reader.");const n=e.pipeTo(s.writable).catch(async r=>{throw await s.writable.abort(r).catch(()=>{}),r});this._state.merger.addStream(s.readable,n)}_addPart(e,s){this._state.append&&(this._state.append.controller.close(),this._state.append=void 0),this.enqueue({type:"part-start",part:e,path:[]}),this._addTransformedStream(s,new jp(this._state.contentCounter.value))}merge(e){this._addTransformedStream(e,new $p(this._state.contentCounter))}appendText(e){var s;(((s=this._state.append)==null?void 0:s.kind)!=="text"||this._state.append.parentId!==this._parentId)&&(this._state.append={kind:"text",parentId:this._parentId,controller:this.addTextPart()}),this._state.append.controller.append(e)}appendReasoning(e,s){var n;(s!==void 0||((n=this._state.append)==null?void 0:n.kind)!=="reasoning"||this._state.append.parentId!==this._parentId)&&(this._state.append={kind:"reasoning",parentId:this._parentId,controller:this.addReasoningPart(s)}),!(s!==void 0&&e.length===0)&&this._state.append.controller.append(e)}addTextPart(){const[e,s]=gi({strict:this._state.strict});return this._addPart(this._withParentIdOption({type:"text"}),e),s}addReasoningPart(e){const[s,n]=gi({strict:this._state.strict});return this._addPart(this._withParentIdOption({type:"reasoning",...e}),s),n}addToolCallPart(e){const s=typeof e=="string"?{toolName:e}:e,n=s.toolName,r=s.toolCallId??Ua(),[i,o]=Pp();return this._addPart({type:"tool-call",toolName:n,toolCallId:r,...this._parentId&&{parentId:this._parentId}},i),s.argsText!==void 0&&(o.argsText.append(s.argsText),o.argsText.close()),s.args!==void 0&&(o.argsText.append(JSON.stringify(s.args)),o.argsText.close()),s.response!==void 0&&o.setResponse(s.response),o}_finishedPartStream(){return new ReadableStream({start(e){e.enqueue({type:"part-finish",path:[]}),e.close()}})}_withParentIdOption(e){return this._parentId?{...e,parentId:this._parentId}:e}appendSource(e){this._addPart(this._withParentIdOption(e),this._finishedPartStream())}appendFile(e){this._addPart(this._withParentIdOption(e),this._finishedPartStream())}appendData(e){this._addPart(this._withParentIdOption(e),this._finishedPartStream())}enqueue(e){this._state.merger.enqueue(e),e.type==="part-start"&&e.path.length===0&&this._state.contentCounter.up()}withParentId(e){const s=new Va(this._state);return s._parentId=e,s}close(){var e,s,n,r;(s=(e=this._state.append)==null?void 0:e.controller)==null||s.close(),this._state.merger.seal(),(r=(n=this._state).closeSubscriber)==null||r.call(n)}};function qp(t,e={}){const s=new Fp(void 0,e);return(async()=>{try{await t(s)}catch(r){s.__internal_isClosed?s.__internal_isCancelled||console.error(r):s.enqueue({type:"error",path:[],error:String(r)})}finally{s.__internal_isClosed||s.close()}})(),s.__internal_getReadable()}function Up(t={}){const{resolve:e,promise:s}=ja();let n;return[qp(r=>(n=r,n.__internal_subscribeToClose(e),s),t),n]}var Vp=class extends TransformStream{constructor(t,e,s){const[n,r]=Up({strict:t.strict});let i;super({start(o){var a;return i=n.pipeTo(new WritableStream({write(c){o.enqueue(c)},abort(c){o.error(c)},close(){o.terminate()}})).catch(c=>{o.error(c)}),(a=t.start)==null?void 0:a.call(t,r)},transform(o){var a;return(a=t.transform)==null?void 0:a.call(t,o,r)},async flush(){var o;await((o=t.flush)==null?void 0:o.call(t,r)),r.close(),await i}},e,s)}};const zp=/[0-9a-fA-F]/;function Gp(t){const e=["ROOT"];let s=-1,n=null,r=0;const i=[];let o;function a(){o!==void 0&&(i.push(JSON.parse(`"${o}"`)),o=void 0)}function c(u,f,m){switch(u){case'"':s=f,e.pop(),e.push(m),e.push("INSIDE_STRING"),a();break;case"f":case"t":case"n":s=f,n=f,e.pop(),e.push(m),e.push("INSIDE_LITERAL");break;case"-":e.pop(),e.push(m),e.push("INSIDE_NUMBER"),a();break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=f,e.pop(),e.push(m),e.push("INSIDE_NUMBER"),a();break;case"{":s=f,e.pop(),e.push(m),e.push("INSIDE_OBJECT_START"),a();break;case"[":s=f,e.pop(),e.push(m),e.push("INSIDE_ARRAY_START"),a()}}function l(u,f){switch(u){case",":e.pop(),e.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":s=f,e.pop(),o=i.pop()}}function d(u,f){switch(u){case",":e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA"),o=(Number(o)+1).toString();break;case"]":s=f,e.pop(),o=i.pop()}}for(let u=0;u<t.length;u++){const f=t[u];switch(e[e.length-1]){case"ROOT":c(f,u,"FINISH");break;case"INSIDE_OBJECT_START":switch(f){case'"':e.pop(),e.push("INSIDE_OBJECT_KEY"),o="";break;case"}":s=u,e.pop(),o=i.pop()}break;case"INSIDE_OBJECT_AFTER_COMMA":switch(f){case'"':e.pop(),e.push("INSIDE_OBJECT_KEY"),o=""}break;case"INSIDE_OBJECT_KEY":switch(f){case'"':e.pop(),e.push("INSIDE_OBJECT_AFTER_KEY");break;case"\\":e.push("INSIDE_STRING_ESCAPE"),o+=f;break;default:o+=f}break;case"INSIDE_OBJECT_AFTER_KEY":switch(f){case":":e.pop(),e.push("INSIDE_OBJECT_BEFORE_VALUE")}break;case"INSIDE_OBJECT_BEFORE_VALUE":c(f,u,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":l(f,u);break;case"INSIDE_STRING":switch(f){case'"':e.pop(),s=u,o=i.pop();break;case"\\":e.push("INSIDE_STRING_ESCAPE");break;default:s=u}break;case"INSIDE_ARRAY_START":switch(f){case"]":s=u,e.pop(),o=i.pop();break;default:o="0",c(f,u,"INSIDE_ARRAY_AFTER_VALUE")}break;case"INSIDE_ARRAY_AFTER_VALUE":switch(f){case",":e.pop(),e.push("INSIDE_ARRAY_AFTER_COMMA"),o=(Number(o)+1).toString();break;case"]":s=u,e.pop(),o=i.pop();break;default:s=u}break;case"INSIDE_ARRAY_AFTER_COMMA":c(f,u,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":{e.pop();const m=e[e.length-1];f==="u"?(e.push("INSIDE_STRING_UNICODE_ESCAPE"),r=0):m==="INSIDE_STRING"&&(s=u),m==="INSIDE_OBJECT_KEY"&&(o+=f);break}case"INSIDE_STRING_UNICODE_ESCAPE":{const m=e[e.length-2];if(!zp.test(f)){e.pop(),u--;break}r++,r===4&&(e.pop(),m==="INSIDE_STRING"&&(s=u)),m==="INSIDE_OBJECT_KEY"&&(o+=f);break}case"INSIDE_NUMBER":switch(f){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":s=u;break;case"e":case"E":case"-":case".":break;case",":e.pop(),o=i.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&d(f,u),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&l(f,u);break;case"}":e.pop(),o=i.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&l(f,u);break;case"]":e.pop(),o=i.pop(),e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&d(f,u);break;default:e.pop(),o=i.pop()}break;case"INSIDE_LITERAL":{const m=t.substring(n,u+1);!"false".startsWith(m)&&!"true".startsWith(m)&&!"null".startsWith(m)?(e.pop(),e[e.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?l(f,u):e[e.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&d(f,u)):s=u;break}}}let p=t.slice(0,s+1);for(let u=e.length-1;u>=0;u--)switch(e[u]){case"INSIDE_STRING":p+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":p+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":p+="]";break;case"INSIDE_LITERAL":{const f=t.substring(n,t.length);"true".startsWith(f)?p+="true".slice(f.length):"false".startsWith(f)?p+="false".slice(f.length):"null".startsWith(f)&&(p+="null".slice(f.length))}}return[p,i]}const Zs=Symbol("aui.parse-partial-json-object.meta"),za=t=>{if(t.length===0)return{[Zs]:{state:"partial",partialPath:[]}};try{const e=vi.parse(t);if(typeof e!="object"||e===null)throw new Error("argsText is expected to be an object");return e[Zs]={state:"complete",partialPath:[]},e}catch{try{const[e,s]=Gp(t),n=vi.parse(e);if(typeof n!="object"||n===null)throw new Error("argsText is expected to be an object");return n[Zs]={state:"partial",partialPath:s},n}catch{return}}};async function*Hp(){const t=this.getReader();let e=!0;try{for(;;){let s;try{s=await t.read()}catch(r){throw e=!1,r}if(s.done){e=!1;break}const{value:n}=s;yield n}}finally{try{e&&await t.cancel()}finally{t.releaseLock()}}}function Wp(t){var e;return t[e=Symbol.asyncIterator]??(t[e]=Hp),t}const ws=De(null),Kp=(t,e)=>Os(ws,t,e),Ga=()=>Re(ws),Qp={},Jp=t=>{const e=Ts(t??Qp);return t==null?null:e},Is=Symbol("innerMessage");let Yp=(t,e=21)=>(s=e)=>{let n="",r=s|0;for(;r-- >0;)n+=t[Math.random()*t.length|0];return n};const Le=Yp("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);function Xp(t){const e=t.match(/^data:([^;,]+)(?:;[^;,]+)*;base64,(.*)$/i);return e?{mimeType:e[1].toLowerCase(),data:e[2]}:null}const en=(t,e)=>{if(t.startsWith("data-"))return{type:"data",name:t.substring(5),data:e}},Cs=(t,e,s)=>{const{role:n,id:r,createdAt:i,attachments:o,status:a,metadata:c}=t,l={id:r??e,createdAt:i??new Date},d=typeof t.content=="string"?[{type:"text",text:t.content}]:t.content,p=({image:u,...f})=>{var m;return typeof u!="string"?null:(m=Xp(u))!=null&&m.mimeType.startsWith("image/")?{...f,image:u}:/^(https:\/\/|blob:)/i.test(u)?{...f,image:u}:(console.warn("Invalid image data format detected"),null)};if(n!=="user"&&(o!=null&&o.length))throw new Error("attachments are only supported for user messages");if(n!=="assistant"&&a)throw new Error("status is only supported for assistant messages");if(n!=="assistant"&&(c!=null&&c.steps))throw new Error("metadata.steps is only supported for assistant messages");switch(n){case"assistant":return{...l,role:n,content:d.map(u=>{var m,y,_;const f=u.type;switch(f){case"text":return(m=u.text)!=null&&m.trim()?u:null;case"reasoning":return!((y=u.text)!=null&&y.trim())&&!((_=u.unstable_summary)!=null&&_.trim())?null:u;case"file":case"source":return u;case"image":return p(u);case"data":return u;case"generative-ui":return u;case"tool-call":{const{parentId:S,messages:v,...w}=u,T={...w,toolCallId:u.toolCallId??`tool-${Le()}`,...S!==void 0&&{parentId:S},...v!==void 0&&{messages:v}};return u.args?{...T,args:u.args,argsText:u.argsText??JSON.stringify(u.args)}:{...T,args:za(u.argsText??"")??{},argsText:u.argsText??""}}default:{const S=en(f,u.data);if(S)return S;throw new Error(`Unsupported assistant message part type: ${f}`)}}}).filter(u=>!!u),status:a??s,metadata:{unstable_state:(c==null?void 0:c.unstable_state)??null,unstable_annotations:(c==null?void 0:c.unstable_annotations)??[],unstable_data:(c==null?void 0:c.unstable_data)??[],custom:(c==null?void 0:c.custom)??{},steps:(c==null?void 0:c.steps)??[],...(c==null?void 0:c.timing)&&{timing:c.timing},...(c==null?void 0:c.submittedFeedback)&&{submittedFeedback:c.submittedFeedback},...(c==null?void 0:c.isOptimistic)&&{isOptimistic:!0}}};case"user":return{...l,role:n,content:d.map(u=>{const f=u.type;switch(f){case"text":case"image":case"audio":case"file":case"data":return u;default:{const m=en(f,u.data);if(m)return m;throw new Error(`Unsupported user message part type: ${f}`)}}}),attachments:(o??[]).map(u=>({...u,content:u.content.map(f=>en(f.type,f.data)??f)})),metadata:{custom:(c==null?void 0:c.custom)??{},...(c==null?void 0:c.isOptimistic)&&{isOptimistic:!0}}};case"system":if(d.length!==1||d[0].type!=="text")throw new Error("System messages must have exactly one text message part.");return{...l,role:n,content:d,metadata:{custom:(c==null?void 0:c.custom)??{}}};default:throw new Error(`Unknown message role: ${n}`)}},Zp=t=>t.type==="tool-call"&&t.result===void 0,ef=t=>t.type!=="tool-call"||t.result!==void 0?!1:t.interrupt!=null||t.approval!=null&&t.approval.approved===void 0&&t.approval.resolution===void 0,zs=Symbol("autoStatus"),tf=Object.freeze(Object.assign({type:"running"},{[zs]:!0})),sf=Object.freeze(Object.assign({type:"complete",reason:"unknown"},{[zs]:!0})),nf=Object.freeze(Object.assign({type:"requires-action",reason:"tool-calls"},{[zs]:!0})),rf=Object.freeze(Object.assign({type:"requires-action",reason:"interrupt"},{[zs]:!0})),Ha=(t,e,s,n,r)=>t&&e?tf:s?rf:n?nf:sf,xi=(t,e,s)=>Ha(e,s,typeof t!="string"&&t.some(ef),typeof t!="string"&&t.some(Zp)),of=new Set(["__proto__","constructor","prototype"]);function af(t){if(of.has(t))throw new Error(`Unsafe gorp path segment: ${t}`)}var cf=class{constructor(t=null,e={}){g(this,"_state");g(this,"_strict");g(this,"_logged",new Set);g(this,"_warnedClamp",!1);this._state=t,this._strict=e.strict??!0}get state(){return this._state}logOnce(t,e){this._logged.has(t)||this._logged.size>=20||(this._logged.add(t),e())}append(t){this._state=t.reduce((e,s)=>{if(this._strict)return this.apply(e,s);try{return this.apply(e,s)}catch(n){return this.logOnce(`skip:${String(n)}`,()=>console.error(`Skipped unappliable gorp operation: ${String(n)}`,s)),e}},this._state)}apply(t,e){const s=e.type;switch(s){case"set":return this.updatePath(t,e.path,()=>e.value);case"append-text":return this.updatePath(t,e.path,n=>{if(typeof n!="string")throw new Error(`Expected string at path [${e.path.join(", ")}]`);return n+e.value});default:throw new Error(`Invalid operation type: ${s}`)}}updatePath(t,e,s){if(e.length===0)return s(t);if(t??(t={}),typeof t!="object")throw new Error(`Invalid path: [${e.join(", ")}]`);const[n,...r]=e;if(af(n),Array.isArray(t)){let o=Number(n);if(!Number.isInteger(o)||String(o)!==String(n))throw new Error(`Expected array index at [${e.join(", ")}]`);if(o<0)throw new Error("Insert array index out of bounds");if(o>t.length){if(this._strict)throw new Error("Insert array index out of bounds");this._warnedClamp||(this._warnedClamp=!0,console.warn(`Clamped out-of-bounds gorp array index ${o} to ${t.length}`)),o=Math.min(o,t.length)}const a=[...t];return a[o]=this.updatePath(Object.hasOwn(a,o)?a[o]:void 0,r,s),a}const i={...t};return i[n]=this.updatePath(Object.hasOwn(i,n)?i[n]:void 0,r,s),i}},lf=class{constructor(){g(this,"_streamStartTime");g(this,"_firstTokenTime");g(this,"_totalChunks",0);g(this,"_toolCallIds",new Set);this._streamStartTime=Date.now()}recordChunk(){this._totalChunks++}recordFirstToken(){this._firstTokenTime===void 0&&(this._firstTokenTime=Date.now())}recordToolCallStart(t){this._toolCallIds.add(t)}getTiming(t,e){const s=Date.now()-this._streamStartTime,n=t&&t>0?t:e?Math.ceil(e.length/4):void 0,r=n&&s>0?n/s*1e3:void 0;return{streamStartTime:this._streamStartTime,...this._firstTokenTime!==void 0?{firstTokenTime:this._firstTokenTime-this._streamStartTime}:void 0,totalStreamTime:s,...n!==void 0?{tokenCount:n}:void 0,...r!==void 0?{tokensPerSecond:r}:void 0,totalChunks:this._totalChunks,toolCallCount:this._toolCallIds.size}}};const Wa=(t,e)=>({...t,parts:e,get content(){return this.parts}}),It=(t,e)=>Wa(t,[...t.parts,e]),uf=({unstable_state:t=null}={})=>({role:"assistant",status:{type:"running"},parts:[],get content(){return this.parts},metadata:{unstable_state:t,unstable_data:[],unstable_annotations:[],steps:[],custom:{}}}),df=16,Gs=(t,e,s,n)=>{const r=e.path.length===1?t.parts[e.path[0]]:void 0;if(r===void 0)return s(`no-part:${e.type}`,`Dropped ${e.type} chunk: no part at path [${e.path.join(", ")}]`),t;const i=e.path[0],o=n(r);return o===r?t:Wa(t,[...t.parts.slice(0,i),o,...t.parts.slice(i+1)])},hf=(t,e,s)=>{const n=e.part;if(n.type==="text"||n.type==="reasoning"){const r={type:n.type,text:"",status:{type:"running"},...n.type==="reasoning"&&n.unstable_summary!==void 0?{unstable_summary:n.unstable_summary}:void 0,...n.parentId&&{parentId:n.parentId}};return It(t,r)}else if(n.type==="tool-call"){const r={type:"tool-call",state:"partial-call",status:{type:"running",isArgsComplete:!1},toolCallId:n.toolCallId,toolName:n.toolName,argsText:"",args:{},timing:{startedAt:Date.now()},...n.parentId&&{parentId:n.parentId}};return It(t,r)}else if(n.type==="source"){const r={type:"source",sourceType:n.sourceType,id:n.id,url:n.url,...n.title?{title:n.title}:void 0,...n.parentId&&{parentId:n.parentId}};return It(t,r)}else if(n.type==="file"){const r={type:"file",mimeType:n.mimeType,data:n.data,...n.parentId&&{parentId:n.parentId}};return It(t,r)}else if(n.type==="data"){const r={type:"data",name:n.name,data:n.data,...n.parentId&&{parentId:n.parentId}};return It(t,r)}else{const r=String(n.type);return s(`unsupported-part-start:${r}`,`Unsupported part-start type ${r}: inserting an empty reasoning part to preserve part indices`),It(t,{type:"reasoning",text:"",status:{type:"running"}})}},pf=(t,e,s)=>Gs(t,e,s,n=>n.type!=="tool-call"?(s("wrong-part:tool-call-args-text-finish","Dropped tool-call-args-text-finish chunk: part is not a tool-call"),n):n.state!=="partial-call"?{...n}:{...n,state:"call"}),ff=(t,e,s)=>Gs(t,e,s,n=>({...n,status:{type:"complete",reason:"unknown"}})),mf=(t,e,s)=>Gs(t,e,s,n=>{if(n.type==="text"||n.type==="reasoning")return{...n,text:n.text+e.textDelta};if(n.type==="tool-call"){const r=n.argsText+e.textDelta,i=za(r)??n.args;return{...n,argsText:r,args:i}}else return s("wrong-part:text-delta","Dropped text-delta chunk: part is neither text nor tool-call"),n}),gf=(t,e,s)=>Gs(t,e,s,n=>n.type==="tool-call"?{...n,state:"result",...n.timing!==void 0?{timing:{...n.timing,completedAt:n.timing.completedAt??Date.now()}}:{},...e.artifact!==void 0?{artifact:e.artifact}:{},result:e.result,isError:e.isError??!1,...e.modelContent!==void 0?{modelContent:e.modelContent}:{},...e.messages!==void 0?{messages:e.messages}:{},status:{type:"complete",reason:"stop"}}:(s("wrong-part:result","Dropped result chunk: part is not a tool-call"),n)),Si=(t,e)=>{var n,r;if(((n=t.status)==null?void 0:n.type)==="incomplete"&&((r=t.status)==null?void 0:r.reason)==="error")return t;const s=_f(e);return{...t,status:s}},_f=t=>t.finishReason==="tool-calls"?{type:"requires-action",reason:"tool-calls"}:t.finishReason==="stop"||t.finishReason==="unknown"?{type:"complete",reason:t.finishReason}:{type:"incomplete",reason:t.finishReason},yf=(t,e)=>({...t,metadata:{...t.metadata,unstable_annotations:[...t.metadata.unstable_annotations,...e.annotations]}}),bf=(t,e)=>({...t,metadata:{...t.metadata,unstable_data:[...t.metadata.unstable_data,...e.data]}}),vf=(t,e)=>({...t,metadata:{...t.metadata,steps:[...t.metadata.steps,{state:"started",messageId:e.messageId}]}}),xf=(t,e)=>{var r;const s=t.metadata.steps.slice(),n=s.length-1;return s.length>0&&((r=s[n])==null?void 0:r.state)==="started"?s[n]={...s[n],state:"finished",finishReason:e.finishReason,usage:e.usage,isContinued:e.isContinued}:s.push({state:"finished",messageId:Ua(),finishReason:e.finishReason,usage:e.usage,isContinued:e.isContinued}),{...t,metadata:{...t.metadata,steps:s}}},Sf=(t,e)=>{const s=e.severity==="critical"||e.severity==="warning"||e.severity==="info"?e.severity:void 0;return{...t,status:{type:"incomplete",reason:"error",error:{code:e.code??"unknown",message:e.error??"unknown error",...s!==void 0&&{severity:s}}}}},Tf=(t,e,s)=>(s.append(e.operations),{...t,metadata:{...t.metadata,unstable_state:s.state}}),Ti=(t,e)=>{let s=0;for(const r of e.metadata.steps)r.state==="finished"&&r.usage&&(s+=r.usage.outputTokens);let n="";for(const r of e.parts)(r.type==="text"||r.type==="reasoning")&&(n+=r.text);return t.getTiming(s>0?s:void 0,n||void 0)},wf=t=>{let e=!1;return()=>{e||(e=!0,queueMicrotask(()=>{e=!1,t()}))}};var If=class extends TransformStream{constructor({initialMessage:t,throttle:e,onError:s,strict:n=!0}={}){let r=t??uf(),i;const o=new lf,a=new Set,c=(p,u)=>{a.has(p)||a.size>=df||(a.add(p),console.warn(u))};let l;const d=e?wf(()=>{l==null||l.enqueue(r)}):()=>{l==null||l.enqueue(r)};super({start(p){l=p},transform(p){o.recordChunk();const u=p.type;switch(u){case"part-start":r=hf(r,p,c),p.part.type==="tool-call"&&o.recordToolCallStart(p.part.toolCallId);break;case"tool-call-args-text-finish":r=pf(r,p,c);break;case"part-finish":r=ff(r,p,c);break;case"text-delta":{const f=mf(r,p,c);f!==r&&o.recordFirstToken(),r=f;break}case"result":r=gf(r,p,c);break;case"message-finish":r=Si(r,p);break;case"annotations":r=yf(r,p);break;case"data":r=bf(r,p);break;case"step-start":r=vf(r,p);break;case"step-finish":r=xf(r,p);break;case"error":r=Sf(r,p),s==null||s(p.error);break;case"update-state":i??(i=new cf(r.metadata.unstable_state,{strict:n})),r=Tf(r,p,i);break;default:throw new Error(`Unsupported chunk type: ${u}`)}r.status.type!=="running"&&(r={...r,metadata:{...r.metadata,timing:Ti(o,r)}}),d()},flush(p){var u,f;if(((u=r.status)==null?void 0:u.type)==="running"){const m=((f=r.parts)==null?void 0:f.some(y=>y.type==="tool-call"&&(y.state==="call"||y.state==="partial-call")&&y.result===void 0))??!1;r=Si(r,{finishReason:m?"tool-calls":"unknown"}),r={...r,metadata:{...r.metadata,timing:Ti(o,r)}},p.enqueue(r)}}})}},Cf=class extends Dp{constructor(){super(t=>{const e=new Vp({transform(s,n){n.appendText(s)}});return t.pipeThrough(new TextDecoderStream).pipeThrough(e)})}},Ef=class _s{constructor(e){g(this,"readable");this.readable=e}static fromAssistantStream(e){return new _s(e.pipeThrough(new If))}async unstable_result(){let e;for await(const s of this)e=s;return e||{role:"assistant",status:{type:"complete",reason:"unknown"},parts:[],content:[],metadata:{unstable_state:null,unstable_data:[],unstable_annotations:[],steps:[],custom:{}}}}[Symbol.asyncIterator](){return Wp(this.readable)[Symbol.asyncIterator]()}tee(){const[e,s]=this.readable.tee();return[new _s(e),new _s(s)]}};const Ka=t=>{const e=R(6),{index:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({attachment:Ae({source:"message",query:{type:"index",index:s},get:c=>c.message.attachment({index:s})})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},Qa=t=>{const e=R(6),{index:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({attachment:Ae({source:"composer",query:{type:"index",index:s},get:c=>c.composer.attachment({index:s})})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},Af=t=>{const e=R(6),{runtime:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({threadListItem:fr({runtime:s})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},Ja=t=>{const e=R(6),{index:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({message:Ae({source:"thread",query:{type:"index",index:s},get:c=>c.thread.message({index:s})}),composer:Ae({source:"message",query:{},get:c=>c.thread.message({index:s}).composer()})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},gr=t=>{const e=R(6),{index:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({part:Ae({source:"message",query:{type:"index",index:s},get:c=>c.message.part({index:s})})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},Rf=t=>{const e=R(7),{text:s,isRunning:n}=t;let r;e[0]!==n?(r=n?{type:"running"}:{type:"complete"},e[0]=n,e[1]=r):r=e[1];let i;e[2]!==r||e[3]!==s?(i={type:"text",text:s,status:r},e[2]=r,e[3]=s,e[4]=i):i=e[4];const o=i;let a;return e[5]!==o?(a={getState:()=>o,addToolResult:Mf,resumeToolCall:Pf,respondToToolApproval:jf},e[5]=o,e[6]=a):a=e[6],a},kf=ee(Rf),_r=t=>{const e=R(7),{text:s,isRunning:n,children:r}=t,i=n===void 0?!1:n,o=W();let a;e[0]!==i||e[1]!==s?(a=Ne({part:kf({text:s,isRunning:i})}),e[0]=i,e[1]=s,e[2]=a):a=e[2];const c=a;let l;return e[3]!==o||e[4]!==r||e[5]!==c?(l=h.jsx(Fe,{extends:o,config:c,children:r}),e[3]=o,e[4]=r,e[5]=c,e[6]=l):l=e[6],l};function Mf(){throw new Error("Not supported")}function Pf(){throw new Error("Not supported")}function jf(){throw new Error("Not supported")}const nt=Object.freeze({type:"complete"}),Pn=Object.freeze({type:"running"}),$f=Object.freeze({cancelled:Object.freeze({type:"incomplete",reason:"cancelled"}),length:Object.freeze({type:"incomplete",reason:"length"}),"content-filter":Object.freeze({type:"incomplete",reason:"content-filter"}),other:Object.freeze({type:"incomplete",reason:"other"}),error:Object.freeze({type:"incomplete",reason:"error"})}),Df=t=>{const e=t.status;if(!e||typeof e!="object")return;const{type:s}=e;if(s==="running")return Pn;if(s==="complete")return nt;if(s!=="incomplete")return;const{reason:n}=e;return $f[n==="cancelled"||n==="length"||n==="content-filter"||n==="other"||n==="error"?n:"other"]},Nf=(t,e,s)=>{if(t.role!=="assistant")return nt;if(s.type==="tool-call")return s.result===void 0?t.status:nt;if(t.status.type==="running"){const r=Df(s);if(r)return r}const n=e===Math.max(0,t.content.length-1);return t.status.type==="requires-action"?nt:n?t.status:nt},Ya=(t,e)=>{var s,n,r;if(e){for(const o of e)if(((s=t[o])==null?void 0:s.status.type)==="running")return Pn;const i=e.at(-1);return i===void 0?nt:((n=t[i])==null?void 0:n.status)??nt}for(const i of t)if((i==null?void 0:i.status.type)==="running")return Pn;return((r=t.at(-1))==null?void 0:r.status)??nt},Of=t=>{const e=R(11),{parts:s,getMessagePart:n}=t,[r,i]=se(!0);let o;e[0]!==s?(o=Ya(s),e[0]=s,e[1]=o):o=e[1];const a=o;let c;e[2]!==r||e[3]!==s||e[4]!==a?(c={parts:s,collapsed:r,status:a},e[2]=r,e[3]=s,e[4]=a,e[5]=c):c=e[5];const l=c;let d;e[6]!==l?(d=()=>l,e[6]=l,e[7]=d):d=e[7];let p;return e[8]!==n||e[9]!==d?(p={getState:d,setCollapsed:i,part:n},e[8]=n,e[9]=d,e[10]=p):p=e[10],p},Bf=ee(Of),Lf=t=>{const e=R(4),{startIndex:s,endIndex:n,children:r}=t,i=N(Ff).slice(s,n+1),o=W(),a=Ne({chainOfThought:Bf({parts:i,getMessagePart:l=>{const{index:d}=l;if(d<0||d>=i.length)throw new Error(`ChainOfThought part index ${d} is out of bounds (0..${i.length-1})`);return o.message.part({index:s+d})}})});let c;return e[0]!==r||e[1]!==a||e[2]!==o?(c=h.jsx(Fe,{extends:o,config:a,children:r}),e[0]=r,e[1]=a,e[2]=o,e[3]=c):c=e[3],c};function Ff(t){return t.message.parts}const Xa=t=>{const e=R(6),{index:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({suggestion:Ae({source:"suggestions",query:{index:s},get:c=>c.suggestions.suggestion({index:s})})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},qf=t=>{const e=R(6),{index:s,children:n}=t,r=W();let i;e[0]!==s?(i=Ne({queueItem:Ae({source:"composer",query:{type:"index",index:s},get:c=>c.composer.queueItem({index:s})})}),e[0]=s,e[1]=i):i=e[1];const o=i;let a;return e[2]!==r||e[3]!==n||e[4]!==o?(a=h.jsx(Fe,{extends:r,config:o,children:n}),e[2]=r,e[3]=n,e[4]=o,e[5]=a):a=e[5],a},Uf=["critical","warning","info"],Vf=["inline","toast","silent","dev-only"],zf=t=>{if(typeof t!="object"||t===null)return!1;const e=t;return!(typeof e.code!="string"||typeof e.message!="string"||"severity"in e&&e.severity!==void 0&&(typeof e.severity!="string"||!Uf.includes(e.severity))||"display"in e&&e.display!==void 0&&(typeof e.display!="string"||!Vf.includes(e.display)))},Za=Symbol.for("assistant-ui.message-not-sent");var Io,Co,Gf=class extends(Co=Error,Io=Za,Co){constructor(e="The message was not sent."){super(e);g(this,Io,!0);this.name="MessageNotSentError"}};const ec=t=>typeof t=="object"&&t!==null&&Za in t,Hf=t=>{if(zf(t))return t;if(t instanceof Error)return{code:"unknown",message:t.message};if(typeof t=="string")return{code:"unknown",message:t};try{return{code:"unknown",message:`[${typeof t}] ${String(t)}`}}catch{return{code:"unknown",message:`[${typeof t}]`}}};var tc=class{constructor(t){g(this,"_core");this._core=t,this.__internal_bindMethods()}get path(){return this._core.path}__internal_bindMethods(){this.getState=this.getState.bind(this),this.remove=this.remove.bind(this),this.subscribe=this.subscribe.bind(this)}getState(){return this._core.getState()}subscribe(t){return this._core.subscribe(t)}},sc=class extends tc{constructor(e,s){super(e);g(this,"_composerApi");this._composerApi=s}remove(){const e=this._composerApi.getState();if(!e)throw new Error("Composer is not available");return e.removeAttachment(this.getState().id)}},Wf=class extends sc{get source(){return"thread-composer"}},Kf=class extends sc{get source(){return"edit-composer"}},Qf=class extends tc{get source(){return"message"}remove(){throw new Error("Message attachments cannot be removed")}};const Es=Object.freeze([]),nc=Object.freeze({}),Jf=t=>Object.freeze({type:"thread",isEditing:(t==null?void 0:t.isEditing)??!1,canCancel:(t==null?void 0:t.canCancel)??!1,canSend:(t==null?void 0:t.canSend)??!1,isEmpty:(t==null?void 0:t.isEmpty)??!0,attachments:(t==null?void 0:t.attachments)??Es,text:(t==null?void 0:t.text)??"",role:(t==null?void 0:t.role)??"user",runConfig:(t==null?void 0:t.runConfig)??nc,attachmentAccept:(t==null?void 0:t.attachmentAccept)??"",dictation:t==null?void 0:t.dictation,quote:t==null?void 0:t.quote,queue:(t==null?void 0:t.queue)??Es,value:(t==null?void 0:t.text)??""}),Yf=t=>Object.freeze({type:"edit",isEditing:(t==null?void 0:t.isEditing)??!1,canCancel:(t==null?void 0:t.canCancel)??!1,canSend:(t==null?void 0:t.canSend)??!1,isEmpty:(t==null?void 0:t.isEmpty)??!0,text:(t==null?void 0:t.text)??"",role:(t==null?void 0:t.role)??"user",attachments:(t==null?void 0:t.attachments)??Es,runConfig:(t==null?void 0:t.runConfig)??nc,attachmentAccept:(t==null?void 0:t.attachmentAccept)??"",dictation:t==null?void 0:t.dictation,quote:t==null?void 0:t.quote,queue:(t==null?void 0:t.queue)??Es,parentId:(t==null?void 0:t.parentId)??null,sourceId:(t==null?void 0:t.sourceId)??null,value:(t==null?void 0:t.text)??""});var rc=class{constructor(t){g(this,"_core");g(this,"_eventSubscriptionSubjects",new Map);this._core=t}get path(){return this._core.path}__internal_bindMethods(){this.setText=this.setText.bind(this),this.setRunConfig=this.setRunConfig.bind(this),this.getState=this.getState.bind(this),this.subscribe=this.subscribe.bind(this),this.addAttachment=this.addAttachment.bind(this),this.reset=this.reset.bind(this),this.clearAttachments=this.clearAttachments.bind(this),this.send=this.send.bind(this),this.cancel=this.cancel.bind(this),this.steerQueueItem=this.steerQueueItem.bind(this),this.moveQueueItem=this.moveQueueItem.bind(this),this.removeQueueItem=this.removeQueueItem.bind(this),this.setRole=this.setRole.bind(this),this.getAttachmentByIndex=this.getAttachmentByIndex.bind(this),this.startDictation=this.startDictation.bind(this),this.stopDictation=this.stopDictation.bind(this),this.setQuote=this.setQuote.bind(this),this.unstable_on=this.unstable_on.bind(this)}setText(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");e.setText(t)}setRunConfig(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");e.setRunConfig(t)}addAttachment(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");return e.addAttachment(t)}reset(){const t=this._core.getState();if(!t)throw new Error("Composer is not available");return t.reset()}clearAttachments(){const t=this._core.getState();if(!t)throw new Error("Composer is not available");return t.clearAttachments()}send(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");e.send(t)}cancel(){const t=this._core.getState();if(!t)throw new Error("Composer is not available");t.cancel()}steerQueueItem(t){this.moveQueueItem(t,{lane:"steer",insertAfter:null})}moveQueueItem(t,e){const s=this._core.getState();if(!s)throw new Error("Composer is not available");s.moveQueueItem(t,e)}removeQueueItem(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");e.removeQueueItem(t)}setRole(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");e.setRole(t)}startDictation(){const t=this._core.getState();if(!t)throw new Error("Composer is not available");t.startDictation()}stopDictation(){const t=this._core.getState();if(!t)throw new Error("Composer is not available");t.stopDictation()}setQuote(t){const e=this._core.getState();if(!e)throw new Error("Composer is not available");e.setQuote(t)}subscribe(t){return this._core.subscribe(t)}unstable_on(t,e){let s=this._eventSubscriptionSubjects.get(t);return s||(s=new ia({event:t,binding:this._core}),this._eventSubscriptionSubjects.set(t,s)),s.subscribe(e)}},Xf=class extends rc{constructor(e){const s=new ar({path:e.path,getState:()=>Jf(e.getState()),subscribe:n=>e.subscribe(n)});super({path:e.path,getState:()=>e.getState(),subscribe:n=>s.subscribe(n)});g(this,"_getState");this._getState=s.getState.bind(s),this.__internal_bindMethods()}get path(){return this._core.path}get type(){return"thread"}getState(){return this._getState()}getAttachmentByIndex(e){return new Wf(new Pe({path:{...this.path,attachmentSource:"thread-composer",attachmentSelector:{type:"index",index:e},ref:`${this.path.ref}.attachments[${e}]`},getState:()=>{const s=this.getState().attachments[e];return s?{...s,source:"thread-composer"}:$e},subscribe:s=>this._core.subscribe(s)}),this._core)}},Zf=class extends rc{constructor(e,s){const n=new ar({path:e.path,getState:()=>Yf(e.getState()),subscribe:r=>e.subscribe(r)});super({path:e.path,getState:()=>e.getState(),subscribe:r=>n.subscribe(r)});g(this,"_getState");g(this,"_beginEdit");this._beginEdit=s,this._getState=n.getState.bind(n),this.__internal_bindMethods()}get path(){return this._core.path}get type(){return"edit"}__internal_bindMethods(){super.__internal_bindMethods(),this.beginEdit=this.beginEdit.bind(this)}getState(){return this._getState()}beginEdit(){this._beginEdit()}getAttachmentByIndex(e){return new Kf(new Pe({path:{...this.path,attachmentSource:"edit-composer",attachmentSelector:{type:"index",index:e},ref:`${this.path.ref}.attachments[${e}]`},getState:()=>{const s=this.getState().attachments[e];return s?{...s,source:"edit-composer"}:$e},subscribe:s=>this._core.subscribe(s)}),this._core)}};const Hs=t=>t.content.filter(e=>e.type==="text").map(e=>e.text).join(`
4
4
 
@@ -1 +1 @@
1
- import{c as V,j as e,r,a as I,p as X,B as i,P as C,b as y,d as L,T as n,I as M,D as T,F as d,m as _,e as R,S as Y,f as F,M as E,g as v,G as q,A as Z,C as U,h as ee,R as D,i as K,k as P,l as te,n as O,o as G,q as se,s as oe,t as ie,u as re,v as le,w as ae}from"./index-BvGrOZeZ.js";const ne=V(e.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),ce=V(e.jsx("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"Restore"),de=V(e.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H6l-2 2V4h16z"}),"ChatBubbleOutline"),N={new_idea:{mark:"💡",label:"new idea",role:"done"},technical_solve:{mark:"🧩",label:"technical solve",role:"working"},howto:{mark:"🧭",label:"how it works",role:"working"},gotcha:{mark:"⚠️",label:"gotcha",role:"info"},decision:{mark:"⚖️",label:"decision",role:"done"},system:{mark:"🗄️",label:"system",role:"working"},people:{mark:"👤",label:"who to ask",role:"muted"}},xe=s=>N[s]||N.howto,Q=s=>{const o=Date.parse(String(s||"").replace(" ","T"));if(!o)return"";const a=Math.max(0,(Date.now()-o)/6e4);return a<1?"just now":a<60?`${Math.round(a)}m ago`:a<2880?`${Math.round(a/60)}h ago`:`${Math.round(a/1440)}d ago`},B=({children:s})=>e.jsx(n,{sx:{..._,fontSize:9.5,fontWeight:600,letterSpacing:".11em",textTransform:"uppercase",color:ee,mb:.75},children:s}),he=s=>/^(owner|you|dana whitfield)$/i.test(String(s||"").trim()),ue=({p:s,onChanged:o,onOpenTask:a})=>{const[c,p]=r.useState(!1),[x,f]=r.useState(null),[g,S]=r.useState(""),[w,z]=r.useState(!1),b=xe(s.Kind),W=r.useCallback(async()=>{try{f((await I.get(`/api/hub/${s.LoreId}`)).data)}catch{}},[s.LoreId]);r.useEffect(()=>{c&&!x&&W()},[c,x,W]);const h=async()=>{const t=g.trim();if(t){z(!0);try{const{data:H}=await I.post(`/api/hub/${s.LoreId}/comment`,{body:t});f(J=>({...J||s,comments:H.comments})),S(""),o==null||o()}catch{}z(!1)}},k=async t=>{try{await I.post(`/api/hub/${s.LoreId}/vote?up=${t}`),o==null||o()}catch{}},$=async()=>{try{await I.post(`/api/hub/${s.LoreId}/retire`),o==null||o()}catch{}},A=async()=>{try{await I.post(`/api/hub/${s.LoreId}/restore`),o==null||o()}catch{}},u=(x==null?void 0:x.comments)||[],l=s.Status&&s.Status!=="live",m=s.Score||0,j=s.MyVote||0;return e.jsxs(i,{sx:{border:`1px solid ${y}`,borderLeft:`2px solid ${l?y:D[b.role].solid}`,borderRadius:2,bgcolor:C,mb:1.25,overflow:"hidden",opacity:l?.8:1},children:[e.jsxs(i,{sx:{display:"flex",gap:1.25,p:1.5},children:[e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:0,flexShrink:0},children:[e.jsx(K,{size:"small",onClick:()=>k(!0),title:"holds up — agents are handed this sooner",sx:{p:{xs:.9,md:.25},color:j>0?P:d,"&:hover":{color:P}},children:e.jsx(te,{sx:{fontSize:{xs:20,md:16}}})}),e.jsx(n,{sx:{..._,fontSize:11.5,fontWeight:700,lineHeight:1,color:m>0?P:m<0?O:d},children:m}),e.jsx(K,{size:"small",onClick:()=>k(!1),title:"wrong or stale — below zero it is removed",sx:{p:{xs:.9,md:.25},color:j<0?O:d,"&:hover":{color:O}},children:e.jsx(ne,{sx:{fontSize:{xs:20,md:16}}})})]}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.85,mb:.4,flexWrap:"wrap"},children:[e.jsx(i,{component:"span","aria-hidden":!0,sx:{fontSize:13,lineHeight:1},children:b.mark}),e.jsx(n,{sx:{fontSize:14,fontWeight:600,color:M,letterSpacing:"-.15px",flex:1,minWidth:140},children:s.Title}),e.jsx(G,{size:"small",label:b.label,sx:{height:18,fontSize:10,bgcolor:D[b.role].soft,color:D[b.role].solid}}),e.jsx(G,{size:"small",label:s.Topic,sx:{height:18,fontSize:10,bgcolor:L,color:T}})]}),s.Body&&e.jsx(n,{sx:{fontSize:13,color:T,lineHeight:1.65,maxWidth:"72ch"},children:s.Body}),e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1.25,mt:.85,flexWrap:"wrap"},children:[e.jsxs(n,{variant:"caption",sx:{color:d,display:"flex",alignItems:"center",gap:.55},children:[e.jsx(se,{size:13}),he(s.Author)?"written by you":`agent ${s.Author||"unknown"}`," · ",Q(s.UpdatedAt)]}),s.TaskId?e.jsxs(v,{size:"small",variant:"outlined",onClick:()=>a==null?void 0:a(s.TaskId),sx:{height:23,px:.9,minWidth:0,fontSize:10.5,textTransform:"none",color:"#55697a",borderColor:y},children:["from TQ-",String(s.TaskId).padStart(4,"0")]}):e.jsx(n,{variant:"caption",sx:{color:d},children:"posted by hand"}),e.jsx(v,{size:"small",onClick:()=>p(t=>!t),startIcon:e.jsx(de,{sx:{fontSize:14}}),sx:{fontSize:11.5,color:T,minWidth:0},children:s.Comments?`${s.Comments} comment${s.Comments===1?"":"s"}`:"comment"}),e.jsx(i,{sx:{flex:1}}),l?e.jsx(v,{size:"small",onClick:A,startIcon:e.jsx(ce,{sx:{fontSize:14}}),sx:{fontSize:11,color:T,minWidth:0},title:s.Status==="downvoted"?"the vote took it off; put it back on the Hub":"put it back on the Hub",children:s.Status==="downvoted"?"voted off — restore":"removed — restore"}):e.jsx(v,{size:"small",onClick:$,sx:{fontSize:11,color:d,minWidth:0},title:"take it off the Hub now — kept under Removed, never deleted",children:"remove"})]})]})]}),c&&e.jsxs(i,{sx:{borderTop:`1px solid ${y}`,bgcolor:"#fcfaf7",px:1.5,py:1.25},children:[u.map(t=>e.jsxs(i,{sx:{mb:.85,pl:1.25,borderLeft:`2px solid ${y}`},children:[e.jsxs(n,{variant:"caption",sx:{color:d,display:"block"},children:[t.Author," · ",Q(t.CreatedAt)]}),e.jsx(n,{sx:{fontSize:12.5,color:M,lineHeight:1.6},children:t.Body})]},t.CommentId)),!u.length&&!x&&e.jsx(U,{size:14}),e.jsxs(i,{sx:{display:"flex",gap:1,mt:u.length?1:0},children:[e.jsx(R,{fullWidth:!0,size:"small",multiline:!0,maxRows:4,value:g,placeholder:"correct it, add to it, or say where it bit you",onChange:t=>S(t.target.value),sx:{"& .MuiInputBase-root":{fontSize:12.5,bgcolor:C}}}),e.jsx(v,{size:"small",variant:"contained",disableElevation:!0,disabled:w||!g.trim(),onClick:h,sx:{fontSize:12,background:q,alignSelf:"flex-end"},children:"Post"})]})]})]})},me=({open:s,onClose:o,onDone:a,topics:c})=>{var u;const[p,x]=r.useState(""),[f,g]=r.useState(""),[S,w]=r.useState(""),[z,b]=r.useState("new_idea"),[W,h]=r.useState(!1),[k,$]=r.useState(""),A=async()=>{var l,m;h(!0),$("");try{await I.post("/api/hub",{title:p.trim(),body:f.trim(),topic:S.trim(),kind:z}),x(""),g(""),a==null||a(),o==null||o()}catch(j){$(((m=(l=j==null?void 0:j.response)==null?void 0:l.data)==null?void 0:m.detail)||"That did not save")}h(!1)};return e.jsxs(oe,{open:!!s,onClose:o,fullWidth:!0,maxWidth:"sm",children:[e.jsxs(ie,{sx:{display:"flex",alignItems:"center",gap:1,pb:.5},children:[e.jsx(i,{sx:{flex:1},children:"Write it down"}),e.jsx(K,{size:"small",onClick:o,children:e.jsx(re,{sx:{fontSize:17}})})]}),e.jsxs(le,{sx:{display:"flex",flexDirection:"column",gap:2,pt:2},children:[e.jsxs(i,{children:[e.jsx(B,{children:"What is true"}),e.jsx(R,{fullWidth:!0,size:"small",value:p,autoFocus:!0,onChange:l=>x(l.target.value),placeholder:"Adjustment rows take the first line's date, not the batch date",error:p.length>140,helperText:p.length>100?`${p.length}/140`:" ",sx:{"& .MuiInputBase-root":{fontSize:13.5},"& .MuiFormHelperText-root":{textAlign:"right",m:0,mt:.25}}}),e.jsx(n,{variant:"caption",sx:{color:d,display:"block",lineHeight:1.6},children:"One line, the fact, not what you did about it. “I fixed the import” belongs on the task; “the import reads the first line's date” belongs here, and is still true next year."})]}),e.jsxs(i,{sx:{display:"flex",gap:1.25},children:[e.jsxs(i,{sx:{flex:1},children:[e.jsx(B,{children:"Topic"}),e.jsx(R,{fullWidth:!0,size:"small",value:S,onChange:l=>w(l.target.value),placeholder:((u=c[0])==null?void 0:u.Topic)||"payroll",sx:{"& .MuiInputBase-root":{fontSize:13}}})]}),e.jsxs(i,{sx:{width:180},children:[e.jsx(B,{children:"Kind"}),e.jsx(F,{size:"small",fullWidth:!0,value:z,onChange:l=>b(l.target.value),sx:{fontSize:13},children:Object.entries(N).map(([l,m])=>e.jsxs(E,{value:l,sx:{fontSize:12.5},children:[m.mark," ",m.label]},l))})]})]}),e.jsxs(i,{children:[e.jsx(B,{children:"Why, and what to do about it"}),e.jsx(R,{fullWidth:!0,multiline:!0,minRows:3,value:f,onChange:l=>g(l.target.value),placeholder:"Two or three sentences. Name the file, the system, the id, the person.",error:f.length>700,helperText:f.length>500?`${f.length}/700`:" ",sx:{"& .MuiInputBase-root":{fontSize:13},"& .MuiFormHelperText-root":{textAlign:"right",m:0,mt:.25}}})]}),k&&e.jsx(ae,{severity:"error",sx:{py:.25,fontSize:12.5},children:k})]}),e.jsxs(i,{sx:{display:"flex",gap:1,justifyContent:"flex-end",px:3,py:1.75,borderTop:`1px solid ${y}`,bgcolor:L},children:[e.jsx(v,{size:"small",onClick:o,sx:{color:T},children:"Cancel"}),e.jsx(v,{size:"small",variant:"contained",disableElevation:!0,disabled:W||!p.trim()||p.length>140||f.length>700,onClick:A,sx:{background:q},children:"Post it"})]})]})};function fe({onOpenTask:s}){var j;const[o,a]=r.useState(null),[c,p]=r.useState(""),[x,f]=r.useState(""),[g,S]=r.useState(""),[w,z]=r.useState(""),[b,W]=r.useState("new"),[h,k]=r.useState(!1),[$,A]=r.useState(!1),u=r.useCallback(async()=>{try{const{data:t}=await I.get("/api/hub",{params:{topic:c||void 0,q:g||void 0,kind:x||void 0,sort:b,status:h?"removed":"live"}});a(t)}catch{a({topics:[],data:[],count:{posts:0,topics:0,comments:0}})}},[c,g,x,b,h]);r.useEffect(()=>(u(),X(u,3e4)),[u]),r.useEffect(()=>{const t=setTimeout(()=>S(w.trim()),300);return()=>clearTimeout(t)},[w]);const l=(o==null?void 0:o.topics)||[],m=(o==null?void 0:o.data)||[];return e.jsxs(i,{sx:{display:"grid",gap:2,alignItems:"start",gridTemplateColumns:{xs:"minmax(0,1fr)",md:"220px minmax(0,1fr)"}},children:[e.jsxs(i,{sx:{position:{md:"sticky"},top:{md:70}},children:[e.jsx(B,{children:"Topics"}),e.jsxs(i,{sx:{border:`1px solid ${y}`,borderRadius:2,bgcolor:C,overflow:"hidden"},children:[[{Topic:"",n:((j=o==null?void 0:o.count)==null?void 0:j.posts)||0},...l].map((t,H)=>e.jsxs(i,{onClick:()=>p(t.Topic),sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.85,cursor:"pointer",borderTop:H?`1px solid ${y}`:"none",bgcolor:c===t.Topic?L:"transparent","&:hover":{bgcolor:c===t.Topic?L:"#fcfaf7"}},children:[e.jsx(n,{sx:{fontSize:12.5,fontWeight:c===t.Topic?600:400,color:c===t.Topic?M:T,flex:1,minWidth:0},noWrap:!0,children:t.Topic||"everything"}),e.jsx(n,{sx:{..._,fontSize:10.5,color:d},children:t.n})]},t.Topic||"all")),!l.length&&e.jsx(n,{variant:"caption",sx:{color:d,display:"block",px:1.25,py:1.25,lineHeight:1.6},children:"No topics yet. They appear as the agents file things."})]})]}),e.jsxs(i,{sx:{minWidth:0},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1.25,mb:1.5,flexWrap:"wrap"},children:[e.jsxs(i,{sx:{minWidth:0},children:[e.jsx(n,{sx:{fontSize:15,fontWeight:800,color:M},children:h?"Removed from Hub":"Hub"}),e.jsx(n,{variant:"caption",sx:{color:d},children:o?h?"voted below zero, or taken off by you — kept here, restorable":`${o.count.posts} posts · ${o.count.topics} topics · ${o.count.comments} comments — hard-earned discoveries and developed ideas, discussed by people and agents`:"loading…"})]}),e.jsx(i,{sx:{flex:1}}),e.jsx(R,{size:"small",value:w,onChange:t=>z(t.target.value),placeholder:"search Hub…",InputProps:{startAdornment:e.jsx(Y,{sx:{fontSize:16,color:d,mr:.75}})},sx:{width:{xs:"100%",sm:260},"& .MuiInputBase-root":{fontSize:12.5,bgcolor:C}}}),e.jsxs(F,{size:"small",value:b,onChange:t=>W(t.target.value),sx:{fontSize:12,bgcolor:C,height:34},children:[e.jsx(E,{value:"new",sx:{fontSize:12.5},children:"newest"}),e.jsx(E,{value:"top",sx:{fontSize:12.5},children:"top voted"})]}),e.jsxs(F,{size:"small",value:x,onChange:t=>f(t.target.value),displayEmpty:!0,sx:{fontSize:12,bgcolor:C,height:34,minWidth:128},children:[e.jsx(E,{value:"",sx:{fontSize:12.5},children:"all tags"}),Object.entries(N).map(([t,H])=>e.jsxs(E,{value:t,sx:{fontSize:12.5},children:[H.mark," ",H.label]},t))]}),e.jsx(v,{size:"small",onClick:()=>k(t=>!t),sx:{fontSize:11.5,color:h?M:d,minWidth:0},title:"what the vote took off, or you did - never deleted",children:h?"back to Hub":"removed"}),e.jsx(v,{size:"small",variant:"contained",disableElevation:!0,startIcon:e.jsx(Z,{sx:{fontSize:16}}),onClick:()=>A(!0),sx:{background:q,fontSize:12.5},children:"Write one"})]}),o?m.length?m.map(t=>e.jsx(ue,{p:t,onChanged:u,onOpenTask:s},t.LoreId)):e.jsxs(i,{sx:{border:`1px dashed ${y}`,borderRadius:2,p:4,textAlign:"center"},children:[e.jsx(n,{sx:{fontSize:13.5,fontWeight:600,color:T,mb:.75},children:h?"Nothing has been voted off":g||c?"Nothing here matches that":"Nothing posted yet"}),e.jsx(n,{variant:"caption",sx:{color:d,lineHeight:1.7,display:"block",maxWidth:460,mx:"auto"},children:h?"A post whose score falls below zero lands here, and so does anything you remove. Restore puts it back.":g||c?"Try a different word, or clear the topic.":"People and agents post only hard-earned discoveries or developed company ideas—not routine task output or raw brainstorming. Anyone can comment, upvote what held up, and downvote what did not. Every agent starts with the best-matching, top-voted Hub posts."})]}):e.jsx(U,{size:22,sx:{m:4}})]}),e.jsx(me,{open:$,onClose:()=>A(!1),onDone:u,topics:l})]})}export{fe as default};
1
+ import{c as V,j as e,r,a as I,p as X,B as i,P as C,b as y,d as L,T as n,I as M,D as T,F as d,m as _,e as R,S as Y,f as F,M as E,g as v,G as q,A as Z,C as U,h as ee,R as D,i as K,k as P,l as te,n as O,o as G,q as se,s as oe,t as ie,u as re,v as le,w as ae}from"./index-tOOOCTXp.js";const ne=V(e.jsx("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8z"}),"ArrowDownward"),ce=V(e.jsx("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"Restore"),de=V(e.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H6l-2 2V4h16z"}),"ChatBubbleOutline"),N={new_idea:{mark:"💡",label:"new idea",role:"done"},technical_solve:{mark:"🧩",label:"technical solve",role:"working"},howto:{mark:"🧭",label:"how it works",role:"working"},gotcha:{mark:"⚠️",label:"gotcha",role:"info"},decision:{mark:"⚖️",label:"decision",role:"done"},system:{mark:"🗄️",label:"system",role:"working"},people:{mark:"👤",label:"who to ask",role:"muted"}},xe=s=>N[s]||N.howto,Q=s=>{const o=Date.parse(String(s||"").replace(" ","T"));if(!o)return"";const a=Math.max(0,(Date.now()-o)/6e4);return a<1?"just now":a<60?`${Math.round(a)}m ago`:a<2880?`${Math.round(a/60)}h ago`:`${Math.round(a/1440)}d ago`},B=({children:s})=>e.jsx(n,{sx:{..._,fontSize:9.5,fontWeight:600,letterSpacing:".11em",textTransform:"uppercase",color:ee,mb:.75},children:s}),he=s=>/^(owner|you|dana whitfield)$/i.test(String(s||"").trim()),ue=({p:s,onChanged:o,onOpenTask:a})=>{const[c,p]=r.useState(!1),[x,f]=r.useState(null),[g,S]=r.useState(""),[w,z]=r.useState(!1),b=xe(s.Kind),W=r.useCallback(async()=>{try{f((await I.get(`/api/hub/${s.LoreId}`)).data)}catch{}},[s.LoreId]);r.useEffect(()=>{c&&!x&&W()},[c,x,W]);const h=async()=>{const t=g.trim();if(t){z(!0);try{const{data:H}=await I.post(`/api/hub/${s.LoreId}/comment`,{body:t});f(J=>({...J||s,comments:H.comments})),S(""),o==null||o()}catch{}z(!1)}},k=async t=>{try{await I.post(`/api/hub/${s.LoreId}/vote?up=${t}`),o==null||o()}catch{}},$=async()=>{try{await I.post(`/api/hub/${s.LoreId}/retire`),o==null||o()}catch{}},A=async()=>{try{await I.post(`/api/hub/${s.LoreId}/restore`),o==null||o()}catch{}},u=(x==null?void 0:x.comments)||[],l=s.Status&&s.Status!=="live",m=s.Score||0,j=s.MyVote||0;return e.jsxs(i,{sx:{border:`1px solid ${y}`,borderLeft:`2px solid ${l?y:D[b.role].solid}`,borderRadius:2,bgcolor:C,mb:1.25,overflow:"hidden",opacity:l?.8:1},children:[e.jsxs(i,{sx:{display:"flex",gap:1.25,p:1.5},children:[e.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:0,flexShrink:0},children:[e.jsx(K,{size:"small",onClick:()=>k(!0),title:"holds up — agents are handed this sooner",sx:{p:{xs:.9,md:.25},color:j>0?P:d,"&:hover":{color:P}},children:e.jsx(te,{sx:{fontSize:{xs:20,md:16}}})}),e.jsx(n,{sx:{..._,fontSize:11.5,fontWeight:700,lineHeight:1,color:m>0?P:m<0?O:d},children:m}),e.jsx(K,{size:"small",onClick:()=>k(!1),title:"wrong or stale — below zero it is removed",sx:{p:{xs:.9,md:.25},color:j<0?O:d,"&:hover":{color:O}},children:e.jsx(ne,{sx:{fontSize:{xs:20,md:16}}})})]}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.85,mb:.4,flexWrap:"wrap"},children:[e.jsx(i,{component:"span","aria-hidden":!0,sx:{fontSize:13,lineHeight:1},children:b.mark}),e.jsx(n,{sx:{fontSize:14,fontWeight:600,color:M,letterSpacing:"-.15px",flex:1,minWidth:140},children:s.Title}),e.jsx(G,{size:"small",label:b.label,sx:{height:18,fontSize:10,bgcolor:D[b.role].soft,color:D[b.role].solid}}),e.jsx(G,{size:"small",label:s.Topic,sx:{height:18,fontSize:10,bgcolor:L,color:T}})]}),s.Body&&e.jsx(n,{sx:{fontSize:13,color:T,lineHeight:1.65,maxWidth:"72ch"},children:s.Body}),e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1.25,mt:.85,flexWrap:"wrap"},children:[e.jsxs(n,{variant:"caption",sx:{color:d,display:"flex",alignItems:"center",gap:.55},children:[e.jsx(se,{size:13}),he(s.Author)?"written by you":`agent ${s.Author||"unknown"}`," · ",Q(s.UpdatedAt)]}),s.TaskId?e.jsxs(v,{size:"small",variant:"outlined",onClick:()=>a==null?void 0:a(s.TaskId),sx:{height:23,px:.9,minWidth:0,fontSize:10.5,textTransform:"none",color:"#55697a",borderColor:y},children:["from TQ-",String(s.TaskId).padStart(4,"0")]}):e.jsx(n,{variant:"caption",sx:{color:d},children:"posted by hand"}),e.jsx(v,{size:"small",onClick:()=>p(t=>!t),startIcon:e.jsx(de,{sx:{fontSize:14}}),sx:{fontSize:11.5,color:T,minWidth:0},children:s.Comments?`${s.Comments} comment${s.Comments===1?"":"s"}`:"comment"}),e.jsx(i,{sx:{flex:1}}),l?e.jsx(v,{size:"small",onClick:A,startIcon:e.jsx(ce,{sx:{fontSize:14}}),sx:{fontSize:11,color:T,minWidth:0},title:s.Status==="downvoted"?"the vote took it off; put it back on the Hub":"put it back on the Hub",children:s.Status==="downvoted"?"voted off — restore":"removed — restore"}):e.jsx(v,{size:"small",onClick:$,sx:{fontSize:11,color:d,minWidth:0},title:"take it off the Hub now — kept under Removed, never deleted",children:"remove"})]})]})]}),c&&e.jsxs(i,{sx:{borderTop:`1px solid ${y}`,bgcolor:"#fcfaf7",px:1.5,py:1.25},children:[u.map(t=>e.jsxs(i,{sx:{mb:.85,pl:1.25,borderLeft:`2px solid ${y}`},children:[e.jsxs(n,{variant:"caption",sx:{color:d,display:"block"},children:[t.Author," · ",Q(t.CreatedAt)]}),e.jsx(n,{sx:{fontSize:12.5,color:M,lineHeight:1.6},children:t.Body})]},t.CommentId)),!u.length&&!x&&e.jsx(U,{size:14}),e.jsxs(i,{sx:{display:"flex",gap:1,mt:u.length?1:0},children:[e.jsx(R,{fullWidth:!0,size:"small",multiline:!0,maxRows:4,value:g,placeholder:"correct it, add to it, or say where it bit you",onChange:t=>S(t.target.value),sx:{"& .MuiInputBase-root":{fontSize:12.5,bgcolor:C}}}),e.jsx(v,{size:"small",variant:"contained",disableElevation:!0,disabled:w||!g.trim(),onClick:h,sx:{fontSize:12,background:q,alignSelf:"flex-end"},children:"Post"})]})]})]})},me=({open:s,onClose:o,onDone:a,topics:c})=>{var u;const[p,x]=r.useState(""),[f,g]=r.useState(""),[S,w]=r.useState(""),[z,b]=r.useState("new_idea"),[W,h]=r.useState(!1),[k,$]=r.useState(""),A=async()=>{var l,m;h(!0),$("");try{await I.post("/api/hub",{title:p.trim(),body:f.trim(),topic:S.trim(),kind:z}),x(""),g(""),a==null||a(),o==null||o()}catch(j){$(((m=(l=j==null?void 0:j.response)==null?void 0:l.data)==null?void 0:m.detail)||"That did not save")}h(!1)};return e.jsxs(oe,{open:!!s,onClose:o,fullWidth:!0,maxWidth:"sm",children:[e.jsxs(ie,{sx:{display:"flex",alignItems:"center",gap:1,pb:.5},children:[e.jsx(i,{sx:{flex:1},children:"Write it down"}),e.jsx(K,{size:"small",onClick:o,children:e.jsx(re,{sx:{fontSize:17}})})]}),e.jsxs(le,{sx:{display:"flex",flexDirection:"column",gap:2,pt:2},children:[e.jsxs(i,{children:[e.jsx(B,{children:"What is true"}),e.jsx(R,{fullWidth:!0,size:"small",value:p,autoFocus:!0,onChange:l=>x(l.target.value),placeholder:"Adjustment rows take the first line's date, not the batch date",error:p.length>140,helperText:p.length>100?`${p.length}/140`:" ",sx:{"& .MuiInputBase-root":{fontSize:13.5},"& .MuiFormHelperText-root":{textAlign:"right",m:0,mt:.25}}}),e.jsx(n,{variant:"caption",sx:{color:d,display:"block",lineHeight:1.6},children:"One line, the fact, not what you did about it. “I fixed the import” belongs on the task; “the import reads the first line's date” belongs here, and is still true next year."})]}),e.jsxs(i,{sx:{display:"flex",gap:1.25},children:[e.jsxs(i,{sx:{flex:1},children:[e.jsx(B,{children:"Topic"}),e.jsx(R,{fullWidth:!0,size:"small",value:S,onChange:l=>w(l.target.value),placeholder:((u=c[0])==null?void 0:u.Topic)||"payroll",sx:{"& .MuiInputBase-root":{fontSize:13}}})]}),e.jsxs(i,{sx:{width:180},children:[e.jsx(B,{children:"Kind"}),e.jsx(F,{size:"small",fullWidth:!0,value:z,onChange:l=>b(l.target.value),sx:{fontSize:13},children:Object.entries(N).map(([l,m])=>e.jsxs(E,{value:l,sx:{fontSize:12.5},children:[m.mark," ",m.label]},l))})]})]}),e.jsxs(i,{children:[e.jsx(B,{children:"Why, and what to do about it"}),e.jsx(R,{fullWidth:!0,multiline:!0,minRows:3,value:f,onChange:l=>g(l.target.value),placeholder:"Two or three sentences. Name the file, the system, the id, the person.",error:f.length>700,helperText:f.length>500?`${f.length}/700`:" ",sx:{"& .MuiInputBase-root":{fontSize:13},"& .MuiFormHelperText-root":{textAlign:"right",m:0,mt:.25}}})]}),k&&e.jsx(ae,{severity:"error",sx:{py:.25,fontSize:12.5},children:k})]}),e.jsxs(i,{sx:{display:"flex",gap:1,justifyContent:"flex-end",px:3,py:1.75,borderTop:`1px solid ${y}`,bgcolor:L},children:[e.jsx(v,{size:"small",onClick:o,sx:{color:T},children:"Cancel"}),e.jsx(v,{size:"small",variant:"contained",disableElevation:!0,disabled:W||!p.trim()||p.length>140||f.length>700,onClick:A,sx:{background:q},children:"Post it"})]})]})};function fe({onOpenTask:s}){var j;const[o,a]=r.useState(null),[c,p]=r.useState(""),[x,f]=r.useState(""),[g,S]=r.useState(""),[w,z]=r.useState(""),[b,W]=r.useState("new"),[h,k]=r.useState(!1),[$,A]=r.useState(!1),u=r.useCallback(async()=>{try{const{data:t}=await I.get("/api/hub",{params:{topic:c||void 0,q:g||void 0,kind:x||void 0,sort:b,status:h?"removed":"live"}});a(t)}catch{a({topics:[],data:[],count:{posts:0,topics:0,comments:0}})}},[c,g,x,b,h]);r.useEffect(()=>(u(),X(u,3e4)),[u]),r.useEffect(()=>{const t=setTimeout(()=>S(w.trim()),300);return()=>clearTimeout(t)},[w]);const l=(o==null?void 0:o.topics)||[],m=(o==null?void 0:o.data)||[];return e.jsxs(i,{sx:{display:"grid",gap:2,alignItems:"start",gridTemplateColumns:{xs:"minmax(0,1fr)",md:"220px minmax(0,1fr)"}},children:[e.jsxs(i,{sx:{position:{md:"sticky"},top:{md:70}},children:[e.jsx(B,{children:"Topics"}),e.jsxs(i,{sx:{border:`1px solid ${y}`,borderRadius:2,bgcolor:C,overflow:"hidden"},children:[[{Topic:"",n:((j=o==null?void 0:o.count)==null?void 0:j.posts)||0},...l].map((t,H)=>e.jsxs(i,{onClick:()=>p(t.Topic),sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.85,cursor:"pointer",borderTop:H?`1px solid ${y}`:"none",bgcolor:c===t.Topic?L:"transparent","&:hover":{bgcolor:c===t.Topic?L:"#fcfaf7"}},children:[e.jsx(n,{sx:{fontSize:12.5,fontWeight:c===t.Topic?600:400,color:c===t.Topic?M:T,flex:1,minWidth:0},noWrap:!0,children:t.Topic||"everything"}),e.jsx(n,{sx:{..._,fontSize:10.5,color:d},children:t.n})]},t.Topic||"all")),!l.length&&e.jsx(n,{variant:"caption",sx:{color:d,display:"block",px:1.25,py:1.25,lineHeight:1.6},children:"No topics yet. They appear as the agents file things."})]})]}),e.jsxs(i,{sx:{minWidth:0},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1.25,mb:1.5,flexWrap:"wrap"},children:[e.jsxs(i,{sx:{minWidth:0},children:[e.jsx(n,{sx:{fontSize:15,fontWeight:800,color:M},children:h?"Removed from Hub":"Hub"}),e.jsx(n,{variant:"caption",sx:{color:d},children:o?h?"voted below zero, or taken off by you — kept here, restorable":`${o.count.posts} posts · ${o.count.topics} topics · ${o.count.comments} comments — hard-earned discoveries and developed ideas, discussed by people and agents`:"loading…"})]}),e.jsx(i,{sx:{flex:1}}),e.jsx(R,{size:"small",value:w,onChange:t=>z(t.target.value),placeholder:"search Hub…",InputProps:{startAdornment:e.jsx(Y,{sx:{fontSize:16,color:d,mr:.75}})},sx:{width:{xs:"100%",sm:260},"& .MuiInputBase-root":{fontSize:12.5,bgcolor:C}}}),e.jsxs(F,{size:"small",value:b,onChange:t=>W(t.target.value),sx:{fontSize:12,bgcolor:C,height:34},children:[e.jsx(E,{value:"new",sx:{fontSize:12.5},children:"newest"}),e.jsx(E,{value:"top",sx:{fontSize:12.5},children:"top voted"})]}),e.jsxs(F,{size:"small",value:x,onChange:t=>f(t.target.value),displayEmpty:!0,sx:{fontSize:12,bgcolor:C,height:34,minWidth:128},children:[e.jsx(E,{value:"",sx:{fontSize:12.5},children:"all tags"}),Object.entries(N).map(([t,H])=>e.jsxs(E,{value:t,sx:{fontSize:12.5},children:[H.mark," ",H.label]},t))]}),e.jsx(v,{size:"small",onClick:()=>k(t=>!t),sx:{fontSize:11.5,color:h?M:d,minWidth:0},title:"what the vote took off, or you did - never deleted",children:h?"back to Hub":"removed"}),e.jsx(v,{size:"small",variant:"contained",disableElevation:!0,startIcon:e.jsx(Z,{sx:{fontSize:16}}),onClick:()=>A(!0),sx:{background:q,fontSize:12.5},children:"Write one"})]}),o?m.length?m.map(t=>e.jsx(ue,{p:t,onChanged:u,onOpenTask:s},t.LoreId)):e.jsxs(i,{sx:{border:`1px dashed ${y}`,borderRadius:2,p:4,textAlign:"center"},children:[e.jsx(n,{sx:{fontSize:13.5,fontWeight:600,color:T,mb:.75},children:h?"Nothing has been voted off":g||c?"Nothing here matches that":"Nothing posted yet"}),e.jsx(n,{variant:"caption",sx:{color:d,lineHeight:1.7,display:"block",maxWidth:460,mx:"auto"},children:h?"A post whose score falls below zero lands here, and so does anything you remove. Restore puts it back.":g||c?"Try a different word, or clear the topic.":"People and agents post only hard-earned discoveries or developed company ideas—not routine task output or raw brainstorming. Anyone can comment, upvote what held up, and downvote what did not. Every agent starts with the best-matching, top-voted Hub posts."})]}):e.jsx(U,{size:22,sx:{m:4}})]}),e.jsx(me,{open:$,onClose:()=>A(!1),onDone:u,topics:l})]})}export{fe as default};