@dxos/plugin-deck 0.8.4-main.c1de068 → 0.8.4-main.dedc0f3

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 (96) hide show
  1. package/dist/lib/browser/{app-graph-builder-JTFSDT2I.mjs → app-graph-builder-DVEKLXB4.mjs} +3 -3
  2. package/dist/lib/browser/app-graph-builder-DVEKLXB4.mjs.map +7 -0
  3. package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs → check-app-scheme-3BQJXWEY.mjs} +1 -1
  4. package/dist/lib/browser/{check-app-scheme-57U62A3A.mjs.map → check-app-scheme-3BQJXWEY.mjs.map} +2 -2
  5. package/dist/lib/browser/{chunk-JFTXENFN.mjs → chunk-NRCPV6AV.mjs} +2 -2
  6. package/dist/lib/browser/{chunk-JFTXENFN.mjs.map → chunk-NRCPV6AV.mjs.map} +2 -2
  7. package/dist/lib/browser/{chunk-D7KTFCUV.mjs → chunk-NU7H23SK.mjs} +198 -194
  8. package/dist/lib/browser/chunk-NU7H23SK.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-QDZO4AJ4.mjs → chunk-WILMPGDV.mjs} +11 -11
  10. package/dist/lib/browser/{chunk-QDZO4AJ4.mjs.map → chunk-WILMPGDV.mjs.map} +3 -3
  11. package/dist/lib/browser/index.mjs +14 -7
  12. package/dist/lib/browser/index.mjs.map +3 -3
  13. package/dist/lib/browser/{intent-resolver-P2OBK5HK.mjs → intent-resolver-2SUIIV6N.mjs} +5 -5
  14. package/dist/lib/browser/intent-resolver-2SUIIV6N.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-root-PO64J7ML.mjs → react-root-7PRVDLF7.mjs} +4 -4
  17. package/dist/lib/browser/{react-root-PO64J7ML.mjs.map → react-root-7PRVDLF7.mjs.map} +2 -2
  18. package/dist/lib/browser/{react-surface-E45YOVF5.mjs → react-surface-FNY2YC2F.mjs} +4 -4
  19. package/dist/lib/browser/{react-surface-E45YOVF5.mjs.map → react-surface-FNY2YC2F.mjs.map} +1 -1
  20. package/dist/lib/browser/{settings-6AJZPZPM.mjs → settings-LUPQPZ27.mjs} +1 -1
  21. package/dist/lib/browser/{settings-6AJZPZPM.mjs.map → settings-LUPQPZ27.mjs.map} +1 -1
  22. package/dist/lib/browser/{state-MVDYX77Y.mjs → state-CRXR7X63.mjs} +2 -2
  23. package/dist/lib/browser/toolkit-XGJSBY67.mjs +61 -0
  24. package/dist/lib/browser/toolkit-XGJSBY67.mjs.map +7 -0
  25. package/dist/lib/browser/{url-handler-7L7M6IKH.mjs → url-handler-LROZYQ26.mjs} +2 -2
  26. package/dist/lib/browser/url-handler-LROZYQ26.mjs.map +7 -0
  27. package/dist/types/src/DeckPlugin.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  29. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  30. package/dist/types/src/capabilities/check-app-scheme.d.ts +1 -1
  31. package/dist/types/src/capabilities/check-app-scheme.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/index.d.ts +9 -9
  33. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  35. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  36. package/dist/types/src/capabilities/react-root.d.ts +2 -2
  37. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  38. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  39. package/dist/types/src/capabilities/settings.d.ts +1 -1
  40. package/dist/types/src/capabilities/state.d.ts +2 -2
  41. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  42. package/dist/types/src/capabilities/toolkit.d.ts +5 -0
  43. package/dist/types/src/capabilities/toolkit.d.ts.map +1 -0
  44. package/dist/types/src/capabilities/tools.d.ts +1 -1
  45. package/dist/types/src/capabilities/tools.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/url-handler.d.ts +1 -1
  47. package/dist/types/src/capabilities/url-handler.d.ts.map +1 -1
  48. package/dist/types/src/components/DeckLayout/Banner.d.ts.map +1 -1
  49. package/dist/types/src/components/DeckLayout/DeckLayout.d.ts.map +1 -1
  50. package/dist/types/src/components/DeckSettings/DeckSettings.d.ts.map +1 -1
  51. package/dist/types/src/components/Plank/Plank.d.ts +1 -1
  52. package/dist/types/src/components/Plank/Plank.d.ts.map +1 -1
  53. package/dist/types/src/components/Plank/Plank.stories.d.ts +84 -4
  54. package/dist/types/src/components/Plank/Plank.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/Plank/PlankError.d.ts.map +1 -1
  56. package/dist/types/src/components/Plank/PlankHeading.d.ts +1 -1
  57. package/dist/types/src/components/Plank/PlankHeading.d.ts.map +1 -1
  58. package/dist/types/src/components/Sidebar/ComplementarySidebar.d.ts.map +1 -1
  59. package/dist/types/src/hooks/useDeckCompanions.d.ts.map +1 -1
  60. package/dist/types/src/hooks/useNodeActionExpander.d.ts.map +1 -1
  61. package/dist/types/src/translations.d.ts +1 -0
  62. package/dist/types/src/translations.d.ts.map +1 -1
  63. package/dist/types/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +37 -33
  65. package/src/DeckPlugin.ts +11 -5
  66. package/src/capabilities/app-graph-builder.ts +4 -3
  67. package/src/capabilities/check-app-scheme.ts +1 -1
  68. package/src/capabilities/index.ts +2 -1
  69. package/src/capabilities/intent-resolver.ts +10 -9
  70. package/src/capabilities/react-root.tsx +2 -1
  71. package/src/capabilities/react-surface.tsx +1 -1
  72. package/src/capabilities/settings.ts +1 -1
  73. package/src/capabilities/state.ts +3 -2
  74. package/src/capabilities/toolkit.ts +55 -0
  75. package/src/capabilities/tools.ts +9 -6
  76. package/src/capabilities/url-handler.ts +3 -2
  77. package/src/components/DeckLayout/Banner.tsx +1 -1
  78. package/src/components/DeckLayout/ContentEmpty.tsx +1 -1
  79. package/src/components/DeckLayout/DeckLayout.tsx +11 -10
  80. package/src/components/DeckSettings/DeckSettings.tsx +72 -63
  81. package/src/components/Plank/Plank.stories.tsx +7 -6
  82. package/src/components/Plank/Plank.tsx +7 -6
  83. package/src/components/Plank/PlankError.tsx +2 -1
  84. package/src/components/Plank/PlankHeading.tsx +5 -4
  85. package/src/components/Sidebar/ComplementarySidebar.tsx +4 -3
  86. package/src/components/Sidebar/SidebarButton.tsx +2 -2
  87. package/src/hooks/useDeckCompanions.ts +2 -2
  88. package/src/hooks/useNodeActionExpander.ts +1 -1
  89. package/src/translations.ts +1 -0
  90. package/dist/lib/browser/app-graph-builder-JTFSDT2I.mjs.map +0 -7
  91. package/dist/lib/browser/chunk-D7KTFCUV.mjs.map +0 -7
  92. package/dist/lib/browser/intent-resolver-P2OBK5HK.mjs.map +0 -7
  93. package/dist/lib/browser/tools-TKQDPCHJ.mjs +0 -88
  94. package/dist/lib/browser/tools-TKQDPCHJ.mjs.map +0 -7
  95. package/dist/lib/browser/url-handler-7L7M6IKH.mjs.map +0 -7
  96. /package/dist/lib/browser/{state-MVDYX77Y.mjs.map → state-CRXR7X63.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.c1de068",
3
+ "version": "0.8.4-main.dedc0f3",
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,10 +10,12 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs"
15
16
  },
16
17
  "./types": {
18
+ "source": "./src/types/index.ts",
17
19
  "types": "./dist/types/src/types/index.d.ts",
18
20
  "browser": "./dist/lib/browser/types/index.mjs"
19
21
  }
@@ -31,48 +33,50 @@
31
33
  "src"
32
34
  ],
33
35
  "dependencies": {
36
+ "@effect/ai": "0.25.2",
34
37
  "@fluentui/react-tabster": "^9.24.2",
35
38
  "@preact-signals/safe-react": "^0.9.0",
36
39
  "@preact/signals-core": "^1.9.0",
37
40
  "@radix-ui/react-context": "1.1.1",
38
- "effect": "3.17.0",
41
+ "effect": "3.17.7",
39
42
  "immer": "^10.1.1",
40
- "@dxos/ai": "0.8.4-main.c1de068",
41
- "@dxos/app-framework": "0.8.4-main.c1de068",
42
- "@dxos/async": "0.8.4-main.c1de068",
43
- "@dxos/debug": "0.8.4-main.c1de068",
44
- "@dxos/echo": "0.8.4-main.c1de068",
45
- "@dxos/blueprints": "0.8.4-main.c1de068",
46
- "@dxos/echo-signals": "0.8.4-main.c1de068",
47
- "@dxos/echo-schema": "0.8.4-main.c1de068",
48
- "@dxos/invariant": "0.8.4-main.c1de068",
49
- "@dxos/keyboard": "0.8.4-main.c1de068",
50
- "@dxos/live-object": "0.8.4-main.c1de068",
51
- "@dxos/log": "0.8.4-main.c1de068",
52
- "@dxos/local-storage": "0.8.4-main.c1de068",
53
- "@dxos/plugin-attention": "0.8.4-main.c1de068",
54
- "@dxos/plugin-graph": "0.8.4-main.c1de068",
55
- "@dxos/plugin-observability": "0.8.4-main.c1de068",
56
- "@dxos/plugin-theme": "0.8.4-main.c1de068",
57
- "@dxos/react-client": "0.8.4-main.c1de068",
58
- "@dxos/react-ui-attention": "0.8.4-main.c1de068",
59
- "@dxos/react-ui-stack": "0.8.4-main.c1de068",
60
- "@dxos/react-ui-form": "0.8.4-main.c1de068",
61
- "@dxos/react-ui-tabs": "0.8.4-main.c1de068",
62
- "@dxos/util": "0.8.4-main.c1de068",
63
- "@dxos/react-ui-text-tooltip": "0.8.4-main.c1de068"
43
+ "@dxos/ai": "0.8.4-main.dedc0f3",
44
+ "@dxos/app-framework": "0.8.4-main.dedc0f3",
45
+ "@dxos/assistant": "0.8.4-main.dedc0f3",
46
+ "@dxos/async": "0.8.4-main.dedc0f3",
47
+ "@dxos/debug": "0.8.4-main.dedc0f3",
48
+ "@dxos/echo": "0.8.4-main.dedc0f3",
49
+ "@dxos/blueprints": "0.8.4-main.dedc0f3",
50
+ "@dxos/invariant": "0.8.4-main.dedc0f3",
51
+ "@dxos/echo-schema": "0.8.4-main.dedc0f3",
52
+ "@dxos/echo-signals": "0.8.4-main.dedc0f3",
53
+ "@dxos/keyboard": "0.8.4-main.dedc0f3",
54
+ "@dxos/live-object": "0.8.4-main.dedc0f3",
55
+ "@dxos/local-storage": "0.8.4-main.dedc0f3",
56
+ "@dxos/log": "0.8.4-main.dedc0f3",
57
+ "@dxos/plugin-attention": "0.8.4-main.dedc0f3",
58
+ "@dxos/plugin-graph": "0.8.4-main.dedc0f3",
59
+ "@dxos/plugin-observability": "0.8.4-main.dedc0f3",
60
+ "@dxos/plugin-theme": "0.8.4-main.dedc0f3",
61
+ "@dxos/react-client": "0.8.4-main.dedc0f3",
62
+ "@dxos/react-ui-attention": "0.8.4-main.dedc0f3",
63
+ "@dxos/react-ui-form": "0.8.4-main.dedc0f3",
64
+ "@dxos/react-ui-stack": "0.8.4-main.dedc0f3",
65
+ "@dxos/react-ui-text-tooltip": "0.8.4-main.dedc0f3",
66
+ "@dxos/react-ui-tabs": "0.8.4-main.dedc0f3",
67
+ "@dxos/util": "0.8.4-main.dedc0f3"
64
68
  },
65
69
  "devDependencies": {
66
70
  "@effect-rx/rx-react": "0.38.0",
67
- "@effect/platform": "0.89.0",
71
+ "@effect/platform": "0.90.2",
68
72
  "@types/react": "~18.2.0",
69
73
  "@types/react-dom": "~18.2.0",
70
74
  "react": "~18.2.0",
71
75
  "react-dom": "~18.2.0",
72
- "vite": "5.4.7",
73
- "@dxos/react-ui": "0.8.4-main.c1de068",
74
- "@dxos/react-ui-theme": "0.8.4-main.c1de068",
75
- "@dxos/storybook-utils": "0.8.4-main.c1de068"
76
+ "vite": "7.1.1",
77
+ "@dxos/react-ui": "0.8.4-main.dedc0f3",
78
+ "@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
79
+ "@dxos/storybook-utils": "0.8.4-main.dedc0f3"
76
80
  },
77
81
  "peerDependencies": {
78
82
  "@effect-rx/rx-react": "^0.34.1",
@@ -80,8 +84,8 @@
80
84
  "effect": "^3.13.3",
81
85
  "react": "~18.2.0",
82
86
  "react-dom": "~18.2.0",
83
- "@dxos/react-ui": "0.8.4-main.c1de068",
84
- "@dxos/react-ui-theme": "0.8.4-main.c1de068"
87
+ "@dxos/react-ui-theme": "0.8.4-main.dedc0f3",
88
+ "@dxos/react-ui": "0.8.4-main.dedc0f3"
85
89
  },
86
90
  "publishConfig": {
87
91
  "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';
@@ -73,10 +73,16 @@ export const DeckPlugin = () =>
73
73
  activatesOn: Events.SetupAppGraph,
74
74
  activate: AppGraphBuilder,
75
75
  }),
76
+ // defineModule({
77
+ // id: `${meta.id}/module/tools`,
78
+ // activatesOn: Events.SetupArtifactDefinition,
79
+ // activate: Tools,
80
+ // }),
76
81
  defineModule({
77
- id: `${meta.id}/module/tools`,
78
- activatesOn: Events.SetupArtifactDefinition,
79
- activate: Tools,
82
+ id: `${meta.id}/module/toolkit`,
83
+ // TODO(wittjosiah): Shouldn't use the startup event.
84
+ activatesOn: Events.Startup,
85
+ activate: Toolkit,
80
86
  }),
81
87
  defineModule({
82
88
  id: `${meta.id}/module/url`,
@@ -5,13 +5,14 @@
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
11
 
12
- import { DeckCapabilities } from './capabilities';
13
12
  import { DECK_PLUGIN } from '../meta';
14
13
 
14
+ import { DeckCapabilities } from './capabilities';
15
+
15
16
  export default (context: PluginContext) =>
16
17
  contributes(
17
18
  Capabilities.AppGraphBuilder,
@@ -2,7 +2,7 @@
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
7
  import { DECK_PLUGIN } from '../meta';
8
8
  import { type DeckSettingsProps } from '../types';
@@ -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
28
  import { DECK_PLUGIN } 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({
@@ -6,10 +6,11 @@ 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
10
  import { DECK_PLUGIN } from '../meta';
12
11
 
12
+ import { DeckCapabilities } from './capabilities';
13
+
13
14
  export default () =>
14
15
  contributes(Capabilities.ReactRoot, {
15
16
  id: DECK_PLUGIN,
@@ -7,7 +7,7 @@ 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';
10
+ import { Banner, DeckSettings } from '../components';
11
11
  import { DECK_PLUGIN } from '../meta';
12
12
  import { type DeckSettingsProps } from '../types';
13
13
 
@@ -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,9 +8,10 @@ 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 { DeckCapabilities } from './capabilities';
12
11
  import { DECK_PLUGIN } from '../meta';
13
- import { getMode, type DeckPluginState, defaultDeck, type DeckState } from '../types';
12
+ import { type DeckPluginState, type DeckState, defaultDeck, getMode } from '../types';
13
+
14
+ import { DeckCapabilities } from './capabilities';
14
15
 
15
16
  const boolean = /true|false/;
16
17
 
@@ -0,0 +1,55 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { AiTool, AiToolkit } 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 Toolkit extends AiToolkit.make(
16
+ AiTool.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
+ Toolkit.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, Toolkit),
54
+ contributes(Capabilities.ToolkitHandler, Toolkit.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.
@@ -2,12 +2,13 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, createIntent, LayoutAction, type PluginContext } from '@dxos/app-framework';
5
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
6
6
  import { scheduledEffect } from '@dxos/echo-signals/core';
7
7
 
8
- import { DeckCapabilities } from './capabilities';
9
8
  import { defaultDeck } from '../types';
10
9
 
10
+ import { DeckCapabilities } from './capabilities';
11
+
11
12
  // TODO(wittjosiah): Cleanup the url handling. May justify introducing routing capabilities.
12
13
  export default async (context: PluginContext) => {
13
14
  const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Surface } from '@dxos/app-framework';
8
- import { useTranslation, type ThemedClassName } from '@dxos/react-ui';
8
+ import { type ThemedClassName, useTranslation } from '@dxos/react-ui';
9
9
  import { mx } from '@dxos/react-ui-theme';
10
10
 
11
11
  import { DECK_PLUGIN } from '../../meta';
@@ -10,8 +10,8 @@ import { DeckCapabilities } from '../../capabilities';
10
10
  import { useBreakpoints } from '../../hooks';
11
11
  import { getMode } from '../../types';
12
12
  import { layoutAppliesTopbar } from '../../util';
13
- import { ToggleSidebarButton } from '../Sidebar';
14
13
  import { fixedSidebarToggleStyles } from '../fragments';
14
+ import { ToggleSidebarButton } from '../Sidebar';
15
15
 
16
16
  export const ContentEmpty = () => {
17
17
  const breakpoint = useBreakpoints();
@@ -3,7 +3,7 @@
3
3
  //
4
4
 
5
5
  import { untracked } from '@preact/signals-core';
6
- import React, { useCallback, useEffect, useMemo, useRef, type UIEvent, Fragment } from 'react';
6
+ import React, { Fragment, type UIEvent, useCallback, useEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  import {
9
9
  Capabilities,
@@ -15,24 +15,25 @@ import {
15
15
  } from '@dxos/app-framework';
16
16
  import { AttentionCapabilities } from '@dxos/plugin-attention';
17
17
  import { Main, type MainProps, useMediaQuery, useOnTransition } from '@dxos/react-ui';
18
- import { Stack, StackContext, DEFAULT_HORIZONTAL_SIZE } from '@dxos/react-ui-stack';
18
+ import { DEFAULT_HORIZONTAL_SIZE, Stack, StackContext } from '@dxos/react-ui-stack';
19
19
  import { mainPaddingTransitions } from '@dxos/react-ui-theme';
20
20
 
21
- import { ActiveNode } from './ActiveNode';
22
- import { ContentEmpty } from './ContentEmpty';
23
- import { Dialog } from './Dialog';
24
- import { PopoverContent, PopoverRoot } from './Popover';
25
- import { StatusBar } from './StatusBar';
26
- import { Toast } from './Toast';
27
- import { Topbar } from './Topbar';
28
21
  import { DeckCapabilities } from '../../capabilities';
29
22
  import { useBreakpoints, useHoistStatusbar } from '../../hooks';
30
23
  import { DECK_PLUGIN } from '../../meta';
31
24
  import { type DeckSettingsProps, getMode } from '../../types';
32
25
  import { calculateOverscroll, layoutAppliesTopbar } from '../../util';
26
+ import { fixedComplementarySidebarToggleStyles, fixedSidebarToggleStyles } from '../fragments';
33
27
  import { Plank } from '../Plank';
34
28
  import { ComplementarySidebar, Sidebar, ToggleComplementarySidebarButton, ToggleSidebarButton } from '../Sidebar';
35
- import { fixedComplementarySidebarToggleStyles, fixedSidebarToggleStyles } from '../fragments';
29
+
30
+ import { ActiveNode } from './ActiveNode';
31
+ import { ContentEmpty } from './ContentEmpty';
32
+ import { Dialog } from './Dialog';
33
+ import { PopoverContent, PopoverRoot } from './Popover';
34
+ import { StatusBar } from './StatusBar';
35
+ import { Toast } from './Toast';
36
+ import { Topbar } from './Topbar';
36
37
 
37
38
  export type DeckLayoutProps = {
38
39
  onDismissToast: (id: string) => void;
@@ -5,7 +5,7 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { Input, Select, useTranslation } from '@dxos/react-ui';
8
- import { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';
8
+ import { ControlGroup, ControlItemInput, ControlPage, ControlSection } from '@dxos/react-ui-form';
9
9
 
10
10
  import { DECK_PLUGIN } from '../../meta';
11
11
  import {
@@ -22,67 +22,76 @@ export const DeckSettings = ({ settings }: { settings: DeckSettingsProps }) => {
22
22
  const { t } = useTranslation(DECK_PLUGIN);
23
23
 
24
24
  return (
25
- <DeprecatedFormContainer>
26
- <DeprecatedFormInput label={t('settings enable deck label')}>
27
- <Input.Switch checked={settings.enableDeck} onCheckedChange={(checked) => (settings.enableDeck = checked)} />
28
- </DeprecatedFormInput>
29
- <DeprecatedFormInput label={t('select new plank positioning label')}>
30
- <Select.Root
31
- disabled={!settings.enableDeck}
32
- value={settings.newPlankPositioning ?? 'start'}
33
- onValueChange={(value) => (settings.newPlankPositioning = value as NewPlankPositioning)}
34
- >
35
- <Select.TriggerButton placeholder={t('select new plank positioning placeholder')} />
36
- <Select.Portal>
37
- <Select.Content>
38
- <Select.Viewport>
39
- {NewPlankPositions.map((position) => (
40
- <Select.Option key={position} value={position}>
41
- {t(`settings new plank position ${position} label`)}
42
- </Select.Option>
43
- ))}
44
- </Select.Viewport>
45
- </Select.Content>
46
- </Select.Portal>
47
- </Select.Root>
48
- </DeprecatedFormInput>
49
- <DeprecatedFormInput label={t('settings overscroll label')}>
50
- <Select.Root
51
- disabled={!settings.enableDeck}
52
- value={settings.overscroll ?? 'none'}
53
- onValueChange={(value) => (settings.overscroll = value as Overscroll)}
54
- >
55
- <Select.TriggerButton placeholder={t('select overscroll placeholder')} />
56
- <Select.Portal>
57
- <Select.Content>
58
- <Select.Viewport>
59
- {OverscrollOptions.map((option) => (
60
- <Select.Option key={option} value={option}>
61
- {t(`settings overscroll ${option} label`)}
62
- </Select.Option>
63
- ))}
64
- </Select.Viewport>
65
- </Select.Content>
66
- </Select.Portal>
67
- </Select.Root>
68
- </DeprecatedFormInput>
69
- <DeprecatedFormInput label={t('settings enable statusbar label')}>
70
- <Input.Switch
71
- checked={settings.enableStatusbar}
72
- onCheckedChange={(checked) => (settings.enableStatusbar = checked)}
73
- />
74
- </DeprecatedFormInput>
75
- <DeprecatedFormInput label={t('settings show hints label')}>
76
- <Input.Switch checked={settings.showHints} onCheckedChange={(checked) => (settings.showHints = checked)} />
77
- </DeprecatedFormInput>
78
- {!isSocket && (
79
- <DeprecatedFormInput label={t('settings native redirect label')}>
80
- <Input.Switch
81
- checked={settings.enableNativeRedirect}
82
- onCheckedChange={(checked) => (settings.enableNativeRedirect = checked)}
83
- />
84
- </DeprecatedFormInput>
85
- )}
86
- </DeprecatedFormContainer>
25
+ <ControlPage>
26
+ <ControlSection title={t('settings title', { ns: DECK_PLUGIN })}>
27
+ <ControlGroup>
28
+ <ControlItemInput title={t('settings enable deck label')}>
29
+ <Input.Switch
30
+ checked={settings.enableDeck}
31
+ onCheckedChange={(checked) => (settings.enableDeck = checked)}
32
+ />
33
+ </ControlItemInput>
34
+ <ControlItemInput title={t('select new plank positioning label')}>
35
+ <Select.Root
36
+ disabled={!settings.enableDeck}
37
+ value={settings.newPlankPositioning ?? 'start'}
38
+ onValueChange={(value) => (settings.newPlankPositioning = value as NewPlankPositioning)}
39
+ >
40
+ <Select.TriggerButton placeholder={t('select new plank positioning placeholder')} />
41
+ <Select.Portal>
42
+ <Select.Content>
43
+ <Select.Viewport>
44
+ {NewPlankPositions.map((position) => (
45
+ <Select.Option key={position} value={position}>
46
+ {t(`settings new plank position ${position} label`)}
47
+ </Select.Option>
48
+ ))}
49
+ </Select.Viewport>
50
+ <Select.Arrow />
51
+ </Select.Content>
52
+ </Select.Portal>
53
+ </Select.Root>
54
+ </ControlItemInput>
55
+ <ControlItemInput title={t('settings overscroll label')}>
56
+ <Select.Root
57
+ disabled={!settings.enableDeck}
58
+ value={settings.overscroll ?? 'none'}
59
+ onValueChange={(value) => (settings.overscroll = value as Overscroll)}
60
+ >
61
+ <Select.TriggerButton placeholder={t('select overscroll placeholder')} />
62
+ <Select.Portal>
63
+ <Select.Content>
64
+ <Select.Viewport>
65
+ {OverscrollOptions.map((option) => (
66
+ <Select.Option key={option} value={option}>
67
+ {t(`settings overscroll ${option} label`)}
68
+ </Select.Option>
69
+ ))}
70
+ </Select.Viewport>
71
+ <Select.Arrow />
72
+ </Select.Content>
73
+ </Select.Portal>
74
+ </Select.Root>
75
+ </ControlItemInput>
76
+ <ControlItemInput title={t('settings enable statusbar label')}>
77
+ <Input.Switch
78
+ checked={settings.enableStatusbar}
79
+ onCheckedChange={(checked) => (settings.enableStatusbar = checked)}
80
+ />
81
+ </ControlItemInput>
82
+ <ControlItemInput title={t('settings show hints label')}>
83
+ <Input.Switch checked={settings.showHints} onCheckedChange={(checked) => (settings.showHints = checked)} />
84
+ </ControlItemInput>
85
+ {!isSocket && (
86
+ <ControlItemInput title={t('settings native redirect label')}>
87
+ <Input.Switch
88
+ checked={settings.enableNativeRedirect}
89
+ onCheckedChange={(checked) => (settings.enableNativeRedirect = checked)}
90
+ />
91
+ </ControlItemInput>
92
+ )}
93
+ </ControlGroup>
94
+ </ControlSection>
95
+ </ControlPage>
87
96
  );
88
97
  };