@dxos/plugin-client 0.8.4-main.fd6878d → 0.8.4-staging.60fe92afc8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/AccountContainer-FZ3IC6H4.mjs +182 -0
- package/dist/lib/neutral/AccountContainer-FZ3IC6H4.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.mjs +72 -0
- package/dist/lib/neutral/ClientPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs +1049 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/ClientPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs +262 -0
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs.map +7 -0
- package/dist/lib/neutral/InvitationsContainer-ME722VKS.mjs +132 -0
- package/dist/lib/neutral/InvitationsContainer-ME722VKS.mjs.map +7 -0
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs +53 -0
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs.map +7 -0
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs +168 -0
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs.map +7 -0
- package/dist/lib/neutral/RecoveryCodeDialog-EWHB6U5T.mjs +59 -0
- package/dist/lib/neutral/RecoveryCodeDialog-EWHB6U5T.mjs.map +7 -0
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs +51 -0
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs.map +7 -0
- package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs +57 -0
- package/dist/lib/neutral/ResetDialog-KUWX45JY.mjs.map +7 -0
- package/dist/lib/neutral/account-cache-4EKGEUJI.mjs +43 -0
- package/dist/lib/neutral/account-cache-4EKGEUJI.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-A74W7C36.mjs +145 -0
- package/dist/lib/neutral/app-graph-builder-A74W7C36.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +34 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +21 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-D6HPCLTS.mjs +185 -0
- package/dist/lib/neutral/chunk-D6HPCLTS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-JEF2FQGB.mjs +27 -0
- package/dist/lib/neutral/chunk-JEF2FQGB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JOCCVODY.mjs +21 -0
- package/dist/lib/neutral/chunk-JOCCVODY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NTVDGDQ3.mjs +8 -0
- package/dist/lib/neutral/chunk-NTVDGDQ3.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TUK3ELUU.mjs +135 -0
- package/dist/lib/neutral/chunk-TUK3ELUU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-WWCVZG3K.mjs +13 -0
- package/dist/lib/neutral/chunk-WWCVZG3K.mjs.map +7 -0
- package/dist/lib/neutral/client-7I5Y5SOA.mjs +62 -0
- package/dist/lib/neutral/client-7I5Y5SOA.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +1 -0
- package/dist/lib/neutral/containers/index.mjs +23 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-agent-6HLW4D3A.mjs +26 -0
- package/dist/lib/neutral/create-agent-6HLW4D3A.mjs.map +7 -0
- package/dist/lib/neutral/create-identity-JIWAR5GW.mjs +42 -0
- package/dist/lib/neutral/create-identity-JIWAR5GW.mjs.map +7 -0
- package/dist/lib/neutral/create-passkey-FOXEMXGF.mjs +81 -0
- package/dist/lib/neutral/create-passkey-FOXEMXGF.mjs.map +7 -0
- package/dist/lib/neutral/create-recovery-code-ZWDKLPH4.mjs +36 -0
- package/dist/lib/neutral/create-recovery-code-ZWDKLPH4.mjs.map +7 -0
- package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs +19 -0
- package/dist/lib/neutral/hub-http-client-WOJUCDKV.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +23 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/join-identity-QEQFAE2S.mjs +27 -0
- package/dist/lib/neutral/join-identity-QEQFAE2S.mjs.map +7 -0
- package/dist/lib/neutral/layer-specs-CQLXQBQJ.mjs +61 -0
- package/dist/lib/neutral/layer-specs-CQLXQBQJ.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/migrations-7FTW55ER.mjs +23 -0
- package/dist/lib/neutral/migrations-7FTW55ER.mjs.map +7 -0
- package/dist/lib/neutral/navigation-handler-LU26CDFR.mjs +46 -0
- package/dist/lib/neutral/navigation-handler-LU26CDFR.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs +13 -0
- package/dist/lib/neutral/operation-handler-E3HB7E2T.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +12 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +17 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-context-B5LXMHVM.mjs +23 -0
- package/dist/lib/neutral/react-context-B5LXMHVM.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-DEKGWTCD.mjs +70 -0
- package/dist/lib/neutral/react-surface-DEKGWTCD.mjs.map +7 -0
- package/dist/lib/neutral/recover-identity-JNFKLCUD.mjs +26 -0
- package/dist/lib/neutral/recover-identity-JNFKLCUD.mjs.map +7 -0
- package/dist/lib/neutral/redeem-passkey-4SBAI4AG.mjs +66 -0
- package/dist/lib/neutral/redeem-passkey-4SBAI4AG.mjs.map +7 -0
- package/dist/lib/neutral/redeem-token-POBD6TMN.mjs +29 -0
- package/dist/lib/neutral/redeem-token-POBD6TMN.mjs.map +7 -0
- package/dist/lib/neutral/reset-storage-LQKUV5RA.mjs +26 -0
- package/dist/lib/neutral/reset-storage-LQKUV5RA.mjs.map +7 -0
- package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs +51 -0
- package/dist/lib/neutral/schema-defs-IHBCKTMM.mjs.map +7 -0
- package/dist/lib/neutral/share-identity-KNQ2XNXV.mjs +31 -0
- package/dist/lib/neutral/share-identity-KNQ2XNXV.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +25 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +101 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +14 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/ClientPlugin.d.ts +4 -2
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/ClientPlugin.node.d.ts +5 -0
- package/dist/types/src/ClientPlugin.node.d.ts.map +1 -0
- package/dist/types/src/ClientPlugin.test.d.ts +2 -0
- package/dist/types/src/ClientPlugin.test.d.ts.map +1 -0
- package/dist/types/src/ClientPlugin.workerd.d.ts +4 -0
- package/dist/types/src/ClientPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/account-cache.d.ts +35 -0
- package/dist/types/src/capabilities/account-cache.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +6 -7
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/hub-http-client.d.ts +6 -0
- package/dist/types/src/capabilities/hub-http-client.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +61 -15
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/layer-specs.d.ts +6 -0
- package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -0
- 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 +26 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +4 -2
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +4 -3
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +3 -2
- package/dist/types/src/capabilities/schema-defs.d.ts.map +1 -1
- package/dist/types/src/commands/config/index.d.ts +5 -0
- package/dist/types/src/commands/config/index.d.ts.map +1 -0
- package/dist/types/src/commands/config/view.d.ts +5 -0
- package/dist/types/src/commands/config/view.d.ts.map +1 -0
- package/dist/types/src/commands/device/index.d.ts +7 -0
- package/dist/types/src/commands/device/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/index.d.ts +2 -0
- package/dist/types/src/commands/device/info/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/info.d.ts +7 -0
- package/dist/types/src/commands/device/info/info.d.ts.map +1 -0
- package/dist/types/src/commands/device/info/info.test.d.ts +2 -0
- package/dist/types/src/commands/device/info/info.test.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/index.d.ts +2 -0
- package/dist/types/src/commands/device/list/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/list.d.ts +7 -0
- package/dist/types/src/commands/device/list/list.d.ts.map +1 -0
- package/dist/types/src/commands/device/list/list.test.d.ts +2 -0
- package/dist/types/src/commands/device/list/list.test.d.ts.map +1 -0
- package/dist/types/src/commands/device/update/index.d.ts +2 -0
- package/dist/types/src/commands/device/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/device/update/update.d.ts +11 -0
- package/dist/types/src/commands/device/update/update.d.ts.map +1 -0
- package/dist/types/src/commands/device/util.d.ts +16 -0
- package/dist/types/src/commands/device/util.d.ts.map +1 -0
- package/dist/types/src/commands/edge/index.d.ts +5 -0
- package/dist/types/src/commands/edge/index.d.ts.map +1 -0
- package/dist/types/src/commands/edge/status.d.ts +7 -0
- package/dist/types/src/commands/edge/status.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/create.d.ts +15 -0
- package/dist/types/src/commands/halo/create/create.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/create.test.d.ts +2 -0
- package/dist/types/src/commands/halo/create/create.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/create/index.d.ts +2 -0
- package/dist/types/src/commands/halo/create/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts +13 -0
- package/dist/types/src/commands/halo/credential/add/add.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/add/index.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/add/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/index.d.ts +12 -0
- package/dist/types/src/commands/halo/credential/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/index.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/list/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/list.d.ts +19 -0
- package/dist/types/src/commands/halo/credential/list/list.d.ts.map +1 -0
- package/dist/types/src/commands/halo/credential/list/list.test.d.ts +2 -0
- package/dist/types/src/commands/halo/credential/list/list.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/identity.d.ts +7 -0
- package/dist/types/src/commands/halo/identity/identity.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/identity.test.d.ts +2 -0
- package/dist/types/src/commands/halo/identity/identity.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/identity/index.d.ts +2 -0
- package/dist/types/src/commands/halo/identity/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/index.d.ts +3 -0
- package/dist/types/src/commands/halo/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/index.d.ts +2 -0
- package/dist/types/src/commands/halo/join/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.d.ts +8 -0
- package/dist/types/src/commands/halo/join/join.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.test.d.ts +2 -0
- package/dist/types/src/commands/halo/join/join.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/index.d.ts +2 -0
- package/dist/types/src/commands/halo/keys/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/keys.d.ts +7 -0
- package/dist/types/src/commands/halo/keys/keys.d.ts.map +1 -0
- package/dist/types/src/commands/halo/keys/keys.test.d.ts +2 -0
- package/dist/types/src/commands/halo/keys/keys.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/index.d.ts +2 -0
- package/dist/types/src/commands/halo/recover/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/recover.d.ts +7 -0
- package/dist/types/src/commands/halo/recover/recover.d.ts.map +1 -0
- package/dist/types/src/commands/halo/recover/recover.test.d.ts +2 -0
- package/dist/types/src/commands/halo/recover/recover.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/seed/index.d.ts +2 -0
- package/dist/types/src/commands/halo/seed/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/seed/seed.d.ts +7 -0
- package/dist/types/src/commands/halo/seed/seed.d.ts.map +1 -0
- package/dist/types/src/commands/halo/share/index.d.ts +2 -0
- package/dist/types/src/commands/halo/share/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/share/share.d.ts +15 -0
- package/dist/types/src/commands/halo/share/share.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/index.d.ts +2 -0
- package/dist/types/src/commands/halo/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/update.d.ts +11 -0
- package/dist/types/src/commands/halo/update/update.d.ts.map +1 -0
- package/dist/types/src/commands/halo/update/update.test.d.ts +2 -0
- package/dist/types/src/commands/halo/update/update.test.d.ts.map +1 -0
- package/dist/types/src/commands/halo/util.d.ts +10 -0
- package/dist/types/src/commands/halo/util.d.ts.map +1 -0
- package/dist/types/src/commands/index.d.ts +6 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/commands/profile/create.d.ts +10 -0
- package/dist/types/src/commands/profile/create.d.ts.map +1 -0
- package/dist/types/src/commands/profile/delete.d.ts +8 -0
- package/dist/types/src/commands/profile/delete.d.ts.map +1 -0
- package/dist/types/src/commands/profile/import.d.ts +17 -0
- package/dist/types/src/commands/profile/import.d.ts.map +1 -0
- package/dist/types/src/commands/profile/index.d.ts +19 -0
- package/dist/types/src/commands/profile/index.d.ts.map +1 -0
- package/dist/types/src/commands/profile/inspect.d.ts +13 -0
- package/dist/types/src/commands/profile/inspect.d.ts.map +1 -0
- package/dist/types/src/commands/profile/list.d.ts +6 -0
- package/dist/types/src/commands/profile/list.d.ts.map +1 -0
- package/dist/types/src/commands/profile/reset.d.ts +8 -0
- package/dist/types/src/commands/profile/reset.d.ts.map +1 -0
- package/dist/types/src/commands/profile/util.d.ts +24 -0
- package/dist/types/src/commands/profile/util.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -6
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +5 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts +3 -0
- package/dist/types/src/containers/AccountContainer/AccountContainer.d.ts.map +1 -0
- package/dist/types/src/containers/AccountContainer/index.d.ts +2 -0
- package/dist/types/src/containers/AccountContainer/index.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/containers/InvitationsContainer/InvitationsContainer.d.ts +3 -0
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts.map +1 -0
- package/dist/types/src/containers/InvitationsContainer/index.d.ts +2 -0
- package/dist/types/src/containers/InvitationsContainer/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 +14 -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 +12 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -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/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/state/account-cache.d.ts +42 -0
- package/dist/types/src/state/account-cache.d.ts.map +1 -0
- package/dist/types/src/state/use-hub-http.d.ts +8 -0
- package/dist/types/src/state/use-hub-http.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +3 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts +14 -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 +43 -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 +56 -34
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +134 -54
- package/src/ClientPlugin.node.ts +42 -0
- package/src/ClientPlugin.test.ts +29 -0
- package/src/ClientPlugin.ts +73 -64
- package/src/ClientPlugin.workerd.ts +16 -0
- package/src/capabilities/account-cache.ts +25 -0
- package/src/capabilities/app-graph-builder.ts +104 -103
- package/src/capabilities/client.ts +67 -30
- package/src/capabilities/hub-http-client.ts +21 -0
- package/src/capabilities/index.ts +17 -10
- package/src/capabilities/layer-specs.ts +92 -0
- 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 +21 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-context.tsx +17 -13
- package/src/capabilities/react-surface.tsx +64 -49
- package/src/capabilities/schema-defs.ts +52 -25
- package/src/commands/config/index.ts +12 -0
- package/src/commands/config/view.ts +29 -0
- package/src/commands/device/index.ts +14 -0
- package/src/commands/device/info/index.ts +5 -0
- package/src/commands/device/info/info.test.ts +28 -0
- package/src/commands/device/info/info.ts +48 -0
- package/src/commands/device/list/index.ts +5 -0
- package/src/commands/device/list/list.test.ts +30 -0
- package/src/commands/device/list/list.ts +28 -0
- package/src/commands/device/update/index.ts +5 -0
- package/src/commands/device/update/update.ts +68 -0
- package/src/commands/device/util.ts +55 -0
- package/src/commands/edge/index.ts +12 -0
- package/src/commands/edge/status.ts +46 -0
- package/src/commands/halo/create/create.test.ts +53 -0
- package/src/commands/halo/create/create.ts +82 -0
- package/src/commands/halo/create/index.ts +5 -0
- package/src/commands/halo/credential/add/add.ts +97 -0
- package/src/commands/halo/credential/add/index.ts +5 -0
- package/src/commands/halo/credential/index.ts +13 -0
- package/src/commands/halo/credential/list/index.ts +5 -0
- package/src/commands/halo/credential/list/list.test.ts +27 -0
- package/src/commands/halo/credential/list/list.ts +115 -0
- package/src/commands/halo/identity/identity.test.ts +40 -0
- package/src/commands/halo/identity/identity.ts +45 -0
- package/src/commands/halo/identity/index.ts +5 -0
- package/src/commands/halo/index.ts +21 -0
- package/src/commands/halo/join/index.ts +5 -0
- package/src/commands/halo/join/join.test.ts +10 -0
- package/src/commands/halo/join/join.ts +87 -0
- package/src/commands/halo/keys/index.ts +5 -0
- package/src/commands/halo/keys/keys.test.ts +29 -0
- package/src/commands/halo/keys/keys.ts +40 -0
- package/src/commands/halo/recover/index.ts +5 -0
- package/src/commands/halo/recover/recover.test.ts +10 -0
- package/src/commands/halo/recover/recover.ts +44 -0
- package/src/commands/halo/seed/index.ts +5 -0
- package/src/commands/halo/seed/seed.ts +36 -0
- package/src/commands/halo/share/index.ts +5 -0
- package/src/commands/halo/share/share.ts +97 -0
- package/src/commands/halo/update/index.ts +5 -0
- package/src/commands/halo/update/update.test.ts +28 -0
- package/src/commands/halo/update/update.ts +67 -0
- package/src/commands/halo/util.ts +15 -0
- package/src/commands/index.ts +9 -0
- package/src/commands/profile/create.ts +90 -0
- package/src/commands/profile/delete.ts +36 -0
- package/src/commands/profile/import.ts +101 -0
- package/src/commands/profile/index.ts +17 -0
- package/src/commands/profile/inspect.ts +64 -0
- package/src/commands/profile/list.ts +55 -0
- package/src/commands/profile/reset.ts +45 -0
- package/src/commands/profile/util.ts +48 -0
- package/src/components/index.ts +0 -7
- package/src/constants.ts +11 -0
- package/src/containers/AccountContainer/AccountContainer.tsx +179 -0
- package/src/containers/AccountContainer/index.ts +5 -0
- package/src/containers/DevicesContainer/DevicesContainer.stories.tsx +51 -0
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +91 -110
- package/src/containers/DevicesContainer/index.ts +5 -0
- package/src/containers/InvitationsContainer/InvitationsContainer.tsx +137 -0
- package/src/containers/InvitationsContainer/index.ts +5 -0
- package/src/containers/JoinDialog/JoinDialog.stories.tsx +43 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +56 -0
- package/src/containers/JoinDialog/index.ts +5 -0
- package/src/containers/ProfileContainer/ProfileContainer.stories.tsx +28 -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 -11
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +29 -28
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +46 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +66 -0
- package/src/containers/RecoveryCredentialsContainer/index.ts +5 -0
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +73 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +62 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +17 -0
- package/src/index.ts +3 -5
- package/src/meta.ts +12 -6
- package/src/operations/create-agent.ts +26 -0
- package/src/operations/create-identity.ts +37 -0
- package/src/operations/create-passkey.ts +88 -0
- package/src/operations/create-recovery-code.ts +34 -0
- package/src/operations/definitions.ts +115 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/join-identity.ts +28 -0
- package/src/operations/recover-identity.ts +28 -0
- package/src/operations/redeem-passkey.ts +85 -0
- package/src/operations/redeem-token.ts +31 -0
- package/src/operations/reset-storage.ts +27 -0
- package/src/operations/share-identity.ts +26 -0
- package/src/plugin.ts +11 -0
- package/src/state/account-cache.ts +33 -0
- package/src/state/use-hub-http.ts +32 -0
- package/src/testing/index.ts +6 -0
- package/src/testing/initializeIdentity.ts +30 -0
- package/src/translations.ts +89 -44
- package/src/types/capabilities.ts +23 -0
- package/src/types/events.ts +15 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +34 -23
- 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 +0 -110
- 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/index.mjs +0 -152
- package/dist/lib/browser/index.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/meta.json +0 -1
- 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/browser/types/index.mjs +0 -10
- 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 +0 -111
- 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/index.mjs +0 -153
- package/dist/lib/node-esm/index.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/meta.json +0 -1
- 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/lib/node-esm/types/index.mjs +0 -11
- package/dist/types/src/capabilities/capabilities.d.ts +0 -9
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -8
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts +0 -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/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/types → neutral/components}/index.mjs.map +0 -0
- /package/dist/types/src/{components → containers/DevicesContainer}/DevicesContainer.d.ts +0 -0
- /package/dist/types/src/{components → containers/ProfileContainer}/ProfileContainer.d.ts +0 -0
|
@@ -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/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,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { DXN } from '@dxos/keys';
|
|
6
|
+
|
|
7
|
+
import { meta } from '#meta';
|
|
8
|
+
|
|
9
|
+
export const JOIN_DIALOG = DXN.make(`${meta.id}.joinDialog`);
|
|
10
|
+
export const RECOVERY_CODE_DIALOG = DXN.make(`${meta.id}.recoveryCodeDialog`);
|
|
11
|
+
export const RESET_DIALOG = DXN.make(`${meta.id}.resetDialog`);
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { useAtom, useAtomSet } from '@effect-atom/atom-react';
|
|
6
|
+
import React, { type FormEvent, useCallback, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
import { useCapability, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
|
+
import { LayoutOperation } from '@dxos/app-toolkit';
|
|
10
|
+
import { Context } from '@dxos/context';
|
|
11
|
+
import { createDidFromIdentityKey } from '@dxos/credentials';
|
|
12
|
+
import { useIdentity } from '@dxos/react-client/halo';
|
|
13
|
+
import { Button, Icon, IconButton, Input, Message, useAsyncEffect, useTranslation } from '@dxos/react-ui';
|
|
14
|
+
import { Settings } from '@dxos/react-ui-form';
|
|
15
|
+
|
|
16
|
+
import { meta } from '#meta';
|
|
17
|
+
import { ClientCapabilities } from '#types';
|
|
18
|
+
|
|
19
|
+
import { RESET_DIALOG } from '../../constants';
|
|
20
|
+
import { useHubHttpClient } from '../../state/use-hub-http';
|
|
21
|
+
|
|
22
|
+
type AccountState = 'loading' | 'present' | 'missing' | 'error';
|
|
23
|
+
|
|
24
|
+
export const AccountContainer = () => {
|
|
25
|
+
const { t } = useTranslation(meta.id);
|
|
26
|
+
const identity = useIdentity();
|
|
27
|
+
const { invokePromise } = useOperationInvoker();
|
|
28
|
+
const accountCacheAtom = useCapability(ClientCapabilities.AccountCache);
|
|
29
|
+
const [cache] = useAtom(accountCacheAtom);
|
|
30
|
+
const setCache = useAtomSet(accountCacheAtom);
|
|
31
|
+
const [resendStatus, setResendStatus] = useState<string | null>(null);
|
|
32
|
+
const [accountState, setAccountState] = useState<AccountState>(cache.account ? 'present' : 'loading');
|
|
33
|
+
const [requestEmail, setRequestEmail] = useState('');
|
|
34
|
+
const [requestSubmitted, setRequestSubmitted] = useState(false);
|
|
35
|
+
|
|
36
|
+
// Single shared instance keeps the VP-auth handshake (request → 401 → signed
|
|
37
|
+
// retry) at one round-trip per session instead of one per panel.
|
|
38
|
+
const hubHttp = useHubHttpClient();
|
|
39
|
+
|
|
40
|
+
useAsyncEffect(async () => {
|
|
41
|
+
if (!hubHttp) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const account = await hubHttp.getAccount(new Context());
|
|
46
|
+
setCache((prev) => ({ ...prev, account, fetchedAt: Date.now() }));
|
|
47
|
+
setAccountState('present');
|
|
48
|
+
} catch (err: any) {
|
|
49
|
+
if (err?.data?.type === 'no_account') {
|
|
50
|
+
setCache((prev) => ({ ...prev, account: undefined, fetchedAt: Date.now() }));
|
|
51
|
+
setAccountState('missing');
|
|
52
|
+
} else {
|
|
53
|
+
setAccountState((prev) => (prev === 'present' ? 'present' : 'error'));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}, [hubHttp, setCache]);
|
|
57
|
+
|
|
58
|
+
const handleResend = useCallback(async () => {
|
|
59
|
+
if (!hubHttp) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
const result = await hubHttp.resendVerificationEmail(new Context());
|
|
64
|
+
if (result.sent) {
|
|
65
|
+
setResendStatus(t('verification-sent.message'));
|
|
66
|
+
} else if (result.cooldownSecondsRemaining) {
|
|
67
|
+
setResendStatus(t('verification-cooldown.message', { seconds: result.cooldownSecondsRemaining }));
|
|
68
|
+
} else {
|
|
69
|
+
setResendStatus(t('verification-failed.message'));
|
|
70
|
+
}
|
|
71
|
+
} catch {
|
|
72
|
+
setResendStatus(t('verification-failed.message'));
|
|
73
|
+
}
|
|
74
|
+
}, [hubHttp, t]);
|
|
75
|
+
|
|
76
|
+
const handleRequestAccess = useCallback(
|
|
77
|
+
async (event: FormEvent<HTMLFormElement>) => {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
const email = requestEmail.trim();
|
|
80
|
+
if (!email || !hubHttp) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
const identityDid = identity ? await createDidFromIdentityKey(identity.identityKey) : undefined;
|
|
85
|
+
await hubHttp.requestAccess(new Context(), { email, identityDid });
|
|
86
|
+
} catch {
|
|
87
|
+
// Surface a generic confirmation; failure details would leak signal.
|
|
88
|
+
}
|
|
89
|
+
setRequestSubmitted(true);
|
|
90
|
+
},
|
|
91
|
+
[hubHttp, identity, requestEmail],
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
// Opens the standard reset confirmation dialog. The `onBeforeReset` hook
|
|
95
|
+
// deletes the hub account first; if that fails the reset is aborted so the
|
|
96
|
+
// local identity is not wiped while the server record remains.
|
|
97
|
+
const handleDeleteAccount = useCallback(() => {
|
|
98
|
+
if (!hubHttp) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
void invokePromise(LayoutOperation.UpdateDialog, {
|
|
102
|
+
subject: RESET_DIALOG,
|
|
103
|
+
blockAlign: 'start',
|
|
104
|
+
props: {
|
|
105
|
+
mode: 'reset-storage',
|
|
106
|
+
onBeforeReset: async () => {
|
|
107
|
+
await hubHttp.deleteAccount(new Context());
|
|
108
|
+
setCache(() => ({}));
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
}, [hubHttp, invokePromise, setCache]);
|
|
113
|
+
|
|
114
|
+
const account = cache.account;
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<Settings.Viewport>
|
|
118
|
+
<Settings.Section title={t('account-section.title')} description={t('account-section.description')}>
|
|
119
|
+
{accountState === 'loading' ? null : accountState === 'missing' ? (
|
|
120
|
+
<>
|
|
121
|
+
<Message.Root valence='warning'>
|
|
122
|
+
<Message.Title icon='ph--warning--duotone'>{t('no-edge-access.title')}</Message.Title>
|
|
123
|
+
<Message.Content>{t('no-edge-access.description')}</Message.Content>
|
|
124
|
+
</Message.Root>
|
|
125
|
+
<Settings.Item title={t('request-access.label')} description={t('request-access.description')}>
|
|
126
|
+
{requestSubmitted ? (
|
|
127
|
+
<span className='text-sm text-description'>{t('access-request-submitted.message')}</span>
|
|
128
|
+
) : (
|
|
129
|
+
<form onSubmit={handleRequestAccess} className='flex gap-2 items-center justify-end'>
|
|
130
|
+
<Input.Root>
|
|
131
|
+
<Input.TextInput
|
|
132
|
+
type='email'
|
|
133
|
+
required
|
|
134
|
+
placeholder={t('access-request-email.placeholder')}
|
|
135
|
+
value={requestEmail}
|
|
136
|
+
onChange={(event) => setRequestEmail(event.target.value)}
|
|
137
|
+
classNames='min-w-64'
|
|
138
|
+
/>
|
|
139
|
+
</Input.Root>
|
|
140
|
+
<Button type='submit' density='sm'>
|
|
141
|
+
{t('request-access.label')}
|
|
142
|
+
</Button>
|
|
143
|
+
</form>
|
|
144
|
+
)}
|
|
145
|
+
</Settings.Item>
|
|
146
|
+
</>
|
|
147
|
+
) : accountState === 'error' && !account ? (
|
|
148
|
+
<Message.Root valence='error'>
|
|
149
|
+
<Message.Title icon='ph--cloud-x--duotone'>{t('account-offline.title')}</Message.Title>
|
|
150
|
+
<Message.Content>{t('account-offline.description')}</Message.Content>
|
|
151
|
+
</Message.Root>
|
|
152
|
+
) : account ? (
|
|
153
|
+
<>
|
|
154
|
+
<Settings.Item title={t('email.label')} description={account.email}>
|
|
155
|
+
{account.emailVerified ? (
|
|
156
|
+
<Icon icon='ph--check-circle--duotone' size={5} classNames='text-success-text justify-self-end' />
|
|
157
|
+
) : (
|
|
158
|
+
<div className='flex flex-col gap-1 items-end'>
|
|
159
|
+
<IconButton
|
|
160
|
+
icon='ph--paper-plane-tilt--regular'
|
|
161
|
+
label={t('resend-verification.label')}
|
|
162
|
+
onClick={handleResend}
|
|
163
|
+
density='sm'
|
|
164
|
+
/>
|
|
165
|
+
{resendStatus ? <span className='text-xs text-description'>{resendStatus}</span> : null}
|
|
166
|
+
</div>
|
|
167
|
+
)}
|
|
168
|
+
</Settings.Item>
|
|
169
|
+
<Settings.Item title={t('delete-account.label')} description={t('delete-account.description')}>
|
|
170
|
+
<Button variant='destructive' density='sm' onClick={handleDeleteAccount}>
|
|
171
|
+
{t('delete-account.label')}
|
|
172
|
+
</Button>
|
|
173
|
+
</Settings.Item>
|
|
174
|
+
</>
|
|
175
|
+
) : null}
|
|
176
|
+
</Settings.Section>
|
|
177
|
+
</Settings.Viewport>
|
|
178
|
+
);
|
|
179
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
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 { ProcessManagerPlugin } 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
|
+
import { translations } from '#translations';
|
|
15
|
+
|
|
16
|
+
import { ClientPlugin } from '../../ClientPlugin';
|
|
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
|
+
ProcessManagerPlugin(),
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
],
|
|
37
|
+
parameters: {
|
|
38
|
+
layout: 'fullscreen',
|
|
39
|
+
translations: [...translations, ...shellTranslations],
|
|
40
|
+
},
|
|
41
|
+
} satisfies Meta<typeof DevicesContainer>;
|
|
42
|
+
|
|
43
|
+
export default meta;
|
|
44
|
+
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
|
|
47
|
+
export const Default: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
createInvitationUrl: () => 'https://example.com',
|
|
50
|
+
},
|
|
51
|
+
};
|