@dxos/plugin-client 0.9.0 → 0.9.1-staging.ee54ba693a
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-7SF53UON.mjs} +17 -13
- package/dist/lib/neutral/AccountContainer-7SF53UON.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-PRWIN36N.mjs} +36 -27
- package/dist/lib/neutral/DevicesContainer-PRWIN36N.mjs.map +7 -0
- package/dist/lib/neutral/{InvitationsContainer-ME722VKS.mjs → InvitationsContainer-BI5RAWET.mjs} +43 -32
- package/dist/lib/neutral/InvitationsContainer-BI5RAWET.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-YEAYOTX5.mjs} +22 -21
- package/dist/lib/neutral/ProfileContainer-YEAYOTX5.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-6BZ2IWX7.mjs} +24 -15
- package/dist/lib/neutral/RecoveryCredentialsContainer-6BZ2IWX7.mjs.map +7 -0
- package/dist/lib/neutral/UsageContainer-2DWCVVE4.mjs +241 -0
- package/dist/lib/neutral/UsageContainer-2DWCVVE4.mjs.map +7 -0
- package/dist/lib/neutral/account-cache-YVQKLNV2.mjs +16 -0
- package/dist/lib/neutral/account-cache-YVQKLNV2.mjs.map +7 -0
- package/dist/lib/neutral/{app-graph-builder-A74W7C36.mjs → app-graph-builder-RVXTD6OE.mjs} +30 -16
- package/dist/lib/neutral/app-graph-builder-RVXTD6OE.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +6 -6
- package/dist/lib/neutral/capabilities/node.mjs +3 -3
- 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-A7WDDIWY.mjs +162 -0
- package/dist/lib/neutral/chunk-A7WDDIWY.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/{chunk-JEF2FQGB.mjs → chunk-JY35S2CN.mjs} +2 -2
- package/dist/lib/neutral/{chunk-JEF2FQGB.mjs.map → chunk-JY35S2CN.mjs.map} +1 -1
- package/dist/lib/neutral/chunk-ZFABGG2E.mjs +8 -0
- package/dist/lib/neutral/{chunk-NTVDGDQ3.mjs.map → chunk-ZFABGG2E.mjs.map} +2 -2
- 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-6UKJMZS5.mjs} +3 -3
- package/dist/lib/neutral/{create-identity-JIWAR5GW.mjs → create-identity-ULCRB3YH.mjs} +3 -3
- package/dist/lib/neutral/{create-passkey-FOXEMXGF.mjs → create-passkey-I7VDS3AC.mjs} +7 -7
- package/dist/lib/neutral/create-passkey-I7VDS3AC.mjs.map +7 -0
- package/dist/lib/neutral/{create-recovery-code-ZWDKLPH4.mjs → create-recovery-code-DH2B6EGP.mjs} +4 -4
- package/dist/lib/neutral/index.mjs +6 -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-YI7BVWKZ.mjs} +6 -8
- package/dist/lib/neutral/layer-specs-YI7BVWKZ.mjs.map +7 -0
- 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-MQ6MZXLX.mjs} +3 -3
- package/dist/lib/neutral/open-usage-OJVTPGOY.mjs +27 -0
- package/dist/lib/neutral/open-usage-OJVTPGOY.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-TYP4XLHO.mjs} +10 -10
- package/dist/lib/neutral/redeem-passkey-TYP4XLHO.mjs.map +7 -0
- package/dist/lib/neutral/{redeem-token-POBD6TMN.mjs → redeem-token-2J33R3PV.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-TOROBLWL.mjs} +6 -6
- package/dist/lib/neutral/share-identity-TOROBLWL.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 +3 -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/account-cache.d.ts +1 -31
- package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/client.d.ts +1 -2
- package/dist/types/src/capabilities/client.d.ts.map +1 -1
- package/dist/types/src/capabilities/hub-http-client.d.ts +1 -2
- package/dist/types/src/capabilities/hub-http-client.d.ts.map +1 -1
- 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/layer-specs.d.ts +1 -2
- package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -1
- package/dist/types/src/capabilities/migrations.d.ts +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/navigation-handler/navigation-handler.d.ts +1 -2
- package/dist/types/src/capabilities/navigation-handler/navigation-handler.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-context.d.ts +1 -6
- package/dist/types/src/capabilities/react-context.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/capabilities/schema-defs.d.ts +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/AccountContainer/AccountContainer.d.ts.map +1 -1
- package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/AccountContainer/AccountContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DevicesContainer/DevicesContainer.d.ts.map +1 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts +14 -0
- package/dist/types/src/containers/InvitationsContainer/InvitationsContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ProfileContainer/ProfileContainer.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 +28 -0
- package/dist/types/src/containers/UsageContainer/UsageView.d.ts.map +1 -0
- package/dist/types/src/containers/UsageContainer/UsageView.stories.d.ts +21 -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/hooks/index.d.ts +2 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/{state/use-hub-http.d.ts → hooks/useHubClient.d.ts} +1 -1
- package/dist/types/src/hooks/useHubClient.d.ts.map +1 -0
- package/dist/types/src/meta.d.ts +32 -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/{state → types}/account-cache.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/index.d.ts +1 -0
- package/dist/types/src/types/index.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 +47 -44
- package/src/ClientPlugin.node.ts +2 -2
- package/src/ClientPlugin.test.ts +1 -1
- package/src/capabilities/account-cache.ts +1 -3
- package/src/capabilities/app-graph-builder.ts +81 -71
- package/src/capabilities/layer-specs.ts +4 -6
- 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.stories.tsx +46 -0
- package/src/containers/AccountContainer/AccountContainer.tsx +67 -63
- package/src/containers/DevicesContainer/DevicesContainer.tsx +72 -54
- package/src/containers/InvitationsContainer/InvitationsContainer.stories.tsx +46 -0
- package/src/containers/InvitationsContainer/InvitationsContainer.tsx +65 -62
- package/src/containers/JoinDialog/JoinDialog.tsx +1 -1
- package/src/containers/ProfileContainer/ProfileContainer.tsx +38 -28
- package/src/containers/RecoveryCodeDialog/RecoveryCodeDialog.tsx +1 -1
- package/src/containers/RecoveryCredentialsContainer/RecoveryCredentialsContainer.tsx +52 -43
- package/src/containers/UsageContainer/UsageContainer.tsx +48 -0
- package/src/containers/UsageContainer/UsageView.stories.tsx +127 -0
- package/src/containers/UsageContainer/UsageView.tsx +270 -0
- package/src/containers/UsageContainer/index.ts +5 -0
- package/src/containers/index.ts +1 -0
- package/src/hooks/index.ts +5 -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 +5 -2
- package/src/translations.ts +25 -1
- package/src/types/capabilities.ts +8 -6
- package/src/types/events.ts +5 -5
- package/src/types/index.ts +1 -0
- 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/account-cache-4EKGEUJI.mjs +0 -43
- package/dist/lib/neutral/account-cache-4EKGEUJI.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 +0 -135
- 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/layer-specs-CQLXQBQJ.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/types/src/state/use-hub-http.d.ts.map +0 -1
- /package/dist/lib/neutral/{create-agent-6HLW4D3A.mjs.map → create-agent-6UKJMZS5.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-identity-JIWAR5GW.mjs.map → create-identity-ULCRB3YH.mjs.map} +0 -0
- /package/dist/lib/neutral/{create-recovery-code-ZWDKLPH4.mjs.map → create-recovery-code-DH2B6EGP.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-MQ6MZXLX.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-2J33R3PV.mjs.map} +0 -0
- /package/dist/lib/neutral/{reset-storage-LQKUV5RA.mjs.map → reset-storage-K47HZTGP.mjs.map} +0 -0
- /package/dist/types/src/{state → types}/account-cache.d.ts +0 -0
- /package/src/{state/use-hub-http.ts → hooks/useHubClient.ts} +0 -0
- /package/src/{state → types}/account-cache.ts +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
|
|
4
|
+
// dx.config.ts
|
|
5
|
+
import { Config2 } from "@dxos/app-framework/config";
|
|
6
|
+
import { trim } from "@dxos/util";
|
|
7
|
+
var dx_config_default = Config2.make({
|
|
8
|
+
plugin: {
|
|
9
|
+
key: "org.dxos.plugin.client",
|
|
10
|
+
name: "Client",
|
|
11
|
+
author: "DXOS",
|
|
12
|
+
description: trim`
|
|
13
|
+
Core client connectivity and peer-to-peer networking infrastructure.
|
|
14
|
+
Manages identity, authentication, and real-time synchronization across devices.
|
|
15
|
+
`,
|
|
16
|
+
tags: [
|
|
17
|
+
"system"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// src/meta.ts
|
|
23
|
+
var meta = Plugin.getMetaFromConfig(dx_config_default);
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
meta
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-6G4KZLBG.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts", "../../../dx.config.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\n\nimport config from '../dx.config';\n\nexport const meta = Plugin.getMetaFromConfig(config);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Config2 } from '@dxos/app-framework/config';\nimport { trim } from '@dxos/util';\n\nexport default Config2.make({\n plugin: {\n key: 'org.dxos.plugin.client',\n name: 'Client',\n author: 'DXOS',\n description: trim`\n Core client connectivity and peer-to-peer networking infrastructure.\n Manages identity, authentication, and real-time synchronization across devices.\n `,\n tags: ['system'],\n },\n});\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,cAAc;;;ACAvB,SAASC,eAAe;AACxB,SAASC,YAAY;AAErB,IAAA,oBAAeD,QAAQE,KAAK;EAC1BC,QAAQ;IACNC,KAAK;IACLC,MAAM;IACNC,QAAQ;IACRC,aAAaN;;;;IAIbO,MAAM;MAAC;;EACT;AACF,CAAA;;;ADVO,IAAMC,OAAOC,OAAOC,kBAAkBC,iBAAAA;",
|
|
6
|
+
"names": ["Plugin", "Config2", "trim", "make", "plugin", "key", "name", "author", "description", "tags", "meta", "Plugin", "getMetaFromConfig", "config"]
|
|
7
|
+
}
|
|
@@ -10,6 +10,7 @@ __export(definitions_exports, {
|
|
|
10
10
|
CreatePasskey: () => CreatePasskey,
|
|
11
11
|
CreateRecoveryCode: () => CreateRecoveryCode,
|
|
12
12
|
JoinIdentity: () => JoinIdentity,
|
|
13
|
+
OpenUsage: () => OpenUsage,
|
|
13
14
|
RecoverIdentity: () => RecoverIdentity,
|
|
14
15
|
RedeemPasskey: () => RedeemPasskey,
|
|
15
16
|
RedeemToken: () => RedeemToken,
|
|
@@ -21,7 +22,7 @@ import { Capability } from "@dxos/app-framework";
|
|
|
21
22
|
import { Operation } from "@dxos/compute";
|
|
22
23
|
import { DXN, IdentityDid, SpaceId } from "@dxos/keys";
|
|
23
24
|
import { meta } from "#meta";
|
|
24
|
-
var makeKey = (name) => DXN.make(`${meta.
|
|
25
|
+
var makeKey = (name) => DXN.make(`${meta.profile.key}.operation.${name}`);
|
|
25
26
|
var IdentitySchema = Schema.Struct({
|
|
26
27
|
identityDid: IdentityDid,
|
|
27
28
|
spaceId: Schema.optional(SpaceId),
|
|
@@ -80,6 +81,18 @@ var ShareIdentity = Operation.make({
|
|
|
80
81
|
input: Schema.Void,
|
|
81
82
|
output: Schema.Void
|
|
82
83
|
});
|
|
84
|
+
var OpenUsage = Operation.make({
|
|
85
|
+
meta: {
|
|
86
|
+
key: makeKey("openUsage"),
|
|
87
|
+
name: "Open Usage",
|
|
88
|
+
icon: "ph--chart-bar--regular"
|
|
89
|
+
},
|
|
90
|
+
services: [
|
|
91
|
+
Capability.Service
|
|
92
|
+
],
|
|
93
|
+
input: Schema.Void,
|
|
94
|
+
output: Schema.Void
|
|
95
|
+
});
|
|
83
96
|
var RecoverIdentity = Operation.make({
|
|
84
97
|
meta: {
|
|
85
98
|
key: makeKey("recoverIdentity"),
|
|
@@ -173,6 +186,7 @@ export {
|
|
|
173
186
|
CreateIdentity,
|
|
174
187
|
JoinIdentity,
|
|
175
188
|
ShareIdentity,
|
|
189
|
+
OpenUsage,
|
|
176
190
|
RecoverIdentity,
|
|
177
191
|
ResetStorage,
|
|
178
192
|
CreateAgent,
|
|
@@ -182,4 +196,4 @@ export {
|
|
|
182
196
|
RedeemToken,
|
|
183
197
|
definitions_exports
|
|
184
198
|
};
|
|
185
|
-
//# sourceMappingURL=chunk-
|
|
199
|
+
//# sourceMappingURL=chunk-7DEIKHB7.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/definitions.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\nimport { DXN, IdentityDid, SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\nconst makeKey = (name: string) => DXN.make(`${meta.profile.key}.operation.${name}`);\n\nconst IdentitySchema = Schema.Struct({\n identityDid: IdentityDid,\n spaceId: Schema.optional(SpaceId),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nconst ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n});\n\nexport const CreateIdentity = Operation.make({\n meta: { key: makeKey('createIdentity'), name: 'Create Identity', icon: 'ph--user--regular' },\n services: [Capability.Service],\n input: ProfileSchema,\n output: IdentitySchema,\n});\n\nexport const JoinIdentity = Operation.make({\n meta: { key: makeKey('joinIdentity'), name: 'Join Identity', icon: 'ph--sign-in--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n});\n\nexport const ShareIdentity = Operation.make({\n meta: {\n key: makeKey('shareIdentity'),\n name: 'Share Identity',\n icon: 'ph--share-network--regular',\n },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const OpenUsage = Operation.make({\n meta: {\n key: makeKey('openUsage'),\n name: 'Open Usage',\n icon: 'ph--chart-bar--regular',\n },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const RecoverIdentity = Operation.make({\n meta: { key: makeKey('recoverIdentity'), name: 'Recover Identity', icon: 'ph--key--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const ResetStorage = Operation.make({\n meta: { key: makeKey('resetStorage'), name: 'Reset Storage', icon: 'ph--warning--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n});\n\nexport const CreateAgent = Operation.make({\n meta: { key: makeKey('createAgent'), name: 'Create Agent', icon: 'ph--brain--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const CreateRecoveryCode = Operation.make({\n meta: {\n key: makeKey('createRecoveryCode'),\n name: 'Create Recovery Code',\n icon: 'ph--key--regular',\n },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const CreatePasskey = Operation.make({\n meta: { key: makeKey('createPasskey'), name: 'Create Passkey', icon: 'ph--key--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const RedeemPasskey = Operation.make({\n meta: { key: makeKey('redeemPasskey'), name: 'Redeem Passkey', icon: 'ph--key--regular' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n\nexport const RedeemToken = Operation.make({\n meta: { key: makeKey('redeemToken'), name: 'Redeem Token', icon: 'ph--lock--regular' },\n services: [Capability.Service],\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n});\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Schema", "Capability", "Operation", "DXN", "IdentityDid", "SpaceId", "meta", "makeKey", "name", "make", "profile", "key", "IdentitySchema", "Struct", "identityDid", "spaceId", "optional", "displayName", "String", "avatarCid", "data", "Record", "value", "Any", "ProfileSchema", "CreateIdentity", "icon", "services", "Service", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "OpenUsage", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// src/types/account-cache.ts
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
var AccountCacheValue = Schema.Struct({
|
|
4
|
+
identityDid: Schema.String,
|
|
5
|
+
email: Schema.String,
|
|
6
|
+
emailVerified: Schema.Boolean,
|
|
7
|
+
/** ISO timestamp. */
|
|
8
|
+
createdAt: Schema.String,
|
|
9
|
+
invitationsRemaining: Schema.Number
|
|
10
|
+
});
|
|
11
|
+
var AccountCacheInvitation = Schema.Struct({
|
|
12
|
+
code: Schema.String,
|
|
13
|
+
/** ISO timestamp. */
|
|
14
|
+
createdAt: Schema.String,
|
|
15
|
+
redeemedByIdentityDid: Schema.optional(Schema.String),
|
|
16
|
+
/** ISO timestamp. */
|
|
17
|
+
redeemedAt: Schema.optional(Schema.String)
|
|
18
|
+
});
|
|
19
|
+
var AccountCache = Schema.Struct({
|
|
20
|
+
account: Schema.optional(AccountCacheValue),
|
|
21
|
+
invitations: Schema.optional(Schema.Array(AccountCacheInvitation)),
|
|
22
|
+
/** Epoch ms when the cache was last refreshed. */
|
|
23
|
+
fetchedAt: Schema.optional(Schema.Number)
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// src/types/capabilities.ts
|
|
27
|
+
import { Capability } from "@dxos/app-framework";
|
|
28
|
+
import { meta } from "#meta";
|
|
29
|
+
(function(ClientCapabilities2) {
|
|
30
|
+
ClientCapabilities2.Client = Capability.make(`${meta.profile.key}.capability.client`);
|
|
31
|
+
ClientCapabilities2.Schema = Capability.make(`${meta.profile.key}.capability.schema`);
|
|
32
|
+
ClientCapabilities2.Migration = Capability.make(`${meta.profile.key}.capability.migration`);
|
|
33
|
+
ClientCapabilities2.AccountCache = Capability.make(`${meta.profile.key}.capability.accountCache`);
|
|
34
|
+
ClientCapabilities2.HubHttpClient = Capability.make(`${meta.profile.key}.capability.hubHttpClient`);
|
|
35
|
+
})(ClientCapabilities || (ClientCapabilities = {}));
|
|
36
|
+
var ClientCapabilities;
|
|
37
|
+
|
|
38
|
+
// src/types/events.ts
|
|
39
|
+
import { ActivationEvent } from "@dxos/app-framework";
|
|
40
|
+
import { meta as meta2 } from "#meta";
|
|
41
|
+
(function(ClientEvents2) {
|
|
42
|
+
ClientEvents2.ClientReady = ActivationEvent.make(`${meta2.profile.key}.event.clientReady`);
|
|
43
|
+
ClientEvents2.SetupSchema = ActivationEvent.make(`${meta2.profile.key}.event.setupSchema`);
|
|
44
|
+
ClientEvents2.SetupMigration = ActivationEvent.make(`${meta2.profile.key}.event.setupMigration`);
|
|
45
|
+
ClientEvents2.IdentityCreated = ActivationEvent.make(`${meta2.profile.key}.event.identityCreated`);
|
|
46
|
+
ClientEvents2.SpacesReady = ActivationEvent.make(`${meta2.profile.key}.event.spacesReady`);
|
|
47
|
+
})(ClientEvents || (ClientEvents = {}));
|
|
48
|
+
var ClientEvents;
|
|
49
|
+
|
|
50
|
+
// src/types/schema.ts
|
|
51
|
+
import * as Schema2 from "effect/Schema";
|
|
52
|
+
import { IdentityDid, SpaceId } from "@dxos/keys";
|
|
53
|
+
import { meta as meta3 } from "#meta";
|
|
54
|
+
var IdentitySchema = Schema2.Struct({
|
|
55
|
+
identityDid: IdentityDid,
|
|
56
|
+
spaceId: Schema2.optional(SpaceId),
|
|
57
|
+
profile: Schema2.optional(Schema2.Struct({
|
|
58
|
+
displayName: Schema2.optional(Schema2.String),
|
|
59
|
+
avatarCid: Schema2.optional(Schema2.String),
|
|
60
|
+
data: Schema2.optional(Schema2.Record({
|
|
61
|
+
key: Schema2.String,
|
|
62
|
+
value: Schema2.Any
|
|
63
|
+
}))
|
|
64
|
+
}))
|
|
65
|
+
});
|
|
66
|
+
(function(ClientAction2) {
|
|
67
|
+
const ProfileSchema = Schema2.Struct({
|
|
68
|
+
displayName: Schema2.optional(Schema2.String),
|
|
69
|
+
avatarCid: Schema2.optional(Schema2.String),
|
|
70
|
+
data: Schema2.optional(Schema2.Record({
|
|
71
|
+
key: Schema2.String,
|
|
72
|
+
value: Schema2.Any
|
|
73
|
+
}))
|
|
74
|
+
});
|
|
75
|
+
class CreateIdentity extends Schema2.TaggedClass()(`${meta3.profile.key}.action.create-identity`, {
|
|
76
|
+
input: ProfileSchema,
|
|
77
|
+
output: IdentitySchema
|
|
78
|
+
}) {
|
|
79
|
+
}
|
|
80
|
+
ClientAction2.CreateIdentity = CreateIdentity;
|
|
81
|
+
class JoinIdentity extends Schema2.TaggedClass()(`${meta3.profile.key}.action.join-identity`, {
|
|
82
|
+
input: Schema2.Struct({
|
|
83
|
+
invitationCode: Schema2.optional(Schema2.String)
|
|
84
|
+
}),
|
|
85
|
+
output: Schema2.Void
|
|
86
|
+
}) {
|
|
87
|
+
}
|
|
88
|
+
ClientAction2.JoinIdentity = JoinIdentity;
|
|
89
|
+
class ShareIdentity extends Schema2.TaggedClass()(`${meta3.profile.key}.action.share-identity`, {
|
|
90
|
+
input: Schema2.Void,
|
|
91
|
+
output: Schema2.Void
|
|
92
|
+
}) {
|
|
93
|
+
}
|
|
94
|
+
ClientAction2.ShareIdentity = ShareIdentity;
|
|
95
|
+
class RecoverIdentity extends Schema2.TaggedClass()(`${meta3.profile.key}.action.recover-identity`, {
|
|
96
|
+
input: Schema2.Void,
|
|
97
|
+
output: Schema2.Void
|
|
98
|
+
}) {
|
|
99
|
+
}
|
|
100
|
+
ClientAction2.RecoverIdentity = RecoverIdentity;
|
|
101
|
+
class ResetStorage extends Schema2.TaggedClass()(`${meta3.profile.key}.action.reset-storage`, {
|
|
102
|
+
input: Schema2.Struct({
|
|
103
|
+
mode: Schema2.optional(Schema2.String)
|
|
104
|
+
}),
|
|
105
|
+
output: Schema2.Void
|
|
106
|
+
}) {
|
|
107
|
+
}
|
|
108
|
+
ClientAction2.ResetStorage = ResetStorage;
|
|
109
|
+
class CreateAgent extends Schema2.TaggedClass()(`${meta3.profile.key}.action.create-agent`, {
|
|
110
|
+
input: Schema2.Void,
|
|
111
|
+
output: Schema2.Void
|
|
112
|
+
}) {
|
|
113
|
+
}
|
|
114
|
+
ClientAction2.CreateAgent = CreateAgent;
|
|
115
|
+
class CreateRecoveryCode extends Schema2.TaggedClass()(`${meta3.profile.key}.action.create-recovery-code`, {
|
|
116
|
+
input: Schema2.Void,
|
|
117
|
+
output: Schema2.Void
|
|
118
|
+
}) {
|
|
119
|
+
}
|
|
120
|
+
ClientAction2.CreateRecoveryCode = CreateRecoveryCode;
|
|
121
|
+
class CreatePasskey extends Schema2.TaggedClass()(`${meta3.profile.key}.action.create-passkey`, {
|
|
122
|
+
input: Schema2.Void,
|
|
123
|
+
output: Schema2.Void
|
|
124
|
+
}) {
|
|
125
|
+
}
|
|
126
|
+
ClientAction2.CreatePasskey = CreatePasskey;
|
|
127
|
+
class RedeemPasskey extends Schema2.TaggedClass()(`${meta3.profile.key}.action.redeem-passkey`, {
|
|
128
|
+
input: Schema2.Void,
|
|
129
|
+
output: Schema2.Void
|
|
130
|
+
}) {
|
|
131
|
+
}
|
|
132
|
+
ClientAction2.RedeemPasskey = RedeemPasskey;
|
|
133
|
+
class RedeemToken extends Schema2.TaggedClass()(`${meta3.profile.key}.action.redeem-token`, {
|
|
134
|
+
input: Schema2.Struct({
|
|
135
|
+
token: Schema2.String
|
|
136
|
+
}),
|
|
137
|
+
output: Schema2.Void
|
|
138
|
+
}) {
|
|
139
|
+
}
|
|
140
|
+
ClientAction2.RedeemToken = RedeemToken;
|
|
141
|
+
})(ClientAction || (ClientAction = {}));
|
|
142
|
+
(function(Account2) {
|
|
143
|
+
const _id = "dxos.org.plugin.client.account";
|
|
144
|
+
Account2.id = `!${_id}`;
|
|
145
|
+
Account2.Profile = `${_id}.profile`;
|
|
146
|
+
Account2.Devices = `${_id}.devices`;
|
|
147
|
+
Account2.Security = `${_id}.security`;
|
|
148
|
+
Account2.Account = `${_id}.account`;
|
|
149
|
+
Account2.Invitations = `${_id}.invitations`;
|
|
150
|
+
Account2.Usage = `${_id}.usage`;
|
|
151
|
+
})(Account || (Account = {}));
|
|
152
|
+
var ClientAction;
|
|
153
|
+
var Account;
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
AccountCache,
|
|
157
|
+
ClientCapabilities,
|
|
158
|
+
ClientEvents,
|
|
159
|
+
ClientAction,
|
|
160
|
+
Account
|
|
161
|
+
};
|
|
162
|
+
//# sourceMappingURL=chunk-A7WDDIWY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/account-cache.ts", "../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/schema.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nconst AccountCacheValue = Schema.Struct({\n identityDid: Schema.String,\n email: Schema.String,\n emailVerified: Schema.Boolean,\n /** ISO timestamp. */\n createdAt: Schema.String,\n invitationsRemaining: Schema.Number,\n});\nexport type AccountCacheValue = Schema.Schema.Type<typeof AccountCacheValue>;\n\nconst AccountCacheInvitation = Schema.Struct({\n code: Schema.String,\n /** ISO timestamp. */\n createdAt: Schema.String,\n redeemedByIdentityDid: Schema.optional(Schema.String),\n /** ISO timestamp. */\n redeemedAt: Schema.optional(Schema.String),\n});\nexport type AccountCacheInvitation = Schema.Schema.Type<typeof AccountCacheInvitation>;\n\nexport const AccountCache = Schema.Struct({\n account: Schema.optional(AccountCacheValue),\n invitations: Schema.optional(Schema.Array(AccountCacheInvitation)),\n /** Epoch ms when the cache was last refreshed. */\n fetchedAt: Schema.optional(Schema.Number),\n});\nexport type AccountCache = Schema.Schema.Type<typeof AccountCache>;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client } from '@dxos/client';\nimport { type ObjectMigration } from '@dxos/client/echo';\nimport { type Type } from '@dxos/echo';\nimport { type HubHttpClient } from '@dxos/edge-client';\n\nimport { meta } from '#meta';\n\nimport { type AccountCache as AccountCacheType } from './account-cache';\n\nexport namespace ClientCapabilities {\n export const Client = Capability.make<Client>(`${meta.profile.key}.capability.client`);\n export const Schema = Capability.make<Type.AnyEntity[]>(`${meta.profile.key}.capability.schema`);\n export const Migration = Capability.make<ObjectMigration[]>(`${meta.profile.key}.capability.migration`);\n export const AccountCache = Capability.make<Atom.Writable<AccountCacheType>>(\n `${meta.profile.key}.capability.accountCache`,\n );\n export const HubHttpClient = Capability.make<HubHttpClient>(`${meta.profile.key}.capability.hubHttpClient`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport namespace ClientEvents {\n export const ClientReady = ActivationEvent.make(`${meta.profile.key}.event.clientReady`);\n export const SetupSchema = ActivationEvent.make(`${meta.profile.key}.event.setupSchema`);\n export const SetupMigration = ActivationEvent.make(`${meta.profile.key}.event.setupMigration`);\n export const IdentityCreated = ActivationEvent.make(`${meta.profile.key}.event.identityCreated`);\n export const SpacesReady = ActivationEvent.make(`${meta.profile.key}.event.spacesReady`);\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type Client, type ClientOptions } from '@dxos/client';\nimport { IdentityDid, SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\n// TODO(wittjosiah): Factor out. Generate?\nconst IdentitySchema = Schema.Struct({\n identityDid: IdentityDid,\n spaceId: Schema.optional(SpaceId),\n profile: Schema.optional(\n Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n ),\n});\n\nexport namespace ClientAction {\n const ProfileSchema = Schema.Struct({\n displayName: Schema.optional(Schema.String),\n avatarCid: Schema.optional(Schema.String),\n data: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n });\n\n export class CreateIdentity extends Schema.TaggedClass<CreateIdentity>()(\n `${meta.profile.key}.action.create-identity`,\n {\n input: ProfileSchema,\n output: IdentitySchema,\n },\n ) {}\n\n export class JoinIdentity extends Schema.TaggedClass<JoinIdentity>()(`${meta.profile.key}.action.join-identity`, {\n input: Schema.Struct({\n invitationCode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class ShareIdentity extends Schema.TaggedClass<ShareIdentity>()(`${meta.profile.key}.action.share-identity`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RecoverIdentity extends Schema.TaggedClass<RecoverIdentity>()(\n `${meta.profile.key}.action.recover-identity`,\n {\n input: Schema.Void,\n output: Schema.Void,\n },\n ) {}\n\n export class ResetStorage extends Schema.TaggedClass<ResetStorage>()(`${meta.profile.key}.action.reset-storage`, {\n input: Schema.Struct({\n mode: Schema.optional(Schema.String),\n }),\n output: Schema.Void,\n }) {}\n\n export class CreateAgent extends Schema.TaggedClass<CreateAgent>()(`${meta.profile.key}.action.create-agent`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class CreateRecoveryCode extends Schema.TaggedClass<CreateRecoveryCode>()(\n `${meta.profile.key}.action.create-recovery-code`,\n {\n input: Schema.Void,\n output: Schema.Void,\n },\n ) {}\n\n export class CreatePasskey extends Schema.TaggedClass<CreatePasskey>()(`${meta.profile.key}.action.create-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemPasskey extends Schema.TaggedClass<RedeemPasskey>()(`${meta.profile.key}.action.redeem-passkey`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n\n export class RedeemToken extends Schema.TaggedClass<RedeemToken>()(`${meta.profile.key}.action.redeem-token`, {\n input: Schema.Struct({\n token: Schema.String,\n }),\n output: Schema.Void,\n }) {}\n}\n\nexport type ClientPluginOptions = ClientOptions & {\n /**\n * Base origin for the invitation link.\n */\n shareableLinkOrigin?: string;\n\n /**\n * Path for the invitation link.\n */\n invitationPath?: string;\n\n /**\n * Query parameter for the invitation code.\n */\n invitationProp?: string;\n\n /**\n * Run after the client has been initialized.\n * Plugin context is provided so capabilities are accessible.\n */\n onClientInitialized?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when spaces are ready.\n * Plugin context is provided so capabilities are accessible.\n */\n onSpacesReady?: (params: { client: Client }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n\n /**\n * Called when the client is reset.\n * Plugin context is provided so capabilities are accessible.\n */\n onReset?: (params: { target?: string }) => Effect.Effect<void, Error | never, Capability.Service | never>;\n};\n\nexport namespace Account {\n // TODO(wittjosiah): Cannot use slashes in ids until we have a router which decouples ids from url paths.\n const _id = 'dxos.org.plugin.client.account';\n // TODO(wittjosiah): This is a hack to prevent the previous deck from being set for pinned items.\n // Ideally this should be worked into the data model in a generic way.\n export const id = `!${_id}`;\n\n export const Profile = `${_id}.profile`;\n export const Devices = `${_id}.devices`;\n export const Security = `${_id}.security`;\n export const Account = `${_id}.account`;\n export const Invitations = `${_id}.invitations`;\n export const Usage = `${_id}.usage`;\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Schema", "AccountCacheValue", "Struct", "identityDid", "String", "email", "emailVerified", "Boolean", "createdAt", "invitationsRemaining", "Number", "AccountCacheInvitation", "code", "redeemedByIdentityDid", "optional", "redeemedAt", "AccountCache", "account", "invitations", "Array", "fetchedAt", "Capability", "meta", "ClientCapabilities", "Client", "make", "profile", "key", "Schema", "Migration", "AccountCache", "HubHttpClient", "ActivationEvent", "meta", "ClientEvents", "ClientReady", "make", "profile", "key", "SetupSchema", "SetupMigration", "IdentityCreated", "SpacesReady", "Schema", "IdentityDid", "SpaceId", "meta", "IdentitySchema", "Struct", "identityDid", "spaceId", "optional", "profile", "displayName", "String", "avatarCid", "data", "Record", "key", "value", "Any", "ClientAction", "ProfileSchema", "CreateIdentity", "TaggedClass", "input", "output", "JoinIdentity", "invitationCode", "Void", "ShareIdentity", "RecoverIdentity", "ResetStorage", "mode", "CreateAgent", "CreateRecoveryCode", "CreatePasskey", "RedeemPasskey", "RedeemToken", "token", "Account", "_id", "id", "Profile", "Devices", "Security", "Invitations", "Usage"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// src/constants.ts
|
|
2
|
+
import { DXN } from "@dxos/keys";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
var JOIN_DIALOG = DXN.make(`${meta.profile.key}.joinDialog`);
|
|
5
|
+
var RECOVERY_CODE_DIALOG = DXN.make(`${meta.profile.key}.recoveryCodeDialog`);
|
|
6
|
+
var RESET_DIALOG = DXN.make(`${meta.profile.key}.resetDialog`);
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
JOIN_DIALOG,
|
|
10
|
+
RECOVERY_CODE_DIALOG,
|
|
11
|
+
RESET_DIALOG
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chunk-GSKMAS3S.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { DXN } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\nexport const JOIN_DIALOG = DXN.make(`${meta.profile.key}.joinDialog`);\nexport const RECOVERY_CODE_DIALOG = DXN.make(`${meta.profile.key}.recoveryCodeDialog`);\nexport const RESET_DIALOG = DXN.make(`${meta.profile.key}.resetDialog`);\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,WAAW;AAEpB,SAASC,YAAY;AAEd,IAAMC,cAAcF,IAAIG,KAAK,GAAGF,KAAKG,QAAQC,GAAG,aAAa;AAC7D,IAAMC,uBAAuBN,IAAIG,KAAK,GAAGF,KAAKG,QAAQC,GAAG,qBAAqB;AAC9E,IAAME,eAAeP,IAAIG,KAAK,GAAGF,KAAKG,QAAQC,GAAG,cAAc;",
|
|
6
|
+
"names": ["DXN", "meta", "JOIN_DIALOG", "make", "profile", "key", "RECOVERY_CODE_DIALOG", "RESET_DIALOG"]
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/hooks/useHubClient.ts
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { useCapabilities } from "@dxos/app-framework/ui";
|
|
4
4
|
import { createEdgeIdentity } from "@dxos/client/edge";
|
|
@@ -24,4 +24,4 @@ var useHubHttpClient = () => {
|
|
|
24
24
|
export {
|
|
25
25
|
useHubHttpClient
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=chunk-
|
|
27
|
+
//# sourceMappingURL=chunk-JY35S2CN.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
3
|
+
"sources": ["../../../src/hooks/useHubClient.ts"],
|
|
4
4
|
"sourcesContent": ["//\n// Copyright 2026 DXOS.org\n//\n\nimport { useEffect } from 'react';\n\nimport { useCapabilities } from '@dxos/app-framework/ui';\nimport { createEdgeIdentity } from '@dxos/client/edge';\nimport { type HubHttpClient } from '@dxos/edge-client';\nimport { useClient } from '@dxos/react-client';\nimport { useIdentity } from '@dxos/react-client/halo';\n\nimport { ClientCapabilities } from '#types';\n\n/**\n * Returns the shared `HubHttpClient` singleton for hub-service API calls.\n * Updates the VP-auth identity whenever the signed-in user changes.\n * Returns `undefined` when the hub URL is unconfigured (no HubHttpClient capability).\n */\nexport const useHubHttpClient = (): HubHttpClient | undefined => {\n const client = useClient();\n const identity = useIdentity();\n const [hubHttpClient] = useCapabilities(ClientCapabilities.HubHttpClient);\n\n useEffect(() => {\n if (hubHttpClient && identity) {\n hubHttpClient.setIdentity(createEdgeIdentity(client));\n }\n }, [client, identity, hubHttpClient]);\n\n return hubHttpClient ?? undefined;\n};\n"],
|
|
5
5
|
"mappings": ";AAIA,SAASA,iBAAiB;AAE1B,SAASC,uBAAuB;AAChC,SAASC,0BAA0B;AAEnC,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAE5B,SAASC,0BAA0B;AAO5B,IAAMC,mBAAmB,MAAA;AAC9B,QAAMC,SAASJ,UAAAA;AACf,QAAMK,WAAWJ,YAAAA;AACjB,QAAM,CAACK,aAAAA,IAAiBR,gBAAgBI,mBAAmBK,aAAa;AAExEV,YAAU,MAAA;AACR,QAAIS,iBAAiBD,UAAU;AAC7BC,oBAAcE,YAAYT,mBAAmBK,MAAAA,CAAAA;IAC/C;EACF,GAAG;IAACA;IAAQC;IAAUC;GAAc;AAEpC,SAAOA,iBAAiBG;AAC1B;",
|
|
6
6
|
"names": ["useEffect", "useCapabilities", "createEdgeIdentity", "useClient", "useIdentity", "ClientCapabilities", "useHubHttpClient", "client", "identity", "hubHttpClient", "HubHttpClient", "setIdentity", "undefined"]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/operations/index.ts
|
|
2
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
+
var ClientOperationHandlerSet = OperationHandlerSet.lazy(() => import("./create-agent-6UKJMZS5.mjs"), () => import("./create-identity-ULCRB3YH.mjs"), () => import("./create-passkey-I7VDS3AC.mjs"), () => import("./create-recovery-code-DH2B6EGP.mjs"), () => import("./join-identity-PJCHDNLH.mjs"), () => import("./open-usage-OJVTPGOY.mjs"), () => import("./recover-identity-B7YM2BR4.mjs"), () => import("./redeem-passkey-TYP4XLHO.mjs"), () => import("./redeem-token-2J33R3PV.mjs"), () => import("./reset-storage-K47HZTGP.mjs"), () => import("./share-identity-TOROBLWL.mjs"));
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
ClientOperationHandlerSet
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=chunk-ZFABGG2E.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/operations/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport * as ClientOperation from './definitions';\n\nexport const ClientOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./create-agent'),\n () => import('./create-identity'),\n () => import('./create-passkey'),\n () => import('./create-recovery-code'),\n () => import('./join-identity'),\n () => import('./recover-identity'),\n () => import('./redeem-passkey'),\n () => import('./redeem-token'),\n () => import('./reset-storage'),\n () => import('./share-identity'),\n);\n"],
|
|
5
|
-
"mappings": ";AAIA,SAASA,2BAA2B;AAI7B,IAAMC,4BAA4BD,oBAAoBE,KAC3D,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,gCAAA,GACb,MAAM,OAAO,+BAAA,GACb,MAAM,OAAO,qCAAA,GACb,MAAM,OAAO,8BAAA,GACb,MAAM,OAAO,iCAAA,GACb,MAAM,OAAO,+BAAA,GACb,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,8BAAA,GACb,MAAM,OAAO,+BAAA,CAAA;",
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport * as ClientOperation from './definitions';\n\nexport const ClientOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./create-agent'),\n () => import('./create-identity'),\n () => import('./create-passkey'),\n () => import('./create-recovery-code'),\n () => import('./join-identity'),\n () => import('./open-usage'),\n () => import('./recover-identity'),\n () => import('./redeem-passkey'),\n () => import('./redeem-token'),\n () => import('./reset-storage'),\n () => import('./share-identity'),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,2BAA2B;AAI7B,IAAMC,4BAA4BD,oBAAoBE,KAC3D,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,gCAAA,GACb,MAAM,OAAO,+BAAA,GACb,MAAM,OAAO,qCAAA,GACb,MAAM,OAAO,8BAAA,GACb,MAAM,OAAO,2BAAA,GACb,MAAM,OAAO,iCAAA,GACb,MAAM,OAAO,+BAAA,GACb,MAAM,OAAO,6BAAA,GACb,MAAM,OAAO,8BAAA,GACb,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
6
|
"names": ["OperationHandlerSet", "ClientOperationHandlerSet", "lazy"]
|
|
7
7
|
}
|
|
@@ -2,13 +2,14 @@ import "../chunk-J5LGTIGS.mjs";
|
|
|
2
2
|
|
|
3
3
|
// src/containers/index.ts
|
|
4
4
|
import { lazy } from "react";
|
|
5
|
-
var AccountContainer = lazy(() => import("../AccountContainer-
|
|
6
|
-
var DevicesContainer = lazy(() => import("../DevicesContainer-
|
|
7
|
-
var InvitationsContainer = lazy(() => import("../InvitationsContainer-
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
5
|
+
var AccountContainer = lazy(() => import("../AccountContainer-7SF53UON.mjs"));
|
|
6
|
+
var DevicesContainer = lazy(() => import("../DevicesContainer-PRWIN36N.mjs"));
|
|
7
|
+
var InvitationsContainer = lazy(() => import("../InvitationsContainer-BI5RAWET.mjs"));
|
|
8
|
+
var UsageContainer = lazy(() => import("../UsageContainer-2DWCVVE4.mjs"));
|
|
9
|
+
var JoinDialog = lazy(() => import("../JoinDialog-4BWV4CYB.mjs"));
|
|
10
|
+
var ProfileContainer = lazy(() => import("../ProfileContainer-YEAYOTX5.mjs"));
|
|
11
|
+
var RecoveryCodeDialog = lazy(() => import("../RecoveryCodeDialog-7EPNKCLB.mjs"));
|
|
12
|
+
var RecoveryCredentialsContainer = lazy(() => import("../RecoveryCredentialsContainer-6BZ2IWX7.mjs"));
|
|
12
13
|
var ResetDialog = lazy(() => import("../ResetDialog-KUWX45JY.mjs"));
|
|
13
14
|
export {
|
|
14
15
|
AccountContainer,
|
|
@@ -18,6 +19,7 @@ export {
|
|
|
18
19
|
ProfileContainer,
|
|
19
20
|
RecoveryCodeDialog,
|
|
20
21
|
RecoveryCredentialsContainer,
|
|
21
|
-
ResetDialog
|
|
22
|
+
ResetDialog,
|
|
23
|
+
UsageContainer
|
|
22
24
|
};
|
|
23
25
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/containers/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport { type RecoveryCodeDialogProps } from './RecoveryCodeDialog';\nexport { type ResetDialogProps } from './ResetDialog';\n\nexport const AccountContainer: ComponentType<any> = lazy(() => import('./AccountContainer'));\nexport const DevicesContainer: ComponentType<any> = lazy(() => import('./DevicesContainer'));\nexport const InvitationsContainer: ComponentType<any> = lazy(() => import('./InvitationsContainer'));\nexport const JoinDialog: ComponentType<any> = lazy(() => import('./JoinDialog'));\nexport const ProfileContainer: ComponentType<any> = lazy(() => import('./ProfileContainer'));\nexport const RecoveryCodeDialog: ComponentType<any> = lazy(() => import('./RecoveryCodeDialog'));\nexport const RecoveryCredentialsContainer: ComponentType<any> = lazy(() => import('./RecoveryCredentialsContainer'));\nexport const ResetDialog: ComponentType<any> = lazy(() => import('./ResetDialog'));\n"],
|
|
5
|
-
"mappings": ";;;AAIA,SAA6BA,YAAY;AAKlC,IAAMC,mBAAuCD,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAME,mBAAuCF,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAMG,uBAA2CH,KAAK,MAAM,OAAO,sCAAA,CAAA;AACnE,IAAMI,
|
|
6
|
-
"names": ["lazy", "AccountContainer", "DevicesContainer", "InvitationsContainer", "JoinDialog", "ProfileContainer", "RecoveryCodeDialog", "RecoveryCredentialsContainer", "ResetDialog"]
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport { type RecoveryCodeDialogProps } from './RecoveryCodeDialog';\nexport { type ResetDialogProps } from './ResetDialog';\n\nexport const AccountContainer: ComponentType<any> = lazy(() => import('./AccountContainer'));\nexport const DevicesContainer: ComponentType<any> = lazy(() => import('./DevicesContainer'));\nexport const InvitationsContainer: ComponentType<any> = lazy(() => import('./InvitationsContainer'));\nexport const UsageContainer: ComponentType<any> = lazy(() => import('./UsageContainer'));\nexport const JoinDialog: ComponentType<any> = lazy(() => import('./JoinDialog'));\nexport const ProfileContainer: ComponentType<any> = lazy(() => import('./ProfileContainer'));\nexport const RecoveryCodeDialog: ComponentType<any> = lazy(() => import('./RecoveryCodeDialog'));\nexport const RecoveryCredentialsContainer: ComponentType<any> = lazy(() => import('./RecoveryCredentialsContainer'));\nexport const ResetDialog: ComponentType<any> = lazy(() => import('./ResetDialog'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAA6BA,YAAY;AAKlC,IAAMC,mBAAuCD,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAME,mBAAuCF,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAMG,uBAA2CH,KAAK,MAAM,OAAO,sCAAA,CAAA;AACnE,IAAMI,iBAAqCJ,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC7D,IAAMK,aAAiCL,KAAK,MAAM,OAAO,4BAAA,CAAA;AACzD,IAAMM,mBAAuCN,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC/D,IAAMO,qBAAyCP,KAAK,MAAM,OAAO,oCAAA,CAAA;AACjE,IAAMQ,+BAAmDR,KAAK,MAAM,OAAO,8CAAA,CAAA;AAC3E,IAAMS,cAAkCT,KAAK,MAAM,OAAO,6BAAA,CAAA;",
|
|
6
|
+
"names": ["lazy", "AccountContainer", "DevicesContainer", "InvitationsContainer", "UsageContainer", "JoinDialog", "ProfileContainer", "RecoveryCodeDialog", "RecoveryCredentialsContainer", "ResetDialog"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreateAgent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7DEIKHB7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ClientCapabilities
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A7WDDIWY.mjs";
|
|
7
7
|
import "./chunk-J5LGTIGS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/operations/create-agent.ts
|
|
@@ -23,4 +23,4 @@ var create_agent_default = handler;
|
|
|
23
23
|
export {
|
|
24
24
|
create_agent_default as default
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=create-agent-
|
|
26
|
+
//# sourceMappingURL=create-agent-6UKJMZS5.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreateIdentity
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7DEIKHB7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ClientCapabilities,
|
|
6
6
|
ClientEvents
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A7WDDIWY.mjs";
|
|
8
8
|
import "./chunk-J5LGTIGS.mjs";
|
|
9
9
|
|
|
10
10
|
// src/operations/create-identity.ts
|
|
@@ -39,4 +39,4 @@ var create_identity_default = handler;
|
|
|
39
39
|
export {
|
|
40
40
|
create_identity_default as default
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=create-identity-
|
|
42
|
+
//# sourceMappingURL=create-identity-ULCRB3YH.mjs.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CreatePasskey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7DEIKHB7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ClientCapabilities
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A7WDDIWY.mjs";
|
|
7
7
|
import "./chunk-J5LGTIGS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/operations/create-passkey.ts
|
|
10
10
|
import * as Effect from "effect/Effect";
|
|
11
11
|
import * as Match from "effect/Match";
|
|
12
12
|
import { Capability } from "@dxos/app-framework";
|
|
13
|
-
import {
|
|
13
|
+
import { NativePasskey } from "@dxos/app-toolkit";
|
|
14
14
|
import { PublicKey } from "@dxos/client";
|
|
15
15
|
import { Operation } from "@dxos/compute";
|
|
16
16
|
import { invariant } from "@dxos/invariant";
|
|
@@ -20,12 +20,12 @@ var handler = CreatePasskey.pipe(Operation.withHandler(Effect.fnUntraced(functio
|
|
|
20
20
|
const identity = client.halo.identity.get();
|
|
21
21
|
invariant(identity, "Identity not available", { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 16, S: this, A: ["identity", "'Identity not available'"] });
|
|
22
22
|
const lookupKey = PublicKey.random();
|
|
23
|
-
const { recoveryKey, algorithm } = yield* Match.value(supportsNativePasskeys()).pipe(Match.when(true, () => Effect.gen(function* () {
|
|
24
|
-
const result = yield* Effect.promise(() => createNativePasskey({
|
|
23
|
+
const { recoveryKey, algorithm } = yield* Match.value(NativePasskey.supportsNativePasskeys()).pipe(Match.when(true, () => Effect.gen(function* () {
|
|
24
|
+
const result = yield* Effect.promise(() => NativePasskey.createNativePasskey({
|
|
25
25
|
username: identity.did,
|
|
26
26
|
userId: lookupKey.asUint8Array()
|
|
27
27
|
}));
|
|
28
|
-
const { publicKey, algorithm: alg } = extractPublicKeyFromAttestation(result.attestation_object);
|
|
28
|
+
const { publicKey, algorithm: alg } = NativePasskey.extractPublicKeyFromAttestation(result.attestation_object);
|
|
29
29
|
return {
|
|
30
30
|
recoveryKey: PublicKey.from(publicKey),
|
|
31
31
|
algorithm: alg === -7 ? "ES256" : "ED25519"
|
|
@@ -78,4 +78,4 @@ var create_passkey_default = handler;
|
|
|
78
78
|
export {
|
|
79
79
|
create_passkey_default as default
|
|
80
80
|
};
|
|
81
|
-
//# sourceMappingURL=create-passkey-
|
|
81
|
+
//# sourceMappingURL=create-passkey-I7VDS3AC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/create-passkey.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Match from 'effect/Match';\n\nimport { Capability } from '@dxos/app-framework';\nimport { NativePasskey } from '@dxos/app-toolkit';\nimport { PublicKey } from '@dxos/client';\nimport { Operation } from '@dxos/compute';\nimport { invariant } from '@dxos/invariant';\n\nimport { ClientCapabilities } from '../types';\nimport { CreatePasskey } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreatePasskey> = CreatePasskey.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* () {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const identity = client.halo.identity.get();\n invariant(identity, 'Identity not available');\n\n const lookupKey = PublicKey.random();\n\n const { recoveryKey, algorithm } = yield* Match.value(NativePasskey.supportsNativePasskeys()).pipe(\n Match.when(true, () =>\n Effect.gen(function* () {\n const result = yield* Effect.promise(() =>\n NativePasskey.createNativePasskey({\n username: identity.did,\n userId: lookupKey.asUint8Array(),\n }),\n );\n const { publicKey, algorithm: alg } = NativePasskey.extractPublicKeyFromAttestation(\n result.attestation_object,\n );\n return {\n recoveryKey: PublicKey.from(publicKey),\n algorithm: alg === -7 ? 'ES256' : 'ED25519',\n };\n }),\n ),\n Match.orElse(() =>\n Effect.gen(function* () {\n const credential = yield* Effect.promise(() =>\n navigator.credentials.create({\n publicKey: {\n challenge: new Uint8Array(),\n rp: { id: location.hostname, name: 'Composer' },\n user: {\n id: lookupKey.asUint8Array() as Uint8Array<ArrayBuffer>,\n name: identity.did,\n displayName: identity.profile?.displayName ?? '',\n },\n pubKeyCredParams: [\n { type: 'public-key', alg: -8 },\n { type: 'public-key', alg: -7 },\n ],\n authenticatorSelection: {\n residentKey: 'required',\n requireResidentKey: true,\n },\n },\n }),\n );\n invariant(credential, 'Credential not available');\n return {\n recoveryKey: PublicKey.from(new Uint8Array((credential as any).response.getPublicKey())),\n algorithm: (credential as any).response.getPublicKeyAlgorithm() === -7 ? 'ES256' : 'ED25519',\n };\n }),\n ),\n );\n\n invariant(client.services.services.IdentityService, 'IdentityService not available');\n yield* Effect.promise(() =>\n client.services.services.IdentityService!.createRecoveryCredential({\n data: {\n recoveryKey,\n algorithm,\n lookupKey,\n },\n }),\n );\n }),\n ),\n);\n\nexport default handler;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,YAAYA,YAAY;AACxB,YAAYC,WAAW;AAEvB,SAASC,kBAAkB;AAC3B,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAK1B,IAAA,eAA6DC;IAIvD,UAAMC,cAAkBC,KAAKD,UAAY,YAAA,kBAAA,aAAA;AACzCE,QAAAA,SAAUF,OAAU,WAAA,IAAA,mBAAA,MAAA;AAEpB,QAAMG,WAAAA,OAAYC,KAAUC,SAAM,IAAA;AAElC,YAAQC,UAAW,0BAAuBC,EAAAA,YAAYC,YAAcC,GAAAA,cAAAA,GAAAA,IAAAA,GAAsB,MAAIC,GAAAA,CAAI,YACtF,0BACG,EAAA,CAAA;oBACHC,UAAS,OAAOC;uBAElBC,UAAUb,IAASc,OAAG,YAAA,cAAA,uBAAA,CAAA,EAAA,KAAA,WAAA,MAAA,MAAA,WAAA,aAAA;mBACtBC,OAAkBC,eAAAA,MAAY,cAAA,oBAAA;MAChC,UAAA,SAAA;MAEMC,QAAAA,UAAWC,aAAmBV;IAGtC,CAAA,CAAA;UACEF,EAAAA,WAAaF,WAAUe,IAAKF,IAAAA,cAAAA,gCAAAA,OAAAA,kBAAAA;WAC5BC;MACF,aAAA,UAAA,KAAA,SAAA;MAGJX,WAAa,QACXK,KAAU,UAAC;IACT;oBAEIK,MAAW,WAAA,aAAA;uBACTG,OAAeC,eAAAA,MAAAA,UAAAA,YAAAA,OAAAA;iBACX;mBAAMC,IAAAA,WAAiB;YAAEC;UAAiB,IAAA,SAAA;UAC9CC,MAAM;;cAEJD;UACAE,IAAAA,UAAazB,aAAS0B;UACxB,MAAA,SAAA;UACAC,aAAAA,SAAkB,SAAA,eAAA;;0BACR;;YAAsB,MAAA;YAC9B,KAAA;;;YAA8B,MAAA;YAC/B,KAAA;UACDC;;gCAEsB;UACtB,aAAA;UACF,oBAAA;QACF;MAEF1B;IACA,CAAA,CAAA;cACEI,YAAaF,4BAA+ByB,EAAAA,YAAmBC,YAASC,GAAAA,cAAY,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,cAAA,4BAAA,EAAA,CAAA;WACpFb;MACF,aAAA,UAAA,KAAA,IAAA,WAAA,WAAA,SAAA,aAAA,CAAA,CAAA;MACF,WAAA,WAAA,SAAA,sBAAA,MAAA,KAAA,UAAA;IAIJhB;EACA,CAAA,CAAA,CAAOU;YAEHoB,OAAM,SAAA,SAAA,iBAAA,iCAAA,EAAA,YAAA,YAAA,GAAA,cAAA,GAAA,IAAA,GAAA,MAAA,GAAA,CAAA,4CAAA,iCAAA,EAAA,CAAA;SACJ1B,eAAAA,MAAAA,OAAAA,SAAAA,SAAAA,gBAAAA,yBAAAA;UACAY;MACAf;MACF;MACF;IAEJ;EAIJ,CAAA,CAAA;;;",
|
|
6
|
+
"names": ["Effect", "Match", "Capability", "NativePasskey", "PublicKey", "Operation", "invariant", "CreatePasskey", "identity", "halo", "invariant", "lookupKey", "PublicKey", "random", "recoveryKey", "Match", "NativePasskey", "supportsNativePasskeys", "pipe", "result", "Effect", "username", "did", "userId", "asUint8Array", "publicKey", "algorithm", "from", "challenge", "Uint8Array", "location", "name", "user", "displayName", "profile", "pubKeyCredParams", "authenticatorSelection", "credential", "response", "getPublicKey", "data"]
|
|
7
|
+
}
|
package/dist/lib/neutral/{create-recovery-code-ZWDKLPH4.mjs → create-recovery-code-DH2B6EGP.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RECOVERY_CODE_DIALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GSKMAS3S.mjs";
|
|
4
4
|
import {
|
|
5
5
|
CreateRecoveryCode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7DEIKHB7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ClientCapabilities
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A7WDDIWY.mjs";
|
|
10
10
|
import "./chunk-J5LGTIGS.mjs";
|
|
11
11
|
|
|
12
12
|
// src/operations/create-recovery-code.ts
|
|
@@ -33,4 +33,4 @@ var create_recovery_code_default = handler;
|
|
|
33
33
|
export {
|
|
34
34
|
create_recovery_code_default as default
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=create-recovery-code-
|
|
36
|
+
//# sourceMappingURL=create-recovery-code-DH2B6EGP.mjs.map
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-6G4KZLBG.mjs";
|
|
4
|
+
import "./chunk-ZFABGG2E.mjs";
|
|
5
5
|
import {
|
|
6
6
|
definitions_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7DEIKHB7.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Account,
|
|
10
|
+
AccountCache,
|
|
10
11
|
ClientAction,
|
|
11
12
|
ClientCapabilities,
|
|
12
13
|
ClientEvents
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-A7WDDIWY.mjs";
|
|
14
15
|
import "./chunk-J5LGTIGS.mjs";
|
|
15
16
|
export {
|
|
16
17
|
Account,
|
|
18
|
+
AccountCache,
|
|
17
19
|
ClientAction,
|
|
18
20
|
ClientCapabilities,
|
|
19
21
|
ClientEvents,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JOIN_DIALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GSKMAS3S.mjs";
|
|
4
4
|
import {
|
|
5
5
|
JoinIdentity
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7DEIKHB7.mjs";
|
|
7
7
|
import "./chunk-J5LGTIGS.mjs";
|
|
8
8
|
|
|
9
9
|
// src/operations/join-identity.ts
|
|
@@ -24,4 +24,4 @@ var join_identity_default = handler;
|
|
|
24
24
|
export {
|
|
25
25
|
join_identity_default as default
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=join-identity-
|
|
27
|
+
//# sourceMappingURL=join-identity-PJCHDNLH.mjs.map
|