@dxos/plugin-client 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe
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-WNJRYPGG.mjs +131 -0
- package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +92 -80
- package/dist/lib/browser/cli/index.mjs.map +3 -3
- 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 +90 -93
- 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-QJLTL7J3.mjs +26 -0
- package/dist/lib/browser/reset-storage-QJLTL7J3.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 +4 -5
- 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-IT5LAIV3.mjs +133 -0
- 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 +92 -80
- package/dist/lib/node-esm/cli/index.mjs.map +3 -3
- 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 +90 -93
- 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-S5MJITI3.mjs +27 -0
- package/dist/lib/node-esm/reset-storage-S5MJITI3.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 +4 -5
- package/dist/types/src/ClientPlugin.d.ts +1 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/client.d.ts +8 -0
- package/dist/types/src/capabilities/client.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +32 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -0
- 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/{client/index.d.ts → node.d.ts} +7 -3
- 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/react-context.d.ts → react-context.d.ts} +1 -1
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +9 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs.d.ts +5 -0
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -0
- package/dist/types/src/cli/commands/config/view.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/info/info.d.ts +2 -2
- package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/list/list.d.ts +2 -2
- package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -1
- package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/create/create.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +1 -1
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts +2 -2
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -1
- package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/create.d.ts +2 -1
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts +1 -1
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -1
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -1
- package/dist/types/src/cli/plugin.d.ts +1 -1
- package/dist/types/src/cli/plugin.d.ts.map +1 -1
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -1
- 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/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/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.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/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -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.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/{components → containers/ResetDialog}/ResetDialog.d.ts +1 -1
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/{components → containers/ResetDialog}/ResetDialog.stories.d.ts +1 -1
- 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/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.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +26 -175
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +72 -36
- package/src/ClientPlugin.ts +37 -24
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +22 -20
- package/src/capabilities/{client/client.ts → client.ts} +16 -12
- package/src/capabilities/index.ts +15 -7
- package/src/capabilities/{migrations/migrations.ts → migrations.ts} +4 -4
- 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/react-context.tsx → react-context.tsx} +7 -7
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +21 -22
- package/src/capabilities/{schema-defs/schema-defs.ts → schema-defs.ts} +8 -7
- package/src/cli/commands/config/view.ts +4 -1
- package/src/cli/commands/device/info/info.test.ts +0 -1
- package/src/cli/commands/device/info/info.ts +0 -2
- package/src/cli/commands/device/list/list.test.ts +0 -1
- package/src/cli/commands/device/list/list.ts +0 -2
- package/src/cli/commands/device/update/update.ts +0 -2
- package/src/cli/commands/edge/status.ts +3 -2
- package/src/cli/commands/halo/create/create.test.ts +0 -1
- package/src/cli/commands/halo/create/create.ts +14 -6
- package/src/cli/commands/halo/credential/list/list.test.ts +0 -1
- package/src/cli/commands/halo/credential/list/list.ts +4 -7
- package/src/cli/commands/halo/identity/identity.ts +0 -1
- package/src/cli/commands/halo/keys/keys.ts +0 -2
- package/src/cli/commands/halo/seed/seed.ts +0 -2
- package/src/cli/commands/halo/update/update.test.ts +0 -1
- package/src/cli/commands/halo/update/update.ts +0 -2
- package/src/cli/commands/profile/create.ts +9 -6
- package/src/cli/commands/profile/delete.ts +5 -2
- package/src/cli/commands/profile/list.ts +12 -11
- package/src/cli/plugin.ts +11 -13
- package/src/cli/testing/test-console.ts +1 -2
- package/src/components/index.ts +0 -7
- package/src/constants.ts +4 -4
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +10 -7
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +77 -84
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +42 -0
- package/src/{components → containers/JoinDialog}/JoinDialog.tsx +20 -15
- 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 +22 -30
- 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 -26
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.tsx +10 -7
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/{components → containers/ResetDialog}/ResetDialog.stories.tsx +27 -15
- package/src/{components → containers/ResetDialog}/ResetDialog.tsx +15 -13
- 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 +1 -1
- 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 +53 -42
- package/src/types/capabilities.ts +4 -4
- package/src/types/events.ts +6 -6
- package/src/types/schema.ts +18 -123
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs +0 -118
- package/dist/lib/browser/app-graph-builder-3FGBMLTF.mjs.map +0 -7
- package/dist/lib/browser/chunk-4BZGRIFS.mjs +0 -293
- package/dist/lib/browser/chunk-4BZGRIFS.mjs.map +0 -7
- package/dist/lib/browser/chunk-F7H2Y3Z2.mjs +0 -18
- package/dist/lib/browser/chunk-F7H2Y3Z2.mjs.map +0 -7
- package/dist/lib/browser/chunk-G7C3S2BE.mjs +0 -15
- package/dist/lib/browser/chunk-G7C3S2BE.mjs.map +0 -7
- package/dist/lib/browser/client-IX5LMWV4.mjs +0 -86
- package/dist/lib/browser/client-IX5LMWV4.mjs.map +0 -7
- package/dist/lib/browser/migrations-3EBTAW3N.mjs +0 -24
- package/dist/lib/browser/migrations-3EBTAW3N.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs +0 -298
- package/dist/lib/browser/operation-resolver-2NT3ISVP.mjs.map +0 -7
- package/dist/lib/browser/react-context-4UABG3GP.mjs +0 -24
- package/dist/lib/browser/react-context-4UABG3GP.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs +0 -675
- package/dist/lib/browser/react-surface-RSQ74XCT.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-O7VLP745.mjs +0 -26
- package/dist/lib/browser/schema-defs-O7VLP745.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs +0 -119
- package/dist/lib/node-esm/app-graph-builder-2PIYVUNC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BCELGXRI.mjs +0 -20
- package/dist/lib/node-esm/chunk-BCELGXRI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs +0 -295
- package/dist/lib/node-esm/chunk-JAF64TFQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs +0 -16
- package/dist/lib/node-esm/chunk-PRAFFO54.mjs.map +0 -7
- package/dist/lib/node-esm/client-FFPK5UFP.mjs +0 -87
- package/dist/lib/node-esm/client-FFPK5UFP.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs +0 -25
- package/dist/lib/node-esm/migrations-WSZSFGDK.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs +0 -299
- package/dist/lib/node-esm/operation-resolver-VW5R2BE4.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs +0 -25
- package/dist/lib/node-esm/react-context-UVXMGPW4.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs +0 -676
- package/dist/lib/node-esm/react-surface-KBHANGGC.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs +0 -27
- package/dist/lib/node-esm/schema-defs-QLRGBIKY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/client/client.d.ts +0 -8
- package/dist/types/src/capabilities/client/client.d.ts.map +0 -1
- package/dist/types/src/capabilities/client/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/migrations/index.d.ts +0 -3
- package/dist/types/src/capabilities/migrations/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/migrations/migrations.d.ts +0 -5
- package/dist/types/src/capabilities/migrations/migrations.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/index.d.ts +0 -7
- package/dist/types/src/capabilities/react-context/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -9
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs/index.d.ts +0 -3
- package/dist/types/src/capabilities/schema-defs/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +0 -5
- package/dist/types/src/capabilities/schema-defs/schema-defs.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 -181
- 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.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/client/index.ts +0 -7
- package/src/capabilities/migrations/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -248
- package/src/capabilities/react-context/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/schema-defs/index.ts +0 -7
- package/src/components/RecoveryCredentialsContainer.tsx +0 -68
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.stories.d.ts +0 -0
|
@@ -1,298 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
JOIN_DIALOG,
|
|
3
|
-
RECOVERY_CODE_DIALOG,
|
|
4
|
-
RESET_DIALOG
|
|
5
|
-
} from "./chunk-G7C3S2BE.mjs";
|
|
6
|
-
import {
|
|
7
|
-
Account,
|
|
8
|
-
ClientCapabilities,
|
|
9
|
-
ClientEvents,
|
|
10
|
-
ClientOperation
|
|
11
|
-
} from "./chunk-4BZGRIFS.mjs";
|
|
12
|
-
|
|
13
|
-
// src/capabilities/operation-resolver/operation-resolver.ts
|
|
14
|
-
import * as Effect from "effect/Effect";
|
|
15
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
16
|
-
import { PublicKey } from "@dxos/client";
|
|
17
|
-
import { runAndForwardErrors } from "@dxos/effect";
|
|
18
|
-
import { invariant } from "@dxos/invariant";
|
|
19
|
-
import { OperationResolver } from "@dxos/operation";
|
|
20
|
-
import { Operation } from "@dxos/operation";
|
|
21
|
-
import { ObservabilityOperation } from "@dxos/plugin-observability/types";
|
|
22
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/operation-resolver/operation-resolver.ts";
|
|
23
|
-
var RECOVER_IDENTITY_RPC_TIMEOUT = 2e4;
|
|
24
|
-
var operation_resolver_default = Capability.makeModule(Effect.fnUntraced(function* (props) {
|
|
25
|
-
const { appName = "Composer" } = props ?? {};
|
|
26
|
-
return Capability.contributes(Common.Capability.OperationResolver, [
|
|
27
|
-
//
|
|
28
|
-
// CreateIdentity
|
|
29
|
-
//
|
|
30
|
-
OperationResolver.make({
|
|
31
|
-
operation: ClientOperation.CreateIdentity,
|
|
32
|
-
handler: Effect.fnUntraced(function* (profile) {
|
|
33
|
-
const manager = yield* Capability.get(Common.Capability.PluginManager);
|
|
34
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
35
|
-
const data = yield* Effect.promise(() => client.halo.createIdentity(profile));
|
|
36
|
-
yield* Effect.promise(() => runAndForwardErrors(manager.activate(ClientEvents.IdentityCreated)));
|
|
37
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
38
|
-
name: "identity.create"
|
|
39
|
-
});
|
|
40
|
-
return data;
|
|
41
|
-
})
|
|
42
|
-
}),
|
|
43
|
-
//
|
|
44
|
-
// JoinIdentity
|
|
45
|
-
//
|
|
46
|
-
OperationResolver.make({
|
|
47
|
-
operation: ClientOperation.JoinIdentity,
|
|
48
|
-
handler: Effect.fnUntraced(function* (data) {
|
|
49
|
-
yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
|
|
50
|
-
subject: JOIN_DIALOG,
|
|
51
|
-
blockAlign: "start",
|
|
52
|
-
props: {
|
|
53
|
-
initialInvitationCode: data.invitationCode,
|
|
54
|
-
initialDisposition: "accept-halo-invitation"
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
})
|
|
58
|
-
}),
|
|
59
|
-
//
|
|
60
|
-
// ShareIdentity
|
|
61
|
-
//
|
|
62
|
-
OperationResolver.make({
|
|
63
|
-
operation: ClientOperation.ShareIdentity,
|
|
64
|
-
handler: Effect.fnUntraced(function* () {
|
|
65
|
-
yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, {
|
|
66
|
-
subject: Account.id
|
|
67
|
-
});
|
|
68
|
-
yield* Operation.invoke(Common.LayoutOperation.Open, {
|
|
69
|
-
subject: [
|
|
70
|
-
Account.Profile
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
yield* Operation.schedule(ObservabilityOperation.SendEvent, {
|
|
74
|
-
name: "identity.share"
|
|
75
|
-
});
|
|
76
|
-
})
|
|
77
|
-
}),
|
|
78
|
-
//
|
|
79
|
-
// RecoverIdentity
|
|
80
|
-
//
|
|
81
|
-
OperationResolver.make({
|
|
82
|
-
operation: ClientOperation.RecoverIdentity,
|
|
83
|
-
handler: Effect.fnUntraced(function* () {
|
|
84
|
-
yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
|
|
85
|
-
subject: JOIN_DIALOG,
|
|
86
|
-
blockAlign: "start",
|
|
87
|
-
props: {
|
|
88
|
-
initialDisposition: "recover-identity"
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
})
|
|
92
|
-
}),
|
|
93
|
-
//
|
|
94
|
-
// ResetStorage
|
|
95
|
-
//
|
|
96
|
-
OperationResolver.make({
|
|
97
|
-
operation: ClientOperation.ResetStorage,
|
|
98
|
-
handler: Effect.fnUntraced(function* (data) {
|
|
99
|
-
yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
|
|
100
|
-
subject: RESET_DIALOG,
|
|
101
|
-
blockAlign: "start",
|
|
102
|
-
props: {
|
|
103
|
-
mode: data.mode ?? "reset storage"
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
})
|
|
107
|
-
}),
|
|
108
|
-
//
|
|
109
|
-
// CreateAgent
|
|
110
|
-
//
|
|
111
|
-
OperationResolver.make({
|
|
112
|
-
operation: ClientOperation.CreateAgent,
|
|
113
|
-
handler: Effect.fnUntraced(function* () {
|
|
114
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
115
|
-
invariant(client.services.services.EdgeAgentService, "Missing EdgeAgentService", {
|
|
116
|
-
F: __dxlog_file,
|
|
117
|
-
L: 114,
|
|
118
|
-
S: this,
|
|
119
|
-
A: [
|
|
120
|
-
"client.services.services.EdgeAgentService",
|
|
121
|
-
"'Missing EdgeAgentService'"
|
|
122
|
-
]
|
|
123
|
-
});
|
|
124
|
-
yield* Effect.promise(() => client.services.services.EdgeAgentService.createAgent(void 0, {
|
|
125
|
-
timeout: 1e4
|
|
126
|
-
}));
|
|
127
|
-
})
|
|
128
|
-
}),
|
|
129
|
-
//
|
|
130
|
-
// CreateRecoveryCode
|
|
131
|
-
//
|
|
132
|
-
OperationResolver.make({
|
|
133
|
-
operation: ClientOperation.CreateRecoveryCode,
|
|
134
|
-
handler: Effect.fnUntraced(function* () {
|
|
135
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
136
|
-
invariant(client.services.services.IdentityService, "IdentityService not available", {
|
|
137
|
-
F: __dxlog_file,
|
|
138
|
-
L: 128,
|
|
139
|
-
S: this,
|
|
140
|
-
A: [
|
|
141
|
-
"client.services.services.IdentityService",
|
|
142
|
-
"'IdentityService not available'"
|
|
143
|
-
]
|
|
144
|
-
});
|
|
145
|
-
const { recoveryCode } = yield* Effect.promise(() => client.services.services.IdentityService.createRecoveryCredential({}));
|
|
146
|
-
yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {
|
|
147
|
-
subject: RECOVERY_CODE_DIALOG,
|
|
148
|
-
blockAlign: "start",
|
|
149
|
-
type: "alert",
|
|
150
|
-
props: {
|
|
151
|
-
code: recoveryCode
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
})
|
|
155
|
-
}),
|
|
156
|
-
//
|
|
157
|
-
// CreatePasskey
|
|
158
|
-
//
|
|
159
|
-
OperationResolver.make({
|
|
160
|
-
operation: ClientOperation.CreatePasskey,
|
|
161
|
-
handler: Effect.fnUntraced(function* () {
|
|
162
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
163
|
-
const identity = client.halo.identity.get();
|
|
164
|
-
invariant(identity, "Identity not available", {
|
|
165
|
-
F: __dxlog_file,
|
|
166
|
-
L: 149,
|
|
167
|
-
S: this,
|
|
168
|
-
A: [
|
|
169
|
-
"identity",
|
|
170
|
-
"'Identity not available'"
|
|
171
|
-
]
|
|
172
|
-
});
|
|
173
|
-
const lookupKey = PublicKey.random();
|
|
174
|
-
const credential = yield* Effect.promise(() => navigator.credentials.create({
|
|
175
|
-
publicKey: {
|
|
176
|
-
challenge: new Uint8Array(),
|
|
177
|
-
rp: {
|
|
178
|
-
id: location.hostname,
|
|
179
|
-
name: appName
|
|
180
|
-
},
|
|
181
|
-
user: {
|
|
182
|
-
id: lookupKey.asUint8Array(),
|
|
183
|
-
name: identity.did,
|
|
184
|
-
displayName: identity.profile?.displayName ?? ""
|
|
185
|
-
},
|
|
186
|
-
pubKeyCredParams: [
|
|
187
|
-
{
|
|
188
|
-
type: "public-key",
|
|
189
|
-
alg: -8
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
type: "public-key",
|
|
193
|
-
alg: -7
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
authenticatorSelection: {
|
|
197
|
-
residentKey: "required",
|
|
198
|
-
requireResidentKey: true
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}));
|
|
202
|
-
invariant(credential, "Credential not available", {
|
|
203
|
-
F: __dxlog_file,
|
|
204
|
-
L: 174,
|
|
205
|
-
S: this,
|
|
206
|
-
A: [
|
|
207
|
-
"credential",
|
|
208
|
-
"'Credential not available'"
|
|
209
|
-
]
|
|
210
|
-
});
|
|
211
|
-
const recoveryKey = PublicKey.from(new Uint8Array(credential.response.getPublicKey()));
|
|
212
|
-
const algorithm = credential.response.getPublicKeyAlgorithm() === -7 ? "ES256" : "ED25519";
|
|
213
|
-
invariant(client.services.services.IdentityService, "IdentityService not available", {
|
|
214
|
-
F: __dxlog_file,
|
|
215
|
-
L: 178,
|
|
216
|
-
S: this,
|
|
217
|
-
A: [
|
|
218
|
-
"client.services.services.IdentityService",
|
|
219
|
-
"'IdentityService not available'"
|
|
220
|
-
]
|
|
221
|
-
});
|
|
222
|
-
yield* Effect.promise(() => client.services.services.IdentityService.createRecoveryCredential({
|
|
223
|
-
data: {
|
|
224
|
-
recoveryKey,
|
|
225
|
-
algorithm,
|
|
226
|
-
lookupKey
|
|
227
|
-
}
|
|
228
|
-
}));
|
|
229
|
-
})
|
|
230
|
-
}),
|
|
231
|
-
//
|
|
232
|
-
// RedeemPasskey
|
|
233
|
-
//
|
|
234
|
-
OperationResolver.make({
|
|
235
|
-
operation: ClientOperation.RedeemPasskey,
|
|
236
|
-
handler: Effect.fnUntraced(function* () {
|
|
237
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
238
|
-
invariant(client.services.services.IdentityService, "IdentityService not available", {
|
|
239
|
-
F: __dxlog_file,
|
|
240
|
-
L: 198,
|
|
241
|
-
S: this,
|
|
242
|
-
A: [
|
|
243
|
-
"client.services.services.IdentityService",
|
|
244
|
-
"'IdentityService not available'"
|
|
245
|
-
]
|
|
246
|
-
});
|
|
247
|
-
const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() => client.services.services.IdentityService.requestRecoveryChallenge());
|
|
248
|
-
const credential = yield* Effect.promise(() => navigator.credentials.get({
|
|
249
|
-
publicKey: {
|
|
250
|
-
challenge: Buffer.from(challenge, "base64"),
|
|
251
|
-
rpId: location.hostname,
|
|
252
|
-
userVerification: "required"
|
|
253
|
-
}
|
|
254
|
-
}));
|
|
255
|
-
const lookupKey = PublicKey.from(new Uint8Array(credential.response.userHandle));
|
|
256
|
-
yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({
|
|
257
|
-
external: {
|
|
258
|
-
lookupKey,
|
|
259
|
-
deviceKey,
|
|
260
|
-
controlFeedKey,
|
|
261
|
-
signature: Buffer.from(credential.response.signature),
|
|
262
|
-
clientDataJson: Buffer.from(credential.response.clientDataJSON),
|
|
263
|
-
authenticatorData: Buffer.from(credential.response.authenticatorData)
|
|
264
|
-
}
|
|
265
|
-
}, {
|
|
266
|
-
timeout: RECOVER_IDENTITY_RPC_TIMEOUT
|
|
267
|
-
}));
|
|
268
|
-
})
|
|
269
|
-
}),
|
|
270
|
-
//
|
|
271
|
-
// RedeemToken
|
|
272
|
-
//
|
|
273
|
-
OperationResolver.make({
|
|
274
|
-
operation: ClientOperation.RedeemToken,
|
|
275
|
-
handler: Effect.fnUntraced(function* (data) {
|
|
276
|
-
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
277
|
-
invariant(client.services.services.IdentityService, "IdentityService not available", {
|
|
278
|
-
F: __dxlog_file,
|
|
279
|
-
L: 237,
|
|
280
|
-
S: this,
|
|
281
|
-
A: [
|
|
282
|
-
"client.services.services.IdentityService",
|
|
283
|
-
"'IdentityService not available'"
|
|
284
|
-
]
|
|
285
|
-
});
|
|
286
|
-
yield* Effect.promise(() => client.services.services.IdentityService.recoverIdentity({
|
|
287
|
-
token: data.token
|
|
288
|
-
}, {
|
|
289
|
-
timeout: RECOVER_IDENTITY_RPC_TIMEOUT
|
|
290
|
-
}));
|
|
291
|
-
})
|
|
292
|
-
})
|
|
293
|
-
]);
|
|
294
|
-
}));
|
|
295
|
-
export {
|
|
296
|
-
operation_resolver_default as default
|
|
297
|
-
};
|
|
298
|
-
//# sourceMappingURL=operation-resolver-2NT3ISVP.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/operation-resolver/operation-resolver.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { PublicKey } from '@dxos/client';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { invariant } from '@dxos/invariant';\nimport { OperationResolver } from '@dxos/operation';\nimport { Operation } from '@dxos/operation';\nimport { ObservabilityOperation } from '@dxos/plugin-observability/types';\nimport { type JoinPanelProps } from '@dxos/shell/react';\n\nimport { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../../constants';\nimport { ClientEvents } from '../../types';\nimport { Account, ClientCapabilities, ClientOperation } from '../../types';\n\ntype OperationResolverOptions = {\n appName?: string;\n};\n\nconst RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* (props?: OperationResolverOptions) {\n const { appName = 'Composer' } = props ?? {};\n\n return Capability.contributes(Common.Capability.OperationResolver, [\n //\n // CreateIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.CreateIdentity,\n handler: Effect.fnUntraced(function* (profile) {\n const manager = yield* Capability.get(Common.Capability.PluginManager);\n const client = yield* Capability.get(ClientCapabilities.Client);\n const data = yield* Effect.promise(() => client.halo.createIdentity(profile));\n yield* Effect.promise(() => runAndForwardErrors(manager.activate(ClientEvents.IdentityCreated)));\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.create' });\n return data;\n }),\n }),\n\n //\n // JoinIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.JoinIdentity,\n handler: Effect.fnUntraced(function* (data) {\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: JOIN_DIALOG,\n blockAlign: 'start',\n props: {\n initialInvitationCode: data.invitationCode,\n initialDisposition: 'accept-halo-invitation',\n },\n });\n }),\n }),\n\n //\n // ShareIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.ShareIdentity,\n handler: Effect.fnUntraced(function* () {\n yield* Operation.invoke(Common.LayoutOperation.SwitchWorkspace, { subject: Account.id });\n yield* Operation.invoke(Common.LayoutOperation.Open, { subject: [Account.Profile] });\n yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.share' });\n }),\n }),\n\n //\n // RecoverIdentity\n //\n OperationResolver.make({\n operation: ClientOperation.RecoverIdentity,\n handler: Effect.fnUntraced(function* () {\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: JOIN_DIALOG,\n blockAlign: 'start',\n props: {\n initialDisposition: 'recover-identity',\n } satisfies Partial<JoinPanelProps>,\n });\n }),\n }),\n\n //\n // ResetStorage\n //\n OperationResolver.make({\n operation: ClientOperation.ResetStorage,\n handler: Effect.fnUntraced(function* (data) {\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: RESET_DIALOG,\n blockAlign: 'start',\n props: {\n mode: data.mode ?? 'reset storage',\n },\n });\n }),\n }),\n\n //\n // CreateAgent\n //\n OperationResolver.make({\n operation: ClientOperation.CreateAgent,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.EdgeAgentService, 'Missing EdgeAgentService');\n yield* Effect.promise(() =>\n client.services.services.EdgeAgentService!.createAgent(undefined, { timeout: 10_000 }),\n );\n }),\n }),\n\n //\n // CreateRecoveryCode\n //\n OperationResolver.make({\n operation: ClientOperation.CreateRecoveryCode,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { recoveryCode } = yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({}),\n );\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: RECOVERY_CODE_DIALOG,\n blockAlign: 'start',\n type: 'alert',\n props: { code: recoveryCode },\n });\n }),\n }),\n\n //\n // CreatePasskey\n //\n OperationResolver.make({\n operation: ClientOperation.CreatePasskey,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n invariant(identity, 'Identity not available');\n\n const lookupKey = PublicKey.random();\n const credential = yield* Effect.promise(() =>\n navigator.credentials.create({\n publicKey: {\n challenge: new Uint8Array(),\n rp: { id: location.hostname, name: appName },\n user: {\n id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,\n name: identity.did,\n displayName: identity.profile?.displayName ?? '',\n },\n pubKeyCredParams: [\n { type: 'public-key', alg: -8 }, // Ed25519 (not yet supported across all browsers)\n { type: 'public-key', alg: -7 }, // ES256\n ],\n authenticatorSelection: {\n residentKey: 'required',\n requireResidentKey: true,\n },\n },\n }),\n );\n\n invariant(credential, 'Credential not available');\n const recoveryKey = PublicKey.from(new Uint8Array((credential as any).response.getPublicKey()));\n const algorithm = (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519';\n\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({\n data: {\n recoveryKey,\n algorithm,\n lookupKey,\n },\n }),\n );\n }),\n }),\n\n //\n // RedeemPasskey\n //\n OperationResolver.make({\n operation: ClientOperation.RedeemPasskey,\n handler: Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() =>\n client.services.services.IdentityService!.requestRecoveryChallenge(),\n );\n const credential = yield* Effect.promise(() =>\n navigator.credentials.get({\n publicKey: {\n challenge: Buffer.from(challenge, 'base64'),\n rpId: location.hostname,\n userVerification: 'required',\n },\n }),\n );\n const lookupKey = PublicKey.from(new Uint8Array((credential as any).response.userHandle));\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.recoverIdentity(\n {\n external: {\n lookupKey,\n deviceKey,\n controlFeedKey,\n signature: Buffer.from((credential as any).response.signature),\n clientDataJson: Buffer.from((credential as any).response.clientDataJSON),\n authenticatorData: Buffer.from((credential as any).response.authenticatorData),\n },\n },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n );\n }),\n }),\n\n //\n // RedeemToken\n //\n OperationResolver.make({\n operation: ClientOperation.RedeemToken,\n handler: Effect.fnUntraced(function* (data) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.recoverIdentity(\n { token: data.token },\n { timeout: RECOVER_IDENTITY_RPC_TIMEOUT },\n ),\n );\n }),\n }),\n ]);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,iBAAiB;AAC1B,SAASC,2BAA2B;AACpC,SAASC,iBAAiB;AAC1B,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAC1B,SAASC,8BAA8B;;AAWvC,IAAMC,+BAA+B;AAErC,IAAA,6BAAeC,WAAWC,WACjBC,kBAAW,WAAWC,OAAgC;AAC3D,QAAM,EAAEC,UAAU,WAAU,IAAKD,SAAS,CAAC;AAE3C,SAAOH,WAAWK,YAAYC,OAAON,WAAWO,mBAAmB;;;;IAIjEA,kBAAkBC,KAAK;MACrBC,WAAWC,gBAAgBC;MAC3BC,SAAgBV,kBAAW,WAAWW,SAAO;AAC3C,cAAMC,UAAU,OAAOd,WAAWe,IAAIT,OAAON,WAAWgB,aAAa;AACrE,cAAMC,SAAS,OAAOjB,WAAWe,IAAIG,mBAAmBC,MAAM;AAC9D,cAAMC,OAAO,OAAcC,eAAQ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AW;YACTC,WAAWwB,OAAOT,KAAKf,WAAW,QAAA;YAClCyB,MAAMtB,SAASC;YACfsB,kBAAkB;UACpB;QACF,CAAA,CAAA;AAEF,cAAMlC,YAAYC,UAAUsB,KAAK,IAAId,WAAYN,WAAmBqB,SAASW,UAAU,CAAA;AACvF,eAAcnF,eAAQ,MACpBJ,OAAOsC,SAASA,SAASM,gBAAiB4C,gBACxC;UACEC,UAAU;YACRrC;YACA6B;YACAC;YACAQ,WAAWN,OAAOT,KAAMpB,WAAmBqB,SAASc,SAAS;YAC7DC,gBAAgBP,OAAOT,KAAMpB,WAAmBqB,SAASgB,cAAc;YACvEC,mBAAmBT,OAAOT,KAAMpB,WAAmBqB,SAASiB,iBAAiB;UAC/E;QACF,GACA;UAAEnD,SAAS5D;QAA6B,CAAA,CAAA;MAG9C,CAAA;IACF,CAAA;;;;IAKAQ,kBAAkBC,KAAK;MACrBC,WAAWC,gBAAgBqG;MAC3BnG,SAAgBV,kBAAW,WAAWkB,MAAI;AACxC,cAAMH,SAAS,OAAOjB,WAAWe,IAAIG,mBAAmBC,MAAM;AAC9DmC,kBAAUrC,OAAOsC,SAASA,SAASM,iBAAiB,iCAAA;;;;;;;;;AACpD,eAAcxC,eAAQ,MACpBJ,OAAOsC,SAASA,SAASM,gBAAiB4C,gBACxC;UAAEO,OAAO5F,KAAK4F;QAAM,GACpB;UAAErD,SAAS5D;QAA6B,CAAA,CAAA;MAG9C,CAAA;IACF,CAAA;GACD;AACH,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "Common", "PublicKey", "runAndForwardErrors", "invariant", "OperationResolver", "Operation", "ObservabilityOperation", "RECOVER_IDENTITY_RPC_TIMEOUT", "Capability", "makeModule", "fnUntraced", "props", "appName", "contributes", "Common", "OperationResolver", "make", "operation", "ClientOperation", "CreateIdentity", "handler", "profile", "manager", "get", "PluginManager", "client", "ClientCapabilities", "Client", "data", "promise", "halo", "createIdentity", "runAndForwardErrors", "activate", "ClientEvents", "IdentityCreated", "Operation", "schedule", "ObservabilityOperation", "SendEvent", "name", "JoinIdentity", "invoke", "LayoutOperation", "UpdateDialog", "subject", "JOIN_DIALOG", "blockAlign", "initialInvitationCode", "invitationCode", "initialDisposition", "ShareIdentity", "SwitchWorkspace", "Account", "id", "Open", "Profile", "RecoverIdentity", "ResetStorage", "RESET_DIALOG", "mode", "CreateAgent", "invariant", "services", "EdgeAgentService", "createAgent", "undefined", "timeout", "CreateRecoveryCode", "IdentityService", "recoveryCode", "createRecoveryCredential", "RECOVERY_CODE_DIALOG", "type", "code", "CreatePasskey", "identity", "lookupKey", "PublicKey", "random", "credential", "navigator", "credentials", "create", "publicKey", "challenge", "Uint8Array", "rp", "location", "hostname", "user", "asUint8Array", "did", "displayName", "pubKeyCredParams", "alg", "authenticatorSelection", "residentKey", "requireResidentKey", "recoveryKey", "from", "response", "getPublicKey", "algorithm", "getPublicKeyAlgorithm", "RedeemPasskey", "deviceKey", "controlFeedKey", "requestRecoveryChallenge", "Buffer", "rpId", "userVerification", "userHandle", "recoverIdentity", "external", "signature", "clientDataJson", "clientDataJSON", "authenticatorData", "RedeemToken", "token"]
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ClientCapabilities,
|
|
3
|
-
meta
|
|
4
|
-
} from "./chunk-4BZGRIFS.mjs";
|
|
5
|
-
|
|
6
|
-
// src/capabilities/react-context/react-context.tsx
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
10
|
-
import { useCapability } from "@dxos/app-framework/react";
|
|
11
|
-
import { ClientProvider } from "@dxos/react-client";
|
|
12
|
-
var react_context_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactContext, {
|
|
13
|
-
id: meta.id,
|
|
14
|
-
context: ({ children }) => {
|
|
15
|
-
const client = useCapability(ClientCapabilities.Client);
|
|
16
|
-
return /* @__PURE__ */ React.createElement(ClientProvider, {
|
|
17
|
-
client
|
|
18
|
-
}, children);
|
|
19
|
-
}
|
|
20
|
-
})));
|
|
21
|
-
export {
|
|
22
|
-
react_context_default as default
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=react-context-4UABG3GP.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-context/react-context.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { useCapability } from '@dxos/app-framework/react';\nimport { ClientProvider } from '@dxos/react-client';\n\nimport { meta } from '../../meta';\nimport { ClientCapabilities } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactContext, {\n id: meta.id,\n context: ({ children }: { children?: React.ReactNode }) => {\n const client = useCapability(ClientCapabilities.Client);\n return <ClientProvider client={client}>{children}</ClientProvider>;\n },\n }),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,qBAAqB;AAC9B,SAASC,sBAAsB;AAK/B,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDC,IAAIC,KAAKD;EACTE,SAAS,CAAC,EAAEC,SAAQ,MAAkC;AACpD,UAAMC,SAASC,cAAcC,mBAAmBC,MAAM;AACtD,WAAO,sBAAA,cAACC,gBAAAA;MAAeJ;OAAiBD,QAAAA;EAC1C;AACF,CAAA,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "useCapability", "ClientProvider", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactContext", "id", "meta", "context", "children", "client", "useCapability", "ClientCapabilities", "Client", "ClientProvider"]
|
|
7
|
-
}
|