@dxos/plugin-client 0.8.4-main.f5c0578 → 0.8.4-main.fcfe5033a5
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-HLWIF3AW.mjs → chunk-WNJRYPGG.mjs} +37 -16
- package/dist/lib/browser/chunk-WNJRYPGG.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1060 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-agent-SS5SE35J.mjs +34 -0
- package/dist/lib/browser/create-agent-SS5SE35J.mjs.map +7 -0
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs +30 -0
- package/dist/lib/browser/create-identity-PBEUEIPN.mjs.map +7 -0
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs +105 -0
- package/dist/lib/browser/create-passkey-JN6I5WMM.mjs.map +7 -0
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs +44 -0
- package/dist/lib/browser/create-recovery-code-32I6IWZC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +119 -128
- 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 +8 -4
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-JG6AFSFU.mjs → chunk-IT5LAIV3.mjs} +38 -16
- package/dist/lib/node-esm/chunk-IT5LAIV3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs +14 -0
- package/dist/lib/node-esm/chunk-J5RWSQT6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs +176 -0
- package/dist/lib/node-esm/chunk-SJ6FDER5.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1061 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs +35 -0
- package/dist/lib/node-esm/create-agent-QGEHMHBL.mjs.map +7 -0
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs +31 -0
- package/dist/lib/node-esm/create-identity-EHRJQOO4.mjs.map +7 -0
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs +106 -0
- package/dist/lib/node-esm/create-passkey-PFBHHBEQ.mjs.map +7 -0
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs +45 -0
- package/dist/lib/node-esm/create-recovery-code-HBAM2A72.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +119 -128
- 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 +8 -4
- package/dist/types/src/ClientPlugin.d.ts +3 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +6 -7
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +28 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +3 -2
- package/dist/types/src/capabilities/migrations.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +4 -0
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts +15 -0
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +21 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +4 -3
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +3 -2
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/cli/commands/config/index.d.ts +5 -0
- package/dist/types/src/cli/commands/config/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/config/view.d.ts +5 -0
- package/dist/types/src/cli/commands/config/view.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/index.d.ts +7 -0
- package/dist/types/src/cli/commands/device/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/info/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/info.d.ts +7 -0
- package/dist/types/src/cli/commands/device/info/info.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/info/info.test.d.ts +2 -0
- package/dist/types/src/cli/commands/device/info/info.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/list.d.ts +7 -0
- package/dist/types/src/cli/commands/device/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/device/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/update/index.d.ts +2 -0
- package/dist/types/src/cli/commands/device/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/update/update.d.ts +11 -0
- package/dist/types/src/cli/commands/device/update/update.d.ts.map +1 -0
- package/dist/types/src/cli/commands/device/util.d.ts +16 -0
- package/dist/types/src/cli/commands/device/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/edge/index.d.ts +5 -0
- package/dist/types/src/cli/commands/edge/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/edge/status.d.ts +7 -0
- package/dist/types/src/cli/commands/edge/status.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/create.d.ts +15 -0
- package/dist/types/src/cli/commands/halo/create/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/create.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/create/create.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/create/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/create/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/add/add.d.ts +13 -0
- package/dist/types/src/cli/commands/halo/credential/add/add.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/add/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/add/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/index.d.ts +12 -0
- package/dist/types/src/cli/commands/halo/credential/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/list/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts +19 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/credential/list/list.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/identity/identity.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/identity/identity.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/identity/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/identity/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/index.d.ts +3 -0
- package/dist/types/src/cli/commands/halo/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/join/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/join.d.ts +8 -0
- package/dist/types/src/cli/commands/halo/join/join.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/join/join.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/join/join.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/keys/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/keys/keys.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/keys/keys.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/recover/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/recover.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/recover/recover.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/recover/recover.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/seed/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/seed/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts +7 -0
- package/dist/types/src/cli/commands/halo/seed/seed.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/share/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/share/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/share/share.d.ts +15 -0
- package/dist/types/src/cli/commands/halo/share/share.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/index.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/update/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/update.d.ts +11 -0
- package/dist/types/src/cli/commands/halo/update/update.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/update/update.test.d.ts +2 -0
- package/dist/types/src/cli/commands/halo/update/update.test.d.ts.map +1 -0
- package/dist/types/src/cli/commands/halo/util.d.ts +13 -0
- package/dist/types/src/cli/commands/halo/util.d.ts.map +1 -0
- package/dist/types/src/cli/commands/index.d.ts +6 -0
- package/dist/types/src/cli/commands/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/create.d.ts +10 -0
- package/dist/types/src/cli/commands/profile/create.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/delete.d.ts +8 -0
- package/dist/types/src/cli/commands/profile/delete.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/import.d.ts +17 -0
- package/dist/types/src/cli/commands/profile/import.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/index.d.ts +19 -0
- package/dist/types/src/cli/commands/profile/index.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/inspect.d.ts +13 -0
- package/dist/types/src/cli/commands/profile/inspect.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/list.d.ts +6 -0
- package/dist/types/src/cli/commands/profile/list.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/reset.d.ts +8 -0
- package/dist/types/src/cli/commands/profile/reset.d.ts.map +1 -0
- package/dist/types/src/cli/commands/profile/util.d.ts +24 -0
- package/dist/types/src/cli/commands/profile/util.d.ts.map +1 -0
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +4 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/cli/testing/test-console.d.ts +37 -0
- package/dist/types/src/cli/testing/test-console.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +4 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts +184 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts +2 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/JoinDialog}/JoinDialog.d.ts +0 -1
- package/dist/types/src/containers/JoinDialog/JoinDialog.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts +15 -0
- package/dist/types/src/containers/JoinDialog/JoinDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts +2 -0
- package/dist/types/src/containers/JoinDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts +2 -0
- package/dist/types/src/containers/ProfileContainer/index.d.ts.map +1 -0
- package/dist/types/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.d.ts +0 -1
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts +16 -0
- package/dist/types/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCodeDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts +4 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/RecoveryCredentialsContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts +9 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts +19 -0
- package/dist/types/src/containers/ResetDialog/ResetDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts +4 -0
- package/dist/types/src/containers/ResetDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +10 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-agent.d.ts +5 -0
- package/dist/types/src/operations/create-agent.d.ts.map +1 -0
- package/dist/types/src/operations/create-identity.d.ts +5 -0
- package/dist/types/src/operations/create-identity.d.ts.map +1 -0
- package/dist/types/src/operations/create-passkey.d.ts +5 -0
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/create-recovery-code.d.ts +5 -0
- package/dist/types/src/operations/create-recovery-code.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +36 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/join-identity.d.ts +5 -0
- package/dist/types/src/operations/join-identity.d.ts.map +1 -0
- package/dist/types/src/operations/recover-identity.d.ts +5 -0
- package/dist/types/src/operations/recover-identity.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-passkey.d.ts +5 -0
- package/dist/types/src/operations/redeem-passkey.d.ts.map +1 -0
- package/dist/types/src/operations/redeem-token.d.ts +5 -0
- package/dist/types/src/operations/redeem-token.d.ts.map +1 -0
- package/dist/types/src/operations/reset-storage.d.ts +5 -0
- package/dist/types/src/operations/reset-storage.d.ts.map +1 -0
- package/dist/types/src/operations/share-identity.d.ts +5 -0
- package/dist/types/src/operations/share-identity.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +13 -0
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +2 -48
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +9 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +9 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +37 -32
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +89 -39
- package/src/ClientPlugin.ts +56 -63
- package/src/capabilities/app-graph-builder.ts +86 -103
- package/src/capabilities/client.ts +66 -30
- package/src/capabilities/index.ts +14 -10
- package/src/capabilities/migrations.ts +22 -17
- package/src/capabilities/navigation-handler/index.ts +9 -0
- package/src/capabilities/navigation-handler/navigation-handler.ts +64 -0
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +17 -13
- package/src/capabilities/react-surface.tsx +52 -49
- package/src/capabilities/schema-defs.ts +27 -20
- package/src/cli/commands/config/index.ts +12 -0
- package/src/cli/commands/config/view.ts +29 -0
- package/src/cli/commands/device/index.ts +14 -0
- package/src/cli/commands/device/info/index.ts +5 -0
- package/src/cli/commands/device/info/info.test.ts +28 -0
- package/src/cli/commands/device/info/info.ts +48 -0
- package/src/cli/commands/device/list/index.ts +5 -0
- package/src/cli/commands/device/list/list.test.ts +30 -0
- package/src/cli/commands/device/list/list.ts +28 -0
- package/src/cli/commands/device/update/index.ts +5 -0
- package/src/cli/commands/device/update/update.ts +68 -0
- package/src/cli/commands/device/util.ts +55 -0
- package/src/cli/commands/edge/index.ts +12 -0
- package/src/cli/commands/edge/status.ts +46 -0
- package/src/cli/commands/halo/create/create.test.ts +51 -0
- package/src/cli/commands/halo/create/create.ts +83 -0
- package/src/cli/commands/halo/create/index.ts +5 -0
- package/src/cli/commands/halo/credential/add/add.ts +97 -0
- package/src/cli/commands/halo/credential/add/index.ts +5 -0
- package/src/cli/commands/halo/credential/index.ts +13 -0
- package/src/cli/commands/halo/credential/list/index.ts +5 -0
- package/src/cli/commands/halo/credential/list/list.test.ts +27 -0
- package/src/cli/commands/halo/credential/list/list.ts +115 -0
- package/src/cli/commands/halo/identity/identity.test.ts +40 -0
- package/src/cli/commands/halo/identity/identity.ts +45 -0
- package/src/cli/commands/halo/identity/index.ts +5 -0
- package/src/cli/commands/halo/index.ts +21 -0
- package/src/cli/commands/halo/join/index.ts +5 -0
- package/src/cli/commands/halo/join/join.test.ts +10 -0
- package/src/cli/commands/halo/join/join.ts +87 -0
- package/src/cli/commands/halo/keys/index.ts +5 -0
- package/src/cli/commands/halo/keys/keys.test.ts +29 -0
- package/src/cli/commands/halo/keys/keys.ts +40 -0
- package/src/cli/commands/halo/recover/index.ts +5 -0
- package/src/cli/commands/halo/recover/recover.test.ts +10 -0
- package/src/cli/commands/halo/recover/recover.ts +44 -0
- package/src/cli/commands/halo/seed/index.ts +5 -0
- package/src/cli/commands/halo/seed/seed.ts +36 -0
- package/src/cli/commands/halo/share/index.ts +5 -0
- package/src/cli/commands/halo/share/share.ts +97 -0
- package/src/cli/commands/halo/update/index.ts +5 -0
- package/src/cli/commands/halo/update/update.test.ts +28 -0
- package/src/cli/commands/halo/update/update.ts +67 -0
- package/src/cli/commands/halo/util.ts +18 -0
- package/src/cli/commands/index.ts +9 -0
- package/src/cli/commands/profile/create.ts +90 -0
- package/src/cli/commands/profile/delete.ts +36 -0
- package/src/cli/commands/profile/import.ts +101 -0
- package/src/cli/commands/profile/index.ts +17 -0
- package/src/cli/commands/profile/inspect.ts +64 -0
- package/src/cli/commands/profile/list.ts +55 -0
- package/src/cli/commands/profile/reset.ts +45 -0
- package/src/cli/commands/profile/util.ts +48 -0
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +31 -0
- package/src/cli/testing/test-console.ts +87 -0
- package/src/components/index.ts +0 -7
- package/src/constants.ts +9 -0
- package/src/containers/DevicesContainer/DevicesContainer.stories.tsx +52 -0
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +91 -110
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +42 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +27 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +68 -65
- package/src/containers/ProfileContainer/index.ts +5 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +9 -12
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -28
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +47 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +72 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +52 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +2 -5
- package/src/meta.ts +8 -5
- package/src/operations/create-agent.ts +26 -0
- package/src/operations/create-identity.ts +29 -0
- package/src/operations/create-passkey.ts +88 -0
- package/src/operations/create-recovery-code.ts +34 -0
- package/src/operations/definitions.ts +107 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/join-identity.ts +28 -0
- package/src/operations/recover-identity.ts +28 -0
- package/src/operations/redeem-passkey.ts +85 -0
- package/src/operations/redeem-token.ts +31 -0
- package/src/operations/reset-storage.ts +27 -0
- package/src/operations/share-identity.ts +26 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/initializeIdentity.ts +24 -0
- package/src/translations.ts +57 -43
- package/src/types/capabilities.ts +16 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +29 -21
- package/dist/lib/browser/app-graph-builder-ENKIVZWH.mjs +0 -123
- package/dist/lib/browser/app-graph-builder-ENKIVZWH.mjs.map +0 -7
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs +0 -18
- package/dist/lib/browser/chunk-3F2Q2RKC.mjs.map +0 -7
- package/dist/lib/browser/chunk-56EADSTE.mjs +0 -695
- package/dist/lib/browser/chunk-56EADSTE.mjs.map +0 -7
- package/dist/lib/browser/chunk-CAF2COXW.mjs +0 -19
- package/dist/lib/browser/chunk-CAF2COXW.mjs.map +0 -7
- package/dist/lib/browser/chunk-GS3LDHYD.mjs +0 -12
- package/dist/lib/browser/chunk-GS3LDHYD.mjs.map +0 -7
- package/dist/lib/browser/chunk-HLWIF3AW.mjs.map +0 -7
- package/dist/lib/browser/client-F73MIXMT.mjs +0 -43
- package/dist/lib/browser/client-F73MIXMT.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-S3PUYK5Q.mjs +0 -305
- package/dist/lib/browser/intent-resolver-S3PUYK5Q.mjs.map +0 -7
- package/dist/lib/browser/migrations-YJSO7JXY.mjs +0 -23
- package/dist/lib/browser/migrations-YJSO7JXY.mjs.map +0 -7
- package/dist/lib/browser/react-context-QBXCHNH2.mjs +0 -24
- package/dist/lib/browser/react-context-QBXCHNH2.mjs.map +0 -7
- package/dist/lib/browser/react-surface-YON76BFE.mjs +0 -66
- package/dist/lib/browser/react-surface-YON76BFE.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-AMSX6T3B.mjs +0 -25
- package/dist/lib/browser/schema-defs-AMSX6T3B.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-D4XJCLPN.mjs +0 -124
- package/dist/lib/node-esm/app-graph-builder-D4XJCLPN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs +0 -19
- package/dist/lib/node-esm/chunk-IOGTQFLM.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-J6I6JZPI.mjs +0 -696
- package/dist/lib/node-esm/chunk-J6I6JZPI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-JG6AFSFU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs +0 -14
- package/dist/lib/node-esm/chunk-SZLX4BVJ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs +0 -20
- package/dist/lib/node-esm/chunk-UMO3ETDV.mjs.map +0 -7
- package/dist/lib/node-esm/client-A7CNP37P.mjs +0 -44
- package/dist/lib/node-esm/client-A7CNP37P.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-EBJABYM3.mjs +0 -306
- package/dist/lib/node-esm/intent-resolver-EBJABYM3.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-UOEK7HB7.mjs +0 -24
- package/dist/lib/node-esm/migrations-UOEK7HB7.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-JIH7YBFI.mjs +0 -25
- package/dist/lib/node-esm/react-context-JIH7YBFI.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-YKCZF43D.mjs +0 -67
- package/dist/lib/node-esm/react-surface-YKCZF43D.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-4UTKKRTF.mjs +0 -26
- package/dist/lib/node-esm/schema-defs-4UTKKRTF.mjs.map +0 -7
- package/dist/types/src/capabilities/capabilities.d.ts +0 -9
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -8
- package/dist/types/src/components/DevicesContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/JoinDialog.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.d.ts.map +0 -1
- package/dist/types/src/components/ProfileContainer.stories.d.ts +0 -8
- package/dist/types/src/components/ProfileContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts +0 -8
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts +0 -4
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +0 -8
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.d.ts +0 -7
- package/dist/types/src/components/ResetDialog.d.ts.map +0 -1
- package/dist/types/src/components/ResetDialog.stories.d.ts +0 -10
- package/dist/types/src/components/ResetDialog.stories.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -8
- package/dist/types/src/events.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/intent-resolver.ts +0 -251
- package/src/components/DevicesContainer.stories.tsx +0 -50
- package/src/components/JoinDialog.tsx +0 -53
- package/src/components/ProfileContainer.stories.tsx +0 -30
- package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -45
- package/src/components/RecoveryCredentialsContainer.tsx +0 -73
- package/src/components/ResetDialog.stories.tsx +0 -54
- package/src/components/ResetDialog.tsx +0 -49
- package/src/events.ts +0 -15
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Prompt from '@effect/cli/Prompt';
|
|
8
|
+
import * as FileSystem from '@effect/platform/FileSystem';
|
|
9
|
+
import * as Path from '@effect/platform/Path';
|
|
10
|
+
import * as Console from 'effect/Console';
|
|
11
|
+
import * as Effect from 'effect/Effect';
|
|
12
|
+
import * as Option from 'effect/Option';
|
|
13
|
+
|
|
14
|
+
import { CommandConfig } from '@dxos/cli-util';
|
|
15
|
+
import { ConfigService } from '@dxos/config';
|
|
16
|
+
import { log } from '@dxos/log';
|
|
17
|
+
import type { Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
18
|
+
|
|
19
|
+
export const handler = Effect.fn(function* ({
|
|
20
|
+
file,
|
|
21
|
+
dataDir,
|
|
22
|
+
force,
|
|
23
|
+
}: {
|
|
24
|
+
file: string;
|
|
25
|
+
dataDir: Option.Option<string>;
|
|
26
|
+
force: boolean;
|
|
27
|
+
}) {
|
|
28
|
+
const dataDirValue = Option.getOrUndefined(dataDir);
|
|
29
|
+
const { json, profile } = yield* CommandConfig;
|
|
30
|
+
const fs = yield* FileSystem.FileSystem;
|
|
31
|
+
const path = yield* Path.Path;
|
|
32
|
+
const config = yield* ConfigService;
|
|
33
|
+
|
|
34
|
+
const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect.promise(
|
|
35
|
+
() => import('@dxos/client-services'),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
let storageConfig: Runtime.Client.Storage;
|
|
39
|
+
if (!dataDirValue) {
|
|
40
|
+
if (!force) {
|
|
41
|
+
yield* Console.log(`Will overwrite profile: ${profile}`);
|
|
42
|
+
const confirmed = yield* Prompt.confirm({
|
|
43
|
+
message: `Delete all data? (Profile: ${profile})`,
|
|
44
|
+
initial: false,
|
|
45
|
+
}).pipe(Prompt.run);
|
|
46
|
+
if (!confirmed) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
storageConfig = config.values.runtime!.client!.storage!;
|
|
51
|
+
} else {
|
|
52
|
+
const fullPath = path.resolve(dataDirValue);
|
|
53
|
+
yield* Console.log(`Importing into: ${fullPath}`);
|
|
54
|
+
storageConfig = {
|
|
55
|
+
persistent: true,
|
|
56
|
+
dataRoot: fullPath,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (yield* fs.exists(storageConfig.dataRoot!)) {
|
|
61
|
+
log.error('data directory already exists', { path: storageConfig.dataRoot! });
|
|
62
|
+
if (json) {
|
|
63
|
+
yield* Console.log(JSON.stringify({ error: 'Data directory already exists' }, null, 2));
|
|
64
|
+
} else {
|
|
65
|
+
yield* Console.log('Data directory already exists.');
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const data = yield* fs.readFile(file);
|
|
71
|
+
|
|
72
|
+
const archive = decodeProfileArchive(data);
|
|
73
|
+
yield* Console.log(`Importing archive with ${archive.storage.length} entries`);
|
|
74
|
+
|
|
75
|
+
const { storage } = createStorageObjects(storageConfig);
|
|
76
|
+
const level = yield* Effect.tryPromise({
|
|
77
|
+
try: () => createLevel(storageConfig),
|
|
78
|
+
catch: (error) => new Error(`Failed to create level: ${error}`),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
yield* Console.log('Beginning profile import...');
|
|
82
|
+
yield* Effect.tryPromise({
|
|
83
|
+
try: () => importProfileData({ storage, level }, archive),
|
|
84
|
+
catch: (error) => new Error(`Failed to import profile data: ${error}`),
|
|
85
|
+
});
|
|
86
|
+
yield* Console.log('Profile import complete');
|
|
87
|
+
|
|
88
|
+
if (json) {
|
|
89
|
+
yield* Console.log(JSON.stringify({ success: true, profile, entries: archive.storage.length }, null, 2));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export const importCommand = Command.make(
|
|
94
|
+
'import',
|
|
95
|
+
{
|
|
96
|
+
file: Options.text('file').pipe(Options.withDescription('Archive filename.'), Options.withAlias('f')),
|
|
97
|
+
dataDir: Options.text('data-dir').pipe(Options.withDescription('Storage directory.'), Options.optional),
|
|
98
|
+
force: Options.boolean('force', { ifPresent: true }).pipe(Options.withDescription('Skip confirmation prompt.')),
|
|
99
|
+
},
|
|
100
|
+
handler,
|
|
101
|
+
).pipe(Command.withDescription('Import profile.'));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
|
|
7
|
+
import { create } from './create';
|
|
8
|
+
import { del } from './delete';
|
|
9
|
+
import { importCommand } from './import';
|
|
10
|
+
import { inspect } from './inspect';
|
|
11
|
+
import { list } from './list';
|
|
12
|
+
import { reset } from './reset';
|
|
13
|
+
|
|
14
|
+
export const profile = Command.make('profile').pipe(
|
|
15
|
+
Command.withDescription('Profile commands.'),
|
|
16
|
+
Command.withSubcommands([create, del, importCommand, inspect, list, reset]),
|
|
17
|
+
);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as FileSystem from '@effect/platform/FileSystem';
|
|
8
|
+
import * as Console from 'effect/Console';
|
|
9
|
+
import * as Effect from 'effect/Effect';
|
|
10
|
+
|
|
11
|
+
import { CommandConfig, FormBuilder, print } from '@dxos/cli-util';
|
|
12
|
+
import { ProfileArchiveEntryType } from '@dxos/protocols';
|
|
13
|
+
import { arrayToBuffer } from '@dxos/util';
|
|
14
|
+
|
|
15
|
+
export const handler = Effect.fn(function* ({ file, storage }: { file: string; storage: boolean }) {
|
|
16
|
+
const { json } = yield* CommandConfig;
|
|
17
|
+
const fs = yield* FileSystem.FileSystem;
|
|
18
|
+
|
|
19
|
+
const { decodeProfileArchive } = yield* Effect.promise(() => import('@dxos/client-services'));
|
|
20
|
+
|
|
21
|
+
const data = yield* fs.readFile(file);
|
|
22
|
+
|
|
23
|
+
const archive = decodeProfileArchive(data);
|
|
24
|
+
|
|
25
|
+
if (json) {
|
|
26
|
+
yield* Console.log(
|
|
27
|
+
JSON.stringify(
|
|
28
|
+
{
|
|
29
|
+
meta: archive.meta,
|
|
30
|
+
...(storage ? { storage: archive.storage } : {}),
|
|
31
|
+
},
|
|
32
|
+
null,
|
|
33
|
+
2,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
} else {
|
|
37
|
+
const builder = FormBuilder.make({ title: 'Profile Archive' }).pipe(
|
|
38
|
+
FormBuilder.when(
|
|
39
|
+
archive.meta,
|
|
40
|
+
FormBuilder.each(Object.entries(archive.meta ?? {}), ([key, value]) => FormBuilder.set(key, String(value))),
|
|
41
|
+
),
|
|
42
|
+
FormBuilder.build,
|
|
43
|
+
);
|
|
44
|
+
yield* Console.log(print(builder));
|
|
45
|
+
|
|
46
|
+
if (storage) {
|
|
47
|
+
yield* Console.log('\nStorage entries:\n');
|
|
48
|
+
for (const entry of archive.storage) {
|
|
49
|
+
const key =
|
|
50
|
+
typeof entry.key === 'string' ? entry.key : JSON.stringify(arrayToBuffer(entry.key).toString()).slice(1, -1);
|
|
51
|
+
yield* Console.log(` ${ProfileArchiveEntryType[entry.type]} ${key}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const inspect = Command.make(
|
|
58
|
+
'inspect',
|
|
59
|
+
{
|
|
60
|
+
file: Options.text('file').pipe(Options.withDescription('Archive filename.'), Options.withAlias('f')),
|
|
61
|
+
storage: Options.boolean('storage', { ifPresent: true }).pipe(Options.withDescription('List storage entries.')),
|
|
62
|
+
},
|
|
63
|
+
handler,
|
|
64
|
+
).pipe(Command.withDescription('Inspect profile archive.'));
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as FileSystem from '@effect/platform/FileSystem';
|
|
7
|
+
import * as Path from '@effect/platform/Path';
|
|
8
|
+
import * as Console from 'effect/Console';
|
|
9
|
+
import * as Effect from 'effect/Effect';
|
|
10
|
+
import * as Yaml from 'yaml';
|
|
11
|
+
|
|
12
|
+
import { CommandConfig, printList } from '@dxos/cli-util';
|
|
13
|
+
import { Config } from '@dxos/client';
|
|
14
|
+
import { DX_CONFIG, DX_DATA, getProfilePath } from '@dxos/client-protocol';
|
|
15
|
+
|
|
16
|
+
import { printProfile } from './util';
|
|
17
|
+
|
|
18
|
+
export const list = Command.make(
|
|
19
|
+
'list',
|
|
20
|
+
{},
|
|
21
|
+
Effect.fnUntraced(function* () {
|
|
22
|
+
const { profile: currentProfile } = yield* CommandConfig;
|
|
23
|
+
const fs = yield* FileSystem.FileSystem;
|
|
24
|
+
const path = yield* Path.Path;
|
|
25
|
+
const profileDir = path.join(DX_CONFIG, 'profile');
|
|
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) ?? {};
|
|
36
|
+
const config = new Config(configValues);
|
|
37
|
+
return {
|
|
38
|
+
name,
|
|
39
|
+
isCurrent: name === currentProfile,
|
|
40
|
+
fullPath: configPath,
|
|
41
|
+
storagePath: getProfilePath(configValues?.runtime?.client?.storage?.dataRoot ?? DX_DATA, name),
|
|
42
|
+
edge: config.values.runtime?.services?.edge?.url,
|
|
43
|
+
};
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const { json } = yield* CommandConfig;
|
|
48
|
+
if (json) {
|
|
49
|
+
yield* Console.log(JSON.stringify(profiles, null, 2));
|
|
50
|
+
} else {
|
|
51
|
+
const formatted = profiles.map(printProfile);
|
|
52
|
+
yield* Console.log(printList(formatted));
|
|
53
|
+
}
|
|
54
|
+
}),
|
|
55
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Command from '@effect/cli/Command';
|
|
6
|
+
import * as Options from '@effect/cli/Options';
|
|
7
|
+
import * as Prompt from '@effect/cli/Prompt';
|
|
8
|
+
import * as FileSystem from '@effect/platform/FileSystem';
|
|
9
|
+
import * as Console from 'effect/Console';
|
|
10
|
+
import * as Effect from 'effect/Effect';
|
|
11
|
+
|
|
12
|
+
import { CommandConfig, print } from '@dxos/cli-util';
|
|
13
|
+
import { DX_DATA, getProfilePath } from '@dxos/client-protocol';
|
|
14
|
+
import { ConfigService } from '@dxos/config';
|
|
15
|
+
|
|
16
|
+
import { printProfileReset } from './util';
|
|
17
|
+
|
|
18
|
+
export const reset = Command.make(
|
|
19
|
+
'reset',
|
|
20
|
+
{
|
|
21
|
+
force: Options.boolean('force', { ifPresent: true }).pipe(Options.withDescription('Skip confirmation prompt')),
|
|
22
|
+
},
|
|
23
|
+
Effect.fnUntraced(function* ({ force }) {
|
|
24
|
+
const fs = yield* FileSystem.FileSystem;
|
|
25
|
+
const config = yield* ConfigService;
|
|
26
|
+
const { json, profile } = yield* CommandConfig;
|
|
27
|
+
const path = config.values.runtime?.client?.storage?.dataRoot ?? getProfilePath(DX_DATA, profile);
|
|
28
|
+
if (!force) {
|
|
29
|
+
const confirmed = yield* Prompt.confirm({
|
|
30
|
+
message: `Are you sure you want to reset the profile (${profile})?`,
|
|
31
|
+
initial: false,
|
|
32
|
+
});
|
|
33
|
+
if (!confirmed) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
yield* fs.remove(path, { recursive: true });
|
|
39
|
+
if (json) {
|
|
40
|
+
yield* Console.log(JSON.stringify({ profile, reset: true }, null, 2));
|
|
41
|
+
} else {
|
|
42
|
+
yield* Console.log(print(printProfileReset(profile)));
|
|
43
|
+
}
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { FormBuilder } from '@dxos/cli-util';
|
|
6
|
+
|
|
7
|
+
export type ProfileInfo = {
|
|
8
|
+
name: string;
|
|
9
|
+
isCurrent: boolean;
|
|
10
|
+
fullPath: string;
|
|
11
|
+
storagePath: string;
|
|
12
|
+
edge?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Pretty prints profile creation result with ANSI colors.
|
|
17
|
+
*/
|
|
18
|
+
export const printProfileCreated = (name: string, path: string) =>
|
|
19
|
+
FormBuilder.make({ title: 'Profile created' }).pipe(
|
|
20
|
+
FormBuilder.set('name', name),
|
|
21
|
+
FormBuilder.set('path', path),
|
|
22
|
+
FormBuilder.build,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Pretty prints profile deletion result with ANSI colors.
|
|
27
|
+
*/
|
|
28
|
+
export const printProfileDeleted = (name: string) =>
|
|
29
|
+
FormBuilder.make({ title: 'Profile deleted' }).pipe(FormBuilder.set('name', name), FormBuilder.build);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Pretty prints profile reset result with ANSI colors.
|
|
33
|
+
*/
|
|
34
|
+
export const printProfileReset = (profile: string) =>
|
|
35
|
+
FormBuilder.make({ title: 'Profile reset' }).pipe(FormBuilder.set('profile', profile), FormBuilder.build);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Pretty prints a profile with ANSI colors.
|
|
39
|
+
*/
|
|
40
|
+
export const printProfile = (profile: ProfileInfo) => {
|
|
41
|
+
const title = profile.isCurrent ? `${profile.name} (current)` : profile.name;
|
|
42
|
+
return FormBuilder.make({ title }).pipe(
|
|
43
|
+
FormBuilder.set('fullPath', profile.fullPath),
|
|
44
|
+
FormBuilder.set('storagePath', profile.storagePath),
|
|
45
|
+
FormBuilder.set('edge', profile.edge ?? '<none>'),
|
|
46
|
+
FormBuilder.build,
|
|
47
|
+
);
|
|
48
|
+
};
|
package/src/cli/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { Client, OperationHandler, SchemaDefs } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
import { ClientEvents } from '#types';
|
|
11
|
+
import { type ClientPluginOptions } from '#types';
|
|
12
|
+
|
|
13
|
+
import { config, device, edge, halo, profile } from './commands';
|
|
14
|
+
|
|
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 }),
|
|
19
|
+
Plugin.addModule((options) => ({
|
|
20
|
+
id: Capability.getModuleTag(Client),
|
|
21
|
+
activatesOn: ActivationEvents.Startup,
|
|
22
|
+
firesAfterActivation: [ClientEvents.ClientReady],
|
|
23
|
+
activate: () => Client(options),
|
|
24
|
+
})),
|
|
25
|
+
Plugin.addModule({
|
|
26
|
+
activatesOn: ClientEvents.ClientReady,
|
|
27
|
+
firesBeforeActivation: [AppActivationEvents.SetupSchema],
|
|
28
|
+
activate: SchemaDefs,
|
|
29
|
+
}),
|
|
30
|
+
Plugin.make,
|
|
31
|
+
);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Console from 'effect/Console';
|
|
6
|
+
import * as Context from 'effect/Context';
|
|
7
|
+
import * as Effect from 'effect/Effect';
|
|
8
|
+
import * as Layer from 'effect/Layer';
|
|
9
|
+
import { inspect } from 'node:util';
|
|
10
|
+
|
|
11
|
+
function logToString(...args: any[]): string {
|
|
12
|
+
return args
|
|
13
|
+
.map((arg) => {
|
|
14
|
+
if (typeof arg === 'string') {
|
|
15
|
+
return arg;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return inspect(arg, { colors: false, depth: null });
|
|
19
|
+
})
|
|
20
|
+
.join(' ');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
class TestConsoleService {
|
|
24
|
+
private _logs: Array<{ level: string; args: unknown; message: string }> = [];
|
|
25
|
+
|
|
26
|
+
readonly console: Console.Console;
|
|
27
|
+
|
|
28
|
+
constructor(console: Console.Console) {
|
|
29
|
+
const pusher =
|
|
30
|
+
(level: string) =>
|
|
31
|
+
(...args: readonly any[]) => {
|
|
32
|
+
this._logs.push({ level, args, message: logToString(...args) });
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
this.console = {
|
|
36
|
+
...console,
|
|
37
|
+
log: (...args: readonly any[]) => Effect.sync(() => pusher('log')(...args)),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get logs() {
|
|
42
|
+
return [...this._logs];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
clear() {
|
|
46
|
+
this._logs.length = 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// TODO(burdon): We could have a single namespace "Testing" with all test utilities.
|
|
51
|
+
export namespace TestConsole {
|
|
52
|
+
export class TestConsole extends Context.Tag('TestConsole')<TestConsole, TestConsoleService>() {}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Extract JSON string from log arguments.
|
|
56
|
+
* Handles both array and string argument formats.
|
|
57
|
+
*/
|
|
58
|
+
export const extractJsonString = (log: { args: unknown }): string => {
|
|
59
|
+
if (Array.isArray(log.args) && log.args.length > 0) {
|
|
60
|
+
return String(log.args[0]);
|
|
61
|
+
}
|
|
62
|
+
return log.args as string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Parse JSON from log arguments.
|
|
67
|
+
* Handles both array and string argument formats.
|
|
68
|
+
*/
|
|
69
|
+
export const parseJson = <T = unknown>(log: { args: unknown }): T => {
|
|
70
|
+
const jsonString = extractJsonString(log);
|
|
71
|
+
return JSON.parse(jsonString) as T;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const testConsole = Layer.effect(
|
|
75
|
+
TestConsole,
|
|
76
|
+
Effect.gen(function* () {
|
|
77
|
+
return new TestConsoleService(yield* Effect.console);
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const setConsole = Effect.gen(function* () {
|
|
82
|
+
const { console } = yield* TestConsole;
|
|
83
|
+
return Console.setConsole(console);
|
|
84
|
+
}).pipe(Layer.unwrapEffect);
|
|
85
|
+
|
|
86
|
+
export const layer = Layer.provideMerge(setConsole, testConsole);
|
|
87
|
+
}
|
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
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
|
|
8
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
9
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
+
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
11
|
+
import { translations as shellTranslations } from '@dxos/shell/react';
|
|
12
|
+
|
|
13
|
+
import { initializeIdentity } from '#testing';
|
|
14
|
+
|
|
15
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
16
|
+
import { translations } from '../../translations';
|
|
17
|
+
import { DevicesContainer } from './DevicesContainer';
|
|
18
|
+
|
|
19
|
+
const meta = {
|
|
20
|
+
title: 'plugins/plugin-client/containers/DevicesContainer',
|
|
21
|
+
component: DevicesContainer,
|
|
22
|
+
decorators: [
|
|
23
|
+
withTheme(),
|
|
24
|
+
withLayout({ layout: 'fullscreen' }),
|
|
25
|
+
withPluginManager({
|
|
26
|
+
plugins: [
|
|
27
|
+
ClientPlugin({
|
|
28
|
+
onClientInitialized: ({ client }) =>
|
|
29
|
+
Effect.gen(function* () {
|
|
30
|
+
yield* initializeIdentity(client);
|
|
31
|
+
}),
|
|
32
|
+
}),
|
|
33
|
+
OperationPlugin(),
|
|
34
|
+
RuntimePlugin(),
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
38
|
+
parameters: {
|
|
39
|
+
layout: 'fullscreen',
|
|
40
|
+
translations: [...translations, ...shellTranslations],
|
|
41
|
+
},
|
|
42
|
+
} satisfies Meta<typeof DevicesContainer>;
|
|
43
|
+
|
|
44
|
+
export default meta;
|
|
45
|
+
|
|
46
|
+
type Story = StoryObj<typeof meta>;
|
|
47
|
+
|
|
48
|
+
export const Default: Story = {
|
|
49
|
+
args: {
|
|
50
|
+
createInvitationUrl: () => 'https://example.com',
|
|
51
|
+
},
|
|
52
|
+
};
|