@dxos/plugin-client 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe

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 (363) hide show
  1. package/dist/lib/browser/chunk-ELAYKIQU.mjs +12 -0
  2. package/dist/lib/browser/chunk-ELAYKIQU.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  4. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-M43LJQ5U.mjs +175 -0
  6. package/dist/lib/browser/chunk-M43LJQ5U.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-WNJRYPGG.mjs +131 -0
  8. package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
  9. package/dist/lib/browser/cli/index.mjs +92 -80
  10. package/dist/lib/browser/cli/index.mjs.map +3 -3
  11. package/dist/lib/browser/create-agent-SS5SE35J.mjs +34 -0
  12. package/dist/lib/browser/create-agent-SS5SE35J.mjs.map +7 -0
  13. package/dist/lib/browser/create-identity-PBEUEIPN.mjs +30 -0
  14. package/dist/lib/browser/create-identity-PBEUEIPN.mjs.map +7 -0
  15. package/dist/lib/browser/create-passkey-JN6I5WMM.mjs +105 -0
  16. package/dist/lib/browser/create-passkey-JN6I5WMM.mjs.map +7 -0
  17. package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs +44 -0
  18. package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs.map +7 -0
  19. package/dist/lib/browser/index.mjs +90 -93
  20. package/dist/lib/browser/index.mjs.map +4 -4
  21. package/dist/lib/browser/join-identity-2BP4G2SD.mjs +27 -0
  22. package/dist/lib/browser/join-identity-2BP4G2SD.mjs.map +7 -0
  23. package/dist/lib/browser/meta.json +1 -1
  24. package/dist/lib/browser/operations/index.mjs +13 -0
  25. package/dist/lib/browser/operations/index.mjs.map +7 -0
  26. package/dist/lib/browser/recover-identity-LS6B5INB.mjs +26 -0
  27. package/dist/lib/browser/recover-identity-LS6B5INB.mjs.map +7 -0
  28. package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs +82 -0
  29. package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs.map +7 -0
  30. package/dist/lib/browser/redeem-token-6BCRGKV6.mjs +37 -0
  31. package/dist/lib/browser/redeem-token-6BCRGKV6.mjs.map +7 -0
  32. package/dist/lib/browser/reset-storage-QJLTL7J3.mjs +26 -0
  33. package/dist/lib/browser/reset-storage-QJLTL7J3.mjs.map +7 -0
  34. package/dist/lib/browser/share-identity-YJEBJTPA.mjs +31 -0
  35. package/dist/lib/browser/share-identity-YJEBJTPA.mjs.map +7 -0
  36. package/dist/lib/browser/testing/index.mjs +22 -0
  37. package/dist/lib/browser/testing/index.mjs.map +7 -0
  38. package/dist/lib/browser/types/index.mjs +4 -5
  39. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  40. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  41. package/dist/lib/node-esm/chunk-IT5LAIV3.mjs +133 -0
  42. package/dist/lib/node-esm/chunk-IT5LAIV3.mjs.map +7 -0
  43. package/dist/lib/node-esm/chunk-J5RWSQT6.mjs +14 -0
  44. package/dist/lib/node-esm/chunk-J5RWSQT6.mjs.map +7 -0
  45. package/dist/lib/node-esm/chunk-SJ6FDER5.mjs +176 -0
  46. package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +7 -0
  47. package/dist/lib/node-esm/cli/index.mjs +92 -80
  48. package/dist/lib/node-esm/cli/index.mjs.map +3 -3
  49. package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs +35 -0
  50. package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs.map +7 -0
  51. package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs +31 -0
  52. package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs.map +7 -0
  53. package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs +106 -0
  54. package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs.map +7 -0
  55. package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs +45 -0
  56. package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs.map +7 -0
  57. package/dist/lib/node-esm/index.mjs +90 -93
  58. package/dist/lib/node-esm/index.mjs.map +4 -4
  59. package/dist/lib/node-esm/join-identity-75JCKQHM.mjs +28 -0
  60. package/dist/lib/node-esm/join-identity-75JCKQHM.mjs.map +7 -0
  61. package/dist/lib/node-esm/meta.json +1 -1
  62. package/dist/lib/node-esm/operations/index.mjs +14 -0
  63. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  64. package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs +27 -0
  65. package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs.map +7 -0
  66. package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs +83 -0
  67. package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs.map +7 -0
  68. package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs +38 -0
  69. package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs.map +7 -0
  70. package/dist/lib/node-esm/reset-storage-S5MJITI3.mjs +27 -0
  71. package/dist/lib/node-esm/reset-storage-S5MJITI3.mjs.map +7 -0
  72. package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs +32 -0
  73. package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs.map +7 -0
  74. package/dist/lib/node-esm/testing/index.mjs +23 -0
  75. package/dist/lib/node-esm/testing/index.mjs.map +7 -0
  76. package/dist/lib/node-esm/types/index.mjs +4 -5
  77. package/dist/types/src/ClientPlugin.d.ts +1 -1
  78. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  79. package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
  80. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  81. package/dist/types/src/capabilities/client.d.ts +8 -0
  82. package/dist/types/src/capabilities/client.d.ts.map +1 -0
  83. package/dist/types/src/capabilities/index.d.ts +32 -7
  84. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/migrations.d.ts +5 -0
  86. package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
  88. package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +15 -0
  90. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/{client/index.d.ts → node.d.ts} +7 -3
  92. package/dist/types/src/capabilities/node.d.ts.map +1 -0
  93. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  94. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/{react-context/react-context.d.ts → react-context.d.ts} +1 -1
  96. package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/react-surface.d.ts +9 -0
  98. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/schema-defs.d.ts +5 -0
  100. package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
  101. package/dist/types/src/cli/commands/config/view.d.ts.map +1 -1
  102. package/dist/types/src/cli/commands/device/info/info.d.ts +2 -2
  103. package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -1
  104. package/dist/types/src/cli/commands/device/list/list.d.ts +2 -2
  105. package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -1
  106. package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -1
  107. package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -1
  108. package/dist/types/src/cli/commands/halo/create/create.d.ts +2 -2
  109. package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -1
  110. package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +1 -1
  111. package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -1
  112. package/dist/types/src/cli/commands/halo/identity/identity.d.ts +2 -2
  113. package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -1
  114. package/dist/types/src/cli/commands/halo/keys/keys.d.ts +2 -2
  115. package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -1
  116. package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -1
  117. package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -1
  118. package/dist/types/src/cli/commands/profile/create.d.ts +2 -1
  119. package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -1
  120. package/dist/types/src/cli/commands/profile/delete.d.ts +1 -1
  121. package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -1
  122. package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -1
  123. package/dist/types/src/cli/plugin.d.ts +1 -1
  124. package/dist/types/src/cli/plugin.d.ts.map +1 -1
  125. package/dist/types/src/cli/testing/test-console.d.ts.map +1 -1
  126. package/dist/types/src/components/index.d.ts +0 -6
  127. package/dist/types/src/components/index.d.ts.map +1 -1
  128. package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
  129. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +184 -0
  130. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
  131. package/dist/types/src/containers/DevicesContainer/index.d.ts +2 -0
  132. package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
  133. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
  134. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +15 -0
  135. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
  136. package/dist/types/src/containers/JoinDialog/index.d.ts +2 -0
  137. package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
  138. package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
  139. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
  140. package/dist/types/src/containers/ProfileContainer/index.d.ts +2 -0
  141. package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
  142. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
  143. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
  144. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
  145. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
  146. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
  147. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
  148. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +2 -0
  149. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
  150. package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.d.ts +1 -1
  151. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
  152. package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.stories.d.ts +1 -1
  153. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
  154. package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
  155. package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
  156. package/dist/types/src/containers/index.d.ts +10 -0
  157. package/dist/types/src/containers/index.d.ts.map +1 -0
  158. package/dist/types/src/index.d.ts +2 -4
  159. package/dist/types/src/index.d.ts.map +1 -1
  160. package/dist/types/src/operations/create-agent.d.ts +5 -0
  161. package/dist/types/src/operations/create-agent.d.ts.map +1 -0
  162. package/dist/types/src/operations/create-identity.d.ts +5 -0
  163. package/dist/types/src/operations/create-identity.d.ts.map +1 -0
  164. package/dist/types/src/operations/create-passkey.d.ts +5 -0
  165. package/dist/types/src/operations/create-passkey.d.ts.map +1 -0
  166. package/dist/types/src/operations/create-recovery-code.d.ts +5 -0
  167. package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -0
  168. package/dist/types/src/operations/definitions.d.ts +36 -0
  169. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  170. package/dist/types/src/operations/index.d.ts +4 -0
  171. package/dist/types/src/operations/index.d.ts.map +1 -0
  172. package/dist/types/src/operations/join-identity.d.ts +5 -0
  173. package/dist/types/src/operations/join-identity.d.ts.map +1 -0
  174. package/dist/types/src/operations/recover-identity.d.ts +5 -0
  175. package/dist/types/src/operations/recover-identity.d.ts.map +1 -0
  176. package/dist/types/src/operations/redeem-passkey.d.ts +5 -0
  177. package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -0
  178. package/dist/types/src/operations/redeem-token.d.ts +5 -0
  179. package/dist/types/src/operations/redeem-token.d.ts.map +1 -0
  180. package/dist/types/src/operations/reset-storage.d.ts +5 -0
  181. package/dist/types/src/operations/reset-storage.d.ts.map +1 -0
  182. package/dist/types/src/operations/share-identity.d.ts +5 -0
  183. package/dist/types/src/operations/share-identity.d.ts.map +1 -0
  184. package/dist/types/src/testing/index.d.ts +2 -0
  185. package/dist/types/src/testing/index.d.ts.map +1 -0
  186. package/dist/types/src/testing/initializeIdentity.d.ts +13 -0
  187. package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -0
  188. package/dist/types/src/translations.d.ts.map +1 -1
  189. package/dist/types/src/types/capabilities.d.ts +1 -1
  190. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  191. package/dist/types/src/types/schema.d.ts +26 -175
  192. package/dist/types/src/types/schema.d.ts.map +1 -1
  193. package/dist/types/tsconfig.tsbuildinfo +1 -1
  194. package/package.json +72 -36
  195. package/src/ClientPlugin.ts +37 -24
  196. package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +22 -20
  197. package/src/capabilities/{client/client.ts → client.ts} +16 -12
  198. package/src/capabilities/index.ts +15 -7
  199. package/src/capabilities/{migrations/migrations.ts → migrations.ts} +4 -4
  200. package/src/capabilities/navigation-handler/index.ts +9 -0
  201. package/src/capabilities/navigation-handler/navigation-handler.ts +64 -0
  202. package/src/capabilities/node.ts +13 -0
  203. package/src/capabilities/operation-handler.ts +16 -0
  204. package/src/capabilities/{react-context/react-context.tsx → react-context.tsx} +7 -7
  205. package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +21 -22
  206. package/src/capabilities/{schema-defs/schema-defs.ts → schema-defs.ts} +8 -7
  207. package/src/cli/commands/config/view.ts +4 -1
  208. package/src/cli/commands/device/info/info.test.ts +0 -1
  209. package/src/cli/commands/device/info/info.ts +0 -2
  210. package/src/cli/commands/device/list/list.test.ts +0 -1
  211. package/src/cli/commands/device/list/list.ts +0 -2
  212. package/src/cli/commands/device/update/update.ts +0 -2
  213. package/src/cli/commands/edge/status.ts +3 -2
  214. package/src/cli/commands/halo/create/create.test.ts +0 -1
  215. package/src/cli/commands/halo/create/create.ts +14 -6
  216. package/src/cli/commands/halo/credential/list/list.test.ts +0 -1
  217. package/src/cli/commands/halo/credential/list/list.ts +4 -7
  218. package/src/cli/commands/halo/identity/identity.ts +0 -1
  219. package/src/cli/commands/halo/keys/keys.ts +0 -2
  220. package/src/cli/commands/halo/seed/seed.ts +0 -2
  221. package/src/cli/commands/halo/update/update.test.ts +0 -1
  222. package/src/cli/commands/halo/update/update.ts +0 -2
  223. package/src/cli/commands/profile/create.ts +9 -6
  224. package/src/cli/commands/profile/delete.ts +5 -2
  225. package/src/cli/commands/profile/list.ts +12 -11
  226. package/src/cli/plugin.ts +11 -13
  227. package/src/cli/testing/test-console.ts +1 -2
  228. package/src/components/index.ts +0 -7
  229. package/src/constants.ts +4 -4
  230. package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +10 -7
  231. package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +77 -84
  232. package/src/containers/DevicesContainer/index.ts +5 -0
  233. package/src/containers/JoinDialog/JoinDialog.stories.tsx +42 -0
  234. package/src/{components → containers/JoinDialog}/JoinDialog.tsx +20 -15
  235. package/src/containers/JoinDialog/index.ts +5 -0
  236. package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -5
  237. package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +22 -30
  238. package/src/containers/ProfileContainer/index.ts +5 -0
  239. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -5
  240. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -26
  241. package/src/containers/RecoveryCodeDialog/index.ts +8 -0
  242. package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +10 -7
  243. package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
  244. package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
  245. package/src/{components → containers/ResetDialog}/ResetDialog.stories.tsx +27 -15
  246. package/src/{components → containers/ResetDialog}/ResetDialog.tsx +15 -13
  247. package/src/containers/ResetDialog/index.ts +8 -0
  248. package/src/containers/index.ts +15 -0
  249. package/src/index.ts +2 -5
  250. package/src/meta.ts +1 -1
  251. package/src/operations/create-agent.ts +26 -0
  252. package/src/operations/create-identity.ts +29 -0
  253. package/src/operations/create-passkey.ts +88 -0
  254. package/src/operations/create-recovery-code.ts +34 -0
  255. package/src/operations/definitions.ts +107 -0
  256. package/src/operations/index.ts +20 -0
  257. package/src/operations/join-identity.ts +28 -0
  258. package/src/operations/recover-identity.ts +28 -0
  259. package/src/operations/redeem-passkey.ts +85 -0
  260. package/src/operations/redeem-token.ts +31 -0
  261. package/src/operations/reset-storage.ts +27 -0
  262. package/src/operations/share-identity.ts +26 -0
  263. package/src/testing/index.ts +5 -0
  264. package/src/testing/initializeIdentity.ts +24 -0
  265. package/src/translations.ts +53 -42
  266. package/src/types/capabilities.ts +4 -4
  267. package/src/types/events.ts +6 -6
  268. package/src/types/schema.ts +18 -123
  269. package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs +0 -118
  270. package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs.map +0 -7
  271. package/dist/lib/browser/chunk-4BZGRIFS.mjs +0 -293
  272. package/dist/lib/browser/chunk-4BZGRIFS.mjs.map +0 -7
  273. package/dist/lib/browser/chunk-F7H2Y3Z2.mjs +0 -18
  274. package/dist/lib/browser/chunk-F7H2Y3Z2.mjs.map +0 -7
  275. package/dist/lib/browser/chunk-G7C3S2BE.mjs +0 -15
  276. package/dist/lib/browser/chunk-G7C3S2BE.mjs.map +0 -7
  277. package/dist/lib/browser/client-IX5LMWV4.mjs +0 -86
  278. package/dist/lib/browser/client-IX5LMWV4.mjs.map +0 -7
  279. package/dist/lib/browser/migrations-3EBTAW3N.mjs +0 -24
  280. package/dist/lib/browser/migrations-3EBTAW3N.mjs.map +0 -7
  281. package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs +0 -298
  282. package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs.map +0 -7
  283. package/dist/lib/browser/react-context-4UABG3GP.mjs +0 -24
  284. package/dist/lib/browser/react-context-4UABG3GP.mjs.map +0 -7
  285. package/dist/lib/browser/react-surface-RSQ74XCT.mjs +0 -675
  286. package/dist/lib/browser/react-surface-RSQ74XCT.mjs.map +0 -7
  287. package/dist/lib/browser/schema-defs-O7VLP745.mjs +0 -26
  288. package/dist/lib/browser/schema-defs-O7VLP745.mjs.map +0 -7
  289. package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs +0 -119
  290. package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs.map +0 -7
  291. package/dist/lib/node-esm/chunk-BCELGXRI.mjs +0 -20
  292. package/dist/lib/node-esm/chunk-BCELGXRI.mjs.map +0 -7
  293. package/dist/lib/node-esm/chunk-JAF64TFQ.mjs +0 -295
  294. package/dist/lib/node-esm/chunk-JAF64TFQ.mjs.map +0 -7
  295. package/dist/lib/node-esm/chunk-PRAFFO54.mjs +0 -16
  296. package/dist/lib/node-esm/chunk-PRAFFO54.mjs.map +0 -7
  297. package/dist/lib/node-esm/client-FFPK5UFP.mjs +0 -87
  298. package/dist/lib/node-esm/client-FFPK5UFP.mjs.map +0 -7
  299. package/dist/lib/node-esm/migrations-WSZSFGDK.mjs +0 -25
  300. package/dist/lib/node-esm/migrations-WSZSFGDK.mjs.map +0 -7
  301. package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs +0 -299
  302. package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs.map +0 -7
  303. package/dist/lib/node-esm/react-context-UVXMGPW4.mjs +0 -25
  304. package/dist/lib/node-esm/react-context-UVXMGPW4.mjs.map +0 -7
  305. package/dist/lib/node-esm/react-surface-KBHANGGC.mjs +0 -676
  306. package/dist/lib/node-esm/react-surface-KBHANGGC.mjs.map +0 -7
  307. package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs +0 -27
  308. package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs.map +0 -7
  309. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
  310. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
  311. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
  312. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
  313. package/dist/types/src/capabilities/client/client.d.ts +0 -8
  314. package/dist/types/src/capabilities/client/client.d.ts.map +0 -1
  315. package/dist/types/src/capabilities/client/index.d.ts.map +0 -1
  316. package/dist/types/src/capabilities/migrations/index.d.ts +0 -3
  317. package/dist/types/src/capabilities/migrations/index.d.ts.map +0 -1
  318. package/dist/types/src/capabilities/migrations/migrations.d.ts +0 -5
  319. package/dist/types/src/capabilities/migrations/migrations.d.ts.map +0 -1
  320. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -5
  321. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  322. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -8
  323. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  324. package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
  325. package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
  326. package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
  327. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
  328. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  329. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -9
  330. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  331. package/dist/types/src/capabilities/schema-defs/index.d.ts +0 -3
  332. package/dist/types/src/capabilities/schema-defs/index.d.ts.map +0 -1
  333. package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +0 -5
  334. package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +0 -1
  335. package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
  336. package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -181
  337. package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
  338. package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
  339. package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
  340. package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
  341. package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
  342. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
  343. package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
  344. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
  345. package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
  346. package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
  347. package/src/capabilities/app-graph-builder/index.ts +0 -7
  348. package/src/capabilities/client/index.ts +0 -7
  349. package/src/capabilities/migrations/index.ts +0 -7
  350. package/src/capabilities/operation-resolver/index.ts +0 -7
  351. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -248
  352. package/src/capabilities/react-context/index.ts +0 -7
  353. package/src/capabilities/react-surface/index.ts +0 -7
  354. package/src/capabilities/schema-defs/index.ts +0 -7
  355. package/src/components/RecoveryCredentialsContainer.tsx +0 -68
  356. /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
  357. /package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -0
  358. /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
  359. /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.stories.d.ts +0 -0
  360. /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -0
  361. /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.d.ts +0 -0
  362. /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
  363. /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.d.ts +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/capabilities.ts", "../../../src/meta.ts", "../../../src/types/events.ts", "../../../src/types/schema.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type Type } from '@dxos/echo';\n\nimport { meta } from '../meta';\n\nexport namespace ClientCapabilities {\n export const Client = Capability.make<Client>(`${meta.id}/capability/client`);\n export const Schema = Capability.make<Type.Entity.Any[]>(`${meta.id}/capability/schema`);\n export const Migration = Capability.make<ObjectMigration[]>(`${meta.id}/capability/migration`);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/client',\n name: 'Client',\n description: trim`\n Core client connectivity and peer-to-peer networking infrastructure.\n Manages identity, authentication, and real-time synchronization across devices.\n `,\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport namespace ClientEvents {\n export const ClientReady = ActivationEvent.make(`${meta.id}/event/client-ready`);\n export const SetupSchema = ActivationEvent.make(`${meta.id}/event/setup-schema`);\n export const SetupMigration = ActivationEvent.make(`${meta.id}/event/setup-migration`);\n export const IdentityCreated = ActivationEvent.make(`${meta.id}/event/identity-created`);\n export const SpacesReady = ActivationEvent.make(`${meta.id}/event/spaces-ready`);\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client, type ClientOptions, PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '../meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = Schema.Struct({\n identityKey: Schema.instanceOf(PublicKey),\n spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nexport namespace ClientAction {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${meta.id}/action/create-identity`, {\n input: ProfileSchema,\n output: IdentitySchema,\n }) {}\n\n export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.id}/action/join-identity`, {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.id}/action/share-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${meta.id}/action/recover-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.id}/action/reset-storage`, {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.id}/action/create-agent`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(\n `${meta.id}/action/create-recovery-code`,\n {\n input: Schema.Void,\n output: Schema.Void,\n },\n ) {}\n\n export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.id}/action/create-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.id}/action/redeem-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.id}/action/redeem-token`, {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n }) {}\n}\n\nconst CLIENT_OPERATION = `${meta.id}/operation`;\n\n/**\n * Operations for the Client plugin.\n */\nexport namespace ClientOperation {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export const CreateIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/create-identity`, name: 'Create Identity' },\n services: [Capability.Service],\n schema: {\n input: ProfileSchema,\n output: IdentitySchema,\n },\n });\n\n export const JoinIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/join-identity`, name: 'Join Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n },\n });\n\n export const ShareIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/share-identity`, name: 'Share Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RecoverIdentity = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/recover-identity`, name: 'Recover Identity' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const ResetStorage = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/reset-storage`, name: 'Reset Storage' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n },\n });\n\n export const CreateAgent = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/create-agent`, name: 'Create Agent' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const CreateRecoveryCode = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/create-recovery-code`, name: 'Create Recovery Code' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const CreatePasskey = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/create-passkey`, name: 'Create Passkey' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RedeemPasskey = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/redeem-passkey`, name: 'Redeem Passkey' },\n services: [Capability.Service],\n schema: {\n input: Schema.Void,\n output: Schema.Void,\n },\n });\n\n export const RedeemToken = Operation.make({\n meta: { key: `${CLIENT_OPERATION}/redeem-token`, name: 'Redeem Token' },\n services: [Capability.Service],\n schema: {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n },\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 invitationProp?: string;\n\n /**\n * Run after the client has been initialized.\n * Plugin context is provided so capabilities are accessible.\n */\n onClientInitialized?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when spaces are ready.\n * Plugin context is provided so capabilities are accessible.\n */\n onSpacesReady?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when the client is reset.\n * Plugin context is provided so capabilities are accessible.\n */\n onReset?: (params: { target?: string }) => Effect.Effect<void, Error | never, Capability.Service | never>;\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": ";;;AAIA,SAASA,kBAAkB;;;ACC3B,SAASC,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;AAIf;;;UDHiBC,qBAAAA;sBACFC,SAASC,WAAWC,KAAa,GAAGC,KAAKC,EAAE,oBAAoB;sBAC/DC,SAASJ,WAAWC,KAAwB,GAAGC,KAAKC,EAAE,oBAAoB;sBAC1EE,YAAYL,WAAWC,KAAwB,GAAGC,KAAKC,EAAE,uBAAuB;AAC/F,GAJiBL,uBAAAA,qBAAAA,CAAAA,EAAAA;;;;AEPjB,SAASQ,uBAAuB;UAIfC,eAAAA;gBACFC,cAAcC,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;gBAClEC,cAAcJ,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,qBAAqB;gBAClEE,iBAAiBL,gBAAgBC,KAAK,GAAGC,KAAKC,EAAE,wBAAwB;gBACxEG,kBAAkB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;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaM,qBAAqBO,UAAUC,KAAK;IAC/CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAyCI,MAAM;IAAuB;IACtFC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaO,gBAAgBM,UAAUC,KAAK;IAC1CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAmCI,MAAM;IAAiB;IAC1EC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaQ,gBAAgBK,UAAUC,KAAK;IAC1CpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAmCI,MAAM;IAAiB;IAC1EC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcI;MACdH,QAAeG;IACjB;EACF,CAAA;mBAEaS,cAAcI,UAAUC,KAAK;IACxCpB,MAAM;MAAEP,KAAK,GAAGwB,gBAAAA;MAAiCI,MAAM;IAAe;IACtEC,UAAU;MAACC,YAAWC;;IACtBC,QAAQ;MACNvB,OAAcrB,cAAO;QACnBmC,OAAc3B;MAChB,CAAA;MACAc,QAAeG;IACjB;EACF,CAAA;AACF,GAtGiBY,oBAAAA,kBAAAA,CAAAA,EAAAA;UAsIAQ,UAAAA;AAEf,QAAMC,MAAM;WAGC1B,KAAK,IAAI0B,GAAAA;WAETC,UAAU,GAAGD,GAAAA;WACbE,UAAU,GAAGF,GAAAA;WACbG,WAAW,GAAGH,GAAAA;AAC7B,GAViBD,YAAAA,UAAAA,CAAAA,EAAAA;;;;",
6
- "names": ["Capability", "trim", "meta", "id", "name", "description", "trim", "ClientCapabilities", "Client", "Capability", "make", "meta", "id", "Schema", "Migration", "ActivationEvent", "ClientEvents", "ClientReady", "ActivationEvent", "make", "meta", "id", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady", "Schema", "Capability", "PublicKey", "Operation", "IdentitySchema", "Struct", "identityKey", "instanceOf", "PublicKey", "spaceKey", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "ClientAction", "ProfileSchema", "CreateIdentity", "TaggedClass", "meta", "id", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "CLIENT_OPERATION", "ClientOperation", "Operation", "make", "name", "services", "Capability", "Service", "schema", "Account", "_id", "Profile", "Devices", "Security"]
7
- }
@@ -1,16 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- meta
4
- } from "./chunk-JAF64TFQ.mjs";
5
-
6
- // src/constants.ts
7
- var JOIN_DIALOG = `${meta.id}/JoinDialog`;
8
- var RECOVERY_CODE_DIALOG = `${meta.id}/RecoveryCodeDialog`;
9
- var RESET_DIALOG = `${meta.id}/ResetDialog`;
10
-
11
- export {
12
- JOIN_DIALOG,
13
- RECOVERY_CODE_DIALOG,
14
- RESET_DIALOG
15
- };
16
- //# sourceMappingURL=chunk-PRAFFO54.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/constants.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { meta } from './meta';\n\nexport const JOIN_DIALOG = `${meta.id}/JoinDialog`;\nexport const RECOVERY_CODE_DIALOG = `${meta.id}/RecoveryCodeDialog`;\nexport const RESET_DIALOG = `${meta.id}/ResetDialog`;\n"],
5
- "mappings": ";;;;;;AAMO,IAAMA,cAAc,GAAGC,KAAKC,EAAE;AAC9B,IAAMC,uBAAuB,GAAGF,KAAKC,EAAE;AACvC,IAAME,eAAe,GAAGH,KAAKC,EAAE;",
6
- "names": ["JOIN_DIALOG", "meta", "id", "RECOVERY_CODE_DIALOG", "RESET_DIALOG"]
7
- }
@@ -1,87 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- ClientCapabilities,
4
- ClientEvents
5
- } from "./chunk-JAF64TFQ.mjs";
6
-
7
- // src/capabilities/client/client.ts
8
- import * as Effect from "effect/Effect";
9
- import { Capability, Common, Plugin } from "@dxos/app-framework";
10
- import { Client, ClientService } from "@dxos/client";
11
- import { runAndForwardErrors } from "@dxos/effect";
12
- import { log } from "@dxos/log";
13
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/client/client.ts";
14
- var client_default = Capability.makeModule(Effect.fnUntraced(function* (props) {
15
- const { onClientInitialized, onSpacesReady, ...options } = props;
16
- const capabilityManager = yield* Capability.Service;
17
- const pluginManager = yield* Plugin.Service;
18
- log("creating client", void 0, {
19
- F: __dxlog_file,
20
- L: 23,
21
- S: this,
22
- C: (f, a) => f(...a)
23
- });
24
- const client = new Client(options);
25
- log("initializing client", void 0, {
26
- F: __dxlog_file,
27
- L: 25,
28
- S: this,
29
- C: (f, a) => f(...a)
30
- });
31
- yield* Effect.tryPromise(() => client.initialize());
32
- log("initialized client", void 0, {
33
- F: __dxlog_file,
34
- L: 27,
35
- S: this,
36
- C: (f, a) => f(...a)
37
- });
38
- if (onClientInitialized) {
39
- yield* onClientInitialized({
40
- client
41
- }).pipe(Effect.provideService(Capability.Service, capabilityManager), Effect.provideService(Plugin.Service, pluginManager));
42
- }
43
- log("called client initialized callback", void 0, {
44
- F: __dxlog_file,
45
- L: 34,
46
- S: this,
47
- C: (f, a) => f(...a)
48
- });
49
- client.reloaded.on(() => {
50
- client.halo.identity.subscribe(async (identity) => {
51
- if (identity) {
52
- window.location.href = window.location.origin;
53
- }
54
- });
55
- });
56
- const subscription = client.spaces.isReady.subscribe(async (ready) => {
57
- if (ready) {
58
- await Effect.gen(function* () {
59
- yield* Plugin.activate(ClientEvents.SpacesReady);
60
- if (onSpacesReady) {
61
- yield* onSpacesReady({
62
- client
63
- });
64
- }
65
- }).pipe(Effect.provideService(Capability.Service, capabilityManager), Effect.provideService(Plugin.Service, pluginManager), runAndForwardErrors);
66
- }
67
- });
68
- log("client capability ready", void 0, {
69
- F: __dxlog_file,
70
- L: 61,
71
- S: this,
72
- C: (f, a) => f(...a)
73
- });
74
- return [
75
- // TODO(wittjosiah): Try to remove and prefer layer?
76
- // Perhaps move to using layer has source of truth and add a getter capability for the client.
77
- Capability.contributes(ClientCapabilities.Client, client, () => Effect.gen(function* () {
78
- subscription.unsubscribe();
79
- yield* Effect.tryPromise(() => client.destroy());
80
- })),
81
- Capability.contributes(Common.Capability.Layer, ClientService.fromClient(client))
82
- ];
83
- }));
84
- export {
85
- client_default as default
86
- };
87
- //# sourceMappingURL=client-FFPK5UFP.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/client/client.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common, Plugin } from '@dxos/app-framework';\nimport { Client, ClientService } from '@dxos/client';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { log } from '@dxos/log';\n\nimport { ClientEvents } from '../../types';\nimport { ClientCapabilities, type ClientPluginOptions } from '../../types';\n\ntype ClientCapabilityOptions = Omit<ClientPluginOptions, 'appKey' | 'invitationUrl' | 'invitationParam' | 'onReset'>;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* (props?: ClientCapabilityOptions) {\n const { onClientInitialized, onSpacesReady, ...options } = props!;\n const capabilityManager = yield* Capability.Service;\n const pluginManager = yield* Plugin.Service;\n\n log('creating client');\n const client = new Client(options);\n log('initializing client');\n yield* Effect.tryPromise(() => client.initialize());\n log('initialized client');\n if (onClientInitialized) {\n yield* onClientInitialized({ client }).pipe(\n Effect.provideService(Capability.Service, capabilityManager),\n Effect.provideService(Plugin.Service, pluginManager),\n );\n }\n log('called client initialized callback');\n\n // TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.\n client.reloaded.on(() => {\n client.halo.identity.subscribe(async (identity) => {\n if (identity) {\n window.location.href = window.location.origin;\n }\n });\n });\n\n // TODO(burdon): The callback isn't called?\n const subscription = client.spaces.isReady.subscribe(async (ready) => {\n if (ready) {\n await Effect.gen(function* () {\n yield* Plugin.activate(ClientEvents.SpacesReady);\n if (onSpacesReady) {\n yield* onSpacesReady({ client });\n }\n }).pipe(\n Effect.provideService(Capability.Service, capabilityManager),\n Effect.provideService(Plugin.Service, pluginManager),\n runAndForwardErrors,\n );\n }\n });\n\n log('client capability ready');\n\n return [\n // TODO(wittjosiah): Try to remove and prefer layer?\n // Perhaps move to using layer has source of truth and add a getter capability for the client.\n Capability.contributes(ClientCapabilities.Client, client, () =>\n Effect.gen(function* () {\n subscription.unsubscribe();\n yield* Effect.tryPromise(() => client.destroy());\n }),\n ),\n Capability.contributes(Common.Capability.Layer, ClientService.fromClient(client)),\n ];\n }),\n);\n"],
5
- "mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,QAAQC,cAAc;AAC3C,SAASC,QAAQC,qBAAqB;AACtC,SAASC,2BAA2B;AACpC,SAASC,WAAW;;AAOpB,IAAA,iBAAeC,WAAWC,WACjBC,kBAAW,WAAWC,OAA+B;AAC1D,QAAM,EAAEC,qBAAqBC,eAAe,GAAGC,QAAAA,IAAYH;AAC3D,QAAMI,oBAAoB,OAAOP,WAAWQ;AAC5C,QAAMC,gBAAgB,OAAOC,OAAOF;AAEpCG,MAAI,mBAAA,QAAA;;;;;;AACJ,QAAMC,SAAS,IAAIC,OAAOP,OAAAA;AAC1BK,MAAI,uBAAA,QAAA;;;;;;AACJ,SAAcG,kBAAW,MAAMF,OAAOG,WAAU,CAAA;AAChDJ,MAAI,sBAAA,QAAA;;;;;;AACJ,MAAIP,qBAAqB;AACvB,WAAOA,oBAAoB;MAAEQ;IAAO,CAAA,EAAGI,KAC9BC,sBAAejB,WAAWQ,SAASD,iBAAAA,GACnCU,sBAAeP,OAAOF,SAASC,aAAAA,CAAAA;EAE1C;AACAE,MAAI,sCAAA,QAAA;;;;;;AAGJC,SAAOM,SAASC,GAAG,MAAA;AACjBP,WAAOQ,KAAKC,SAASC,UAAU,OAAOD,aAAAA;AACpC,UAAIA,UAAU;AACZE,eAAOC,SAASC,OAAOF,OAAOC,SAASE;MACzC;IACF,CAAA;EACF,CAAA;AAGA,QAAMC,eAAef,OAAOgB,OAAOC,QAAQP,UAAU,OAAOQ,UAAAA;AAC1D,QAAIA,OAAO;AACT,YAAaC,WAAI,aAAA;AACf,eAAOrB,OAAOsB,SAASC,aAAaC,WAAW;AAC/C,YAAI7B,eAAe;AACjB,iBAAOA,cAAc;YAAEO;UAAO,CAAA;QAChC;MACF,CAAA,EAAGI,KACMC,sBAAejB,WAAWQ,SAASD,iBAAAA,GACnCU,sBAAeP,OAAOF,SAASC,aAAAA,GACtC0B,mBAAAA;IAEJ;EACF,CAAA;AAEAxB,MAAI,2BAAA,QAAA;;;;;;AAEJ,SAAO;;;IAGLX,WAAWoC,YAAYC,mBAAmBxB,QAAQD,QAAQ,MACjDmB,WAAI,aAAA;AACTJ,mBAAaW,YAAW;AACxB,aAAcxB,kBAAW,MAAMF,OAAO2B,QAAO,CAAA;IAC/C,CAAA,CAAA;IAEFvC,WAAWoC,YAAYI,OAAOxC,WAAWyC,OAAOC,cAAcC,WAAW/B,MAAAA,CAAAA;;AAE7E,CAAA,CAAA;",
6
- "names": ["Effect", "Capability", "Common", "Plugin", "Client", "ClientService", "runAndForwardErrors", "log", "Capability", "makeModule", "fnUntraced", "props", "onClientInitialized", "onSpacesReady", "options", "capabilityManager", "Service", "pluginManager", "Plugin", "log", "client", "Client", "tryPromise", "initialize", "pipe", "provideService", "reloaded", "on", "halo", "identity", "subscribe", "window", "location", "href", "origin", "subscription", "spaces", "isReady", "ready", "gen", "activate", "ClientEvents", "SpacesReady", "runAndForwardErrors", "contributes", "ClientCapabilities", "unsubscribe", "destroy", "Common", "Layer", "ClientService", "fromClient"]
7
- }
@@ -1,25 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- ClientCapabilities
4
- } from "./chunk-JAF64TFQ.mjs";
5
-
6
- // src/capabilities/migrations/migrations.ts
7
- import * as Effect from "effect/Effect";
8
- import { Capability, Common } from "@dxos/app-framework";
9
- var migrations_default = Capability.makeModule(Effect.fnUntraced(function* () {
10
- const registry = yield* Capability.get(Common.Capability.AtomRegistry);
11
- const client = yield* Capability.get(ClientCapabilities.Client);
12
- const migrationsAtom = yield* Capability.atom(ClientCapabilities.Migration);
13
- const cancel = registry.subscribe(migrationsAtom, (_migrations) => {
14
- const migrations = Array.from(new Set(_migrations.flat()));
15
- const spaces = client.spaces.get();
16
- void Promise.all(spaces.map((space) => space.internal.db.runMigrations(migrations)));
17
- }, {
18
- immediate: true
19
- });
20
- return Capability.contributes(Common.Capability.Null, null, () => Effect.sync(() => cancel()));
21
- }));
22
- export {
23
- migrations_default as default
24
- };
25
- //# sourceMappingURL=migrations-WSZSFGDK.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/migrations/migrations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\n\nimport { ClientCapabilities } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Common.Capability.AtomRegistry);\n const client = yield* Capability.get(ClientCapabilities.Client);\n const migrationsAtom = yield* Capability.atom(ClientCapabilities.Migration);\n\n // NOTE: Migrations are currently unidirectional and idempotent.\n const cancel = registry.subscribe(\n migrationsAtom,\n (_migrations: any[]) => {\n const migrations = Array.from(new Set(_migrations.flat()));\n const spaces = client.spaces.get();\n void Promise.all(spaces.map((space: any) => space.internal.db.runMigrations(migrations)));\n },\n { immediate: true },\n );\n\n return Capability.contributes(Common.Capability.Null, null, () => Effect.sync(() => cancel()));\n }),\n);\n"],
5
- "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AAInC,IAAA,qBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,WAAW,OAAOH,WAAWI,IAAIC,OAAOL,WAAWM,YAAY;AACrE,QAAMC,SAAS,OAAOP,WAAWI,IAAII,mBAAmBC,MAAM;AAC9D,QAAMC,iBAAiB,OAAOV,WAAWW,KAAKH,mBAAmBI,SAAS;AAG1E,QAAMC,SAASV,SAASW,UACtBJ,gBACA,CAACK,gBAAAA;AACC,UAAMC,aAAaC,MAAMC,KAAK,IAAIC,IAAIJ,YAAYK,KAAI,CAAA,CAAA;AACtD,UAAMC,SAASd,OAAOc,OAAOjB,IAAG;AAChC,SAAKkB,QAAQC,IAAIF,OAAOG,IAAI,CAACC,UAAeA,MAAMC,SAASC,GAAGC,cAAcZ,UAAAA,CAAAA,CAAAA;EAC9E,GACA;IAAEa,WAAW;EAAK,CAAA;AAGpB,SAAO7B,WAAW8B,YAAYzB,OAAOL,WAAW+B,MAAM,MAAM,MAAaC,YAAK,MAAMnB,OAAAA,CAAAA,CAAAA;AACtF,CAAA,CAAA;",
6
- "names": ["Effect", "Capability", "Common", "Capability", "makeModule", "fnUntraced", "registry", "get", "Common", "AtomRegistry", "client", "ClientCapabilities", "Client", "migrationsAtom", "atom", "Migration", "cancel", "subscribe", "_migrations", "migrations", "Array", "from", "Set", "flat", "spaces", "Promise", "all", "map", "space", "internal", "db", "runMigrations", "immediate", "contributes", "Null", "sync"]
7
- }
@@ -1,299 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- JOIN_DIALOG,
4
- RECOVERY_CODE_DIALOG,
5
- RESET_DIALOG
6
- } from "./chunk-PRAFFO54.mjs";
7
- import {
8
- Account,
9
- ClientCapabilities,
10
- ClientEvents,
11
- ClientOperation
12
- } from "./chunk-JAF64TFQ.mjs";
13
-
14
- // src/capabilities/operation-resolver/operation-resolver.ts
15
- import * as Effect from "effect/Effect";
16
- import { Capability, Common } from "@dxos/app-framework";
17
- import { PublicKey } from "@dxos/client";
18
- import { runAndForwardErrors } from "@dxos/effect";
19
- import { invariant } from "@dxos/invariant";
20
- import { OperationResolver } from "@dxos/operation";
21
- import { Operation } from "@dxos/operation";
22
- import { ObservabilityOperation } from "@dxos/plugin-observability/types";
23
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/operation-resolver/operation-resolver.ts";
24
- var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
25
- var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* (props) {
26
- const { appName = "Composer" } = props ?? {};
27
- return Capability.contributes(Common.Capability.OperationResolver, [
28
- //
29
- // CreateIdentity
30
- //
31
- OperationResolver.make({
32
- operation: ClientOperation.CreateIdentity,
33
- handler: Effect.fnUntraced(function* (profile) {
34
- const manager = yield* Capability.get(Common.Capability.PluginManager);
35
- const client = yield* Capability.get(ClientCapabilities.Client);
36
- const data = yield* Effect.promise(() => client.halo.createIdentity(profile));
37
- yield* Effect.promise(() => runAndForwardErrors(manager.activate(ClientEvents.IdentityCreated)));
38
- yield* Operation.schedule(ObservabilityOperation.SendEvent, {
39
- name: "identity.create"
40
- });
41
- return data;
42
- })
43
- }),
44
- //
45
- // JoinIdentity
46
- //
47
- OperationResolver.make({
48
- operation: ClientOperation.JoinIdentity,
49
- handler: Effect.fnUntraced(function* (data) {
50
- yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
51
- subject: JOIN_DIALOG,
52
- blockAlign: "start",
53
- props: {
54
- initialInvitationCode: data.invitationCode,
55
- initialDisposition: "accept-halo-invitation"
56
- }
57
- });
58
- })
59
- }),
60
- //
61
- // ShareIdentity
62
- //
63
- OperationResolver.make({
64
- operation: ClientOperation.ShareIdentity,
65
- handler: Effect.fnUntraced(function* () {
66
- yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, {
67
- subject: Account.id
68
- });
69
- yield* Operation.invoke(Common.LayoutOperation.Open, {
70
- subject: [
71
- Account.Profile
72
- ]
73
- });
74
- yield* Operation.schedule(ObservabilityOperation.SendEvent, {
75
- name: "identity.share"
76
- });
77
- })
78
- }),
79
- //
80
- // RecoverIdentity
81
- //
82
- OperationResolver.make({
83
- operation: ClientOperation.RecoverIdentity,
84
- handler: Effect.fnUntraced(function* () {
85
- yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
86
- subject: JOIN_DIALOG,
87
- blockAlign: "start",
88
- props: {
89
- initialDisposition: "recover-identity"
90
- }
91
- });
92
- })
93
- }),
94
- //
95
- // ResetStorage
96
- //
97
- OperationResolver.make({
98
- operation: ClientOperation.ResetStorage,
99
- handler: Effect.fnUntraced(function* (data) {
100
- yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
101
- subject: RESET_DIALOG,
102
- blockAlign: "start",
103
- props: {
104
- mode: data.mode ?? "reset storage"
105
- }
106
- });
107
- })
108
- }),
109
- //
110
- // CreateAgent
111
- //
112
- OperationResolver.make({
113
- operation: ClientOperation.CreateAgent,
114
- handler: Effect.fnUntraced(function* () {
115
- const client = yield* Capability.get(ClientCapabilities.Client);
116
- invariant(client.services.services.EdgeAgentService, "Missing EdgeAgentService", {
117
- F: __dxlog_file,
118
- L: 114,
119
- S: this,
120
- A: [
121
- "client.services.services.EdgeAgentService",
122
- "'Missing EdgeAgentService'"
123
- ]
124
- });
125
- yield* Effect.promise(() => client.services.services.EdgeAgentService.createAgent(void 0, {
126
- timeout: 1e4
127
- }));
128
- })
129
- }),
130
- //
131
- // CreateRecoveryCode
132
- //
133
- OperationResolver.make({
134
- operation: ClientOperation.CreateRecoveryCode,
135
- handler: Effect.fnUntraced(function* () {
136
- const client = yield* Capability.get(ClientCapabilities.Client);
137
- invariant(client.services.services.IdentityService, "IdentityService not available", {
138
- F: __dxlog_file,
139
- L: 128,
140
- S: this,
141
- A: [
142
- "client.services.services.IdentityService",
143
- "'IdentityService not available'"
144
- ]
145
- });
146
- const { recoveryCode } = yield* Effect.promise(() => client.services.services.IdentityService.createRecoveryCredential({}));
147
- yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
148
- subject: RECOVERY_CODE_DIALOG,
149
- blockAlign: "start",
150
- type: "alert",
151
- props: {
152
- code: recoveryCode
153
- }
154
- });
155
- })
156
- }),
157
- //
158
- // CreatePasskey
159
- //
160
- OperationResolver.make({
161
- operation: ClientOperation.CreatePasskey,
162
- handler: Effect.fnUntraced(function* () {
163
- const client = yield* Capability.get(ClientCapabilities.Client);
164
- const identity = client.halo.identity.get();
165
- invariant(identity, "Identity not available", {
166
- F: __dxlog_file,
167
- L: 149,
168
- S: this,
169
- A: [
170
- "identity",
171
- "'Identity not available'"
172
- ]
173
- });
174
- const lookupKey = PublicKey.random();
175
- const credential = yield* Effect.promise(() => navigator.credentials.create({
176
- publicKey: {
177
- challenge: new Uint8Array(),
178
- rp: {
179
- id: location.hostname,
180
- name: appName
181
- },
182
- user: {
183
- id: lookupKey.asUint8Array(),
184
- name: identity.did,
185
- displayName: identity.profile?.displayName ?? ""
186
- },
187
- pubKeyCredParams: [
188
- {
189
- type: "public-key",
190
- alg: -8
191
- },
192
- {
193
- type: "public-key",
194
- alg: -7
195
- }
196
- ],
197
- authenticatorSelection: {
198
- residentKey: "required",
199
- requireResidentKey: true
200
- }
201
- }
202
- }));
203
- invariant(credential, "Credential not available", {
204
- F: __dxlog_file,
205
- L: 174,
206
- S: this,
207
- A: [
208
- "credential",
209
- "'Credential not available'"
210
- ]
211
- });
212
- const recoveryKey = PublicKey.from(new Uint8Array(credential.response.getPublicKey()));
213
- const algorithm = credential.response.getPublicKeyAlgorithm() === -7 ? "ES256" : "ED25519";
214
- invariant(client.services.services.IdentityService, "IdentityService not available", {
215
- F: __dxlog_file,
216
- L: 178,
217
- S: this,
218
- A: [
219
- "client.services.services.IdentityService",
220
- "'IdentityService not available'"
221
- ]
222
- });
223
- yield* Effect.promise(() => client.services.services.IdentityService.createRecoveryCredential({
224
- data: {
225
- recoveryKey,
226
- algorithm,
227
- lookupKey
228
- }
229
- }));
230
- })
231
- }),
232
- //
233
- // RedeemPasskey
234
- //
235
- OperationResolver.make({
236
- operation: ClientOperation.RedeemPasskey,
237
- handler: Effect.fnUntraced(function* () {
238
- const client = yield* Capability.get(ClientCapabilities.Client);
239
- invariant(client.services.services.IdentityService, "IdentityService not available", {
240
- F: __dxlog_file,
241
- L: 198,
242
- S: this,
243
- A: [
244
- "client.services.services.IdentityService",
245
- "'IdentityService not available'"
246
- ]
247
- });
248
- const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() => client.services.services.IdentityService.requestRecoveryChallenge());
249
- const credential = yield* Effect.promise(() => navigator.credentials.get({
250
- publicKey: {
251
- challenge: Buffer.from(challenge, "base64"),
252
- rpId: location.hostname,
253
- userVerification: "required"
254
- }
255
- }));
256
- const lookupKey = PublicKey.from(new Uint8Array(credential.response.userHandle));
257
- yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({
258
- external: {
259
- lookupKey,
260
- deviceKey,
261
- controlFeedKey,
262
- signature: Buffer.from(credential.response.signature),
263
- clientDataJson: Buffer.from(credential.response.clientDataJSON),
264
- authenticatorData: Buffer.from(credential.response.authenticatorData)
265
- }
266
- }, {
267
- timeout: RECOVER_IDENTITY_RPC_TIMEOUT
268
- }));
269
- })
270
- }),
271
- //
272
- // RedeemToken
273
- //
274
- OperationResolver.make({
275
- operation: ClientOperation.RedeemToken,
276
- handler: Effect.fnUntraced(function* (data) {
277
- const client = yield* Capability.get(ClientCapabilities.Client);
278
- invariant(client.services.services.IdentityService, "IdentityService not available", {
279
- F: __dxlog_file,
280
- L: 237,
281
- S: this,
282
- A: [
283
- "client.services.services.IdentityService",
284
- "'IdentityService not available'"
285
- ]
286
- });
287
- yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({
288
- token: data.token
289
- }, {
290
- timeout: RECOVER_IDENTITY_RPC_TIMEOUT
291
- }));
292
- })
293
- })
294
- ]);
295
- }));
296
- export {
297
- operation_resolver_default as default
298
- };
299
- //# sourceMappingURL=operation-resolver-VW5R2BE4.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/operation-resolver/operation-resolver.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { PublicKey } from '@dxos/client';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { OperationResolver } from '@dxos/operation';\nimport { Operation } from '@dxos/operation';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/types';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../../constants';\nimport { ClientEvents } from '../../types';\nimport { Account, ClientCapabilities, ClientOperation } from '../../types';\n\ntype OperationResolverOptions = {\n appName?: string;\n};\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* (props?: OperationResolverOptions) {\n const { appName = 'Composer' } = props ?? {};\n\n return Capability.contributes(Common.Capability.OperationResolver, [\n //\n // CreateIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.CreateIdentity,\n handler: Effect.fnUntraced(function* (profile) {\n const manager = yield* Capability.get(Common.Capability.PluginManager);\n const client = yield* Capability.get(ClientCapabilities.Client);\n const data = yield* Effect.promise(() => client.halo.createIdentity(profile));\n yield* Effect.promise(() => runAndForwardErrors(manager.activate(ClientEvents.IdentityCreated)));\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.create' });\n return data;\n }),\n }),\n\n //\n // JoinIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.JoinIdentity,\n handler: Effect.fnUntraced(function* (data) {\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: JOIN_DIALOG,\n blockAlign: 'start',\n props: {\n initialInvitationCode: data.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n },\n });\n }),\n }),\n\n //\n // ShareIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.ShareIdentity,\n handler: Effect.fnUntraced(function* () {\n yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, { subject: Account.id });\n yield* Operation.invoke(Common.LayoutOperation.Open, { subject: [Account.Profile] });\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.share' });\n }),\n }),\n\n //\n // RecoverIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.RecoverIdentity,\n handler: Effect.fnUntraced(function* () {\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: JOIN_DIALOG,\n blockAlign: 'start',\n props: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n });\n }),\n }),\n\n //\n // ResetStorage\n //\n OperationResolver.make({\n operation: ClientOperation.ResetStorage,\n handler: Effect.fnUntraced(function* (data) {\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: RESET_DIALOG,\n blockAlign: 'start',\n props: {\n mode: data.mode ?? 'reset storage',\n },\n });\n }),\n }),\n\n //\n // CreateAgent\n //\n OperationResolver.make({\n operation: ClientOperation.CreateAgent,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');\n yield* Effect.promise(() =>\n client.services.services.EdgeAgentService!.createAgent(undefined, { timeout: 10_000 }),\n );\n }),\n }),\n\n //\n // CreateRecoveryCode\n //\n OperationResolver.make({\n operation: ClientOperation.CreateRecoveryCode,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { recoveryCode } = yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({}),\n );\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: RECOVERY_CODE_DIALOG,\n blockAlign: 'start',\n type: 'alert',\n props: { code: recoveryCode },\n });\n }),\n }),\n\n //\n // CreatePasskey\n //\n OperationResolver.make({\n operation: ClientOperation.CreatePasskey,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n invariant(identity, 'Identity not available');\n\n const lookupKey = PublicKey.random();\n const credential = yield* Effect.promise(() =>\n navigator.credentials.create({\n publicKey: {\n challenge: new Uint8Array(),\n rp: { id: location.hostname, name: appName },\n user: {\n id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,\n name: identity.did,\n displayName: identity.profile?.displayName ?? '',\n },\n pubKeyCredParams: [\n { type: 'public-key', alg: -8 }, // Ed25519 (not yet supported across all browsers)\n { type: 'public-key', alg: -7 }, // ES256\n ],\n authenticatorSelection: {\n residentKey: 'required',\n requireResidentKey: true,\n },\n },\n }),\n );\n\n invariant(credential, 'Credential not available');\n const recoveryKey = PublicKey.from(new Uint8Array((credential as any).response.getPublicKey()));\n const algorithm = (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519';\n\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({\n data: {\n recoveryKey,\n algorithm,\n lookupKey,\n },\n }),\n );\n }),\n }),\n\n //\n // RedeemPasskey\n //\n OperationResolver.make({\n operation: ClientOperation.RedeemPasskey,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() =>\n client.services.services.IdentityService!.requestRecoveryChallenge(),\n );\n const credential = yield* Effect.promise(() =>\n navigator.credentials.get({\n publicKey: {\n challenge: Buffer.from(challenge, 'base64'),\n rpId: location.hostname,\n userVerification: 'required',\n },\n }),\n );\n const lookupKey = PublicKey.from(new Uint8Array((credential as any).response.userHandle));\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.recoverIdentity(\n {\n external: {\n lookupKey,\n deviceKey,\n controlFeedKey,\n signature: Buffer.from((credential as any).response.signature),\n clientDataJson: Buffer.from((credential as any).response.clientDataJSON),\n authenticatorData: Buffer.from((credential as any).response.authenticatorData),\n },\n },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n );\n }),\n }),\n\n //\n // RedeemToken\n //\n OperationResolver.make({\n operation: ClientOperation.RedeemToken,\n handler: Effect.fnUntraced(function* (data) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.recoverIdentity(\n { token: data.token },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n );\n }),\n }),\n ]);\n }),\n);\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AACpC,SAASC,iBAAiB;AAC1B,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAC1B,SAASC,8BAA8B;;AAWvC,IAAMC,+BAA+B;AAErC,IAAA,6BAAeC,WAAWC,WACjBC,kBAAW,WAAWC,OAAgC;AAC3D,QAAM,EAAEC,UAAU,WAAU,IAAKD,SAAS,CAAC;AAE3C,SAAOH,WAAWK,YAAYC,OAAON,WAAWO,mBAAmB;;;;IAIjEA,kBAAkBC,KAAK;MACrBC,WAAWC,gBAAgBC;MAC3BC,SAAgBV,kBAAW,WAAWW,SAAO;AAC3C,cAAMC,UAAU,OAAOd,WAAWe,IAAIT,OAAON,WAAWgB,aAAa;AACrE,cAAMC,SAAS,OAAOjB,WAAWe,IAAIG,mBAAmBC,MAAM;AAC9D,cAAMC,OAAO,OAAcC,eAAQ,MAAMJ,OAA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wB,OAAOT,KAAKf,WAAW,QAAA;YAClCyB,MAAMtB,SAASC;YACfsB,kBAAkB;UACpB;QACF,CAAA,CAAA;AAEF,cAAMlC,YAAYC,UAAUsB,KAAK,IAAId,WAAYN,WAAmBqB,SAASW,UAAU,CAAA;AACvF,eAAcnF,eAAQ,MACpBJ,OAAOsC,SAASA,SAASM,gBAAiB4C,gBACxC;UACEC,UAAU;YACRrC;YACA6B;YACAC;YACAQ,WAAWN,OAAOT,KAAMpB,WAAmBqB,SAASc,SAAS;YAC7DC,gBAAgBP,OAAOT,KAAMpB,WAAmBqB,SAASgB,cAAc;YACvEC,mBAAmBT,OAAOT,KAAMpB,WAAmBqB,SAASiB,iBAAiB;UAC/E;QACF,GACA;UAAEnD,SAAS5D;QAA6B,CAAA,CAAA;MAG9C,CAAA;IACF,CAAA;;;;IAKAQ,kBAAkBC,KAAK;MACrBC,WAAWC,gBAAgBqG;MAC3BnG,SAAgBV,kBAAW,WAAWkB,MAAI;AACxC,cAAMH,SAAS,OAAOjB,WAAWe,IAAIG,mBAAmBC,MAAM;AAC9DmC,kBAAUrC,OAAOsC,SAASA,SAASM,iBAAiB,iCAAA;;;;;;;;;AACpD,eAAcxC,eAAQ,MACpBJ,OAAOsC,SAASA,SAASM,gBAAiB4C,gBACxC;UAAEO,OAAO5F,KAAK4F;QAAM,GACpB;UAAErD,SAAS5D;QAA6B,CAAA,CAAA;MAG9C,CAAA;IACF,CAAA;GACD;AACH,CAAA,CAAA;",
6
- "names": ["Effect", "Capability", "Common", "PublicKey", "runAndForwardErrors", "invariant", "OperationResolver", "Operation", "ObservabilityOperation", "RECOVER_IDENTITY_RPC_TIMEOUT", "Capability", "makeModule", "fnUntraced", "props", "appName", "contributes", "Common", "OperationResolver", "make", "operation", "ClientOperation", "CreateIdentity", "handler", "profile", "manager", "get", "PluginManager", "client", "ClientCapabilities", "Client", "data", "promise", "halo", "createIdentity", "runAndForwardErrors", "activate", "ClientEvents", "IdentityCreated", "Operation", "schedule", "ObservabilityOperation", "SendEvent", "name", "JoinIdentity", "invoke", "LayoutOperation", "UpdateDialog", "subject", "JOIN_DIALOG", "blockAlign", "initialInvitationCode", "invitationCode", "initialDisposition", "ShareIdentity", "SwitchWorkspace", "Account", "id", "Open", "Profile", "RecoverIdentity", "ResetStorage", "RESET_DIALOG", "mode", "CreateAgent", "invariant", "services", "EdgeAgentService", "createAgent", "undefined", "timeout", "CreateRecoveryCode", "IdentityService", "recoveryCode", "createRecoveryCredential", "RECOVERY_CODE_DIALOG", "type", "code", "CreatePasskey", "identity", "lookupKey", "PublicKey", "random", "credential", "navigator", "credentials", "create", "publicKey", "challenge", "Uint8Array", "rp", "location", "hostname", "user", "asUint8Array", "did", "displayName", "pubKeyCredParams", "alg", "authenticatorSelection", "residentKey", "requireResidentKey", "recoveryKey", "from", "response", "getPublicKey", "algorithm", "getPublicKeyAlgorithm", "RedeemPasskey", "deviceKey", "controlFeedKey", "requestRecoveryChallenge", "Buffer", "rpId", "userVerification", "userHandle", "recoverIdentity", "external", "signature", "clientDataJson", "clientDataJSON", "authenticatorData", "RedeemToken", "token"]
7
- }
@@ -1,25 +0,0 @@
1
- import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
- import {
3
- ClientCapabilities,
4
- meta
5
- } from "./chunk-JAF64TFQ.mjs";
6
-
7
- // src/capabilities/react-context/react-context.tsx
8
- import * as Effect from "effect/Effect";
9
- import React from "react";
10
- import { Capability, Common } from "@dxos/app-framework";
11
- import { useCapability } from "@dxos/app-framework/react";
12
- import { ClientProvider } from "@dxos/react-client";
13
- var react_context_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactContext, {
14
- id: meta.id,
15
- context: ({ children }) => {
16
- const client = useCapability(ClientCapabilities.Client);
17
- return /* @__PURE__ */ React.createElement(ClientProvider, {
18
- client
19
- }, children);
20
- }
21
- })));
22
- export {
23
- react_context_default as default
24
- };
25
- //# sourceMappingURL=react-context-UVXMGPW4.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/capabilities/react-context/react-context.tsx"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/react';\nimport { ClientProvider } from '@dxos/react-client';\n\nimport { meta } from '../../meta';\nimport { ClientCapabilities } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactContext, {\n id: meta.id,\n context: ({ children }: { children?: React.ReactNode }) => {\n const client = useCapability(ClientCapabilities.Client);\n return <ClientProvider client={client}>{children}</ClientProvider>;\n },\n }),\n ),\n);\n"],
5
- "mappings": ";;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAK/B,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDC,IAAIC,KAAKD;EACTE,SAAS,CAAC,EAAEC,SAAQ,MAAkC;AACpD,UAAMC,SAASC,cAAcC,mBAAmBC,MAAM;AACtD,WAAO,sBAAA,cAACC,gBAAAA;MAAeJ;OAAiBD,QAAAA;EAC1C;AACF,CAAA,CAAA,CAAA;",
6
- "names": ["Effect", "React", "Capability", "Common", "useCapability", "ClientProvider", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactContext", "id", "meta", "context", "children", "client", "useCapability", "ClientCapabilities", "Client", "ClientProvider"]
7
- }