@dxos/plugin-client 0.8.4-main.72ec0f3 → 0.8.4-main.74a063c4e0
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/browser/chunk-ELAYKIQU.mjs +12 -0
- package/dist/lib/browser/chunk-ELAYKIQU.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-M43LJQ5U.mjs +175 -0
- package/dist/lib/browser/chunk-M43LJQ5U.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RDIG75CA.mjs → chunk-WNJRYPGG.mjs} +36 -15
- package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1060 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-agent-SS5SE35J.mjs +34 -0
- package/dist/lib/browser/create-agent-SS5SE35J.mjs.map +7 -0
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs +30 -0
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs.map +7 -0
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs +105 -0
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs.map +7 -0
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs +44 -0
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +120 -133
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/join-identity-2BP4G2SD.mjs +27 -0
- package/dist/lib/browser/join-identity-2BP4G2SD.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/recover-identity-LS6B5INB.mjs +26 -0
- package/dist/lib/browser/recover-identity-LS6B5INB.mjs.map +7 -0
- package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs +82 -0
- package/dist/lib/browser/redeem-passkey-OCIV6VCK.mjs.map +7 -0
- package/dist/lib/browser/redeem-token-6BCRGKV6.mjs +37 -0
- package/dist/lib/browser/redeem-token-6BCRGKV6.mjs.map +7 -0
- package/dist/lib/browser/reset-storage-RQHXLTZ7.mjs +26 -0
- package/dist/lib/browser/reset-storage-RQHXLTZ7.mjs.map +7 -0
- package/dist/lib/browser/share-identity-YJEBJTPA.mjs +31 -0
- package/dist/lib/browser/share-identity-YJEBJTPA.mjs.map +7 -0
- package/dist/lib/browser/testing/index.mjs +22 -0
- package/dist/lib/browser/testing/index.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -4
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VENKFPBC.mjs → chunk-IT5LAIV3.mjs} +37 -15
- package/dist/lib/node-esm/chunk-IT5LAIV3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs +14 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs +176 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1061 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs +35 -0
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs.map +7 -0
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs +31 -0
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs.map +7 -0
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs +106 -0
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs.map +7 -0
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs +45 -0
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +120 -133
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/join-identity-75JCKQHM.mjs +28 -0
- package/dist/lib/node-esm/join-identity-75JCKQHM.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operations/index.mjs +14 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs +27 -0
- package/dist/lib/node-esm/recover-identity-AKGNTUJI.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs +83 -0
- package/dist/lib/node-esm/redeem-passkey-FZO3LZ57.mjs.map +7 -0
- package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs +38 -0
- package/dist/lib/node-esm/redeem-token-IHHIAIQ2.mjs.map +7 -0
- package/dist/lib/node-esm/reset-storage-OWV5UDMC.mjs +27 -0
- package/dist/lib/node-esm/reset-storage-OWV5UDMC.mjs.map +7 -0
- package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs +32 -0
- package/dist/lib/node-esm/share-identity-QZLY3VHE.mjs.map +7 -0
- package/dist/lib/node-esm/testing/index.mjs +23 -0
- package/dist/lib/node-esm/testing/index.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -4
- package/dist/types/src/ClientPlugin.d.ts +3 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +6 -7
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +28 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +3 -2
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +15 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +21 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +4 -3
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +3 -2
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/cli/commands/config/index.d.ts +5 -0
- package/dist/types/src/cli/commands/config/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/config/view.d.ts +5 -0
- package/dist/types/src/cli/commands/config/view.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/index.d.ts +7 -0
- package/dist/types/src/cli/commands/device/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/info.d.ts +7 -0
- package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/device/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/device/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/update/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/update/update.d.ts +11 -0
- package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/util.d.ts +16 -0
- package/dist/types/src/cli/commands/device/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/edge/index.d.ts +5 -0
- package/dist/types/src/cli/commands/edge/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/edge/status.d.ts +7 -0
- package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/create.d.ts +15 -0
- package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/add/add.d.ts +13 -0
- package/dist/types/src/cli/commands/halo/credential/add/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/add/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/add/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/index.d.ts +12 -0
- package/dist/types/src/cli/commands/halo/credential/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +19 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/identity/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/index.d.ts +3 -0
- package/dist/types/src/cli/commands/halo/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/join.d.ts +8 -0
- package/dist/types/src/cli/commands/halo/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/join.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/join/join.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/keys/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/recover/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/recover.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/recover/recover.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/seed/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/seed/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/share/share.d.ts +15 -0
- package/dist/types/src/cli/commands/halo/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/update.d.ts +11 -0
- package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/update.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/update/update.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/util.d.ts +13 -0
- package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +6 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/create.d.ts +10 -0
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/delete.d.ts +8 -0
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/import.d.ts +17 -0
- package/dist/types/src/cli/commands/profile/import.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/index.d.ts +19 -0
- package/dist/types/src/cli/commands/profile/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/inspect.d.ts +13 -0
- package/dist/types/src/cli/commands/profile/inspect.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/list.d.ts +6 -0
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/reset.d.ts +8 -0
- package/dist/types/src/cli/commands/profile/reset.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/util.d.ts +24 -0
- package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/testing/test-console.d.ts +37 -0
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +4 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +184 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +15 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts +16 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +9 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +19 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-agent.d.ts +5 -0
- package/dist/types/src/operations/create-agent.d.ts.map +1 -0
- package/dist/types/src/operations/create-identity.d.ts +5 -0
- package/dist/types/src/operations/create-identity.d.ts.map +1 -0
- package/dist/types/src/operations/create-passkey.d.ts +5 -0
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/create-recovery-code.d.ts +5 -0
- package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +36 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/join-identity.d.ts +5 -0
- package/dist/types/src/operations/join-identity.d.ts.map +1 -0
- package/dist/types/src/operations/recover-identity.d.ts +5 -0
- package/dist/types/src/operations/recover-identity.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-passkey.d.ts +5 -0
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-token.d.ts +5 -0
- package/dist/types/src/operations/redeem-token.d.ts.map +1 -0
- package/dist/types/src/operations/reset-storage.d.ts +5 -0
- package/dist/types/src/operations/reset-storage.d.ts.map +1 -0
- package/dist/types/src/operations/share-identity.d.ts +5 -0
- package/dist/types/src/operations/share-identity.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +13 -0
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -48
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +10 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +36 -31
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +89 -38
- package/src/ClientPlugin.ts +53 -58
- package/src/capabilities/app-graph-builder.ts +86 -104
- package/src/capabilities/client.ts +66 -30
- package/src/capabilities/index.ts +14 -10
- package/src/capabilities/migrations.ts +22 -17
- package/src/capabilities/navigation-handler/index.ts +9 -0
- package/src/capabilities/navigation-handler/navigation-handler.ts +64 -0
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +17 -14
- package/src/capabilities/react-surface.tsx +54 -48
- package/src/capabilities/schema-defs.ts +27 -20
- package/src/cli/commands/config/index.ts +12 -0
- package/src/cli/commands/config/view.ts +29 -0
- package/src/cli/commands/device/index.ts +14 -0
- package/src/cli/commands/device/info/index.ts +5 -0
- package/src/cli/commands/device/info/info.test.ts +28 -0
- package/src/cli/commands/device/info/info.ts +48 -0
- package/src/cli/commands/device/list/index.ts +5 -0
- package/src/cli/commands/device/list/list.test.ts +30 -0
- package/src/cli/commands/device/list/list.ts +28 -0
- package/src/cli/commands/device/update/index.ts +5 -0
- package/src/cli/commands/device/update/update.ts +68 -0
- package/src/cli/commands/device/util.ts +55 -0
- package/src/cli/commands/edge/index.ts +12 -0
- package/src/cli/commands/edge/status.ts +46 -0
- package/src/cli/commands/halo/create/create.test.ts +51 -0
- package/src/cli/commands/halo/create/create.ts +83 -0
- package/src/cli/commands/halo/create/index.ts +5 -0
- package/src/cli/commands/halo/credential/add/add.ts +97 -0
- package/src/cli/commands/halo/credential/add/index.ts +5 -0
- package/src/cli/commands/halo/credential/index.ts +13 -0
- package/src/cli/commands/halo/credential/list/index.ts +5 -0
- package/src/cli/commands/halo/credential/list/list.test.ts +27 -0
- package/src/cli/commands/halo/credential/list/list.ts +115 -0
- package/src/cli/commands/halo/identity/identity.test.ts +40 -0
- package/src/cli/commands/halo/identity/identity.ts +45 -0
- package/src/cli/commands/halo/identity/index.ts +5 -0
- package/src/cli/commands/halo/index.ts +21 -0
- package/src/cli/commands/halo/join/index.ts +5 -0
- package/src/cli/commands/halo/join/join.test.ts +10 -0
- package/src/cli/commands/halo/join/join.ts +87 -0
- package/src/cli/commands/halo/keys/index.ts +5 -0
- package/src/cli/commands/halo/keys/keys.test.ts +29 -0
- package/src/cli/commands/halo/keys/keys.ts +40 -0
- package/src/cli/commands/halo/recover/index.ts +5 -0
- package/src/cli/commands/halo/recover/recover.test.ts +10 -0
- package/src/cli/commands/halo/recover/recover.ts +44 -0
- package/src/cli/commands/halo/seed/index.ts +5 -0
- package/src/cli/commands/halo/seed/seed.ts +36 -0
- package/src/cli/commands/halo/share/index.ts +5 -0
- package/src/cli/commands/halo/share/share.ts +97 -0
- package/src/cli/commands/halo/update/index.ts +5 -0
- package/src/cli/commands/halo/update/update.test.ts +28 -0
- package/src/cli/commands/halo/update/update.ts +67 -0
- package/src/cli/commands/halo/util.ts +18 -0
- package/src/cli/commands/index.ts +9 -0
- package/src/cli/commands/profile/create.ts +90 -0
- package/src/cli/commands/profile/delete.ts +36 -0
- package/src/cli/commands/profile/import.ts +101 -0
- package/src/cli/commands/profile/index.ts +17 -0
- package/src/cli/commands/profile/inspect.ts +64 -0
- package/src/cli/commands/profile/list.ts +55 -0
- package/src/cli/commands/profile/reset.ts +45 -0
- package/src/cli/commands/profile/util.ts +48 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +31 -0
- package/src/cli/testing/test-console.ts +87 -0
- package/src/components/index.ts +0 -7
- package/src/constants.ts +9 -0
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +15 -10
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +86 -92
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +42 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -5
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +66 -55
- package/src/containers/ProfileContainer/index.ts +5 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -5
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -28
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +47 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +72 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +50 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +2 -6
- package/src/meta.ts +3 -3
- package/src/operations/create-agent.ts +26 -0
- package/src/operations/create-identity.ts +29 -0
- package/src/operations/create-passkey.ts +88 -0
- package/src/operations/create-recovery-code.ts +34 -0
- package/src/operations/definitions.ts +107 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/join-identity.ts +28 -0
- package/src/operations/recover-identity.ts +28 -0
- package/src/operations/redeem-passkey.ts +85 -0
- package/src/operations/redeem-token.ts +31 -0
- package/src/operations/reset-storage.ts +27 -0
- package/src/operations/share-identity.ts +26 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/initializeIdentity.ts +24 -0
- package/src/translations.ts +57 -43
- package/src/types/capabilities.ts +16 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +28 -20
- package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs +0 -124
- package/dist/lib/browser/app-graph-builder-ARY4H3VC.mjs.map +0 -7
- package/dist/lib/browser/chunk-4G4YWIUQ.mjs +0 -686
- package/dist/lib/browser/chunk-4G4YWIUQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-4LRO3Y2O.mjs +0 -19
- package/dist/lib/browser/chunk-4LRO3Y2O.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5UR2HOE.mjs +0 -18
- package/dist/lib/browser/chunk-N5UR2HOE.mjs.map +0 -7
- package/dist/lib/browser/chunk-RDIG75CA.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZRVMXLDR.mjs +0 -15
- package/dist/lib/browser/chunk-ZRVMXLDR.mjs.map +0 -7
- package/dist/lib/browser/client-O7U3MQ6J.mjs +0 -43
- package/dist/lib/browser/client-O7U3MQ6J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs +0 -305
- package/dist/lib/browser/intent-resolver-KLK7PJZK.mjs.map +0 -7
- package/dist/lib/browser/migrations-RUAKBBTF.mjs +0 -23
- package/dist/lib/browser/migrations-RUAKBBTF.mjs.map +0 -7
- package/dist/lib/browser/react-context-PCT5C3BN.mjs +0 -25
- package/dist/lib/browser/react-context-PCT5C3BN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RCXEA65V.mjs +0 -66
- package/dist/lib/browser/react-surface-RCXEA65V.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-UNNBAEFW.mjs +0 -25
- package/dist/lib/browser/schema-defs-UNNBAEFW.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs +0 -125
- package/dist/lib/node-esm/app-graph-builder-LLM25DRR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs +0 -19
- package/dist/lib/node-esm/chunk-6ANOJ7ZM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7M7VWQJW.mjs +0 -20
- package/dist/lib/node-esm/chunk-7M7VWQJW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs +0 -687
- package/dist/lib/node-esm/chunk-DJ6XKSE4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs +0 -17
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VENKFPBC.mjs.map +0 -7
- package/dist/lib/node-esm/client-6MTNT7M6.mjs +0 -44
- package/dist/lib/node-esm/client-6MTNT7M6.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs +0 -306
- package/dist/lib/node-esm/intent-resolver-YR2C224X.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-ASF2SAUR.mjs +0 -24
- package/dist/lib/node-esm/migrations-ASF2SAUR.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-F4QOBWSP.mjs +0 -26
- package/dist/lib/node-esm/react-context-F4QOBWSP.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SQBRXVMZ.mjs +0 -67
- package/dist/lib/node-esm/react-surface-SQBRXVMZ.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs +0 -26
- package/dist/lib/node-esm/schema-defs-MSIT2KK2.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -9
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -227
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts +0 -60
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +0 -62
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +0 -60
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts +0 -7
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +0 -65
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/intent-resolver.ts +0 -251
- package/src/components/JoinDialog.tsx +0 -54
- package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -42
- package/src/components/RecoveryCredentialsContainer.tsx +0 -69
- package/src/components/ResetDialog.stories.tsx +0 -52
- package/src/components/ResetDialog.tsx +0 -50
- package/src/events.ts +0 -15
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Schema from 'effect/Schema';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { PublicKey } from '@dxos/client';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
|
|
13
|
+
const CLIENT_OPERATION = `${meta.id}.operation`;
|
|
14
|
+
|
|
15
|
+
const IdentitySchema = Schema.Struct({
|
|
16
|
+
identityKey: Schema.instanceOf(PublicKey),
|
|
17
|
+
spaceKey: Schema.optional(Schema.instanceOf(PublicKey)),
|
|
18
|
+
profile: Schema.optional(
|
|
19
|
+
Schema.Struct({
|
|
20
|
+
displayName: Schema.optional(Schema.String),
|
|
21
|
+
avatarCid: Schema.optional(Schema.String),
|
|
22
|
+
data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const ProfileSchema = Schema.Struct({
|
|
28
|
+
displayName: Schema.optional(Schema.String),
|
|
29
|
+
avatarCid: Schema.optional(Schema.String),
|
|
30
|
+
data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export const CreateIdentity = Operation.make({
|
|
34
|
+
meta: { key: `${CLIENT_OPERATION}.create-identity`, name: 'Create Identity' },
|
|
35
|
+
services: [Capability.Service],
|
|
36
|
+
input: ProfileSchema,
|
|
37
|
+
output: IdentitySchema,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const JoinIdentity = Operation.make({
|
|
41
|
+
meta: { key: `${CLIENT_OPERATION}.join-identity`, name: 'Join Identity' },
|
|
42
|
+
services: [Capability.Service],
|
|
43
|
+
input: Schema.Struct({
|
|
44
|
+
invitationCode: Schema.optional(Schema.String),
|
|
45
|
+
}),
|
|
46
|
+
output: Schema.Void,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const ShareIdentity = Operation.make({
|
|
50
|
+
meta: { key: `${CLIENT_OPERATION}.share-identity`, name: 'Share Identity' },
|
|
51
|
+
services: [Capability.Service],
|
|
52
|
+
input: Schema.Void,
|
|
53
|
+
output: Schema.Void,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export const RecoverIdentity = Operation.make({
|
|
57
|
+
meta: { key: `${CLIENT_OPERATION}.recover-identity`, name: 'Recover Identity' },
|
|
58
|
+
services: [Capability.Service],
|
|
59
|
+
input: Schema.Void,
|
|
60
|
+
output: Schema.Void,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export const ResetStorage = Operation.make({
|
|
64
|
+
meta: { key: `${CLIENT_OPERATION}.reset-storage`, name: 'Reset Storage' },
|
|
65
|
+
services: [Capability.Service],
|
|
66
|
+
input: Schema.Struct({
|
|
67
|
+
mode: Schema.optional(Schema.String),
|
|
68
|
+
}),
|
|
69
|
+
output: Schema.Void,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export const CreateAgent = Operation.make({
|
|
73
|
+
meta: { key: `${CLIENT_OPERATION}.create-agent`, name: 'Create Agent' },
|
|
74
|
+
services: [Capability.Service],
|
|
75
|
+
input: Schema.Void,
|
|
76
|
+
output: Schema.Void,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export const CreateRecoveryCode = Operation.make({
|
|
80
|
+
meta: { key: `${CLIENT_OPERATION}.create-recovery-code`, name: 'Create Recovery Code' },
|
|
81
|
+
services: [Capability.Service],
|
|
82
|
+
input: Schema.Void,
|
|
83
|
+
output: Schema.Void,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const CreatePasskey = Operation.make({
|
|
87
|
+
meta: { key: `${CLIENT_OPERATION}.create-passkey`, name: 'Create Passkey' },
|
|
88
|
+
services: [Capability.Service],
|
|
89
|
+
input: Schema.Void,
|
|
90
|
+
output: Schema.Void,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const RedeemPasskey = Operation.make({
|
|
94
|
+
meta: { key: `${CLIENT_OPERATION}.redeem-passkey`, name: 'Redeem Passkey' },
|
|
95
|
+
services: [Capability.Service],
|
|
96
|
+
input: Schema.Void,
|
|
97
|
+
output: Schema.Void,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export const RedeemToken = Operation.make({
|
|
101
|
+
meta: { key: `${CLIENT_OPERATION}.redeem-token`, name: 'Redeem Token' },
|
|
102
|
+
services: [Capability.Service],
|
|
103
|
+
input: Schema.Struct({
|
|
104
|
+
token: Schema.String,
|
|
105
|
+
}),
|
|
106
|
+
output: Schema.Void,
|
|
107
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { OperationHandlerSet } from '@dxos/operation';
|
|
6
|
+
|
|
7
|
+
export * as ClientOperation from './definitions';
|
|
8
|
+
|
|
9
|
+
export const ClientOperationHandlerSet = OperationHandlerSet.lazy(
|
|
10
|
+
() => import('./create-agent'),
|
|
11
|
+
() => import('./create-identity'),
|
|
12
|
+
() => import('./create-passkey'),
|
|
13
|
+
() => import('./create-recovery-code'),
|
|
14
|
+
() => import('./join-identity'),
|
|
15
|
+
() => import('./recover-identity'),
|
|
16
|
+
() => import('./redeem-passkey'),
|
|
17
|
+
() => import('./redeem-token'),
|
|
18
|
+
() => import('./reset-storage'),
|
|
19
|
+
() => import('./share-identity'),
|
|
20
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { JOIN_DIALOG } from '../constants';
|
|
11
|
+
import { JoinIdentity } from './definitions';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof JoinIdentity> = JoinIdentity.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (data) {
|
|
16
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
17
|
+
subject: JOIN_DIALOG,
|
|
18
|
+
blockAlign: 'start',
|
|
19
|
+
props: {
|
|
20
|
+
initialInvitationCode: data.invitationCode,
|
|
21
|
+
initialDisposition: 'accept-halo-invitation',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}),
|
|
25
|
+
),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export default handler;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
10
|
+
|
|
11
|
+
import { JOIN_DIALOG } from '../constants';
|
|
12
|
+
import { RecoverIdentity } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof RecoverIdentity> = RecoverIdentity.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
18
|
+
subject: JOIN_DIALOG,
|
|
19
|
+
blockAlign: 'start',
|
|
20
|
+
props: {
|
|
21
|
+
initialDisposition: 'recover-identity',
|
|
22
|
+
} satisfies Partial<JoinPanelProps>,
|
|
23
|
+
});
|
|
24
|
+
}),
|
|
25
|
+
),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export default handler;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Match from 'effect/Match';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { decodeUrlSafeBase64, supportsNativePasskeys, loginNativePasskey } from '@dxos/app-toolkit';
|
|
10
|
+
import { PublicKey } from '@dxos/client';
|
|
11
|
+
import { invariant } from '@dxos/invariant';
|
|
12
|
+
import { Operation } from '@dxos/operation';
|
|
13
|
+
|
|
14
|
+
import { ClientCapabilities } from '../types';
|
|
15
|
+
import { RedeemPasskey } from './definitions';
|
|
16
|
+
|
|
17
|
+
const handler: Operation.WithHandler<typeof RedeemPasskey> = RedeemPasskey.pipe(
|
|
18
|
+
Operation.withHandler(
|
|
19
|
+
Effect.fnUntraced(function* () {
|
|
20
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
21
|
+
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
22
|
+
const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() =>
|
|
23
|
+
client.services.services.IdentityService!.requestRecoveryChallenge(),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const { lookupKey, signature, clientDataJson, authenticatorData } = yield* Match.value(
|
|
27
|
+
supportsNativePasskeys(),
|
|
28
|
+
).pipe(
|
|
29
|
+
Match.when(true, () =>
|
|
30
|
+
Effect.gen(function* () {
|
|
31
|
+
const result = yield* Effect.promise(() =>
|
|
32
|
+
loginNativePasskey({ challenge: Uint8Array.from(Buffer.from(challenge, 'base64')) }),
|
|
33
|
+
);
|
|
34
|
+
invariant(result, 'Native passkey login returned no result');
|
|
35
|
+
return {
|
|
36
|
+
lookupKey: PublicKey.from(decodeUrlSafeBase64(result.user_handle)),
|
|
37
|
+
signature: Buffer.from(decodeUrlSafeBase64(result.signature)),
|
|
38
|
+
clientDataJson: Buffer.from(decodeUrlSafeBase64(result.client_data_json)),
|
|
39
|
+
authenticatorData: Buffer.from(decodeUrlSafeBase64(result.authenticator_data)),
|
|
40
|
+
};
|
|
41
|
+
}),
|
|
42
|
+
),
|
|
43
|
+
Match.orElse(() =>
|
|
44
|
+
Effect.gen(function* () {
|
|
45
|
+
const credential = yield* Effect.promise(() =>
|
|
46
|
+
navigator.credentials.get({
|
|
47
|
+
publicKey: {
|
|
48
|
+
challenge: Buffer.from(challenge, 'base64'),
|
|
49
|
+
rpId: location.hostname,
|
|
50
|
+
userVerification: 'required',
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
return {
|
|
55
|
+
lookupKey: PublicKey.from(new Uint8Array((credential as any).response.userHandle)),
|
|
56
|
+
signature: Buffer.from((credential as any).response.signature),
|
|
57
|
+
clientDataJson: Buffer.from((credential as any).response.clientDataJSON),
|
|
58
|
+
authenticatorData: Buffer.from((credential as any).response.authenticatorData),
|
|
59
|
+
};
|
|
60
|
+
}),
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
yield* Effect.promise(() =>
|
|
65
|
+
client.services.services.IdentityService!.recoverIdentity(
|
|
66
|
+
{
|
|
67
|
+
external: {
|
|
68
|
+
lookupKey,
|
|
69
|
+
deviceKey,
|
|
70
|
+
controlFeedKey,
|
|
71
|
+
signature,
|
|
72
|
+
clientDataJson,
|
|
73
|
+
authenticatorData,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{ timeout: RECOVER_IDENTITY_RPC_TIMEOUT },
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
}),
|
|
80
|
+
),
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
export default handler;
|
|
84
|
+
|
|
85
|
+
const RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { ClientCapabilities } from '../types';
|
|
12
|
+
import { RedeemToken } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof RedeemToken> = RedeemToken.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (data) {
|
|
17
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
18
|
+
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
19
|
+
yield* Effect.promise(() =>
|
|
20
|
+
client.services.services.IdentityService!.recoverIdentity(
|
|
21
|
+
{ token: data.token },
|
|
22
|
+
{ timeout: RECOVER_IDENTITY_RPC_TIMEOUT },
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export default handler;
|
|
30
|
+
|
|
31
|
+
const RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { RESET_DIALOG } from '../constants';
|
|
11
|
+
import { ResetStorage } from './definitions';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof ResetStorage> = ResetStorage.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (data) {
|
|
16
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
17
|
+
subject: RESET_DIALOG,
|
|
18
|
+
blockAlign: 'start',
|
|
19
|
+
props: {
|
|
20
|
+
mode: data.mode ?? 'reset storage',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export default handler;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { LayoutOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
10
|
+
|
|
11
|
+
import { Account } from '../types';
|
|
12
|
+
import { ShareIdentity } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof ShareIdentity> = ShareIdentity.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: getSpacePath(Account.id) });
|
|
18
|
+
yield* Operation.invoke(LayoutOperation.Open, {
|
|
19
|
+
subject: [`${getSpacePath(Account.id)}/${Account.Profile}`],
|
|
20
|
+
});
|
|
21
|
+
yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.share' });
|
|
22
|
+
}),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export default handler;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { PERSONAL_SPACE_TAG } from '@dxos/app-toolkit';
|
|
8
|
+
import { type Client } from '@dxos/client';
|
|
9
|
+
import { type Space } from '@dxos/client-protocol';
|
|
10
|
+
import { type Identity } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create an identity and a personal space.
|
|
14
|
+
* Returns the identity and space for further setup.
|
|
15
|
+
*/
|
|
16
|
+
export const initializeIdentity = (
|
|
17
|
+
client: Client,
|
|
18
|
+
): Effect.Effect<{ identity: Identity; personalSpace: Space }, never, never> =>
|
|
19
|
+
Effect.gen(function* () {
|
|
20
|
+
const identity = yield* Effect.promise(() => client.halo.createIdentity());
|
|
21
|
+
const personalSpace = yield* Effect.promise(() => client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG] }));
|
|
22
|
+
yield* Effect.promise(() => personalSpace.waitUntilReady());
|
|
23
|
+
return { identity, personalSpace };
|
|
24
|
+
});
|
package/src/translations.ts
CHANGED
|
@@ -3,68 +3,82 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
6
7
|
|
|
7
|
-
import { meta } from '
|
|
8
|
+
import { meta } from '#meta';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
// TODO(burdon): Disambiguate with sdk/shell
|
|
11
|
+
const pluginTranslations = [
|
|
10
12
|
{
|
|
11
13
|
'en-US': {
|
|
12
14
|
[meta.id]: {
|
|
13
|
-
'account
|
|
14
|
-
'profile
|
|
15
|
-
'profile
|
|
16
|
-
'devices
|
|
17
|
-
'
|
|
18
|
-
'
|
|
15
|
+
'account.label': 'User profile',
|
|
16
|
+
'profile.label': 'Profile',
|
|
17
|
+
'profile.description': 'You can adjust how your user settings here.',
|
|
18
|
+
'devices.label': 'Devices',
|
|
19
|
+
'add-device.label': 'Add device',
|
|
20
|
+
'devices-verbose.label': 'Manage devices',
|
|
21
|
+
'add-device.description':
|
|
19
22
|
'Authenticating another device is a two-step process. To get started, create a code using the button below.',
|
|
20
|
-
'devices
|
|
23
|
+
'devices.description':
|
|
21
24
|
'You can add and remove devices, configure your agent in the cloud, reset this device, or log in as a different identity here.',
|
|
22
|
-
'create
|
|
23
|
-
'qr
|
|
25
|
+
'create-device-invitation.label': 'Create code',
|
|
26
|
+
'qr-code.description':
|
|
24
27
|
'Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.',
|
|
25
|
-
'security
|
|
26
|
-
'reset
|
|
27
|
-
'join
|
|
28
|
+
'security.label': 'Security',
|
|
29
|
+
'reset-device.description': 'Log out from this device, erasing all the data on this device.',
|
|
30
|
+
'join-new-identity.description':
|
|
28
31
|
'Log out from this device, erasing all the data currently on this device, and use a QR code or URL to log in.',
|
|
29
|
-
'recover
|
|
32
|
+
'recover-identity.description':
|
|
30
33
|
'Log out from this device, erasing all the data currently on this device, and use a passkey or recovery code to log in.',
|
|
31
|
-
'danger
|
|
32
|
-
'danger
|
|
34
|
+
'danger-zone.title': 'Log out',
|
|
35
|
+
'danger-zone.description':
|
|
33
36
|
'Because Composer is decentralized, logging out entails erasing all the data on this device. If you have any data on this device that you’d like to keep, you can log in on a separate device using a passkey or complete a peer-to-peer device invitation above.',
|
|
34
|
-
'display
|
|
35
|
-
'display
|
|
36
|
-
'display
|
|
37
|
-
'icon
|
|
38
|
-
'icon
|
|
39
|
-
'hue
|
|
40
|
-
'hue
|
|
37
|
+
'display-name.label': 'Display name',
|
|
38
|
+
'display-name.description': 'Your name as it appears in the app.',
|
|
39
|
+
'display-name-input.placeholder': 'Enter a name',
|
|
40
|
+
'icon.label': 'Avatar',
|
|
41
|
+
'icon.description': 'The emoji used to represent the user.',
|
|
42
|
+
'hue.label': 'Color',
|
|
43
|
+
'hue.description':
|
|
41
44
|
'The color used to represent you in the app, including as your avatar’s background, your cursor as it appears to others, and the messages you send in group threads.',
|
|
42
|
-
'did
|
|
43
|
-
'did
|
|
44
|
-
'open
|
|
45
|
-
'manage
|
|
46
|
-
'credentials
|
|
47
|
-
'no
|
|
48
|
-
'no
|
|
49
|
-
'recovery
|
|
50
|
-
'recovery
|
|
45
|
+
'did.label': 'DID',
|
|
46
|
+
'did.description': 'Your unique ID.',
|
|
47
|
+
'open-user-account.label': 'Open user account',
|
|
48
|
+
'manage-credentials-dialog.title': 'Manage Account Recovery',
|
|
49
|
+
'credentials-list.label': 'Recovery credentials',
|
|
50
|
+
'no-credentials.title': 'WARNING: There is currently no way to recover your account.',
|
|
51
|
+
'no-credentials.message': 'Create a recovery credential above to secure your account.',
|
|
52
|
+
'recovery-setup-dialog.title': 'Account Security',
|
|
53
|
+
'recovery-setup-dialog.description':
|
|
51
54
|
'In order to maintain access to your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password manager.',
|
|
52
|
-
'create
|
|
55
|
+
'create-passkey.label': 'Create Passkey',
|
|
53
56
|
// TODO(wittjosiah): At link to user-focused passkey information.
|
|
54
57
|
// Something like https://www.tomsguide.com/news/what-are-passkeys.
|
|
55
|
-
'create
|
|
58
|
+
'create-passkey.description':
|
|
56
59
|
'A passkey is a secure and easy to use credential that can be used to recover your account.',
|
|
57
|
-
'create
|
|
58
|
-
'create
|
|
59
|
-
'recovery
|
|
60
|
-
'recovery
|
|
60
|
+
'create-recovery-code.label': 'Create Recovery Code',
|
|
61
|
+
'create-recovery-code.description': 'A recovery code is 12 word phrase representing a private key.',
|
|
62
|
+
'recovery-code-dialog.title': 'Recovery Code',
|
|
63
|
+
'recovery-code-dialog.description':
|
|
61
64
|
'This is your identity recovery code, store it in a safe place. You can use it to recover your identity if you ever lose access to your devices.',
|
|
62
|
-
'recovery
|
|
63
|
-
'recovery
|
|
65
|
+
'recovery-code-dialog-warning-1.message': 'NOTE: This code will not be displayed again.',
|
|
66
|
+
'recovery-code-dialog-warning-2.message':
|
|
64
67
|
'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your account.',
|
|
65
|
-
'recovery
|
|
66
|
-
'continue
|
|
68
|
+
'recovery-code-confirmation.label': 'Please confirm you have saved the code.',
|
|
69
|
+
'continue.label': 'Continue',
|
|
70
|
+
'auth-code.message': 'Authorization code',
|
|
71
|
+
'auth-other-device-emoji.message': 'Authorization icon',
|
|
72
|
+
'cancel.label': 'Cancel',
|
|
73
|
+
'join-new-identity.label': 'Join an existing identity',
|
|
74
|
+
'qr.label': 'QR Code',
|
|
75
|
+
'recover-identity.label': 'Use a recovery code',
|
|
76
|
+
'reset-device.label': 'Reset storage',
|
|
77
|
+
'reset-dialog.description': 'Reset storage',
|
|
78
|
+
'reset-dialog.title': 'Reset storage',
|
|
67
79
|
},
|
|
68
80
|
},
|
|
69
81
|
},
|
|
70
82
|
] as const satisfies Resource[];
|
|
83
|
+
|
|
84
|
+
export const translations: Resource[] = [...pluginTranslations, ...shellTranslations];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { type Client } from '@dxos/client';
|
|
7
|
+
import { type ObjectMigration } from '@dxos/client/echo';
|
|
8
|
+
import { type Type } from '@dxos/echo';
|
|
9
|
+
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
|
|
12
|
+
export namespace ClientCapabilities {
|
|
13
|
+
export const Client = Capability.make<Client>(`${meta.id}.capability.client`);
|
|
14
|
+
export const Schema = Capability.make<Type.AnyEntity[]>(`${meta.id}.capability.schema`);
|
|
15
|
+
export const Migration = Capability.make<ObjectMigration[]>(`${meta.id}.capability.migration`);
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ActivationEvent } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from '#meta';
|
|
8
|
+
|
|
9
|
+
export namespace ClientEvents {
|
|
10
|
+
export const ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);
|
|
11
|
+
export const SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);
|
|
12
|
+
export const SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);
|
|
13
|
+
export const IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);
|
|
14
|
+
export const SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);
|
|
15
|
+
}
|