@dxos/plugin-client 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae

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 (473) hide show
  1. package/dist/lib/browser/DevicesContainer-46MEG3F5.mjs +268 -0
  2. package/dist/lib/browser/DevicesContainer-46MEG3F5.mjs.map +7 -0
  3. package/dist/lib/browser/JoinDialog-2RCYK4O5.mjs +59 -0
  4. package/dist/lib/browser/JoinDialog-2RCYK4O5.mjs.map +7 -0
  5. package/dist/lib/browser/ProfileContainer-XYRCOQ5I.mjs +171 -0
  6. package/dist/lib/browser/ProfileContainer-XYRCOQ5I.mjs.map +7 -0
  7. package/dist/lib/browser/RecoveryCodeDialog-EX2CLFND.mjs +60 -0
  8. package/dist/lib/browser/RecoveryCodeDialog-EX2CLFND.mjs.map +7 -0
  9. package/dist/lib/browser/RecoveryCredentialsContainer-RWTEIHOB.mjs +57 -0
  10. package/dist/lib/browser/RecoveryCredentialsContainer-RWTEIHOB.mjs.map +7 -0
  11. package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs +52 -0
  12. package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs.map +7 -0
  13. package/dist/lib/browser/app-graph-builder-QJWFLYZE.mjs +121 -0
  14. package/dist/lib/browser/app-graph-builder-QJWFLYZE.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-4XYOOXAH.mjs +18 -0
  16. package/dist/lib/browser/chunk-4XYOOXAH.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-DPAXDXMK.mjs +283 -0
  18. package/dist/lib/browser/chunk-DPAXDXMK.mjs.map +7 -0
  19. package/dist/lib/browser/chunk-N2GMSVDQ.mjs +15 -0
  20. package/dist/lib/browser/chunk-N2GMSVDQ.mjs.map +7 -0
  21. package/dist/lib/browser/chunk-VYX3ROUX.mjs +15 -0
  22. package/dist/lib/browser/chunk-VYX3ROUX.mjs.map +7 -0
  23. package/dist/lib/browser/cli/index.mjs +1051 -0
  24. package/dist/lib/browser/cli/index.mjs.map +7 -0
  25. package/dist/lib/browser/client-Z25GQ5YC.mjs +86 -0
  26. package/dist/lib/browser/client-Z25GQ5YC.mjs.map +7 -0
  27. package/dist/lib/browser/index.mjs +77 -84
  28. package/dist/lib/browser/index.mjs.map +4 -4
  29. package/dist/lib/browser/meta.json +1 -1
  30. package/dist/lib/browser/migrations-HLHRMOW6.mjs +25 -0
  31. package/dist/lib/browser/migrations-HLHRMOW6.mjs.map +7 -0
  32. package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs +299 -0
  33. package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs.map +7 -0
  34. package/dist/lib/browser/react-context-E7TAJMDK.mjs +26 -0
  35. package/dist/lib/browser/react-context-E7TAJMDK.mjs.map +7 -0
  36. package/dist/lib/browser/react-surface-L5A2LBFE.mjs +77 -0
  37. package/dist/lib/browser/react-surface-L5A2LBFE.mjs.map +7 -0
  38. package/dist/lib/browser/schema-defs-5WDZWVEI.mjs +28 -0
  39. package/dist/lib/browser/schema-defs-5WDZWVEI.mjs.map +7 -0
  40. package/dist/lib/browser/types/index.mjs +10 -4
  41. package/dist/lib/node-esm/DevicesContainer-WQ3DQA45.mjs +269 -0
  42. package/dist/lib/node-esm/DevicesContainer-WQ3DQA45.mjs.map +7 -0
  43. package/dist/lib/node-esm/JoinDialog-KLTNJY5F.mjs +60 -0
  44. package/dist/lib/node-esm/JoinDialog-KLTNJY5F.mjs.map +7 -0
  45. package/dist/lib/node-esm/ProfileContainer-XI425QK5.mjs +172 -0
  46. package/dist/lib/node-esm/ProfileContainer-XI425QK5.mjs.map +7 -0
  47. package/dist/lib/node-esm/RecoveryCodeDialog-AISRNJUM.mjs +61 -0
  48. package/dist/lib/node-esm/RecoveryCodeDialog-AISRNJUM.mjs.map +7 -0
  49. package/dist/lib/node-esm/RecoveryCredentialsContainer-3TKQRPQK.mjs +58 -0
  50. package/dist/lib/node-esm/RecoveryCredentialsContainer-3TKQRPQK.mjs.map +7 -0
  51. package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs +54 -0
  52. package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs.map +7 -0
  53. package/dist/lib/node-esm/app-graph-builder-6JD6BZAI.mjs +122 -0
  54. package/dist/lib/node-esm/app-graph-builder-6JD6BZAI.mjs.map +7 -0
  55. package/dist/lib/node-esm/chunk-H2CCMM4Z.mjs +20 -0
  56. package/dist/lib/node-esm/chunk-H2CCMM4Z.mjs.map +7 -0
  57. package/dist/lib/node-esm/chunk-HKSNTZF5.mjs +16 -0
  58. package/dist/lib/node-esm/chunk-HKSNTZF5.mjs.map +7 -0
  59. package/dist/lib/node-esm/chunk-RGULICLJ.mjs +17 -0
  60. package/dist/lib/node-esm/chunk-RGULICLJ.mjs.map +7 -0
  61. package/dist/lib/node-esm/chunk-VEUNEDN5.mjs +284 -0
  62. package/dist/lib/node-esm/chunk-VEUNEDN5.mjs.map +7 -0
  63. package/dist/lib/node-esm/cli/index.mjs +1052 -0
  64. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  65. package/dist/lib/node-esm/client-5AIPYSBT.mjs +87 -0
  66. package/dist/lib/node-esm/client-5AIPYSBT.mjs.map +7 -0
  67. package/dist/lib/node-esm/index.mjs +77 -84
  68. package/dist/lib/node-esm/index.mjs.map +4 -4
  69. package/dist/lib/node-esm/meta.json +1 -1
  70. package/dist/lib/node-esm/migrations-O5KG2GGN.mjs +26 -0
  71. package/dist/lib/node-esm/migrations-O5KG2GGN.mjs.map +7 -0
  72. package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs +300 -0
  73. package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs.map +7 -0
  74. package/dist/lib/node-esm/{react-context-4SZYNSIS.mjs → react-context-OMJSBS23.mjs} +9 -7
  75. package/dist/lib/node-esm/react-context-OMJSBS23.mjs.map +7 -0
  76. package/dist/lib/node-esm/react-surface-N3BSPMMX.mjs +78 -0
  77. package/dist/lib/node-esm/react-surface-N3BSPMMX.mjs.map +7 -0
  78. package/dist/lib/node-esm/schema-defs-ENOYSDP3.mjs +29 -0
  79. package/dist/lib/node-esm/schema-defs-ENOYSDP3.mjs.map +7 -0
  80. package/dist/lib/node-esm/types/index.mjs +10 -4
  81. package/dist/types/src/ClientPlugin.d.ts +2 -1
  82. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  83. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  84. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  85. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  86. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  87. package/dist/types/src/capabilities/client/client.d.ts +8 -0
  88. package/dist/types/src/capabilities/client/client.d.ts.map +1 -0
  89. package/dist/types/src/capabilities/client/index.d.ts +18 -0
  90. package/dist/types/src/capabilities/client/index.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/index.d.ts +7 -19
  92. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/migrations/index.d.ts +3 -0
  94. package/dist/types/src/capabilities/migrations/index.d.ts.map +1 -0
  95. package/dist/types/src/capabilities/migrations/migrations.d.ts +5 -0
  96. package/dist/types/src/capabilities/migrations/migrations.d.ts.map +1 -0
  97. package/dist/types/src/capabilities/operation-resolver/index.d.ts +5 -0
  98. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  99. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +8 -0
  100. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  101. package/dist/types/src/capabilities/react-context/index.d.ts +7 -0
  102. package/dist/types/src/capabilities/react-context/index.d.ts.map +1 -0
  103. package/dist/types/src/capabilities/react-context/react-context.d.ts +10 -0
  104. package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -0
  105. package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
  106. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  107. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +9 -0
  108. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  109. package/dist/types/src/capabilities/schema-defs/index.d.ts +3 -0
  110. package/dist/types/src/capabilities/schema-defs/index.d.ts.map +1 -0
  111. package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +5 -0
  112. package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +1 -0
  113. package/dist/types/src/cli/commands/config/index.d.ts +5 -0
  114. package/dist/types/src/cli/commands/config/index.d.ts.map +1 -0
  115. package/dist/types/src/cli/commands/config/view.d.ts +5 -0
  116. package/dist/types/src/cli/commands/config/view.d.ts.map +1 -0
  117. package/dist/types/src/cli/commands/device/index.d.ts +7 -0
  118. package/dist/types/src/cli/commands/device/index.d.ts.map +1 -0
  119. package/dist/types/src/cli/commands/device/info/index.d.ts +2 -0
  120. package/dist/types/src/cli/commands/device/info/index.d.ts.map +1 -0
  121. package/dist/types/src/cli/commands/device/info/info.d.ts +7 -0
  122. package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -0
  123. package/dist/types/src/cli/commands/device/info/info.test.d.ts +2 -0
  124. package/dist/types/src/cli/commands/device/info/info.test.d.ts.map +1 -0
  125. package/dist/types/src/cli/commands/device/list/index.d.ts +2 -0
  126. package/dist/types/src/cli/commands/device/list/index.d.ts.map +1 -0
  127. package/dist/types/src/cli/commands/device/list/list.d.ts +7 -0
  128. package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -0
  129. package/dist/types/src/cli/commands/device/list/list.test.d.ts +2 -0
  130. package/dist/types/src/cli/commands/device/list/list.test.d.ts.map +1 -0
  131. package/dist/types/src/cli/commands/device/update/index.d.ts +2 -0
  132. package/dist/types/src/cli/commands/device/update/index.d.ts.map +1 -0
  133. package/dist/types/src/cli/commands/device/update/update.d.ts +11 -0
  134. package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -0
  135. package/dist/types/src/cli/commands/device/util.d.ts +16 -0
  136. package/dist/types/src/cli/commands/device/util.d.ts.map +1 -0
  137. package/dist/types/src/cli/commands/edge/index.d.ts +5 -0
  138. package/dist/types/src/cli/commands/edge/index.d.ts.map +1 -0
  139. package/dist/types/src/cli/commands/edge/status.d.ts +7 -0
  140. package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -0
  141. package/dist/types/src/cli/commands/halo/create/create.d.ts +15 -0
  142. package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -0
  143. package/dist/types/src/cli/commands/halo/create/create.test.d.ts +2 -0
  144. package/dist/types/src/cli/commands/halo/create/create.test.d.ts.map +1 -0
  145. package/dist/types/src/cli/commands/halo/create/index.d.ts +2 -0
  146. package/dist/types/src/cli/commands/halo/create/index.d.ts.map +1 -0
  147. package/dist/types/src/cli/commands/halo/credential/add/add.d.ts +13 -0
  148. package/dist/types/src/cli/commands/halo/credential/add/add.d.ts.map +1 -0
  149. package/dist/types/src/cli/commands/halo/credential/add/index.d.ts +2 -0
  150. package/dist/types/src/cli/commands/halo/credential/add/index.d.ts.map +1 -0
  151. package/dist/types/src/cli/commands/halo/credential/index.d.ts +12 -0
  152. package/dist/types/src/cli/commands/halo/credential/index.d.ts.map +1 -0
  153. package/dist/types/src/cli/commands/halo/credential/list/index.d.ts +2 -0
  154. package/dist/types/src/cli/commands/halo/credential/list/index.d.ts.map +1 -0
  155. package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +19 -0
  156. package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -0
  157. package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts +2 -0
  158. package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts.map +1 -0
  159. package/dist/types/src/cli/commands/halo/identity/identity.d.ts +7 -0
  160. package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -0
  161. package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts +2 -0
  162. package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts.map +1 -0
  163. package/dist/types/src/cli/commands/halo/identity/index.d.ts +2 -0
  164. package/dist/types/src/cli/commands/halo/identity/index.d.ts.map +1 -0
  165. package/dist/types/src/cli/commands/halo/index.d.ts +3 -0
  166. package/dist/types/src/cli/commands/halo/index.d.ts.map +1 -0
  167. package/dist/types/src/cli/commands/halo/join/index.d.ts +2 -0
  168. package/dist/types/src/cli/commands/halo/join/index.d.ts.map +1 -0
  169. package/dist/types/src/cli/commands/halo/join/join.d.ts +8 -0
  170. package/dist/types/src/cli/commands/halo/join/join.d.ts.map +1 -0
  171. package/dist/types/src/cli/commands/halo/join/join.test.d.ts +2 -0
  172. package/dist/types/src/cli/commands/halo/join/join.test.d.ts.map +1 -0
  173. package/dist/types/src/cli/commands/halo/keys/index.d.ts +2 -0
  174. package/dist/types/src/cli/commands/halo/keys/index.d.ts.map +1 -0
  175. package/dist/types/src/cli/commands/halo/keys/keys.d.ts +7 -0
  176. package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -0
  177. package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts +2 -0
  178. package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts.map +1 -0
  179. package/dist/types/src/cli/commands/halo/recover/index.d.ts +2 -0
  180. package/dist/types/src/cli/commands/halo/recover/index.d.ts.map +1 -0
  181. package/dist/types/src/cli/commands/halo/recover/recover.d.ts +7 -0
  182. package/dist/types/src/cli/commands/halo/recover/recover.d.ts.map +1 -0
  183. package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts +2 -0
  184. package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts.map +1 -0
  185. package/dist/types/src/cli/commands/halo/seed/index.d.ts +2 -0
  186. package/dist/types/src/cli/commands/halo/seed/index.d.ts.map +1 -0
  187. package/dist/types/src/cli/commands/halo/seed/seed.d.ts +7 -0
  188. package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -0
  189. package/dist/types/src/cli/commands/halo/share/index.d.ts +2 -0
  190. package/dist/types/src/cli/commands/halo/share/index.d.ts.map +1 -0
  191. package/dist/types/src/cli/commands/halo/share/share.d.ts +15 -0
  192. package/dist/types/src/cli/commands/halo/share/share.d.ts.map +1 -0
  193. package/dist/types/src/cli/commands/halo/update/index.d.ts +2 -0
  194. package/dist/types/src/cli/commands/halo/update/index.d.ts.map +1 -0
  195. package/dist/types/src/cli/commands/halo/update/update.d.ts +11 -0
  196. package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -0
  197. package/dist/types/src/cli/commands/halo/update/update.test.d.ts +2 -0
  198. package/dist/types/src/cli/commands/halo/update/update.test.d.ts.map +1 -0
  199. package/dist/types/src/cli/commands/halo/util.d.ts +13 -0
  200. package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -0
  201. package/dist/types/src/cli/commands/index.d.ts +6 -0
  202. package/dist/types/src/cli/commands/index.d.ts.map +1 -0
  203. package/dist/types/src/cli/commands/profile/create.d.ts +9 -0
  204. package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -0
  205. package/dist/types/src/cli/commands/profile/delete.d.ts +8 -0
  206. package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -0
  207. package/dist/types/src/cli/commands/profile/import.d.ts +17 -0
  208. package/dist/types/src/cli/commands/profile/import.d.ts.map +1 -0
  209. package/dist/types/src/cli/commands/profile/index.d.ts +19 -0
  210. package/dist/types/src/cli/commands/profile/index.d.ts.map +1 -0
  211. package/dist/types/src/cli/commands/profile/inspect.d.ts +13 -0
  212. package/dist/types/src/cli/commands/profile/inspect.d.ts.map +1 -0
  213. package/dist/types/src/cli/commands/profile/list.d.ts +6 -0
  214. package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -0
  215. package/dist/types/src/cli/commands/profile/reset.d.ts +8 -0
  216. package/dist/types/src/cli/commands/profile/reset.d.ts.map +1 -0
  217. package/dist/types/src/cli/commands/profile/util.d.ts +24 -0
  218. package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -0
  219. package/dist/types/src/cli/index.d.ts +2 -0
  220. package/dist/types/src/cli/index.d.ts.map +1 -0
  221. package/dist/types/src/cli/plugin.d.ts +4 -0
  222. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  223. package/dist/types/src/cli/testing/test-console.d.ts +37 -0
  224. package/dist/types/src/cli/testing/test-console.d.ts.map +1 -0
  225. package/dist/types/src/components/index.d.ts +0 -6
  226. package/dist/types/src/components/index.d.ts.map +1 -1
  227. package/dist/types/src/constants.d.ts +4 -0
  228. package/dist/types/src/constants.d.ts.map +1 -0
  229. package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
  230. package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.stories.d.ts +10 -54
  231. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
  232. package/dist/types/src/containers/DevicesContainer/index.d.ts +3 -0
  233. package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
  234. package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -1
  235. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
  236. package/dist/types/src/containers/JoinDialog/index.d.ts +3 -0
  237. package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
  238. package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
  239. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +14 -0
  240. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
  241. package/dist/types/src/containers/ProfileContainer/index.d.ts +3 -0
  242. package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
  243. package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -1
  244. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
  245. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts +16 -0
  246. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
  247. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
  248. package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
  249. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
  250. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +14 -0
  251. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
  252. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +3 -0
  253. package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
  254. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +9 -0
  255. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
  256. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +19 -0
  257. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
  258. package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
  259. package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
  260. package/dist/types/src/containers/index.d.ts +10 -0
  261. package/dist/types/src/containers/index.d.ts.map +1 -0
  262. package/dist/types/src/index.d.ts +1 -2
  263. package/dist/types/src/index.d.ts.map +1 -1
  264. package/dist/types/src/meta.d.ts +2 -2
  265. package/dist/types/src/meta.d.ts.map +1 -1
  266. package/dist/types/src/translations.d.ts +2 -48
  267. package/dist/types/src/translations.d.ts.map +1 -1
  268. package/dist/types/src/types/capabilities.d.ts +10 -0
  269. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  270. package/dist/types/src/types/events.d.ts +9 -0
  271. package/dist/types/src/types/events.d.ts.map +1 -0
  272. package/dist/types/src/types/index.d.ts +2 -0
  273. package/dist/types/src/types/index.d.ts.map +1 -1
  274. package/dist/types/src/types/schema.d.ts +169 -11
  275. package/dist/types/src/types/schema.d.ts.map +1 -1
  276. package/dist/types/tsconfig.tsbuildinfo +1 -1
  277. package/package.json +54 -38
  278. package/src/ClientPlugin.ts +45 -55
  279. package/src/capabilities/app-graph-builder/app-graph-builder.ts +96 -0
  280. package/src/capabilities/app-graph-builder/index.ts +7 -0
  281. package/src/capabilities/client/client.ts +77 -0
  282. package/src/capabilities/client/index.ts +7 -0
  283. package/src/capabilities/index.ts +7 -11
  284. package/src/capabilities/migrations/index.ts +7 -0
  285. package/src/capabilities/migrations/migrations.ts +30 -0
  286. package/src/capabilities/operation-resolver/index.ts +7 -0
  287. package/src/capabilities/operation-resolver/operation-resolver.ts +247 -0
  288. package/src/capabilities/react-context/index.ts +7 -0
  289. package/src/capabilities/react-context/react-context.tsx +25 -0
  290. package/src/capabilities/react-surface/index.ts +7 -0
  291. package/src/capabilities/react-surface/react-surface.tsx +74 -0
  292. package/src/capabilities/schema-defs/index.ts +7 -0
  293. package/src/capabilities/schema-defs/schema-defs.ts +36 -0
  294. package/src/cli/commands/config/index.ts +12 -0
  295. package/src/cli/commands/config/view.ts +26 -0
  296. package/src/cli/commands/device/index.ts +14 -0
  297. package/src/cli/commands/device/info/index.ts +5 -0
  298. package/src/cli/commands/device/info/info.test.ts +29 -0
  299. package/src/cli/commands/device/info/info.ts +50 -0
  300. package/src/cli/commands/device/list/index.ts +5 -0
  301. package/src/cli/commands/device/list/list.test.ts +31 -0
  302. package/src/cli/commands/device/list/list.ts +30 -0
  303. package/src/cli/commands/device/update/index.ts +5 -0
  304. package/src/cli/commands/device/update/update.ts +70 -0
  305. package/src/cli/commands/device/util.ts +55 -0
  306. package/src/cli/commands/edge/index.ts +12 -0
  307. package/src/cli/commands/edge/status.ts +45 -0
  308. package/src/cli/commands/halo/create/create.test.ts +52 -0
  309. package/src/cli/commands/halo/create/create.ts +75 -0
  310. package/src/cli/commands/halo/create/index.ts +5 -0
  311. package/src/cli/commands/halo/credential/add/add.ts +97 -0
  312. package/src/cli/commands/halo/credential/add/index.ts +5 -0
  313. package/src/cli/commands/halo/credential/index.ts +13 -0
  314. package/src/cli/commands/halo/credential/list/index.ts +5 -0
  315. package/src/cli/commands/halo/credential/list/list.test.ts +28 -0
  316. package/src/cli/commands/halo/credential/list/list.ts +118 -0
  317. package/src/cli/commands/halo/identity/identity.test.ts +40 -0
  318. package/src/cli/commands/halo/identity/identity.ts +46 -0
  319. package/src/cli/commands/halo/identity/index.ts +5 -0
  320. package/src/cli/commands/halo/index.ts +21 -0
  321. package/src/cli/commands/halo/join/index.ts +5 -0
  322. package/src/cli/commands/halo/join/join.test.ts +10 -0
  323. package/src/cli/commands/halo/join/join.ts +87 -0
  324. package/src/cli/commands/halo/keys/index.ts +5 -0
  325. package/src/cli/commands/halo/keys/keys.test.ts +29 -0
  326. package/src/cli/commands/halo/keys/keys.ts +42 -0
  327. package/src/cli/commands/halo/recover/index.ts +5 -0
  328. package/src/cli/commands/halo/recover/recover.test.ts +10 -0
  329. package/src/cli/commands/halo/recover/recover.ts +44 -0
  330. package/src/cli/commands/halo/seed/index.ts +5 -0
  331. package/src/cli/commands/halo/seed/seed.ts +38 -0
  332. package/src/cli/commands/halo/share/index.ts +5 -0
  333. package/src/cli/commands/halo/share/share.ts +97 -0
  334. package/src/cli/commands/halo/update/index.ts +5 -0
  335. package/src/cli/commands/halo/update/update.test.ts +29 -0
  336. package/src/cli/commands/halo/update/update.ts +69 -0
  337. package/src/cli/commands/halo/util.ts +18 -0
  338. package/src/cli/commands/index.ts +9 -0
  339. package/src/cli/commands/profile/create.ts +87 -0
  340. package/src/cli/commands/profile/delete.ts +33 -0
  341. package/src/cli/commands/profile/import.ts +101 -0
  342. package/src/cli/commands/profile/index.ts +17 -0
  343. package/src/cli/commands/profile/inspect.ts +64 -0
  344. package/src/cli/commands/profile/list.ts +54 -0
  345. package/src/cli/commands/profile/reset.ts +45 -0
  346. package/src/cli/commands/profile/util.ts +48 -0
  347. package/src/cli/index.ts +5 -0
  348. package/src/cli/plugin.ts +34 -0
  349. package/src/cli/testing/test-console.ts +88 -0
  350. package/src/components/index.ts +0 -7
  351. package/src/constants.ts +9 -0
  352. package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +14 -10
  353. package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +59 -65
  354. package/src/containers/DevicesContainer/index.ts +7 -0
  355. package/src/containers/JoinDialog/JoinDialog.tsx +53 -0
  356. package/src/containers/JoinDialog/index.ts +7 -0
  357. package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -4
  358. package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +65 -59
  359. package/src/containers/ProfileContainer/index.ts +7 -0
  360. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
  361. package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +27 -26
  362. package/src/containers/RecoveryCodeDialog/index.ts +8 -0
  363. package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +46 -0
  364. package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.tsx +22 -24
  365. package/src/containers/RecoveryCredentialsContainer/index.ts +7 -0
  366. package/src/containers/ResetDialog/ResetDialog.stories.tsx +73 -0
  367. package/src/containers/ResetDialog/ResetDialog.tsx +50 -0
  368. package/src/containers/ResetDialog/index.ts +8 -0
  369. package/src/containers/index.ts +15 -0
  370. package/src/index.ts +1 -2
  371. package/src/meta.ts +7 -2
  372. package/src/translations.ts +6 -3
  373. package/src/types/capabilities.ts +16 -0
  374. package/src/types/events.ts +15 -0
  375. package/src/types/index.ts +2 -0
  376. package/src/types/schema.ts +127 -9
  377. package/dist/lib/browser/app-graph-builder-LUY3BJGC.mjs +0 -124
  378. package/dist/lib/browser/app-graph-builder-LUY3BJGC.mjs.map +0 -7
  379. package/dist/lib/browser/chunk-C7B7NM2G.mjs +0 -686
  380. package/dist/lib/browser/chunk-C7B7NM2G.mjs.map +0 -7
  381. package/dist/lib/browser/chunk-PFY3EQPI.mjs +0 -18
  382. package/dist/lib/browser/chunk-PFY3EQPI.mjs.map +0 -7
  383. package/dist/lib/browser/chunk-QB3D2P4J.mjs +0 -10
  384. package/dist/lib/browser/chunk-QB3D2P4J.mjs.map +0 -7
  385. package/dist/lib/browser/chunk-TRA2GP4M.mjs +0 -110
  386. package/dist/lib/browser/chunk-TRA2GP4M.mjs.map +0 -7
  387. package/dist/lib/browser/chunk-VTC4GIND.mjs +0 -19
  388. package/dist/lib/browser/chunk-VTC4GIND.mjs.map +0 -7
  389. package/dist/lib/browser/client-5PWEJ3U6.mjs +0 -43
  390. package/dist/lib/browser/client-5PWEJ3U6.mjs.map +0 -7
  391. package/dist/lib/browser/intent-resolver-L5NVP2G3.mjs +0 -305
  392. package/dist/lib/browser/intent-resolver-L5NVP2G3.mjs.map +0 -7
  393. package/dist/lib/browser/migrations-MWQCO5KY.mjs +0 -23
  394. package/dist/lib/browser/migrations-MWQCO5KY.mjs.map +0 -7
  395. package/dist/lib/browser/react-context-S4SRYUVY.mjs +0 -24
  396. package/dist/lib/browser/react-context-S4SRYUVY.mjs.map +0 -7
  397. package/dist/lib/browser/react-surface-6PV7RVQN.mjs +0 -66
  398. package/dist/lib/browser/react-surface-6PV7RVQN.mjs.map +0 -7
  399. package/dist/lib/browser/schema-defs-E3USCMH3.mjs +0 -25
  400. package/dist/lib/browser/schema-defs-E3USCMH3.mjs.map +0 -7
  401. package/dist/lib/node-esm/app-graph-builder-S3BVB3IU.mjs +0 -125
  402. package/dist/lib/node-esm/app-graph-builder-S3BVB3IU.mjs.map +0 -7
  403. package/dist/lib/node-esm/chunk-4MPOOMDQ.mjs +0 -111
  404. package/dist/lib/node-esm/chunk-4MPOOMDQ.mjs.map +0 -7
  405. package/dist/lib/node-esm/chunk-H73VVAMA.mjs +0 -687
  406. package/dist/lib/node-esm/chunk-H73VVAMA.mjs.map +0 -7
  407. package/dist/lib/node-esm/chunk-K5IFPSCL.mjs +0 -20
  408. package/dist/lib/node-esm/chunk-K5IFPSCL.mjs.map +0 -7
  409. package/dist/lib/node-esm/chunk-QE4LPI2A.mjs +0 -12
  410. package/dist/lib/node-esm/chunk-QE4LPI2A.mjs.map +0 -7
  411. package/dist/lib/node-esm/chunk-UYDFBGYA.mjs +0 -19
  412. package/dist/lib/node-esm/chunk-UYDFBGYA.mjs.map +0 -7
  413. package/dist/lib/node-esm/client-ODN7EBTY.mjs +0 -44
  414. package/dist/lib/node-esm/client-ODN7EBTY.mjs.map +0 -7
  415. package/dist/lib/node-esm/intent-resolver-3JZIPI6F.mjs +0 -306
  416. package/dist/lib/node-esm/intent-resolver-3JZIPI6F.mjs.map +0 -7
  417. package/dist/lib/node-esm/migrations-ARXHGBH5.mjs +0 -24
  418. package/dist/lib/node-esm/migrations-ARXHGBH5.mjs.map +0 -7
  419. package/dist/lib/node-esm/react-context-4SZYNSIS.mjs.map +0 -7
  420. package/dist/lib/node-esm/react-surface-BOST4EH2.mjs +0 -67
  421. package/dist/lib/node-esm/react-surface-BOST4EH2.mjs.map +0 -7
  422. package/dist/lib/node-esm/schema-defs-ATH5YBDR.mjs +0 -26
  423. package/dist/lib/node-esm/schema-defs-ATH5YBDR.mjs.map +0 -7
  424. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  425. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  426. package/dist/types/src/capabilities/capabilities.d.ts +0 -9
  427. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  428. package/dist/types/src/capabilities/client.d.ts +0 -9
  429. package/dist/types/src/capabilities/client.d.ts.map +0 -1
  430. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -8
  431. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  432. package/dist/types/src/capabilities/migrations.d.ts +0 -4
  433. package/dist/types/src/capabilities/migrations.d.ts.map +0 -1
  434. package/dist/types/src/capabilities/react-context.d.ts +0 -8
  435. package/dist/types/src/capabilities/react-context.d.ts.map +0 -1
  436. package/dist/types/src/capabilities/react-surface.d.ts +0 -8
  437. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  438. package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
  439. package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
  440. package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
  441. package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
  442. package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
  443. package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
  444. package/dist/types/src/components/ProfileContainer.stories.d.ts +0 -60
  445. package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
  446. package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
  447. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +0 -62
  448. package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
  449. package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
  450. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +0 -60
  451. package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
  452. package/dist/types/src/components/ResetDialog.d.ts +0 -7
  453. package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
  454. package/dist/types/src/components/ResetDialog.stories.d.ts +0 -65
  455. package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
  456. package/dist/types/src/events.d.ts +0 -8
  457. package/dist/types/src/events.d.ts.map +0 -1
  458. package/src/capabilities/app-graph-builder.ts +0 -115
  459. package/src/capabilities/capabilities.ts +0 -18
  460. package/src/capabilities/client.ts +0 -43
  461. package/src/capabilities/intent-resolver.ts +0 -251
  462. package/src/capabilities/migrations.ts +0 -25
  463. package/src/capabilities/react-context.tsx +0 -21
  464. package/src/capabilities/react-surface.tsx +0 -67
  465. package/src/capabilities/schema-defs.ts +0 -29
  466. package/src/components/JoinDialog.tsx +0 -53
  467. package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -42
  468. package/src/components/ResetDialog.stories.tsx +0 -50
  469. package/src/components/ResetDialog.tsx +0 -49
  470. package/src/events.ts +0 -15
  471. /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
  472. /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
  473. /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
@@ -0,0 +1,299 @@
1
+ import {
2
+ JOIN_DIALOG,
3
+ RECOVERY_CODE_DIALOG,
4
+ RESET_DIALOG
5
+ } from "./chunk-VYX3ROUX.mjs";
6
+ import {
7
+ Account,
8
+ ClientCapabilities,
9
+ ClientEvents,
10
+ ClientOperation
11
+ } from "./chunk-DPAXDXMK.mjs";
12
+ import "./chunk-N2GMSVDQ.mjs";
13
+
14
+ // src/capabilities/operation-resolver/operation-resolver.ts
15
+ import * as Effect from "effect/Effect";
16
+ import { Capabilities, Capability } from "@dxos/app-framework";
17
+ import { LayoutOperation } from "@dxos/app-toolkit";
18
+ import { PublicKey } from "@dxos/client";
19
+ import { runAndForwardErrors } from "@dxos/effect";
20
+ import { invariant } from "@dxos/invariant";
21
+ import { OperationResolver } from "@dxos/operation";
22
+ import { Operation } from "@dxos/operation";
23
+ import { ObservabilityOperation } from "@dxos/plugin-observability/types";
24
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/operation-resolver/operation-resolver.ts";
25
+ var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
26
+ var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* ({ appName = "Composer" } = {}) {
27
+ return Capability.contributes(Capabilities.OperationResolver, [
28
+ //
29
+ // CreateIdentity
30
+ //
31
+ OperationResolver.make({
32
+ operation: ClientOperation.CreateIdentity,
33
+ handler: Effect.fnUntraced(function* (profile) {
34
+ const manager = yield* Capability.get(Capabilities.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(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(LayoutOperation.SwitchWorkspace, {
67
+ subject: Account.id
68
+ });
69
+ yield* Operation.invoke(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(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(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: 113,
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: 127,
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(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: 148,
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: 173,
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: 177,
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: 197,
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: 236,
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-6QW3BKA5.mjs.map
@@ -0,0 +1,7 @@
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 { Capabilities, Capability } from '@dxos/app-framework';\nimport { LayoutOperation } from '@dxos/app-toolkit';\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* ({ appName = 'Composer' }: OperationResolverOptions = {}) {\n return Capability.contributes(Capabilities.OperationResolver, [\n //\n // CreateIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.CreateIdentity,\n handler: Effect.fnUntraced(function* (profile) {\n const manager = yield* Capability.get(Capabilities.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(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(LayoutOperation.SwitchWorkspace, { subject: Account.id });\n yield* Operation.invoke(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(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(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(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": "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",
6
+ "names": ["Effect", "Capabilities", "Capability", "LayoutOperation", "PublicKey", "runAndForwardErrors", "invariant", "OperationResolver", "Operation", "ObservabilityOperation", "RECOVER_IDENTITY_RPC_TIMEOUT", "Capability", "makeModule", "fnUntraced", "appName", "contributes", "Capabilities", "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", "props", "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
+ }
@@ -0,0 +1,26 @@
1
+ import {
2
+ ClientCapabilities
3
+ } from "./chunk-DPAXDXMK.mjs";
4
+ import {
5
+ meta
6
+ } from "./chunk-N2GMSVDQ.mjs";
7
+
8
+ // src/capabilities/react-context/react-context.tsx
9
+ import * as Effect from "effect/Effect";
10
+ import React from "react";
11
+ import { Capabilities, Capability } from "@dxos/app-framework";
12
+ import { useCapability } from "@dxos/app-framework/ui";
13
+ import { ClientProvider } from "@dxos/react-client";
14
+ var react_context_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactContext, {
15
+ id: meta.id,
16
+ context: ({ children }) => {
17
+ const client = useCapability(ClientCapabilities.Client);
18
+ return /* @__PURE__ */ React.createElement(ClientProvider, {
19
+ client
20
+ }, children);
21
+ }
22
+ })));
23
+ export {
24
+ react_context_default as default
25
+ };
26
+ //# sourceMappingURL=react-context-E7TAJMDK.mjs.map
@@ -0,0 +1,7 @@
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 { Capabilities, Capability } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\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(Capabilities.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,cAAcC,kBAAkB;AACzC,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAK/B,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,aAAaC,cAAc;EAChDC,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", "Capabilities", "Capability", "useCapability", "ClientProvider", "Capability", "makeModule", "succeed", "contributes", "Capabilities", "ReactContext", "id", "meta", "context", "children", "client", "useCapability", "ClientCapabilities", "Client", "ClientProvider"]
7
+ }
@@ -0,0 +1,77 @@
1
+ import {
2
+ JOIN_DIALOG,
3
+ RECOVERY_CODE_DIALOG,
4
+ RESET_DIALOG
5
+ } from "./chunk-VYX3ROUX.mjs";
6
+ import {
7
+ Account
8
+ } from "./chunk-DPAXDXMK.mjs";
9
+ import "./chunk-N2GMSVDQ.mjs";
10
+
11
+ // src/capabilities/react-surface/react-surface.tsx
12
+ import * as Effect from "effect/Effect";
13
+ import React from "react";
14
+ import { Capabilities, Capability } from "@dxos/app-framework";
15
+ import { Surface } from "@dxos/app-framework/ui";
16
+
17
+ // src/containers/index.ts
18
+ import { lazy } from "react";
19
+ var DevicesContainer = lazy(() => import("./DevicesContainer-46MEG3F5.mjs"));
20
+ var JoinDialog = lazy(() => import("./JoinDialog-2RCYK4O5.mjs"));
21
+ var ProfileContainer = lazy(() => import("./ProfileContainer-XYRCOQ5I.mjs"));
22
+ var RecoveryCodeDialog = lazy(() => import("./RecoveryCodeDialog-EX2CLFND.mjs"));
23
+ var RecoveryCredentialsContainer = lazy(() => import("./RecoveryCredentialsContainer-RWTEIHOB.mjs"));
24
+ var ResetDialog = lazy(() => import("./ResetDialog-W24FOWBQ.mjs"));
25
+
26
+ // src/capabilities/react-surface/react-surface.tsx
27
+ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({ createInvitationUrl, onReset }) {
28
+ const capabilityManager = yield* Capability.Service;
29
+ return Capability.contributes(Capabilities.ReactSurface, [
30
+ Surface.create({
31
+ id: Account.Profile,
32
+ role: "article",
33
+ filter: (data) => data.subject === Account.Profile,
34
+ component: () => /* @__PURE__ */ React.createElement(ProfileContainer, null)
35
+ }),
36
+ Surface.create({
37
+ id: Account.Devices,
38
+ role: "article",
39
+ filter: (data) => data.subject === Account.Devices,
40
+ component: () => /* @__PURE__ */ React.createElement(DevicesContainer, {
41
+ createInvitationUrl
42
+ })
43
+ }),
44
+ Surface.create({
45
+ id: Account.Security,
46
+ role: "article",
47
+ filter: (data) => data.subject === Account.Security,
48
+ component: () => /* @__PURE__ */ React.createElement(RecoveryCredentialsContainer, null)
49
+ }),
50
+ Surface.create({
51
+ id: JOIN_DIALOG,
52
+ role: "dialog",
53
+ filter: (data) => data.component === JOIN_DIALOG,
54
+ component: ({ data }) => /* @__PURE__ */ React.createElement(JoinDialog, data.props)
55
+ }),
56
+ Surface.create({
57
+ id: RECOVERY_CODE_DIALOG,
58
+ role: "dialog",
59
+ filter: (data) => data.component === RECOVERY_CODE_DIALOG,
60
+ component: ({ data }) => /* @__PURE__ */ React.createElement(RecoveryCodeDialog, data.props)
61
+ }),
62
+ Surface.create({
63
+ id: RESET_DIALOG,
64
+ role: "dialog",
65
+ filter: (data) => data.component === RESET_DIALOG,
66
+ component: ({ data }) => /* @__PURE__ */ React.createElement(ResetDialog, {
67
+ ...data.props,
68
+ onReset,
69
+ capabilityManager
70
+ })
71
+ })
72
+ ]);
73
+ }));
74
+ export {
75
+ react_surface_default as default
76
+ };
77
+ //# sourceMappingURL=react-surface-L5A2LBFE.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/react-surface/react-surface.tsx", "../../../src/containers/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../../constants';\nimport {\n DevicesContainer,\n JoinDialog,\n ProfileContainer,\n RecoveryCodeDialog,\n type RecoveryCodeDialogProps,\n RecoveryCredentialsContainer,\n ResetDialog,\n type ResetDialogProps,\n} from '../../containers';\nimport { Account, type ClientPluginOptions } from '../../types';\n\ntype ReactSurfaceOptions = Pick<ClientPluginOptions, 'onReset'> & {\n createInvitationUrl: (invitationCode: string) => string;\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({ createInvitationUrl, onReset }: ReactSurfaceOptions) {\n const capabilityManager = yield* Capability.Service;\n\n return Capability.contributes(Capabilities.ReactSurface, [\n Surface.create({\n id: Account.Profile,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Profile,\n component: () => <ProfileContainer />,\n }),\n Surface.create({\n id: Account.Devices,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Devices,\n component: () => <DevicesContainer createInvitationUrl={createInvitationUrl} />,\n }),\n Surface.create({\n id: Account.Security,\n role: 'article',\n filter: (data): data is any => data.subject === Account.Security,\n component: () => <RecoveryCredentialsContainer />,\n }),\n Surface.create({\n id: JOIN_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: JoinPanelProps } => data.component === JOIN_DIALOG,\n component: ({ data }: { data: any }) => <JoinDialog {...data.props} />,\n }),\n Surface.create({\n id: RECOVERY_CODE_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: RecoveryCodeDialogProps } => data.component === RECOVERY_CODE_DIALOG,\n component: ({ data }: { data: any }) => <RecoveryCodeDialog {...data.props} />,\n }),\n Surface.create({\n id: RESET_DIALOG,\n role: 'dialog',\n filter: (data): data is { props: ResetDialogProps } => data.component === RESET_DIALOG,\n component: ({ data }: { data: any }) => (\n <ResetDialog {...data.props} onReset={onReset} capabilityManager={capabilityManager} />\n ),\n }),\n ]);\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport { type RecoveryCodeDialogProps } from './RecoveryCodeDialog';\nexport { type ResetDialogProps } from './ResetDialog';\n\nexport const DevicesContainer: ComponentType<any> = lazy(() => import('./DevicesContainer'));\nexport const JoinDialog: ComponentType<any> = lazy(() => import('./JoinDialog'));\nexport const ProfileContainer: ComponentType<any> = lazy(() => import('./ProfileContainer'));\nexport const RecoveryCodeDialog: ComponentType<any> = lazy(() => import('./RecoveryCodeDialog'));\nexport const RecoveryCredentialsContainer: ComponentType<any> = lazy(() => import('./RecoveryCredentialsContainer'));\nexport const ResetDialog: ComponentType<any> = lazy(() => import('./ResetDialog'));\n"],
5
+ "mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,eAAe;;;ACJxB,SAA6BC,YAAY;AAKlC,IAAMC,mBAAuCC,KAAK,MAAM,OAAO,iCAAA,CAAA;AAC/D,IAAMC,aAAiCD,KAAK,MAAM,OAAO,2BAAA,CAAA;AACzD,IAAME,mBAAuCF,KAAK,MAAM,OAAO,iCAAA,CAAA;AAC/D,IAAMG,qBAAyCH,KAAK,MAAM,OAAO,mCAAA,CAAA;AACjE,IAAMI,+BAAmDJ,KAAK,MAAM,OAAO,6CAAA,CAAA;AAC3E,IAAMK,cAAkCL,KAAK,MAAM,OAAO,4BAAA,CAAA;;;ADcjE,IAAA,wBAAeM,WAAWC,WACjBC,kBAAW,WAAW,EAAEC,qBAAqBC,QAAO,GAAuB;AAChF,QAAMC,oBAAoB,OAAOL,WAAWM;AAE5C,SAAON,WAAWO,YAAYC,aAAaC,cAAc;IACvDC,QAAQC,OAAO;MACbC,IAAIC,QAAQC;MACZC,MAAM;MACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,QAAQC;MACxDK,WAAW,MAAM,sBAAA,cAACC,kBAAAA,IAAAA;IACpB,CAAA;IACAV,QAAQC,OAAO;MACbC,IAAIC,QAAQQ;MACZN,MAAM;MACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,QAAQQ;MACxDF,WAAW,MAAM,sBAAA,cAACG,kBAAAA;QAAiBnB;;IACrC,CAAA;IACAO,QAAQC,OAAO;MACbC,IAAIC,QAAQU;MACZR,MAAM;MACNC,QAAQ,CAACC,SAAsBA,KAAKC,YAAYL,QAAQU;MACxDJ,WAAW,MAAM,sBAAA,cAACK,8BAAAA,IAAAA;IACpB,CAAA;IACAd,QAAQC,OAAO;MACbC,IAAIa;MACJV,MAAM;MACNC,QAAQ,CAACC,SAA4CA,KAAKE,cAAcM;MACxEN,WAAW,CAAC,EAAEF,KAAI,MAAsB,sBAAA,cAACS,YAAeT,KAAKU,KAAK;IACpE,CAAA;IACAjB,QAAQC,OAAO;MACbC,IAAIgB;MACJb,MAAM;MACNC,QAAQ,CAACC,SAAqDA,KAAKE,cAAcS;MACjFT,WAAW,CAAC,EAAEF,KAAI,MAAsB,sBAAA,cAACY,oBAAuBZ,KAAKU,KAAK;IAC5E,CAAA;IACAjB,QAAQC,OAAO;MACbC,IAAIkB;MACJf,MAAM;MACNC,QAAQ,CAACC,SAA8CA,KAAKE,cAAcW;MAC1EX,WAAW,CAAC,EAAEF,KAAI,MAChB,sBAAA,cAACc,aAAAA;QAAa,GAAGd,KAAKU;QAAOvB;QAAkBC;;IAEnD,CAAA;GACD;AACH,CAAA,CAAA;",
6
+ "names": ["Effect", "React", "Capabilities", "Capability", "Surface", "lazy", "DevicesContainer", "lazy", "JoinDialog", "ProfileContainer", "RecoveryCodeDialog", "RecoveryCredentialsContainer", "ResetDialog", "Capability", "makeModule", "fnUntraced", "createInvitationUrl", "onReset", "capabilityManager", "Service", "contributes", "Capabilities", "ReactSurface", "Surface", "create", "id", "Account", "Profile", "role", "filter", "data", "subject", "component", "ProfileContainer", "Devices", "DevicesContainer", "Security", "RecoveryCredentialsContainer", "JOIN_DIALOG", "JoinDialog", "props", "RECOVERY_CODE_DIALOG", "RecoveryCodeDialog", "RESET_DIALOG", "ResetDialog"]
7
+ }
@@ -0,0 +1,28 @@
1
+ import {
2
+ ClientCapabilities
3
+ } from "./chunk-DPAXDXMK.mjs";
4
+ import "./chunk-N2GMSVDQ.mjs";
5
+
6
+ // src/capabilities/schema-defs/schema-defs.ts
7
+ import * as Effect from "effect/Effect";
8
+ import { Capabilities, Capability } from "@dxos/app-framework";
9
+ import { AppCapabilities } from "@dxos/app-toolkit";
10
+ var schema_defs_default = Capability.makeModule(Effect.fnUntraced(function* () {
11
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
12
+ const client = yield* Capability.get(ClientCapabilities.Client);
13
+ const schemasAtom = yield* Capability.atom(AppCapabilities.Schema);
14
+ let previous = [];
15
+ const cancel = registry.subscribe(schemasAtom, async (_schemas) => {
16
+ const schemas = Array.from(new Set(_schemas.flat()));
17
+ const newSchemas = schemas.filter((schema) => !previous.includes(schema));
18
+ previous = schemas;
19
+ await client.addTypes(newSchemas);
20
+ }, {
21
+ immediate: true
22
+ });
23
+ return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));
24
+ }));
25
+ export {
26
+ schema_defs_default as default
27
+ };
28
+ //# sourceMappingURL=schema-defs-5WDZWVEI.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/schema-defs/schema-defs.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { type Type } from '@dxos/echo';\n\nimport { ClientCapabilities } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Capabilities.AtomRegistry);\n const client = yield* Capability.get(ClientCapabilities.Client);\n const schemasAtom = yield* Capability.atom(AppCapabilities.Schema);\n\n // TODO(wittjosiah): Unregister schemas when they are disabled.\n let previous: Type.AnyEntity[] = [];\n const cancel = registry.subscribe(\n schemasAtom,\n async (_schemas: any[]) => {\n // TODO(wittjosiah): This doesn't seem to de-dupe schemas as expected.\n const schemas = Array.from(new Set(_schemas.flat())) as Type.AnyEntity[];\n // TODO(wittjosiah): Filter out schemas which the client has already registered.\n const newSchemas = schemas.filter((schema) => !previous.includes(schema));\n previous = schemas;\n await client.addTypes(newSchemas);\n },\n { immediate: true },\n );\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));\n }),\n);\n"],
5
+ "mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,uBAAuB;AAKhC,IAAA,sBAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,WAAW,OAAOH,WAAWI,IAAIC,aAAaC,YAAY;AAChE,QAAMC,SAAS,OAAOP,WAAWI,IAAII,mBAAmBC,MAAM;AAC9D,QAAMC,cAAc,OAAOV,WAAWW,KAAKC,gBAAgBC,MAAM;AAGjE,MAAIC,WAA6B,CAAA;AACjC,QAAMC,SAASZ,SAASa,UACtBN,aACA,OAAOO,aAAAA;AAEL,UAAMC,UAAUC,MAAMC,KAAK,IAAIC,IAAIJ,SAASK,KAAI,CAAA,CAAA;AAEhD,UAAMC,aAAaL,QAAQM,OAAO,CAACC,WAAW,CAACX,SAASY,SAASD,MAAAA,CAAAA;AACjEX,eAAWI;AACX,UAAMX,OAAOoB,SAASJ,UAAAA;EACxB,GACA;IAAEK,WAAW;EAAK,CAAA;AAGpB,SAAO5B,WAAW6B,YAAYxB,aAAayB,MAAM,MAAM,MAAaC,YAAK,MAAMhB,OAAAA,CAAAA,CAAAA;AACjF,CAAA,CAAA;",
6
+ "names": ["Effect", "Capabilities", "Capability", "AppCapabilities", "Capability", "makeModule", "fnUntraced", "registry", "get", "Capabilities", "AtomRegistry", "client", "ClientCapabilities", "Client", "schemasAtom", "atom", "AppCapabilities", "Schema", "previous", "cancel", "subscribe", "_schemas", "schemas", "Array", "from", "Set", "flat", "newSchemas", "filter", "schema", "includes", "addTypes", "immediate", "contributes", "Null", "sync"]
7
+ }
@@ -1,10 +1,16 @@
1
1
  import {
2
2
  Account,
3
- ClientAction
4
- } from "../chunk-TRA2GP4M.mjs";
5
- import "../chunk-QB3D2P4J.mjs";
3
+ ClientAction,
4
+ ClientCapabilities,
5
+ ClientEvents,
6
+ ClientOperation
7
+ } from "../chunk-DPAXDXMK.mjs";
8
+ import "../chunk-N2GMSVDQ.mjs";
6
9
  export {
7
10
  Account,
8
- ClientAction
11
+ ClientAction,
12
+ ClientCapabilities,
13
+ ClientEvents,
14
+ ClientOperation
9
15
  };
10
16
  //# sourceMappingURL=index.mjs.map