@dxos/plugin-client 0.8.2-main.f081794 → 0.8.2-main.fbd8ed0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/lib/browser/{app-graph-builder-WAS4YZNA.mjs → app-graph-builder-ROTCC3C4.mjs} +35 -31
  2. package/dist/lib/browser/app-graph-builder-ROTCC3C4.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-XNV35HZK.mjs → chunk-7OW22D2O.mjs} +17 -13
  4. package/dist/lib/browser/chunk-7OW22D2O.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-XPHDZ277.mjs +105 -0
  6. package/dist/lib/browser/chunk-XPHDZ277.mjs.map +7 -0
  7. package/dist/lib/browser/{client-LV67Q3R7.mjs → client-ICXXK55V.mjs} +1 -1
  8. package/dist/lib/browser/client-ICXXK55V.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +9 -9
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/{intent-resolver-Y5GTS7CW.mjs → intent-resolver-L4STUWGK.mjs} +10 -10
  12. package/dist/lib/browser/intent-resolver-L4STUWGK.mjs.map +7 -0
  13. package/dist/lib/browser/meta.json +1 -1
  14. package/dist/lib/browser/migrations-DYDZ7DVP.mjs +23 -0
  15. package/dist/lib/browser/migrations-DYDZ7DVP.mjs.map +7 -0
  16. package/dist/lib/browser/{react-surface-AUZGNKC5.mjs → react-surface-VXFG7BEM.mjs} +3 -3
  17. package/dist/lib/browser/schema-defs-QVXP2JGN.mjs +25 -0
  18. package/dist/lib/browser/schema-defs-QVXP2JGN.mjs.map +7 -0
  19. package/dist/lib/browser/types.mjs +1 -1
  20. package/dist/lib/node/{app-graph-builder-PXOJZJO5.cjs → app-graph-builder-DOHFMHXU.cjs} +44 -40
  21. package/dist/lib/node/app-graph-builder-DOHFMHXU.cjs.map +7 -0
  22. package/dist/lib/node/{chunk-QNZIRU35.cjs → chunk-FABH7MJ3.cjs} +20 -16
  23. package/dist/lib/node/chunk-FABH7MJ3.cjs.map +7 -0
  24. package/dist/lib/node/{chunk-FROKBEVH.cjs → chunk-J5SQ5Q22.cjs} +47 -47
  25. package/dist/lib/node/chunk-J5SQ5Q22.cjs.map +7 -0
  26. package/dist/lib/node/{client-BKTGRBYM.cjs → client-OUBG63HJ.cjs} +4 -4
  27. package/dist/lib/node/client-OUBG63HJ.cjs.map +7 -0
  28. package/dist/lib/node/index.cjs +9 -9
  29. package/dist/lib/node/index.cjs.map +3 -3
  30. package/dist/lib/node/{intent-resolver-ZFYETGJI.cjs → intent-resolver-IDLAVEHS.cjs} +29 -29
  31. package/dist/lib/node/intent-resolver-IDLAVEHS.cjs.map +7 -0
  32. package/dist/lib/node/meta.json +1 -1
  33. package/dist/lib/node/{migrations-TGNI4FVL.cjs → migrations-ZI52SX4M.cjs} +11 -9
  34. package/dist/lib/node/migrations-ZI52SX4M.cjs.map +7 -0
  35. package/dist/lib/node/{react-surface-GBPBVXLE.cjs → react-surface-UGXE6OAD.cjs} +24 -24
  36. package/dist/lib/node/{schema-INQ72F54.cjs → schema-defs-BYGBDKOU.cjs} +13 -11
  37. package/dist/lib/node/schema-defs-BYGBDKOU.cjs.map +7 -0
  38. package/dist/lib/node/types.cjs +3 -3
  39. package/dist/lib/node/types.cjs.map +1 -1
  40. package/dist/lib/node-esm/{app-graph-builder-KIN6NWFI.mjs → app-graph-builder-XMXJG5YT.mjs} +35 -31
  41. package/dist/lib/node-esm/app-graph-builder-XMXJG5YT.mjs.map +7 -0
  42. package/dist/lib/node-esm/{chunk-6G43BNMU.mjs → chunk-34X2AMVA.mjs} +17 -13
  43. package/dist/lib/node-esm/chunk-34X2AMVA.mjs.map +7 -0
  44. package/dist/lib/node-esm/chunk-V6SJNSKG.mjs +106 -0
  45. package/dist/lib/node-esm/chunk-V6SJNSKG.mjs.map +7 -0
  46. package/dist/lib/node-esm/{client-QQD6WFOB.mjs → client-YJNEHNUV.mjs} +1 -1
  47. package/dist/lib/node-esm/client-YJNEHNUV.mjs.map +7 -0
  48. package/dist/lib/node-esm/index.mjs +9 -9
  49. package/dist/lib/node-esm/index.mjs.map +3 -3
  50. package/dist/lib/node-esm/{intent-resolver-OVG4QCHK.mjs → intent-resolver-73FZIXX5.mjs} +10 -10
  51. package/dist/lib/node-esm/intent-resolver-73FZIXX5.mjs.map +7 -0
  52. package/dist/lib/node-esm/meta.json +1 -1
  53. package/dist/lib/node-esm/{migrations-IVGATGZR.mjs → migrations-GHO52HKW.mjs} +8 -6
  54. package/dist/lib/node-esm/migrations-GHO52HKW.mjs.map +7 -0
  55. package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs → react-surface-R65DYUV6.mjs} +3 -3
  56. package/dist/lib/node-esm/schema-defs-O4OHIIBN.mjs +26 -0
  57. package/dist/lib/node-esm/schema-defs-O4OHIIBN.mjs.map +7 -0
  58. package/dist/lib/node-esm/types.mjs +1 -1
  59. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  60. package/dist/types/src/capabilities/app-graph-builder.d.ts +2 -179
  61. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  62. package/dist/types/src/capabilities/client.d.ts +2 -2
  63. package/dist/types/src/capabilities/client.d.ts.map +1 -1
  64. package/dist/types/src/capabilities/index.d.ts +5 -181
  65. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  66. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
  67. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  68. package/dist/types/src/capabilities/migrations.d.ts +2 -2
  69. package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
  70. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/schema-defs.d.ts +4 -0
  72. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
  73. package/dist/types/src/components/DevicesContainer.d.ts +4 -3
  74. package/dist/types/src/components/DevicesContainer.d.ts.map +1 -1
  75. package/dist/types/src/components/DevicesContainer.stories.d.ts.map +1 -1
  76. package/dist/types/src/components/JoinDialog.d.ts.map +1 -1
  77. package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +1 -1
  78. package/dist/types/src/components/ResetDialog.d.ts.map +1 -1
  79. package/dist/types/src/components/ResetDialog.stories.d.ts.map +1 -1
  80. package/dist/types/src/types.d.ts +53 -53
  81. package/dist/types/src/types.d.ts.map +1 -1
  82. package/dist/types/tsconfig.tsbuildinfo +1 -1
  83. package/package.json +31 -25
  84. package/src/ClientPlugin.ts +2 -2
  85. package/src/capabilities/app-graph-builder.ts +94 -76
  86. package/src/capabilities/client.ts +2 -2
  87. package/src/capabilities/index.ts +1 -1
  88. package/src/capabilities/intent-resolver.ts +9 -9
  89. package/src/capabilities/migrations.ts +14 -11
  90. package/src/capabilities/schema-defs.ts +29 -0
  91. package/src/components/DevicesContainer.stories.tsx +7 -3
  92. package/src/components/DevicesContainer.tsx +19 -12
  93. package/src/components/ProfileContainer.stories.tsx +1 -1
  94. package/src/components/ProfileContainer.tsx +7 -7
  95. package/src/components/RecoveryCodeDialog.stories.tsx +1 -1
  96. package/src/components/RecoveryCredentialsContainer.stories.tsx +2 -2
  97. package/src/components/ResetDialog.stories.tsx +7 -1
  98. package/src/translations.ts +2 -2
  99. package/src/types.ts +50 -46
  100. package/dist/lib/browser/app-graph-builder-WAS4YZNA.mjs.map +0 -7
  101. package/dist/lib/browser/chunk-AN7FJKIJ.mjs +0 -105
  102. package/dist/lib/browser/chunk-AN7FJKIJ.mjs.map +0 -7
  103. package/dist/lib/browser/chunk-XNV35HZK.mjs.map +0 -7
  104. package/dist/lib/browser/client-LV67Q3R7.mjs.map +0 -7
  105. package/dist/lib/browser/intent-resolver-Y5GTS7CW.mjs.map +0 -7
  106. package/dist/lib/browser/migrations-3DWFOL5Q.mjs +0 -21
  107. package/dist/lib/browser/migrations-3DWFOL5Q.mjs.map +0 -7
  108. package/dist/lib/browser/schema-JQAT6Q7S.mjs +0 -23
  109. package/dist/lib/browser/schema-JQAT6Q7S.mjs.map +0 -7
  110. package/dist/lib/node/app-graph-builder-PXOJZJO5.cjs.map +0 -7
  111. package/dist/lib/node/chunk-FROKBEVH.cjs.map +0 -7
  112. package/dist/lib/node/chunk-QNZIRU35.cjs.map +0 -7
  113. package/dist/lib/node/client-BKTGRBYM.cjs.map +0 -7
  114. package/dist/lib/node/intent-resolver-ZFYETGJI.cjs.map +0 -7
  115. package/dist/lib/node/migrations-TGNI4FVL.cjs.map +0 -7
  116. package/dist/lib/node/schema-INQ72F54.cjs.map +0 -7
  117. package/dist/lib/node-esm/app-graph-builder-KIN6NWFI.mjs.map +0 -7
  118. package/dist/lib/node-esm/chunk-6G43BNMU.mjs.map +0 -7
  119. package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs +0 -106
  120. package/dist/lib/node-esm/chunk-AD5W5QCQ.mjs.map +0 -7
  121. package/dist/lib/node-esm/client-QQD6WFOB.mjs.map +0 -7
  122. package/dist/lib/node-esm/intent-resolver-OVG4QCHK.mjs.map +0 -7
  123. package/dist/lib/node-esm/migrations-IVGATGZR.mjs.map +0 -7
  124. package/dist/lib/node-esm/schema-OK7HY3JJ.mjs +0 -24
  125. package/dist/lib/node-esm/schema-OK7HY3JJ.mjs.map +0 -7
  126. package/dist/types/src/capabilities/schema.d.ts +0 -4
  127. package/dist/types/src/capabilities/schema.d.ts.map +0 -1
  128. package/src/capabilities/schema.ts +0 -26
  129. /package/dist/lib/browser/{react-surface-AUZGNKC5.mjs.map → react-surface-VXFG7BEM.mjs.map} +0 -0
  130. /package/dist/lib/node/{react-surface-GBPBVXLE.cjs.map → react-surface-UGXE6OAD.cjs.map} +0 -0
  131. /package/dist/lib/node-esm/{react-surface-SMPVSOTA.mjs.map → react-surface-R65DYUV6.mjs.map} +0 -0
@@ -1,101 +1,101 @@
1
- import { type PluginsContext } from '@dxos/app-framework';
2
- import { S } from '@dxos/echo-schema';
1
+ import { Schema } from 'effect';
2
+ import { type PluginContext } from '@dxos/app-framework';
3
3
  import { type Client, PublicKey, type ClientOptions } from '@dxos/react-client';
4
4
  import { type MaybePromise } from '@dxos/util';
5
5
  export declare namespace ClientAction {
6
- const CreateIdentity_base: S.TaggedClass<CreateIdentity, "dxos.org/plugin/client/action/create-identity", {
7
- readonly _tag: S.tag<"dxos.org/plugin/client/action/create-identity">;
6
+ const CreateIdentity_base: Schema.TaggedClass<CreateIdentity, "dxos.org/plugin/client/action/create-identity", {
7
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/create-identity">;
8
8
  } & {
9
- input: S.Struct<{
10
- displayName: S.optional<typeof S.String>;
9
+ input: Schema.Struct<{
10
+ displayName: Schema.optional<typeof Schema.String>;
11
11
  }>;
12
- output: S.Struct<{
13
- identityKey: S.instanceOf<PublicKey>;
14
- spaceKey: S.optional<S.instanceOf<PublicKey>>;
15
- profile: S.optional<S.Struct<{
16
- displayName: S.optional<typeof S.String>;
17
- avatarCid: S.optional<typeof S.String>;
18
- data: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
12
+ output: Schema.Struct<{
13
+ identityKey: Schema.instanceOf<PublicKey>;
14
+ spaceKey: Schema.optional<Schema.instanceOf<PublicKey>>;
15
+ profile: Schema.optional<Schema.Struct<{
16
+ displayName: Schema.optional<typeof Schema.String>;
17
+ avatarCid: Schema.optional<typeof Schema.String>;
18
+ data: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
19
19
  }>>;
20
20
  }>;
21
21
  }>;
22
22
  export class CreateIdentity extends CreateIdentity_base {
23
23
  }
24
- const JoinIdentity_base: S.TaggedClass<JoinIdentity, "dxos.org/plugin/client/action/join-identity", {
25
- readonly _tag: S.tag<"dxos.org/plugin/client/action/join-identity">;
24
+ const JoinIdentity_base: Schema.TaggedClass<JoinIdentity, "dxos.org/plugin/client/action/join-identity", {
25
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/join-identity">;
26
26
  } & {
27
- input: S.Struct<{
28
- invitationCode: S.optional<typeof S.String>;
27
+ input: Schema.Struct<{
28
+ invitationCode: Schema.optional<typeof Schema.String>;
29
29
  }>;
30
- output: typeof S.Void;
30
+ output: typeof Schema.Void;
31
31
  }>;
32
32
  export class JoinIdentity extends JoinIdentity_base {
33
33
  }
34
- const ShareIdentity_base: S.TaggedClass<ShareIdentity, "dxos.org/plugin/client/action/share-identity", {
35
- readonly _tag: S.tag<"dxos.org/plugin/client/action/share-identity">;
34
+ const ShareIdentity_base: Schema.TaggedClass<ShareIdentity, "dxos.org/plugin/client/action/share-identity", {
35
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/share-identity">;
36
36
  } & {
37
- input: typeof S.Void;
38
- output: typeof S.Void;
37
+ input: typeof Schema.Void;
38
+ output: typeof Schema.Void;
39
39
  }>;
40
40
  export class ShareIdentity extends ShareIdentity_base {
41
41
  }
42
- const RecoverIdentity_base: S.TaggedClass<RecoverIdentity, "dxos.org/plugin/client/action/recover-identity", {
43
- readonly _tag: S.tag<"dxos.org/plugin/client/action/recover-identity">;
42
+ const RecoverIdentity_base: Schema.TaggedClass<RecoverIdentity, "dxos.org/plugin/client/action/recover-identity", {
43
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/recover-identity">;
44
44
  } & {
45
- input: typeof S.Void;
46
- output: typeof S.Void;
45
+ input: typeof Schema.Void;
46
+ output: typeof Schema.Void;
47
47
  }>;
48
48
  export class RecoverIdentity extends RecoverIdentity_base {
49
49
  }
50
- const ResetStorage_base: S.TaggedClass<ResetStorage, "dxos.org/plugin/client/action/reset-storage", {
51
- readonly _tag: S.tag<"dxos.org/plugin/client/action/reset-storage">;
50
+ const ResetStorage_base: Schema.TaggedClass<ResetStorage, "dxos.org/plugin/client/action/reset-storage", {
51
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/reset-storage">;
52
52
  } & {
53
- input: S.Struct<{
54
- mode: S.optional<typeof S.String>;
53
+ input: Schema.Struct<{
54
+ mode: Schema.optional<typeof Schema.String>;
55
55
  }>;
56
- output: typeof S.Void;
56
+ output: typeof Schema.Void;
57
57
  }>;
58
58
  export class ResetStorage extends ResetStorage_base {
59
59
  }
60
- const CreateAgent_base: S.TaggedClass<CreateAgent, "dxos.org/plugin/client/action/create-agent", {
61
- readonly _tag: S.tag<"dxos.org/plugin/client/action/create-agent">;
60
+ const CreateAgent_base: Schema.TaggedClass<CreateAgent, "dxos.org/plugin/client/action/create-agent", {
61
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/create-agent">;
62
62
  } & {
63
- input: typeof S.Void;
64
- output: typeof S.Void;
63
+ input: typeof Schema.Void;
64
+ output: typeof Schema.Void;
65
65
  }>;
66
66
  export class CreateAgent extends CreateAgent_base {
67
67
  }
68
- const CreateRecoveryCode_base: S.TaggedClass<CreateRecoveryCode, "dxos.org/plugin/client/action/create-recovery-code", {
69
- readonly _tag: S.tag<"dxos.org/plugin/client/action/create-recovery-code">;
68
+ const CreateRecoveryCode_base: Schema.TaggedClass<CreateRecoveryCode, "dxos.org/plugin/client/action/create-recovery-code", {
69
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/create-recovery-code">;
70
70
  } & {
71
- input: typeof S.Void;
72
- output: typeof S.Void;
71
+ input: typeof Schema.Void;
72
+ output: typeof Schema.Void;
73
73
  }>;
74
74
  export class CreateRecoveryCode extends CreateRecoveryCode_base {
75
75
  }
76
- const CreatePasskey_base: S.TaggedClass<CreatePasskey, "dxos.org/plugin/client/action/create-passkey", {
77
- readonly _tag: S.tag<"dxos.org/plugin/client/action/create-passkey">;
76
+ const CreatePasskey_base: Schema.TaggedClass<CreatePasskey, "dxos.org/plugin/client/action/create-passkey", {
77
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/create-passkey">;
78
78
  } & {
79
- input: typeof S.Void;
80
- output: typeof S.Void;
79
+ input: typeof Schema.Void;
80
+ output: typeof Schema.Void;
81
81
  }>;
82
82
  export class CreatePasskey extends CreatePasskey_base {
83
83
  }
84
- const RedeemPasskey_base: S.TaggedClass<RedeemPasskey, "dxos.org/plugin/client/action/redeem-passkey", {
85
- readonly _tag: S.tag<"dxos.org/plugin/client/action/redeem-passkey">;
84
+ const RedeemPasskey_base: Schema.TaggedClass<RedeemPasskey, "dxos.org/plugin/client/action/redeem-passkey", {
85
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/redeem-passkey">;
86
86
  } & {
87
- input: typeof S.Void;
88
- output: typeof S.Void;
87
+ input: typeof Schema.Void;
88
+ output: typeof Schema.Void;
89
89
  }>;
90
90
  export class RedeemPasskey extends RedeemPasskey_base {
91
91
  }
92
- const RedeemToken_base: S.TaggedClass<RedeemToken, "dxos.org/plugin/client/action/redeem-token", {
93
- readonly _tag: S.tag<"dxos.org/plugin/client/action/redeem-token">;
92
+ const RedeemToken_base: Schema.TaggedClass<RedeemToken, "dxos.org/plugin/client/action/redeem-token", {
93
+ readonly _tag: Schema.tag<"dxos.org/plugin/client/action/redeem-token">;
94
94
  } & {
95
- input: S.Struct<{
96
- token: typeof S.String;
95
+ input: Schema.Struct<{
96
+ token: typeof Schema.String;
97
97
  }>;
98
- output: typeof S.Void;
98
+ output: typeof Schema.Void;
99
99
  }>;
100
100
  export class RedeemToken extends RedeemToken_base {
101
101
  }
@@ -113,7 +113,7 @@ export type ClientPluginOptions = ClientOptions & {
113
113
  /**
114
114
  * Run after the client has been initialized.
115
115
  */
116
- onClientInitialized?: (context: PluginsContext, client: Client) => MaybePromise<void>;
116
+ onClientInitialized?: (context: PluginContext, client: Client) => MaybePromise<void>;
117
117
  /**
118
118
  * Called when the client is reset.
119
119
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,KAAK,MAAM,EAAE,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,C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AC,EAAE,MAAM,CAAA;KAAE,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;CAC/D,CAAC;AAEF,yBAAiB,OAAO,CAAC;IAKhB,MAAM,EAAE,oCAAY,CAAC;IAErB,MAAM,OAAO,2CAAmB,CAAC;IACjC,MAAM,OAAO,2CAAmB,CAAC;IACjC,MAAM,QAAQ,4CAAoB,CAAC;CAC3C"}
@@ -1 +1 @@
1
- {"version":"5.7.3"}
1
+ {"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-client",
3
- "version": "0.8.2-main.f081794",
3
+ "version": "0.8.2-main.fbd8ed0",
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,44 +34,50 @@
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.f081794",
39
- "@dxos/config": "0.8.2-main.f081794",
40
- "@dxos/async": "0.8.2-main.f081794",
41
- "@dxos/echo-schema": "0.8.2-main.f081794",
42
- "@dxos/echo-signals": "0.8.2-main.f081794",
43
- "@dxos/invariant": "0.8.2-main.f081794",
44
- "@dxos/local-storage": "0.8.2-main.f081794",
45
- "@dxos/log": "0.8.2-main.f081794",
46
- "@dxos/plugin-graph": "0.8.2-main.f081794",
47
- "@dxos/plugin-observability": "0.8.2-main.f081794",
48
- "@dxos/react-ui-form": "0.8.2-main.f081794",
49
- "@dxos/react-client": "0.8.2-main.f081794",
50
- "@dxos/react-ui-stack": "0.8.2-main.f081794",
51
- "@dxos/react-ui-pickers": "0.8.2-main.f081794",
52
- "@dxos/shell": "0.8.2-main.f081794",
53
- "@dxos/util": "0.8.2-main.f081794"
39
+ "@dxos/async": "0.8.2-main.fbd8ed0",
40
+ "@dxos/app-framework": "0.8.2-main.fbd8ed0",
41
+ "@dxos/config": "0.8.2-main.fbd8ed0",
42
+ "@dxos/echo": "0.8.2-main.fbd8ed0",
43
+ "@dxos/echo-schema": "0.8.2-main.fbd8ed0",
44
+ "@dxos/echo-signals": "0.8.2-main.fbd8ed0",
45
+ "@dxos/invariant": "0.8.2-main.fbd8ed0",
46
+ "@dxos/local-storage": "0.8.2-main.fbd8ed0",
47
+ "@dxos/plugin-graph": "0.8.2-main.fbd8ed0",
48
+ "@dxos/log": "0.8.2-main.fbd8ed0",
49
+ "@dxos/plugin-observability": "0.8.2-main.fbd8ed0",
50
+ "@dxos/react-client": "0.8.2-main.fbd8ed0",
51
+ "@dxos/react-ui-form": "0.8.2-main.fbd8ed0",
52
+ "@dxos/react-ui-stack": "0.8.2-main.fbd8ed0",
53
+ "@dxos/react-ui-pickers": "0.8.2-main.fbd8ed0",
54
+ "@dxos/shell": "0.8.2-main.fbd8ed0",
55
+ "@dxos/util": "0.8.2-main.fbd8ed0"
54
56
  },
55
57
  "devDependencies": {
58
+ "@effect-rx/rx-react": "^0.34.1",
59
+ "@effect/platform": "0.80.12",
56
60
  "@phosphor-icons/react": "^2.1.5",
57
61
  "@types/react": "~18.2.0",
58
62
  "@types/react-dom": "~18.2.0",
59
- "effect": "3.13.3",
63
+ "effect": "3.14.21",
60
64
  "react": "~18.2.0",
61
65
  "react-dom": "~18.2.0",
62
66
  "vite": "5.4.7",
63
- "@dxos/live-object": "0.8.2-main.f081794",
64
- "@dxos/react-ui": "0.8.2-main.f081794",
65
- "@dxos/react-ui-theme": "0.8.2-main.f081794",
66
- "@dxos/storybook-utils": "0.8.2-main.f081794"
67
+ "@dxos/react-ui": "0.8.2-main.fbd8ed0",
68
+ "@dxos/react-ui-theme": "0.8.2-main.fbd8ed0",
69
+ "@dxos/live-object": "0.8.2-main.fbd8ed0",
70
+ "@dxos/storybook-utils": "0.8.2-main.fbd8ed0"
67
71
  },
68
72
  "peerDependencies": {
73
+ "@effect-rx/rx-react": "^0.34.1",
74
+ "@effect/platform": "0.80.12",
69
75
  "@phosphor-icons/react": "^2.1.5",
70
- "effect": "3.13.3",
76
+ "effect": "^3.13.3",
71
77
  "react": "~18.2.0",
72
78
  "react-dom": "~18.2.0",
73
- "@dxos/react-ui": "0.8.2-main.f081794",
74
- "@dxos/react-ui-theme": "0.8.2-main.f081794"
79
+ "@dxos/react-ui": "0.8.2-main.fbd8ed0",
80
+ "@dxos/react-ui-theme": "0.8.2-main.fbd8ed0"
75
81
  },
76
82
  "publishConfig": {
77
83
  "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`,
@@ -2,94 +2,112 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import { Rx } from '@effect-rx/rx-react';
6
+ import { Option, pipe } from 'effect';
7
+
5
8
  import { createIntent } from '@dxos/app-framework';
6
- import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
7
- import { createExtension, toSignal, type Node } from '@dxos/plugin-graph';
9
+ import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
10
+ import { createExtension, rxFromObservable, ROOT_ID } from '@dxos/plugin-graph';
8
11
  import { ConnectionState } from '@dxos/react-client/mesh';
9
12
 
10
13
  import { ClientCapabilities } from './capabilities';
11
14
  import { CLIENT_PLUGIN } from '../meta';
12
15
  import { Account, ClientAction } from '../types';
13
16
 
14
- export default (context: PluginsContext) =>
17
+ export default (context: PluginContext) =>
15
18
  contributes(
16
19
  Capabilities.AppGraphBuilder,
17
20
  createExtension({
18
21
  id: CLIENT_PLUGIN,
19
- filter: (node): node is Node<null> => node.id === 'root',
20
- actions: () => [
21
- {
22
- id: `${CLIENT_PLUGIN}/open-user-account`,
23
- data: async () => {
24
- const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
25
- await dispatch(createIntent(ClientAction.ShareIdentity));
26
- },
27
- properties: {
28
- label: ['open user account label', { ns: CLIENT_PLUGIN }],
29
- icon: 'ph--user--regular',
30
- keyBinding: {
31
- macos: 'meta+shift+.',
32
- // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
33
- windows: 'alt+shift+.',
34
- linux: 'alt+shift+>',
35
- },
36
- },
37
- },
38
- ],
39
- connector: () => {
40
- const client = context.requestCapability(ClientCapabilities.Client);
41
- const identity = client.halo.identity.get();
42
- const status = toSignal(
43
- (onChange) => client.mesh.networkStatus.subscribe(() => onChange()).unsubscribe,
44
- () => client.mesh.networkStatus.get(),
45
- );
46
-
47
- return [
48
- {
49
- id: Account.id,
50
- type: CLIENT_PLUGIN,
51
- properties: {
52
- label: ['account label', { ns: CLIENT_PLUGIN }],
53
- icon: 'ph--user--regular',
54
- disposition: 'user-account',
55
- // NOTE: This currently needs to be the identity key because the fallback is generated from hex.
56
- userId: identity?.identityKey.toHex(),
57
- hue: identity?.profile?.data?.hue,
58
- emoji: identity?.profile?.data?.emoji,
59
- status: status?.swarm === ConnectionState.OFFLINE ? 'error' : 'active',
60
- },
61
- nodes: [
62
- {
63
- id: Account.Profile,
64
- data: Account.Profile,
65
- type: CLIENT_PLUGIN,
66
- properties: {
67
- label: ['profile label', { ns: CLIENT_PLUGIN }],
68
- icon: 'ph--user--regular',
22
+ actions: (node) =>
23
+ Rx.make((get) =>
24
+ pipe(
25
+ get(node),
26
+ Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
27
+ Option.map(() => {
28
+ return [
29
+ {
30
+ id: `${CLIENT_PLUGIN}/open-user-account`,
31
+ data: async () => {
32
+ const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
33
+ await dispatch(createIntent(ClientAction.ShareIdentity));
34
+ },
35
+ properties: {
36
+ label: ['open user account label', { ns: CLIENT_PLUGIN }],
37
+ icon: 'ph--user--regular',
38
+ disposition: 'menu',
39
+ keyBinding: {
40
+ macos: 'meta+shift+.',
41
+ // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
42
+ windows: 'alt+shift+.',
43
+ linux: 'alt+shift+>',
44
+ },
45
+ },
69
46
  },
70
- },
71
- {
72
- id: Account.Devices,
73
- data: Account.Devices,
74
- type: CLIENT_PLUGIN,
75
- properties: {
76
- label: ['devices label', { ns: CLIENT_PLUGIN }],
77
- icon: 'ph--devices--regular',
78
- testId: 'clientPlugin.devices',
79
- },
80
- },
81
- {
82
- id: Account.Security,
83
- data: Account.Security,
84
- type: CLIENT_PLUGIN,
85
- properties: {
86
- label: ['security label', { ns: CLIENT_PLUGIN }],
87
- icon: 'ph--key--regular',
47
+ ];
48
+ }),
49
+ Option.getOrElse(() => []),
50
+ ),
51
+ ),
52
+ connector: (node) =>
53
+ Rx.make((get) =>
54
+ pipe(
55
+ get(node),
56
+ Option.flatMap((node) => (node.id === ROOT_ID ? Option.some(node) : Option.none())),
57
+ Option.map(() => {
58
+ const client = context.getCapability(ClientCapabilities.Client);
59
+ const identity = get(rxFromObservable(client.halo.identity));
60
+ const status = get(rxFromObservable(client.mesh.networkStatus));
61
+
62
+ return [
63
+ {
64
+ id: Account.id,
65
+ type: CLIENT_PLUGIN,
66
+ properties: {
67
+ label: ['account label', { ns: CLIENT_PLUGIN }],
68
+ icon: 'ph--user--regular',
69
+ disposition: 'user-account',
70
+ // NOTE: This currently needs to be the identity key because the fallback is generated from hex.
71
+ userId: identity?.identityKey.toHex(),
72
+ hue: identity?.profile?.data?.hue,
73
+ emoji: identity?.profile?.data?.emoji,
74
+ status: status.swarm === ConnectionState.OFFLINE ? 'error' : 'active',
75
+ },
76
+ nodes: [
77
+ {
78
+ id: Account.Profile,
79
+ data: Account.Profile,
80
+ type: CLIENT_PLUGIN,
81
+ properties: {
82
+ label: ['profile label', { ns: CLIENT_PLUGIN }],
83
+ icon: 'ph--user--regular',
84
+ },
85
+ },
86
+ {
87
+ id: Account.Devices,
88
+ data: Account.Devices,
89
+ type: CLIENT_PLUGIN,
90
+ properties: {
91
+ label: ['devices label', { ns: CLIENT_PLUGIN }],
92
+ icon: 'ph--devices--regular',
93
+ testId: 'clientPlugin.devices',
94
+ },
95
+ },
96
+ {
97
+ id: Account.Security,
98
+ data: Account.Security,
99
+ type: CLIENT_PLUGIN,
100
+ properties: {
101
+ label: ['security label', { ns: CLIENT_PLUGIN }],
102
+ icon: 'ph--key--regular',
103
+ },
104
+ },
105
+ ],
88
106
  },
89
- },
90
- ],
91
- },
92
- ];
93
- },
107
+ ];
108
+ }),
109
+ Option.getOrElse(() => []),
110
+ ),
111
+ ),
94
112
  }),
95
113
  );
@@ -2,7 +2,7 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes, type PluginsContext } from '@dxos/app-framework';
5
+ import { contributes, type PluginContext } from '@dxos/app-framework';
6
6
  import { Client } from '@dxos/react-client';
7
7
 
8
8
  import { ClientCapabilities } from './capabilities';
@@ -10,7 +10,7 @@ import { ClientEvents } from '../events';
10
10
  import { type ClientPluginOptions } from '../types';
11
11
 
12
12
  type ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationUrl' | 'invitationParam' | 'onReset'> & {
13
- context: PluginsContext;
13
+ context: PluginContext;
14
14
  };
15
15
 
16
16
  export default async ({ context, onClientInitialized, ...options }: ClientCapabilityOptions) => {
@@ -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';
@@ -11,7 +11,7 @@ import {
11
11
  createIntent,
12
12
  createResolver,
13
13
  LayoutAction,
14
- type PluginsContext,
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';
@@ -24,7 +24,7 @@ import { ClientEvents } from '../events';
24
24
  import { Account, ClientAction } from '../types';
25
25
 
26
26
  type IntentResolverOptions = {
27
- context: PluginsContext;
27
+ context: PluginContext;
28
28
  appName?: string;
29
29
  };
30
30
 
@@ -35,8 +35,8 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
35
35
  createResolver({
36
36
  intent: ClientAction.CreateIdentity,
37
37
  resolve: async () => {
38
- const manager = context.requestCapability(Capabilities.PluginManager);
39
- const client = context.requestCapability(ClientCapabilities.Client);
38
+ const manager = context.getCapability(Capabilities.PluginManager);
39
+ const client = context.getCapability(ClientCapabilities.Client);
40
40
  const data = await client.halo.createIdentity();
41
41
  await manager.activate(ClientEvents.IdentityCreated);
42
42
  return {
@@ -132,7 +132,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
132
132
  createResolver({
133
133
  intent: ClientAction.CreateAgent,
134
134
  resolve: async () => {
135
- const client = context.requestCapability(ClientCapabilities.Client);
135
+ const client = context.getCapability(ClientCapabilities.Client);
136
136
  invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');
137
137
  await client.services.services.EdgeAgentService.createAgent(null as any, { timeout: 10_000 });
138
138
  },
@@ -140,7 +140,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
140
140
  createResolver({
141
141
  intent: ClientAction.CreateRecoveryCode,
142
142
  resolve: async () => {
143
- const client = context.requestCapability(ClientCapabilities.Client);
143
+ const client = context.getCapability(ClientCapabilities.Client);
144
144
  invariant(client.services.services.IdentityService, 'IdentityService not available');
145
145
  // TODO(wittjosiah): This needs a proper api.
146
146
  const { recoveryCode } = await client.services.services.IdentityService.createRecoveryCredential({});
@@ -162,7 +162,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
162
162
  createResolver({
163
163
  intent: ClientAction.CreatePasskey,
164
164
  resolve: async () => {
165
- const client = context.requestCapability(ClientCapabilities.Client);
165
+ const client = context.getCapability(ClientCapabilities.Client);
166
166
  const identity = client.halo.identity.get();
167
167
  invariant(identity, 'Identity not available');
168
168
 
@@ -207,7 +207,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
207
207
  createResolver({
208
208
  intent: ClientAction.RedeemPasskey,
209
209
  resolve: async () => {
210
- const client = context.requestCapability(ClientCapabilities.Client);
210
+ const client = context.getCapability(ClientCapabilities.Client);
211
211
  // TODO(wittjosiah): This needs a proper api.
212
212
  invariant(client.services.services.IdentityService, 'IdentityService not available');
213
213
  const { deviceKey, controlFeedKey, challenge } =
@@ -238,7 +238,7 @@ export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
238
238
  createResolver({
239
239
  intent: ClientAction.RedeemToken,
240
240
  resolve: async (data) => {
241
- const client = context.requestCapability(ClientCapabilities.Client);
241
+ const client = context.getCapability(ClientCapabilities.Client);
242
242
  // TODO(wittjosiah): This needs a proper api.
243
243
  invariant(client.services.services.IdentityService, 'IdentityService not available');
244
244
  await client.services.services.IdentityService.recoverIdentity(
@@ -2,21 +2,24 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { effect } from '@preact/signals-core';
6
-
7
- import { Capabilities, contributes, type PluginsContext } from '@dxos/app-framework';
5
+ import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
8
6
 
9
7
  import { ClientCapabilities } from './capabilities';
10
8
 
11
- export default (context: PluginsContext) => {
12
- const client = context.requestCapability(ClientCapabilities.Client);
9
+ export default (context: PluginContext) => {
10
+ const registry = context.getCapability(Capabilities.RxRegistry);
11
+ const client = context.getCapability(ClientCapabilities.Client);
13
12
 
14
13
  // NOTE: Migrations are currently unidirectional and idempotent.
15
- const unsubscribe = effect(() => {
16
- const migrations = Array.from(new Set(context.requestCapabilities(ClientCapabilities.Migration).flat()));
17
- const spaces = client.spaces.get();
18
- void Promise.all(spaces.map((space) => space.db.runMigrations(migrations)));
19
- });
14
+ const cancel = registry.subscribe(
15
+ context.capabilities(ClientCapabilities.Migration),
16
+ (_migrations) => {
17
+ const migrations = Array.from(new Set(_migrations.flat()));
18
+ const spaces = client.spaces.get();
19
+ void Promise.all(spaces.map((space) => space.db.runMigrations(migrations)));
20
+ },
21
+ { immediate: true },
22
+ );
20
23
 
21
- return contributes(Capabilities.Null, null, () => unsubscribe());
24
+ return contributes(Capabilities.Null, null, () => cancel());
22
25
  };
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
6
+ import { type TypedObject } from '@dxos/echo-schema';
7
+
8
+ import { ClientCapabilities } from './capabilities';
9
+
10
+ export default (context: PluginContext) => {
11
+ const registry = context.getCapability(Capabilities.RxRegistry);
12
+ const client = context.getCapability(ClientCapabilities.Client);
13
+
14
+ // TODO(wittjosiah): Unregister schemas when they are disabled.
15
+ let previous: TypedObject[] = [];
16
+ const cancel = registry.subscribe(
17
+ context.capabilities(ClientCapabilities.Schema),
18
+ (_schemas) => {
19
+ const schemas = Array.from(new Set(_schemas.flat()));
20
+ // TODO(wittjosiah): Filter out schemas which the client has already registered.
21
+ const newSchemas = schemas.filter((schema) => !previous.includes(schema));
22
+ previous = schemas;
23
+ client.addTypes(newSchemas);
24
+ },
25
+ { immediate: true },
26
+ );
27
+
28
+ return contributes(Capabilities.Null, null, () => cancel());
29
+ };