@dxos/plugin-deck 0.8.4-main.67995b8 → 0.8.4-main.a4bbb77

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 (130) hide show
  1. package/dist/lib/browser/{app-graph-builder-JTFSDT2I.mjs → app-graph-builder-7SR53CCK.mjs} +14 -14
  2. package/dist/lib/browser/app-graph-builder-7SR53CCK.mjs.map +7 -0
  3. package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-GCOL6YDT.mjs} +6 -6
  4. package/dist/lib/browser/check-app-scheme-GCOL6YDT.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-QDZO4AJ4.mjs → chunk-7CL25AYA.mjs} +15 -15
  6. package/dist/lib/browser/chunk-7CL25AYA.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-HUWUYTOI.mjs +16 -0
  8. package/dist/lib/browser/chunk-HUWUYTOI.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-MHP4GPX5.mjs +11 -0
  10. package/dist/lib/browser/chunk-MHP4GPX5.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-D7KTFCUV.mjs → chunk-QHJ7N7BF.mjs} +217 -213
  12. package/dist/lib/browser/chunk-QHJ7N7BF.mjs.map +7 -0
  13. package/dist/lib/browser/{chunk-F5BQOOEG.mjs → chunk-VSJ7FFQS.mjs} +4 -4
  14. package/dist/lib/browser/chunk-VSJ7FFQS.mjs.map +7 -0
  15. package/dist/lib/browser/{chunk-JFTXENFN.mjs → chunk-WOCUNO27.mjs} +9 -9
  16. package/dist/lib/browser/chunk-WOCUNO27.mjs.map +7 -0
  17. package/dist/lib/browser/index.mjs +19 -14
  18. package/dist/lib/browser/index.mjs.map +3 -3
  19. package/dist/lib/browser/{intent-resolver-P2OBK5HK.mjs → intent-resolver-Y5YOA4NR.mjs} +16 -16
  20. package/dist/lib/browser/intent-resolver-Y5YOA4NR.mjs.map +7 -0
  21. package/dist/lib/browser/meta.json +1 -1
  22. package/dist/lib/browser/{react-root-PO64J7ML.mjs → react-root-A537NMT6.mjs} +11 -11
  23. package/dist/lib/browser/react-root-A537NMT6.mjs.map +7 -0
  24. package/dist/lib/browser/{react-surface-E45YOVF5.mjs → react-surface-DAS4HS3Y.mjs} +13 -13
  25. package/dist/lib/browser/react-surface-DAS4HS3Y.mjs.map +7 -0
  26. package/dist/lib/browser/{settings-6AJZPZPM.mjs → settings-3642GPOR.mjs} +5 -5
  27. package/dist/lib/browser/{settings-6AJZPZPM.mjs.map → settings-3642GPOR.mjs.map} +2 -2
  28. package/dist/lib/browser/state-MKKK3WGD.mjs +12 -0
  29. package/dist/lib/browser/toolkit-UPUBQIYU.mjs +61 -0
  30. package/dist/lib/browser/toolkit-UPUBQIYU.mjs.map +7 -0
  31. package/dist/lib/browser/types/index.mjs +2 -2
  32. package/dist/lib/browser/{url-handler-7L7M6IKH.mjs → url-handler-354LL74P.mjs} +7 -7
  33. package/dist/lib/browser/url-handler-354LL74P.mjs.map +7 -0
  34. package/dist/types/src/DeckPlugin.d.ts +1 -1
  35. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  37. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  39. package/dist/types/src/capabilities/check-app-scheme.d.ts +1 -1
  40. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
  41. package/dist/types/src/capabilities/index.d.ts +9 -9
  42. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  43. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  44. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/react-root.d.ts +2 -2
  46. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  48. package/dist/types/src/capabilities/settings.d.ts +1 -1
  49. package/dist/types/src/capabilities/state.d.ts +2 -2
  50. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/toolkit.d.ts +5 -0
  52. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  53. package/dist/types/src/capabilities/tools.d.ts +1 -1
  54. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  55. package/dist/types/src/capabilities/url-handler.d.ts +1 -1
  56. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  57. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
  58. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  59. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
  60. package/dist/types/src/components/Plank/Plank.d.ts +1 -1
  61. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  62. package/dist/types/src/components/Plank/Plank.stories.d.ts +85 -5
  63. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  64. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  65. package/dist/types/src/components/Plank/PlankHeading.d.ts +1 -1
  66. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  67. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  68. package/dist/types/src/events.d.ts.map +1 -1
  69. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  70. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  71. package/dist/types/src/meta.d.ts +0 -1
  72. package/dist/types/src/meta.d.ts.map +1 -1
  73. package/dist/types/src/translations.d.ts +1 -0
  74. package/dist/types/src/translations.d.ts.map +1 -1
  75. package/dist/types/src/types/schema.d.ts +2 -2
  76. package/dist/types/src/types/schema.d.ts.map +1 -1
  77. package/dist/types/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +48 -45
  79. package/src/DeckPlugin.ts +64 -59
  80. package/src/capabilities/app-graph-builder.ts +10 -9
  81. package/src/capabilities/capabilities.ts +3 -3
  82. package/src/capabilities/check-app-scheme.ts +3 -3
  83. package/src/capabilities/index.ts +2 -1
  84. package/src/capabilities/intent-resolver.ts +16 -15
  85. package/src/capabilities/react-root.tsx +4 -3
  86. package/src/capabilities/react-surface.tsx +5 -5
  87. package/src/capabilities/settings.ts +1 -1
  88. package/src/capabilities/state.ts +6 -5
  89. package/src/capabilities/toolkit.ts +55 -0
  90. package/src/capabilities/tools.ts +9 -6
  91. package/src/capabilities/url-handler.ts +3 -2
  92. package/src/components/DeckLayout/Banner.tsx +3 -3
  93. package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
  94. package/src/components/DeckLayout/DeckLayout.tsx +15 -14
  95. package/src/components/DeckLayout/Fallback.tsx +2 -2
  96. package/src/components/DeckLayout/Toast.tsx +2 -2
  97. package/src/components/DeckSettings/DeckSettings.tsx +74 -65
  98. package/src/components/Plank/Plank.stories.tsx +9 -10
  99. package/src/components/Plank/Plank.tsx +7 -6
  100. package/src/components/Plank/PlankControls.tsx +3 -3
  101. package/src/components/Plank/PlankError.tsx +3 -2
  102. package/src/components/Plank/PlankHeading.tsx +10 -9
  103. package/src/components/Sidebar/ComplementarySidebar.tsx +9 -8
  104. package/src/components/Sidebar/Sidebar.tsx +2 -2
  105. package/src/components/Sidebar/SidebarButton.tsx +6 -6
  106. package/src/events.ts +2 -2
  107. package/src/hooks/useDeckCompanions.ts +2 -2
  108. package/src/hooks/useHoistStatusbar.ts +2 -2
  109. package/src/hooks/useNodeActionExpander.ts +1 -1
  110. package/src/meta.ts +1 -3
  111. package/src/translations.ts +1 -0
  112. package/src/types/schema.ts +2 -2
  113. package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
  114. package/dist/lib/browser/check-app-scheme-57U62A3A.mjs.map +0 -7
  115. package/dist/lib/browser/chunk-D7KTFCUV.mjs.map +0 -7
  116. package/dist/lib/browser/chunk-F5BQOOEG.mjs.map +0 -7
  117. package/dist/lib/browser/chunk-JFTXENFN.mjs.map +0 -7
  118. package/dist/lib/browser/chunk-M57WD3V6.mjs +0 -16
  119. package/dist/lib/browser/chunk-M57WD3V6.mjs.map +0 -7
  120. package/dist/lib/browser/chunk-QDZO4AJ4.mjs.map +0 -7
  121. package/dist/lib/browser/chunk-Z5KITAZW.mjs +0 -13
  122. package/dist/lib/browser/chunk-Z5KITAZW.mjs.map +0 -7
  123. package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs.map +0 -7
  124. package/dist/lib/browser/react-root-PO64J7ML.mjs.map +0 -7
  125. package/dist/lib/browser/react-surface-E45YOVF5.mjs.map +0 -7
  126. package/dist/lib/browser/state-MVDYX77Y.mjs +0 -12
  127. package/dist/lib/browser/tools-TKQDPCHJ.mjs +0 -88
  128. package/dist/lib/browser/tools-TKQDPCHJ.mjs.map +0 -7
  129. package/dist/lib/browser/url-handler-7L7M6IKH.mjs.map +0 -7
  130. /package/dist/lib/browser/{state-MVDYX77Y.mjs.map → state-MKKK3WGD.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-deck",
3
- "version": "0.8.4-main.67995b8",
3
+ "version": "0.8.4-main.a4bbb77",
4
4
  "description": "DXOS Surface plugin for the main application layout.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,14 +10,14 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
- "browser": "./dist/lib/browser/index.mjs",
15
- "source": "./src/index.ts"
15
+ "browser": "./dist/lib/browser/index.mjs"
16
16
  },
17
17
  "./types": {
18
+ "source": "./src/types/index.ts",
18
19
  "types": "./dist/types/src/types/index.d.ts",
19
- "browser": "./dist/lib/browser/types/index.mjs",
20
- "source": "./src/types/index.ts"
20
+ "browser": "./dist/lib/browser/types/index.mjs"
21
21
  }
22
22
  },
23
23
  "types": "dist/types/src/index.d.ts",
@@ -33,57 +33,60 @@
33
33
  "src"
34
34
  ],
35
35
  "dependencies": {
36
+ "@effect/ai": "0.29.1",
37
+ "@effect/experimental": "0.56.0",
36
38
  "@fluentui/react-tabster": "^9.24.2",
37
39
  "@preact-signals/safe-react": "^0.9.0",
38
- "@preact/signals-core": "^1.9.0",
40
+ "@preact/signals-core": "^1.12.1",
39
41
  "@radix-ui/react-context": "1.1.1",
40
- "effect": "3.17.0",
41
42
  "immer": "^10.1.1",
42
- "@dxos/ai": "0.8.4-main.67995b8",
43
- "@dxos/app-framework": "0.8.4-main.67995b8",
44
- "@dxos/async": "0.8.4-main.67995b8",
45
- "@dxos/blueprints": "0.8.4-main.67995b8",
46
- "@dxos/debug": "0.8.4-main.67995b8",
47
- "@dxos/echo-schema": "0.8.4-main.67995b8",
48
- "@dxos/echo-signals": "0.8.4-main.67995b8",
49
- "@dxos/echo": "0.8.4-main.67995b8",
50
- "@dxos/invariant": "0.8.4-main.67995b8",
51
- "@dxos/keyboard": "0.8.4-main.67995b8",
52
- "@dxos/live-object": "0.8.4-main.67995b8",
53
- "@dxos/local-storage": "0.8.4-main.67995b8",
54
- "@dxos/log": "0.8.4-main.67995b8",
55
- "@dxos/plugin-graph": "0.8.4-main.67995b8",
56
- "@dxos/plugin-attention": "0.8.4-main.67995b8",
57
- "@dxos/plugin-theme": "0.8.4-main.67995b8",
58
- "@dxos/react-client": "0.8.4-main.67995b8",
59
- "@dxos/plugin-observability": "0.8.4-main.67995b8",
60
- "@dxos/react-ui-attention": "0.8.4-main.67995b8",
61
- "@dxos/react-ui-form": "0.8.4-main.67995b8",
62
- "@dxos/react-ui-stack": "0.8.4-main.67995b8",
63
- "@dxos/react-ui-tabs": "0.8.4-main.67995b8",
64
- "@dxos/react-ui-text-tooltip": "0.8.4-main.67995b8",
65
- "@dxos/util": "0.8.4-main.67995b8"
43
+ "@dxos/ai": "0.8.4-main.a4bbb77",
44
+ "@dxos/app-framework": "0.8.4-main.a4bbb77",
45
+ "@dxos/assistant": "0.8.4-main.a4bbb77",
46
+ "@dxos/async": "0.8.4-main.a4bbb77",
47
+ "@dxos/blueprints": "0.8.4-main.a4bbb77",
48
+ "@dxos/debug": "0.8.4-main.a4bbb77",
49
+ "@dxos/echo": "0.8.4-main.a4bbb77",
50
+ "@dxos/echo-schema": "0.8.4-main.a4bbb77",
51
+ "@dxos/echo-signals": "0.8.4-main.a4bbb77",
52
+ "@dxos/invariant": "0.8.4-main.a4bbb77",
53
+ "@dxos/keyboard": "0.8.4-main.a4bbb77",
54
+ "@dxos/live-object": "0.8.4-main.a4bbb77",
55
+ "@dxos/local-storage": "0.8.4-main.a4bbb77",
56
+ "@dxos/plugin-attention": "0.8.4-main.a4bbb77",
57
+ "@dxos/log": "0.8.4-main.a4bbb77",
58
+ "@dxos/plugin-graph": "0.8.4-main.a4bbb77",
59
+ "@dxos/plugin-observability": "0.8.4-main.a4bbb77",
60
+ "@dxos/react-client": "0.8.4-main.a4bbb77",
61
+ "@dxos/plugin-theme": "0.8.4-main.a4bbb77",
62
+ "@dxos/react-ui-attention": "0.8.4-main.a4bbb77",
63
+ "@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
64
+ "@dxos/react-ui-tabs": "0.8.4-main.a4bbb77",
65
+ "@dxos/react-ui-text-tooltip": "0.8.4-main.a4bbb77",
66
+ "@dxos/react-ui-form": "0.8.4-main.a4bbb77",
67
+ "@dxos/util": "0.8.4-main.a4bbb77"
66
68
  },
67
69
  "devDependencies": {
68
- "@effect-rx/rx-react": "0.38.0",
69
- "@effect/platform": "0.89.0",
70
- "@types/react": "~18.2.0",
71
- "@types/react-dom": "~18.2.0",
72
- "react": "~18.2.0",
73
- "react-dom": "~18.2.0",
74
- "vite": "5.4.7",
75
- "@dxos/react-ui": "0.8.4-main.67995b8",
76
- "@dxos/react-ui-theme": "0.8.4-main.67995b8",
77
- "@dxos/storybook-utils": "0.8.4-main.67995b8"
70
+ "@effect-rx/rx-react": "0.42.4",
71
+ "@effect/platform": "0.92.1",
72
+ "@types/react": "~19.2.0",
73
+ "@types/react-dom": "~19.2.0",
74
+ "effect": "3.18.3",
75
+ "react": "~19.2.0",
76
+ "react-dom": "~19.2.0",
77
+ "vite": "7.1.9",
78
+ "@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
79
+ "@dxos/storybook-utils": "0.8.4-main.a4bbb77",
80
+ "@dxos/react-ui": "0.8.4-main.a4bbb77"
78
81
  },
79
82
  "peerDependencies": {
80
83
  "@effect-rx/rx-react": "^0.34.1",
81
84
  "@effect/platform": "^0.80.12",
82
85
  "effect": "^3.13.3",
83
- "react": "~18.2.0",
84
- "react-dom": "~18.2.0",
85
- "@dxos/react-ui": "0.8.4-main.67995b8",
86
- "@dxos/react-ui-theme": "0.8.4-main.67995b8"
86
+ "react": "^19.0.0",
87
+ "react-dom": "^19.0.0",
88
+ "@dxos/react-ui": "0.8.4-main.a4bbb77",
89
+ "@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
87
90
  },
88
91
  "publishConfig": {
89
92
  "access": "public"
package/src/DeckPlugin.ts CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { setAutoFreeze } from 'immer';
6
6
 
7
- import { allOf, Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';
7
+ import { Capabilities, Events, allOf, contributes, defineModule, definePlugin, oneOf } from '@dxos/app-framework';
8
8
  import { translations as stackTranslations } from '@dxos/react-ui-stack';
9
9
 
10
10
  import {
@@ -15,7 +15,7 @@ import {
15
15
  LayoutIntentResolver,
16
16
  ReactRoot,
17
17
  ReactSurface,
18
- Tools,
18
+ Toolkit,
19
19
  UrlHandler,
20
20
  } from './capabilities';
21
21
  import { DeckEvents } from './events';
@@ -27,60 +27,65 @@ import { translations } from './translations';
27
27
  // TODO(Zan): Move this to a more global location if we use immer more broadly.
28
28
  setAutoFreeze(false);
29
29
 
30
- export const DeckPlugin = () =>
31
- definePlugin(meta, [
32
- defineModule({
33
- id: `${meta.id}/module/check-app-scheme`,
34
- activatesOn: Events.SettingsReady,
35
- activate: CheckAppScheme,
36
- }),
37
- defineModule({
38
- id: `${meta.id}/module/settings`,
39
- activatesOn: Events.SetupSettings,
40
- activate: DeckSettings,
41
- }),
42
- defineModule({
43
- id: `${meta.id}/module/layout`,
44
- // TODO(wittjosiah): Does not integrate with settings store.
45
- // Should this be a different event?
46
- // Should settings store be renamed to be more generic?
47
- activatesOn: oneOf(Events.SetupSettings, Events.SetupAppGraph),
48
- activatesAfter: [Events.LayoutReady, DeckEvents.StateReady],
49
- activate: DeckState,
50
- }),
51
- defineModule({
52
- id: `${meta.id}/module/translations`,
53
- activatesOn: Events.SetupTranslations,
54
- activate: () => contributes(Capabilities.Translations, [...translations, ...stackTranslations]),
55
- }),
56
- defineModule({
57
- id: `${meta.id}/module/react-root`,
58
- activatesOn: Events.Startup,
59
- activate: ReactRoot,
60
- }),
61
- defineModule({
62
- id: `${meta.id}/module/react-surface`,
63
- activatesOn: Events.SetupReactSurface,
64
- activate: ReactSurface,
65
- }),
66
- defineModule({
67
- id: `${meta.id}/module/layout-intent-resolver`,
68
- activatesOn: Events.SetupIntentResolver,
69
- activate: LayoutIntentResolver,
70
- }),
71
- defineModule({
72
- id: `${meta.id}/module/app-graph-builder`,
73
- activatesOn: Events.SetupAppGraph,
74
- activate: AppGraphBuilder,
75
- }),
76
- defineModule({
77
- id: `${meta.id}/module/tools`,
78
- activatesOn: Events.SetupArtifactDefinition,
79
- activate: Tools,
80
- }),
81
- defineModule({
82
- id: `${meta.id}/module/url`,
83
- activatesOn: allOf(Events.DispatcherReady, DeckEvents.StateReady),
84
- activate: UrlHandler,
85
- }),
86
- ]);
30
+ export const DeckPlugin = definePlugin(meta, () => [
31
+ defineModule({
32
+ id: `${meta.id}/module/check-app-scheme`,
33
+ activatesOn: Events.SettingsReady,
34
+ activate: CheckAppScheme,
35
+ }),
36
+ defineModule({
37
+ id: `${meta.id}/module/settings`,
38
+ activatesOn: Events.SetupSettings,
39
+ activate: DeckSettings,
40
+ }),
41
+ defineModule({
42
+ id: `${meta.id}/module/layout`,
43
+ // TODO(wittjosiah): Does not integrate with settings store.
44
+ // Should this be a different event?
45
+ // Should settings store be renamed to be more generic?
46
+ activatesOn: oneOf(Events.SetupSettings, Events.SetupAppGraph),
47
+ activatesAfter: [Events.LayoutReady, DeckEvents.StateReady],
48
+ activate: DeckState,
49
+ }),
50
+ defineModule({
51
+ id: `${meta.id}/module/translations`,
52
+ activatesOn: Events.SetupTranslations,
53
+ activate: () => contributes(Capabilities.Translations, [...translations, ...stackTranslations]),
54
+ }),
55
+ defineModule({
56
+ id: `${meta.id}/module/react-root`,
57
+ activatesOn: Events.Startup,
58
+ activate: ReactRoot,
59
+ }),
60
+ defineModule({
61
+ id: `${meta.id}/module/react-surface`,
62
+ activatesOn: Events.SetupReactSurface,
63
+ activate: ReactSurface,
64
+ }),
65
+ defineModule({
66
+ id: `${meta.id}/module/layout-intent-resolver`,
67
+ activatesOn: Events.SetupIntentResolver,
68
+ activate: LayoutIntentResolver,
69
+ }),
70
+ defineModule({
71
+ id: `${meta.id}/module/app-graph-builder`,
72
+ activatesOn: Events.SetupAppGraph,
73
+ activate: AppGraphBuilder,
74
+ }),
75
+ // defineModule({
76
+ // id: `${meta.id}/module/tools`,
77
+ // activatesOn: Events.SetupArtifactDefinition,
78
+ // activate: Tools,
79
+ // }),
80
+ defineModule({
81
+ id: `${meta.id}/module/toolkit`,
82
+ // TODO(wittjosiah): Shouldn't use the startup event.
83
+ activatesOn: Events.Startup,
84
+ activate: Toolkit,
85
+ }),
86
+ defineModule({
87
+ id: `${meta.id}/module/url`,
88
+ activatesOn: allOf(Events.DispatcherReady, DeckEvents.StateReady),
89
+ activate: UrlHandler,
90
+ }),
91
+ ]);
@@ -5,18 +5,19 @@
5
5
  import { Rx } from '@effect-rx/rx-react';
6
6
  import { Option, pipe } from 'effect';
7
7
 
8
- import { Capabilities, contributes, createIntent, LayoutAction, type PluginContext } from '@dxos/app-framework';
8
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
9
9
  import { AttentionCapabilities } from '@dxos/plugin-attention';
10
- import { createExtension, ROOT_ID, rxFromSignal } from '@dxos/plugin-graph';
10
+ import { ROOT_ID, createExtension, rxFromSignal } from '@dxos/plugin-graph';
11
+
12
+ import { meta } from '../meta';
11
13
 
12
14
  import { DeckCapabilities } from './capabilities';
13
- import { DECK_PLUGIN } from '../meta';
14
15
 
15
16
  export default (context: PluginContext) =>
16
17
  contributes(
17
18
  Capabilities.AppGraphBuilder,
18
19
  createExtension({
19
- id: DECK_PLUGIN,
20
+ id: meta.id,
20
21
  actions: (node) =>
21
22
  Rx.make((get) =>
22
23
  pipe(
@@ -36,7 +37,7 @@ export default (context: PluginContext) =>
36
37
  );
37
38
  },
38
39
  properties: {
39
- label: ['toggle fullscreen label', { ns: DECK_PLUGIN }],
40
+ label: ['toggle fullscreen label', { ns: meta.id }],
40
41
  icon: 'ph--arrows-out--regular',
41
42
  keyBinding: {
42
43
  macos: 'ctrl+meta+f',
@@ -62,7 +63,7 @@ export default (context: PluginContext) =>
62
63
  }
63
64
  },
64
65
  properties: {
65
- label: ['close current label', { ns: DECK_PLUGIN }],
66
+ label: ['close current label', { ns: meta.id }],
66
67
  icon: 'ph--x--regular',
67
68
  },
68
69
  };
@@ -79,7 +80,7 @@ export default (context: PluginContext) =>
79
80
  );
80
81
  },
81
82
  properties: {
82
- label: ['close others label', { ns: DECK_PLUGIN }],
83
+ label: ['close others label', { ns: meta.id }],
83
84
  icon: 'ph--x-square--regular',
84
85
  },
85
86
  };
@@ -97,7 +98,7 @@ export default (context: PluginContext) =>
97
98
  );
98
99
  },
99
100
  properties: {
100
- label: ['close all label', { ns: DECK_PLUGIN }],
101
+ label: ['close all label', { ns: meta.id }],
101
102
  icon: 'ph--x-circle--regular',
102
103
  },
103
104
  };
@@ -116,7 +117,7 @@ export default (context: PluginContext) =>
116
117
  : 'open navigation sidebar label',
117
118
  ),
118
119
  ),
119
- { ns: DECK_PLUGIN },
120
+ { ns: meta.id },
120
121
  ],
121
122
  icon: 'ph--sidebar--regular',
122
123
  keyBinding: {
@@ -5,10 +5,10 @@
5
5
  import { defineCapability } from '@dxos/app-framework';
6
6
  import { type DeepReadonly } from '@dxos/util';
7
7
 
8
- import { DECK_PLUGIN } from '../meta';
8
+ import { meta } from '../meta';
9
9
  import { type DeckPluginState } from '../types';
10
10
 
11
11
  export namespace DeckCapabilities {
12
- export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${DECK_PLUGIN}/capability/state`);
13
- export const MutableDeckState = defineCapability<DeckPluginState>(`${DECK_PLUGIN}/capability/state`);
12
+ export const DeckState = defineCapability<DeepReadonly<DeckPluginState>>(`${meta.id}/capability/state`);
13
+ export const MutableDeckState = defineCapability<DeckPluginState>(`${meta.id}/capability/state`);
14
14
  }
@@ -2,9 +2,9 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
5
+ import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
6
6
 
7
- import { DECK_PLUGIN } from '../meta';
7
+ import { meta } from '../meta';
8
8
  import { type DeckSettingsProps } from '../types';
9
9
 
10
10
  const isSocket = !!(globalThis as any).__args;
@@ -31,7 +31,7 @@ const checkAppScheme = (url: string) => {
31
31
  };
32
32
 
33
33
  export default async (context: PluginContext) => {
34
- const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;
34
+ const settings = context.getCapability(Capabilities.SettingsStore).getStore<DeckSettingsProps>(meta.id)?.value;
35
35
  if (!isSocket && settings?.enableNativeRedirect) {
36
36
  checkAppScheme(appScheme);
37
37
  }
@@ -11,7 +11,8 @@ export const DeckState = lazy(() => import('./state'));
11
11
  export const LayoutIntentResolver = lazy(() => import('./intent-resolver'));
12
12
  export const ReactRoot = lazy(() => import('./react-root'));
13
13
  export const ReactSurface = lazy(() => import('./react-surface'));
14
- export const Tools = lazy(() => import('./tools'));
14
+ // export const Tools = lazy(() => import('./tools'));
15
+ export const Toolkit = lazy(() => import('./toolkit'));
15
16
  export const UrlHandler = lazy(() => import('./url-handler'));
16
17
 
17
18
  export * from './capabilities';
@@ -3,17 +3,17 @@
3
3
  //
4
4
 
5
5
  import { batch } from '@preact/signals-core';
6
- import { Schema, Effect, pipe, Option } from 'effect';
6
+ import { Effect, Option, Schema, pipe } from 'effect';
7
7
 
8
8
  import {
9
9
  Capabilities,
10
- createResolver,
11
- contributes,
12
10
  IntentAction,
13
11
  LayoutAction,
14
12
  type PluginContext,
15
- createIntent,
16
13
  chain,
14
+ contributes,
15
+ createIntent,
16
+ createResolver,
17
17
  } from '@dxos/app-framework';
18
18
  import { Obj } from '@dxos/echo';
19
19
  import { invariant } from '@dxos/invariant';
@@ -24,20 +24,21 @@ import { isActionLike } from '@dxos/plugin-graph';
24
24
  import { ObservabilityAction } from '@dxos/plugin-observability/types';
25
25
  import { byPosition, isNonNullable } from '@dxos/util';
26
26
 
27
- import { DeckCapabilities } from './capabilities';
28
27
  import { closeEntry, createEntryId, incrementPlank, openEntry } from '../layout';
29
- import { DECK_PLUGIN } from '../meta';
28
+ import { meta } from '../meta';
30
29
  import {
31
30
  DeckAction,
32
- type LayoutMode,
33
31
  type DeckSettingsProps,
34
- isLayoutMode,
35
- getMode,
36
- defaultDeck,
32
+ type LayoutMode,
37
33
  PLANK_COMPANION_TYPE,
34
+ defaultDeck,
35
+ getMode,
36
+ isLayoutMode,
38
37
  } from '../types';
39
38
  import { setActive } from '../util';
40
39
 
40
+ import { DeckCapabilities } from './capabilities';
41
+
41
42
  export default (context: PluginContext) =>
42
43
  contributes(Capabilities.IntentResolver, [
43
44
  createResolver({
@@ -55,11 +56,11 @@ export default (context: PluginContext) =>
55
56
  ...layout.toasts,
56
57
  {
57
58
  id: layout.currentUndoId,
58
- title: data.message ?? ['undo available label', { ns: DECK_PLUGIN }],
59
+ title: data.message ?? ['undo available label', { ns: meta.id }],
59
60
  duration: 10_000,
60
- actionLabel: ['undo action label', { ns: DECK_PLUGIN }],
61
- actionAlt: ['undo action alt', { ns: DECK_PLUGIN }],
62
- closeLabel: ['undo close label', { ns: DECK_PLUGIN }],
61
+ actionLabel: ['undo action label', { ns: meta.id }],
62
+ actionAlt: ['undo action alt', { ns: meta.id }],
63
+ closeLabel: ['undo close label', { ns: meta.id }],
63
64
  onAction: () => undo(),
64
65
  },
65
66
  ];
@@ -260,7 +261,7 @@ export default (context: PluginContext) =>
260
261
  const attention = context.getCapability(AttentionCapabilities.Attention);
261
262
  const settings = context
262
263
  .getCapabilities(Capabilities.SettingsStore)[0]
263
- ?.getStore<DeckSettingsProps>(DECK_PLUGIN)?.value;
264
+ ?.getStore<DeckSettingsProps>(meta.id)?.value;
264
265
 
265
266
  if (options?.workspace && state.activeDeck !== options?.workspace) {
266
267
  const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
@@ -6,13 +6,14 @@ import React, { useCallback } from 'react';
6
6
 
7
7
  import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
8
8
 
9
- import { DeckCapabilities } from './capabilities';
10
9
  import { DeckLayout } from '../components';
11
- import { DECK_PLUGIN } from '../meta';
10
+ import { meta } from '../meta';
11
+
12
+ import { DeckCapabilities } from './capabilities';
12
13
 
13
14
  export default () =>
14
15
  contributes(Capabilities.ReactRoot, {
15
- id: DECK_PLUGIN,
16
+ id: meta.id,
16
17
  root: () => {
17
18
  const layout = useCapability(DeckCapabilities.MutableDeckState);
18
19
 
@@ -7,21 +7,21 @@ import React from 'react';
7
7
  import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
8
  import { SettingsStore } from '@dxos/local-storage';
9
9
 
10
- import { DeckSettings, Banner } from '../components';
11
- import { DECK_PLUGIN } from '../meta';
10
+ import { Banner, DeckSettings } from '../components';
11
+ import { meta } from '../meta';
12
12
  import { type DeckSettingsProps } from '../types';
13
13
 
14
14
  export default () =>
15
15
  contributes(Capabilities.ReactSurface, [
16
16
  createSurface({
17
- id: `${DECK_PLUGIN}/plugin-settings`,
17
+ id: `${meta.id}/plugin-settings`,
18
18
  role: 'article',
19
19
  filter: (data): data is { subject: SettingsStore<DeckSettingsProps> } =>
20
- data.subject instanceof SettingsStore && data.subject.prefix === DECK_PLUGIN,
20
+ data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
21
21
  component: ({ data: { subject } }) => <DeckSettings settings={subject.value} />,
22
22
  }),
23
23
  createSurface({
24
- id: `${DECK_PLUGIN}/banner`,
24
+ id: `${meta.id}/banner`,
25
25
  role: 'banner',
26
26
  component: ({ data }) => {
27
27
  return <Banner variant={data.variant} />;
@@ -6,7 +6,7 @@ import { Capabilities, contributes } from '@dxos/app-framework';
6
6
  import { live } from '@dxos/live-object';
7
7
 
8
8
  import { meta } from '../meta';
9
- import { DeckSettingsSchema, type DeckSettingsProps } from '../types';
9
+ import { type DeckSettingsProps, DeckSettingsSchema } from '../types';
10
10
 
11
11
  export default () => {
12
12
  const settings = live<DeckSettingsProps>({
@@ -8,17 +8,18 @@ import { live } from '@dxos/live-object';
8
8
  import { LocalStorageStore } from '@dxos/local-storage';
9
9
  import { type SidebarState } from '@dxos/react-ui';
10
10
 
11
+ import { meta } from '../meta';
12
+ import { type DeckPluginState, type DeckState, defaultDeck, getMode } from '../types';
13
+
11
14
  import { DeckCapabilities } from './capabilities';
12
- import { DECK_PLUGIN } from '../meta';
13
- import { getMode, type DeckPluginState, defaultDeck, type DeckState } from '../types';
14
15
 
15
16
  const boolean = /true|false/;
16
17
 
17
18
  // TODO(thure, 18 Feb 2025): Remove after the next release.
18
19
 
19
20
  const migrateSidebarStateDefaults = {
20
- [`${DECK_PLUGIN}/complementary-sidebar-state`]: 'expanded',
21
- [`${DECK_PLUGIN}/sidebar-state`]: 'collapsed',
21
+ [`${meta.id}/complementary-sidebar-state`]: 'expanded',
22
+ [`${meta.id}/sidebar-state`]: 'collapsed',
22
23
  };
23
24
 
24
25
  const migrateSidebarState = () => {
@@ -32,7 +33,7 @@ const migrateSidebarState = () => {
32
33
  export const DeckStateFactory = () => {
33
34
  migrateSidebarState();
34
35
 
35
- const state = new LocalStorageStore<DeckPluginState>(DECK_PLUGIN, {
36
+ const state = new LocalStorageStore<DeckPluginState>(meta.id, {
36
37
  sidebarState: 'expanded',
37
38
  complementarySidebarState: 'collapsed',
38
39
  complementarySidebarPanel: undefined,
@@ -0,0 +1,55 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Tool, Toolkit } from '@effect/ai';
6
+ import { Effect, Schema } from 'effect';
7
+
8
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
9
+ import { ArtifactId } from '@dxos/assistant';
10
+ import { type SpaceId } from '@dxos/keys';
11
+ import { trim } from '@dxos/util';
12
+
13
+ import { DeckCapabilities } from './capabilities';
14
+
15
+ class DeckToolkit extends Toolkit.make(
16
+ Tool.make('open-item', {
17
+ description: trim`
18
+ Opens an item in the application.
19
+ `,
20
+ parameters: {
21
+ id: ArtifactId,
22
+ },
23
+ success: Schema.Any,
24
+ failure: Schema.Never,
25
+ }),
26
+ ) {
27
+ static layer = (context: PluginContext) =>
28
+ DeckToolkit.toLayer({
29
+ 'open-item': ({ id }) =>
30
+ Effect.gen(function* () {
31
+ const state = context.getCapability(DeckCapabilities.DeckState);
32
+ const dxn = ArtifactId.toDXN(id, state.activeDeck as SpaceId);
33
+
34
+ // TODO(wittjosiah): Support other variants.
35
+ const echoDxn = dxn.asEchoDXN();
36
+ if (!echoDxn) {
37
+ throw new Error(`Invalid object ID: ${id}`);
38
+ }
39
+
40
+ // TODO(wittjosiah): Get capabilities via layers.
41
+ const { dispatch } = context.getCapability(Capabilities.IntentDispatcher);
42
+ yield* dispatch(
43
+ createIntent(LayoutAction.Open, {
44
+ subject: [`${echoDxn.spaceId!}:${echoDxn.echoId}`],
45
+ part: 'main',
46
+ }),
47
+ );
48
+ }).pipe(Effect.orDie),
49
+ });
50
+ }
51
+
52
+ export default (context: PluginContext) => [
53
+ contributes(Capabilities.Toolkit, DeckToolkit),
54
+ contributes(Capabilities.ToolkitHandler, DeckToolkit.layer(context)),
55
+ ];
@@ -2,17 +2,20 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ // ISSUE(burdon): tools
6
+ // @ts-nocheck
7
+
5
8
  import { Schema } from 'effect';
6
9
 
7
- import { createTool, ToolResult } from '@dxos/ai';
8
10
  import {
9
- contributes,
10
- createIntent,
11
11
  Capabilities,
12
12
  LayoutAction,
13
13
  type PromiseIntentDispatcher,
14
+ contributes,
15
+ createIntent,
14
16
  } from '@dxos/app-framework';
15
17
  import { invariant } from '@dxos/invariant';
18
+ import { trim } from '@dxos/util';
16
19
 
17
20
  import { meta } from '../meta';
18
21
  import { DeckAction } from '../types';
@@ -30,9 +33,9 @@ export default () =>
30
33
  contributes(Capabilities.Tools, [
31
34
  createTool(meta.id, {
32
35
  name: 'show',
33
- description: `
34
- Show an item as a companion to an existing plank. This will make the item appear alongside the primary content.
35
- When supplying IDs, they must be fully qualified like space:object.
36
+ description: trim`
37
+ Show an item as a companion to an existing plank.
38
+ When supplying IDs, they must be fully qualified like this: space-key:object-id
36
39
  `,
37
40
  caption: 'Showing item...',
38
41
  // TODO(wittjosiah): Refactor Layout/Navigation/Deck actions so that they can be used directly.