@the-ai-company/cbio-node-runtime 1.46.0 → 1.47.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 +6 -4
- package/dist/clients/owner/client.js +17 -0
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/contracts.d.ts +9 -0
- package/dist/clients/owner/index.d.ts +1 -1
- package/dist/runtime/bootstrap.d.ts +7 -7
- package/dist/runtime/bootstrap.js +2 -2
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/vault-metadata.js +1 -1
- package/dist/runtime/vault-metadata.js.map +1 -1
- package/dist/vault-core/contracts.d.ts +3 -0
- package/docs/api/README.md +4 -3
- package/docs/api/classes/IdentityError.md +2 -2
- package/docs/api/classes/VaultCore.md +1 -1
- 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 +1 -1
- package/docs/api/functions/createOwnerHttpFlowBoundary.md +1 -1
- package/docs/api/functions/createPersistentVaultCoreDependencies.md +1 -1
- package/docs/api/functions/createStandardAcquireBoundary.md +1 -1
- package/docs/api/functions/createStandardDispatchBoundary.md +1 -1
- package/docs/api/functions/createVault.md +3 -3
- package/docs/api/functions/createVaultClient.md +1 -1
- package/docs/api/functions/createVaultCore.md +1 -1
- package/docs/api/functions/createVaultCoreDependencies.md +1 -1
- package/docs/api/functions/createVaultService.md +1 -1
- package/docs/api/functions/createWorkspaceStorage.md +1 -1
- package/docs/api/functions/deriveIdentityId.md +1 -1
- package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +1 -1
- package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
- package/docs/api/functions/handleVaultHttpDispatch.md +1 -1
- package/docs/api/functions/initializeVaultCustody.md +1 -1
- package/docs/api/functions/listVaults.md +3 -3
- package/docs/api/functions/readVaultProfile.md +1 -1
- package/docs/api/functions/recoverVault.md +4 -4
- package/docs/api/functions/recoverVaultWorkingKey.md +1 -1
- package/docs/api/functions/restoreIdentity.md +1 -1
- package/docs/api/functions/updateVaultMetadata.md +1 -1
- package/docs/api/functions/wrapVaultCoreAsVaultService.md +1 -1
- package/docs/api/functions/writeVaultProfile.md +1 -1
- package/docs/api/interfaces/AgentClient.md +1 -1
- package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
- package/docs/api/interfaces/AgentDispatchTransport.md +1 -1
- package/docs/api/interfaces/AgentIdentity.md +1 -1
- package/docs/api/interfaces/AgentSigner.md +1 -1
- package/docs/api/interfaces/CbioRuntime.md +8 -8
- package/docs/api/interfaces/CreateAgentClientOptions.md +1 -1
- package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
- package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +1 -1
- package/docs/api/interfaces/CreateVaultClientOptions.md +1 -1
- package/docs/api/interfaces/CreateVaultOptions.md +1 -1
- package/docs/api/interfaces/CreatedVault.md +1 -1
- package/docs/api/interfaces/DefaultPolicyEngineOptions.md +1 -1
- 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 +1 -1
- package/docs/api/interfaces/RecoveredVault.md +1 -1
- 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 +20 -3
- package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -1
- package/docs/api/interfaces/VaultCreateAgentInput.md +29 -0
- package/docs/api/interfaces/VaultDeleteSecretInput.md +1 -1
- package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
- package/docs/api/interfaces/VaultGrantCapabilityInput.md +1 -1
- 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/{VaultPublicMetadata.md → VaultMetadata.md} +2 -2
- package/docs/api/interfaces/VaultObject.md +1 -1
- package/docs/api/interfaces/VaultProfile.md +1 -1
- package/docs/api/interfaces/VaultRegisterAgentInput.md +19 -1
- package/docs/api/interfaces/VaultRegisterFlowInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeCapabilityInput.md +1 -1
- package/docs/api/interfaces/VaultSigner.md +1 -1
- package/docs/api/type-aliases/AgentCapabilityEnvelope.md +1 -1
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CreatedIdentity } from "../../runtime/identity.js";
|
|
2
2
|
import { type Clock } from "../../vault-core/index.js";
|
|
3
3
|
import type { VaultService } from "../../vault-ingress/index.js";
|
|
4
|
-
import type { VaultAuditQueryInput, OwnerDefineSecretTargetsInput, VaultExportSecretInput, VaultGrantCapabilityInput, VaultRegisterFlowInput, VaultRegisterAgentInput, OwnerStoreSecretInput, OwnerWriteSecretInput, VaultDeleteSecretInput, VaultListAgentsInput, VaultListCapabilitiesInput, VaultRevokeCapabilityInput } from "./contracts.js";
|
|
4
|
+
import type { VaultAuditQueryInput, OwnerDefineSecretTargetsInput, VaultExportSecretInput, VaultGrantCapabilityInput, VaultRegisterFlowInput, VaultRegisterAgentInput, VaultCreateAgentInput, OwnerStoreSecretInput, OwnerWriteSecretInput, VaultDeleteSecretInput, VaultListAgentsInput, VaultListCapabilitiesInput, VaultRevokeCapabilityInput } from "./contracts.js";
|
|
5
5
|
export interface VaultIdentity {
|
|
6
6
|
identityId: string;
|
|
7
7
|
}
|
|
@@ -37,10 +37,12 @@ export interface VaultClient {
|
|
|
37
37
|
* Reads the tamper-evident audit log for the vault.
|
|
38
38
|
*/
|
|
39
39
|
readAudit(query?: VaultAuditQueryInput): Promise<readonly import("../../vault-core/index.js").AuditEntry[]>;
|
|
40
|
+
registerAgent(input: VaultRegisterAgentInput): Promise<void>;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
+
* Generates a new identity and registers it as an agent in one step.
|
|
43
|
+
* The private key is stored in the vault for managed custody.
|
|
42
44
|
*/
|
|
43
|
-
|
|
45
|
+
createAgent(input: VaultCreateAgentInput): Promise<readonly [import("../../vault-core/index.js").AgentIdentityRecord, string]>;
|
|
44
46
|
/**
|
|
45
47
|
* Registers a custom HTTP flow for complex secret usage.
|
|
46
48
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LocalSigner } from "../../protocol/crypto.js";
|
|
2
|
+
import { createIdentity } from "../../runtime/identity.js";
|
|
2
3
|
import { SystemClock } from "../../vault-core/index.js";
|
|
3
4
|
const VAULT_MASTER_ID = "vault-master";
|
|
4
5
|
class DefaultVaultClient {
|
|
@@ -100,6 +101,9 @@ class DefaultVaultClient {
|
|
|
100
101
|
vaultId: this._vault.vaultId,
|
|
101
102
|
agentId: input.agentId,
|
|
102
103
|
publicKey: input.publicKey,
|
|
104
|
+
privateKey: input.privateKey,
|
|
105
|
+
metadata: input.metadata,
|
|
106
|
+
nickname: input.nickname,
|
|
103
107
|
};
|
|
104
108
|
await this._vault.registerAgentIdentity({
|
|
105
109
|
vaultId: this._vault.vaultId,
|
|
@@ -112,6 +116,19 @@ class DefaultVaultClient {
|
|
|
112
116
|
requestedAt,
|
|
113
117
|
});
|
|
114
118
|
}
|
|
119
|
+
async createAgent(input) {
|
|
120
|
+
const identity = createIdentity();
|
|
121
|
+
const record = {
|
|
122
|
+
vaultId: this._vault.vaultId,
|
|
123
|
+
agentId: input.agentId,
|
|
124
|
+
publicKey: identity.publicKey,
|
|
125
|
+
privateKey: identity.privateKey,
|
|
126
|
+
metadata: input.metadata,
|
|
127
|
+
nickname: input.nickname,
|
|
128
|
+
};
|
|
129
|
+
await this.registerAgent(record);
|
|
130
|
+
return [record, identity.privateKey];
|
|
131
|
+
}
|
|
115
132
|
async grantCapability(input) {
|
|
116
133
|
const requestedAt = input.requestedAt ?? this._clock.nowIso();
|
|
117
134
|
const requestId = `${this._identityId}:${requestedAt}:${input.capability.capabilityId}:register_capability`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/clients/owner/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/clients/owner/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAwB,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,WAAW,EAAc,MAAM,2BAA2B,CAAC;AAsGpE,MAAM,eAAe,GAAG,cAAc,CAAC;AAEvC,MAAM,kBAAkB;IAIH;IACA;IACA;IACA;IANF,WAAW,CAAS;IAErC,YACmB,MAAoB,EACpB,SAAyB,EACzB,OAAqB,EACrB,SAAgB,IAAI,WAAW,EAAE;QAHjC,WAAM,GAAN,MAAM,CAAc;QACpB,cAAS,GAAT,SAAS,CAAgB;QACzB,YAAO,GAAP,OAAO,CAAc;QACrB,WAAM,GAAN,MAAM,CAA2B;QAElD,IAAI,CAAC,WAAW,GAAG,SAAS,EAAE,UAAU,IAAI,eAAe,CAAC;IAC9D,CAAC;IAED,KAAK,CAAC,WAA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AAI,KAAK,IAAI,WAAW,IAAI,KAAK,CAAC;AACvD,CAAC;AAED,SAAS,kBAAkB,CAAC,QAA0C,EAAE,MAAoB;IAC1F,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,QAAQ,IAAI,iBAAiB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5C,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAiC;IAC7D,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC,UAAU;KAC7C,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IACjE,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;IACD,OAAO,IAAI,kBAAkB,CAC3B,OAAO,CAAC,KAAK,EACb,oBAAoB,CAAC,OAAO,CAAC,EAC7B,kBAAkB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,MAAM,CAAC,EACzD,OAAO,CAAC,KAAK,IAAI,IAAI,WAAW,EAAE,CACnC,CAAC;AACJ,CAAC"}
|
|
@@ -35,6 +35,15 @@ export interface VaultExportSecretInput {
|
|
|
35
35
|
export interface VaultRegisterAgentInput {
|
|
36
36
|
agentId: string;
|
|
37
37
|
publicKey: string;
|
|
38
|
+
privateKey?: string;
|
|
39
|
+
metadata?: Record<string, any>;
|
|
40
|
+
nickname?: string;
|
|
41
|
+
requestedAt?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface VaultCreateAgentInput {
|
|
44
|
+
agentId: string;
|
|
45
|
+
metadata?: Record<string, any>;
|
|
46
|
+
nickname?: string;
|
|
38
47
|
requestedAt?: string;
|
|
39
48
|
}
|
|
40
49
|
export interface VaultRegisterFlowInput extends OwnerHttpFlowBoundary {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { createVaultClient } from "./client.js";
|
|
2
2
|
export type { VaultClient, CreateVaultClientOptions, VaultIdentity, VaultSigner, } from "./client.js";
|
|
3
|
-
export type { VaultAuditQueryInput, OwnerDefineSecretTargetsInput, VaultExportSecretInput, VaultGrantCapabilityInput, VaultRegisterFlowInput, VaultRegisterAgentInput, OwnerSecretTargetBinding, OwnerStoreSecretInput, OwnerWriteSecretInput, VaultDeleteSecretInput, VaultListAgentsInput, VaultListCapabilitiesInput, VaultRevokeCapabilityInput, } from "./contracts.js";
|
|
3
|
+
export type { VaultAuditQueryInput, OwnerDefineSecretTargetsInput, VaultExportSecretInput, VaultGrantCapabilityInput, VaultRegisterFlowInput, VaultRegisterAgentInput, VaultCreateAgentInput, OwnerSecretTargetBinding, OwnerStoreSecretInput, OwnerWriteSecretInput, VaultDeleteSecretInput, VaultListAgentsInput, VaultListCapabilitiesInput, VaultRevokeCapabilityInput, } from "./contracts.js";
|
|
@@ -48,13 +48,13 @@ export interface RecoveredVault extends VaultObject {
|
|
|
48
48
|
* Creates and bootstraps a new persistent vault.
|
|
49
49
|
*
|
|
50
50
|
* @param storage - Workspace storage (or path string) where vaults are stored.
|
|
51
|
-
* @param options - Configuration including
|
|
51
|
+
* @param options - Configuration including password and metadata.
|
|
52
52
|
* @returns A {@link CreatedVault} instance.
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* ```ts
|
|
56
56
|
* const vault = await createVault({
|
|
57
|
-
*
|
|
57
|
+
* password: 'my-strong-password',
|
|
58
58
|
* nickname: 'production-secrets'
|
|
59
59
|
* });
|
|
60
60
|
* ```
|
|
@@ -70,14 +70,14 @@ export declare function createVault(options: CreateVaultOptions): Promise<Create
|
|
|
70
70
|
* Reopens an existing vault from storage.
|
|
71
71
|
*
|
|
72
72
|
* @param storage - Workspace storage where the vault was created.
|
|
73
|
-
* @param options - Recovery options (must include `vaultId` and `
|
|
73
|
+
* @param options - Recovery options (must include `vaultId` and `password`).
|
|
74
74
|
* @returns A {@link RecoveredVault} instance.
|
|
75
75
|
*
|
|
76
76
|
* @example
|
|
77
77
|
* ```ts
|
|
78
78
|
* const vault = await recoverVault({
|
|
79
79
|
* vaultId: 'vault_123',
|
|
80
|
-
*
|
|
80
|
+
* password: 'my-strong-password'
|
|
81
81
|
* });
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
@@ -85,14 +85,14 @@ export declare function recoverVault(storage: IStorageProvider | string, options
|
|
|
85
85
|
/**
|
|
86
86
|
* Recovers an existing vault using the default workspace storage.
|
|
87
87
|
*
|
|
88
|
-
* @param options Recovery options including vaultId and
|
|
88
|
+
* @param options Recovery options including vaultId and password.
|
|
89
89
|
*/
|
|
90
90
|
export declare function recoverVault(options: RecoverVaultOptions): Promise<RecoveredVault>;
|
|
91
91
|
/**
|
|
92
|
-
* Lists all available vaults in the workspace
|
|
92
|
+
* Lists all available vaults in the workspace.
|
|
93
93
|
*
|
|
94
94
|
* @param storage - The root workspace storage provider.
|
|
95
|
-
* @returns A list of vault IDs
|
|
95
|
+
* @returns A list of vault IDs.
|
|
96
96
|
*/
|
|
97
97
|
export declare function listVaults(storage: IStorageProvider): Promise<string[]>;
|
|
98
98
|
/**
|
|
@@ -73,10 +73,10 @@ export async function recoverVault(storageOrOptions, maybeOptions) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
|
-
* Lists all available vaults in the workspace
|
|
76
|
+
* Lists all available vaults in the workspace.
|
|
77
77
|
*
|
|
78
78
|
* @param storage - The root workspace storage provider.
|
|
79
|
-
* @returns A list of vault IDs
|
|
79
|
+
* @returns A list of vault IDs.
|
|
80
80
|
*/
|
|
81
81
|
export async function listVaults(storage) {
|
|
82
82
|
if (!storage.list) {
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runtime export.
|
|
3
|
-
*
|
|
3
|
+
* Main API: typed high-level runtime plus supported low-level building blocks.
|
|
4
4
|
*/
|
|
5
5
|
export { IdentityError, IdentityErrorCode } from "../errors.js";
|
|
6
6
|
export { derivePublicKey, LocalSigner, type Signer, deriveVaultWorkingKeyFromPassword } from "../protocol/crypto.js";
|
|
@@ -11,9 +11,9 @@ export { MemoryStorageProvider } from "../storage/memory.js";
|
|
|
11
11
|
export { createIdentity, restoreIdentity, type CreateIdentityOptions, type RestoreIdentityOptions, type CreatedIdentity, } from "./identity.js";
|
|
12
12
|
export { readVaultProfile, writeVaultProfile, type VaultProfile, } from "./vault-metadata.js";
|
|
13
13
|
export { createWorkspaceStorage, getDefaultWorkspaceDir, } from "./workspace-storage.js";
|
|
14
|
-
export { createVault, recoverVault, listVaults, updateVaultMetadata, type CreateVaultOptions, type CreatedVault, type RecoverVaultOptions, type RecoveredVault, type VaultObject, type VaultMetadata
|
|
14
|
+
export { createVault, recoverVault, listVaults, updateVaultMetadata, type CreateVaultOptions, type CreatedVault, type RecoverVaultOptions, type RecoveredVault, type VaultObject, type VaultMetadata, } from "./bootstrap.js";
|
|
15
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";
|
|
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";
|
|
16
|
+
export { createVaultClient, type VaultClient, type CreateVaultClientOptions, type VaultIdentity, type VaultSigner, type VaultAuditQueryInput, type OwnerDefineSecretTargetsInput, type VaultExportSecretInput, type VaultGrantCapabilityInput, type VaultRegisterFlowInput, type VaultRegisterAgentInput, type VaultCreateAgentInput, type OwnerSecretTargetBinding, type OwnerStoreSecretInput, type OwnerWriteSecretInput, type VaultDeleteSecretInput, type VaultListAgentsInput, type VaultListCapabilitiesInput, type VaultRevokeCapabilityInput, } from "../clients/owner/index.js";
|
|
17
17
|
export { createAgentClient, type AgentClient, type CreateAgentClientOptions, type AgentIdentity, type AgentCapabilityEnvelope, type AgentDispatchIntent, type AgentDispatchTransport, type AgentSigner, } from "../clients/agent/index.js";
|
|
18
18
|
export { createVaultService, wrapVaultCoreAsVaultService, createOwnerHttpFlowBoundary, createStandardAcquireBoundary, createStandardDispatchBoundary, AgentDispatchHttpTransport, handleVaultHttpDispatch, } from "../vault-ingress/index.js";
|
|
19
19
|
export { LocalVaultTransport } from "../vault-ingress/defaults.js";
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Runtime export.
|
|
3
|
-
*
|
|
3
|
+
* Main API: typed high-level runtime plus supported low-level building blocks.
|
|
4
4
|
*/
|
|
5
5
|
export { IdentityError, IdentityErrorCode } from "../errors.js";
|
|
6
6
|
export { derivePublicKey, LocalSigner, deriveVaultWorkingKeyFromPassword } from "../protocol/crypto.js";
|
|
@@ -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,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,eAAe,GAIhB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,mBAAmB,GAOpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EACf,SAAS,EACT,cAAc,EACd,2BAA2B,EAG3B,mBAAmB,EACnB,qCAAqC,EACrC,sBAAsB,EACtB,sBAAsB,EACtB,kCAAkC,EAIlC,oCAAoC,EACpC,uBAAuB,EACvB,iCAAiC,EACjC,2CAA2C,EAC3C,qCAAqC,EACrC,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,iBAAiB,
|
|
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,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,eAAe,GAIhB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,WAAW,EACX,YAAY,EACZ,UAAU,EACV,mBAAmB,GAOpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EACf,SAAS,EACT,cAAc,EACd,2BAA2B,EAG3B,mBAAmB,EACnB,qCAAqC,EACrC,sBAAsB,EACtB,sBAAsB,EACtB,kCAAkC,EAIlC,oCAAoC,EACpC,uBAAuB,EACvB,iCAAiC,EACjC,2CAA2C,EAC3C,qCAAqC,EACrC,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,iBAAiB,GAmBlB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,iBAAiB,GAQlB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SealedJsonRepository } from "../sealed/index.js";
|
|
2
|
-
const VAULT_SEALED_PROFILE_KEY = "vault/profile.sealed";
|
|
2
|
+
const VAULT_SEALED_PROFILE_KEY = "vault/sealed/profile.sealed";
|
|
3
3
|
export async function writeVaultProfile(storage, profile, vaultWorkingKey, _vaultId) {
|
|
4
4
|
const repo = new SealedJsonRepository(storage, VAULT_SEALED_PROFILE_KEY, vaultWorkingKey);
|
|
5
5
|
await repo.write(profile, "vault_profile");
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,6BAA6B,CAAC;AAE/D,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"}
|
|
@@ -259,6 +259,9 @@ export interface AgentIdentityRecord {
|
|
|
259
259
|
vaultId: VaultId;
|
|
260
260
|
agentId: string;
|
|
261
261
|
publicKey: string;
|
|
262
|
+
privateKey?: string;
|
|
263
|
+
metadata?: Record<string, any>;
|
|
264
|
+
nickname?: string;
|
|
262
265
|
}
|
|
263
266
|
export interface OwnerAuditRequest {
|
|
264
267
|
vaultId: VaultId;
|
package/docs/api/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
**CBIO Node Runtime Agent API v1.
|
|
1
|
+
**CBIO Node Runtime Agent API v1.47.0**
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
|
-
# CBIO Node Runtime Agent API v1.
|
|
5
|
+
# CBIO Node Runtime Agent API v1.47.0
|
|
6
6
|
|
|
7
7
|
## Enumerations
|
|
8
8
|
|
|
@@ -43,15 +43,16 @@
|
|
|
43
43
|
- [VaultAuditQueryInput](interfaces/VaultAuditQueryInput.md)
|
|
44
44
|
- [VaultClient](interfaces/VaultClient.md)
|
|
45
45
|
- [VaultCoreDependenciesOptions](interfaces/VaultCoreDependenciesOptions.md)
|
|
46
|
+
- [VaultCreateAgentInput](interfaces/VaultCreateAgentInput.md)
|
|
46
47
|
- [VaultDeleteSecretInput](interfaces/VaultDeleteSecretInput.md)
|
|
47
48
|
- [VaultExportSecretInput](interfaces/VaultExportSecretInput.md)
|
|
48
49
|
- [VaultGrantCapabilityInput](interfaces/VaultGrantCapabilityInput.md)
|
|
49
50
|
- [VaultIdentity](interfaces/VaultIdentity.md)
|
|
50
51
|
- [VaultListAgentsInput](interfaces/VaultListAgentsInput.md)
|
|
51
52
|
- [VaultListCapabilitiesInput](interfaces/VaultListCapabilitiesInput.md)
|
|
53
|
+
- [VaultMetadata](interfaces/VaultMetadata.md)
|
|
52
54
|
- [VaultObject](interfaces/VaultObject.md)
|
|
53
55
|
- [VaultProfile](interfaces/VaultProfile.md)
|
|
54
|
-
- [VaultPublicMetadata](interfaces/VaultPublicMetadata.md)
|
|
55
56
|
- [VaultRegisterAgentInput](interfaces/VaultRegisterAgentInput.md)
|
|
56
57
|
- [VaultRegisterFlowInput](interfaces/VaultRegisterFlowInput.md)
|
|
57
58
|
- [VaultRevokeCapabilityInput](interfaces/VaultRevokeCapabilityInput.md)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
5
5
|
# Class: IdentityError
|
|
6
6
|
|
|
7
7
|
Runtime export.
|
|
8
|
-
|
|
8
|
+
Main API: typed high-level runtime plus supported low-level building blocks.
|
|
9
9
|
|
|
10
10
|
## Extends
|
|
11
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ Workspace storage (or path string) where vaults are stored.
|
|
|
22
22
|
|
|
23
23
|
[`CreateVaultOptions`](../interfaces/CreateVaultOptions.md)
|
|
24
24
|
|
|
25
|
-
Configuration including
|
|
25
|
+
Configuration including password and metadata.
|
|
26
26
|
|
|
27
27
|
### Returns
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ A [CreatedVault](../interfaces/CreatedVault.md) instance.
|
|
|
34
34
|
|
|
35
35
|
```ts
|
|
36
36
|
const vault = await createVault({
|
|
37
|
-
|
|
37
|
+
password: 'my-strong-password',
|
|
38
38
|
nickname: 'production-secrets'
|
|
39
39
|
});
|
|
40
40
|
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> **listVaults**(`storage`): `Promise`\<`string`[]\>
|
|
8
8
|
|
|
9
|
-
Lists all available vaults in the workspace
|
|
9
|
+
Lists all available vaults in the workspace.
|
|
10
10
|
|
|
11
11
|
## Parameters
|
|
12
12
|
|
|
@@ -20,4 +20,4 @@ The root workspace storage provider.
|
|
|
20
20
|
|
|
21
21
|
`Promise`\<`string`[]\>
|
|
22
22
|
|
|
23
|
-
A list of vault IDs
|
|
23
|
+
A list of vault IDs.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -22,7 +22,7 @@ Workspace storage where the vault was created.
|
|
|
22
22
|
|
|
23
23
|
[`RecoverVaultOptions`](../interfaces/RecoverVaultOptions.md)
|
|
24
24
|
|
|
25
|
-
Recovery options (must include `vaultId` and `
|
|
25
|
+
Recovery options (must include `vaultId` and `password`).
|
|
26
26
|
|
|
27
27
|
### Returns
|
|
28
28
|
|
|
@@ -35,7 +35,7 @@ A [RecoveredVault](../interfaces/RecoveredVault.md) instance.
|
|
|
35
35
|
```ts
|
|
36
36
|
const vault = await recoverVault({
|
|
37
37
|
vaultId: 'vault_123',
|
|
38
|
-
|
|
38
|
+
password: 'my-strong-password'
|
|
39
39
|
});
|
|
40
40
|
```
|
|
41
41
|
|
|
@@ -51,7 +51,7 @@ Recovers an existing vault using the default workspace storage.
|
|
|
51
51
|
|
|
52
52
|
[`RecoverVaultOptions`](../interfaces/RecoverVaultOptions.md)
|
|
53
53
|
|
|
54
|
-
Recovery options including vaultId and
|
|
54
|
+
Recovery options including vaultId and password.
|
|
55
55
|
|
|
56
56
|
### Returns
|
|
57
57
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -165,7 +165,7 @@ Workspace storage (or path string) where vaults are stored.
|
|
|
165
165
|
|
|
166
166
|
[`CreateVaultOptions`](CreateVaultOptions.md)
|
|
167
167
|
|
|
168
|
-
Configuration including
|
|
168
|
+
Configuration including password and metadata.
|
|
169
169
|
|
|
170
170
|
##### Returns
|
|
171
171
|
|
|
@@ -177,7 +177,7 @@ A [CreatedVault](CreatedVault.md) instance.
|
|
|
177
177
|
|
|
178
178
|
```ts
|
|
179
179
|
const vault = await createVault({
|
|
180
|
-
|
|
180
|
+
password: 'my-strong-password',
|
|
181
181
|
nickname: 'production-secrets'
|
|
182
182
|
});
|
|
183
183
|
```
|
|
@@ -369,7 +369,7 @@ A JSON-serializable response object.
|
|
|
369
369
|
|
|
370
370
|
> **listVaults**: (`storage`) => `Promise`\<`string`[]\>
|
|
371
371
|
|
|
372
|
-
Lists all available vaults in the workspace
|
|
372
|
+
Lists all available vaults in the workspace.
|
|
373
373
|
|
|
374
374
|
#### Parameters
|
|
375
375
|
|
|
@@ -383,7 +383,7 @@ The root workspace storage provider.
|
|
|
383
383
|
|
|
384
384
|
`Promise`\<`string`[]\>
|
|
385
385
|
|
|
386
|
-
A list of vault IDs
|
|
386
|
+
A list of vault IDs.
|
|
387
387
|
|
|
388
388
|
***
|
|
389
389
|
|
|
@@ -433,7 +433,7 @@ Workspace storage where the vault was created.
|
|
|
433
433
|
|
|
434
434
|
[`RecoverVaultOptions`](RecoverVaultOptions.md)
|
|
435
435
|
|
|
436
|
-
Recovery options (must include `vaultId` and `
|
|
436
|
+
Recovery options (must include `vaultId` and `password`).
|
|
437
437
|
|
|
438
438
|
##### Returns
|
|
439
439
|
|
|
@@ -446,7 +446,7 @@ A [RecoveredVault](RecoveredVault.md) instance.
|
|
|
446
446
|
```ts
|
|
447
447
|
const vault = await recoverVault({
|
|
448
448
|
vaultId: 'vault_123',
|
|
449
|
-
|
|
449
|
+
password: 'my-strong-password'
|
|
450
450
|
});
|
|
451
451
|
```
|
|
452
452
|
|
|
@@ -462,7 +462,7 @@ Recovers an existing vault using the default workspace storage.
|
|
|
462
462
|
|
|
463
463
|
[`RecoverVaultOptions`](RecoverVaultOptions.md)
|
|
464
464
|
|
|
465
|
-
Recovery options including vaultId and
|
|
465
|
+
Recovery options including vaultId and password.
|
|
466
466
|
|
|
467
467
|
##### Returns
|
|
468
468
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -9,6 +9,25 @@ In Sovereign Vault model, administrative actions are implicitly authorized by th
|
|
|
9
9
|
|
|
10
10
|
## Methods
|
|
11
11
|
|
|
12
|
+
### createAgent()
|
|
13
|
+
|
|
14
|
+
> **createAgent**(`input`): `Promise`\<readonly \[`AgentIdentityRecord`, `string`\]\>
|
|
15
|
+
|
|
16
|
+
Generates a new identity and registers it as an agent in one step.
|
|
17
|
+
The private key is stored in the vault for managed custody.
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
##### input
|
|
22
|
+
|
|
23
|
+
[`VaultCreateAgentInput`](VaultCreateAgentInput.md)
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<readonly \[`AgentIdentityRecord`, `string`\]\>
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
12
31
|
### defineSecretTargets()
|
|
13
32
|
|
|
14
33
|
> **defineSecretTargets**(`input`): `Promise`\<`SecretRecord`\>
|
|
@@ -139,8 +158,6 @@ Reads the tamper-evident audit log for the vault.
|
|
|
139
158
|
|
|
140
159
|
> **registerAgent**(`input`): `Promise`\<`void`\>
|
|
141
160
|
|
|
142
|
-
Registers a new agent identity within the vault.
|
|
143
|
-
|
|
144
161
|
#### Parameters
|
|
145
162
|
|
|
146
163
|
##### input
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
# Interface: VaultCreateAgentInput
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
### agentId
|
|
10
|
+
|
|
11
|
+
> **agentId**: `string`
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### metadata?
|
|
16
|
+
|
|
17
|
+
> `optional` **metadata?**: `Record`\<`string`, `any`\>
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### nickname?
|
|
22
|
+
|
|
23
|
+
> `optional` **nickname?**: `string`
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### requestedAt?
|
|
28
|
+
|
|
29
|
+
> `optional` **requestedAt?**: `string`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.47.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -12,6 +12,24 @@
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
+
### metadata?
|
|
16
|
+
|
|
17
|
+
> `optional` **metadata?**: `Record`\<`string`, `any`\>
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### nickname?
|
|
22
|
+
|
|
23
|
+
> `optional` **nickname?**: `string`
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### privateKey?
|
|
28
|
+
|
|
29
|
+
> `optional` **privateKey?**: `string`
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
15
33
|
### publicKey
|
|
16
34
|
|
|
17
35
|
> **publicKey**: `string`
|