@dxos/app-framework 0.8.4-main.67995b8 → 0.8.4-main.72ec0f3

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 (226) hide show
  1. package/.storybook/main.mts +11 -0
  2. package/.storybook/preview.mts +8 -0
  3. package/.swc/plugins/linux_x86_64_19.0.0/727453fb3a62f7f1d952a41e051ca8a6f88cadc45cee43c6a4d1aa45f9b75665.wasmer-v7 +0 -0
  4. package/.swc/plugins/{v7_linux_x86_64_13.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429 → linux_x86_64_19.0.0/fce1bdb8e20a094e4af08bad09cc81497ed0e2e7c51223b07d371063cca18429.wasmer-v7} +0 -0
  5. package/dist/lib/browser/{app-graph-builder-LYF7EKNN.mjs → app-graph-builder-OIEZZC45.mjs} +32 -31
  6. package/dist/lib/browser/app-graph-builder-OIEZZC45.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-ORWHM7CO.mjs → chunk-SCPE4ZO2.mjs} +11 -8
  8. package/dist/lib/browser/chunk-SCPE4ZO2.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-FO2PH7M3.mjs → chunk-VFUKEZIN.mjs} +254 -186
  10. package/dist/lib/browser/chunk-VFUKEZIN.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-FMN65HSW.mjs → chunk-WPW5VVAX.mjs} +397 -265
  12. package/dist/lib/browser/chunk-WPW5VVAX.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +20 -56
  14. package/dist/lib/browser/index.mjs.map +3 -3
  15. package/dist/lib/browser/{intent-dispatcher-LSYQZSEB.mjs → intent-dispatcher-LZ4AE66E.mjs} +2 -2
  16. package/dist/lib/browser/{intent-resolver-ZTNOSO3A.mjs → intent-resolver-QVCKRX6G.mjs} +7 -7
  17. package/dist/lib/browser/intent-resolver-QVCKRX6G.mjs.map +7 -0
  18. package/dist/lib/browser/meta.json +1 -1
  19. package/dist/lib/browser/react/index.mjs +34 -0
  20. package/dist/lib/browser/{store-KML2R4IE.mjs → store-CNPHOYTJ.mjs} +5 -5
  21. package/dist/lib/browser/store-CNPHOYTJ.mjs.map +7 -0
  22. package/dist/lib/browser/testing/index.mjs +17 -21
  23. package/dist/lib/browser/testing/index.mjs.map +3 -3
  24. package/dist/lib/node-esm/{app-graph-builder-SAOWGJDK.mjs → app-graph-builder-EBU4NVWD.mjs} +32 -31
  25. package/dist/lib/node-esm/app-graph-builder-EBU4NVWD.mjs.map +7 -0
  26. package/dist/lib/node-esm/{chunk-73HGSHKE.mjs → chunk-IJOHO66N.mjs} +254 -186
  27. package/dist/lib/node-esm/chunk-IJOHO66N.mjs.map +7 -0
  28. package/dist/lib/node-esm/{chunk-ZEZ4FVEU.mjs → chunk-XJZGUJ3H.mjs} +397 -265
  29. package/dist/lib/node-esm/chunk-XJZGUJ3H.mjs.map +7 -0
  30. package/dist/lib/node-esm/{chunk-UMZQERLE.mjs → chunk-ZX63QUGE.mjs} +11 -8
  31. package/dist/lib/node-esm/chunk-ZX63QUGE.mjs.map +7 -0
  32. package/dist/lib/node-esm/index.mjs +20 -56
  33. package/dist/lib/node-esm/index.mjs.map +3 -3
  34. package/dist/lib/node-esm/{intent-dispatcher-6CYNGPSW.mjs → intent-dispatcher-MGOJ3CHD.mjs} +2 -2
  35. package/dist/lib/node-esm/{intent-resolver-W7Z7WFFM.mjs → intent-resolver-URF3HN3G.mjs} +7 -7
  36. package/dist/lib/node-esm/intent-resolver-URF3HN3G.mjs.map +7 -0
  37. package/dist/lib/node-esm/meta.json +1 -1
  38. package/dist/lib/node-esm/react/index.mjs +35 -0
  39. package/dist/lib/node-esm/{store-QEXGXLWZ.mjs → store-RK5B4XEL.mjs} +5 -5
  40. package/dist/lib/node-esm/store-RK5B4XEL.mjs.map +7 -0
  41. package/dist/lib/node-esm/testing/index.mjs +17 -21
  42. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  43. package/dist/types/src/common/capabilities.d.ts +110 -39
  44. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  45. package/dist/types/src/common/collaboration.d.ts +10 -9
  46. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  47. package/dist/types/src/common/events.d.ts.map +1 -1
  48. package/dist/types/src/common/file.d.ts +1 -1
  49. package/dist/types/src/common/file.d.ts.map +1 -1
  50. package/dist/types/src/common/index.d.ts +1 -1
  51. package/dist/types/src/common/index.d.ts.map +1 -1
  52. package/dist/types/src/common/layout.d.ts +1 -3
  53. package/dist/types/src/common/layout.d.ts.map +1 -1
  54. package/dist/types/src/common/surface.d.ts +19 -16
  55. package/dist/types/src/common/surface.d.ts.map +1 -1
  56. package/dist/types/src/common/translations.d.ts +1 -1
  57. package/dist/types/src/common/translations.d.ts.map +1 -1
  58. package/dist/types/src/core/capabilities.d.ts +19 -16
  59. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  60. package/dist/types/src/core/manager.d.ts +7 -3
  61. package/dist/types/src/core/manager.d.ts.map +1 -1
  62. package/dist/types/src/core/plugin.d.ts +8 -1
  63. package/dist/types/src/core/plugin.d.ts.map +1 -1
  64. package/dist/types/src/index.d.ts +0 -2
  65. package/dist/types/src/index.d.ts.map +1 -1
  66. package/dist/types/src/playground/debug/Debug.d.ts +1 -1
  67. package/dist/types/src/playground/debug/plugin.d.ts +1 -1
  68. package/dist/types/src/playground/debug/plugin.d.ts.map +1 -1
  69. package/dist/types/src/playground/generator/Main.d.ts +1 -1
  70. package/dist/types/src/playground/generator/Main.d.ts.map +1 -1
  71. package/dist/types/src/playground/generator/Toolbar.d.ts +1 -1
  72. package/dist/types/src/playground/generator/Toolbar.d.ts.map +1 -1
  73. package/dist/types/src/playground/generator/generator.d.ts +1 -1
  74. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  75. package/dist/types/src/playground/generator/plugin.d.ts +1 -1
  76. package/dist/types/src/playground/generator/plugin.d.ts.map +1 -1
  77. package/dist/types/src/playground/layout/Layout.d.ts +2 -2
  78. package/dist/types/src/playground/layout/plugin.d.ts +1 -1
  79. package/dist/types/src/playground/layout/plugin.d.ts.map +1 -1
  80. package/dist/types/src/playground/logger/Toolbar.d.ts +1 -1
  81. package/dist/types/src/playground/logger/Toolbar.d.ts.map +1 -1
  82. package/dist/types/src/playground/logger/plugin.d.ts +1 -1
  83. package/dist/types/src/playground/logger/plugin.d.ts.map +1 -1
  84. package/dist/types/src/playground/logger/schema.d.ts +1 -1
  85. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  86. package/dist/types/src/playground/playground.stories.d.ts +5 -4
  87. package/dist/types/src/playground/playground.stories.d.ts.map +1 -1
  88. package/dist/types/src/plugin-intent/IntentPlugin.d.ts +1 -1
  89. package/dist/types/src/plugin-intent/IntentPlugin.d.ts.map +1 -1
  90. package/dist/types/src/plugin-intent/actions.d.ts +5 -7
  91. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  92. package/dist/types/src/plugin-intent/errors.d.ts.map +1 -1
  93. package/dist/types/src/plugin-intent/index.d.ts +1 -0
  94. package/dist/types/src/plugin-intent/index.d.ts.map +1 -1
  95. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +7 -7
  96. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  97. package/dist/types/src/plugin-intent/intent.d.ts +1 -1
  98. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  99. package/dist/types/src/plugin-intent/meta.d.ts +3 -0
  100. package/dist/types/src/plugin-intent/meta.d.ts.map +1 -0
  101. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts +1 -1
  102. package/dist/types/src/plugin-settings/SettingsPlugin.d.ts.map +1 -1
  103. package/dist/types/src/plugin-settings/actions.d.ts +5 -7
  104. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  105. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +1 -1
  106. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  107. package/dist/types/src/plugin-settings/intent-resolver.d.ts +1 -1
  108. package/dist/types/src/plugin-settings/intent-resolver.d.ts.map +1 -1
  109. package/dist/types/src/plugin-settings/meta.d.ts +3 -0
  110. package/dist/types/src/plugin-settings/meta.d.ts.map +1 -0
  111. package/dist/types/src/plugin-settings/store.d.ts +1 -1
  112. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  113. package/dist/types/src/plugin-settings/translations.d.ts +2 -1
  114. package/dist/types/src/plugin-settings/translations.d.ts.map +1 -1
  115. package/dist/types/src/react/App.d.ts +10 -0
  116. package/dist/types/src/react/App.d.ts.map +1 -0
  117. package/dist/types/src/react/App.stories.d.ts +14 -0
  118. package/dist/types/src/react/App.stories.d.ts.map +1 -0
  119. package/dist/types/src/react/DefaultFallback.d.ts +8 -0
  120. package/dist/types/src/react/DefaultFallback.d.ts.map +1 -0
  121. package/dist/types/src/react/ErrorBoundary.d.ts +13 -14
  122. package/dist/types/src/react/ErrorBoundary.d.ts.map +1 -1
  123. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  124. package/dist/types/src/react/Surface.d.ts +5 -5
  125. package/dist/types/src/react/Surface.d.ts.map +1 -1
  126. package/dist/types/src/react/Surface.stories.d.ts +8 -10
  127. package/dist/types/src/react/Surface.stories.d.ts.map +1 -1
  128. package/dist/types/src/react/common.d.ts.map +1 -1
  129. package/dist/types/src/react/index.d.ts +2 -0
  130. package/dist/types/src/react/index.d.ts.map +1 -1
  131. package/dist/types/src/react/types.d.ts +14 -0
  132. package/dist/types/src/react/types.d.ts.map +1 -0
  133. package/dist/types/src/{App.d.ts → react/useApp.d.ts} +7 -6
  134. package/dist/types/src/react/useApp.d.ts.map +1 -0
  135. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  136. package/dist/types/src/react/useLoading.d.ts +19 -0
  137. package/dist/types/src/react/useLoading.d.ts.map +1 -0
  138. package/dist/types/src/testing/withPluginManager.d.ts +9 -8
  139. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  140. package/dist/types/src/testing/withPluginManager.stories.d.ts +9 -3
  141. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  142. package/dist/types/tsconfig.tsbuildinfo +1 -1
  143. package/moon.yml +5 -1
  144. package/package.json +48 -43
  145. package/src/common/capabilities.ts +116 -20
  146. package/src/common/collaboration.ts +6 -9
  147. package/src/common/events.ts +3 -1
  148. package/src/common/file.ts +1 -1
  149. package/src/common/index.ts +1 -1
  150. package/src/common/layout.ts +3 -4
  151. package/src/common/surface.ts +23 -21
  152. package/src/common/translations.ts +1 -1
  153. package/src/core/capabilities.test.ts +3 -3
  154. package/src/core/capabilities.ts +36 -27
  155. package/src/core/manager.test.ts +22 -21
  156. package/src/core/manager.ts +141 -56
  157. package/src/core/plugin.ts +13 -2
  158. package/src/helpers.test.ts +1 -1
  159. package/src/index.ts +0 -2
  160. package/src/playground/debug/Debug.tsx +1 -1
  161. package/src/playground/debug/plugin.ts +7 -8
  162. package/src/playground/generator/Main.tsx +0 -1
  163. package/src/playground/generator/Toolbar.tsx +2 -1
  164. package/src/playground/generator/generator.ts +4 -4
  165. package/src/playground/generator/plugin.ts +12 -13
  166. package/src/playground/layout/plugin.ts +10 -9
  167. package/src/playground/logger/Toolbar.tsx +2 -1
  168. package/src/playground/logger/plugin.ts +30 -25
  169. package/src/playground/logger/schema.ts +1 -1
  170. package/src/playground/playground.stories.tsx +20 -16
  171. package/src/plugin-intent/IntentPlugin.ts +13 -13
  172. package/src/plugin-intent/actions.ts +4 -6
  173. package/src/plugin-intent/errors.ts +2 -1
  174. package/src/plugin-intent/index.ts +1 -0
  175. package/src/plugin-intent/intent-dispatcher.test.ts +10 -3
  176. package/src/plugin-intent/intent-dispatcher.ts +21 -12
  177. package/src/plugin-intent/intent.ts +1 -1
  178. package/src/plugin-intent/meta.ts +10 -0
  179. package/src/plugin-settings/SettingsPlugin.ts +27 -28
  180. package/src/plugin-settings/actions.ts +9 -13
  181. package/src/plugin-settings/app-graph-builder.ts +25 -22
  182. package/src/plugin-settings/intent-resolver.ts +5 -4
  183. package/src/plugin-settings/meta.ts +10 -0
  184. package/src/plugin-settings/store.ts +3 -3
  185. package/src/plugin-settings/translations.ts +4 -4
  186. package/src/react/App.stories.tsx +33 -0
  187. package/src/react/App.tsx +59 -0
  188. package/src/react/DefaultFallback.tsx +26 -0
  189. package/src/react/ErrorBoundary.tsx +26 -15
  190. package/src/react/IntentContext.tsx +3 -2
  191. package/src/react/Surface.stories.tsx +81 -52
  192. package/src/react/Surface.tsx +70 -38
  193. package/src/react/common.ts +2 -1
  194. package/src/react/index.ts +4 -0
  195. package/src/react/types.ts +37 -0
  196. package/src/react/useApp.tsx +165 -0
  197. package/src/react/useCapabilities.ts +4 -3
  198. package/src/react/useLoading.tsx +70 -0
  199. package/src/testing/withPluginManager.stories.tsx +9 -5
  200. package/src/testing/withPluginManager.tsx +33 -32
  201. package/tsconfig.json +11 -9
  202. package/vitest.config.ts +8 -6
  203. package/.swc/plugins/v7_linux_x86_64_13.0.0/f45bdff002284d9e8f9ef3f0be909de12da36c049cbcf261ac78fc00abb09a2d +0 -0
  204. package/dist/lib/browser/app-graph-builder-LYF7EKNN.mjs.map +0 -7
  205. package/dist/lib/browser/chunk-FMN65HSW.mjs.map +0 -7
  206. package/dist/lib/browser/chunk-FO2PH7M3.mjs.map +0 -7
  207. package/dist/lib/browser/chunk-ORWHM7CO.mjs.map +0 -7
  208. package/dist/lib/browser/intent-resolver-ZTNOSO3A.mjs.map +0 -7
  209. package/dist/lib/browser/store-KML2R4IE.mjs.map +0 -7
  210. package/dist/lib/browser/worker.mjs +0 -79
  211. package/dist/lib/node-esm/app-graph-builder-SAOWGJDK.mjs.map +0 -7
  212. package/dist/lib/node-esm/chunk-73HGSHKE.mjs.map +0 -7
  213. package/dist/lib/node-esm/chunk-UMZQERLE.mjs.map +0 -7
  214. package/dist/lib/node-esm/chunk-ZEZ4FVEU.mjs.map +0 -7
  215. package/dist/lib/node-esm/intent-resolver-W7Z7WFFM.mjs.map +0 -7
  216. package/dist/lib/node-esm/store-QEXGXLWZ.mjs.map +0 -7
  217. package/dist/lib/node-esm/worker.mjs +0 -80
  218. package/dist/types/src/App.d.ts.map +0 -1
  219. package/dist/types/src/worker.d.ts +0 -4
  220. package/dist/types/src/worker.d.ts.map +0 -1
  221. package/src/App.tsx +0 -276
  222. package/src/worker.ts +0 -11
  223. /package/dist/lib/browser/{intent-dispatcher-LSYQZSEB.mjs.map → intent-dispatcher-LZ4AE66E.mjs.map} +0 -0
  224. /package/dist/lib/browser/{worker.mjs.map → react/index.mjs.map} +0 -0
  225. /package/dist/lib/node-esm/{intent-dispatcher-6CYNGPSW.mjs.map → intent-dispatcher-MGOJ3CHD.mjs.map} +0 -0
  226. /package/dist/lib/node-esm/{worker.mjs.map → react/index.mjs.map} +0 -0
package/moon.yml CHANGED
@@ -5,10 +5,14 @@ tags:
5
5
  - ts-build
6
6
  - ts-test
7
7
  - typedoc
8
+ - storybook
8
9
  tasks:
9
10
  compile:
10
11
  args:
11
12
  - '--entryPoint=src/index.ts'
13
+ - '--entryPoint=src/react/index.ts'
12
14
  - '--entryPoint=src/testing/index.ts'
13
- - '--entryPoint=src/worker.ts'
14
15
  - '--preactSignalTracking'
16
+ test:
17
+ inputs:
18
+ - .storybook/*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/app-framework",
3
- "version": "0.8.4-main.67995b8",
3
+ "version": "0.8.4-main.72ec0f3",
4
4
  "description": "A framework for building applications from composible plugins.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,73 +10,78 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs",
15
- "node": "./dist/lib/node-esm/index.mjs",
16
- "source": "./src/index.ts"
16
+ "node": "./dist/lib/node-esm/index.mjs"
17
+ },
18
+ "./react": {
19
+ "source": "./src/react/index.ts",
20
+ "types": "./dist/types/src/react/index.d.ts",
21
+ "browser": "./dist/lib/browser/react/index.mjs",
22
+ "node": "./dist/lib/node-esm/react/index.mjs"
17
23
  },
18
24
  "./testing": {
25
+ "source": "./src/testing/index.ts",
19
26
  "types": "./dist/types/src/testing/index.d.ts",
20
27
  "browser": "./dist/lib/browser/testing/index.mjs",
21
- "node": "./dist/lib/node-esm/testing/index.mjs",
22
- "source": "./src/testing/index.ts"
23
- },
24
- "./worker": {
25
- "types": "./dist/types/src/worker.d.ts",
26
- "browser": "./dist/lib/browser/worker.mjs",
27
- "node": "./dist/lib/node-esm/worker.mjs",
28
- "source": "./src/worker.ts"
28
+ "node": "./dist/lib/node-esm/testing/index.mjs"
29
29
  }
30
30
  },
31
31
  "types": "dist/types/src/index.d.ts",
32
32
  "typesVersions": {
33
33
  "*": {
34
+ "react": [
35
+ "dist/types/src/react/index.d.ts"
36
+ ],
34
37
  "testing": [
35
38
  "dist/types/src/testing/index.d.ts"
36
- ],
37
- "worker": [
38
- "dist/types/src/worker.d.ts"
39
39
  ]
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
+ "@effect/ai": "0.29.1",
44
+ "@effect/experimental": "0.56.0",
43
45
  "@preact-signals/safe-react": "^0.9.0",
44
- "@preact/signals-core": "^1.9.0",
45
- "@dxos/ai": "0.8.4-main.67995b8",
46
- "@dxos/app-graph": "0.8.4-main.67995b8",
47
- "@dxos/async": "0.8.4-main.67995b8",
48
- "@dxos/client-protocol": "0.8.4-main.67995b8",
49
- "@dxos/blueprints": "0.8.4-main.67995b8",
50
- "@dxos/echo-schema": "0.8.4-main.67995b8",
51
- "@dxos/debug": "0.8.4-main.67995b8",
52
- "@dxos/functions": "0.8.4-main.67995b8",
53
- "@dxos/invariant": "0.8.4-main.67995b8",
54
- "@dxos/keys": "0.8.4-main.67995b8",
55
- "@dxos/local-storage": "0.8.4-main.67995b8",
56
- "@dxos/log": "0.8.4-main.67995b8",
57
- "@dxos/live-object": "0.8.4-main.67995b8",
58
- "@dxos/react-hooks": "0.8.4-main.67995b8",
59
- "@dxos/schema": "0.8.4-main.67995b8",
60
- "@dxos/util": "0.8.4-main.67995b8"
46
+ "@preact/signals-core": "^1.12.1",
47
+ "@dxos/app-graph": "0.8.4-main.72ec0f3",
48
+ "@dxos/assistant": "0.8.4-main.72ec0f3",
49
+ "@dxos/async": "0.8.4-main.72ec0f3",
50
+ "@dxos/blueprints": "0.8.4-main.72ec0f3",
51
+ "@dxos/ai": "0.8.4-main.72ec0f3",
52
+ "@dxos/echo": "0.8.4-main.72ec0f3",
53
+ "@dxos/functions": "0.8.4-main.72ec0f3",
54
+ "@dxos/live-object": "0.8.4-main.72ec0f3",
55
+ "@dxos/local-storage": "0.8.4-main.72ec0f3",
56
+ "@dxos/keys": "0.8.4-main.72ec0f3",
57
+ "@dxos/react-hooks": "0.8.4-main.72ec0f3",
58
+ "@dxos/debug": "0.8.4-main.72ec0f3",
59
+ "@dxos/client-protocol": "0.8.4-main.72ec0f3",
60
+ "@dxos/log": "0.8.4-main.72ec0f3",
61
+ "@dxos/invariant": "0.8.4-main.72ec0f3",
62
+ "@dxos/schema": "0.8.4-main.72ec0f3",
63
+ "@dxos/types": "0.8.4-main.72ec0f3",
64
+ "@dxos/util": "0.8.4-main.72ec0f3"
61
65
  },
62
66
  "devDependencies": {
63
- "@effect-rx/rx-react": "0.38.0",
64
- "@effect/platform": "0.89.0",
65
- "@types/react": "~18.2.0",
66
- "effect": "3.17.0",
67
- "react": "~18.2.0",
67
+ "@effect-atom/atom-react": "^0.3.4",
68
+ "@effect/platform": "0.92.1",
69
+ "@types/react": "~19.2.2",
70
+ "effect": "3.18.3",
71
+ "react": "~19.2.0",
68
72
  "typedoc": "0.28.1",
69
- "@dxos/echo-signals": "0.8.4-main.67995b8",
70
- "@dxos/random": "0.8.4-main.67995b8",
71
- "@dxos/react-ui": "0.8.4-main.67995b8",
72
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.67995b8",
73
- "@dxos/storybook-utils": "0.8.4-main.67995b8"
73
+ "@dxos/echo-signals": "0.8.4-main.72ec0f3",
74
+ "@dxos/random": "0.8.4-main.72ec0f3",
75
+ "@dxos/react-ui": "0.8.4-main.72ec0f3",
76
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.72ec0f3",
77
+ "@dxos/storybook-utils": "0.8.4-main.72ec0f3",
78
+ "@dxos/react-ui-theme": "0.8.4-main.72ec0f3"
74
79
  },
75
80
  "peerDependencies": {
76
- "@effect-rx/rx-react": "^0.34.1",
81
+ "@effect-atom/atom-react": "^0.3.4",
77
82
  "@effect/platform": "^0.80.12",
78
83
  "effect": "^3.13.3",
79
- "react": "~18.2.0"
84
+ "react": "^19.0.0"
80
85
  },
81
86
  "publishConfig": {
82
87
  "access": "public"
@@ -2,44 +2,81 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { type Registry } from '@effect-rx/rx-react';
6
- import { type Schema } from 'effect';
5
+ import { type Registry } from '@effect-atom/atom-react';
6
+ import type * as Layer from 'effect/Layer';
7
+ import type * as Schema from 'effect/Schema';
7
8
  import { type FC, type PropsWithChildren } from 'react';
8
9
 
9
- import { type ExecutableTool } from '@dxos/ai';
10
- import { type GraphBuilder, type BuilderExtensions } from '@dxos/app-graph';
11
- import { type ArtifactDefinition } from '@dxos/blueprints';
10
+ import { type AiService } from '@dxos/ai';
11
+ import type * as AiServiceRouter from '@dxos/ai/AiServiceRouter';
12
+ import { type BuilderExtensions, type GraphBuilder } from '@dxos/app-graph';
13
+ import { type GenericToolkit } from '@dxos/assistant';
14
+ import { type Blueprint } from '@dxos/blueprints';
12
15
  import { type Space } from '@dxos/client-protocol';
13
16
  import { type FunctionDefinition } from '@dxos/functions';
14
17
  import { type RootSettingsStore } from '@dxos/local-storage';
15
- import { type AnchoredTo } from '@dxos/schema';
18
+ import { type AnchoredTo } from '@dxos/types';
19
+
20
+ import { type PluginManager, defineCapability } from '../core';
21
+ import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
16
22
 
17
23
  import { type FileInfo } from './file';
18
24
  import { type NodeSerializer } from './graph';
19
25
  import { type SurfaceDefinition } from './surface';
20
26
  import { type Resource } from './translations';
21
- import { type PluginManager, defineCapability } from '../core';
22
- import { type AnyIntentResolver, type IntentContext } from '../plugin-intent';
23
27
 
28
+ // TODO(burdon): Sort.
24
29
  export namespace Capabilities {
30
+ /**
31
+ * @category Capability
32
+ */
25
33
  export const Null = defineCapability<null>('dxos.org/app-framework/capability/null');
26
34
 
35
+ /**
36
+ * @category Capability
37
+ */
27
38
  export const PluginManager = defineCapability<PluginManager>('dxos.org/app-framework/capability/plugin-manager');
28
39
 
29
- export const RxRegistry = defineCapability<Registry.Registry>('dxos.org/app-framework/capability/rx-registry');
40
+ /**
41
+ * @category Capability
42
+ */
43
+ export const AtomRegistry = defineCapability<Registry.Registry>('dxos.org/app-framework/capability/atom-registry');
30
44
 
31
- export type ReactContext = Readonly<{ id: string; dependsOn?: string[]; context: FC<PropsWithChildren> }>;
45
+ export type ReactContext = Readonly<{
46
+ id: string;
47
+ dependsOn?: string[];
48
+ context: FC<PropsWithChildren>;
49
+ }>;
50
+
51
+ /**
52
+ * @category Capability
53
+ */
32
54
  export const ReactContext = defineCapability<ReactContext>('dxos.org/app-framework/capability/react-context');
33
55
 
34
56
  export type ReactRoot = Readonly<{ id: string; root: FC<PropsWithChildren> }>;
57
+
58
+ /**
59
+ * @category Capability
60
+ */
35
61
  export const ReactRoot = defineCapability<ReactRoot>('dxos.org/app-framework/capability/react-root');
36
62
 
37
63
  export type ReactSurface = SurfaceDefinition | readonly SurfaceDefinition[];
64
+
65
+ /**
66
+ * @category Capability
67
+ */
38
68
  export const ReactSurface = defineCapability<ReactSurface>('dxos.org/app-framework/common/react-surface');
39
69
 
40
70
  export type IntentResolver = AnyIntentResolver | readonly AnyIntentResolver[];
71
+
72
+ /**
73
+ * @category Capability
74
+ */
41
75
  export const IntentResolver = defineCapability<IntentResolver>('dxos.org/app-framework/capability/intent-resolver');
42
76
 
77
+ /**
78
+ * @category Capability
79
+ */
43
80
  export const IntentDispatcher = defineCapability<IntentContext>(
44
81
  'dxos.org/app-framework/capability/intent-dispatcher',
45
82
  );
@@ -66,23 +103,41 @@ export namespace Capabilities {
66
103
  */
67
104
  scrollIntoView: string | undefined;
68
105
  }>;
106
+
107
+ /**
108
+ * @category Capability
109
+ */
69
110
  export const Layout = defineCapability<Layout>('dxos.org/app-framework/capability/layout');
70
111
 
71
- // TODO(burdon): Why array?
112
+ /**
113
+ * @category Capability
114
+ */
72
115
  export const Translations = defineCapability<Readonly<Resource[]>>('dxos.org/app-framework/capability/translations');
73
116
 
117
+ /**
118
+ * @category Capability
119
+ */
74
120
  export const AppGraph = defineCapability<Readonly<Pick<GraphBuilder, 'graph' | 'explore'>>>(
75
121
  'dxos.org/app-framework/capability/app-graph',
76
122
  );
77
123
 
124
+ /**
125
+ * @category Capability
126
+ */
78
127
  export const AppGraphBuilder = defineCapability<BuilderExtensions>(
79
128
  'dxos.org/app-framework/capability/app-graph-builder',
80
129
  );
81
130
 
131
+ /**
132
+ * @category Capability
133
+ */
82
134
  export const AppGraphSerializer = defineCapability<NodeSerializer[]>(
83
135
  'dxos.org/app-framework/capability/app-graph-serializer',
84
136
  );
85
137
 
138
+ /**
139
+ * @category Capability
140
+ */
86
141
  export const SettingsStore = defineCapability<RootSettingsStore>('dxos.org/app-framework/capability/settings-store');
87
142
 
88
143
  // TODO(wittjosiah): The generics caused type inference issues for schemas when contributing settings.
@@ -93,26 +148,67 @@ export namespace Capabilities {
93
148
  schema: Schema.Schema.All;
94
149
  value?: Record<string, any>;
95
150
  };
151
+
152
+ /**
153
+ * @category Capability
154
+ */
96
155
  export const Settings = defineCapability<Settings>('dxos.org/app-framework/capability/settings');
97
156
 
98
- export type Metadata = Readonly<{ id: string; metadata: Record<string, any> }>;
157
+ export type Metadata = Readonly<{
158
+ id: string;
159
+ metadata: Record<string, any>;
160
+ }>;
161
+
162
+ /**
163
+ * @category Capability
164
+ */
99
165
  export const Metadata = defineCapability<Metadata>('dxos.org/app-framework/capability/metadata');
100
166
 
101
- export const Tools = defineCapability<ExecutableTool[]>('dxos.org/app-framework/capability/tools');
102
- export const ArtifactDefinition = defineCapability<ArtifactDefinition>(
103
- 'dxos.org/app-framework/capability/artifact-definition',
167
+ /**
168
+ * @category Capability
169
+ */
170
+ export const Toolkit = defineCapability<GenericToolkit.GenericToolkit>(
171
+ 'dxos.org/app-framework/capability/ai-toolkit',
172
+ );
173
+
174
+ /**
175
+ * @category Capability
176
+ */
177
+ export const BlueprintDefinition = defineCapability<Blueprint.Blueprint>(
178
+ 'dxos.org/app-framework/capability/blueprint-definition',
104
179
  );
105
180
 
106
- export const Functions = defineCapability<FunctionDefinition<any, any>[]>(
107
- 'dxos.org/app-framework/capability/functions',
181
+ export type AiServiceLayer = Layer.Layer<AiService.AiService>;
182
+ export const AiServiceLayer = defineCapability<AiServiceLayer>(
183
+ 'dxos.org/app-framework/capability/ai-service-factory',
108
184
  );
109
185
 
110
- export type FileUploader = (file: File, space: Space) => Promise<FileInfo | undefined>;
186
+ /**
187
+ * Plugins can contribute them to provide model resolvers.
188
+ */
189
+ export const AiModelResolver = defineCapability<Layer.Layer<AiServiceRouter.AiModelResolver>>(
190
+ 'dxos.org/app-framework/capability/ai-model-resolver',
191
+ );
192
+
193
+ /**
194
+ * @category Capability
195
+ */
196
+ export const Functions = defineCapability<FunctionDefinition.Any[]>('dxos.org/app-framework/capability/functions');
197
+
198
+ export type FileUploader = (space: Space, file: File) => Promise<FileInfo | undefined>;
199
+
200
+ /**
201
+ * @category Capability
202
+ */
111
203
  export const FileUploader = defineCapability<FileUploader>('dxos.org/app-framework/capability/file-uploader');
112
204
 
113
- type AnchorSort = {
205
+ export type AnchorSort = {
114
206
  key: string;
115
- sort: (anchorA: AnchoredTo, anchorB: AnchoredTo) => number;
207
+ sort: (anchorA: AnchoredTo.AnchoredTo, anchorB: AnchoredTo.AnchoredTo) => number;
116
208
  };
209
+
210
+ /**
211
+ * @category Capability
212
+ */
117
213
  export const AnchorSort = defineCapability<AnchorSort>('dxos.org/app-framework/capability/anchor-sort');
118
214
  }
@@ -2,19 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
- import { Expando, Ref } from '@dxos/echo-schema';
7
+ import { ContentBlock } from '@dxos/types';
8
8
 
9
9
  export namespace CollaborationActions {
10
- export class InsertContent extends Schema.TaggedClass<InsertContent>()('assistant/intent-content', {
10
+ export class AcceptProposal extends Schema.TaggedClass<AcceptProposal>()('collaboration/accept-proposal', {
11
11
  input: Schema.Struct({
12
- target: Expando,
13
- object: Ref(Expando),
14
- at: Schema.optional(Schema.String),
15
- label: Schema.String.pipe(Schema.optional),
16
- }).annotations({
17
- description: 'Enables plugins to inject content blocks or references into a related entity.',
12
+ subject: Schema.Any,
13
+ anchor: Schema.String,
14
+ proposal: ContentBlock.Proposal,
18
15
  }),
19
16
  output: Schema.Void,
20
17
  }) {}
@@ -2,9 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities } from './capabilities';
6
5
  import { defineEvent } from '../core';
7
6
 
7
+ import { Capabilities } from './capabilities';
8
+
8
9
  export namespace Events {
9
10
  /**
10
11
  * Fired when the app is started.
@@ -48,6 +49,7 @@ export namespace Events {
48
49
  /**
49
50
  * Fired to load any newly available artifacts definitions.
50
51
  */
52
+ // TODO(burdon): Rename.
51
53
  export const SetupArtifactDefinition = defineEvent('dxos.org/app-framework/event/setup-artifact-definition');
52
54
 
53
55
  //
@@ -2,7 +2,7 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  // TODO(burdon): See Accept attribute (uses MIME types).
8
8
  // E.g., 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],
@@ -6,7 +6,7 @@ export * from './capabilities';
6
6
  export * from './collaboration';
7
7
  export * from './events';
8
8
  export * from './file';
9
- export type * from './graph';
9
+ export * from './graph';
10
10
  export * from './layout';
11
11
  export * from './surface';
12
12
  export * from './translations';
@@ -2,18 +2,17 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  import { Label } from '../plugin-intent';
8
8
 
9
- export const LAYOUT_PLUGIN = 'dxos.org/plugin/layout';
10
- export const LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
9
+ const LAYOUT_PLUGIN = 'dxos.org/plugin/layout';
11
10
 
12
11
  /**
13
12
  * Expected payload for layout actions.
14
13
  */
15
14
  export namespace LayoutAction {
16
- export const UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
15
+ export const UPDATE_LAYOUT = `${LAYOUT_PLUGIN}/action/update-layout`;
17
16
 
18
17
  /**
19
18
  * Generic layout action.
@@ -2,16 +2,16 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type JSX, type ForwardedRef, type PropsWithChildren, type ReactNode } from 'react';
5
+ import type { ComponentType, PropsWithChildren, ReactNode } from 'react';
6
6
 
7
- import { type GuardedType, type MakeOptional, type Position } from '@dxos/util';
7
+ import { type MakeOptional, type Position } from '@dxos/util';
8
8
 
9
9
  import { type ErrorBoundary } from '../react';
10
10
 
11
11
  /**
12
12
  * SurfaceProps are the props that are passed to the Surface component.
13
13
  */
14
- export type SurfaceProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<{
14
+ export type SurfaceProps<T extends Record<string, any> = Record<string, unknown>> = {
15
15
  /**
16
16
  * If specified, the Surface will be wrapped in an error boundary.
17
17
  * The fallback component will be rendered if an error occurs.
@@ -23,17 +23,20 @@ export type SurfaceProps<T extends Record<string, any> = Record<string, unknown>
23
23
  * The placeholder component will be rendered while the surface component is loading.
24
24
  */
25
25
  placeholder?: ReactNode;
26
- }> &
27
- MakeOptional<CoreSurfaceProps<T>, 'id' | 'data'> & {
28
- /**
29
- * Additional props to pass to the component.
30
- * These props are not used by Surface itself but may be used by components which resolve the surface.
31
- */
32
- [key: string]: unknown;
26
+ } & MakeOptional<CoreSurfaceProps<T>, 'id' | 'data'> &
27
+ /**
28
+ * Additional props to pass to the component.
29
+ * These props are not used by Surface itself but may be used by components which resolve the surface.
30
+ * Exclude known prop names to prevent overriding well-defined props.
31
+ */
32
+ {
33
+ [K in keyof Record<string, any>]: K extends keyof CoreSurfaceProps<T> | 'fallback' | 'placeholder' ? never : any;
33
34
  };
34
35
 
35
- // NOTE: If `[key: string]: unknown` is included in shared types, when re-used other fields become unknown as well.
36
- type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> = {
36
+ /**
37
+ * NOTE: If `[key: string]: unknown` is included in shared types, when re-used other fields become unknown as well.
38
+ */
39
+ export type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<{
37
40
  /**
38
41
  * ID for debugging.
39
42
  */
@@ -46,6 +49,7 @@ type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> =
46
49
 
47
50
  /**
48
51
  * The data to be rendered by the surface.
52
+ * NOTE: This must be a stable value.
49
53
  */
50
54
  data: T;
51
55
 
@@ -53,19 +57,17 @@ type CoreSurfaceProps<T extends Record<string, any> = Record<string, unknown>> =
53
57
  * If more than one component is resolved, the limit determines how many are rendered.
54
58
  */
55
59
  limit?: number | undefined;
56
- };
60
+ }>;
57
61
 
58
- type SurfaceComponentProps<T extends Record<string, any> = Record<string, unknown>> = PropsWithChildren<
59
- CoreSurfaceProps<T> & { [key: string]: unknown }
60
- >;
62
+ export type SurfaceComponentProps<T extends Record<string, any> = Record<string, any>> = CoreSurfaceProps<T> &
63
+ Record<string, any>;
61
64
 
62
65
  /**
63
66
  * React component used to render a surface once is has matched.
64
67
  */
65
- export type SurfaceComponent<T extends Record<string, any> = Record<string, unknown>> = (
66
- props: SurfaceComponentProps<T>,
67
- forwardedRef: ForwardedRef<HTMLElement>,
68
- ) => JSX.Element | null;
68
+ export type SurfaceComponent<T extends Record<string, any> = Record<string, any>> = ComponentType<
69
+ SurfaceComponentProps<T>
70
+ >;
69
71
 
70
72
  /**
71
73
  * Definition of when a SurfaceComponent should be rendered.
@@ -74,8 +76,8 @@ export type SurfaceDefinition<T extends Record<string, any> = any> = Readonly<{
74
76
  id: string;
75
77
  role: string | string[];
76
78
  position?: Position;
79
+ component: SurfaceComponent<T>;
77
80
  filter?: (data: Record<string, unknown>) => data is T;
78
- component: SurfaceComponent<GuardedType<SurfaceDefinition<T>['filter']>>;
79
81
  }>;
80
82
 
81
83
  /**
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Schema } from 'effect';
5
+ import * as Schema from 'effect/Schema';
6
6
 
7
7
  export const ResourceKey = Schema.Union(Schema.String, Schema.Record({ key: Schema.String, value: Schema.Any }));
8
8
  export type ResourceKey = Schema.Schema.Type<typeof ResourceKey>;
@@ -2,11 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Registry } from '@effect-rx/rx-react';
6
- import { Effect } from 'effect';
5
+ import { Registry } from '@effect-atom/atom-react';
6
+ import * as Effect from 'effect/Effect';
7
7
  import { describe, expect, it, onTestFinished } from 'vitest';
8
8
 
9
- import { defineCapability, PluginContext } from './capabilities';
9
+ import { PluginContext, defineCapability } from './capabilities';
10
10
 
11
11
  const defaultOptions = {
12
12
  activate: () => Effect.succeed(false),