@dxos/plugin-client 0.9.0 → 0.9.1-main.c7dcc2e112
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/neutral/{AccountContainer-FZ3IC6H4.mjs → AccountContainer-LIMGLO2Y.mjs} +3 -3
- package/dist/lib/neutral/AccountContainer-LIMGLO2Y.mjs.map +7 -0
- package/dist/lib/neutral/ClientPlugin.node.mjs +477 -370
- package/dist/lib/neutral/ClientPlugin.node.mjs.map +4 -4
- package/dist/lib/neutral/{DevicesContainer-6MWNUC3I.mjs → DevicesContainer-X26OGLFK.mjs} +12 -12
- package/dist/lib/neutral/DevicesContainer-X26OGLFK.mjs.map +7 -0
- package/dist/lib/neutral/{InvitationsContainer-ME722VKS.mjs → InvitationsContainer-OBBCJ7CJ.mjs} +2 -2
- package/dist/lib/neutral/InvitationsContainer-OBBCJ7CJ.mjs.map +7 -0
- package/dist/lib/neutral/{JoinDialog-2NXAKPLP.mjs → JoinDialog-4BWV4CYB.mjs} +2 -2
- package/dist/lib/neutral/JoinDialog-4BWV4CYB.mjs.map +7 -0
- package/dist/lib/neutral/{ProfileContainer-VPX3FPWG.mjs → ProfileContainer-FGS2MVWA.mjs} +2 -2
- package/dist/lib/neutral/ProfileContainer-FGS2MVWA.mjs.map +7 -0
- package/dist/lib/neutral/{RecoveryCodeDialog-EWHB6U5T.mjs → RecoveryCodeDialog-7EPNKCLB.mjs} +2 -2
- package/dist/lib/neutral/RecoveryCodeDialog-7EPNKCLB.mjs.map +7 -0
- package/dist/lib/neutral/{RecoveryCredentialsContainer-IPBGDMIA.mjs → RecoveryCredentialsContainer-SL4LYHBE.mjs} +3 -3
- package/dist/lib/neutral/RecoveryCredentialsContainer-SL4LYHBE.mjs.map +7 -0
- package/dist/lib/neutral/UsageContainer-HBPMLIK7.mjs +226 -0
- package/dist/lib/neutral/UsageContainer-HBPMLIK7.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-A74W7C36.mjs → app-graph-builder-FTXJNX37.mjs} +28 -14
- package/dist/lib/neutral/app-graph-builder-FTXJNX37.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +5 -5
- package/dist/lib/neutral/capabilities/node.mjs +3 -3
- package/dist/lib/neutral/chunk-54MDDWCV.mjs +8 -0
- package/dist/lib/neutral/{chunk-NTVDGDQ3.mjs.map → chunk-54MDDWCV.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-6G4KZLBG.mjs +28 -0
- package/dist/lib/neutral/chunk-6G4KZLBG.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-D6HPCLTS.mjs → chunk-7DEIKHB7.mjs} +16 -2
- package/dist/lib/neutral/chunk-7DEIKHB7.mjs.map +7 -0
- package/dist/lib/neutral/{chunk-TUK3ELUU.mjs → chunk-DA3LZQSD.mjs} +22 -21
- package/dist/lib/neutral/chunk-DA3LZQSD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GSKMAS3S.mjs +13 -0
- package/dist/lib/neutral/chunk-GSKMAS3S.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +10 -8
- package/dist/lib/neutral/containers/index.mjs.map +3 -3
- package/dist/lib/neutral/{create-agent-6HLW4D3A.mjs → create-agent-U567RM7Z.mjs} +3 -3
- package/dist/lib/neutral/{create-identity-JIWAR5GW.mjs → create-identity-IKN2FJ5B.mjs} +3 -3
- package/dist/lib/neutral/{create-passkey-FOXEMXGF.mjs → create-passkey-JAD3ACY7.mjs} +7 -7
- package/dist/lib/neutral/create-passkey-JAD3ACY7.mjs.map +7 -0
- package/dist/lib/neutral/{create-recovery-code-ZWDKLPH4.mjs → create-recovery-code-JZYXR4BY.mjs} +4 -4
- package/dist/lib/neutral/index.mjs +4 -4
- package/dist/lib/neutral/{join-identity-QEQFAE2S.mjs → join-identity-PJCHDNLH.mjs} +3 -3
- package/dist/lib/neutral/{layer-specs-CQLXQBQJ.mjs → layer-specs-VQCJLV33.mjs} +2 -2
- package/dist/lib/neutral/{layer-specs-CQLXQBQJ.mjs.map → layer-specs-VQCJLV33.mjs.map} +2 -2
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{navigation-handler-LU26CDFR.mjs → navigation-handler-MPJAVHWY.mjs} +3 -3
- package/dist/lib/neutral/open-usage-24I7RAFL.mjs +27 -0
- package/dist/lib/neutral/open-usage-24I7RAFL.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +2 -2
- package/dist/lib/neutral/plugin.mjs +3 -3
- package/dist/lib/neutral/{react-context-B5LXMHVM.mjs → react-context-V74T6JOJ.mjs} +2 -2
- package/dist/lib/neutral/{react-context-B5LXMHVM.mjs.map → react-context-V74T6JOJ.mjs.map} +3 -3
- package/dist/lib/neutral/{react-surface-DEKGWTCD.mjs → react-surface-HPXRA65U.mjs} +8 -3
- package/dist/lib/neutral/react-surface-HPXRA65U.mjs.map +7 -0
- package/dist/lib/neutral/{recover-identity-JNFKLCUD.mjs → recover-identity-B7YM2BR4.mjs} +3 -3
- package/dist/lib/neutral/{redeem-passkey-4SBAI4AG.mjs → redeem-passkey-4DR7GPMU.mjs} +10 -10
- package/dist/lib/neutral/redeem-passkey-4DR7GPMU.mjs.map +7 -0
- package/dist/lib/neutral/{redeem-token-POBD6TMN.mjs → redeem-token-N5MBQG3I.mjs} +3 -3
- package/dist/lib/neutral/{reset-storage-LQKUV5RA.mjs → reset-storage-K47HZTGP.mjs} +3 -3
- package/dist/lib/neutral/{share-identity-KNQ2XNXV.mjs → share-identity-YJIFDIPJ.mjs} +6 -6
- package/dist/lib/neutral/share-identity-YJIFDIPJ.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +2 -2
- package/dist/lib/neutral/testing/index.mjs.map +3 -3
- package/dist/lib/neutral/translations.mjs +24 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +1 -1
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +9 -43
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts +1 -1
- package/dist/types/src/capabilities/navigation-handler/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/node.d.ts +6 -6
- package/dist/types/src/capabilities/node.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/commands/account/index.d.ts +3 -0
- package/dist/types/src/commands/account/index.d.ts.map +1 -0
- package/dist/types/src/commands/account/login/index.d.ts +2 -0
- package/dist/types/src/commands/account/login/index.d.ts.map +1 -0
- package/dist/types/src/commands/account/login/login.d.ts +12 -0
- package/dist/types/src/commands/account/login/login.d.ts.map +1 -0
- package/dist/types/src/commands/account/logout/index.d.ts +2 -0
- package/dist/types/src/commands/account/logout/index.d.ts.map +1 -0
- package/dist/types/src/commands/account/logout/logout.d.ts +9 -0
- package/dist/types/src/commands/account/logout/logout.d.ts.map +1 -0
- package/dist/types/src/commands/halo/join/join.d.ts +1 -1
- package/dist/types/src/commands/halo/join/join.d.ts.map +1 -1
- package/dist/types/src/commands/halo/util.d.ts +4 -0
- package/dist/types/src/commands/halo/util.d.ts.map +1 -1
- package/dist/types/src/commands/index.d.ts +1 -0
- package/dist/types/src/commands/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts.map +1 -1
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/UsageContainer/UsageContainer.d.ts +7 -0
- package/dist/types/src/containers/UsageContainer/UsageContainer.d.ts.map +1 -0
- package/dist/types/src/containers/UsageContainer/UsageView.d.ts +19 -0
- package/dist/types/src/containers/UsageContainer/UsageView.d.ts.map +1 -0
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts +19 -0
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts.map +1 -0
- package/dist/types/src/containers/UsageContainer/index.d.ts +2 -0
- package/dist/types/src/containers/UsageContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -0
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +28 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-passkey.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +1 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open-usage.d.ts +5 -0
- package/dist/types/src/operations/open-usage.d.ts.map +1 -0
- package/dist/types/src/testing/initializeIdentity.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -0
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +19 -0
- package/package.json +37 -35
- package/src/ClientPlugin.node.ts +2 -2
- package/src/ClientPlugin.test.ts +1 -1
- package/src/capabilities/app-graph-builder.ts +22 -13
- package/src/capabilities/layer-specs.ts +1 -1
- package/src/capabilities/react-context.tsx +1 -1
- package/src/capabilities/react-surface.tsx +6 -0
- package/src/commands/account/index.ts +13 -0
- package/src/commands/account/login/index.ts +5 -0
- package/src/commands/account/login/login.ts +147 -0
- package/src/commands/account/logout/index.ts +5 -0
- package/src/commands/account/logout/logout.ts +49 -0
- package/src/commands/halo/create/create.ts +2 -2
- package/src/commands/halo/index.ts +6 -6
- package/src/commands/halo/join/join.ts +2 -13
- package/src/commands/halo/util.ts +24 -0
- package/src/commands/index.ts +1 -0
- package/src/constants.ts +3 -3
- package/src/containers/AccountContainer/AccountContainer.tsx +1 -1
- package/src/containers/DevicesContainer/DevicesContainer.tsx +14 -11
- package/src/containers/InvitationsContainer/InvitationsContainer.tsx +1 -1
- package/src/containers/JoinDialog/JoinDialog.tsx +1 -1
- package/src/containers/ProfileContainer/ProfileContainer.tsx +1 -1
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx +1 -1
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +2 -2
- package/src/containers/UsageContainer/UsageContainer.tsx +47 -0
- package/src/containers/UsageContainer/UsageView.stories.tsx +114 -0
- package/src/containers/UsageContainer/UsageView.tsx +238 -0
- package/src/containers/UsageContainer/index.ts +5 -0
- package/src/containers/index.ts +1 -0
- package/src/meta.ts +3 -12
- package/src/operations/create-passkey.ts +6 -4
- package/src/operations/definitions.ts +12 -1
- package/src/operations/index.ts +1 -0
- package/src/operations/open-usage.ts +24 -0
- package/src/operations/redeem-passkey.ts +7 -7
- package/src/operations/share-identity.ts +3 -3
- package/src/testing/initializeIdentity.ts +4 -2
- package/src/translations.ts +25 -1
- package/src/types/capabilities.ts +7 -5
- package/src/types/events.ts +5 -5
- package/src/types/schema.ts +23 -16
- package/dist/lib/neutral/AccountContainer-FZ3IC6H4.mjs.map +0 -7
- package/dist/lib/neutral/DevicesContainer-6MWNUC3I.mjs.map +0 -7
- package/dist/lib/neutral/InvitationsContainer-ME722VKS.mjs.map +0 -7
- package/dist/lib/neutral/JoinDialog-2NXAKPLP.mjs.map +0 -7
- package/dist/lib/neutral/ProfileContainer-VPX3FPWG.mjs.map +0 -7
- package/dist/lib/neutral/RecoveryCodeDialog-EWHB6U5T.mjs.map +0 -7
- package/dist/lib/neutral/RecoveryCredentialsContainer-IPBGDMIA.mjs.map +0 -7
- package/dist/lib/neutral/app-graph-builder-A74W7C36.mjs.map +0 -7
- package/dist/lib/neutral/chunk-D6HPCLTS.mjs.map +0 -7
- package/dist/lib/neutral/chunk-JOCCVODY.mjs +0 -21
- package/dist/lib/neutral/chunk-JOCCVODY.mjs.map +0 -7
- package/dist/lib/neutral/chunk-NTVDGDQ3.mjs +0 -8
- package/dist/lib/neutral/chunk-TUK3ELUU.mjs.map +0 -7
- package/dist/lib/neutral/chunk-WWCVZG3K.mjs +0 -13
- package/dist/lib/neutral/chunk-WWCVZG3K.mjs.map +0 -7
- package/dist/lib/neutral/create-passkey-FOXEMXGF.mjs.map +0 -7
- package/dist/lib/neutral/react-surface-DEKGWTCD.mjs.map +0 -7
- package/dist/lib/neutral/redeem-passkey-4SBAI4AG.mjs.map +0 -7
- package/dist/lib/neutral/share-identity-KNQ2XNXV.mjs.map +0 -7
- /package/dist/lib/neutral/{create-agent-6HLW4D3A.mjs.map → create-agent-U567RM7Z.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-identity-JIWAR5GW.mjs.map → create-identity-IKN2FJ5B.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-recovery-code-ZWDKLPH4.mjs.map → create-recovery-code-JZYXR4BY.mjs.map} +0 -0
- /package/dist/lib/neutral/{join-identity-QEQFAE2S.mjs.map → join-identity-PJCHDNLH.mjs.map} +0 -0
- /package/dist/lib/neutral/{navigation-handler-LU26CDFR.mjs.map → navigation-handler-MPJAVHWY.mjs.map} +0 -0
- /package/dist/lib/neutral/{recover-identity-JNFKLCUD.mjs.map → recover-identity-B7YM2BR4.mjs.map} +0 -0
- /package/dist/lib/neutral/{redeem-token-POBD6TMN.mjs.map → redeem-token-N5MBQG3I.mjs.map} +0 -0
- /package/dist/lib/neutral/{reset-storage-LQKUV5RA.mjs.map → reset-storage-K47HZTGP.mjs.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/ClientPlugin.node.ts", "../../../src/commands/
|
|
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\nimport { Client, LayerSpecs, Migrations, OperationHandler, SchemaDefs } from '#capabilities';\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.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.addModule((options) => ({\n id: Capability.getModuleTag(Client),\n activatesOn: ActivationEvents.Startup,\n firesAfterActivation: [ClientEvents.ClientReady],\n activate: () => Client(options),\n })),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [AppActivationEvents.SetupSchema],\n activate: SchemaDefs,\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [ClientEvents.SetupMigration],\n activate: Migrations,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvents.SetupProcessManager,\n activate: LayerSpecs,\n }),\n Plugin.make,\n);\n\nexport default ClientPlugin;\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';\nimport { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';\n\nexport const view = Command.make(\n 'view',\n {},\n Effect.fnUntraced(function* () {\n const config = yield* ConfigService;\n const { json, profile } = yield* CommandConfig;\n const configPath = getProfileConfigPath(DX_CONFIG, profile);\n\n if (json) {\n yield* Console.log(JSON.stringify(config.values, null, 2));\n } else {\n yield* Console.log(`Path: ${configPath}`);\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 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 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 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';\nimport { Context } from '@dxos/context';\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(Context.default()));\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 { PERSONAL_SPACE_TAG } from '@dxos/app-toolkit';\nimport { CommandConfig, flushAndSync, spaceLayer } from '@dxos/cli-util';\nimport { print } from '@dxos/cli-util';\nimport { ClientService } from '@dxos/client';\nimport { invariant } from '@dxos/invariant';\nimport { EdgeReplicationSetting } from '@dxos/protocols/proto/dxos/echo/metadata';\nimport { MembershipPolicy } from '@dxos/protocols/proto/dxos/halo/credentials';\n\nimport { ClientOperation } from '#operations';\n\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 // Create personal space for the CLI identity.\n const space = yield* Effect.promise(() =>\n client.spaces.create({}, { tags: [PERSONAL_SPACE_TAG], membershipPolicy: MembershipPolicy.LOCKED }),\n );\n yield* Effect.promise(() => space.waitUntilReady());\n yield* Effect.promise(() => space.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED));\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 identityDid: identity.identityDid,\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: { identityDid: string; profile?: { displayName?: string } }) =>\n FormBuilder.make({ title: 'Identity' }).pipe(\n FormBuilder.set('identityDid', identity.identityDid),\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 } 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<Key.SpaceId>;\n timeout: number;\n delay: number;\n}) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n let credentials: Credential[];\n\n if (Option.isSome(spaceId)) {\n // If space ID was provided, get credentials from that space.\n const space = yield* getSpace(spaceId.value);\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 if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityDid: identity.did,\n displayName: identity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity({ identityDid: identity.did, profile: identity.profile })));\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 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 identityDid: identity.did,\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({ identityDid: identity.did, profile: identity.profile })));\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 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 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 identityDid: updatedIdentity.did,\n displayName: updatedIdentity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity({ identityDid: updatedIdentity.did, profile: updatedIdentity.profile })));\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 Path from '@effect/platform/Path';\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, getProfileConfigPath } 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 path = yield* Path.Path;\n const profileName = name.pipe(Option.getOrElse(() => template));\n const configPath = getProfileConfigPath(DX_CONFIG, profileName);\n if (yield* fs.exists(configPath)) {\n throw new Error(`Profile ${profileName} already exists`);\n }\n\n yield* fs.makeDirectory(path.dirname(configPath), { recursive: true });\n yield* fs.writeFileString(configPath, TEMPLATES[template]);\n if (json) {\n yield* Console.log(JSON.stringify({ name: profileName, path: configPath }, null, 2));\n } else {\n yield* Console.log(print(printProfileCreated(profileName, configPath)));\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, getProfileConfigPath } 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 const configPath = getProfileConfigPath(DX_CONFIG, profileName);\n const pluginsPath = `${DX_CONFIG}/plugins/${profileName}.yml`;\n yield* fs.remove(configPath).pipe(Effect.ignore);\n yield* fs.remove(pluginsPath).pipe(Effect.ignore);\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 entries = yield* fs.readDirectory(profileDir);\n const profileFiles = entries.filter((entry) => entry.endsWith('.yml'));\n const profiles = yield* Effect.forEach(profileFiles, (filename) =>\n Effect.gen(function* () {\n const name = filename.slice(0, -4);\n const configPath = path.join(profileDir, filename);\n const configContent = yield* fs\n .readFileString(configPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('{}')));\n const configValues = Yaml.parse(configContent) ?? {};\n const config = new Config(configValues);\n return {\n name,\n isCurrent: name === currentProfile,\n fullPath: configPath,\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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U,MAAMO,OAAOJ,OAAAA;EACzB,EAAA;EACAhB,QAAOe,UAAU;IACfM,aAAaI,aAAaC;IAC1BC,uBAAuB;MAACC,oBAAoBC;;IAC5ChB,UAAUiB;EACZ,CAAA;EACA9B,QAAOe,UAAU;IACfM,aAAaI,aAAaC;IAC1BC,uBAAuB;MAACF,aAAaM;;IACrClB,UAAUmB;EACZ,CAAA;EACAhC,QAAOe,UAAU;IACfM,aAAaC,iBAAiBW;IAC9BpB,UAAUqB;EACZ,CAAA;EACAlC,QAAOmC;AAAI;AAGb,IAAA,4BAAepC;",
|
|
6
|
-
"names": ["ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "Client", "LayerSpecs", "Migrations", "OperationHandler", "SchemaDefs", "meta", "ClientEvents", "Command", "Command", "Console", "Effect", "Yaml", "CommandConfig", "ConfigService", "DX_CONFIG", "getProfileConfigPath", "view", "make", "fnUntraced", "config", "json", "profile", "configPath", "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", "deviceKey", "kind", "platformVersion", "architecture", "osVersion", "presence", "CURRENT", "PresenceState", "printDevice", "make", "title", "pipe", "set", "build", "printDevices", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "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", "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", "device", "halo", "log", "JSON", "stringify", "error", "updatedProfile", "profile", "devicesService", "services", "DevicesService", "updatedDevice", "tryPromise", "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", "Context", "getStatus", "client", "http", "setIdentity", "status", "tryPromise", "isJson", "stringify", "problems", "problem", "error", "some", "message", "none", "edge", "make", "pipe", "withDescription", "withSubcommands", "status", "Command", "Command", "Options", "Console", "Effect", "Option", "Capabilities", "Plugin", "PERSONAL_SPACE_TAG", "CommandConfig", "flushAndSync", "spaceLayer", "print", "ClientService", "invariant", "EdgeReplicationSetting", "MembershipPolicy", "ClientOperation", "FormBuilder", "printIdentity", "identity", "make", "title", "pipe", "set", "identityDid", "profile", "displayName", "build", "__dxlog_file", "handler", "client", "ClientService", "CommandConfig", "invariant", "invoke", "manager", "capabilities", "OperationInvoker", "identity", "displayName", "Option", "getOrUndefined", "agent", "PERSONAL_SPACE_TAG", "membershipPolicy", "Effect", "space", "waitUntilReady", "flushAndSync", "provide", "json", "Console", "JSON", "identityDid", "print", "ifPresent", "Options", "withDescription", "Command", "Command", "Args", "Command", "Prompt", "Console", "Effect", "Option", "CommandConfig", "ClientService", "invariant", "schema", "__dxlog_file", "handler", "client", "credentialHex", "credential", "run", "identity", "error", "credentialBytes", "try", "Buffer", "from", "catch", "Error", "verifyError", "codec", "protoType", "fail", "credentialObj", "tryPromise", "json", "success", "stringify", "name", "withDescription", "pipe", "Command", "Options", "Console", "Duration", "Effect", "Option", "CommandConfig", "Common", "FormBuilder", "getSpace", "printList", "ClientService", "mapCredentials", "credentials", "map", "credential", "id", "toHex", "issuer", "subject", "type", "assertion", "printCredential", "make", "title", "pipe", "option", "fromNullable", "truncate", "build", "handler", "fn", "spaceId", "timeout", "delay", "json", "client", "isSome", "space", "value", "tryPromise", "internal", "getCredentials", "identity", "halo", "log", "JSON", "stringify", "error", "latch", "makeLatch", "subscription", "subscribe", "creds", "length", "runSync", "open", "await", "millis", "catchAll", "void", "ensuring", "sync", "unsubscribe", "sleep", "queryCredentials", "getOrUndefined", "formatted", "list", "text", "withDescription", "optional", "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", "identityDid", "did", "displayName", "profile", "print", "printIdentity", "make", "pipe", "withDescription", "Command", "Console", "Effect", "Option", "CommandConfig", "FormBuilder", "print", "ClientService", "handler", "fn", "json", "client", "identity", "halo", "get", "device", "log", "JSON", "stringify", "identityKey", "toHex", "deviceKey", "builder", "make", "title", "pipe", "option", "fromNullable", "truncate", "build", "keys", "withDescription", "Args", "Command", "Console", "Effect", "CommandConfig", "print", "ClientService", "invariant", "__dxlog_file", "recover", "name", "withDescription", "Effect", "CommandConfig", "client", "ClientService", "invariant", "recoveryCode", "identity", "json", "identityDid", "displayName", "Console", "profile", "Command", "Command", "Console", "Effect", "CommandConfig", "ClientService", "handler", "fn", "json", "client", "identityService", "services", "IdentityService", "log", "JSON", "stringify", "error", "result", "tryPromise", "createRecoveryCredential", "recoveryCode", "seed", "make", "pipe", "withDescription", "Command", "Options", "Console", "Effect", "CommandConfig", "print", "ClientService", "handler", "fn", "displayName", "json", "CommandConfig", "client", "ClientService", "identity", "halo", "get", "log", "JSON", "stringify", "error", "identityService", "services", "IdentityService", "updatedIdentity", "tryPromise", "updateProfile", "identityDid", "did", "profile", "print", "printIdentity", "update", "make", "text", "pipe", "withDescription", "halo", "make", "pipe", "withDescription", "withSubcommands", "create", "credential", "identity", "keys", "recover", "seed", "update", "Command", "Command", "Options", "FileSystem", "Path", "Console", "Effect", "Option", "Record", "CommandConfig", "print", "DX_CONFIG", "getProfileConfigPath", "trim", "FormBuilder", "printProfileCreated", "name", "path", "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", "path", "Path", "profileName", "getOrElse", "configPath", "getProfileConfigPath", "DX_CONFIG", "exists", "Error", "makeDirectory", "dirname", "recursive", "writeFileString", "log", "JSON", "stringify", "print", "printProfileCreated", "Command", "Options", "FileSystem", "Console", "Effect", "Option", "CommandConfig", "print", "DX_CONFIG", "getProfileConfigPath", "del", "make", "name", "text", "pipe", "withDescription", "optional", "fnUntraced", "json", "CommandConfig", "fs", "FileSystem", "profileName", "getOrElse", "configPath", "getProfileConfigPath", "DX_CONFIG", "pluginsPath", "remove", "ignore", "log", "JSON", "stringify", "deleted", "print", "printProfileDeleted", "Command", "Options", "Prompt", "FileSystem", "Path", "Console", "Effect", "Option", "CommandConfig", "ConfigService", "log", "__dxlog_file", "handler", "json", "fs", "path", "profile", "config", "createLevel", "createStorageObjects", "storageConfig", "dataDirValue", "confirmed", "initial", "pipe", "fullPath", "resolve", "persistent", "dataRoot", "JSON", "error", "try", "catch", "Error", "importProfileData", "storage", "level", "archive", "success", "entries", "dataDir", "withDescription", "force", "boolean", "Command", "Options", "FileSystem", "Console", "Effect", "CommandConfig", "FormBuilder", "print", "ProfileArchiveEntryType", "arrayToBuffer", "handler", "fn", "file", "storage", "json", "fs", "decodeProfileArchive", "promise", "data", "readFile", "archive", "log", "JSON", "stringify", "meta", "builder", "make", "title", "pipe", "when", "each", "Object", "entries", "key", "value", "set", "String", "build", "entry", "toString", "slice", "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", "entries", "readDirectory", "profileFiles", "filter", "entry", "endsWith", "profiles", "forEach", "filename", "gen", "name", "slice", "configPath", "configContent", "readFileString", "pipe", "catchTag", "succeed", "configValues", "parse", "config", "Config", "isCurrent", "fullPath", "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", "addOperationHandlerModule", "activate", "OperationHandler", "addModule", "options", "id", "Capability", "getModuleTag", "Client", "activatesOn", "ActivationEvents", "Startup", "firesAfterActivation", "ClientEvents", "ClientReady", "firesBeforeActivation", "AppActivationEvents", "SetupSchema", "SchemaDefs", "SetupMigration", "Migrations", "SetupProcessManager", "LayerSpecs", "make"]
|
|
3
|
+
"sources": ["../../../src/ClientPlugin.node.ts", "../../../src/commands/account/index.ts", "../../../src/commands/account/login/login.ts", "../../../src/commands/halo/util.ts", "../../../src/commands/account/logout/logout.ts", "../../../src/commands/config/index.ts", "../../../src/commands/config/view.ts", "../../../src/commands/device/index.ts", "../../../src/commands/device/info/info.ts", "../../../src/commands/device/util.ts", "../../../src/commands/device/list/list.ts", "../../../src/commands/device/update/update.ts", "../../../src/commands/edge/index.ts", "../../../src/commands/edge/status.ts", "../../../src/commands/halo/index.ts", "../../../src/commands/halo/credential/index.ts", "../../../src/commands/halo/credential/add/add.ts", "../../../src/commands/halo/credential/list/list.ts", "../../../src/commands/halo/identity/identity.ts", "../../../src/commands/halo/keys/keys.ts", "../../../src/commands/halo/seed/seed.ts", "../../../src/commands/halo/update/update.ts", "../../../src/commands/profile/index.ts", "../../../src/commands/profile/create.ts", "../../../src/commands/profile/util.ts", "../../../src/commands/profile/delete.ts", "../../../src/commands/profile/import.ts", "../../../src/commands/profile/inspect.ts", "../../../src/commands/profile/list.ts", "../../../src/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\nimport { Client, LayerSpecs, Migrations, OperationHandler, SchemaDefs } from '#capabilities';\nimport { meta } from '#meta';\nimport { ClientEvents } from '#types';\nimport { type ClientPluginOptions } from '#types';\n\nimport { account, 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: [account, config, device, edge, halo, profile] }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n Plugin.addModule((options) => ({\n id: Capability.getModuleTag(Client),\n activatesOn: ActivationEvents.Startup,\n firesAfterActivation: [ClientEvents.ClientReady],\n activate: () => Client(options),\n })),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [AppActivationEvents.SetupSchema],\n activate: SchemaDefs,\n }),\n Plugin.addModule({\n activatesOn: ClientEvents.ClientReady,\n firesBeforeActivation: [ClientEvents.SetupMigration],\n activate: Migrations,\n }),\n Plugin.addModule({\n activatesOn: ActivationEvents.SetupProcessManager,\n activate: LayerSpecs,\n }),\n Plugin.make,\n);\n\nexport default ClientPlugin;\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Command from '@effect/cli/Command';\n\nimport { login } from './login';\nimport { logout } from './logout';\n\nexport const account: Command.Command<any, any, any, any> = Command.make('account').pipe(\n Command.withDescription('Log in and out of a DXOS identity.'),\n Command.withSubcommands([login, logout]),\n);\n", "//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Args from '@effect/cli/Args';\nimport * as Command from '@effect/cli/Command';\nimport * as Options from '@effect/cli/Options';\nimport * as Prompt from '@effect/cli/Prompt';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\nimport * as Match from 'effect/Match';\nimport * as Option from 'effect/Option';\n\nimport { CommandConfig, performRecoveryOAuthFlow, print } from '@dxos/cli-util';\nimport { type Client, ClientService } from '@dxos/client';\nimport { Invitation, InvitationEncoder } from '@dxos/client/invitations';\nimport { Context as DxContext } from '@dxos/context';\nimport { HubHttpClient } from '@dxos/edge-client';\nimport { invariant } from '@dxos/invariant';\nimport { ATPROTO_OAUTH_SCOPES, OAuthProvider } from '@dxos/protocols';\n\nimport { printIdentity, waitForState } from '../../halo/util';\n\ntype LoginMethod = 'email' | 'atproto' | 'device-invitation' | 'recovery-code';\n\nconst LOGIN_METHODS: LoginMethod[] = ['email', 'atproto', 'device-invitation', 'recovery-code'];\n\nconst METHOD_CHOICES = [\n { title: 'Email', value: 'email' as const },\n { title: 'AT Protocol', value: 'atproto' as const },\n { title: 'Device invitation', value: 'device-invitation' as const },\n { title: 'Recovery code', value: 'recovery-code' as const },\n];\n\nconst INPUT_PROMPT: Record<LoginMethod, string> = {\n email: 'Email address',\n atproto: 'atproto handle or DID (e.g. alice.bsky.social)',\n 'device-invitation': 'Invitation code or URL',\n 'recovery-code': 'Recovery code (seed phrase)',\n};\n\nexport const login = Command.make(\n 'login',\n {\n method: Options.choice('method', LOGIN_METHODS).pipe(\n Options.withDescription(\n 'Login method (email | atproto | device-invitation | recovery-code). Prompted if omitted.',\n ),\n Options.optional,\n ),\n input: Args.text({ name: 'input' }).pipe(\n Args.withDescription('Method input: email address / atproto handle / invitation code / recovery code.'),\n Args.optional,\n ),\n },\n Effect.fn(function* ({ method, input }) {\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(), 'Already logged in. Run `dx account logout` first.');\n\n const resolvedMethod: LoginMethod = Option.isSome(method)\n ? method.value\n : yield* Prompt.select({ message: 'Choose a login method:', choices: METHOD_CHOICES }).pipe(Prompt.run);\n\n const resolvedInput = Option.isSome(input)\n ? input.value\n : yield* Prompt.text({ message: `${INPUT_PROMPT[resolvedMethod]}:` }).pipe(Prompt.run);\n\n const identity = yield* Match.value(resolvedMethod).pipe(\n Match.when('atproto', () => loginWithAtproto(client, resolvedInput)),\n Match.when('email', () => loginWithEmail(client, resolvedInput)),\n Match.when('recovery-code', () => loginWithRecoveryCode(client, resolvedInput)),\n Match.when('device-invitation', () => loginWithDeviceInvitation(client, resolvedInput)),\n Match.exhaustive,\n );\n\n if (json) {\n yield* Console.log(\n JSON.stringify({ identityDid: identity.did, displayName: identity.profile?.displayName }, null, 2),\n );\n } else {\n yield* Console.log('Logged in successfully');\n yield* Console.log(print(printIdentity({ identityDid: identity.did, profile: identity.profile })));\n }\n }),\n).pipe(Command.withDescription('Log in to an existing DXOS identity (same methods as Composer).'));\n\n/**\n * atproto / Bluesky OAuth login: runs the gate recovery flow (local server + browser) and redeems\n * the resulting one-time `recoveryProof` to admit this device into the existing identity's HALO.\n */\nconst loginWithAtproto = (client: Client, handle: string) =>\n Effect.gen(function* () {\n const edgeBaseUrl = client.config.values.runtime?.services?.edge?.url;\n invariant(edgeBaseUrl, 'Edge services not configured (runtime.services.edge.url).');\n const { recoveryProof } = yield* performRecoveryOAuthFlow({\n edgeBaseUrl,\n provider: OAuthProvider.ATPROTO,\n scopes: ATPROTO_OAUTH_SCOPES,\n loginHint: handle,\n });\n return yield* Effect.tryPromise(() => client.halo.recoverIdentity({ recoveryProof }));\n });\n\n/** Recovery-code (seed phrase) login. */\nconst loginWithRecoveryCode = (client: Client, recoveryCode: string) =>\n Effect.tryPromise(() => client.halo.recoverIdentity({ recoveryCode }));\n\n/**\n * Email login: hub-service inlines a one-time `token` for test emails and emails it out-of-band\n * otherwise. Redeems the token to admit this device into HALO.\n */\nconst loginWithEmail = (client: Client, email: string) =>\n Effect.gen(function* () {\n const hubUrl = client.config.values?.runtime?.app?.env?.DX_HUB_URL;\n invariant(hubUrl, 'Hub URL not configured (runtime.app.env.DX_HUB_URL).');\n const hub = new HubHttpClient(hubUrl);\n const { token: inlineToken } = yield* Effect.tryPromise(() => hub.login(DxContext.default(), { email }));\n let token = inlineToken;\n if (!token) {\n yield* Console.log(`A login link was sent to ${email}. Paste the token from the email below.`);\n token = yield* Prompt.text({ message: 'Login token' }).pipe(Prompt.run);\n }\n return yield* Effect.tryPromise(() => client.halo.recoverIdentity({ token }));\n });\n\n/**\n * Device-invitation login: joins an existing identity from another authorized device.\n *\n * NOTE: p2p networking does not work in bun — this method will likely hang waiting for the peer.\n */\nconst loginWithDeviceInvitation = (client: Client, encoded: string) =>\n Effect.gen(function* () {\n let code = encoded;\n if (code.startsWith('http') || code.startsWith('socket')) {\n code = new URL(code).searchParams.get('deviceInvitationCode') ?? code;\n }\n const invitation = client.halo.join(InvitationEncoder.decode(code));\n yield* waitForState(invitation, Invitation.State.READY_FOR_AUTHENTICATION);\n const authCode = yield* Prompt.text({ message: 'Enter the authentication code' }).pipe(Prompt.run);\n yield* Effect.tryPromise(() => invitation.authenticate(authCode));\n yield* waitForState(invitation, Invitation.State.SUCCESS);\n const identity = client.halo.identity.get();\n invariant(identity, 'Device invitation completed but no identity is present.');\n return identity;\n });\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Duration from 'effect/Duration';\nimport * as Effect from 'effect/Effect';\n\nimport { FormBuilder } from '@dxos/cli-util';\nimport { type AuthenticatingInvitationObservable, Invitation } from '@dxos/client/invitations';\n\n/**\n * Pretty prints an identity with ANSI colors.\n */\nexport const printIdentity = (identity: { identityDid: string; profile?: { displayName?: string } }) =>\n FormBuilder.make({ title: 'Identity' }).pipe(\n FormBuilder.set('identityDid', identity.identityDid),\n FormBuilder.set('displayName', identity.profile?.displayName ?? '<none>'),\n FormBuilder.build,\n );\n\nconst TERMINAL_FAILURE_STATES = new Set([\n Invitation.State.CANCELLED,\n Invitation.State.TIMEOUT,\n Invitation.State.ERROR,\n Invitation.State.EXPIRED,\n]);\n\n/** Await an authenticating invitation reaching the given state. */\nexport const waitForState = (invitation: AuthenticatingInvitationObservable, state: Invitation.State) =>\n Effect.async<void, Error>((resume) => {\n const subscription = invitation.subscribe((inv) => {\n if (inv.state === state) {\n resume(Effect.void);\n } else if (TERMINAL_FAILURE_STATES.has(inv.state!)) {\n resume(Effect.fail(new Error(`Invitation failed with state: ${Invitation.State[inv.state!]}`)));\n }\n });\n return Effect.sync(() => subscription.unsubscribe());\n }).pipe(Effect.timeout(Duration.minutes(3)));\n", "//\n// Copyright 2026 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 Error from '@effect/platform/Error';\nimport * as FileSystem from '@effect/platform/FileSystem';\nimport * as Console from 'effect/Console';\nimport * as Effect from 'effect/Effect';\n\nimport { CommandConfig } from '@dxos/cli-util';\nimport { DX_DATA, getProfilePath } from '@dxos/client-protocol';\nimport { ConfigService } from '@dxos/config';\n\nexport const logout = Command.make(\n 'logout',\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: `Log out of profile (${profile})? This removes the local identity and data; spaces re-sync on next login.`,\n initial: false,\n }).pipe(Prompt.run);\n if (!confirmed) {\n return;\n }\n }\n\n yield* fs.remove(path, { recursive: true }).pipe(\n Effect.catchIf(\n (e): e is Error.SystemError => e._tag === 'SystemError' && e.reason === 'NotFound',\n () => Effect.void,\n ),\n );\n if (json) {\n yield* Console.log(JSON.stringify({ profile, loggedOut: true }, null, 2));\n } else {\n yield* Console.log(`Logged out of profile (${profile}).`);\n }\n }),\n).pipe(Command.withDescription('Log out of the current profile (clears the local identity and data).'));\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';\nimport { DX_CONFIG, getProfileConfigPath } from '@dxos/client-protocol';\n\nexport const view = Command.make(\n 'view',\n {},\n Effect.fnUntraced(function* () {\n const config = yield* ConfigService;\n const { json, profile } = yield* CommandConfig;\n const configPath = getProfileConfigPath(DX_CONFIG, profile);\n\n if (json) {\n yield* Console.log(JSON.stringify(config.values, null, 2));\n } else {\n yield* Console.log(`Path: ${configPath}`);\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 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 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 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';\nimport { Context } from '@dxos/context';\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(Context.default()));\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 { credential } from './credential';\nimport { identity } from './identity';\nimport { keys } from './keys';\nimport { seed } from './seed';\nimport { update } from './update';\n\n// `create`, `join`, and `recover` are superseded by `dx account login`, which logs in to an\n// existing identity via the same methods as Composer (email / atproto / device-invitation /\n// recovery-code). Note: `join` was omitted and the `device-invitation` login method may hang —\n// both rely on p2p networking which does not work in bun.\n\nexport const halo: Command.Command<any, any, any, any> = Command.make('halo').pipe(\n Command.withDescription('Manage HALO identity.'),\n Command.withSubcommands([credential, identity, keys, seed, update]),\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 } 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<Key.SpaceId>;\n timeout: number;\n delay: number;\n}) {\n const { json } = yield* CommandConfig;\n const client = yield* ClientService;\n let credentials: Credential[];\n\n if (Option.isSome(spaceId)) {\n // If space ID was provided, get credentials from that space.\n const space = yield* getSpace(spaceId.value);\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 if (json) {\n yield* Console.log(\n JSON.stringify(\n {\n identityDid: identity.did,\n displayName: identity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity({ identityDid: identity.did, profile: identity.profile })));\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 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 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 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 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 identityDid: updatedIdentity.did,\n displayName: updatedIdentity.profile?.displayName,\n },\n null,\n 2,\n ),\n );\n } else {\n yield* Console.log(print(printIdentity({ identityDid: updatedIdentity.did, profile: updatedIdentity.profile })));\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 Path from '@effect/platform/Path';\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, getProfileConfigPath } 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 path = yield* Path.Path;\n const profileName = name.pipe(Option.getOrElse(() => template));\n const configPath = getProfileConfigPath(DX_CONFIG, profileName);\n if (yield* fs.exists(configPath)) {\n throw new Error(`Profile ${profileName} already exists`);\n }\n\n yield* fs.makeDirectory(path.dirname(configPath), { recursive: true });\n yield* fs.writeFileString(configPath, TEMPLATES[template]);\n if (json) {\n yield* Console.log(JSON.stringify({ name: profileName, path: configPath }, null, 2));\n } else {\n yield* Console.log(print(printProfileCreated(profileName, configPath)));\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, getProfileConfigPath } 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 const configPath = getProfileConfigPath(DX_CONFIG, profileName);\n const pluginsPath = `${DX_CONFIG}/plugins/${profileName}.yml`;\n yield* fs.remove(configPath).pipe(Effect.ignore);\n yield* fs.remove(pluginsPath).pipe(Effect.ignore);\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 entries = yield* fs.readDirectory(profileDir);\n const profileFiles = entries.filter((entry) => entry.endsWith('.yml'));\n const profiles = yield* Effect.forEach(profileFiles, (filename) =>\n Effect.gen(function* () {\n const name = filename.slice(0, -4);\n const configPath = path.join(profileDir, filename);\n const configContent = yield* fs\n .readFileString(configPath)\n .pipe(Effect.catchTag('SystemError', () => Effect.succeed('{}')));\n const configValues = Yaml.parse(configContent) ?? {};\n const config = new Config(configValues);\n return {\n name,\n isCurrent: name === currentProfile,\n fullPath: configPath,\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,cAAc;AACrD,SAASC,qBAAqBC,iBAAiB;AAE/C,SAASC,QAAQC,YAAYC,YAAYC,kBAAkBC,kBAAkB;AAC7E,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACL7B,YAAYC,cAAa;;;ACAzB,YAAYC,UAAU;AACtB,YAAYC,aAAa;AACzB,YAAYC,aAAa;AACzB,YAAYC,YAAY;AACxB,YAAYC,aAAa;AACzB,YAAYC,aAAY;AACxB,YAAYC,WAAW;AACvB,YAAYC,YAAY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DrE,IAAMC,eAAeC,OAAOC,OAA4BC,IAAAA,EAAMC;;EAEnEC,UAAUC,iBAAiB;IAAEC,UAAU;MAACC;MAASC;MAAQC;MAAQC;MAAMC;MAAMC;;EAAS,CAAA;EACtFR,UAAUS,0BAA0B;IAAEC,UAAUC;EAAiB,CAAA;EACjEf,OAAOgB,UAAU,CAACC,aAAa;IAC7BC,IAAIC,WAAWC,aAAaC,MAAAA;IAC5BC,aAAaC,iBAAiBC;IAC9BC,sBAAsB;MAACC,aAAaC;;IACpCb,UAAU,MAAMO,OAAOJ,OAAAA;EACzB,EAAA;EACAjB,OAAOgB,UAAU;IACfM,aAAaI,aAAaC;IAC1BC,uBAAuB;MAACC,oBAAoBC;;IAC5ChB,UAAUiB;EACZ,CAAA;EACA/B,OAAOgB,UAAU;IACfM,aAAaI,aAAaC;IAC1BC,uBAAuB;MAACF,aAAaM;;IACrClB,UAAUmB;EACZ,CAAA;EACAjC,OAAOgB,UAAU;IACfM,aAAaC,iBAAiBW;IAC9BpB,UAAUqB;EACZ,CAAA;EACAnC,OAAOoC;AAAI;AAGb,IAAA,4BAAerC;",
|
|
6
|
+
"names": ["ActivationEvents", "Capability", "Plugin", "AppActivationEvents", "AppPlugin", "Client", "LayerSpecs", "Migrations", "OperationHandler", "SchemaDefs", "meta", "ClientEvents", "Command", "Args", "Command", "Options", "Prompt", "Console", "Effect", "Match", "Option", "CommandConfig", "performRecoveryOAuthFlow", "print", "ClientService", "Invitation", "InvitationEncoder", "Context", "DxContext", "HubHttpClient", "invariant", "ATPROTO_OAUTH_SCOPES", "OAuthProvider", "Duration", "Effect", "FormBuilder", "Invitation", "printIdentity", "identity", "make", "title", "pipe", "set", "identityDid", "profile", "displayName", "build", "TERMINAL_FAILURE_STATES", "Set", "State", "CANCELLED", "TIMEOUT", "ERROR", "EXPIRED", "waitForState", "invitation", "state", "async", "resume", "subscription", "subscribe", "inv", "void", "has", "fail", "Error", "sync", "unsubscribe", "timeout", "minutes", "LOGIN_METHODS", "atproto", "Command", "input", "Args", "withDescription", "Effect", "CommandConfig", "client", "ClientService", "invariant", "message", "choices", "METHOD_CHOICES", "pipe", "Prompt", "resolvedInput", "INPUT_PROMPT", "identity", "Match", "resolvedMethod", "Console", "stringify", "identityDid", "displayName", "profile", "edgeBaseUrl", "recoveryProof", "performRecoveryOAuthFlow", "provider", "OAuthProvider", "ATPROTO", "scopes", "loginHint", "handle", "hub", "HubHttpClient", "hubUrl", "token", "inlineToken", "DxContext", "default", "email", "tryPromise", "code", "startsWith", "invitation", "InvitationEncoder", "authCode", "text", "Invitation", "run", "waitForState", "halo", "get", "Command", "Options", "Prompt", "FileSystem", "Console", "Effect", "CommandConfig", "DX_DATA", "getProfilePath", "ConfigService", "logout", "make", "force", "boolean", "ifPresent", "pipe", "withDescription", "fnUntraced", "fs", "config", "json", "profile", "path", "values", "runtime", "client", "storage", "dataRoot", "confirmed", "confirm", "message", "initial", "run", "remove", "recursive", "catchIf", "e", "_tag", "reason", "void", "log", "JSON", "stringify", "loggedOut", "account", "make", "pipe", "withDescription", "withSubcommands", "login", "logout", "Command", "Command", "Console", "Effect", "Yaml", "CommandConfig", "ConfigService", "DX_CONFIG", "getProfileConfigPath", "view", "make", "fnUntraced", "config", "json", "profile", "configPath", "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", "deviceKey", "kind", "platformVersion", "architecture", "osVersion", "presence", "CURRENT", "PresenceState", "printDevice", "make", "title", "pipe", "set", "build", "printDevices", "handler", "fn", "json", "CommandConfig", "client", "ClientService", "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", "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", "device", "halo", "log", "JSON", "stringify", "error", "updatedProfile", "profile", "devicesService", "services", "DevicesService", "updatedDevice", "tryPromise", "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", "Context", "__dxlog_file", "getStatus", "client", "http", "setIdentity", "status", "tryPromise", "isJson", "stringify", "problems", "problem", "error", "some", "message", "none", "edge", "make", "pipe", "withDescription", "withSubcommands", "status", "Command", "Command", "Args", "Command", "Prompt", "Console", "Effect", "Option", "CommandConfig", "ClientService", "invariant", "schema", "__dxlog_file", "handler", "client", "credentialHex", "credential", "run", "identity", "error", "credentialBytes", "try", "Buffer", "from", "catch", "Error", "verifyError", "codec", "protoType", "fail", "credentialObj", "tryPromise", "json", "success", "stringify", "name", "withDescription", "pipe", "Command", "Options", "Console", "Duration", "Effect", "Option", "CommandConfig", "Common", "FormBuilder", "getSpace", "printList", "ClientService", "mapCredentials", "credentials", "map", "credential", "id", "toHex", "issuer", "subject", "type", "assertion", "printCredential", "make", "title", "pipe", "option", "fromNullable", "truncate", "build", "handler", "fn", "spaceId", "timeout", "delay", "json", "client", "isSome", "space", "value", "tryPromise", "internal", "getCredentials", "identity", "halo", "log", "JSON", "stringify", "error", "latch", "makeLatch", "subscription", "subscribe", "creds", "length", "runSync", "open", "await", "millis", "catchAll", "void", "ensuring", "sync", "unsubscribe", "sleep", "queryCredentials", "getOrUndefined", "formatted", "list", "text", "withDescription", "optional", "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", "identityDid", "did", "displayName", "profile", "print", "printIdentity", "make", "pipe", "withDescription", "Command", "Console", "Effect", "Option", "CommandConfig", "FormBuilder", "print", "ClientService", "handler", "fn", "json", "client", "identity", "halo", "get", "device", "log", "JSON", "stringify", "identityKey", "toHex", "deviceKey", "builder", "make", "title", "pipe", "option", "fromNullable", "truncate", "build", "keys", "withDescription", "Command", "Console", "Effect", "CommandConfig", "ClientService", "handler", "fn", "json", "client", "identityService", "services", "IdentityService", "log", "JSON", "stringify", "error", "result", "tryPromise", "createRecoveryCredential", "recoveryCode", "seed", "make", "pipe", "withDescription", "Command", "Options", "Console", "Effect", "CommandConfig", "print", "ClientService", "handler", "fn", "displayName", "json", "CommandConfig", "client", "ClientService", "identity", "halo", "get", "log", "JSON", "stringify", "error", "identityService", "services", "IdentityService", "updatedIdentity", "tryPromise", "updateProfile", "identityDid", "did", "profile", "print", "printIdentity", "update", "make", "text", "pipe", "withDescription", "halo", "make", "pipe", "withDescription", "withSubcommands", "credential", "identity", "keys", "seed", "update", "Command", "Command", "Options", "FileSystem", "Path", "Console", "Effect", "Option", "Record", "CommandConfig", "print", "DX_CONFIG", "getProfileConfigPath", "trim", "FormBuilder", "printProfileCreated", "name", "path", "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", "path", "Path", "profileName", "getOrElse", "configPath", "getProfileConfigPath", "DX_CONFIG", "exists", "Error", "makeDirectory", "dirname", "recursive", "writeFileString", "log", "JSON", "stringify", "print", "printProfileCreated", "Command", "Options", "FileSystem", "Console", "Effect", "Option", "CommandConfig", "print", "DX_CONFIG", "getProfileConfigPath", "del", "make", "name", "text", "pipe", "withDescription", "optional", "fnUntraced", "json", "CommandConfig", "fs", "FileSystem", "profileName", "getOrElse", "configPath", "getProfileConfigPath", "DX_CONFIG", "pluginsPath", "remove", "ignore", "log", "JSON", "stringify", "deleted", "print", "printProfileDeleted", "Command", "Options", "Prompt", "FileSystem", "Path", "Console", "Effect", "Option", "CommandConfig", "ConfigService", "log", "__dxlog_file", "handler", "json", "fs", "path", "profile", "config", "createLevel", "createStorageObjects", "storageConfig", "dataDirValue", "confirmed", "initial", "pipe", "fullPath", "resolve", "persistent", "dataRoot", "JSON", "error", "try", "catch", "Error", "importProfileData", "storage", "level", "archive", "success", "entries", "dataDir", "withDescription", "force", "boolean", "Command", "Options", "FileSystem", "Console", "Effect", "CommandConfig", "FormBuilder", "print", "ProfileArchiveEntryType", "arrayToBuffer", "handler", "fn", "file", "storage", "json", "fs", "decodeProfileArchive", "promise", "data", "readFile", "archive", "log", "JSON", "stringify", "meta", "builder", "make", "title", "pipe", "when", "each", "Object", "entries", "key", "value", "set", "String", "build", "entry", "toString", "slice", "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", "entries", "readDirectory", "profileFiles", "filter", "entry", "endsWith", "profiles", "forEach", "filename", "gen", "name", "slice", "configPath", "configContent", "readFileString", "pipe", "catchTag", "succeed", "configValues", "parse", "config", "Config", "isCurrent", "fullPath", "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", "account", "config", "device", "edge", "halo", "profile", "addOperationHandlerModule", "activate", "OperationHandler", "addModule", "options", "id", "Capability", "getModuleTag", "Client", "activatesOn", "ActivationEvents", "Startup", "firesAfterActivation", "ClientEvents", "ClientReady", "firesBeforeActivation", "AppActivationEvents", "SetupSchema", "SchemaDefs", "SetupMigration", "Migrations", "SetupProcessManager", "LayerSpecs", "make"]
|
|
7
7
|
}
|
|
@@ -18,7 +18,7 @@ import { meta } from "#meta";
|
|
|
18
18
|
import { ClientOperation } from "#operations";
|
|
19
19
|
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-client/src/containers/DevicesContainer/DevicesContainer.tsx";
|
|
20
20
|
var DevicesContainer = ({ createInvitationUrl }) => {
|
|
21
|
-
const { t } = useTranslation(meta.
|
|
21
|
+
const { t } = useTranslation(meta.profile.key);
|
|
22
22
|
const { invokePromise } = useOperationInvoker();
|
|
23
23
|
const devices = useDevices();
|
|
24
24
|
const { swarm: connectionState } = useNetworkStatus();
|
|
@@ -37,10 +37,10 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
37
37
|
]);
|
|
38
38
|
return /* @__PURE__ */ React.createElement(Clipboard.Provider, null, /* @__PURE__ */ React.createElement(Settings.Viewport, null, /* @__PURE__ */ React.createElement(Settings.Section, {
|
|
39
39
|
title: t("devices-verbose.label", {
|
|
40
|
-
ns: meta.
|
|
40
|
+
ns: meta.profile.key
|
|
41
41
|
}),
|
|
42
42
|
description: t("devices.description", {
|
|
43
|
-
ns: meta.
|
|
43
|
+
ns: meta.profile.key
|
|
44
44
|
})
|
|
45
45
|
}, /* @__PURE__ */ React.createElement(Settings.Panel, null, /* @__PURE__ */ React.createElement("div", {
|
|
46
46
|
role: "group",
|
|
@@ -48,7 +48,7 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
48
48
|
}, /* @__PURE__ */ React.createElement("h3", {
|
|
49
49
|
className: "text-lg mb-2"
|
|
50
50
|
}, t("devices.label", {
|
|
51
|
-
ns: meta.
|
|
51
|
+
ns: meta.profile.key
|
|
52
52
|
})), /* @__PURE__ */ React.createElement(List, null, devices.map((device) => /* @__PURE__ */ React.createElement(DeviceListItem, {
|
|
53
53
|
key: device.deviceKey.toHex(),
|
|
54
54
|
device,
|
|
@@ -62,15 +62,15 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
62
62
|
createInvitationUrl
|
|
63
63
|
})))), /* @__PURE__ */ React.createElement(Settings.Section, {
|
|
64
64
|
title: t("danger-zone.title", {
|
|
65
|
-
ns: meta.
|
|
65
|
+
ns: meta.profile.key
|
|
66
66
|
}),
|
|
67
67
|
description: t("danger-zone.description", {
|
|
68
|
-
ns: meta.
|
|
68
|
+
ns: meta.profile.key
|
|
69
69
|
})
|
|
70
70
|
}, /* @__PURE__ */ React.createElement(Settings.Item, {
|
|
71
71
|
title: t("reset-device.label"),
|
|
72
72
|
description: t("reset-device.description", {
|
|
73
|
-
ns: meta.
|
|
73
|
+
ns: meta.profile.key
|
|
74
74
|
})
|
|
75
75
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
76
76
|
variant: "destructive",
|
|
@@ -79,7 +79,7 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
79
79
|
}, t("reset-device.label"))), /* @__PURE__ */ React.createElement(Settings.Item, {
|
|
80
80
|
title: t("recover-identity.label"),
|
|
81
81
|
description: t("recover-identity.description", {
|
|
82
|
-
ns: meta.
|
|
82
|
+
ns: meta.profile.key
|
|
83
83
|
})
|
|
84
84
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
85
85
|
variant: "destructive",
|
|
@@ -88,7 +88,7 @@ var DevicesContainer = ({ createInvitationUrl }) => {
|
|
|
88
88
|
}, t("recover-identity.label"))), /* @__PURE__ */ React.createElement(Settings.Item, {
|
|
89
89
|
title: t("join-new-identity.label"),
|
|
90
90
|
description: t("join-new-identity.description", {
|
|
91
|
-
ns: meta.
|
|
91
|
+
ns: meta.profile.key
|
|
92
92
|
})
|
|
93
93
|
}, /* @__PURE__ */ React.createElement(Button, {
|
|
94
94
|
variant: "destructive",
|
|
@@ -155,7 +155,7 @@ var DeviceInvitationImpl = ({ invitation: invitationObservable, createInvitation
|
|
|
155
155
|
var InvitationSection = ({ state = -1, authCode, invitationId = "never", url = "never", onInvitationDone = () => {
|
|
156
156
|
}, onInvitationCreate = () => {
|
|
157
157
|
} }) => {
|
|
158
|
-
const { t } = useTranslation(meta.
|
|
158
|
+
const { t } = useTranslation(meta.profile.key);
|
|
159
159
|
const activeView = state < 0 ? "init" : state >= Invitation.State.CANCELLED ? "complete" : state >= Invitation.State.READY_FOR_AUTHENTICATION && authCode ? "auth-code" : "qr-code";
|
|
160
160
|
return activeView === "init" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
|
|
161
161
|
className: "text-description mb-2"
|
|
@@ -195,7 +195,7 @@ var InvitationQR = ({ id, url, onCancel }) => {
|
|
|
195
195
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", {
|
|
196
196
|
className: "text-description"
|
|
197
197
|
}, t("qr-code.description", {
|
|
198
|
-
ns: meta.
|
|
198
|
+
ns: meta.profile.key
|
|
199
199
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
200
200
|
role: "group",
|
|
201
201
|
className: "grid grid-cols-[1fr_min-content]"
|
|
@@ -259,4 +259,4 @@ var InvitationComplete = ({ statusValue }) => {
|
|
|
259
259
|
export {
|
|
260
260
|
DevicesContainer as default
|
|
261
261
|
};
|
|
262
|
-
//# sourceMappingURL=DevicesContainer-
|
|
262
|
+
//# sourceMappingURL=DevicesContainer-X26OGLFK.mjs.map
|