@lincyaw/aegis-ui 0.9.4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (748) hide show
  1. package/dist/agent/ask/AskOverlay.cjs +3 -1
  2. package/dist/agent/ask/AskOverlay.cjs.map +1 -1
  3. package/dist/agent/ask/AskOverlay.d.ts +17 -1
  4. package/dist/agent/ask/AskOverlay.js +115 -58
  5. package/dist/agent/ask/AskOverlay.js.map +1 -1
  6. package/dist/agent/ask/AskPanel.cjs +1 -1
  7. package/dist/agent/ask/AskPanel.cjs.map +1 -1
  8. package/dist/agent/ask/AskPanel.d.ts +18 -3
  9. package/dist/agent/ask/AskPanel.js +147 -119
  10. package/dist/agent/ask/AskPanel.js.map +1 -1
  11. package/dist/agent/chat/chat.cjs +1 -1
  12. package/dist/agent/chat/chat.cjs.map +1 -1
  13. package/dist/agent/chat/chat.d.ts +1 -1
  14. package/dist/agent/chat/chat.js +3 -5
  15. package/dist/agent/chat/chat.js.map +1 -1
  16. package/dist/agent/chat/useAgentChat.cjs +1 -1
  17. package/dist/agent/chat/useAgentChat.cjs.map +1 -1
  18. package/dist/agent/chat/useAgentChat.d.ts +2 -0
  19. package/dist/agent/chat/useAgentChat.js +8 -4
  20. package/dist/agent/chat/useAgentChat.js.map +1 -1
  21. package/dist/agent/core/AegisRuntimeProvider.cjs.map +1 -1
  22. package/dist/agent/core/AegisRuntimeProvider.d.ts +2 -2
  23. package/dist/agent/core/AegisRuntimeProvider.js.map +1 -1
  24. package/dist/agent/core/hooks.cjs +1 -1
  25. package/dist/agent/core/hooks.cjs.map +1 -1
  26. package/dist/agent/core/hooks.js +21 -20
  27. package/dist/agent/core/hooks.js.map +1 -1
  28. package/dist/agent/core/runtime.cjs +1 -1
  29. package/dist/agent/core/runtime.cjs.map +1 -1
  30. package/dist/agent/core/runtime.d.ts +28 -9
  31. package/dist/agent/core/runtime.js +435 -268
  32. package/dist/agent/core/runtime.js.map +1 -1
  33. package/dist/agent/core/types.d.ts +65 -10
  34. package/dist/agent/index.d.ts +4 -3
  35. package/dist/commands/CommandProvider.cjs +1 -1
  36. package/dist/commands/CommandProvider.cjs.map +1 -1
  37. package/dist/commands/CommandProvider.js +33 -37
  38. package/dist/commands/CommandProvider.js.map +1 -1
  39. package/dist/commands/commandContext.cjs +1 -1
  40. package/dist/commands/commandContext.cjs.map +1 -1
  41. package/dist/commands/commandContext.d.ts +6 -6
  42. package/dist/commands/commandContext.js +3 -17
  43. package/dist/commands/commandContext.js.map +1 -1
  44. package/dist/commands/index.d.ts +1 -1
  45. package/dist/commands/useCommands.cjs +1 -1
  46. package/dist/commands/useCommands.cjs.map +1 -1
  47. package/dist/commands/useCommands.d.ts +4 -2
  48. package/dist/commands/useCommands.js +21 -5
  49. package/dist/commands/useCommands.js.map +1 -1
  50. package/dist/commands/useRegisterCommands.cjs +2 -1
  51. package/dist/commands/useRegisterCommands.cjs.map +1 -1
  52. package/dist/commands/useRegisterCommands.d.ts +3 -2
  53. package/dist/commands/useRegisterCommands.js +35 -8
  54. package/dist/commands/useRegisterCommands.js.map +1 -1
  55. package/dist/components/ui/AgentPanel.cjs +1 -1
  56. package/dist/components/ui/AgentPanel.cjs.map +1 -1
  57. package/dist/components/ui/AgentPanel.js +15 -14
  58. package/dist/components/ui/AgentPanel.js.map +1 -1
  59. package/dist/components/ui/Alert.cjs +1 -1
  60. package/dist/components/ui/Alert.cjs.map +1 -1
  61. package/dist/components/ui/Alert.js +11 -11
  62. package/dist/components/ui/Alert.js.map +1 -1
  63. package/dist/components/ui/Avatar.cjs +1 -1
  64. package/dist/components/ui/Avatar.cjs.map +1 -1
  65. package/dist/components/ui/Avatar.js +21 -19
  66. package/dist/components/ui/Avatar.js.map +1 -1
  67. package/dist/components/ui/BlastRadiusBar.cjs +1 -1
  68. package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
  69. package/dist/components/ui/BlastRadiusBar.d.ts +16 -2
  70. package/dist/components/ui/BlastRadiusBar.js +27 -20
  71. package/dist/components/ui/BlastRadiusBar.js.map +1 -1
  72. package/dist/components/ui/Button.cjs.map +1 -1
  73. package/dist/components/ui/Button.d.ts +1 -1
  74. package/dist/components/ui/Button.js.map +1 -1
  75. package/dist/components/ui/ChatComposer.cjs +1 -1
  76. package/dist/components/ui/ChatComposer.cjs.map +1 -1
  77. package/dist/components/ui/ChatComposer.js +30 -29
  78. package/dist/components/ui/ChatComposer.js.map +1 -1
  79. package/dist/components/ui/ChatSessionList.cjs +1 -1
  80. package/dist/components/ui/ChatSessionList.cjs.map +1 -1
  81. package/dist/components/ui/ChatSessionList.js +136 -157
  82. package/dist/components/ui/ChatSessionList.js.map +1 -1
  83. package/dist/components/ui/Checkbox.cjs +1 -1
  84. package/dist/components/ui/Checkbox.cjs.map +1 -1
  85. package/dist/components/ui/Checkbox.d.ts +7 -1
  86. package/dist/components/ui/Checkbox.js +26 -20
  87. package/dist/components/ui/Checkbox.js.map +1 -1
  88. package/dist/components/ui/Chip.cjs +1 -1
  89. package/dist/components/ui/Chip.cjs.map +1 -1
  90. package/dist/components/ui/Chip.d.ts +6 -1
  91. package/dist/components/ui/Chip.js +20 -18
  92. package/dist/components/ui/Chip.js.map +1 -1
  93. package/dist/components/ui/ChoiceCardGroup.cjs +2 -0
  94. package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -0
  95. package/dist/components/ui/ChoiceCardGroup.d.ts +34 -0
  96. package/dist/components/ui/ChoiceCardGroup.js +56 -0
  97. package/dist/components/ui/ChoiceCardGroup.js.map +1 -0
  98. package/dist/components/ui/CodeBlock.cjs +2 -2
  99. package/dist/components/ui/CodeBlock.cjs.map +1 -1
  100. package/dist/components/ui/CodeBlock.js +31 -27
  101. package/dist/components/ui/CodeBlock.js.map +1 -1
  102. package/dist/components/ui/CodeEditor.cjs +1 -1
  103. package/dist/components/ui/CodeEditor.cjs.map +1 -1
  104. package/dist/components/ui/CodeEditor.d.ts +15 -4
  105. package/dist/components/ui/CodeEditor.js +243 -70
  106. package/dist/components/ui/CodeEditor.js.map +1 -1
  107. package/dist/components/ui/Collapse.cjs +1 -1
  108. package/dist/components/ui/Collapse.cjs.map +1 -1
  109. package/dist/components/ui/Collapse.js +23 -23
  110. package/dist/components/ui/Collapse.js.map +1 -1
  111. package/dist/components/ui/ColumnChart.cjs +1 -1
  112. package/dist/components/ui/ColumnChart.cjs.map +1 -1
  113. package/dist/components/ui/ColumnChart.js +21 -20
  114. package/dist/components/ui/ColumnChart.js.map +1 -1
  115. package/dist/components/ui/CommandInvocationCard.cjs +1 -1
  116. package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
  117. package/dist/components/ui/CommandInvocationCard.js +28 -31
  118. package/dist/components/ui/CommandInvocationCard.js.map +1 -1
  119. package/dist/components/ui/CommandPalette.cjs +1 -1
  120. package/dist/components/ui/CommandPalette.cjs.map +1 -1
  121. package/dist/components/ui/CommandPalette.d.ts +23 -1
  122. package/dist/components/ui/CommandPalette.js +146 -121
  123. package/dist/components/ui/CommandPalette.js.map +1 -1
  124. package/dist/components/ui/CommitGraph.cjs +2 -0
  125. package/dist/components/ui/CommitGraph.cjs.map +1 -0
  126. package/dist/components/ui/CommitGraph.d.ts +79 -0
  127. package/dist/components/ui/CommitGraph.js +383 -0
  128. package/dist/components/ui/CommitGraph.js.map +1 -0
  129. package/dist/components/ui/ContentInspectorDialog.cjs +1 -3
  130. package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
  131. package/dist/components/ui/ContentInspectorDialog.d.ts +4 -10
  132. package/dist/components/ui/ContentInspectorDialog.js +42 -201
  133. package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
  134. package/dist/components/ui/ContentPreview.cjs +3 -0
  135. package/dist/components/ui/ContentPreview.cjs.map +1 -0
  136. package/dist/components/ui/ContentPreview.d.ts +13 -0
  137. package/dist/components/ui/ContentPreview.js +133 -0
  138. package/dist/components/ui/ContentPreview.js.map +1 -0
  139. package/dist/components/ui/CopyGlyph.cjs +2 -0
  140. package/dist/components/ui/CopyGlyph.cjs.map +1 -0
  141. package/dist/components/ui/CopyGlyph.d.ts +7 -0
  142. package/dist/components/ui/CopyGlyph.js +48 -0
  143. package/dist/components/ui/CopyGlyph.js.map +1 -0
  144. package/dist/components/ui/DangerZone.cjs +1 -1
  145. package/dist/components/ui/DangerZone.cjs.map +1 -1
  146. package/dist/components/ui/DangerZone.js +13 -12
  147. package/dist/components/ui/DangerZone.js.map +1 -1
  148. package/dist/components/ui/DataList.cjs +1 -1
  149. package/dist/components/ui/DataList.cjs.map +1 -1
  150. package/dist/components/ui/DataList.d.ts +7 -1
  151. package/dist/components/ui/DataList.js +89 -33
  152. package/dist/components/ui/DataList.js.map +1 -1
  153. package/dist/components/ui/DataTable.cjs +1 -1
  154. package/dist/components/ui/DataTable.cjs.map +1 -1
  155. package/dist/components/ui/DataTable.d.ts +22 -18
  156. package/dist/components/ui/DataTable.js +279 -341
  157. package/dist/components/ui/DataTable.js.map +1 -1
  158. package/dist/components/ui/DropdownMenu.cjs +1 -1
  159. package/dist/components/ui/DropdownMenu.cjs.map +1 -1
  160. package/dist/components/ui/DropdownMenu.d.ts +8 -1
  161. package/dist/components/ui/DropdownMenu.js +63 -46
  162. package/dist/components/ui/DropdownMenu.js.map +1 -1
  163. package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
  164. package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
  165. package/dist/components/ui/EnvironmentSwitcher.js +26 -24
  166. package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
  167. package/dist/components/ui/ErrorState.cjs +1 -1
  168. package/dist/components/ui/ErrorState.cjs.map +1 -1
  169. package/dist/components/ui/ErrorState.d.ts +1 -0
  170. package/dist/components/ui/ErrorState.js +1 -1
  171. package/dist/components/ui/ErrorState.js.map +1 -1
  172. package/dist/components/ui/EventTable.cjs +1 -1
  173. package/dist/components/ui/EventTable.cjs.map +1 -1
  174. package/dist/components/ui/EventTable.d.ts +16 -2
  175. package/dist/components/ui/EventTable.js +198 -165
  176. package/dist/components/ui/EventTable.js.map +1 -1
  177. package/dist/components/ui/FileDropzone.cjs +1 -1
  178. package/dist/components/ui/FileDropzone.cjs.map +1 -1
  179. package/dist/components/ui/FileDropzone.d.ts +3 -21
  180. package/dist/components/ui/FileDropzone.js +42 -67
  181. package/dist/components/ui/FileDropzone.js.map +1 -1
  182. package/dist/components/ui/FilePreview.cjs +1 -1
  183. package/dist/components/ui/FilePreview.cjs.map +1 -1
  184. package/dist/components/ui/FilePreview.d.ts +4 -1
  185. package/dist/components/ui/FilePreview.js +62 -60
  186. package/dist/components/ui/FilePreview.js.map +1 -1
  187. package/dist/components/ui/FileTree.cjs +1 -1
  188. package/dist/components/ui/FileTree.cjs.map +1 -1
  189. package/dist/components/ui/FileTree.d.ts +18 -2
  190. package/dist/components/ui/FileTree.js +141 -110
  191. package/dist/components/ui/FileTree.js.map +1 -1
  192. package/dist/components/ui/FolderDropzone.cjs +1 -1
  193. package/dist/components/ui/FolderDropzone.cjs.map +1 -1
  194. package/dist/components/ui/FolderDropzone.d.ts +10 -1
  195. package/dist/components/ui/FolderDropzone.js +140 -130
  196. package/dist/components/ui/FolderDropzone.js.map +1 -1
  197. package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
  198. package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
  199. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -0
  200. package/dist/components/ui/ForgotPasswordForm.js +23 -20
  201. package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
  202. package/dist/components/ui/FormRow.cjs +1 -1
  203. package/dist/components/ui/FormRow.cjs.map +1 -1
  204. package/dist/components/ui/FormRow.d.ts +32 -2
  205. package/dist/components/ui/FormRow.js +33 -13
  206. package/dist/components/ui/FormRow.js.map +1 -1
  207. package/dist/components/ui/HeadlineStat.cjs +1 -1
  208. package/dist/components/ui/HeadlineStat.cjs.map +1 -1
  209. package/dist/components/ui/HeadlineStat.js +6 -5
  210. package/dist/components/ui/HeadlineStat.js.map +1 -1
  211. package/dist/components/ui/InboxPage.cjs +1 -1
  212. package/dist/components/ui/InboxPage.cjs.map +1 -1
  213. package/dist/components/ui/InboxPage.d.ts +25 -2
  214. package/dist/components/ui/InboxPage.js +93 -77
  215. package/dist/components/ui/InboxPage.js.map +1 -1
  216. package/dist/components/ui/KeyValueList.cjs +1 -1
  217. package/dist/components/ui/KeyValueList.cjs.map +1 -1
  218. package/dist/components/ui/KeyValueList.d.ts +6 -5
  219. package/dist/components/ui/KeyValueList.js +14 -17
  220. package/dist/components/ui/KeyValueList.js.map +1 -1
  221. package/dist/components/ui/LoginForm.cjs +1 -1
  222. package/dist/components/ui/LoginForm.cjs.map +1 -1
  223. package/dist/components/ui/LoginForm.d.ts +1 -0
  224. package/dist/components/ui/LoginForm.js +63 -55
  225. package/dist/components/ui/LoginForm.js.map +1 -1
  226. package/dist/components/ui/Markdown.cjs +1 -1
  227. package/dist/components/ui/Markdown.cjs.map +1 -1
  228. package/dist/components/ui/Markdown.d.ts +3 -2
  229. package/dist/components/ui/Markdown.js +57 -49
  230. package/dist/components/ui/Markdown.js.map +1 -1
  231. package/dist/components/ui/MdxDocument.cjs +1 -1
  232. package/dist/components/ui/MdxDocument.cjs.map +1 -1
  233. package/dist/components/ui/MdxDocument.d.ts +7 -2
  234. package/dist/components/ui/MdxDocument.js +34 -49
  235. package/dist/components/ui/MdxDocument.js.map +1 -1
  236. package/dist/components/ui/MetadataList.cjs +1 -1
  237. package/dist/components/ui/MetadataList.cjs.map +1 -1
  238. package/dist/components/ui/MetadataList.d.ts +7 -1
  239. package/dist/components/ui/MetadataList.js +29 -20
  240. package/dist/components/ui/MetadataList.js.map +1 -1
  241. package/dist/components/ui/MetricCard.cjs +1 -1
  242. package/dist/components/ui/MetricCard.cjs.map +1 -1
  243. package/dist/components/ui/MetricCard.js +16 -16
  244. package/dist/components/ui/MetricCard.js.map +1 -1
  245. package/dist/components/ui/MonoValue.cjs +1 -1
  246. package/dist/components/ui/MonoValue.cjs.map +1 -1
  247. package/dist/components/ui/MonoValue.d.ts +12 -1
  248. package/dist/components/ui/MonoValue.js +19 -17
  249. package/dist/components/ui/MonoValue.js.map +1 -1
  250. package/dist/components/ui/NotificationBell.cjs +1 -1
  251. package/dist/components/ui/NotificationBell.cjs.map +1 -1
  252. package/dist/components/ui/NotificationBell.d.ts +31 -3
  253. package/dist/components/ui/NotificationBell.js +127 -71
  254. package/dist/components/ui/NotificationBell.js.map +1 -1
  255. package/dist/components/ui/NumberField.cjs +2 -0
  256. package/dist/components/ui/NumberField.cjs.map +1 -0
  257. package/dist/components/ui/NumberField.d.ts +34 -0
  258. package/dist/components/ui/NumberField.js +80 -0
  259. package/dist/components/ui/NumberField.js.map +1 -0
  260. package/dist/components/ui/ObjectBrowser.cjs +1 -1
  261. package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
  262. package/dist/components/ui/ObjectBrowser.js +107 -94
  263. package/dist/components/ui/ObjectBrowser.js.map +1 -1
  264. package/dist/components/ui/ObjectInspector.cjs +1 -1
  265. package/dist/components/ui/ObjectInspector.cjs.map +1 -1
  266. package/dist/components/ui/ObjectInspector.d.ts +5 -0
  267. package/dist/components/ui/ObjectInspector.js +61 -69
  268. package/dist/components/ui/ObjectInspector.js.map +1 -1
  269. package/dist/components/ui/PageSizeSelect.cjs +1 -1
  270. package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
  271. package/dist/components/ui/PageSizeSelect.d.ts +3 -4
  272. package/dist/components/ui/PageSizeSelect.js +30 -29
  273. package/dist/components/ui/PageSizeSelect.js.map +1 -1
  274. package/dist/components/ui/Pagination.cjs +1 -1
  275. package/dist/components/ui/Pagination.cjs.map +1 -1
  276. package/dist/components/ui/Pagination.d.ts +16 -6
  277. package/dist/components/ui/Pagination.js +58 -45
  278. package/dist/components/ui/Pagination.js.map +1 -1
  279. package/dist/components/ui/Panel.cjs +1 -1
  280. package/dist/components/ui/Panel.cjs.map +1 -1
  281. package/dist/components/ui/Panel.d.ts +17 -4
  282. package/dist/components/ui/Panel.js +53 -40
  283. package/dist/components/ui/Panel.js.map +1 -1
  284. package/dist/components/ui/ParquetViewer.cjs +1 -1
  285. package/dist/components/ui/ParquetViewer.cjs.map +1 -1
  286. package/dist/components/ui/ParquetViewer.d.ts +1 -1
  287. package/dist/components/ui/ParquetViewer.js +121 -120
  288. package/dist/components/ui/ParquetViewer.js.map +1 -1
  289. package/dist/components/ui/PasswordField.cjs +1 -1
  290. package/dist/components/ui/PasswordField.cjs.map +1 -1
  291. package/dist/components/ui/PasswordField.js +28 -27
  292. package/dist/components/ui/PasswordField.js.map +1 -1
  293. package/dist/components/ui/PickerField.cjs +1 -1
  294. package/dist/components/ui/PickerField.cjs.map +1 -1
  295. package/dist/components/ui/PickerField.d.ts +25 -6
  296. package/dist/components/ui/PickerField.js +20 -17
  297. package/dist/components/ui/PickerField.js.map +1 -1
  298. package/dist/components/ui/ProjectSelector.cjs +1 -1
  299. package/dist/components/ui/ProjectSelector.cjs.map +1 -1
  300. package/dist/components/ui/ProjectSelector.js +39 -36
  301. package/dist/components/ui/ProjectSelector.js.map +1 -1
  302. package/dist/components/ui/QueryAutocomplete.cjs +1 -1
  303. package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
  304. package/dist/components/ui/QueryAutocomplete.d.ts +7 -1
  305. package/dist/components/ui/QueryAutocomplete.js +150 -127
  306. package/dist/components/ui/QueryAutocomplete.js.map +1 -1
  307. package/dist/components/ui/RegisterForm.cjs +1 -1
  308. package/dist/components/ui/RegisterForm.cjs.map +1 -1
  309. package/dist/components/ui/RegisterForm.d.ts +1 -0
  310. package/dist/components/ui/RegisterForm.js +52 -43
  311. package/dist/components/ui/RegisterForm.js.map +1 -1
  312. package/dist/components/ui/ResizableSidePanel.cjs +1 -1
  313. package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
  314. package/dist/components/ui/ResizableSidePanel.js +41 -40
  315. package/dist/components/ui/ResizableSidePanel.js.map +1 -1
  316. package/dist/components/ui/RollingValue.cjs +2 -0
  317. package/dist/components/ui/RollingValue.cjs.map +1 -0
  318. package/dist/components/ui/RollingValue.d.ts +14 -0
  319. package/dist/components/ui/RollingValue.js +39 -0
  320. package/dist/components/ui/RollingValue.js.map +1 -0
  321. package/dist/components/ui/SavedQueryBar.cjs +1 -1
  322. package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
  323. package/dist/components/ui/SavedQueryBar.d.ts +9 -3
  324. package/dist/components/ui/SavedQueryBar.js +390 -291
  325. package/dist/components/ui/SavedQueryBar.js.map +1 -1
  326. package/dist/components/ui/ScrollStory.cjs +1 -2
  327. package/dist/components/ui/ScrollStory.cjs.map +1 -1
  328. package/dist/components/ui/ScrollStory.js +57 -75
  329. package/dist/components/ui/ScrollStory.js.map +1 -1
  330. package/dist/components/ui/SearchInput.cjs +1 -1
  331. package/dist/components/ui/SearchInput.cjs.map +1 -1
  332. package/dist/components/ui/SearchInput.d.ts +5 -1
  333. package/dist/components/ui/SearchInput.js +28 -24
  334. package/dist/components/ui/SearchInput.js.map +1 -1
  335. package/dist/components/ui/Select.cjs +1 -1
  336. package/dist/components/ui/Select.cjs.map +1 -1
  337. package/dist/components/ui/Select.d.ts +4 -2
  338. package/dist/components/ui/Select.js +34 -31
  339. package/dist/components/ui/Select.js.map +1 -1
  340. package/dist/components/ui/ServiceMap.cjs +1 -1
  341. package/dist/components/ui/ServiceMap.cjs.map +1 -1
  342. package/dist/components/ui/ServiceMap.d.ts +57 -2
  343. package/dist/components/ui/ServiceMap.js +374 -117
  344. package/dist/components/ui/ServiceMap.js.map +1 -1
  345. package/dist/components/ui/ShareLinkDialog.cjs +1 -1
  346. package/dist/components/ui/ShareLinkDialog.cjs.map +1 -1
  347. package/dist/components/ui/ShareLinkDialog.d.ts +5 -3
  348. package/dist/components/ui/ShareLinkDialog.js +107 -98
  349. package/dist/components/ui/ShareLinkDialog.js.map +1 -1
  350. package/dist/components/ui/Slider.cjs +2 -0
  351. package/dist/components/ui/Slider.cjs.map +1 -0
  352. package/dist/components/ui/Slider.d.ts +24 -0
  353. package/dist/components/ui/Slider.js +55 -0
  354. package/dist/components/ui/Slider.js.map +1 -0
  355. package/dist/components/ui/SparkLine.cjs +1 -1
  356. package/dist/components/ui/SparkLine.cjs.map +1 -1
  357. package/dist/components/ui/SparkLine.d.ts +4 -1
  358. package/dist/components/ui/SparkLine.js +29 -23
  359. package/dist/components/ui/SparkLine.js.map +1 -1
  360. package/dist/components/ui/StatBlock.cjs +1 -1
  361. package/dist/components/ui/StatBlock.cjs.map +1 -1
  362. package/dist/components/ui/StatBlock.js +17 -16
  363. package/dist/components/ui/StatBlock.js.map +1 -1
  364. package/dist/components/ui/StatusDot.cjs.map +1 -1
  365. package/dist/components/ui/StatusDot.d.ts +5 -1
  366. package/dist/components/ui/StatusDot.js.map +1 -1
  367. package/dist/components/ui/Steps.cjs +2 -0
  368. package/dist/components/ui/Steps.cjs.map +1 -0
  369. package/dist/components/ui/Steps.d.ts +19 -0
  370. package/dist/components/ui/Steps.js +53 -0
  371. package/dist/components/ui/Steps.js.map +1 -0
  372. package/dist/components/ui/TableOfContents.cjs +1 -1
  373. package/dist/components/ui/TableOfContents.cjs.map +1 -1
  374. package/dist/components/ui/TableOfContents.d.ts +3 -3
  375. package/dist/components/ui/TableOfContents.js +47 -28
  376. package/dist/components/ui/TableOfContents.js.map +1 -1
  377. package/dist/components/ui/Tabs.cjs +2 -2
  378. package/dist/components/ui/Tabs.cjs.map +1 -1
  379. package/dist/components/ui/Tabs.d.ts +37 -3
  380. package/dist/components/ui/Tabs.js +169 -109
  381. package/dist/components/ui/Tabs.js.map +1 -1
  382. package/dist/components/ui/Terminal.cjs +1 -1
  383. package/dist/components/ui/Terminal.cjs.map +1 -1
  384. package/dist/components/ui/Terminal.js +18 -17
  385. package/dist/components/ui/Terminal.js.map +1 -1
  386. package/dist/components/ui/TextField.cjs +1 -1
  387. package/dist/components/ui/TextField.cjs.map +1 -1
  388. package/dist/components/ui/TextField.js +19 -18
  389. package/dist/components/ui/TextField.js.map +1 -1
  390. package/dist/components/ui/ThemeToggle.cjs +1 -1
  391. package/dist/components/ui/ThemeToggle.cjs.map +1 -1
  392. package/dist/components/ui/ThemeToggle.js +15 -18
  393. package/dist/components/ui/ThemeToggle.js.map +1 -1
  394. package/dist/components/ui/TimeDisplay.cjs +1 -1
  395. package/dist/components/ui/TimeDisplay.cjs.map +1 -1
  396. package/dist/components/ui/TimeDisplay.d.ts +14 -4
  397. package/dist/components/ui/TimeDisplay.js +43 -44
  398. package/dist/components/ui/TimeDisplay.js.map +1 -1
  399. package/dist/components/ui/TimeRangePicker.cjs +1 -1
  400. package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
  401. package/dist/components/ui/TimeRangePicker.js +128 -111
  402. package/dist/components/ui/TimeRangePicker.js.map +1 -1
  403. package/dist/components/ui/TimelineChart.cjs +2 -1
  404. package/dist/components/ui/TimelineChart.cjs.map +1 -1
  405. package/dist/components/ui/TimelineChart.d.ts +1 -0
  406. package/dist/components/ui/TimelineChart.js +221 -169
  407. package/dist/components/ui/TimelineChart.js.map +1 -1
  408. package/dist/components/ui/ToolCallCard.cjs +1 -1
  409. package/dist/components/ui/ToolCallCard.cjs.map +1 -1
  410. package/dist/components/ui/ToolCallCard.js +22 -22
  411. package/dist/components/ui/ToolCallCard.js.map +1 -1
  412. package/dist/components/ui/Toolbar.cjs +1 -1
  413. package/dist/components/ui/Toolbar.cjs.map +1 -1
  414. package/dist/components/ui/Toolbar.d.ts +4 -16
  415. package/dist/components/ui/Toolbar.js +8 -62
  416. package/dist/components/ui/Toolbar.js.map +1 -1
  417. package/dist/components/ui/TraceSpanInspector.cjs +1 -1
  418. package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
  419. package/dist/components/ui/TraceSpanInspector.js +94 -76
  420. package/dist/components/ui/TraceSpanInspector.js.map +1 -1
  421. package/dist/components/ui/TraceTree.cjs +1 -1
  422. package/dist/components/ui/TraceTree.cjs.map +1 -1
  423. package/dist/components/ui/TraceTree.d.ts +36 -2
  424. package/dist/components/ui/TraceTree.js +278 -170
  425. package/dist/components/ui/TraceTree.js.map +1 -1
  426. package/dist/components/ui/TrajectoryStep.cjs +1 -1
  427. package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
  428. package/dist/components/ui/TrajectoryStep.js +39 -43
  429. package/dist/components/ui/TrajectoryStep.js.map +1 -1
  430. package/dist/components/ui/TrajectoryTimeline.cjs +1 -1
  431. package/dist/components/ui/TrajectoryTimeline.cjs.map +1 -1
  432. package/dist/components/ui/TrajectoryTimeline.js +31 -28
  433. package/dist/components/ui/TrajectoryTimeline.js.map +1 -1
  434. package/dist/components/ui/UploadQueue.cjs +1 -1
  435. package/dist/components/ui/UploadQueue.cjs.map +1 -1
  436. package/dist/components/ui/UploadQueue.d.ts +18 -2
  437. package/dist/components/ui/UploadQueue.js +53 -71
  438. package/dist/components/ui/UploadQueue.js.map +1 -1
  439. package/dist/components/ui/authValidation.cjs +2 -0
  440. package/dist/components/ui/authValidation.cjs.map +1 -0
  441. package/dist/components/ui/authValidation.d.ts +3 -0
  442. package/dist/components/ui/authValidation.js +8 -0
  443. package/dist/components/ui/authValidation.js.map +1 -0
  444. package/dist/components/ui/classifyContent.cjs +6 -0
  445. package/dist/components/ui/classifyContent.cjs.map +1 -0
  446. package/dist/components/ui/classifyContent.d.ts +40 -0
  447. package/dist/components/ui/classifyContent.js +167 -0
  448. package/dist/components/ui/classifyContent.js.map +1 -0
  449. package/dist/components/ui/dropFiles.cjs +2 -0
  450. package/dist/components/ui/dropFiles.cjs.map +1 -0
  451. package/dist/components/ui/dropFiles.d.ts +7 -0
  452. package/dist/components/ui/dropFiles.js +16 -0
  453. package/dist/components/ui/dropFiles.js.map +1 -0
  454. package/dist/components/ui/index.d.ts +23 -10
  455. package/dist/components/ui/linkComponent.cjs +1 -1
  456. package/dist/components/ui/linkComponent.cjs.map +1 -1
  457. package/dist/components/ui/linkComponent.d.ts +4 -2
  458. package/dist/components/ui/linkComponent.js +15 -5
  459. package/dist/components/ui/linkComponent.js.map +1 -1
  460. package/dist/components/ui/markdownDocument.cjs +2 -0
  461. package/dist/components/ui/markdownDocument.cjs.map +1 -0
  462. package/dist/components/ui/markdownDocument.d.ts +40 -0
  463. package/dist/components/ui/markdownDocument.js +39 -0
  464. package/dist/components/ui/markdownDocument.js.map +1 -0
  465. package/dist/components/ui/relativeTime.cjs +1 -1
  466. package/dist/components/ui/relativeTime.cjs.map +1 -1
  467. package/dist/components/ui/relativeTime.d.ts +5 -3
  468. package/dist/components/ui/relativeTime.js +15 -6
  469. package/dist/components/ui/relativeTime.js.map +1 -1
  470. package/dist/components/ui/traceStatus.cjs +2 -0
  471. package/dist/components/ui/traceStatus.cjs.map +1 -0
  472. package/dist/components/ui/{traceFormat.d.ts → traceStatus.d.ts} +0 -1
  473. package/dist/components/ui/traceStatus.js +7 -0
  474. package/dist/components/ui/traceStatus.js.map +1 -0
  475. package/dist/components/ui/useColumnWidths.cjs +2 -0
  476. package/dist/components/ui/useColumnWidths.cjs.map +1 -0
  477. package/dist/components/ui/useColumnWidths.d.ts +60 -0
  478. package/dist/components/ui/useColumnWidths.js +196 -0
  479. package/dist/components/ui/useColumnWidths.js.map +1 -0
  480. package/dist/hooks/popoverOverflow.cjs +2 -0
  481. package/dist/hooks/popoverOverflow.cjs.map +1 -0
  482. package/dist/hooks/popoverOverflow.d.ts +8 -0
  483. package/dist/hooks/popoverOverflow.js +9 -0
  484. package/dist/hooks/popoverOverflow.js.map +1 -0
  485. package/dist/hooks/useDevelopAfterLoad.cjs +2 -0
  486. package/dist/hooks/useDevelopAfterLoad.cjs.map +1 -0
  487. package/dist/hooks/useDevelopAfterLoad.d.ts +8 -0
  488. package/dist/hooks/useDevelopAfterLoad.js +9 -0
  489. package/dist/hooks/useDevelopAfterLoad.js.map +1 -0
  490. package/dist/hooks/useDialogPopover.cjs +2 -0
  491. package/dist/hooks/useDialogPopover.cjs.map +1 -0
  492. package/dist/hooks/useDialogPopover.d.ts +23 -0
  493. package/dist/hooks/useDialogPopover.js +48 -0
  494. package/dist/hooks/useDialogPopover.js.map +1 -0
  495. package/dist/hooks/useMenuPopover.cjs +1 -1
  496. package/dist/hooks/useMenuPopover.cjs.map +1 -1
  497. package/dist/hooks/useMenuPopover.d.ts +0 -8
  498. package/dist/hooks/useMenuPopover.js +17 -22
  499. package/dist/hooks/useMenuPopover.js.map +1 -1
  500. package/dist/hooks/useResizable.cjs +1 -1
  501. package/dist/hooks/useResizable.cjs.map +1 -1
  502. package/dist/hooks/useResizable.js +87 -78
  503. package/dist/hooks/useResizable.js.map +1 -1
  504. package/dist/hooks/useSavedQueries.cjs +1 -1
  505. package/dist/hooks/useSavedQueries.cjs.map +1 -1
  506. package/dist/hooks/useSavedQueries.d.ts +6 -0
  507. package/dist/hooks/useSavedQueries.js +52 -60
  508. package/dist/hooks/useSavedQueries.js.map +1 -1
  509. package/dist/hooks/useSectionSpy.cjs +1 -1
  510. package/dist/hooks/useSectionSpy.cjs.map +1 -1
  511. package/dist/hooks/useSectionSpy.d.ts +6 -1
  512. package/dist/hooks/useSectionSpy.js +87 -57
  513. package/dist/hooks/useSectionSpy.js.map +1 -1
  514. package/dist/hooks/useStorageItem.cjs +2 -0
  515. package/dist/hooks/useStorageItem.cjs.map +1 -0
  516. package/dist/hooks/useStorageItem.d.ts +6 -0
  517. package/dist/hooks/useStorageItem.js +36 -0
  518. package/dist/hooks/useStorageItem.js.map +1 -0
  519. package/dist/index.cjs +1 -1
  520. package/dist/index.d.ts +5 -5
  521. package/dist/index.js +321 -313
  522. package/dist/index.js.map +1 -1
  523. package/dist/layouts/shell/AegisShell.cjs +1 -1
  524. package/dist/layouts/shell/AegisShell.cjs.map +1 -1
  525. package/dist/layouts/shell/AegisShell.d.ts +4 -2
  526. package/dist/layouts/shell/AegisShell.js +150 -243
  527. package/dist/layouts/shell/AegisShell.js.map +1 -1
  528. package/dist/layouts/shell/AppRoutes.cjs +2 -0
  529. package/dist/layouts/shell/AppRoutes.cjs.map +1 -0
  530. package/dist/layouts/shell/AppRoutes.d.ts +5 -0
  531. package/dist/layouts/shell/AppRoutes.js +8 -0
  532. package/dist/layouts/shell/AppRoutes.js.map +1 -0
  533. package/dist/layouts/shell/AppSwitcher.cjs +1 -1
  534. package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
  535. package/dist/layouts/shell/AppSwitcher.js +53 -36
  536. package/dist/layouts/shell/AppSwitcher.js.map +1 -1
  537. package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
  538. package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
  539. package/dist/layouts/shell/AuthRequiredCard.js +24 -22
  540. package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
  541. package/dist/layouts/shell/BreadcrumbBar.cjs +1 -1
  542. package/dist/layouts/shell/BreadcrumbBar.cjs.map +1 -1
  543. package/dist/layouts/shell/BreadcrumbBar.d.ts +1 -2
  544. package/dist/layouts/shell/BreadcrumbBar.js +19 -26
  545. package/dist/layouts/shell/BreadcrumbBar.js.map +1 -1
  546. package/dist/layouts/shell/RouteErrorBoundary.cjs +2 -0
  547. package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -0
  548. package/dist/layouts/shell/RouteErrorBoundary.d.ts +26 -0
  549. package/dist/layouts/shell/RouteErrorBoundary.js +40 -0
  550. package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -0
  551. package/dist/layouts/shell/RouterLink.cjs +2 -0
  552. package/dist/layouts/shell/RouterLink.cjs.map +1 -0
  553. package/dist/layouts/shell/RouterLink.d.ts +3 -0
  554. package/dist/layouts/shell/RouterLink.js +22 -0
  555. package/dist/layouts/shell/RouterLink.js.map +1 -0
  556. package/dist/layouts/shell/ShellCommandPalette.cjs +2 -0
  557. package/dist/layouts/shell/ShellCommandPalette.cjs.map +1 -0
  558. package/dist/layouts/shell/ShellCommandPalette.d.ts +7 -0
  559. package/dist/layouts/shell/ShellCommandPalette.js +32 -0
  560. package/dist/layouts/shell/ShellCommandPalette.js.map +1 -0
  561. package/dist/layouts/shell/ShellInboxPage.cjs +2 -0
  562. package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -0
  563. package/dist/layouts/shell/ShellInboxPage.d.ts +12 -0
  564. package/dist/layouts/shell/ShellInboxPage.js +33 -0
  565. package/dist/layouts/shell/ShellInboxPage.js.map +1 -0
  566. package/dist/layouts/shell/ShellNotificationBell.cjs +2 -0
  567. package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -0
  568. package/dist/layouts/shell/ShellNotificationBell.d.ts +5 -0
  569. package/dist/layouts/shell/ShellNotificationBell.js +30 -0
  570. package/dist/layouts/shell/ShellNotificationBell.js.map +1 -0
  571. package/dist/layouts/shell/Sidebar.cjs +1 -1
  572. package/dist/layouts/shell/Sidebar.cjs.map +1 -1
  573. package/dist/layouts/shell/Sidebar.d.ts +4 -2
  574. package/dist/layouts/shell/Sidebar.js +14 -11
  575. package/dist/layouts/shell/Sidebar.js.map +1 -1
  576. package/dist/layouts/shell/TopHeader.cjs +1 -1
  577. package/dist/layouts/shell/TopHeader.cjs.map +1 -1
  578. package/dist/layouts/shell/TopHeader.d.ts +6 -2
  579. package/dist/layouts/shell/TopHeader.js +87 -75
  580. package/dist/layouts/shell/TopHeader.js.map +1 -1
  581. package/dist/layouts/shell/apps.cjs +2 -0
  582. package/dist/layouts/shell/apps.cjs.map +1 -0
  583. package/dist/layouts/shell/apps.d.ts +12 -0
  584. package/dist/layouts/shell/apps.js +34 -0
  585. package/dist/layouts/shell/apps.js.map +1 -0
  586. package/dist/layouts/shell/buildRouteTree.cjs +2 -0
  587. package/dist/layouts/shell/buildRouteTree.cjs.map +1 -0
  588. package/dist/layouts/shell/buildRouteTree.d.ts +22 -0
  589. package/dist/layouts/shell/buildRouteTree.js +49 -0
  590. package/dist/layouts/shell/buildRouteTree.js.map +1 -0
  591. package/dist/layouts/shell/environments/EnvironmentProvider.cjs +2 -0
  592. package/dist/layouts/shell/environments/EnvironmentProvider.cjs.map +1 -0
  593. package/dist/layouts/shell/environments/EnvironmentProvider.d.ts +13 -0
  594. package/dist/layouts/shell/environments/EnvironmentProvider.js +90 -0
  595. package/dist/layouts/shell/environments/EnvironmentProvider.js.map +1 -0
  596. package/dist/layouts/shell/environments/{context.cjs → environmentContext.cjs} +2 -2
  597. package/dist/layouts/shell/environments/environmentContext.cjs.map +1 -0
  598. package/dist/layouts/shell/environments/environmentContext.d.ts +6 -0
  599. package/dist/layouts/shell/environments/environmentContext.js +8 -0
  600. package/dist/layouts/shell/environments/environmentContext.js.map +1 -0
  601. package/dist/layouts/shell/environments/index.d.ts +2 -3
  602. package/dist/layouts/shell/environments/types.cjs.map +1 -1
  603. package/dist/layouts/shell/environments/types.d.ts +23 -15
  604. package/dist/layouts/shell/environments/types.js.map +1 -1
  605. package/dist/layouts/shell/environments/useEnvironment.cjs +2 -0
  606. package/dist/layouts/shell/environments/useEnvironment.cjs.map +1 -0
  607. package/dist/layouts/shell/environments/{hooks.d.ts → useEnvironment.d.ts} +3 -2
  608. package/dist/layouts/shell/environments/useEnvironment.js +25 -0
  609. package/dist/layouts/shell/environments/useEnvironment.js.map +1 -0
  610. package/dist/layouts/shell/index.d.ts +3 -1
  611. package/dist/layouts/shell/types.d.ts +14 -14
  612. package/dist/layouts/shell/useAgentPanel.cjs +2 -0
  613. package/dist/layouts/shell/useAgentPanel.cjs.map +1 -0
  614. package/dist/layouts/shell/useAgentPanel.d.ts +13 -0
  615. package/dist/layouts/shell/useAgentPanel.js +21 -0
  616. package/dist/layouts/shell/useAgentPanel.js.map +1 -0
  617. package/dist/layouts/shell/useAppCommands.cjs +2 -0
  618. package/dist/layouts/shell/useAppCommands.cjs.map +1 -0
  619. package/dist/layouts/shell/useAppCommands.d.ts +6 -0
  620. package/dist/layouts/shell/useAppCommands.js +19 -0
  621. package/dist/layouts/shell/useAppCommands.js.map +1 -0
  622. package/dist/layouts/shell/useMobileNav.cjs +2 -0
  623. package/dist/layouts/shell/useMobileNav.cjs.map +1 -0
  624. package/dist/layouts/shell/useMobileNav.d.ts +20 -0
  625. package/dist/layouts/shell/useMobileNav.js +54 -0
  626. package/dist/layouts/shell/useMobileNav.js.map +1 -0
  627. package/dist/layouts/shell/useOpenNotification.cjs +2 -0
  628. package/dist/layouts/shell/useOpenNotification.cjs.map +1 -0
  629. package/dist/layouts/shell/useOpenNotification.d.ts +3 -0
  630. package/dist/layouts/shell/useOpenNotification.js +16 -0
  631. package/dist/layouts/shell/useOpenNotification.js.map +1 -0
  632. package/dist/layouts/shell/useShellUser.cjs +2 -0
  633. package/dist/layouts/shell/useShellUser.cjs.map +1 -0
  634. package/dist/layouts/shell/useShellUser.d.ts +7 -0
  635. package/dist/layouts/shell/useShellUser.js +23 -0
  636. package/dist/layouts/shell/useShellUser.js.map +1 -0
  637. package/dist/layouts/shell/useWarnOnce.cjs +2 -0
  638. package/dist/layouts/shell/useWarnOnce.cjs.map +1 -0
  639. package/dist/layouts/shell/useWarnOnce.d.ts +1 -0
  640. package/dist/layouts/shell/useWarnOnce.js +11 -0
  641. package/dist/layouts/shell/useWarnOnce.js.map +1 -0
  642. package/dist/lib/chart.cjs +1 -1
  643. package/dist/lib/chart.cjs.map +1 -1
  644. package/dist/lib/chart.d.ts +5 -7
  645. package/dist/lib/chart.js +49 -34
  646. package/dist/lib/chart.js.map +1 -1
  647. package/dist/lib/format.cjs +1 -1
  648. package/dist/lib/format.cjs.map +1 -1
  649. package/dist/lib/format.d.ts +34 -0
  650. package/dist/lib/format.js +98 -9
  651. package/dist/lib/format.js.map +1 -1
  652. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs +1 -1
  653. package/dist/lib/luceneQuery/tokenizeAtCursor.cjs.map +1 -1
  654. package/dist/lib/luceneQuery/tokenizeAtCursor.js +29 -29
  655. package/dist/lib/luceneQuery/tokenizeAtCursor.js.map +1 -1
  656. package/dist/lib/storage.cjs +1 -1
  657. package/dist/lib/storage.cjs.map +1 -1
  658. package/dist/lib/storage.js +19 -12
  659. package/dist/lib/storage.js.map +1 -1
  660. package/dist/lib/timeRange.cjs +1 -1
  661. package/dist/lib/timeRange.cjs.map +1 -1
  662. package/dist/lib/timeRange.d.ts +14 -4
  663. package/dist/lib/timeRange.js +43 -39
  664. package/dist/lib/timeRange.js.map +1 -1
  665. package/dist/locale/strings.cjs +1 -1
  666. package/dist/locale/strings.cjs.map +1 -1
  667. package/dist/locale/strings.d.ts +243 -2
  668. package/dist/locale/strings.js +545 -26
  669. package/dist/locale/strings.js.map +1 -1
  670. package/dist/notifications/notificationContext.cjs.map +1 -1
  671. package/dist/notifications/notificationContext.d.ts +15 -0
  672. package/dist/notifications/notificationContext.js.map +1 -1
  673. package/dist/style.css +1 -1
  674. package/dist/theme/ThemeProvider.cjs +1 -1
  675. package/dist/theme/ThemeProvider.cjs.map +1 -1
  676. package/dist/theme/ThemeProvider.d.ts +2 -1
  677. package/dist/theme/ThemeProvider.js +47 -33
  678. package/dist/theme/ThemeProvider.js.map +1 -1
  679. package/dist/theme/antdTheme.cjs +1 -1
  680. package/dist/theme/antdTheme.cjs.map +1 -1
  681. package/dist/theme/antdTheme.d.ts +0 -2
  682. package/dist/theme/antdTheme.js +28 -20
  683. package/dist/theme/antdTheme.js.map +1 -1
  684. package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
  685. package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
  686. package/dist/transports/agentm/AgentmChannelProvider.d.ts +1 -0
  687. package/dist/transports/agentm/AgentmChannelProvider.js +119 -131
  688. package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
  689. package/dist/transports/agentm/agentmChannelClient.cjs +1 -1
  690. package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -1
  691. package/dist/transports/agentm/agentmChannelClient.d.ts +8 -3
  692. package/dist/transports/agentm/agentmChannelClient.js +133 -89
  693. package/dist/transports/agentm/agentmChannelClient.js.map +1 -1
  694. package/dist/transports/index.d.ts +2 -2
  695. package/dist/transports/mcpBridge.cjs +2 -0
  696. package/dist/transports/mcpBridge.cjs.map +1 -0
  697. package/dist/transports/{bridge.d.ts → mcpBridge.d.ts} +2 -1
  698. package/dist/transports/mcpBridge.js +144 -0
  699. package/dist/transports/mcpBridge.js.map +1 -0
  700. package/dist/transports/mcpTools.cjs +2 -0
  701. package/dist/transports/mcpTools.cjs.map +1 -0
  702. package/dist/transports/mcpTools.d.ts +15 -0
  703. package/dist/transports/mcpTools.js +283 -0
  704. package/dist/transports/mcpTools.js.map +1 -0
  705. package/dist/transports.cjs +1 -1
  706. package/dist/transports.js +1 -1
  707. package/package.json +5 -4
  708. package/dist/agent/core/mcpToolCatalogue.cjs +0 -2
  709. package/dist/agent/core/mcpToolCatalogue.cjs.map +0 -1
  710. package/dist/agent/core/mcpToolCatalogue.d.ts +0 -2
  711. package/dist/agent/core/mcpToolCatalogue.js +0 -101
  712. package/dist/agent/core/mcpToolCatalogue.js.map +0 -1
  713. package/dist/components/ui/BucketCard.cjs +0 -2
  714. package/dist/components/ui/BucketCard.cjs.map +0 -1
  715. package/dist/components/ui/BucketCard.d.ts +0 -24
  716. package/dist/components/ui/BucketCard.js +0 -73
  717. package/dist/components/ui/BucketCard.js.map +0 -1
  718. package/dist/components/ui/ContentInspectorContent.cjs +0 -5
  719. package/dist/components/ui/ContentInspectorContent.cjs.map +0 -1
  720. package/dist/components/ui/ContentInspectorContent.d.ts +0 -14
  721. package/dist/components/ui/ContentInspectorContent.js +0 -101
  722. package/dist/components/ui/ContentInspectorContent.js.map +0 -1
  723. package/dist/components/ui/traceFormat.cjs +0 -2
  724. package/dist/components/ui/traceFormat.cjs.map +0 -1
  725. package/dist/components/ui/traceFormat.js +0 -11
  726. package/dist/components/ui/traceFormat.js.map +0 -1
  727. package/dist/layouts/shell/environments/EnvironmentContext.cjs +0 -2
  728. package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +0 -1
  729. package/dist/layouts/shell/environments/EnvironmentContext.d.ts +0 -12
  730. package/dist/layouts/shell/environments/EnvironmentContext.js +0 -94
  731. package/dist/layouts/shell/environments/EnvironmentContext.js.map +0 -1
  732. package/dist/layouts/shell/environments/context.cjs.map +0 -1
  733. package/dist/layouts/shell/environments/context.d.ts +0 -6
  734. package/dist/layouts/shell/environments/context.js +0 -6
  735. package/dist/layouts/shell/environments/context.js.map +0 -1
  736. package/dist/layouts/shell/environments/hooks.cjs +0 -2
  737. package/dist/layouts/shell/environments/hooks.cjs.map +0 -1
  738. package/dist/layouts/shell/environments/hooks.js +0 -24
  739. package/dist/layouts/shell/environments/hooks.js.map +0 -1
  740. package/dist/layouts/shell/environments/manifest.cjs +0 -2
  741. package/dist/layouts/shell/environments/manifest.cjs.map +0 -1
  742. package/dist/layouts/shell/environments/manifest.d.ts +0 -26
  743. package/dist/layouts/shell/environments/manifest.js +0 -82
  744. package/dist/layouts/shell/environments/manifest.js.map +0 -1
  745. package/dist/transports/bridge.cjs +0 -2
  746. package/dist/transports/bridge.cjs.map +0 -1
  747. package/dist/transports/bridge.js +0 -143
  748. package/dist/transports/bridge.js.map +0 -1
@@ -1,61 +1,155 @@
1
- import { uniqueId as q } from "../../lib/id.js";
2
- import { MCP_TOOL_CATALOGUE as z } from "./mcpToolCatalogue.js";
3
- function J(m = null) {
1
+ import { uniqueId as N } from "../../lib/id.js";
2
+ const le = 5e3, fe = 2e4, ge = 250, pe = 1200, G = 50, he = 3e3;
3
+ function me(a = null) {
4
4
  return {
5
- currentAppId: m,
5
+ currentAppId: a,
6
6
  route: { pathname: "/", search: "", params: {} },
7
7
  breadcrumbs: [],
8
8
  theme: "light",
9
9
  viewport: { width: 0, height: 0 }
10
10
  };
11
11
  }
12
- function Q(m, l) {
13
- for (const p of m) {
14
- const g = p.entities?.find((y) => y.id === l);
15
- if (g)
16
- return { surface: p, entity: g };
12
+ function we(a, r) {
13
+ for (const d of a) {
14
+ const l = d.entities?.find((h) => h.id === r);
15
+ if (l)
16
+ return { surface: d, entity: l };
17
17
  }
18
18
  return null;
19
19
  }
20
- function ne(m = {}) {
21
- const l = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set();
22
- let T = null, L = m.navigate ?? null, _ = [];
23
- const h = (e) => {
24
- for (const t of y)
20
+ function K(a, r) {
21
+ return a === "both" || r === "system" || a === r;
22
+ }
23
+ function E(a, r) {
24
+ return r.some(
25
+ (d) => (typeof d == "string" || typeof d == "number" || typeof d == "boolean") && String(d).toLowerCase().includes(a)
26
+ );
27
+ }
28
+ class S extends Error {
29
+ }
30
+ function C(a) {
31
+ return {
32
+ code: a instanceof S ? "invalid_params" : "thrown",
33
+ message: a instanceof Error ? a.message : String(a),
34
+ reason: a
35
+ };
36
+ }
37
+ function V(a) {
38
+ const r = a?.to;
39
+ if (typeof r != "string" || r === "")
40
+ throw new S("aegis.navigate requires { to: string }");
41
+ return r;
42
+ }
43
+ function be(a) {
44
+ const r = window.location.pathname.replace(/\/+$/, ""), d = a.replace(/\/+$/, "");
45
+ return d === "" ? r === "" ? "" : null : r.endsWith(d) ? r.slice(0, r.length - d.length) : null;
46
+ }
47
+ function X(a, r) {
48
+ const d = window.location;
49
+ let l;
50
+ try {
51
+ l = new URL(a, `${d.origin}${r.pathname}${r.search}`);
52
+ } catch {
53
+ throw new S(`aegis.navigate: "${a}" is not a URL`);
54
+ }
55
+ if (l.protocol !== d.protocol || l.origin !== d.origin)
56
+ throw new S(
57
+ `aegis.navigate: "${a}" leaves ${d.origin}; only paths on this site are allowed`
58
+ );
59
+ let h = l.pathname;
60
+ if (new URL(a, `${d.protocol}//aegis.invalid/`).host !== "aegis.invalid") {
61
+ const m = r.basename ?? be(r.pathname);
62
+ if (m === null)
63
+ throw new S(
64
+ `aegis.navigate: "${a}" is a full URL, but the app's base path is unknown (route ${r.pathname} on page ${d.pathname}); pass a path in the app instead`
65
+ );
66
+ if (h !== m && !h.startsWith(`${m}/`))
67
+ throw new S(
68
+ `aegis.navigate: "${a}" is outside this app, whose paths start with ${m}/`
69
+ );
70
+ h = h.slice(m.length);
71
+ }
72
+ return `${h.replace(/^\/*/, "/")}${l.search}${l.hash}`;
73
+ }
74
+ function q(a) {
75
+ return {
76
+ code: "unknown_action",
77
+ message: `No action registered with id "${a}"`
78
+ };
79
+ }
80
+ function x(a, r) {
81
+ return `[${a}="${CSS.escape(r)}"]`;
82
+ }
83
+ function ve(a) {
84
+ switch (a.kind) {
85
+ case "surface":
86
+ return x("data-agent-surface-id", a.surfaceId);
87
+ case "entity":
88
+ return x("data-agent-entity-id", a.entityId);
89
+ case "action":
90
+ return x("data-agent-action-id", a.actionId);
91
+ case "route":
92
+ return null;
93
+ }
94
+ }
95
+ function ye(a) {
96
+ return new Promise((r) => {
97
+ const d = Date.now();
98
+ let l = a.getBoundingClientRect(), h = 0;
99
+ const y = () => {
100
+ const m = a.getBoundingClientRect();
101
+ if (h = m.top === l.top && m.left === l.left ? h + 1 : 0, l = m, h >= 2 || Date.now() - d >= he) {
102
+ r(m);
103
+ return;
104
+ }
105
+ window.setTimeout(y, G);
106
+ };
107
+ window.setTimeout(y, G);
108
+ });
109
+ }
110
+ function Te(a = {}) {
111
+ const r = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Set();
112
+ let y = null, m = a.navigate ?? null, P = [];
113
+ const v = (e) => {
114
+ for (const t of h)
25
115
  try {
26
116
  t(e);
27
117
  } catch (n) {
28
118
  console.error("aegis runtime listener threw", n);
29
119
  }
30
- }, I = () => {
31
- const e = [];
32
- for (const t of p.values()) {
33
- const n = t.getProjection(), s = [];
34
- for (const u of l.values())
35
- u.source.kind === "component" && u.source.surfaceId === t.id && s.push(u.action.id);
36
- const r = n.entities, c = n.fields;
37
- e.push({
38
- id: t.id,
39
- kind: t.kind,
40
- appId: t.appId,
41
- label: t.label,
42
- entities: r,
43
- fields: c,
44
- actionIds: s,
45
- bbox: t.getBBox?.(),
46
- inViewport: t.getInViewport?.() ?? !0,
47
- askSuggestions: t.askSuggestions
48
- });
49
- }
50
- return e;
51
- }, $ = () => ({
120
+ }, _ = () => y ? y() : me(), z = (e) => {
121
+ const t = /* @__PURE__ */ new Set(), n = e.getElement?.();
122
+ if (n)
123
+ for (const i of n.querySelectorAll("[data-agent-action-id]")) {
124
+ const c = i.getAttribute("data-agent-action-id");
125
+ c && t.add(c);
126
+ }
127
+ const s = [];
128
+ for (const { action: i, source: c } of r.values())
129
+ (t.has(i.id) || i.appliesTo?.surfaceKind === e.kind || c.kind === "component" && c.surfaceId === e.id) && s.push(i.id);
130
+ return s;
131
+ }, B = (e) => {
132
+ const { entities: t, fields: n } = e.getProjection();
133
+ return {
134
+ id: e.id,
135
+ kind: e.kind,
136
+ appId: e.appId,
137
+ label: e.label,
138
+ entities: t,
139
+ fields: n,
140
+ actionIds: z(e),
141
+ bbox: e.getBBox?.(),
142
+ inViewport: e.getInViewport?.() ?? !0,
143
+ askSuggestions: e.askSuggestions
144
+ };
145
+ }, A = () => [...d.values()].map(B), M = () => ({
52
146
  timestamp: Date.now(),
53
- shell: T ? T() : J(),
54
- surfaces: I(),
55
- selection: [..._],
147
+ shell: _(),
148
+ surfaces: A(),
149
+ selection: [...P],
56
150
  focus: { surfaceId: null, entityId: null },
57
151
  appData: {}
58
- }), b = (e) => {
152
+ }), I = (e) => {
59
153
  const { action: t, source: n } = e;
60
154
  return {
61
155
  id: t.id,
@@ -66,281 +160,353 @@ function ne(m = {}) {
66
160
  resultSchema: t.resultSchema,
67
161
  available: !0,
68
162
  invocableBy: t.invocableBy ?? "both",
163
+ confirm: t.confirm,
69
164
  source: n
70
165
  };
71
- }, B = (e) => {
166
+ }, O = (e) => {
72
167
  const t = [];
73
- for (const n of l.values()) {
74
- const s = b(n);
75
- e?.available !== void 0 && s.available !== e.available || e?.invocableBy && s.invocableBy !== e.invocableBy || e?.appId && s.source.appId !== e.appId || t.push(s);
168
+ for (const n of e) {
169
+ const s = r.get(n);
170
+ s && t.push(I(s));
76
171
  }
77
172
  return t;
78
- }, P = (e) => {
79
- const t = l.get(e);
80
- return t ? b(t) : null;
81
- }, E = async (e, t = void 0, n = {}) => {
82
- const s = n.correlationId ?? q("aegis"), r = n.by ?? "user", c = l.get(e);
83
- if (!c) {
84
- const a = {
85
- code: "unknown_action",
86
- message: `No action registered with id "${e}"`
87
- };
88
- return h({ type: "action.failed", correlationId: s, error: a }), { ok: !1, error: a, correlationId: s };
173
+ }, J = (e) => {
174
+ const t = [];
175
+ for (const n of r.values()) {
176
+ const s = I(n);
177
+ e?.available !== void 0 && s.available !== e.available || e?.invocableBy && !K(s.invocableBy, e.invocableBy) || e?.appId && s.source.appId !== e.appId || t.push(s);
89
178
  }
90
- const u = {
91
- appId: c.source.appId,
92
- navigate: L ?? ((a) => {
93
- }),
94
- snapshot: $,
95
- toast: m.toast ?? ((a) => {
96
- }),
97
- correlationId: s,
98
- invokedBy: r,
99
- signal: new AbortController().signal
179
+ return t;
180
+ }, Q = (e) => {
181
+ const t = r.get(e);
182
+ return t ? I(t) : null;
183
+ }, U = (e, t, n) => {
184
+ const { id: s, invocableBy: i = "both", confirm: c } = e.action;
185
+ return K(i, t) ? n === "run" && t === "agent" && c?.danger ? {
186
+ code: "needs_confirm",
187
+ message: `Action "${s}" is marked dangerous; only the user can run it.`
188
+ } : null : {
189
+ code: "unavailable",
190
+ message: `Action "${s}" can only be invoked by the ${i}.`
100
191
  };
101
- h({ type: "action.invoked", id: e, params: t, by: r, correlationId: s });
102
- const f = Date.now();
192
+ }, D = (e, t, n, s = {}) => ({
193
+ appId: e.source.appId,
194
+ navigate: s.navigate ?? m ?? ((i) => {
195
+ }),
196
+ snapshot: M,
197
+ toast: a.toast ?? ((i) => {
198
+ }),
199
+ correlationId: n,
200
+ invokedBy: t,
201
+ signal: s.signal ?? new AbortController().signal
202
+ }), Y = async (e, t = void 0, n = {}) => {
203
+ const s = n.correlationId ?? N("aegis"), i = n.by ?? "user", c = (w) => (v({ type: "action.failed", correlationId: s, error: w }), { ok: !1, error: w, correlationId: s }), f = r.get(e);
204
+ if (!f)
205
+ return c(q(e));
206
+ const g = U(f, i, "run");
207
+ if (g)
208
+ return c(g);
209
+ v({ type: "action.invoked", id: e, params: t, by: i, correlationId: s });
210
+ const b = Date.now();
103
211
  try {
104
- const a = await c.action.run(t, u);
105
- return h({
212
+ const w = await f.action.run(
213
+ t,
214
+ D(f, i, s, { signal: n.signal })
215
+ );
216
+ return v({
106
217
  type: "action.completed",
107
218
  correlationId: s,
108
- result: a,
109
- durationMs: Date.now() - f
110
- }), { ok: !0, result: a, correlationId: s };
111
- } catch (a) {
112
- const v = {
113
- code: "thrown",
114
- message: a instanceof Error ? a.message : String(a),
115
- reason: a
116
- };
117
- return h({ type: "action.failed", correlationId: s, error: v }), { ok: !1, error: v, correlationId: s };
219
+ result: w,
220
+ durationMs: Date.now() - b
221
+ }), { ok: !0, result: w, correlationId: s };
222
+ } catch (w) {
223
+ return c(C(w));
118
224
  }
119
- }, M = (e) => (y.add(e), () => {
120
- y.delete(e);
121
- }), x = (e) => {
225
+ }, Z = async (e, t = void 0, n = {}) => {
226
+ const s = n.by ?? "user", i = r.get(e);
227
+ if (!i)
228
+ return { ok: !1, error: q(e) };
229
+ const c = U(i, s, "preview");
230
+ if (c)
231
+ return { ok: !1, error: c };
232
+ const f = I(i);
233
+ if (!i.action.dryRun)
234
+ return { ok: !0, action: f, params: t };
235
+ try {
236
+ const g = await i.action.dryRun(
237
+ t,
238
+ D(i, s, N("aegis"), {
239
+ navigate: (b) => {
240
+ },
241
+ signal: n.signal
242
+ })
243
+ );
244
+ return { ok: !0, action: f, params: t, preview: g };
245
+ } catch (g) {
246
+ return { ok: !1, error: C(g) };
247
+ }
248
+ }, R = (e) => (h.add(e), () => {
249
+ h.delete(e);
250
+ }), ee = (e) => {
122
251
  const { id: t } = e.action;
123
- return l.has(t) && console.warn(
252
+ return r.has(t) && console.warn(
124
253
  `[aegis] action id collision: "${t}" is being re-registered. Most-recent registration wins.`
125
- ), l.set(t, e), h({ type: "registry.changed", added: [t], removed: [] }), () => {
126
- l.get(t) === e && (l.delete(t), h({ type: "registry.changed", added: [], removed: [t] }));
254
+ ), r.set(t, e), v({ type: "registry.changed", added: [t], removed: [] }), () => {
255
+ r.get(t) === e && (r.delete(t), v({ type: "registry.changed", added: [], removed: [t] }));
127
256
  };
128
- }, F = (e) => {
129
- T = e;
130
- }, D = (e) => (p.has(e.id) && console.warn(
257
+ }, te = (e) => {
258
+ y = e;
259
+ }, ne = (e) => (d.has(e.id) && console.warn(
131
260
  `[aegis] surface id collision: "${e.id}" is being re-registered. Most-recent registration wins.`
132
- ), p.set(e.id, e), () => {
133
- p.get(e.id) === e && p.delete(e.id);
134
- }), N = (e) => {
135
- _ = [...e];
136
- }, j = (e) => {
137
- L = e;
138
- }, G = (e) => (g.has(e.id) && console.warn(
261
+ ), d.set(e.id, e), v({ type: "snapshot.changed", diff: { added: [e.id] } }), () => {
262
+ d.get(e.id) === e && (d.delete(e.id), v({ type: "snapshot.changed", diff: { removed: [e.id] } }));
263
+ }), se = (e) => {
264
+ P = [...e];
265
+ }, oe = (e) => {
266
+ m = e;
267
+ }, ie = (e) => (l.has(e.id) && console.warn(
139
268
  `[aegis] search provider id collision: "${e.id}" is being re-registered. Most-recent registration wins.`
140
- ), g.set(e.id, e), () => {
141
- g.get(e.id) === e && g.delete(e.id);
142
- }), H = (e) => {
269
+ ), l.set(e.id, e), () => {
270
+ l.get(e.id) === e && l.delete(e.id);
271
+ }), re = (e) => {
143
272
  if (e.kind === "surface") {
144
- const n = I().find((r) => r.id === e.surfaceId);
273
+ const n = d.get(e.surfaceId);
145
274
  if (!n)
146
275
  return null;
147
- const s = [];
148
- for (const r of l.values()) {
149
- const c = b(r);
150
- if (r.source.kind === "component" && r.source.surfaceId === n.id) {
151
- s.push(c);
152
- continue;
153
- }
154
- r.action.appliesTo?.surfaceKind === n.kind && s.push(c);
155
- }
156
- return { ref: e, surface: n, entities: n.entities, actions: s };
276
+ const s = B(n);
277
+ return {
278
+ ref: e,
279
+ surface: s,
280
+ entities: s.entities,
281
+ actions: O(s.actionIds)
282
+ };
157
283
  }
158
284
  if (e.kind === "entity") {
159
- const n = Q(I(), e.entityId);
160
- if (!n)
285
+ const n = A().filter(
286
+ (g) => e.surfaceId === void 0 || g.id === e.surfaceId
287
+ ), s = we(n, e.entityId);
288
+ if (!s)
161
289
  return null;
162
- const { surface: s, entity: r } = n, c = [], u = /* @__PURE__ */ new Set(), f = (a) => {
163
- u.has(a.action.id) || (u.add(a.action.id), c.push(b(a)));
164
- };
165
- for (const a of l.values()) {
166
- if (a.source.kind === "component" && a.source.surfaceId === s.id) {
167
- f(a);
168
- continue;
169
- }
170
- if (a.action.appliesTo?.surfaceKind === s.kind) {
171
- f(a);
172
- continue;
173
- }
174
- a.action.appliesTo?.entityType === r.type && f(a);
175
- }
176
- return { ref: e, surface: s, entity: r, actions: c };
290
+ const { surface: i, entity: c } = s, f = new Set(i.actionIds);
291
+ for (const { action: g } of r.values())
292
+ g.appliesTo?.entityType === c.type && f.add(g.id);
293
+ return { ref: e, surface: i, entity: c, actions: O(f) };
177
294
  }
178
295
  if (e.kind === "action") {
179
- const n = l.get(e.actionId);
296
+ const n = r.get(e.actionId);
180
297
  if (!n)
181
298
  return null;
182
- const s = b(n);
183
- let r;
184
- if (n.source.kind === "component" && n.source.surfaceId !== void 0) {
185
- const c = n.source.surfaceId;
186
- r = I().find((u) => u.id === c);
187
- }
188
- return { ref: e, action: s, surface: r, actions: [] };
299
+ const s = A().find(
300
+ (i) => i.actionIds.includes(e.actionId)
301
+ );
302
+ return { ref: e, action: I(n), surface: s, actions: [] };
189
303
  }
190
304
  const t = [];
191
- for (const n of l.values())
192
- n.source.kind === "app" && n.source.appId === e.appId && t.push(b(n));
305
+ for (const n of r.values())
306
+ n.source.kind === "app" && n.source.appId === e.appId && t.push(I(n));
193
307
  return { ref: e, actions: t };
194
- }, k = (e, t, n, s) => {
195
- const r = e.toLowerCase(), c = (t ?? "").toLowerCase(), u = n.toLowerCase(), f = (s ?? "").toLowerCase();
196
- return c && c === r ? 1 : c.startsWith(r) ? 0.8 : c.includes(r) ? 0.6 : u.includes(r) ? 0.4 : f.includes(r) ? 0.2 : 0;
197
- }, K = async (e, t = {}) => {
308
+ }, $ = (e, t, n, s) => {
309
+ const i = e.toLowerCase(), c = (t ?? "").toLowerCase(), f = n.toLowerCase(), g = (s ?? "").toLowerCase();
310
+ return c && c === i ? 1 : c.startsWith(i) ? 0.8 : c.includes(i) ? 0.6 : f.includes(i) ? 0.4 : g.includes(i) ? 0.2 : 0;
311
+ }, ae = async (e, t = {}) => {
198
312
  const n = t.limit ?? 20, s = new Set(
199
313
  t.kinds ?? ["surface", "entity", "action", "route"]
200
- ), r = [];
314
+ ), i = [];
201
315
  if (e.length > 0) {
202
- for (const o of I())
203
- if (!(t.appId && o.appId !== t.appId)) {
316
+ for (const u of A())
317
+ if (!(t.appId && u.appId !== t.appId)) {
204
318
  if (s.has("surface")) {
205
- const i = k(e, o.label, o.id, void 0);
206
- i > 0 && r.push({
207
- ref: { kind: "surface", surfaceId: o.id },
319
+ const o = $(e, u.label, u.id, void 0);
320
+ o > 0 && i.push({
321
+ ref: { kind: "surface", surfaceId: u.id },
208
322
  kind: "surface",
209
- label: o.label ?? o.id,
210
- appId: o.appId,
323
+ label: u.label ?? u.id,
324
+ appId: u.appId,
211
325
  source: "snapshot",
212
- score: i
326
+ score: o
213
327
  });
214
328
  }
215
- if (s.has("entity") && o.entities)
216
- for (const i of o.entities) {
217
- let d = k(e, i.label, i.id, void 0);
218
- const S = k(e, i.type, i.type, void 0);
219
- S > d && (d = S), d > 0 && r.push({
220
- ref: { kind: "entity", entityId: i.id, surfaceId: o.id },
329
+ if (s.has("entity") && u.entities)
330
+ for (const o of u.entities) {
331
+ let p = $(e, o.label, o.id, void 0);
332
+ const T = $(e, o.type, o.type, void 0);
333
+ T > p && (p = T), p > 0 && i.push({
334
+ ref: { kind: "entity", entityId: o.id, surfaceId: u.id },
221
335
  kind: "entity",
222
- label: i.label ?? i.id,
223
- appId: o.appId,
336
+ label: o.label ?? o.id,
337
+ appId: u.appId,
224
338
  source: "snapshot",
225
- score: d
339
+ score: p
226
340
  });
227
341
  }
228
342
  }
229
343
  if (s.has("action"))
230
- for (const o of l.values()) {
231
- const i = o.action;
232
- let d = k(e, i.label, i.id, i.description);
233
- if (i.keywords)
234
- for (const S of i.keywords) {
235
- const C = k(e, S, S, void 0);
236
- C > d && (d = C);
344
+ for (const u of r.values()) {
345
+ const o = u.action;
346
+ let p = $(e, o.label, o.id, o.description);
347
+ if (o.keywords)
348
+ for (const T of o.keywords) {
349
+ const H = $(e, T, T, void 0);
350
+ H > p && (p = H);
237
351
  }
238
- d > 0 && r.push({
239
- ref: { kind: "action", actionId: i.id },
352
+ p > 0 && i.push({
353
+ ref: { kind: "action", actionId: o.id },
240
354
  kind: "action",
241
- label: i.label,
355
+ label: o.label,
242
356
  source: "snapshot",
243
- score: d
357
+ score: p
244
358
  });
245
359
  }
246
360
  }
247
- const c = new AbortController(), u = () => {
361
+ const c = new AbortController(), f = () => {
248
362
  c.abort();
249
363
  };
250
- t.signal && (t.signal.aborted ? c.abort() : t.signal.addEventListener("abort", u));
251
- const f = [...g.values()].filter((o) => !(t.appId && o.appId !== t.appId || !o.kinds.some((i) => s.has(i)) || o.matches && !o.matches(e))), a = await Promise.all(
252
- f.map(async (o) => {
364
+ t.signal && (t.signal.aborted ? c.abort() : t.signal.addEventListener("abort", f));
365
+ const g = [...l.values()].filter((u) => !(t.appId && u.appId !== t.appId || !u.kinds.some((o) => s.has(o)) || u.matches && !u.matches(e))), b = [], w = await Promise.all(
366
+ g.map(async (u) => {
253
367
  try {
254
- return (await o.search(e, {
368
+ return (await u.search(e, {
255
369
  limit: n,
256
370
  signal: c.signal
257
- })).map((d) => ({ ...d, source: "provider" }));
258
- } catch {
259
- return [];
371
+ })).map((p) => ({ ...p, source: "provider" }));
372
+ } catch (o) {
373
+ return c.signal.aborted || b.push({
374
+ providerId: u.id,
375
+ message: o instanceof Error ? o.message : String(o)
376
+ }), [];
260
377
  }
261
378
  })
262
379
  );
263
- t.signal && t.signal.removeEventListener("abort", u);
264
- for (const o of a)
265
- for (const i of o)
266
- r.push(i);
267
- const v = (o) => {
268
- switch (o.kind) {
380
+ t.signal && t.signal.removeEventListener("abort", f);
381
+ for (const u of w)
382
+ for (const o of u)
383
+ i.push(o);
384
+ const L = (u) => {
385
+ switch (u.kind) {
269
386
  case "surface":
270
- return `s:${o.surfaceId}`;
387
+ return `s:${u.surfaceId}`;
271
388
  case "entity":
272
- return `e:${o.entityId}`;
389
+ return `e:${u.entityId}`;
273
390
  case "action":
274
- return `a:${o.actionId}`;
391
+ return `a:${u.actionId}`;
275
392
  case "route":
276
- return `r:${o.appId}:${o.pathname}`;
393
+ return `r:${u.appId}:${u.pathname}`;
277
394
  }
278
- }, w = /* @__PURE__ */ new Map();
279
- for (const o of r) {
280
- const i = v(o.ref), d = w.get(i);
281
- d ? d.source === "provider" && o.source === "snapshot" && w.set(i, o) : w.set(i, o);
395
+ }, k = /* @__PURE__ */ new Map();
396
+ for (const u of i) {
397
+ const o = L(u.ref), p = k.get(o);
398
+ p ? p.source === "provider" && u.source === "snapshot" && k.set(o, u) : k.set(o, u);
282
399
  }
283
- return [...w.values()].sort((o, i) => i.score - o.score).slice(0, n);
284
- }, O = (e) => {
400
+ return { results: [...k.values()].sort((u, o) => o.score - u.score).slice(0, n), failedProviders: b };
401
+ }, ce = async (e) => {
402
+ if (typeof document > "u")
403
+ return { found: !1 };
404
+ const t = ve(e), n = t ? document.querySelector(t) : null;
405
+ if (!(n instanceof HTMLElement))
406
+ return { found: !1 };
407
+ const s = document.visibilityState === "hidden" || window.matchMedia("(prefers-reduced-motion: reduce)").matches;
408
+ return n.scrollIntoView({
409
+ block: "center",
410
+ behavior: s ? "auto" : "smooth"
411
+ }), n.setAttribute("data-aegis-highlight", "true"), window.setTimeout(() => {
412
+ n.removeAttribute("data-aegis-highlight");
413
+ }, pe), { found: !0, bbox: s ? n.getBoundingClientRect() : await ye(n) };
414
+ }, F = (e) => {
415
+ if (e === void 0)
416
+ return [...d.values()];
417
+ const t = d.get(e);
418
+ return t ? [t] : [];
419
+ }, W = (e) => {
285
420
  switch (e.kind) {
286
421
  case "surface":
287
- return `[data-agent-surface-id="${e.surfaceId}"]`;
288
- case "entity":
289
- return `[data-agent-entity-id="${e.entityId}"]`;
422
+ return d.has(e.surfaceId);
290
423
  case "action":
291
- return `[data-agent-action-id="${e.actionId}"]`;
424
+ return r.has(e.actionId);
425
+ case "entity":
426
+ return F(e.surfaceId).some(
427
+ (t) => t.getProjection().entities?.some((n) => n.id === e.entityId) ?? !1
428
+ );
429
+ }
430
+ }, ue = (e) => {
431
+ switch (e.kind) {
432
+ case "present":
433
+ return W(e.ref);
434
+ case "absent":
435
+ return !W(e.ref);
292
436
  case "route":
293
- return null;
437
+ return _().route.pathname === e.pathname;
438
+ case "text": {
439
+ const t = e.text.toLowerCase();
440
+ return F(e.surfaceId).some((n) => {
441
+ const { entities: s = [], fields: i = [] } = n.getProjection();
442
+ return E(t, [n.label]) || s.some(
443
+ (c) => E(t, [
444
+ c.id,
445
+ c.label,
446
+ ...Object.values(c.data ?? {})
447
+ ])
448
+ ) || i.some((c) => E(t, [c.label, c.value]));
449
+ });
450
+ }
451
+ case "field":
452
+ return d.get(e.surfaceId)?.getProjection().fields?.some(
453
+ (t) => t.name === e.name && t.value === e.value
454
+ ) ?? !1;
294
455
  }
295
- }, R = 1200, V = (e) => {
296
- if (typeof document > "u")
297
- return Promise.resolve({ found: !1 });
298
- const t = O(e);
299
- if (!t)
300
- return Promise.resolve({ found: !1 });
301
- const n = document.querySelector(t);
302
- return n instanceof HTMLElement ? (n.scrollIntoView({ block: "center", behavior: "smooth" }), n.setAttribute("data-aegis-highlight", "true"), window.setTimeout(() => {
303
- n.removeAttribute("data-aegis-highlight");
304
- }, R), Promise.resolve({ found: !0, bbox: n.getBoundingClientRect() })) : Promise.resolve({ found: !1 });
305
- }, U = (e, t = {}) => {
306
- const n = t.timeoutMs ?? 5e3, s = new Function("snap", `return (${e});`);
307
- return new Promise((r, c) => {
308
- const u = (i) => {
309
- o(), c({ code: "aborted", message: i });
310
- }, f = () => {
311
- const i = $();
312
- try {
313
- if (s(i))
314
- return o(), r(i), !0;
315
- } catch (d) {
316
- return u(`waitFor predicate threw: ${String(d)}`), !0;
317
- }
318
- return !1;
319
- }, a = M((i) => {
320
- (i.type === "snapshot.changed" || i.type === "registry.changed") && f();
321
- }), v = window.setInterval(f, 100), w = window.setTimeout(() => {
322
- u(`waitFor timed out after ${String(n)}ms: ${e}`);
323
- }, n), A = () => {
324
- u(`waitFor aborted: ${e}`);
456
+ }, de = (e, t = {}) => {
457
+ const n = Math.min(
458
+ Math.max(t.timeoutMs ?? le, 0),
459
+ fe
460
+ ), { signal: s } = t;
461
+ return new Promise((i, c) => {
462
+ const f = {
463
+ code: "aborted",
464
+ message: "waitFor was aborted"
325
465
  };
326
- if (t.signal) {
327
- if (t.signal.aborted) {
328
- A();
329
- return;
330
- }
331
- t.signal.addEventListener("abort", A);
332
- }
333
- function o() {
334
- a(), window.clearInterval(v), window.clearTimeout(w), t.signal && t.signal.removeEventListener("abort", A);
466
+ if (s?.aborted) {
467
+ c(f);
468
+ return;
335
469
  }
336
- f();
470
+ let g = !1;
471
+ const b = (o) => {
472
+ g || (g = !0, k(), window.clearInterval(j), window.clearTimeout(u), s?.removeEventListener("abort", L), o());
473
+ }, w = () => {
474
+ try {
475
+ if (ue(e)) {
476
+ const o = M();
477
+ b(() => {
478
+ i(o);
479
+ });
480
+ }
481
+ } catch (o) {
482
+ const p = C(o);
483
+ b(() => {
484
+ c(p);
485
+ });
486
+ }
487
+ }, L = () => {
488
+ b(() => {
489
+ c(f);
490
+ });
491
+ }, k = R((o) => {
492
+ (o.type === "snapshot.changed" || o.type === "registry.changed") && w();
493
+ }), j = window.setInterval(w, ge), u = window.setTimeout(() => {
494
+ const o = {
495
+ code: "timeout",
496
+ message: `waitFor: condition not met within ${String(n)} ms`
497
+ };
498
+ b(() => {
499
+ c(o);
500
+ });
501
+ }, n);
502
+ s?.addEventListener("abort", L), w();
337
503
  });
338
- }, W = () => z;
339
- return l.set("aegis.navigate", {
504
+ };
505
+ return r.set("aegis.navigate", {
340
506
  action: {
341
507
  id: "aegis.navigate",
342
508
  label: "Navigate",
343
- description: "Navigate to a route inside the current app shell.",
509
+ description: "Navigate to a path in this app. `to` resolves from the current route as a URL path does (x from /gallery goes to /x); other origins are refused.",
344
510
  paramsSchema: {
345
511
  type: "object",
346
512
  properties: { to: { type: "string" } },
@@ -348,44 +514,45 @@ function ne(m = {}) {
348
514
  },
349
515
  invocableBy: "both",
350
516
  run: (e, t) => {
351
- const n = e, s = typeof n?.to == "string" ? n.to : "";
352
- if (!s)
353
- throw new Error("aegis.navigate requires { to: string }");
354
- return t.navigate(s), { to: s };
355
- }
517
+ const n = X(V(e), _().route);
518
+ return t.navigate(n), { to: n };
519
+ },
520
+ dryRun: (e) => ({
521
+ summary: `would navigate to ${X(V(e), _().route)}`
522
+ })
356
523
  },
357
524
  source: { kind: "app", appId: "aegis" }
358
525
  }), {
359
- snapshot: $,
360
- listActions: B,
361
- getAction: P,
362
- inspect: H,
363
- search: K,
364
- highlight: V,
365
- waitFor: U,
366
- toMcpTools: W,
367
- dispatch: E,
368
- subscribe: M,
369
- onAskTriggered: (e) => M((t) => {
526
+ snapshot: M,
527
+ listActions: J,
528
+ getAction: Q,
529
+ inspect: re,
530
+ search: ae,
531
+ highlight: ce,
532
+ waitFor: de,
533
+ dispatch: Y,
534
+ preview: Z,
535
+ subscribe: R,
536
+ onAskTriggered: (e) => R((t) => {
370
537
  t.type === "ask.triggered" && e(t.context);
371
538
  }),
372
539
  emitAskTriggered: (e) => {
373
- h({ type: "ask.triggered", context: e });
540
+ v({ type: "ask.triggered", context: e });
374
541
  },
375
542
  emitAskSubmit: (e) => {
376
- h({ type: "ask.submit", request: e });
543
+ v({ type: "ask.submit", request: e });
377
544
  },
378
- _register: x,
379
- _registerSurface: D,
380
- _registerSearchProvider: G,
381
- setSelection: N,
382
- _setShellSnapshot: F,
383
- _setNavigate: j
545
+ _register: ee,
546
+ _registerSurface: ne,
547
+ _registerSearchProvider: ie,
548
+ setSelection: se,
549
+ _setShellSnapshot: te,
550
+ _setNavigate: oe
384
551
  };
385
552
  }
386
553
  export {
387
- ne as createAegisRuntime,
388
- J as defaultShellSnapshot,
389
- Q as findSurfaceContaining
554
+ Te as createAegisRuntime,
555
+ me as defaultShellSnapshot,
556
+ we as findSurfaceContaining
390
557
  };
391
558
  //# sourceMappingURL=runtime.js.map