@dxos/plugin-client 0.10.0 → 0.11.0

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 (358) hide show
  1. package/dist/lib/ClientPlugin.mjs +65 -0
  2. package/dist/lib/ClientPlugin.mjs.map +1 -0
  3. package/dist/lib/ClientPlugin.node.mjs +904 -0
  4. package/dist/lib/ClientPlugin.node.mjs.map +1 -0
  5. package/dist/lib/ClientPlugin.workerd.mjs +10 -0
  6. package/dist/lib/ClientPlugin.workerd.mjs.map +1 -0
  7. package/dist/lib/capabilities/node.mjs +13 -0
  8. package/dist/lib/capabilities/node.mjs.map +1 -0
  9. package/dist/lib/capabilities.mjs +23 -0
  10. package/dist/lib/capabilities.mjs.map +1 -0
  11. package/dist/lib/chunk-AccountContainer.mjs +190 -0
  12. package/dist/lib/chunk-AccountContainer.mjs.map +1 -0
  13. package/dist/lib/chunk-DevicesContainer.mjs +275 -0
  14. package/dist/lib/chunk-DevicesContainer.mjs.map +1 -0
  15. package/dist/lib/chunk-InvitationsContainer.mjs +149 -0
  16. package/dist/lib/chunk-InvitationsContainer.mjs.map +1 -0
  17. package/dist/lib/chunk-JoinDialog.mjs +35 -0
  18. package/dist/lib/chunk-JoinDialog.mjs.map +1 -0
  19. package/dist/lib/chunk-ProfileContainer.mjs +145 -0
  20. package/dist/lib/chunk-ProfileContainer.mjs.map +1 -0
  21. package/dist/lib/chunk-RecoveryCodeDialog.mjs +72 -0
  22. package/dist/lib/chunk-RecoveryCodeDialog.mjs.map +1 -0
  23. package/dist/lib/chunk-RecoveryCredentialsContainer.mjs +65 -0
  24. package/dist/lib/chunk-RecoveryCredentialsContainer.mjs.map +1 -0
  25. package/dist/lib/chunk-ResetDialog.mjs +47 -0
  26. package/dist/lib/chunk-ResetDialog.mjs.map +1 -0
  27. package/dist/lib/chunk-UsageContainer.mjs +217 -0
  28. package/dist/lib/chunk-UsageContainer.mjs.map +1 -0
  29. package/dist/lib/{neutral/account-cache-YVQKLNV2.mjs → chunk-account-cache.mjs} +10 -12
  30. package/dist/lib/chunk-account-cache.mjs.map +1 -0
  31. package/dist/lib/chunk-app-graph-builder.mjs +111 -0
  32. package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
  33. package/dist/lib/chunk-client.mjs +90 -0
  34. package/dist/lib/chunk-client.mjs.map +1 -0
  35. package/dist/lib/{neutral/chunk-GSKMAS3S.mjs → chunk-constants.mjs} +5 -8
  36. package/dist/lib/chunk-constants.mjs.map +1 -0
  37. package/dist/lib/chunk-create-agent.mjs +23 -0
  38. package/dist/lib/chunk-create-agent.mjs.map +1 -0
  39. package/dist/lib/chunk-create-identity.mjs +28 -0
  40. package/dist/lib/chunk-create-identity.mjs.map +1 -0
  41. package/dist/lib/chunk-create-passkey.mjs +85 -0
  42. package/dist/lib/chunk-create-passkey.mjs.map +1 -0
  43. package/dist/lib/chunk-create-recovery-code.mjs +31 -0
  44. package/dist/lib/chunk-create-recovery-code.mjs.map +1 -0
  45. package/dist/lib/chunk-hooks.mjs +29 -0
  46. package/dist/lib/chunk-hooks.mjs.map +1 -0
  47. package/dist/lib/chunk-hub-http-client.mjs +14 -0
  48. package/dist/lib/chunk-hub-http-client.mjs.map +1 -0
  49. package/dist/lib/chunk-join-identity.mjs +20 -0
  50. package/dist/lib/chunk-join-identity.mjs.map +1 -0
  51. package/dist/lib/chunk-layer-specs.mjs +107 -0
  52. package/dist/lib/chunk-layer-specs.mjs.map +1 -0
  53. package/dist/lib/{neutral/chunk-6G4KZLBG.mjs → chunk-meta.mjs} +13 -20
  54. package/dist/lib/chunk-meta.mjs.map +1 -0
  55. package/dist/lib/chunk-migrations.mjs +29 -0
  56. package/dist/lib/chunk-migrations.mjs.map +1 -0
  57. package/dist/lib/chunk-navigation-handler.mjs +71 -0
  58. package/dist/lib/chunk-navigation-handler.mjs.map +1 -0
  59. package/dist/lib/chunk-navigation-target-loader.mjs +46 -0
  60. package/dist/lib/chunk-navigation-target-loader.mjs.map +1 -0
  61. package/dist/lib/chunk-open-usage.mjs +14 -0
  62. package/dist/lib/chunk-open-usage.mjs.map +1 -0
  63. package/dist/lib/chunk-operation-handler.mjs +11 -0
  64. package/dist/lib/chunk-operation-handler.mjs.map +1 -0
  65. package/dist/lib/chunk-operations.mjs +212 -0
  66. package/dist/lib/chunk-operations.mjs.map +1 -0
  67. package/dist/lib/chunk-progress.mjs +10 -0
  68. package/dist/lib/chunk-progress.mjs.map +1 -0
  69. package/dist/lib/chunk-react-context.mjs +30 -0
  70. package/dist/lib/chunk-react-context.mjs.map +1 -0
  71. package/dist/lib/chunk-react-surface.mjs +70 -0
  72. package/dist/lib/chunk-react-surface.mjs.map +1 -0
  73. package/dist/lib/chunk-recover-identity.mjs +17 -0
  74. package/dist/lib/chunk-recover-identity.mjs.map +1 -0
  75. package/dist/lib/chunk-redeem-passkey.mjs +72 -0
  76. package/dist/lib/chunk-redeem-passkey.mjs.map +1 -0
  77. package/dist/lib/chunk-redeem-token.mjs +24 -0
  78. package/dist/lib/chunk-redeem-token.mjs.map +1 -0
  79. package/dist/lib/chunk-remote-trace-monitor.mjs +37 -0
  80. package/dist/lib/chunk-remote-trace-monitor.mjs.map +1 -0
  81. package/dist/lib/chunk-reset-storage.mjs +17 -0
  82. package/dist/lib/chunk-reset-storage.mjs.map +1 -0
  83. package/dist/lib/chunk-resolve-navigation-targets.mjs +32 -0
  84. package/dist/lib/chunk-resolve-navigation-targets.mjs.map +1 -0
  85. package/dist/lib/chunk-schema-defs.mjs +53 -0
  86. package/dist/lib/chunk-schema-defs.mjs.map +1 -0
  87. package/dist/lib/chunk-share-identity.mjs +16 -0
  88. package/dist/lib/chunk-share-identity.mjs.map +1 -0
  89. package/dist/lib/chunk-space-replication-progress.mjs +94 -0
  90. package/dist/lib/chunk-space-replication-progress.mjs.map +1 -0
  91. package/dist/lib/chunk-trace-progress.mjs +69 -0
  92. package/dist/lib/chunk-trace-progress.mjs.map +1 -0
  93. package/dist/lib/chunk-update-profile.mjs +15 -0
  94. package/dist/lib/chunk-update-profile.mjs.map +1 -0
  95. package/dist/lib/components.mjs +0 -0
  96. package/dist/lib/containers.mjs +15 -0
  97. package/dist/lib/containers.mjs.map +1 -0
  98. package/dist/lib/index.mjs +27 -0
  99. package/dist/lib/index.mjs.map +1 -0
  100. package/dist/lib/meta.mjs +2 -0
  101. package/dist/lib/operations.mjs +2 -0
  102. package/dist/lib/plugin.mjs +9 -0
  103. package/dist/lib/plugin.mjs.map +1 -0
  104. package/dist/lib/testing.mjs +21 -0
  105. package/dist/lib/testing.mjs.map +1 -0
  106. package/dist/lib/translations.mjs +111 -0
  107. package/dist/lib/translations.mjs.map +1 -0
  108. package/dist/lib/types.mjs +139 -0
  109. package/dist/lib/types.mjs.map +1 -0
  110. package/dist/types/src/ClientPlugin.d.ts.map +1 -1
  111. package/dist/types/src/capabilities/account-cache.d.ts +1 -1
  112. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  113. package/dist/types/src/capabilities/client.d.ts +1 -1
  114. package/dist/types/src/capabilities/client.d.ts.map +1 -1
  115. package/dist/types/src/capabilities/hub-http-client.d.ts +1 -1
  116. package/dist/types/src/capabilities/index.d.ts +6 -1
  117. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  118. package/dist/types/src/capabilities/layer-specs.d.ts +1 -1
  119. package/dist/types/src/capabilities/migrations.d.ts +1 -1
  120. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +3 -1
  121. package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
  122. package/dist/types/src/capabilities/navigation-target-loader.d.ts +11 -0
  123. package/dist/types/src/capabilities/navigation-target-loader.d.ts.map +1 -0
  124. package/dist/types/src/capabilities/node.d.ts +2 -1
  125. package/dist/types/src/capabilities/node.d.ts.map +1 -1
  126. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  127. package/dist/types/src/capabilities/react-context.d.ts +1 -1
  128. package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
  129. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  130. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  131. package/dist/types/src/capabilities/remote-trace-monitor.d.ts +15 -0
  132. package/dist/types/src/capabilities/remote-trace-monitor.d.ts.map +1 -0
  133. package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
  134. package/dist/types/src/capabilities/space-replication-progress.d.ts +11 -0
  135. package/dist/types/src/capabilities/space-replication-progress.d.ts.map +1 -0
  136. package/dist/types/src/capabilities/trace-progress.d.ts +17 -0
  137. package/dist/types/src/capabilities/trace-progress.d.ts.map +1 -0
  138. package/dist/types/src/commands/account/login/login.d.ts +2 -1
  139. package/dist/types/src/commands/account/login/login.d.ts.map +1 -1
  140. package/dist/types/src/commands/account/logout/logout.d.ts +1 -1
  141. package/dist/types/src/commands/account/logout/logout.d.ts.map +1 -1
  142. package/dist/types/src/commands/halo/index.d.ts.map +1 -1
  143. package/dist/types/src/commands/halo/share/share.d.ts.map +1 -1
  144. package/dist/types/src/commands/profile/create.d.ts.map +1 -1
  145. package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts +4 -1
  146. package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts.map +1 -1
  147. package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts +4 -1
  148. package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts.map +1 -1
  149. package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts +4 -1
  150. package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
  151. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +4 -1
  152. package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -1
  153. package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts +4 -1
  154. package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts.map +1 -1
  155. package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts +4 -1
  156. package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts.map +1 -1
  157. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts +4 -1
  158. package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
  159. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +4 -1
  160. package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
  161. package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts +4 -1
  162. package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -1
  163. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +4 -1
  164. package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -1
  165. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts +4 -1
  166. package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -1
  167. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts +4 -1
  168. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -1
  169. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +4 -1
  170. package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
  171. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +4 -1
  172. package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -1
  173. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +4 -1
  174. package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -1
  175. package/dist/types/src/containers/UsageContainer/UsageContainer.d.ts +4 -5
  176. package/dist/types/src/containers/UsageContainer/UsageContainer.d.ts.map +1 -1
  177. package/dist/types/src/containers/UsageContainer/UsageView.d.ts +4 -7
  178. package/dist/types/src/containers/UsageContainer/UsageView.d.ts.map +1 -1
  179. package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts +4 -2
  180. package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts.map +1 -1
  181. package/dist/types/src/halo-services-layer.d.ts +19 -0
  182. package/dist/types/src/halo-services-layer.d.ts.map +1 -0
  183. package/dist/types/src/index.d.ts +3 -0
  184. package/dist/types/src/index.d.ts.map +1 -1
  185. package/dist/types/src/operations/definitions.d.ts +9 -1
  186. package/dist/types/src/operations/definitions.d.ts.map +1 -1
  187. package/dist/types/src/operations/errors.d.ts +109 -0
  188. package/dist/types/src/operations/errors.d.ts.map +1 -0
  189. package/dist/types/src/operations/errors.test.d.ts +2 -0
  190. package/dist/types/src/operations/errors.test.d.ts.map +1 -0
  191. package/dist/types/src/operations/index.d.ts +1 -0
  192. package/dist/types/src/operations/index.d.ts.map +1 -1
  193. package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -1
  194. package/dist/types/src/operations/resolve-navigation-targets.d.ts +5 -0
  195. package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
  196. package/dist/types/src/operations/update-profile.d.ts +5 -0
  197. package/dist/types/src/operations/update-profile.d.ts.map +1 -0
  198. package/dist/types/src/progress/index.d.ts +2 -0
  199. package/dist/types/src/progress/index.d.ts.map +1 -0
  200. package/dist/types/src/progress/progress-keys.d.ts +6 -0
  201. package/dist/types/src/progress/progress-keys.d.ts.map +1 -0
  202. package/dist/types/src/testing/initializeIdentity.d.ts +5 -1
  203. package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -1
  204. package/dist/types/src/translations.d.ts.map +1 -1
  205. package/dist/types/src/types/capabilities.d.ts +10 -1
  206. package/dist/types/src/types/capabilities.d.ts.map +1 -1
  207. package/dist/types/src/types/schema.d.ts +6 -0
  208. package/dist/types/src/types/schema.d.ts.map +1 -1
  209. package/dist/types/tsconfig.tsbuildinfo +1 -1
  210. package/package.json +60 -55
  211. package/src/ClientPlugin.ts +25 -2
  212. package/src/capabilities/app-graph-builder.ts +1 -1
  213. package/src/capabilities/client.ts +26 -0
  214. package/src/capabilities/index.ts +10 -0
  215. package/src/capabilities/layer-specs.ts +64 -2
  216. package/src/capabilities/migrations.ts +9 -1
  217. package/src/capabilities/navigation-handler/navigation-handler.ts +20 -3
  218. package/src/capabilities/navigation-target-loader.ts +70 -0
  219. package/src/capabilities/react-context.tsx +20 -2
  220. package/src/capabilities/{react-surface.tsx → react-surface.ts} +14 -12
  221. package/src/capabilities/remote-trace-monitor.ts +62 -0
  222. package/src/capabilities/space-replication-progress.ts +143 -0
  223. package/src/capabilities/trace-progress.ts +84 -0
  224. package/src/commands/account/login/login.ts +48 -6
  225. package/src/commands/account/logout/logout.ts +4 -0
  226. package/src/commands/halo/index.ts +6 -2
  227. package/src/commands/halo/share/share.ts +16 -5
  228. package/src/commands/profile/create.ts +23 -40
  229. package/src/containers/AccountContainer/AccountContainer.tsx +6 -5
  230. package/src/containers/DevicesContainer/DevicesContainer.tsx +2 -0
  231. package/src/containers/InvitationsContainer/InvitationsContainer.tsx +2 -0
  232. package/src/containers/JoinDialog/JoinDialog.tsx +2 -0
  233. package/src/containers/ProfileContainer/ProfileContainer.tsx +19 -13
  234. package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx +2 -0
  235. package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +7 -9
  236. package/src/containers/ResetDialog/ResetDialog.tsx +2 -0
  237. package/src/containers/UsageContainer/UsageContainer.tsx +10 -1
  238. package/src/containers/UsageContainer/UsageView.stories.tsx +0 -12
  239. package/src/containers/UsageContainer/UsageView.tsx +9 -10
  240. package/src/halo-services-layer.ts +29 -0
  241. package/src/index.ts +9 -0
  242. package/src/operations/definitions.ts +9 -1
  243. package/src/operations/errors.test.ts +27 -0
  244. package/src/operations/errors.ts +47 -0
  245. package/src/operations/index.ts +3 -0
  246. package/src/operations/open-usage.ts +3 -3
  247. package/src/operations/redeem-passkey.ts +85 -55
  248. package/src/operations/resolve-navigation-targets.ts +71 -0
  249. package/src/operations/share-identity.ts +3 -3
  250. package/src/operations/update-profile.ts +20 -0
  251. package/src/progress/index.ts +5 -0
  252. package/src/progress/progress-keys.ts +15 -0
  253. package/src/testing/initializeIdentity.ts +10 -2
  254. package/src/translations.ts +2 -0
  255. package/src/types/capabilities.ts +15 -1
  256. package/src/types/schema.ts +7 -0
  257. package/dist/lib/neutral/AccountContainer-7SF53UON.mjs +0 -186
  258. package/dist/lib/neutral/AccountContainer-7SF53UON.mjs.map +0 -7
  259. package/dist/lib/neutral/ClientPlugin.mjs +0 -72
  260. package/dist/lib/neutral/ClientPlugin.mjs.map +0 -7
  261. package/dist/lib/neutral/ClientPlugin.node.mjs +0 -1156
  262. package/dist/lib/neutral/ClientPlugin.node.mjs.map +0 -7
  263. package/dist/lib/neutral/ClientPlugin.workerd.mjs +0 -16
  264. package/dist/lib/neutral/ClientPlugin.workerd.mjs.map +0 -7
  265. package/dist/lib/neutral/DevicesContainer-PRWIN36N.mjs +0 -271
  266. package/dist/lib/neutral/DevicesContainer-PRWIN36N.mjs.map +0 -7
  267. package/dist/lib/neutral/InvitationsContainer-BI5RAWET.mjs +0 -143
  268. package/dist/lib/neutral/InvitationsContainer-BI5RAWET.mjs.map +0 -7
  269. package/dist/lib/neutral/JoinDialog-4BWV4CYB.mjs +0 -53
  270. package/dist/lib/neutral/JoinDialog-4BWV4CYB.mjs.map +0 -7
  271. package/dist/lib/neutral/ProfileContainer-YEAYOTX5.mjs +0 -169
  272. package/dist/lib/neutral/ProfileContainer-YEAYOTX5.mjs.map +0 -7
  273. package/dist/lib/neutral/RecoveryCodeDialog-7EPNKCLB.mjs +0 -59
  274. package/dist/lib/neutral/RecoveryCodeDialog-7EPNKCLB.mjs.map +0 -7
  275. package/dist/lib/neutral/RecoveryCredentialsContainer-6BZ2IWX7.mjs +0 -60
  276. package/dist/lib/neutral/RecoveryCredentialsContainer-6BZ2IWX7.mjs.map +0 -7
  277. package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs +0 -57
  278. package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs.map +0 -7
  279. package/dist/lib/neutral/UsageContainer-2DWCVVE4.mjs +0 -241
  280. package/dist/lib/neutral/UsageContainer-2DWCVVE4.mjs.map +0 -7
  281. package/dist/lib/neutral/account-cache-YVQKLNV2.mjs.map +0 -7
  282. package/dist/lib/neutral/app-graph-builder-RVXTD6OE.mjs +0 -159
  283. package/dist/lib/neutral/app-graph-builder-RVXTD6OE.mjs.map +0 -7
  284. package/dist/lib/neutral/capabilities/index.mjs +0 -34
  285. package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
  286. package/dist/lib/neutral/capabilities/node.mjs +0 -21
  287. package/dist/lib/neutral/capabilities/node.mjs.map +0 -7
  288. package/dist/lib/neutral/chunk-6G4KZLBG.mjs.map +0 -7
  289. package/dist/lib/neutral/chunk-7DEIKHB7.mjs +0 -199
  290. package/dist/lib/neutral/chunk-7DEIKHB7.mjs.map +0 -7
  291. package/dist/lib/neutral/chunk-A7WDDIWY.mjs +0 -162
  292. package/dist/lib/neutral/chunk-A7WDDIWY.mjs.map +0 -7
  293. package/dist/lib/neutral/chunk-GSKMAS3S.mjs.map +0 -7
  294. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
  295. package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
  296. package/dist/lib/neutral/chunk-JY35S2CN.mjs +0 -27
  297. package/dist/lib/neutral/chunk-JY35S2CN.mjs.map +0 -7
  298. package/dist/lib/neutral/chunk-ZFABGG2E.mjs +0 -8
  299. package/dist/lib/neutral/chunk-ZFABGG2E.mjs.map +0 -7
  300. package/dist/lib/neutral/client-7I5Y5SOA.mjs +0 -62
  301. package/dist/lib/neutral/client-7I5Y5SOA.mjs.map +0 -7
  302. package/dist/lib/neutral/components/index.mjs +0 -1
  303. package/dist/lib/neutral/components/index.mjs.map +0 -7
  304. package/dist/lib/neutral/containers/index.mjs +0 -25
  305. package/dist/lib/neutral/containers/index.mjs.map +0 -7
  306. package/dist/lib/neutral/create-agent-6UKJMZS5.mjs +0 -26
  307. package/dist/lib/neutral/create-agent-6UKJMZS5.mjs.map +0 -7
  308. package/dist/lib/neutral/create-identity-ULCRB3YH.mjs +0 -42
  309. package/dist/lib/neutral/create-identity-ULCRB3YH.mjs.map +0 -7
  310. package/dist/lib/neutral/create-passkey-I7VDS3AC.mjs +0 -81
  311. package/dist/lib/neutral/create-passkey-I7VDS3AC.mjs.map +0 -7
  312. package/dist/lib/neutral/create-recovery-code-DH2B6EGP.mjs +0 -36
  313. package/dist/lib/neutral/create-recovery-code-DH2B6EGP.mjs.map +0 -7
  314. package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs +0 -19
  315. package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs.map +0 -7
  316. package/dist/lib/neutral/index.mjs +0 -25
  317. package/dist/lib/neutral/index.mjs.map +0 -7
  318. package/dist/lib/neutral/join-identity-PJCHDNLH.mjs +0 -27
  319. package/dist/lib/neutral/join-identity-PJCHDNLH.mjs.map +0 -7
  320. package/dist/lib/neutral/layer-specs-YI7BVWKZ.mjs +0 -59
  321. package/dist/lib/neutral/layer-specs-YI7BVWKZ.mjs.map +0 -7
  322. package/dist/lib/neutral/meta.json +0 -1
  323. package/dist/lib/neutral/meta.mjs +0 -8
  324. package/dist/lib/neutral/meta.mjs.map +0 -7
  325. package/dist/lib/neutral/migrations-7FTW55ER.mjs +0 -23
  326. package/dist/lib/neutral/migrations-7FTW55ER.mjs.map +0 -7
  327. package/dist/lib/neutral/navigation-handler-MQ6MZXLX.mjs +0 -46
  328. package/dist/lib/neutral/navigation-handler-MQ6MZXLX.mjs.map +0 -7
  329. package/dist/lib/neutral/open-usage-OJVTPGOY.mjs +0 -27
  330. package/dist/lib/neutral/open-usage-OJVTPGOY.mjs.map +0 -7
  331. package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs +0 -13
  332. package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs.map +0 -7
  333. package/dist/lib/neutral/operations/index.mjs +0 -12
  334. package/dist/lib/neutral/operations/index.mjs.map +0 -7
  335. package/dist/lib/neutral/plugin.mjs +0 -17
  336. package/dist/lib/neutral/plugin.mjs.map +0 -7
  337. package/dist/lib/neutral/react-context-V74T6JOJ.mjs +0 -23
  338. package/dist/lib/neutral/react-context-V74T6JOJ.mjs.map +0 -7
  339. package/dist/lib/neutral/react-surface-HPXRA65U.mjs +0 -75
  340. package/dist/lib/neutral/react-surface-HPXRA65U.mjs.map +0 -7
  341. package/dist/lib/neutral/recover-identity-B7YM2BR4.mjs +0 -26
  342. package/dist/lib/neutral/recover-identity-B7YM2BR4.mjs.map +0 -7
  343. package/dist/lib/neutral/redeem-passkey-TYP4XLHO.mjs +0 -66
  344. package/dist/lib/neutral/redeem-passkey-TYP4XLHO.mjs.map +0 -7
  345. package/dist/lib/neutral/redeem-token-2J33R3PV.mjs +0 -29
  346. package/dist/lib/neutral/redeem-token-2J33R3PV.mjs.map +0 -7
  347. package/dist/lib/neutral/reset-storage-K47HZTGP.mjs +0 -26
  348. package/dist/lib/neutral/reset-storage-K47HZTGP.mjs.map +0 -7
  349. package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs +0 -51
  350. package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs.map +0 -7
  351. package/dist/lib/neutral/share-identity-TOROBLWL.mjs +0 -31
  352. package/dist/lib/neutral/share-identity-TOROBLWL.mjs.map +0 -7
  353. package/dist/lib/neutral/testing/index.mjs +0 -25
  354. package/dist/lib/neutral/testing/index.mjs.map +0 -7
  355. package/dist/lib/neutral/translations.mjs +0 -124
  356. package/dist/lib/neutral/translations.mjs.map +0 -7
  357. package/dist/lib/neutral/types/index.mjs +0 -16
  358. package/dist/lib/neutral/types/index.mjs.map +0 -7
@@ -0,0 +1,30 @@
1
+ import { Capabilities, Capability } from "@dxos/app-framework";
2
+ import { Identity, Space } from "@dxos/halo";
3
+ import { meta } from "#meta";
4
+ import { ClientCapabilities } from "#types";
5
+ import * as Effect from "effect/Effect";
6
+ import { useMemo } from "react";
7
+ import { makeIdentityService, makeSpaceService } from "@dxos/halo-adapter-client";
8
+ import * as Context from "effect/Context";
9
+ import { useCapability } from "@dxos/app-framework/ui";
10
+ import { HaloProvider } from "@dxos/halo-react";
11
+ import { ClientProvider } from "@dxos/react-client";
12
+ import { jsx } from "react/jsx-runtime";
13
+ //#region src/capabilities/react-context.tsx
14
+ var react_context_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Capabilities.ReactContext, {
15
+ id: meta.profile.key,
16
+ context: ({ children }) => {
17
+ const client = useCapability(ClientCapabilities.Client);
18
+ return /* @__PURE__ */ jsx(ClientProvider, {
19
+ client,
20
+ children: /* @__PURE__ */ jsx(HaloProvider, {
21
+ services: useMemo(() => Context.empty().pipe(Context.add(Identity.Service, makeIdentityService(client)), Context.add(Space.Service, makeSpaceService(client))), [client]),
22
+ children
23
+ })
24
+ });
25
+ }
26
+ })));
27
+ //#endregion
28
+ export { react_context_default as default };
29
+
30
+ //# sourceMappingURL=chunk-react-context.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-react-context.mjs","names":[],"sources":["../../src/capabilities/react-context.tsx"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport React, { type ReactNode, useMemo } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/ui';\nimport { Identity, Space } from '@dxos/halo';\nimport { makeIdentityService, makeSpaceService } from '@dxos/halo-adapter-client';\nimport { HaloProvider } from '@dxos/halo-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(Capabilities.ReactContext, {\n id: meta.profile.key,\n context: ({ children }: { children?: ReactNode }) => {\n const client = useCapability(ClientCapabilities.Client);\n // Wrap the tree with the HALO services (via the client adapter) so `@dxos/halo-react`\n // hooks resolve. Kept inside ClientProvider while consumers migrate off `@dxos/client`.\n const services = useMemo(\n () =>\n Context.empty().pipe(\n Context.add(Identity.Service, makeIdentityService(client)),\n Context.add(Space.Service, makeSpaceService(client)),\n ),\n [client],\n );\n return (\n <ClientProvider client={client}>\n <HaloProvider services={services}>{children}</HaloProvider>\n </ClientProvider>\n );\n },\n }),\n ),\n);\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAA,wBAAe,WAAW,iBACxB,OAAO,QACL,WAAW,YAAY,aAAa,cAAc;CAChD,IAAI,KAAK,QAAQ;CACjB,UAAU,EAAE,eAAyC;EACnD,MAAM,SAAS,cAAc,mBAAmB,MAAM;EAWtD,OACE,oBAAC,gBAAD;GAAwB;aACtB,oBAAC,cAAD;IAAwB,UAVX,cAEb,QAAQ,MAAM,CAAC,CAAC,KACd,QAAQ,IAAI,SAAS,SAAS,oBAAoB,MAAM,CAAC,GACzD,QAAQ,IAAI,MAAM,SAAS,iBAAiB,MAAM,CAAC,CACrD,GACF,CAAC,MAAM,CAImB;IAAW;GAAuB,CAAA;EAC5C,CAAA;CAEpB;AACF,CAAC,CACH,CACF"}
@@ -0,0 +1,70 @@
1
+ import { n as RECOVERY_CODE_DIALOG, r as RESET_DIALOG, t as JOIN_DIALOG } from "./chunk-constants.mjs";
2
+ import { Capabilities, Capability } from "@dxos/app-framework";
3
+ import { Account } from "#types";
4
+ import * as Effect from "effect/Effect";
5
+ import { Surface } from "@dxos/app-framework/ui";
6
+ import { AppSurface } from "@dxos/app-toolkit/ui";
7
+ import { AccountContainer, DevicesContainer, InvitationsContainer, JoinDialog, ProfileContainer, RecoveryCodeDialog, RecoveryCredentialsContainer, ResetDialog, UsageContainer } from "#containers";
8
+ //#region src/capabilities/react-surface.ts
9
+ var react_surface_default = Capability.makeModule(Effect.fnUntraced(function* ({ createInvitationUrl, onReset }) {
10
+ const capabilityManager = yield* Capability.Service;
11
+ return Capability.contributes(Capabilities.ReactSurface, [
12
+ Surface.create({
13
+ id: Account.Profile,
14
+ filter: AppSurface.literal(AppSurface.Article, Account.Profile),
15
+ component: ProfileContainer
16
+ }),
17
+ Surface.create({
18
+ id: Account.Devices,
19
+ filter: AppSurface.literal(AppSurface.Article, Account.Devices),
20
+ component: DevicesContainer,
21
+ props: () => ({ createInvitationUrl })
22
+ }),
23
+ Surface.create({
24
+ id: Account.Security,
25
+ filter: AppSurface.literal(AppSurface.Article, Account.Security),
26
+ component: RecoveryCredentialsContainer
27
+ }),
28
+ Surface.create({
29
+ id: Account.Account,
30
+ filter: AppSurface.literal(AppSurface.Article, Account.Account),
31
+ component: AccountContainer
32
+ }),
33
+ Surface.create({
34
+ id: Account.Invitations,
35
+ filter: AppSurface.literal(AppSurface.Article, Account.Invitations),
36
+ component: InvitationsContainer
37
+ }),
38
+ Surface.create({
39
+ id: Account.Usage,
40
+ filter: AppSurface.literal(AppSurface.Article, Account.Usage),
41
+ component: UsageContainer
42
+ }),
43
+ Surface.create({
44
+ id: JOIN_DIALOG,
45
+ filter: AppSurface.component(AppSurface.Dialog, JOIN_DIALOG),
46
+ component: JoinDialog,
47
+ props: ({ data: { props } }) => ({ ...props })
48
+ }),
49
+ Surface.create({
50
+ id: RECOVERY_CODE_DIALOG,
51
+ filter: AppSurface.component(AppSurface.Dialog, RECOVERY_CODE_DIALOG),
52
+ component: RecoveryCodeDialog,
53
+ props: ({ data: { props } }) => ({ ...props })
54
+ }),
55
+ Surface.create({
56
+ id: RESET_DIALOG,
57
+ filter: AppSurface.component(AppSurface.Dialog, RESET_DIALOG),
58
+ component: ResetDialog,
59
+ props: ({ data: { props } }) => ({
60
+ ...props,
61
+ onReset,
62
+ capabilityManager
63
+ })
64
+ })
65
+ ]);
66
+ }));
67
+ //#endregion
68
+ export { react_surface_default as default };
69
+
70
+ //# sourceMappingURL=chunk-react-surface.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-react-surface.mjs","names":[],"sources":["../../src/capabilities/react-surface.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport { type ComponentProps } from 'react';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { Surface } from '@dxos/app-framework/ui';\nimport { AppSurface } from '@dxos/app-toolkit/ui';\n\nimport {\n AccountContainer,\n DevicesContainer,\n InvitationsContainer,\n JoinDialog,\n ProfileContainer,\n RecoveryCodeDialog,\n RecoveryCredentialsContainer,\n ResetDialog,\n UsageContainer,\n} from '#containers';\nimport { Account, type ClientPluginOptions } from '#types';\n\nimport { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../constants';\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 filter: AppSurface.literal(AppSurface.Article, Account.Profile),\n component: ProfileContainer,\n }),\n Surface.create({\n id: Account.Devices,\n filter: AppSurface.literal(AppSurface.Article, Account.Devices),\n component: DevicesContainer,\n props: () => ({ createInvitationUrl }),\n }),\n Surface.create({\n id: Account.Security,\n filter: AppSurface.literal(AppSurface.Article, Account.Security),\n component: RecoveryCredentialsContainer,\n }),\n Surface.create({\n id: Account.Account,\n filter: AppSurface.literal(AppSurface.Article, Account.Account),\n component: AccountContainer,\n }),\n Surface.create({\n id: Account.Invitations,\n filter: AppSurface.literal(AppSurface.Article, Account.Invitations),\n component: InvitationsContainer,\n }),\n Surface.create({\n id: Account.Usage,\n filter: AppSurface.literal(AppSurface.Article, Account.Usage),\n component: UsageContainer,\n }),\n Surface.create({\n id: JOIN_DIALOG,\n filter: AppSurface.component<ComponentProps<typeof JoinDialog>>(AppSurface.Dialog, JOIN_DIALOG),\n component: JoinDialog,\n props: ({ data: { props } }) => ({ ...props }),\n }),\n Surface.create({\n id: RECOVERY_CODE_DIALOG,\n filter: AppSurface.component<ComponentProps<typeof RecoveryCodeDialog>>(\n AppSurface.Dialog,\n RECOVERY_CODE_DIALOG,\n ),\n component: RecoveryCodeDialog,\n props: ({ data: { props } }) => ({ ...props }),\n }),\n Surface.create({\n id: RESET_DIALOG,\n filter: AppSurface.component<Pick<ComponentProps<typeof ResetDialog>, 'mode'>>(AppSurface.Dialog, RESET_DIALOG),\n component: ResetDialog,\n props: ({ data: { props } }) => ({ ...props, onReset, capabilityManager }),\n }),\n ]);\n }),\n);\n"],"mappings":";;;;;;;;AA8BA,IAAA,wBAAe,WAAW,WACxB,OAAO,WAAW,WAAW,EAAE,qBAAqB,WAAgC;CAClF,MAAM,oBAAoB,OAAO,WAAW;CAE5C,OAAO,WAAW,YAAY,aAAa,cAAc;EACvD,QAAQ,OAAO;GACb,IAAI,QAAQ;GACZ,QAAQ,WAAW,QAAQ,WAAW,SAAS,QAAQ,OAAO;GAC9D,WAAW;EACb,CAAC;EACD,QAAQ,OAAO;GACb,IAAI,QAAQ;GACZ,QAAQ,WAAW,QAAQ,WAAW,SAAS,QAAQ,OAAO;GAC9D,WAAW;GACX,cAAc,EAAE,oBAAoB;EACtC,CAAC;EACD,QAAQ,OAAO;GACb,IAAI,QAAQ;GACZ,QAAQ,WAAW,QAAQ,WAAW,SAAS,QAAQ,QAAQ;GAC/D,WAAW;EACb,CAAC;EACD,QAAQ,OAAO;GACb,IAAI,QAAQ;GACZ,QAAQ,WAAW,QAAQ,WAAW,SAAS,QAAQ,OAAO;GAC9D,WAAW;EACb,CAAC;EACD,QAAQ,OAAO;GACb,IAAI,QAAQ;GACZ,QAAQ,WAAW,QAAQ,WAAW,SAAS,QAAQ,WAAW;GAClE,WAAW;EACb,CAAC;EACD,QAAQ,OAAO;GACb,IAAI,QAAQ;GACZ,QAAQ,WAAW,QAAQ,WAAW,SAAS,QAAQ,KAAK;GAC5D,WAAW;EACb,CAAC;EACD,QAAQ,OAAO;GACb,IAAI;GACJ,QAAQ,WAAW,UAA6C,WAAW,QAAQ,WAAW;GAC9F,WAAW;GACX,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM;EAC9C,CAAC;EACD,QAAQ,OAAO;GACb,IAAI;GACJ,QAAQ,WAAW,UACjB,WAAW,QACX,oBACF;GACA,WAAW;GACX,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM;EAC9C,CAAC;EACD,QAAQ,OAAO;GACb,IAAI;GACJ,QAAQ,WAAW,UAA4D,WAAW,QAAQ,YAAY;GAC9G,WAAW;GACX,QAAQ,EAAE,MAAM,EAAE,eAAe;IAAE,GAAG;IAAO;IAAS;GAAkB;EAC1E,CAAC;CACH,CAAC;AACH,CAAC,CACH"}
@@ -0,0 +1,17 @@
1
+ import { p as RecoverIdentity } from "./chunk-operations.mjs";
2
+ import { t as JOIN_DIALOG } from "./chunk-constants.mjs";
3
+ import { Operation } from "@dxos/compute";
4
+ import { LayoutOperation } from "@dxos/app-toolkit";
5
+ import * as Effect from "effect/Effect";
6
+ //#region src/operations/recover-identity.ts
7
+ var handler = RecoverIdentity.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
8
+ yield* Operation.invoke(LayoutOperation.UpdateDialog, {
9
+ subject: JOIN_DIALOG,
10
+ blockAlign: "start",
11
+ props: { initialDisposition: "recover-identity" }
12
+ });
13
+ })));
14
+ //#endregion
15
+ export { handler as default };
16
+
17
+ //# sourceMappingURL=chunk-recover-identity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-recover-identity.mjs","names":[],"sources":["../../src/operations/recover-identity.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport type { JoinPanelProps } from '@dxos/shell/react';\n\nimport { JOIN_DIALOG } from '../constants';\nimport { RecoverIdentity } from './definitions';\n\nconst handler: Operation.WithHandler<typeof RecoverIdentity> = RecoverIdentity.pipe(\n Operation.withHandler(\n 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\nexport default handler;\n"],"mappings":";;;;;;AAaA,IAAM,UAAyD,gBAAgB,KAC7E,UAAU,YACR,OAAO,WAAW,aAAa;CAC7B,OAAO,UAAU,OAAO,gBAAgB,cAAc;EACpD,SAAS;EACT,YAAY;EACZ,OAAO,EACL,oBAAoB,mBACtB;CACF,CAAC;AACH,CAAC,CACH,CACF"}
@@ -0,0 +1,72 @@
1
+ import { i as PasskeyRejectedError, m as RedeemPasskey, n as PasskeyDismissedError, o as toPasskeyAssertionError, r as PasskeyLoginError } from "./chunk-operations.mjs";
2
+ import { ClientCapabilities } from "./types.mjs";
3
+ import { Capability } from "@dxos/app-framework";
4
+ import { Operation } from "@dxos/compute";
5
+ import { NativePasskey } from "@dxos/app-toolkit";
6
+ import * as Effect from "effect/Effect";
7
+ import * as Match from "effect/Match";
8
+ import { PublicKey } from "@dxos/client";
9
+ import { invariant } from "@dxos/invariant";
10
+ //#region src/operations/redeem-passkey.ts
11
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/operations/redeem-passkey.ts";
12
+ var nativeAssertion = (challenge) => Effect.gen(function* () {
13
+ const result = yield* Effect.tryPromise({
14
+ try: () => NativePasskey.loginNativePasskey({ challenge: Uint8Array.from(Buffer.from(challenge, "base64")) }),
15
+ catch: toPasskeyAssertionError
16
+ });
17
+ if (!result?.user_handle || !result.signature) return yield* Effect.fail(new PasskeyLoginError({ message: "Native passkey login returned no assertion." }));
18
+ return {
19
+ lookupKey: PublicKey.from(NativePasskey.decodeUrlSafeBase64(result.user_handle)),
20
+ signature: Buffer.from(NativePasskey.decodeUrlSafeBase64(result.signature)),
21
+ clientDataJson: Buffer.from(NativePasskey.decodeUrlSafeBase64(result.client_data_json)),
22
+ authenticatorData: Buffer.from(NativePasskey.decodeUrlSafeBase64(result.authenticator_data))
23
+ };
24
+ });
25
+ var webAssertion = (challenge) => Effect.gen(function* () {
26
+ if (typeof PublicKeyCredential === "undefined") return yield* Effect.fail(new PasskeyLoginError({ message: "WebAuthn is not available in this browser." }));
27
+ const credential = yield* Effect.tryPromise({
28
+ try: () => navigator.credentials.get({ publicKey: {
29
+ challenge: Buffer.from(challenge, "base64"),
30
+ rpId: location.hostname,
31
+ userVerification: "required"
32
+ } }),
33
+ catch: toPasskeyAssertionError
34
+ });
35
+ if (!(credential instanceof PublicKeyCredential) || !(credential.response instanceof AuthenticatorAssertionResponse)) return yield* Effect.fail(new PasskeyDismissedError({ message: "No passkey assertion was returned." }));
36
+ const { signature, clientDataJSON, authenticatorData, userHandle } = credential.response;
37
+ if (!userHandle) return yield* Effect.fail(new PasskeyLoginError({ message: "Passkey assertion has no user handle." }));
38
+ return {
39
+ lookupKey: PublicKey.from(new Uint8Array(userHandle)),
40
+ signature: Buffer.from(signature),
41
+ clientDataJson: Buffer.from(clientDataJSON),
42
+ authenticatorData: Buffer.from(authenticatorData)
43
+ };
44
+ });
45
+ var handler = RedeemPasskey.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
46
+ const identityService = (yield* Capability.get(ClientCapabilities.Client)).services.services.IdentityService;
47
+ invariant(identityService, "IdentityService not available", {
48
+ "~LogMeta": "~LogMeta",
49
+ F: __dxlog_file,
50
+ L: 88,
51
+ S: this,
52
+ A: ["identityService", "'IdentityService not available'"]
53
+ });
54
+ const { deviceKey, controlFeedKey, challenge } = yield* Effect.tryPromise({
55
+ try: () => identityService.requestRecoveryChallenge(),
56
+ catch: PasskeyLoginError.wrap({ message: "Failed to request a recovery challenge." })
57
+ });
58
+ const assertion = yield* Match.value(NativePasskey.supportsNativePasskeys()).pipe(Match.when(true, () => nativeAssertion(challenge)), Match.orElse(() => webAssertion(challenge)));
59
+ yield* Effect.tryPromise({
60
+ try: () => identityService.recoverIdentity({ external: {
61
+ ...assertion,
62
+ deviceKey,
63
+ controlFeedKey
64
+ } }, { timeout: RECOVER_IDENTITY_RPC_TIMEOUT }),
65
+ catch: PasskeyRejectedError.wrap()
66
+ });
67
+ })));
68
+ var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
69
+ //#endregion
70
+ export { handler as default };
71
+
72
+ //# sourceMappingURL=chunk-redeem-passkey.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-redeem-passkey.mjs","names":[],"sources":["../../src/operations/redeem-passkey.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Match from 'effect/Match';\n\nimport { Capability } from '@dxos/app-framework';\nimport { NativePasskey } from '@dxos/app-toolkit';\nimport { PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '../types';\nimport { RedeemPasskey } from './definitions';\nimport { PasskeyDismissedError, PasskeyLoginError, PasskeyRejectedError, toPasskeyAssertionError } from './errors';\n\n/** Signed challenge presented to EDGE in exchange for admitting this device. */\ntype Assertion = {\n lookupKey: PublicKey;\n signature: Buffer;\n clientDataJson: Buffer;\n authenticatorData: Buffer;\n};\n\nconst nativeAssertion = (challenge: string): Effect.Effect<Assertion, PasskeyDismissedError | PasskeyLoginError> =>\n Effect.gen(function* () {\n const result = yield* Effect.tryPromise({\n try: () => NativePasskey.loginNativePasskey({ challenge: Uint8Array.from(Buffer.from(challenge, 'base64')) }),\n catch: toPasskeyAssertionError,\n });\n if (!result?.user_handle || !result.signature) {\n return yield* Effect.fail(new PasskeyLoginError({ message: 'Native passkey login returned no assertion.' }));\n }\n\n return {\n lookupKey: PublicKey.from(NativePasskey.decodeUrlSafeBase64(result.user_handle)),\n signature: Buffer.from(NativePasskey.decodeUrlSafeBase64(result.signature)),\n clientDataJson: Buffer.from(NativePasskey.decodeUrlSafeBase64(result.client_data_json)),\n authenticatorData: Buffer.from(NativePasskey.decodeUrlSafeBase64(result.authenticator_data)),\n };\n });\n\nconst webAssertion = (challenge: string): Effect.Effect<Assertion, PasskeyDismissedError | PasskeyLoginError> =>\n Effect.gen(function* () {\n if (typeof PublicKeyCredential === 'undefined') {\n return yield* Effect.fail(new PasskeyLoginError({ message: 'WebAuthn is not available in this browser.' }));\n }\n\n const credential = yield* Effect.tryPromise({\n try: () =>\n navigator.credentials.get({\n publicKey: {\n challenge: Buffer.from(challenge, 'base64'),\n rpId: location.hostname,\n userVerification: 'required',\n },\n }),\n catch: toPasskeyAssertionError,\n });\n // A null credential means the authenticator resolved without presenting one; same signal as a dismissal.\n if (\n !(credential instanceof PublicKeyCredential) ||\n !(credential.response instanceof AuthenticatorAssertionResponse)\n ) {\n return yield* Effect.fail(new PasskeyDismissedError({ message: 'No passkey assertion was returned.' }));\n }\n\n const { signature, clientDataJSON, authenticatorData, userHandle } = credential.response;\n // The user handle carries the lookup key; a passkey created without a resident key has none.\n if (!userHandle) {\n return yield* Effect.fail(new PasskeyLoginError({ message: 'Passkey assertion has no user handle.' }));\n }\n\n return {\n lookupKey: PublicKey.from(new Uint8Array(userHandle)),\n signature: Buffer.from(signature),\n clientDataJson: Buffer.from(clientDataJSON),\n authenticatorData: Buffer.from(authenticatorData),\n };\n });\n\nconst handler: Operation.WithHandler<typeof RedeemPasskey> = RedeemPasskey.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const identityService = client.services.services.IdentityService;\n invariant(identityService, 'IdentityService not available');\n\n const { deviceKey, controlFeedKey, challenge } = yield* Effect.tryPromise({\n try: () => identityService.requestRecoveryChallenge(),\n catch: PasskeyLoginError.wrap({ message: 'Failed to request a recovery challenge.' }),\n });\n\n const assertion = yield* Match.value(NativePasskey.supportsNativePasskeys()).pipe(\n Match.when(true, () => nativeAssertion(challenge)),\n Match.orElse(() => webAssertion(challenge)),\n );\n\n // EDGE refuses the assertion when the passkey isn't registered as a recovery credential.\n yield* Effect.tryPromise({\n try: () =>\n identityService.recoverIdentity(\n { external: { ...assertion, deviceKey, controlFeedKey } },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n catch: PasskeyRejectedError.wrap(),\n });\n }),\n ),\n);\n\nexport default handler;\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,mBAAmB,cACvB,OAAO,IAAI,aAAa;CACtB,MAAM,SAAS,OAAO,OAAO,WAAW;EACtC,WAAW,cAAc,mBAAmB,EAAE,WAAW,WAAW,KAAK,OAAO,KAAK,WAAW,QAAQ,CAAC,EAAE,CAAC;EAC5G,OAAO;CACT,CAAC;CACD,IAAI,CAAC,QAAQ,eAAe,CAAC,OAAO,WAClC,OAAO,OAAO,OAAO,KAAK,IAAI,kBAAkB,EAAE,SAAS,8CAA8C,CAAC,CAAC;CAG7G,OAAO;EACL,WAAW,UAAU,KAAK,cAAc,oBAAoB,OAAO,WAAW,CAAC;EAC/E,WAAW,OAAO,KAAK,cAAc,oBAAoB,OAAO,SAAS,CAAC;EAC1E,gBAAgB,OAAO,KAAK,cAAc,oBAAoB,OAAO,gBAAgB,CAAC;EACtF,mBAAmB,OAAO,KAAK,cAAc,oBAAoB,OAAO,kBAAkB,CAAC;CAC7F;AACF,CAAC;AAEH,IAAM,gBAAgB,cACpB,OAAO,IAAI,aAAa;CACtB,IAAI,OAAO,wBAAwB,aACjC,OAAO,OAAO,OAAO,KAAK,IAAI,kBAAkB,EAAE,SAAS,6CAA6C,CAAC,CAAC;CAG5G,MAAM,aAAa,OAAO,OAAO,WAAW;EAC1C,WACE,UAAU,YAAY,IAAI,EACxB,WAAW;GACT,WAAW,OAAO,KAAK,WAAW,QAAQ;GAC1C,MAAM,SAAS;GACf,kBAAkB;EACpB,EACF,CAAC;EACH,OAAO;CACT,CAAC;CAED,IACE,EAAE,sBAAsB,wBACxB,EAAE,WAAW,oBAAoB,iCAEjC,OAAO,OAAO,OAAO,KAAK,IAAI,sBAAsB,EAAE,SAAS,qCAAqC,CAAC,CAAC;CAGxG,MAAM,EAAE,WAAW,gBAAgB,mBAAmB,eAAe,WAAW;CAEhF,IAAI,CAAC,YACH,OAAO,OAAO,OAAO,KAAK,IAAI,kBAAkB,EAAE,SAAS,wCAAwC,CAAC,CAAC;CAGvG,OAAO;EACL,WAAW,UAAU,KAAK,IAAI,WAAW,UAAU,CAAC;EACpD,WAAW,OAAO,KAAK,SAAS;EAChC,gBAAgB,OAAO,KAAK,cAAc;EAC1C,mBAAmB,OAAO,KAAK,iBAAiB;CAClD;AACF,CAAC;AAEH,IAAM,UAAuD,cAAc,KACzE,UAAU,YACR,OAAO,WAAW,aAAa;CAE7B,MAAM,mBAAkB,OADF,WAAW,IAAI,mBAAmB,MAAM,EAAA,CAC/B,SAAS,SAAS;CACjD,UAAU,iBAAiB,iCAA8B;EAAA,YAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA,CAAA,mBAAA,iCAAA;CAAA,CAAC;CAE1D,MAAM,EAAE,WAAW,gBAAgB,cAAc,OAAO,OAAO,WAAW;EACxE,WAAW,gBAAgB,yBAAyB;EACpD,OAAO,kBAAkB,KAAK,EAAE,SAAS,0CAA0C,CAAC;CACtF,CAAC;CAED,MAAM,YAAY,OAAO,MAAM,MAAM,cAAc,uBAAuB,CAAC,CAAC,CAAC,KAC3E,MAAM,KAAK,YAAY,gBAAgB,SAAS,CAAC,GACjD,MAAM,aAAa,aAAa,SAAS,CAAC,CAC5C;CAGA,OAAO,OAAO,WAAW;EACvB,WACE,gBAAgB,gBACd,EAAE,UAAU;GAAE,GAAG;GAAW;GAAW;EAAe,EAAE,GACxD,EAAE,SAAS,6BAA6B,CAC1C;EACF,OAAO,qBAAqB,KAAK;CACnC,CAAC;AACH,CAAC,CACH,CACF;AAIA,IAAM,+BAA+B"}
@@ -0,0 +1,24 @@
1
+ import { h as RedeemToken } from "./chunk-operations.mjs";
2
+ import { ClientCapabilities } from "./types.mjs";
3
+ import { Capability } from "@dxos/app-framework";
4
+ import { Operation } from "@dxos/compute";
5
+ import * as Effect from "effect/Effect";
6
+ import { invariant } from "@dxos/invariant";
7
+ //#region src/operations/redeem-token.ts
8
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/operations/redeem-token.ts";
9
+ var handler = RedeemToken.pipe(Operation.withHandler(Effect.fnUntraced(function* (data) {
10
+ const client = yield* Capability.get(ClientCapabilities.Client);
11
+ invariant(client.services.services.IdentityService, "IdentityService not available", {
12
+ "~LogMeta": "~LogMeta",
13
+ F: __dxlog_file,
14
+ L: 18,
15
+ S: this,
16
+ A: ["client.services.services.IdentityService", "'IdentityService not available'"]
17
+ });
18
+ yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({ token: data.token }, { timeout: RECOVER_IDENTITY_RPC_TIMEOUT }));
19
+ })));
20
+ var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
21
+ //#endregion
22
+ export { handler as default };
23
+
24
+ //# sourceMappingURL=chunk-redeem-token.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-redeem-token.mjs","names":[],"sources":["../../src/operations/redeem-token.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '../types';\nimport { RedeemToken } from './definitions';\n\nconst handler: Operation.WithHandler<typeof RedeemToken> = RedeemToken.pipe(\n Operation.withHandler(\n 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\nexport default handler;\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n"],"mappings":";;;;;;;;AAaA,IAAM,UAAqD,YAAY,KACrE,UAAU,YACR,OAAO,WAAW,WAAW,MAAM;CACjC,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAC9D,UAAU,OAAO,SAAS,SAAS,iBAAiB,iCAA8B;EAAA,YAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA,CAAA,4CAAA,iCAAA;CAAA,CAAC;CACnF,OAAO,OAAO,cACZ,OAAO,SAAS,SAAS,gBAAiB,gBACxC,EAAE,OAAO,KAAK,MAAM,GACpB,EAAE,SAAS,6BAA6B,CAC1C,CACF;AACF,CAAC,CACH,CACF;AAIA,IAAM,+BAA+B"}
@@ -0,0 +1,37 @@
1
+ import { Capabilities, Capability } from "@dxos/app-framework";
2
+ import { ClientCapabilities } from "#types";
3
+ import * as Effect from "effect/Effect";
4
+ import * as Option from "effect/Option";
5
+ import { RemoteTraceMonitor } from "@dxos/compute-runtime";
6
+ import * as Stream from "effect/Stream";
7
+ //#region src/capabilities/remote-trace-monitor.ts
8
+ /**
9
+ * Contributes a swarm-backed {@link Capabilities.RemoteTraceMonitor} (DX-1125). Remote runtimes
10
+ * (edge intrinsics / function-invoker) broadcast their ephemeral trace messages over the space swarm;
11
+ * this monitor subscribes via the client's network service and decodes them so the aggregate
12
+ * {@link Process.Monitor.subscribeToTraceMessages} surfaces remote progress.
13
+ *
14
+ * The client is resolved lazily inside the subscribe closure (invoked only when a consumer
15
+ * subscribes, well after `ClientReady`), so this module can be collected at `SetupProcessManager`
16
+ * before the client capability exists.
17
+ */
18
+ var remote_trace_monitor_default = Capability.makeModule(Effect.fnUntraced(function* () {
19
+ const capabilityManager = yield* Capability.Service;
20
+ const monitor = RemoteTraceMonitor.createSwarmRemoteTraceMonitor({ subscribe: (tags) => tags.length === 0 ? Stream.empty : Stream.unwrap(Effect.sync(() => {
21
+ const client = capabilityManager.getAll(ClientCapabilities.Client)[0];
22
+ if (!client) return Stream.empty;
23
+ const peer = { peerKey: client.halo.device?.deviceKey.toHex() ?? client.halo.identity.get()?.identityKey.toHex() ?? "" };
24
+ return client.services.rpc.NetworkService.subscribeMessages({
25
+ peer,
26
+ tags
27
+ }).pipe(Stream.filterMap((message) => message.payload?.value ? Option.some({
28
+ payload: message.payload.value,
29
+ tags: message.tags
30
+ }) : Option.none()), Stream.catchAll(() => Stream.empty));
31
+ })) });
32
+ return Capability.contributes(Capabilities.RemoteTraceMonitor, monitor);
33
+ }));
34
+ //#endregion
35
+ export { remote_trace_monitor_default as default };
36
+
37
+ //# sourceMappingURL=chunk-remote-trace-monitor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-remote-trace-monitor.mjs","names":[],"sources":["../../src/capabilities/remote-trace-monitor.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport * as Stream from 'effect/Stream';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { RemoteTraceMonitor } from '@dxos/compute-runtime';\n\nimport { ClientCapabilities } from '#types';\n\n/**\n * Contributes a swarm-backed {@link Capabilities.RemoteTraceMonitor} (DX-1125). Remote runtimes\n * (edge intrinsics / function-invoker) broadcast their ephemeral trace messages over the space swarm;\n * this monitor subscribes via the client's network service and decodes them so the aggregate\n * {@link Process.Monitor.subscribeToTraceMessages} surfaces remote progress.\n *\n * The client is resolved lazily inside the subscribe closure (invoked only when a consumer\n * subscribes, well after `ClientReady`), so this module can be collected at `SetupProcessManager`\n * before the client capability exists.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const capabilityManager = yield* Capability.Service;\n\n const monitor = RemoteTraceMonitor.createSwarmRemoteTraceMonitor({\n subscribe: (tags) =>\n // Empty tag set matches nothing (avoids a firehose) — skip the subscription entirely.\n tags.length === 0\n ? Stream.empty\n : Stream.unwrap(\n Effect.sync(() => {\n const client = capabilityManager.getAll(ClientCapabilities.Client)[0];\n if (!client) {\n return Stream.empty;\n }\n // The subscribing peer is nominal for broadcasts: the edge keys the subscription off\n // the WebSocket connection, not this object; it only affects point-to-point filtering.\n const peer = {\n peerKey:\n client.halo.device?.deviceKey.toHex() ?? client.halo.identity.get()?.identityKey.toHex() ?? '',\n };\n return client.services.rpc.NetworkService.subscribeMessages({ peer, tags }).pipe(\n // Carry the envelope tags with the payload — the wire payload drops ref meta\n // (`trigger`), and decode restores it from the tags for cancel addressing.\n Stream.filterMap((message) =>\n message.payload?.value\n ? Option.some({ payload: message.payload.value, tags: message.tags })\n : Option.none(),\n ),\n // Never fail the aggregate monitor stream on a transient network error.\n Stream.catchAll(() => Stream.empty),\n );\n }),\n ),\n });\n\n return Capability.contributes(Capabilities.RemoteTraceMonitor, monitor);\n }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,IAAA,+BAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,MAAM,oBAAoB,OAAO,WAAW;CAE5C,MAAM,UAAU,mBAAmB,8BAA8B,EAC/D,YAAY,SAEV,KAAK,WAAW,IACZ,OAAO,QACP,OAAO,OACL,OAAO,WAAW;EAChB,MAAM,SAAS,kBAAkB,OAAO,mBAAmB,MAAM,CAAC,CAAC;EACnE,IAAI,CAAC,QACH,OAAO,OAAO;EAIhB,MAAM,OAAO,EACX,SACE,OAAO,KAAK,QAAQ,UAAU,MAAM,KAAK,OAAO,KAAK,SAAS,IAAI,CAAC,EAAE,YAAY,MAAM,KAAK,GAChG;EACA,OAAO,OAAO,SAAS,IAAI,eAAe,kBAAkB;GAAE;GAAM;EAAK,CAAC,CAAC,CAAC,KAG1E,OAAO,WAAW,YAChB,QAAQ,SAAS,QACb,OAAO,KAAK;GAAE,SAAS,QAAQ,QAAQ;GAAO,MAAM,QAAQ;EAAK,CAAC,IAClE,OAAO,KAAK,CAClB,GAEA,OAAO,eAAe,OAAO,KAAK,CACpC;CACF,CAAC,CACH,EACR,CAAC;CAED,OAAO,WAAW,YAAY,aAAa,oBAAoB,OAAO;AACxE,CAAC,CACH"}
@@ -0,0 +1,17 @@
1
+ import { g as ResetStorage } from "./chunk-operations.mjs";
2
+ import { r as RESET_DIALOG } from "./chunk-constants.mjs";
3
+ import { Operation } from "@dxos/compute";
4
+ import { LayoutOperation } from "@dxos/app-toolkit";
5
+ import * as Effect from "effect/Effect";
6
+ //#region src/operations/reset-storage.ts
7
+ var handler = ResetStorage.pipe(Operation.withHandler(Effect.fnUntraced(function* (data) {
8
+ yield* Operation.invoke(LayoutOperation.UpdateDialog, {
9
+ subject: RESET_DIALOG,
10
+ blockAlign: "start",
11
+ props: { mode: data.mode ?? "reset-storage" }
12
+ });
13
+ })));
14
+ //#endregion
15
+ export { handler as default };
16
+
17
+ //# sourceMappingURL=chunk-reset-storage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-reset-storage.mjs","names":[],"sources":["../../src/operations/reset-storage.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { RESET_DIALOG } from '../constants';\nimport { ResetStorage } from './definitions';\n\nconst handler: Operation.WithHandler<typeof ResetStorage> = ResetStorage.pipe(\n Operation.withHandler(\n 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\nexport default handler;\n"],"mappings":";;;;;;AAYA,IAAM,UAAsD,aAAa,KACvE,UAAU,YACR,OAAO,WAAW,WAAW,MAAM;CACjC,OAAO,UAAU,OAAO,gBAAgB,cAAc;EACpD,SAAS;EACT,YAAY;EACZ,OAAO,EACL,MAAM,KAAK,QAAQ,gBACrB;CACF,CAAC;AACH,CAAC,CACH,CACF"}
@@ -0,0 +1,32 @@
1
+ import { ClientCapabilities } from "./types.mjs";
2
+ import { Capability } from "@dxos/app-framework";
3
+ import { Position } from "@dxos/util";
4
+ import { Operation } from "@dxos/compute";
5
+ import { AppCapabilities, AppSpace, NavigationOperation } from "@dxos/app-toolkit";
6
+ import * as Effect from "effect/Effect";
7
+ import { Database, EID } from "@dxos/echo";
8
+ //#region src/operations/resolve-navigation-targets.ts
9
+ var handler = NavigationOperation.ResolveNavigationTargets.pipe(Operation.withHandler(Effect.fn(function* ({ query }) {
10
+ const capabilities = yield* Capability.Service;
11
+ const client = yield* Capability.get(ClientCapabilities.Client).pipe(Effect.catchAll(() => Effect.succeed(void 0)));
12
+ const eid = query?.uri ? EID.tryParse(query.uri) : void 0;
13
+ const spaceId = eid ? EID.getSpaceId(eid) : void 0;
14
+ const space = client ? spaceId ? client.spaces.get(spaceId) : AppSpace.getActiveSpace(client, capabilities) : void 0;
15
+ if (!space) return { targets: [] };
16
+ const resolvers = capabilities.getAll(AppCapabilities.NavigationTargetResolver);
17
+ const results = yield* Effect.forEach(resolvers, (resolver) => resolver(query).pipe(Effect.catchAll(() => Effect.succeed([])))).pipe(Effect.provide(Database.layer(space.db)));
18
+ const seen = /* @__PURE__ */ new Set();
19
+ return { targets: results.flat().sort(Position.compare).filter(({ path }) => {
20
+ if (seen.has(path)) return false;
21
+ seen.add(path);
22
+ return true;
23
+ }).map(({ path, label, type }) => ({
24
+ path,
25
+ label,
26
+ type
27
+ })) };
28
+ })));
29
+ //#endregion
30
+ export { handler as default };
31
+
32
+ //# sourceMappingURL=chunk-resolve-navigation-targets.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-resolve-navigation-targets.mjs","names":[],"sources":["../../src/operations/resolve-navigation-targets.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, AppSpace, NavigationOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { Database, EID } from '@dxos/echo';\nimport { Position } from '@dxos/util';\n\nimport { ClientCapabilities } from '../types';\n\nconst handler: Operation.WithHandler<typeof NavigationOperation.ResolveNavigationTargets> =\n NavigationOperation.ResolveNavigationTargets.pipe(\n Operation.withHandler(\n Effect.fn(function* ({ query }) {\n const capabilities = yield* Capability.Service;\n const client = yield* Capability.get(ClientCapabilities.Client).pipe(\n Effect.catchAll(() => Effect.succeed(undefined)),\n );\n\n // Resolvers read a space database to derive a navigation path, so this handler lives with the\n // client: it is the only place that can turn a URI's space id into a database to provide. When\n // the query names a space that is not available, resolve nothing — falling back to the active\n // space would resolve the id against the wrong database (a ref can reach across spaces). The\n // active space serves only space-less queries (`dxn:` URIs, local EIDs, no query).\n const eid = query?.uri ? EID.tryParse(query.uri) : undefined;\n const spaceId = eid ? EID.getSpaceId(eid) : undefined;\n const space = client\n ? spaceId\n ? client.spaces.get(spaceId)\n : AppSpace.getActiveSpace(client, capabilities)\n : undefined;\n\n // Resolvers require `Database.Service`, and an unbound service is a defect rather than a failure\n // (so the `catchAll` below would not contain it) — with no space to derive a database from there\n // is nothing to resolve against, so skip them entirely.\n if (!space) {\n return { targets: [] };\n }\n\n const resolvers = capabilities.getAll(AppCapabilities.NavigationTargetResolver);\n const results = yield* Effect.forEach(resolvers, (resolver) =>\n resolver(query).pipe(Effect.catchAll(() => Effect.succeed([]))),\n ).pipe(Effect.provide(Database.layer(space.db)));\n\n // Best-first, as the operation's output promises. Sort is stable, so resolvers that declare no\n // position keep contribution order; `position` itself is resolver metadata and not returned.\n // Two resolvers can name the same path (the generic type-section lookup and a type's own\n // resolver), so paths are deduped keeping the best-placed occurrence.\n const seen = new Set<string>();\n return {\n targets: results\n .flat()\n .sort(Position.compare)\n .filter(({ path }) => {\n if (seen.has(path)) {\n return false;\n }\n seen.add(path);\n return true;\n })\n .map(({ path, label, type }) => ({ path, label, type })),\n };\n }),\n ),\n );\n\nexport default handler;\n"],"mappings":";;;;;;;;AAcA,IAAM,UACJ,oBAAoB,yBAAyB,KAC3C,UAAU,YACR,OAAO,GAAG,WAAW,EAAE,SAAS;CAC9B,MAAM,eAAe,OAAO,WAAW;CACvC,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM,CAAC,CAAC,KAC9D,OAAO,eAAe,OAAO,QAAQ,KAAA,CAAS,CAAC,CACjD;CAOA,MAAM,MAAM,OAAO,MAAM,IAAI,SAAS,MAAM,GAAG,IAAI,KAAA;CACnD,MAAM,UAAU,MAAM,IAAI,WAAW,GAAG,IAAI,KAAA;CAC5C,MAAM,QAAQ,SACV,UACE,OAAO,OAAO,IAAI,OAAO,IACzB,SAAS,eAAe,QAAQ,YAAY,IAC9C,KAAA;CAKJ,IAAI,CAAC,OACH,OAAO,EAAE,SAAS,CAAC,EAAE;CAGvB,MAAM,YAAY,aAAa,OAAO,gBAAgB,wBAAwB;CAC9E,MAAM,UAAU,OAAO,OAAO,QAAQ,YAAY,aAChD,SAAS,KAAK,CAAC,CAAC,KAAK,OAAO,eAAe,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAChE,CAAC,CAAC,KAAK,OAAO,QAAQ,SAAS,MAAM,MAAM,EAAE,CAAC,CAAC;CAM/C,MAAM,uBAAO,IAAI,IAAY;CAC7B,OAAO,EACL,SAAS,QACN,KAAK,CAAA,CACL,KAAK,SAAS,OAAO,CAAA,CACrB,QAAQ,EAAE,WAAW;EACpB,IAAI,KAAK,IAAI,IAAI,GACf,OAAO;EAET,KAAK,IAAI,IAAI;EACb,OAAO;CACT,CAAC,CAAA,CACA,KAAK,EAAE,MAAM,OAAO,YAAY;EAAE;EAAM;EAAO;CAAK,EAAE,EAC3D;AACF,CAAC,CACH,CACF"}
@@ -0,0 +1,53 @@
1
+ import { Capabilities, Capability } from "@dxos/app-framework";
2
+ import { AppCapabilities } from "@dxos/app-toolkit";
3
+ import { ClientCapabilities } from "#types";
4
+ import * as Effect from "effect/Effect";
5
+ import { log } from "@dxos/log";
6
+ import { Type } from "@dxos/echo";
7
+ //#region src/capabilities/schema-defs.ts
8
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/schema-defs.ts";
9
+ var schema_defs_default = Capability.makeModule(Effect.fnUntraced(function* () {
10
+ const registry = yield* Capability.get(Capabilities.AtomRegistry);
11
+ const client = yield* Capability.get(ClientCapabilities.Client);
12
+ const schemasAtom = yield* Capability.atom(AppCapabilities.Schema);
13
+ let previousDxns = /* @__PURE__ */ new Set();
14
+ const cancel = registry.subscribe(schemasAtom, async (schemas) => {
15
+ const seenSchemaDxns = /* @__PURE__ */ new Set();
16
+ const batch = [];
17
+ for (const schema of schemas.flat()) {
18
+ const uri = Type.getURI(schema);
19
+ if (!uri) {
20
+ log.warn("skipping schema without uri", void 0, {
21
+ "~LogMeta": "~LogMeta",
22
+ F: __dxlog_file,
23
+ L: 30,
24
+ S: this
25
+ });
26
+ continue;
27
+ }
28
+ const key = uri.toString();
29
+ if (seenSchemaDxns.has(key)) {
30
+ log("skipping duplicate schema for echo registration", { uri: key }, {
31
+ "~LogMeta": "~LogMeta",
32
+ F: __dxlog_file,
33
+ L: 36,
34
+ S: this
35
+ });
36
+ continue;
37
+ }
38
+ seenSchemaDxns.add(key);
39
+ batch.push({
40
+ schema,
41
+ dxnKey: key
42
+ });
43
+ }
44
+ const toRegister = batch.filter(({ dxnKey }) => !previousDxns.has(dxnKey));
45
+ await client.addTypes(toRegister.map(({ schema }) => schema));
46
+ for (const { dxnKey } of toRegister) previousDxns.add(dxnKey);
47
+ }, { immediate: true });
48
+ return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));
49
+ }));
50
+ //#endregion
51
+ export { schema_defs_default as default };
52
+
53
+ //# sourceMappingURL=chunk-schema-defs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-schema-defs.mjs","names":[],"sources":["../../src/capabilities/schema-defs.ts"],"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 } from '@dxos/echo';\nimport { log } from '@dxos/log';\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 previousDxns = new Set<string>();\n const cancel = registry.subscribe(\n schemasAtom,\n async (schemas) => {\n const seenSchemaDxns = new Set<string>();\n const batch: { schema: Type.AnyEntity; dxnKey: string }[] = [];\n for (const schema of schemas.flat()) {\n const uri = Type.getURI(schema);\n if (!uri) {\n log.warn('skipping schema without uri');\n continue;\n }\n\n const key = uri.toString();\n if (seenSchemaDxns.has(key)) {\n log('skipping duplicate schema for echo registration', { uri: key });\n continue;\n }\n\n seenSchemaDxns.add(key);\n batch.push({ schema, dxnKey: key });\n }\n\n const toRegister = batch.filter(({ dxnKey }) => !previousDxns.has(dxnKey));\n\n await client.addTypes(toRegister.map(({ schema }) => schema));\n for (const { dxnKey } of toRegister) {\n previousDxns.add(dxnKey);\n }\n },\n { immediate: true },\n );\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));\n }),\n);\n"],"mappings":";;;;;;;;AAaA,IAAA,sBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,MAAM,WAAW,OAAO,WAAW,IAAI,aAAa,YAAY;CAChE,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAC9D,MAAM,cAAc,OAAO,WAAW,KAAK,gBAAgB,MAAM;CAGjE,IAAI,+BAAe,IAAI,IAAY;CACnC,MAAM,SAAS,SAAS,UACtB,aACA,OAAO,YAAY;EACjB,MAAM,iCAAiB,IAAI,IAAY;EACvC,MAAM,QAAsD,CAAC;EAC7D,KAAK,MAAM,UAAU,QAAQ,KAAK,GAAG;GACnC,MAAM,MAAM,KAAK,OAAO,MAAM;GAC9B,IAAI,CAAC,KAAK;IACR,IAAI,KAAK,+BAA4B,KAAA,GAAA;KAAA,YAAA;KAAA,GAAA;KAAA,GAAA;KAAA,GAAA;IAAA,CAAC;IACtC;GACF;GAEA,MAAM,MAAM,IAAI,SAAS;GACzB,IAAI,eAAe,IAAI,GAAG,GAAG;IAC3B,IAAI,mDAAmD,EAAE,KAAK,IAAI,GAAA;KAAA,YAAA;KAAA,GAAA;KAAA,GAAA;KAAA,GAAA;IAAA,CAAC;IACnE;GACF;GAEA,eAAe,IAAI,GAAG;GACtB,MAAM,KAAK;IAAE;IAAQ,QAAQ;GAAI,CAAC;EACpC;EAEA,MAAM,aAAa,MAAM,QAAQ,EAAE,aAAa,CAAC,aAAa,IAAI,MAAM,CAAC;EAEzE,MAAM,OAAO,SAAS,WAAW,KAAK,EAAE,aAAa,MAAM,CAAC;EAC5D,KAAK,MAAM,EAAE,YAAY,YACvB,aAAa,IAAI,MAAM;CAE3B,GACA,EAAE,WAAW,KAAK,CACpB;CAEA,OAAO,WAAW,YAAY,aAAa,MAAM,YAAY,OAAO,WAAW,OAAO,CAAC,CAAC;AAC1F,CAAC,CACH"}
@@ -0,0 +1,16 @@
1
+ import { _ as ShareIdentity } from "./chunk-operations.mjs";
2
+ import { Account } from "./types.mjs";
3
+ import { Operation } from "@dxos/compute";
4
+ import { GraphPath, LayoutOperation } from "@dxos/app-toolkit";
5
+ import * as Effect from "effect/Effect";
6
+ import { ObservabilityOperation } from "@dxos/plugin-observability";
7
+ //#region src/operations/share-identity.ts
8
+ var handler = ShareIdentity.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
9
+ yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: GraphPath.getSpacePath(Account.id) });
10
+ yield* Operation.invoke(LayoutOperation.Open, { subject: [GraphPath.getSpacePath(Account.id, Account.Profile)] });
11
+ yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: "identity.share" });
12
+ })));
13
+ //#endregion
14
+ export { handler as default };
15
+
16
+ //# sourceMappingURL=chunk-share-identity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-share-identity.mjs","names":[],"sources":["../../src/operations/share-identity.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { GraphPath, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { ObservabilityOperation } from '@dxos/plugin-observability';\n\nimport { Account } from '../types';\nimport { ShareIdentity } from './definitions';\n\nconst handler: Operation.WithHandler<typeof ShareIdentity> = ShareIdentity.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: GraphPath.getSpacePath(Account.id) });\n yield* Operation.invoke(LayoutOperation.Open, {\n subject: [GraphPath.getSpacePath(Account.id, Account.Profile)],\n });\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.share' });\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;;AAaA,IAAM,UAAuD,cAAc,KACzE,UAAU,YACR,OAAO,WAAW,aAAa;CAC7B,OAAO,UAAU,OAAO,gBAAgB,iBAAiB,EAAE,SAAS,UAAU,aAAa,QAAQ,EAAE,EAAE,CAAC;CACxG,OAAO,UAAU,OAAO,gBAAgB,MAAM,EAC5C,SAAS,CAAC,UAAU,aAAa,QAAQ,IAAI,QAAQ,OAAO,CAAC,EAC/D,CAAC;CACD,OAAO,UAAU,SAAS,uBAAuB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACxF,CAAC,CACH,CACF"}
@@ -0,0 +1,94 @@
1
+ import { n as createSpaceReplicationProgressKey, t as createSpaceFeedReplicationProgressKey } from "./chunk-progress.mjs";
2
+ import { Capabilities, Capability } from "@dxos/app-framework";
3
+ import { ServiceResolver } from "@dxos/compute";
4
+ import { AppCapabilities } from "@dxos/app-toolkit";
5
+ import { ClientCapabilities } from "#types";
6
+ import * as Effect from "effect/Effect";
7
+ import { Database } from "@dxos/echo";
8
+ import * as Stream from "effect/Stream";
9
+ import * as Fiber from "effect/Fiber";
10
+ import { SpaceState } from "@dxos/client/echo";
11
+ //#region src/capabilities/space-replication-progress.ts
12
+ /**
13
+ * Publishes per-space replication backlog — automerge documents and ECHO feed blocks — into the
14
+ * {@link AppCapabilities.ProgressRegistry}. Subscribes to the combined sync-state stream and drops
15
+ * monitors once a space catches up.
16
+ */
17
+ var space_replication_progress_default = Capability.makeModule(Effect.fnUntraced(function* () {
18
+ const client = yield* Capability.get(ClientCapabilities.Client);
19
+ const registry = yield* Capability.get(AppCapabilities.ProgressRegistry);
20
+ const processManagerRuntime = yield* Capability.get(Capabilities.ProcessManagerRuntime);
21
+ const monitors = /* @__PURE__ */ new Map();
22
+ yield* Effect.addFinalizer(() => Effect.sync(() => {
23
+ for (const monitor of monitors.values()) monitor.remove();
24
+ monitors.clear();
25
+ }));
26
+ const applyMonitor = (key, update) => {
27
+ if (update === void 0) {
28
+ monitors.get(key)?.remove();
29
+ monitors.delete(key);
30
+ return;
31
+ }
32
+ let monitor = monitors.get(key);
33
+ if (!monitor) {
34
+ monitor = registry.register(key, {
35
+ label: update.label,
36
+ total: update.total
37
+ });
38
+ monitors.set(key, monitor);
39
+ }
40
+ monitor.set(update.current);
41
+ monitor.total(update.total);
42
+ if (update.note !== void 0) monitor.note(update.note);
43
+ };
44
+ const getSpaceName = (space) => space.state.get() === SpaceState.SPACE_READY ? space.properties.name : void 0;
45
+ const runtime = yield* Effect.runtime();
46
+ const subscribeSpace = (space) => void Effect.gen(function* () {
47
+ const fiber = processManagerRuntime.runFork(Database.subscribeToSyncState().pipe(Stream.runForEach(Effect.fnUntraced(function* (state) {
48
+ const name = getSpaceName(space);
49
+ applyMonitor(createSpaceReplicationProgressKey(space.id), toDocumentUpdate(name, state));
50
+ applyMonitor(createSpaceFeedReplicationProgressKey(space.id), toFeedUpdate(name, state));
51
+ })), Effect.provide(ServiceResolver.provide({ space: space.id }, Database.Service))));
52
+ yield* Effect.addFinalizer(() => Fiber.interrupt(fiber));
53
+ }).pipe(Effect.provide(runtime), Effect.runFork);
54
+ const spacesSubscription = client.spaces.subscribe((spaces) => {
55
+ for (const space of spaces) subscribeSpace(space);
56
+ });
57
+ yield* Effect.addFinalizer(() => Effect.sync(() => spacesSubscription.unsubscribe()));
58
+ for (const space of client.spaces.get()) subscribeSpace(space);
59
+ }));
60
+ /** Derives the automerge document monitor state, or `undefined` when caught up. */
61
+ var toDocumentUpdate = (name, state) => {
62
+ const unsynced = state.unsyncedDocumentCount;
63
+ if (unsynced === 0) return;
64
+ const total = state.totalDocumentCount > 0 ? state.totalDocumentCount : unsynced;
65
+ return {
66
+ label: getSpaceProgressLabel(name ?? "Space", "CRDTs"),
67
+ current: Math.max(0, total - unsynced),
68
+ total
69
+ };
70
+ };
71
+ /** Derives the ECHO feed block monitor state, or `undefined` when caught up. */
72
+ var toFeedUpdate = (name, state) => {
73
+ const blocksToPull = Number(state.blocksToPull);
74
+ const blocksToPush = Number(state.blocksToPush);
75
+ const pending = blocksToPull + blocksToPush;
76
+ if (pending === 0) return;
77
+ const totalBlocks = Number(state.totalBlocks);
78
+ const total = totalBlocks > 0 ? totalBlocks : pending;
79
+ return {
80
+ label: getSpaceProgressLabel(name ?? "Space", "Feeds"),
81
+ current: Math.max(0, total - pending),
82
+ total,
83
+ note: `↓${blocksToPull} ↑${blocksToPush}`
84
+ };
85
+ };
86
+ /** Human label for a space progress monitor. */
87
+ var getSpaceProgressLabel = (name, suffix) => {
88
+ const name_ = name ?? "Space";
89
+ return suffix ? `${name_} · ${suffix}` : name_;
90
+ };
91
+ //#endregion
92
+ export { space_replication_progress_default as default };
93
+
94
+ //# sourceMappingURL=chunk-space-replication-progress.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-space-replication-progress.mjs","names":[],"sources":["../../src/capabilities/space-replication-progress.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Fiber from 'effect/Fiber';\nimport * as Scope from 'effect/Scope';\nimport * as Stream from 'effect/Stream';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\nimport { type Space, SpaceState } from '@dxos/client/echo';\nimport { ServiceResolver } from '@dxos/compute';\nimport { Database } from '@dxos/echo';\n\nimport { ClientCapabilities } from '#types';\n\nimport { createSpaceFeedReplicationProgressKey, createSpaceReplicationProgressKey } from '../progress';\n\ntype MonitorUpdate = {\n readonly label: string;\n readonly current: number;\n readonly total: number;\n readonly note?: string;\n};\n\n/**\n * Publishes per-space replication backlog — automerge documents and ECHO feed blocks — into the\n * {@link AppCapabilities.ProgressRegistry}. Subscribes to the combined sync-state stream and drops\n * monitors once a space catches up.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const registry = yield* Capability.get(AppCapabilities.ProgressRegistry);\n const processManagerRuntime = yield* Capability.get(Capabilities.ProcessManagerRuntime);\n\n const monitors = new Map<string, AppCapabilities.ProgressMonitor>();\n\n yield* Effect.addFinalizer(() =>\n Effect.sync(() => {\n for (const monitor of monitors.values()) {\n monitor.remove();\n }\n monitors.clear();\n }),\n );\n\n const applyMonitor = (key: string, update: MonitorUpdate | undefined): void => {\n if (update === undefined) {\n monitors.get(key)?.remove();\n monitors.delete(key);\n return;\n }\n\n let monitor = monitors.get(key);\n if (!monitor) {\n monitor = registry.register(key, { label: update.label, total: update.total });\n monitors.set(key, monitor);\n }\n monitor.set(update.current);\n monitor.total(update.total);\n if (update.note !== undefined) {\n monitor.note(update.note);\n }\n };\n\n // A space that has not finished initializing throws from its `properties` getter, and the\n // spaces subscription fires before initialization completes (startup, space creation) — so\n // the name is read lazily per sync-state update, and only once the space is SPACE_READY.\n const getSpaceName = (space: Space): string | undefined =>\n space.state.get() === SpaceState.SPACE_READY ? space.properties.name : undefined;\n\n const runtime = yield* Effect.runtime<Scope.Scope>();\n const subscribeSpace = (space: Space): void =>\n void Effect.gen(function* () {\n const fiber = processManagerRuntime.runFork(\n Database.subscribeToSyncState().pipe(\n Stream.runForEach(\n Effect.fnUntraced(function* (state) {\n const name = getSpaceName(space);\n applyMonitor(createSpaceReplicationProgressKey(space.id), toDocumentUpdate(name, state));\n applyMonitor(createSpaceFeedReplicationProgressKey(space.id), toFeedUpdate(name, state));\n }),\n ),\n Effect.provide(ServiceResolver.provide({ space: space.id }, Database.Service)),\n ),\n );\n\n yield* Effect.addFinalizer(() => Fiber.interrupt(fiber));\n }).pipe(Effect.provide(runtime), Effect.runFork);\n\n const spacesSubscription = client.spaces.subscribe((spaces) => {\n for (const space of spaces) {\n subscribeSpace(space);\n }\n });\n yield* Effect.addFinalizer(() => Effect.sync(() => spacesSubscription.unsubscribe()));\n for (const space of client.spaces.get()) {\n subscribeSpace(space);\n }\n }),\n);\n\n/** Derives the automerge document monitor state, or `undefined` when caught up. */\nconst toDocumentUpdate = (name: string | undefined, state: Database.SyncState): MonitorUpdate | undefined => {\n const unsynced = state.unsyncedDocumentCount;\n if (unsynced === 0) {\n return undefined;\n }\n\n const total = state.totalDocumentCount > 0 ? state.totalDocumentCount : unsynced;\n return {\n label: getSpaceProgressLabel(name ?? 'Space', 'CRDTs'),\n current: Math.max(0, total - unsynced),\n total,\n };\n};\n\n/** Derives the ECHO feed block monitor state, or `undefined` when caught up. */\nconst toFeedUpdate = (name: string | undefined, state: Database.SyncState): MonitorUpdate | undefined => {\n const blocksToPull = Number(state.blocksToPull);\n const blocksToPush = Number(state.blocksToPush);\n const pending = blocksToPull + blocksToPush;\n if (pending === 0) {\n return undefined;\n }\n\n const totalBlocks = Number(state.totalBlocks);\n const total = totalBlocks > 0 ? totalBlocks : pending;\n return {\n label: getSpaceProgressLabel(name ?? 'Space', 'Feeds'),\n current: Math.max(0, total - pending),\n total,\n note: `↓${blocksToPull} ↑${blocksToPush}`,\n };\n};\n\n/** Human label for a space progress monitor. */\nconst getSpaceProgressLabel = (name: string | undefined, suffix?: string): string => {\n const name_ = name ?? 'Space';\n return suffix ? `${name_} · ${suffix}` : name_;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA+BA,IAAA,qCAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAC9D,MAAM,WAAW,OAAO,WAAW,IAAI,gBAAgB,gBAAgB;CACvE,MAAM,wBAAwB,OAAO,WAAW,IAAI,aAAa,qBAAqB;CAEtF,MAAM,2BAAW,IAAI,IAA6C;CAElE,OAAO,OAAO,mBACZ,OAAO,WAAW;EAChB,KAAK,MAAM,WAAW,SAAS,OAAO,GACpC,QAAQ,OAAO;EAEjB,SAAS,MAAM;CACjB,CAAC,CACH;CAEA,MAAM,gBAAgB,KAAa,WAA4C;EAC7E,IAAI,WAAW,KAAA,GAAW;GACxB,SAAS,IAAI,GAAG,CAAC,EAAE,OAAO;GAC1B,SAAS,OAAO,GAAG;GACnB;EACF;EAEA,IAAI,UAAU,SAAS,IAAI,GAAG;EAC9B,IAAI,CAAC,SAAS;GACZ,UAAU,SAAS,SAAS,KAAK;IAAE,OAAO,OAAO;IAAO,OAAO,OAAO;GAAM,CAAC;GAC7E,SAAS,IAAI,KAAK,OAAO;EAC3B;EACA,QAAQ,IAAI,OAAO,OAAO;EAC1B,QAAQ,MAAM,OAAO,KAAK;EAC1B,IAAI,OAAO,SAAS,KAAA,GAClB,QAAQ,KAAK,OAAO,IAAI;CAE5B;CAKA,MAAM,gBAAgB,UACpB,MAAM,MAAM,IAAI,MAAM,WAAW,cAAc,MAAM,WAAW,OAAO,KAAA;CAEzE,MAAM,UAAU,OAAO,OAAO,QAAqB;CACnD,MAAM,kBAAkB,UACtB,KAAK,OAAO,IAAI,aAAa;EAC3B,MAAM,QAAQ,sBAAsB,QAClC,SAAS,qBAAqB,CAAC,CAAC,KAC9B,OAAO,WACL,OAAO,WAAW,WAAW,OAAO;GAClC,MAAM,OAAO,aAAa,KAAK;GAC/B,aAAa,kCAAkC,MAAM,EAAE,GAAG,iBAAiB,MAAM,KAAK,CAAC;GACvF,aAAa,sCAAsC,MAAM,EAAE,GAAG,aAAa,MAAM,KAAK,CAAC;EACzF,CAAC,CACH,GACA,OAAO,QAAQ,gBAAgB,QAAQ,EAAE,OAAO,MAAM,GAAG,GAAG,SAAS,OAAO,CAAC,CAC/E,CACF;EAEA,OAAO,OAAO,mBAAmB,MAAM,UAAU,KAAK,CAAC;CACzD,CAAC,CAAC,CAAC,KAAK,OAAO,QAAQ,OAAO,GAAG,OAAO,OAAO;CAEjD,MAAM,qBAAqB,OAAO,OAAO,WAAW,WAAW;EAC7D,KAAK,MAAM,SAAS,QAClB,eAAe,KAAK;CAExB,CAAC;CACD,OAAO,OAAO,mBAAmB,OAAO,WAAW,mBAAmB,YAAY,CAAC,CAAC;CACpF,KAAK,MAAM,SAAS,OAAO,OAAO,IAAI,GACpC,eAAe,KAAK;AAExB,CAAC,CACH;;AAGA,IAAM,oBAAoB,MAA0B,UAAyD;CAC3G,MAAM,WAAW,MAAM;CACvB,IAAI,aAAa,GACf;CAGF,MAAM,QAAQ,MAAM,qBAAqB,IAAI,MAAM,qBAAqB;CACxE,OAAO;EACL,OAAO,sBAAsB,QAAQ,SAAS,OAAO;EACrD,SAAS,KAAK,IAAI,GAAG,QAAQ,QAAQ;EACrC;CACF;AACF;;AAGA,IAAM,gBAAgB,MAA0B,UAAyD;CACvG,MAAM,eAAe,OAAO,MAAM,YAAY;CAC9C,MAAM,eAAe,OAAO,MAAM,YAAY;CAC9C,MAAM,UAAU,eAAe;CAC/B,IAAI,YAAY,GACd;CAGF,MAAM,cAAc,OAAO,MAAM,WAAW;CAC5C,MAAM,QAAQ,cAAc,IAAI,cAAc;CAC9C,OAAO;EACL,OAAO,sBAAsB,QAAQ,SAAS,OAAO;EACrD,SAAS,KAAK,IAAI,GAAG,QAAQ,OAAO;EACpC;EACA,MAAM,IAAI,aAAa,IAAI;CAC7B;AACF;;AAGA,IAAM,yBAAyB,MAA0B,WAA4B;CACnF,MAAM,QAAQ,QAAQ;CACtB,OAAO,SAAS,GAAG,MAAM,KAAK,WAAW;AAC3C"}