@dxos/app-framework 0.8.2-main.f11618f → 0.8.2-main.fbd8ed0

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 (310) hide show
  1. package/dist/lib/browser/{app-graph-builder-OHM2Z6YQ.mjs → app-graph-builder-6E7NCZ77.mjs} +23 -23
  2. package/dist/lib/browser/app-graph-builder-6E7NCZ77.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-DVNSCQJ5.mjs → chunk-2KSDY3EZ.mjs} +297 -270
  4. package/dist/lib/browser/chunk-2KSDY3EZ.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-X2YC645Z.mjs → chunk-K3HOLGVH.mjs} +38 -26
  6. package/dist/lib/browser/chunk-K3HOLGVH.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-SFPT4Z2C.mjs → chunk-KPRHX73H.mjs} +9 -9
  8. package/dist/lib/browser/chunk-KPRHX73H.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +8 -8
  10. package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs → intent-dispatcher-VGUJBPPN.mjs} +2 -2
  11. package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs → intent-resolver-QLFZY5R5.mjs} +3 -3
  12. package/dist/lib/browser/meta.json +1 -1
  13. package/dist/lib/browser/{store-XMPVLJOQ.mjs → store-QGVXOY4T.mjs} +7 -6
  14. package/dist/lib/browser/store-QGVXOY4T.mjs.map +7 -0
  15. package/dist/lib/browser/testing/index.mjs +7 -3
  16. package/dist/lib/browser/testing/index.mjs.map +3 -3
  17. package/dist/lib/browser/worker.mjs +3 -3
  18. package/dist/lib/node/app-graph-builder-4IWMG67O.cjs +146 -0
  19. package/dist/lib/node/app-graph-builder-4IWMG67O.cjs.map +7 -0
  20. package/dist/lib/node/{chunk-I3CJYEBC.cjs → chunk-2EBZ2ICH.cjs} +137 -110
  21. package/dist/lib/node/chunk-2EBZ2ICH.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-5UOVF3OR.cjs → chunk-7J66KH2T.cjs} +78 -66
  23. package/dist/lib/node/chunk-7J66KH2T.cjs.map +7 -0
  24. package/dist/lib/node/{chunk-JUSEAFDU.cjs → chunk-JQMNABMK.cjs} +4 -4
  25. package/dist/lib/node/chunk-JQMNABMK.cjs.map +7 -0
  26. package/dist/lib/node/index.cjs +80 -80
  27. package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs → intent-dispatcher-TASJBG5M.cjs} +8 -8
  28. package/dist/lib/node/{intent-dispatcher-FQPJNKIZ.cjs.map → intent-dispatcher-TASJBG5M.cjs.map} +2 -2
  29. package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs → intent-resolver-5CG5NIJY.cjs} +12 -12
  30. package/dist/lib/node/meta.json +1 -1
  31. package/dist/lib/node/{store-N7JLYYDI.cjs → store-IF3UR2KA.cjs} +10 -9
  32. package/dist/lib/node/store-IF3UR2KA.cjs.map +7 -0
  33. package/dist/lib/node/testing/index.cjs +14 -9
  34. package/dist/lib/node/testing/index.cjs.map +3 -3
  35. package/dist/lib/node/worker.cjs +39 -39
  36. package/dist/lib/node/worker.cjs.map +1 -1
  37. package/dist/lib/node-esm/{app-graph-builder-OMH534A4.mjs → app-graph-builder-LYCG5CO3.mjs} +23 -23
  38. package/dist/lib/node-esm/app-graph-builder-LYCG5CO3.mjs.map +7 -0
  39. package/dist/lib/node-esm/{chunk-GSDBF2CK.mjs → chunk-BOEJMAVK.mjs} +297 -270
  40. package/dist/lib/node-esm/chunk-BOEJMAVK.mjs.map +7 -0
  41. package/dist/lib/node-esm/{chunk-QHXUTJHE.mjs → chunk-ISNBS46Y.mjs} +38 -26
  42. package/dist/lib/node-esm/chunk-ISNBS46Y.mjs.map +7 -0
  43. package/dist/lib/node-esm/{chunk-PHOUQACM.mjs → chunk-JUJF5L4G.mjs} +9 -9
  44. package/dist/lib/node-esm/chunk-JUJF5L4G.mjs.map +7 -0
  45. package/dist/lib/node-esm/index.mjs +8 -8
  46. package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs → intent-dispatcher-ZUSNX2OY.mjs} +2 -2
  47. package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs → intent-resolver-NGDHUKDD.mjs} +3 -3
  48. package/dist/lib/node-esm/meta.json +1 -1
  49. package/dist/lib/node-esm/{store-M2BYJL6K.mjs → store-NCRSE25X.mjs} +7 -6
  50. package/dist/lib/node-esm/store-NCRSE25X.mjs.map +7 -0
  51. package/dist/lib/node-esm/testing/index.mjs +7 -3
  52. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  53. package/dist/lib/node-esm/worker.mjs +3 -3
  54. package/dist/types/src/App.d.ts +3 -1
  55. package/dist/types/src/App.d.ts.map +1 -1
  56. package/dist/types/src/common/capabilities.d.ts +6 -196
  57. package/dist/types/src/common/capabilities.d.ts.map +1 -1
  58. package/dist/types/src/common/collaboration.d.ts +14 -7
  59. package/dist/types/src/common/collaboration.d.ts.map +1 -1
  60. package/dist/types/src/common/events.d.ts.map +1 -1
  61. package/dist/types/src/common/file.d.ts +7 -7
  62. package/dist/types/src/common/file.d.ts.map +1 -1
  63. package/dist/types/src/common/layout.d.ts +163 -163
  64. package/dist/types/src/common/layout.d.ts.map +1 -1
  65. package/dist/types/src/common/surface.d.ts.map +1 -1
  66. package/dist/types/src/common/translations.d.ts +7 -7
  67. package/dist/types/src/common/translations.d.ts.map +1 -1
  68. package/dist/types/src/core/capabilities.d.ts +28 -13
  69. package/dist/types/src/core/capabilities.d.ts.map +1 -1
  70. package/dist/types/src/core/events.d.ts.map +1 -1
  71. package/dist/types/src/core/manager.d.ts +6 -3
  72. package/dist/types/src/core/manager.d.ts.map +1 -1
  73. package/dist/types/src/core/plugin.d.ts +2 -2
  74. package/dist/types/src/core/plugin.d.ts.map +1 -1
  75. package/dist/types/src/helpers.d.ts.map +1 -1
  76. package/dist/types/src/playground/generator/generator.d.ts.map +1 -1
  77. package/dist/types/src/playground/logger/schema.d.ts +6 -6
  78. package/dist/types/src/playground/logger/schema.d.ts.map +1 -1
  79. package/dist/types/src/plugin-intent/actions.d.ts +14 -14
  80. package/dist/types/src/plugin-intent/actions.d.ts.map +1 -1
  81. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts +3 -3
  82. package/dist/types/src/plugin-intent/intent-dispatcher.d.ts.map +1 -1
  83. package/dist/types/src/plugin-intent/intent.d.ts +14 -20
  84. package/dist/types/src/plugin-intent/intent.d.ts.map +1 -1
  85. package/dist/types/src/plugin-settings/actions.d.ts +10 -10
  86. package/dist/types/src/plugin-settings/actions.d.ts.map +1 -1
  87. package/dist/types/src/plugin-settings/app-graph-builder.d.ts +2 -195
  88. package/dist/types/src/plugin-settings/app-graph-builder.d.ts.map +1 -1
  89. package/dist/types/src/plugin-settings/store.d.ts +2 -2
  90. package/dist/types/src/plugin-settings/store.d.ts.map +1 -1
  91. package/dist/types/src/react/IntentContext.d.ts.map +1 -1
  92. package/dist/types/src/react/Surface.d.ts +2 -2
  93. package/dist/types/src/react/Surface.d.ts.map +1 -1
  94. package/dist/types/src/react/useCapabilities.d.ts +2 -2
  95. package/dist/types/src/react/useCapabilities.d.ts.map +1 -1
  96. package/dist/types/src/react/useIntentResolver.d.ts.map +1 -1
  97. package/dist/types/src/testing/withPluginManager.d.ts +5 -2
  98. package/dist/types/src/testing/withPluginManager.d.ts.map +1 -1
  99. package/dist/types/src/testing/withPluginManager.stories.d.ts.map +1 -1
  100. package/dist/types/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +25 -20
  102. package/src/App.tsx +14 -2
  103. package/src/common/capabilities.ts +7 -4
  104. package/src/common/collaboration.ts +11 -8
  105. package/src/common/file.ts +7 -7
  106. package/src/common/layout.ts +148 -136
  107. package/src/common/translations.ts +7 -7
  108. package/src/core/capabilities.test.ts +55 -36
  109. package/src/core/capabilities.ts +77 -57
  110. package/src/core/manager.test.ts +19 -19
  111. package/src/core/manager.ts +14 -6
  112. package/src/core/plugin.ts +2 -2
  113. package/src/playground/generator/generator.ts +4 -4
  114. package/src/playground/logger/schema.ts +5 -5
  115. package/src/playground/playground.stories.tsx +1 -1
  116. package/src/plugin-intent/actions.ts +9 -9
  117. package/src/plugin-intent/intent-dispatcher.test.ts +23 -42
  118. package/src/plugin-intent/intent-dispatcher.ts +7 -11
  119. package/src/plugin-intent/intent.ts +22 -20
  120. package/src/plugin-settings/actions.ts +8 -8
  121. package/src/plugin-settings/app-graph-builder.ts +129 -94
  122. package/src/plugin-settings/store.ts +20 -17
  123. package/src/react/Surface.stories.tsx +1 -1
  124. package/src/react/Surface.tsx +3 -3
  125. package/src/react/useCapabilities.ts +9 -19
  126. package/src/testing/withPluginManager.stories.tsx +0 -1
  127. package/src/testing/withPluginManager.tsx +11 -3
  128. package/tsconfig.json +3 -0
  129. package/typedoc/assets/navigation.js +1 -1
  130. package/typedoc/assets/search.js +1 -1
  131. package/typedoc/classes/CollaborationActions.InsertContent.html +280 -241
  132. package/typedoc/classes/ErrorBoundary.html +6 -6
  133. package/typedoc/classes/IntentAction.ShowUndo.html +125 -125
  134. package/typedoc/classes/IntentAction.Track.html +239 -239
  135. package/typedoc/classes/LayoutAction.AddToast.html +163 -163
  136. package/typedoc/classes/LayoutAction.Close.html +352 -352
  137. package/typedoc/classes/LayoutAction.Expose.html +238 -238
  138. package/typedoc/classes/LayoutAction.Open.html +904 -748
  139. package/typedoc/classes/LayoutAction.RevertWorkspace.html +241 -241
  140. package/typedoc/classes/LayoutAction.ScrollIntoView.html +280 -280
  141. package/typedoc/classes/LayoutAction.Set.html +436 -358
  142. package/typedoc/classes/LayoutAction.SetLayoutMode.html +469 -391
  143. package/typedoc/classes/LayoutAction.SwitchWorkspace.html +238 -238
  144. package/typedoc/classes/LayoutAction.UpdateComplementary.html +358 -358
  145. package/typedoc/classes/LayoutAction.UpdateDialog.html +553 -475
  146. package/typedoc/classes/LayoutAction.UpdateLayout.html +281 -281
  147. package/typedoc/classes/LayoutAction.UpdatePopover.html +826 -826
  148. package/typedoc/classes/LayoutAction.UpdateSidebar.html +397 -319
  149. package/typedoc/classes/Plugin.html +3 -3
  150. package/typedoc/classes/PluginContext.html +38 -0
  151. package/typedoc/classes/PluginManager.html +17 -16
  152. package/typedoc/classes/PluginModule.html +9 -9
  153. package/typedoc/classes/SettingsAction.Open.html +199 -199
  154. package/typedoc/classes/SettingsAction.OpenPluginRegistry.html +124 -124
  155. package/typedoc/functions/Events.createStateEvent.html +2 -2
  156. package/typedoc/functions/IntentPlugin.html +1 -1
  157. package/typedoc/functions/SettingsPlugin.html +1 -1
  158. package/typedoc/functions/allOf.html +2 -2
  159. package/typedoc/functions/chain.html +2 -2
  160. package/typedoc/functions/contributes.html +2 -2
  161. package/typedoc/functions/createApp.html +2 -2
  162. package/typedoc/functions/createDispatcher.html +3 -3
  163. package/typedoc/functions/createIntent.html +3 -3
  164. package/typedoc/functions/createResolver.html +2 -2
  165. package/typedoc/functions/createSurface.html +2 -2
  166. package/typedoc/functions/defineCapability.html +2 -2
  167. package/typedoc/functions/defineEvent.html +2 -2
  168. package/typedoc/functions/defineModule.html +2 -2
  169. package/typedoc/functions/definePlugin.html +2 -2
  170. package/typedoc/functions/eventKey.html +2 -2
  171. package/typedoc/functions/getEvents.html +2 -2
  172. package/typedoc/functions/isAllOf.html +2 -2
  173. package/typedoc/functions/isOneOf.html +2 -2
  174. package/typedoc/functions/isSurfaceAvailable.html +2 -2
  175. package/typedoc/functions/lazy.html +2 -2
  176. package/typedoc/functions/oneOf.html +2 -2
  177. package/typedoc/functions/useAppGraph.html +1 -1
  178. package/typedoc/functions/useCapabilities.html +3 -3
  179. package/typedoc/functions/useCapability.html +3 -3
  180. package/typedoc/functions/useIntentDispatcher.html +1 -1
  181. package/typedoc/functions/useIntentResolver.html +1 -1
  182. package/typedoc/functions/useLayout.html +1 -1
  183. package/typedoc/functions/usePluginManager.html +2 -2
  184. package/typedoc/hierarchy.html +1 -1
  185. package/typedoc/index.html +2 -2
  186. package/typedoc/interfaces/LayoutAction.Toast.html +2 -2
  187. package/typedoc/modules/Capabilities.html +1 -1
  188. package/typedoc/modules/CollaborationActions.html +1 -1
  189. package/typedoc/modules/Events.html +1 -1
  190. package/typedoc/modules/IntentAction.html +1 -1
  191. package/typedoc/modules/LayoutAction.html +2 -2
  192. package/typedoc/modules/SettingsAction.html +1 -1
  193. package/typedoc/modules.html +1 -1
  194. package/typedoc/types/ActivationEvent.html +3 -3
  195. package/typedoc/types/ActivationEvents.html +2 -2
  196. package/typedoc/types/AnyCapability.html +1 -1
  197. package/typedoc/types/AnyIntent.html +1 -1
  198. package/typedoc/types/AnyIntentChain.html +1 -1
  199. package/typedoc/types/AnyIntentEffectResult.html +1 -1
  200. package/typedoc/types/AnyIntentResolver.html +1 -1
  201. package/typedoc/types/AnyIntentResult.html +1 -1
  202. package/typedoc/types/Capabilities.FileUploader.html +1 -1
  203. package/typedoc/types/Capabilities.IntentResolver.html +1 -1
  204. package/typedoc/types/Capabilities.Layout.html +1 -1
  205. package/typedoc/types/Capabilities.Metadata.html +1 -1
  206. package/typedoc/types/Capabilities.ReactContext.html +1 -1
  207. package/typedoc/types/Capabilities.ReactRoot.html +1 -1
  208. package/typedoc/types/Capabilities.ReactSurface.html +1 -1
  209. package/typedoc/types/Capabilities.Settings.html +2 -2
  210. package/typedoc/types/Capability.html +5 -5
  211. package/typedoc/types/CreateAppOptions.html +3 -2
  212. package/typedoc/types/FileInfo.html +1 -1
  213. package/typedoc/types/Intent.html +6 -10
  214. package/typedoc/types/IntentChain.html +3 -3
  215. package/typedoc/types/IntentContext.html +2 -2
  216. package/typedoc/types/IntentData.html +1 -1
  217. package/typedoc/types/IntentDispatcher.html +2 -2
  218. package/typedoc/types/IntentDispatcherResult.html +2 -2
  219. package/typedoc/types/IntentEffectDefinition.html +2 -2
  220. package/typedoc/types/IntentEffectResult.html +6 -6
  221. package/typedoc/types/IntentParams.html +2 -2
  222. package/typedoc/types/IntentResolver.html +2 -2
  223. package/typedoc/types/IntentResultData.html +1 -1
  224. package/typedoc/types/IntentSchema.html +1 -1
  225. package/typedoc/types/IntentUndo.html +2 -2
  226. package/typedoc/types/InterfaceDef.html +3 -3
  227. package/typedoc/types/Label.html +1 -1
  228. package/typedoc/types/NodeSerializer.html +3 -3
  229. package/typedoc/types/PluginManagerOptions.html +3 -2
  230. package/typedoc/types/PluginMeta.html +9 -9
  231. package/typedoc/types/PromiseIntentDispatcher.html +2 -2
  232. package/typedoc/types/PromiseIntentUndo.html +2 -2
  233. package/typedoc/types/Resource.html +1 -1
  234. package/typedoc/types/ResourceKey.html +1 -1
  235. package/typedoc/types/ResourceLanguage.html +1 -1
  236. package/typedoc/types/SerializedNode.html +2 -2
  237. package/typedoc/types/SurfaceComponent.html +2 -2
  238. package/typedoc/types/SurfaceDefinition.html +2 -2
  239. package/typedoc/types/SurfaceProps.html +2 -2
  240. package/typedoc/variables/Capabilities.AppGraph.html +1 -1
  241. package/typedoc/variables/Capabilities.AppGraphBuilder.html +1 -1
  242. package/typedoc/variables/Capabilities.AppGraphSerializer.html +1 -1
  243. package/typedoc/variables/Capabilities.ArtifactDefinition.html +1 -1
  244. package/typedoc/variables/Capabilities.FileUploader.html +1 -1
  245. package/typedoc/variables/Capabilities.IntentDispatcher.html +1 -1
  246. package/typedoc/variables/Capabilities.IntentResolver.html +1 -1
  247. package/typedoc/variables/Capabilities.Layout.html +1 -1
  248. package/typedoc/variables/Capabilities.Metadata.html +1 -1
  249. package/typedoc/variables/Capabilities.Null.html +1 -1
  250. package/typedoc/variables/Capabilities.PluginManager.html +1 -1
  251. package/typedoc/variables/Capabilities.ReactContext.html +1 -1
  252. package/typedoc/variables/Capabilities.ReactRoot.html +1 -1
  253. package/typedoc/variables/Capabilities.ReactSurface.html +1 -1
  254. package/typedoc/variables/Capabilities.RxRegistry.html +1 -0
  255. package/typedoc/variables/Capabilities.Settings.html +1 -1
  256. package/typedoc/variables/Capabilities.SettingsStore.html +1 -1
  257. package/typedoc/variables/Capabilities.Tools.html +1 -1
  258. package/typedoc/variables/Capabilities.Translations.html +1 -1
  259. package/typedoc/variables/Events.AppGraphReady.html +2 -2
  260. package/typedoc/variables/Events.DispatcherReady.html +2 -2
  261. package/typedoc/variables/Events.LayoutReady.html +1 -1
  262. package/typedoc/variables/Events.SettingsReady.html +2 -2
  263. package/typedoc/variables/Events.SetupAppGraph.html +2 -2
  264. package/typedoc/variables/Events.SetupArtifactDefinition.html +2 -2
  265. package/typedoc/variables/Events.SetupIntentResolver.html +2 -2
  266. package/typedoc/variables/Events.SetupMetadata.html +2 -2
  267. package/typedoc/variables/Events.SetupReactSurface.html +2 -2
  268. package/typedoc/variables/Events.SetupSettings.html +2 -2
  269. package/typedoc/variables/Events.SetupTranslations.html +2 -2
  270. package/typedoc/variables/Events.Startup.html +2 -2
  271. package/typedoc/variables/FileInfoSchema.html +1 -1
  272. package/typedoc/variables/INTENT_ACTION.html +1 -1
  273. package/typedoc/variables/INTENT_PLUGIN.html +1 -1
  274. package/typedoc/variables/LAYOUT_ACTION.html +1 -1
  275. package/typedoc/variables/LAYOUT_PLUGIN.html +1 -1
  276. package/typedoc/variables/Label.html +1 -1
  277. package/typedoc/variables/LayoutAction.Toast.html +1 -1
  278. package/typedoc/variables/LayoutAction.UPDATE_LAYOUT.html +1 -1
  279. package/typedoc/variables/PluginManagerProvider.html +2 -2
  280. package/typedoc/variables/Resource.html +2 -2
  281. package/typedoc/variables/ResourceKey.html +1 -1
  282. package/typedoc/variables/ResourceLanguage.html +1 -1
  283. package/typedoc/variables/SETTINGS_ACTION.html +1 -1
  284. package/typedoc/variables/SETTINGS_ID.html +1 -1
  285. package/typedoc/variables/SETTINGS_KEY.html +1 -1
  286. package/typedoc/variables/SETTINGS_PLUGIN.html +1 -1
  287. package/typedoc/variables/Surface.html +2 -2
  288. package/typedoc/variables/defaultFileTypes.html +1 -1
  289. package/dist/lib/browser/app-graph-builder-OHM2Z6YQ.mjs.map +0 -7
  290. package/dist/lib/browser/chunk-DVNSCQJ5.mjs.map +0 -7
  291. package/dist/lib/browser/chunk-SFPT4Z2C.mjs.map +0 -7
  292. package/dist/lib/browser/chunk-X2YC645Z.mjs.map +0 -7
  293. package/dist/lib/browser/store-XMPVLJOQ.mjs.map +0 -7
  294. package/dist/lib/node/app-graph-builder-Z45FKS52.cjs +0 -146
  295. package/dist/lib/node/app-graph-builder-Z45FKS52.cjs.map +0 -7
  296. package/dist/lib/node/chunk-5UOVF3OR.cjs.map +0 -7
  297. package/dist/lib/node/chunk-I3CJYEBC.cjs.map +0 -7
  298. package/dist/lib/node/chunk-JUSEAFDU.cjs.map +0 -7
  299. package/dist/lib/node/store-N7JLYYDI.cjs.map +0 -7
  300. package/dist/lib/node-esm/app-graph-builder-OMH534A4.mjs.map +0 -7
  301. package/dist/lib/node-esm/chunk-GSDBF2CK.mjs.map +0 -7
  302. package/dist/lib/node-esm/chunk-PHOUQACM.mjs.map +0 -7
  303. package/dist/lib/node-esm/chunk-QHXUTJHE.mjs.map +0 -7
  304. package/dist/lib/node-esm/store-M2BYJL6K.mjs.map +0 -7
  305. package/typedoc/classes/PluginsContext.html +0 -25
  306. /package/dist/lib/browser/{intent-dispatcher-J7QIFHLO.mjs.map → intent-dispatcher-VGUJBPPN.mjs.map} +0 -0
  307. /package/dist/lib/browser/{intent-resolver-QV5MDMDV.mjs.map → intent-resolver-QLFZY5R5.mjs.map} +0 -0
  308. /package/dist/lib/node/{intent-resolver-PBAOGJS6.cjs.map → intent-resolver-5CG5NIJY.cjs.map} +0 -0
  309. /package/dist/lib/node-esm/{intent-dispatcher-QDUGA7NT.mjs.map → intent-dispatcher-ZUSNX2OY.mjs.map} +0 -0
  310. /package/dist/lib/node-esm/{intent-resolver-P7TC5RBD.mjs.map → intent-resolver-NGDHUKDD.mjs.map} +0 -0
@@ -2,17 +2,17 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
 
3
3
  // packages/sdk/app-framework/src/plugin-intent/intent-dispatcher.ts
4
4
  import { Effect as Effect3, Option, pipe as pipe2, Ref as Ref2 } from "effect";
5
- import { live as live3 } from "@dxos/live-object";
5
+ import { live as live2 } from "@dxos/live-object";
6
6
  import { log as log3 } from "@dxos/log";
7
7
  import { byPosition } from "@dxos/util";
8
8
 
9
9
  // packages/sdk/app-framework/src/plugin-intent/actions.ts
10
- import { Schema as S2 } from "effect";
10
+ import { Schema as Schema2 } from "effect";
11
11
 
12
12
  // packages/sdk/app-framework/src/plugin-intent/intent.ts
13
- import { Schema as S } from "effect";
13
+ import { Schema } from "effect";
14
14
  var createIntent = (schema, data = {}, params = {}) => {
15
- const _ = S.validateSync(schema.fields.input)(data);
15
+ const _ = Schema.validateSync(schema.fields.input)(data);
16
16
  const intent = {
17
17
  ...params,
18
18
  _schema: schema,
@@ -47,9 +47,9 @@ var chain = (schema, data = {}, params = {}) => (intent) => {
47
47
  ]
48
48
  };
49
49
  };
50
- var Label = S.Union(S.String, S.mutable(S.Tuple(S.String, S.mutable(S.Struct({
51
- ns: S.String,
52
- count: S.optional(S.Number)
50
+ var Label = Schema.Union(Schema.String, Schema.mutable(Schema.Tuple(Schema.String, Schema.mutable(Schema.Struct({
51
+ ns: Schema.String,
52
+ count: Schema.optional(Schema.Number)
53
53
  })))));
54
54
 
55
55
  // packages/sdk/app-framework/src/plugin-intent/actions.ts
@@ -57,20 +57,20 @@ var INTENT_PLUGIN = "dxos.org/plugin/intent";
57
57
  var INTENT_ACTION = `${INTENT_PLUGIN}/action`;
58
58
  var IntentAction;
59
59
  (function(IntentAction2) {
60
- class Track extends S2.TaggedClass()(`${INTENT_ACTION}/track`, {
61
- input: S2.Struct({
62
- intents: S2.Array(S2.String),
63
- error: S2.optional(S2.String)
60
+ class Track extends Schema2.TaggedClass()(`${INTENT_ACTION}/track`, {
61
+ input: Schema2.Struct({
62
+ intents: Schema2.Array(Schema2.String),
63
+ error: Schema2.optional(Schema2.String)
64
64
  }),
65
- output: S2.Void
65
+ output: Schema2.Void
66
66
  }) {
67
67
  }
68
68
  IntentAction2.Track = Track;
69
- class ShowUndo extends S2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
70
- input: S2.Struct({
69
+ class ShowUndo extends Schema2.TaggedClass()(`${INTENT_ACTION}/show-undo`, {
70
+ input: Schema2.Struct({
71
71
  message: Label
72
72
  }),
73
- output: S2.Void
73
+ output: Schema2.Void
74
74
  }) {
75
75
  }
76
76
  IntentAction2.ShowUndo = ShowUndo;
@@ -102,11 +102,10 @@ var CycleDetectedError = class extends BaseError {
102
102
  };
103
103
 
104
104
  // packages/sdk/app-framework/src/core/capabilities.ts
105
- import { effect, untracked } from "@preact/signals-core";
105
+ import { Rx } from "@effect-rx/rx-react";
106
106
  import { Effect } from "effect";
107
107
  import { Trigger } from "@dxos/async";
108
108
  import { invariant } from "@dxos/invariant";
109
- import { live } from "@dxos/live-object";
110
109
  import { log } from "@dxos/log";
111
110
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/capabilities.ts";
112
111
  var InterfaceDefTypeId = Symbol.for("InterfaceDefTypeId");
@@ -132,9 +131,33 @@ var lazy = (c) => async (props) => {
132
131
  const { default: getCapability } = await c();
133
132
  return async () => getCapability(props);
134
133
  };
135
- var PluginsContext = class {
136
- constructor({ activate, reset }) {
137
- this._definedCapabilities = /* @__PURE__ */ new Map();
134
+ var PluginContext = class {
135
+ constructor({ registry, activate, reset }) {
136
+ this._capabilityImpls = Rx.family(() => {
137
+ return Rx.make([]).pipe(Rx.keepAlive);
138
+ });
139
+ this._capabilities = Rx.family((id) => {
140
+ return Rx.make((get) => {
141
+ const current = get(this._capabilityImpls(id));
142
+ return current.map((c) => c.implementation);
143
+ });
144
+ });
145
+ this._capability = Rx.family((id) => {
146
+ return Rx.make((get) => {
147
+ const current = get(this._capabilities(id));
148
+ invariant(current.length > 0, `No capability found for ${id}`, {
149
+ F: __dxlog_file,
150
+ L: 117,
151
+ S: this,
152
+ A: [
153
+ "current.length > 0",
154
+ "`No capability found for ${id}`"
155
+ ]
156
+ });
157
+ return current[0];
158
+ });
159
+ });
160
+ this._registry = registry;
138
161
  this.activate = activate;
139
162
  this.reset = reset;
140
163
  }
@@ -142,22 +165,22 @@ var PluginsContext = class {
142
165
  * @internal
143
166
  */
144
167
  contributeCapability({ module: moduleId, interface: interfaceDef, implementation }) {
145
- let current = this._definedCapabilities.get(interfaceDef.identifier);
146
- if (!current) {
147
- const object = live({
148
- value: []
149
- });
150
- current = untracked(() => object.value);
151
- this._definedCapabilities.set(interfaceDef.identifier, current);
168
+ const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
169
+ const capability = new CapabilityImpl(moduleId, implementation);
170
+ if (current.includes(capability)) {
171
+ return;
152
172
  }
153
- current.push(new CapabilityImpl(moduleId, implementation));
173
+ this._registry.set(this._capabilityImpls(interfaceDef.identifier), [
174
+ ...current,
175
+ capability
176
+ ]);
154
177
  log("capability contributed", {
155
178
  id: interfaceDef.identifier,
156
179
  moduleId,
157
- count: untracked(() => current.length)
180
+ count: current.length
158
181
  }, {
159
182
  F: __dxlog_file,
160
- L: 146,
183
+ L: 161,
161
184
  S: this,
162
185
  C: (f, a) => f(...a)
163
186
  });
@@ -166,19 +189,19 @@ var PluginsContext = class {
166
189
  * @internal
167
190
  */
168
191
  removeCapability(interfaceDef, implementation) {
169
- const current = this._definedCapabilities.get(interfaceDef.identifier);
170
- if (!current) {
192
+ const current = this._registry.get(this._capabilityImpls(interfaceDef.identifier));
193
+ if (current.length === 0) {
171
194
  return;
172
195
  }
173
- const index = current.findIndex((i) => i.implementation === implementation);
174
- if (index !== -1) {
175
- current.splice(index, 1);
196
+ const next = current.filter((c) => c.implementation !== implementation);
197
+ if (next.length !== current.length) {
198
+ this._registry.set(this._capabilityImpls(interfaceDef.identifier), next);
176
199
  log("capability removed", {
177
200
  id: interfaceDef.identifier,
178
- count: untracked(() => current.length)
201
+ count: current.length
179
202
  }, {
180
203
  F: __dxlog_file,
181
- L: 165,
204
+ L: 180,
182
205
  S: this,
183
206
  C: (f, a) => f(...a)
184
207
  });
@@ -187,63 +210,64 @@ var PluginsContext = class {
187
210
  id: interfaceDef.identifier
188
211
  }, {
189
212
  F: __dxlog_file,
190
- L: 167,
213
+ L: 182,
191
214
  S: this,
192
215
  C: (f, a) => f(...a)
193
216
  });
194
217
  }
195
218
  }
196
219
  /**
197
- * Requests capabilities from the plugin context.
220
+ * Get the Rx reference to the available capabilities for a given interface.
221
+ * Primarily useful for deriving other Rx values based on the capabilities or
222
+ * for subscribing to changes in the capabilities.
223
+ * @returns An Rx reference to the available capabilities.
224
+ */
225
+ capabilities(interfaceDef) {
226
+ return this._capabilities(interfaceDef.identifier);
227
+ }
228
+ /**
229
+ * Get the Rx reference to the available capabilities for a given interface.
230
+ * Primarily useful for deriving other Rx values based on the capability or
231
+ * for subscribing to changes in the capability.
232
+ * @returns An Rx reference to the available capability.
233
+ * @throws If no capability is found.
234
+ */
235
+ capability(interfaceDef) {
236
+ return this._capability(interfaceDef.identifier);
237
+ }
238
+ /**
239
+ * Get capabilities from the plugin context.
198
240
  * @returns An array of capabilities.
199
- * @reactive
200
241
  */
201
- requestCapabilities(interfaceDef, filter) {
202
- let current = this._definedCapabilities.get(interfaceDef.identifier);
203
- if (!current) {
204
- const object = live({
205
- value: []
206
- });
207
- current = untracked(() => object.value);
208
- this._definedCapabilities.set(interfaceDef.identifier, current);
209
- }
210
- const capabilities = filter ? current.filter((c) => filter(c.implementation, c.moduleId)) : current;
211
- return capabilities.map((c) => c.implementation);
242
+ getCapabilities(interfaceDef) {
243
+ return this._registry.get(this.capabilities(interfaceDef));
212
244
  }
213
245
  /**
214
246
  * Requests a single capability from the plugin context.
215
247
  * @returns The capability.
216
248
  * @throws If no capability is found.
217
- * @reactive
218
249
  */
219
- requestCapability(interfaceDef, filter) {
220
- const capability = this.requestCapabilities(interfaceDef, filter)[0];
221
- invariant(capability, `No capability found for ${interfaceDef.identifier}`, {
222
- F: __dxlog_file,
223
- L: 203,
224
- S: this,
225
- A: [
226
- "capability",
227
- "`No capability found for ${interfaceDef.identifier}`"
228
- ]
229
- });
230
- return capability;
250
+ getCapability(interfaceDef) {
251
+ return this._registry.get(this.capability(interfaceDef));
231
252
  }
232
253
  /**
233
- * Waits for a capability to be contributed.
254
+ * Waits for a capability to be available.
234
255
  * @returns The capability.
235
256
  */
236
- async waitForCapability(interfaceDef, filter) {
257
+ async waitForCapability(interfaceDef) {
258
+ const [capability] = this.getCapabilities(interfaceDef);
259
+ if (capability) {
260
+ return capability;
261
+ }
237
262
  const trigger = new Trigger();
238
- const unsubscribe = effect(() => {
239
- const capabilities = this.requestCapabilities(interfaceDef, filter);
240
- if (capabilities[0]) {
263
+ const cancel = this._registry.subscribe(this.capabilities(interfaceDef), (capabilities) => {
264
+ if (capabilities.length > 0) {
241
265
  trigger.wake(capabilities[0]);
242
266
  }
243
267
  });
244
- const capability = await trigger.wait();
245
- unsubscribe();
246
- return capability;
268
+ const result = await trigger.wait();
269
+ cancel();
270
+ return result;
247
271
  }
248
272
  async activatePromise(event) {
249
273
  return this.activate(event).pipe(Effect.runPromise);
@@ -276,25 +300,28 @@ var getEvents = (events) => "type" in events ? events.events : [
276
300
  ];
277
301
 
278
302
  // packages/sdk/app-framework/src/core/manager.ts
279
- import { untracked as untracked2 } from "@preact/signals-core";
303
+ import { Registry } from "@effect-rx/rx-react";
304
+ import { untracked } from "@preact/signals-core";
280
305
  import { Array as A, Effect as Effect2, Either, Match, pipe } from "effect";
281
306
  import { Event } from "@dxos/async";
282
- import { live as live2 } from "@dxos/live-object";
307
+ import { live } from "@dxos/live-object";
283
308
  import { log as log2 } from "@dxos/log";
284
309
  var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/sdk/app-framework/src/core/manager.ts";
285
310
  var isPromise = (value) => {
286
311
  return value !== null && typeof value === "object" && "then" in value;
287
312
  };
288
313
  var PluginManager = class {
289
- constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [] }) {
314
+ constructor({ pluginLoader, plugins = [], core = plugins.map(({ meta }) => meta.id), enabled = [], registry }) {
290
315
  this.activation = new Event();
291
- this.context = new PluginsContext({
316
+ this._capabilities = /* @__PURE__ */ new Map();
317
+ this.registry = registry ?? Registry.make();
318
+ this.context = new PluginContext({
319
+ registry: this.registry,
292
320
  activate: (event) => this._activate(event),
293
321
  reset: (id) => this._reset(id)
294
322
  });
295
- this._capabilities = /* @__PURE__ */ new Map();
296
323
  this._pluginLoader = pluginLoader;
297
- this._state = live2({
324
+ this._state = live({
298
325
  plugins,
299
326
  core,
300
327
  enabled,
@@ -368,12 +395,12 @@ var PluginManager = class {
368
395
  * @param id The id of the plugin.
369
396
  */
370
397
  async add(id) {
371
- return untracked2(async () => {
398
+ return untracked(async () => {
372
399
  log2("add plugin", {
373
400
  id
374
401
  }, {
375
402
  F: __dxlog_file2,
376
- L: 146,
403
+ L: 154,
377
404
  S: this,
378
405
  C: (f, a) => f(...a)
379
406
  });
@@ -387,12 +414,12 @@ var PluginManager = class {
387
414
  * @param id The id of the plugin.
388
415
  */
389
416
  enable(id) {
390
- return untracked2(async () => {
417
+ return untracked(async () => {
391
418
  log2("enable plugin", {
392
419
  id
393
420
  }, {
394
421
  F: __dxlog_file2,
395
- L: 159,
422
+ L: 167,
396
423
  S: this,
397
424
  C: (f, a) => f(...a)
398
425
  });
@@ -413,7 +440,7 @@ var PluginManager = class {
413
440
  ]
414
441
  }, {
415
442
  F: __dxlog_file2,
416
- L: 174,
443
+ L: 182,
417
444
  S: this,
418
445
  C: (f, a) => f(...a)
419
446
  });
@@ -428,12 +455,12 @@ var PluginManager = class {
428
455
  * @param id The id of the plugin.
429
456
  */
430
457
  remove(id) {
431
- return untracked2(() => {
458
+ return untracked(() => {
432
459
  log2("remove plugin", {
433
460
  id
434
461
  }, {
435
462
  F: __dxlog_file2,
436
- L: 192,
463
+ L: 200,
437
464
  S: this,
438
465
  C: (f, a) => f(...a)
439
466
  });
@@ -450,12 +477,12 @@ var PluginManager = class {
450
477
  * @param id The id of the plugin.
451
478
  */
452
479
  disable(id) {
453
- return untracked2(async () => {
480
+ return untracked(async () => {
454
481
  log2("disable plugin", {
455
482
  id
456
483
  }, {
457
484
  F: __dxlog_file2,
458
- L: 209,
485
+ L: 217,
459
486
  S: this,
460
487
  C: (f, a) => f(...a)
461
488
  });
@@ -483,7 +510,7 @@ var PluginManager = class {
483
510
  * @returns Whether the activation was successful.
484
511
  */
485
512
  activate(event) {
486
- return untracked2(() => Effect2.runPromise(this._activate(event)));
513
+ return untracked(() => Effect2.runPromise(this._activate(event)));
487
514
  }
488
515
  /**
489
516
  * Deactivates all of the modules for a plugin.
@@ -491,7 +518,7 @@ var PluginManager = class {
491
518
  * @returns Whether the deactivation was successful.
492
519
  */
493
520
  deactivate(id) {
494
- return untracked2(() => Effect2.runPromise(this._deactivate(id)));
521
+ return untracked(() => Effect2.runPromise(this._deactivate(id)));
495
522
  }
496
523
  /**
497
524
  * Re-activates the modules that were activated by the event.
@@ -499,15 +526,15 @@ var PluginManager = class {
499
526
  * @returns Whether the reset was successful.
500
527
  */
501
528
  reset(event) {
502
- return untracked2(() => Effect2.runPromise(this._reset(event)));
529
+ return untracked(() => Effect2.runPromise(this._reset(event)));
503
530
  }
504
531
  _addPlugin(plugin) {
505
- untracked2(() => {
532
+ untracked(() => {
506
533
  log2("add plugin", {
507
534
  id: plugin.meta.id
508
535
  }, {
509
536
  F: __dxlog_file2,
510
- L: 262,
537
+ L: 270,
511
538
  S: this,
512
539
  C: (f, a) => f(...a)
513
540
  });
@@ -517,12 +544,12 @@ var PluginManager = class {
517
544
  });
518
545
  }
519
546
  _removePlugin(id) {
520
- untracked2(() => {
547
+ untracked(() => {
521
548
  log2("remove plugin", {
522
549
  id
523
550
  }, {
524
551
  F: __dxlog_file2,
525
- L: 271,
552
+ L: 279,
526
553
  S: this,
527
554
  C: (f, a) => f(...a)
528
555
  });
@@ -533,12 +560,12 @@ var PluginManager = class {
533
560
  });
534
561
  }
535
562
  _addModule(module) {
536
- untracked2(() => {
563
+ untracked(() => {
537
564
  log2("add module", {
538
565
  id: module.id
539
566
  }, {
540
567
  F: __dxlog_file2,
541
- L: 281,
568
+ L: 289,
542
569
  S: this,
543
570
  C: (f, a) => f(...a)
544
571
  });
@@ -548,12 +575,12 @@ var PluginManager = class {
548
575
  });
549
576
  }
550
577
  _removeModule(id) {
551
- untracked2(() => {
578
+ untracked(() => {
552
579
  log2("remove module", {
553
580
  id
554
581
  }, {
555
582
  F: __dxlog_file2,
556
- L: 290,
583
+ L: 298,
557
584
  S: this,
558
585
  C: (f, a) => f(...a)
559
586
  });
@@ -579,7 +606,7 @@ var PluginManager = class {
579
606
  return this._getInactiveModules().filter((module) => getEvents(module.activatesOn).map(eventKey).includes(key));
580
607
  }
581
608
  _setPendingResetByModule(module) {
582
- return untracked2(() => {
609
+ return untracked(() => {
583
610
  const activationEvents = getEvents(module.activatesOn).map(eventKey).filter((key) => this._state.eventsFired.includes(key));
584
611
  const pendingReset = Array.from(new Set(activationEvents)).filter((event) => !this._state.pendingReset.includes(event));
585
612
  if (pendingReset.length > 0) {
@@ -587,7 +614,7 @@ var PluginManager = class {
587
614
  events: pendingReset
588
615
  }, {
589
616
  F: __dxlog_file2,
590
- L: 328,
617
+ L: 336,
591
618
  S: this,
592
619
  C: (f, a) => f(...a)
593
620
  });
@@ -606,7 +633,7 @@ var PluginManager = class {
606
633
  key
607
634
  }, {
608
635
  F: __dxlog_file2,
609
- L: 341,
636
+ L: 349,
610
637
  S: this,
611
638
  C: (f, a) => f(...a)
612
639
  });
@@ -627,7 +654,7 @@ var PluginManager = class {
627
654
  key
628
655
  }, {
629
656
  F: __dxlog_file2,
630
- L: 357,
657
+ L: 365,
631
658
  S: this,
632
659
  C: (f, a) => f(...a)
633
660
  });
@@ -641,7 +668,7 @@ var PluginManager = class {
641
668
  modules: modules.map((module) => module.id)
642
669
  }, {
643
670
  F: __dxlog_file2,
644
- L: 364,
671
+ L: 372,
645
672
  S: this,
646
673
  C: (f, a) => f(...a)
647
674
  });
@@ -683,7 +710,7 @@ var PluginManager = class {
683
710
  key
684
711
  }, {
685
712
  F: __dxlog_file2,
686
- L: 398,
713
+ L: 406,
687
714
  S: this,
688
715
  C: (f, a) => f(...a)
689
716
  });
@@ -699,7 +726,7 @@ var PluginManager = class {
699
726
  module: module.id
700
727
  }, {
701
728
  F: __dxlog_file2,
702
- L: 413,
729
+ L: 421,
703
730
  S: this,
704
731
  C: (f, a) => f(...a)
705
732
  });
@@ -728,7 +755,7 @@ var PluginManager = class {
728
755
  module: module.id
729
756
  }, {
730
757
  F: __dxlog_file2,
731
- L: 436,
758
+ L: 444,
732
759
  S: this,
733
760
  C: (f, a) => f(...a)
734
761
  });
@@ -757,7 +784,7 @@ var PluginManager = class {
757
784
  id
758
785
  }, {
759
786
  F: __dxlog_file2,
760
- L: 463,
787
+ L: 471,
761
788
  S: this,
762
789
  C: (f, a) => f(...a)
763
790
  });
@@ -766,7 +793,7 @@ var PluginManager = class {
766
793
  for (const capability of capabilities) {
767
794
  this.context.removeCapability(capability.interface, capability.implementation);
768
795
  const program = capability.deactivate?.();
769
- yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect2) => effect2), Match.when(isPromise, (promise) => Effect2.tryPromise({
796
+ yield* Match.value(program).pipe(Match.when(Effect2.isEffect, (effect) => effect), Match.when(isPromise, (promise) => Effect2.tryPromise({
770
797
  try: () => promise,
771
798
  catch: (error) => error
772
799
  })), Match.orElse((program2) => Effect2.succeed(program2)));
@@ -781,7 +808,7 @@ var PluginManager = class {
781
808
  id
782
809
  }, {
783
810
  F: __dxlog_file2,
784
- L: 489,
811
+ L: 497,
785
812
  S: this,
786
813
  C: (f, a) => f(...a)
787
814
  });
@@ -795,7 +822,7 @@ var PluginManager = class {
795
822
  key
796
823
  }, {
797
824
  F: __dxlog_file2,
798
- L: 497,
825
+ L: 505,
799
826
  S: this,
800
827
  C: (f, a) => f(...a)
801
828
  });
@@ -838,6 +865,7 @@ var Capabilities;
838
865
  (function(Capabilities2) {
839
866
  Capabilities2.PluginManager = defineCapability("dxos.org/app-framework/capability/plugin-manager");
840
867
  Capabilities2.Null = defineCapability("dxos.org/app-framework/capability/null");
868
+ Capabilities2.RxRegistry = defineCapability("dxos.org/app-framework/capability/rx-registry");
841
869
  Capabilities2.ReactContext = defineCapability("dxos.org/app-framework/capability/react-context");
842
870
  Capabilities2.ReactRoot = defineCapability("dxos.org/app-framework/capability/react-root");
843
871
  Capabilities2.ReactSurface = defineCapability("dxos.org/app-framework/common/react-surface");
@@ -857,20 +885,21 @@ var Capabilities;
857
885
  })(Capabilities || (Capabilities = {}));
858
886
 
859
887
  // packages/sdk/app-framework/src/common/collaboration.ts
860
- import { SchemaAST as AST, Schema as S3 } from "effect";
861
- import { Expando, Ref, SpaceIdSchema } from "@dxos/echo-schema";
888
+ import { Schema as Schema3, SchemaAST } from "effect";
889
+ import { Expando, Ref } from "@dxos/echo-schema";
890
+ import { SpaceId } from "@dxos/keys";
862
891
  var CollaborationActions;
863
892
  (function(CollaborationActions2) {
864
- class InsertContent extends S3.TaggedClass()("assistant/intent-content", {
865
- input: S3.Struct({
866
- spaceId: SpaceIdSchema,
893
+ class InsertContent extends Schema3.TaggedClass()("assistant/intent-content", {
894
+ input: Schema3.Struct({
895
+ spaceId: SpaceId,
867
896
  target: Ref(Expando),
868
897
  object: Ref(Expando),
869
- label: S3.String.pipe(S3.optional)
898
+ label: Schema3.String.pipe(Schema3.optional)
870
899
  }).annotations({
871
- [AST.DescriptionAnnotationId]: "Enables plugins to inject content blocks or references into a related entity."
900
+ [SchemaAST.DescriptionAnnotationId]: "Enables plugins to inject content blocks or references into a related entity."
872
901
  }),
873
- output: S3.Void
902
+ output: Schema3.Void
874
903
  }) {
875
904
  }
876
905
  CollaborationActions2.InsertContent = InsertContent;
@@ -895,7 +924,7 @@ var Events;
895
924
  })(Events || (Events = {}));
896
925
 
897
926
  // packages/sdk/app-framework/src/common/file.ts
898
- import { Schema as S4 } from "effect";
927
+ import { Schema as Schema4 } from "effect";
899
928
  var defaultFileTypes = {
900
929
  images: [
901
930
  "png",
@@ -915,15 +944,15 @@ var defaultFileTypes = {
915
944
  "md"
916
945
  ]
917
946
  };
918
- var FileInfoSchema = S4.Struct({
919
- name: S4.String,
920
- type: S4.String,
921
- url: S4.optional(S4.String),
922
- cid: S4.optional(S4.String)
947
+ var FileInfoSchema = Schema4.Struct({
948
+ name: Schema4.String,
949
+ type: Schema4.String,
950
+ url: Schema4.optional(Schema4.String),
951
+ cid: Schema4.optional(Schema4.String)
923
952
  });
924
953
 
925
954
  // packages/sdk/app-framework/src/common/layout.ts
926
- import { Schema as S5 } from "effect";
955
+ import { Schema as Schema5 } from "effect";
927
956
 
928
957
  // packages/sdk/app-framework/src/plugin-intent/IntentPlugin.tsx
929
958
  var IntentPlugin = () => definePlugin({
@@ -939,7 +968,7 @@ var IntentPlugin = () => definePlugin({
939
968
  activatesAfter: [
940
969
  Events.DispatcherReady
941
970
  ],
942
- activate: lazy(() => import("./intent-dispatcher-QDUGA7NT.mjs"))
971
+ activate: lazy(() => import("./intent-dispatcher-ZUSNX2OY.mjs"))
943
972
  })
944
973
  ]);
945
974
 
@@ -949,323 +978,323 @@ var LAYOUT_ACTION = `${LAYOUT_PLUGIN}/action`;
949
978
  var LayoutAction;
950
979
  (function(LayoutAction2) {
951
980
  LayoutAction2.UPDATE_LAYOUT = `${LAYOUT_ACTION}/update-layout`;
952
- class UpdateLayout extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
953
- input: S5.Struct({
954
- part: S5.String.annotations({
981
+ class UpdateLayout extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
982
+ input: Schema5.Struct({
983
+ part: Schema5.String.annotations({
955
984
  description: "The part of the layout to mutate."
956
985
  }),
957
- subject: S5.optional(S5.Any.annotations({
986
+ subject: Schema5.optional(Schema5.Any.annotations({
958
987
  description: "The subject of the layout update."
959
988
  })),
960
- options: S5.optional(S5.Record({
961
- key: S5.String,
962
- value: S5.Any
989
+ options: Schema5.optional(Schema5.Record({
990
+ key: Schema5.String,
991
+ value: Schema5.Any
963
992
  }).annotations({
964
993
  description: "Additional options for the layout action."
965
994
  }))
966
995
  }),
967
- output: S5.Void
996
+ output: Schema5.Void
968
997
  }) {
969
998
  }
970
999
  LayoutAction2.UpdateLayout = UpdateLayout;
971
- class SetLayoutMode extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
972
- input: S5.Struct({
973
- part: S5.Literal("mode").annotations({
1000
+ class SetLayoutMode extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1001
+ input: Schema5.Struct({
1002
+ part: Schema5.Literal("mode").annotations({
974
1003
  description: "Setting the layout mode."
975
1004
  }),
976
- subject: S5.optional(S5.String.annotations({
1005
+ subject: Schema5.optional(Schema5.String.annotations({
977
1006
  description: "Item which is the subject of the new layout mode."
978
1007
  })),
979
- options: S5.Union(S5.Struct({
980
- mode: S5.String.annotations({
1008
+ options: Schema5.Union(Schema5.Struct({
1009
+ mode: Schema5.String.annotations({
981
1010
  description: "The new layout mode."
982
1011
  })
983
- }), S5.Struct({
984
- revert: S5.Boolean.annotations({
1012
+ }), Schema5.Struct({
1013
+ revert: Schema5.Boolean.annotations({
985
1014
  description: "Revert to the previous layout mode."
986
1015
  })
987
1016
  }))
988
1017
  }),
989
- output: S5.Void
1018
+ output: Schema5.Void
990
1019
  }) {
991
1020
  }
992
1021
  LayoutAction2.SetLayoutMode = SetLayoutMode;
993
- class UpdateSidebar extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
994
- input: S5.Struct({
995
- part: S5.Literal("sidebar").annotations({
1022
+ class UpdateSidebar extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1023
+ input: Schema5.Struct({
1024
+ part: Schema5.Literal("sidebar").annotations({
996
1025
  description: "Updating the sidebar."
997
1026
  }),
998
- subject: S5.optional(S5.String.annotations({
1027
+ subject: Schema5.optional(Schema5.String.annotations({
999
1028
  description: "URI of the component to display in the sidebar."
1000
1029
  })),
1001
- options: S5.optional(S5.Struct({
1002
- state: S5.Literal("closed", "collapsed", "expanded").annotations({
1030
+ options: Schema5.optional(Schema5.Struct({
1031
+ state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
1003
1032
  description: "Whether the sidebar is closed, collapsed, or expanded."
1004
1033
  })
1005
1034
  }))
1006
1035
  }),
1007
- output: S5.Void
1036
+ output: Schema5.Void
1008
1037
  }) {
1009
1038
  }
1010
1039
  LayoutAction2.UpdateSidebar = UpdateSidebar;
1011
- class UpdateComplementary extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1012
- input: S5.Struct({
1013
- part: S5.Literal("complementary").annotations({
1040
+ class UpdateComplementary extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1041
+ input: Schema5.Struct({
1042
+ part: Schema5.Literal("complementary").annotations({
1014
1043
  description: "Updating the complementary sidebar."
1015
1044
  }),
1016
- subject: S5.optional(S5.String.annotations({
1045
+ subject: Schema5.optional(Schema5.String.annotations({
1017
1046
  description: "URI of the component to display in the complementary area."
1018
1047
  })),
1019
- options: S5.optional(S5.Struct({
1020
- state: S5.Literal("closed", "collapsed", "expanded").annotations({
1048
+ options: Schema5.optional(Schema5.Struct({
1049
+ state: Schema5.Literal("closed", "collapsed", "expanded").annotations({
1021
1050
  description: "Whether the complementary sidebar is closed, collapsed, or expanded."
1022
1051
  })
1023
1052
  }))
1024
1053
  }),
1025
- output: S5.Void
1054
+ output: Schema5.Void
1026
1055
  }) {
1027
1056
  }
1028
1057
  LayoutAction2.UpdateComplementary = UpdateComplementary;
1029
- class UpdateDialog extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1030
- input: S5.Struct({
1031
- part: S5.Literal("dialog").annotations({
1058
+ class UpdateDialog extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1059
+ input: Schema5.Struct({
1060
+ part: Schema5.Literal("dialog").annotations({
1032
1061
  description: "Updating the dialog."
1033
1062
  }),
1034
- subject: S5.optional(S5.String.annotations({
1063
+ subject: Schema5.optional(Schema5.String.annotations({
1035
1064
  description: "URI of the component to display in the dialog."
1036
1065
  })),
1037
- options: S5.Struct({
1038
- state: S5.optional(S5.Boolean.annotations({
1066
+ options: Schema5.Struct({
1067
+ state: Schema5.optional(Schema5.Boolean.annotations({
1039
1068
  description: "Whether the dialog is open or closed."
1040
1069
  })),
1041
- blockAlign: S5.optional(S5.Literal("start", "center", "end").annotations({
1070
+ blockAlign: Schema5.optional(Schema5.Literal("start", "center", "end").annotations({
1042
1071
  description: "The alignment of the dialog."
1043
1072
  })),
1044
- type: S5.optional(S5.Literal("default", "alert").annotations({
1073
+ type: Schema5.optional(Schema5.Literal("default", "alert").annotations({
1045
1074
  description: "The type of dialog."
1046
1075
  })),
1047
- props: S5.optional(S5.Record({
1048
- key: S5.String,
1049
- value: S5.Any
1076
+ props: Schema5.optional(Schema5.Record({
1077
+ key: Schema5.String,
1078
+ value: Schema5.Any
1050
1079
  }).annotations({
1051
1080
  description: "Additional props for the dialog."
1052
1081
  }))
1053
1082
  })
1054
1083
  }),
1055
- output: S5.Void
1084
+ output: Schema5.Void
1056
1085
  }) {
1057
1086
  }
1058
1087
  LayoutAction2.UpdateDialog = UpdateDialog;
1059
- class UpdatePopover extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1060
- input: S5.Struct({
1061
- part: S5.Literal("popover").annotations({
1088
+ class UpdatePopover extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1089
+ input: Schema5.Struct({
1090
+ part: Schema5.Literal("popover").annotations({
1062
1091
  description: "Updating the popover."
1063
1092
  }),
1064
- subject: S5.optional(S5.Any.annotations({
1093
+ subject: Schema5.optional(Schema5.Any.annotations({
1065
1094
  description: "URI of the component to display in the popover or data to pass to the popover."
1066
1095
  })),
1067
- options: S5.Struct({
1068
- side: S5.optional(S5.Literal("top", "right", "bottom", "left").annotations({
1096
+ options: Schema5.Struct({
1097
+ side: Schema5.optional(Schema5.Literal("top", "right", "bottom", "left").annotations({
1069
1098
  description: "The side of the anchor."
1070
1099
  })),
1071
- state: S5.optional(S5.Boolean.annotations({
1100
+ state: Schema5.optional(Schema5.Boolean.annotations({
1072
1101
  description: "Whether the popover is open or closed."
1073
1102
  })),
1074
- props: S5.optional(S5.Record({
1075
- key: S5.String,
1076
- value: S5.Any
1103
+ props: Schema5.optional(Schema5.Record({
1104
+ key: Schema5.String,
1105
+ value: Schema5.Any
1077
1106
  }).annotations({
1078
1107
  description: "Additional props for the popover."
1079
1108
  }))
1080
- }).pipe(S5.extend(S5.Union(S5.Struct({
1081
- variant: S5.Literal("virtual"),
1082
- anchor: S5.Any.annotations({
1109
+ }).pipe(Schema5.extend(Schema5.Union(Schema5.Struct({
1110
+ variant: Schema5.Literal("virtual"),
1111
+ anchor: Schema5.Any.annotations({
1083
1112
  description: "The DOM element to anchor the popover to."
1084
1113
  })
1085
- }), S5.Struct({
1086
- variant: S5.optional(S5.Literal("react")),
1087
- anchorId: S5.String.annotations({
1114
+ }), Schema5.Struct({
1115
+ variant: Schema5.optional(Schema5.Literal("react")),
1116
+ anchorId: Schema5.String.annotations({
1088
1117
  description: "An id that can be used to determine whether to render the anchor subcomponent."
1089
1118
  })
1090
1119
  }))))
1091
1120
  }),
1092
- output: S5.Void
1121
+ output: Schema5.Void
1093
1122
  }) {
1094
1123
  }
1095
1124
  LayoutAction2.UpdatePopover = UpdatePopover;
1096
- LayoutAction2.Toast = S5.Struct({
1097
- id: S5.String.annotations({
1125
+ LayoutAction2.Toast = Schema5.Struct({
1126
+ id: Schema5.String.annotations({
1098
1127
  description: "The id of the toast."
1099
1128
  }),
1100
- title: S5.optional(Label.annotations({
1129
+ title: Schema5.optional(Label.annotations({
1101
1130
  description: "The title of the toast."
1102
1131
  })),
1103
- description: S5.optional(Label.annotations({
1132
+ description: Schema5.optional(Label.annotations({
1104
1133
  description: "The description of the toast."
1105
1134
  })),
1106
- icon: S5.optional(S5.String.annotations({
1135
+ icon: Schema5.optional(Schema5.String.annotations({
1107
1136
  description: "The icon of the toast."
1108
1137
  })),
1109
- duration: S5.optional(S5.Number.annotations({
1138
+ duration: Schema5.optional(Schema5.Number.annotations({
1110
1139
  description: "The duration of the toast."
1111
1140
  })),
1112
- closeLabel: S5.optional(Label.annotations({
1141
+ closeLabel: Schema5.optional(Label.annotations({
1113
1142
  description: "The label of the close button."
1114
1143
  })),
1115
- actionLabel: S5.optional(Label.annotations({
1144
+ actionLabel: Schema5.optional(Label.annotations({
1116
1145
  description: "The label of the action button."
1117
1146
  })),
1118
- actionAlt: S5.optional(Label.annotations({
1147
+ actionAlt: Schema5.optional(Label.annotations({
1119
1148
  description: "The alt text of the action button."
1120
1149
  })),
1121
- onAction: S5.optional(S5.Any.annotations({
1150
+ onAction: Schema5.optional(Schema5.Any.annotations({
1122
1151
  description: "The action to perform when the action button is clicked."
1123
1152
  }))
1124
1153
  });
1125
- class AddToast extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1126
- input: S5.Struct({
1127
- part: S5.Literal("toast").annotations({
1154
+ class AddToast extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1155
+ input: Schema5.Struct({
1156
+ part: Schema5.Literal("toast").annotations({
1128
1157
  description: "Adding a toast."
1129
1158
  }),
1130
1159
  subject: LayoutAction2.Toast.annotations({
1131
1160
  description: "The toast to add."
1132
1161
  })
1133
1162
  }),
1134
- output: S5.Void
1163
+ output: Schema5.Void
1135
1164
  }) {
1136
1165
  }
1137
1166
  LayoutAction2.AddToast = AddToast;
1138
- class SwitchWorkspace extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1139
- input: S5.Struct({
1140
- part: S5.Literal("workspace").annotations({
1167
+ class SwitchWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1168
+ input: Schema5.Struct({
1169
+ part: Schema5.Literal("workspace").annotations({
1141
1170
  description: "Switching the workspace."
1142
1171
  }),
1143
- subject: S5.String.annotations({
1172
+ subject: Schema5.String.annotations({
1144
1173
  description: "The id of the workspace to switch to."
1145
1174
  })
1146
1175
  }),
1147
- output: S5.Void
1176
+ output: Schema5.Void
1148
1177
  }) {
1149
1178
  }
1150
1179
  LayoutAction2.SwitchWorkspace = SwitchWorkspace;
1151
- class RevertWorkspace extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1152
- input: S5.Struct({
1153
- part: S5.Literal("workspace").annotations({
1180
+ class RevertWorkspace extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1181
+ input: Schema5.Struct({
1182
+ part: Schema5.Literal("workspace").annotations({
1154
1183
  description: "Switching the workspace."
1155
1184
  }),
1156
- options: S5.Struct({
1157
- revert: S5.Literal(true).annotations({
1185
+ options: Schema5.Struct({
1186
+ revert: Schema5.Literal(true).annotations({
1158
1187
  description: "Revert to the previous workspace."
1159
1188
  })
1160
1189
  })
1161
1190
  }),
1162
- output: S5.Void
1191
+ output: Schema5.Void
1163
1192
  }) {
1164
1193
  }
1165
1194
  LayoutAction2.RevertWorkspace = RevertWorkspace;
1166
- class Open extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1167
- input: S5.Struct({
1168
- part: S5.Literal("main").annotations({
1195
+ class Open extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1196
+ input: Schema5.Struct({
1197
+ part: Schema5.Literal("main").annotations({
1169
1198
  description: "Opening an item in the main content area."
1170
1199
  }),
1171
- subject: S5.Array(S5.String.annotations({
1200
+ subject: Schema5.Array(Schema5.String.annotations({
1172
1201
  description: "Ids of the items to open."
1173
1202
  })),
1174
- options: S5.optional(S5.Struct({
1175
- state: S5.optional(S5.Literal(true).annotations({
1203
+ options: Schema5.optional(Schema5.Struct({
1204
+ state: Schema5.optional(Schema5.Literal(true).annotations({
1176
1205
  description: "The items are being added."
1177
1206
  })),
1178
- variant: S5.optional(S5.String.annotations({
1207
+ variant: Schema5.optional(Schema5.String.annotations({
1179
1208
  description: "The variant of the item to open."
1180
1209
  })),
1181
- key: S5.optional(S5.String.annotations({
1210
+ key: Schema5.optional(Schema5.String.annotations({
1182
1211
  description: "If provided, will replace item with a matching key (id prefix)."
1183
1212
  })),
1184
- workspace: S5.optional(S5.String.annotations({
1213
+ workspace: Schema5.optional(Schema5.String.annotations({
1185
1214
  description: "The workspace to open the items in."
1186
1215
  })),
1187
- scrollIntoView: S5.optional(S5.Boolean.annotations({
1216
+ scrollIntoView: Schema5.optional(Schema5.Boolean.annotations({
1188
1217
  description: "Scroll the items into view."
1189
1218
  })),
1190
- pivotId: S5.optional(S5.String.annotations({
1219
+ pivotId: Schema5.optional(Schema5.String.annotations({
1191
1220
  description: "The id of the item to place new items next to."
1192
1221
  })),
1193
- positioning: S5.optional(S5.Union(S5.Literal("start").annotations({
1222
+ positioning: Schema5.optional(Schema5.Union(Schema5.Literal("start").annotations({
1194
1223
  description: "The items are being added before the pivot item."
1195
- }), S5.Literal("end").annotations({
1224
+ }), Schema5.Literal("end").annotations({
1196
1225
  description: "The items are being added after the pivot item."
1197
1226
  })))
1198
1227
  }))
1199
1228
  }),
1200
- output: S5.Void
1229
+ output: Schema5.Void
1201
1230
  }) {
1202
1231
  }
1203
1232
  LayoutAction2.Open = Open;
1204
- class Set2 extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1205
- input: S5.Struct({
1206
- part: S5.Literal("main").annotations({
1233
+ class Set2 extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1234
+ input: Schema5.Struct({
1235
+ part: Schema5.Literal("main").annotations({
1207
1236
  description: "Setting items in the main content area."
1208
1237
  }),
1209
- subject: S5.Array(S5.String.annotations({
1238
+ subject: Schema5.Array(Schema5.String.annotations({
1210
1239
  description: "Ids of the items to set."
1211
1240
  })),
1212
- options: S5.Struct({
1213
- override: S5.Literal(true).annotations({
1241
+ options: Schema5.Struct({
1242
+ override: Schema5.Literal(true).annotations({
1214
1243
  description: "Override the current items in the main content area."
1215
1244
  })
1216
1245
  })
1217
1246
  }),
1218
- output: S5.Void
1247
+ output: Schema5.Void
1219
1248
  }) {
1220
1249
  }
1221
1250
  LayoutAction2.Set = Set2;
1222
- class Close extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1223
- input: S5.Struct({
1224
- part: S5.Literal("main").annotations({
1251
+ class Close extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1252
+ input: Schema5.Struct({
1253
+ part: Schema5.Literal("main").annotations({
1225
1254
  description: "Closing items in the main content area."
1226
1255
  }),
1227
- subject: S5.Array(S5.String.annotations({
1256
+ subject: Schema5.Array(Schema5.String.annotations({
1228
1257
  description: "Ids of the items to close."
1229
1258
  })),
1230
- options: S5.Struct({
1231
- state: S5.Literal(false).annotations({
1259
+ options: Schema5.Struct({
1260
+ state: Schema5.Literal(false).annotations({
1232
1261
  description: "The items are being removed."
1233
1262
  })
1234
1263
  })
1235
1264
  }),
1236
- output: S5.Void
1265
+ output: Schema5.Void
1237
1266
  }) {
1238
1267
  }
1239
1268
  LayoutAction2.Close = Close;
1240
- class ScrollIntoView extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1241
- input: S5.Struct({
1242
- part: S5.Literal("current").annotations({
1269
+ class ScrollIntoView extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1270
+ input: Schema5.Struct({
1271
+ part: Schema5.Literal("current").annotations({
1243
1272
  description: "Setting the current item"
1244
1273
  }),
1245
- subject: S5.optional(S5.String.annotations({
1274
+ subject: Schema5.optional(Schema5.String.annotations({
1246
1275
  description: "The id of the item to set as current."
1247
1276
  })),
1248
- options: S5.optional(S5.Record({
1249
- key: S5.String,
1250
- value: S5.Any
1277
+ options: Schema5.optional(Schema5.Record({
1278
+ key: Schema5.String,
1279
+ value: Schema5.Any
1251
1280
  }).annotations({
1252
1281
  description: "Additional options for the scroll into view."
1253
1282
  }))
1254
1283
  }),
1255
- output: S5.Void
1284
+ output: Schema5.Void
1256
1285
  }) {
1257
1286
  }
1258
1287
  LayoutAction2.ScrollIntoView = ScrollIntoView;
1259
- class Expose extends S5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1260
- input: S5.Struct({
1261
- part: S5.Literal("navigation").annotations({
1288
+ class Expose extends Schema5.TaggedClass()(LayoutAction2.UPDATE_LAYOUT, {
1289
+ input: Schema5.Struct({
1290
+ part: Schema5.Literal("navigation").annotations({
1262
1291
  description: "Exposing an item in the navigation area."
1263
1292
  }),
1264
- subject: S5.String.annotations({
1293
+ subject: Schema5.String.annotations({
1265
1294
  description: "The id of the item to expose."
1266
1295
  })
1267
1296
  }),
1268
- output: S5.Void
1297
+ output: Schema5.Void
1269
1298
  }) {
1270
1299
  }
1271
1300
  LayoutAction2.Expose = Expose;
@@ -1275,17 +1304,17 @@ var LayoutAction;
1275
1304
  var createSurface = (definition) => definition;
1276
1305
 
1277
1306
  // packages/sdk/app-framework/src/common/translations.ts
1278
- import { Schema as S6 } from "effect";
1279
- var ResourceKey = S6.Union(S6.String, S6.Record({
1280
- key: S6.String,
1281
- value: S6.Any
1307
+ import { Schema as Schema6 } from "effect";
1308
+ var ResourceKey = Schema6.Union(Schema6.String, Schema6.Record({
1309
+ key: Schema6.String,
1310
+ value: Schema6.Any
1282
1311
  }));
1283
- var ResourceLanguage = S6.Record({
1284
- key: S6.String,
1312
+ var ResourceLanguage = Schema6.Record({
1313
+ key: Schema6.String,
1285
1314
  value: ResourceKey
1286
1315
  });
1287
- var Resource = S6.Record({
1288
- key: S6.String,
1316
+ var Resource = Schema6.Record({
1317
+ key: Schema6.String,
1289
1318
  value: ResourceLanguage
1290
1319
  });
1291
1320
 
@@ -1298,12 +1327,12 @@ var isUndoable = (historyEntry) => historyEntry.length > 0 && historyEntry.every
1298
1327
  var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, historyLimit = HISTORY_LIMIT } = {}) => {
1299
1328
  const historyRef = Effect3.runSync(Ref2.make([]));
1300
1329
  const handleIntent = (intent) => Effect3.gen(function* () {
1301
- const candidates = getResolvers(intent.module).filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1330
+ const candidates = getResolvers().filter((resolver) => resolver.intent._tag === intent.id).filter((resolver) => !resolver.filter || resolver.filter(intent.data)).toSorted(byPosition);
1302
1331
  if (candidates.length === 0) {
1303
1332
  yield* Effect3.fail(new NoResolversError(intent.id));
1304
1333
  }
1305
- const effect2 = candidates[0].resolve(intent.data, intent.undo ?? false);
1306
- const result = Effect3.isEffect(effect2) ? yield* effect2 : yield* Effect3.promise(async () => effect2);
1334
+ const effect = candidates[0].resolve(intent.data, intent.undo ?? false);
1335
+ const result = Effect3.isEffect(effect) ? yield* effect : yield* Effect3.promise(async () => effect);
1307
1336
  return {
1308
1337
  _intent: intent,
1309
1338
  ...result
@@ -1417,16 +1446,14 @@ var createDispatcher = (getResolvers, { executionLimit = EXECUTION_LIMIT, histor
1417
1446
  var defaultEffect = () => Effect3.fail(new Error("Intent runtime not ready"));
1418
1447
  var defaultPromise = () => Effect3.runPromise(defaultEffect());
1419
1448
  var intent_dispatcher_default = (context) => {
1420
- const state = live3({
1449
+ const state = live2({
1421
1450
  dispatch: defaultEffect,
1422
1451
  dispatchPromise: defaultPromise,
1423
1452
  undo: defaultEffect,
1424
1453
  undoPromise: defaultPromise
1425
1454
  });
1426
- const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher((module) => context.requestCapabilities(Capabilities.IntentResolver, (c, moduleId) => {
1427
- return module ? moduleId === module : true;
1428
- }).flat());
1429
- const manager = context.requestCapability(Capabilities.PluginManager);
1455
+ const { dispatch, dispatchPromise, undo, undoPromise } = createDispatcher(() => context.getCapabilities(Capabilities.IntentResolver).flat());
1456
+ const manager = context.getCapability(Capabilities.PluginManager);
1430
1457
  state.dispatch = (intentChain, depth) => {
1431
1458
  return Effect3.gen(function* () {
1432
1459
  yield* manager._activate(Events.SetupIntentResolver);
@@ -1446,7 +1473,7 @@ export {
1446
1473
  defineCapability,
1447
1474
  contributes,
1448
1475
  lazy,
1449
- PluginsContext,
1476
+ PluginContext,
1450
1477
  defineEvent,
1451
1478
  eventKey,
1452
1479
  oneOf,
@@ -1482,4 +1509,4 @@ export {
1482
1509
  ResourceLanguage,
1483
1510
  Resource
1484
1511
  };
1485
- //# sourceMappingURL=chunk-GSDBF2CK.mjs.map
1512
+ //# sourceMappingURL=chunk-BOEJMAVK.mjs.map