@dxos/plugin-client 0.12.0-next-73daef452f1464b62efdbca75fb0067c1066f264 → 0.13.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.
- package/dist/lib/Account.mjs +29 -10
- package/dist/lib/Account.mjs.map +1 -1
- package/dist/lib/CliLogin.mjs +78 -0
- package/dist/lib/CliLogin.mjs.map +1 -0
- package/dist/lib/ClientCapabilities.mjs +25 -1
- package/dist/lib/ClientCapabilities.mjs.map +1 -1
- package/dist/lib/ClientEvents.mjs +7 -3
- package/dist/lib/ClientEvents.mjs.map +1 -1
- package/dist/lib/{chunk-definitions.mjs → ClientOperation.mjs} +11 -7
- package/dist/lib/ClientOperation.mjs.map +1 -0
- package/dist/lib/ClientOptions.mjs.map +1 -1
- package/dist/lib/PasskeyError.mjs +69 -12
- package/dist/lib/PasskeyError.mjs.map +1 -1
- package/dist/lib/capabilities.browser.mjs +134 -0
- package/dist/lib/capabilities.browser.mjs.map +1 -0
- package/dist/lib/capabilities.mjs +47 -10
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.node.mjs +40 -7
- package/dist/lib/capabilities.node.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +134 -0
- package/dist/lib/capabilities.tauri.mjs.map +1 -0
- package/dist/lib/capabilities.workerd.mjs +24 -4
- package/dist/lib/capabilities.workerd.mjs.map +1 -1
- package/dist/lib/chunk-AccountContainer.mjs +53 -41
- package/dist/lib/chunk-AccountContainer.mjs.map +1 -1
- package/dist/lib/chunk-CliLoginDialog.mjs +146 -0
- package/dist/lib/chunk-CliLoginDialog.mjs.map +1 -0
- package/dist/lib/chunk-ContactPickerContainer.mjs +120 -0
- package/dist/lib/chunk-ContactPickerContainer.mjs.map +1 -0
- package/dist/lib/chunk-ContactsContainer.mjs +53 -0
- package/dist/lib/chunk-ContactsContainer.mjs.map +1 -0
- package/dist/lib/chunk-DevicesContainer.mjs +48 -112
- package/dist/lib/chunk-DevicesContainer.mjs.map +1 -1
- package/dist/lib/chunk-HaloServices.mjs +28 -0
- package/dist/lib/chunk-HaloServices.mjs.map +1 -0
- package/dist/lib/chunk-InvitationsContainer.mjs +61 -39
- package/dist/lib/chunk-InvitationsContainer.mjs.map +1 -1
- package/dist/lib/chunk-JoinDialog.mjs +10 -9
- package/dist/lib/chunk-JoinDialog.mjs.map +1 -1
- package/dist/lib/chunk-ProfileContainer.mjs +60 -39
- package/dist/lib/chunk-ProfileContainer.mjs.map +1 -1
- package/dist/lib/chunk-RecoveryCodeDialog.mjs +26 -21
- package/dist/lib/chunk-RecoveryCodeDialog.mjs.map +1 -1
- package/dist/lib/chunk-RecoveryCredentialsContainer.mjs +95 -65
- package/dist/lib/chunk-RecoveryCredentialsContainer.mjs.map +1 -1
- package/dist/lib/chunk-ResetDialog.mjs +26 -14
- package/dist/lib/chunk-ResetDialog.mjs.map +1 -1
- package/dist/lib/chunk-SpaceInvitationContainer.mjs +50 -0
- package/dist/lib/chunk-SpaceInvitationContainer.mjs.map +1 -0
- package/dist/lib/chunk-UsageContainer.mjs +22 -20
- package/dist/lib/chunk-UsageContainer.mjs.map +1 -1
- package/dist/lib/chunk-account-cache.mjs +2 -2
- package/dist/lib/chunk-account-cache.mjs.map +1 -1
- package/dist/lib/chunk-app-graph-builder.mjs +159 -60
- package/dist/lib/chunk-app-graph-builder.mjs.map +1 -1
- package/dist/lib/chunk-client-services.mjs +21 -0
- package/dist/lib/chunk-client-services.mjs.map +1 -0
- package/dist/lib/chunk-client.mjs +27 -20
- package/dist/lib/chunk-client.mjs.map +1 -1
- package/dist/lib/chunk-constants.mjs +2 -1
- package/dist/lib/chunk-constants.mjs.map +1 -1
- package/dist/lib/chunk-create-agent.mjs +1 -1
- package/dist/lib/chunk-create-agent.mjs.map +1 -1
- package/dist/lib/chunk-create-identity.mjs +2 -2
- package/dist/lib/chunk-create-identity.mjs.map +1 -1
- package/dist/lib/chunk-create-passkey.mjs +49 -40
- package/dist/lib/chunk-create-passkey.mjs.map +1 -1
- package/dist/lib/chunk-create-recovery-code.mjs +2 -2
- package/dist/lib/chunk-create-recovery-code.mjs.map +1 -1
- package/dist/lib/chunk-grant-service-access.mjs +1 -1
- package/dist/lib/chunk-grant-service-access.mjs.map +1 -1
- package/dist/lib/chunk-halo.mjs +414 -0
- package/dist/lib/chunk-halo.mjs.map +1 -0
- package/dist/lib/chunk-identity-lifecycle.mjs +74 -0
- package/dist/lib/chunk-identity-lifecycle.mjs.map +1 -0
- package/dist/lib/chunk-join-identity.mjs +2 -2
- package/dist/lib/chunk-join-identity.mjs.map +1 -1
- package/dist/lib/chunk-layer-specs.mjs +72 -5
- package/dist/lib/chunk-layer-specs.mjs.map +1 -1
- package/dist/lib/chunk-navigation-handler.mjs +28 -5
- package/dist/lib/chunk-navigation-handler.mjs.map +1 -1
- package/dist/lib/chunk-navigation-target-loader.mjs +8 -9
- package/dist/lib/chunk-navigation-target-loader.mjs.map +1 -1
- package/dist/lib/chunk-open-usage.mjs +3 -3
- package/dist/lib/chunk-open-usage.mjs.map +1 -1
- package/dist/lib/chunk-react-context.mjs +5 -5
- package/dist/lib/chunk-react-context.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +80 -64
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-recover-identity.mjs +2 -2
- package/dist/lib/chunk-recover-identity.mjs.map +1 -1
- package/dist/lib/chunk-redeem-passkey.mjs +7 -5
- package/dist/lib/chunk-redeem-passkey.mjs.map +1 -1
- package/dist/lib/chunk-redeem-token.mjs +1 -1
- package/dist/lib/chunk-redeem-token.mjs.map +1 -1
- package/dist/lib/chunk-remote-trace-monitor.mjs +3 -2
- package/dist/lib/chunk-remote-trace-monitor.mjs.map +1 -1
- package/dist/lib/chunk-reset-storage.mjs +6 -3
- package/dist/lib/chunk-reset-storage.mjs.map +1 -1
- package/dist/lib/chunk-resolve-navigation-targets.mjs +3 -3
- package/dist/lib/chunk-resolve-navigation-targets.mjs.map +1 -1
- package/dist/lib/chunk-revoke-recovery-credential.mjs +1 -1
- package/dist/lib/chunk-revoke-recovery-credential.mjs.map +1 -1
- package/dist/lib/chunk-share-identity.mjs +2 -2
- package/dist/lib/chunk-share-identity.mjs.map +1 -1
- package/dist/lib/chunk-space-replication-progress.mjs +49 -7
- package/dist/lib/chunk-space-replication-progress.mjs.map +1 -1
- package/dist/lib/chunk-trace-progress.mjs +5 -5
- package/dist/lib/chunk-trace-progress.mjs.map +1 -1
- package/dist/lib/chunk-update-profile.mjs +1 -1
- package/dist/lib/chunk-update-profile.mjs.map +1 -1
- package/dist/lib/chunk-useAccountUrl.mjs +23 -0
- package/dist/lib/chunk-useAccountUrl.mjs.map +1 -0
- package/dist/lib/chunk-useHubClient.mjs +30 -0
- package/dist/lib/chunk-useHubClient.mjs.map +1 -0
- package/dist/lib/commands.mjs +1 -1
- package/dist/lib/commands.mjs.map +1 -1
- package/dist/lib/commands.node.mjs +771 -1
- package/dist/lib/commands.node.mjs.map +1 -1
- package/dist/lib/components.mjs +91 -0
- package/dist/lib/components.mjs.map +1 -0
- package/dist/lib/containers.mjs +5 -1
- package/dist/lib/containers.mjs.map +1 -1
- package/dist/lib/index.mjs +2 -27
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/ns/HaloServices.mjs +2 -0
- package/dist/lib/operations.mjs +3 -3
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/plugin.mjs +2 -2
- package/dist/lib/plugin.mjs.map +1 -1
- package/dist/lib/testing.mjs +71 -2
- package/dist/lib/testing.mjs.map +1 -1
- package/dist/lib/translations.mjs +26 -5
- package/dist/lib/translations.mjs.map +1 -1
- package/dist/lib/types.mjs +3 -1
- package/dist/types/src/HaloServices.d.ts +2 -0
- package/dist/types/src/HaloServices.d.ts.map +1 -0
- package/dist/types/src/capabilities/client-services.d.ts +9 -0
- package/dist/types/src/capabilities/client-services.d.ts.map +1 -0
- package/dist/types/src/capabilities/client.d.ts +33 -2
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/commands.d.ts +1 -1
- package/dist/types/src/capabilities/commands.d.ts.map +1 -1
- package/dist/types/src/capabilities/commands.node.d.ts +1 -1
- package/dist/types/src/capabilities/commands.node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/browser.d.ts +45 -0
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/node.d.ts +3 -1
- package/dist/types/src/capabilities/gen/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts +45 -0
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts +2 -0
- package/dist/types/src/capabilities/gen/workerd.d.ts.map +1 -1
- package/dist/types/src/capabilities/identity-lifecycle.d.ts +14 -0
- package/dist/types/src/capabilities/identity-lifecycle.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -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 +1 -6
- package/dist/types/src/capabilities/navigation-target-loader.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/remote-trace-monitor.d.ts +1 -1
- package/dist/types/src/capabilities/remote-trace-monitor.d.ts.map +1 -1
- package/dist/types/src/capabilities/trace-progress.d.ts +2 -2
- package/dist/types/src/commands/account/index.d.ts +1 -1
- package/dist/types/src/commands/account/index.d.ts.map +1 -1
- package/dist/types/src/commands/account/invitation/create/create.d.ts +4 -3
- package/dist/types/src/commands/account/invitation/create/create.d.ts.map +1 -1
- package/dist/types/src/commands/account/invitation/create/index.d.ts +1 -1
- package/dist/types/src/commands/account/invitation/create/index.d.ts.map +1 -1
- package/dist/types/src/commands/account/invitation/index.d.ts +2 -2
- package/dist/types/src/commands/account/invitation/index.d.ts.map +1 -1
- package/dist/types/src/commands/account/login/index.d.ts +1 -1
- package/dist/types/src/commands/account/login/index.d.ts.map +1 -1
- package/dist/types/src/commands/account/login/login.d.ts +6 -5
- package/dist/types/src/commands/account/login/login.d.ts.map +1 -1
- package/dist/types/src/commands/account/logout/index.d.ts +1 -1
- package/dist/types/src/commands/account/logout/index.d.ts.map +1 -1
- package/dist/types/src/commands/account/logout/logout.d.ts +2 -2
- package/dist/types/src/commands/account/logout/logout.d.ts.map +1 -1
- package/dist/types/src/commands/account/signup/index.d.ts +1 -1
- package/dist/types/src/commands/account/signup/index.d.ts.map +1 -1
- package/dist/types/src/commands/account/signup/signup.d.ts +5 -4
- package/dist/types/src/commands/account/signup/signup.d.ts.map +1 -1
- package/dist/types/src/commands/account/util.d.ts +1 -1
- package/dist/types/src/commands/account/util.d.ts.map +1 -1
- package/dist/types/src/commands/config/index.d.ts +1 -1
- package/dist/types/src/commands/config/index.d.ts.map +1 -1
- package/dist/types/src/commands/config/view.d.ts +1 -1
- package/dist/types/src/commands/config/view.d.ts.map +1 -1
- package/dist/types/src/commands/device/index.d.ts +1 -1
- package/dist/types/src/commands/device/index.d.ts.map +1 -1
- package/dist/types/src/commands/device/info/index.d.ts +1 -1
- package/dist/types/src/commands/device/info/index.d.ts.map +1 -1
- package/dist/types/src/commands/device/info/info.d.ts +1 -1
- package/dist/types/src/commands/device/info/info.d.ts.map +1 -1
- package/dist/types/src/commands/device/list/index.d.ts +1 -1
- package/dist/types/src/commands/device/list/index.d.ts.map +1 -1
- package/dist/types/src/commands/device/list/list.d.ts +1 -1
- package/dist/types/src/commands/device/list/list.d.ts.map +1 -1
- package/dist/types/src/commands/device/update/index.d.ts +1 -1
- package/dist/types/src/commands/device/update/index.d.ts.map +1 -1
- package/dist/types/src/commands/device/update/update.d.ts +1 -1
- package/dist/types/src/commands/device/update/update.d.ts.map +1 -1
- package/dist/types/src/commands/device/util.d.ts +1 -1
- package/dist/types/src/commands/device/util.d.ts.map +1 -1
- package/dist/types/src/commands/edge/index.d.ts +1 -1
- package/dist/types/src/commands/edge/index.d.ts.map +1 -1
- package/dist/types/src/commands/edge/status.d.ts +1 -1
- package/dist/types/src/commands/edge/status.d.ts.map +1 -1
- package/dist/types/src/commands/errors.d.ts +33 -0
- package/dist/types/src/commands/errors.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts +5 -4
- package/dist/types/src/commands/halo/credential/add/add.d.ts.map +1 -1
- package/dist/types/src/commands/halo/credential/add/index.d.ts +1 -1
- package/dist/types/src/commands/halo/credential/add/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/credential/index.d.ts +2 -2
- package/dist/types/src/commands/halo/credential/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/credential/list/index.d.ts +1 -1
- package/dist/types/src/commands/halo/credential/list/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/credential/list/list.d.ts +1 -1
- package/dist/types/src/commands/halo/credential/list/list.d.ts.map +1 -1
- package/dist/types/src/commands/halo/identity/identity.d.ts +1 -1
- package/dist/types/src/commands/halo/identity/identity.d.ts.map +1 -1
- package/dist/types/src/commands/halo/identity/index.d.ts +1 -1
- package/dist/types/src/commands/halo/identity/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/index.d.ts +1 -1
- package/dist/types/src/commands/halo/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/keys/index.d.ts +1 -1
- package/dist/types/src/commands/halo/keys/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/keys/keys.d.ts +1 -1
- package/dist/types/src/commands/halo/keys/keys.d.ts.map +1 -1
- package/dist/types/src/commands/halo/seed/index.d.ts +1 -1
- package/dist/types/src/commands/halo/seed/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/seed/seed.d.ts +1 -1
- package/dist/types/src/commands/halo/seed/seed.d.ts.map +1 -1
- package/dist/types/src/commands/halo/share/index.d.ts +1 -1
- package/dist/types/src/commands/halo/share/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/share/share.d.ts +4 -3
- package/dist/types/src/commands/halo/share/share.d.ts.map +1 -1
- package/dist/types/src/commands/halo/update/index.d.ts +1 -1
- package/dist/types/src/commands/halo/update/index.d.ts.map +1 -1
- package/dist/types/src/commands/halo/update/update.d.ts +1 -1
- package/dist/types/src/commands/halo/update/update.d.ts.map +1 -1
- package/dist/types/src/commands/halo/util.d.ts +2 -2
- package/dist/types/src/commands/halo/util.d.ts.map +1 -1
- package/dist/types/src/commands/index.d.ts +6 -6
- package/dist/types/src/commands/index.d.ts.map +1 -1
- package/dist/types/src/commands/profile/create.d.ts +1 -1
- package/dist/types/src/commands/profile/create.d.ts.map +1 -1
- package/dist/types/src/commands/profile/delete.d.ts +1 -1
- package/dist/types/src/commands/profile/delete.d.ts.map +1 -1
- package/dist/types/src/commands/profile/import.d.ts +5 -4
- package/dist/types/src/commands/profile/import.d.ts.map +1 -1
- package/dist/types/src/commands/profile/index.d.ts +2 -2
- package/dist/types/src/commands/profile/index.d.ts.map +1 -1
- package/dist/types/src/commands/profile/inspect.d.ts +1 -1
- package/dist/types/src/commands/profile/inspect.d.ts.map +1 -1
- package/dist/types/src/commands/profile/list.d.ts +1 -1
- package/dist/types/src/commands/profile/list.d.ts.map +1 -1
- package/dist/types/src/commands/profile/reset.d.ts +2 -2
- package/dist/types/src/commands/profile/reset.d.ts.map +1 -1
- package/dist/types/src/components/DevicesForm/DevicesForm.d.ts +19 -0
- package/dist/types/src/components/DevicesForm/DevicesForm.d.ts.map +1 -0
- package/dist/types/src/components/DevicesForm/DevicesForm.stories.d.ts +207 -0
- package/dist/types/src/components/DevicesForm/DevicesForm.stories.d.ts.map +1 -0
- package/dist/types/src/components/DevicesForm/index.d.ts +2 -0
- package/dist/types/src/components/DevicesForm/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +1 -0
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts +1 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AccountContainer/index.d.ts +1 -1
- package/dist/types/src/containers/AccountContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/CliLoginDialog/CliLoginDialog.d.ts +12 -0
- package/dist/types/src/containers/CliLoginDialog/CliLoginDialog.d.ts.map +1 -0
- package/dist/types/src/containers/CliLoginDialog/index.d.ts +4 -0
- package/dist/types/src/containers/CliLoginDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ContactPickerContainer/ContactPickerContainer.d.ts +8 -0
- package/dist/types/src/containers/ContactPickerContainer/ContactPickerContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ContactPickerContainer/ContactPickerContainer.stories.d.ts +206 -0
- package/dist/types/src/containers/ContactPickerContainer/ContactPickerContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ContactPickerContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ContactPickerContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ContactsContainer/ContactsContainer.d.ts +3 -0
- package/dist/types/src/containers/ContactsContainer/ContactsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ContactsContainer/ContactsContainer.stories.d.ts +203 -0
- package/dist/types/src/containers/ContactsContainer/ContactsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ContactsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ContactsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +19 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/index.d.ts +1 -1
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts +1 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/InvitationsContainer/index.d.ts +1 -1
- package/dist/types/src/containers/InvitationsContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +1 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/JoinDialog/index.d.ts +1 -1
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +1 -1
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ProfileContainer/index.d.ts +1 -1
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +2 -2
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +6 -7
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +2 -2
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ResetDialog/index.d.ts +2 -2
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -1
- package/dist/types/src/containers/SpaceInvitationContainer/SpaceInvitationContainer.d.ts +10 -0
- package/dist/types/src/containers/SpaceInvitationContainer/SpaceInvitationContainer.d.ts.map +1 -0
- package/dist/types/src/containers/SpaceInvitationContainer/index.d.ts +2 -0
- package/dist/types/src/containers/SpaceInvitationContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/UsageContainer/UsageView.d.ts.map +1 -1
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts +1 -1
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts.map +1 -1
- package/dist/types/src/containers/UsageContainer/index.d.ts +1 -1
- package/dist/types/src/containers/UsageContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +9 -3
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +2 -2
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/create-agent.d.ts +2 -2
- package/dist/types/src/operations/create-agent.d.ts.map +1 -1
- package/dist/types/src/operations/create-identity.d.ts +2 -2
- package/dist/types/src/operations/create-identity.d.ts.map +1 -1
- package/dist/types/src/operations/create-passkey.d.ts +2 -2
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -1
- package/dist/types/src/operations/create-recovery-code.d.ts +2 -2
- package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -1
- package/dist/types/src/operations/grant-service-access.d.ts +2 -2
- package/dist/types/src/operations/grant-service-access.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/join-identity.d.ts +2 -2
- package/dist/types/src/operations/join-identity.d.ts.map +1 -1
- package/dist/types/src/operations/open-usage.d.ts +2 -2
- package/dist/types/src/operations/open-usage.d.ts.map +1 -1
- package/dist/types/src/operations/recover-identity.d.ts +2 -2
- package/dist/types/src/operations/recover-identity.d.ts.map +1 -1
- package/dist/types/src/operations/redeem-passkey.d.ts +2 -2
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -1
- package/dist/types/src/operations/redeem-token.d.ts +2 -2
- package/dist/types/src/operations/redeem-token.d.ts.map +1 -1
- package/dist/types/src/operations/reset-storage.d.ts +2 -2
- package/dist/types/src/operations/reset-storage.d.ts.map +1 -1
- package/dist/types/src/operations/revoke-recovery-credential.d.ts +2 -2
- package/dist/types/src/operations/revoke-recovery-credential.d.ts.map +1 -1
- package/dist/types/src/operations/share-identity.d.ts +2 -2
- package/dist/types/src/operations/share-identity.d.ts.map +1 -1
- package/dist/types/src/operations/update-profile.d.ts +2 -2
- package/dist/types/src/operations/update-profile.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts.map +1 -1
- package/dist/types/src/progress/index.d.ts +2 -2
- package/dist/types/src/progress/index.d.ts.map +1 -1
- package/dist/types/src/progress/space-sync-progress.d.ts +10 -1
- package/dist/types/src/progress/space-sync-progress.d.ts.map +1 -1
- package/dist/types/src/testing/ClientPluginManager.d.ts +18 -0
- package/dist/types/src/testing/ClientPluginManager.d.ts.map +1 -0
- package/dist/types/src/testing/createFakeContacts.d.ts +16 -0
- package/dist/types/src/testing/createFakeContacts.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +4 -2
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/initializeIdentity.d.ts +1 -1
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -2
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Account.d.ts +21 -7
- package/dist/types/src/types/Account.d.ts.map +1 -1
- package/dist/types/src/types/CliLogin.d.ts +33 -0
- package/dist/types/src/types/CliLogin.d.ts.map +1 -0
- package/dist/types/src/types/ClientCapabilities.d.ts +32 -3
- package/dist/types/src/types/ClientCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/ClientEvents.d.ts +5 -1
- package/dist/types/src/types/ClientEvents.d.ts.map +1 -1
- package/dist/types/src/{operations/definitions.d.ts → types/ClientOperation.d.ts} +2 -1
- package/dist/types/src/types/ClientOperation.d.ts.map +1 -0
- package/dist/types/src/types/ClientOptions.d.ts +1 -8
- package/dist/types/src/types/ClientOptions.d.ts.map +1 -1
- package/dist/types/src/types/PasskeyError.d.ts +112 -11
- package/dist/types/src/types/PasskeyError.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +9 -7
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +72 -61
- package/src/HaloServices.ts +7 -0
- package/src/capabilities/account-cache.ts +2 -2
- package/src/capabilities/app-graph-builder.ts +165 -69
- package/src/capabilities/client-services.ts +25 -0
- package/src/capabilities/client.ts +17 -12
- package/src/capabilities/commands.node.ts +1 -1
- package/src/capabilities/commands.ts +1 -1
- package/src/capabilities/gen/browser.ts +192 -0
- package/src/capabilities/gen/node.ts +48 -19
- package/src/capabilities/gen/tauri.ts +192 -0
- package/src/capabilities/gen/workerd.ts +41 -13
- package/src/capabilities/identity-lifecycle.ts +86 -0
- package/src/capabilities/index.ts +57 -26
- package/src/capabilities/layer-specs.ts +107 -4
- package/src/capabilities/navigation-handler/index.ts +2 -2
- package/src/capabilities/navigation-handler/navigation-handler.ts +20 -1
- package/src/capabilities/navigation-target-loader.ts +15 -10
- package/src/capabilities/react-context.tsx +2 -2
- package/src/capabilities/react-surface.ts +43 -18
- package/src/capabilities/remote-trace-monitor.ts +5 -2
- package/src/capabilities/schema-defs.test.ts +2 -2
- package/src/capabilities/space-replication-progress.ts +12 -7
- package/src/capabilities/trace-progress.ts +6 -6
- package/src/commands/account/index.ts +5 -5
- package/src/commands/account/invitation/create/create.ts +9 -5
- package/src/commands/account/invitation/create/index.ts +1 -1
- package/src/commands/account/invitation/index.ts +2 -2
- package/src/commands/account/login/index.ts +1 -1
- package/src/commands/account/login/login.ts +108 -37
- package/src/commands/account/logout/index.ts +1 -1
- package/src/commands/account/logout/logout.ts +8 -5
- package/src/commands/account/signup/index.ts +1 -1
- package/src/commands/account/signup/signup.ts +33 -19
- package/src/commands/account/util.test.ts +1 -1
- package/src/commands/account/util.ts +2 -2
- package/src/commands/config/index.ts +2 -2
- package/src/commands/config/view.ts +1 -1
- package/src/commands/device/index.ts +4 -4
- package/src/commands/device/info/index.ts +1 -1
- package/src/commands/device/info/info.test.ts +4 -3
- package/src/commands/device/info/info.ts +5 -4
- package/src/commands/device/list/index.ts +1 -1
- package/src/commands/device/list/list.test.ts +2 -2
- package/src/commands/device/list/list.ts +2 -2
- package/src/commands/device/update/index.ts +1 -1
- package/src/commands/device/update/update.ts +8 -9
- package/src/commands/device/util.ts +6 -5
- package/src/commands/edge/index.ts +2 -2
- package/src/commands/edge/status.ts +1 -1
- package/src/commands/errors.ts +8 -0
- package/src/commands/halo/credential/add/add.ts +13 -16
- package/src/commands/halo/credential/add/index.ts +1 -1
- package/src/commands/halo/credential/index.ts +3 -3
- package/src/commands/halo/credential/list/index.ts +1 -1
- package/src/commands/halo/credential/list/list.test.ts +2 -2
- package/src/commands/halo/credential/list/list.ts +15 -14
- package/src/commands/halo/identity/identity.test.ts +7 -3
- package/src/commands/halo/identity/identity.ts +2 -2
- package/src/commands/halo/identity/index.ts +1 -1
- package/src/commands/halo/index.ts +7 -7
- package/src/commands/halo/keys/index.ts +1 -1
- package/src/commands/halo/keys/keys.test.ts +5 -4
- package/src/commands/halo/keys/keys.ts +6 -5
- package/src/commands/halo/seed/index.ts +1 -1
- package/src/commands/halo/seed/seed.ts +1 -1
- package/src/commands/halo/share/index.ts +1 -1
- package/src/commands/halo/share/share.ts +15 -10
- package/src/commands/halo/update/index.ts +1 -1
- package/src/commands/halo/update/update.test.ts +2 -2
- package/src/commands/halo/update/update.ts +7 -17
- package/src/commands/halo/util.ts +11 -7
- package/src/commands/index.ts +6 -6
- package/src/commands/profile/create.ts +5 -5
- package/src/commands/profile/delete.ts +4 -4
- package/src/commands/profile/import.ts +17 -14
- package/src/commands/profile/index.ts +7 -7
- package/src/commands/profile/inspect.ts +9 -6
- package/src/commands/profile/list.ts +2 -2
- package/src/commands/profile/reset.ts +9 -6
- package/src/components/DevicesForm/DevicesForm.stories.tsx +62 -0
- package/src/components/DevicesForm/DevicesForm.tsx +100 -0
- package/src/components/DevicesForm/index.ts +5 -0
- package/src/components/index.ts +2 -0
- package/src/constants.ts +1 -0
- package/src/containers/AccountContainer/AccountContainer.stories.tsx +3 -3
- package/src/containers/AccountContainer/AccountContainer.tsx +54 -43
- package/src/containers/AccountContainer/index.ts +1 -1
- package/src/containers/CliLoginDialog/CliLoginDialog.tsx +159 -0
- package/src/containers/CliLoginDialog/index.ts +8 -0
- package/src/containers/ContactPickerContainer/ContactPickerContainer.stories.tsx +66 -0
- package/src/containers/ContactPickerContainer/ContactPickerContainer.tsx +126 -0
- package/src/containers/ContactPickerContainer/index.ts +5 -0
- package/src/containers/ContactsContainer/ContactsContainer.stories.tsx +48 -0
- package/src/containers/ContactsContainer/ContactsContainer.tsx +61 -0
- package/src/containers/ContactsContainer/index.ts +5 -0
- package/src/containers/DevicesContainer/DevicesContainer.stories.tsx +3 -3
- package/src/containers/DevicesContainer/DevicesContainer.tsx +45 -103
- package/src/containers/DevicesContainer/index.ts +1 -1
- package/src/containers/InvitationsContainer/InvitationsContainer.stories.tsx +3 -3
- package/src/containers/InvitationsContainer/InvitationsContainer.tsx +63 -60
- package/src/containers/InvitationsContainer/index.ts +1 -1
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +5 -7
- package/src/containers/JoinDialog/JoinDialog.tsx +10 -9
- package/src/containers/JoinDialog/index.ts +1 -1
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +3 -3
- package/src/containers/ProfileContainer/ProfileContainer.tsx +72 -55
- package/src/containers/ProfileContainer/index.ts +1 -1
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.tsx +5 -6
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx +27 -29
- package/src/containers/RecoveryCodeDialog/index.ts +2 -2
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +7 -7
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +69 -41
- package/src/containers/RecoveryCredentialsContainer/index.ts +1 -1
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +9 -21
- package/src/containers/ResetDialog/ResetDialog.tsx +35 -24
- package/src/containers/ResetDialog/index.ts +2 -2
- package/src/containers/SpaceInvitationContainer/SpaceInvitationContainer.tsx +62 -0
- package/src/containers/SpaceInvitationContainer/index.ts +8 -0
- package/src/containers/UsageContainer/UsageContainer.tsx +4 -4
- package/src/containers/UsageContainer/UsageView.stories.tsx +1 -1
- package/src/containers/UsageContainer/UsageView.tsx +22 -24
- package/src/containers/UsageContainer/index.ts +1 -1
- package/src/containers/index.ts +23 -12
- package/src/hooks/index.ts +2 -2
- package/src/hooks/useAccountUrl.ts +1 -1
- package/src/hooks/useHubClient.ts +3 -3
- package/src/index.ts +2 -5
- package/src/meta.ts +1 -1
- package/src/operations/create-agent.ts +2 -2
- package/src/operations/create-identity.ts +5 -3
- package/src/operations/create-passkey.ts +59 -37
- package/src/operations/create-recovery-code.ts +16 -15
- package/src/operations/grant-service-access.ts +9 -8
- package/src/operations/index.ts +17 -30
- package/src/operations/join-identity.ts +3 -3
- package/src/operations/open-usage.ts +3 -3
- package/src/operations/recover-identity.ts +3 -3
- package/src/operations/redeem-passkey.ts +63 -65
- package/src/operations/redeem-token.ts +2 -2
- package/src/operations/reset-storage.ts +4 -3
- package/src/operations/resolve-navigation-targets.ts +1 -1
- package/src/operations/revoke-recovery-credential.ts +9 -8
- package/src/operations/share-identity.ts +2 -2
- package/src/operations/update-profile.ts +2 -2
- package/src/plugin.test.ts +2 -2
- package/src/plugin.ts +30 -25
- package/src/progress/index.ts +2 -2
- package/src/progress/space-sync-progress.test.ts +36 -13
- package/src/progress/space-sync-progress.ts +21 -6
- package/src/schema-defs.test.ts +2 -2
- package/src/testing/ClientPluginManager.tsx +44 -0
- package/src/testing/createFakeContacts.ts +57 -0
- package/src/testing/index.ts +4 -2
- package/src/testing/initializeIdentity.ts +6 -2
- package/src/translations.ts +33 -9
- package/src/types/Account.ts +27 -11
- package/src/types/CliLogin.ts +78 -0
- package/src/types/ClientCapabilities.ts +38 -4
- package/src/types/ClientEvents.ts +5 -1
- package/src/{operations/definitions.ts → types/ClientOperation.ts} +5 -1
- package/src/types/ClientOptions.ts +3 -7
- package/src/types/PasskeyError.test.ts +96 -1
- package/src/types/PasskeyError.ts +85 -15
- package/src/types/index.ts +9 -7
- package/dist/lib/chunk-commands.mjs +0 -1090
- package/dist/lib/chunk-commands.mjs.map +0 -1
- package/dist/lib/chunk-definitions.mjs.map +0 -1
- package/dist/lib/chunk-hooks.mjs +0 -49
- package/dist/lib/chunk-hooks.mjs.map +0 -1
- package/dist/lib/chunk-progress.mjs +0 -35
- package/dist/lib/chunk-progress.mjs.map +0 -1
- package/dist/lib/index.mjs.map +0 -1
- package/dist/types/src/operations/definitions.d.ts.map +0 -1
|
@@ -7,10 +7,10 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import * as LayoutOperation from '@dxos/app-toolkit/LayoutOperation';
|
|
8
8
|
import * as Operation from '@dxos/compute/Operation';
|
|
9
9
|
|
|
10
|
-
import { RESET_DIALOG } from '../constants';
|
|
11
|
-
import
|
|
10
|
+
import { RESET_DIALOG } from '../constants.ts';
|
|
11
|
+
import * as ClientOperation from '../types/ClientOperation.ts';
|
|
12
12
|
|
|
13
|
-
const handler: Operation.WithHandler<typeof ResetStorage> = ResetStorage.pipe(
|
|
13
|
+
const handler: Operation.WithHandler<typeof ClientOperation.ResetStorage> = ClientOperation.ResetStorage.pipe(
|
|
14
14
|
Operation.withHandler(
|
|
15
15
|
Effect.fnUntraced(function* (data) {
|
|
16
16
|
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
@@ -18,6 +18,7 @@ const handler: Operation.WithHandler<typeof ResetStorage> = ResetStorage.pipe(
|
|
|
18
18
|
blockAlign: 'start',
|
|
19
19
|
props: {
|
|
20
20
|
mode: data.mode ?? 'reset-storage',
|
|
21
|
+
invitationCode: data.invitationCode,
|
|
21
22
|
},
|
|
22
23
|
});
|
|
23
24
|
}),
|
|
@@ -10,7 +10,7 @@ import * as AppSpace from '@dxos/app-toolkit/AppSpace';
|
|
|
10
10
|
import * as NavigationOperation from '@dxos/app-toolkit/NavigationOperation';
|
|
11
11
|
import * as Operation from '@dxos/compute/Operation';
|
|
12
12
|
import { Database, EID } from '@dxos/echo';
|
|
13
|
-
import
|
|
13
|
+
import * as Position from '@dxos/util/Position';
|
|
14
14
|
|
|
15
15
|
import { ClientCapabilities } from '#types';
|
|
16
16
|
|
|
@@ -7,7 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import * as Operation from '@dxos/compute/Operation';
|
|
8
8
|
import { Identity } from '@dxos/halo';
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import * as ClientOperation from '../types/ClientOperation.ts';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Revoke one recovery credential.
|
|
@@ -16,12 +16,13 @@ import { RevokeRecoveryCredential } from './definitions';
|
|
|
16
16
|
* identity key is the authorization and no identity can be passed in from the UI. Client services
|
|
17
17
|
* refuse the last un-revoked credential.
|
|
18
18
|
*/
|
|
19
|
-
const handler: Operation.WithHandler<typeof RevokeRecoveryCredential> =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
19
|
+
const handler: Operation.WithHandler<typeof ClientOperation.RevokeRecoveryCredential> =
|
|
20
|
+
ClientOperation.RevokeRecoveryCredential.pipe(
|
|
21
|
+
Operation.withHandler(
|
|
22
|
+
Effect.fnUntraced(function* ({ lookupKey }) {
|
|
23
|
+
yield* Identity.revokeRecoveryCredential(lookupKey);
|
|
24
|
+
}),
|
|
25
|
+
),
|
|
26
|
+
);
|
|
26
27
|
|
|
27
28
|
export default handler;
|
|
@@ -11,9 +11,9 @@ import * as ObservabilityOperation from '@dxos/plugin-observability/Observabilit
|
|
|
11
11
|
|
|
12
12
|
import { Account } from '#types';
|
|
13
13
|
|
|
14
|
-
import
|
|
14
|
+
import * as ClientOperation from '../types/ClientOperation.ts';
|
|
15
15
|
|
|
16
|
-
const handler: Operation.WithHandler<typeof ShareIdentity> = ShareIdentity.pipe(
|
|
16
|
+
const handler: Operation.WithHandler<typeof ClientOperation.ShareIdentity> = ClientOperation.ShareIdentity.pipe(
|
|
17
17
|
Operation.withHandler(
|
|
18
18
|
Effect.fnUntraced(function* () {
|
|
19
19
|
yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: GraphPath.getSpacePath(Account.id) });
|
|
@@ -7,9 +7,9 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import * as Operation from '@dxos/compute/Operation';
|
|
8
8
|
import { Identity } from '@dxos/halo';
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import * as ClientOperation from '../types/ClientOperation.ts';
|
|
11
11
|
|
|
12
|
-
const handler: Operation.WithHandler<typeof UpdateProfile> = UpdateProfile.pipe(
|
|
12
|
+
const handler: Operation.WithHandler<typeof ClientOperation.UpdateProfile> = ClientOperation.UpdateProfile.pipe(
|
|
13
13
|
Operation.withHandler(
|
|
14
14
|
Effect.fnUntraced(function* (profile) {
|
|
15
15
|
yield* Identity.updateProfile({ displayName: profile.displayName, data: profile.data });
|
package/src/plugin.test.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { describe, test } from 'vitest';
|
|
|
6
6
|
|
|
7
7
|
// #plugin resolves to ClientPlugin.node.ts under the source condition used by vitest.
|
|
8
8
|
import * as ClientPlugin from '@dxos/plugin-client/ClientPlugin';
|
|
9
|
-
import
|
|
9
|
+
import * as Harness from '@dxos/plugin-testing/Harness';
|
|
10
10
|
|
|
11
11
|
import { meta } from '#meta';
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ const moduleId = (name: string) => `${meta.profile.key}.module.${name}`;
|
|
|
14
14
|
|
|
15
15
|
describe('ClientPlugin', () => {
|
|
16
16
|
test('modules activate on the expected events', async ({ expect }) => {
|
|
17
|
-
await using harness = await createComposerTestApp({
|
|
17
|
+
await using harness = await Harness.createComposerTestApp({
|
|
18
18
|
plugins: [ClientPlugin.make({})],
|
|
19
19
|
});
|
|
20
20
|
|
package/src/plugin.ts
CHANGED
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
AccountCache,
|
|
9
9
|
AppGraphBuilder,
|
|
10
10
|
Client,
|
|
11
|
+
ClientServices,
|
|
11
12
|
Commands,
|
|
12
13
|
HubHttpClient,
|
|
14
|
+
IdentityLifecycle,
|
|
13
15
|
LayerSpecs,
|
|
14
16
|
Migrations,
|
|
15
17
|
NavigationHandler,
|
|
@@ -26,30 +28,33 @@ import {
|
|
|
26
28
|
import { meta } from '#meta';
|
|
27
29
|
import { ClientOptions } from '#types';
|
|
28
30
|
|
|
29
|
-
export const ClientPlugin = Plugin.define<ClientOptions.ClientPluginOptions>(meta)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
31
|
+
export const ClientPlugin = Plugin.define<ClientOptions.ClientPluginOptions>(meta)
|
|
32
|
+
.pipe(
|
|
33
|
+
Plugin.addModule(AccountCache),
|
|
34
|
+
Plugin.addModule(AppGraphBuilder),
|
|
35
|
+
Plugin.addModule(Client),
|
|
36
|
+
Plugin.addModule(ClientServices),
|
|
37
|
+
Plugin.addModule(Commands),
|
|
38
|
+
Plugin.addModule(HubHttpClient),
|
|
39
|
+
Plugin.addModule(IdentityLifecycle),
|
|
40
|
+
Plugin.addModule(LayerSpecs),
|
|
41
|
+
Plugin.addModule(Migrations),
|
|
42
|
+
Plugin.addModule(NavigationHandler),
|
|
43
|
+
Plugin.addModule(NavigationTargetLoader),
|
|
44
|
+
Plugin.addModule(OperationHandler),
|
|
45
|
+
Plugin.addModule(ReactContext),
|
|
46
|
+
Plugin.addModule(ReactSurface),
|
|
47
|
+
// Swarm-backed remote trace source (DX-1125). Collected when the process-manager runtime is built.
|
|
48
|
+
Plugin.addModule(RemoteTraceMonitor),
|
|
49
|
+
Plugin.addModule(SchemaDefs),
|
|
50
|
+
// Runtime event: spaces become ready when the client observes them, not at startup — see the
|
|
51
|
+
// SpaceReplicationProgress module definition.
|
|
52
|
+
Plugin.addModule(SpaceReplicationProgress),
|
|
53
|
+
// Project remote (EDGE) trace progress into the registry (DX-1125) — see the TraceProgress
|
|
54
|
+
// module definition for its activation gating.
|
|
55
|
+
Plugin.addModule(TraceProgress),
|
|
56
|
+
)
|
|
57
|
+
// `pipe` has overloads only up to 20 arguments, and this plugin has more modules than that.
|
|
58
|
+
.pipe(Plugin.addModule(Translations), Plugin.make);
|
|
54
59
|
|
|
55
60
|
export default ClientPlugin;
|
package/src/progress/index.ts
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
// Copyright 2026 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { describe,
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
6
|
|
|
7
7
|
import { type Database } from '@dxos/echo';
|
|
8
8
|
|
|
9
|
-
import { toSpaceUpdate } from './space-sync-progress';
|
|
9
|
+
import { toSpaceUpdate } from './space-sync-progress.ts';
|
|
10
10
|
|
|
11
11
|
describe('toSpaceUpdate', () => {
|
|
12
|
-
test('caught up on both backlogs yields no monitor', () => {
|
|
12
|
+
test('caught up on both backlogs yields no monitor', ({ expect }) => {
|
|
13
13
|
expect(toSpaceUpdate('Space', makeState({ totalDocumentCount: 10, totalBlocks: '100' }))).toBeUndefined();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
test('
|
|
16
|
+
test('a monitor opens at the start of its run, with the backlog as its total', ({ expect }) => {
|
|
17
17
|
const update = toSpaceUpdate(
|
|
18
18
|
'Notes',
|
|
19
19
|
makeState({
|
|
@@ -26,26 +26,49 @@ describe('toSpaceUpdate', () => {
|
|
|
26
26
|
);
|
|
27
27
|
expect(update).toEqual({
|
|
28
28
|
label: 'Syncing Notes',
|
|
29
|
-
current:
|
|
30
|
-
total:
|
|
31
|
-
|
|
29
|
+
current: 0,
|
|
30
|
+
total: 12,
|
|
31
|
+
synced: 98,
|
|
32
|
+
note: '4 objects · ↓6 ↑2',
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('against its baseline, a monitor counts what the run has synced', ({ expect }) => {
|
|
37
|
+
const update = toSpaceUpdate(
|
|
38
|
+
'Notes',
|
|
39
|
+
makeState({ totalDocumentCount: 10, unsyncedDocumentCount: 1, totalBlocks: '100', blocksToPull: '3' }),
|
|
40
|
+
98,
|
|
41
|
+
);
|
|
42
|
+
expect(update).toEqual({
|
|
43
|
+
label: 'Syncing Notes',
|
|
44
|
+
current: 8,
|
|
45
|
+
total: 12,
|
|
46
|
+
synced: 106,
|
|
47
|
+
note: '1 objects · ↓3 ↑0',
|
|
32
48
|
});
|
|
33
49
|
});
|
|
34
50
|
|
|
35
|
-
test('
|
|
51
|
+
test('a backlog that grows extends the total without moving the count backwards', ({ expect }) => {
|
|
52
|
+
const update = toSpaceUpdate('Notes', makeState({ totalDocumentCount: 20, unsyncedDocumentCount: 8 }), 10);
|
|
53
|
+
expect(update).toMatchObject({ current: 2, total: 10, synced: 12 });
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('unsynced documents alone keep the meter up', ({ expect }) => {
|
|
36
57
|
expect(toSpaceUpdate(undefined, makeState({ unsyncedDocumentCount: 3 }))).toEqual({
|
|
37
|
-
label: 'Syncing
|
|
58
|
+
label: 'Syncing Space',
|
|
38
59
|
current: 0,
|
|
39
60
|
total: 3,
|
|
40
|
-
|
|
61
|
+
synced: 0,
|
|
62
|
+
note: '3 objects',
|
|
41
63
|
});
|
|
42
64
|
});
|
|
43
65
|
|
|
44
|
-
test('feed blocks alone keep the meter up', () => {
|
|
66
|
+
test('feed blocks alone keep the meter up', ({ expect }) => {
|
|
45
67
|
expect(toSpaceUpdate('Notes', makeState({ totalBlocks: '10', blocksToPush: '2' }))).toEqual({
|
|
46
68
|
label: 'Syncing Notes',
|
|
47
|
-
current:
|
|
48
|
-
total:
|
|
69
|
+
current: 0,
|
|
70
|
+
total: 2,
|
|
71
|
+
synced: 8,
|
|
49
72
|
note: '↓0 ↑2',
|
|
50
73
|
});
|
|
51
74
|
});
|
|
@@ -7,8 +7,12 @@ import { type Database } from '@dxos/echo';
|
|
|
7
7
|
/** Registry update for a space's replication monitor. */
|
|
8
8
|
export type MonitorUpdate = {
|
|
9
9
|
readonly label: string;
|
|
10
|
+
/** Items synced since the run's baseline. */
|
|
10
11
|
readonly current: number;
|
|
12
|
+
/** Items synced since the baseline plus the backlog still pending. */
|
|
11
13
|
readonly total: number;
|
|
14
|
+
/** Items synced in absolute terms, which the caller keeps as the baseline of the run it opens. */
|
|
15
|
+
readonly synced: number;
|
|
12
16
|
readonly note?: string;
|
|
13
17
|
};
|
|
14
18
|
|
|
@@ -16,10 +20,19 @@ export type MonitorUpdate = {
|
|
|
16
20
|
* Derives the combined (documents + feed blocks) monitor state for a space, or `undefined` when it
|
|
17
21
|
* is fully caught up. Both backlogs share one meter so the UI shows one row per space.
|
|
18
22
|
*
|
|
23
|
+
* The meter counts the run, not the space: `current` is what has synced since `baseline` (the
|
|
24
|
+
* absolute synced count when the monitor opened) and `total` adds the backlog still pending. Counting
|
|
25
|
+
* the whole space instead put a monitor that opened at 5,020 of 5,021 at the end of its bar with an
|
|
26
|
+
* ETA of zero, since the ETA divides the run's elapsed time by everything synced before it began.
|
|
27
|
+
*
|
|
19
28
|
* The label leads with the phase, matching the mail sync meter — a name-only label never said that
|
|
20
29
|
* the meter was tracking sync.
|
|
21
30
|
*/
|
|
22
|
-
export const toSpaceUpdate = (
|
|
31
|
+
export const toSpaceUpdate = (
|
|
32
|
+
name: string | undefined,
|
|
33
|
+
state: Database.SyncState,
|
|
34
|
+
baseline?: number,
|
|
35
|
+
): MonitorUpdate | undefined => {
|
|
23
36
|
const unsyncedDocuments = state.unsyncedDocumentCount;
|
|
24
37
|
const blocksToPull = Number(state.blocksToPull);
|
|
25
38
|
const blocksToPush = Number(state.blocksToPush);
|
|
@@ -31,20 +44,22 @@ export const toSpaceUpdate = (name: string | undefined, state: Database.SyncStat
|
|
|
31
44
|
|
|
32
45
|
const totalDocuments = state.totalDocumentCount > 0 ? state.totalDocumentCount : unsyncedDocuments;
|
|
33
46
|
const totalBlocks = Number(state.totalBlocks) > 0 ? Number(state.totalBlocks) : unsyncedBlocks;
|
|
34
|
-
const
|
|
47
|
+
const synced = Math.max(0, totalDocuments + totalBlocks - pending);
|
|
48
|
+
const current = Math.max(0, synced - (baseline ?? synced));
|
|
35
49
|
|
|
36
50
|
const notes: string[] = [];
|
|
37
51
|
if (unsyncedDocuments > 0) {
|
|
38
|
-
notes.push(`${unsyncedDocuments}
|
|
52
|
+
notes.push(`${unsyncedDocuments} objects`);
|
|
39
53
|
}
|
|
40
54
|
if (unsyncedBlocks > 0) {
|
|
41
55
|
notes.push(`↓${blocksToPull} ↑${blocksToPush}`);
|
|
42
56
|
}
|
|
43
57
|
|
|
44
58
|
return {
|
|
45
|
-
label: `Syncing ${name ?? '
|
|
46
|
-
current
|
|
47
|
-
total,
|
|
59
|
+
label: `Syncing ${name ?? 'Space'}`,
|
|
60
|
+
current,
|
|
61
|
+
total: current + pending,
|
|
62
|
+
synced,
|
|
48
63
|
note: notes.join(' · '),
|
|
49
64
|
};
|
|
50
65
|
};
|
package/src/schema-defs.test.ts
CHANGED
|
@@ -13,7 +13,7 @@ import * as AppCapabilities from '@dxos/app-toolkit/AppCapabilities';
|
|
|
13
13
|
import { DXN, Type } from '@dxos/echo';
|
|
14
14
|
// ClientPlugin's `#plugin` loader resolves to `plugin.node.ts` under the source condition vitest uses.
|
|
15
15
|
import * as ClientPlugin from '@dxos/plugin-client/ClientPlugin';
|
|
16
|
-
import
|
|
16
|
+
import * as Harness from '@dxos/plugin-testing/Harness';
|
|
17
17
|
|
|
18
18
|
import { ClientCapabilities, ClientEvents } from '#types';
|
|
19
19
|
|
|
@@ -56,7 +56,7 @@ const makeSeedPlugin = (result: { registered?: boolean }) =>
|
|
|
56
56
|
describe('SchemaDefs', () => {
|
|
57
57
|
test('registers contributed schema before an IdentityCreated consumer runs', async ({ expect }) => {
|
|
58
58
|
const result: { registered?: boolean } = {};
|
|
59
|
-
await using harness = await createComposerTestApp({
|
|
59
|
+
await using harness = await Harness.createComposerTestApp({
|
|
60
60
|
plugins: [ClientPlugin.make({}), NotePlugin(), makeSeedPlugin(result)()],
|
|
61
61
|
// A cold boot creates the identity seconds before the host goes idle, so the wave
|
|
62
62
|
// `SchemaDefs` normally rides in on has not run: `autoStart: false` skips the harness's
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React, { type PropsWithChildren, useMemo } from 'react';
|
|
6
|
+
|
|
7
|
+
import type * as Plugin from '@dxos/app-framework/Plugin';
|
|
8
|
+
import { PluginManagerHost } from '@dxos/app-framework/testing';
|
|
9
|
+
import { useClient } from '@dxos/react-client';
|
|
10
|
+
|
|
11
|
+
import { ClientPlugin } from '#plugin';
|
|
12
|
+
import { type ClientOptions } from '#types';
|
|
13
|
+
|
|
14
|
+
export type ClientPluginManagerProps = PropsWithChildren<{
|
|
15
|
+
/** Distinguishes this client's manager from the others in the story. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Plugins beside `ClientPlugin`, built per client since plugin instances hold state. */
|
|
18
|
+
plugins: () => Plugin.Plugin[];
|
|
19
|
+
/** Options for the `ClientPlugin` that adopts the client. */
|
|
20
|
+
clientOptions?: Omit<ClientOptions.ClientPluginOptions, 'client'>;
|
|
21
|
+
}>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Hosts `children` in a plugin app whose `ClientPlugin` adopts the enclosing `ClientProvider`'s
|
|
25
|
+
* client, so a multi-client story runs the real plugins once per client. Use it as
|
|
26
|
+
* `withMultiClientProvider({ wrapper })`.
|
|
27
|
+
*/
|
|
28
|
+
export const ClientPluginManager = ({ id, plugins, clientOptions, children }: ClientPluginManagerProps) => {
|
|
29
|
+
const client = useClient();
|
|
30
|
+
const options = useMemo(
|
|
31
|
+
() => ({ plugins: [ClientPlugin({ ...clientOptions, client }), ...plugins()] }),
|
|
32
|
+
// The plugins are rebuilt only with the client: a new manager per render would never settle.
|
|
33
|
+
[client],
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
// Story layouts are `fixed inset-0`; layout containment confines each client's app to its own cell.
|
|
38
|
+
<div className='relative overflow-hidden contain-layout'>
|
|
39
|
+
<PluginManagerHost id={id} options={options}>
|
|
40
|
+
{children}
|
|
41
|
+
</PluginManagerHost>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { create } from '@bufbuild/protobuf';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { type Client } from '@dxos/client';
|
|
9
|
+
import { type Space, SpaceMember_Role } from '@dxos/client/echo';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { PublicKey } from '@dxos/keys';
|
|
12
|
+
import { fromPublicKey } from '@dxos/protocols/buf';
|
|
13
|
+
import { ContactSchema } from '@dxos/protocols/buf/dxos/client/services_pb';
|
|
14
|
+
import { ProfileDocumentSchema } from '@dxos/protocols/buf/dxos/halo/credentials_pb';
|
|
15
|
+
|
|
16
|
+
export type CreateFakeContactsOptions = {
|
|
17
|
+
/** Names of the spaces to create; contacts are spread across them. */
|
|
18
|
+
spaceNames?: string[];
|
|
19
|
+
/** Display names of the contacts to admit. */
|
|
20
|
+
contactNames?: string[];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Populate the contact book with fake people by admitting random identities to new named spaces.
|
|
25
|
+
* The contact book is derived from space membership, so this exercises the real `useContacts` path.
|
|
26
|
+
* Contact `i` joins spaces `0..(i % spaceNames.length)`, so contacts share different numbers of spaces.
|
|
27
|
+
*/
|
|
28
|
+
export const createFakeContacts = (
|
|
29
|
+
client: Client,
|
|
30
|
+
{
|
|
31
|
+
spaceNames = ['Design', 'Engineering', 'Marketing'],
|
|
32
|
+
contactNames = ['Alice Adams', 'Bob Brown', 'Carol Chen', 'Dan Diaz', 'Eve Evans'],
|
|
33
|
+
}: CreateFakeContactsOptions = {},
|
|
34
|
+
): Effect.Effect<Space[], never, never> =>
|
|
35
|
+
Effect.gen(function* () {
|
|
36
|
+
const spaces: Space[] = [];
|
|
37
|
+
for (const name of spaceNames) {
|
|
38
|
+
const space = yield* Effect.promise(() => client.spaces.create());
|
|
39
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
40
|
+
Obj.update(space.properties, (properties) => {
|
|
41
|
+
properties.name = name;
|
|
42
|
+
});
|
|
43
|
+
spaces.push(space);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
for (const [index, displayName] of contactNames.entries()) {
|
|
47
|
+
const contact = create(ContactSchema, {
|
|
48
|
+
identityKey: fromPublicKey(PublicKey.random()),
|
|
49
|
+
profile: create(ProfileDocumentSchema, { displayName }),
|
|
50
|
+
});
|
|
51
|
+
for (const space of spaces.slice(0, (index % spaces.length) + 1)) {
|
|
52
|
+
yield* Effect.promise(() => space.admitContact(contact, SpaceMember_Role.EDITOR));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return spaces;
|
|
57
|
+
});
|
package/src/testing/index.ts
CHANGED
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * as ClientPlugin from '../ClientPlugin.testing';
|
|
6
|
-
export {
|
|
5
|
+
export * as ClientPlugin from '../ClientPlugin.testing.ts';
|
|
6
|
+
export { createFakeContacts } from './createFakeContacts.ts';
|
|
7
|
+
export { initializeIdentity } from './initializeIdentity.ts';
|
|
8
|
+
export * from './ClientPluginManager.tsx';
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { create } from '@bufbuild/protobuf';
|
|
5
6
|
import * as Effect from 'effect/Effect';
|
|
6
7
|
|
|
7
8
|
import * as AppSpace from '@dxos/app-toolkit/AppSpace';
|
|
8
9
|
import { type Client } from '@dxos/client';
|
|
9
10
|
import { type Space } from '@dxos/client-protocol';
|
|
10
|
-
import { type Identity } from '@dxos/protocols/
|
|
11
|
+
import { type Identity } from '@dxos/protocols/buf/dxos/client/services_pb';
|
|
12
|
+
import { ProfileDocumentSchema } from '@dxos/protocols/buf/dxos/halo/credentials_pb';
|
|
11
13
|
|
|
12
14
|
export type InitializeIdentityResult = {
|
|
13
15
|
identity: Identity;
|
|
@@ -37,7 +39,9 @@ export const initializeIdentity = (
|
|
|
37
39
|
// The harness boots with client initialization forked off startup; `halo`/`spaces` are
|
|
38
40
|
// unreadable until it completes.
|
|
39
41
|
yield* Effect.promise(() => client.waitUntilInitialized());
|
|
40
|
-
const identity = yield* Effect.promise(() =>
|
|
42
|
+
const identity = yield* Effect.promise(() =>
|
|
43
|
+
client.halo.createIdentity(create(ProfileDocumentSchema, { displayName })),
|
|
44
|
+
);
|
|
41
45
|
const spaces = yield* AppSpace.setupIdentitySpaces(client);
|
|
42
46
|
|
|
43
47
|
return { identity, ...spaces };
|
package/src/translations.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import type * as Theme from '@dxos/react-ui/Theme';
|
|
6
6
|
import { translations as shellTranslations } from '@dxos/shell/translations';
|
|
7
7
|
|
|
8
8
|
import { meta } from '#meta';
|
|
@@ -24,9 +24,18 @@ const pluginTranslations = [
|
|
|
24
24
|
'create-device-invitation.label': 'Create code',
|
|
25
25
|
'qr-code.description':
|
|
26
26
|
'Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.',
|
|
27
|
+
'contacts.label': 'Contacts',
|
|
28
|
+
'contacts.description': 'People you share at least one space with.',
|
|
29
|
+
'contacts-search.placeholder': 'Search contacts…',
|
|
30
|
+
'contact-picker-add.label': 'Add member',
|
|
31
|
+
'contact-picker-empty.message':
|
|
32
|
+
'You have no contacts yet — people appear here once you share a space with them.',
|
|
33
|
+
'role-editor.label': 'Editor',
|
|
34
|
+
'role-viewer.label': 'Viewer',
|
|
35
|
+
'role-admin.label': 'Admin',
|
|
27
36
|
'security.label': 'Security',
|
|
28
37
|
'account-panel.label': 'Account',
|
|
29
|
-
'invitations-panel.label': '
|
|
38
|
+
'invitations-panel.label': 'Account invitations',
|
|
30
39
|
'usage-panel.label': 'Usage',
|
|
31
40
|
'usage-section.title': 'Usage',
|
|
32
41
|
'usage-section.description':
|
|
@@ -54,7 +63,7 @@ const pluginTranslations = [
|
|
|
54
63
|
'account-section.title': 'Account',
|
|
55
64
|
'account-section.description':
|
|
56
65
|
'Your identity on this device is bound to a DXOS account that gates access to edge services like sync, agents, and AI.',
|
|
57
|
-
'invitations-section.title': '
|
|
66
|
+
'invitations-section.title': 'Account invitations',
|
|
58
67
|
'invitations-section.description':
|
|
59
68
|
'Share an invitation with someone you’d like to bring onto DXOS. Each code grants one-time access to create an account.',
|
|
60
69
|
'no-edge-access.title': 'No edge access',
|
|
@@ -86,12 +95,11 @@ const pluginTranslations = [
|
|
|
86
95
|
'generate-invitation.description_other': 'You have {{count}} invitations left to generate.',
|
|
87
96
|
'available-invitations.title': 'Available invitations',
|
|
88
97
|
'redeemed-invitations.title': 'Redeemed invitations',
|
|
89
|
-
'logout.description':
|
|
98
|
+
'logout.description':
|
|
99
|
+
'Logging out erases all data on this device. Anything that has not synced to another device or to the cloud will be lost.',
|
|
90
100
|
'join-new-identity.description': 'Erase this device and join an existing identity with a QR code or URL.',
|
|
91
101
|
'recover-identity.description': 'Erase this device and log in with a passkey or recovery code.',
|
|
92
|
-
'logout-section.title': '
|
|
93
|
-
'logout-section.description':
|
|
94
|
-
'Logging out erases all data on this device. Anything that has not synced to another device or to the cloud will be lost.',
|
|
102
|
+
'logout-section.title': 'Danger Zone',
|
|
95
103
|
'identity-test-section.title': 'Testing',
|
|
96
104
|
'identity-test-section.description':
|
|
97
105
|
'Enabled for testing. These switch this device to a different identity, erasing all data on it first.',
|
|
@@ -132,6 +140,8 @@ const pluginTranslations = [
|
|
|
132
140
|
// Something like https://www.tomsguide.com/news/what-are-passkeys.
|
|
133
141
|
'create-passkey.description':
|
|
134
142
|
'A passkey is a secure and easy to use credential that can be used to recover your account.',
|
|
143
|
+
'create-passkey-failed.message':
|
|
144
|
+
'The passkey could not be created. Try again, or create a recovery code instead.',
|
|
135
145
|
'create-recovery-code.label': 'Create Recovery Code',
|
|
136
146
|
'create-recovery-code.description': 'A recovery code is 12 word phrase representing a private key.',
|
|
137
147
|
'recovery-code-dialog.title': 'Recovery Code',
|
|
@@ -149,11 +159,25 @@ const pluginTranslations = [
|
|
|
149
159
|
'qr.label': 'QR Code',
|
|
150
160
|
'recover-identity.label': 'Use a recovery code',
|
|
151
161
|
'logout.label': 'Log out',
|
|
162
|
+
'cli-login-dialog.title': 'Connect the dx CLI',
|
|
163
|
+
'cli-login-dialog.description':
|
|
164
|
+
'A dx command-line client on this computer is asking to join your identity as a new device, with full access to your spaces. Approve only if you just ran `dx account login` yourself.',
|
|
165
|
+
'cli-login-no-identity.message': 'Create or sign in to an identity first, then run the dx login command again.',
|
|
166
|
+
'cli-login-code.label': 'Approve only if your terminal shows this code:',
|
|
167
|
+
'cli-login-authorize.label': 'Authorize',
|
|
168
|
+
'cli-login-deny.label': 'Deny',
|
|
169
|
+
'cli-login-done.label': 'Done',
|
|
170
|
+
'cli-login-cancel.label': 'Cancel',
|
|
171
|
+
'cli-login-sending.message': 'Creating a device invitation…',
|
|
172
|
+
'cli-login-waiting.message': 'Invitation sent. Waiting for the CLI to join — keep this tab open.',
|
|
173
|
+
'cli-login-success.message': 'The CLI joined your identity. You can return to your terminal.',
|
|
174
|
+
'cli-login-cancelled.message': 'The invitation was cancelled.',
|
|
175
|
+
'cli-login-error.message': 'Could not connect the CLI: {{error}}',
|
|
152
176
|
'navigation-failed-toast.title': 'Link could not be processed',
|
|
153
177
|
'navigation-failed-toast.description': 'Something went wrong while handling this link. Please try again.',
|
|
154
178
|
},
|
|
155
179
|
},
|
|
156
180
|
},
|
|
157
|
-
] as const satisfies Resource[];
|
|
181
|
+
] as const satisfies Theme.Resource[];
|
|
158
182
|
|
|
159
|
-
export const translations: Resource[] = [...pluginTranslations, ...shellTranslations];
|
|
183
|
+
export const translations: Theme.Resource[] = [...pluginTranslations, ...shellTranslations];
|
package/src/types/Account.ts
CHANGED
|
@@ -2,15 +2,31 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.
|
|
8
|
-
// Ideally this should be worked into the data model in a generic way.
|
|
9
|
-
export const id = `!${_id}`;
|
|
5
|
+
import * as GraphPath from '@dxos/app-toolkit/GraphPath';
|
|
6
|
+
import { type Config, getEnvString } from '@dxos/config';
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
8
|
+
/** Pinned (non-space) workspace ID anchoring the account's graph subtree, and its URL workspace token. */
|
|
9
|
+
export const id = 'dxos:account';
|
|
10
|
+
|
|
11
|
+
/** Panel ids, relative to the account workspace they hang off. Each is also its own singleton URL key. */
|
|
12
|
+
export const Profile = 'profile';
|
|
13
|
+
export const Devices = 'devices';
|
|
14
|
+
export const Contacts = 'contacts';
|
|
15
|
+
export const Security = 'security';
|
|
16
|
+
export const Account = 'account';
|
|
17
|
+
export const Invitations = 'invitations';
|
|
18
|
+
export const Usage = 'usage';
|
|
19
|
+
|
|
20
|
+
/** The account's own workspace path. */
|
|
21
|
+
export const workspacePath = GraphPath.getSpacePath(id);
|
|
22
|
+
|
|
23
|
+
/** A panel's qualified path, which its surface matches on. */
|
|
24
|
+
export const path = (panel: string): string => GraphPath.getSpacePath(id, panel);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The hub backing accounts, or `undefined` where none is configured.
|
|
28
|
+
*/
|
|
29
|
+
export const getHubUrl = (config?: Config): string | undefined => getEnvString(config, 'DX_HUB_URL');
|
|
30
|
+
|
|
31
|
+
/** Whether this profile has an account service to authenticate against. */
|
|
32
|
+
export const isAuthEnabled = (config?: Config): boolean => !!getHubUrl(config);
|