@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
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Match from 'effect/Match';
|
|
7
|
+
|
|
8
|
+
import { Capability } from '@dxos/app-framework';
|
|
9
|
+
import { decodeUrlSafeBase64, supportsNativePasskeys, loginNativePasskey } from '@dxos/app-toolkit';
|
|
10
|
+
import { PublicKey } from '@dxos/client';
|
|
11
|
+
import { invariant } from '@dxos/invariant';
|
|
12
|
+
import { Operation } from '@dxos/operation';
|
|
13
|
+
|
|
14
|
+
import { ClientCapabilities } from '../types';
|
|
15
|
+
import { RedeemPasskey } from './definitions';
|
|
16
|
+
|
|
17
|
+
const handler: Operation.WithHandler<typeof RedeemPasskey> = RedeemPasskey.pipe(
|
|
18
|
+
Operation.withHandler(
|
|
19
|
+
Effect.fnUntraced(function* () {
|
|
20
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
21
|
+
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
22
|
+
const { deviceKey, controlFeedKey, challenge } = yield* Effect.promise(() =>
|
|
23
|
+
client.services.services.IdentityService!.requestRecoveryChallenge(),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const { lookupKey, signature, clientDataJson, authenticatorData } = yield* Match.value(
|
|
27
|
+
supportsNativePasskeys(),
|
|
28
|
+
).pipe(
|
|
29
|
+
Match.when(true, () =>
|
|
30
|
+
Effect.gen(function* () {
|
|
31
|
+
const result = yield* Effect.promise(() =>
|
|
32
|
+
loginNativePasskey({ challenge: Uint8Array.from(Buffer.from(challenge, 'base64')) }),
|
|
33
|
+
);
|
|
34
|
+
invariant(result, 'Native passkey login returned no result');
|
|
35
|
+
return {
|
|
36
|
+
lookupKey: PublicKey.from(decodeUrlSafeBase64(result.user_handle)),
|
|
37
|
+
signature: Buffer.from(decodeUrlSafeBase64(result.signature)),
|
|
38
|
+
clientDataJson: Buffer.from(decodeUrlSafeBase64(result.client_data_json)),
|
|
39
|
+
authenticatorData: Buffer.from(decodeUrlSafeBase64(result.authenticator_data)),
|
|
40
|
+
};
|
|
41
|
+
}),
|
|
42
|
+
),
|
|
43
|
+
Match.orElse(() =>
|
|
44
|
+
Effect.gen(function* () {
|
|
45
|
+
const credential = yield* Effect.promise(() =>
|
|
46
|
+
navigator.credentials.get({
|
|
47
|
+
publicKey: {
|
|
48
|
+
challenge: Buffer.from(challenge, 'base64'),
|
|
49
|
+
rpId: location.hostname,
|
|
50
|
+
userVerification: 'required',
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
return {
|
|
55
|
+
lookupKey: PublicKey.from(new Uint8Array((credential as any).response.userHandle)),
|
|
56
|
+
signature: Buffer.from((credential as any).response.signature),
|
|
57
|
+
clientDataJson: Buffer.from((credential as any).response.clientDataJSON),
|
|
58
|
+
authenticatorData: Buffer.from((credential as any).response.authenticatorData),
|
|
59
|
+
};
|
|
60
|
+
}),
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
yield* Effect.promise(() =>
|
|
65
|
+
client.services.services.IdentityService!.recoverIdentity(
|
|
66
|
+
{
|
|
67
|
+
external: {
|
|
68
|
+
lookupKey,
|
|
69
|
+
deviceKey,
|
|
70
|
+
controlFeedKey,
|
|
71
|
+
signature,
|
|
72
|
+
clientDataJson,
|
|
73
|
+
authenticatorData,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{ timeout: RECOVER_IDENTITY_RPC_TIMEOUT },
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
}),
|
|
80
|
+
),
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
export default handler;
|
|
84
|
+
|
|
85
|
+
const RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { invariant } from '@dxos/invariant';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
|
|
11
|
+
import { ClientCapabilities } from '../types';
|
|
12
|
+
import { RedeemToken } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof RedeemToken> = RedeemToken.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* (data) {
|
|
17
|
+
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
18
|
+
invariant(client.services.services.IdentityService, 'IdentityService not available');
|
|
19
|
+
yield* Effect.promise(() =>
|
|
20
|
+
client.services.services.IdentityService!.recoverIdentity(
|
|
21
|
+
{ token: data.token },
|
|
22
|
+
{ timeout: RECOVER_IDENTITY_RPC_TIMEOUT },
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
}),
|
|
26
|
+
),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export default handler;
|
|
30
|
+
|
|
31
|
+
const RECOVER_IDENTITY_RPC_TIMEOUT = 20_000;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
|
|
10
|
+
import { RESET_DIALOG } from '../constants';
|
|
11
|
+
import { ResetStorage } from './definitions';
|
|
12
|
+
|
|
13
|
+
const handler: Operation.WithHandler<typeof ResetStorage> = ResetStorage.pipe(
|
|
14
|
+
Operation.withHandler(
|
|
15
|
+
Effect.fnUntraced(function* (data) {
|
|
16
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
17
|
+
subject: RESET_DIALOG,
|
|
18
|
+
blockAlign: 'start',
|
|
19
|
+
props: {
|
|
20
|
+
mode: data.mode ?? 'reset-storage',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export default handler;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { LayoutOperation, getSpacePath } from '@dxos/app-toolkit';
|
|
8
|
+
import { Operation } from '@dxos/operation';
|
|
9
|
+
import { ObservabilityOperation } from '@dxos/plugin-observability/operations';
|
|
10
|
+
|
|
11
|
+
import { Account } from '../types';
|
|
12
|
+
import { ShareIdentity } from './definitions';
|
|
13
|
+
|
|
14
|
+
const handler: Operation.WithHandler<typeof ShareIdentity> = ShareIdentity.pipe(
|
|
15
|
+
Operation.withHandler(
|
|
16
|
+
Effect.fnUntraced(function* () {
|
|
17
|
+
yield* Operation.invoke(LayoutOperation.SwitchWorkspace, { subject: getSpacePath(Account.id) });
|
|
18
|
+
yield* Operation.invoke(LayoutOperation.Open, {
|
|
19
|
+
subject: [`${getSpacePath(Account.id)}/${Account.Profile}`],
|
|
20
|
+
});
|
|
21
|
+
yield* Operation.schedule(ObservabilityOperation.SendEvent, { name: 'identity.share' });
|
|
22
|
+
}),
|
|
23
|
+
),
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export default handler;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { PERSONAL_SPACE_TAG } from '@dxos/app-toolkit';
|
|
8
|
+
import { type Client } from '@dxos/client';
|
|
9
|
+
import { type Space } from '@dxos/client-protocol';
|
|
10
|
+
import { type Identity } from '@dxos/protocols/proto/dxos/client/services';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Create an identity and a personal space.
|
|
14
|
+
* Returns the identity and space for further setup.
|
|
15
|
+
*/
|
|
16
|
+
export const initializeIdentity = (
|
|
17
|
+
client: Client,
|
|
18
|
+
): Effect.Effect<{ identity: Identity; personalSpace: Space }, never, never> =>
|
|
19
|
+
Effect.gen(function* () {
|
|
20
|
+
const identity = yield* Effect.promise(() => client.halo.createIdentity());
|
|
21
|
+
const personalSpace = yield* Effect.promise(() => client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG] }));
|
|
22
|
+
yield* Effect.promise(() => personalSpace.waitUntilReady());
|
|
23
|
+
return { identity, personalSpace };
|
|
24
|
+
});
|
package/src/translations.ts
CHANGED
|
@@ -5,66 +5,77 @@
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
7
7
|
|
|
8
|
-
import { meta } from '
|
|
8
|
+
import { meta } from '#meta';
|
|
9
9
|
|
|
10
|
+
// TODO(burdon): Disambiguate with sdk/shell
|
|
10
11
|
const pluginTranslations = [
|
|
11
12
|
{
|
|
12
13
|
'en-US': {
|
|
13
14
|
[meta.id]: {
|
|
14
|
-
'account
|
|
15
|
-
'profile
|
|
16
|
-
'profile
|
|
17
|
-
'devices
|
|
18
|
-
'
|
|
19
|
-
'
|
|
15
|
+
'account.label': 'User profile',
|
|
16
|
+
'profile.label': 'Profile',
|
|
17
|
+
'profile.description': 'You can adjust how your user settings here.',
|
|
18
|
+
'devices.label': 'Devices',
|
|
19
|
+
'add-device.label': 'Add device',
|
|
20
|
+
'devices-verbose.label': 'Manage devices',
|
|
21
|
+
'add-device.description':
|
|
20
22
|
'Authenticating another device is a two-step process. To get started, create a code using the button below.',
|
|
21
|
-
'devices
|
|
23
|
+
'devices.description':
|
|
22
24
|
'You can add and remove devices, configure your agent in the cloud, reset this device, or log in as a different identity here.',
|
|
23
|
-
'create
|
|
24
|
-
'qr
|
|
25
|
+
'create-device-invitation.label': 'Create code',
|
|
26
|
+
'qr-code.description':
|
|
25
27
|
'Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.',
|
|
26
|
-
'security
|
|
27
|
-
'reset
|
|
28
|
-
'join
|
|
28
|
+
'security.label': 'Security',
|
|
29
|
+
'reset-device.description': 'Log out from this device, erasing all the data on this device.',
|
|
30
|
+
'join-new-identity.description':
|
|
29
31
|
'Log out from this device, erasing all the data currently on this device, and use a QR code or URL to log in.',
|
|
30
|
-
'recover
|
|
32
|
+
'recover-identity.description':
|
|
31
33
|
'Log out from this device, erasing all the data currently on this device, and use a passkey or recovery code to log in.',
|
|
32
|
-
'danger
|
|
33
|
-
'danger
|
|
34
|
+
'danger-zone.title': 'Log out',
|
|
35
|
+
'danger-zone.description':
|
|
34
36
|
'Because Composer is decentralized, logging out entails erasing all the data on this device. If you have any data on this device that you’d like to keep, you can log in on a separate device using a passkey or complete a peer-to-peer device invitation above.',
|
|
35
|
-
'display
|
|
36
|
-
'display
|
|
37
|
-
'display
|
|
38
|
-
'icon
|
|
39
|
-
'icon
|
|
40
|
-
'hue
|
|
41
|
-
'hue
|
|
37
|
+
'display-name.label': 'Display name',
|
|
38
|
+
'display-name.description': 'Your name as it appears in the app.',
|
|
39
|
+
'display-name-input.placeholder': 'Enter a name',
|
|
40
|
+
'icon.label': 'Avatar',
|
|
41
|
+
'icon.description': 'The emoji used to represent the user.',
|
|
42
|
+
'hue.label': 'Color',
|
|
43
|
+
'hue.description':
|
|
42
44
|
'The color used to represent you in the app, including as your avatar’s background, your cursor as it appears to others, and the messages you send in group threads.',
|
|
43
|
-
'did
|
|
44
|
-
'did
|
|
45
|
-
'open
|
|
46
|
-
'manage
|
|
47
|
-
'credentials
|
|
48
|
-
'no
|
|
49
|
-
'no
|
|
50
|
-
'recovery
|
|
51
|
-
'recovery
|
|
45
|
+
'did.label': 'DID',
|
|
46
|
+
'did.description': 'Your unique ID.',
|
|
47
|
+
'open-user-account.label': 'Open user account',
|
|
48
|
+
'manage-credentials-dialog.title': 'Manage Account Recovery',
|
|
49
|
+
'credentials-list.label': 'Recovery credentials',
|
|
50
|
+
'no-credentials.title': 'WARNING: There is currently no way to recover your account.',
|
|
51
|
+
'no-credentials.message': 'Create a recovery credential above to secure your account.',
|
|
52
|
+
'recovery-setup-dialog.title': 'Account Security',
|
|
53
|
+
'recovery-setup-dialog.description':
|
|
52
54
|
'In order to maintain access to your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password manager.',
|
|
53
|
-
'create
|
|
55
|
+
'create-passkey.label': 'Create Passkey',
|
|
54
56
|
// TODO(wittjosiah): At link to user-focused passkey information.
|
|
55
57
|
// Something like https://www.tomsguide.com/news/what-are-passkeys.
|
|
56
|
-
'create
|
|
58
|
+
'create-passkey.description':
|
|
57
59
|
'A passkey is a secure and easy to use credential that can be used to recover your account.',
|
|
58
|
-
'create
|
|
59
|
-
'create
|
|
60
|
-
'recovery
|
|
61
|
-
'recovery
|
|
60
|
+
'create-recovery-code.label': 'Create Recovery Code',
|
|
61
|
+
'create-recovery-code.description': 'A recovery code is 12 word phrase representing a private key.',
|
|
62
|
+
'recovery-code-dialog.title': 'Recovery Code',
|
|
63
|
+
'recovery-code-dialog.description':
|
|
62
64
|
'This is your identity recovery code, store it in a safe place. You can use it to recover your identity if you ever lose access to your devices.',
|
|
63
|
-
'recovery
|
|
64
|
-
'recovery
|
|
65
|
+
'recovery-code-dialog-warning-1.message': 'NOTE: This code will not be displayed again.',
|
|
66
|
+
'recovery-code-dialog-warning-2.message':
|
|
65
67
|
'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your account.',
|
|
66
|
-
'recovery
|
|
67
|
-
'continue
|
|
68
|
+
'recovery-code-confirmation.label': 'Please confirm you have saved the code.',
|
|
69
|
+
'continue.label': 'Continue',
|
|
70
|
+
'auth-code.message': 'Authorization code',
|
|
71
|
+
'auth-other-device-emoji.message': 'Authorization icon',
|
|
72
|
+
'cancel.label': 'Cancel',
|
|
73
|
+
'join-new-identity.label': 'Join an existing identity',
|
|
74
|
+
'qr.label': 'QR Code',
|
|
75
|
+
'recover-identity.label': 'Use a recovery code',
|
|
76
|
+
'reset-device.label': 'Reset storage',
|
|
77
|
+
'reset-dialog.description': 'Reset storage',
|
|
78
|
+
'reset-dialog.title': 'Reset storage',
|
|
68
79
|
},
|
|
69
80
|
},
|
|
70
81
|
},
|
|
@@ -7,10 +7,10 @@ import { type Client } from '@dxos/client';
|
|
|
7
7
|
import { type ObjectMigration } from '@dxos/client/echo';
|
|
8
8
|
import { type Type } from '@dxos/echo';
|
|
9
9
|
|
|
10
|
-
import { meta } from '
|
|
10
|
+
import { meta } from '#meta';
|
|
11
11
|
|
|
12
12
|
export namespace ClientCapabilities {
|
|
13
|
-
export const Client = Capability.make<Client>(`${meta.id}
|
|
14
|
-
export const Schema = Capability.make<Type.
|
|
15
|
-
export const Migration = Capability.make<ObjectMigration[]>(`${meta.id}
|
|
13
|
+
export const Client = Capability.make<Client>(`${meta.id}.capability.client`);
|
|
14
|
+
export const Schema = Capability.make<Type.AnyEntity[]>(`${meta.id}.capability.schema`);
|
|
15
|
+
export const Migration = Capability.make<ObjectMigration[]>(`${meta.id}.capability.migration`);
|
|
16
16
|
}
|
package/src/types/events.ts
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import { ActivationEvent } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export namespace ClientEvents {
|
|
10
|
-
export const ClientReady = ActivationEvent.make(`${meta.id}
|
|
11
|
-
export const SetupSchema = ActivationEvent.make(`${meta.id}
|
|
12
|
-
export const SetupMigration = ActivationEvent.make(`${meta.id}
|
|
13
|
-
export const IdentityCreated = ActivationEvent.make(`${meta.id}
|
|
14
|
-
export const SpacesReady = ActivationEvent.make(`${meta.id}
|
|
10
|
+
export const ClientReady = ActivationEvent.make(`${meta.id}.event.client-ready`);
|
|
11
|
+
export const SetupSchema = ActivationEvent.make(`${meta.id}.event.setup-schema`);
|
|
12
|
+
export const SetupMigration = ActivationEvent.make(`${meta.id}.event.setup-migration`);
|
|
13
|
+
export const IdentityCreated = ActivationEvent.make(`${meta.id}.event.identity-created`);
|
|
14
|
+
export const SpacesReady = ActivationEvent.make(`${meta.id}.event.spaces-ready`);
|
|
15
15
|
}
|
package/src/types/schema.ts
CHANGED
|
@@ -7,9 +7,8 @@ import * as Schema from 'effect/Schema';
|
|
|
7
7
|
|
|
8
8
|
import { Capability } from '@dxos/app-framework';
|
|
9
9
|
import { type Client, type ClientOptions, PublicKey } from '@dxos/client';
|
|
10
|
-
import { Operation } from '@dxos/operation';
|
|
11
10
|
|
|
12
|
-
import { meta } from '
|
|
11
|
+
import { meta } from '#meta';
|
|
13
12
|
|
|
14
13
|
// TODO(wittjosiah): Factor out. Generate?
|
|
15
14
|
const IdentitySchema = Schema.Struct({
|
|
@@ -31,59 +30,59 @@ export namespace ClientAction {
|
|
|
31
30
|
data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
32
31
|
});
|
|
33
32
|
|
|
34
|
-
export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${meta.id}
|
|
33
|
+
export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(`${meta.id}.action.create-identity`, {
|
|
35
34
|
input: ProfileSchema,
|
|
36
35
|
output: IdentitySchema,
|
|
37
36
|
}) {}
|
|
38
37
|
|
|
39
|
-
export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.id}
|
|
38
|
+
export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.id}.action.join-identity`, {
|
|
40
39
|
input: Schema.Struct({
|
|
41
40
|
invitationCode: Schema.optional(Schema.String),
|
|
42
41
|
}),
|
|
43
42
|
output: Schema.Void,
|
|
44
43
|
}) {}
|
|
45
44
|
|
|
46
|
-
export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.id}
|
|
45
|
+
export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.id}.action.share-identity`, {
|
|
47
46
|
input: Schema.Void,
|
|
48
47
|
output: Schema.Void,
|
|
49
48
|
}) {}
|
|
50
49
|
|
|
51
|
-
export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${meta.id}
|
|
50
|
+
export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(`${meta.id}.action.recover-identity`, {
|
|
52
51
|
input: Schema.Void,
|
|
53
52
|
output: Schema.Void,
|
|
54
53
|
}) {}
|
|
55
54
|
|
|
56
|
-
export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.id}
|
|
55
|
+
export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.id}.action.reset-storage`, {
|
|
57
56
|
input: Schema.Struct({
|
|
58
57
|
mode: Schema.optional(Schema.String),
|
|
59
58
|
}),
|
|
60
59
|
output: Schema.Void,
|
|
61
60
|
}) {}
|
|
62
61
|
|
|
63
|
-
export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.id}
|
|
62
|
+
export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.id}.action.create-agent`, {
|
|
64
63
|
input: Schema.Void,
|
|
65
64
|
output: Schema.Void,
|
|
66
65
|
}) {}
|
|
67
66
|
|
|
68
67
|
export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(
|
|
69
|
-
`${meta.id}
|
|
68
|
+
`${meta.id}.action.create-recovery-code`,
|
|
70
69
|
{
|
|
71
70
|
input: Schema.Void,
|
|
72
71
|
output: Schema.Void,
|
|
73
72
|
},
|
|
74
73
|
) {}
|
|
75
74
|
|
|
76
|
-
export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.id}
|
|
75
|
+
export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.id}.action.create-passkey`, {
|
|
77
76
|
input: Schema.Void,
|
|
78
77
|
output: Schema.Void,
|
|
79
78
|
}) {}
|
|
80
79
|
|
|
81
|
-
export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.id}
|
|
80
|
+
export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.id}.action.redeem-passkey`, {
|
|
82
81
|
input: Schema.Void,
|
|
83
82
|
output: Schema.Void,
|
|
84
83
|
}) {}
|
|
85
84
|
|
|
86
|
-
export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.id}
|
|
85
|
+
export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.id}.action.redeem-token`, {
|
|
87
86
|
input: Schema.Struct({
|
|
88
87
|
token: Schema.String,
|
|
89
88
|
}),
|
|
@@ -91,120 +90,16 @@ export namespace ClientAction {
|
|
|
91
90
|
}) {}
|
|
92
91
|
}
|
|
93
92
|
|
|
94
|
-
const CLIENT_OPERATION = `${meta.id}/operation`;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Operations for the Client plugin.
|
|
98
|
-
*/
|
|
99
|
-
export namespace ClientOperation {
|
|
100
|
-
const ProfileSchema = Schema.Struct({
|
|
101
|
-
displayName: Schema.optional(Schema.String),
|
|
102
|
-
avatarCid: Schema.optional(Schema.String),
|
|
103
|
-
data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
export const CreateIdentity = Operation.make({
|
|
107
|
-
meta: { key: `${CLIENT_OPERATION}/create-identity`, name: 'Create Identity' },
|
|
108
|
-
services: [Capability.Service],
|
|
109
|
-
schema: {
|
|
110
|
-
input: ProfileSchema,
|
|
111
|
-
output: IdentitySchema,
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
export const JoinIdentity = Operation.make({
|
|
116
|
-
meta: { key: `${CLIENT_OPERATION}/join-identity`, name: 'Join Identity' },
|
|
117
|
-
services: [Capability.Service],
|
|
118
|
-
schema: {
|
|
119
|
-
input: Schema.Struct({
|
|
120
|
-
invitationCode: Schema.optional(Schema.String),
|
|
121
|
-
}),
|
|
122
|
-
output: Schema.Void,
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
export const ShareIdentity = Operation.make({
|
|
127
|
-
meta: { key: `${CLIENT_OPERATION}/share-identity`, name: 'Share Identity' },
|
|
128
|
-
services: [Capability.Service],
|
|
129
|
-
schema: {
|
|
130
|
-
input: Schema.Void,
|
|
131
|
-
output: Schema.Void,
|
|
132
|
-
},
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
export const RecoverIdentity = Operation.make({
|
|
136
|
-
meta: { key: `${CLIENT_OPERATION}/recover-identity`, name: 'Recover Identity' },
|
|
137
|
-
services: [Capability.Service],
|
|
138
|
-
schema: {
|
|
139
|
-
input: Schema.Void,
|
|
140
|
-
output: Schema.Void,
|
|
141
|
-
},
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
export const ResetStorage = Operation.make({
|
|
145
|
-
meta: { key: `${CLIENT_OPERATION}/reset-storage`, name: 'Reset Storage' },
|
|
146
|
-
services: [Capability.Service],
|
|
147
|
-
schema: {
|
|
148
|
-
input: Schema.Struct({
|
|
149
|
-
mode: Schema.optional(Schema.String),
|
|
150
|
-
}),
|
|
151
|
-
output: Schema.Void,
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
export const CreateAgent = Operation.make({
|
|
156
|
-
meta: { key: `${CLIENT_OPERATION}/create-agent`, name: 'Create Agent' },
|
|
157
|
-
services: [Capability.Service],
|
|
158
|
-
schema: {
|
|
159
|
-
input: Schema.Void,
|
|
160
|
-
output: Schema.Void,
|
|
161
|
-
},
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
export const CreateRecoveryCode = Operation.make({
|
|
165
|
-
meta: { key: `${CLIENT_OPERATION}/create-recovery-code`, name: 'Create Recovery Code' },
|
|
166
|
-
services: [Capability.Service],
|
|
167
|
-
schema: {
|
|
168
|
-
input: Schema.Void,
|
|
169
|
-
output: Schema.Void,
|
|
170
|
-
},
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
export const CreatePasskey = Operation.make({
|
|
174
|
-
meta: { key: `${CLIENT_OPERATION}/create-passkey`, name: 'Create Passkey' },
|
|
175
|
-
services: [Capability.Service],
|
|
176
|
-
schema: {
|
|
177
|
-
input: Schema.Void,
|
|
178
|
-
output: Schema.Void,
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
export const RedeemPasskey = Operation.make({
|
|
183
|
-
meta: { key: `${CLIENT_OPERATION}/redeem-passkey`, name: 'Redeem Passkey' },
|
|
184
|
-
services: [Capability.Service],
|
|
185
|
-
schema: {
|
|
186
|
-
input: Schema.Void,
|
|
187
|
-
output: Schema.Void,
|
|
188
|
-
},
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
export const RedeemToken = Operation.make({
|
|
192
|
-
meta: { key: `${CLIENT_OPERATION}/redeem-token`, name: 'Redeem Token' },
|
|
193
|
-
services: [Capability.Service],
|
|
194
|
-
schema: {
|
|
195
|
-
input: Schema.Struct({
|
|
196
|
-
token: Schema.String,
|
|
197
|
-
}),
|
|
198
|
-
output: Schema.Void,
|
|
199
|
-
},
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
|
|
203
93
|
export type ClientPluginOptions = ClientOptions & {
|
|
204
94
|
/**
|
|
205
|
-
* Base
|
|
95
|
+
* Base origin for the invitation link.
|
|
96
|
+
*/
|
|
97
|
+
shareableLinkOrigin?: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Path for the invitation link.
|
|
206
101
|
*/
|
|
207
|
-
|
|
102
|
+
invitationPath?: string;
|
|
208
103
|
|
|
209
104
|
/**
|
|
210
105
|
* Query parameter for the invitation code.
|