@dxos/plugin-client 0.8.4-main.ae835ea → 0.8.4-main.bc2380dfbc
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/ClientPlugin.mjs +10 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs +1029 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/ClientPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs +262 -0
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs.map +7 -0
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs +53 -0
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs.map +7 -0
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs +168 -0
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs.map +7 -0
- package/dist/lib/neutral/RecoveryCodeDialog-GBRH6ZSA.mjs +59 -0
- package/dist/lib/neutral/RecoveryCodeDialog-GBRH6ZSA.mjs.map +7 -0
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs +51 -0
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs.map +7 -0
- package/dist/lib/neutral/ResetDialog-VXOIHJXP.mjs +54 -0
- package/dist/lib/neutral/ResetDialog-VXOIHJXP.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-IK34U2RQ.mjs +117 -0
- package/dist/lib/neutral/app-graph-builder-IK34U2RQ.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +28 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +13 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-IYPUD3DP.mjs +62 -0
- package/dist/lib/neutral/chunk-IYPUD3DP.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-JVKCYW5O.mjs +8 -0
- package/dist/lib/neutral/chunk-JVKCYW5O.mjs.map +7 -0
- package/dist/lib/{browser/chunk-ZRVMXLDR.mjs → neutral/chunk-KJGNSH3K.mjs} +6 -3
- package/dist/lib/neutral/chunk-KJGNSH3K.mjs.map +7 -0
- package/dist/lib/{node-esm/chunk-VENKFPBC.mjs → neutral/chunk-M37DHX5L.mjs} +36 -16
- package/dist/lib/neutral/chunk-M37DHX5L.mjs.map +7 -0
- package/dist/lib/neutral/chunk-RPMM5NKJ.mjs +175 -0
- package/dist/lib/neutral/chunk-RPMM5NKJ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VAIJSQYA.mjs +12 -0
- package/dist/lib/neutral/chunk-VAIJSQYA.mjs.map +7 -0
- package/dist/lib/neutral/client-7JBIGMTX.mjs +62 -0
- package/dist/lib/neutral/client-7JBIGMTX.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +19 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-agent-JV3EM3TV.mjs +26 -0
- package/dist/lib/neutral/create-agent-JV3EM3TV.mjs.map +7 -0
- package/dist/lib/neutral/create-identity-GNGOTH6D.mjs +30 -0
- package/dist/lib/neutral/create-identity-GNGOTH6D.mjs.map +7 -0
- package/dist/lib/neutral/create-passkey-NCP4XA7C.mjs +81 -0
- package/dist/lib/neutral/create-passkey-NCP4XA7C.mjs.map +7 -0
- package/dist/lib/neutral/create-recovery-code-L5LA3GAP.mjs +36 -0
- package/dist/lib/neutral/create-recovery-code-L5LA3GAP.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +23 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/join-identity-3W6PJLKN.mjs +27 -0
- package/dist/lib/neutral/join-identity-3W6PJLKN.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/migrations-7FTW55ER.mjs +23 -0
- package/dist/lib/neutral/migrations-7FTW55ER.mjs.map +7 -0
- package/dist/lib/neutral/navigation-handler-TA4S74CF.mjs +46 -0
- package/dist/lib/neutral/navigation-handler-TA4S74CF.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs +13 -0
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +12 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +17 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-context-B5LXMHVM.mjs +23 -0
- package/dist/lib/neutral/react-context-B5LXMHVM.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-VSBYVQL7.mjs +60 -0
- package/dist/lib/neutral/react-surface-VSBYVQL7.mjs.map +7 -0
- package/dist/lib/neutral/recover-identity-KL6QY4GI.mjs +26 -0
- package/dist/lib/neutral/recover-identity-KL6QY4GI.mjs.map +7 -0
- package/dist/lib/neutral/redeem-passkey-NDEWSJTM.mjs +66 -0
- package/dist/lib/neutral/redeem-passkey-NDEWSJTM.mjs.map +7 -0
- package/dist/lib/neutral/redeem-token-YLWAVFXD.mjs +29 -0
- package/dist/lib/neutral/redeem-token-YLWAVFXD.mjs.map +7 -0
- package/dist/lib/neutral/reset-storage-OBHEGA6Z.mjs +26 -0
- package/dist/lib/neutral/reset-storage-OBHEGA6Z.mjs.map +7 -0
- package/dist/lib/neutral/schema-defs-6XJAJAQT.mjs +51 -0
- package/dist/lib/neutral/schema-defs-6XJAJAQT.mjs.map +7 -0
- package/dist/lib/neutral/share-identity-JQ5SL3J2.mjs +31 -0
- package/dist/lib/neutral/share-identity-JQ5SL3J2.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +26 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +74 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/ClientPlugin.d.ts +4 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/ClientPlugin.node.d.ts +5 -0
- package/dist/types/src/ClientPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ClientPlugin.test.d.ts +2 -0
- package/dist/types/src/ClientPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ClientPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ClientPlugin.workerd.d.ts.map +1 -0
- 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/commands/config/index.d.ts +5 -0
- package/dist/types/src/commands/config/index.d.ts.map +1 -0
- package/dist/types/src/commands/config/view.d.ts +5 -0
- package/dist/types/src/commands/config/view.d.ts.map +1 -0
- package/dist/types/src/commands/device/index.d.ts +7 -0
- package/dist/types/src/commands/device/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/index.d.ts +2 -0
- package/dist/types/src/commands/device/info/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/info.d.ts +7 -0
- package/dist/types/src/commands/device/info/info.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/info.test.d.ts +2 -0
- package/dist/types/src/commands/device/info/info.test.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/index.d.ts +2 -0
- package/dist/types/src/commands/device/list/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/list.d.ts +7 -0
- package/dist/types/src/commands/device/list/list.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/list.test.d.ts +2 -0
- package/dist/types/src/commands/device/list/list.test.d.ts.map +1 -0
- package/dist/types/src/commands/device/update/index.d.ts +2 -0
- package/dist/types/src/commands/device/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/update/update.d.ts +11 -0
- package/dist/types/src/commands/device/update/update.d.ts.map +1 -0
- package/dist/types/src/commands/device/util.d.ts +16 -0
- package/dist/types/src/commands/device/util.d.ts.map +1 -0
- package/dist/types/src/commands/edge/index.d.ts +5 -0
- package/dist/types/src/commands/edge/index.d.ts.map +1 -0
- package/dist/types/src/commands/edge/status.d.ts +7 -0
- package/dist/types/src/commands/edge/status.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/create.d.ts +15 -0
- package/dist/types/src/commands/halo/create/create.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/create.test.d.ts +2 -0
- package/dist/types/src/commands/halo/create/create.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/index.d.ts +2 -0
- package/dist/types/src/commands/halo/create/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts +13 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/index.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/add/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/index.d.ts +12 -0
- package/dist/types/src/commands/halo/credential/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/index.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/list/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/list.d.ts +19 -0
- package/dist/types/src/commands/halo/credential/list/list.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/list.test.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/list/list.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/identity.d.ts +7 -0
- package/dist/types/src/commands/halo/identity/identity.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/identity.test.d.ts +2 -0
- package/dist/types/src/commands/halo/identity/identity.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/index.d.ts +2 -0
- package/dist/types/src/commands/halo/identity/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/index.d.ts +3 -0
- package/dist/types/src/commands/halo/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/index.d.ts +2 -0
- package/dist/types/src/commands/halo/join/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.d.ts +8 -0
- package/dist/types/src/commands/halo/join/join.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.test.d.ts +2 -0
- package/dist/types/src/commands/halo/join/join.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/index.d.ts +2 -0
- package/dist/types/src/commands/halo/keys/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/keys.d.ts +7 -0
- package/dist/types/src/commands/halo/keys/keys.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/keys.test.d.ts +2 -0
- package/dist/types/src/commands/halo/keys/keys.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/index.d.ts +2 -0
- package/dist/types/src/commands/halo/recover/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/recover.d.ts +7 -0
- package/dist/types/src/commands/halo/recover/recover.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/recover.test.d.ts +2 -0
- package/dist/types/src/commands/halo/recover/recover.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/seed/index.d.ts +2 -0
- package/dist/types/src/commands/halo/seed/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/seed/seed.d.ts +7 -0
- package/dist/types/src/commands/halo/seed/seed.d.ts.map +1 -0
- package/dist/types/src/commands/halo/share/index.d.ts +2 -0
- package/dist/types/src/commands/halo/share/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/share/share.d.ts +15 -0
- package/dist/types/src/commands/halo/share/share.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/index.d.ts +2 -0
- package/dist/types/src/commands/halo/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/update.d.ts +11 -0
- package/dist/types/src/commands/halo/update/update.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/update.test.d.ts +2 -0
- package/dist/types/src/commands/halo/update/update.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/util.d.ts +13 -0
- package/dist/types/src/commands/halo/util.d.ts.map +1 -0
- package/dist/types/src/commands/index.d.ts +6 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/commands/profile/create.d.ts +10 -0
- package/dist/types/src/commands/profile/create.d.ts.map +1 -0
- package/dist/types/src/commands/profile/delete.d.ts +8 -0
- package/dist/types/src/commands/profile/delete.d.ts.map +1 -0
- package/dist/types/src/commands/profile/import.d.ts +17 -0
- package/dist/types/src/commands/profile/import.d.ts.map +1 -0
- package/dist/types/src/commands/profile/index.d.ts +19 -0
- package/dist/types/src/commands/profile/index.d.ts.map +1 -0
- package/dist/types/src/commands/profile/inspect.d.ts +13 -0
- package/dist/types/src/commands/profile/inspect.d.ts.map +1 -0
- package/dist/types/src/commands/profile/list.d.ts +6 -0
- package/dist/types/src/commands/profile/list.d.ts.map +1 -0
- package/dist/types/src/commands/profile/reset.d.ts +8 -0
- package/dist/types/src/commands/profile/reset.d.ts.map +1 -0
- package/dist/types/src/commands/profile/util.d.ts +24 -0
- package/dist/types/src/commands/profile/util.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 -4
- 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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -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 +9 -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 +126 -56
- package/src/ClientPlugin.node.ts +33 -0
- package/src/ClientPlugin.test.ts +29 -0
- package/src/ClientPlugin.ts +55 -59
- package/src/ClientPlugin.workerd.ts +16 -0
- 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 -13
- package/src/capabilities/react-surface.tsx +52 -49
- package/src/capabilities/schema-defs.ts +52 -25
- package/src/commands/config/index.ts +12 -0
- package/src/commands/config/view.ts +29 -0
- package/src/commands/device/index.ts +14 -0
- package/src/commands/device/info/index.ts +5 -0
- package/src/commands/device/info/info.test.ts +28 -0
- package/src/commands/device/info/info.ts +48 -0
- package/src/commands/device/list/index.ts +5 -0
- package/src/commands/device/list/list.test.ts +30 -0
- package/src/commands/device/list/list.ts +28 -0
- package/src/commands/device/update/index.ts +5 -0
- package/src/commands/device/update/update.ts +68 -0
- package/src/commands/device/util.ts +55 -0
- package/src/commands/edge/index.ts +12 -0
- package/src/commands/edge/status.ts +46 -0
- package/src/commands/halo/create/create.test.ts +56 -0
- package/src/commands/halo/create/create.ts +82 -0
- package/src/commands/halo/create/index.ts +5 -0
- package/src/commands/halo/credential/add/add.ts +97 -0
- package/src/commands/halo/credential/add/index.ts +5 -0
- package/src/commands/halo/credential/index.ts +13 -0
- package/src/commands/halo/credential/list/index.ts +5 -0
- package/src/commands/halo/credential/list/list.test.ts +27 -0
- package/src/commands/halo/credential/list/list.ts +115 -0
- package/src/commands/halo/identity/identity.test.ts +40 -0
- package/src/commands/halo/identity/identity.ts +45 -0
- package/src/commands/halo/identity/index.ts +5 -0
- package/src/commands/halo/index.ts +21 -0
- package/src/commands/halo/join/index.ts +5 -0
- package/src/commands/halo/join/join.test.ts +10 -0
- package/src/commands/halo/join/join.ts +87 -0
- package/src/commands/halo/keys/index.ts +5 -0
- package/src/commands/halo/keys/keys.test.ts +29 -0
- package/src/commands/halo/keys/keys.ts +40 -0
- package/src/commands/halo/recover/index.ts +5 -0
- package/src/commands/halo/recover/recover.test.ts +10 -0
- package/src/commands/halo/recover/recover.ts +44 -0
- package/src/commands/halo/seed/index.ts +5 -0
- package/src/commands/halo/seed/seed.ts +36 -0
- package/src/commands/halo/share/index.ts +5 -0
- package/src/commands/halo/share/share.ts +97 -0
- package/src/commands/halo/update/index.ts +5 -0
- package/src/commands/halo/update/update.test.ts +28 -0
- package/src/commands/halo/update/update.ts +67 -0
- package/src/commands/halo/util.ts +18 -0
- package/src/commands/index.ts +9 -0
- package/src/commands/profile/create.ts +90 -0
- package/src/commands/profile/delete.ts +36 -0
- package/src/commands/profile/import.ts +101 -0
- package/src/commands/profile/index.ts +17 -0
- package/src/commands/profile/inspect.ts +64 -0
- package/src/commands/profile/list.ts +55 -0
- package/src/commands/profile/reset.ts +45 -0
- package/src/commands/profile/util.ts +48 -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 +85 -90
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -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 -4
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +66 -60
- package/src/containers/ProfileContainer/index.ts +5 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +28 -27
- 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 +73 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +52 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +2 -5
- package/src/meta.ts +4 -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/plugin.ts +11 -0
- package/src/testing/index.ts +8 -0
- package/src/testing/initializeIdentity.ts +24 -0
- package/src/translations.ts +57 -44
- 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-KCCH45OW.mjs +0 -124
- package/dist/lib/browser/app-graph-builder-KCCH45OW.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 +0 -110
- package/dist/lib/browser/chunk-RDIG75CA.mjs.map +0 -7
- package/dist/lib/browser/chunk-SCNW6KMG.mjs +0 -686
- package/dist/lib/browser/chunk-SCNW6KMG.mjs.map +0 -7
- 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/index.mjs +0 -156
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-SPZU2X4O.mjs +0 -305
- package/dist/lib/browser/intent-resolver-SPZU2X4O.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/migrations-FQYDKKYO.mjs +0 -23
- package/dist/lib/browser/migrations-FQYDKKYO.mjs.map +0 -7
- package/dist/lib/browser/react-context-QCKETSRF.mjs +0 -24
- package/dist/lib/browser/react-context-QCKETSRF.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SLGNIGL6.mjs +0 -66
- package/dist/lib/browser/react-surface-SLGNIGL6.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-SPPWTZRH.mjs +0 -25
- package/dist/lib/browser/schema-defs-SPPWTZRH.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/app-graph-builder-B5IOYV4W.mjs +0 -125
- package/dist/lib/node-esm/app-graph-builder-B5IOYV4W.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-QT3EQXDU.mjs +0 -17
- package/dist/lib/node-esm/chunk-QT3EQXDU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RHMYXMKB.mjs +0 -687
- package/dist/lib/node-esm/chunk-RHMYXMKB.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/index.mjs +0 -157
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-4HEQTR5X.mjs +0 -306
- package/dist/lib/node-esm/intent-resolver-4HEQTR5X.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/migrations-2D5ENOAB.mjs +0 -24
- package/dist/lib/node-esm/migrations-2D5ENOAB.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-ZVUDFBCH.mjs +0 -25
- package/dist/lib/node-esm/react-context-ZVUDFBCH.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-FFOAE7HL.mjs +0 -67
- package/dist/lib/node-esm/react-surface-FFOAE7HL.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-FIV7SETB.mjs +0 -26
- package/dist/lib/node-esm/schema-defs-FIV7SETB.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- 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 -53
- package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -42
- package/src/components/RecoveryCredentialsContainer.tsx +0 -70
- package/src/components/ResetDialog.stories.tsx +0 -52
- package/src/components/ResetDialog.tsx +0 -49
- package/src/events.ts +0 -15
- /package/dist/lib/{browser/types/index.mjs.map → neutral/ClientPlugin.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /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
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import * as Function from 'effect/Function';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
Capabilities,
|
|
9
|
-
LayoutAction,
|
|
10
|
-
type PluginContext,
|
|
11
|
-
chain,
|
|
12
|
-
contributes,
|
|
13
|
-
createIntent,
|
|
14
|
-
createResolver,
|
|
15
|
-
} from '@dxos/app-framework';
|
|
16
|
-
import { invariant } from '@dxos/invariant';
|
|
17
|
-
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
18
|
-
import { PublicKey } from '@dxos/react-client';
|
|
19
|
-
import { type JoinPanelProps } from '@dxos/shell/react';
|
|
20
|
-
|
|
21
|
-
import { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../components';
|
|
22
|
-
import { ClientEvents } from '../events';
|
|
23
|
-
import { Account, ClientAction } from '../types';
|
|
24
|
-
|
|
25
|
-
import { ClientCapabilities } from './capabilities';
|
|
26
|
-
|
|
27
|
-
type IntentResolverOptions = {
|
|
28
|
-
context: PluginContext;
|
|
29
|
-
appName?: string;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;
|
|
33
|
-
|
|
34
|
-
export default ({ context, appName = 'Composer' }: IntentResolverOptions) =>
|
|
35
|
-
contributes(Capabilities.IntentResolver, [
|
|
36
|
-
createResolver({
|
|
37
|
-
intent: ClientAction.CreateIdentity,
|
|
38
|
-
resolve: async (profile) => {
|
|
39
|
-
const manager = context.getCapability(Capabilities.PluginManager);
|
|
40
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
41
|
-
const data = await client.halo.createIdentity(profile);
|
|
42
|
-
await manager.activate(ClientEvents.IdentityCreated);
|
|
43
|
-
return {
|
|
44
|
-
data,
|
|
45
|
-
intents: [
|
|
46
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
47
|
-
name: 'identity.create',
|
|
48
|
-
}),
|
|
49
|
-
],
|
|
50
|
-
};
|
|
51
|
-
},
|
|
52
|
-
}),
|
|
53
|
-
createResolver({
|
|
54
|
-
intent: ClientAction.JoinIdentity,
|
|
55
|
-
resolve: async (data) => {
|
|
56
|
-
return {
|
|
57
|
-
intents: [
|
|
58
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
59
|
-
part: 'dialog',
|
|
60
|
-
subject: JOIN_DIALOG,
|
|
61
|
-
options: {
|
|
62
|
-
blockAlign: 'start',
|
|
63
|
-
props: {
|
|
64
|
-
initialInvitationCode: data.invitationCode,
|
|
65
|
-
initialDisposition: 'accept-halo-invitation',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
],
|
|
70
|
-
};
|
|
71
|
-
},
|
|
72
|
-
}),
|
|
73
|
-
createResolver({
|
|
74
|
-
intent: ClientAction.ShareIdentity,
|
|
75
|
-
resolve: async () => {
|
|
76
|
-
return {
|
|
77
|
-
intents: [
|
|
78
|
-
Function.pipe(
|
|
79
|
-
createIntent(LayoutAction.SwitchWorkspace, {
|
|
80
|
-
part: 'workspace',
|
|
81
|
-
subject: Account.id,
|
|
82
|
-
}),
|
|
83
|
-
chain(LayoutAction.Open, {
|
|
84
|
-
part: 'main',
|
|
85
|
-
subject: [Account.Profile],
|
|
86
|
-
}),
|
|
87
|
-
),
|
|
88
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
89
|
-
name: 'identity.share',
|
|
90
|
-
}),
|
|
91
|
-
],
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
}),
|
|
95
|
-
createResolver({
|
|
96
|
-
intent: ClientAction.RecoverIdentity,
|
|
97
|
-
resolve: async () => {
|
|
98
|
-
return {
|
|
99
|
-
intents: [
|
|
100
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
101
|
-
part: 'dialog',
|
|
102
|
-
subject: JOIN_DIALOG,
|
|
103
|
-
options: {
|
|
104
|
-
blockAlign: 'start',
|
|
105
|
-
props: {
|
|
106
|
-
initialDisposition: 'recover-identity',
|
|
107
|
-
} satisfies Partial<JoinPanelProps>,
|
|
108
|
-
},
|
|
109
|
-
}),
|
|
110
|
-
],
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
}),
|
|
114
|
-
createResolver({
|
|
115
|
-
intent: ClientAction.ResetStorage,
|
|
116
|
-
resolve: async (data) => {
|
|
117
|
-
return {
|
|
118
|
-
intents: [
|
|
119
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
120
|
-
part: 'dialog',
|
|
121
|
-
subject: RESET_DIALOG,
|
|
122
|
-
options: {
|
|
123
|
-
blockAlign: 'start',
|
|
124
|
-
props: {
|
|
125
|
-
mode: data.mode ?? 'reset storage',
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
}),
|
|
129
|
-
],
|
|
130
|
-
};
|
|
131
|
-
},
|
|
132
|
-
}),
|
|
133
|
-
createResolver({
|
|
134
|
-
intent: ClientAction.CreateAgent,
|
|
135
|
-
resolve: async () => {
|
|
136
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
137
|
-
invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');
|
|
138
|
-
await client.services.services.EdgeAgentService.createAgent(null as any, { timeout: 10_000 });
|
|
139
|
-
},
|
|
140
|
-
}),
|
|
141
|
-
createResolver({
|
|
142
|
-
intent: ClientAction.CreateRecoveryCode,
|
|
143
|
-
resolve: async () => {
|
|
144
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
145
|
-
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
146
|
-
// TODO(wittjosiah): This needs a proper api.
|
|
147
|
-
const { recoveryCode } = await client.services.services.IdentityService.createRecoveryCredential({});
|
|
148
|
-
return {
|
|
149
|
-
intents: [
|
|
150
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
151
|
-
part: 'dialog',
|
|
152
|
-
subject: RECOVERY_CODE_DIALOG,
|
|
153
|
-
options: {
|
|
154
|
-
blockAlign: 'start',
|
|
155
|
-
type: 'alert',
|
|
156
|
-
props: { code: recoveryCode },
|
|
157
|
-
},
|
|
158
|
-
}),
|
|
159
|
-
],
|
|
160
|
-
};
|
|
161
|
-
},
|
|
162
|
-
}),
|
|
163
|
-
createResolver({
|
|
164
|
-
intent: ClientAction.CreatePasskey,
|
|
165
|
-
resolve: async () => {
|
|
166
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
167
|
-
const identity = client.halo.identity.get();
|
|
168
|
-
invariant(identity, 'Identity not available');
|
|
169
|
-
|
|
170
|
-
// TODO(wittjosiah): Consider factoring out passkey creation to the halo api.
|
|
171
|
-
const lookupKey = PublicKey.random();
|
|
172
|
-
const credential = await navigator.credentials.create({
|
|
173
|
-
publicKey: {
|
|
174
|
-
challenge: new Uint8Array(),
|
|
175
|
-
rp: { id: location.hostname, name: appName },
|
|
176
|
-
user: {
|
|
177
|
-
id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,
|
|
178
|
-
name: identity.did,
|
|
179
|
-
displayName: identity.profile?.displayName ?? '',
|
|
180
|
-
},
|
|
181
|
-
pubKeyCredParams: [
|
|
182
|
-
{ type: 'public-key', alg: -8 }, // Ed25519 (not yet supported across all browsers)
|
|
183
|
-
{ type: 'public-key', alg: -7 }, // ES256
|
|
184
|
-
],
|
|
185
|
-
// https://web.dev/articles/webauthn-discoverable-credentials#resident-key
|
|
186
|
-
authenticatorSelection: {
|
|
187
|
-
residentKey: 'required',
|
|
188
|
-
requireResidentKey: true,
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
invariant(credential, 'Credential not available');
|
|
194
|
-
const recoveryKey = PublicKey.from(new Uint8Array((credential as any).response.getPublicKey()));
|
|
195
|
-
const algorithm = (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519';
|
|
196
|
-
|
|
197
|
-
// TODO(wittjosiah): This needs a proper api.
|
|
198
|
-
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
199
|
-
await client.services.services.IdentityService.createRecoveryCredential({
|
|
200
|
-
data: {
|
|
201
|
-
recoveryKey,
|
|
202
|
-
algorithm,
|
|
203
|
-
lookupKey,
|
|
204
|
-
},
|
|
205
|
-
});
|
|
206
|
-
},
|
|
207
|
-
}),
|
|
208
|
-
createResolver({
|
|
209
|
-
intent: ClientAction.RedeemPasskey,
|
|
210
|
-
resolve: async () => {
|
|
211
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
212
|
-
// TODO(wittjosiah): This needs a proper api.
|
|
213
|
-
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
214
|
-
const { deviceKey, controlFeedKey, challenge } =
|
|
215
|
-
await client.services.services.IdentityService.requestRecoveryChallenge();
|
|
216
|
-
const credential = await navigator.credentials.get({
|
|
217
|
-
publicKey: {
|
|
218
|
-
challenge: Buffer.from(challenge, 'base64'),
|
|
219
|
-
rpId: location.hostname,
|
|
220
|
-
userVerification: 'required',
|
|
221
|
-
},
|
|
222
|
-
});
|
|
223
|
-
const lookupKey = PublicKey.from(new Uint8Array((credential as any).response.userHandle));
|
|
224
|
-
await client.services.services.IdentityService.recoverIdentity(
|
|
225
|
-
{
|
|
226
|
-
external: {
|
|
227
|
-
lookupKey,
|
|
228
|
-
deviceKey,
|
|
229
|
-
controlFeedKey,
|
|
230
|
-
signature: Buffer.from((credential as any).response.signature),
|
|
231
|
-
clientDataJson: Buffer.from((credential as any).response.clientDataJSON),
|
|
232
|
-
authenticatorData: Buffer.from((credential as any).response.authenticatorData),
|
|
233
|
-
},
|
|
234
|
-
},
|
|
235
|
-
{ timeout: RECOVER_IDENTITY_RPC_TIMEOUT },
|
|
236
|
-
);
|
|
237
|
-
},
|
|
238
|
-
}),
|
|
239
|
-
createResolver({
|
|
240
|
-
intent: ClientAction.RedeemToken,
|
|
241
|
-
resolve: async (data) => {
|
|
242
|
-
const client = context.getCapability(ClientCapabilities.Client);
|
|
243
|
-
// TODO(wittjosiah): This needs a proper api.
|
|
244
|
-
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
245
|
-
await client.services.services.IdentityService.recoverIdentity(
|
|
246
|
-
{ token: data.token },
|
|
247
|
-
{ timeout: RECOVER_IDENTITY_RPC_TIMEOUT },
|
|
248
|
-
);
|
|
249
|
-
},
|
|
250
|
-
}),
|
|
251
|
-
]);
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useCallback } from 'react';
|
|
6
|
-
|
|
7
|
-
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import { ObservabilityAction } from '@dxos/plugin-observability/types';
|
|
9
|
-
import { type InvitationResult } from '@dxos/react-client/invitations';
|
|
10
|
-
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
11
|
-
import { JoinPanel, type JoinPanelProps } from '@dxos/shell/react';
|
|
12
|
-
|
|
13
|
-
import { meta } from '../meta';
|
|
14
|
-
import { ClientAction } from '../types';
|
|
15
|
-
|
|
16
|
-
export const JOIN_DIALOG = `${meta.id}/JoinDialog`;
|
|
17
|
-
|
|
18
|
-
export const JoinDialog = (props: JoinPanelProps) => {
|
|
19
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
-
const { t } = useTranslation(meta.id);
|
|
21
|
-
|
|
22
|
-
const handleCancelResetStorage = useCallback(() => dispatch(createIntent(ClientAction.ShareIdentity)), [dispatch]);
|
|
23
|
-
|
|
24
|
-
const handleDone = useCallback(
|
|
25
|
-
async (result: InvitationResult | null) => {
|
|
26
|
-
if (result?.identityKey) {
|
|
27
|
-
await Promise.all([
|
|
28
|
-
dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } })),
|
|
29
|
-
dispatch(
|
|
30
|
-
createIntent(ObservabilityAction.SendEvent, {
|
|
31
|
-
name: props.initialDisposition === 'recover-identity' ? 'identity.recover' : 'identity.join',
|
|
32
|
-
}),
|
|
33
|
-
),
|
|
34
|
-
]);
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
[dispatch],
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Dialog.Content>
|
|
42
|
-
<Dialog.Title classNames='sr-only'>{t('join space label', { ns: 'os' })}</Dialog.Title>
|
|
43
|
-
<JoinPanel
|
|
44
|
-
mode='halo-only'
|
|
45
|
-
{...props}
|
|
46
|
-
exitActionParent={<Dialog.Close asChild />}
|
|
47
|
-
doneActionParent={<Dialog.Close asChild />}
|
|
48
|
-
onCancelResetStorage={handleCancelResetStorage}
|
|
49
|
-
onDone={handleDone}
|
|
50
|
-
/>
|
|
51
|
-
</Dialog.Content>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
|
|
7
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
8
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
10
|
-
|
|
11
|
-
import { ClientPlugin } from '../ClientPlugin';
|
|
12
|
-
import { translations } from '../translations';
|
|
13
|
-
|
|
14
|
-
import { RecoveryCredentialsContainer } from './RecoveryCredentialsContainer';
|
|
15
|
-
|
|
16
|
-
const meta = {
|
|
17
|
-
title: 'plugins/plugin-client/RecoveryCredentialsContainer',
|
|
18
|
-
component: RecoveryCredentialsContainer,
|
|
19
|
-
decorators: [
|
|
20
|
-
withTheme,
|
|
21
|
-
withPluginManager({
|
|
22
|
-
plugins: [
|
|
23
|
-
ClientPlugin({
|
|
24
|
-
onClientInitialized: async ({ client }) => {
|
|
25
|
-
await client.halo.createIdentity();
|
|
26
|
-
},
|
|
27
|
-
}),
|
|
28
|
-
IntentPlugin(),
|
|
29
|
-
],
|
|
30
|
-
}),
|
|
31
|
-
],
|
|
32
|
-
parameters: {
|
|
33
|
-
layout: 'fullscreen',
|
|
34
|
-
translations,
|
|
35
|
-
},
|
|
36
|
-
} satisfies Meta<typeof RecoveryCredentialsContainer>;
|
|
37
|
-
|
|
38
|
-
export default meta;
|
|
39
|
-
|
|
40
|
-
type Story = StoryObj<typeof meta>;
|
|
41
|
-
|
|
42
|
-
export const Default: Story = {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2024 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import { useCredentials } from '@dxos/react-client/halo';
|
|
9
|
-
import { Icon, IconButton, List, ListItem, Message, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { ControlGroup, ControlItem, ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
11
|
-
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
import { ClientAction } from '../types';
|
|
14
|
-
|
|
15
|
-
export const MANAGE_CREDENTIALS_DIALOG = `${meta.id}/ManageCredentialsDialog`;
|
|
16
|
-
|
|
17
|
-
export const RecoveryCredentialsContainer = () => {
|
|
18
|
-
const { t } = useTranslation(meta.id);
|
|
19
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
20
|
-
const credentials = useCredentials();
|
|
21
|
-
const recoveryCredentials = credentials.filter(
|
|
22
|
-
(credential) => credential.subject.assertion['@type'] === 'dxos.halo.credentials.IdentityRecovery',
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<ControlPage>
|
|
27
|
-
<ControlSection title={t('recovery setup dialog title')} description={t('recovery setup dialog description')}>
|
|
28
|
-
<ControlGroup>
|
|
29
|
-
<ControlItem title={t('create passkey label')} description={t('create passkey description')}>
|
|
30
|
-
<IconButton
|
|
31
|
-
label={t('create passkey label')}
|
|
32
|
-
icon='ph--key--duotone'
|
|
33
|
-
variant='primary'
|
|
34
|
-
size={5}
|
|
35
|
-
onClick={() => dispatch(createIntent(ClientAction.CreatePasskey))}
|
|
36
|
-
/>
|
|
37
|
-
</ControlItem>
|
|
38
|
-
<ControlItem title={t('create recovery code label')} description={t('create recovery code description')}>
|
|
39
|
-
<IconButton
|
|
40
|
-
label={t('create recovery code label')}
|
|
41
|
-
icon='ph--receipt--duotone'
|
|
42
|
-
variant='default'
|
|
43
|
-
size={5}
|
|
44
|
-
onClick={() => dispatch(createIntent(ClientAction.CreateRecoveryCode))}
|
|
45
|
-
/>
|
|
46
|
-
</ControlItem>
|
|
47
|
-
</ControlGroup>
|
|
48
|
-
</ControlSection>
|
|
49
|
-
<ControlSection title={t('credentials list label')}>
|
|
50
|
-
{recoveryCredentials.length < 1 ? (
|
|
51
|
-
<Message.Root valence='error' classNames='container-max-width'>
|
|
52
|
-
<Message.Title icon='ph--shield-warning--duotone'>{t('no credentials title')}</Message.Title>
|
|
53
|
-
<Message.Content>{t('no credentials message')}</Message.Content>
|
|
54
|
-
</Message.Root>
|
|
55
|
-
) : (
|
|
56
|
-
<List classNames='container-max-width pli-2'>
|
|
57
|
-
{recoveryCredentials.map((credential) => (
|
|
58
|
-
<ListItem.Root key={credential.id?.toHex()}>
|
|
59
|
-
<ListItem.Endcap>
|
|
60
|
-
<Icon icon='ph--key--regular' size={5} />
|
|
61
|
-
</ListItem.Endcap>
|
|
62
|
-
<ListItem.Heading>{credential.issuanceDate.toLocaleString()}</ListItem.Heading>
|
|
63
|
-
</ListItem.Root>
|
|
64
|
-
))}
|
|
65
|
-
</List>
|
|
66
|
-
)}
|
|
67
|
-
</ControlSection>
|
|
68
|
-
</ControlPage>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
9
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { Dialog } from '@dxos/react-ui';
|
|
11
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
|
-
|
|
13
|
-
import { ClientPlugin } from '../ClientPlugin';
|
|
14
|
-
import { translations } from '../translations';
|
|
15
|
-
|
|
16
|
-
import { ResetDialog, type ResetDialogProps } from './ResetDialog';
|
|
17
|
-
|
|
18
|
-
const Render = (props: ResetDialogProps) => {
|
|
19
|
-
return (
|
|
20
|
-
<Dialog.Root open>
|
|
21
|
-
<Dialog.Overlay>
|
|
22
|
-
<ResetDialog onReset={() => console.log('reset')} {...props} />
|
|
23
|
-
</Dialog.Overlay>
|
|
24
|
-
</Dialog.Root>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const meta = {
|
|
29
|
-
title: 'plugins/plugin-client/ResetDialog',
|
|
30
|
-
component: ResetDialog,
|
|
31
|
-
render: Render,
|
|
32
|
-
decorators: [
|
|
33
|
-
withTheme, // TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
34
|
-
withPluginManager({
|
|
35
|
-
plugins: [IntentPlugin(), ClientPlugin({})],
|
|
36
|
-
}),
|
|
37
|
-
],
|
|
38
|
-
parameters: {
|
|
39
|
-
layout: 'fullscreen',
|
|
40
|
-
translations,
|
|
41
|
-
},
|
|
42
|
-
} satisfies Meta<typeof ResetDialog>;
|
|
43
|
-
|
|
44
|
-
export default meta;
|
|
45
|
-
|
|
46
|
-
type Story = StoryObj<typeof meta>;
|
|
47
|
-
|
|
48
|
-
export const Default: Story = { args: { mode: 'reset storage' } };
|
|
49
|
-
|
|
50
|
-
export const JoinNewIdentity: Story = { args: { mode: 'join new identity' } };
|
|
51
|
-
|
|
52
|
-
export const Recover: Story = { args: { mode: 'recover' } };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useCallback } from 'react';
|
|
6
|
-
|
|
7
|
-
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import { useClient } from '@dxos/react-client';
|
|
9
|
-
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { ConfirmReset, type ConfirmResetProps } from '@dxos/shell/react';
|
|
11
|
-
|
|
12
|
-
import { meta } from '../meta';
|
|
13
|
-
import { type ClientPluginOptions } from '../types';
|
|
14
|
-
|
|
15
|
-
export const RESET_DIALOG = `${meta.id}/ResetDialog`;
|
|
16
|
-
|
|
17
|
-
export type ResetDialogProps = Pick<ConfirmResetProps, 'mode'> & Pick<ClientPluginOptions, 'onReset'>;
|
|
18
|
-
|
|
19
|
-
export const ResetDialog = ({ mode, onReset }: ResetDialogProps) => {
|
|
20
|
-
const { t } = useTranslation(meta.id);
|
|
21
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
22
|
-
const client = useClient();
|
|
23
|
-
|
|
24
|
-
const handleReset = useCallback(async () => {
|
|
25
|
-
await client.reset();
|
|
26
|
-
const target =
|
|
27
|
-
mode === 'join new identity' ? 'deviceInvitation' : mode === 'recover' ? 'recoverIdentity' : undefined;
|
|
28
|
-
await onReset?.({ target });
|
|
29
|
-
}, [dispatch, client, mode, onReset]);
|
|
30
|
-
|
|
31
|
-
const handleCancel = useCallback(() => {
|
|
32
|
-
void dispatch(
|
|
33
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
34
|
-
part: 'dialog',
|
|
35
|
-
options: { state: false },
|
|
36
|
-
}),
|
|
37
|
-
);
|
|
38
|
-
}, [dispatch]);
|
|
39
|
-
|
|
40
|
-
// TODO(wittjosiah): Add the sr-only translations.
|
|
41
|
-
// TODO(wittjosiah): Add missing descriptions to other dialogs.
|
|
42
|
-
return (
|
|
43
|
-
<Dialog.Content classNames='bs-content min-bs-[15rem] max-bs-full md:max-is-[40rem] overflow-hidden'>
|
|
44
|
-
<Dialog.Title classNames='sr-only'>{t('reset dialog title')}</Dialog.Title>
|
|
45
|
-
<Dialog.Description classNames='sr-only'>{t('reset dialog description')}</Dialog.Description>
|
|
46
|
-
<ConfirmReset active mode={mode} onConfirm={handleReset} onCancel={handleCancel} />
|
|
47
|
-
</Dialog.Content>
|
|
48
|
-
);
|
|
49
|
-
};
|
package/src/events.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineEvent } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { meta } from './meta';
|
|
8
|
-
|
|
9
|
-
export namespace ClientEvents {
|
|
10
|
-
export const ClientReady = defineEvent(`${meta.id}/event/client-ready`);
|
|
11
|
-
export const SetupSchema = defineEvent(`${meta.id}/event/setup-schema`);
|
|
12
|
-
export const SetupMigration = defineEvent(`${meta.id}/event/setup-migration`);
|
|
13
|
-
export const IdentityCreated = defineEvent(`${meta.id}/event/identity-created`);
|
|
14
|
-
export const SpacesReady = defineEvent(`${meta.id}/event/spaces-ready`);
|
|
15
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|