@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
|
@@ -5,66 +5,65 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
DevicesContainer,
|
|
13
14
|
JoinDialog,
|
|
14
15
|
ProfileContainer,
|
|
15
16
|
RecoveryCodeDialog,
|
|
16
|
-
type RecoveryCodeDialogProps,
|
|
17
17
|
RecoveryCredentialsContainer,
|
|
18
18
|
ResetDialog,
|
|
19
|
-
|
|
20
|
-
} from '
|
|
21
|
-
|
|
22
|
-
import {
|
|
19
|
+
} from '#containers';
|
|
20
|
+
import { Account, type ClientPluginOptions } from '#types';
|
|
21
|
+
|
|
22
|
+
import { JOIN_DIALOG, RECOVERY_CODE_DIALOG, RESET_DIALOG } from '../constants';
|
|
23
23
|
|
|
24
24
|
type ReactSurfaceOptions = Pick<ClientPluginOptions, 'onReset'> & {
|
|
25
25
|
createInvitationUrl: (invitationCode: string) => string;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export default Capability.makeModule(
|
|
29
|
-
Effect.fnUntraced(function* (
|
|
30
|
-
const { createInvitationUrl, onReset } = props!;
|
|
29
|
+
Effect.fnUntraced(function* ({ createInvitationUrl, onReset }: ReactSurfaceOptions) {
|
|
31
30
|
const capabilityManager = yield* Capability.Service;
|
|
32
31
|
|
|
33
|
-
return Capability.contributes(
|
|
34
|
-
|
|
32
|
+
return Capability.contributes(Capabilities.ReactSurface, [
|
|
33
|
+
Surface.create({
|
|
35
34
|
id: Account.Profile,
|
|
36
35
|
role: 'article',
|
|
37
|
-
filter: (
|
|
36
|
+
filter: AppSurface.literalSection(Account.Profile),
|
|
38
37
|
component: () => <ProfileContainer />,
|
|
39
38
|
}),
|
|
40
|
-
|
|
39
|
+
Surface.create({
|
|
41
40
|
id: Account.Devices,
|
|
42
41
|
role: 'article',
|
|
43
|
-
filter: (
|
|
42
|
+
filter: AppSurface.literalSection(Account.Devices),
|
|
44
43
|
component: () => <DevicesContainer createInvitationUrl={createInvitationUrl} />,
|
|
45
44
|
}),
|
|
46
|
-
|
|
45
|
+
Surface.create({
|
|
47
46
|
id: Account.Security,
|
|
48
47
|
role: 'article',
|
|
49
|
-
filter: (
|
|
48
|
+
filter: AppSurface.literalSection(Account.Security),
|
|
50
49
|
component: () => <RecoveryCredentialsContainer />,
|
|
51
50
|
}),
|
|
52
|
-
|
|
51
|
+
Surface.create({
|
|
53
52
|
id: JOIN_DIALOG,
|
|
54
53
|
role: 'dialog',
|
|
55
|
-
filter: (
|
|
54
|
+
filter: AppSurface.componentDialog(JOIN_DIALOG),
|
|
56
55
|
component: ({ data }: { data: any }) => <JoinDialog {...data.props} />,
|
|
57
56
|
}),
|
|
58
|
-
|
|
57
|
+
Surface.create({
|
|
59
58
|
id: RECOVERY_CODE_DIALOG,
|
|
60
59
|
role: 'dialog',
|
|
61
|
-
filter: (
|
|
60
|
+
filter: AppSurface.componentDialog(RECOVERY_CODE_DIALOG),
|
|
62
61
|
component: ({ data }: { data: any }) => <RecoveryCodeDialog {...data.props} />,
|
|
63
62
|
}),
|
|
64
|
-
|
|
63
|
+
Surface.create({
|
|
65
64
|
id: RESET_DIALOG,
|
|
66
65
|
role: 'dialog',
|
|
67
|
-
filter: (
|
|
66
|
+
filter: AppSurface.componentDialog(RESET_DIALOG),
|
|
68
67
|
component: ({ data }: { data: any }) => (
|
|
69
68
|
<ResetDialog {...data.props} onReset={onReset} capabilityManager={capabilityManager} />
|
|
70
69
|
),
|
|
@@ -4,24 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
8
9
|
import { type Type } from '@dxos/echo';
|
|
9
10
|
|
|
10
|
-
import { ClientCapabilities } from '
|
|
11
|
+
import { ClientCapabilities } from '#types';
|
|
11
12
|
|
|
12
13
|
export default Capability.makeModule(
|
|
13
14
|
Effect.fnUntraced(function* () {
|
|
14
|
-
const registry = yield* Capability.get(
|
|
15
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
15
16
|
const client = yield* Capability.get(ClientCapabilities.Client);
|
|
16
|
-
const schemasAtom = yield* Capability.atom(
|
|
17
|
+
const schemasAtom = yield* Capability.atom(AppCapabilities.Schema);
|
|
17
18
|
|
|
18
19
|
// TODO(wittjosiah): Unregister schemas when they are disabled.
|
|
19
|
-
let previous: Type.
|
|
20
|
+
let previous: Type.AnyEntity[] = [];
|
|
20
21
|
const cancel = registry.subscribe(
|
|
21
22
|
schemasAtom,
|
|
22
23
|
async (_schemas: any[]) => {
|
|
23
24
|
// TODO(wittjosiah): This doesn't seem to de-dupe schemas as expected.
|
|
24
|
-
const schemas = Array.from(new Set(_schemas.flat())) as Type.
|
|
25
|
+
const schemas = Array.from(new Set(_schemas.flat())) as Type.AnyEntity[];
|
|
25
26
|
// TODO(wittjosiah): Filter out schemas which the client has already registered.
|
|
26
27
|
const newSchemas = schemas.filter((schema) => !previous.includes(schema));
|
|
27
28
|
previous = schemas;
|
|
@@ -30,6 +31,6 @@ export default Capability.makeModule(
|
|
|
30
31
|
{ immediate: true },
|
|
31
32
|
);
|
|
32
33
|
|
|
33
|
-
return Capability.contributes(
|
|
34
|
+
return Capability.contributes(Capabilities.Null, null, () => Effect.sync(() => cancel()));
|
|
34
35
|
}),
|
|
35
36
|
);
|
|
@@ -9,17 +9,20 @@ import * as Yaml from 'yaml';
|
|
|
9
9
|
|
|
10
10
|
import { CommandConfig } from '@dxos/cli-util';
|
|
11
11
|
import { ConfigService } from '@dxos/client';
|
|
12
|
+
import { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';
|
|
12
13
|
|
|
13
14
|
export const view = Command.make(
|
|
14
15
|
'view',
|
|
15
16
|
{},
|
|
16
17
|
Effect.fnUntraced(function* () {
|
|
17
18
|
const config = yield* ConfigService;
|
|
18
|
-
const { json } = yield* CommandConfig;
|
|
19
|
+
const { json, profile } = yield* CommandConfig;
|
|
20
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profile);
|
|
19
21
|
|
|
20
22
|
if (json) {
|
|
21
23
|
yield* Console.log(JSON.stringify(config.values, null, 2));
|
|
22
24
|
} else {
|
|
25
|
+
yield* Console.log(`Path: ${configPath}`);
|
|
23
26
|
yield* Console.log(Yaml.stringify(config.values));
|
|
24
27
|
}
|
|
25
28
|
}),
|
|
@@ -16,7 +16,6 @@ describe('device info', () => {
|
|
|
16
16
|
Effect.gen(function* () {
|
|
17
17
|
const client = yield* ClientService;
|
|
18
18
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
19
|
yield* handler();
|
|
21
20
|
const logger = yield* TestConsole.TestConsole;
|
|
22
21
|
const logs = logger.logs;
|
|
@@ -16,8 +16,6 @@ import { printDevice } from '../util';
|
|
|
16
16
|
export const handler = Effect.fn(function* () {
|
|
17
17
|
const { json } = yield* CommandConfig;
|
|
18
18
|
const client = yield* ClientService;
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
|
-
|
|
21
19
|
const device = client.halo.device;
|
|
22
20
|
if (!device) {
|
|
23
21
|
if (json) {
|
|
@@ -16,7 +16,6 @@ describe('device list', () => {
|
|
|
16
16
|
Effect.gen(function* () {
|
|
17
17
|
const client = yield* ClientService;
|
|
18
18
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
19
|
yield* handler();
|
|
21
20
|
const logger = yield* TestConsole.TestConsole;
|
|
22
21
|
const logs = logger.logs;
|
|
@@ -15,8 +15,6 @@ import { mapDevices, printDevices } from '../util';
|
|
|
15
15
|
export const handler = Effect.fn(function* () {
|
|
16
16
|
const { json } = yield* CommandConfig;
|
|
17
17
|
const client = yield* ClientService;
|
|
18
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
19
|
-
|
|
20
18
|
const devices = client.halo.devices.get();
|
|
21
19
|
|
|
22
20
|
if (json) {
|
|
@@ -16,8 +16,6 @@ import { printDevice } from '../util';
|
|
|
16
16
|
export const handler = Effect.fn(function* ({ label }: { label: string }) {
|
|
17
17
|
const { json } = yield* CommandConfig;
|
|
18
18
|
const client = yield* ClientService;
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
|
-
|
|
21
19
|
const device = client.halo.device;
|
|
22
20
|
if (!device) {
|
|
23
21
|
if (json) {
|
|
@@ -10,13 +10,14 @@ import * as Option from 'effect/Option';
|
|
|
10
10
|
import { CommandConfig } from '@dxos/cli-util';
|
|
11
11
|
import { ClientService } from '@dxos/client';
|
|
12
12
|
import { createEdgeIdentity } from '@dxos/client/edge';
|
|
13
|
+
import { Context } from '@dxos/context';
|
|
13
14
|
|
|
14
15
|
export const getStatus = () =>
|
|
15
16
|
Effect.gen(function* () {
|
|
16
17
|
const client = yield* ClientService;
|
|
17
18
|
const identity = createEdgeIdentity(client);
|
|
18
|
-
client.edge.setIdentity(identity);
|
|
19
|
-
const status = yield* Effect.tryPromise(() => client.edge.getStatus());
|
|
19
|
+
client.edge.http.setIdentity(identity);
|
|
20
|
+
const status = yield* Effect.tryPromise(() => client.edge.http.getStatus(Context.default()));
|
|
20
21
|
|
|
21
22
|
if (yield* CommandConfig.isJson) {
|
|
22
23
|
yield* Console.log(JSON.stringify(status, null, 2));
|
|
@@ -15,7 +15,6 @@ import { runAndForwardErrors } from '@dxos/effect';
|
|
|
15
15
|
import { ObservabilityPlugin } from '@dxos/plugin-observability/cli';
|
|
16
16
|
|
|
17
17
|
import { ClientPlugin } from '../../../plugin';
|
|
18
|
-
|
|
19
18
|
import { handler } from './create';
|
|
20
19
|
|
|
21
20
|
const layer = Layer.merge(TestLayer, fromPlugins([ClientPlugin({}), OperationPlugin(), ObservabilityPlugin()]));
|
|
@@ -8,13 +8,16 @@ import * as Console from 'effect/Console';
|
|
|
8
8
|
import * as Effect from 'effect/Effect';
|
|
9
9
|
import * as Option from 'effect/Option';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { Capabilities, Plugin } from '@dxos/app-framework';
|
|
12
12
|
import { CommandConfig, flushAndSync, spaceLayer } from '@dxos/cli-util';
|
|
13
13
|
import { print } from '@dxos/cli-util';
|
|
14
14
|
import { ClientService } from '@dxos/client';
|
|
15
15
|
import { invariant } from '@dxos/invariant';
|
|
16
|
+
import { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';
|
|
17
|
+
import { MembershipPolicy } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
18
|
+
|
|
19
|
+
import { ClientOperation } from '#operations';
|
|
16
20
|
|
|
17
|
-
import { ClientOperation } from '../../../../types';
|
|
18
21
|
import { printIdentity } from '../util';
|
|
19
22
|
|
|
20
23
|
export const handler = Effect.fn(function* ({
|
|
@@ -30,7 +33,7 @@ export const handler = Effect.fn(function* ({
|
|
|
30
33
|
invariant(!client.halo.identity.get(), 'Identity already exists');
|
|
31
34
|
|
|
32
35
|
const manager = yield* Plugin.Service;
|
|
33
|
-
const { invoke } = manager.capabilities.get(
|
|
36
|
+
const { invoke } = manager.capabilities.get(Capabilities.OperationInvoker);
|
|
34
37
|
const identity = yield* invoke(ClientOperation.CreateIdentity, {
|
|
35
38
|
displayName: Option.getOrUndefined(displayName),
|
|
36
39
|
});
|
|
@@ -39,9 +42,14 @@ export const handler = Effect.fn(function* ({
|
|
|
39
42
|
yield* invoke(ClientOperation.CreateAgent);
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
|
|
43
|
-
yield* Effect.
|
|
44
|
-
const space =
|
|
45
|
+
// Create personal space for the CLI identity.
|
|
46
|
+
const { PERSONAL_SPACE_TAG, setPersonalSpace } = yield* Effect.tryPromise(() => import('@dxos/app-toolkit'));
|
|
47
|
+
const space = yield* Effect.promise(() =>
|
|
48
|
+
client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG], membershipPolicy: MembershipPolicy.LOCKED }),
|
|
49
|
+
);
|
|
50
|
+
yield* Effect.promise(() => space.waitUntilReady());
|
|
51
|
+
yield* Effect.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));
|
|
52
|
+
setPersonalSpace(space);
|
|
45
53
|
yield* flushAndSync({ indexes: true }).pipe(Effect.provide(spaceLayer(Option.some(space.id))));
|
|
46
54
|
|
|
47
55
|
if (json) {
|
|
@@ -17,7 +17,6 @@ describe('halo credential list', () => {
|
|
|
17
17
|
Effect.gen(function* () {
|
|
18
18
|
const client = yield* ClientService;
|
|
19
19
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
20
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
21
20
|
yield* handler({ type: Option.none(), spaceId: Option.none(), timeout: 500, delay: 250 });
|
|
22
21
|
const logger = yield* TestConsole.TestConsole;
|
|
23
22
|
const logs = logger.logs;
|
|
@@ -9,7 +9,7 @@ import * as Duration from 'effect/Duration';
|
|
|
9
9
|
import * as Effect from 'effect/Effect';
|
|
10
10
|
import * as Option from 'effect/Option';
|
|
11
11
|
|
|
12
|
-
import { CommandConfig, Common, FormBuilder, getSpace, printList
|
|
12
|
+
import { CommandConfig, Common, FormBuilder, getSpace, printList } from '@dxos/cli-util';
|
|
13
13
|
import { ClientService } from '@dxos/client';
|
|
14
14
|
import type { Credential } from '@dxos/client/halo';
|
|
15
15
|
import { type Key } from '@dxos/echo';
|
|
@@ -41,20 +41,17 @@ export const handler = Effect.fn(function* ({
|
|
|
41
41
|
delay,
|
|
42
42
|
}: {
|
|
43
43
|
type: Option.Option<string>;
|
|
44
|
-
spaceId: Option.Option<
|
|
44
|
+
spaceId: Option.Option<Key.SpaceId>;
|
|
45
45
|
timeout: number;
|
|
46
46
|
delay: number;
|
|
47
47
|
}) {
|
|
48
48
|
const { json } = yield* CommandConfig;
|
|
49
49
|
const client = yield* ClientService;
|
|
50
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
51
|
-
|
|
52
50
|
let credentials: Credential[];
|
|
53
51
|
|
|
54
|
-
const resolvedSpaceId = yield* spaceIdWithDefault(spaceId as Option.Option<Key.SpaceId>);
|
|
55
52
|
if (Option.isSome(spaceId)) {
|
|
56
|
-
// If space ID was provided, get credentials from that space
|
|
57
|
-
const space = yield* getSpace(
|
|
53
|
+
// If space ID was provided, get credentials from that space.
|
|
54
|
+
const space = yield* getSpace(spaceId.value);
|
|
58
55
|
credentials = yield* Effect.tryPromise(() => space.internal.getCredentials());
|
|
59
56
|
} else {
|
|
60
57
|
// Get credentials from HALO
|
|
@@ -14,8 +14,6 @@ import { ClientService } from '@dxos/client';
|
|
|
14
14
|
export const handler = Effect.fn(function* () {
|
|
15
15
|
const { json } = yield* CommandConfig;
|
|
16
16
|
const client = yield* ClientService;
|
|
17
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
18
|
-
|
|
19
17
|
const identity = client.halo.identity.get();
|
|
20
18
|
const device = client.halo.device;
|
|
21
19
|
|
|
@@ -12,8 +12,6 @@ import { ClientService } from '@dxos/client';
|
|
|
12
12
|
export const handler = Effect.fn(function* () {
|
|
13
13
|
const { json } = yield* CommandConfig;
|
|
14
14
|
const client = yield* ClientService;
|
|
15
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
16
|
-
|
|
17
15
|
const identityService = client.services.services.IdentityService;
|
|
18
16
|
if (!identityService) {
|
|
19
17
|
if (json) {
|
|
@@ -16,7 +16,6 @@ describe('halo update', () => {
|
|
|
16
16
|
Effect.gen(function* () {
|
|
17
17
|
const client = yield* ClientService;
|
|
18
18
|
yield* Effect.tryPromise(() => client.halo.createIdentity());
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
19
|
yield* handler({ displayName: 'Updated Name' });
|
|
21
20
|
const logger = yield* TestConsole.TestConsole;
|
|
22
21
|
const logs = logger.logs;
|
|
@@ -16,8 +16,6 @@ import { printIdentity } from '../util';
|
|
|
16
16
|
export const handler = Effect.fn(function* ({ displayName }: { displayName: string }) {
|
|
17
17
|
const { json } = yield* CommandConfig;
|
|
18
18
|
const client = yield* ClientService;
|
|
19
|
-
yield* Effect.tryPromise(() => client.spaces.waitUntilReady());
|
|
20
|
-
|
|
21
19
|
const identity = client.halo.identity.get();
|
|
22
20
|
if (!identity) {
|
|
23
21
|
if (json) {
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
import * as Command from '@effect/cli/Command';
|
|
6
6
|
import * as Options from '@effect/cli/Options';
|
|
7
7
|
import * as FileSystem from '@effect/platform/FileSystem';
|
|
8
|
+
import * as Path from '@effect/platform/Path';
|
|
8
9
|
import * as Console from 'effect/Console';
|
|
9
10
|
import * as Effect from 'effect/Effect';
|
|
10
11
|
import * as Option from 'effect/Option';
|
|
11
12
|
import * as Record from 'effect/Record';
|
|
12
13
|
|
|
13
14
|
import { CommandConfig, print } from '@dxos/cli-util';
|
|
14
|
-
import { DX_CONFIG,
|
|
15
|
+
import { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';
|
|
15
16
|
import { trim } from '@dxos/util';
|
|
16
17
|
|
|
17
18
|
import { printProfileCreated } from './util';
|
|
@@ -71,17 +72,19 @@ export const create = Command.make(
|
|
|
71
72
|
Effect.fnUntraced(function* ({ template, name }) {
|
|
72
73
|
const { json } = yield* CommandConfig;
|
|
73
74
|
const fs = yield* FileSystem.FileSystem;
|
|
75
|
+
const path = yield* Path.Path;
|
|
74
76
|
const profileName = name.pipe(Option.getOrElse(() => template));
|
|
75
|
-
const
|
|
76
|
-
if (yield* fs.exists(
|
|
77
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
78
|
+
if (yield* fs.exists(configPath)) {
|
|
77
79
|
throw new Error(`Profile ${profileName} already exists`);
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
yield* fs.
|
|
82
|
+
yield* fs.makeDirectory(path.dirname(configPath), { recursive: true });
|
|
83
|
+
yield* fs.writeFileString(configPath, TEMPLATES[template]);
|
|
81
84
|
if (json) {
|
|
82
|
-
yield* Console.log(JSON.stringify({ name: profileName, path:
|
|
85
|
+
yield* Console.log(JSON.stringify({ name: profileName, path: configPath }, null, 2));
|
|
83
86
|
} else {
|
|
84
|
-
yield* Console.log(print(printProfileCreated(profileName,
|
|
87
|
+
yield* Console.log(print(printProfileCreated(profileName, configPath)));
|
|
85
88
|
}
|
|
86
89
|
}),
|
|
87
90
|
);
|
|
@@ -10,7 +10,7 @@ import * as Effect from 'effect/Effect';
|
|
|
10
10
|
import * as Option from 'effect/Option';
|
|
11
11
|
|
|
12
12
|
import { CommandConfig, print } from '@dxos/cli-util';
|
|
13
|
-
import { DX_CONFIG,
|
|
13
|
+
import { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';
|
|
14
14
|
|
|
15
15
|
import { printProfileDeleted } from './util';
|
|
16
16
|
|
|
@@ -23,7 +23,10 @@ export const del = Command.make(
|
|
|
23
23
|
const { json } = yield* CommandConfig;
|
|
24
24
|
const fs = yield* FileSystem.FileSystem;
|
|
25
25
|
const profileName = name.pipe(Option.getOrElse(() => 'default'));
|
|
26
|
-
|
|
26
|
+
const configPath = getProfileConfigPath(DX_CONFIG, profileName);
|
|
27
|
+
const pluginsPath = `${DX_CONFIG}/plugins/${profileName}.yml`;
|
|
28
|
+
yield* fs.remove(configPath).pipe(Effect.ignore);
|
|
29
|
+
yield* fs.remove(pluginsPath).pipe(Effect.ignore);
|
|
27
30
|
if (json) {
|
|
28
31
|
yield* Console.log(JSON.stringify({ name: profileName, deleted: true }, null, 2));
|
|
29
32
|
} else {
|
|
@@ -23,21 +23,22 @@ export const list = Command.make(
|
|
|
23
23
|
const fs = yield* FileSystem.FileSystem;
|
|
24
24
|
const path = yield* Path.Path;
|
|
25
25
|
const profileDir = path.join(DX_CONFIG, 'profile');
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
Effect.
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
const entries = yield* fs.readDirectory(profileDir);
|
|
27
|
+
const profileFiles = entries.filter((entry) => entry.endsWith('.yml'));
|
|
28
|
+
const profiles = yield* Effect.forEach(profileFiles, (filename) =>
|
|
29
|
+
Effect.gen(function* () {
|
|
30
|
+
const name = filename.slice(0, -4);
|
|
31
|
+
const configPath = path.join(profileDir, filename);
|
|
32
|
+
const configContent = yield* fs
|
|
33
|
+
.readFileString(configPath)
|
|
34
|
+
.pipe(Effect.catchTag('SystemError', () => Effect.succeed('{}')));
|
|
35
|
+
const configValues = Yaml.parse(configContent) ?? {};
|
|
35
36
|
const config = new Config(configValues);
|
|
36
37
|
return {
|
|
37
38
|
name,
|
|
38
39
|
isCurrent: name === currentProfile,
|
|
39
|
-
fullPath,
|
|
40
|
-
storagePath: getProfilePath(configValues?.runtime?.client?.storage
|
|
40
|
+
fullPath: configPath,
|
|
41
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
41
42
|
edge: config.values.runtime?.services?.edge?.url,
|
|
42
43
|
};
|
|
43
44
|
}),
|
package/src/cli/plugin.ts
CHANGED
|
@@ -2,32 +2,30 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { meta } from '../meta';
|
|
12
|
-
import { ClientEvents } from '../types';
|
|
13
|
-
import { type ClientPluginOptions } from '../types';
|
|
8
|
+
import { Client, OperationHandler, SchemaDefs } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { ClientEvents } from '#types';
|
|
11
|
+
import { type ClientPluginOptions } from '#types';
|
|
14
12
|
|
|
15
13
|
import { config, device, edge, halo, profile } from './commands';
|
|
16
14
|
|
|
17
15
|
export const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(
|
|
16
|
+
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
17
|
+
AppPlugin.addCommandModule({ commands: [config, device, edge, halo, profile] }),
|
|
18
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
18
19
|
Plugin.addModule((options) => ({
|
|
19
20
|
id: Capability.getModuleTag(Client),
|
|
20
|
-
activatesOn:
|
|
21
|
+
activatesOn: ActivationEvents.Startup,
|
|
21
22
|
activatesAfter: [ClientEvents.ClientReady],
|
|
22
23
|
activate: () => Client(options),
|
|
23
24
|
})),
|
|
24
25
|
Plugin.addModule({
|
|
25
26
|
activatesOn: ClientEvents.ClientReady,
|
|
26
|
-
activatesBefore: [
|
|
27
|
+
activatesBefore: [AppActivationEvents.SetupSchema],
|
|
27
28
|
activate: SchemaDefs,
|
|
28
29
|
}),
|
|
29
|
-
// TODO(wittjosiah): Could some of these commands make use of operations?
|
|
30
|
-
Common.Plugin.addCommandModule({ commands: [config, device, edge, halo, profile] }),
|
|
31
|
-
Common.Plugin.addOperationResolverModule({ activate: () => OperationResolver() }),
|
|
32
30
|
Plugin.make,
|
|
33
31
|
);
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { inspect } from 'node:util';
|
|
6
|
-
|
|
7
5
|
import * as Console from 'effect/Console';
|
|
8
6
|
import * as Context from 'effect/Context';
|
|
9
7
|
import * as Effect from 'effect/Effect';
|
|
10
8
|
import * as Layer from 'effect/Layer';
|
|
9
|
+
import { inspect } from 'node:util';
|
|
11
10
|
|
|
12
11
|
function logToString(...args: any[]): string {
|
|
13
12
|
return args
|
package/src/components/index.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
//
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
|
-
|
|
5
|
-
export * from './DevicesContainer';
|
|
6
|
-
export * from './JoinDialog';
|
|
7
|
-
export * from './ProfileContainer';
|
|
8
|
-
export * from './RecoveryCodeDialog';
|
|
9
|
-
export * from './RecoveryCredentialsContainer';
|
|
10
|
-
export * from './ResetDialog';
|
package/src/constants.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { meta } from '
|
|
5
|
+
import { meta } from '#meta';
|
|
6
6
|
|
|
7
|
-
export const JOIN_DIALOG = `${meta.id}
|
|
8
|
-
export const RECOVERY_CODE_DIALOG = `${meta.id}
|
|
9
|
-
export const RESET_DIALOG = `${meta.id}
|
|
7
|
+
export const JOIN_DIALOG = `${meta.id}.JoinDialog`;
|
|
8
|
+
export const RECOVERY_CODE_DIALOG = `${meta.id}.RecoveryCodeDialog`;
|
|
9
|
+
export const RESET_DIALOG = `${meta.id}.ResetDialog`;
|
|
@@ -5,30 +5,33 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
|
|
8
|
-
import { OperationPlugin } from '@dxos/app-framework';
|
|
8
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
10
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
11
|
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
import { translations } from '../translations';
|
|
13
|
+
import { initializeIdentity } from '#testing';
|
|
15
14
|
|
|
15
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
16
|
+
import { translations } from '../../translations';
|
|
16
17
|
import { DevicesContainer } from './DevicesContainer';
|
|
17
18
|
|
|
18
19
|
const meta = {
|
|
19
|
-
title: 'plugins/plugin-client/DevicesContainer',
|
|
20
|
+
title: 'plugins/plugin-client/containers/DevicesContainer',
|
|
20
21
|
component: DevicesContainer,
|
|
21
22
|
decorators: [
|
|
22
|
-
withTheme,
|
|
23
|
+
withTheme(),
|
|
24
|
+
withLayout({ layout: 'fullscreen' }),
|
|
23
25
|
withPluginManager({
|
|
24
26
|
plugins: [
|
|
25
27
|
ClientPlugin({
|
|
26
28
|
onClientInitialized: ({ client }) =>
|
|
27
29
|
Effect.gen(function* () {
|
|
28
|
-
yield*
|
|
30
|
+
yield* initializeIdentity(client);
|
|
29
31
|
}),
|
|
30
32
|
}),
|
|
31
33
|
OperationPlugin(),
|
|
34
|
+
RuntimePlugin(),
|
|
32
35
|
],
|
|
33
36
|
}),
|
|
34
37
|
],
|