@dxos/plugin-automation 0.7.5-labs.f5080a1 → 0.7.5-main.5ae2ba8

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 (297) hide show
  1. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs +132 -0
  2. package/dist/lib/browser/AutomationPanel-ITYXSN5Z.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DQ7ZSYJJ.mjs → chunk-OFDNNRLE.mjs} +3 -6
  4. package/dist/lib/browser/{chunk-DQ7ZSYJJ.mjs.map → chunk-OFDNNRLE.mjs.map} +3 -3
  5. package/dist/lib/browser/chunk-U7QLNY2S.mjs +8 -0
  6. package/dist/lib/browser/chunk-U7QLNY2S.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-WY2C7JY4.mjs +119 -0
  8. package/dist/lib/browser/chunk-WY2C7JY4.mjs.map +7 -0
  9. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs +56 -0
  10. package/dist/lib/browser/complementary-panel-4CPOJL4Y.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +22 -373
  12. package/dist/lib/browser/index.mjs.map +4 -4
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/react-surface-SAPMN4PF.mjs +27 -0
  15. package/dist/lib/browser/react-surface-SAPMN4PF.mjs.map +7 -0
  16. package/dist/lib/node/{chunk-OCW5GAVZ.cjs → AutomationPanel-X33HHDMQ.cjs} +19 -131
  17. package/dist/lib/node/AutomationPanel-X33HHDMQ.cjs.map +7 -0
  18. package/dist/lib/node/chunk-7Q5SNGCL.cjs +148 -0
  19. package/dist/lib/node/chunk-7Q5SNGCL.cjs.map +7 -0
  20. package/dist/lib/node/chunk-CB5OB6JH.cjs +40 -0
  21. package/dist/lib/node/chunk-CB5OB6JH.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-TQEDPRY5.cjs → chunk-ORMEYEBE.cjs} +6 -9
  23. package/dist/lib/node/{chunk-TQEDPRY5.cjs.map → chunk-ORMEYEBE.cjs.map} +3 -3
  24. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs +72 -0
  25. package/dist/lib/node/complementary-panel-ZYJJ42ZU.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +37 -374
  27. package/dist/lib/node/index.cjs.map +4 -4
  28. package/dist/lib/node/meta.json +1 -1
  29. package/dist/lib/node/{react-surface-HDAVE6NU.cjs → react-surface-2WRVAPGR.cjs} +9 -28
  30. package/dist/lib/node/react-surface-2WRVAPGR.cjs.map +7 -0
  31. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs +133 -0
  32. package/dist/lib/node-esm/AutomationPanel-HY3GB4BT.mjs.map +7 -0
  33. package/dist/lib/node-esm/{chunk-JFHI22MF.mjs → chunk-6MUUH67V.mjs} +3 -6
  34. package/dist/lib/node-esm/{chunk-JFHI22MF.mjs.map → chunk-6MUUH67V.mjs.map} +3 -3
  35. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs +10 -0
  36. package/dist/lib/node-esm/chunk-R3P2WPBQ.mjs.map +7 -0
  37. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs +120 -0
  38. package/dist/lib/node-esm/chunk-UDD2VA6G.mjs.map +7 -0
  39. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs +57 -0
  40. package/dist/lib/node-esm/complementary-panel-S42RIIAY.mjs.map +7 -0
  41. package/dist/lib/node-esm/index.mjs +22 -373
  42. package/dist/lib/node-esm/index.mjs.map +4 -4
  43. package/dist/lib/node-esm/meta.json +1 -1
  44. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs +28 -0
  45. package/dist/lib/node-esm/react-surface-QWLPOYXO.mjs.map +7 -0
  46. package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/{ai-client.d.ts → complementary-panel.d.ts} +2 -3
  48. package/dist/types/src/capabilities/complementary-panel.d.ts.map +1 -0
  49. package/dist/types/src/capabilities/index.d.ts +1 -180
  50. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  52. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -2
  53. package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
  54. package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
  56. package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
  57. package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
  58. package/dist/types/src/components/index.d.ts +1 -11
  59. package/dist/types/src/components/index.d.ts.map +1 -1
  60. package/dist/types/src/index.d.ts +1 -3
  61. package/dist/types/src/index.d.ts.map +1 -1
  62. package/dist/types/src/meta.d.ts +0 -1
  63. package/dist/types/src/meta.d.ts.map +1 -1
  64. package/dist/types/src/testing/index.d.ts +0 -1
  65. package/dist/types/src/testing/index.d.ts.map +1 -1
  66. package/dist/types/src/testing/test-functions.d.ts +0 -2
  67. package/dist/types/src/testing/test-functions.d.ts.map +1 -1
  68. package/dist/types/src/translations.d.ts +2 -92
  69. package/dist/types/src/translations.d.ts.map +1 -1
  70. package/package.json +23 -71
  71. package/src/AutomationPlugin.tsx +9 -64
  72. package/src/capabilities/complementary-panel.ts +56 -0
  73. package/src/capabilities/index.ts +1 -5
  74. package/src/capabilities/react-surface.tsx +2 -16
  75. package/src/components/AutomationPanel/AutomationPanel.stories.tsx +1 -2
  76. package/src/components/AutomationPanel/AutomationPanel.tsx +56 -49
  77. package/src/components/TriggerEditor/TriggerEditor.stories.tsx +1 -2
  78. package/src/components/TriggerEditor/TriggerEditor.tsx +6 -1
  79. package/src/components/index.ts +0 -7
  80. package/src/index.ts +2 -3
  81. package/src/meta.ts +1 -2
  82. package/src/testing/index.ts +0 -1
  83. package/src/testing/test-functions.ts +0 -7
  84. package/src/translations.ts +2 -29
  85. package/dist/lib/browser/AutomationPanel-YPD3AGQN.mjs +0 -8
  86. package/dist/lib/browser/AutomationPanel-YPD3AGQN.mjs.map +0 -7
  87. package/dist/lib/browser/ChatContainer-ODZECATM.mjs +0 -12
  88. package/dist/lib/browser/ChatContainer-ODZECATM.mjs.map +0 -7
  89. package/dist/lib/browser/ai-client-UJLNYP7B.mjs +0 -22
  90. package/dist/lib/browser/ai-client-UJLNYP7B.mjs.map +0 -7
  91. package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs +0 -162
  92. package/dist/lib/browser/app-graph-builder-3H5TCRG4.mjs.map +0 -7
  93. package/dist/lib/browser/chunk-43WRHV2L.mjs +0 -150
  94. package/dist/lib/browser/chunk-43WRHV2L.mjs.map +0 -7
  95. package/dist/lib/browser/chunk-BQHXJZ4K.mjs +0 -15
  96. package/dist/lib/browser/chunk-BQHXJZ4K.mjs.map +0 -7
  97. package/dist/lib/browser/chunk-DL7XA62G.mjs +0 -1531
  98. package/dist/lib/browser/chunk-DL7XA62G.mjs.map +0 -7
  99. package/dist/lib/browser/chunk-PQGFC2ZO.mjs +0 -284
  100. package/dist/lib/browser/chunk-PQGFC2ZO.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-Z54KIF6H.mjs +0 -242
  102. package/dist/lib/browser/chunk-Z54KIF6H.mjs.map +0 -7
  103. package/dist/lib/browser/intent-resolver-5YVZJFS3.mjs +0 -29
  104. package/dist/lib/browser/intent-resolver-5YVZJFS3.mjs.map +0 -7
  105. package/dist/lib/browser/react-surface-WRHRCEV5.mjs +0 -50
  106. package/dist/lib/browser/react-surface-WRHRCEV5.mjs.map +0 -7
  107. package/dist/lib/browser/types/index.mjs +0 -24
  108. package/dist/lib/browser/types/index.mjs.map +0 -7
  109. package/dist/lib/node/AutomationPanel-CO26O75P.cjs +0 -26
  110. package/dist/lib/node/AutomationPanel-CO26O75P.cjs.map +0 -7
  111. package/dist/lib/node/ChatContainer-5URBEXQD.cjs +0 -33
  112. package/dist/lib/node/ChatContainer-5URBEXQD.cjs.map +0 -7
  113. package/dist/lib/node/ai-client-AOB6TLNW.cjs +0 -38
  114. package/dist/lib/node/ai-client-AOB6TLNW.cjs.map +0 -7
  115. package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs +0 -178
  116. package/dist/lib/node/app-graph-builder-CDEQJEHY.cjs.map +0 -7
  117. package/dist/lib/node/chunk-AWZVJZ2I.cjs +0 -34
  118. package/dist/lib/node/chunk-AWZVJZ2I.cjs.map +0 -7
  119. package/dist/lib/node/chunk-D2QQXWOY.cjs +0 -302
  120. package/dist/lib/node/chunk-D2QQXWOY.cjs.map +0 -7
  121. package/dist/lib/node/chunk-H3RSMGJG.cjs +0 -173
  122. package/dist/lib/node/chunk-H3RSMGJG.cjs.map +0 -7
  123. package/dist/lib/node/chunk-NH7STAX6.cjs +0 -1515
  124. package/dist/lib/node/chunk-NH7STAX6.cjs.map +0 -7
  125. package/dist/lib/node/chunk-OCW5GAVZ.cjs.map +0 -7
  126. package/dist/lib/node/intent-resolver-MJFZT5IU.cjs +0 -44
  127. package/dist/lib/node/intent-resolver-MJFZT5IU.cjs.map +0 -7
  128. package/dist/lib/node/react-surface-HDAVE6NU.cjs.map +0 -7
  129. package/dist/lib/node/types/index.cjs +0 -46
  130. package/dist/lib/node/types/index.cjs.map +0 -7
  131. package/dist/lib/node-esm/AutomationPanel-VQZUKPK2.mjs +0 -9
  132. package/dist/lib/node-esm/AutomationPanel-VQZUKPK2.mjs.map +0 -7
  133. package/dist/lib/node-esm/ChatContainer-23QIVDG5.mjs +0 -13
  134. package/dist/lib/node-esm/ChatContainer-23QIVDG5.mjs.map +0 -7
  135. package/dist/lib/node-esm/ai-client-RUCCJ7JZ.mjs +0 -23
  136. package/dist/lib/node-esm/ai-client-RUCCJ7JZ.mjs.map +0 -7
  137. package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs +0 -163
  138. package/dist/lib/node-esm/app-graph-builder-GR3URVNX.mjs.map +0 -7
  139. package/dist/lib/node-esm/chunk-7JO77AAS.mjs +0 -151
  140. package/dist/lib/node-esm/chunk-7JO77AAS.mjs.map +0 -7
  141. package/dist/lib/node-esm/chunk-JJFWFS6P.mjs +0 -1532
  142. package/dist/lib/node-esm/chunk-JJFWFS6P.mjs.map +0 -7
  143. package/dist/lib/node-esm/chunk-LSSWQIQD.mjs +0 -16
  144. package/dist/lib/node-esm/chunk-LSSWQIQD.mjs.map +0 -7
  145. package/dist/lib/node-esm/chunk-NSVQZ3EH.mjs +0 -243
  146. package/dist/lib/node-esm/chunk-NSVQZ3EH.mjs.map +0 -7
  147. package/dist/lib/node-esm/chunk-VN2AFV25.mjs +0 -285
  148. package/dist/lib/node-esm/chunk-VN2AFV25.mjs.map +0 -7
  149. package/dist/lib/node-esm/intent-resolver-FCKNRTKQ.mjs +0 -30
  150. package/dist/lib/node-esm/intent-resolver-FCKNRTKQ.mjs.map +0 -7
  151. package/dist/lib/node-esm/react-surface-FZ5OFRDE.mjs +0 -51
  152. package/dist/lib/node-esm/react-surface-FZ5OFRDE.mjs.map +0 -7
  153. package/dist/lib/node-esm/types/index.mjs +0 -25
  154. package/dist/lib/node-esm/types/index.mjs.map +0 -7
  155. package/dist/types/src/artifacts.stories.d.ts +0 -16
  156. package/dist/types/src/artifacts.stories.d.ts.map +0 -1
  157. package/dist/types/src/capabilities/ai-client.d.ts.map +0 -1
  158. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -180
  159. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  160. package/dist/types/src/capabilities/capabilities.d.ts +0 -5
  161. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  162. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  163. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  164. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts +0 -7
  165. package/dist/types/src/components/ChatContainer/ChatContainer.d.ts.map +0 -1
  166. package/dist/types/src/components/ChatContainer/index.d.ts +0 -4
  167. package/dist/types/src/components/ChatContainer/index.d.ts.map +0 -1
  168. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts +0 -14
  169. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.d.ts.map +0 -1
  170. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts +0 -8
  171. package/dist/types/src/components/MarkdownViewer/MarkdownViewer.stories.d.ts.map +0 -1
  172. package/dist/types/src/components/MarkdownViewer/index.d.ts +0 -2
  173. package/dist/types/src/components/MarkdownViewer/index.d.ts.map +0 -1
  174. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts +0 -10
  175. package/dist/types/src/components/PromptEditor/PromptEditor.d.ts.map +0 -1
  176. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts +0 -6
  177. package/dist/types/src/components/PromptEditor/PromptEditor.stories.d.ts.map +0 -1
  178. package/dist/types/src/components/PromptEditor/index.d.ts +0 -2
  179. package/dist/types/src/components/PromptEditor/index.d.ts.map +0 -1
  180. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts +0 -4
  181. package/dist/types/src/components/PromptEditor/prompt-extension.d.ts.map +0 -1
  182. package/dist/types/src/components/PromptEditor/types.d.ts +0 -18
  183. package/dist/types/src/components/PromptEditor/types.d.ts.map +0 -1
  184. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts +0 -6
  185. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.d.ts.map +0 -1
  186. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts +0 -8
  187. package/dist/types/src/components/ServiceRegistry/ServiceRegistry.stories.d.ts.map +0 -1
  188. package/dist/types/src/components/ServiceRegistry/index.d.ts +0 -2
  189. package/dist/types/src/components/ServiceRegistry/index.d.ts.map +0 -1
  190. package/dist/types/src/components/Thread/ScrollContainer.d.ts +0 -15
  191. package/dist/types/src/components/Thread/ScrollContainer.d.ts.map +0 -1
  192. package/dist/types/src/components/Thread/StatusLine.d.ts +0 -11
  193. package/dist/types/src/components/Thread/StatusLine.d.ts.map +0 -1
  194. package/dist/types/src/components/Thread/StatusLine.stories.d.ts +0 -9
  195. package/dist/types/src/components/Thread/StatusLine.stories.d.ts.map +0 -1
  196. package/dist/types/src/components/Thread/Tabbed.d.ts +0 -9
  197. package/dist/types/src/components/Thread/Tabbed.d.ts.map +0 -1
  198. package/dist/types/src/components/Thread/Tabbed.stories.d.ts +0 -8
  199. package/dist/types/src/components/Thread/Tabbed.stories.d.ts.map +0 -1
  200. package/dist/types/src/components/Thread/Thread.d.ts +0 -11
  201. package/dist/types/src/components/Thread/Thread.d.ts.map +0 -1
  202. package/dist/types/src/components/Thread/Thread.stories.d.ts +0 -10
  203. package/dist/types/src/components/Thread/Thread.stories.d.ts.map +0 -1
  204. package/dist/types/src/components/Thread/ThreadMessage.d.ts +0 -12
  205. package/dist/types/src/components/Thread/ThreadMessage.d.ts.map +0 -1
  206. package/dist/types/src/components/Thread/ToggleContainer.d.ts +0 -13
  207. package/dist/types/src/components/Thread/ToggleContainer.d.ts.map +0 -1
  208. package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts +0 -9
  209. package/dist/types/src/components/Thread/ToggleContainer.stories.d.ts.map +0 -1
  210. package/dist/types/src/components/Thread/index.d.ts +0 -2
  211. package/dist/types/src/components/Thread/index.d.ts.map +0 -1
  212. package/dist/types/src/hooks/email.d.ts +0 -4
  213. package/dist/types/src/hooks/email.d.ts.map +0 -1
  214. package/dist/types/src/hooks/index.d.ts +0 -6
  215. package/dist/types/src/hooks/index.d.ts.map +0 -1
  216. package/dist/types/src/hooks/invocation-handler.d.ts +0 -5
  217. package/dist/types/src/hooks/invocation-handler.d.ts.map +0 -1
  218. package/dist/types/src/hooks/processor.d.ts +0 -70
  219. package/dist/types/src/hooks/processor.d.ts.map +0 -1
  220. package/dist/types/src/hooks/processor.test.d.ts +0 -2
  221. package/dist/types/src/hooks/processor.test.d.ts.map +0 -1
  222. package/dist/types/src/hooks/useChatProcessor.d.ts +0 -7
  223. package/dist/types/src/hooks/useChatProcessor.d.ts.map +0 -1
  224. package/dist/types/src/hooks/useLocalTriggerManager.d.ts +0 -3
  225. package/dist/types/src/hooks/useLocalTriggerManager.d.ts.map +0 -1
  226. package/dist/types/src/hooks/useMessageQueue.d.ts +0 -41
  227. package/dist/types/src/hooks/useMessageQueue.d.ts.map +0 -1
  228. package/dist/types/src/hooks/useServices.d.ts +0 -7
  229. package/dist/types/src/hooks/useServices.d.ts.map +0 -1
  230. package/dist/types/src/presets.d.ts +0 -9
  231. package/dist/types/src/presets.d.ts.map +0 -1
  232. package/dist/types/src/testing/test-services.d.ts +0 -5
  233. package/dist/types/src/testing/test-services.d.ts.map +0 -1
  234. package/dist/types/src/tools/function.d.ts +0 -5
  235. package/dist/types/src/tools/function.d.ts.map +0 -1
  236. package/dist/types/src/tools/index.d.ts +0 -3
  237. package/dist/types/src/tools/index.d.ts.map +0 -1
  238. package/dist/types/src/tools/openapi.d.ts +0 -10
  239. package/dist/types/src/tools/openapi.d.ts.map +0 -1
  240. package/dist/types/src/tools/openapi.test.d.ts +0 -2
  241. package/dist/types/src/tools/openapi.test.d.ts.map +0 -1
  242. package/dist/types/src/types/index.d.ts +0 -4
  243. package/dist/types/src/types/index.d.ts.map +0 -1
  244. package/dist/types/src/types/registry.d.ts +0 -10
  245. package/dist/types/src/types/registry.d.ts.map +0 -1
  246. package/dist/types/src/types/schema.d.ts +0 -221
  247. package/dist/types/src/types/schema.d.ts.map +0 -1
  248. package/dist/types/src/types/types.d.ts +0 -18
  249. package/dist/types/src/types/types.d.ts.map +0 -1
  250. package/src/artifacts.stories.tsx +0 -241
  251. package/src/capabilities/ai-client.ts +0 -19
  252. package/src/capabilities/app-graph-builder.ts +0 -156
  253. package/src/capabilities/capabilities.ts +0 -12
  254. package/src/capabilities/intent-resolver.ts +0 -27
  255. package/src/components/ChatContainer/ChatContainer.tsx +0 -52
  256. package/src/components/ChatContainer/index.ts +0 -8
  257. package/src/components/MarkdownViewer/MarkdownViewer.stories.tsx +0 -56
  258. package/src/components/MarkdownViewer/MarkdownViewer.tsx +0 -79
  259. package/src/components/MarkdownViewer/index.ts +0 -5
  260. package/src/components/PromptEditor/PromptEditor.stories.tsx +0 -64
  261. package/src/components/PromptEditor/PromptEditor.tsx +0 -222
  262. package/src/components/PromptEditor/index.ts +0 -5
  263. package/src/components/PromptEditor/prompt-extension.ts +0 -43
  264. package/src/components/PromptEditor/types.tsx +0 -28
  265. package/src/components/ServiceRegistry/ServiceRegistry.stories.tsx +0 -49
  266. package/src/components/ServiceRegistry/ServiceRegistry.tsx +0 -75
  267. package/src/components/ServiceRegistry/index.ts +0 -5
  268. package/src/components/Thread/ScrollContainer.tsx +0 -92
  269. package/src/components/Thread/StatusLine.stories.tsx +0 -52
  270. package/src/components/Thread/StatusLine.tsx +0 -76
  271. package/src/components/Thread/Tabbed.stories.tsx +0 -52
  272. package/src/components/Thread/Tabbed.tsx +0 -72
  273. package/src/components/Thread/Thread.stories.tsx +0 -190
  274. package/src/components/Thread/Thread.tsx +0 -156
  275. package/src/components/Thread/ThreadMessage.tsx +0 -203
  276. package/src/components/Thread/ToggleContainer.stories.tsx +0 -111
  277. package/src/components/Thread/ToggleContainer.tsx +0 -103
  278. package/src/components/Thread/index.ts +0 -5
  279. package/src/hooks/email.ts +0 -49
  280. package/src/hooks/index.ts +0 -10
  281. package/src/hooks/invocation-handler.ts +0 -109
  282. package/src/hooks/processor.test.ts +0 -15
  283. package/src/hooks/processor.ts +0 -210
  284. package/src/hooks/useChatProcessor.tsx +0 -86
  285. package/src/hooks/useLocalTriggerManager.ts +0 -82
  286. package/src/hooks/useMessageQueue.ts +0 -23
  287. package/src/hooks/useServices.ts +0 -28
  288. package/src/presets.ts +0 -248
  289. package/src/testing/test-services.ts +0 -131
  290. package/src/tools/function.ts +0 -47
  291. package/src/tools/index.ts +0 -6
  292. package/src/tools/openapi.test.ts +0 -227
  293. package/src/tools/openapi.ts +0 -331
  294. package/src/types/index.ts +0 -7
  295. package/src/types/registry.ts +0 -26
  296. package/src/types/schema.ts +0 -132
  297. package/src/types/types.ts +0 -21
@@ -1,64 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta } from '@storybook/react';
8
- import React, { useState } from 'react';
9
-
10
- import { create, makeRef } from '@dxos/live-object';
11
- import { useClient } from '@dxos/react-client';
12
- import { withClientProvider } from '@dxos/react-client/testing';
13
- import { withLayout, withTheme } from '@dxos/storybook-utils';
14
-
15
- import { PromptEditor } from './PromptEditor';
16
- import translations from '../../translations';
17
- import { ChainPromptType, ChainType } from '../../types';
18
-
19
- const template = [
20
- '# Comment',
21
- '',
22
- 'You are a machine that is an expert chess player.',
23
- 'The move history of the current game is: {history}',
24
- 'If asked to suggest a move explain why it is a good move.',
25
- '',
26
- '---',
27
- '',
28
- '{input}',
29
- ].join('\n');
30
-
31
- const DefaultStory = () => {
32
- const client = useClient();
33
- const [chain] = useState(() => {
34
- const space = client.spaces.default;
35
- return space.db.add(
36
- create(ChainType, {
37
- prompts: [makeRef(create(ChainPromptType, { command: 'test', template, inputs: [] }))],
38
- }),
39
- );
40
- });
41
-
42
- return (
43
- <div role='none' className='flex w-[350px] border border-separator overflow-hidden'>
44
- <PromptEditor prompt={chain.prompts![0]!.target!} />
45
- </div>
46
- );
47
- };
48
-
49
- export const Default = {};
50
-
51
- const meta: Meta = {
52
- title: 'plugins/plugin-automation/PromptTemplate',
53
- render: DefaultStory,
54
- decorators: [
55
- withClientProvider({ createIdentity: true, createSpace: true, types: [ChainType, ChainPromptType] }),
56
- withLayout({ fullscreen: true, classNames: 'flex justify-center m-2' }),
57
- withTheme,
58
- ],
59
- parameters: {
60
- translations,
61
- },
62
- };
63
-
64
- export default meta;
@@ -1,222 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { type Schema as S } from '@effect/schema';
6
- import React, { useEffect } from 'react';
7
-
8
- import { createDocAccessor } from '@dxos/react-client/echo';
9
- import { Input, Select, useThemeContext, useTranslation } from '@dxos/react-ui';
10
- import {
11
- createBasicExtensions,
12
- createDataExtensions,
13
- createThemeExtensions,
14
- useTextEditor,
15
- } from '@dxos/react-ui-editor';
16
- import { attentionSurface, groupBorder, mx } from '@dxos/react-ui-theme';
17
- import { nonNullable } from '@dxos/util';
18
-
19
- import { nameRegex, promptExtension } from './prompt-extension';
20
- import { AUTOMATION_PLUGIN } from '../../meta';
21
- import { type ChainInput, ChainInputType, type ChainPromptType } from '../../types';
22
-
23
- const inputTypes = [
24
- {
25
- value: ChainInputType.VALUE,
26
- label: 'Value',
27
- },
28
- {
29
- value: ChainInputType.PASS_THROUGH,
30
- label: 'Pass through',
31
- },
32
- {
33
- value: ChainInputType.RETRIEVER,
34
- label: 'Retriever',
35
- },
36
- // {
37
- // value: ChainInputType.FUNCTION,
38
- // label: 'Function',
39
- // },
40
- // {
41
- // value: ChainInputType.QUERY,
42
- // label: 'Query',
43
- // },
44
- {
45
- value: ChainInputType.RESOLVER,
46
- label: 'Resolver',
47
- },
48
- {
49
- value: ChainInputType.CONTEXT,
50
- label: 'Context',
51
- },
52
- {
53
- value: ChainInputType.SCHEMA,
54
- label: 'Schema',
55
- },
56
- ];
57
-
58
- const getInputType = (type: string) => inputTypes.find(({ value }) => String(value) === type)?.value;
59
-
60
- const usePromptInputs = (prompt: ChainPromptType) => {
61
- useEffect(() => {
62
- const text = prompt.template ?? '';
63
- if (!prompt.inputs) {
64
- prompt.inputs = []; // TODO(burdon): Required?
65
- }
66
-
67
- const regex = new RegExp(nameRegex, 'g');
68
- const variables = new Set<string>([...text.matchAll(regex)].map((m) => m[1]));
69
-
70
- // Create map of unclaimed inputs.
71
- const unclaimed = new Map<string, ChainInput>(
72
- prompt.inputs?.filter(nonNullable).map((input) => [input.name, input]),
73
- );
74
- const missing: string[] = [];
75
- Array.from(variables.values()).forEach((name) => {
76
- if (unclaimed.has(name)) {
77
- unclaimed.delete(name);
78
- } else {
79
- missing.push(name);
80
- }
81
- });
82
-
83
- // Match or create new inputs.
84
- const values = unclaimed.values();
85
- missing.forEach((name) => {
86
- const next = values.next().value;
87
- if (next) {
88
- next.name = name;
89
- } else {
90
- prompt.inputs?.push({ name });
91
- }
92
- });
93
-
94
- // Remove unclaimed (deleted) inputs.
95
- // TODO(burdon): If user types incorrect name value, it will be deleted. Garbage collect?
96
- for (const input of values) {
97
- prompt.inputs.splice(prompt.inputs.indexOf(input), 1);
98
- }
99
- }, [prompt.template]);
100
- };
101
-
102
- export type PromptEditorProps = {
103
- prompt: ChainPromptType;
104
- commandEditable?: boolean;
105
- schema?: S.Schema<any, any, any>;
106
- };
107
-
108
- export const PromptEditor = ({ prompt, commandEditable = true }: PromptEditorProps) => {
109
- const { t } = useTranslation(AUTOMATION_PLUGIN);
110
- const { themeMode } = useThemeContext();
111
-
112
- const { parentRef } = useTextEditor(
113
- () => ({
114
- initialValue: prompt.template,
115
- extensions: [
116
- createDataExtensions({
117
- id: prompt.id,
118
- text: prompt.template !== undefined ? createDocAccessor(prompt, ['template']) : undefined,
119
- }),
120
- createBasicExtensions({
121
- bracketMatching: false,
122
- lineWrapping: true,
123
- placeholder: t('template placeholder'),
124
- }),
125
- createThemeExtensions({
126
- themeMode,
127
- slots: {
128
- content: { className: '!p-3' },
129
- },
130
- }),
131
- promptExtension,
132
- ],
133
- }),
134
- [themeMode, prompt],
135
- );
136
-
137
- usePromptInputs(prompt);
138
-
139
- return (
140
- <div className={mx('flex flex-col w-full overflow-hidden gap-4', groupBorder)}>
141
- {commandEditable && (
142
- <div className='flex items-center pl-4'>
143
- <span className='text-neutral-500'>/</span>
144
- <Input.Root>
145
- <Input.TextInput
146
- placeholder={t('command placeholder')}
147
- classNames={mx('is-full bg-transparent m-2')}
148
- value={prompt.command ?? ''}
149
- onChange={(event) => {
150
- prompt.command = event.target.value.replace(/\w/g, '');
151
- }}
152
- />
153
- </Input.Root>
154
- </div>
155
- )}
156
-
157
- <div ref={parentRef} className={mx(attentionSurface, 'rounded', 'min-h-[120px]')} />
158
-
159
- {(prompt.inputs?.length ?? 0) > 0 && (
160
- <div className='flex flex-col'>
161
- {/* TODO(zan): Improve layout with grid */}
162
- <table className='w-full table-fixed border-collapse my-2'>
163
- <tbody>
164
- {prompt.inputs?.filter(nonNullable).map((input) => (
165
- <tr key={input.name}>
166
- <td className='w-[160px] p-1 font-mono text-sm whitespace-nowrap truncate'>
167
- <code className='px-2'>{input.name}</code>
168
- </td>
169
- <td className='w-[120px] p-1'>
170
- <Input.Root>
171
- <Select.Root
172
- value={String(input.type)}
173
- onValueChange={(type) => {
174
- input.type = getInputType(type) ?? ChainInputType.VALUE;
175
- }}
176
- >
177
- <Select.TriggerButton placeholder='Type' classNames='is-full' />
178
- <Select.Portal>
179
- <Select.Content>
180
- <Select.Viewport>
181
- {inputTypes.map(({ value, label }) => (
182
- <Select.Option key={value} value={String(value)}>
183
- {label}
184
- </Select.Option>
185
- ))}
186
- </Select.Viewport>
187
- </Select.Content>
188
- </Select.Portal>
189
- </Select.Root>
190
- </Input.Root>
191
- </td>
192
- <td className='p-1 pr-2'>
193
- {input.type !== undefined &&
194
- [
195
- ChainInputType.VALUE,
196
- ChainInputType.CONTEXT,
197
- ChainInputType.RESOLVER,
198
- ChainInputType.SCHEMA,
199
- ].includes(input.type) && (
200
- <div>
201
- <Input.Root>
202
- <Input.TextInput
203
- placeholder={t('command placeholder')}
204
- classNames={mx('is-full bg-transparent')}
205
- value={input.value ?? ''}
206
- onChange={(event) => {
207
- input.value = event.target.value;
208
- }}
209
- />
210
- </Input.Root>
211
- </div>
212
- )}
213
- </td>
214
- </tr>
215
- ))}
216
- </tbody>
217
- </table>
218
- </div>
219
- )}
220
- </div>
221
- );
222
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- export * from './PromptEditor';
@@ -1,43 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- import { HighlightStyle, StreamLanguage, syntaxHighlighting } from '@codemirror/language';
6
- import { type Extension } from '@codemirror/state';
7
-
8
- import { tags } from '@dxos/react-ui-editor';
9
- import { mx } from '@dxos/react-ui-theme';
10
-
11
- export const nameRegex = /\{([\w-]+)}/;
12
-
13
- const parser = StreamLanguage.define({
14
- token: (stream) => {
15
- if (stream.eatSpace()) {
16
- return null;
17
- }
18
- if (stream.match(/^#.*/)) {
19
- return 'lineComment';
20
- }
21
- if (stream.match(/^-+$/)) {
22
- return 'lineComment';
23
- }
24
- if (stream.match(nameRegex)) {
25
- return 'variableName';
26
- }
27
- stream.next();
28
- return null;
29
- },
30
- });
31
-
32
- /**
33
- * https://codemirror.net/examples/styling
34
- * https://lezer.codemirror.net/docs/ref/#highlight
35
- */
36
- const highlightStyles = HighlightStyle.define([
37
- {
38
- tag: tags.variableName,
39
- class: mx('rounded border border-yellow-500 bg-yellow-100 text-black font-mono text-sm'),
40
- },
41
- ]);
42
-
43
- export const promptExtension: Extension = [parser, syntaxHighlighting(highlightStyles)];
@@ -1,28 +0,0 @@
1
- //
2
- // Copyright 2023 DXOS.org
3
- //
4
-
5
- // TODO(burdon): Factor out (shared with backend). core/chain (@dxos/chain).
6
- // TODO(burdon): Agent/plan-and-execute (with tools). Create design doc/ontology of sequence/agent.
7
-
8
- export type Step = {
9
- id: string;
10
- };
11
-
12
- export type Variable = {
13
- name: string;
14
- type: 'value' | 'function' | 'query' | 'retriever' | 'pass-through';
15
- };
16
-
17
- export type Prompt = Step & {
18
- title?: string;
19
- description?: string;
20
- template: string;
21
- variables: Variable[];
22
- };
23
-
24
- export type Sequence = Step & {
25
- runnable: Step[];
26
- };
27
-
28
- export type Chain = {};
@@ -1,49 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Meta, type StoryObj } from '@storybook/react';
8
- import React from 'react';
9
-
10
- import { useSpace } from '@dxos/react-client/echo';
11
- import { withClientProvider } from '@dxos/react-client/testing';
12
- import { withLayout, withTheme } from '@dxos/storybook-utils';
13
-
14
- import { ServiceRegistry } from './ServiceRegistry';
15
- import { ServiceType } from '../../types';
16
-
17
- const meta: Meta<typeof ServiceRegistry> = {
18
- title: 'plugins/plugin-automation/ServiceRegistry',
19
- component: ServiceRegistry,
20
- render: ({ space: _ignore, ...args }) => {
21
- const space = useSpace();
22
- if (!space) {
23
- return <div />;
24
- }
25
-
26
- return (
27
- <div className='h-full w-[300px] overflow-hidden'>
28
- <ServiceRegistry space={space} {...args} />
29
- </div>
30
- );
31
- },
32
- decorators: [
33
- withClientProvider({
34
- createIdentity: true,
35
- createSpace: true,
36
- types: [ServiceType],
37
- }),
38
- withLayout({ fullscreen: true, tooltips: true, classNames: 'flex justify-center' }),
39
- withTheme,
40
- ],
41
- };
42
-
43
- export default meta;
44
-
45
- type Story = StoryObj<typeof ServiceRegistry>;
46
-
47
- export const Default: Story = {
48
- args: {},
49
- };
@@ -1,75 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, { useMemo } from 'react';
6
-
7
- import { Filter, type Space } from '@dxos/client/echo';
8
- import { useQuery } from '@dxos/react-client/echo';
9
- import { Icon, Input, List, ListItem } from '@dxos/react-ui';
10
-
11
- import { useServices } from '../../hooks';
12
- import { categoryIcons, ServiceType } from '../../types';
13
-
14
- // TODO(burdon): Option to show all/enabled/filter.
15
- export const ServiceRegistry = ({ space }: { space: Space }) => {
16
- const matchingServices = useServices(space);
17
- const enabledServices = useQuery(space, Filter.schema(ServiceType));
18
-
19
- // Join matching services with enabled services.
20
- const services = useMemo(() => {
21
- return matchingServices.map((service) => enabledServices.find((s) => s.serviceId === service.serviceId) ?? service);
22
- }, [matchingServices, enabledServices]);
23
-
24
- const handleSetEnabled = (service: ServiceType, enabled: boolean) => {
25
- if (enabled) {
26
- space.db.add(service);
27
- } else {
28
- // TODO(burdon): Remove or disable?
29
- space.db.remove(service);
30
- }
31
- };
32
-
33
- return (
34
- <List classNames='h-full grid auto-rows-[5rem] gap-2 p-2 pis-2 pie-2 overflow-y-auto scrollbar-thin'>
35
- {services.map((service) => (
36
- <ServiceItem
37
- key={service.serviceId}
38
- service={service}
39
- enabled={service.enabled}
40
- setEnabled={(enabled) => handleSetEnabled(service, enabled)}
41
- />
42
- ))}
43
- </List>
44
- );
45
- };
46
-
47
- const ServiceItem = ({
48
- service,
49
- enabled,
50
- setEnabled,
51
- }: {
52
- service: ServiceType;
53
- enabled?: boolean;
54
- setEnabled?: (enabled: boolean) => void;
55
- }) => {
56
- return (
57
- <ListItem.Root classNames='flex flex-col gap-1 p-1 overflow-hidden rounded-md border border-separator'>
58
- <div className='grid grid-cols-[40px_1fr_40px]'>
59
- <div className='flex gow justify-center items-center'>
60
- <Icon icon={categoryIcons[service.category ?? 'default'] ?? 'ph--placeholder--regular'} size={6} />
61
- </div>
62
- <div className='grow items-center truncate mie-2'>{service.name}</div>
63
- <div className='flex gow justify-center items-center'>
64
- <Input.Root>
65
- <Input.Switch checked={enabled} onClick={() => setEnabled?.(!enabled)} />
66
- </Input.Root>
67
- </div>
68
- </div>
69
- <div className='grid grid-cols-[40px_1fr]'>
70
- <div />
71
- <div className='text-sm text-subdued line-clamp-2 mie-1'>{service.description}</div>
72
- </div>
73
- </ListItem.Root>
74
- );
75
- };
@@ -1,5 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- export * from './ServiceRegistry';
@@ -1,92 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import React, {
6
- forwardRef,
7
- type PropsWithChildren,
8
- type UIEventHandler,
9
- useCallback,
10
- useEffect,
11
- useImperativeHandle,
12
- useRef,
13
- useState,
14
- } from 'react';
15
-
16
- import { invariant } from '@dxos/invariant';
17
- import { type ThemedClassName } from '@dxos/react-ui';
18
- import { mx } from '@dxos/react-ui-theme';
19
-
20
- export interface ScrollController {
21
- scrollToBottom: () => void;
22
- }
23
-
24
- export type ScrollContainerProps = ThemedClassName<PropsWithChildren>;
25
-
26
- /**
27
- * Scroll container that automatically scrolls to the bottom when new content is added.
28
- */
29
- // TODO(burdon): Move to react-ui.
30
- // TODO(burdon): Custom scrollbar.
31
- export const ScrollContainer = forwardRef<ScrollController, ScrollContainerProps>(
32
- ({ children, classNames }, forwardedRef) => {
33
- const containerRef = useRef<HTMLDivElement>(null);
34
- const autoScrollRef = useRef(false);
35
-
36
- // Controller.
37
- useImperativeHandle(
38
- forwardedRef,
39
- () => ({
40
- scrollToBottom: () => {
41
- invariant(containerRef.current);
42
- containerRef.current.scrollTo({ top: containerRef.current.scrollHeight, behavior: 'smooth' });
43
- autoScrollRef.current = false;
44
- },
45
- }),
46
- [],
47
- );
48
-
49
- // Auto scroll.
50
- const [sticky, setSticky] = useState(true);
51
- useEffect(() => {
52
- if (!sticky || !containerRef.current) {
53
- return;
54
- }
55
-
56
- autoScrollRef.current = true;
57
- containerRef.current.scrollTo({ top: containerRef.current.scrollHeight, behavior: 'smooth' });
58
- }, [children]);
59
-
60
- // Detect scroll end.
61
- useEffect(() => {
62
- invariant(containerRef.current);
63
- const handleScrollEnd = () => {
64
- autoScrollRef.current = false;
65
- };
66
-
67
- containerRef.current.addEventListener('scrollend', handleScrollEnd);
68
- return () => containerRef.current?.removeEventListener('scrollend', handleScrollEnd);
69
- }, []);
70
-
71
- // Scrolling.
72
- const handleScroll = useCallback<UIEventHandler<HTMLDivElement>>((ev) => {
73
- if (autoScrollRef.current) {
74
- return;
75
- }
76
-
77
- const { scrollTop, clientHeight, scrollHeight } = ev.currentTarget;
78
- const sticky = scrollTop + clientHeight >= scrollHeight;
79
- setSticky(sticky);
80
- }, []);
81
-
82
- return (
83
- <div
84
- ref={containerRef}
85
- onScroll={handleScroll}
86
- className={mx('flex flex-col grow overflow-y-scroll scrollbar-none', classNames)}
87
- >
88
- {children}
89
- </div>
90
- );
91
- },
92
- );
@@ -1,52 +0,0 @@
1
- //
2
- // Copyright 2025 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react';
8
- import React, { useState } from 'react';
9
-
10
- import { faker } from '@dxos/random';
11
- import { Button } from '@dxos/react-ui';
12
- import { withLayout, withTheme, withSignals } from '@dxos/storybook-utils';
13
-
14
- import { StatusLine } from './StatusLine';
15
-
16
- const meta: Meta<typeof StatusLine> = {
17
- title: 'plugins/plugin-automation/StatusLine',
18
- component: StatusLine,
19
- decorators: [withSignals, withTheme, withLayout()],
20
- parameters: {
21
- layout: 'centered',
22
- },
23
- };
24
-
25
- export default meta;
26
-
27
- type Story = StoryObj<typeof StatusLine>;
28
-
29
- export const Default: Story = {
30
- args: {
31
- classNames: 'w-96 px-2',
32
- lines: Array.from({ length: 5 }, (_, i) => `${i}. ${faker.lorem.paragraph()}`),
33
- autoAdvance: true,
34
- },
35
- };
36
-
37
- export const Demo: Story = {
38
- render: () => {
39
- const [lines, setLines] = useState<string[]>([]);
40
-
41
- return (
42
- <div className='flex flex-col w-96 gap-4'>
43
- <StatusLine lines={lines} autoAdvance advance={500} />
44
- <div>
45
- <Button onClick={() => setLines((lines) => [...lines, `${lines.length + 1}. ${faker.lorem.paragraph()}`])}>
46
- Add
47
- </Button>
48
- </div>
49
- </div>
50
- );
51
- },
52
- };