@dxos/plugin-client 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d

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 (113) hide show
  1. package/dist/lib/browser/{app-graph-builder-3EILEBWW.mjs → app-graph-builder-ENKIVZWH.mjs} +4 -4
  2. package/dist/lib/browser/app-graph-builder-ENKIVZWH.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-AWXKL4UR.mjs → chunk-3F2Q2RKC.mjs} +1 -1
  4. package/dist/lib/browser/chunk-3F2Q2RKC.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-64ANQXYZ.mjs → chunk-56EADSTE.mjs} +19 -17
  6. package/dist/lib/browser/chunk-56EADSTE.mjs.map +7 -0
  7. package/dist/lib/browser/{chunk-Q7TFRFHI.mjs → chunk-HLWIF3AW.mjs} +13 -14
  8. package/dist/lib/browser/chunk-HLWIF3AW.mjs.map +7 -0
  9. package/dist/lib/browser/{client-JFNMEFOK.mjs → client-F73MIXMT.mjs} +10 -4
  10. package/dist/lib/browser/client-F73MIXMT.mjs.map +7 -0
  11. package/dist/lib/browser/index.mjs +9 -9
  12. package/dist/lib/browser/index.mjs.map +3 -3
  13. package/dist/lib/browser/{intent-resolver-YGAQVXI2.mjs → intent-resolver-S3PUYK5Q.mjs} +12 -12
  14. package/dist/lib/browser/intent-resolver-S3PUYK5Q.mjs.map +7 -0
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{migrations-5COKGS4E.mjs → migrations-YJSO7JXY.mjs} +2 -2
  17. package/dist/lib/{node-esm/migrations-FE4PDX6W.mjs.map → browser/migrations-YJSO7JXY.mjs.map} +2 -2
  18. package/dist/lib/browser/{react-context-GBNYT5QK.mjs → react-context-QBXCHNH2.mjs} +2 -2
  19. package/dist/lib/browser/{react-context-GBNYT5QK.mjs.map → react-context-QBXCHNH2.mjs.map} +2 -2
  20. package/dist/lib/browser/{react-surface-YKQAUE2M.mjs → react-surface-YON76BFE.mjs} +4 -4
  21. package/dist/lib/browser/{react-surface-YKQAUE2M.mjs.map → react-surface-YON76BFE.mjs.map} +3 -3
  22. package/dist/lib/browser/{schema-defs-6L7W2RHL.mjs → schema-defs-AMSX6T3B.mjs} +2 -2
  23. package/dist/lib/browser/schema-defs-AMSX6T3B.mjs.map +7 -0
  24. package/dist/lib/browser/types/index.mjs +10 -0
  25. package/dist/lib/node-esm/{app-graph-builder-GINHOE7A.mjs → app-graph-builder-D4XJCLPN.mjs} +4 -4
  26. package/dist/lib/node-esm/app-graph-builder-D4XJCLPN.mjs.map +7 -0
  27. package/dist/lib/node-esm/{chunk-3BUB64JB.mjs → chunk-IOGTQFLM.mjs} +1 -1
  28. package/dist/lib/node-esm/chunk-IOGTQFLM.mjs.map +7 -0
  29. package/dist/lib/node-esm/{chunk-K4PIKBQQ.mjs → chunk-J6I6JZPI.mjs} +19 -17
  30. package/dist/lib/node-esm/chunk-J6I6JZPI.mjs.map +7 -0
  31. package/dist/lib/node-esm/{chunk-GDJMDBWM.mjs → chunk-JG6AFSFU.mjs} +13 -14
  32. package/dist/lib/node-esm/chunk-JG6AFSFU.mjs.map +7 -0
  33. package/dist/lib/node-esm/{client-XDYQARBL.mjs → client-A7CNP37P.mjs} +10 -4
  34. package/dist/lib/node-esm/client-A7CNP37P.mjs.map +7 -0
  35. package/dist/lib/node-esm/index.mjs +9 -9
  36. package/dist/lib/node-esm/index.mjs.map +3 -3
  37. package/dist/lib/node-esm/{intent-resolver-IN7YG7N7.mjs → intent-resolver-EBJABYM3.mjs} +12 -12
  38. package/dist/lib/node-esm/intent-resolver-EBJABYM3.mjs.map +7 -0
  39. package/dist/lib/node-esm/meta.json +1 -1
  40. package/dist/lib/node-esm/{migrations-FE4PDX6W.mjs → migrations-UOEK7HB7.mjs} +2 -2
  41. package/dist/lib/{browser/migrations-5COKGS4E.mjs.map → node-esm/migrations-UOEK7HB7.mjs.map} +2 -2
  42. package/dist/lib/node-esm/{react-context-UCK43H3Z.mjs → react-context-JIH7YBFI.mjs} +2 -2
  43. package/dist/lib/node-esm/{react-context-UCK43H3Z.mjs.map → react-context-JIH7YBFI.mjs.map} +2 -2
  44. package/dist/lib/node-esm/{react-surface-HDHC6XHQ.mjs → react-surface-YKCZF43D.mjs} +4 -4
  45. package/dist/lib/node-esm/{react-surface-HDHC6XHQ.mjs.map → react-surface-YKCZF43D.mjs.map} +3 -3
  46. package/dist/lib/node-esm/{schema-defs-GZIVMHLW.mjs → schema-defs-4UTKKRTF.mjs} +2 -2
  47. package/dist/lib/node-esm/schema-defs-4UTKKRTF.mjs.map +7 -0
  48. package/dist/lib/node-esm/{types.mjs → types/index.mjs} +3 -3
  49. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  50. package/dist/types/src/capabilities/capabilities.d.ts +2 -3
  51. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  52. package/dist/types/src/capabilities/client.d.ts.map +1 -1
  53. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  54. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  55. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  56. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  57. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
  58. package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
  59. package/dist/types/src/components/DevicesContainer.stories.d.ts +1 -1
  60. package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -1
  61. package/dist/types/src/components/ProfileContainer.stories.d.ts +1 -1
  62. package/dist/types/src/components/ProfileContainer.stories.d.ts.map +1 -1
  63. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +1 -1
  64. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +1 -1
  65. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +1 -1
  66. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
  67. package/dist/types/src/components/ResetDialog.stories.d.ts +1 -1
  68. package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
  69. package/dist/types/src/types/index.d.ts +2 -0
  70. package/dist/types/src/types/index.d.ts.map +1 -0
  71. package/dist/types/src/{types.d.ts → types/schema.d.ts} +30 -24
  72. package/dist/types/src/types/schema.d.ts.map +1 -0
  73. package/dist/types/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +32 -32
  75. package/src/ClientPlugin.ts +2 -2
  76. package/src/capabilities/app-graph-builder.ts +4 -3
  77. package/src/capabilities/capabilities.ts +4 -3
  78. package/src/capabilities/client.ts +6 -4
  79. package/src/capabilities/intent-resolver.ts +5 -4
  80. package/src/capabilities/migrations.ts +1 -1
  81. package/src/capabilities/react-context.tsx +2 -1
  82. package/src/capabilities/react-surface.tsx +3 -3
  83. package/src/capabilities/schema-defs.ts +3 -3
  84. package/src/components/DevicesContainer.stories.tsx +5 -4
  85. package/src/components/DevicesContainer.tsx +6 -4
  86. package/src/components/JoinDialog.tsx +1 -1
  87. package/src/components/ProfileContainer.stories.tsx +4 -3
  88. package/src/components/ProfileContainer.tsx +5 -5
  89. package/src/components/RecoveryCodeDialog.stories.tsx +4 -3
  90. package/src/components/RecoveryCredentialsContainer.stories.tsx +5 -4
  91. package/src/components/RecoveryCredentialsContainer.tsx +1 -1
  92. package/src/components/ResetDialog.stories.tsx +4 -3
  93. package/src/components/ResetDialog.tsx +1 -1
  94. package/src/types/index.ts +5 -0
  95. package/src/{types.ts → types/schema.ts} +14 -15
  96. package/dist/lib/browser/app-graph-builder-3EILEBWW.mjs.map +0 -7
  97. package/dist/lib/browser/chunk-64ANQXYZ.mjs.map +0 -7
  98. package/dist/lib/browser/chunk-AWXKL4UR.mjs.map +0 -7
  99. package/dist/lib/browser/chunk-Q7TFRFHI.mjs.map +0 -7
  100. package/dist/lib/browser/client-JFNMEFOK.mjs.map +0 -7
  101. package/dist/lib/browser/intent-resolver-YGAQVXI2.mjs.map +0 -7
  102. package/dist/lib/browser/schema-defs-6L7W2RHL.mjs.map +0 -7
  103. package/dist/lib/browser/types.mjs +0 -10
  104. package/dist/lib/node-esm/app-graph-builder-GINHOE7A.mjs.map +0 -7
  105. package/dist/lib/node-esm/chunk-3BUB64JB.mjs.map +0 -7
  106. package/dist/lib/node-esm/chunk-GDJMDBWM.mjs.map +0 -7
  107. package/dist/lib/node-esm/chunk-K4PIKBQQ.mjs.map +0 -7
  108. package/dist/lib/node-esm/client-XDYQARBL.mjs.map +0 -7
  109. package/dist/lib/node-esm/intent-resolver-IN7YG7N7.mjs.map +0 -7
  110. package/dist/lib/node-esm/schema-defs-GZIVMHLW.mjs.map +0 -7
  111. package/dist/types/src/types.d.ts.map +0 -1
  112. /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
  113. /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-client",
3
- "version": "0.8.4-main.f9ba587",
3
+ "version": "0.8.4-main.fd6878d",
4
4
  "description": "DXOS Surface plugin for DXOS Client",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,21 +10,23 @@
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
  "node": "./dist/lib/node-esm/index.mjs"
16
17
  },
17
18
  "./types": {
18
- "types": "./dist/types/src/types.d.ts",
19
- "browser": "./dist/lib/browser/types.mjs",
20
- "node": "./dist/lib/node-esm/types.mjs"
19
+ "source": "./src/types/index.ts",
20
+ "types": "./dist/types/src/types/index.d.ts",
21
+ "browser": "./dist/lib/browser/types/index.mjs",
22
+ "node": "./dist/lib/node-esm/types/index.mjs"
21
23
  }
22
24
  },
23
25
  "types": "dist/types/src/index.d.ts",
24
26
  "typesVersions": {
25
27
  "*": {
26
28
  "types": [
27
- "dist/types/src/types.d.ts"
29
+ "dist/types/src/types/index.d.ts"
28
30
  ]
29
31
  }
30
32
  },
@@ -36,48 +38,46 @@
36
38
  "@preact-signals/safe-react": "^0.9.0",
37
39
  "@preact/signals-core": "^1.9.0",
38
40
  "react-qr-rounded": "^1.0.0",
39
- "@dxos/app-framework": "0.8.4-main.f9ba587",
40
- "@dxos/async": "0.8.4-main.f9ba587",
41
- "@dxos/echo": "0.8.4-main.f9ba587",
42
- "@dxos/config": "0.8.4-main.f9ba587",
43
- "@dxos/echo-schema": "0.8.4-main.f9ba587",
44
- "@dxos/echo-signals": "0.8.4-main.f9ba587",
45
- "@dxos/local-storage": "0.8.4-main.f9ba587",
46
- "@dxos/invariant": "0.8.4-main.f9ba587",
47
- "@dxos/plugin-graph": "0.8.4-main.f9ba587",
48
- "@dxos/log": "0.8.4-main.f9ba587",
49
- "@dxos/plugin-observability": "0.8.4-main.f9ba587",
50
- "@dxos/react-client": "0.8.4-main.f9ba587",
51
- "@dxos/react-ui-form": "0.8.4-main.f9ba587",
52
- "@dxos/react-ui-pickers": "0.8.4-main.f9ba587",
53
- "@dxos/react-ui-stack": "0.8.4-main.f9ba587",
54
- "@dxos/shell": "0.8.4-main.f9ba587",
55
- "@dxos/util": "0.8.4-main.f9ba587"
41
+ "@dxos/app-framework": "0.8.4-main.fd6878d",
42
+ "@dxos/echo": "0.8.4-main.fd6878d",
43
+ "@dxos/async": "0.8.4-main.fd6878d",
44
+ "@dxos/echo-schema": "0.8.4-main.fd6878d",
45
+ "@dxos/config": "0.8.4-main.fd6878d",
46
+ "@dxos/invariant": "0.8.4-main.fd6878d",
47
+ "@dxos/echo-signals": "0.8.4-main.fd6878d",
48
+ "@dxos/local-storage": "0.8.4-main.fd6878d",
49
+ "@dxos/log": "0.8.4-main.fd6878d",
50
+ "@dxos/plugin-observability": "0.8.4-main.fd6878d",
51
+ "@dxos/react-client": "0.8.4-main.fd6878d",
52
+ "@dxos/react-ui-form": "0.8.4-main.fd6878d",
53
+ "@dxos/shell": "0.8.4-main.fd6878d",
54
+ "@dxos/react-ui-stack": "0.8.4-main.fd6878d",
55
+ "@dxos/util": "0.8.4-main.fd6878d",
56
+ "@dxos/react-ui-pickers": "0.8.4-main.fd6878d",
57
+ "@dxos/plugin-graph": "0.8.4-main.fd6878d"
56
58
  },
57
59
  "devDependencies": {
58
60
  "@effect-rx/rx-react": "0.38.0",
59
- "@effect/platform": "0.88.0",
60
- "@phosphor-icons/react": "^2.1.5",
61
+ "@effect/platform": "0.90.2",
61
62
  "@types/react": "~18.2.0",
62
63
  "@types/react-dom": "~18.2.0",
63
- "effect": "3.16.13",
64
+ "effect": "3.17.7",
64
65
  "react": "~18.2.0",
65
66
  "react-dom": "~18.2.0",
66
67
  "vite": "5.4.7",
67
- "@dxos/live-object": "0.8.4-main.f9ba587",
68
- "@dxos/react-ui": "0.8.4-main.f9ba587",
69
- "@dxos/react-ui-theme": "0.8.4-main.f9ba587",
70
- "@dxos/storybook-utils": "0.8.4-main.f9ba587"
68
+ "@dxos/live-object": "0.8.4-main.fd6878d",
69
+ "@dxos/react-ui": "0.8.4-main.fd6878d",
70
+ "@dxos/react-ui-theme": "0.8.4-main.fd6878d",
71
+ "@dxos/storybook-utils": "0.8.4-main.fd6878d"
71
72
  },
72
73
  "peerDependencies": {
73
74
  "@effect-rx/rx-react": "^0.34.1",
74
75
  "@effect/platform": "^0.80.12",
75
- "@phosphor-icons/react": "^2.1.5",
76
76
  "effect": "^3.13.3",
77
77
  "react": "~18.2.0",
78
78
  "react-dom": "~18.2.0",
79
- "@dxos/react-ui": "0.8.4-main.f9ba587",
80
- "@dxos/react-ui-theme": "0.8.4-main.f9ba587"
79
+ "@dxos/react-ui": "0.8.4-main.fd6878d",
80
+ "@dxos/react-ui-theme": "0.8.4-main.fd6878d"
81
81
  },
82
82
  "publishConfig": {
83
83
  "access": "public"
@@ -2,11 +2,11 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, defineModule, definePlugin, Events, oneOf } from '@dxos/app-framework';
5
+ import { Capabilities, Events, contributes, defineModule, definePlugin, oneOf } from '@dxos/app-framework';
6
6
 
7
7
  import {
8
- Client,
9
8
  AppGraphBuilder,
9
+ Client,
10
10
  IntentResolver,
11
11
  Migrations,
12
12
  ReactContext,
@@ -6,14 +6,15 @@ import { Rx } from '@effect-rx/rx-react';
6
6
  import { Option, pipe } from 'effect';
7
7
 
8
8
  import { createIntent } from '@dxos/app-framework';
9
- import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
10
- import { createExtension, rxFromObservable, ROOT_ID } from '@dxos/plugin-graph';
9
+ import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
10
+ import { ROOT_ID, createExtension, rxFromObservable } from '@dxos/plugin-graph';
11
11
  import { ConnectionState } from '@dxos/react-client/mesh';
12
12
 
13
- import { ClientCapabilities } from './capabilities';
14
13
  import { CLIENT_PLUGIN } from '../meta';
15
14
  import { Account, ClientAction } from '../types';
16
15
 
16
+ import { ClientCapabilities } from './capabilities';
17
+
17
18
  export default (context: PluginContext) =>
18
19
  contributes(
19
20
  Capabilities.AppGraphBuilder,
@@ -5,13 +5,14 @@
5
5
  import { defineCapability } from '@dxos/app-framework';
6
6
  import { type Client } from '@dxos/client';
7
7
  import { type ObjectMigration } from '@dxos/client/echo';
8
- import { type TypedObject } from '@dxos/echo-schema';
8
+ import { type Type } from '@dxos/echo';
9
9
 
10
10
  import { CLIENT_PLUGIN } from '../meta';
11
11
 
12
12
  export namespace ClientCapabilities {
13
13
  export const Client = defineCapability<Client>(`${CLIENT_PLUGIN}/capability/client`);
14
- export const Schema = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema`);
15
- export const SchemaWhiteList = defineCapability<TypedObject[]>(`${CLIENT_PLUGIN}/capability/schema-whitelist`);
14
+ export const Schema = defineCapability<Type.Obj.Any[]>(`${CLIENT_PLUGIN}/capability/schema`);
15
+ // TODO(wittjosiah): More descriptive name.
16
+ export const SchemaWhiteList = defineCapability<Type.Obj.Any[]>(`${CLIENT_PLUGIN}/capability/schema-whitelist`);
16
17
  export const Migration = defineCapability<ObjectMigration[]>(`${CLIENT_PLUGIN}/capability/migration`);
17
18
  }
@@ -2,13 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes, type PluginContext } from '@dxos/app-framework';
5
+ import { type PluginContext, contributes } from '@dxos/app-framework';
6
6
  import { Client } from '@dxos/react-client';
7
7
 
8
- import { ClientCapabilities } from './capabilities';
9
8
  import { ClientEvents } from '../events';
10
9
  import { type ClientPluginOptions } from '../types';
11
10
 
11
+ import { ClientCapabilities } from './capabilities';
12
+
12
13
  type ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationUrl' | 'invitationParam' | 'onReset'> & {
13
14
  context: PluginContext;
14
15
  };
@@ -16,7 +17,7 @@ type ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationU
16
17
  export default async ({ context, onClientInitialized, onSpacesReady, ...options }: ClientCapabilityOptions) => {
17
18
  const client = new Client(options);
18
19
  await client.initialize();
19
- await onClientInitialized?.(context, client);
20
+ await onClientInitialized?.({ context, client });
20
21
 
21
22
  // TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.
22
23
  client.reloaded.on(() => {
@@ -27,10 +28,11 @@ export default async ({ context, onClientInitialized, onSpacesReady, ...options
27
28
  });
28
29
  });
29
30
 
31
+ // TODO(burdon): The callback isn't called?
30
32
  const subscription = client.spaces.isReady.subscribe(async (ready) => {
31
33
  if (ready) {
32
34
  await context.activatePromise(ClientEvents.SpacesReady);
33
- await onSpacesReady?.(context, client);
35
+ await onSpacesReady?.({ context, client });
34
36
  }
35
37
  });
36
38
 
@@ -6,23 +6,24 @@ import { pipe } from 'effect';
6
6
 
7
7
  import {
8
8
  Capabilities,
9
+ LayoutAction,
10
+ type PluginContext,
9
11
  chain,
10
12
  contributes,
11
13
  createIntent,
12
14
  createResolver,
13
- LayoutAction,
14
- type PluginContext,
15
15
  } from '@dxos/app-framework';
16
16
  import { invariant } from '@dxos/invariant';
17
17
  import { ObservabilityAction } from '@dxos/plugin-observability/types';
18
18
  import { PublicKey } from '@dxos/react-client';
19
19
  import { type JoinPanelProps } from '@dxos/shell/react';
20
20
 
21
- import { ClientCapabilities } from './capabilities';
22
21
  import { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../components';
23
22
  import { ClientEvents } from '../events';
24
23
  import { Account, ClientAction } from '../types';
25
24
 
25
+ import { ClientCapabilities } from './capabilities';
26
+
26
27
  type IntentResolverOptions = {
27
28
  context: PluginContext;
28
29
  appName?: string;
@@ -173,7 +174,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
173
174
  challenge: new Uint8Array(),
174
175
  rp: { id: location.hostname, name: appName },
175
176
  user: {
176
- id: lookupKey.asUint8Array(),
177
+ id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,
177
178
  name: identity.did,
178
179
  displayName: identity.profile?.displayName ?? '',
179
180
  },
@@ -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 { ClientCapabilities } from './capabilities';
8
8
 
@@ -7,9 +7,10 @@ import React from 'react';
7
7
  import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
8
8
  import { ClientProvider } from '@dxos/react-client';
9
9
 
10
- import { ClientCapabilities } from './capabilities';
11
10
  import { CLIENT_PLUGIN } from '../meta';
12
11
 
12
+ import { ClientCapabilities } from './capabilities';
13
+
13
14
  export default () =>
14
15
  contributes(Capabilities.ReactContext, {
15
16
  id: CLIENT_PLUGIN,
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React from 'react';
6
6
 
7
- import { createSurface, Capabilities, contributes } from '@dxos/app-framework';
7
+ import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
8
  import { type JoinPanelProps } from '@dxos/shell/react';
9
9
 
10
10
  import {
@@ -13,12 +13,12 @@ import {
13
13
  JoinDialog,
14
14
  ProfileContainer,
15
15
  RECOVERY_CODE_DIALOG,
16
+ RESET_DIALOG,
16
17
  RecoveryCodeDialog,
18
+ type RecoveryCodeDialogProps,
17
19
  RecoveryCredentialsContainer,
18
- RESET_DIALOG,
19
20
  ResetDialog,
20
21
  type ResetDialogProps,
21
- type RecoveryCodeDialogProps,
22
22
  } from '../components';
23
23
  import { Account, type ClientPluginOptions } from '../types';
24
24
 
@@ -2,8 +2,8 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
6
- import { type TypedObject } from '@dxos/echo-schema';
5
+ import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
6
+ import { type Type } from '@dxos/echo';
7
7
 
8
8
  import { ClientCapabilities } from './capabilities';
9
9
 
@@ -12,7 +12,7 @@ export default (context: PluginContext) => {
12
12
  const client = context.getCapability(ClientCapabilities.Client);
13
13
 
14
14
  // TODO(wittjosiah): Unregister schemas when they are disabled.
15
- let previous: TypedObject[] = [];
15
+ let previous: Type.Obj.Any[] = [];
16
16
  const cancel = registry.subscribe(
17
17
  context.capabilities(ClientCapabilities.Schema),
18
18
  (_schemas) => {
@@ -4,17 +4,18 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
 
9
9
  import { IntentPlugin } from '@dxos/app-framework';
10
10
  import { withPluginManager } from '@dxos/app-framework/testing';
11
11
  import { translations as shellTranslations } from '@dxos/shell/react';
12
- import { withTheme, withLayout } from '@dxos/storybook-utils';
12
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
13
13
 
14
- import { DevicesContainer } from './DevicesContainer';
15
14
  import { ClientPlugin } from '../ClientPlugin';
16
15
  import { translations } from '../translations';
17
16
 
17
+ import { DevicesContainer } from './DevicesContainer';
18
+
18
19
  const meta: Meta = {
19
20
  title: 'plugins/plugin-client/DevicesContainer',
20
21
  component: DevicesContainer,
@@ -22,7 +23,7 @@ const meta: Meta = {
22
23
  withPluginManager({
23
24
  plugins: [
24
25
  ClientPlugin({
25
- onClientInitialized: async (_, client) => {
26
+ onClientInitialized: async ({ client }) => {
26
27
  await client.halo.createIdentity();
27
28
  },
28
29
  }),
@@ -2,7 +2,6 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Check, X } from '@phosphor-icons/react';
6
5
  import React, { useCallback, useEffect, useState } from 'react';
7
6
  import { QR } from 'react-qr-rounded';
8
7
 
@@ -12,7 +11,7 @@ import { useClient, useMulticastObservable } from '@dxos/react-client';
12
11
  import { type Device, useDevices } from '@dxos/react-client/halo';
13
12
  import { type CancellableInvitationObservable, Invitation, InvitationEncoder } from '@dxos/react-client/invitations';
14
13
  import { useNetworkStatus } from '@dxos/react-client/mesh';
15
- import { Button, Clipboard, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
14
+ import { Button, Clipboard, Icon, IconButton, List, useId, useTranslation } from '@dxos/react-ui';
16
15
  import {
17
16
  ControlFrame,
18
17
  ControlFrameItem,
@@ -22,7 +21,6 @@ import {
22
21
  ControlSection,
23
22
  } from '@dxos/react-ui-form';
24
23
  import { StackItem } from '@dxos/react-ui-stack';
25
- import { getSize, mx } from '@dxos/react-ui-theme';
26
24
  import { AuthCode, Centered, DeviceListItem, Emoji, Viewport } from '@dxos/shell/react';
27
25
  import { hexToEmoji } from '@dxos/util';
28
26
 
@@ -290,5 +288,9 @@ const InvitationAuthCode = ({ id, code, onCancel }: { id: string; code: string;
290
288
  };
291
289
 
292
290
  const InvitationComplete = ({ statusValue }: { statusValue: number }) => {
293
- return statusValue > 0 ? <Check className={mx('m-1.5', getSize(6))} /> : <X className={mx('m-1.5', getSize(6))} />;
291
+ return statusValue > 0 ? (
292
+ <Icon icon='ph--check--regular' size={6} classNames='m-1.5' />
293
+ ) : (
294
+ <Icon icon='ph--x--regular' size={6} classNames='m-1.5' />
295
+ );
294
296
  };
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React, { useCallback } from 'react';
6
6
 
7
- import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
7
+ import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
8
8
  import { ObservabilityAction } from '@dxos/plugin-observability/types';
9
9
  import { type InvitationResult } from '@dxos/react-client/invitations';
10
10
  import { Dialog, useTranslation } from '@dxos/react-ui';
@@ -4,14 +4,15 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
 
9
9
  import { withClientProvider } from '@dxos/react-client/testing';
10
- import { withTheme, withLayout } from '@dxos/storybook-utils';
10
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
11
11
 
12
- import { ProfileContainer } from './ProfileContainer';
13
12
  import { translations } from '../translations';
14
13
 
14
+ import { ProfileContainer } from './ProfileContainer';
15
+
15
16
  const meta: Meta = {
16
17
  title: 'plugins/plugin-client/ProfileContainer',
17
18
  component: ProfileContainer,
@@ -10,16 +10,16 @@ import { useClient } from '@dxos/react-client';
10
10
  import { type Identity, useIdentity } from '@dxos/react-client/halo';
11
11
  import { ButtonGroup, Clipboard, Input, useTranslation } from '@dxos/react-ui';
12
12
  import {
13
- Form,
14
- type InputComponent,
15
13
  ControlItem,
16
14
  ControlItemInput,
17
- ControlSection,
18
15
  ControlPage,
16
+ ControlSection,
17
+ Form,
18
+ type InputComponent,
19
19
  } from '@dxos/react-ui-form';
20
20
  import { EmojiPickerBlock, HuePicker } from '@dxos/react-ui-pickers';
21
21
  import { StackItem } from '@dxos/react-ui-stack';
22
- import { hexToHue, hexToEmoji } from '@dxos/util';
22
+ import { hexToEmoji, hexToHue } from '@dxos/util';
23
23
 
24
24
  import { CLIENT_PLUGIN } from '../meta';
25
25
 
@@ -58,7 +58,7 @@ export const ProfileContainer = () => {
58
58
  setDisplayNameDirectly(profile.displayName);
59
59
  setEmojiDirectly(profile.emoji);
60
60
  setHueDirectly(profile.hue);
61
- updateProfile(profile);
61
+ void updateProfile(profile);
62
62
  },
63
63
  [identity],
64
64
  );
@@ -4,17 +4,18 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
  import React, { useState } from 'react';
9
9
 
10
10
  import { useClient } from '@dxos/react-client';
11
11
  import { withClientProvider } from '@dxos/react-client/testing';
12
12
  import { AlertDialog, useAsyncEffect } from '@dxos/react-ui';
13
- import { withTheme, withLayout } from '@dxos/storybook-utils';
13
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
14
14
 
15
- import { RecoveryCodeDialog, type RecoveryCodeDialogProps } from './RecoveryCodeDialog';
16
15
  import { translations } from '../translations';
17
16
 
17
+ import { RecoveryCodeDialog, type RecoveryCodeDialogProps } from './RecoveryCodeDialog';
18
+
18
19
  const DefaultStory = () => {
19
20
  const client = useClient();
20
21
  const [recoveryCode, setRecoveryCode] = useState<string>();
@@ -4,16 +4,17 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
 
9
9
  import { IntentPlugin } from '@dxos/app-framework';
10
10
  import { withPluginManager } from '@dxos/app-framework/testing';
11
- import { withTheme, withLayout } from '@dxos/storybook-utils';
11
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
12
12
 
13
- import { RecoveryCredentialsContainer } from './RecoveryCredentialsContainer';
14
13
  import { ClientPlugin } from '../ClientPlugin';
15
14
  import { translations } from '../translations';
16
15
 
16
+ import { RecoveryCredentialsContainer } from './RecoveryCredentialsContainer';
17
+
17
18
  const meta: Meta = {
18
19
  title: 'plugins/plugin-client/RecoveryCredentialsContainer',
19
20
  component: RecoveryCredentialsContainer,
@@ -21,7 +22,7 @@ const meta: Meta = {
21
22
  withPluginManager({
22
23
  plugins: [
23
24
  ClientPlugin({
24
- onClientInitialized: async (_, client) => {
25
+ onClientInitialized: async ({ client }) => {
25
26
  await client.halo.createIdentity();
26
27
  },
27
28
  }),
@@ -6,7 +6,7 @@ import React from 'react';
6
6
 
7
7
  import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
8
8
  import { useCredentials } from '@dxos/react-client/halo';
9
- import { Icon, IconButton, List, ListItem, useTranslation, Message } from '@dxos/react-ui';
9
+ import { Icon, IconButton, List, ListItem, Message, useTranslation } from '@dxos/react-ui';
10
10
  import { ControlGroup, ControlItem, ControlPage, ControlSection } from '@dxos/react-ui-form';
11
11
  import { StackItem } from '@dxos/react-ui-stack';
12
12
 
@@ -4,17 +4,18 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
7
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
8
  import React from 'react';
9
9
 
10
10
  import { IntentPlugin } from '@dxos/app-framework';
11
11
  import { withPluginManager } from '@dxos/app-framework/testing';
12
12
  import { Dialog } from '@dxos/react-ui';
13
- import { withTheme, withLayout } from '@dxos/storybook-utils';
13
+ import { withLayout, withTheme } from '@dxos/storybook-utils';
14
14
 
15
- import { ResetDialog, type ResetDialogProps } from './ResetDialog';
16
15
  import { translations } from '../translations';
17
16
 
17
+ import { ResetDialog, type ResetDialogProps } from './ResetDialog';
18
+
18
19
  const Render = (props: ResetDialogProps) => {
19
20
  return (
20
21
  <Dialog.Root open>
@@ -4,7 +4,7 @@
4
4
 
5
5
  import React, { useCallback } from 'react';
6
6
 
7
- import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
7
+ import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
8
8
  import { useClient } from '@dxos/react-client';
9
9
  import { Dialog, useTranslation } from '@dxos/react-ui';
10
10
  import { ConfirmReset, type ConfirmResetProps } from '@dxos/shell/react';
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export * from './schema';
@@ -5,10 +5,10 @@
5
5
  import { Schema } from 'effect';
6
6
 
7
7
  import { type PluginContext } from '@dxos/app-framework';
8
- import { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';
8
+ import { type Client, type ClientOptions, PublicKey } from '@dxos/react-client';
9
9
  import { type MaybePromise } from '@dxos/util';
10
10
 
11
- import { CLIENT_PLUGIN } from './meta';
11
+ import { meta } from '../meta';
12
12
 
13
13
  // TODO(wittjosiah): Factor out. Generate?
14
14
  const IdentitySchema = Schema.Struct({
@@ -23,7 +23,6 @@ const IdentitySchema = Schema.Struct({
23
23
  ),
24
24
  });
25
25
 
26
- const CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;
27
26
  export namespace ClientAction {
28
27
  const ProfileSchema = Schema.Struct({
29
28
  displayName: Schema.optional(Schema.String),
@@ -31,59 +30,59 @@ export namespace ClientAction {
31
30
  data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
32
31
  });
33
32
 
34
- export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {
33
+ export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${meta.id}/action/create-identity`, {
35
34
  input: ProfileSchema,
36
35
  output: IdentitySchema,
37
36
  }) {}
38
37
 
39
- export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {
38
+ export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.id}/action/join-identity`, {
40
39
  input: Schema.Struct({
41
40
  invitationCode: Schema.optional(Schema.String),
42
41
  }),
43
42
  output: Schema.Void,
44
43
  }) {}
45
44
 
46
- export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {
45
+ export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.id}/action/share-identity`, {
47
46
  input: Schema.Void,
48
47
  output: Schema.Void,
49
48
  }) {}
50
49
 
51
- export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {
50
+ export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${meta.id}/action/recover-identity`, {
52
51
  input: Schema.Void,
53
52
  output: Schema.Void,
54
53
  }) {}
55
54
 
56
- export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {
55
+ export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.id}/action/reset-storage`, {
57
56
  input: Schema.Struct({
58
57
  mode: Schema.optional(Schema.String),
59
58
  }),
60
59
  output: Schema.Void,
61
60
  }) {}
62
61
 
63
- export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {
62
+ export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.id}/action/create-agent`, {
64
63
  input: Schema.Void,
65
64
  output: Schema.Void,
66
65
  }) {}
67
66
 
68
67
  export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(
69
- `${CLIENT_ACTION}/create-recovery-code`,
68
+ `${meta.id}/action/create-recovery-code`,
70
69
  {
71
70
  input: Schema.Void,
72
71
  output: Schema.Void,
73
72
  },
74
73
  ) {}
75
74
 
76
- export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {
75
+ export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.id}/action/create-passkey`, {
77
76
  input: Schema.Void,
78
77
  output: Schema.Void,
79
78
  }) {}
80
79
 
81
- export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {
80
+ export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.id}/action/redeem-passkey`, {
82
81
  input: Schema.Void,
83
82
  output: Schema.Void,
84
83
  }) {}
85
84
 
86
- export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {
85
+ export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.id}/action/redeem-token`, {
87
86
  input: Schema.Struct({
88
87
  token: Schema.String,
89
88
  }),
@@ -105,12 +104,12 @@ export type ClientPluginOptions = ClientOptions & {
105
104
  /**
106
105
  * Run after the client has been initialized.
107
106
  */
108
- onClientInitialized?: (context: PluginContext, client: Client) => MaybePromise<void>;
107
+ onClientInitialized?: (params: { context: PluginContext; client: Client }) => MaybePromise<void>;
109
108
 
110
109
  /**
111
110
  * Called when spaces are ready.
112
111
  */
113
- onSpacesReady?: (context: PluginContext, client: Client) => MaybePromise<void>;
112
+ onSpacesReady?: (params: { context: PluginContext; client: Client }) => MaybePromise<void>;
114
113
 
115
114
  /**
116
115
  * Called when the client is reset.