@the-ai-company/cbio-node-runtime 1.45.5 → 1.46.0
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/clients/owner/client.d.ts +4 -10
- package/dist/clients/owner/client.js +39 -182
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/protocol/crypto.d.ts +5 -0
- package/dist/protocol/crypto.js +11 -0
- package/dist/protocol/crypto.js.map +1 -1
- package/dist/runtime/bootstrap.d.ts +7 -20
- package/dist/runtime/bootstrap.js +15 -61
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/identity.d.ts +1 -23
- package/dist/runtime/identity.js +2 -74
- package/dist/runtime/identity.js.map +1 -1
- package/dist/runtime/index.d.ts +8 -22
- package/dist/runtime/index.js +6 -10
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/vault-metadata.d.ts +4 -16
- package/dist/runtime/vault-metadata.js +8 -43
- package/dist/runtime/vault-metadata.js.map +1 -1
- package/dist/vault-core/contracts.d.ts +0 -23
- package/dist/vault-core/contracts.js +0 -1
- package/dist/vault-core/contracts.js.map +1 -1
- package/dist/vault-core/core.d.ts +4 -4
- package/dist/vault-core/core.js +10 -76
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-core/defaults.d.ts +4 -52
- package/dist/vault-core/defaults.js +2 -300
- package/dist/vault-core/defaults.js.map +1 -1
- package/dist/vault-core/index.d.ts +5 -5
- package/dist/vault-core/index.js +3 -3
- package/dist/vault-core/index.js.map +1 -1
- package/dist/vault-core/persistence.d.ts +5 -34
- package/dist/vault-core/persistence.js +8 -38
- package/dist/vault-core/persistence.js.map +1 -1
- package/dist/vault-core/ports.d.ts +2 -51
- package/dist/vault-ingress/index.d.ts +1 -2
- package/dist/vault-ingress/index.js +0 -5
- package/dist/vault-ingress/index.js.map +1 -1
- package/docs/api/README.md +6 -91
- package/docs/api/classes/IdentityError.md +1 -1
- package/docs/api/classes/VaultCore.md +320 -0
- package/docs/api/classes/VaultCoreError.md +1 -1
- package/docs/api/enumerations/IdentityErrorCode.md +1 -1
- package/docs/api/functions/createAgentClient.md +1 -1
- package/docs/api/functions/createIdentity.md +2 -2
- package/docs/api/functions/createOwnerHttpFlowBoundary.md +4 -4
- package/docs/api/functions/createPersistentVaultCoreDependencies.md +3 -67
- package/docs/api/functions/createStandardAcquireBoundary.md +3 -3
- package/docs/api/functions/createStandardDispatchBoundary.md +3 -3
- package/docs/api/functions/createVault.md +1 -1
- package/docs/api/functions/createVaultClient.md +2 -2
- package/docs/api/functions/createVaultCore.md +4 -4
- package/docs/api/functions/createVaultCoreDependencies.md +17 -0
- package/docs/api/functions/createVaultService.md +6 -6
- package/docs/api/functions/createWorkspaceStorage.md +1 -1
- package/docs/api/functions/deriveIdentityId.md +1 -1
- package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +24 -0
- package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
- package/docs/api/functions/handleVaultHttpDispatch.md +4 -4
- package/docs/api/functions/initializeVaultCustody.md +1 -1
- package/docs/api/functions/listVaults.md +3 -3
- package/docs/api/functions/readVaultProfile.md +3 -3
- package/docs/api/functions/recoverVault.md +1 -1
- package/docs/api/functions/recoverVaultWorkingKey.md +1 -1
- package/docs/api/functions/restoreIdentity.md +1 -1
- package/docs/api/functions/updateVaultMetadata.md +7 -7
- package/docs/api/functions/wrapVaultCoreAsVaultService.md +6 -6
- package/docs/api/functions/writeVaultProfile.md +3 -3
- package/docs/api/interfaces/AgentClient.md +3 -3
- package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
- package/docs/api/interfaces/AgentDispatchTransport.md +4 -4
- package/docs/api/interfaces/AgentIdentity.md +1 -1
- package/docs/api/interfaces/AgentSigner.md +1 -1
- package/docs/api/interfaces/CbioRuntime.md +48 -389
- package/docs/api/interfaces/CreateAgentClientOptions.md +4 -4
- package/docs/api/interfaces/CreateIdentityOptions.md +1 -5
- package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +9 -9
- package/docs/api/interfaces/CreateVaultClientOptions.md +5 -5
- package/docs/api/interfaces/CreateVaultOptions.md +16 -16
- package/docs/api/interfaces/CreatedVault.md +3 -3
- package/docs/api/interfaces/DefaultPolicyEngineOptions.md +3 -3
- package/docs/api/interfaces/IStorageProvider.md +1 -1
- package/docs/api/interfaces/InitializeVaultCustodyOptions.md +1 -1
- package/docs/api/interfaces/InitializedVaultCustody.md +1 -1
- package/docs/api/interfaces/OwnerDefineSecretTargetsInput.md +1 -1
- package/docs/api/interfaces/OwnerSecretTargetBinding.md +1 -1
- package/docs/api/interfaces/OwnerStoreSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerWriteSecretInput.md +1 -1
- package/docs/api/interfaces/RecoverVaultOptions.md +10 -10
- package/docs/api/interfaces/RecoveredVault.md +3 -3
- package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
- package/docs/api/interfaces/Signer.md +1 -1
- package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
- package/docs/api/interfaces/VaultClient.md +17 -27
- package/docs/api/interfaces/{CreateDefaultVaultCoreDependenciesOptions.md → VaultCoreDependenciesOptions.md} +3 -3
- package/docs/api/interfaces/VaultDeleteSecretInput.md +1 -1
- package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
- package/docs/api/interfaces/VaultGrantCapabilityInput.md +2 -2
- package/docs/api/interfaces/VaultIdentity.md +1 -1
- package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
- package/docs/api/interfaces/VaultListCapabilitiesInput.md +1 -1
- package/docs/api/interfaces/VaultObject.md +3 -3
- package/docs/api/interfaces/VaultProfile.md +7 -11
- package/docs/api/interfaces/VaultPublicMetadata.md +1 -1
- package/docs/api/interfaces/VaultRegisterAgentInput.md +1 -1
- package/docs/api/interfaces/VaultRegisterFlowInput.md +7 -7
- package/docs/api/interfaces/VaultRevokeCapabilityInput.md +1 -1
- package/docs/api/interfaces/VaultSigner.md +1 -1
- package/docs/api/type-aliases/AgentCapabilityEnvelope.md +2 -2
- package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
- package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +1 -1
- package/package.json +1 -1
- package/docs/api/classes/InMemoryReplayGuard.md +0 -45
- package/docs/api/enumerations/AuditAction.md +0 -95
- package/docs/api/enumerations/AuditOutcome.md +0 -29
- package/docs/api/enumerations/DispatchStatus.md +0 -23
- package/docs/api/functions/createChildIdentity.md +0 -25
- package/docs/api/functions/createDefaultVaultCoreDependencies.md +0 -77
- package/docs/api/functions/deriveChildIdentity.md +0 -41
- package/docs/api/functions/ensureIdentityPrivateVault.md +0 -21
- package/docs/api/functions/identityPrivateVaultChildrenKey.md +0 -17
- package/docs/api/functions/identityPrivateVaultPrefix.md +0 -17
- package/docs/api/functions/identityPrivateVaultProfileKey.md +0 -17
- package/docs/api/functions/identityPrivateVaultPublicSealedKey.md +0 -17
- package/docs/api/functions/listIdentities.md +0 -19
- package/docs/api/functions/readIdentityMetadata.md +0 -29
- package/docs/api/functions/readIdentityPrivateVaultChildrenState.md +0 -21
- package/docs/api/functions/readIdentityPrivateVaultProfile.md +0 -21
- package/docs/api/functions/readVaultPublicMetadata.md +0 -23
- package/docs/api/functions/toOwnerHttpFlowBoundary.md +0 -17
- package/docs/api/interfaces/AgentCapability.md +0 -103
- package/docs/api/interfaces/AgentIdentityRecord.md +0 -23
- package/docs/api/interfaces/AgentIdentityRegistry.md +0 -57
- package/docs/api/interfaces/AgentProof.md +0 -29
- package/docs/api/interfaces/AgentProofVerifier.md +0 -21
- package/docs/api/interfaces/AuditEntry.md +0 -89
- package/docs/api/interfaces/AuditLog.md +0 -37
- package/docs/api/interfaces/AuditQuery.md +0 -29
- package/docs/api/interfaces/CapabilityRegistry.md +0 -65
- package/docs/api/interfaces/CapabilityRevocationRegistry.md +0 -53
- package/docs/api/interfaces/ChildIdentity.md +0 -77
- package/docs/api/interfaces/Clock.md +0 -15
- package/docs/api/interfaces/CreateChildIdentityOptions.md +0 -19
- package/docs/api/interfaces/CustomHttpFlowDefinition.md +0 -71
- package/docs/api/interfaces/CustomHttpFlowRegistry.md +0 -41
- package/docs/api/interfaces/DeriveIdentityOptions.md +0 -11
- package/docs/api/interfaces/DispatchAuthorization.md +0 -35
- package/docs/api/interfaces/DispatchInstruction.md +0 -47
- package/docs/api/interfaces/DispatchRequest.md +0 -77
- package/docs/api/interfaces/DispatchResult.md +0 -53
- package/docs/api/interfaces/IdGenerator.md +0 -39
- package/docs/api/interfaces/IdentityPrivateVaultChildRecord.md +0 -35
- package/docs/api/interfaces/IdentityPrivateVaultChildrenState.md +0 -17
- package/docs/api/interfaces/IdentityPrivateVaultProfile.md +0 -35
- package/docs/api/interfaces/IssuerWriteSecretCommand.md +0 -59
- package/docs/api/interfaces/OwnerAuditRequest.md +0 -47
- package/docs/api/interfaces/OwnerDefineSecretTargetsCommand.md +0 -53
- package/docs/api/interfaces/OwnerDeleteSecretCommand.md +0 -47
- package/docs/api/interfaces/OwnerExportSecretRequest.md +0 -47
- package/docs/api/interfaces/OwnerHttpFlowBoundary.md +0 -51
- package/docs/api/interfaces/OwnerIdentityRecord.md +0 -23
- package/docs/api/interfaces/OwnerIdentityRegistry.md +0 -57
- package/docs/api/interfaces/OwnerListAgentsRequest.md +0 -41
- package/docs/api/interfaces/OwnerListCapabilitiesRequest.md +0 -47
- package/docs/api/interfaces/OwnerProof.md +0 -29
- package/docs/api/interfaces/OwnerProofVerifier.md +0 -181
- package/docs/api/interfaces/OwnerRegisterAgentIdentityCommand.md +0 -47
- package/docs/api/interfaces/OwnerRegisterCapabilityCommand.md +0 -47
- package/docs/api/interfaces/OwnerRegisterCustomHttpFlowCommand.md +0 -83
- package/docs/api/interfaces/OwnerRevokeCapabilityCommand.md +0 -53
- package/docs/api/interfaces/OwnerSecretExport.md +0 -35
- package/docs/api/interfaces/OwnerWriteSecretCommand.md +0 -65
- package/docs/api/interfaces/PolicyEngine.md +0 -81
- package/docs/api/interfaces/RateLimitStore.md +0 -33
- package/docs/api/interfaces/ReplayGuard.md +0 -21
- package/docs/api/interfaces/SecretAlias.md +0 -11
- package/docs/api/interfaces/SecretCustody.md +0 -57
- package/docs/api/interfaces/SecretId.md +0 -11
- package/docs/api/interfaces/SecretRecord.md +0 -53
- package/docs/api/interfaces/SecretRepository.md +0 -69
- package/docs/api/interfaces/SecretVersion.md +0 -11
- package/docs/api/interfaces/SignatureAgentProofVerifierOptions.md +0 -21
- package/docs/api/interfaces/TrustedExecutor.md +0 -31
- package/docs/api/interfaces/VaultAcquireSecretInput.md +0 -53
- package/docs/api/interfaces/VaultAcquireSecretResult.md +0 -41
- package/docs/api/interfaces/VaultAgentDispatchErrorResponse.md +0 -25
- package/docs/api/interfaces/VaultAgentDispatchRequest.md +0 -75
- package/docs/api/interfaces/VaultAgentDispatchResponse.md +0 -17
- package/docs/api/interfaces/VaultCore.md +0 -311
- package/docs/api/interfaces/VaultCoreDependencies.md +0 -95
- package/docs/api/interfaces/VaultCustomFlowResolver.md +0 -25
- package/docs/api/interfaces/VaultId.md +0 -11
- package/docs/api/interfaces/VaultPrincipal.md +0 -17
- package/docs/api/interfaces/VaultService.md +0 -251
- package/docs/api/interfaces/VaultTargetBinding.md +0 -35
- package/docs/api/type-aliases/IdentityPrivateVaultAccess.md +0 -7
- package/docs/api/type-aliases/RedactedResponseShape.md +0 -7
- package/docs/api/type-aliases/VaultAcquireSecretFlow.md +0 -7
- package/docs/api/type-aliases/VaultPrincipalKind.md +0 -7
- package/docs/api/type-aliases/VaultWriteSecretCommand.md +0 -7
|
@@ -1,29 +1,12 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { createVaultCore } from "../vault-core/core.js";
|
|
3
3
|
import { createPersistentVaultCoreDependencies, } from "../vault-core/index.js";
|
|
4
|
+
import { deriveVaultWorkingKeyFromPassword } from "../protocol/crypto.js";
|
|
4
5
|
import { wrapVaultCoreAsVaultService, } from "../vault-ingress/index.js";
|
|
5
6
|
import { createPrefixedStorage } from "../storage/prefix.js";
|
|
6
7
|
import { FsStorageProvider } from "../storage/fs.js";
|
|
7
|
-
import { readVaultProfile, writeVaultProfile
|
|
8
|
+
import { readVaultProfile, writeVaultProfile } from "./vault-metadata.js";
|
|
8
9
|
import { createWorkspaceStorage } from "./workspace-storage.js";
|
|
9
|
-
/**
|
|
10
|
-
* Derives the deterministic working key for a vault.
|
|
11
|
-
*
|
|
12
|
-
* @param privateKey - The owner's private key.
|
|
13
|
-
* @param vaultId - The unique ID of the vault.
|
|
14
|
-
* @returns A base64url-encoded 256-bit key.
|
|
15
|
-
* @internal Used by `createVault` and `recoverVault`.
|
|
16
|
-
*/
|
|
17
|
-
export function deriveVaultWorkingKey(privateKey, vaultId) {
|
|
18
|
-
return crypto
|
|
19
|
-
.createHash("sha256")
|
|
20
|
-
.update("cbio:vault-working-key:v1")
|
|
21
|
-
.update("\n")
|
|
22
|
-
.update(vaultId)
|
|
23
|
-
.update("\n")
|
|
24
|
-
.update(privateKey)
|
|
25
|
-
.digest("base64url");
|
|
26
|
-
}
|
|
27
10
|
function vaultStoragePrefix(vaultId) {
|
|
28
11
|
return `vaults/${vaultId}`;
|
|
29
12
|
}
|
|
@@ -47,33 +30,19 @@ export async function createVault(storageOrOptions, maybeOptions) {
|
|
|
47
30
|
const { storage: workspaceStorage, options } = resolveStorage(storageOrOptions, maybeOptions);
|
|
48
31
|
const vaultId = options.vaultId ?? `vault_${crypto.randomUUID()}`;
|
|
49
32
|
const storage = createPrefixedStorage(workspaceStorage, vaultStoragePrefix(vaultId));
|
|
50
|
-
const vaultWorkingKey =
|
|
33
|
+
const vaultWorkingKey = deriveVaultWorkingKeyFromPassword(options.password, vaultId);
|
|
51
34
|
const deps = createPersistentVaultCoreDependencies(storage, {
|
|
52
35
|
...options,
|
|
53
36
|
vaultId,
|
|
54
37
|
vaultWorkingKey,
|
|
55
38
|
});
|
|
56
39
|
const core = createVaultCore(deps);
|
|
57
|
-
const bootstrapOwner = {
|
|
58
|
-
vaultId: core.vaultId,
|
|
59
|
-
ownerId: options.ownerIdentity.identityId,
|
|
60
|
-
publicKey: options.ownerIdentity.publicKey,
|
|
61
|
-
};
|
|
62
|
-
await core.bootstrapOwnerIdentity(bootstrapOwner);
|
|
63
40
|
const nickname = options.nickname?.trim() ? options.nickname.trim() : undefined;
|
|
64
|
-
//
|
|
65
|
-
// 2. Discovery metadata (ownerId, nickname, custom tags) is stored in the public sealed profile for easy UI retrieval
|
|
41
|
+
// Single encrypted profile block. Hold the password to see everything.
|
|
66
42
|
await writeVaultProfile(storage, {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
sealedPublic: {
|
|
72
|
-
vaultId,
|
|
73
|
-
ownerId: options.ownerIdentity.identityId,
|
|
74
|
-
...options.publicMetadata,
|
|
75
|
-
nickname, // Nickname override takes precedence
|
|
76
|
-
}
|
|
43
|
+
vaultId,
|
|
44
|
+
nickname,
|
|
45
|
+
...options.metadata,
|
|
77
46
|
}, vaultWorkingKey, vaultId);
|
|
78
47
|
return {
|
|
79
48
|
core,
|
|
@@ -85,7 +54,7 @@ export async function createVault(storageOrOptions, maybeOptions) {
|
|
|
85
54
|
export async function recoverVault(storageOrOptions, maybeOptions) {
|
|
86
55
|
const { storage: workspaceStorage, options } = resolveStorage(storageOrOptions, maybeOptions);
|
|
87
56
|
const storage = createPrefixedStorage(workspaceStorage, vaultStoragePrefix(options.vaultId));
|
|
88
|
-
const vaultWorkingKey =
|
|
57
|
+
const vaultWorkingKey = deriveVaultWorkingKeyFromPassword(options.password, options.vaultId);
|
|
89
58
|
const deps = createPersistentVaultCoreDependencies(storage, {
|
|
90
59
|
...options,
|
|
91
60
|
vaultId: options.vaultId,
|
|
@@ -99,7 +68,7 @@ export async function recoverVault(storageOrOptions, maybeOptions) {
|
|
|
99
68
|
return {
|
|
100
69
|
core,
|
|
101
70
|
vault: wrapVaultCoreAsVaultService(core, options.vault),
|
|
102
|
-
nickname: profile.
|
|
71
|
+
nickname: profile.nickname,
|
|
103
72
|
storage,
|
|
104
73
|
};
|
|
105
74
|
}
|
|
@@ -113,35 +82,20 @@ export async function listVaults(storage) {
|
|
|
113
82
|
if (!storage.list) {
|
|
114
83
|
return [];
|
|
115
84
|
}
|
|
116
|
-
|
|
117
|
-
const results = [];
|
|
118
|
-
for (const id of ids) {
|
|
119
|
-
const vaultStorage = createPrefixedStorage(storage, vaultStoragePrefix(id));
|
|
120
|
-
const publicData = await readVaultPublicMetadata(vaultStorage, id);
|
|
121
|
-
results.push({
|
|
122
|
-
vaultId: id,
|
|
123
|
-
public: publicData || {},
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
return results;
|
|
85
|
+
return await storage.list("vaults");
|
|
127
86
|
}
|
|
128
87
|
/**
|
|
129
88
|
* Updates the metadata (like nickname) of an existing vault.
|
|
130
89
|
*/
|
|
131
90
|
export async function updateVaultMetadata(vault, options) {
|
|
132
91
|
const vaultId = vault.core.vaultId.value;
|
|
133
|
-
const vaultWorkingKey =
|
|
134
|
-
// Read current profile to preserve
|
|
92
|
+
const vaultWorkingKey = deriveVaultWorkingKeyFromPassword(options.password, vaultId);
|
|
93
|
+
// Read current profile to preserve other fields
|
|
135
94
|
const current = await readVaultProfile(vault.storage, vaultWorkingKey, vaultId);
|
|
136
95
|
await writeVaultProfile(vault.storage, {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
vaultId,
|
|
141
|
-
ownerId: options.ownerIdentity.identityId, // Ensure ownerId is always populated for discovery
|
|
142
|
-
...(options.publicMetadata ?? {}), // Merge new custom fields if any
|
|
143
|
-
nickname: options.nickname ?? current?.sealedPublic.nickname,
|
|
144
|
-
}
|
|
96
|
+
...(current || {}),
|
|
97
|
+
nickname: options.nickname ?? current?.nickname,
|
|
98
|
+
...(options.metadata ?? {}),
|
|
145
99
|
}, vaultWorkingKey, vaultId);
|
|
146
100
|
}
|
|
147
101
|
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/runtime/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,qCAAqC,
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../src/runtime/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,qCAAqC,GAGtC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EACL,2BAA2B,GAG5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIhE,SAAS,kBAAkB,CAAC,OAAe;IACzC,OAAO,UAAU,OAAO,EAAE,CAAC;AAC7B,CAAC;AAkDD,SAAS,cAAc,CACrB,gBAAsF,EACtF,YAAuD;IAEvD,IAAI,YAAY,EAAE,CAAC;QACjB,MAAM,OAAO,GAAG,OAAO,gBAAgB,KAAK,QAAQ;YAClD,CAAC,CAAC,IAAI,iBAAiB,CAAC,gBAAgB,CAAC;YACzC,CAAC,CAAC,gBAAoC,CAAC;QACzC,OAAO;YACL,OAAO;YACP,OAAO,EAAE,YAAY;SACtB,CAAC;IACJ,CAAC;IACD,gEAAgE;IAChE,OAAO;QACL,OAAO,EAAE,sBAAsB,EAAE;QACjC,OAAO,EAAE,gBAA4D;KACtE,CAAC;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AAM,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAEhF,MAAM,iBAAiB,CAAC,KAAK,CAAC,OAAO,EAAE;QACrC,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,OAAO,EAAE,QAAQ;QAC/C,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;KAC5B,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -7,19 +7,11 @@ export interface CreatedIdentity {
|
|
|
7
7
|
identityId: string;
|
|
8
8
|
/** A human-readable label (local only, not part of the crypto identity). */
|
|
9
9
|
nickname?: string;
|
|
10
|
-
/** The identity ID of the parent, if this is a child identity. */
|
|
11
|
-
parentIdentityId?: string;
|
|
12
|
-
/** The derivation index, if this is a child identity. */
|
|
13
|
-
childIndex?: number;
|
|
14
10
|
/** The base64url-encoded public key. */
|
|
15
11
|
publicKey: string;
|
|
16
12
|
/** The base64url-encoded Ed25519 PKCS#8 private key. */
|
|
17
13
|
privateKey: string;
|
|
18
14
|
}
|
|
19
|
-
export interface ChildIdentity extends CreatedIdentity {
|
|
20
|
-
parentIdentityId: string;
|
|
21
|
-
childIndex: number;
|
|
22
|
-
}
|
|
23
15
|
export interface CreateIdentityOptions {
|
|
24
16
|
nickname?: string;
|
|
25
17
|
}
|
|
@@ -30,7 +22,7 @@ export interface DeriveIdentityOptions {
|
|
|
30
22
|
nickname?: string;
|
|
31
23
|
}
|
|
32
24
|
/**
|
|
33
|
-
* Creates a new
|
|
25
|
+
* Creates a new identity with a fresh Ed25519 keypair.
|
|
34
26
|
*
|
|
35
27
|
* @param options - Configuration for the new identity.
|
|
36
28
|
* @returns A {@link CreatedIdentity} containing the ID and keys.
|
|
@@ -55,17 +47,3 @@ export declare function createIdentity(options?: CreateIdentityOptions): Created
|
|
|
55
47
|
* ```
|
|
56
48
|
*/
|
|
57
49
|
export declare function restoreIdentity(privateKey: string, options?: RestoreIdentityOptions): CreatedIdentity;
|
|
58
|
-
/**
|
|
59
|
-
* Deterministically derives a child identity from a parent's private key and an index.
|
|
60
|
-
*
|
|
61
|
-
* @param parent - The parent identity object or its private key string.
|
|
62
|
-
* @param childIndex - A non-negative integer for derivation.
|
|
63
|
-
* @param options - Optional nickname for the child.
|
|
64
|
-
* @returns A {@link ChildIdentity} with derivation metadata.
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```ts
|
|
68
|
-
* const child = deriveChildIdentity(parentIdentity, 0, { nickname: 'sub-agent-0' });
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare function deriveChildIdentity(parent: CreatedIdentity | string, childIndex: number, options?: DeriveIdentityOptions): ChildIdentity;
|
package/dist/runtime/identity.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createHmac, createPrivateKey, createPublicKey } from "node:crypto";
|
|
2
1
|
import { derivePublicKey, generateIdentityKeys } from "../protocol/crypto.js";
|
|
3
2
|
import { deriveIdentityId } from "../protocol/identity.js";
|
|
4
3
|
const ED25519_PKCS8_PREFIX = Buffer.from("302e020100300506032b657004220420", "hex");
|
|
@@ -17,12 +16,6 @@ function decodeEd25519Seed(privateKey) {
|
|
|
17
16
|
function encodeEd25519PrivateKey(seed) {
|
|
18
17
|
return Buffer.concat([ED25519_PKCS8_PREFIX, seed]).toString("base64url");
|
|
19
18
|
}
|
|
20
|
-
function toParentPrivateKey(parent) {
|
|
21
|
-
if (!parent) {
|
|
22
|
-
return undefined;
|
|
23
|
-
}
|
|
24
|
-
return typeof parent === "string" ? parent.trim() : parent.privateKey.trim();
|
|
25
|
-
}
|
|
26
19
|
function createRootIdentity(options = {}) {
|
|
27
20
|
const keyPair = generateIdentityKeys();
|
|
28
21
|
if (!keyPair.publicKey || !keyPair.privateKey) {
|
|
@@ -36,15 +29,8 @@ function createRootIdentity(options = {}) {
|
|
|
36
29
|
privateKey: keyPair.privateKey,
|
|
37
30
|
};
|
|
38
31
|
}
|
|
39
|
-
export function createIdentity(
|
|
40
|
-
|
|
41
|
-
(typeof parentOrOptions === "object" &&
|
|
42
|
-
parentOrOptions !== null &&
|
|
43
|
-
"privateKey" in parentOrOptions);
|
|
44
|
-
if (hasParent) {
|
|
45
|
-
throw new Error("createIdentity() only creates root identities; use createChildIdentity() or deriveChildIdentity()");
|
|
46
|
-
}
|
|
47
|
-
return createRootIdentity(parentOrOptions ?? {});
|
|
32
|
+
export function createIdentity(optionsOrParams) {
|
|
33
|
+
return createRootIdentity(optionsOrParams ?? {});
|
|
48
34
|
}
|
|
49
35
|
/**
|
|
50
36
|
* Restores an identity from an existing private key.
|
|
@@ -72,62 +58,4 @@ export function restoreIdentity(privateKey, options = {}) {
|
|
|
72
58
|
privateKey: normalizedPrivateKey,
|
|
73
59
|
};
|
|
74
60
|
}
|
|
75
|
-
function deriveIdentity(parentPrivateKey, childIndex, options = {}) {
|
|
76
|
-
const normalizedParentPrivateKey = parentPrivateKey.trim();
|
|
77
|
-
if (!normalizedParentPrivateKey) {
|
|
78
|
-
throw new Error("parent private key is required");
|
|
79
|
-
}
|
|
80
|
-
if (!Number.isInteger(childIndex) || childIndex < 0) {
|
|
81
|
-
throw new Error("childIndex must be a non-negative integer");
|
|
82
|
-
}
|
|
83
|
-
const parentSeed = decodeEd25519Seed(normalizedParentPrivateKey);
|
|
84
|
-
const childSeed = createHmac("sha256", parentSeed)
|
|
85
|
-
.update("cbio:identity:child:v1")
|
|
86
|
-
.update("\0")
|
|
87
|
-
.update(String(childIndex))
|
|
88
|
-
.digest();
|
|
89
|
-
const privateKey = encodeEd25519PrivateKey(childSeed);
|
|
90
|
-
const privateKeyObject = createPrivateKey({
|
|
91
|
-
key: Buffer.from(privateKey, "base64url"),
|
|
92
|
-
format: "der",
|
|
93
|
-
type: "pkcs8",
|
|
94
|
-
});
|
|
95
|
-
const publicKey = Buffer.from(createPublicKey(privateKeyObject).export({
|
|
96
|
-
type: "spki",
|
|
97
|
-
format: "der",
|
|
98
|
-
})).toString("base64url");
|
|
99
|
-
return {
|
|
100
|
-
identityId: deriveIdentityId(publicKey),
|
|
101
|
-
nickname: normalizeNickname(options.nickname),
|
|
102
|
-
publicKey,
|
|
103
|
-
privateKey,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Deterministically derives a child identity from a parent's private key and an index.
|
|
108
|
-
*
|
|
109
|
-
* @param parent - The parent identity object or its private key string.
|
|
110
|
-
* @param childIndex - A non-negative integer for derivation.
|
|
111
|
-
* @param options - Optional nickname for the child.
|
|
112
|
-
* @returns A {@link ChildIdentity} with derivation metadata.
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```ts
|
|
116
|
-
* const child = deriveChildIdentity(parentIdentity, 0, { nickname: 'sub-agent-0' });
|
|
117
|
-
* ```
|
|
118
|
-
*/
|
|
119
|
-
export function deriveChildIdentity(parent, childIndex, options = {}) {
|
|
120
|
-
const parentPrivateKey = toParentPrivateKey(parent);
|
|
121
|
-
if (!parentPrivateKey) {
|
|
122
|
-
throw new Error("parent private key is required");
|
|
123
|
-
}
|
|
124
|
-
const parentIdentity = typeof parent === "string"
|
|
125
|
-
? restoreIdentity(parentPrivateKey)
|
|
126
|
-
: parent;
|
|
127
|
-
return {
|
|
128
|
-
...deriveIdentity(parentPrivateKey, childIndex, options),
|
|
129
|
-
parentIdentityId: parentIdentity.identityId,
|
|
130
|
-
childIndex,
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
61
|
//# sourceMappingURL=identity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/runtime/identity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/runtime/identity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,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AAQ,CAAC,CAAC;IACrD,OAAO;QACL,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC;QAC/C,QAAQ;QACR,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC;AACJ,CAAC;AAeD,MAAM,UAAU,cAAc,CAC5B,eAAuC;IAEvC,OAAO,kBAAkB,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB,EAAE,UAAkC,EAAE;IACtF,MAAM,oBAAoB,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;IAC/C,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,SAAS,GAAG,eAAe,CAAC,oBAAoB,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACrD,OAAO;QACL,UAAU,EAAE,gBAAgB,CAAC,SAAS,CAAC;QACvC,QAAQ;QACR,SAAS;QACT,UAAU,EAAE,oBAAoB;KACjC,CAAC;AACJ,CAAC"}
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -3,24 +3,20 @@
|
|
|
3
3
|
* Public surface: typed high-level runtime plus supported low-level building blocks.
|
|
4
4
|
*/
|
|
5
5
|
export { IdentityError, IdentityErrorCode } from "../errors.js";
|
|
6
|
-
export { derivePublicKey, LocalSigner, type Signer } from "../protocol/crypto.js";
|
|
6
|
+
export { derivePublicKey, LocalSigner, type Signer, deriveVaultWorkingKeyFromPassword } from "../protocol/crypto.js";
|
|
7
7
|
export { deriveIdentityId } from "../protocol/identity.js";
|
|
8
8
|
export type { IStorageProvider } from "../storage/provider.js";
|
|
9
9
|
export { FsStorageProvider } from "../storage/fs.js";
|
|
10
10
|
export { MemoryStorageProvider } from "../storage/memory.js";
|
|
11
|
-
export { createIdentity,
|
|
12
|
-
export {
|
|
13
|
-
export { readVaultProfile, writeVaultProfile, readVaultPublicMetadata, type VaultProfile, } from "./vault-metadata.js";
|
|
11
|
+
export { createIdentity, restoreIdentity, type CreateIdentityOptions, type RestoreIdentityOptions, type CreatedIdentity, } from "./identity.js";
|
|
12
|
+
export { readVaultProfile, writeVaultProfile, type VaultProfile, } from "./vault-metadata.js";
|
|
14
13
|
export { createWorkspaceStorage, getDefaultWorkspaceDir, } from "./workspace-storage.js";
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export { createVaultCore, DefaultVaultCore, VaultCoreError, createDefaultVaultCoreDependencies, type CreateDefaultVaultCoreDependenciesOptions, type DefaultPolicyEngineOptions, DefaultPolicyEngine, createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY, type InitializeVaultCustodyOptions, type InitializedVaultCustody, type CreatePersistentVaultCoreDependenciesOptions, PersistentVaultAgentIdentityRegistry, PersistentVaultAuditLog, PersistentVaultOwnerIdentityRegistry, PersistentVaultCapabilityRegistry, PersistentVaultCapabilityRevocationRegistry, PersistentVaultCustomHttpFlowRegistry, PersistentVaultRateLimitStore, PersistentVaultReplayGuard, PersistentVaultSecretCustody, PersistentVaultSecretRepository, HttpDispatchExecutor, InMemoryAgentIdentityRegistry, InMemoryCapabilityRegistry, InMemoryCapabilityRevocationRegistry, InMemoryCustomHttpFlowRegistry, InMemoryRateLimitStore, InMemoryReplayGuard, InMemoryAuditLog, InMemoryOwnerIdentityRegistry, InMemorySecretCustody, InMemorySecretRepository, RandomIdGenerator, SignatureOwnerProofVerifier, type SignatureAgentProofVerifierOptions, SignatureAgentProofVerifier, SystemClock, type AgentCapability, type AgentIdentityRecord, type AgentProof, type OwnerAuditRequest, type OwnerExportSecretRequest, type OwnerDefineSecretTargetsCommand, type OwnerRegisterCapabilityCommand, type OwnerRegisterAgentIdentityCommand, type OwnerRegisterCustomHttpFlowCommand, type OwnerSecretExport, type OwnerIdentityRecord, type CustomHttpFlowDefinition, type OwnerProof, type AuditEntry, type AuditLog, type AuditQuery, type Clock, type DispatchAuthorization, type DispatchInstruction, type DispatchRequest, type DispatchResult, type IdGenerator, type OwnerIdentityRegistry, type OwnerProofVerifier, type PolicyEngine, type RateLimitStore, type ReplayGuard, type CustomHttpFlowRegistry, type SecretAlias, type SecretCustody, type SecretId, type SecretRecord, type SecretRepository, type SecretVersion, type TrustedExecutor, type VaultCore, type VaultCoreDependencies, type VaultPrincipal, type VaultPrincipalKind, type VaultTargetBinding, type VaultWriteSecretCommand, type VaultId, type AgentIdentityRegistry, type AgentProofVerifier, type CapabilityRevocationRegistry, type CapabilityRegistry, type AuditAction, type AuditOutcome, type DispatchStatus, type OwnerWriteSecretCommand, type IssuerWriteSecretCommand, type OwnerDeleteSecretCommand, type OwnerListAgentsRequest, type OwnerListCapabilitiesRequest, type OwnerRevokeCapabilityCommand, } from "../vault-core/index.js";
|
|
14
|
+
export { createVault, recoverVault, listVaults, updateVaultMetadata, type CreateVaultOptions, type CreatedVault, type RecoverVaultOptions, type RecoveredVault, type VaultObject, type VaultMetadata as VaultPublicMetadata, } from "./bootstrap.js";
|
|
15
|
+
export { createVaultCore, VaultCore, VaultCoreError, createVaultCoreDependencies, type VaultCoreDependenciesOptions, type DefaultPolicyEngineOptions, DefaultPolicyEngine, createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY, type InitializeVaultCustodyOptions, type InitializedVaultCustody, type CreatePersistentVaultCoreDependenciesOptions, PersistentVaultAgentIdentityRegistry, PersistentVaultAuditLog, PersistentVaultCapabilityRegistry, PersistentVaultCapabilityRevocationRegistry, PersistentVaultCustomHttpFlowRegistry, PersistentVaultRateLimitStore, PersistentVaultReplayGuard, PersistentVaultSecretCustody, PersistentVaultSecretRepository, } from "../vault-core/index.js";
|
|
18
16
|
export { createVaultClient, type VaultClient, type CreateVaultClientOptions, type VaultIdentity, type VaultSigner, type VaultAuditQueryInput, type OwnerDefineSecretTargetsInput, type VaultExportSecretInput, type VaultGrantCapabilityInput, type VaultRegisterFlowInput, type VaultRegisterAgentInput, type OwnerSecretTargetBinding, type OwnerStoreSecretInput, type OwnerWriteSecretInput, type VaultDeleteSecretInput, type VaultListAgentsInput, type VaultListCapabilitiesInput, type VaultRevokeCapabilityInput, } from "../clients/owner/index.js";
|
|
19
17
|
export { createAgentClient, type AgentClient, type CreateAgentClientOptions, type AgentIdentity, type AgentCapabilityEnvelope, type AgentDispatchIntent, type AgentDispatchTransport, type AgentSigner, } from "../clients/agent/index.js";
|
|
20
|
-
export { createVaultService, wrapVaultCoreAsVaultService, createOwnerHttpFlowBoundary, createStandardAcquireBoundary, createStandardDispatchBoundary,
|
|
18
|
+
export { createVaultService, wrapVaultCoreAsVaultService, createOwnerHttpFlowBoundary, createStandardAcquireBoundary, createStandardDispatchBoundary, AgentDispatchHttpTransport, handleVaultHttpDispatch, } from "../vault-ingress/index.js";
|
|
21
19
|
export { LocalVaultTransport } from "../vault-ingress/defaults.js";
|
|
22
|
-
export { AgentDispatchHttpTransport } from "../vault-ingress/remote-transport.js";
|
|
23
|
-
export { handleVaultHttpDispatch } from "../vault-ingress/server-utils.js";
|
|
24
20
|
/**
|
|
25
21
|
* Main runtime interface.
|
|
26
22
|
*/
|
|
@@ -35,24 +31,14 @@ export interface CbioRuntime {
|
|
|
35
31
|
PersistentVaultCapabilityRevocationRegistry: typeof import("../vault-core/index.js").PersistentVaultCapabilityRevocationRegistry;
|
|
36
32
|
createIdentity: typeof import("./identity.js").createIdentity;
|
|
37
33
|
restoreIdentity: typeof import("./identity.js").restoreIdentity;
|
|
38
|
-
createChildIdentity: typeof import("./child-identity.js").createChildIdentity;
|
|
39
|
-
deriveChildIdentity: typeof import("./identity.js").deriveChildIdentity;
|
|
40
|
-
ensureIdentityPrivateVault: typeof import("./private-vault.js").ensureIdentityPrivateVault;
|
|
41
|
-
readIdentityPrivateVaultProfile: typeof import("./private-vault.js").readIdentityPrivateVaultProfile;
|
|
42
|
-
readIdentityPrivateVaultChildrenState: typeof import("./private-vault.js").readIdentityPrivateVaultChildrenState;
|
|
43
|
-
readIdentityMetadata: typeof import("./private-vault.js").readIdentityMetadata;
|
|
44
|
-
listIdentities: typeof import("./private-vault.js").listIdentities;
|
|
45
34
|
listVaults: typeof import("./bootstrap.js").listVaults;
|
|
46
35
|
createVault: typeof import("./bootstrap.js").createVault;
|
|
47
36
|
recoverVault: typeof import("./bootstrap.js").recoverVault;
|
|
48
|
-
|
|
37
|
+
deriveVaultWorkingKeyFromPassword: typeof import("../protocol/crypto.js").deriveVaultWorkingKeyFromPassword;
|
|
49
38
|
createVaultClient: typeof import("../clients/owner/index.js").createVaultClient;
|
|
50
39
|
createAgentClient: typeof import("../clients/agent/index.js").createAgentClient;
|
|
51
40
|
createVaultCore: typeof import("../vault-core/index.js").createVaultCore;
|
|
52
|
-
|
|
53
|
-
createPersistentVaultCoreDependencies: typeof import("../vault-core/index.js").createPersistentVaultCoreDependencies;
|
|
54
|
-
initializeVaultCustody: typeof import("../vault-core/index.js").initializeVaultCustody;
|
|
55
|
-
recoverVaultWorkingKey: typeof import("../vault-core/index.js").recoverVaultWorkingKey;
|
|
41
|
+
createVaultCoreDependencies: typeof import("../vault-core/index.js").createVaultCoreDependencies;
|
|
56
42
|
createVaultService: typeof import("../vault-ingress/index.js").createVaultService;
|
|
57
43
|
wrapVaultCoreAsVaultService: typeof import("../vault-ingress/index.js").wrapVaultCoreAsVaultService;
|
|
58
44
|
createOwnerHttpFlowBoundary: typeof import("../vault-ingress/index.js").createOwnerHttpFlowBoundary;
|
package/dist/runtime/index.js
CHANGED
|
@@ -3,21 +3,17 @@
|
|
|
3
3
|
* Public surface: typed high-level runtime plus supported low-level building blocks.
|
|
4
4
|
*/
|
|
5
5
|
export { IdentityError, IdentityErrorCode } from "../errors.js";
|
|
6
|
-
export { derivePublicKey, LocalSigner } from "../protocol/crypto.js";
|
|
6
|
+
export { derivePublicKey, LocalSigner, deriveVaultWorkingKeyFromPassword } from "../protocol/crypto.js";
|
|
7
7
|
export { deriveIdentityId } from "../protocol/identity.js";
|
|
8
8
|
export { FsStorageProvider } from "../storage/fs.js";
|
|
9
9
|
export { MemoryStorageProvider } from "../storage/memory.js";
|
|
10
|
-
export { createIdentity,
|
|
11
|
-
export {
|
|
12
|
-
export { readVaultProfile, writeVaultProfile, readVaultPublicMetadata, } from "./vault-metadata.js";
|
|
10
|
+
export { createIdentity, restoreIdentity, } from "./identity.js";
|
|
11
|
+
export { readVaultProfile, writeVaultProfile, } from "./vault-metadata.js";
|
|
13
12
|
export { createWorkspaceStorage, getDefaultWorkspaceDir, } from "./workspace-storage.js";
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export { createVaultCore, DefaultVaultCore, VaultCoreError, createDefaultVaultCoreDependencies, DefaultPolicyEngine, createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY, PersistentVaultAgentIdentityRegistry, PersistentVaultAuditLog, PersistentVaultOwnerIdentityRegistry, PersistentVaultCapabilityRegistry, PersistentVaultCapabilityRevocationRegistry, PersistentVaultCustomHttpFlowRegistry, PersistentVaultRateLimitStore, PersistentVaultReplayGuard, PersistentVaultSecretCustody, PersistentVaultSecretRepository, HttpDispatchExecutor, InMemoryAgentIdentityRegistry, InMemoryCapabilityRegistry, InMemoryCapabilityRevocationRegistry, InMemoryCustomHttpFlowRegistry, InMemoryRateLimitStore, InMemoryReplayGuard, InMemoryAuditLog, InMemoryOwnerIdentityRegistry, InMemorySecretCustody, InMemorySecretRepository, RandomIdGenerator, SignatureOwnerProofVerifier, SignatureAgentProofVerifier, SystemClock, } from "../vault-core/index.js";
|
|
13
|
+
export { createVault, recoverVault, listVaults, updateVaultMetadata, } from "./bootstrap.js";
|
|
14
|
+
export { createVaultCore, VaultCore, VaultCoreError, createVaultCoreDependencies, DefaultPolicyEngine, createPersistentVaultCoreDependencies, initializeVaultCustody, recoverVaultWorkingKey, DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY, PersistentVaultAgentIdentityRegistry, PersistentVaultAuditLog, PersistentVaultCapabilityRegistry, PersistentVaultCapabilityRevocationRegistry, PersistentVaultCustomHttpFlowRegistry, PersistentVaultRateLimitStore, PersistentVaultReplayGuard, PersistentVaultSecretCustody, PersistentVaultSecretRepository, } from "../vault-core/index.js";
|
|
17
15
|
export { createVaultClient, } from "../clients/owner/index.js";
|
|
18
16
|
export { createAgentClient, } from "../clients/agent/index.js";
|
|
19
|
-
export { createVaultService, wrapVaultCoreAsVaultService, createOwnerHttpFlowBoundary, createStandardAcquireBoundary, createStandardDispatchBoundary,
|
|
17
|
+
export { createVaultService, wrapVaultCoreAsVaultService, createOwnerHttpFlowBoundary, createStandardAcquireBoundary, createStandardDispatchBoundary, AgentDispatchHttpTransport, handleVaultHttpDispatch, } from "../vault-ingress/index.js";
|
|
20
18
|
export { LocalVaultTransport } from "../vault-ingress/defaults.js";
|
|
21
|
-
export { AgentDispatchHttpTransport } from "../vault-ingress/remote-transport.js";
|
|
22
|
-
export { handleVaultHttpDispatch } from "../vault-ingress/server-utils.js";
|
|
23
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAe,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAA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
4
|
-
nickname?: string;
|
|
5
|
-
};
|
|
6
|
-
sealedPrivate: Record<string, any>;
|
|
2
|
+
export interface VaultProfile extends Record<string, any> {
|
|
3
|
+
nickname?: string;
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* Used to encrypt 'public' metadata to prevent JSON tampering on disk.
|
|
11
|
-
*/
|
|
12
|
-
export declare function deriveVaultPublicWorkingKey(vaultId: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Reads the 'public' metadata of a vault. Requires vaultId but no private key.
|
|
15
|
-
*/
|
|
16
|
-
export declare function readVaultPublicMetadata(storage: IStorageProvider, vaultId: string): Promise<Record<string, any>>;
|
|
17
|
-
export declare function writeVaultProfile(storage: IStorageProvider, profile: VaultProfile, vaultWorkingKey: string, vaultId: string): Promise<void>;
|
|
18
|
-
export declare function readVaultProfile(storage: IStorageProvider, vaultWorkingKey: string, vaultId: string): Promise<VaultProfile | null>;
|
|
5
|
+
export declare function writeVaultProfile(storage: IStorageProvider, profile: VaultProfile, vaultWorkingKey: string, _vaultId: string): Promise<void>;
|
|
6
|
+
export declare function readVaultProfile(storage: IStorageProvider, vaultWorkingKey: string, _vaultId: string): Promise<VaultProfile | null>;
|
|
@@ -1,46 +1,11 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
1
|
import { SealedJsonRepository } from "../sealed/index.js";
|
|
3
|
-
const VAULT_SEALED_PROFILE_KEY = "vault/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
.update("cbio:vault-public-metadata:v1")
|
|
12
|
-
.update("\n")
|
|
13
|
-
.update(vaultId)
|
|
14
|
-
.digest("base64url");
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Reads the 'public' metadata of a vault. Requires vaultId but no private key.
|
|
18
|
-
*/
|
|
19
|
-
export async function readVaultPublicMetadata(storage, vaultId) {
|
|
20
|
-
const publicWorkingKey = deriveVaultPublicWorkingKey(vaultId);
|
|
21
|
-
const repo = new SealedJsonRepository(storage, VAULT_PUBLIC_SEALED_PROFILE_KEY, publicWorkingKey);
|
|
22
|
-
const data = await repo.read(null).catch(() => null);
|
|
23
|
-
return data || {};
|
|
24
|
-
}
|
|
25
|
-
export async function writeVaultProfile(storage, profile, vaultWorkingKey, vaultId) {
|
|
26
|
-
// 1. Write Private Sealed Profile
|
|
27
|
-
const privateRepo = new SealedJsonRepository(storage, VAULT_SEALED_PROFILE_KEY, vaultWorkingKey);
|
|
28
|
-
await privateRepo.write(profile.sealedPrivate, "vault_profile_private");
|
|
29
|
-
// 2. Write Public Sealed Profile (encrypted for format protection, but publicly-read via side-channel)
|
|
30
|
-
const publicWorkingKey = deriveVaultPublicWorkingKey(vaultId);
|
|
31
|
-
const publicRepo = new SealedJsonRepository(storage, VAULT_PUBLIC_SEALED_PROFILE_KEY, publicWorkingKey);
|
|
32
|
-
await publicRepo.write(profile.sealedPublic, "vault_profile_public");
|
|
33
|
-
}
|
|
34
|
-
export async function readVaultProfile(storage, vaultWorkingKey, vaultId) {
|
|
35
|
-
const privateRepo = new SealedJsonRepository(storage, VAULT_SEALED_PROFILE_KEY, vaultWorkingKey);
|
|
36
|
-
const sealedPrivate = await privateRepo.read(null);
|
|
37
|
-
if (!sealedPrivate) {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
const sealedPublic = await readVaultPublicMetadata(storage, vaultId);
|
|
41
|
-
return {
|
|
42
|
-
sealedPublic,
|
|
43
|
-
sealedPrivate,
|
|
44
|
-
};
|
|
2
|
+
const VAULT_SEALED_PROFILE_KEY = "vault/profile.sealed";
|
|
3
|
+
export async function writeVaultProfile(storage, profile, vaultWorkingKey, _vaultId) {
|
|
4
|
+
const repo = new SealedJsonRepository(storage, VAULT_SEALED_PROFILE_KEY, vaultWorkingKey);
|
|
5
|
+
await repo.write(profile, "vault_profile");
|
|
6
|
+
}
|
|
7
|
+
export async function readVaultProfile(storage, vaultWorkingKey, _vaultId) {
|
|
8
|
+
const repo = new SealedJsonRepository(storage, VAULT_SEALED_PROFILE_KEY, vaultWorkingKey);
|
|
9
|
+
return await repo.read(null);
|
|
45
10
|
}
|
|
46
11
|
//# sourceMappingURL=vault-metadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault-metadata.js","sourceRoot":"","sources":["../../src/runtime/vault-metadata.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vault-metadata.js","sourceRoot":"","sources":["../../src/runtime/vault-metadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAM1D,MAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAyB,EACzB,OAAqB,EACrB,eAAuB,EACvB,QAAgB;IAEhB,MAAM,IAAI,GAAG,IAAI,oBAAoB,CAAe,OAAO,EAAE,wBAAwB,EAAE,eAAe,CAAC,CAAC;IACxG,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,OAAyB,EACzB,eAAuB,EACvB,QAAgB;IAEhB,MAAM,IAAI,GAAG,IAAI,oBAAoB,CAAe,OAAO,EAAE,wBAAwB,EAAE,eAAe,CAAC,CAAC;IACxG,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,IAAW,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -43,7 +43,6 @@ export interface OwnerWriteSecretCommand {
|
|
|
43
43
|
plaintext: string;
|
|
44
44
|
targetBindings?: readonly VaultTargetBinding[];
|
|
45
45
|
requestedAt: string;
|
|
46
|
-
proof: OwnerProof;
|
|
47
46
|
}
|
|
48
47
|
export interface OwnerDefineSecretTargetsCommand {
|
|
49
48
|
vaultId: VaultId;
|
|
@@ -54,7 +53,6 @@ export interface OwnerDefineSecretTargetsCommand {
|
|
|
54
53
|
alias: string;
|
|
55
54
|
targetBindings: readonly VaultTargetBinding[];
|
|
56
55
|
requestedAt: string;
|
|
57
|
-
proof: OwnerProof;
|
|
58
56
|
}
|
|
59
57
|
export interface IssuerWriteSecretCommand {
|
|
60
58
|
kind: "issuer.write_secret";
|
|
@@ -76,7 +74,6 @@ export interface OwnerDeleteSecretCommand {
|
|
|
76
74
|
};
|
|
77
75
|
alias: string;
|
|
78
76
|
requestedAt: string;
|
|
79
|
-
proof: OwnerProof;
|
|
80
77
|
}
|
|
81
78
|
export type VaultWriteSecretCommand = OwnerWriteSecretCommand | IssuerWriteSecretCommand;
|
|
82
79
|
export interface OwnerRegisterAgentIdentityCommand {
|
|
@@ -87,7 +84,6 @@ export interface OwnerRegisterAgentIdentityCommand {
|
|
|
87
84
|
};
|
|
88
85
|
agentIdentity: AgentIdentityRecord;
|
|
89
86
|
requestedAt: string;
|
|
90
|
-
proof: OwnerProof;
|
|
91
87
|
}
|
|
92
88
|
export interface CustomHttpFlowDefinition {
|
|
93
89
|
vaultId: VaultId;
|
|
@@ -123,7 +119,6 @@ export interface OwnerRegisterCustomHttpFlowCommand {
|
|
|
123
119
|
};
|
|
124
120
|
};
|
|
125
121
|
requestedAt: string;
|
|
126
|
-
proof: OwnerProof;
|
|
127
122
|
}
|
|
128
123
|
export interface OwnerRegisterCapabilityCommand {
|
|
129
124
|
vaultId: VaultId;
|
|
@@ -133,7 +128,6 @@ export interface OwnerRegisterCapabilityCommand {
|
|
|
133
128
|
};
|
|
134
129
|
capability: AgentCapability;
|
|
135
130
|
requestedAt: string;
|
|
136
|
-
proof: OwnerProof;
|
|
137
131
|
}
|
|
138
132
|
export interface OwnerRevokeCapabilityCommand {
|
|
139
133
|
vaultId: VaultId;
|
|
@@ -144,7 +138,6 @@ export interface OwnerRevokeCapabilityCommand {
|
|
|
144
138
|
agentId: string;
|
|
145
139
|
capabilityId: string;
|
|
146
140
|
requestedAt: string;
|
|
147
|
-
proof: OwnerProof;
|
|
148
141
|
}
|
|
149
142
|
export interface AgentCapability {
|
|
150
143
|
vaultId: VaultId;
|
|
@@ -172,12 +165,6 @@ export interface AgentProof {
|
|
|
172
165
|
requestId: string;
|
|
173
166
|
requestedAt: string;
|
|
174
167
|
}
|
|
175
|
-
export interface OwnerProof {
|
|
176
|
-
ownerId: string;
|
|
177
|
-
signature: string;
|
|
178
|
-
requestId: string;
|
|
179
|
-
requestedAt: string;
|
|
180
|
-
}
|
|
181
168
|
export interface DispatchRequest {
|
|
182
169
|
vaultId: VaultId;
|
|
183
170
|
requestId: string;
|
|
@@ -231,7 +218,6 @@ export interface AuditQuery {
|
|
|
231
218
|
since?: string;
|
|
232
219
|
}
|
|
233
220
|
export declare enum AuditAction {
|
|
234
|
-
BOOTSTRAP_OWNER_IDENTITY = "BOOTSTRAP_OWNER_IDENTITY",
|
|
235
221
|
REGISTER_AGENT_IDENTITY = "REGISTER_AGENT_IDENTITY",
|
|
236
222
|
REGISTER_CUSTOM_FLOW = "REGISTER_CUSTOM_FLOW",
|
|
237
223
|
REGISTER_CAPABILITY = "REGISTER_CAPABILITY",
|
|
@@ -274,11 +260,6 @@ export interface AgentIdentityRecord {
|
|
|
274
260
|
agentId: string;
|
|
275
261
|
publicKey: string;
|
|
276
262
|
}
|
|
277
|
-
export interface OwnerIdentityRecord {
|
|
278
|
-
vaultId: VaultId;
|
|
279
|
-
ownerId: string;
|
|
280
|
-
publicKey: string;
|
|
281
|
-
}
|
|
282
263
|
export interface OwnerAuditRequest {
|
|
283
264
|
vaultId: VaultId;
|
|
284
265
|
actor: VaultPrincipal & {
|
|
@@ -287,7 +268,6 @@ export interface OwnerAuditRequest {
|
|
|
287
268
|
query: AuditQuery;
|
|
288
269
|
requestId: string;
|
|
289
270
|
requestedAt: string;
|
|
290
|
-
proof: OwnerProof;
|
|
291
271
|
}
|
|
292
272
|
export interface OwnerExportSecretRequest {
|
|
293
273
|
vaultId: VaultId;
|
|
@@ -297,7 +277,6 @@ export interface OwnerExportSecretRequest {
|
|
|
297
277
|
alias: string;
|
|
298
278
|
requestId: string;
|
|
299
279
|
requestedAt: string;
|
|
300
|
-
proof: OwnerProof;
|
|
301
280
|
}
|
|
302
281
|
export interface OwnerSecretExport {
|
|
303
282
|
vaultId: VaultId;
|
|
@@ -313,7 +292,6 @@ export interface OwnerListAgentsRequest {
|
|
|
313
292
|
kind: "owner";
|
|
314
293
|
};
|
|
315
294
|
requestedAt: string;
|
|
316
|
-
proof: OwnerProof;
|
|
317
295
|
}
|
|
318
296
|
export interface OwnerListCapabilitiesRequest {
|
|
319
297
|
vaultId: VaultId;
|
|
@@ -323,5 +301,4 @@ export interface OwnerListCapabilitiesRequest {
|
|
|
323
301
|
};
|
|
324
302
|
agentId?: string;
|
|
325
303
|
requestedAt: string;
|
|
326
|
-
proof: OwnerProof;
|
|
327
304
|
}
|
|
@@ -6,7 +6,6 @@ export var DispatchStatus;
|
|
|
6
6
|
})(DispatchStatus || (DispatchStatus = {}));
|
|
7
7
|
export var AuditAction;
|
|
8
8
|
(function (AuditAction) {
|
|
9
|
-
AuditAction["BOOTSTRAP_OWNER_IDENTITY"] = "BOOTSTRAP_OWNER_IDENTITY";
|
|
10
9
|
AuditAction["REGISTER_AGENT_IDENTITY"] = "REGISTER_AGENT_IDENTITY";
|
|
11
10
|
AuditAction["REGISTER_CUSTOM_FLOW"] = "REGISTER_CUSTOM_FLOW";
|
|
12
11
|
AuditAction["REGISTER_CAPABILITY"] = "REGISTER_CAPABILITY";
|