@dxos/plugin-client 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "DXOS Surface plugin for DXOS Client",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -19,33 +19,33 @@
|
|
|
19
19
|
"default": "./src/capabilities/index.ts"
|
|
20
20
|
},
|
|
21
21
|
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
22
|
-
"node": "./dist/lib/
|
|
23
|
-
"default": "./dist/lib/
|
|
22
|
+
"node": "./dist/lib/capabilities/node.mjs",
|
|
23
|
+
"default": "./dist/lib/capabilities.mjs"
|
|
24
24
|
},
|
|
25
25
|
"#capabilities/node": {
|
|
26
26
|
"source": "./src/capabilities/node.ts",
|
|
27
27
|
"types": "./dist/types/src/capabilities/node.d.ts",
|
|
28
|
-
"default": "./dist/lib/
|
|
28
|
+
"default": "./dist/lib/capabilities/node.mjs"
|
|
29
29
|
},
|
|
30
30
|
"#components": {
|
|
31
31
|
"source": "./src/components/index.ts",
|
|
32
32
|
"types": "./dist/types/src/components/index.d.ts",
|
|
33
|
-
"default": "./dist/lib/
|
|
33
|
+
"default": "./dist/lib/components.mjs"
|
|
34
34
|
},
|
|
35
35
|
"#containers": {
|
|
36
36
|
"source": "./src/containers/index.ts",
|
|
37
37
|
"types": "./dist/types/src/containers/index.d.ts",
|
|
38
|
-
"default": "./dist/lib/
|
|
38
|
+
"default": "./dist/lib/containers.mjs"
|
|
39
39
|
},
|
|
40
40
|
"#meta": {
|
|
41
41
|
"source": "./src/meta.ts",
|
|
42
42
|
"types": "./dist/types/src/meta.d.ts",
|
|
43
|
-
"default": "./dist/lib/
|
|
43
|
+
"default": "./dist/lib/meta.mjs"
|
|
44
44
|
},
|
|
45
45
|
"#operations": {
|
|
46
46
|
"source": "./src/operations/index.ts",
|
|
47
47
|
"types": "./dist/types/src/operations/index.d.ts",
|
|
48
|
-
"default": "./dist/lib/
|
|
48
|
+
"default": "./dist/lib/operations.mjs"
|
|
49
49
|
},
|
|
50
50
|
"#plugin": {
|
|
51
51
|
"source": {
|
|
@@ -54,46 +54,46 @@
|
|
|
54
54
|
"default": "./src/ClientPlugin.ts"
|
|
55
55
|
},
|
|
56
56
|
"types": "./dist/types/src/ClientPlugin.d.ts",
|
|
57
|
-
"workerd": "./dist/lib/
|
|
58
|
-
"node": "./dist/lib/
|
|
59
|
-
"default": "./dist/lib/
|
|
57
|
+
"workerd": "./dist/lib/ClientPlugin.workerd.mjs",
|
|
58
|
+
"node": "./dist/lib/ClientPlugin.node.mjs",
|
|
59
|
+
"default": "./dist/lib/ClientPlugin.mjs"
|
|
60
60
|
},
|
|
61
61
|
"#testing": {
|
|
62
62
|
"source": "./src/testing/index.ts",
|
|
63
63
|
"types": "./dist/types/src/testing/index.d.ts",
|
|
64
|
-
"default": "./dist/lib/
|
|
64
|
+
"default": "./dist/lib/testing.mjs"
|
|
65
65
|
},
|
|
66
66
|
"#translations": {
|
|
67
67
|
"source": "./src/translations.ts",
|
|
68
68
|
"types": "./dist/types/src/translations.d.ts",
|
|
69
|
-
"default": "./dist/lib/
|
|
69
|
+
"default": "./dist/lib/translations.mjs"
|
|
70
70
|
},
|
|
71
71
|
"#types": {
|
|
72
72
|
"source": "./src/types/index.ts",
|
|
73
73
|
"types": "./dist/types/src/types/index.d.ts",
|
|
74
|
-
"default": "./dist/lib/
|
|
74
|
+
"default": "./dist/lib/types.mjs"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"exports": {
|
|
78
78
|
".": {
|
|
79
79
|
"source": "./src/index.ts",
|
|
80
80
|
"types": "./dist/types/src/index.d.ts",
|
|
81
|
-
"
|
|
81
|
+
"import": "./dist/lib/index.mjs"
|
|
82
82
|
},
|
|
83
83
|
"./plugin": {
|
|
84
84
|
"source": "./src/plugin.ts",
|
|
85
85
|
"types": "./dist/types/src/plugin.d.ts",
|
|
86
|
-
"
|
|
86
|
+
"import": "./dist/lib/plugin.mjs"
|
|
87
87
|
},
|
|
88
88
|
"./testing": {
|
|
89
89
|
"source": "./src/testing/index.ts",
|
|
90
90
|
"types": "./dist/types/src/testing/index.d.ts",
|
|
91
|
-
"
|
|
91
|
+
"import": "./dist/lib/testing.mjs"
|
|
92
92
|
},
|
|
93
93
|
"./translations": {
|
|
94
94
|
"source": "./src/translations.ts",
|
|
95
95
|
"types": "./dist/types/src/translations.d.ts",
|
|
96
|
-
"
|
|
96
|
+
"import": "./dist/lib/translations.mjs"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -103,41 +103,46 @@
|
|
|
103
103
|
"src"
|
|
104
104
|
],
|
|
105
105
|
"dependencies": {
|
|
106
|
+
"@effect-atom/atom": "^0.5.3",
|
|
106
107
|
"@effect/cli": "0.75.2",
|
|
107
108
|
"@effect/platform": "0.96.2",
|
|
108
109
|
"effect": "3.21.4",
|
|
109
110
|
"react-qr-rounded": "^1.0.0",
|
|
110
111
|
"yaml": "^2.8.2",
|
|
111
|
-
"@dxos/app-framework": "0.
|
|
112
|
-
"@dxos/app-toolkit": "0.
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/client
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/
|
|
120
|
-
"@dxos/
|
|
121
|
-
"@dxos/
|
|
122
|
-
"@dxos/
|
|
123
|
-
"@dxos/
|
|
124
|
-
"@dxos/
|
|
125
|
-
"@dxos/
|
|
126
|
-
"@dxos/
|
|
127
|
-
"@dxos/client
|
|
128
|
-
"@dxos/
|
|
129
|
-
"@dxos/
|
|
130
|
-
"@dxos/
|
|
131
|
-
"@dxos/
|
|
132
|
-
"@dxos/
|
|
133
|
-
"@dxos/
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/
|
|
136
|
-
"@dxos/
|
|
137
|
-
"@dxos/
|
|
138
|
-
"@dxos/react-
|
|
139
|
-
"@dxos/
|
|
140
|
-
"@dxos/
|
|
112
|
+
"@dxos/app-framework": "0.11.0",
|
|
113
|
+
"@dxos/app-toolkit": "0.11.0",
|
|
114
|
+
"@dxos/async": "0.11.0",
|
|
115
|
+
"@dxos/cli-util": "0.11.0",
|
|
116
|
+
"@dxos/client": "0.11.0",
|
|
117
|
+
"@dxos/client-protocol": "0.11.0",
|
|
118
|
+
"@dxos/client-services": "0.11.0",
|
|
119
|
+
"@dxos/compute": "0.11.0",
|
|
120
|
+
"@dxos/compute-runtime": "0.11.0",
|
|
121
|
+
"@dxos/config": "0.11.0",
|
|
122
|
+
"@dxos/context": "0.11.0",
|
|
123
|
+
"@dxos/echo": "0.11.0",
|
|
124
|
+
"@dxos/echo-client": "0.11.0",
|
|
125
|
+
"@dxos/echo-protocol": "0.11.0",
|
|
126
|
+
"@dxos/credentials": "0.11.0",
|
|
127
|
+
"@dxos/effect": "0.11.0",
|
|
128
|
+
"@dxos/edge-client": "0.11.0",
|
|
129
|
+
"@dxos/errors": "0.11.0",
|
|
130
|
+
"@dxos/halo": "0.11.0",
|
|
131
|
+
"@dxos/halo-adapter-client": "0.11.0",
|
|
132
|
+
"@dxos/halo-react": "0.11.0",
|
|
133
|
+
"@dxos/log": "0.11.0",
|
|
134
|
+
"@dxos/invariant": "0.11.0",
|
|
135
|
+
"@dxos/keys": "0.11.0",
|
|
136
|
+
"@dxos/plugin-graph": "0.11.0",
|
|
137
|
+
"@dxos/plugin-observability": "0.11.0",
|
|
138
|
+
"@dxos/protocols": "0.11.0",
|
|
139
|
+
"@dxos/react-client": "0.11.0",
|
|
140
|
+
"@dxos/react-ui-form": "0.11.0",
|
|
141
|
+
"@dxos/react-ui-list": "0.11.0",
|
|
142
|
+
"@dxos/react-ui-syntax-highlighter": "0.11.0",
|
|
143
|
+
"@dxos/react-ui-pickers": "0.11.0",
|
|
144
|
+
"@dxos/shell": "0.11.0",
|
|
145
|
+
"@dxos/util": "0.11.0"
|
|
141
146
|
},
|
|
142
147
|
"devDependencies": {
|
|
143
148
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -147,11 +152,11 @@
|
|
|
147
152
|
"@types/react-dom": "~19.2.3",
|
|
148
153
|
"react": "~19.2.7",
|
|
149
154
|
"react-dom": "~19.2.7",
|
|
150
|
-
"vite": "^8.
|
|
151
|
-
"@dxos/
|
|
152
|
-
"@dxos/
|
|
153
|
-
"@dxos/storybook-utils": "0.
|
|
154
|
-
"@dxos/ui-theme": "0.
|
|
155
|
+
"vite": "^8.1.4",
|
|
156
|
+
"@dxos/plugin-testing": "0.11.0",
|
|
157
|
+
"@dxos/react-ui": "0.11.0",
|
|
158
|
+
"@dxos/storybook-utils": "0.11.0",
|
|
159
|
+
"@dxos/ui-theme": "0.11.0"
|
|
155
160
|
},
|
|
156
161
|
"peerDependencies": {
|
|
157
162
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -159,8 +164,8 @@
|
|
|
159
164
|
"effect": "3.21.4",
|
|
160
165
|
"react": "~19.2.7",
|
|
161
166
|
"react-dom": "~19.2.7",
|
|
162
|
-
"@dxos/ui
|
|
163
|
-
"@dxos/
|
|
167
|
+
"@dxos/react-ui": "^0.11.0",
|
|
168
|
+
"@dxos/ui-theme": "^0.11.0"
|
|
164
169
|
},
|
|
165
170
|
"publishConfig": {
|
|
166
171
|
"access": "public"
|
package/src/ClientPlugin.ts
CHANGED
|
@@ -13,10 +13,14 @@ import {
|
|
|
13
13
|
LayerSpecs,
|
|
14
14
|
Migrations,
|
|
15
15
|
NavigationHandler,
|
|
16
|
+
NavigationTargetLoader,
|
|
16
17
|
OperationHandler,
|
|
17
18
|
ReactContext,
|
|
18
19
|
ReactSurface,
|
|
20
|
+
RemoteTraceMonitor,
|
|
19
21
|
SchemaDefs,
|
|
22
|
+
SpaceReplicationProgress,
|
|
23
|
+
TraceProgress,
|
|
20
24
|
} from '#capabilities';
|
|
21
25
|
import { meta } from '#meta';
|
|
22
26
|
import { translations } from '#translations';
|
|
@@ -25,8 +29,8 @@ import { type ClientPluginOptions } from '#types';
|
|
|
25
29
|
|
|
26
30
|
export const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(
|
|
27
31
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
28
|
-
AppPlugin.addNavigationHandlerModule(({ invitationProp }) => ({
|
|
29
|
-
activate: () => NavigationHandler({ invitationProp }),
|
|
32
|
+
AppPlugin.addNavigationHandlerModule(({ invitationProp, invitationUrlHandler }) => ({
|
|
33
|
+
activate: () => NavigationHandler({ invitationProp, invitationUrlHandler }),
|
|
30
34
|
})),
|
|
31
35
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
32
36
|
AppPlugin.addReactContextModule({ activate: ReactContext }),
|
|
@@ -43,6 +47,10 @@ export const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(
|
|
|
43
47
|
activatesOn: ClientEvents.ClientReady,
|
|
44
48
|
activate: AccountCache,
|
|
45
49
|
}),
|
|
50
|
+
Plugin.addModule({
|
|
51
|
+
activatesOn: ClientEvents.ClientReady,
|
|
52
|
+
activate: NavigationTargetLoader,
|
|
53
|
+
}),
|
|
46
54
|
Plugin.addModule({
|
|
47
55
|
activatesOn: ClientEvents.ClientReady,
|
|
48
56
|
activate: HubHttpClient,
|
|
@@ -57,10 +65,25 @@ export const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(
|
|
|
57
65
|
firesBeforeActivation: [ClientEvents.SetupMigration],
|
|
58
66
|
activate: Migrations,
|
|
59
67
|
}),
|
|
68
|
+
Plugin.addModule({
|
|
69
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.SpacesReady, AppActivationEvents.ProgressRegistryReady),
|
|
70
|
+
activate: SpaceReplicationProgress,
|
|
71
|
+
}),
|
|
72
|
+
// Project remote (edge) trace progress into the registry (DX-1125). Same activation as
|
|
73
|
+
// SpaceReplicationProgress: process-manager runtime, monitor, and registry are all available.
|
|
74
|
+
Plugin.addModule({
|
|
75
|
+
activatesOn: ActivationEvent.allOf(ClientEvents.SpacesReady, AppActivationEvents.ProgressRegistryReady),
|
|
76
|
+
activate: TraceProgress,
|
|
77
|
+
}),
|
|
60
78
|
Plugin.addModule({
|
|
61
79
|
activatesOn: ActivationEvents.SetupProcessManager,
|
|
62
80
|
activate: LayerSpecs,
|
|
63
81
|
}),
|
|
82
|
+
// Swarm-backed remote trace source (DX-1125). Collected when the process-manager runtime is built.
|
|
83
|
+
Plugin.addModule({
|
|
84
|
+
activatesOn: ActivationEvents.SetupProcessManager,
|
|
85
|
+
activate: RemoteTraceMonitor,
|
|
86
|
+
}),
|
|
64
87
|
Plugin.addModule(
|
|
65
88
|
({
|
|
66
89
|
shareableLinkOrigin = typeof window !== 'undefined' ? window.location.origin : 'http://localhost',
|
|
@@ -6,9 +6,9 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { ConnectionState } from '@dxos/client/mesh';
|
|
9
10
|
import { Operation } from '@dxos/compute';
|
|
10
11
|
import { CreateAtom, GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
11
|
-
import { ConnectionState } from '@dxos/react-client/mesh';
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
14
14
|
import { ClientOperation } from '#operations';
|
|
@@ -7,6 +7,7 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
8
8
|
import { Client, ClientService } from '@dxos/client';
|
|
9
9
|
import { EffectEx } from '@dxos/effect';
|
|
10
|
+
import { makeIdentityService, makeSpaceService } from '@dxos/halo-adapter-client';
|
|
10
11
|
import { log } from '@dxos/log';
|
|
11
12
|
|
|
12
13
|
import { ClientEvents } from '#types';
|
|
@@ -44,6 +45,27 @@ export default Capability.makeModule(
|
|
|
44
45
|
});
|
|
45
46
|
});
|
|
46
47
|
|
|
48
|
+
// Interim fix: when a guest tab reconnects to a newly-elected leader worker (e.g. after the
|
|
49
|
+
// previous leader tab closes), its proxies are left in a broken state. Force a full reload to
|
|
50
|
+
// re-establish a clean session until the reconnect flow can recover in place.
|
|
51
|
+
// TODO(dmaretskyi): Remove once guest tabs recover from a leader handover without reloading.
|
|
52
|
+
//
|
|
53
|
+
// `client.reset()` also fires this event (its teardown reconnects this tab to a fresh worker),
|
|
54
|
+
// and reset must reload too, but to a different URL. `reload()` re-requests the *current* URL
|
|
55
|
+
// (path included); after a reset the current route (e.g. the Devices settings panel where reset
|
|
56
|
+
// was triggered) points at now-deleted data, so reopening it shows stale/broken UI. Navigating
|
|
57
|
+
// to `origin` instead drops the path and boots the app fresh — which is also what the app's own
|
|
58
|
+
// post-reset flow targets. The two branches differ only when the path isn't already `/`; a
|
|
59
|
+
// normal reconnect keeps the user where they were, a reset returns them to the root.
|
|
60
|
+
client.services.reconnected?.on(() => {
|
|
61
|
+
log.info('client reconnected, reloading to re-establish session');
|
|
62
|
+
if (client.resetting) {
|
|
63
|
+
window.location.href = window.location.origin;
|
|
64
|
+
} else {
|
|
65
|
+
window.location.reload();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
47
69
|
let spacesReadyFired = false;
|
|
48
70
|
const subscription = client.spaces.subscribe(async () => {
|
|
49
71
|
if (!spacesReadyFired) {
|
|
@@ -75,6 +97,10 @@ export default Capability.makeModule(
|
|
|
75
97
|
}),
|
|
76
98
|
),
|
|
77
99
|
Capability.contributes(Capabilities.Layer, ClientService.fromClient(client)),
|
|
100
|
+
// HALO service instances for imperative consumers (so plugins read identity/spaces
|
|
101
|
+
// through @dxos/halo instead of the client directly).
|
|
102
|
+
Capability.contributes(ClientCapabilities.IdentityService, makeIdentityService(client)),
|
|
103
|
+
Capability.contributes(ClientCapabilities.SpaceService, makeSpaceService(client)),
|
|
78
104
|
];
|
|
79
105
|
}),
|
|
80
106
|
);
|
|
@@ -13,10 +13,20 @@ export const LayerSpecs = Capability.lazy<void, Capability.Any[]>('LayerSpecs',
|
|
|
13
13
|
export const Migrations = Capability.lazy('Migrations', () => import('./migrations'));
|
|
14
14
|
export { NavigationHandler } from './navigation-handler';
|
|
15
15
|
export type { NavigationHandlerOptions } from './navigation-handler';
|
|
16
|
+
export const NavigationTargetLoader = Capability.lazy(
|
|
17
|
+
'NavigationTargetLoader',
|
|
18
|
+
() => import('./navigation-target-loader'),
|
|
19
|
+
);
|
|
16
20
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
17
21
|
'OperationHandler',
|
|
18
22
|
() => import('./operation-handler'),
|
|
19
23
|
);
|
|
20
24
|
export const ReactContext = Capability.lazy('ReactContext', () => import('./react-context'));
|
|
25
|
+
export const RemoteTraceMonitor = Capability.lazy('RemoteTraceMonitor', () => import('./remote-trace-monitor'));
|
|
21
26
|
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
22
27
|
export const SchemaDefs = Capability.lazy('SchemaDefs', () => import('./schema-defs'));
|
|
28
|
+
export const SpaceReplicationProgress = Capability.lazy(
|
|
29
|
+
'SpaceReplicationProgress',
|
|
30
|
+
() => import('./space-replication-progress'),
|
|
31
|
+
);
|
|
32
|
+
export const TraceProgress = Capability.lazy('TraceProgress', () => import('./trace-progress'));
|
|
@@ -8,8 +8,10 @@ import * as Layer from 'effect/Layer';
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { ClientService } from '@dxos/client';
|
|
10
10
|
import { Credential, LayerSpec } from '@dxos/compute';
|
|
11
|
+
import { accessTokenResolverFromEdge, credentialsLayerFromDatabase } from '@dxos/compute-runtime';
|
|
11
12
|
import { Database } from '@dxos/echo';
|
|
12
|
-
import {
|
|
13
|
+
import { Identity, Space } from '@dxos/halo';
|
|
14
|
+
import { layerIdentity, layerSpace } from '@dxos/halo-adapter-client';
|
|
13
15
|
import { invariant } from '@dxos/invariant';
|
|
14
16
|
|
|
15
17
|
import { ClientCapabilities } from '#types';
|
|
@@ -72,19 +74,79 @@ const DatabaseLayerSpec = LayerSpec.make(
|
|
|
72
74
|
),
|
|
73
75
|
);
|
|
74
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Resolves server-custodied access tokens through EDGE. Application-scoped: the resolver's cache is
|
|
79
|
+
* keyed by token id and is worth sharing across spaces.
|
|
80
|
+
*/
|
|
81
|
+
const AccessTokenResolverLayerSpec = LayerSpec.make(
|
|
82
|
+
{
|
|
83
|
+
affinity: 'application',
|
|
84
|
+
requires: [Capability.Service],
|
|
85
|
+
provides: [Credential.AccessTokenResolver],
|
|
86
|
+
},
|
|
87
|
+
() =>
|
|
88
|
+
Layer.unwrapEffect(
|
|
89
|
+
Effect.gen(function* () {
|
|
90
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
91
|
+
return accessTokenResolverFromEdge(() => client.edge.http);
|
|
92
|
+
}).pipe(Effect.orDie),
|
|
93
|
+
),
|
|
94
|
+
);
|
|
95
|
+
|
|
75
96
|
const CredentialsLayerSpec = LayerSpec.make(
|
|
76
97
|
{
|
|
77
98
|
affinity: 'space',
|
|
78
|
-
requires: [Database.Service],
|
|
99
|
+
requires: [Database.Service, Credential.AccessTokenResolver],
|
|
79
100
|
provides: [Credential.CredentialsService],
|
|
80
101
|
},
|
|
81
102
|
() => credentialsLayerFromDatabase(),
|
|
82
103
|
);
|
|
83
104
|
|
|
105
|
+
/**
|
|
106
|
+
* The HALO {@link Identity.Service} backed by the client adapter. Application-scoped: it manages
|
|
107
|
+
* the local identity and its devices for the whole client.
|
|
108
|
+
*/
|
|
109
|
+
const IdentityLayerSpec = LayerSpec.make(
|
|
110
|
+
{
|
|
111
|
+
affinity: 'application',
|
|
112
|
+
requires: [ClientService],
|
|
113
|
+
provides: [Identity.Service],
|
|
114
|
+
},
|
|
115
|
+
() =>
|
|
116
|
+
Layer.unwrapEffect(
|
|
117
|
+
Effect.gen(function* () {
|
|
118
|
+
const client = yield* ClientService;
|
|
119
|
+
return layerIdentity(client);
|
|
120
|
+
}),
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The HALO {@link Space.Service} backed by the client adapter. Application-scoped: its verbs are
|
|
126
|
+
* keyed by {@link SpaceId} and cover every space on the client, not a single space slice.
|
|
127
|
+
*/
|
|
128
|
+
const SpaceLayerSpec = LayerSpec.make(
|
|
129
|
+
{
|
|
130
|
+
affinity: 'application',
|
|
131
|
+
requires: [ClientService],
|
|
132
|
+
provides: [Space.Service],
|
|
133
|
+
},
|
|
134
|
+
() =>
|
|
135
|
+
Layer.unwrapEffect(
|
|
136
|
+
Effect.gen(function* () {
|
|
137
|
+
const client = yield* ClientService;
|
|
138
|
+
return layerSpace(client);
|
|
139
|
+
}),
|
|
140
|
+
),
|
|
141
|
+
);
|
|
142
|
+
|
|
84
143
|
export default Capability.makeModule(() =>
|
|
85
144
|
Effect.succeed([
|
|
86
145
|
Capability.contributes(Capabilities.LayerSpec, ClientLayerSpec),
|
|
87
146
|
Capability.contributes(Capabilities.LayerSpec, DatabaseLayerSpec),
|
|
147
|
+
Capability.contributes(Capabilities.LayerSpec, AccessTokenResolverLayerSpec),
|
|
88
148
|
Capability.contributes(Capabilities.LayerSpec, CredentialsLayerSpec),
|
|
149
|
+
Capability.contributes(Capabilities.LayerSpec, IdentityLayerSpec),
|
|
150
|
+
Capability.contributes(Capabilities.LayerSpec, SpaceLayerSpec),
|
|
89
151
|
]),
|
|
90
152
|
);
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { log } from '@dxos/log';
|
|
9
|
+
import { RpcClosedError } from '@dxos/protocols';
|
|
8
10
|
|
|
9
11
|
import { ClientCapabilities } from '#types';
|
|
10
12
|
|
|
@@ -20,7 +22,13 @@ export default Capability.makeModule(
|
|
|
20
22
|
(_migrations: any[]) => {
|
|
21
23
|
const migrations = Array.from(new Set(_migrations.flat()));
|
|
22
24
|
const spaces = client.spaces.get();
|
|
23
|
-
|
|
25
|
+
// Migrations run fire-and-forget from the subscription callback; an in-flight flush can be
|
|
26
|
+
// interrupted when the client shuts down, which surfaces as a benign RpcClosedError race.
|
|
27
|
+
void Promise.all(spaces.map((space: any) => space.internal.db.runMigrations(migrations))).catch((err) => {
|
|
28
|
+
if (!(err instanceof RpcClosedError)) {
|
|
29
|
+
log.catch(err);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
24
32
|
},
|
|
25
33
|
{ immediate: true },
|
|
26
34
|
);
|
|
@@ -5,16 +5,20 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
9
|
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { log } from '@dxos/log';
|
|
11
11
|
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
|
|
12
14
|
import { ClientOperation } from '../../operations';
|
|
13
15
|
|
|
14
16
|
export type NavigationHandlerOptions = {
|
|
15
17
|
invitationProp?: string;
|
|
16
18
|
tokenProp?: string;
|
|
17
19
|
tokenTypeProp?: string;
|
|
20
|
+
/** Set false when another plugin (e.g. plugin-onboarding) owns the invitation URL param. */
|
|
21
|
+
invitationUrlHandler?: boolean;
|
|
18
22
|
};
|
|
19
23
|
|
|
20
24
|
/**
|
|
@@ -26,6 +30,7 @@ export default Capability.makeModule(
|
|
|
26
30
|
invitationProp = 'deviceInvitationCode',
|
|
27
31
|
tokenProp = 'token',
|
|
28
32
|
tokenTypeProp = 'type',
|
|
33
|
+
invitationUrlHandler = true,
|
|
29
34
|
}: NavigationHandlerOptions = {}) {
|
|
30
35
|
const capabilities = yield* Capability.Service;
|
|
31
36
|
const operationService = yield* Capability.get(Capabilities.OperationInvoker);
|
|
@@ -34,7 +39,7 @@ export default Capability.makeModule(
|
|
|
34
39
|
Effect.gen(function* () {
|
|
35
40
|
const token = url.searchParams.get(tokenProp);
|
|
36
41
|
const tokenType = url.searchParams.get(tokenTypeProp);
|
|
37
|
-
const invitationCode = url.searchParams.get(invitationProp);
|
|
42
|
+
const invitationCode = invitationUrlHandler ? url.searchParams.get(invitationProp) : null;
|
|
38
43
|
|
|
39
44
|
if (token && tokenType === 'login') {
|
|
40
45
|
log('login token received via navigation');
|
|
@@ -47,9 +52,21 @@ export default Capability.makeModule(
|
|
|
47
52
|
yield* Operation.invoke(ClientOperation.JoinIdentity, { invitationCode });
|
|
48
53
|
}
|
|
49
54
|
}).pipe(
|
|
55
|
+
Effect.catchAll((error) =>
|
|
56
|
+
Effect.gen(function* () {
|
|
57
|
+
log.warn('navigation handler failed', { error });
|
|
58
|
+
yield* Operation.invoke(LayoutOperation.AddToast, {
|
|
59
|
+
id: `${meta.profile.key}/navigation-failed`,
|
|
60
|
+
title: ['navigation-failed-toast.title', { ns: meta.profile.key }],
|
|
61
|
+
description: ['navigation-failed-toast.description', { ns: meta.profile.key }],
|
|
62
|
+
icon: 'ph--warning--regular',
|
|
63
|
+
}).pipe(
|
|
64
|
+
Effect.catchAll((toastError) => Effect.sync(() => log.warn('failed to add toast', { toastError }))),
|
|
65
|
+
);
|
|
66
|
+
}),
|
|
67
|
+
),
|
|
50
68
|
Effect.provideService(Capability.Service, capabilities),
|
|
51
69
|
Effect.provideService(Operation.Service, operationService),
|
|
52
|
-
Effect.orDie,
|
|
53
70
|
);
|
|
54
71
|
|
|
55
72
|
return Capability.contributes(AppCapabilities.NavigationHandler, handler);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, NotFound } from '@dxos/app-toolkit';
|
|
9
|
+
import { Context } from '@dxos/context';
|
|
10
|
+
import { Database, EID } from '@dxos/echo';
|
|
11
|
+
import { EntityId, SpaceId } from '@dxos/keys';
|
|
12
|
+
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
import { ClientCapabilities } from '#types';
|
|
15
|
+
|
|
16
|
+
/** Cap on the remote edge existence check so an unreachable edge cannot block navigation. */
|
|
17
|
+
const EDGE_EXISTENCE_TIMEOUT = '3 seconds';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Loads a navigation target by `(spaceId, entityId)` on behalf of the layout plugins, so they can
|
|
21
|
+
* restore a URL-addressed plank without depending on the client for object loading. Loads the object
|
|
22
|
+
* into local ECHO (materializing its graph node) when it exists locally, and otherwise checks remote
|
|
23
|
+
* existence via edge. See {@link AppCapabilities.NavigationTargetLoader}.
|
|
24
|
+
*/
|
|
25
|
+
export default Capability.makeModule(
|
|
26
|
+
Effect.fnUntraced(function* () {
|
|
27
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
28
|
+
|
|
29
|
+
// Remote existence check (does not materialize a local node); reuses the shared edge checker.
|
|
30
|
+
const checkRemote = NotFound.createEdgeExistenceChecker((spaceId, body) =>
|
|
31
|
+
client.edge.http.execQuery(new Context(), spaceId, body),
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const loader: AppCapabilities.NavigationTargetLoader = {
|
|
35
|
+
id: meta.profile.key,
|
|
36
|
+
load: ({ spaceId, entityId }) =>
|
|
37
|
+
Effect.gen(function* () {
|
|
38
|
+
if (!SpaceId.isValid(spaceId) || !EntityId.isValid(entityId)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
const eid = EID.make({ spaceId, entityId });
|
|
42
|
+
|
|
43
|
+
// Local first: loading the object populates the collection/type-section refs that address
|
|
44
|
+
// it, so the next graph expansion materializes its node. Wait for the space to be ready so a
|
|
45
|
+
// cold restore (space not yet loaded when the URL is resolved) still finds it.
|
|
46
|
+
const space = client.spaces.get(spaceId);
|
|
47
|
+
if (space) {
|
|
48
|
+
const loaded = yield* Effect.promise(() => space.waitUntilReady()).pipe(
|
|
49
|
+
Effect.flatMap(() => Database.load(space.db.makeRef(eid))),
|
|
50
|
+
Effect.as(true),
|
|
51
|
+
Effect.catchAll(() => Effect.succeed(false)),
|
|
52
|
+
);
|
|
53
|
+
if (loaded) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Remote fallback: confirms the object exists somewhere, even if it has not replicated
|
|
59
|
+
// locally yet (in which case the node cannot render until it does). Bounded so an
|
|
60
|
+
// unreachable edge cannot hang navigation.
|
|
61
|
+
return yield* checkRemote(eid).pipe(
|
|
62
|
+
Effect.timeout(EDGE_EXISTENCE_TIMEOUT),
|
|
63
|
+
Effect.catchAll(() => Effect.succeed(false)),
|
|
64
|
+
);
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return Capability.contributes(AppCapabilities.NavigationTargetLoader, loader);
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import * as Context from 'effect/Context';
|
|
5
6
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React, { ReactNode } from 'react';
|
|
7
|
+
import React, { type ReactNode, useMemo } from 'react';
|
|
7
8
|
|
|
8
9
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
10
|
import { useCapability } from '@dxos/app-framework/ui';
|
|
11
|
+
import { Identity, Space } from '@dxos/halo';
|
|
12
|
+
import { makeIdentityService, makeSpaceService } from '@dxos/halo-adapter-client';
|
|
13
|
+
import { HaloProvider } from '@dxos/halo-react';
|
|
10
14
|
import { ClientProvider } from '@dxos/react-client';
|
|
11
15
|
|
|
12
16
|
import { meta } from '#meta';
|
|
@@ -18,7 +22,21 @@ export default Capability.makeModule(() =>
|
|
|
18
22
|
id: meta.profile.key,
|
|
19
23
|
context: ({ children }: { children?: ReactNode }) => {
|
|
20
24
|
const client = useCapability(ClientCapabilities.Client);
|
|
21
|
-
|
|
25
|
+
// Wrap the tree with the HALO services (via the client adapter) so `@dxos/halo-react`
|
|
26
|
+
// hooks resolve. Kept inside ClientProvider while consumers migrate off `@dxos/client`.
|
|
27
|
+
const services = useMemo(
|
|
28
|
+
() =>
|
|
29
|
+
Context.empty().pipe(
|
|
30
|
+
Context.add(Identity.Service, makeIdentityService(client)),
|
|
31
|
+
Context.add(Space.Service, makeSpaceService(client)),
|
|
32
|
+
),
|
|
33
|
+
[client],
|
|
34
|
+
);
|
|
35
|
+
return (
|
|
36
|
+
<ClientProvider client={client}>
|
|
37
|
+
<HaloProvider services={services}>{children}</HaloProvider>
|
|
38
|
+
</ClientProvider>
|
|
39
|
+
);
|
|
22
40
|
},
|
|
23
41
|
}),
|
|
24
42
|
),
|