@dxos/plugin-client 0.8.2-main.5885341 → 0.8.2-main.600d381

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 (88) hide show
  1. package/dist/lib/browser/{app-graph-builder-WAS4YZNA.mjs → app-graph-builder-HF6N4HAT.mjs} +3 -2
  2. package/dist/lib/browser/app-graph-builder-HF6N4HAT.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-KBYCZ4HW.mjs +105 -0
  4. package/dist/lib/browser/chunk-KBYCZ4HW.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-XNV35HZK.mjs → chunk-LOUI7XSH.mjs} +8 -8
  6. package/dist/lib/browser/{chunk-XNV35HZK.mjs.map → chunk-LOUI7XSH.mjs.map} +3 -3
  7. package/dist/lib/browser/index.mjs +6 -6
  8. package/dist/lib/browser/index.mjs.map +3 -3
  9. package/dist/lib/browser/{intent-resolver-Y5GTS7CW.mjs → intent-resolver-UME7DARZ.mjs} +3 -3
  10. package/dist/lib/browser/meta.json +1 -1
  11. package/dist/lib/browser/{react-surface-AUZGNKC5.mjs → react-surface-A2R3JYXX.mjs} +3 -3
  12. package/dist/lib/browser/{schema-JQAT6Q7S.mjs → schema-defs-VAAQHAM7.mjs} +4 -4
  13. package/dist/lib/browser/{schema-JQAT6Q7S.mjs.map → schema-defs-VAAQHAM7.mjs.map} +2 -2
  14. package/dist/lib/browser/types.mjs +1 -1
  15. package/dist/lib/node/{app-graph-builder-PXOJZJO5.cjs → app-graph-builder-EX2ZCSCE.cjs} +14 -13
  16. package/dist/lib/node/app-graph-builder-EX2ZCSCE.cjs.map +7 -0
  17. package/dist/lib/node/{chunk-FROKBEVH.cjs → chunk-7MPFFPR7.cjs} +47 -47
  18. package/dist/lib/node/chunk-7MPFFPR7.cjs.map +7 -0
  19. package/dist/lib/node/{chunk-QNZIRU35.cjs → chunk-HEC6UXQX.cjs} +11 -11
  20. package/dist/lib/node/{chunk-QNZIRU35.cjs.map → chunk-HEC6UXQX.cjs.map} +3 -3
  21. package/dist/lib/node/index.cjs +6 -6
  22. package/dist/lib/node/index.cjs.map +3 -3
  23. package/dist/lib/node/{intent-resolver-ZFYETGJI.cjs → intent-resolver-33S7BRJP.cjs} +22 -22
  24. package/dist/lib/node/meta.json +1 -1
  25. package/dist/lib/node/{react-surface-GBPBVXLE.cjs → react-surface-FYWDPVXT.cjs} +24 -24
  26. package/dist/lib/node/{schema-INQ72F54.cjs → schema-defs-XMQEOUXA.cjs} +6 -6
  27. package/dist/lib/node/{schema-INQ72F54.cjs.map → schema-defs-XMQEOUXA.cjs.map} +2 -2
  28. package/dist/lib/node/types.cjs +3 -3
  29. package/dist/lib/node/types.cjs.map +1 -1
  30. package/dist/lib/node-esm/{app-graph-builder-KIN6NWFI.mjs → app-graph-builder-5LDVLNG5.mjs} +3 -2
  31. package/dist/lib/node-esm/app-graph-builder-5LDVLNG5.mjs.map +7 -0
  32. package/dist/lib/node-esm/{chunk-6G43BNMU.mjs → chunk-37CRJHYH.mjs} +8 -8
  33. package/dist/lib/node-esm/{chunk-6G43BNMU.mjs.map → chunk-37CRJHYH.mjs.map} +3 -3
  34. package/dist/lib/node-esm/chunk-ALO6XJEZ.mjs +106 -0
  35. package/dist/lib/node-esm/chunk-ALO6XJEZ.mjs.map +7 -0
  36. package/dist/lib/node-esm/index.mjs +6 -6
  37. package/dist/lib/node-esm/index.mjs.map +3 -3
  38. package/dist/lib/node-esm/{intent-resolver-OVG4QCHK.mjs → intent-resolver-4ULBB4ZA.mjs} +3 -3
  39. package/dist/lib/node-esm/meta.json +1 -1
  40. package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs → react-surface-VXMRB7IY.mjs} +3 -3
  41. package/dist/lib/node-esm/{schema-OK7HY3JJ.mjs → schema-defs-YQULJ6B6.mjs} +4 -4
  42. package/dist/lib/node-esm/{schema-OK7HY3JJ.mjs.map → schema-defs-YQULJ6B6.mjs.map} +2 -2
  43. package/dist/lib/node-esm/types.mjs +1 -1
  44. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  45. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/client.d.ts.map +1 -1
  47. package/dist/types/src/capabilities/index.d.ts +1 -1
  48. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  49. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  50. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  51. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  52. package/dist/types/src/capabilities/{schema.d.ts → schema-defs.d.ts} +1 -1
  53. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
  54. package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
  55. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  56. package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -1
  57. package/dist/types/src/components/ResetDialog.d.ts.map +1 -1
  58. package/dist/types/src/types.d.ts +51 -51
  59. package/dist/types/src/types.d.ts.map +1 -1
  60. package/dist/types/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +25 -24
  62. package/src/ClientPlugin.ts +2 -2
  63. package/src/capabilities/app-graph-builder.ts +1 -0
  64. package/src/capabilities/index.ts +1 -1
  65. package/src/components/DevicesContainer.stories.tsx +1 -1
  66. package/src/components/ProfileContainer.stories.tsx +1 -1
  67. package/src/components/ProfileContainer.tsx +7 -7
  68. package/src/components/RecoveryCodeDialog.stories.tsx +1 -1
  69. package/src/components/RecoveryCredentialsContainer.stories.tsx +1 -1
  70. package/src/components/ResetDialog.stories.tsx +1 -1
  71. package/src/translations.ts +1 -1
  72. package/src/types.ts +48 -44
  73. package/dist/lib/browser/app-graph-builder-WAS4YZNA.mjs.map +0 -7
  74. package/dist/lib/browser/chunk-AN7FJKIJ.mjs +0 -105
  75. package/dist/lib/browser/chunk-AN7FJKIJ.mjs.map +0 -7
  76. package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs.map +0 -7
  77. package/dist/lib/node/chunk-FROKBEVH.cjs.map +0 -7
  78. package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs.map +0 -7
  79. package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs +0 -106
  80. package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs.map +0 -7
  81. package/dist/types/src/capabilities/schema.d.ts.map +0 -1
  82. /package/dist/lib/browser/{intent-resolver-Y5GTS7CW.mjs.map → intent-resolver-UME7DARZ.mjs.map} +0 -0
  83. /package/dist/lib/browser/{react-surface-AUZGNKC5.mjs.map → react-surface-A2R3JYXX.mjs.map} +0 -0
  84. /package/dist/lib/node/{intent-resolver-ZFYETGJI.cjs.map → intent-resolver-33S7BRJP.cjs.map} +0 -0
  85. /package/dist/lib/node/{react-surface-GBPBVXLE.cjs.map → react-surface-FYWDPVXT.cjs.map} +0 -0
  86. /package/dist/lib/node-esm/{intent-resolver-OVG4QCHK.mjs.map → intent-resolver-4ULBB4ZA.mjs.map} +0 -0
  87. /package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs.map → react-surface-VXMRB7IY.mjs.map} +0 -0
  88. /package/src/capabilities/{schema.ts → schema-defs.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-client",
3
- "version": "0.8.2-main.5885341",
3
+ "version": "0.8.2-main.600d381",
4
4
  "description": "DXOS Surface plugin for DXOS Client",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -34,23 +34,24 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@preact/signals-core": "^1.6.0",
37
+ "effect": "3.14.21",
37
38
  "react-qr-rounded": "^1.0.0",
38
- "@dxos/app-framework": "0.8.2-main.5885341",
39
- "@dxos/async": "0.8.2-main.5885341",
40
- "@dxos/config": "0.8.2-main.5885341",
41
- "@dxos/invariant": "0.8.2-main.5885341",
42
- "@dxos/echo-schema": "0.8.2-main.5885341",
43
- "@dxos/local-storage": "0.8.2-main.5885341",
44
- "@dxos/echo-signals": "0.8.2-main.5885341",
45
- "@dxos/log": "0.8.2-main.5885341",
46
- "@dxos/react-client": "0.8.2-main.5885341",
47
- "@dxos/plugin-observability": "0.8.2-main.5885341",
48
- "@dxos/plugin-graph": "0.8.2-main.5885341",
49
- "@dxos/react-ui-form": "0.8.2-main.5885341",
50
- "@dxos/react-ui-pickers": "0.8.2-main.5885341",
51
- "@dxos/shell": "0.8.2-main.5885341",
52
- "@dxos/util": "0.8.2-main.5885341",
53
- "@dxos/react-ui-stack": "0.8.2-main.5885341"
39
+ "@dxos/app-framework": "0.8.2-main.600d381",
40
+ "@dxos/config": "0.8.2-main.600d381",
41
+ "@dxos/echo-signals": "0.8.2-main.600d381",
42
+ "@dxos/echo-schema": "0.8.2-main.600d381",
43
+ "@dxos/invariant": "0.8.2-main.600d381",
44
+ "@dxos/async": "0.8.2-main.600d381",
45
+ "@dxos/local-storage": "0.8.2-main.600d381",
46
+ "@dxos/log": "0.8.2-main.600d381",
47
+ "@dxos/plugin-graph": "0.8.2-main.600d381",
48
+ "@dxos/react-client": "0.8.2-main.600d381",
49
+ "@dxos/react-ui-form": "0.8.2-main.600d381",
50
+ "@dxos/plugin-observability": "0.8.2-main.600d381",
51
+ "@dxos/react-ui-pickers": "0.8.2-main.600d381",
52
+ "@dxos/react-ui-stack": "0.8.2-main.600d381",
53
+ "@dxos/shell": "0.8.2-main.600d381",
54
+ "@dxos/util": "0.8.2-main.600d381"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@phosphor-icons/react": "^2.1.5",
@@ -60,18 +61,18 @@
60
61
  "react": "~18.2.0",
61
62
  "react-dom": "~18.2.0",
62
63
  "vite": "5.4.7",
63
- "@dxos/react-ui": "0.8.2-main.5885341",
64
- "@dxos/live-object": "0.8.2-main.5885341",
65
- "@dxos/react-ui-theme": "0.8.2-main.5885341",
66
- "@dxos/storybook-utils": "0.8.2-main.5885341"
64
+ "@dxos/react-ui": "0.8.2-main.600d381",
65
+ "@dxos/react-ui-theme": "0.8.2-main.600d381",
66
+ "@dxos/live-object": "0.8.2-main.600d381",
67
+ "@dxos/storybook-utils": "0.8.2-main.600d381"
67
68
  },
68
69
  "peerDependencies": {
69
70
  "@phosphor-icons/react": "^2.1.5",
70
- "effect": "3.13.3",
71
+ "effect": "^3.13.3",
71
72
  "react": "~18.2.0",
72
73
  "react-dom": "~18.2.0",
73
- "@dxos/react-ui-theme": "0.8.2-main.5885341",
74
- "@dxos/react-ui": "0.8.2-main.5885341"
74
+ "@dxos/react-ui": "0.8.2-main.600d381",
75
+ "@dxos/react-ui-theme": "0.8.2-main.600d381"
75
76
  },
76
77
  "publishConfig": {
77
78
  "access": "public"
@@ -11,7 +11,7 @@ import {
11
11
  Migrations,
12
12
  ReactContext,
13
13
  ReactSurface,
14
- Schema,
14
+ SchemaDefs,
15
15
  } from './capabilities';
16
16
  import { ClientEvents } from './events';
17
17
  import { meta } from './meta';
@@ -41,7 +41,7 @@ export const ClientPlugin = ({
41
41
  id: `${meta.id}/module/schema`,
42
42
  activatesOn: ClientEvents.ClientReady,
43
43
  activatesBefore: [ClientEvents.SetupSchema],
44
- activate: Schema,
44
+ activate: SchemaDefs,
45
45
  }),
46
46
  defineModule({
47
47
  id: `${meta.id}/module/migration`,
@@ -27,6 +27,7 @@ export default (context: PluginsContext) =>
27
27
  properties: {
28
28
  label: ['open user account label', { ns: CLIENT_PLUGIN }],
29
29
  icon: 'ph--user--regular',
30
+ disposition: 'menu',
30
31
  keyBinding: {
31
32
  macos: 'meta+shift+.',
32
33
  // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
@@ -10,6 +10,6 @@ export const IntentResolver = lazy(async () => import('./intent-resolver'));
10
10
  export const Migrations = lazy(async () => import('./migrations'));
11
11
  export const ReactContext = lazy(async () => import('./react-context'));
12
12
  export const ReactSurface = lazy(async () => import('./react-surface'));
13
- export const Schema = lazy(async () => import('./schema'));
13
+ export const SchemaDefs = lazy(async () => import('./schema-defs'));
14
14
 
15
15
  export * from './capabilities';
@@ -30,7 +30,7 @@ const meta: Meta = {
30
30
  ],
31
31
  }),
32
32
  withTheme,
33
- withLayout({ tooltips: true }),
33
+ withLayout(),
34
34
  ],
35
35
  parameters: {
36
36
  layout: 'fullscreen',
@@ -15,7 +15,7 @@ import translations from '../translations';
15
15
  const meta: Meta = {
16
16
  title: 'plugins/plugin-client/ProfileContainer',
17
17
  component: ProfileContainer,
18
- decorators: [withClientProvider({ createIdentity: true }), withTheme, withLayout({ tooltips: true })],
18
+ decorators: [withClientProvider({ createIdentity: true }), withTheme, withLayout()],
19
19
  parameters: {
20
20
  layout: 'fullscreen',
21
21
  translations,
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Schema as S } from 'effect';
5
+ import { Schema } from 'effect';
6
6
  import React, { type ChangeEvent, useCallback, useMemo, useState } from 'react';
7
7
 
8
8
  import { debounce } from '@dxos/async';
@@ -163,10 +163,10 @@ export const ProfileContainer = () => {
163
163
  };
164
164
 
165
165
  // TODO(wittjosiah): Integrate annotations with translations.
166
- const ProfileSchema = S.Struct({
167
- displayName: S.String.annotations({ title: 'Display name' }),
168
- emoji: S.String.annotations({ title: 'Avatar' }),
169
- hue: S.String.annotations({ title: 'Color' }),
170
- did: S.String.annotations({ title: 'DID' }),
166
+ const ProfileSchema = Schema.Struct({
167
+ displayName: Schema.String.annotations({ title: 'Display name' }),
168
+ emoji: Schema.String.annotations({ title: 'Avatar' }),
169
+ hue: Schema.String.annotations({ title: 'Color' }),
170
+ did: Schema.String.annotations({ title: 'DID' }),
171
171
  });
172
- type Profile = S.Schema.Type<typeof ProfileSchema>;
172
+ type Profile = Schema.Schema.Type<typeof ProfileSchema>;
@@ -36,7 +36,7 @@ const meta: Meta<RecoveryCodeDialogProps> = {
36
36
  title: 'plugins/plugin-client/RecoveryCodeDialog',
37
37
  component: RecoveryCodeDialog,
38
38
  render: DefaultStory,
39
- decorators: [withClientProvider({ createIdentity: true }), withTheme, withLayout({ tooltips: true })],
39
+ decorators: [withClientProvider({ createIdentity: true }), withTheme, withLayout()],
40
40
  parameters: {
41
41
  layout: 'fullscreen',
42
42
  translations,
@@ -29,7 +29,7 @@ const meta: Meta = {
29
29
  ],
30
30
  }),
31
31
  withTheme,
32
- withLayout({ tooltips: true }),
32
+ withLayout(),
33
33
  ],
34
34
  parameters: {
35
35
  layout: 'fullscreen',
@@ -29,7 +29,7 @@ const meta: Meta<ResetDialogProps> = {
29
29
  title: 'plugins/plugin-client/ResetDialog',
30
30
  component: ResetDialog,
31
31
  render: Render,
32
- decorators: [withPluginManager({ plugins: [IntentPlugin()] }), withTheme, withLayout({ tooltips: true })],
32
+ decorators: [withPluginManager({ plugins: [IntentPlugin()] }), withTheme, withLayout()],
33
33
  parameters: {
34
34
  layout: 'fullscreen',
35
35
  translations,
@@ -10,7 +10,7 @@ export default [
10
10
  [CLIENT_PLUGIN]: {
11
11
  'account label': 'User Account',
12
12
  'profile label': 'Profile',
13
- 'profile description': 'You can adjust how you’re represented in Composer here.',
13
+ 'profile description': 'You can adjust how your user settings here.',
14
14
  'devices label': 'Devices',
15
15
  'devices verbose label': 'Manage devices',
16
16
  'add device description':
package/src/types.ts CHANGED
@@ -2,84 +2,88 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ import { Schema } from 'effect';
6
+
5
7
  import { type PluginsContext } from '@dxos/app-framework';
6
- import { S } from '@dxos/echo-schema';
7
8
  import { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';
8
9
  import { type MaybePromise } from '@dxos/util';
9
10
 
10
11
  import { CLIENT_PLUGIN } from './meta';
11
12
 
12
13
  // TODO(wittjosiah): Factor out. Generate?
13
- const IdentitySchema = S.Struct({
14
- identityKey: S.instanceOf(PublicKey),
15
- spaceKey: S.optional(S.instanceOf(PublicKey)),
16
- profile: S.optional(
17
- S.Struct({
18
- displayName: S.optional(S.String),
19
- avatarCid: S.optional(S.String),
20
- data: S.optional(S.Record({ key: S.String, value: S.Any })),
14
+ const IdentitySchema = Schema.Struct({
15
+ identityKey: Schema.instanceOf(PublicKey),
16
+ spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),
17
+ profile: Schema.optional(
18
+ Schema.Struct({
19
+ displayName: Schema.optional(Schema.String),
20
+ avatarCid: Schema.optional(Schema.String),
21
+ data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
21
22
  }),
22
23
  ),
23
24
  });
24
25
 
25
26
  const CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;
26
27
  export namespace ClientAction {
27
- export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {
28
- input: S.Struct({
29
- displayName: S.optional(S.String),
28
+ export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {
29
+ input: Schema.Struct({
30
+ displayName: Schema.optional(Schema.String),
30
31
  }),
31
32
  output: IdentitySchema,
32
33
  }) {}
33
34
 
34
- export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {
35
- input: S.Struct({
36
- invitationCode: S.optional(S.String),
35
+ export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {
36
+ input: Schema.Struct({
37
+ invitationCode: Schema.optional(Schema.String),
37
38
  }),
38
- output: S.Void,
39
+ output: Schema.Void,
39
40
  }) {}
40
41
 
41
- export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {
42
- input: S.Void,
43
- output: S.Void,
42
+ export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {
43
+ input: Schema.Void,
44
+ output: Schema.Void,
44
45
  }) {}
45
46
 
46
- export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {
47
- input: S.Void,
48
- output: S.Void,
47
+ export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {
48
+ input: Schema.Void,
49
+ output: Schema.Void,
49
50
  }) {}
50
51
 
51
- export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {
52
- input: S.Struct({
53
- mode: S.optional(S.String),
52
+ export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {
53
+ input: Schema.Struct({
54
+ mode: Schema.optional(Schema.String),
54
55
  }),
55
- output: S.Void,
56
- }) {}
57
-
58
- export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {
59
- input: S.Void,
60
- output: S.Void,
56
+ output: Schema.Void,
61
57
  }) {}
62
58
 
63
- export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {
64
- input: S.Void,
65
- output: S.Void,
59
+ export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {
60
+ input: Schema.Void,
61
+ output: Schema.Void,
66
62
  }) {}
67
63
 
68
- export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {
69
- input: S.Void,
70
- output: S.Void,
64
+ export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(
65
+ `${CLIENT_ACTION}/create-recovery-code`,
66
+ {
67
+ input: Schema.Void,
68
+ output: Schema.Void,
69
+ },
70
+ ) {}
71
+
72
+ export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {
73
+ input: Schema.Void,
74
+ output: Schema.Void,
71
75
  }) {}
72
76
 
73
- export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {
74
- input: S.Void,
75
- output: S.Void,
77
+ export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {
78
+ input: Schema.Void,
79
+ output: Schema.Void,
76
80
  }) {}
77
81
 
78
- export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {
79
- input: S.Struct({
80
- token: S.String,
82
+ export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {
83
+ input: Schema.Struct({
84
+ token: Schema.String,
81
85
  }),
82
- output: S.Void,
86
+ output: Schema.Void,
83
87
  }) {}
84
88
  }
85
89
 
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, toSignal, type Node } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { ClientCapabilities } from './capabilities';\nimport { CLIENT_PLUGIN } from '../meta';\nimport { Account, ClientAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: `${CLIENT_PLUGIN}/open-user-account`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(ClientAction.ShareIdentity));\n },\n properties: {\n label: ['open user account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n keyBinding: {\n macos: 'meta+shift+.',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'alt+shift+.',\n linux: 'alt+shift+>',\n },\n },\n },\n ],\n connector: () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n const status = toSignal(\n (onChange) => client.mesh.networkStatus.subscribe(() => onChange()).unsubscribe,\n () => client.mesh.networkStatus.get(),\n );\n\n return [\n {\n id: Account.id,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n disposition: 'user-account',\n // NOTE: This currently needs to be the identity key because the fallback is generated from hex.\n userId: identity?.identityKey.toHex(),\n hue: identity?.profile?.data?.hue,\n emoji: identity?.profile?.data?.emoji,\n status: status?.swarm === ConnectionState.OFFLINE ? 'error' : 'active',\n },\n nodes: [\n {\n id: Account.Profile,\n data: Account.Profile,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['profile label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['devices label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['security label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n },\n }),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,SAASA,oBAAoB;AAC7B,SAASC,cAAcC,mBAAwC;AAC/D,SAASC,iBAAiBC,gBAA2B;AACrD,SAASC,uBAAuB;AAMhC,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;EAClDI,SAAS,MAAM;IACb;MACEJ,IAAI,GAAGC,aAAAA;MACPI,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKZ,QAAQa,kBAAkBX,aAAaY,gBAAgB;AAC7F,cAAMF,SAASG,aAAaC,aAAaC,aAAa,CAAA;MACxD;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAId;UAAc;;QACvDe,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;MACF;IACF;;EAEFC,WAAW,MAAA;AACT,UAAMC,SAAS3B,QAAQa,kBAAkBe,mBAAmBC,MAAM;AAClE,UAAMC,WAAWH,OAAOI,KAAKD,SAASE,IAAG;AACzC,UAAMC,SAASC,SACb,CAACC,aAAaR,OAAOS,KAAKC,cAAcC,UAAU,MAAMH,SAAAA,CAAAA,EAAYI,aACpE,MAAMZ,OAAOS,KAAKC,cAAcL,IAAG,CAAA;AAGrC,WAAO;MACL;QACE3B,IAAImC,QAAQnC;QACZoC,MAAMnC;QACNY,YAAY;UACVC,OAAO;YAAC;YAAiB;cAAEC,IAAId;YAAc;;UAC7Ce,MAAM;UACNqB,aAAa;;UAEbC,QAAQb,UAAUc,YAAYC,MAAAA;UAC9BC,KAAKhB,UAAUiB,SAASrC,MAAMoC;UAC9BE,OAAOlB,UAAUiB,SAASrC,MAAMsC;UAChCf,QAAQA,QAAQgB,UAAUC,gBAAgBC,UAAU,UAAU;QAChE;QACAC,OAAO;UACL;YACE/C,IAAImC,QAAQa;YACZ3C,MAAM8B,QAAQa;YACdZ,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;YACR;UACF;UACA;YACEhB,IAAImC,QAAQc;YACZ5C,MAAM8B,QAAQc;YACdb,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;cACNkC,QAAQ;YACV;UACF;UACA;YACElD,IAAImC,QAAQgB;YACZ9C,MAAM8B,QAAQgB;YACdf,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAkB;kBAAEC,IAAId;gBAAc;;cAC9Ce,MAAM;YACR;UACF;;MAEJ;;EAEJ;AACF,CAAA,CAAA;",
6
- "names": ["createIntent", "Capabilities", "contributes", "createExtension", "toSignal", "ConnectionState", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "CLIENT_PLUGIN", "filter", "node", "actions", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "ClientAction", "ShareIdentity", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "connector", "client", "ClientCapabilities", "Client", "identity", "halo", "get", "status", "toSignal", "onChange", "mesh", "networkStatus", "subscribe", "unsubscribe", "Account", "type", "disposition", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "testId", "Security"]
7
- }
@@ -1,105 +0,0 @@
1
- import {
2
- CLIENT_PLUGIN
3
- } from "./chunk-MCEXD5XH.mjs";
4
-
5
- // packages/plugins/plugin-client/src/types.ts
6
- import { S } from "@dxos/echo-schema";
7
- import { PublicKey } from "@dxos/react-client";
8
- var IdentitySchema = S.Struct({
9
- identityKey: S.instanceOf(PublicKey),
10
- spaceKey: S.optional(S.instanceOf(PublicKey)),
11
- profile: S.optional(S.Struct({
12
- displayName: S.optional(S.String),
13
- avatarCid: S.optional(S.String),
14
- data: S.optional(S.Record({
15
- key: S.String,
16
- value: S.Any
17
- }))
18
- }))
19
- });
20
- var CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;
21
- var ClientAction;
22
- (function(ClientAction2) {
23
- class CreateIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/create-identity`, {
24
- input: S.Struct({
25
- displayName: S.optional(S.String)
26
- }),
27
- output: IdentitySchema
28
- }) {
29
- }
30
- ClientAction2.CreateIdentity = CreateIdentity;
31
- class JoinIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/join-identity`, {
32
- input: S.Struct({
33
- invitationCode: S.optional(S.String)
34
- }),
35
- output: S.Void
36
- }) {
37
- }
38
- ClientAction2.JoinIdentity = JoinIdentity;
39
- class ShareIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/share-identity`, {
40
- input: S.Void,
41
- output: S.Void
42
- }) {
43
- }
44
- ClientAction2.ShareIdentity = ShareIdentity;
45
- class RecoverIdentity extends S.TaggedClass()(`${CLIENT_ACTION}/recover-identity`, {
46
- input: S.Void,
47
- output: S.Void
48
- }) {
49
- }
50
- ClientAction2.RecoverIdentity = RecoverIdentity;
51
- class ResetStorage extends S.TaggedClass()(`${CLIENT_ACTION}/reset-storage`, {
52
- input: S.Struct({
53
- mode: S.optional(S.String)
54
- }),
55
- output: S.Void
56
- }) {
57
- }
58
- ClientAction2.ResetStorage = ResetStorage;
59
- class CreateAgent extends S.TaggedClass()(`${CLIENT_ACTION}/create-agent`, {
60
- input: S.Void,
61
- output: S.Void
62
- }) {
63
- }
64
- ClientAction2.CreateAgent = CreateAgent;
65
- class CreateRecoveryCode extends S.TaggedClass()(`${CLIENT_ACTION}/create-recovery-code`, {
66
- input: S.Void,
67
- output: S.Void
68
- }) {
69
- }
70
- ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
71
- class CreatePasskey extends S.TaggedClass()(`${CLIENT_ACTION}/create-passkey`, {
72
- input: S.Void,
73
- output: S.Void
74
- }) {
75
- }
76
- ClientAction2.CreatePasskey = CreatePasskey;
77
- class RedeemPasskey extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-passkey`, {
78
- input: S.Void,
79
- output: S.Void
80
- }) {
81
- }
82
- ClientAction2.RedeemPasskey = RedeemPasskey;
83
- class RedeemToken extends S.TaggedClass()(`${CLIENT_ACTION}/redeem-token`, {
84
- input: S.Struct({
85
- token: S.String
86
- }),
87
- output: S.Void
88
- }) {
89
- }
90
- ClientAction2.RedeemToken = RedeemToken;
91
- })(ClientAction || (ClientAction = {}));
92
- var Account;
93
- (function(Account2) {
94
- const _id = "dxos.org.plugin.client.account";
95
- Account2.id = `!${_id}`;
96
- Account2.Profile = `${_id}.profile`;
97
- Account2.Devices = `${_id}.devices`;
98
- Account2.Security = `${_id}.security`;
99
- })(Account || (Account = {}));
100
-
101
- export {
102
- ClientAction,
103
- Account
104
- };
105
- //# sourceMappingURL=chunk-AN7FJKIJ.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n mode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: S.Struct({\n token: S.String,\n }),\n output: S.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base URL for the invitation link.\n */\n invitationUrl?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationParam?: string;\n\n /**\n * Run after the client has been initialized.\n */\n onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => MaybePromise<void>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
5
- "mappings": "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",
6
- "names": ["S", "PublicKey", "IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, toSignal, type Node } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { ClientCapabilities } from './capabilities';\nimport { CLIENT_PLUGIN } from '../meta';\nimport { Account, ClientAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: `${CLIENT_PLUGIN}/open-user-account`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(ClientAction.ShareIdentity));\n },\n properties: {\n label: ['open user account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n keyBinding: {\n macos: 'meta+shift+.',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'alt+shift+.',\n linux: 'alt+shift+>',\n },\n },\n },\n ],\n connector: () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n const status = toSignal(\n (onChange) => client.mesh.networkStatus.subscribe(() => onChange()).unsubscribe,\n () => client.mesh.networkStatus.get(),\n );\n\n return [\n {\n id: Account.id,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n disposition: 'user-account',\n // NOTE: This currently needs to be the identity key because the fallback is generated from hex.\n userId: identity?.identityKey.toHex(),\n hue: identity?.profile?.data?.hue,\n emoji: identity?.profile?.data?.emoji,\n status: status?.swarm === ConnectionState.OFFLINE ? 'error' : 'active',\n },\n nodes: [\n {\n id: Account.Profile,\n data: Account.Profile,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['profile label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['devices label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['security label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n },\n }),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAA6B;AAC7B,IAAAA,wBAA+D;AAC/D,0BAAqD;AACrD,kBAAgC;AAMhC,IAAA,4BAAe,CAACC,gBACdC,mCACEC,mCAAaC,qBACbC,qCAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;EAClDI,SAAS,MAAM;IACb;MACEJ,IAAI,GAAGC,mCAAAA;MACPI,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKZ,QAAQa,kBAAkBX,mCAAaY,gBAAgB;AAC7F,cAAMF,aAASG,mCAAaC,mCAAaC,aAAa,CAAA;MACxD;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAId;UAAc;;QACvDe,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;MACF;IACF;;EAEFC,WAAW,MAAA;AACT,UAAMC,SAAS3B,QAAQa,kBAAkBe,yCAAmBC,MAAM;AAClE,UAAMC,WAAWH,OAAOI,KAAKD,SAASE,IAAG;AACzC,UAAMC,aAASC,8BACb,CAACC,aAAaR,OAAOS,KAAKC,cAAcC,UAAU,MAAMH,SAAAA,CAAAA,EAAYI,aACpE,MAAMZ,OAAOS,KAAKC,cAAcL,IAAG,CAAA;AAGrC,WAAO;MACL;QACE3B,IAAImC,8BAAQnC;QACZoC,MAAMnC;QACNY,YAAY;UACVC,OAAO;YAAC;YAAiB;cAAEC,IAAId;YAAc;;UAC7Ce,MAAM;UACNqB,aAAa;;UAEbC,QAAQb,UAAUc,YAAYC,MAAAA;UAC9BC,KAAKhB,UAAUiB,SAASrC,MAAMoC;UAC9BE,OAAOlB,UAAUiB,SAASrC,MAAMsC;UAChCf,QAAQA,QAAQgB,UAAUC,4BAAgBC,UAAU,UAAU;QAChE;QACAC,OAAO;UACL;YACE/C,IAAImC,8BAAQa;YACZ3C,MAAM8B,8BAAQa;YACdZ,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;YACR;UACF;UACA;YACEhB,IAAImC,8BAAQc;YACZ5C,MAAM8B,8BAAQc;YACdb,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;cACNkC,QAAQ;YACV;UACF;UACA;YACElD,IAAImC,8BAAQgB;YACZ9C,MAAM8B,8BAAQgB;YACdf,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAkB;kBAAEC,IAAId;gBAAc;;cAC9Ce,MAAM;YACR;UACF;;MAEJ;;EAEJ;AACF,CAAA,CAAA;",
6
- "names": ["import_app_framework", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "CLIENT_PLUGIN", "filter", "node", "actions", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "ClientAction", "ShareIdentity", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "connector", "client", "ClientCapabilities", "Client", "identity", "halo", "get", "status", "toSignal", "onChange", "mesh", "networkStatus", "subscribe", "unsubscribe", "Account", "type", "disposition", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "testId", "Security"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\nimport { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';\nimport { type MaybePromise } from '@dxos/util';\n\nimport { CLIENT_PLUGIN } from './meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = S.Struct({\n identityKey: S.instanceOf(PublicKey),\n spaceKey: S.optional(S.instanceOf(PublicKey)),\n profile: S.optional(\n S.Struct({\n displayName: S.optional(S.String),\n avatarCid: S.optional(S.String),\n data: S.optional(S.Record({ key: S.String, value: S.Any })),\n }),\n ),\n});\n\nconst CLIENT_ACTION = `${CLIENT_PLUGIN}/action`;\nexport namespace ClientAction {\n export class CreateIdentity extends S.TaggedClass<CreateIdentity>()(`${CLIENT_ACTION}/create-identity`, {\n input: S.Struct({\n displayName: S.optional(S.String),\n }),\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends S.TaggedClass<JoinIdentity>()(`${CLIENT_ACTION}/join-identity`, {\n input: S.Struct({\n invitationCode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class ShareIdentity extends S.TaggedClass<ShareIdentity>()(`${CLIENT_ACTION}/share-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RecoverIdentity extends S.TaggedClass<RecoverIdentity>()(`${CLIENT_ACTION}/recover-identity`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class ResetStorage extends S.TaggedClass<ResetStorage>()(`${CLIENT_ACTION}/reset-storage`, {\n input: S.Struct({\n mode: S.optional(S.String),\n }),\n output: S.Void,\n }) {}\n\n export class CreateAgent extends S.TaggedClass<CreateAgent>()(`${CLIENT_ACTION}/create-agent`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreateRecoveryCode extends S.TaggedClass<CreateRecoveryCode>()(`${CLIENT_ACTION}/create-recovery-code`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class CreatePasskey extends S.TaggedClass<CreatePasskey>()(`${CLIENT_ACTION}/create-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemPasskey extends S.TaggedClass<RedeemPasskey>()(`${CLIENT_ACTION}/redeem-passkey`, {\n input: S.Void,\n output: S.Void,\n }) {}\n\n export class RedeemToken extends S.TaggedClass<RedeemToken>()(`${CLIENT_ACTION}/redeem-token`, {\n input: S.Struct({\n token: S.String,\n }),\n output: S.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base URL for the invitation link.\n */\n invitationUrl?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationParam?: string;\n\n /**\n * Run after the client has been initialized.\n */\n onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;\n\n /**\n * Called when the client is reset.\n */\n onReset?: (params: { target?: string }) => MaybePromise<void>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n}\n"],
5
- "mappings": "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",
6
- "names": ["IdentitySchema", "S", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "CLIENT_ACTION", "CLIENT_PLUGIN", "ClientAction", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { createIntent } from '@dxos/app-framework';\nimport { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, toSignal, type Node } from '@dxos/plugin-graph';\nimport { ConnectionState } from '@dxos/react-client/mesh';\n\nimport { ClientCapabilities } from './capabilities';\nimport { CLIENT_PLUGIN } from '../meta';\nimport { Account, ClientAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: CLIENT_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: `${CLIENT_PLUGIN}/open-user-account`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n await dispatch(createIntent(ClientAction.ShareIdentity));\n },\n properties: {\n label: ['open user account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n keyBinding: {\n macos: 'meta+shift+.',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'alt+shift+.',\n linux: 'alt+shift+>',\n },\n },\n },\n ],\n connector: () => {\n const client = context.requestCapability(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n const status = toSignal(\n (onChange) => client.mesh.networkStatus.subscribe(() => onChange()).unsubscribe,\n () => client.mesh.networkStatus.get(),\n );\n\n return [\n {\n id: Account.id,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['account label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n disposition: 'user-account',\n // NOTE: This currently needs to be the identity key because the fallback is generated from hex.\n userId: identity?.identityKey.toHex(),\n hue: identity?.profile?.data?.hue,\n emoji: identity?.profile?.data?.emoji,\n status: status?.swarm === ConnectionState.OFFLINE ? 'error' : 'active',\n },\n nodes: [\n {\n id: Account.Profile,\n data: Account.Profile,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['profile label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--user--regular',\n },\n },\n {\n id: Account.Devices,\n data: Account.Devices,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['devices label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--devices--regular',\n testId: 'clientPlugin.devices',\n },\n },\n {\n id: Account.Security,\n data: Account.Security,\n type: CLIENT_PLUGIN,\n properties: {\n label: ['security label', { ns: CLIENT_PLUGIN }],\n icon: 'ph--key--regular',\n },\n },\n ],\n },\n ];\n },\n }),\n );\n"],
5
- "mappings": ";;;;;;;;;;;;;AAIA,SAASA,oBAAoB;AAC7B,SAASC,cAAcC,mBAAwC;AAC/D,SAASC,iBAAiBC,gBAA2B;AACrD,SAASC,uBAAuB;AAMhC,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;EAClDI,SAAS,MAAM;IACb;MACEJ,IAAI,GAAGC,aAAAA;MACPI,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKZ,QAAQa,kBAAkBX,aAAaY,gBAAgB;AAC7F,cAAMF,SAASG,aAAaC,aAAaC,aAAa,CAAA;MACxD;MACAC,YAAY;QACVC,OAAO;UAAC;UAA2B;YAAEC,IAAId;UAAc;;QACvDe,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;MACF;IACF;;EAEFC,WAAW,MAAA;AACT,UAAMC,SAAS3B,QAAQa,kBAAkBe,mBAAmBC,MAAM;AAClE,UAAMC,WAAWH,OAAOI,KAAKD,SAASE,IAAG;AACzC,UAAMC,SAASC,SACb,CAACC,aAAaR,OAAOS,KAAKC,cAAcC,UAAU,MAAMH,SAAAA,CAAAA,EAAYI,aACpE,MAAMZ,OAAOS,KAAKC,cAAcL,IAAG,CAAA;AAGrC,WAAO;MACL;QACE3B,IAAImC,QAAQnC;QACZoC,MAAMnC;QACNY,YAAY;UACVC,OAAO;YAAC;YAAiB;cAAEC,IAAId;YAAc;;UAC7Ce,MAAM;UACNqB,aAAa;;UAEbC,QAAQb,UAAUc,YAAYC,MAAAA;UAC9BC,KAAKhB,UAAUiB,SAASrC,MAAMoC;UAC9BE,OAAOlB,UAAUiB,SAASrC,MAAMsC;UAChCf,QAAQA,QAAQgB,UAAUC,gBAAgBC,UAAU,UAAU;QAChE;QACAC,OAAO;UACL;YACE/C,IAAImC,QAAQa;YACZ3C,MAAM8B,QAAQa;YACdZ,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;YACR;UACF;UACA;YACEhB,IAAImC,QAAQc;YACZ5C,MAAM8B,QAAQc;YACdb,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAiB;kBAAEC,IAAId;gBAAc;;cAC7Ce,MAAM;cACNkC,QAAQ;YACV;UACF;UACA;YACElD,IAAImC,QAAQgB;YACZ9C,MAAM8B,QAAQgB;YACdf,MAAMnC;YACNY,YAAY;cACVC,OAAO;gBAAC;gBAAkB;kBAAEC,IAAId;gBAAc;;cAC9Ce,MAAM;YACR;UACF;;MAEJ;;EAEJ;AACF,CAAA,CAAA;",
6
- "names": ["createIntent", "Capabilities", "contributes", "createExtension", "toSignal", "ConnectionState", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "CLIENT_PLUGIN", "filter", "node", "actions", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "createIntent", "ClientAction", "ShareIdentity", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "connector", "client", "ClientCapabilities", "Client", "identity", "halo", "get", "status", "toSignal", "onChange", "mesh", "networkStatus", "subscribe", "unsubscribe", "Account", "type", "disposition", "userId", "identityKey", "toHex", "hue", "profile", "emoji", "swarm", "ConnectionState", "OFFLINE", "nodes", "Profile", "Devices", "testId", "Security"]
7
- }