@the-ai-company/cbio-node-runtime 1.72.0 → 1.73.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/README.md +20 -35
- package/dist/clients/agent/client.d.ts +3 -6
- package/dist/clients/agent/client.js +15 -11
- package/dist/clients/agent/client.js.map +1 -1
- package/dist/clients/agent/contracts.d.ts +4 -4
- package/dist/clients/agent/index.d.ts +1 -1
- package/dist/clients/owner/client.js +8 -8
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/contracts.d.ts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/public-types.js +1 -1
- package/dist/public-types.js.map +1 -1
- package/dist/runtime/bootstrap.js +22 -12
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/index.d.ts +2 -2
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/storage/prefix.d.ts +1 -1
- package/dist/storage/prefix.js +2 -2
- package/dist/storage/prefix.js.map +1 -1
- package/dist/vault-core/contracts.d.ts +20 -142
- package/dist/vault-core/contracts.js +0 -20
- package/dist/vault-core/contracts.js.map +1 -1
- package/dist/vault-core/core.d.ts +8 -9
- package/dist/vault-core/core.js +69 -225
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-core/defaults.d.ts +2 -4
- package/dist/vault-core/defaults.js +50 -47
- package/dist/vault-core/defaults.js.map +1 -1
- package/dist/vault-core/index.d.ts +2 -2
- package/dist/vault-core/index.js +1 -1
- package/dist/vault-core/index.js.map +1 -1
- package/dist/vault-core/persistence.d.ts +2 -4
- package/dist/vault-core/persistence.js +82 -55
- package/dist/vault-core/persistence.js.map +1 -1
- package/dist/vault-core/ports.d.ts +2 -4
- package/dist/vault-ingress/defaults.d.ts +2 -2
- package/dist/vault-ingress/defaults.js +3 -3
- package/dist/vault-ingress/defaults.js.map +1 -1
- package/dist/vault-ingress/index.d.ts +5 -5
- package/dist/vault-ingress/index.js +17 -29
- package/dist/vault-ingress/index.js.map +1 -1
- package/dist/vault-ingress/remote-transport.d.ts +2 -2
- package/dist/vault-ingress/remote-transport.js +7 -7
- package/dist/vault-ingress/remote-transport.js.map +1 -1
- package/dist/vault-ingress/server-utils.d.ts +1 -2
- package/dist/vault-ingress/server-utils.js +1 -1
- package/dist/vault-ingress/server-utils.js.map +1 -1
- package/docs/ARCHITECTURE.md +16 -14
- package/docs/REFERENCE.md +20 -37
- package/docs/api/README.md +5 -9
- package/docs/api/classes/IdentityError.md +1 -1
- package/docs/api/classes/OwnerClientError.md +1 -1
- package/docs/api/classes/PersistentVaultAgentIdentityRegistry.md +3 -3
- package/docs/api/classes/PersistentVaultAgentSecretGrantRegistry.md +6 -6
- package/docs/api/classes/PersistentVaultAuditLog.md +2 -2
- package/docs/api/classes/PersistentVaultSecretCustody.md +4 -4
- package/docs/api/classes/PersistentVaultSecretDestinationGrantRegistry.md +7 -7
- package/docs/api/classes/PersistentVaultSecretRepository.md +4 -6
- package/docs/api/classes/VaultCore.md +21 -21
- package/docs/api/classes/VaultCoreError.md +1 -1
- package/docs/api/enumerations/DispatchStatus.md +1 -1
- package/docs/api/enumerations/IdentityErrorCode.md +1 -1
- package/docs/api/enumerations/OwnerClientErrorCode.md +1 -1
- package/docs/api/functions/createAgentClient.md +1 -3
- package/docs/api/functions/createIdentity.md +1 -1
- package/docs/api/functions/createOwnerClient.md +1 -1
- package/docs/api/functions/createPersistentVaultCoreDependencies.md +1 -1
- package/docs/api/functions/createVault.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/deriveRootAgentId.md +1 -1
- package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +1 -1
- package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
- package/docs/api/functions/handleVaultAgentControlHttp.md +1 -1
- package/docs/api/functions/handleVaultAuditSse.md +1 -1
- package/docs/api/functions/handleVaultHttpDispatch.md +1 -1
- package/docs/api/functions/handleVaultPendingDispatchSse.md +1 -1
- package/docs/api/functions/initializeVaultCustody.md +1 -1
- package/docs/api/functions/listVaults.md +1 -1
- package/docs/api/functions/openOwnerSession.md +1 -1
- package/docs/api/functions/readVaultProfile.md +1 -1
- 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 +1 -1
- package/docs/api/functions/writeVaultProfile.md +1 -1
- package/docs/api/interfaces/AgentClient.md +5 -5
- package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
- package/docs/api/interfaces/AgentDispatchTransport.md +5 -5
- package/docs/api/interfaces/AgentIdentity.md +1 -1
- package/docs/api/interfaces/AgentIdentityRecord.md +2 -2
- package/docs/api/interfaces/AgentRequestRecord.md +93 -11
- package/docs/api/interfaces/AgentRuntimeManifest.md +1 -1
- package/docs/api/interfaces/AgentSecretGrant.md +3 -3
- package/docs/api/interfaces/AgentSigner.md +1 -1
- package/docs/api/interfaces/AuditEntry.md +9 -59
- package/docs/api/interfaces/CbioRuntime.md +1 -3
- package/docs/api/interfaces/CreateAgentClientOptions.md +1 -1
- package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
- package/docs/api/interfaces/CreateOwnerClientOptions.md +1 -1
- package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.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/DispatchAuthorization.md +3 -3
- package/docs/api/interfaces/DispatchInstruction.md +3 -3
- package/docs/api/interfaces/DispatchRequest.md +4 -4
- package/docs/api/interfaces/DispatchResult.md +2 -2
- 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/OpenOwnerSessionOptions.md +1 -1
- package/docs/api/interfaces/OwnerAgentProvisionResult.md +1 -1
- package/docs/api/interfaces/OwnerAuditSubscription.md +3 -3
- package/docs/api/interfaces/OwnerClient.md +5 -5
- package/docs/api/interfaces/OwnerCreateSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerPendingDispatchSubscription.md +1 -1
- package/docs/api/interfaces/OwnerRemoveSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerRequestRecord.md +73 -11
- package/docs/api/interfaces/OwnerSensitiveActionConfirmation.md +1 -1
- package/docs/api/interfaces/OwnerSensitiveActionContext.md +1 -1
- package/docs/api/interfaces/OwnerSession.md +1 -1
- package/docs/api/interfaces/OwnerUpdateSecretInput.md +1 -1
- package/docs/api/interfaces/PendingDispatchEvent.md +1 -1
- package/docs/api/interfaces/RecoverVaultOptions.md +1 -1
- package/docs/api/interfaces/RecoveredVault.md +1 -1
- package/docs/api/interfaces/RequestRecord.md +8 -7
- package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
- package/docs/api/interfaces/SecretDestinationGrant.md +3 -3
- package/docs/api/interfaces/SecretRecord.md +7 -7
- package/docs/api/interfaces/Signer.md +1 -1
- package/docs/api/interfaces/VaultApproveDispatchInput.md +1 -1
- package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
- package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -1
- package/docs/api/interfaces/VaultCreateAgentInput.md +1 -1
- package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
- package/docs/api/interfaces/VaultGetRequestInput.md +1 -1
- package/docs/api/interfaces/VaultGrantAgentSecretInput.md +1 -1
- package/docs/api/interfaces/VaultGrantSecretDestinationInput.md +1 -1
- package/docs/api/interfaces/VaultImportAgentInput.md +1 -1
- package/docs/api/interfaces/VaultIssueSessionTokenInput.md +1 -1
- package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
- package/docs/api/interfaces/VaultListGrantsInput.md +1 -1
- package/docs/api/interfaces/VaultListRequestsInput.md +1 -1
- package/docs/api/interfaces/VaultListSecretsInput.md +1 -1
- package/docs/api/interfaces/VaultMetadata.md +1 -1
- package/docs/api/interfaces/VaultObject.md +1 -1
- package/docs/api/interfaces/VaultPrincipal.md +1 -1
- package/docs/api/interfaces/VaultProfile.md +1 -1
- package/docs/api/interfaces/VaultReadAgentPrivateKeyInput.md +1 -1
- package/docs/api/interfaces/VaultReadSecretPlaintextInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeAgentSecretInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeSecretDestinationInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeSessionTokenInput.md +1 -1
- package/docs/api/interfaces/VaultService.md +12 -12
- package/docs/api/interfaces/VaultUpdateAgentInput.md +1 -1
- package/docs/api/type-aliases/AgentId.md +1 -1
- package/docs/api/type-aliases/AgentRequestResult.md +1 -1
- package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
- package/docs/api/type-aliases/DispatchApprovalDecision.md +1 -1
- package/docs/api/type-aliases/GrantStatus.md +1 -1
- package/docs/api/type-aliases/SecretAlias.md +7 -0
- package/docs/api/type-aliases/SecretId.md +7 -0
- package/docs/api/type-aliases/SecretLifecycleStatus.md +1 -1
- package/docs/api/type-aliases/VaultId.md +7 -0
- package/docs/api/type-aliases/VaultPrincipalKind.md +1 -1
- package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +1 -1
- package/docs/zh/README.md +33 -66
- package/package.json +1 -1
- package/docs/api/enumerations/AuditOperation.md +0 -107
- package/docs/api/interfaces/AgentVisibleRequestRecord.md +0 -59
- package/docs/api/interfaces/AgentVisibleSecretRecord.md +0 -65
- package/docs/api/interfaces/OwnerVisibleRequestRecord.md +0 -79
- package/docs/api/interfaces/SecretAlias.md +0 -11
- package/docs/api/interfaces/SecretId.md +0 -11
- package/docs/api/interfaces/VaultId.md +0 -11
package/dist/storage/prefix.js
CHANGED
|
@@ -10,10 +10,10 @@ export class PrefixStorageProvider {
|
|
|
10
10
|
this.prefix = prefix;
|
|
11
11
|
}
|
|
12
12
|
getBaseDir() {
|
|
13
|
-
if (this.base.getBaseDir) {
|
|
13
|
+
if (typeof this.base.getBaseDir === 'function') {
|
|
14
14
|
return path.join(this.base.getBaseDir(), this.prefix);
|
|
15
15
|
}
|
|
16
|
-
return
|
|
16
|
+
return undefined; // Trigger falsy check in bootstrap
|
|
17
17
|
}
|
|
18
18
|
key(key) {
|
|
19
19
|
return joinPrefix(this.prefix, key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prefix.js","sourceRoot":"","sources":["../../src/storage/prefix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,SAAS,UAAU,CAAC,MAAc,EAAE,GAAW;IAC7C,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3C,CAAC;AAED,MAAM,OAAO,qBAAqB;IAEb;IACA;IAFnB,YACmB,IAAsB,EACtB,MAAc;QADd,SAAI,GAAJ,IAAI,CAAkB;QACtB,WAAM,GAAN,MAAM,CAAQ;IAC9B,CAAC;IAEJ,UAAU;QACR,IAAI,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"prefix.js","sourceRoot":"","sources":["../../src/storage/prefix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,SAAS,UAAU,CAAC,MAAc,EAAE,GAAW;IAC7C,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3C,CAAC;AAED,MAAM,OAAO,qBAAqB;IAEb;IACA;IAFnB,YACmB,IAAsB,EACtB,MAAc;QADd,SAAI,GAAJ,IAAI,CAAkB;QACtB,WAAM,GAAN,MAAM,CAAQ;IAC9B,CAAC;IAEJ,UAAU;QACR,IAAI,OAAQ,IAAI,CAAC,IAAY,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YACxD,OAAO,IAAI,CAAC,IAAI,CAAE,IAAI,CAAC,IAAY,CAAC,UAAU,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACjE,CAAC;QACD,OAAO,SAAgB,CAAC,CAAC,mCAAmC;IAC9D,CAAC;IAGO,GAAG,CAAC,GAAW;QACrB,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,CAAC,GAAW;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,GAAW,EAAE,IAAY;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,GAAG,CAAC,GAAW;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAE,OAAe,EAAE,KAAa;QACpC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,QAAQ,CAAK,GAAW,EAAE,IAAsB;QAC9C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;IACjD,CAAC;CACF;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAsB,EAAE,MAAc;IAC1E,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -4,24 +4,17 @@ export interface VaultPrincipal {
|
|
|
4
4
|
kind: VaultPrincipalKind;
|
|
5
5
|
id: string;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
export interface SecretAlias {
|
|
14
|
-
readonly value: string;
|
|
15
|
-
}
|
|
16
|
-
export interface SecretVersion {
|
|
17
|
-
readonly value: string;
|
|
18
|
-
}
|
|
7
|
+
export type VaultId = string;
|
|
8
|
+
export type SecretId = string;
|
|
9
|
+
export type SecretAlias = string;
|
|
10
|
+
export type SecretVersion = string;
|
|
11
|
+
export type SecretIdPreference = string;
|
|
19
12
|
export type SecretLifecycleStatus = "ACTIVE" | "SUPERSEDED" | "REMOVED";
|
|
20
13
|
export interface SecretRecord {
|
|
21
14
|
vault_id: VaultId;
|
|
22
15
|
secret_id: SecretId;
|
|
23
16
|
alias: SecretAlias;
|
|
24
|
-
version:
|
|
17
|
+
version: string;
|
|
25
18
|
lifecycle_status: SecretLifecycleStatus;
|
|
26
19
|
previousSecretId?: SecretId;
|
|
27
20
|
supersededBySecretId?: SecretId;
|
|
@@ -164,18 +157,6 @@ export interface AgentProof {
|
|
|
164
157
|
signature?: string;
|
|
165
158
|
token?: string;
|
|
166
159
|
}
|
|
167
|
-
export interface AgentVisibleSecretRecord {
|
|
168
|
-
vault_id: VaultId;
|
|
169
|
-
secret_id: SecretId;
|
|
170
|
-
alias: SecretAlias;
|
|
171
|
-
version: SecretVersion;
|
|
172
|
-
lifecycle_status: SecretLifecycleStatus;
|
|
173
|
-
issuer_id: string | null;
|
|
174
|
-
source: SecretSource;
|
|
175
|
-
created_at: string;
|
|
176
|
-
updated_at: string;
|
|
177
|
-
granted: boolean;
|
|
178
|
-
}
|
|
179
160
|
export interface AgentGetRuntimeManifestRequest {
|
|
180
161
|
vault_id: VaultId;
|
|
181
162
|
request_id: string;
|
|
@@ -201,7 +182,7 @@ export interface AgentSelfContext {
|
|
|
201
182
|
}
|
|
202
183
|
export interface AgentRuntimeManifest {
|
|
203
184
|
root_agent_id: string;
|
|
204
|
-
vault_id:
|
|
185
|
+
vault_id: VaultId;
|
|
205
186
|
vault_nickname?: string;
|
|
206
187
|
issued_at: string;
|
|
207
188
|
agent: AgentSelfContext;
|
|
@@ -223,7 +204,6 @@ export interface RequestRecord {
|
|
|
223
204
|
method: string;
|
|
224
205
|
headers?: Record<string, string>;
|
|
225
206
|
body?: string;
|
|
226
|
-
secret_alias?: string;
|
|
227
207
|
secret_id: SecretId | null;
|
|
228
208
|
};
|
|
229
209
|
response?: {
|
|
@@ -253,81 +233,9 @@ export interface OwnerPendingDispatchSubscription {
|
|
|
253
233
|
afterEventId?: string;
|
|
254
234
|
onEvent(event: PendingDispatchEvent): void;
|
|
255
235
|
}
|
|
256
|
-
export interface
|
|
257
|
-
request_id: string;
|
|
258
|
-
created_at: string;
|
|
259
|
-
reason: string;
|
|
260
|
-
target_url: string;
|
|
261
|
-
execution_status: DispatchStatus;
|
|
262
|
-
response_status?: number;
|
|
263
|
-
error?: string;
|
|
264
|
-
has_response_body: boolean;
|
|
265
|
-
secret_id?: SecretId;
|
|
236
|
+
export interface OwnerRequestRecord extends RequestRecord {
|
|
266
237
|
}
|
|
267
|
-
export interface
|
|
268
|
-
request_id: string;
|
|
269
|
-
created_at: string;
|
|
270
|
-
root_agent_id: string;
|
|
271
|
-
reason: string;
|
|
272
|
-
target_url: string;
|
|
273
|
-
execution_status: DispatchStatus;
|
|
274
|
-
response_status?: number;
|
|
275
|
-
error?: string;
|
|
276
|
-
has_response_body: boolean;
|
|
277
|
-
missing_grants?: {
|
|
278
|
-
agent_secret?: boolean;
|
|
279
|
-
secret_destination?: boolean;
|
|
280
|
-
};
|
|
281
|
-
secret_id?: SecretId;
|
|
282
|
-
}
|
|
283
|
-
export interface OwnerRequestRecord {
|
|
284
|
-
request_id: string;
|
|
285
|
-
created_at: string;
|
|
286
|
-
requested_at: string;
|
|
287
|
-
root_agent_id: string;
|
|
288
|
-
reason: string;
|
|
289
|
-
request: {
|
|
290
|
-
target_url: string;
|
|
291
|
-
method: string;
|
|
292
|
-
headers?: Record<string, string>;
|
|
293
|
-
body?: string;
|
|
294
|
-
secret_alias?: string;
|
|
295
|
-
secret_id?: SecretId;
|
|
296
|
-
};
|
|
297
|
-
response?: {
|
|
298
|
-
status?: number;
|
|
299
|
-
headers?: Record<string, string>;
|
|
300
|
-
body?: string;
|
|
301
|
-
error?: string;
|
|
302
|
-
};
|
|
303
|
-
execution_status: DispatchStatus;
|
|
304
|
-
missing_grants?: {
|
|
305
|
-
agent_secret?: boolean;
|
|
306
|
-
secret_destination?: boolean;
|
|
307
|
-
};
|
|
308
|
-
secret_id?: SecretId;
|
|
309
|
-
}
|
|
310
|
-
export interface AgentRequestRecord {
|
|
311
|
-
request_id: string;
|
|
312
|
-
created_at: string;
|
|
313
|
-
requested_at: string;
|
|
314
|
-
reason: string;
|
|
315
|
-
request: {
|
|
316
|
-
target_url: string;
|
|
317
|
-
method: string;
|
|
318
|
-
headers?: Record<string, string>;
|
|
319
|
-
body?: string;
|
|
320
|
-
secret_alias?: string;
|
|
321
|
-
secret_id?: SecretId;
|
|
322
|
-
};
|
|
323
|
-
response?: {
|
|
324
|
-
status?: number;
|
|
325
|
-
headers?: Record<string, string>;
|
|
326
|
-
body?: string;
|
|
327
|
-
error?: string;
|
|
328
|
-
};
|
|
329
|
-
execution_status: DispatchStatus;
|
|
330
|
-
secret_id?: SecretId;
|
|
238
|
+
export interface AgentRequestRecord extends RequestRecord {
|
|
331
239
|
}
|
|
332
240
|
export interface VaultToolDefinition {
|
|
333
241
|
name: string;
|
|
@@ -406,7 +314,7 @@ export interface DispatchRequest {
|
|
|
406
314
|
kind: "agent";
|
|
407
315
|
};
|
|
408
316
|
proof: AgentProof;
|
|
409
|
-
|
|
317
|
+
secret_id?: SecretId;
|
|
410
318
|
reason: string;
|
|
411
319
|
target_url: string;
|
|
412
320
|
method: string;
|
|
@@ -454,52 +362,22 @@ export interface DispatchResult {
|
|
|
454
362
|
}
|
|
455
363
|
export type AgentRequestResult = AgentRequestRecord;
|
|
456
364
|
export interface AuditQuery {
|
|
457
|
-
vault_id:
|
|
365
|
+
vault_id: VaultId;
|
|
458
366
|
actor_id?: string;
|
|
459
367
|
root_agent_id?: string;
|
|
460
|
-
|
|
461
|
-
secret_id?: string;
|
|
368
|
+
secret_id?: SecretId;
|
|
462
369
|
request_id?: string;
|
|
463
370
|
since?: string;
|
|
464
371
|
}
|
|
465
|
-
export declare enum AuditOperation {
|
|
466
|
-
IDENTITY_REGISTER = "identity.register",
|
|
467
|
-
IDENTITY_UPDATE = "identity.update",
|
|
468
|
-
IDENTITY_ISSUE_TOKEN = "identity.issue_token",
|
|
469
|
-
IDENTITY_REVOKE_TOKEN = "identity.revoke_token",
|
|
470
|
-
GRANT_SECRET = "grant.grant_secret",
|
|
471
|
-
GRANT_DESTINATION = "grant.grant_destination",
|
|
472
|
-
REVOKE_SECRET = "grant.revoke_secret",
|
|
473
|
-
REVOKE_DESTINATION = "grant.revoke_destination",
|
|
474
|
-
SECRET_WRITE = "secret.write",
|
|
475
|
-
SECRET_EXPORT = "secret.export",
|
|
476
|
-
SECRET_BATCH_EXPORT = "secret.batch_export",
|
|
477
|
-
SECRET_DELETE = "secret.delete",
|
|
478
|
-
POLICY_EVALUATE = "policy.evaluate_dispatch",
|
|
479
|
-
SECRET_DISPATCH = "secret.dispatch",
|
|
480
|
-
DISPATCH_APPROVE = "dispatch.approve",
|
|
481
|
-
DISPATCH_REJECT = "dispatch.reject",
|
|
482
|
-
DISPATCH_HOLD = "dispatch.pending_approval"
|
|
483
|
-
}
|
|
484
372
|
export interface AuditEntry {
|
|
485
373
|
event_id: string;
|
|
486
374
|
ts: string;
|
|
487
|
-
vault_id:
|
|
375
|
+
vault_id: VaultId;
|
|
488
376
|
actor: VaultPrincipal;
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
secret_alias?: string;
|
|
494
|
-
secret_id?: string;
|
|
495
|
-
root_agent_id?: string;
|
|
496
|
-
site_id?: string;
|
|
497
|
-
target?: {
|
|
498
|
-
kind: "http" | "other";
|
|
499
|
-
url: string;
|
|
500
|
-
};
|
|
501
|
-
detail: string;
|
|
502
|
-
error_code?: string | null;
|
|
377
|
+
function_name: string;
|
|
378
|
+
input: Record<string, any>;
|
|
379
|
+
output?: any;
|
|
380
|
+
error?: string;
|
|
503
381
|
}
|
|
504
382
|
export interface AgentIdentityRecord {
|
|
505
383
|
vault_id: VaultId;
|
|
@@ -533,7 +411,7 @@ export interface OwnerAuditRequest {
|
|
|
533
411
|
}
|
|
534
412
|
export interface OwnerAuditSubscription {
|
|
535
413
|
afterEventId?: string;
|
|
536
|
-
|
|
414
|
+
function_names?: readonly string[];
|
|
537
415
|
root_agent_id?: string;
|
|
538
416
|
request_id?: string;
|
|
539
417
|
onEvent(entry: AuditEntry): void;
|
|
@@ -550,7 +428,7 @@ export interface OwnerExportSecretRequest {
|
|
|
550
428
|
export interface OwnerSecretExport {
|
|
551
429
|
vault_id: VaultId;
|
|
552
430
|
secret_id: SecretId;
|
|
553
|
-
alias:
|
|
431
|
+
alias: string;
|
|
554
432
|
plaintext: string;
|
|
555
433
|
exported_at: string;
|
|
556
434
|
}
|
|
@@ -569,7 +447,7 @@ export interface OwnerListGrantsRequest {
|
|
|
569
447
|
kind: "owner";
|
|
570
448
|
};
|
|
571
449
|
root_agent_id?: string;
|
|
572
|
-
|
|
450
|
+
secret_id?: SecretId;
|
|
573
451
|
site_id?: string;
|
|
574
452
|
requested_at: string;
|
|
575
453
|
}
|
|
@@ -6,24 +6,4 @@ export var DispatchStatus;
|
|
|
6
6
|
DispatchStatus["IN_PROGRESS"] = "IN_PROGRESS";
|
|
7
7
|
DispatchStatus["AWAITING_APPROVAL"] = "AWAITING_APPROVAL";
|
|
8
8
|
})(DispatchStatus || (DispatchStatus = {}));
|
|
9
|
-
export var AuditOperation;
|
|
10
|
-
(function (AuditOperation) {
|
|
11
|
-
AuditOperation["IDENTITY_REGISTER"] = "identity.register";
|
|
12
|
-
AuditOperation["IDENTITY_UPDATE"] = "identity.update";
|
|
13
|
-
AuditOperation["IDENTITY_ISSUE_TOKEN"] = "identity.issue_token";
|
|
14
|
-
AuditOperation["IDENTITY_REVOKE_TOKEN"] = "identity.revoke_token";
|
|
15
|
-
AuditOperation["GRANT_SECRET"] = "grant.grant_secret";
|
|
16
|
-
AuditOperation["GRANT_DESTINATION"] = "grant.grant_destination";
|
|
17
|
-
AuditOperation["REVOKE_SECRET"] = "grant.revoke_secret";
|
|
18
|
-
AuditOperation["REVOKE_DESTINATION"] = "grant.revoke_destination";
|
|
19
|
-
AuditOperation["SECRET_WRITE"] = "secret.write";
|
|
20
|
-
AuditOperation["SECRET_EXPORT"] = "secret.export";
|
|
21
|
-
AuditOperation["SECRET_BATCH_EXPORT"] = "secret.batch_export";
|
|
22
|
-
AuditOperation["SECRET_DELETE"] = "secret.delete";
|
|
23
|
-
AuditOperation["POLICY_EVALUATE"] = "policy.evaluate_dispatch";
|
|
24
|
-
AuditOperation["SECRET_DISPATCH"] = "secret.dispatch";
|
|
25
|
-
AuditOperation["DISPATCH_APPROVE"] = "dispatch.approve";
|
|
26
|
-
AuditOperation["DISPATCH_REJECT"] = "dispatch.reject";
|
|
27
|
-
AuditOperation["DISPATCH_HOLD"] = "dispatch.pending_approval";
|
|
28
|
-
})(AuditOperation || (AuditOperation = {}));
|
|
29
9
|
//# sourceMappingURL=contracts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/vault-core/contracts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/vault-core/contracts.ts"],"names":[],"mappings":"AAsWA,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,6CAA2B,CAAA;IAC3B,yDAAuC,CAAA;AACzC,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type AgentIdentityRecord, type AgentRuntimeManifest, type
|
|
1
|
+
import { type AgentIdentityRecord, type AgentRuntimeManifest, type AgentRequestRecord, type AuditEntry, type AuditQuery, type DispatchAuthorization, type DispatchRequest, type DispatchResult, type OwnerPendingDispatchSubscription, type OwnerAuditSubscription, type OwnerRequestRecord, type SecretId, type SecretRecord, type VaultId, type VaultPrincipal, type AgentSecretGrant, type SecretDestinationGrant, type DispatchApprovalDecision, type OwnerCreateSecretCommand, type OwnerUpdateSecretCommand, type OwnerSecretExport } from "./contracts.js";
|
|
2
2
|
import type { VaultCoreDependencies } from "./ports.js";
|
|
3
3
|
export declare class VaultCore {
|
|
4
4
|
private readonly _deps;
|
|
5
5
|
constructor(deps: VaultCoreDependencies);
|
|
6
|
-
get vault_id():
|
|
6
|
+
get vault_id(): string;
|
|
7
7
|
private _assertOwnerPrincipal;
|
|
8
8
|
private _appendAudit;
|
|
9
9
|
private _verifyAgentControlProof;
|
|
@@ -53,7 +53,7 @@ export declare class VaultCore {
|
|
|
53
53
|
proof: any;
|
|
54
54
|
request_id: string;
|
|
55
55
|
requested_at: string;
|
|
56
|
-
}): Promise<readonly
|
|
56
|
+
}): Promise<readonly SecretRecord[]>;
|
|
57
57
|
agentListRequests(command: {
|
|
58
58
|
agent: VaultPrincipal & {
|
|
59
59
|
kind: "agent";
|
|
@@ -61,7 +61,7 @@ export declare class VaultCore {
|
|
|
61
61
|
proof: any;
|
|
62
62
|
request_id: string;
|
|
63
63
|
requested_at: string;
|
|
64
|
-
}): Promise<readonly
|
|
64
|
+
}): Promise<readonly AgentRequestRecord[]>;
|
|
65
65
|
agentGetRequest(command: {
|
|
66
66
|
agent: VaultPrincipal & {
|
|
67
67
|
kind: "agent";
|
|
@@ -108,13 +108,13 @@ export declare class VaultCore {
|
|
|
108
108
|
}): Promise<readonly AgentIdentityRecord[]>;
|
|
109
109
|
ownerListRequests(actor: VaultPrincipal & {
|
|
110
110
|
kind: "owner";
|
|
111
|
-
}, root_agent_id?: string): Promise<readonly
|
|
111
|
+
}, root_agent_id?: string): Promise<readonly OwnerRequestRecord[]>;
|
|
112
112
|
ownerGetRequest(actor: VaultPrincipal & {
|
|
113
113
|
kind: "owner";
|
|
114
114
|
}, request_id: string): Promise<OwnerRequestRecord>;
|
|
115
115
|
ownerListSecrets(actor: VaultPrincipal & {
|
|
116
116
|
kind: "owner";
|
|
117
|
-
}): Promise<readonly
|
|
117
|
+
}): Promise<readonly SecretRecord[]>;
|
|
118
118
|
ownerIssueSessionToken(request: {
|
|
119
119
|
vault_id: VaultId;
|
|
120
120
|
actor: VaultPrincipal;
|
|
@@ -141,9 +141,8 @@ export declare class VaultCore {
|
|
|
141
141
|
private _recordRequestInternal;
|
|
142
142
|
private _createInitialRequestRecord;
|
|
143
143
|
private _updateRequestRecordInternal;
|
|
144
|
-
private toAgentVisibleRequestRecord;
|
|
145
|
-
private toOwnerVisibleRequestRecord;
|
|
146
|
-
private toOwnerRequestRecord;
|
|
147
144
|
private toAgentRequestRecord;
|
|
145
|
+
private toOwnerRequestRecord;
|
|
146
|
+
private _appendAuditEntry;
|
|
148
147
|
}
|
|
149
148
|
export declare function createVaultCore(deps: VaultCoreDependencies): VaultCore;
|