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