@the-ai-company/cbio-node-runtime 1.58.0 → 1.59.1
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 +51 -22
- package/dist/clients/agent/client.d.ts +3 -1
- package/dist/clients/agent/client.js +41 -11
- package/dist/clients/agent/client.js.map +1 -1
- package/dist/clients/agent/contracts.d.ts +5 -2
- package/dist/clients/owner/client.d.ts +6 -4
- package/dist/clients/owner/client.js +43 -19
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/contracts.d.ts +11 -11
- package/dist/vault-core/contracts.d.ts +120 -24
- package/dist/vault-core/contracts.js +4 -2
- package/dist/vault-core/contracts.js.map +1 -1
- package/dist/vault-core/core.d.ts +10 -4
- package/dist/vault-core/core.js +302 -101
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-core/defaults.d.ts +8 -2
- package/dist/vault-core/defaults.js +33 -10
- package/dist/vault-core/defaults.js.map +1 -1
- package/dist/vault-core/index.d.ts +1 -1
- package/dist/vault-core/index.js.map +1 -1
- package/dist/vault-core/persistence.d.ts +11 -2
- package/dist/vault-core/persistence.js +37 -1
- package/dist/vault-core/persistence.js.map +1 -1
- package/dist/vault-core/ports.d.ts +7 -1
- package/dist/vault-core/tool-metadata.js +25 -8
- package/dist/vault-core/tool-metadata.js.map +1 -1
- package/dist/vault-ingress/defaults.d.ts +2 -0
- package/dist/vault-ingress/defaults.js +6 -0
- package/dist/vault-ingress/defaults.js.map +1 -1
- package/dist/vault-ingress/index.d.ts +39 -9
- package/dist/vault-ingress/index.js +140 -45
- package/dist/vault-ingress/index.js.map +1 -1
- package/dist/vault-ingress/remote-transport.d.ts +2 -0
- package/dist/vault-ingress/remote-transport.js +33 -4
- package/dist/vault-ingress/remote-transport.js.map +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/REFERENCE.md +36 -27
- package/docs/WORKS_WITH_CUSTOM_FETCH.md +2 -2
- package/docs/api/README.md +2 -2
- package/docs/api/classes/IdentityError.md +1 -1
- package/docs/api/classes/OwnerClientError.md +1 -1
- package/docs/api/classes/VaultCore.md +92 -28
- package/docs/api/classes/VaultCoreError.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 -1
- package/docs/api/functions/createIdentity.md +1 -1
- package/docs/api/functions/createOwnerHttpFlowBoundary.md +1 -1
- package/docs/api/functions/createOwnerSession.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 +1 -1
- 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/handleVaultAgentControlHttp.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 +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/wrapVaultCoreAsVaultService.md +1 -1
- package/docs/api/functions/writeVaultProfile.md +1 -1
- package/docs/api/interfaces/AgentClient.md +27 -1
- package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
- package/docs/api/interfaces/AgentDispatchTransport.md +33 -1
- package/docs/api/interfaces/AgentIdentity.md +1 -1
- package/docs/api/interfaces/AgentSigner.md +1 -1
- package/docs/api/interfaces/AgentSubmitCapabilityRequestInput.md +9 -9
- package/docs/api/interfaces/CbioRuntime.md +1 -1
- package/docs/api/interfaces/CreateAgentClientOptions.md +1 -1
- package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
- package/docs/api/interfaces/CreateOwnerSessionOptions.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/OwnerAgentProvisionResult.md +1 -1
- 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/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/VaultApproveCapabilityRequestInput.md +1 -1
- package/docs/api/interfaces/VaultApproveDispatchInput.md +1 -1
- package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
- package/docs/api/interfaces/VaultClient.md +69 -37
- package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -1
- package/docs/api/interfaces/VaultCreateAgentInput.md +1 -1
- package/docs/api/interfaces/VaultDeleteSecretInput.md +1 -1
- package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
- package/docs/api/interfaces/VaultGrantCapabilityInput.md +9 -21
- package/docs/api/interfaces/VaultGrantCapabilityRequest.md +1 -1
- package/docs/api/interfaces/VaultIdentity.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/VaultListCapabilitiesInput.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/VaultProfile.md +1 -1
- package/docs/api/interfaces/VaultReadAgentPrivateKeyInput.md +1 -1
- package/docs/api/interfaces/VaultReadSecretPlaintextInput.md +1 -1
- package/docs/api/interfaces/VaultRegisterFlowInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeCapabilityInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeSessionTokenInput.md +1 -1
- package/docs/api/interfaces/VaultSigner.md +1 -1
- package/docs/api/interfaces/VaultSubmitCapabilityRequestInput.md +11 -17
- package/docs/api/interfaces/VaultUpdateAgentInput.md +1 -1
- package/docs/api/type-aliases/AgentCapabilityEnvelope.md +1 -1
- package/docs/api/type-aliases/AgentVisibleSecretRecord.md +1 -1
- package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
- package/docs/api/type-aliases/OwnerGrantCapabilityInput.md +1 -1
- package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +1 -1
- package/docs/zh/README.md +25 -9
- package/examples/process-isolation.ts +6 -4
- package/package.json +1 -1
|
@@ -144,16 +144,23 @@ export interface OwnerRevokeCapabilityCommand {
|
|
|
144
144
|
capabilityId: string;
|
|
145
145
|
requestedAt: string;
|
|
146
146
|
}
|
|
147
|
+
export interface CapabilityWritePolicy {
|
|
148
|
+
secretIds?: readonly string[];
|
|
149
|
+
scope: string;
|
|
150
|
+
methods: readonly string[];
|
|
151
|
+
}
|
|
152
|
+
export interface CapabilityReadPolicy {
|
|
153
|
+
mode: "none" | "shape_only" | "full" | "custom";
|
|
154
|
+
paths?: readonly string[];
|
|
155
|
+
}
|
|
147
156
|
export interface AgentCapability {
|
|
148
157
|
vaultId: VaultId;
|
|
149
158
|
capabilityId: string;
|
|
150
159
|
agentId: string;
|
|
151
|
-
secretIds?: readonly string[];
|
|
152
|
-
secretAliases?: readonly string[];
|
|
153
160
|
operation: "dispatch_http" | "custom_http";
|
|
154
161
|
customFlowId?: string;
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
write: CapabilityWritePolicy;
|
|
163
|
+
read: CapabilityReadPolicy;
|
|
157
164
|
issuedAt: string;
|
|
158
165
|
expiresAt?: string;
|
|
159
166
|
revocationVersion?: number;
|
|
@@ -172,7 +179,6 @@ export interface AgentProof {
|
|
|
172
179
|
}
|
|
173
180
|
export interface AgentVisibleSecretRecord {
|
|
174
181
|
vaultId: VaultId;
|
|
175
|
-
secretId: SecretId;
|
|
176
182
|
alias: SecretAlias;
|
|
177
183
|
issuerId: string | null;
|
|
178
184
|
source: SecretSource;
|
|
@@ -181,8 +187,8 @@ export interface AgentVisibleSecretRecord {
|
|
|
181
187
|
isAuthorizedForAgent?: boolean;
|
|
182
188
|
authorizedCapabilities?: readonly {
|
|
183
189
|
capabilityId: string;
|
|
184
|
-
|
|
185
|
-
|
|
190
|
+
write: CapabilityWritePolicy;
|
|
191
|
+
read: CapabilityReadPolicy;
|
|
186
192
|
}[];
|
|
187
193
|
}
|
|
188
194
|
export interface AgentGetRuntimeManifestRequest {
|
|
@@ -209,20 +215,23 @@ export interface AgentSelfContext {
|
|
|
209
215
|
nickname?: string;
|
|
210
216
|
metadata?: Record<string, any>;
|
|
211
217
|
}
|
|
212
|
-
export type AgentCapabilityStateStatus = "GRANTED" | "PENDING" | "REJECTED";
|
|
213
218
|
export type AgentCapabilityStateSource = "owner_grant" | "explicit_request" | "dispatch_discovery";
|
|
219
|
+
export type CapabilityApprovalStatus = "PENDING" | "APPROVED" | "REJECTED";
|
|
220
|
+
export type CapabilityActionKind = "write" | "read";
|
|
221
|
+
export interface CapabilityActionState {
|
|
222
|
+
action: CapabilityActionKind;
|
|
223
|
+
status: CapabilityApprovalStatus;
|
|
224
|
+
decidedAt?: string;
|
|
225
|
+
}
|
|
214
226
|
export interface AgentCapabilityState {
|
|
215
|
-
status: AgentCapabilityStateStatus;
|
|
216
227
|
source: AgentCapabilityStateSource;
|
|
217
228
|
agentId: string;
|
|
218
229
|
requestId?: string;
|
|
219
230
|
capabilityId?: string;
|
|
220
231
|
operation: "dispatch_http" | "custom_http";
|
|
221
|
-
secretIds?: readonly string[];
|
|
222
|
-
secretAliases?: readonly string[];
|
|
223
232
|
customFlowId?: string;
|
|
224
|
-
|
|
225
|
-
|
|
233
|
+
write: CapabilityWritePolicy;
|
|
234
|
+
read: CapabilityReadPolicy;
|
|
226
235
|
issuedAt?: string;
|
|
227
236
|
requestedAt: string;
|
|
228
237
|
expiresAt?: string;
|
|
@@ -232,8 +241,12 @@ export interface AgentCapabilityState {
|
|
|
232
241
|
};
|
|
233
242
|
skipAudit?: boolean;
|
|
234
243
|
justification?: string;
|
|
235
|
-
|
|
244
|
+
secretId?: string;
|
|
236
245
|
targetUrl?: string;
|
|
246
|
+
actions: {
|
|
247
|
+
write: CapabilityActionState;
|
|
248
|
+
read: CapabilityActionState;
|
|
249
|
+
};
|
|
237
250
|
}
|
|
238
251
|
export interface CapabilityStateRecord extends AgentCapabilityState {
|
|
239
252
|
vaultId: VaultId;
|
|
@@ -251,6 +264,44 @@ export interface AgentRuntimeManifest {
|
|
|
251
264
|
capabilities: readonly AgentCapabilityState[];
|
|
252
265
|
tools: readonly VaultToolDefinition[];
|
|
253
266
|
}
|
|
267
|
+
export interface RequestRecord {
|
|
268
|
+
vaultId: VaultId;
|
|
269
|
+
requestId: string;
|
|
270
|
+
agentId: string;
|
|
271
|
+
capabilityId?: string;
|
|
272
|
+
operation: "dispatch_http" | "custom_http";
|
|
273
|
+
createdAt: string;
|
|
274
|
+
request: {
|
|
275
|
+
targetUrl: string;
|
|
276
|
+
method: string;
|
|
277
|
+
headers?: Record<string, string>;
|
|
278
|
+
body?: string;
|
|
279
|
+
secretId?: string;
|
|
280
|
+
};
|
|
281
|
+
response?: {
|
|
282
|
+
status?: number;
|
|
283
|
+
headers?: Record<string, string>;
|
|
284
|
+
body?: string;
|
|
285
|
+
error?: string;
|
|
286
|
+
};
|
|
287
|
+
execution: {
|
|
288
|
+
status: DispatchStatus;
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
export interface AgentVisibleRequestRecord {
|
|
292
|
+
requestId: string;
|
|
293
|
+
createdAt: string;
|
|
294
|
+
capabilityId?: string;
|
|
295
|
+
operation: "dispatch_http" | "custom_http";
|
|
296
|
+
targetUrl: string;
|
|
297
|
+
method: string;
|
|
298
|
+
executionStatus: DispatchStatus;
|
|
299
|
+
responseStatus?: number;
|
|
300
|
+
error?: string;
|
|
301
|
+
readStatus: CapabilityApprovalStatus;
|
|
302
|
+
hasResponseBody: boolean;
|
|
303
|
+
resultVisible: boolean;
|
|
304
|
+
}
|
|
254
305
|
export interface VaultToolDefinition {
|
|
255
306
|
name: string;
|
|
256
307
|
description: string;
|
|
@@ -274,6 +325,25 @@ export interface AgentListSecretsRequest {
|
|
|
274
325
|
};
|
|
275
326
|
proof: AgentProof;
|
|
276
327
|
}
|
|
328
|
+
export interface AgentListRequestsRequest {
|
|
329
|
+
vaultId: VaultId;
|
|
330
|
+
requestId: string;
|
|
331
|
+
requestedAt: string;
|
|
332
|
+
agent: VaultPrincipal & {
|
|
333
|
+
kind: "agent";
|
|
334
|
+
};
|
|
335
|
+
proof: AgentProof;
|
|
336
|
+
}
|
|
337
|
+
export interface AgentGetRequestRequest {
|
|
338
|
+
vaultId: VaultId;
|
|
339
|
+
requestId: string;
|
|
340
|
+
requestedAt: string;
|
|
341
|
+
agent: VaultPrincipal & {
|
|
342
|
+
kind: "agent";
|
|
343
|
+
};
|
|
344
|
+
proof: AgentProof;
|
|
345
|
+
targetRequestId: string;
|
|
346
|
+
}
|
|
277
347
|
export interface AgentSubmitCapabilityRequestCommand {
|
|
278
348
|
vaultId: VaultId;
|
|
279
349
|
requestId: string;
|
|
@@ -282,14 +352,14 @@ export interface AgentSubmitCapabilityRequestCommand {
|
|
|
282
352
|
kind: "agent";
|
|
283
353
|
};
|
|
284
354
|
proof: AgentProof;
|
|
285
|
-
|
|
355
|
+
capability: CapabilityRequestScope;
|
|
356
|
+
secretAliases?: readonly string[];
|
|
286
357
|
justification?: string;
|
|
287
358
|
}
|
|
288
359
|
export interface CapabilityRequestScope {
|
|
289
360
|
operation: "dispatch_http" | "custom_http";
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
methods: readonly string[];
|
|
361
|
+
write: CapabilityWritePolicy;
|
|
362
|
+
read: CapabilityReadPolicy;
|
|
293
363
|
rateLimit?: {
|
|
294
364
|
maxRequests: number;
|
|
295
365
|
windowMs: number;
|
|
@@ -302,7 +372,7 @@ export interface SubmitCapabilityRequestCommand {
|
|
|
302
372
|
requestId: string;
|
|
303
373
|
requester: VaultPrincipal;
|
|
304
374
|
agentId: string;
|
|
305
|
-
|
|
375
|
+
capability: CapabilityRequestScope;
|
|
306
376
|
justification?: string;
|
|
307
377
|
requestedAt: string;
|
|
308
378
|
}
|
|
@@ -310,14 +380,30 @@ export interface OwnerListCapabilityStatesRequest {
|
|
|
310
380
|
vaultId: VaultId;
|
|
311
381
|
owner: VaultPrincipal;
|
|
312
382
|
agentId?: string;
|
|
313
|
-
|
|
383
|
+
writeStatus?: CapabilityApprovalStatus;
|
|
384
|
+
readStatus?: CapabilityApprovalStatus;
|
|
385
|
+
}
|
|
386
|
+
export interface OwnerAllowOnceCommand {
|
|
387
|
+
vaultId: VaultId;
|
|
388
|
+
requestId: string;
|
|
389
|
+
owner: VaultPrincipal;
|
|
314
390
|
}
|
|
315
|
-
export interface
|
|
391
|
+
export interface OwnerApproveCapabilityWriteCommand {
|
|
316
392
|
vaultId: VaultId;
|
|
317
393
|
requestId: string;
|
|
318
394
|
owner: VaultPrincipal;
|
|
319
395
|
}
|
|
320
|
-
export interface
|
|
396
|
+
export interface OwnerApproveCapabilityReadCommand {
|
|
397
|
+
vaultId: VaultId;
|
|
398
|
+
requestId: string;
|
|
399
|
+
owner: VaultPrincipal;
|
|
400
|
+
}
|
|
401
|
+
export interface OwnerAllowAlwaysCommand {
|
|
402
|
+
vaultId: VaultId;
|
|
403
|
+
requestId: string;
|
|
404
|
+
owner: VaultPrincipal;
|
|
405
|
+
}
|
|
406
|
+
export interface OwnerDenyCommand {
|
|
321
407
|
vaultId: VaultId;
|
|
322
408
|
requestId: string;
|
|
323
409
|
owner: VaultPrincipal;
|
|
@@ -332,6 +418,7 @@ export interface DispatchRequest {
|
|
|
332
418
|
capability?: AgentCapability;
|
|
333
419
|
proof: AgentProof;
|
|
334
420
|
secretAlias?: string;
|
|
421
|
+
secretId?: string;
|
|
335
422
|
targetUrl: string;
|
|
336
423
|
method: string;
|
|
337
424
|
headers?: Record<string, string>;
|
|
@@ -371,6 +458,13 @@ export interface DispatchResult {
|
|
|
371
458
|
responseBody?: string;
|
|
372
459
|
error?: string;
|
|
373
460
|
}
|
|
461
|
+
export interface AgentRequestResult {
|
|
462
|
+
requestId: string;
|
|
463
|
+
executionStatus: DispatchStatus;
|
|
464
|
+
responseStatus?: number;
|
|
465
|
+
responseBody?: string;
|
|
466
|
+
error?: string;
|
|
467
|
+
}
|
|
374
468
|
export interface AuditQuery {
|
|
375
469
|
actorId?: string;
|
|
376
470
|
secretAlias?: string;
|
|
@@ -383,8 +477,10 @@ export declare enum AuditAction {
|
|
|
383
477
|
REGISTER_CUSTOM_FLOW = "REGISTER_CUSTOM_FLOW",
|
|
384
478
|
REGISTER_CAPABILITY = "REGISTER_CAPABILITY",
|
|
385
479
|
SUBMIT_CAPABILITY_REQUEST = "SUBMIT_CAPABILITY_REQUEST",
|
|
386
|
-
|
|
387
|
-
|
|
480
|
+
APPROVE_CAPABILITY_WRITE = "APPROVE_CAPABILITY_WRITE",
|
|
481
|
+
APPROVE_CAPABILITY_READ = "APPROVE_CAPABILITY_READ",
|
|
482
|
+
REJECT_CAPABILITY_WRITE = "REJECT_CAPABILITY_WRITE",
|
|
483
|
+
REJECT_CAPABILITY_READ = "REJECT_CAPABILITY_READ",
|
|
388
484
|
REVOKE_CAPABILITY = "REVOKE_CAPABILITY",
|
|
389
485
|
WRITE_SECRET = "WRITE_SECRET",
|
|
390
486
|
EXPORT_SECRET = "EXPORT_SECRET",
|
|
@@ -13,8 +13,10 @@ export var AuditAction;
|
|
|
13
13
|
AuditAction["REGISTER_CUSTOM_FLOW"] = "REGISTER_CUSTOM_FLOW";
|
|
14
14
|
AuditAction["REGISTER_CAPABILITY"] = "REGISTER_CAPABILITY";
|
|
15
15
|
AuditAction["SUBMIT_CAPABILITY_REQUEST"] = "SUBMIT_CAPABILITY_REQUEST";
|
|
16
|
-
AuditAction["
|
|
17
|
-
AuditAction["
|
|
16
|
+
AuditAction["APPROVE_CAPABILITY_WRITE"] = "APPROVE_CAPABILITY_WRITE";
|
|
17
|
+
AuditAction["APPROVE_CAPABILITY_READ"] = "APPROVE_CAPABILITY_READ";
|
|
18
|
+
AuditAction["REJECT_CAPABILITY_WRITE"] = "REJECT_CAPABILITY_WRITE";
|
|
19
|
+
AuditAction["REJECT_CAPABILITY_READ"] = "REJECT_CAPABILITY_READ";
|
|
18
20
|
AuditAction["REVOKE_CAPABILITY"] = "REVOKE_CAPABILITY";
|
|
19
21
|
AuditAction["WRITE_SECRET"] = "WRITE_SECRET";
|
|
20
22
|
AuditAction["EXPORT_SECRET"] = "EXPORT_SECRET";
|
|
@@ -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":"AAsdA,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;AACrB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AA4BD,MAAM,CAAN,IAAY,WAyBX;AAzBD,WAAY,WAAW;IACrB,kEAAmD,CAAA;IACnD,8DAA+C,CAAA;IAC/C,4DAA6C,CAAA;IAC7C,0DAA2C,CAAA;IAC3C,sEAAuD,CAAA;IACvD,oEAAqD,CAAA;IACrD,kEAAmD,CAAA;IACnD,kEAAmD,CAAA;IACnD,gEAAiD,CAAA;IACjD,sDAAuC,CAAA;IACvC,4CAA6B,CAAA;IAC7B,8CAA+B,CAAA;IAC/B,gDAAiC,CAAA;IACjC,8CAA+B,CAAA;IAC/B,wDAAyC,CAAA;IACzC,kDAAmC,CAAA;IACnC,0CAA2B,CAAA;IAC3B,sDAAuC,CAAA;IACvC,wCAAyB,CAAA;IACzB,0DAA2C,CAAA;IAC3C,4DAA6C,CAAA;IAC7C,oDAAqC,CAAA;IACrC,kDAAmC,CAAA;IACnC,gDAAiC,CAAA;AACnC,CAAC,EAzBW,WAAW,KAAX,WAAW,QAyBtB;AAED,MAAM,CAAN,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,uCAAuB,CAAA;IACvB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;AACrB,CAAC,EANW,YAAY,KAAZ,YAAY,QAMvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentListCapabilitiesRequest, AgentListSecretsRequest, AgentGetRuntimeManifestRequest, AgentRuntimeManifest, AgentSubmitCapabilityRequestCommand, AgentVisibleSecretRecord, AuditEntry, AuditQuery, CustomHttpFlowDefinition, DispatchAuthorization, DispatchRequest, DispatchResult,
|
|
1
|
+
import type { AgentListCapabilitiesRequest, AgentListSecretsRequest, AgentListRequestsRequest, AgentGetRequestRequest, AgentRequestResult, AgentGetRuntimeManifestRequest, AgentRuntimeManifest, AgentSubmitCapabilityRequestCommand, AgentVisibleRequestRecord, AgentVisibleSecretRecord, AuditEntry, AuditQuery, CustomHttpFlowDefinition, DispatchAuthorization, DispatchRequest, DispatchResult, OwnerAllowAlwaysCommand, OwnerAllowOnceCommand, OwnerIssueSessionTokenRequest, OwnerDenyCommand, OwnerDeleteSecretCommand, OwnerExportSecretRequest, OwnerRegisterAgentIdentityCommand, OwnerUpdateAgentIdentityCommand, OwnerRegisterCapabilityCommand, OwnerRegisterCustomHttpFlowCommand, OwnerRevokeCapabilityCommand, OwnerListAgentsRequest, OwnerListCapabilitiesRequest, OwnerListCapabilityStatesRequest, OwnerSecretExport, OwnerSessionToken, SecretRecord, SubmitCapabilityRequestCommand, VaultId, VaultPrincipal, VaultWriteSecretCommand, AgentIdentityRecord, AgentCapability, CapabilityStateRecord } from "./contracts.js";
|
|
2
2
|
import type { VaultCoreDependencies } from "./ports.js";
|
|
3
3
|
/**
|
|
4
4
|
* The Sovereign Vault Core.
|
|
@@ -18,6 +18,8 @@ export declare class VaultCore {
|
|
|
18
18
|
private _appendDecisionAudit;
|
|
19
19
|
private _verifyAgentControlProof;
|
|
20
20
|
private _listVisibleSecretsForAgent;
|
|
21
|
+
private _recordRequestExecution;
|
|
22
|
+
private toVisibleRequestRecord;
|
|
21
23
|
ownerOnCapabilityState(callback: (record: CapabilityStateRecord) => void): () => void;
|
|
22
24
|
ownerRegisterAgentIdentity(command: OwnerRegisterAgentIdentityCommand): Promise<void>;
|
|
23
25
|
ownerUpdateAgentIdentity(command: OwnerUpdateAgentIdentityCommand): Promise<AgentIdentityRecord>;
|
|
@@ -50,6 +52,8 @@ export declare class VaultCore {
|
|
|
50
52
|
}): Promise<readonly AgentVisibleSecretRecord[]>;
|
|
51
53
|
agentListCapabilities(request: AgentListCapabilitiesRequest): Promise<readonly import("./contracts.js").AgentCapabilityState[]>;
|
|
52
54
|
agentListSecrets(request: AgentListSecretsRequest): Promise<readonly AgentVisibleSecretRecord[]>;
|
|
55
|
+
agentListRequests(request: AgentListRequestsRequest): Promise<readonly AgentVisibleRequestRecord[]>;
|
|
56
|
+
agentGetRequest(request: AgentGetRequestRequest): Promise<AgentRequestResult>;
|
|
53
57
|
agentGetRuntimeManifest(command: AgentGetRuntimeManifestRequest): Promise<AgentRuntimeManifest>;
|
|
54
58
|
agentSubmitCapabilityRequest(command: AgentSubmitCapabilityRequestCommand): Promise<CapabilityStateRecord>;
|
|
55
59
|
ownerRevokeCapability(command: OwnerRevokeCapabilityCommand): Promise<void>;
|
|
@@ -65,8 +69,10 @@ export declare class VaultCore {
|
|
|
65
69
|
token: string;
|
|
66
70
|
}): Promise<void>;
|
|
67
71
|
ownerListCapabilityStates(command: OwnerListCapabilityStatesRequest): Promise<readonly CapabilityStateRecord[]>;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
ownerApproveCapabilityWrite(command: import("./contracts.js").OwnerApproveCapabilityWriteCommand): Promise<CapabilityStateRecord>;
|
|
73
|
+
ownerApproveCapabilityRead(command: import("./contracts.js").OwnerApproveCapabilityReadCommand): Promise<CapabilityStateRecord>;
|
|
74
|
+
ownerAllowOnce(command: OwnerAllowOnceCommand): Promise<DispatchResult>;
|
|
75
|
+
ownerAllowAlways(command: OwnerAllowAlwaysCommand): Promise<DispatchResult>;
|
|
76
|
+
ownerDeny(command: OwnerDenyCommand): Promise<CapabilityStateRecord>;
|
|
71
77
|
}
|
|
72
78
|
export declare function createVaultCore(deps: VaultCoreDependencies): VaultCore;
|