@dxos/plugin-client 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae
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/DevicesContainer-46MEG3F5.mjs +268 -0
- package/dist/lib/browser/DevicesContainer-46MEG3F5.mjs.map +7 -0
- package/dist/lib/browser/JoinDialog-2RCYK4O5.mjs +59 -0
- package/dist/lib/browser/JoinDialog-2RCYK4O5.mjs.map +7 -0
- package/dist/lib/browser/ProfileContainer-XYRCOQ5I.mjs +171 -0
- package/dist/lib/browser/ProfileContainer-XYRCOQ5I.mjs.map +7 -0
- package/dist/lib/browser/RecoveryCodeDialog-EX2CLFND.mjs +60 -0
- package/dist/lib/browser/RecoveryCodeDialog-EX2CLFND.mjs.map +7 -0
- package/dist/lib/browser/RecoveryCredentialsContainer-RWTEIHOB.mjs +57 -0
- package/dist/lib/browser/RecoveryCredentialsContainer-RWTEIHOB.mjs.map +7 -0
- package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs +52 -0
- package/dist/lib/browser/ResetDialog-W24FOWBQ.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-QJWFLYZE.mjs +121 -0
- package/dist/lib/browser/app-graph-builder-QJWFLYZE.mjs.map +7 -0
- package/dist/lib/browser/chunk-4XYOOXAH.mjs +18 -0
- package/dist/lib/browser/chunk-4XYOOXAH.mjs.map +7 -0
- package/dist/lib/browser/chunk-DPAXDXMK.mjs +283 -0
- package/dist/lib/browser/chunk-DPAXDXMK.mjs.map +7 -0
- package/dist/lib/browser/chunk-N2GMSVDQ.mjs +15 -0
- package/dist/lib/browser/chunk-N2GMSVDQ.mjs.map +7 -0
- package/dist/lib/browser/chunk-VYX3ROUX.mjs +15 -0
- package/dist/lib/browser/chunk-VYX3ROUX.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +1051 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/client-Z25GQ5YC.mjs +86 -0
- package/dist/lib/browser/client-Z25GQ5YC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +77 -84
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/migrations-HLHRMOW6.mjs +25 -0
- package/dist/lib/browser/migrations-HLHRMOW6.mjs.map +7 -0
- package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs +299 -0
- package/dist/lib/browser/operation-resolver-6QW3BKA5.mjs.map +7 -0
- package/dist/lib/browser/react-context-E7TAJMDK.mjs +26 -0
- package/dist/lib/browser/react-context-E7TAJMDK.mjs.map +7 -0
- package/dist/lib/browser/react-surface-L5A2LBFE.mjs +77 -0
- package/dist/lib/browser/react-surface-L5A2LBFE.mjs.map +7 -0
- package/dist/lib/browser/schema-defs-5WDZWVEI.mjs +28 -0
- package/dist/lib/browser/schema-defs-5WDZWVEI.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +10 -4
- package/dist/lib/node-esm/DevicesContainer-WQ3DQA45.mjs +269 -0
- package/dist/lib/node-esm/DevicesContainer-WQ3DQA45.mjs.map +7 -0
- package/dist/lib/node-esm/JoinDialog-KLTNJY5F.mjs +60 -0
- package/dist/lib/node-esm/JoinDialog-KLTNJY5F.mjs.map +7 -0
- package/dist/lib/node-esm/ProfileContainer-XI425QK5.mjs +172 -0
- package/dist/lib/node-esm/ProfileContainer-XI425QK5.mjs.map +7 -0
- package/dist/lib/node-esm/RecoveryCodeDialog-AISRNJUM.mjs +61 -0
- package/dist/lib/node-esm/RecoveryCodeDialog-AISRNJUM.mjs.map +7 -0
- package/dist/lib/node-esm/RecoveryCredentialsContainer-3TKQRPQK.mjs +58 -0
- package/dist/lib/node-esm/RecoveryCredentialsContainer-3TKQRPQK.mjs.map +7 -0
- package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs +54 -0
- package/dist/lib/node-esm/ResetDialog-GGBWSQZO.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-6JD6BZAI.mjs +122 -0
- package/dist/lib/node-esm/app-graph-builder-6JD6BZAI.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-H2CCMM4Z.mjs +20 -0
- package/dist/lib/node-esm/chunk-H2CCMM4Z.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HKSNTZF5.mjs +16 -0
- package/dist/lib/node-esm/chunk-HKSNTZF5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-RGULICLJ.mjs +17 -0
- package/dist/lib/node-esm/chunk-RGULICLJ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VEUNEDN5.mjs +284 -0
- package/dist/lib/node-esm/chunk-VEUNEDN5.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +1052 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/client-5AIPYSBT.mjs +87 -0
- package/dist/lib/node-esm/client-5AIPYSBT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +77 -84
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/migrations-O5KG2GGN.mjs +26 -0
- package/dist/lib/node-esm/migrations-O5KG2GGN.mjs.map +7 -0
- package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs +300 -0
- package/dist/lib/node-esm/operation-resolver-GSH7AOTZ.mjs.map +7 -0
- package/dist/lib/node-esm/{react-context-4SZYNSIS.mjs → react-context-OMJSBS23.mjs} +9 -7
- package/dist/lib/node-esm/react-context-OMJSBS23.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-N3BSPMMX.mjs +78 -0
- package/dist/lib/node-esm/react-surface-N3BSPMMX.mjs.map +7 -0
- package/dist/lib/node-esm/schema-defs-ENOYSDP3.mjs +29 -0
- package/dist/lib/node-esm/schema-defs-ENOYSDP3.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +10 -4
- package/dist/types/src/ClientPlugin.d.ts +2 -1
- package/dist/types/src/ClientPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/client/client.d.ts +8 -0
- package/dist/types/src/capabilities/client/client.d.ts.map +1 -0
- package/dist/types/src/capabilities/client/index.d.ts +18 -0
- package/dist/types/src/capabilities/client/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -19
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations/index.d.ts +3 -0
- package/dist/types/src/capabilities/migrations/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/migrations/migrations.d.ts +5 -0
- package/dist/types/src/capabilities/migrations/migrations.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +8 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context/index.d.ts +7 -0
- package/dist/types/src/capabilities/react-context/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context/react-context.d.ts +10 -0
- package/dist/types/src/capabilities/react-context/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +9 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs/index.d.ts +3 -0
- package/dist/types/src/capabilities/schema-defs/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts +5 -0
- package/dist/types/src/capabilities/schema-defs/schema-defs.d.ts.map +1 -0
- 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 +9 -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/{components → containers/DevicesContainer}/DevicesContainer.stories.d.ts +10 -54
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/index.d.ts +3 -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/index.d.ts +3 -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 +3 -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.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 +3 -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 +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- 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 +10 -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 +169 -11
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +54 -38
- package/src/ClientPlugin.ts +45 -55
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +96 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/client/client.ts +77 -0
- package/src/capabilities/client/index.ts +7 -0
- package/src/capabilities/index.ts +7 -11
- package/src/capabilities/migrations/index.ts +7 -0
- package/src/capabilities/migrations/migrations.ts +30 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +247 -0
- package/src/capabilities/react-context/index.ts +7 -0
- package/src/capabilities/react-context/react-context.tsx +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +74 -0
- package/src/capabilities/schema-defs/index.ts +7 -0
- package/src/capabilities/schema-defs/schema-defs.ts +36 -0
- package/src/cli/commands/config/index.ts +12 -0
- package/src/cli/commands/config/view.ts +26 -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 +29 -0
- package/src/cli/commands/device/info/info.ts +50 -0
- package/src/cli/commands/device/list/index.ts +5 -0
- package/src/cli/commands/device/list/list.test.ts +31 -0
- package/src/cli/commands/device/list/list.ts +30 -0
- package/src/cli/commands/device/update/index.ts +5 -0
- package/src/cli/commands/device/update/update.ts +70 -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 +45 -0
- package/src/cli/commands/halo/create/create.test.ts +52 -0
- package/src/cli/commands/halo/create/create.ts +75 -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 +28 -0
- package/src/cli/commands/halo/credential/list/list.ts +118 -0
- package/src/cli/commands/halo/identity/identity.test.ts +40 -0
- package/src/cli/commands/halo/identity/identity.ts +46 -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 +42 -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 +38 -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 +29 -0
- package/src/cli/commands/halo/update/update.ts +69 -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 +87 -0
- package/src/cli/commands/profile/delete.ts +33 -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 +54 -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 +34 -0
- package/src/cli/testing/test-console.ts +88 -0
- package/src/components/index.ts +0 -7
- package/src/constants.ts +9 -0
- package/src/{components → containers/DevicesContainer}/DevicesContainer.stories.tsx +14 -10
- package/src/{components → containers/DevicesContainer}/DevicesContainer.tsx +59 -65
- package/src/containers/DevicesContainer/index.ts +7 -0
- package/src/containers/JoinDialog/JoinDialog.tsx +53 -0
- package/src/containers/JoinDialog/index.ts +7 -0
- package/src/{components → containers/ProfileContainer}/ProfileContainer.stories.tsx +4 -4
- package/src/{components → containers/ProfileContainer}/ProfileContainer.tsx +65 -59
- package/src/containers/ProfileContainer/index.ts +7 -0
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.stories.tsx +4 -4
- package/src/{components → containers/RecoveryCodeDialog}/RecoveryCodeDialog.tsx +27 -26
- package/src/containers/RecoveryCodeDialog/index.ts +8 -0
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.stories.tsx +46 -0
- package/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.tsx +22 -24
- package/src/containers/RecoveryCredentialsContainer/index.ts +7 -0
- package/src/containers/ResetDialog/ResetDialog.stories.tsx +73 -0
- package/src/containers/ResetDialog/ResetDialog.tsx +50 -0
- package/src/containers/ResetDialog/index.ts +8 -0
- package/src/containers/index.ts +15 -0
- package/src/index.ts +1 -2
- package/src/meta.ts +7 -2
- package/src/translations.ts +6 -3
- 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 +127 -9
- package/dist/lib/browser/app-graph-builder-LUY3BJGC.mjs +0 -124
- package/dist/lib/browser/app-graph-builder-LUY3BJGC.mjs.map +0 -7
- package/dist/lib/browser/chunk-C7B7NM2G.mjs +0 -686
- package/dist/lib/browser/chunk-C7B7NM2G.mjs.map +0 -7
- package/dist/lib/browser/chunk-PFY3EQPI.mjs +0 -18
- package/dist/lib/browser/chunk-PFY3EQPI.mjs.map +0 -7
- package/dist/lib/browser/chunk-QB3D2P4J.mjs +0 -10
- package/dist/lib/browser/chunk-QB3D2P4J.mjs.map +0 -7
- package/dist/lib/browser/chunk-TRA2GP4M.mjs +0 -110
- package/dist/lib/browser/chunk-TRA2GP4M.mjs.map +0 -7
- package/dist/lib/browser/chunk-VTC4GIND.mjs +0 -19
- package/dist/lib/browser/chunk-VTC4GIND.mjs.map +0 -7
- package/dist/lib/browser/client-5PWEJ3U6.mjs +0 -43
- package/dist/lib/browser/client-5PWEJ3U6.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-L5NVP2G3.mjs +0 -305
- package/dist/lib/browser/intent-resolver-L5NVP2G3.mjs.map +0 -7
- package/dist/lib/browser/migrations-MWQCO5KY.mjs +0 -23
- package/dist/lib/browser/migrations-MWQCO5KY.mjs.map +0 -7
- package/dist/lib/browser/react-context-S4SRYUVY.mjs +0 -24
- package/dist/lib/browser/react-context-S4SRYUVY.mjs.map +0 -7
- package/dist/lib/browser/react-surface-6PV7RVQN.mjs +0 -66
- package/dist/lib/browser/react-surface-6PV7RVQN.mjs.map +0 -7
- package/dist/lib/browser/schema-defs-E3USCMH3.mjs +0 -25
- package/dist/lib/browser/schema-defs-E3USCMH3.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-S3BVB3IU.mjs +0 -125
- package/dist/lib/node-esm/app-graph-builder-S3BVB3IU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4MPOOMDQ.mjs +0 -111
- package/dist/lib/node-esm/chunk-4MPOOMDQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H73VVAMA.mjs +0 -687
- package/dist/lib/node-esm/chunk-H73VVAMA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K5IFPSCL.mjs +0 -20
- package/dist/lib/node-esm/chunk-K5IFPSCL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QE4LPI2A.mjs +0 -12
- package/dist/lib/node-esm/chunk-QE4LPI2A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UYDFBGYA.mjs +0 -19
- package/dist/lib/node-esm/chunk-UYDFBGYA.mjs.map +0 -7
- package/dist/lib/node-esm/client-ODN7EBTY.mjs +0 -44
- package/dist/lib/node-esm/client-ODN7EBTY.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-3JZIPI6F.mjs +0 -306
- package/dist/lib/node-esm/intent-resolver-3JZIPI6F.mjs.map +0 -7
- package/dist/lib/node-esm/migrations-ARXHGBH5.mjs +0 -24
- package/dist/lib/node-esm/migrations-ARXHGBH5.mjs.map +0 -7
- package/dist/lib/node-esm/react-context-4SZYNSIS.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-BOST4EH2.mjs +0 -67
- package/dist/lib/node-esm/react-surface-BOST4EH2.mjs.map +0 -7
- package/dist/lib/node-esm/schema-defs-ATH5YBDR.mjs +0 -26
- package/dist/lib/node-esm/schema-defs-ATH5YBDR.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- 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/client.d.ts +0 -9
- package/dist/types/src/capabilities/client.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/capabilities/migrations.d.ts +0 -4
- package/dist/types/src/capabilities/migrations.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-context.d.ts +0 -8
- package/dist/types/src/capabilities/react-context.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -8
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/schema-defs.d.ts +0 -4
- package/dist/types/src/capabilities/schema-defs.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.d.ts.map +0 -1
- package/dist/types/src/components/DevicesContainer.stories.d.ts.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 -60
- 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 -62
- package/dist/types/src/components/RecoveryCodeDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.d.ts.map +0 -1
- package/dist/types/src/components/RecoveryCredentialsContainer.stories.d.ts +0 -60
- 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 -65
- 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/app-graph-builder.ts +0 -115
- package/src/capabilities/capabilities.ts +0 -18
- package/src/capabilities/client.ts +0 -43
- package/src/capabilities/intent-resolver.ts +0 -251
- package/src/capabilities/migrations.ts +0 -25
- package/src/capabilities/react-context.tsx +0 -21
- package/src/capabilities/react-surface.tsx +0 -67
- package/src/capabilities/schema-defs.ts +0 -29
- package/src/components/JoinDialog.tsx +0 -53
- package/src/components/RecoveryCredentialsContainer.stories.tsx +0 -42
- package/src/components/ResetDialog.stories.tsx +0 -50
- 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
- /package/dist/types/src/{components → containers/RecoveryCredentialsContainer}/RecoveryCredentialsContainer.d.ts +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/cli/plugin.ts", "../../../../src/cli/commands/config/index.ts", "../../../../src/cli/commands/config/view.ts", "../../../../src/cli/commands/device/index.ts", "../../../../src/cli/commands/device/info/info.ts", "../../../../src/cli/commands/device/util.ts", "../../../../src/cli/commands/device/list/list.ts", "../../../../src/cli/commands/device/update/update.ts", "../../../../src/cli/commands/edge/index.ts", "../../../../src/cli/commands/edge/status.ts", "../../../../src/cli/commands/halo/index.ts", "../../../../src/cli/commands/halo/create/create.ts", "../../../../src/cli/commands/halo/util.ts", "../../../../src/cli/commands/halo/credential/index.ts", "../../../../src/cli/commands/halo/credential/add/add.ts", "../../../../src/cli/commands/halo/credential/list/list.ts", "../../../../src/cli/commands/halo/identity/identity.ts", "../../../../src/cli/commands/halo/keys/keys.ts", "../../../../src/cli/commands/halo/recover/recover.ts", "../../../../src/cli/commands/halo/seed/seed.ts", "../../../../src/cli/commands/halo/update/update.ts", "../../../../src/cli/commands/profile/index.ts", "../../../../src/cli/commands/profile/create.ts", "../../../../src/cli/commands/profile/util.ts", "../../../../src/cli/commands/profile/delete.ts", "../../../../src/cli/commands/profile/import.ts", "../../../../src/cli/commands/profile/inspect.ts", "../../../../src/cli/commands/profile/list.ts", "../../../../src/cli/commands/profile/reset.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\n\n// NOTE: Must not import from index to avoid pulling in react dependencies.\nimport { Client } from '../capabilities/client';\nimport { OperationResolver } from '../capabilities/operation-resolver';\nimport { SchemaDefs } from '../capabilities/schema-defs';\nimport { meta } from '../meta';\nimport { ClientEvents } from '../types';\nimport { type ClientPluginOptions } from '../types';\n\nimport { config, device, edge, halo, profile } from './commands';\n\nexport const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(\n // TODO(wittjosiah): Could some of these commands make use of operations?\n AppPlugin.addCommandModule({ commands: [config, device, edge, halo, profile] }),\n AppPlugin.addOperationResolverModule({ activate: OperationResolver }),\n Plugin.addModule((options) => ({\n id: Capability.getModuleTag(Client),\n activatesOn: ActivationEvents.Startup,\n activatesAfter: [ClientEvents.ClientReady],\n activate: () => Client(options),\n })),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [AppActivationEvents.SetupSchema],\n activate: SchemaDefs,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { view } from './view';\n\nexport const config = Command.make('config').pipe(\n Command.withDescription('Config commands.'),\n Command.withSubcommands([view]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Yaml from 'yaml';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ConfigService } from '@dxos/client';\n\nexport const view = Command.make(\n 'view',\n {},\n Effect.fnUntraced(function* () {\n const config = yield* ConfigService;\n const { json } = yield* CommandConfig;\n\n if (json) {\n yield* Console.log(JSON.stringify(config.values, null, 2));\n } else {\n yield* Console.log(Yaml.stringify(config.values));\n }\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { info } from './info';\nimport { list } from './list';\nimport { update } from './update';\n\nexport const device = Command.make('device').pipe(\n Command.withDescription('Manage HALO devices.'),\n Command.withSubcommands([info, list, update]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport { DeviceType } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { printDevice } from '../util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n const device = client.halo.device;\n if (!device) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'No device found' }, null, 2));\n } else {\n yield* Console.log('No device found.');\n }\n return;\n }\n\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n deviceKey: device.deviceKey.toHex(),\n profile: {\n ...device.profile,\n type: device.profile?.type ? DeviceType[device.profile?.type] : 'UNKNOWN',\n },\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printDevice(device)));\n }\n});\n\nexport const info = Command.make('info', {}, handler).pipe(Command.withDescription('Show device info.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\nimport { Device, DeviceKind, DeviceType } from '@dxos/client/halo';\n\nconst maybeTruncateKey = (key: { toHex(): string; truncate(): string }, truncate = false) =>\n truncate ? key.truncate() : key.toHex();\n\nconst getDeviceTitle = (device: Device): string => {\n if (device.profile?.label) {\n return device.profile.label;\n }\n const platform = device.profile?.platform ?? 'Unknown';\n const os = device.profile?.os ?? 'Unknown';\n return `${platform} on ${os}`;\n};\n\nexport const mapDevices = (devices: Device[], truncateKeys = false) => {\n return devices.map((device) => ({\n label: device.profile?.label,\n type: device.profile?.type ? DeviceType[device.profile?.type] : 'UNKNOWN',\n key: maybeTruncateKey(device.deviceKey, truncateKeys),\n kind: DeviceKind[device.kind],\n platform: device.profile?.platform,\n platformVersion: device.profile?.platformVersion,\n architecture: device.profile?.architecture,\n os: device.profile?.os,\n osVersion: device.profile?.osVersion,\n presence: device?.kind === DeviceKind.CURRENT ? 'THIS DEVICE' : Device.PresenceState[device.presence],\n }));\n};\n\nexport const printDevice = (device: Device) =>\n FormBuilder.make({ title: getDeviceTitle(device) }).pipe(\n FormBuilder.set('deviceKey', device.deviceKey.truncate()),\n FormBuilder.set('label', device.profile?.label ?? '<none>'),\n FormBuilder.set('type', device.profile?.type ? DeviceType[device.profile?.type] : 'UNKNOWN'),\n FormBuilder.set('kind', DeviceKind[device.kind]),\n FormBuilder.set(\n 'presence',\n device?.kind === DeviceKind.CURRENT ? 'THIS DEVICE' : Device.PresenceState[device.presence],\n ),\n FormBuilder.set('platform', device.profile?.platform ?? '<none>'),\n FormBuilder.set('platformVersion', device.profile?.platformVersion ?? '<none>'),\n FormBuilder.set('architecture', device.profile?.architecture ?? '<none>'),\n FormBuilder.set('os', device.profile?.os ?? '<none>'),\n FormBuilder.set('osVersion', device.profile?.osVersion ?? '<none>'),\n FormBuilder.build,\n );\n\nexport const printDevices = (devices: Device[]) => {\n return devices.map(printDevice);\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { printList } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nimport { mapDevices, printDevices } from '../util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n const devices = client.halo.devices.get();\n\n if (json) {\n yield* Console.log(JSON.stringify(mapDevices(devices), null, 2));\n } else {\n const formatted = printDevices(devices);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make('list', {}, handler).pipe(Command.withDescription('List devices.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nimport { printDevice } from '../util';\n\nexport const handler = Effect.fn(function* ({ label }: { label: string }) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n const device = client.halo.device;\n if (!device) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'No device found' }, null, 2));\n } else {\n yield* Console.log('No device found.');\n }\n return;\n }\n\n const updatedProfile = {\n ...device.profile,\n label,\n };\n\n const devicesService = client.services.services.DevicesService;\n if (!devicesService) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'DevicesService not found' }, null, 2));\n } else {\n yield* Console.log('DevicesService not found.');\n }\n return;\n }\n\n const updatedDevice = yield* Effect.tryPromise(() => devicesService.updateDevice(updatedProfile));\n\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n deviceKey: updatedDevice.deviceKey.toHex(),\n profile: updatedDevice.profile,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printDevice(updatedDevice)));\n }\n});\n\nexport const update = Command.make(\n 'update',\n {\n label: Options.text('label').pipe(Options.withDescription('The device label.')),\n },\n handler,\n).pipe(Command.withDescription('Update device label.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { status } from './status';\n\nexport const edge = Command.make('edge').pipe(\n Command.withDescription('EDGE commands.'),\n Command.withSubcommands([status]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport { createEdgeIdentity } from '@dxos/client/edge';\n\nexport const getStatus = () =>\n Effect.gen(function* () {\n const client = yield* ClientService;\n const identity = createEdgeIdentity(client);\n client.edge.http.setIdentity(identity);\n const status = yield* Effect.tryPromise(() => client.edge.http.getStatus());\n\n if (yield* CommandConfig.isJson) {\n yield* Console.log(JSON.stringify(status, null, 2));\n } else if (status.problems.length > 0) {\n for (const problem of status.problems) {\n yield* Console.error(problem);\n }\n } else {\n yield* Console.log('No problems found.');\n }\n }).pipe(\n // TODO(wittjosiah): Tagged error.\n Effect.catchSome((error) => {\n if (error instanceof Error && error.message === 'Identity not available') {\n // TODO(wittjosiah): Error coloring for logs.\n return Option.some(Console.error(error.message));\n } else {\n return Option.none();\n }\n }),\n );\n\n// TODO(wittjosiah): Admin functionality to provide to specify an identity.\nexport const status = Command.make('status', {}, getStatus).pipe(\n Command.withDescription('Get the EDGE status for the current identity.'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { create } from './create';\nimport { credential } from './credential';\nimport { identity } from './identity';\n// TODO(wittjosiah): Omitted currently due to p2p networking not working in bun.\n// import { join } from './join';\nimport { keys } from './keys';\nimport { recover } from './recover';\nimport { seed } from './seed';\n// import { share } from './share';\nimport { update } from './update';\n\nexport const halo: Command.Command<any, any, any, any> = Command.make('halo').pipe(\n Command.withDescription('Manage HALO identity.'),\n Command.withSubcommands([create, credential, identity, keys, recover, seed, update]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, Plugin } from '@dxos/app-framework';\nimport { CommandConfig, flushAndSync, spaceLayer } from '@dxos/cli-util';\nimport { print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientOperation } from '../../../../types';\nimport { printIdentity } from '../util';\n\nexport const handler = Effect.fn(function* ({\n agent,\n displayName,\n}: {\n agent: boolean;\n displayName: Option.Option<string>;\n}) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n // TODO(wittjosiah): How to surface this error to the user cleanly?\n invariant(!client.halo.identity.get(), 'Identity already exists');\n\n const manager = yield* Plugin.Service;\n const { invoke } = manager.capabilities.get(Capabilities.OperationInvoker);\n const identity = yield* invoke(ClientOperation.CreateIdentity, {\n displayName: Option.getOrUndefined(displayName),\n });\n\n if (agent) {\n yield* invoke(ClientOperation.CreateAgent);\n }\n\n yield* Effect.promise(() => client.spaces.waitUntilReady());\n yield* Effect.promise(() => client.spaces.default.waitUntilReady());\n const space = client.spaces.default;\n yield* flushAndSync({ indexes: true }).pipe(Effect.provide(spaceLayer(Option.some(space.id))));\n\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityKey: identity.identityKey.toHex(),\n displayName: identity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity(identity)));\n }\n});\n\nexport const create = Command.make(\n 'create',\n {\n agent: Options.boolean('noAgent', { ifPresent: false }).pipe(\n Options.withDescription('Do not create an EDGE agent for the identity.'),\n ),\n displayName: Options.text('displayName').pipe(\n Options.withDescription('The display name of the identity.'),\n Options.optional,\n ),\n },\n handler,\n).pipe(Command.withDescription('Create a new identity.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\n/**\n * Pretty prints an identity with ANSI colors.\n */\nexport const printIdentity = (identity: {\n identityKey: { toHex(): string; truncate(): string };\n profile?: { displayName?: string };\n}) =>\n FormBuilder.make({ title: 'Identity' }).pipe(\n FormBuilder.set('identityKey', identity.identityKey.truncate()),\n FormBuilder.set('displayName', identity.profile?.displayName ?? '<none>'),\n FormBuilder.build,\n );\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { add } from './add';\nimport { list } from './list';\n\nexport const credential = Command.make('credential').pipe(\n Command.withDescription('Manage HALO credentials.'),\n Command.withSubcommands([add, list]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Prompt from '@effect/cli/Prompt';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport { invariant } from '@dxos/invariant';\nimport { schema } from '@dxos/protocols/proto';\n\nexport const handler = Effect.fn(function* ({ credential }: { credential: Option.Option<string> }) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n\n let credentialHex = Option.getOrUndefined(credential);\n if (!credentialHex) {\n credentialHex = yield* Prompt.text({ message: 'Enter credential (hex string)' }).pipe(Prompt.run);\n }\n\n invariant(credentialHex, 'Invalid credential.');\n\n const identity = client.halo.identity;\n if (!identity) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'Profile not initialized' }, null, 2));\n } else {\n yield* Console.log('Profile not initialized.');\n }\n return;\n }\n\n yield* Effect.gen(function* () {\n const codec = schema.getCodecForType('dxos.halo.credentials.Credential');\n const credentialBytes = yield* Effect.try({\n try: () => Buffer.from(credentialHex, 'hex'),\n catch: (error) => new Error(`Failed to parse hex string: ${error}`),\n });\n\n const verifyError = codec.protoType.verify(credentialBytes);\n if (verifyError) {\n yield* Effect.fail(new Error(verifyError));\n }\n\n const credentialObj = yield* Effect.try({\n try: () => codec.decode(credentialBytes),\n catch: (error) => new Error(`Failed to decode credential: ${error}`),\n });\n\n yield* Effect.tryPromise({\n try: () => client.halo.writeCredentials([credentialObj]),\n catch: (error) => new Error(`Failed to write credential: ${error}`),\n });\n\n if (json) {\n yield* Console.log(JSON.stringify({ success: true }, null, 2));\n } else {\n yield* Console.log('Credential added successfully.');\n }\n }).pipe(\n Effect.catchAll((error) =>\n Effect.gen(function* () {\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n error: 'Invalid credential',\n message: error instanceof Error ? error.message : String(error),\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log('Invalid credential.');\n }\n yield* Effect.fail(error);\n }),\n ),\n );\n});\n\nexport const add = Command.make(\n 'add',\n {\n credential: Args.text({ name: 'credential' }).pipe(\n Args.withDescription('Credential as hex string.'),\n Args.optional,\n ),\n },\n handler,\n).pipe(Command.withDescription('Import credential into HALO.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Console from 'effect/Console';\nimport * as Duration from 'effect/Duration';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig, Common, FormBuilder, getSpace, printList, spaceIdWithDefault } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport type { Credential } from '@dxos/client/halo';\nimport { type Key } from '@dxos/echo';\n\nconst mapCredentials = (credentials: Credential[]) => {\n return credentials.map((credential) => ({\n id: credential.id?.toHex() ?? '<unknown>',\n issuer: credential.issuer?.toHex() ?? '<unknown>',\n subject: credential.subject?.id?.toHex() ?? '<unknown>',\n type: credential.subject.assertion['@type'],\n assertion: credential.subject.assertion,\n }));\n};\n\nconst printCredential = (credential: Credential) => {\n const type = credential.subject.assertion['@type'] ?? '<unknown>';\n return FormBuilder.make({ title: type }).pipe(\n FormBuilder.option('id', Option.fromNullable(credential.id?.truncate())),\n FormBuilder.option('issuer', Option.fromNullable(credential.issuer?.truncate())),\n FormBuilder.option('subject', Option.fromNullable(credential.subject?.id?.truncate())),\n FormBuilder.build,\n );\n};\n\nexport const handler = Effect.fn(function* ({\n type,\n spaceId,\n timeout,\n delay,\n}: {\n type: Option.Option<string>;\n spaceId: Option.Option<string>;\n timeout: number;\n delay: number;\n}) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n let credentials: Credential[];\n\n const resolvedSpaceId = yield* spaceIdWithDefault(spaceId as Option.Option<Key.SpaceId>);\n if (Option.isSome(spaceId)) {\n // If space ID was provided, get credentials from that space\n const space = yield* getSpace(resolvedSpaceId);\n credentials = yield* Effect.tryPromise(() => space.internal.getCredentials());\n } else {\n // Get credentials from HALO\n const identity = client.halo.identity;\n if (!identity) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'Profile not initialized' }, null, 2));\n } else {\n yield* Console.log('Profile not initialized.');\n }\n return;\n }\n\n // Wait for at least one credential\n const latch = yield* Effect.makeLatch();\n const subscription = client.halo.credentials.subscribe((creds) => {\n if (creds.length > 0) {\n Effect.runSync(latch.open);\n }\n });\n\n yield* latch.await.pipe(\n Effect.timeout(Duration.millis(timeout)),\n Effect.catchAll(() => Effect.void),\n Effect.ensuring(\n Effect.sync(() => {\n subscription.unsubscribe();\n }),\n ),\n );\n\n // Wait a bit more to ensure all credentials are loaded\n yield* Effect.sleep(Duration.millis(delay));\n\n credentials = client.halo.queryCredentials({ type: Option.getOrUndefined(type) });\n }\n\n if (json) {\n yield* Console.log(JSON.stringify(mapCredentials(credentials), null, 2));\n } else {\n const formatted = credentials.map(printCredential);\n yield* Console.log(printList(formatted));\n }\n});\n\nexport const list = Command.make(\n 'list',\n {\n type: Options.text('type').pipe(Options.withDescription('Filter by credential type.'), Options.optional),\n spaceId: Common.spaceId.pipe(Options.withDescription('Space ID to show credentials from.'), Options.optional),\n timeout: Options.integer('timeout').pipe(\n Options.withDescription('Time in milliseconds to wait for at least one credential before listing.'),\n Options.withDefault(500),\n ),\n delay: Options.integer('delay').pipe(\n Options.withDescription('Delay in milliseconds before listing.'),\n Options.withDefault(250),\n ),\n },\n handler,\n).pipe(Command.withDescription('List HALO credentials.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nimport { printIdentity } from '../util';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n const identity = client.halo.identity.get();\n if (!identity) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'Identity not initialized' }, null, 2));\n } else {\n yield* Console.log('Identity not initialized.');\n }\n } else {\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityKey: identity.identityKey.toHex(),\n displayName: identity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity(identity)));\n }\n }\n});\n\nexport const identity = Command.make('identity', {}, handler).pipe(\n Command.withDescription('Get the current identity.'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { FormBuilder, print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n const identity = client.halo.identity.get();\n const device = client.halo.device;\n\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityKey: identity?.identityKey.toHex(),\n deviceKey: device?.deviceKey.toHex(),\n },\n null,\n 2,\n ),\n );\n } else {\n const builder = FormBuilder.make({ title: 'HALO Keys' }).pipe(\n FormBuilder.option('identityKey', Option.fromNullable(identity?.identityKey.truncate())),\n FormBuilder.option('deviceKey', Option.fromNullable(device?.deviceKey.truncate())),\n );\n yield* Console.log(print(FormBuilder.build(builder)));\n }\n});\n\nexport const keys = Command.make('keys', {}, handler).pipe(Command.withDescription('Show HALO keys.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig, print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport { invariant } from '@dxos/invariant';\n\nimport { printIdentity } from '../util';\n\nexport const recover = Command.make(\n 'recover',\n {\n recoveryCode: Args.text({ name: 'recoveryCode' }).pipe(Args.withDescription('The recovery code seed phrase.')),\n },\n Effect.fn(function* ({ recoveryCode }) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n // TODO(wittjosiah): How to surface this error to the user cleanly?\n invariant(!client.halo.identity.get(), 'Identity already exists');\n\n const identity = yield* Effect.tryPromise(() => client.halo.recoverIdentity({ recoveryCode }));\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityKey: identity.identityKey.toHex(),\n displayName: identity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log('Identity recovered successfully');\n yield* Console.log(print(printIdentity(identity)));\n }\n }),\n).pipe(Command.withDescription('Recover an existing identity using a recovery code.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nexport const handler = Effect.fn(function* () {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n const identityService = client.services.services.IdentityService;\n if (!identityService) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'IdentityService not found' }, null, 2));\n } else {\n yield* Console.log('IdentityService not found.');\n }\n return;\n }\n\n const result = yield* Effect.tryPromise(() => identityService.createRecoveryCredential({}));\n\n if (json) {\n yield* Console.log(JSON.stringify({ recoveryCode: result.recoveryCode }, null, 2));\n } else {\n yield* Console.log(result.recoveryCode);\n }\n});\n\nexport const seed = Command.make('seed', {}, handler).pipe(\n Command.withDescription('Generate a seedphrase that can be used for identity recovery.'),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\n\nimport { printIdentity } from '../util';\n\nexport const handler = Effect.fn(function* ({ displayName }: { displayName: string }) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n yield* Effect.tryPromise(() => client.spaces.waitUntilReady());\n\n const identity = client.halo.identity.get();\n if (!identity) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'Identity not initialized' }, null, 2));\n } else {\n yield* Console.log('Identity not initialized.');\n }\n return;\n }\n\n const identityService = client.services.services.IdentityService;\n if (!identityService) {\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'IdentityService not found' }, null, 2));\n } else {\n yield* Console.log('IdentityService not found.');\n }\n return;\n }\n\n const updatedIdentity = yield* Effect.tryPromise(() =>\n identityService.updateProfile({\n displayName,\n }),\n );\n\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityKey: updatedIdentity.identityKey.toHex(),\n displayName: updatedIdentity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity(updatedIdentity)));\n }\n});\n\nexport const update = Command.make(\n 'update',\n {\n displayName: Options.text('displayName').pipe(Options.withDescription('The display name of the identity.')),\n },\n handler,\n).pipe(Command.withDescription('Update identity profile.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { create } from './create';\nimport { del } from './delete';\nimport { importCommand } from './import';\nimport { inspect } from './inspect';\nimport { list } from './list';\nimport { reset } from './reset';\n\nexport const profile = Command.make('profile').pipe(\n Command.withDescription('Profile commands.'),\n Command.withSubcommands([create, del, importCommand, inspect, list, reset]),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\nimport * as Record from 'effect/Record';\n\nimport { CommandConfig, print } from '@dxos/cli-util';\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\nimport { trim } from '@dxos/util';\n\nimport { printProfileCreated } from './util';\n\nconst TEMPLATES = {\n default: trim`\n version: 1\n runtime:\n client:\n storage:\n persistent: true\n services:\n edge:\n url: https://edge-production.dxos.workers.dev\n `,\n main: trim`\n version: 1\n runtime:\n client:\n storage:\n persistent: true\n services:\n edge:\n url: https://edge-main.dxos.workers.dev\n `,\n dev: trim`\n version: 1\n runtime:\n client:\n storage:\n persistent: true\n services:\n edge:\n url: https://edge.dxos.workers.dev\n `,\n local: trim`\n version: 1\n runtime:\n client:\n storage:\n persistent: true\n services:\n edge:\n url: http://localhost:8787\n `,\n} as const;\n\nexport const create = Command.make(\n 'create',\n {\n template: Options.choice('template', Record.keys(TEMPLATES)).pipe(\n Options.withDescription('Template to use'),\n Options.withDefault('default'),\n ),\n name: Options.text('name').pipe(Options.withDescription('Profile name'), Options.optional),\n },\n Effect.fnUntraced(function* ({ template, name }) {\n const { json } = yield* CommandConfig;\n const fs = yield* FileSystem.FileSystem;\n const profileName = name.pipe(Option.getOrElse(() => template));\n const profilePath = `${getProfilePath(DX_CONFIG, profileName)}.yml`;\n if (yield* fs.exists(profilePath)) {\n throw new Error(`Profile ${profileName} already exists`);\n }\n\n yield* fs.writeFileString(profilePath, TEMPLATES[template]);\n if (json) {\n yield* Console.log(JSON.stringify({ name: profileName, path: profilePath }, null, 2));\n } else {\n yield* Console.log(print(printProfileCreated(profileName, profilePath)));\n }\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { FormBuilder } from '@dxos/cli-util';\n\nexport type ProfileInfo = {\n name: string;\n isCurrent: boolean;\n fullPath: string;\n storagePath: string;\n edge?: string;\n};\n\n/**\n * Pretty prints profile creation result with ANSI colors.\n */\nexport const printProfileCreated = (name: string, path: string) =>\n FormBuilder.make({ title: 'Profile created' }).pipe(\n FormBuilder.set('name', name),\n FormBuilder.set('path', path),\n FormBuilder.build,\n );\n\n/**\n * Pretty prints profile deletion result with ANSI colors.\n */\nexport const printProfileDeleted = (name: string) =>\n FormBuilder.make({ title: 'Profile deleted' }).pipe(FormBuilder.set('name', name), FormBuilder.build);\n\n/**\n * Pretty prints profile reset result with ANSI colors.\n */\nexport const printProfileReset = (profile: string) =>\n FormBuilder.make({ title: 'Profile reset' }).pipe(FormBuilder.set('profile', profile), FormBuilder.build);\n\n/**\n * Pretty prints a profile with ANSI colors.\n */\nexport const printProfile = (profile: ProfileInfo) => {\n const title = profile.isCurrent ? `${profile.name} (current)` : profile.name;\n return FormBuilder.make({ title }).pipe(\n FormBuilder.set('fullPath', profile.fullPath),\n FormBuilder.set('storagePath', profile.storagePath),\n FormBuilder.set('edge', profile.edge ?? '<none>'),\n FormBuilder.build,\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig, print } from '@dxos/cli-util';\nimport { DX_CONFIG, getProfilePath } from '@dxos/client-protocol';\n\nimport { printProfileDeleted } from './util';\n\nexport const del = Command.make(\n 'delete',\n {\n name: Options.text('name').pipe(Options.withDescription('Profile name'), Options.optional),\n },\n Effect.fnUntraced(function* ({ name }) {\n const { json } = yield* CommandConfig;\n const fs = yield* FileSystem.FileSystem;\n const profileName = name.pipe(Option.getOrElse(() => 'default'));\n yield* fs.remove(`${getProfilePath(DX_CONFIG, profileName)}.yml`);\n if (json) {\n yield* Console.log(JSON.stringify({ name: profileName, deleted: true }, null, 2));\n } else {\n yield* Console.log(print(printProfileDeleted(profileName)));\n }\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Prompt from '@effect/cli/Prompt';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { ConfigService } from '@dxos/config';\nimport { log } from '@dxos/log';\nimport type { Runtime } from '@dxos/protocols/proto/dxos/config';\n\nexport const handler = Effect.fn(function* ({\n file,\n dataDir,\n force,\n}: {\n file: string;\n dataDir: Option.Option<string>;\n force: boolean;\n}) {\n const dataDirValue = Option.getOrUndefined(dataDir);\n const { json, profile } = yield* CommandConfig;\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const config = yield* ConfigService;\n\n const { createLevel, createStorageObjects, importProfileData, decodeProfileArchive } = yield* Effect.promise(\n () => import('@dxos/client-services'),\n );\n\n let storageConfig: Runtime.Client.Storage;\n if (!dataDirValue) {\n if (!force) {\n yield* Console.log(`Will overwrite profile: ${profile}`);\n const confirmed = yield* Prompt.confirm({\n message: `Delete all data? (Profile: ${profile})`,\n initial: false,\n }).pipe(Prompt.run);\n if (!confirmed) {\n return;\n }\n }\n storageConfig = config.values.runtime!.client!.storage!;\n } else {\n const fullPath = path.resolve(dataDirValue);\n yield* Console.log(`Importing into: ${fullPath}`);\n storageConfig = {\n persistent: true,\n dataRoot: fullPath,\n };\n }\n\n if (yield* fs.exists(storageConfig.dataRoot!)) {\n log.error('data directory already exists', { path: storageConfig.dataRoot! });\n if (json) {\n yield* Console.log(JSON.stringify({ error: 'Data directory already exists' }, null, 2));\n } else {\n yield* Console.log('Data directory already exists.');\n }\n return;\n }\n\n const data = yield* fs.readFile(file);\n\n const archive = decodeProfileArchive(data);\n yield* Console.log(`Importing archive with ${archive.storage.length} entries`);\n\n const { storage } = createStorageObjects(storageConfig);\n const level = yield* Effect.tryPromise({\n try: () => createLevel(storageConfig),\n catch: (error) => new Error(`Failed to create level: ${error}`),\n });\n\n yield* Console.log('Beginning profile import...');\n yield* Effect.tryPromise({\n try: () => importProfileData({ storage, level }, archive),\n catch: (error) => new Error(`Failed to import profile data: ${error}`),\n });\n yield* Console.log('Profile import complete');\n\n if (json) {\n yield* Console.log(JSON.stringify({ success: true, profile, entries: archive.storage.length }, null, 2));\n }\n});\n\nexport const importCommand = Command.make(\n 'import',\n {\n file: Options.text('file').pipe(Options.withDescription('Archive filename.'), Options.withAlias('f')),\n dataDir: Options.text('data-dir').pipe(Options.withDescription('Storage directory.'), Options.optional),\n force: Options.boolean('force', { ifPresent: true }).pipe(Options.withDescription('Skip confirmation prompt.')),\n },\n handler,\n).pipe(Command.withDescription('Import profile.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig, FormBuilder, print } from '@dxos/cli-util';\nimport { ProfileArchiveEntryType } from '@dxos/protocols';\nimport { arrayToBuffer } from '@dxos/util';\n\nexport const handler = Effect.fn(function* ({ file, storage }: { file: string; storage: boolean }) {\n const { json } = yield* CommandConfig;\n const fs = yield* FileSystem.FileSystem;\n\n const { decodeProfileArchive } = yield* Effect.promise(() => import('@dxos/client-services'));\n\n const data = yield* fs.readFile(file);\n\n const archive = decodeProfileArchive(data);\n\n if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n meta: archive.meta,\n ...(storage ? { storage: archive.storage } : {}),\n },\n null,\n 2,\n ),\n );\n } else {\n const builder = FormBuilder.make({ title: 'Profile Archive' }).pipe(\n FormBuilder.when(\n archive.meta,\n FormBuilder.each(Object.entries(archive.meta ?? {}), ([key, value]) => FormBuilder.set(key, String(value))),\n ),\n FormBuilder.build,\n );\n yield* Console.log(print(builder));\n\n if (storage) {\n yield* Console.log('\\nStorage entries:\\n');\n for (const entry of archive.storage) {\n const key =\n typeof entry.key === 'string' ? entry.key : JSON.stringify(arrayToBuffer(entry.key).toString()).slice(1, -1);\n yield* Console.log(` ${ProfileArchiveEntryType[entry.type]} ${key}`);\n }\n }\n }\n});\n\nexport const inspect = Command.make(\n 'inspect',\n {\n file: Options.text('file').pipe(Options.withDescription('Archive filename.'), Options.withAlias('f')),\n storage: Options.boolean('storage', { ifPresent: true }).pipe(Options.withDescription('List storage entries.')),\n },\n handler,\n).pipe(Command.withDescription('Inspect profile archive.'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Path from '@effect/platform/Path';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Yaml from 'yaml';\n\nimport { CommandConfig, printList } from '@dxos/cli-util';\nimport { Config } from '@dxos/client';\nimport { DX_CONFIG, DX_DATA, getProfilePath } from '@dxos/client-protocol';\n\nimport { printProfile } from './util';\n\nexport const list = Command.make(\n 'list',\n {},\n Effect.fnUntraced(function* () {\n const { profile: currentProfile } = yield* CommandConfig;\n const fs = yield* FileSystem.FileSystem;\n const path = yield* Path.Path;\n const profileDir = path.join(DX_CONFIG, 'profile');\n const files = yield* fs.readDirectory(profileDir);\n const profiles = yield* Effect.forEach(\n files,\n Effect.fnUntraced(function* (filename) {\n const ext = path.extname(filename);\n const name = filename.slice(0, -ext.length);\n const fullPath = path.join(DX_CONFIG, 'profile', filename);\n const configContent = yield* fs.readFileString(fullPath);\n const configValues = Yaml.parse(configContent);\n const config = new Config(configValues);\n return {\n name,\n isCurrent: name === currentProfile,\n fullPath,\n storagePath: getProfilePath(configValues?.runtime?.client?.storage.dataRoot ?? DX_DATA, name),\n edge: config.values.runtime?.services?.edge?.url,\n };\n }),\n );\n\n const { json } = yield* CommandConfig;\n if (json) {\n yield* Console.log(JSON.stringify(profiles, null, 2));\n } else {\n const formatted = profiles.map(printProfile);\n yield* Console.log(printList(formatted));\n }\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Prompt from '@effect/cli/Prompt';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig, print } from '@dxos/cli-util';\nimport { DX_DATA, getProfilePath } from '@dxos/client-protocol';\nimport { ConfigService } from '@dxos/config';\n\nimport { printProfileReset } from './util';\n\nexport const reset = Command.make(\n 'reset',\n {\n force: Options.boolean('force', { ifPresent: true }).pipe(Options.withDescription('Skip confirmation prompt')),\n },\n Effect.fnUntraced(function* ({ force }) {\n const fs = yield* FileSystem.FileSystem;\n const config = yield* ConfigService;\n const { json, profile } = yield* CommandConfig;\n const path = config.values.runtime?.client?.storage?.dataRoot ?? getProfilePath(DX_DATA, profile);\n if (!force) {\n const confirmed = yield* Prompt.confirm({\n message: `Are you sure you want to reset the profile (${profile})?`,\n initial: false,\n });\n if (!confirmed) {\n return;\n }\n }\n\n yield* fs.remove(path, { recursive: true });\n if (json) {\n yield* Console.log(JSON.stringify({ profile, reset: true }, null, 2));\n } else {\n yield* Console.log(print(printProfileReset(profile)));\n }\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAIA,SAASA,kBAAkBC,YAAYC,UAAAA,eAAc;AACrD,SAASC,qBAAqBC,iBAAiB;;;ACD/C,YAAYC,cAAa;;;ACAzB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,UAAU;AAEtB,SAASC,qBAAqB;AAC9B,SAASC,qBAAqB;AAEvB,IAAMC,OAAeC,aAC1B,QACA,CAAC,GAC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AC5BC,aAAaC,iBAAiBC;IAC9BC,gBAAgB;MAACC,aAAaC;;IAC9Bb,UAAU,MAAMO,OAAOJ,OAAAA;EACzB,EAAA;EACAhB,QAAOe,UAAU;IACfM,aAAaI,aAAaC;IAC1BC,iBAAiB;MAACC,oBAAoBC;;IACtChB,UAAUiB;EACZ,CAAA;EACA9B,QAAO+B;AAAI;",
|
|
6
|
+
"names": ["ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "Command", "Command", "Console", "Effect", "Yaml", "CommandConfig", "ConfigService", "view", "make", "fnUntraced", "config", "ConfigService", "json", "CommandConfig", "log", "JSON", "stringify", "values", "config", "make", "pipe", "withDescription", "withSubcommands", "view", "Command", "Command", "Console", "Effect", "CommandConfig", "print", "ClientService", "DeviceType", "FormBuilder", "Device", "DeviceKind", "DeviceType", "maybeTruncateKey", "key", "truncate", "toHex", "getDeviceTitle", "device", "profile", "label", "platform", "os", "mapDevices", "devices", "truncateKeys", "map", "type", "DeviceType", "deviceKey", "kind", "DeviceKind", "platformVersion", "architecture", "osVersion", "presence", "CURRENT", "Device", "PresenceState", "printDevice", "FormBuilder", "make", "title", "pipe", "set", "build", "printDevices", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "device", "halo", "log", "JSON", "stringify", "error", "deviceKey", "toHex", "profile", "type", "DeviceType", "print", "printDevice", "info", "make", "pipe", "withDescription", "Command", "Console", "Effect", "CommandConfig", "printList", "ClientService", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "devices", "halo", "get", "log", "JSON", "stringify", "mapDevices", "formatted", "printDevices", "printList", "list", "make", "pipe", "withDescription", "Command", "Options", "Console", "Effect", "CommandConfig", "print", "ClientService", "handler", "fn", "label", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "device", "halo", "log", "JSON", "stringify", "error", "updatedProfile", "profile", "devicesService", "services", "DevicesService", "updatedDevice", "updateDevice", "deviceKey", "toHex", "print", "printDevice", "update", "make", "text", "pipe", "withDescription", "device", "make", "pipe", "withDescription", "withSubcommands", "info", "list", "update", "Command", "Command", "Console", "Effect", "Option", "CommandConfig", "ClientService", "createEdgeIdentity", "getStatus", "gen", "client", "ClientService", "identity", "createEdgeIdentity", "edge", "http", "setIdentity", "status", "tryPromise", "CommandConfig", "isJson", "log", "JSON", "stringify", "problems", "length", "problem", "error", "pipe", "catchSome", "Error", "message", "some", "none", "make", "withDescription", "edge", "make", "pipe", "withDescription", "withSubcommands", "status", "Command", "Command", "Options", "Console", "Effect", "Option", "Capabilities", "Plugin", "CommandConfig", "flushAndSync", "spaceLayer", "print", "ClientService", "invariant", "FormBuilder", "printIdentity", "identity", "FormBuilder", "make", "title", "pipe", "set", "identityKey", "truncate", "profile", "displayName", "build", "handler", "fn", "agent", "displayName", "json", "CommandConfig", "client", "ClientService", "invariant", "halo", "identity", "get", "manager", "Plugin", "Service", "invoke", "capabilities", "Capabilities", "OperationInvoker", "ClientOperation", "CreateIdentity", "getOrUndefined", "CreateAgent", "promise", "spaces", "waitUntilReady", "default", "space", "flushAndSync", "indexes", "pipe", "provide", "spaceLayer", "some", "id", "log", "JSON", "stringify", "identityKey", "toHex", "profile", "print", "printIdentity", "create", "make", "boolean", "ifPresent", "withDescription", "text", "optional", "Command", "Args", "Command", "Prompt", "Console", "Effect", "Option", "CommandConfig", "ClientService", "invariant", "schema", "handler", "fn", "credential", "json", "client", "credentialHex", "getOrUndefined", "text", "message", "pipe", "run", "identity", "halo", "log", "JSON", "stringify", "error", "gen", "codec", "getCodecForType", "credentialBytes", "try", "Buffer", "from", "catch", "Error", "verifyError", "protoType", "verify", "fail", "credentialObj", "decode", "tryPromise", "writeCredentials", "success", "catchAll", "String", "add", "make", "name", "withDescription", "optional", "Command", "Options", "Console", "Duration", "Effect", "Option", "CommandConfig", "Common", "FormBuilder", "getSpace", "printList", "spaceIdWithDefault", "ClientService", "mapCredentials", "credentials", "map", "credential", "id", "toHex", "issuer", "subject", "type", "assertion", "printCredential", "FormBuilder", "make", "title", "pipe", "option", "fromNullable", "truncate", "build", "handler", "fn", "spaceId", "timeout", "delay", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "resolvedSpaceId", "spaceIdWithDefault", "isSome", "space", "getSpace", "internal", "getCredentials", "identity", "halo", "log", "JSON", "stringify", "error", "latch", "makeLatch", "subscription", "subscribe", "creds", "length", "Effect", "runSync", "open", "await", "millis", "catchAll", "void", "ensuring", "sync", "unsubscribe", "sleep", "queryCredentials", "getOrUndefined", "formatted", "printList", "list", "text", "withDescription", "optional", "Common", "integer", "withDefault", "credential", "make", "pipe", "withDescription", "withSubcommands", "add", "list", "Command", "Console", "Effect", "CommandConfig", "print", "ClientService", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "identity", "halo", "get", "log", "JSON", "stringify", "error", "tryPromise", "spaces", "waitUntilReady", "identityKey", "toHex", "displayName", "profile", "print", "printIdentity", "make", "pipe", "withDescription", "Command", "Console", "Effect", "Option", "CommandConfig", "FormBuilder", "print", "ClientService", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "identity", "halo", "get", "device", "log", "JSON", "stringify", "identityKey", "toHex", "deviceKey", "builder", "FormBuilder", "make", "title", "pipe", "option", "fromNullable", "truncate", "print", "build", "keys", "withDescription", "Args", "Command", "Console", "Effect", "CommandConfig", "print", "ClientService", "invariant", "recover", "make", "recoveryCode", "text", "name", "pipe", "withDescription", "fn", "json", "CommandConfig", "client", "ClientService", "invariant", "halo", "identity", "get", "tryPromise", "recoverIdentity", "log", "JSON", "stringify", "identityKey", "toHex", "displayName", "profile", "print", "printIdentity", "Command", "Console", "Effect", "CommandConfig", "ClientService", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "identityService", "services", "IdentityService", "log", "JSON", "stringify", "error", "result", "createRecoveryCredential", "recoveryCode", "seed", "make", "pipe", "withDescription", "Command", "Options", "Console", "Effect", "CommandConfig", "print", "ClientService", "handler", "fn", "displayName", "json", "CommandConfig", "client", "ClientService", "tryPromise", "spaces", "waitUntilReady", "identity", "halo", "get", "log", "JSON", "stringify", "error", "identityService", "services", "IdentityService", "updatedIdentity", "updateProfile", "identityKey", "toHex", "profile", "print", "printIdentity", "update", "make", "text", "pipe", "withDescription", "halo", "make", "pipe", "withDescription", "withSubcommands", "create", "credential", "identity", "keys", "recover", "seed", "update", "Command", "Command", "Options", "FileSystem", "Console", "Effect", "Option", "Record", "CommandConfig", "print", "DX_CONFIG", "getProfilePath", "trim", "FormBuilder", "printProfileCreated", "name", "path", "FormBuilder", "make", "title", "pipe", "set", "build", "printProfileDeleted", "printProfileReset", "profile", "printProfile", "isCurrent", "fullPath", "storagePath", "edge", "TEMPLATES", "default", "trim", "main", "dev", "local", "create", "make", "template", "choice", "keys", "pipe", "withDescription", "withDefault", "name", "text", "optional", "fnUntraced", "json", "CommandConfig", "fs", "FileSystem", "profileName", "getOrElse", "profilePath", "getProfilePath", "DX_CONFIG", "exists", "Error", "writeFileString", "log", "JSON", "stringify", "path", "print", "printProfileCreated", "Command", "Options", "FileSystem", "Console", "Effect", "Option", "CommandConfig", "print", "DX_CONFIG", "getProfilePath", "del", "make", "name", "text", "pipe", "withDescription", "optional", "fnUntraced", "json", "CommandConfig", "fs", "FileSystem", "profileName", "getOrElse", "remove", "getProfilePath", "DX_CONFIG", "log", "JSON", "stringify", "deleted", "print", "printProfileDeleted", "Command", "Options", "Prompt", "FileSystem", "Path", "Console", "Effect", "Option", "CommandConfig", "ConfigService", "log", "handler", "fn", "file", "dataDir", "force", "dataDirValue", "getOrUndefined", "json", "profile", "fs", "path", "config", "createLevel", "createStorageObjects", "importProfileData", "decodeProfileArchive", "promise", "storageConfig", "confirmed", "confirm", "message", "initial", "pipe", "run", "values", "runtime", "client", "storage", "fullPath", "resolve", "persistent", "dataRoot", "exists", "error", "JSON", "stringify", "data", "readFile", "archive", "length", "level", "tryPromise", "try", "catch", "Error", "success", "entries", "importCommand", "make", "text", "withDescription", "withAlias", "optional", "boolean", "ifPresent", "Command", "Options", "FileSystem", "Console", "Effect", "CommandConfig", "FormBuilder", "print", "ProfileArchiveEntryType", "arrayToBuffer", "handler", "fn", "file", "storage", "json", "CommandConfig", "fs", "FileSystem", "decodeProfileArchive", "promise", "data", "readFile", "archive", "log", "JSON", "stringify", "meta", "builder", "FormBuilder", "make", "title", "pipe", "when", "each", "Object", "entries", "key", "value", "set", "String", "build", "print", "entry", "arrayToBuffer", "toString", "slice", "ProfileArchiveEntryType", "type", "inspect", "text", "withDescription", "withAlias", "boolean", "ifPresent", "Command", "FileSystem", "Path", "Console", "Effect", "Yaml", "CommandConfig", "printList", "Config", "DX_CONFIG", "DX_DATA", "getProfilePath", "list", "make", "fnUntraced", "profile", "currentProfile", "CommandConfig", "fs", "FileSystem", "path", "Path", "profileDir", "join", "DX_CONFIG", "files", "readDirectory", "profiles", "forEach", "filename", "ext", "extname", "name", "slice", "length", "fullPath", "configContent", "readFileString", "configValues", "parse", "config", "Config", "isCurrent", "storagePath", "getProfilePath", "runtime", "client", "storage", "dataRoot", "DX_DATA", "edge", "values", "services", "url", "json", "log", "JSON", "stringify", "formatted", "map", "printProfile", "printList", "Command", "Options", "Prompt", "FileSystem", "Console", "Effect", "CommandConfig", "print", "DX_DATA", "getProfilePath", "ConfigService", "reset", "make", "force", "boolean", "ifPresent", "pipe", "withDescription", "fnUntraced", "fs", "FileSystem", "config", "ConfigService", "json", "profile", "CommandConfig", "path", "values", "runtime", "client", "storage", "dataRoot", "getProfilePath", "DX_DATA", "confirmed", "confirm", "message", "initial", "remove", "recursive", "log", "JSON", "stringify", "print", "printProfileReset", "profile", "make", "pipe", "withDescription", "withSubcommands", "create", "del", "importCommand", "inspect", "list", "reset", "ClientPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addCommandModule", "commands", "config", "device", "edge", "halo", "profile", "addOperationResolverModule", "activate", "OperationResolver", "addModule", "options", "id", "Capability", "getModuleTag", "Client", "activatesOn", "ActivationEvents", "Startup", "activatesAfter", "ClientEvents", "ClientReady", "activatesBefore", "AppActivationEvents", "SetupSchema", "SchemaDefs", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClientCapabilities,
|
|
3
|
+
ClientEvents
|
|
4
|
+
} from "./chunk-DPAXDXMK.mjs";
|
|
5
|
+
import "./chunk-N2GMSVDQ.mjs";
|
|
6
|
+
|
|
7
|
+
// src/capabilities/client/client.ts
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
import { Capabilities, Capability, Plugin } from "@dxos/app-framework";
|
|
10
|
+
import { Client, ClientService } from "@dxos/client";
|
|
11
|
+
import { runAndForwardErrors } from "@dxos/effect";
|
|
12
|
+
import { log } from "@dxos/log";
|
|
13
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/capabilities/client/client.ts";
|
|
14
|
+
var client_default = Capability.makeModule(Effect.fnUntraced(function* ({ onClientInitialized, onSpacesReady, ...options }) {
|
|
15
|
+
const capabilityManager = yield* Capability.Service;
|
|
16
|
+
const pluginManager = yield* Plugin.Service;
|
|
17
|
+
log("creating client", void 0, {
|
|
18
|
+
F: __dxlog_file,
|
|
19
|
+
L: 25,
|
|
20
|
+
S: this,
|
|
21
|
+
C: (f, a) => f(...a)
|
|
22
|
+
});
|
|
23
|
+
const client = new Client(options);
|
|
24
|
+
log("initializing client", void 0, {
|
|
25
|
+
F: __dxlog_file,
|
|
26
|
+
L: 27,
|
|
27
|
+
S: this,
|
|
28
|
+
C: (f, a) => f(...a)
|
|
29
|
+
});
|
|
30
|
+
yield* Effect.tryPromise(() => client.initialize());
|
|
31
|
+
log("initialized client", void 0, {
|
|
32
|
+
F: __dxlog_file,
|
|
33
|
+
L: 29,
|
|
34
|
+
S: this,
|
|
35
|
+
C: (f, a) => f(...a)
|
|
36
|
+
});
|
|
37
|
+
if (onClientInitialized) {
|
|
38
|
+
yield* onClientInitialized({
|
|
39
|
+
client
|
|
40
|
+
}).pipe(Effect.provideService(Capability.Service, capabilityManager), Effect.provideService(Plugin.Service, pluginManager));
|
|
41
|
+
}
|
|
42
|
+
log("called client initialized callback", void 0, {
|
|
43
|
+
F: __dxlog_file,
|
|
44
|
+
L: 36,
|
|
45
|
+
S: this,
|
|
46
|
+
C: (f, a) => f(...a)
|
|
47
|
+
});
|
|
48
|
+
client.reloaded.on(() => {
|
|
49
|
+
client.halo.identity.subscribe(async (identity) => {
|
|
50
|
+
if (identity) {
|
|
51
|
+
window.location.href = window.location.origin;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
const subscription = client.spaces.isReady.subscribe(async (ready) => {
|
|
56
|
+
if (ready) {
|
|
57
|
+
await Effect.gen(function* () {
|
|
58
|
+
yield* Plugin.activate(ClientEvents.SpacesReady);
|
|
59
|
+
if (onSpacesReady) {
|
|
60
|
+
yield* onSpacesReady({
|
|
61
|
+
client
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}).pipe(Effect.provideService(Capability.Service, capabilityManager), Effect.provideService(Plugin.Service, pluginManager), runAndForwardErrors);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
log("client capability ready", void 0, {
|
|
68
|
+
F: __dxlog_file,
|
|
69
|
+
L: 63,
|
|
70
|
+
S: this,
|
|
71
|
+
C: (f, a) => f(...a)
|
|
72
|
+
});
|
|
73
|
+
return [
|
|
74
|
+
// TODO(wittjosiah): Try to remove and prefer layer?
|
|
75
|
+
// Perhaps move to using layer has source of truth and add a getter capability for the client.
|
|
76
|
+
Capability.contributes(ClientCapabilities.Client, client, () => Effect.gen(function* () {
|
|
77
|
+
subscription.unsubscribe();
|
|
78
|
+
yield* Effect.tryPromise(() => client.destroy());
|
|
79
|
+
})),
|
|
80
|
+
Capability.contributes(Capabilities.Layer, ClientService.fromClient(client))
|
|
81
|
+
];
|
|
82
|
+
}));
|
|
83
|
+
export {
|
|
84
|
+
client_default as default
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=client-Z25GQ5YC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/client/client.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability, Plugin } from '@dxos/app-framework';\nimport { Client, ClientService } from '@dxos/client';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { log } from '@dxos/log';\n\nimport { ClientEvents } from '../../types';\nimport { ClientCapabilities, type ClientPluginOptions } from '../../types';\n\ntype ClientCapabilityOptions = Omit<\n ClientPluginOptions,\n 'appKey' | 'shareableLinkOrigin' | 'invitationPath' | 'invitationParam' | 'onReset'\n>;\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* ({ onClientInitialized, onSpacesReady, ...options }: ClientCapabilityOptions) {\n const capabilityManager = yield* Capability.Service;\n const pluginManager = yield* Plugin.Service;\n\n log('creating client');\n const client = new Client(options);\n log('initializing client');\n yield* Effect.tryPromise(() => client.initialize());\n log('initialized client');\n if (onClientInitialized) {\n yield* onClientInitialized({ client }).pipe(\n Effect.provideService(Capability.Service, capabilityManager),\n Effect.provideService(Plugin.Service, pluginManager),\n );\n }\n log('called client initialized callback');\n\n // TODO(wittjosiah): Remove. This is a hack to get the app to boot with the new identity after a reset.\n client.reloaded.on(() => {\n client.halo.identity.subscribe(async (identity) => {\n if (identity) {\n window.location.href = window.location.origin;\n }\n });\n });\n\n // TODO(burdon): The callback isn't called?\n const subscription = client.spaces.isReady.subscribe(async (ready) => {\n if (ready) {\n await Effect.gen(function* () {\n yield* Plugin.activate(ClientEvents.SpacesReady);\n if (onSpacesReady) {\n yield* onSpacesReady({ client });\n }\n }).pipe(\n Effect.provideService(Capability.Service, capabilityManager),\n Effect.provideService(Plugin.Service, pluginManager),\n runAndForwardErrors,\n );\n }\n });\n\n log('client capability ready');\n\n return [\n // TODO(wittjosiah): Try to remove and prefer layer?\n // Perhaps move to using layer has source of truth and add a getter capability for the client.\n Capability.contributes(ClientCapabilities.Client, client, () =>\n Effect.gen(function* () {\n subscription.unsubscribe();\n yield* Effect.tryPromise(() => client.destroy());\n }),\n ),\n Capability.contributes(Capabilities.Layer, ClientService.fromClient(client)),\n ];\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,YAAYC,cAAc;AACjD,SAASC,QAAQC,qBAAqB;AACtC,SAASC,2BAA2B;AACpC,SAASC,WAAW;;AAUpB,IAAA,iBAAeC,WAAWC,WACjBC,kBAAW,WAAW,EAAEC,qBAAqBC,eAAe,GAAGC,QAAAA,GAAkC;AACtG,QAAMC,oBAAoB,OAAON,WAAWO;AAC5C,QAAMC,gBAAgB,OAAOC,OAAOF;AAEpCG,MAAI,mBAAA,QAAA;;;;;;AACJ,QAAMC,SAAS,IAAIC,OAAOP,OAAAA;AAC1BK,MAAI,uBAAA,QAAA;;;;;;AACJ,SAAcG,kBAAW,MAAMF,OAAOG,WAAU,CAAA;AAChDJ,MAAI,sBAAA,QAAA;;;;;;AACJ,MAAIP,qBAAqB;AACvB,WAAOA,oBAAoB;MAAEQ;IAAO,CAAA,EAAGI,KAC9BC,sBAAehB,WAAWO,SAASD,iBAAAA,GACnCU,sBAAeP,OAAOF,SAASC,aAAAA,CAAAA;EAE1C;AACAE,MAAI,sCAAA,QAAA;;;;;;AAGJC,SAAOM,SAASC,GAAG,MAAA;AACjBP,WAAOQ,KAAKC,SAASC,UAAU,OAAOD,aAAAA;AACpC,UAAIA,UAAU;AACZE,eAAOC,SAASC,OAAOF,OAAOC,SAASE;MACzC;IACF,CAAA;EACF,CAAA;AAGA,QAAMC,eAAef,OAAOgB,OAAOC,QAAQP,UAAU,OAAOQ,UAAAA;AAC1D,QAAIA,OAAO;AACT,YAAaC,WAAI,aAAA;AACf,eAAOrB,OAAOsB,SAASC,aAAaC,WAAW;AAC/C,YAAI7B,eAAe;AACjB,iBAAOA,cAAc;YAAEO;UAAO,CAAA;QAChC;MACF,CAAA,EAAGI,KACMC,sBAAehB,WAAWO,SAASD,iBAAAA,GACnCU,sBAAeP,OAAOF,SAASC,aAAAA,GACtC0B,mBAAAA;IAEJ;EACF,CAAA;AAEAxB,MAAI,2BAAA,QAAA;;;;;;AAEJ,SAAO;;;IAGLV,WAAWmC,YAAYC,mBAAmBxB,QAAQD,QAAQ,MACjDmB,WAAI,aAAA;AACTJ,mBAAaW,YAAW;AACxB,aAAcxB,kBAAW,MAAMF,OAAO2B,QAAO,CAAA;IAC/C,CAAA,CAAA;IAEFtC,WAAWmC,YAAYI,aAAaC,OAAOC,cAAcC,WAAW/B,MAAAA,CAAAA;;AAExE,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "Plugin", "Client", "ClientService", "runAndForwardErrors", "log", "Capability", "makeModule", "fnUntraced", "onClientInitialized", "onSpacesReady", "options", "capabilityManager", "Service", "pluginManager", "Plugin", "log", "client", "Client", "tryPromise", "initialize", "pipe", "provideService", "reloaded", "on", "halo", "identity", "subscribe", "window", "location", "href", "origin", "subscription", "spaces", "isReady", "ready", "gen", "activate", "ClientEvents", "SpacesReady", "runAndForwardErrors", "contributes", "ClientCapabilities", "unsubscribe", "destroy", "Capabilities", "Layer", "ClientService", "fromClient"]
|
|
7
|
+
}
|
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "./chunk-PFY3EQPI.mjs";
|
|
2
|
+
Client,
|
|
3
|
+
OperationResolver,
|
|
4
|
+
SchemaDefs
|
|
5
|
+
} from "./chunk-4XYOOXAH.mjs";
|
|
7
6
|
import {
|
|
8
7
|
Account,
|
|
9
|
-
ClientAction
|
|
10
|
-
|
|
8
|
+
ClientAction,
|
|
9
|
+
ClientCapabilities,
|
|
10
|
+
ClientEvents,
|
|
11
|
+
ClientOperation
|
|
12
|
+
} from "./chunk-DPAXDXMK.mjs";
|
|
11
13
|
import {
|
|
12
14
|
meta
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
|
|
15
|
-
// src/capabilities/index.ts
|
|
16
|
-
import { lazy } from "@dxos/app-framework";
|
|
17
|
-
var AppGraphBuilder = lazy(async () => import("./app-graph-builder-LUY3BJGC.mjs"));
|
|
18
|
-
var Client = lazy(async () => import("./client-5PWEJ3U6.mjs"));
|
|
19
|
-
var IntentResolver = lazy(async () => import("./intent-resolver-L5NVP2G3.mjs"));
|
|
20
|
-
var Migrations = lazy(async () => import("./migrations-MWQCO5KY.mjs"));
|
|
21
|
-
var ReactContext = lazy(async () => import("./react-context-S4SRYUVY.mjs"));
|
|
22
|
-
var ReactSurface = lazy(async () => import("./react-surface-6PV7RVQN.mjs"));
|
|
23
|
-
var SchemaDefs = lazy(async () => import("./schema-defs-E3USCMH3.mjs"));
|
|
15
|
+
} from "./chunk-N2GMSVDQ.mjs";
|
|
24
16
|
|
|
25
17
|
// src/ClientPlugin.ts
|
|
26
|
-
import {
|
|
18
|
+
import { ActivationEvent, ActivationEvents, Capability as Capability5, Plugin } from "@dxos/app-framework";
|
|
19
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
20
|
+
|
|
21
|
+
// src/capabilities/app-graph-builder/index.ts
|
|
22
|
+
import { Capability } from "@dxos/app-framework";
|
|
23
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("./app-graph-builder-QJWFLYZE.mjs"));
|
|
24
|
+
|
|
25
|
+
// src/capabilities/migrations/index.ts
|
|
26
|
+
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
27
|
+
var Migrations = Capability2.lazy("Migrations", () => import("./migrations-HLHRMOW6.mjs"));
|
|
28
|
+
|
|
29
|
+
// src/capabilities/react-context/index.ts
|
|
30
|
+
import { Capability as Capability3 } from "@dxos/app-framework";
|
|
31
|
+
var ReactContext = Capability3.lazy("ReactContext", () => import("./react-context-E7TAJMDK.mjs"));
|
|
32
|
+
|
|
33
|
+
// src/capabilities/react-surface/index.ts
|
|
34
|
+
import { Capability as Capability4 } from "@dxos/app-framework";
|
|
35
|
+
var ReactSurface = Capability4.lazy("ReactSurface", () => import("./react-surface-L5A2LBFE.mjs"));
|
|
27
36
|
|
|
28
37
|
// src/translations.ts
|
|
29
|
-
|
|
38
|
+
import { translations as shellTranslations } from "@dxos/shell/react";
|
|
39
|
+
var pluginTranslations = [
|
|
30
40
|
{
|
|
31
41
|
"en-US": {
|
|
32
42
|
[meta.id]: {
|
|
33
|
-
"account label": "User
|
|
43
|
+
"account label": "User profile",
|
|
34
44
|
"profile label": "Profile",
|
|
35
45
|
"profile description": "You can adjust how your user settings here.",
|
|
36
46
|
"devices label": "Devices",
|
|
@@ -49,7 +59,7 @@ var translations = [
|
|
|
49
59
|
"display name description": "Your name as it appears in the app.",
|
|
50
60
|
"display name input placeholder": "Enter a name",
|
|
51
61
|
"icon label": "Avatar",
|
|
52
|
-
"icon description": "The emoji used to represent
|
|
62
|
+
"icon description": "The emoji used to represent the user.",
|
|
53
63
|
"hue label": "Color",
|
|
54
64
|
"hue description": "The color used to represent you in the app, including as your avatar\u2019s background, your cursor as it appears to others, and the messages you send in group threads.",
|
|
55
65
|
"did label": "DID",
|
|
@@ -77,79 +87,62 @@ var translations = [
|
|
|
77
87
|
}
|
|
78
88
|
}
|
|
79
89
|
];
|
|
90
|
+
var translations = [
|
|
91
|
+
...pluginTranslations,
|
|
92
|
+
...shellTranslations
|
|
93
|
+
];
|
|
80
94
|
|
|
81
95
|
// src/ClientPlugin.ts
|
|
82
|
-
var ClientPlugin =
|
|
96
|
+
var ClientPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
97
|
+
activate: AppGraphBuilder
|
|
98
|
+
}), AppPlugin.addOperationResolverModule({
|
|
99
|
+
activate: OperationResolver
|
|
100
|
+
}), AppPlugin.addReactContextModule({
|
|
101
|
+
activate: ReactContext
|
|
102
|
+
}), AppPlugin.addTranslationsModule({
|
|
103
|
+
translations
|
|
104
|
+
}), Plugin.addModule((options) => {
|
|
105
|
+
return {
|
|
106
|
+
id: Capability5.getModuleTag(Client),
|
|
107
|
+
activatesOn: ActivationEvent.oneOf(ActivationEvents.Startup, AppActivationEvents.SetupAppGraph),
|
|
108
|
+
activatesAfter: [
|
|
109
|
+
ClientEvents.ClientReady
|
|
110
|
+
],
|
|
111
|
+
activate: () => Client(options)
|
|
112
|
+
};
|
|
113
|
+
}), Plugin.addModule({
|
|
114
|
+
activatesOn: ClientEvents.ClientReady,
|
|
115
|
+
activatesBefore: [
|
|
116
|
+
AppActivationEvents.SetupSchema
|
|
117
|
+
],
|
|
118
|
+
activate: SchemaDefs
|
|
119
|
+
}), Plugin.addModule({
|
|
120
|
+
activatesOn: ClientEvents.ClientReady,
|
|
121
|
+
activatesBefore: [
|
|
122
|
+
ClientEvents.SetupMigration
|
|
123
|
+
],
|
|
124
|
+
activate: Migrations
|
|
125
|
+
}), Plugin.addModule(({ shareableLinkOrigin = typeof window !== "undefined" ? window.location.origin : "http://localhost", invitationPath = "/", invitationProp = "deviceInvitationCode", onReset }) => {
|
|
83
126
|
const createInvitationUrl = (invitationCode) => {
|
|
84
|
-
const baseUrl = new URL(
|
|
85
|
-
baseUrl.searchParams.set(
|
|
127
|
+
const baseUrl = new URL(invitationPath || "/", shareableLinkOrigin);
|
|
128
|
+
baseUrl.searchParams.set(invitationProp, invitationCode);
|
|
86
129
|
return baseUrl.toString();
|
|
87
130
|
};
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
],
|
|
95
|
-
activate: (context) => Client({
|
|
96
|
-
...options,
|
|
97
|
-
context
|
|
98
|
-
})
|
|
99
|
-
}),
|
|
100
|
-
defineModule({
|
|
101
|
-
id: `${meta.id}/module/schema`,
|
|
102
|
-
activatesOn: ClientEvents.ClientReady,
|
|
103
|
-
activatesBefore: [
|
|
104
|
-
ClientEvents.SetupSchema
|
|
105
|
-
],
|
|
106
|
-
activate: SchemaDefs
|
|
107
|
-
}),
|
|
108
|
-
defineModule({
|
|
109
|
-
id: `${meta.id}/module/migration`,
|
|
110
|
-
activatesOn: ClientEvents.ClientReady,
|
|
111
|
-
activatesBefore: [
|
|
112
|
-
ClientEvents.SetupMigration
|
|
113
|
-
],
|
|
114
|
-
activate: Migrations
|
|
115
|
-
}),
|
|
116
|
-
defineModule({
|
|
117
|
-
id: `${meta.id}/module/react-context`,
|
|
118
|
-
activatesOn: Events.Startup,
|
|
119
|
-
activate: ReactContext
|
|
120
|
-
}),
|
|
121
|
-
defineModule({
|
|
122
|
-
id: `${meta.id}/module/react-surface`,
|
|
123
|
-
activatesOn: Events.SetupReactSurface,
|
|
124
|
-
activate: () => ReactSurface({
|
|
125
|
-
createInvitationUrl,
|
|
126
|
-
onReset
|
|
127
|
-
})
|
|
128
|
-
}),
|
|
129
|
-
defineModule({
|
|
130
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
131
|
-
activatesOn: Events.SetupAppGraph,
|
|
132
|
-
activate: AppGraphBuilder
|
|
133
|
-
}),
|
|
134
|
-
defineModule({
|
|
135
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
136
|
-
activatesOn: Events.SetupIntentResolver,
|
|
137
|
-
activate: (context) => IntentResolver({
|
|
138
|
-
context
|
|
139
|
-
})
|
|
140
|
-
}),
|
|
141
|
-
defineModule({
|
|
142
|
-
id: `${meta.id}/module/translations`,
|
|
143
|
-
activatesOn: Events.SetupTranslations,
|
|
144
|
-
activate: () => contributes(Capabilities.Translations, translations)
|
|
131
|
+
return {
|
|
132
|
+
id: Capability5.getModuleTag(ReactSurface),
|
|
133
|
+
activatesOn: ActivationEvents.SetupReactSurface,
|
|
134
|
+
activate: () => ReactSurface({
|
|
135
|
+
createInvitationUrl,
|
|
136
|
+
onReset
|
|
145
137
|
})
|
|
146
|
-
|
|
147
|
-
});
|
|
138
|
+
};
|
|
139
|
+
}), Plugin.make);
|
|
148
140
|
export {
|
|
149
141
|
Account,
|
|
150
142
|
ClientAction,
|
|
151
143
|
ClientCapabilities,
|
|
152
144
|
ClientEvents,
|
|
145
|
+
ClientOperation,
|
|
153
146
|
ClientPlugin,
|
|
154
147
|
meta
|
|
155
148
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/index.ts", "../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../src/ClientPlugin.ts", "../../../src/capabilities/app-graph-builder/index.ts", "../../../src/capabilities/migrations/index.ts", "../../../src/capabilities/react-context/index.ts", "../../../src/capabilities/react-surface/index.ts", "../../../src/translations.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent, ActivationEvents, Capability, Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\n\nimport {\n AppGraphBuilder,\n Client,\n Migrations,\n OperationResolver,\n ReactContext,\n ReactSurface,\n SchemaDefs,\n} from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { ClientEvents } from './types';\nimport { type ClientPluginOptions } from './types';\n\nexport const ClientPlugin = Plugin.define<ClientPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationResolverModule({ activate: OperationResolver }),\n AppPlugin.addReactContextModule({ activate: ReactContext }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule((options) => {\n return {\n id: Capability.getModuleTag(Client),\n activatesOn: ActivationEvent.oneOf(ActivationEvents.Startup, AppActivationEvents.SetupAppGraph),\n activatesAfter: [ClientEvents.ClientReady],\n activate: () => Client(options),\n };\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [AppActivationEvents.SetupSchema],\n activate: SchemaDefs,\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n activatesBefore: [ClientEvents.SetupMigration],\n activate: Migrations,\n }),\n Plugin.addModule(\n ({\n shareableLinkOrigin = typeof window !== 'undefined' ? window.location.origin : 'http://localhost',\n invitationPath = '/',\n invitationProp = 'deviceInvitationCode',\n onReset,\n }) => {\n const createInvitationUrl = (invitationCode: string) => {\n const baseUrl = new URL(invitationPath || '/', shareableLinkOrigin);\n baseUrl.searchParams.set(invitationProp, invitationCode);\n return baseUrl.toString();\n };\n\n return {\n id: Capability.getModuleTag(ReactSurface),\n activatesOn: ActivationEvents.SetupReactSurface,\n activate: () => ReactSurface({ createInvitationUrl, onReset }),\n };\n },\n ),\n Plugin.make,\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const Migrations = Capability.lazy('Migrations', () => import('./migrations'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactContext = Capability.lazy('ReactContext', () => import('./react-context'));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\nimport { translations as shellTranslations } from '@dxos/shell/react';\n\nimport { meta } from './meta';\n\nconst pluginTranslations = [\n {\n 'en-US': {\n [meta.id]: {\n 'account label': 'User profile',\n 'profile label': 'Profile',\n 'profile description': 'You can adjust how your user settings here.',\n 'devices label': 'Devices',\n 'devices verbose label': 'Manage devices',\n 'add device description':\n 'Authenticating another device is a two-step process. To get started, create a code using the button below.',\n 'devices description':\n 'You can add and remove devices, configure your agent in the cloud, reset this device, or log in as a different identity here.',\n 'create device invitation label': 'Create code',\n 'qr code description':\n 'Scan this QR code using the device you want to log in to, or copy the URL and share it with the new device.',\n 'security label': 'Security',\n 'reset device description': 'Log out from this device, erasing all the data on this device.',\n 'join new identity description':\n 'Log out from this device, erasing all the data currently on this device, and use a QR code or URL to log in.',\n 'recover identity description':\n 'Log out from this device, erasing all the data currently on this device, and use a passkey or recovery code to log in.',\n 'danger zone title': 'Log out',\n 'danger zone description':\n 'Because Composer is decentralized, logging out entails erasing all the data on this device. If you have any data on this device that you’d like to keep, you can log in on a separate device using a passkey or complete a peer-to-peer device invitation above.',\n 'display name label': 'Display name',\n 'display name description': 'Your name as it appears in the app.',\n 'display name input placeholder': 'Enter a name',\n 'icon label': 'Avatar',\n 'icon description': 'The emoji used to represent the user.',\n 'hue label': 'Color',\n 'hue description':\n 'The color used to represent you in the app, including as your avatar’s background, your cursor as it appears to others, and the messages you send in group threads.',\n 'did label': 'DID',\n 'did description': 'Your unique ID.',\n 'open user account label': 'Open user account',\n 'manage credentials dialog title': 'Manage Account Recovery',\n 'credentials list label': 'Recovery credentials',\n 'no credentials title': 'WARNING: There is currently no way to recover your account.',\n 'no credentials message': 'Create a recovery credential above to secure your account.',\n 'recovery setup dialog title': 'Account Security',\n 'recovery setup dialog description':\n 'In order to maintain access to your account you need to register a recovery credential. Passkeys are the recommended way to do this, they can be stored in your browser or in a password manager.',\n 'create passkey label': 'Create Passkey',\n // TODO(wittjosiah): At link to user-focused passkey information.\n // Something like https://www.tomsguide.com/news/what-are-passkeys.\n 'create passkey description':\n 'A passkey is a secure and easy to use credential that can be used to recover your account.',\n 'create recovery code label': 'Create Recovery Code',\n 'create recovery code description': 'A recovery code is 12 word phrase representing a private key.',\n 'recovery code dialog title': 'Recovery Code',\n 'recovery code dialog description':\n 'This is your identity recovery code, store it in a safe place. You can use it to recover your identity if you ever lose access to your devices.',\n 'recovery code dialog warning 1': 'NOTE: This code will not be displayed again.',\n 'recovery code dialog warning 2':\n 'It is your private key for recovering DXOS data. Anyone with this key will be able to gain access to your account.',\n 'recovery code confirmation label': 'Please confirm you have saved the code.',\n 'continue label': 'Continue',\n },\n },\n },\n] as const satisfies Resource[];\n\nexport const translations: Resource[] = [...pluginTranslations, ...shellTranslations];\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAIA,SAASA,iBAAiBC,kBAAkBC,cAAAA,aAAYC,cAAc;AACtE,SAASC,qBAAqBC,iBAAiB;;;ACD/C,SAASC,kBAAkB;AAEpB,IAAMC,kBAAkBC,WAAWC,KAAK,mBAAmB,MAAM,OAAO,kCAAA,CAAA;;;ACF/E,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,aAAaC,YAAWC,KAAK,cAAc,MAAM,OAAO,2BAAA,CAAA;;;ACFrE,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACFzE,SAASC,cAAAA,mBAAkB;AAEpB,IAAMC,eAAeC,YAAWC,KAAK,gBAAgB,MAAM,OAAO,8BAAA,CAAA;;;ACDzE,SAASC,gBAAgBC,yBAAyB;AAIlD,IAAMC,qBAAqB;EACzB;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,iBAAiB;QACjB,yBAAyB;QACzB,0BACE;QACF,uBACE;QACF,kCAAkC;QAClC,uBACE;QACF,kBAAkB;QAClB,4BAA4B;QAC5B,iCACE;QACF,gCACE;QACF,qBAAqB;QACrB,2BACE;QACF,sBAAsB;QACtB,4BAA4B;QAC5B,kCAAkC;QAClC,cAAc;QACd,oBAAoB;QACpB,aAAa;QACb,mBACE;QACF,aAAa;QACb,mBAAmB;Q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AaC,IAAIP,gBAAgBG,cAAAA;AACzC,WAAOC,QAAQI,SAAQ;EACzB;AAEA,SAAO;IACLhC,IAAIC,YAAWC,aAAa+B,YAAAA;IAC5B7B,aAAaG,iBAAiB2B;IAC9B5C,UAAU,MAAM2C,aAAa;MAAEP;MAAqBD;IAAQ,CAAA;EAC9D;AACF,CAAA,GAEFzC,OAAOmD,IAAI;",
|
|
6
|
+
"names": ["ActivationEvent", "ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "Capability", "AppGraphBuilder", "Capability", "lazy", "Capability", "Migrations", "Capability", "lazy", "Capability", "ReactContext", "Capability", "lazy", "Capability", "ReactSurface", "Capability", "lazy", "translations", "shellTranslations", "pluginTranslations", "meta", "id", "translations", "shellTranslations", "ClientPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addAppGraphModule", "activate", "AppGraphBuilder", "addOperationResolverModule", "OperationResolver", "addReactContextModule", "ReactContext", "addTranslationsModule", "translations", "addModule", "options", "id", "Capability", "getModuleTag", "Client", "activatesOn", "ActivationEvent", "oneOf", "ActivationEvents", "Startup", "AppActivationEvents", "SetupAppGraph", "activatesAfter", "ClientEvents", "ClientReady", "activatesBefore", "SetupSchema", "SchemaDefs", "SetupMigration", "Migrations", "shareableLinkOrigin", "window", "location", "origin", "invitationPath", "invitationProp", "onReset", "createInvitationUrl", "invitationCode", "baseUrl", "URL", "searchParams", "set", "toString", "ReactSurface", "SetupReactSurface", "make"]
|
|
7
7
|
}
|