@dxos/plugin-client 0.10.0 → 0.11.1
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.
- package/dist/lib/ClientPlugin.mjs +65 -0
- package/dist/lib/ClientPlugin.mjs.map +1 -0
- package/dist/lib/ClientPlugin.node.mjs +904 -0
- package/dist/lib/ClientPlugin.node.mjs.map +1 -0
- package/dist/lib/ClientPlugin.workerd.mjs +10 -0
- package/dist/lib/ClientPlugin.workerd.mjs.map +1 -0
- package/dist/lib/capabilities/node.mjs +13 -0
- package/dist/lib/capabilities/node.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +23 -0
- package/dist/lib/capabilities.mjs.map +1 -0
- package/dist/lib/chunk-AccountContainer.mjs +190 -0
- package/dist/lib/chunk-AccountContainer.mjs.map +1 -0
- package/dist/lib/chunk-DevicesContainer.mjs +275 -0
- package/dist/lib/chunk-DevicesContainer.mjs.map +1 -0
- package/dist/lib/chunk-InvitationsContainer.mjs +149 -0
- package/dist/lib/chunk-InvitationsContainer.mjs.map +1 -0
- package/dist/lib/chunk-JoinDialog.mjs +35 -0
- package/dist/lib/chunk-JoinDialog.mjs.map +1 -0
- package/dist/lib/chunk-ProfileContainer.mjs +145 -0
- package/dist/lib/chunk-ProfileContainer.mjs.map +1 -0
- package/dist/lib/chunk-RecoveryCodeDialog.mjs +72 -0
- package/dist/lib/chunk-RecoveryCodeDialog.mjs.map +1 -0
- package/dist/lib/chunk-RecoveryCredentialsContainer.mjs +65 -0
- package/dist/lib/chunk-RecoveryCredentialsContainer.mjs.map +1 -0
- package/dist/lib/chunk-ResetDialog.mjs +47 -0
- package/dist/lib/chunk-ResetDialog.mjs.map +1 -0
- package/dist/lib/chunk-UsageContainer.mjs +217 -0
- package/dist/lib/chunk-UsageContainer.mjs.map +1 -0
- package/dist/lib/{neutral/account-cache-YVQKLNV2.mjs → chunk-account-cache.mjs} +10 -12
- package/dist/lib/chunk-account-cache.mjs.map +1 -0
- package/dist/lib/chunk-app-graph-builder.mjs +111 -0
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -0
- package/dist/lib/chunk-client.mjs +90 -0
- package/dist/lib/chunk-client.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-GSKMAS3S.mjs → chunk-constants.mjs} +5 -8
- package/dist/lib/chunk-constants.mjs.map +1 -0
- package/dist/lib/chunk-create-agent.mjs +23 -0
- package/dist/lib/chunk-create-agent.mjs.map +1 -0
- package/dist/lib/chunk-create-identity.mjs +28 -0
- package/dist/lib/chunk-create-identity.mjs.map +1 -0
- package/dist/lib/chunk-create-passkey.mjs +85 -0
- package/dist/lib/chunk-create-passkey.mjs.map +1 -0
- package/dist/lib/chunk-create-recovery-code.mjs +31 -0
- package/dist/lib/chunk-create-recovery-code.mjs.map +1 -0
- package/dist/lib/chunk-hooks.mjs +29 -0
- package/dist/lib/chunk-hooks.mjs.map +1 -0
- package/dist/lib/chunk-hub-http-client.mjs +14 -0
- package/dist/lib/chunk-hub-http-client.mjs.map +1 -0
- package/dist/lib/chunk-join-identity.mjs +20 -0
- package/dist/lib/chunk-join-identity.mjs.map +1 -0
- package/dist/lib/chunk-layer-specs.mjs +107 -0
- package/dist/lib/chunk-layer-specs.mjs.map +1 -0
- package/dist/lib/{neutral/chunk-6G4KZLBG.mjs → chunk-meta.mjs} +13 -20
- package/dist/lib/chunk-meta.mjs.map +1 -0
- package/dist/lib/chunk-migrations.mjs +29 -0
- package/dist/lib/chunk-migrations.mjs.map +1 -0
- package/dist/lib/chunk-navigation-handler.mjs +71 -0
- package/dist/lib/chunk-navigation-handler.mjs.map +1 -0
- package/dist/lib/chunk-navigation-target-loader.mjs +46 -0
- package/dist/lib/chunk-navigation-target-loader.mjs.map +1 -0
- package/dist/lib/chunk-open-usage.mjs +14 -0
- package/dist/lib/chunk-open-usage.mjs.map +1 -0
- package/dist/lib/chunk-operation-handler.mjs +11 -0
- package/dist/lib/chunk-operation-handler.mjs.map +1 -0
- package/dist/lib/chunk-operations.mjs +212 -0
- package/dist/lib/chunk-operations.mjs.map +1 -0
- package/dist/lib/chunk-progress.mjs +10 -0
- package/dist/lib/chunk-progress.mjs.map +1 -0
- package/dist/lib/chunk-react-context.mjs +30 -0
- package/dist/lib/chunk-react-context.mjs.map +1 -0
- package/dist/lib/chunk-react-surface.mjs +70 -0
- package/dist/lib/chunk-react-surface.mjs.map +1 -0
- package/dist/lib/chunk-recover-identity.mjs +17 -0
- package/dist/lib/chunk-recover-identity.mjs.map +1 -0
- package/dist/lib/chunk-redeem-passkey.mjs +72 -0
- package/dist/lib/chunk-redeem-passkey.mjs.map +1 -0
- package/dist/lib/chunk-redeem-token.mjs +24 -0
- package/dist/lib/chunk-redeem-token.mjs.map +1 -0
- package/dist/lib/chunk-remote-trace-monitor.mjs +37 -0
- package/dist/lib/chunk-remote-trace-monitor.mjs.map +1 -0
- package/dist/lib/chunk-reset-storage.mjs +17 -0
- package/dist/lib/chunk-reset-storage.mjs.map +1 -0
- package/dist/lib/chunk-resolve-navigation-targets.mjs +32 -0
- package/dist/lib/chunk-resolve-navigation-targets.mjs.map +1 -0
- package/dist/lib/chunk-schema-defs.mjs +53 -0
- package/dist/lib/chunk-schema-defs.mjs.map +1 -0
- package/dist/lib/chunk-share-identity.mjs +16 -0
- package/dist/lib/chunk-share-identity.mjs.map +1 -0
- package/dist/lib/chunk-space-replication-progress.mjs +94 -0
- package/dist/lib/chunk-space-replication-progress.mjs.map +1 -0
- package/dist/lib/chunk-trace-progress.mjs +69 -0
- package/dist/lib/chunk-trace-progress.mjs.map +1 -0
- package/dist/lib/chunk-update-profile.mjs +15 -0
- package/dist/lib/chunk-update-profile.mjs.map +1 -0
- package/dist/lib/components.mjs +0 -0
- package/dist/lib/containers.mjs +15 -0
- package/dist/lib/containers.mjs.map +1 -0
- package/dist/lib/index.mjs +27 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/meta.mjs +2 -0
- package/dist/lib/operations.mjs +2 -0
- package/dist/lib/plugin.mjs +9 -0
- package/dist/lib/plugin.mjs.map +1 -0
- package/dist/lib/testing.mjs +21 -0
- package/dist/lib/testing.mjs.map +1 -0
- package/dist/lib/translations.mjs +111 -0
- package/dist/lib/translations.mjs.map +1 -0
- package/dist/lib/types.mjs +139 -0
- package/dist/lib/types.mjs.map +1 -0
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/account-cache.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/client.d.ts +1 -1
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/hub-http-client.d.ts +1 -1
- package/dist/types/src/capabilities/index.d.ts +6 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/layer-specs.d.ts +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +1 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +3 -1
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-target-loader.d.ts +11 -0
- package/dist/types/src/capabilities/navigation-target-loader.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +2 -1
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/react-context.d.ts +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/remote-trace-monitor.d.ts +15 -0
- package/dist/types/src/capabilities/remote-trace-monitor.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs.d.ts +1 -1
- package/dist/types/src/capabilities/space-replication-progress.d.ts +11 -0
- package/dist/types/src/capabilities/space-replication-progress.d.ts.map +1 -0
- package/dist/types/src/capabilities/trace-progress.d.ts +17 -0
- package/dist/types/src/capabilities/trace-progress.d.ts.map +1 -0
- package/dist/types/src/commands/account/login/login.d.ts +2 -1
- package/dist/types/src/commands/account/login/login.d.ts.map +1 -1
- package/dist/types/src/commands/account/logout/logout.d.ts +1 -1
- package/dist/types/src/commands/account/logout/logout.d.ts.map +1 -1
- package/dist/types/src/commands/halo/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/share/share.d.ts.map +1 -1
- package/dist/types/src/commands/profile/create.d.ts.map +1 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts +4 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts.map +1 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts +4 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts +4 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +4 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts +4 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts +4 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts +4 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +4 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts +4 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +4 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts +4 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts +4 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +4 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +4 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +4 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/UsageContainer/UsageContainer.d.ts +4 -5
- package/dist/types/src/containers/UsageContainer/UsageContainer.d.ts.map +1 -1
- package/dist/types/src/containers/UsageContainer/UsageView.d.ts +4 -7
- package/dist/types/src/containers/UsageContainer/UsageView.d.ts.map +1 -1
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts +4 -2
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts.map +1 -1
- package/dist/types/src/halo-services-layer.d.ts +19 -0
- package/dist/types/src/halo-services-layer.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +9 -1
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/errors.d.ts +109 -0
- package/dist/types/src/operations/errors.d.ts.map +1 -0
- package/dist/types/src/operations/errors.test.d.ts +2 -0
- package/dist/types/src/operations/errors.test.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +1 -0
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -1
- package/dist/types/src/operations/resolve-navigation-targets.d.ts +5 -0
- package/dist/types/src/operations/resolve-navigation-targets.d.ts.map +1 -0
- package/dist/types/src/operations/update-profile.d.ts +5 -0
- package/dist/types/src/operations/update-profile.d.ts.map +1 -0
- package/dist/types/src/progress/index.d.ts +2 -0
- package/dist/types/src/progress/index.d.ts.map +1 -0
- package/dist/types/src/progress/progress-keys.d.ts +6 -0
- package/dist/types/src/progress/progress-keys.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +5 -1
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +10 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +6 -0
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +60 -55
- package/src/ClientPlugin.ts +25 -2
- package/src/capabilities/app-graph-builder.ts +1 -1
- package/src/capabilities/client.ts +26 -0
- package/src/capabilities/index.ts +10 -0
- package/src/capabilities/layer-specs.ts +64 -2
- package/src/capabilities/migrations.ts +9 -1
- package/src/capabilities/navigation-handler/navigation-handler.ts +20 -3
- package/src/capabilities/navigation-target-loader.ts +70 -0
- package/src/capabilities/react-context.tsx +20 -2
- package/src/capabilities/{react-surface.tsx → react-surface.ts} +14 -12
- package/src/capabilities/remote-trace-monitor.ts +62 -0
- package/src/capabilities/space-replication-progress.ts +143 -0
- package/src/capabilities/trace-progress.ts +84 -0
- package/src/commands/account/login/login.ts +48 -6
- package/src/commands/account/logout/logout.ts +4 -0
- package/src/commands/halo/index.ts +6 -2
- package/src/commands/halo/share/share.ts +16 -5
- package/src/commands/profile/create.ts +23 -40
- package/src/containers/AccountContainer/AccountContainer.tsx +6 -5
- package/src/containers/DevicesContainer/DevicesContainer.tsx +2 -0
- package/src/containers/InvitationsContainer/InvitationsContainer.tsx +2 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +2 -0
- package/src/containers/ProfileContainer/ProfileContainer.tsx +19 -13
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx +2 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +7 -9
- package/src/containers/ResetDialog/ResetDialog.tsx +2 -0
- package/src/containers/UsageContainer/UsageContainer.tsx +10 -1
- package/src/containers/UsageContainer/UsageView.stories.tsx +0 -12
- package/src/containers/UsageContainer/UsageView.tsx +9 -10
- package/src/halo-services-layer.ts +29 -0
- package/src/index.ts +9 -0
- package/src/operations/definitions.ts +9 -1
- package/src/operations/errors.test.ts +27 -0
- package/src/operations/errors.ts +47 -0
- package/src/operations/index.ts +3 -0
- package/src/operations/open-usage.ts +3 -3
- package/src/operations/redeem-passkey.ts +85 -55
- package/src/operations/resolve-navigation-targets.ts +71 -0
- package/src/operations/share-identity.ts +3 -3
- package/src/operations/update-profile.ts +20 -0
- package/src/progress/index.ts +5 -0
- package/src/progress/progress-keys.ts +15 -0
- package/src/testing/initializeIdentity.ts +10 -2
- package/src/translations.ts +2 -0
- package/src/types/capabilities.ts +15 -1
- package/src/types/schema.ts +7 -0
- package/dist/lib/neutral/AccountContainer-7SF53UON.mjs +0 -186
- package/dist/lib/neutral/AccountContainer-7SF53UON.mjs.map +0 -7
- package/dist/lib/neutral/ClientPlugin.mjs +0 -72
- package/dist/lib/neutral/ClientPlugin.mjs.map +0 -7
- package/dist/lib/neutral/ClientPlugin.node.mjs +0 -1156
- package/dist/lib/neutral/ClientPlugin.node.mjs.map +0 -7
- package/dist/lib/neutral/ClientPlugin.workerd.mjs +0 -16
- package/dist/lib/neutral/ClientPlugin.workerd.mjs.map +0 -7
- package/dist/lib/neutral/DevicesContainer-PRWIN36N.mjs +0 -271
- package/dist/lib/neutral/DevicesContainer-PRWIN36N.mjs.map +0 -7
- package/dist/lib/neutral/InvitationsContainer-BI5RAWET.mjs +0 -143
- package/dist/lib/neutral/InvitationsContainer-BI5RAWET.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-4BWV4CYB.mjs +0 -53
- package/dist/lib/neutral/JoinDialog-4BWV4CYB.mjs.map +0 -7
- package/dist/lib/neutral/ProfileContainer-YEAYOTX5.mjs +0 -169
- package/dist/lib/neutral/ProfileContainer-YEAYOTX5.mjs.map +0 -7
- package/dist/lib/neutral/RecoveryCodeDialog-7EPNKCLB.mjs +0 -59
- package/dist/lib/neutral/RecoveryCodeDialog-7EPNKCLB.mjs.map +0 -7
- package/dist/lib/neutral/RecoveryCredentialsContainer-6BZ2IWX7.mjs +0 -60
- package/dist/lib/neutral/RecoveryCredentialsContainer-6BZ2IWX7.mjs.map +0 -7
- package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs +0 -57
- package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs.map +0 -7
- package/dist/lib/neutral/UsageContainer-2DWCVVE4.mjs +0 -241
- package/dist/lib/neutral/UsageContainer-2DWCVVE4.mjs.map +0 -7
- package/dist/lib/neutral/account-cache-YVQKLNV2.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-RVXTD6OE.mjs +0 -159
- package/dist/lib/neutral/app-graph-builder-RVXTD6OE.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/index.mjs +0 -34
- package/dist/lib/neutral/capabilities/index.mjs.map +0 -7
- package/dist/lib/neutral/capabilities/node.mjs +0 -21
- package/dist/lib/neutral/capabilities/node.mjs.map +0 -7
- package/dist/lib/neutral/chunk-6G4KZLBG.mjs.map +0 -7
- package/dist/lib/neutral/chunk-7DEIKHB7.mjs +0 -199
- package/dist/lib/neutral/chunk-7DEIKHB7.mjs.map +0 -7
- package/dist/lib/neutral/chunk-A7WDDIWY.mjs +0 -162
- package/dist/lib/neutral/chunk-A7WDDIWY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-GSKMAS3S.mjs.map +0 -7
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +0 -10
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JY35S2CN.mjs +0 -27
- package/dist/lib/neutral/chunk-JY35S2CN.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZFABGG2E.mjs +0 -8
- package/dist/lib/neutral/chunk-ZFABGG2E.mjs.map +0 -7
- package/dist/lib/neutral/client-7I5Y5SOA.mjs +0 -62
- package/dist/lib/neutral/client-7I5Y5SOA.mjs.map +0 -7
- package/dist/lib/neutral/components/index.mjs +0 -1
- package/dist/lib/neutral/components/index.mjs.map +0 -7
- package/dist/lib/neutral/containers/index.mjs +0 -25
- package/dist/lib/neutral/containers/index.mjs.map +0 -7
- package/dist/lib/neutral/create-agent-6UKJMZS5.mjs +0 -26
- package/dist/lib/neutral/create-agent-6UKJMZS5.mjs.map +0 -7
- package/dist/lib/neutral/create-identity-ULCRB3YH.mjs +0 -42
- package/dist/lib/neutral/create-identity-ULCRB3YH.mjs.map +0 -7
- package/dist/lib/neutral/create-passkey-I7VDS3AC.mjs +0 -81
- package/dist/lib/neutral/create-passkey-I7VDS3AC.mjs.map +0 -7
- package/dist/lib/neutral/create-recovery-code-DH2B6EGP.mjs +0 -36
- package/dist/lib/neutral/create-recovery-code-DH2B6EGP.mjs.map +0 -7
- package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs +0 -19
- package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs.map +0 -7
- package/dist/lib/neutral/index.mjs +0 -25
- package/dist/lib/neutral/index.mjs.map +0 -7
- package/dist/lib/neutral/join-identity-PJCHDNLH.mjs +0 -27
- package/dist/lib/neutral/join-identity-PJCHDNLH.mjs.map +0 -7
- package/dist/lib/neutral/layer-specs-YI7BVWKZ.mjs +0 -59
- package/dist/lib/neutral/layer-specs-YI7BVWKZ.mjs.map +0 -7
- package/dist/lib/neutral/meta.json +0 -1
- package/dist/lib/neutral/meta.mjs +0 -8
- package/dist/lib/neutral/meta.mjs.map +0 -7
- package/dist/lib/neutral/migrations-7FTW55ER.mjs +0 -23
- package/dist/lib/neutral/migrations-7FTW55ER.mjs.map +0 -7
- package/dist/lib/neutral/navigation-handler-MQ6MZXLX.mjs +0 -46
- package/dist/lib/neutral/navigation-handler-MQ6MZXLX.mjs.map +0 -7
- package/dist/lib/neutral/open-usage-OJVTPGOY.mjs +0 -27
- package/dist/lib/neutral/open-usage-OJVTPGOY.mjs.map +0 -7
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs +0 -13
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs.map +0 -7
- package/dist/lib/neutral/operations/index.mjs +0 -12
- package/dist/lib/neutral/operations/index.mjs.map +0 -7
- package/dist/lib/neutral/plugin.mjs +0 -17
- package/dist/lib/neutral/plugin.mjs.map +0 -7
- package/dist/lib/neutral/react-context-V74T6JOJ.mjs +0 -23
- package/dist/lib/neutral/react-context-V74T6JOJ.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-HPXRA65U.mjs +0 -75
- package/dist/lib/neutral/react-surface-HPXRA65U.mjs.map +0 -7
- package/dist/lib/neutral/recover-identity-B7YM2BR4.mjs +0 -26
- package/dist/lib/neutral/recover-identity-B7YM2BR4.mjs.map +0 -7
- package/dist/lib/neutral/redeem-passkey-TYP4XLHO.mjs +0 -66
- package/dist/lib/neutral/redeem-passkey-TYP4XLHO.mjs.map +0 -7
- package/dist/lib/neutral/redeem-token-2J33R3PV.mjs +0 -29
- package/dist/lib/neutral/redeem-token-2J33R3PV.mjs.map +0 -7
- package/dist/lib/neutral/reset-storage-K47HZTGP.mjs +0 -26
- package/dist/lib/neutral/reset-storage-K47HZTGP.mjs.map +0 -7
- package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs +0 -51
- package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs.map +0 -7
- package/dist/lib/neutral/share-identity-TOROBLWL.mjs +0 -31
- package/dist/lib/neutral/share-identity-TOROBLWL.mjs.map +0 -7
- package/dist/lib/neutral/testing/index.mjs +0 -25
- package/dist/lib/neutral/testing/index.mjs.map +0 -7
- package/dist/lib/neutral/translations.mjs +0 -124
- package/dist/lib/neutral/translations.mjs.map +0 -7
- package/dist/lib/neutral/types/index.mjs +0 -16
- package/dist/lib/neutral/types/index.mjs.map +0 -7
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import { Identity, Space } from "@dxos/halo";
|
|
4
|
+
import { Credential, LayerSpec } from "@dxos/compute";
|
|
5
|
+
import { ClientCapabilities } from "#types";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { ClientService } from "@dxos/client";
|
|
8
|
+
import { invariant } from "@dxos/invariant";
|
|
9
|
+
import { layerIdentity, layerSpace } from "@dxos/halo-adapter-client";
|
|
10
|
+
import { accessTokenResolverFromEdge, credentialsLayerFromDatabase } from "@dxos/compute-runtime";
|
|
11
|
+
import { Database } from "@dxos/echo";
|
|
12
|
+
//#region src/capabilities/layer-specs.ts
|
|
13
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/layer-specs.ts";
|
|
14
|
+
/**
|
|
15
|
+
* Provides the Effect-level {@link ClientService} backed by the
|
|
16
|
+
* {@link ClientCapabilities.Client} capability contributed by the plugin
|
|
17
|
+
* runtime.
|
|
18
|
+
*/
|
|
19
|
+
var ClientLayerSpec = LayerSpec.make({
|
|
20
|
+
affinity: "application",
|
|
21
|
+
requires: [Capability.Service],
|
|
22
|
+
provides: [ClientService]
|
|
23
|
+
}, () => Layer.unwrapEffect(Effect.gen(function* () {
|
|
24
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
25
|
+
return ClientService.fromClient(client);
|
|
26
|
+
}).pipe(Effect.orDie)));
|
|
27
|
+
/**
|
|
28
|
+
* Space-scoped database/feed services resolved from the `Client`'s space
|
|
29
|
+
* registry. One spec for both so the `client.spaces.get` / `waitUntilReady`
|
|
30
|
+
* round-trip only happens once per space slice. Fails hard if the context is
|
|
31
|
+
* missing a `space` id or the client cannot resolve it — both indicate a
|
|
32
|
+
* configuration bug in the layer graph.
|
|
33
|
+
*/
|
|
34
|
+
var DatabaseLayerSpec = LayerSpec.make({
|
|
35
|
+
affinity: "space",
|
|
36
|
+
requires: [ClientService],
|
|
37
|
+
provides: [Database.Service]
|
|
38
|
+
}, (context) => Layer.unwrapEffect(Effect.gen(function* () {
|
|
39
|
+
invariant(context.space, "space context required for Database layer", {
|
|
40
|
+
"~LogMeta": "~LogMeta",
|
|
41
|
+
F: __dxlog_file,
|
|
42
|
+
L: 67,
|
|
43
|
+
S: this,
|
|
44
|
+
A: ["context.space", "'space context required for Database layer'"]
|
|
45
|
+
});
|
|
46
|
+
const space = (yield* ClientService).spaces.get(context.space);
|
|
47
|
+
invariant(space, `space not found on client: ${context.space}`, {
|
|
48
|
+
"~LogMeta": "~LogMeta",
|
|
49
|
+
F: __dxlog_file,
|
|
50
|
+
L: 70,
|
|
51
|
+
S: this,
|
|
52
|
+
A: ["space", "`space not found on client: ${context.space}`"]
|
|
53
|
+
});
|
|
54
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
55
|
+
return Database.layer(space.db);
|
|
56
|
+
})));
|
|
57
|
+
/**
|
|
58
|
+
* Resolves server-custodied access tokens through EDGE. Application-scoped: the resolver's cache is
|
|
59
|
+
* keyed by token id and is worth sharing across spaces.
|
|
60
|
+
*/
|
|
61
|
+
var AccessTokenResolverLayerSpec = LayerSpec.make({
|
|
62
|
+
affinity: "application",
|
|
63
|
+
requires: [Capability.Service],
|
|
64
|
+
provides: [Credential.AccessTokenResolver]
|
|
65
|
+
}, () => Layer.unwrapEffect(Effect.gen(function* () {
|
|
66
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
67
|
+
return accessTokenResolverFromEdge(() => client.edge.http);
|
|
68
|
+
}).pipe(Effect.orDie)));
|
|
69
|
+
var CredentialsLayerSpec = LayerSpec.make({
|
|
70
|
+
affinity: "space",
|
|
71
|
+
requires: [Database.Service, Credential.AccessTokenResolver],
|
|
72
|
+
provides: [Credential.CredentialsService]
|
|
73
|
+
}, () => credentialsLayerFromDatabase());
|
|
74
|
+
/**
|
|
75
|
+
* The HALO {@link Identity.Service} backed by the client adapter. Application-scoped: it manages
|
|
76
|
+
* the local identity and its devices for the whole client.
|
|
77
|
+
*/
|
|
78
|
+
var IdentityLayerSpec = LayerSpec.make({
|
|
79
|
+
affinity: "application",
|
|
80
|
+
requires: [ClientService],
|
|
81
|
+
provides: [Identity.Service]
|
|
82
|
+
}, () => Layer.unwrapEffect(Effect.gen(function* () {
|
|
83
|
+
return layerIdentity(yield* ClientService);
|
|
84
|
+
})));
|
|
85
|
+
/**
|
|
86
|
+
* The HALO {@link Space.Service} backed by the client adapter. Application-scoped: its verbs are
|
|
87
|
+
* keyed by {@link SpaceId} and cover every space on the client, not a single space slice.
|
|
88
|
+
*/
|
|
89
|
+
var SpaceLayerSpec = LayerSpec.make({
|
|
90
|
+
affinity: "application",
|
|
91
|
+
requires: [ClientService],
|
|
92
|
+
provides: [Space.Service]
|
|
93
|
+
}, () => Layer.unwrapEffect(Effect.gen(function* () {
|
|
94
|
+
return layerSpace(yield* ClientService);
|
|
95
|
+
})));
|
|
96
|
+
var layer_specs_default = Capability.makeModule(() => Effect.succeed([
|
|
97
|
+
Capability.contributes(Capabilities.LayerSpec, ClientLayerSpec),
|
|
98
|
+
Capability.contributes(Capabilities.LayerSpec, DatabaseLayerSpec),
|
|
99
|
+
Capability.contributes(Capabilities.LayerSpec, AccessTokenResolverLayerSpec),
|
|
100
|
+
Capability.contributes(Capabilities.LayerSpec, CredentialsLayerSpec),
|
|
101
|
+
Capability.contributes(Capabilities.LayerSpec, IdentityLayerSpec),
|
|
102
|
+
Capability.contributes(Capabilities.LayerSpec, SpaceLayerSpec)
|
|
103
|
+
]));
|
|
104
|
+
//#endregion
|
|
105
|
+
export { layer_specs_default as default };
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=chunk-layer-specs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-layer-specs.mjs","names":[],"sources":["../../src/capabilities/layer-specs.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { ClientService } from '@dxos/client';\nimport { Credential, LayerSpec } from '@dxos/compute';\nimport { accessTokenResolverFromEdge, credentialsLayerFromDatabase } from '@dxos/compute-runtime';\nimport { Database } from '@dxos/echo';\nimport { Identity, Space } from '@dxos/halo';\nimport { layerIdentity, layerSpace } from '@dxos/halo-adapter-client';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '#types';\n\n//\n// Capability Module\n//\n// Contributes the core client/space service layer specs:\n// - {@link ClientService} (application affinity).\n// - {@link Database.Service}, {@link Credential.CredentialsService} (space affinity).\n//\n// Specs are declared at module level and resolve the underlying\n// {@link ClientCapabilities.Client} through the Effect layer graph (via\n// {@link Capability.Service}) rather than capturing it from an outer scope.\n//\n\n/**\n * Provides the Effect-level {@link ClientService} backed by the\n * {@link ClientCapabilities.Client} capability contributed by the plugin\n * runtime.\n */\nconst ClientLayerSpec = LayerSpec.make(\n {\n affinity: 'application',\n requires: [Capability.Service],\n provides: [ClientService],\n },\n () =>\n Layer.unwrapEffect(\n Effect.gen(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n return ClientService.fromClient(client);\n }).pipe(Effect.orDie),\n ),\n);\n\n/**\n * Space-scoped database/feed services resolved from the `Client`'s space\n * registry. One spec for both so the `client.spaces.get` / `waitUntilReady`\n * round-trip only happens once per space slice. Fails hard if the context is\n * missing a `space` id or the client cannot resolve it — both indicate a\n * configuration bug in the layer graph.\n */\nconst DatabaseLayerSpec = LayerSpec.make(\n {\n affinity: 'space',\n requires: [ClientService],\n provides: [Database.Service],\n },\n (context) =>\n Layer.unwrapEffect(\n Effect.gen(function* () {\n invariant(context.space, 'space context required for Database layer');\n const client = yield* ClientService;\n const space = client.spaces.get(context.space);\n invariant(space, `space not found on client: ${context.space}`);\n yield* Effect.promise(() => space.waitUntilReady());\n return Database.layer(space.db);\n }),\n ),\n);\n\n/**\n * Resolves server-custodied access tokens through EDGE. Application-scoped: the resolver's cache is\n * keyed by token id and is worth sharing across spaces.\n */\nconst AccessTokenResolverLayerSpec = LayerSpec.make(\n {\n affinity: 'application',\n requires: [Capability.Service],\n provides: [Credential.AccessTokenResolver],\n },\n () =>\n Layer.unwrapEffect(\n Effect.gen(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n return accessTokenResolverFromEdge(() => client.edge.http);\n }).pipe(Effect.orDie),\n ),\n);\n\nconst CredentialsLayerSpec = LayerSpec.make(\n {\n affinity: 'space',\n requires: [Database.Service, Credential.AccessTokenResolver],\n provides: [Credential.CredentialsService],\n },\n () => credentialsLayerFromDatabase(),\n);\n\n/**\n * The HALO {@link Identity.Service} backed by the client adapter. Application-scoped: it manages\n * the local identity and its devices for the whole client.\n */\nconst IdentityLayerSpec = LayerSpec.make(\n {\n affinity: 'application',\n requires: [ClientService],\n provides: [Identity.Service],\n },\n () =>\n Layer.unwrapEffect(\n Effect.gen(function* () {\n const client = yield* ClientService;\n return layerIdentity(client);\n }),\n ),\n);\n\n/**\n * The HALO {@link Space.Service} backed by the client adapter. Application-scoped: its verbs are\n * keyed by {@link SpaceId} and cover every space on the client, not a single space slice.\n */\nconst SpaceLayerSpec = LayerSpec.make(\n {\n affinity: 'application',\n requires: [ClientService],\n provides: [Space.Service],\n },\n () =>\n Layer.unwrapEffect(\n Effect.gen(function* () {\n const client = yield* ClientService;\n return layerSpace(client);\n }),\n ),\n);\n\nexport default Capability.makeModule(() =>\n Effect.succeed([\n Capability.contributes(Capabilities.LayerSpec, ClientLayerSpec),\n Capability.contributes(Capabilities.LayerSpec, DatabaseLayerSpec),\n Capability.contributes(Capabilities.LayerSpec, AccessTokenResolverLayerSpec),\n Capability.contributes(Capabilities.LayerSpec, CredentialsLayerSpec),\n Capability.contributes(Capabilities.LayerSpec, IdentityLayerSpec),\n Capability.contributes(Capabilities.LayerSpec, SpaceLayerSpec),\n ]),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,IAAM,kBAAkB,UAAU,KAChC;CACE,UAAU;CACV,UAAU,CAAC,WAAW,OAAO;CAC7B,UAAU,CAAC,aAAa;AAC1B,SAEE,MAAM,aACJ,OAAO,IAAI,aAAa;CACtB,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAC9D,OAAO,cAAc,WAAW,MAAM;AACxC,CAAC,CAAC,CAAC,KAAK,OAAO,KAAK,CACtB,CACJ;;;;;;;;AASA,IAAM,oBAAoB,UAAU,KAClC;CACE,UAAU;CACV,UAAU,CAAC,aAAa;CACxB,UAAU,CAAC,SAAS,OAAO;AAC7B,IACC,YACC,MAAM,aACJ,OAAO,IAAI,aAAa;CACtB,UAAU,QAAQ,OAAO,6CAA0C;EAAA,YAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA,CAAA,iBAAA,6CAAA;CAAA,CAAC;CAEpE,MAAM,SAAQ,OADQ,cAAA,CACD,OAAO,IAAI,QAAQ,KAAK;CAC7C,UAAU,OAAO,8BAA8B,QAAQ,SAAM;EAAA,YAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA;EAAA,GAAA,CAAA,SAAA,+CAAA;CAAA,CAAC;CAC9D,OAAO,OAAO,cAAc,MAAM,eAAe,CAAC;CAClD,OAAO,SAAS,MAAM,MAAM,EAAE;AAChC,CAAC,CACH,CACJ;;;;;AAMA,IAAM,+BAA+B,UAAU,KAC7C;CACE,UAAU;CACV,UAAU,CAAC,WAAW,OAAO;CAC7B,UAAU,CAAC,WAAW,mBAAmB;AAC3C,SAEE,MAAM,aACJ,OAAO,IAAI,aAAa;CACtB,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAC9D,OAAO,kCAAkC,OAAO,KAAK,IAAI;AAC3D,CAAC,CAAC,CAAC,KAAK,OAAO,KAAK,CACtB,CACJ;AAEA,IAAM,uBAAuB,UAAU,KACrC;CACE,UAAU;CACV,UAAU,CAAC,SAAS,SAAS,WAAW,mBAAmB;CAC3D,UAAU,CAAC,WAAW,kBAAkB;AAC1C,SACM,6BAA6B,CACrC;;;;;AAMA,IAAM,oBAAoB,UAAU,KAClC;CACE,UAAU;CACV,UAAU,CAAC,aAAa;CACxB,UAAU,CAAC,SAAS,OAAO;AAC7B,SAEE,MAAM,aACJ,OAAO,IAAI,aAAa;CAEtB,OAAO,cAAc,OADC,aACK;AAC7B,CAAC,CACH,CACJ;;;;;AAMA,IAAM,iBAAiB,UAAU,KAC/B;CACE,UAAU;CACV,UAAU,CAAC,aAAa;CACxB,UAAU,CAAC,MAAM,OAAO;AAC1B,SAEE,MAAM,aACJ,OAAO,IAAI,aAAa;CAEtB,OAAO,WAAW,OADI,aACE;AAC1B,CAAC,CACH,CACJ;AAEA,IAAA,sBAAe,WAAW,iBACxB,OAAO,QAAQ;CACb,WAAW,YAAY,aAAa,WAAW,eAAe;CAC9D,WAAW,YAAY,aAAa,WAAW,iBAAiB;CAChE,WAAW,YAAY,aAAa,WAAW,4BAA4B;CAC3E,WAAW,YAAY,aAAa,WAAW,oBAAoB;CACnE,WAAW,YAAY,aAAa,WAAW,iBAAiB;CAChE,WAAW,YAAY,aAAa,WAAW,cAAc;AAC/D,CAAC,CACH"}
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
1
|
import { Plugin } from "@dxos/app-framework";
|
|
3
|
-
|
|
4
|
-
// dx.config.ts
|
|
5
2
|
import { Config2 } from "@dxos/app-framework/config";
|
|
6
3
|
import { trim } from "@dxos/util";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
//#region dx.config.ts
|
|
5
|
+
var dx_config_default = Config2.make({ plugin: {
|
|
6
|
+
key: "org.dxos.plugin.client",
|
|
7
|
+
name: "Client",
|
|
8
|
+
author: "DXOS",
|
|
9
|
+
description: trim`
|
|
13
10
|
Core client connectivity and peer-to-peer networking infrastructure.
|
|
14
11
|
Manages identity, authentication, and real-time synchronization across devices.
|
|
15
12
|
`,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// src/meta.ts
|
|
13
|
+
tags: ["system"]
|
|
14
|
+
} });
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/meta.ts
|
|
23
17
|
var meta = Plugin.getMetaFromConfig(dx_config_default);
|
|
18
|
+
//#endregion
|
|
19
|
+
export { meta as t };
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
meta
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=chunk-6G4KZLBG.mjs.map
|
|
21
|
+
//# sourceMappingURL=chunk-meta.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-meta.mjs","names":[],"sources":["../../dx.config.ts","../../src/meta.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.client',\n name: 'Client',\n author: 'DXOS',\n description: trim`\n Core client connectivity and peer-to-peer networking infrastructure.\n Manages identity, authentication, and real-time synchronization across devices.\n `,\n tags: ['system'],\n },\n});\n","//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n"],"mappings":";;;;AAOA,IAAA,oBAAe,QAAQ,KAAK,EAC1B,QAAQ;CACN,KAAK;CACL,MAAM;CACN,QAAQ;CACR,aAAa,IAAI;;;;CAIjB,MAAM,CAAC,QAAQ;AACjB,EACF,CAAC;;;ACVD,IAAa,OAAO,OAAO,kBAAkB,iBAAM"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
2
|
+
import { ClientCapabilities } from "#types";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import { RpcClosedError } from "@dxos/protocols";
|
|
5
|
+
import { log } from "@dxos/log";
|
|
6
|
+
//#region src/capabilities/migrations.ts
|
|
7
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/migrations.ts";
|
|
8
|
+
var migrations_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
9
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
10
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
11
|
+
const migrationsAtom = yield* Capability.atom(ClientCapabilities.Migration);
|
|
12
|
+
const cancel = registry.subscribe(migrationsAtom, (_migrations) => {
|
|
13
|
+
const migrations = Array.from(new Set(_migrations.flat()));
|
|
14
|
+
const spaces = client.spaces.get();
|
|
15
|
+
Promise.all(spaces.map((space) => space.internal.db.runMigrations(migrations))).catch((err) => {
|
|
16
|
+
if (!(err instanceof RpcClosedError)) log.catch(err, void 0, {
|
|
17
|
+
"~LogMeta": "~LogMeta",
|
|
18
|
+
F: __dxlog_file,
|
|
19
|
+
L: 29,
|
|
20
|
+
S: this
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}, { immediate: true });
|
|
24
|
+
return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));
|
|
25
|
+
}));
|
|
26
|
+
//#endregion
|
|
27
|
+
export { migrations_default as default };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=chunk-migrations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-migrations.mjs","names":[],"sources":["../../src/capabilities/migrations.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { log } from '@dxos/log';\nimport { RpcClosedError } from '@dxos/protocols';\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 migrationsAtom = yield* Capability.atom(ClientCapabilities.Migration);\n\n // NOTE: Migrations are currently unidirectional and idempotent.\n const cancel = registry.subscribe(\n migrationsAtom,\n (_migrations: any[]) => {\n const migrations = Array.from(new Set(_migrations.flat()));\n const spaces = client.spaces.get();\n // Migrations run fire-and-forget from the subscription callback; an in-flight flush can be\n // interrupted when the client shuts down, which surfaces as a benign RpcClosedError race.\n void Promise.all(spaces.map((space: any) => space.internal.db.runMigrations(migrations))).catch((err) => {\n if (!(err instanceof RpcClosedError)) {\n log.catch(err);\n }\n });\n },\n { immediate: true },\n );\n\n return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));\n }),\n);\n"],"mappings":";;;;;;;AAYA,IAAA,qBAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,MAAM,WAAW,OAAO,WAAW,IAAI,aAAa,YAAY;CAChE,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAC9D,MAAM,iBAAiB,OAAO,WAAW,KAAK,mBAAmB,SAAS;CAG1E,MAAM,SAAS,SAAS,UACtB,iBACC,gBAAuB;EACtB,MAAM,aAAa,MAAM,KAAK,IAAI,IAAI,YAAY,KAAK,CAAC,CAAC;EACzD,MAAM,SAAS,OAAO,OAAO,IAAI;EAGjC,QAAa,IAAI,OAAO,KAAK,UAAe,MAAM,SAAS,GAAG,cAAc,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,QAAQ;GACvG,IAAI,EAAE,eAAe,iBACnB,IAAI,MAAM,KAAE,KAAA,GAAA;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA;GAAA,CAAC;EAEjB,CAAC;CACH,GACA,EAAE,WAAW,KAAK,CACpB;CAEA,OAAO,WAAW,YAAY,aAAa,MAAM,YAAY,OAAO,WAAW,OAAO,CAAC,CAAC;AAC1F,CAAC,CACH"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { d as JoinIdentity, h as RedeemToken } from "./chunk-operations.mjs";
|
|
2
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
import { Operation } from "@dxos/compute";
|
|
5
|
+
import { AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { log } from "@dxos/log";
|
|
8
|
+
//#region src/capabilities/navigation-handler/navigation-handler.ts
|
|
9
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/navigation-handler/navigation-handler.ts";
|
|
10
|
+
/**
|
|
11
|
+
* NavigationHandler for auth-related URL params.
|
|
12
|
+
* Handles login tokens and device invitation codes.
|
|
13
|
+
*/
|
|
14
|
+
var navigation_handler_default = Capability.makeModule(Effect.fnUntraced(function* ({ invitationProp = "deviceInvitationCode", tokenProp = "token", tokenTypeProp = "type", invitationUrlHandler = true } = {}) {
|
|
15
|
+
const capabilities = yield* Capability.Service;
|
|
16
|
+
const operationService = yield* Capability.get(Capabilities.OperationInvoker);
|
|
17
|
+
const handler = (url) => Effect.gen(function* () {
|
|
18
|
+
const token = url.searchParams.get(tokenProp);
|
|
19
|
+
const tokenType = url.searchParams.get(tokenTypeProp);
|
|
20
|
+
const invitationCode = invitationUrlHandler ? url.searchParams.get(invitationProp) : null;
|
|
21
|
+
if (token && tokenType === "login") {
|
|
22
|
+
log("login token received via navigation", void 0, {
|
|
23
|
+
"~LogMeta": "~LogMeta",
|
|
24
|
+
F: __dxlog_file,
|
|
25
|
+
L: 45,
|
|
26
|
+
S: this
|
|
27
|
+
});
|
|
28
|
+
removeQueryParam(tokenProp);
|
|
29
|
+
removeQueryParam(tokenTypeProp);
|
|
30
|
+
yield* Operation.invoke(RedeemToken, { token });
|
|
31
|
+
} else if (invitationCode) {
|
|
32
|
+
log("device invitation received via navigation", void 0, {
|
|
33
|
+
"~LogMeta": "~LogMeta",
|
|
34
|
+
F: __dxlog_file,
|
|
35
|
+
L: 50,
|
|
36
|
+
S: this
|
|
37
|
+
});
|
|
38
|
+
removeQueryParam(invitationProp);
|
|
39
|
+
yield* Operation.invoke(JoinIdentity, { invitationCode });
|
|
40
|
+
}
|
|
41
|
+
}).pipe(Effect.catchAll((error) => Effect.gen(function* () {
|
|
42
|
+
log.warn("navigation handler failed", { error }, {
|
|
43
|
+
"~LogMeta": "~LogMeta",
|
|
44
|
+
F: __dxlog_file,
|
|
45
|
+
L: 57,
|
|
46
|
+
S: this
|
|
47
|
+
});
|
|
48
|
+
yield* Operation.invoke(LayoutOperation.AddToast, {
|
|
49
|
+
id: `${meta.profile.key}/navigation-failed`,
|
|
50
|
+
title: ["navigation-failed-toast.title", { ns: meta.profile.key }],
|
|
51
|
+
description: ["navigation-failed-toast.description", { ns: meta.profile.key }],
|
|
52
|
+
icon: "ph--warning--regular"
|
|
53
|
+
}).pipe(Effect.catchAll((toastError) => Effect.sync(() => log.warn("failed to add toast", { toastError }, {
|
|
54
|
+
"~LogMeta": "~LogMeta",
|
|
55
|
+
F: __dxlog_file,
|
|
56
|
+
L: 64,
|
|
57
|
+
S: this
|
|
58
|
+
}))));
|
|
59
|
+
})), Effect.provideService(Capability.Service, capabilities), Effect.provideService(Operation.Service, operationService));
|
|
60
|
+
return Capability.contributes(AppCapabilities.NavigationHandler, handler);
|
|
61
|
+
}));
|
|
62
|
+
/** Remove a query param from the current browser URL. */
|
|
63
|
+
var removeQueryParam = (key) => {
|
|
64
|
+
const current = new URL(window.location.href);
|
|
65
|
+
current.searchParams.delete(key);
|
|
66
|
+
history.replaceState(null, "", current.pathname + current.search);
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
export { navigation_handler_default as default };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=chunk-navigation-handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-navigation-handler.mjs","names":[],"sources":["../../src/capabilities/navigation-handler/navigation-handler.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, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\nimport { log } from '@dxos/log';\n\nimport { meta } from '#meta';\n\nimport { ClientOperation } from '../../operations';\n\nexport type NavigationHandlerOptions = {\n invitationProp?: string;\n tokenProp?: string;\n tokenTypeProp?: string;\n /** Set false when another plugin (e.g. plugin-onboarding) owns the invitation URL param. */\n invitationUrlHandler?: boolean;\n};\n\n/**\n * NavigationHandler for auth-related URL params.\n * Handles login tokens and device invitation codes.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({\n invitationProp = 'deviceInvitationCode',\n tokenProp = 'token',\n tokenTypeProp = 'type',\n invitationUrlHandler = true,\n }: NavigationHandlerOptions = {}) {\n const capabilities = yield* Capability.Service;\n const operationService = yield* Capability.get(Capabilities.OperationInvoker);\n\n const handler: AppCapabilities.NavigationHandler = (url: URL) =>\n Effect.gen(function* () {\n const token = url.searchParams.get(tokenProp);\n const tokenType = url.searchParams.get(tokenTypeProp);\n const invitationCode = invitationUrlHandler ? url.searchParams.get(invitationProp) : null;\n\n if (token && tokenType === 'login') {\n log('login token received via navigation');\n removeQueryParam(tokenProp);\n removeQueryParam(tokenTypeProp);\n yield* Operation.invoke(ClientOperation.RedeemToken, { token });\n } else if (invitationCode) {\n log('device invitation received via navigation');\n removeQueryParam(invitationProp);\n yield* Operation.invoke(ClientOperation.JoinIdentity, { invitationCode });\n }\n }).pipe(\n Effect.catchAll((error) =>\n Effect.gen(function* () {\n log.warn('navigation handler failed', { error });\n yield* Operation.invoke(LayoutOperation.AddToast, {\n id: `${meta.profile.key}/navigation-failed`,\n title: ['navigation-failed-toast.title', { ns: meta.profile.key }],\n description: ['navigation-failed-toast.description', { ns: meta.profile.key }],\n icon: 'ph--warning--regular',\n }).pipe(\n Effect.catchAll((toastError) => Effect.sync(() => log.warn('failed to add toast', { toastError }))),\n );\n }),\n ),\n Effect.provideService(Capability.Service, capabilities),\n Effect.provideService(Operation.Service, operationService),\n );\n\n return Capability.contributes(AppCapabilities.NavigationHandler, handler);\n }),\n);\n\n/** Remove a query param from the current browser URL. */\nconst removeQueryParam = (key: string) => {\n const current = new URL(window.location.href);\n current.searchParams.delete(key);\n history.replaceState(null, '', current.pathname + current.search);\n};\n"],"mappings":";;;;;;;;;;;;;AA2BA,IAAA,6BAAe,WAAW,WACxB,OAAO,WAAW,WAAW,EAC3B,iBAAiB,wBACjB,YAAY,SACZ,gBAAgB,QAChB,uBAAuB,SACK,CAAC,GAAG;CAChC,MAAM,eAAe,OAAO,WAAW;CACvC,MAAM,mBAAmB,OAAO,WAAW,IAAI,aAAa,gBAAgB;CAE5E,MAAM,WAA8C,QAClD,OAAO,IAAI,aAAa;EACtB,MAAM,QAAQ,IAAI,aAAa,IAAI,SAAS;EAC5C,MAAM,YAAY,IAAI,aAAa,IAAI,aAAa;EACpD,MAAM,iBAAiB,uBAAuB,IAAI,aAAa,IAAI,cAAc,IAAI;EAErF,IAAI,SAAS,cAAc,SAAS;GAClC,IAAI,uCAAoC,KAAA,GAAA;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA;GAAA,CAAC;GACzC,iBAAiB,SAAS;GAC1B,iBAAiB,aAAa;GAC9B,OAAO,UAAU,OAAO,aAA6B,EAAE,MAAM,CAAC;EAChE,OAAO,IAAI,gBAAgB;GACzB,IAAI,6CAA0C,KAAA,GAAA;IAAA,YAAA;IAAA,GAAA;IAAA,GAAA;IAAA,GAAA;GAAA,CAAC;GAC/C,iBAAiB,cAAc;GAC/B,OAAO,UAAU,OAAO,cAA8B,EAAE,eAAe,CAAC;EAC1E;CACF,CAAC,CAAC,CAAC,KACD,OAAO,UAAU,UACf,OAAO,IAAI,aAAa;EACtB,IAAI,KAAK,6BAA6B,EAAE,MAAM,GAAA;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA;EAAA,CAAC;EAC/C,OAAO,UAAU,OAAO,gBAAgB,UAAU;GAChD,IAAI,GAAG,KAAK,QAAQ,IAAI;GACxB,OAAO,CAAC,iCAAiC,EAAE,IAAI,KAAK,QAAQ,IAAI,CAAC;GACjE,aAAa,CAAC,uCAAuC,EAAE,IAAI,KAAK,QAAQ,IAAI,CAAC;GAC7E,MAAM;EACR,CAAC,CAAC,CAAC,KACD,OAAO,UAAU,eAAe,OAAO,WAAW,IAAI,KAAK,uBAAuB,EAAE,WAAW,GAAA;GAAA,YAAA;GAAA,GAAA;GAAA,GAAA;GAAA,GAAA;EAAA,CAAC,CAAC,CAAC,CACpG;CACF,CAAC,CACH,GACA,OAAO,eAAe,WAAW,SAAS,YAAY,GACtD,OAAO,eAAe,UAAU,SAAS,gBAAgB,CAC3D;CAEF,OAAO,WAAW,YAAY,gBAAgB,mBAAmB,OAAO;AAC1E,CAAC,CACH;;AAGA,IAAM,oBAAoB,QAAgB;CACxC,MAAM,UAAU,IAAI,IAAI,OAAO,SAAS,IAAI;CAC5C,QAAQ,aAAa,OAAO,GAAG;CAC/B,QAAQ,aAAa,MAAM,IAAI,QAAQ,WAAW,QAAQ,MAAM;AAClE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Capability } from "@dxos/app-framework";
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
import { EntityId, SpaceId } from "@dxos/keys";
|
|
4
|
+
import { AppCapabilities, NotFound } from "@dxos/app-toolkit";
|
|
5
|
+
import { ClientCapabilities } from "#types";
|
|
6
|
+
import * as Effect from "effect/Effect";
|
|
7
|
+
import { Context } from "@dxos/context";
|
|
8
|
+
import { Database, EID } from "@dxos/echo";
|
|
9
|
+
//#region src/capabilities/navigation-target-loader.ts
|
|
10
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/navigation-target-loader.ts";
|
|
11
|
+
/** Cap on the remote edge existence check so an unreachable edge cannot block navigation. */
|
|
12
|
+
var EDGE_EXISTENCE_TIMEOUT = "3 seconds";
|
|
13
|
+
/**
|
|
14
|
+
* Loads a navigation target by `(spaceId, entityId)` on behalf of the layout plugins, so they can
|
|
15
|
+
* restore a URL-addressed plank without depending on the client for object loading. Loads the object
|
|
16
|
+
* into local ECHO (materializing its graph node) when it exists locally, and otherwise checks remote
|
|
17
|
+
* existence via edge. See {@link AppCapabilities.NavigationTargetLoader}.
|
|
18
|
+
*/
|
|
19
|
+
var navigation_target_loader_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
20
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
21
|
+
const checkRemote = NotFound.createEdgeExistenceChecker((spaceId, body) => client.edge.http.execQuery(new Context(void 0, {
|
|
22
|
+
"~LogMeta": "~LogMeta",
|
|
23
|
+
F: __dxlog_file,
|
|
24
|
+
L: 31
|
|
25
|
+
}), spaceId, body));
|
|
26
|
+
const loader = {
|
|
27
|
+
id: meta.profile.key,
|
|
28
|
+
load: ({ spaceId, entityId }) => Effect.gen(function* () {
|
|
29
|
+
if (!SpaceId.isValid(spaceId) || !EntityId.isValid(entityId)) return false;
|
|
30
|
+
const eid = EID.make({
|
|
31
|
+
spaceId,
|
|
32
|
+
entityId
|
|
33
|
+
});
|
|
34
|
+
const space = client.spaces.get(spaceId);
|
|
35
|
+
if (space) {
|
|
36
|
+
if (yield* Effect.promise(() => space.waitUntilReady()).pipe(Effect.flatMap(() => Database.load(space.db.makeRef(eid))), Effect.as(true), Effect.catchAll(() => Effect.succeed(false)))) return true;
|
|
37
|
+
}
|
|
38
|
+
return yield* checkRemote(eid).pipe(Effect.timeout(EDGE_EXISTENCE_TIMEOUT), Effect.catchAll(() => Effect.succeed(false)));
|
|
39
|
+
})
|
|
40
|
+
};
|
|
41
|
+
return Capability.contributes(AppCapabilities.NavigationTargetLoader, loader);
|
|
42
|
+
}));
|
|
43
|
+
//#endregion
|
|
44
|
+
export { navigation_target_loader_default as default };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=chunk-navigation-target-loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-navigation-target-loader.mjs","names":[],"sources":["../../src/capabilities/navigation-target-loader.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities, NotFound } from '@dxos/app-toolkit';\nimport { Context } from '@dxos/context';\nimport { Database, EID } from '@dxos/echo';\nimport { EntityId, SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\nimport { ClientCapabilities } from '#types';\n\n/** Cap on the remote edge existence check so an unreachable edge cannot block navigation. */\nconst EDGE_EXISTENCE_TIMEOUT = '3 seconds';\n\n/**\n * Loads a navigation target by `(spaceId, entityId)` on behalf of the layout plugins, so they can\n * restore a URL-addressed plank without depending on the client for object loading. Loads the object\n * into local ECHO (materializing its graph node) when it exists locally, and otherwise checks remote\n * existence via edge. See {@link AppCapabilities.NavigationTargetLoader}.\n */\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n\n // Remote existence check (does not materialize a local node); reuses the shared edge checker.\n const checkRemote = NotFound.createEdgeExistenceChecker((spaceId, body) =>\n client.edge.http.execQuery(new Context(), spaceId, body),\n );\n\n const loader: AppCapabilities.NavigationTargetLoader = {\n id: meta.profile.key,\n load: ({ spaceId, entityId }) =>\n Effect.gen(function* () {\n if (!SpaceId.isValid(spaceId) || !EntityId.isValid(entityId)) {\n return false;\n }\n const eid = EID.make({ spaceId, entityId });\n\n // Local first: loading the object populates the collection/type-section refs that address\n // it, so the next graph expansion materializes its node. Wait for the space to be ready so a\n // cold restore (space not yet loaded when the URL is resolved) still finds it.\n const space = client.spaces.get(spaceId);\n if (space) {\n const loaded = yield* Effect.promise(() => space.waitUntilReady()).pipe(\n Effect.flatMap(() => Database.load(space.db.makeRef(eid))),\n Effect.as(true),\n Effect.catchAll(() => Effect.succeed(false)),\n );\n if (loaded) {\n return true;\n }\n }\n\n // Remote fallback: confirms the object exists somewhere, even if it has not replicated\n // locally yet (in which case the node cannot render until it does). Bounded so an\n // unreachable edge cannot hang navigation.\n return yield* checkRemote(eid).pipe(\n Effect.timeout(EDGE_EXISTENCE_TIMEOUT),\n Effect.catchAll(() => Effect.succeed(false)),\n );\n }),\n };\n\n return Capability.contributes(AppCapabilities.NavigationTargetLoader, loader);\n }),\n);\n"],"mappings":";;;;;;;;;;;AAgBA,IAAM,yBAAyB;;;;;;;AAQ/B,IAAA,mCAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,MAAM,SAAS,OAAO,WAAW,IAAI,mBAAmB,MAAM;CAG9D,MAAM,cAAc,SAAS,4BAA4B,SAAS,SAChE,OAAO,KAAK,KAAK,UAAU,IAAI,QAAO,KAAA,GAAA;EAAA,YAAA;EAAA,GAAA;EAAA,GAAA;CAAA,CAAC,GAAG,SAAS,IAAI,CACzD;CAEA,MAAM,SAAiD;EACrD,IAAI,KAAK,QAAQ;EACjB,OAAO,EAAE,SAAS,eAChB,OAAO,IAAI,aAAa;GACtB,IAAI,CAAC,QAAQ,QAAQ,OAAO,KAAK,CAAC,SAAS,QAAQ,QAAQ,GACzD,OAAO;GAET,MAAM,MAAM,IAAI,KAAK;IAAE;IAAS;GAAS,CAAC;GAK1C,MAAM,QAAQ,OAAO,OAAO,IAAI,OAAO;GACvC,IAAI;QAME,OALkB,OAAO,cAAc,MAAM,eAAe,CAAC,CAAC,CAAC,KACjE,OAAO,cAAc,SAAS,KAAK,MAAM,GAAG,QAAQ,GAAG,CAAC,CAAC,GACzD,OAAO,GAAG,IAAI,GACd,OAAO,eAAe,OAAO,QAAQ,KAAK,CAAC,CAC7C,GAEE,OAAO;GAAA;GAOX,OAAO,OAAO,YAAY,GAAG,CAAC,CAAC,KAC7B,OAAO,QAAQ,sBAAsB,GACrC,OAAO,eAAe,OAAO,QAAQ,KAAK,CAAC,CAC7C;EACF,CAAC;CACL;CAEA,OAAO,WAAW,YAAY,gBAAgB,wBAAwB,MAAM;AAC9E,CAAC,CACH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { f as OpenUsage } 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
|
+
//#region src/operations/open-usage.ts
|
|
7
|
+
var handler = OpenUsage.pipe(Operation.withHandler(Effect.fnUntraced(function* () {
|
|
8
|
+
yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: GraphPath.getSpacePath(Account.id) });
|
|
9
|
+
yield* Operation.invoke(LayoutOperation.Open, { subject: [GraphPath.getSpacePath(Account.id, Account.Usage)] });
|
|
10
|
+
})));
|
|
11
|
+
//#endregion
|
|
12
|
+
export { handler as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=chunk-open-usage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-open-usage.mjs","names":[],"sources":["../../src/operations/open-usage.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { GraphPath, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { Account } from '../types';\nimport { OpenUsage } from './definitions';\n\nconst handler: Operation.WithHandler<typeof OpenUsage> = OpenUsage.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.Usage)],\n });\n }),\n ),\n);\n\nexport default handler;\n"],"mappings":";;;;;;AAYA,IAAM,UAAmD,UAAU,KACjE,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,KAAK,CAAC,EAC7D,CAAC;AACH,CAAC,CACH,CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { ClientOperationHandlerSet } from "#operations";
|
|
4
|
+
//#region src/capabilities/operation-handler.ts
|
|
5
|
+
var operation_handler_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
6
|
+
return Capability.contributes(Capabilities.OperationHandler, ClientOperationHandlerSet);
|
|
7
|
+
}));
|
|
8
|
+
//#endregion
|
|
9
|
+
export { operation_handler_default as default };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=chunk-operation-handler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-operation-handler.mjs","names":[],"sources":["../../src/capabilities/operation-handler.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport type { OperationHandlerSet } from '@dxos/compute';\n\nimport { ClientOperationHandlerSet } from '#operations';\n\nexport default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(\n Effect.fnUntraced(function* () {\n return Capability.contributes(Capabilities.OperationHandler, ClientOperationHandlerSet);\n }),\n);\n"],"mappings":";;;;AAWA,IAAA,4BAAe,WAAW,WACxB,OAAO,WAAW,aAAa;CAC7B,OAAO,WAAW,YAAY,aAAa,kBAAkB,yBAAyB;AACxF,CAAC,CACH"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { Capability } from "@dxos/app-framework";
|
|
2
|
+
import { Identity } from "@dxos/halo";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import { meta } from "#meta";
|
|
5
|
+
import { DXN, IdentityDid, SpaceId } from "@dxos/keys";
|
|
6
|
+
import { Operation, OperationHandlerSet } from "@dxos/compute";
|
|
7
|
+
import { BaseError } from "@dxos/errors";
|
|
8
|
+
//#region \0rolldown/runtime.js
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __exportAll = (all, no_symbols) => {
|
|
11
|
+
let target = {};
|
|
12
|
+
for (var name in all) __defProp(target, name, {
|
|
13
|
+
get: all[name],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/operations/definitions.ts
|
|
21
|
+
var definitions_exports = /* @__PURE__ */ __exportAll({
|
|
22
|
+
CreateAgent: () => CreateAgent,
|
|
23
|
+
CreateIdentity: () => CreateIdentity,
|
|
24
|
+
CreatePasskey: () => CreatePasskey,
|
|
25
|
+
CreateRecoveryCode: () => CreateRecoveryCode,
|
|
26
|
+
JoinIdentity: () => JoinIdentity,
|
|
27
|
+
OpenUsage: () => OpenUsage,
|
|
28
|
+
RecoverIdentity: () => RecoverIdentity,
|
|
29
|
+
RedeemPasskey: () => RedeemPasskey,
|
|
30
|
+
RedeemToken: () => RedeemToken,
|
|
31
|
+
ResetStorage: () => ResetStorage,
|
|
32
|
+
ShareIdentity: () => ShareIdentity,
|
|
33
|
+
UpdateProfile: () => UpdateProfile
|
|
34
|
+
});
|
|
35
|
+
var makeKey = (name) => DXN.make(`${meta.profile.key}.operation.${name}`);
|
|
36
|
+
var IdentitySchema = Schema.Struct({
|
|
37
|
+
identityDid: IdentityDid,
|
|
38
|
+
spaceId: Schema.optional(SpaceId),
|
|
39
|
+
profile: Schema.optional(Schema.Struct({
|
|
40
|
+
displayName: Schema.optional(Schema.String),
|
|
41
|
+
avatarCid: Schema.optional(Schema.String),
|
|
42
|
+
data: Schema.optional(Schema.Record({
|
|
43
|
+
key: Schema.String,
|
|
44
|
+
value: Schema.Any
|
|
45
|
+
}))
|
|
46
|
+
}))
|
|
47
|
+
});
|
|
48
|
+
var ProfileSchema = Schema.Struct({
|
|
49
|
+
displayName: Schema.optional(Schema.String),
|
|
50
|
+
avatarCid: Schema.optional(Schema.String),
|
|
51
|
+
data: Schema.optional(Schema.Record({
|
|
52
|
+
key: Schema.String,
|
|
53
|
+
value: Schema.Any
|
|
54
|
+
}))
|
|
55
|
+
});
|
|
56
|
+
var CreateIdentity = Operation.make({
|
|
57
|
+
meta: {
|
|
58
|
+
key: makeKey("createIdentity"),
|
|
59
|
+
name: "Create Identity",
|
|
60
|
+
icon: "ph--user--regular"
|
|
61
|
+
},
|
|
62
|
+
services: [Capability.Service, Identity.Service],
|
|
63
|
+
input: ProfileSchema,
|
|
64
|
+
output: IdentitySchema
|
|
65
|
+
});
|
|
66
|
+
var UpdateProfile = Operation.make({
|
|
67
|
+
meta: {
|
|
68
|
+
key: makeKey("updateProfile"),
|
|
69
|
+
name: "Update Profile",
|
|
70
|
+
icon: "ph--user--regular"
|
|
71
|
+
},
|
|
72
|
+
services: [Identity.Service],
|
|
73
|
+
input: ProfileSchema,
|
|
74
|
+
output: Schema.Void
|
|
75
|
+
});
|
|
76
|
+
var JoinIdentity = Operation.make({
|
|
77
|
+
meta: {
|
|
78
|
+
key: makeKey("joinIdentity"),
|
|
79
|
+
name: "Join Identity",
|
|
80
|
+
icon: "ph--sign-in--regular"
|
|
81
|
+
},
|
|
82
|
+
services: [Capability.Service],
|
|
83
|
+
input: Schema.Struct({ invitationCode: Schema.optional(Schema.String) }),
|
|
84
|
+
output: Schema.Void
|
|
85
|
+
});
|
|
86
|
+
var ShareIdentity = Operation.make({
|
|
87
|
+
meta: {
|
|
88
|
+
key: makeKey("shareIdentity"),
|
|
89
|
+
name: "Share Identity",
|
|
90
|
+
icon: "ph--share-network--regular"
|
|
91
|
+
},
|
|
92
|
+
services: [Capability.Service],
|
|
93
|
+
input: Schema.Void,
|
|
94
|
+
output: Schema.Void
|
|
95
|
+
});
|
|
96
|
+
var OpenUsage = Operation.make({
|
|
97
|
+
meta: {
|
|
98
|
+
key: makeKey("openUsage"),
|
|
99
|
+
name: "Open Usage",
|
|
100
|
+
icon: "ph--chart-bar--regular"
|
|
101
|
+
},
|
|
102
|
+
services: [Capability.Service],
|
|
103
|
+
input: Schema.Void,
|
|
104
|
+
output: Schema.Void
|
|
105
|
+
});
|
|
106
|
+
var RecoverIdentity = Operation.make({
|
|
107
|
+
meta: {
|
|
108
|
+
key: makeKey("recoverIdentity"),
|
|
109
|
+
name: "Recover Identity",
|
|
110
|
+
icon: "ph--key--regular"
|
|
111
|
+
},
|
|
112
|
+
services: [Capability.Service],
|
|
113
|
+
input: Schema.Void,
|
|
114
|
+
output: Schema.Void
|
|
115
|
+
});
|
|
116
|
+
var ResetStorage = Operation.make({
|
|
117
|
+
meta: {
|
|
118
|
+
key: makeKey("resetStorage"),
|
|
119
|
+
name: "Reset Storage",
|
|
120
|
+
icon: "ph--warning--regular"
|
|
121
|
+
},
|
|
122
|
+
services: [Capability.Service],
|
|
123
|
+
input: Schema.Struct({ mode: Schema.optional(Schema.String) }),
|
|
124
|
+
output: Schema.Void
|
|
125
|
+
});
|
|
126
|
+
var CreateAgent = Operation.make({
|
|
127
|
+
meta: {
|
|
128
|
+
key: makeKey("createAgent"),
|
|
129
|
+
name: "Create Agent",
|
|
130
|
+
icon: "ph--brain--regular"
|
|
131
|
+
},
|
|
132
|
+
services: [Capability.Service],
|
|
133
|
+
input: Schema.Void,
|
|
134
|
+
output: Schema.Void
|
|
135
|
+
});
|
|
136
|
+
var CreateRecoveryCode = Operation.make({
|
|
137
|
+
meta: {
|
|
138
|
+
key: makeKey("createRecoveryCode"),
|
|
139
|
+
name: "Create Recovery Code",
|
|
140
|
+
icon: "ph--key--regular"
|
|
141
|
+
},
|
|
142
|
+
services: [Capability.Service],
|
|
143
|
+
input: Schema.Void,
|
|
144
|
+
output: Schema.Void
|
|
145
|
+
});
|
|
146
|
+
var CreatePasskey = Operation.make({
|
|
147
|
+
meta: {
|
|
148
|
+
key: makeKey("createPasskey"),
|
|
149
|
+
name: "Create Passkey",
|
|
150
|
+
icon: "ph--key--regular"
|
|
151
|
+
},
|
|
152
|
+
services: [Capability.Service],
|
|
153
|
+
input: Schema.Void,
|
|
154
|
+
output: Schema.Void
|
|
155
|
+
});
|
|
156
|
+
var RedeemPasskey = Operation.make({
|
|
157
|
+
meta: {
|
|
158
|
+
key: makeKey("redeemPasskey"),
|
|
159
|
+
name: "Redeem Passkey",
|
|
160
|
+
icon: "ph--key--regular"
|
|
161
|
+
},
|
|
162
|
+
services: [Capability.Service],
|
|
163
|
+
input: Schema.Void,
|
|
164
|
+
output: Schema.Void
|
|
165
|
+
});
|
|
166
|
+
var RedeemToken = Operation.make({
|
|
167
|
+
meta: {
|
|
168
|
+
key: makeKey("redeemToken"),
|
|
169
|
+
name: "Redeem Token",
|
|
170
|
+
icon: "ph--lock--regular"
|
|
171
|
+
},
|
|
172
|
+
services: [Capability.Service],
|
|
173
|
+
input: Schema.Struct({ token: Schema.String }),
|
|
174
|
+
output: Schema.Void
|
|
175
|
+
});
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/operations/errors.ts
|
|
178
|
+
/**
|
|
179
|
+
* The platform prompt produced no assertion. WebAuthn reports a dismissed prompt and
|
|
180
|
+
* "this device has no passkey for this site" identically, so the two cannot be told apart.
|
|
181
|
+
*/
|
|
182
|
+
var PasskeyDismissedError = class extends BaseError.extend("PasskeyDismissedError", "No passkey was presented") {};
|
|
183
|
+
/** The assertion was refused: the passkey is not registered as a recovery credential for any identity. */
|
|
184
|
+
var PasskeyRejectedError = class extends BaseError.extend("PasskeyRejectedError", "Passkey was not accepted") {};
|
|
185
|
+
/** Passkey login failed before an assertion could be checked (service unreachable, unusable authenticator response). */
|
|
186
|
+
var PasskeyLoginError = class extends BaseError.extend("PasskeyLoginError", "Passkey login failed") {};
|
|
187
|
+
/**
|
|
188
|
+
* Classify a rejection from the authenticator. WebAuthn reports a dismissed prompt and
|
|
189
|
+
* "no credential for this site" as the same `NotAllowedError`, so both map to dismissal;
|
|
190
|
+
* the native (Tauri) bridge rejects with a plain string rather than a `DOMException`.
|
|
191
|
+
*/
|
|
192
|
+
var toPasskeyAssertionError = (error) => {
|
|
193
|
+
const name = error instanceof DOMException ? error.name : void 0;
|
|
194
|
+
if (name === "NotAllowedError" || name === "AbortError" || /cancell?ed/i.test(String(error))) return new PasskeyDismissedError({ cause: error });
|
|
195
|
+
return new PasskeyLoginError({ cause: error });
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Classify an error returned by the `RedeemPasskey` operation.
|
|
199
|
+
* Anything unrecognized is reported as a generic failure rather than swallowed.
|
|
200
|
+
*/
|
|
201
|
+
var classifyPasskeyFailure = (error) => {
|
|
202
|
+
if (PasskeyDismissedError.is(error)) return "dismissed";
|
|
203
|
+
if (PasskeyRejectedError.is(error)) return "rejected";
|
|
204
|
+
return "failed";
|
|
205
|
+
};
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/operations/index.ts
|
|
208
|
+
var ClientOperationHandlerSet = OperationHandlerSet.lazy(() => import("./chunk-create-agent.mjs"), () => import("./chunk-create-identity.mjs"), () => import("./chunk-create-passkey.mjs"), () => import("./chunk-create-recovery-code.mjs"), () => import("./chunk-join-identity.mjs"), () => import("./chunk-open-usage.mjs"), () => import("./chunk-recover-identity.mjs"), () => import("./chunk-redeem-passkey.mjs"), () => import("./chunk-redeem-token.mjs"), () => import("./chunk-reset-storage.mjs"), () => import("./chunk-resolve-navigation-targets.mjs"), () => import("./chunk-share-identity.mjs"), () => import("./chunk-update-profile.mjs"));
|
|
209
|
+
//#endregion
|
|
210
|
+
export { ShareIdentity as _, classifyPasskeyFailure as a, CreateIdentity as c, JoinIdentity as d, OpenUsage as f, ResetStorage as g, RedeemToken as h, PasskeyRejectedError as i, CreatePasskey as l, RedeemPasskey as m, PasskeyDismissedError as n, toPasskeyAssertionError as o, RecoverIdentity as p, PasskeyLoginError as r, CreateAgent as s, ClientOperationHandlerSet as t, CreateRecoveryCode as u, UpdateProfile as v, definitions_exports as y };
|
|
211
|
+
|
|
212
|
+
//# sourceMappingURL=chunk-operations.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-operations.mjs","names":[],"sources":["../../src/operations/definitions.ts","../../src/operations/errors.ts","../../src/operations/index.ts"],"sourcesContent":["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { Identity } from '@dxos/halo';\nimport { DXN, IdentityDid, SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nconst IdentitySchema = Schema.Struct({\n identityDid: IdentityDid,\n spaceId: Schema.optional(SpaceId),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nconst ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n});\n\nexport const CreateIdentity = Operation.make({\n meta: { key: makeKey('createIdentity'), name: 'Create Identity', icon: 'ph--user--regular' },\n services: [Capability.Service, Identity.Service],\n input: ProfileSchema,\n output: IdentitySchema,\n});\n\nexport const UpdateProfile = Operation.make({\n meta: { key: makeKey('updateProfile'), name: 'Update Profile', icon: 'ph--user--regular' },\n services: [Identity.Service],\n input: ProfileSchema,\n output: Schema.Void,\n});\n\nexport const JoinIdentity = Operation.make({\n meta: { key: makeKey('joinIdentity'), name: 'Join Identity', icon: 'ph--sign-in--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n});\n\nexport const ShareIdentity = Operation.make({\n meta: {\n key: makeKey('shareIdentity'),\n name: 'Share Identity',\n icon: 'ph--share-network--regular',\n },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const OpenUsage = Operation.make({\n meta: {\n key: makeKey('openUsage'),\n name: 'Open Usage',\n icon: 'ph--chart-bar--regular',\n },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const RecoverIdentity = Operation.make({\n meta: { key: makeKey('recoverIdentity'), name: 'Recover Identity', icon: 'ph--key--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const ResetStorage = Operation.make({\n meta: { key: makeKey('resetStorage'), name: 'Reset Storage', icon: 'ph--warning--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n});\n\nexport const CreateAgent = Operation.make({\n meta: { key: makeKey('createAgent'), name: 'Create Agent', icon: 'ph--brain--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const CreateRecoveryCode = Operation.make({\n meta: {\n key: makeKey('createRecoveryCode'),\n name: 'Create Recovery Code',\n icon: 'ph--key--regular',\n },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const CreatePasskey = Operation.make({\n meta: { key: makeKey('createPasskey'), name: 'Create Passkey', icon: 'ph--key--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const RedeemPasskey = Operation.make({\n meta: { key: makeKey('redeemPasskey'), name: 'Redeem Passkey', icon: 'ph--key--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const RedeemToken = Operation.make({\n meta: { key: makeKey('redeemToken'), name: 'Redeem Token', icon: 'ph--lock--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n});\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { BaseError } from '@dxos/errors';\n\n/**\n * The platform prompt produced no assertion. WebAuthn reports a dismissed prompt and\n * \"this device has no passkey for this site\" identically, so the two cannot be told apart.\n */\nexport class PasskeyDismissedError extends BaseError.extend('PasskeyDismissedError', 'No passkey was presented') {}\n\n/** The assertion was refused: the passkey is not registered as a recovery credential for any identity. */\nexport class PasskeyRejectedError extends BaseError.extend('PasskeyRejectedError', 'Passkey was not accepted') {}\n\n/** Passkey login failed before an assertion could be checked (service unreachable, unusable authenticator response). */\nexport class PasskeyLoginError extends BaseError.extend('PasskeyLoginError', 'Passkey login failed') {}\n\n/**\n * Classify a rejection from the authenticator. WebAuthn reports a dismissed prompt and\n * \"no credential for this site\" as the same `NotAllowedError`, so both map to dismissal;\n * the native (Tauri) bridge rejects with a plain string rather than a `DOMException`.\n */\nexport const toPasskeyAssertionError = (error: unknown): PasskeyDismissedError | PasskeyLoginError => {\n const name = error instanceof DOMException ? error.name : undefined;\n if (name === 'NotAllowedError' || name === 'AbortError' || /cancell?ed/i.test(String(error))) {\n return new PasskeyDismissedError({ cause: error });\n }\n return new PasskeyLoginError({ cause: error });\n};\n\n/** Discriminates a passkey login failure so callers can pick a message without matching on error names. */\nexport type PasskeyFailure = 'dismissed' | 'rejected' | 'failed';\n\n/**\n * Classify an error returned by the `RedeemPasskey` operation.\n * Anything unrecognized is reported as a generic failure rather than swallowed.\n */\nexport const classifyPasskeyFailure = (error: unknown): PasskeyFailure => {\n if (PasskeyDismissedError.is(error)) {\n return 'dismissed';\n }\n if (PasskeyRejectedError.is(error)) {\n return 'rejected';\n }\n return 'failed';\n};\n","//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport * as ClientOperation from './definitions';\nexport * from './errors';\n\nexport const ClientOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./create-agent'),\n () => import('./create-identity'),\n () => import('./create-passkey'),\n () => import('./create-recovery-code'),\n () => import('./join-identity'),\n () => import('./open-usage'),\n () => import('./recover-identity'),\n () => import('./redeem-passkey'),\n () => import('./redeem-token'),\n () => import('./reset-storage'),\n () => import('./resolve-navigation-targets'),\n () => import('./share-identity'),\n () => import('./update-profile'),\n);\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { meta } from "#meta";
|
|
2
|
+
//#region src/progress/progress-keys.ts
|
|
3
|
+
/** Stable progress-monitor key for automerge document replication in a space. */
|
|
4
|
+
var createSpaceReplicationProgressKey = (spaceId) => `${meta.profile.key}:space:${spaceId}#replication`;
|
|
5
|
+
/** Stable progress-monitor key for ECHO feed block replication in a space. */
|
|
6
|
+
var createSpaceFeedReplicationProgressKey = (spaceId) => `${meta.profile.key}:space:${spaceId}#feeds`;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { createSpaceReplicationProgressKey as n, createSpaceFeedReplicationProgressKey as t };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=chunk-progress.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-progress.mjs","names":[],"sources":["../../src/progress/progress-keys.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\n/** Stable progress-monitor key for automerge document replication in a space. */\nexport const createSpaceReplicationProgressKey = (spaceId: SpaceId): string =>\n `${meta.profile.key}:space:${spaceId}#replication`;\n\n/** Stable progress-monitor key for ECHO feed block replication in a space. */\nexport const createSpaceFeedReplicationProgressKey = (spaceId: SpaceId): string =>\n `${meta.profile.key}:space:${spaceId}#feeds`;\n"],"mappings":";;;AASA,IAAa,qCAAqC,YAChD,GAAG,KAAK,QAAQ,IAAI,SAAS,QAAQ;;AAGvC,IAAa,yCAAyC,YACpD,GAAG,KAAK,QAAQ,IAAI,SAAS,QAAQ"}
|