@the-ai-company/cbio-node-runtime 1.63.3 → 1.63.6

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.
Files changed (233) hide show
  1. package/README.md +48 -209
  2. package/dist/clients/agent/client.d.ts +18 -40
  3. package/dist/clients/agent/client.js +22 -109
  4. package/dist/clients/agent/client.js.map +1 -1
  5. package/dist/clients/agent/contracts.d.ts +1 -8
  6. package/dist/clients/agent/index.d.ts +1 -1
  7. package/dist/clients/owner/client.d.ts +2 -102
  8. package/dist/clients/owner/client.js +111 -266
  9. package/dist/clients/owner/client.js.map +1 -1
  10. package/dist/clients/owner/contracts.d.ts +37 -75
  11. package/dist/clients/owner/index.d.ts +2 -4
  12. package/dist/clients/owner/index.js +1 -2
  13. package/dist/clients/owner/index.js.map +1 -1
  14. package/dist/internal/id-factory.d.ts +0 -2
  15. package/dist/internal/id-factory.js +0 -6
  16. package/dist/internal/id-factory.js.map +1 -1
  17. package/dist/protocol/identity.d.ts +1 -1
  18. package/dist/protocol/identity.js +3 -3
  19. package/dist/protocol/identity.js.map +1 -1
  20. package/dist/public-types.d.ts +5 -14
  21. package/dist/public-types.js +1 -8
  22. package/dist/public-types.js.map +1 -1
  23. package/dist/runtime/bootstrap.d.ts +1 -3
  24. package/dist/runtime/bootstrap.js.map +1 -1
  25. package/dist/runtime/identity.d.ts +2 -2
  26. package/dist/runtime/identity.js +3 -5
  27. package/dist/runtime/identity.js.map +1 -1
  28. package/dist/runtime/index.d.ts +10 -12
  29. package/dist/runtime/index.js +7 -8
  30. package/dist/runtime/index.js.map +1 -1
  31. package/dist/runtime/owner-session.d.ts +7 -6
  32. package/dist/runtime/owner-session.js +5 -6
  33. package/dist/runtime/owner-session.js.map +1 -1
  34. package/dist/storage/fs.d.ts +3 -2
  35. package/dist/storage/fs.js +8 -5
  36. package/dist/storage/fs.js.map +1 -1
  37. package/dist/storage/prefix.d.ts +1 -0
  38. package/dist/storage/prefix.js +7 -0
  39. package/dist/storage/prefix.js.map +1 -1
  40. package/dist/storage/provider.d.ts +2 -0
  41. package/dist/vault-core/contracts.d.ts +95 -210
  42. package/dist/vault-core/contracts.js +8 -11
  43. package/dist/vault-core/contracts.js.map +1 -1
  44. package/dist/vault-core/core.d.ts +119 -62
  45. package/dist/vault-core/core.js +518 -1180
  46. package/dist/vault-core/core.js.map +1 -1
  47. package/dist/vault-core/defaults.d.ts +22 -44
  48. package/dist/vault-core/defaults.js +65 -234
  49. package/dist/vault-core/defaults.js.map +1 -1
  50. package/dist/vault-core/errors.d.ts +3 -2
  51. package/dist/vault-core/errors.js.map +1 -1
  52. package/dist/vault-core/index.d.ts +5 -5
  53. package/dist/vault-core/index.js +2 -2
  54. package/dist/vault-core/index.js.map +1 -1
  55. package/dist/vault-core/persistence.d.ts +72 -119
  56. package/dist/vault-core/persistence.js +310 -427
  57. package/dist/vault-core/persistence.js.map +1 -1
  58. package/dist/vault-core/ports.d.ts +19 -30
  59. package/dist/vault-core/read-policy.d.ts +3 -2
  60. package/dist/vault-core/read-policy.js.map +1 -1
  61. package/dist/vault-core/tool-metadata.js +2 -2
  62. package/dist/vault-core/tool-metadata.js.map +1 -1
  63. package/dist/vault-ingress/defaults.d.ts +4 -2
  64. package/dist/vault-ingress/defaults.js +14 -8
  65. package/dist/vault-ingress/defaults.js.map +1 -1
  66. package/dist/vault-ingress/index.d.ts +39 -119
  67. package/dist/vault-ingress/index.js +98 -456
  68. package/dist/vault-ingress/index.js.map +1 -1
  69. package/dist/vault-ingress/remote-transport.d.ts +5 -3
  70. package/dist/vault-ingress/remote-transport.js +8 -28
  71. package/dist/vault-ingress/remote-transport.js.map +1 -1
  72. package/docs/ARCHITECTURE.md +39 -22
  73. package/docs/CUSTODY_MODEL.md +1 -1
  74. package/docs/IDENTITY_MODEL.md +5 -5
  75. package/docs/MIGRATION-1.51.md +19 -19
  76. package/docs/MIGRATION-1.65.md +87 -0
  77. package/docs/PROCESS_ISOLATION.md +2 -2
  78. package/docs/REFERENCE.md +42 -224
  79. package/docs/api/README.md +48 -30
  80. package/docs/api/classes/IdentityError.md +1 -1
  81. package/docs/api/classes/OwnerClientError.md +1 -1
  82. package/docs/api/classes/PersistentVaultAgentIdentityRegistry.md +89 -0
  83. package/docs/api/classes/PersistentVaultAgentSecretGrantRegistry.md +125 -0
  84. package/docs/api/classes/PersistentVaultAuditLog.md +65 -0
  85. package/docs/api/classes/PersistentVaultSecretCustody.md +93 -0
  86. package/docs/api/classes/PersistentVaultSecretDestinationGrantRegistry.md +125 -0
  87. package/docs/api/classes/PersistentVaultSecretRepository.md +127 -0
  88. package/docs/api/classes/VaultCore.md +264 -237
  89. package/docs/api/classes/VaultCoreError.md +3 -3
  90. package/docs/api/enumerations/AuditAction.md +143 -0
  91. package/docs/api/enumerations/AuditOutcome.md +35 -0
  92. package/docs/api/enumerations/DispatchStatus.md +35 -0
  93. package/docs/api/enumerations/IdentityErrorCode.md +1 -1
  94. package/docs/api/enumerations/OwnerClientErrorCode.md +1 -1
  95. package/docs/api/functions/createAgentClient.md +1 -15
  96. package/docs/api/functions/createIdentity.md +2 -2
  97. package/docs/api/functions/createOwnerClient.md +17 -0
  98. package/docs/api/functions/createOwnerSession.md +1 -1
  99. package/docs/api/functions/createPersistentVaultCoreDependencies.md +4 -4
  100. package/docs/api/functions/createVault.md +1 -1
  101. package/docs/api/functions/createVaultCore.md +1 -1
  102. package/docs/api/functions/createVaultCoreDependencies.md +1 -1
  103. package/docs/api/functions/createVaultService.md +5 -13
  104. package/docs/api/functions/createWorkspaceStorage.md +1 -1
  105. package/docs/api/functions/deriveRootAgentId.md +17 -0
  106. package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +1 -1
  107. package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
  108. package/docs/api/functions/handleVaultAgentControlHttp.md +2 -2
  109. package/docs/api/functions/handleVaultHttpDispatch.md +2 -2
  110. package/docs/api/functions/initializeVaultCustody.md +7 -3
  111. package/docs/api/functions/listVaults.md +1 -1
  112. package/docs/api/functions/readVaultProfile.md +1 -1
  113. package/docs/api/functions/recoverVault.md +1 -1
  114. package/docs/api/functions/recoverVaultWorkingKey.md +4 -8
  115. package/docs/api/functions/restoreIdentity.md +1 -1
  116. package/docs/api/functions/updateVaultMetadata.md +1 -1
  117. package/docs/api/functions/writeVaultProfile.md +1 -1
  118. package/docs/api/interfaces/AgentClient.md +20 -59
  119. package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
  120. package/docs/api/interfaces/AgentDispatchTransport.md +12 -44
  121. package/docs/api/interfaces/AgentIdentity.md +3 -3
  122. package/docs/api/interfaces/AgentIdentityRecord.md +47 -0
  123. package/docs/api/interfaces/AgentRequestResult.md +35 -0
  124. package/docs/api/interfaces/AgentRuntimeManifest.md +55 -0
  125. package/docs/api/interfaces/AgentSecretGrant.md +41 -0
  126. package/docs/api/interfaces/AgentSigner.md +1 -1
  127. package/docs/api/interfaces/AgentVisibleRequestRecord.md +53 -0
  128. package/docs/api/interfaces/AgentVisibleSecretRecord.md +65 -0
  129. package/docs/api/interfaces/AuditEntry.md +83 -0
  130. package/docs/api/interfaces/CbioRuntime.md +13 -154
  131. package/docs/api/interfaces/CreateAgentClientOptions.md +4 -10
  132. package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
  133. package/docs/api/interfaces/{CreateVaultClientOptions.md → CreateOwnerClientOptions.md} +9 -11
  134. package/docs/api/interfaces/CreateOwnerSessionOptions.md +3 -121
  135. package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +3 -131
  136. package/docs/api/interfaces/CreateVaultOptions.md +1 -125
  137. package/docs/api/interfaces/CreatedVault.md +2 -2
  138. package/docs/api/interfaces/DefaultPolicyEngineOptions.md +1 -13
  139. package/docs/api/interfaces/DispatchAuthorization.md +43 -0
  140. package/docs/api/interfaces/DispatchInstruction.md +47 -0
  141. package/docs/api/interfaces/DispatchRequest.md +83 -0
  142. package/docs/api/interfaces/DispatchResult.md +53 -0
  143. package/docs/api/interfaces/IStorageProvider.md +13 -1
  144. package/docs/api/interfaces/InitializeVaultCustodyOptions.md +31 -11
  145. package/docs/api/interfaces/InitializedVaultCustody.md +1 -7
  146. package/docs/api/interfaces/OwnerAgentProvisionResult.md +2 -2
  147. package/docs/api/interfaces/OwnerClient.md +401 -0
  148. package/docs/api/interfaces/OwnerCreateSecretInput.md +1 -1
  149. package/docs/api/interfaces/OwnerRemoveSecretInput.md +1 -1
  150. package/docs/api/interfaces/OwnerRequestRecord.md +97 -0
  151. package/docs/api/interfaces/OwnerSensitiveActionConfirmation.md +1 -1
  152. package/docs/api/interfaces/OwnerSensitiveActionContext.md +1 -1
  153. package/docs/api/interfaces/OwnerSession.md +3 -3
  154. package/docs/api/interfaces/OwnerUpdateSecretInput.md +1 -1
  155. package/docs/api/interfaces/OwnerVisibleRequestRecord.md +73 -0
  156. package/docs/api/interfaces/RecoverVaultOptions.md +1 -125
  157. package/docs/api/interfaces/RecoveredVault.md +2 -2
  158. package/docs/api/interfaces/RequestRecord.md +107 -0
  159. package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
  160. package/docs/api/interfaces/SecretAlias.md +11 -0
  161. package/docs/api/interfaces/SecretDestinationGrant.md +41 -0
  162. package/docs/api/interfaces/SecretId.md +11 -0
  163. package/docs/api/interfaces/SecretRecord.md +89 -0
  164. package/docs/api/interfaces/Signer.md +1 -1
  165. package/docs/api/interfaces/VaultApproveDispatchInput.md +3 -9
  166. package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
  167. package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -5
  168. package/docs/api/interfaces/VaultCreateAgentInput.md +1 -1
  169. package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
  170. package/docs/api/interfaces/VaultGetRequestInput.md +17 -0
  171. package/docs/api/interfaces/VaultGrantAgentSecretInput.md +23 -0
  172. package/docs/api/interfaces/VaultGrantSecretDestinationInput.md +23 -0
  173. package/docs/api/interfaces/VaultId.md +11 -0
  174. package/docs/api/interfaces/VaultImportAgentInput.md +1 -1
  175. package/docs/api/interfaces/VaultIssueSessionTokenInput.md +5 -5
  176. package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
  177. package/docs/api/interfaces/VaultListGrantsInput.md +23 -0
  178. package/docs/api/interfaces/VaultListRequestsInput.md +17 -0
  179. package/docs/api/interfaces/VaultListSecretsInput.md +1 -1
  180. package/docs/api/interfaces/VaultMetadata.md +1 -1
  181. package/docs/api/interfaces/VaultObject.md +2 -2
  182. package/docs/api/interfaces/VaultPrincipal.md +17 -0
  183. package/docs/api/interfaces/VaultProfile.md +1 -1
  184. package/docs/api/interfaces/VaultReadAgentPrivateKeyInput.md +7 -7
  185. package/docs/api/interfaces/VaultReadSecretPlaintextInput.md +1 -1
  186. package/docs/api/interfaces/VaultRevokeAgentSecretInput.md +23 -0
  187. package/docs/api/interfaces/VaultRevokeSecretDestinationInput.md +23 -0
  188. package/docs/api/interfaces/VaultRevokeSessionTokenInput.md +1 -1
  189. package/docs/api/interfaces/VaultService.md +511 -0
  190. package/docs/api/interfaces/VaultUpdateAgentInput.md +7 -7
  191. package/docs/api/type-aliases/AgentId.md +7 -0
  192. package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
  193. package/docs/api/type-aliases/DispatchApprovalDecision.md +7 -0
  194. package/docs/api/type-aliases/GrantStatus.md +7 -0
  195. package/docs/api/type-aliases/SecretLifecycleStatus.md +7 -0
  196. package/docs/api/type-aliases/VaultPrincipalKind.md +7 -0
  197. package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +2 -2
  198. package/docs/es/README.md +3 -3
  199. package/docs/fr/README.md +3 -3
  200. package/docs/ja/README.md +5 -5
  201. package/docs/ko/README.md +5 -5
  202. package/docs/pt/README.md +3 -3
  203. package/docs/zh/PROCESS_ISOLATION.md +2 -2
  204. package/docs/zh/README.md +47 -63
  205. package/examples/process-isolation.ts +26 -35
  206. package/package.json +1 -1
  207. package/docs/api/functions/createOwnerHttpFlowBoundary.md +0 -17
  208. package/docs/api/functions/createStandardAcquireBoundary.md +0 -31
  209. package/docs/api/functions/createStandardDispatchBoundary.md +0 -23
  210. package/docs/api/functions/createVaultClient.md +0 -32
  211. package/docs/api/functions/deriveIdentityId.md +0 -17
  212. package/docs/api/functions/wrapVaultCoreAsVaultService.md +0 -31
  213. package/docs/api/interfaces/AgentSubmitCapabilityRequestInput.md +0 -41
  214. package/docs/api/interfaces/VaultApproveCapabilityRequestInput.md +0 -23
  215. package/docs/api/interfaces/VaultClient.md +0 -473
  216. package/docs/api/interfaces/VaultGrantCapabilityInput.md +0 -79
  217. package/docs/api/interfaces/VaultGrantCapabilityRequest.md +0 -23
  218. package/docs/api/interfaces/VaultIdentity.md +0 -11
  219. package/docs/api/interfaces/VaultListCapabilitiesInput.md +0 -17
  220. package/docs/api/interfaces/VaultRegisterFlowInput.md +0 -77
  221. package/docs/api/interfaces/VaultRevokeCapabilityInput.md +0 -23
  222. package/docs/api/interfaces/VaultSigner.md +0 -21
  223. package/docs/api/interfaces/VaultSubmitCapabilityRequestInput.md +0 -73
  224. package/docs/api/type-aliases/AgentCapabilityEnvelope.md +0 -7
  225. package/docs/api/type-aliases/AgentVisibleSecretRecord.md +0 -7
  226. package/docs/api/type-aliases/CreateOwnerClientOptions.md +0 -7
  227. package/docs/api/type-aliases/OwnerAgentView.md +0 -7
  228. package/docs/api/type-aliases/OwnerClient.md +0 -13
  229. package/docs/api/type-aliases/OwnerGrantCapabilityInput.md +0 -7
  230. package/docs/api/type-aliases/OwnerPendingApprovalView.md +0 -7
  231. package/docs/api/type-aliases/OwnerRequestDetailView.md +0 -7
  232. package/docs/api/type-aliases/OwnerRequestSummaryView.md +0 -7
  233. package/docs/api/type-aliases/OwnerSecretView.md +0 -7
@@ -1,91 +1,148 @@
1
- import type { AgentListCapabilitiesRequest, AgentListSecretsRequest, AgentListRequestsRequest, AgentGetRequestRequest, AgentRequestResult, AgentGetRuntimeManifestRequest, AgentRuntimeManifest, AgentSubmitCapabilityRequestCommand, AgentVisibleRequestRecord, OwnerVisibleRequestRecord, OwnerRequestRecord, AgentVisibleSecretRecord, AuditEntry, AuditQuery, CustomHttpFlowDefinition, DispatchAuthorization, DispatchRequest, DispatchResult, OwnerAllowAlwaysCommand, OwnerAllowOnceCommand, OwnerIssueSessionTokenRequest, OwnerDenyCommand, OwnerCreateSecretCommand, OwnerDeleteSecretCommand, OwnerExportSecretRequest, OwnerRegisterAgentIdentityCommand, OwnerUpdateAgentIdentityCommand, OwnerRegisterCapabilityCommand, OwnerRegisterCustomHttpFlowCommand, OwnerRevokeCapabilityCommand, OwnerListAgentsRequest, OwnerListCapabilitiesRequest, OwnerListRequestsRequest, OwnerGetRequestRequest, OwnerListCapabilityStatesRequest, OwnerSecretExport, OwnerSessionToken, SecretRecord, SubmitCapabilityRequestCommand, VaultId, VaultPrincipal, VaultWriteSecretCommand, AgentIdentityRecord, AgentCapability, CapabilityStateRecord } from "./contracts.js";
1
+ import { type AgentIdentityRecord, type AgentRuntimeManifest, type AgentVisibleRequestRecord, type AgentVisibleSecretRecord, type AuditEntry, type AuditQuery, type DispatchAuthorization, type DispatchRequest, type DispatchResult, type OwnerRequestRecord, type OwnerVisibleRequestRecord, type RequestRecord, 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
- /**
4
- * The Sovereign Vault Core.
5
- * This is the primary implementation of the Vault logic.
6
- */
7
3
  export declare class VaultCore {
8
4
  private readonly _deps;
9
- private readonly _capabilityStateObservers;
10
- constructor(_deps: VaultCoreDependencies);
11
- private _assertOwnerPrincipal;
12
- private _stateToGrantedCapability;
13
- private _buildAgentCapabilityStates;
14
- private _isExecutablePendingState;
15
- private _resolveRequestState;
16
- private _executePendingCapabilityState;
5
+ constructor(deps: VaultCoreDependencies);
17
6
  get vaultId(): VaultId;
7
+ private _assertOwnerPrincipal;
18
8
  private _appendAudit;
19
- private _appendDecisionAudit;
20
9
  private _verifyAgentControlProof;
21
- private _listVisibleSecretsForAgent;
22
- private _recordRequestExecution;
23
- private toVisibleRequestRecord;
24
- private toOwnerVisibleRequestRecord;
25
- private toOwnerRequestRecord;
26
- ownerOnCapabilityState(callback: (record: CapabilityStateRecord) => void): () => void;
27
- ownerRegisterAgentIdentity(command: OwnerRegisterAgentIdentityCommand): Promise<void>;
28
- ownerUpdateAgentIdentity(command: OwnerUpdateAgentIdentityCommand): Promise<AgentIdentityRecord>;
29
- ownerRegisterCapability(command: OwnerRegisterCapabilityCommand): Promise<void>;
30
- ownerSubmitCapabilityRequest(command: SubmitCapabilityRequestCommand): Promise<CapabilityStateRecord>;
31
- _getCapability(vaultId: import("./contracts.js").VaultId, agentId: string, capabilityId: string): Promise<AgentCapability | null>;
32
- ownerRegisterCustomFlow(command: OwnerRegisterCustomHttpFlowCommand): Promise<void>;
33
- _storeCustomFlowSecret(flow: CustomHttpFlowDefinition, alias: string, plaintext: string): Promise<SecretRecord>;
34
- private _getActiveSecretByAlias;
35
- private _persistNewSecretRecord;
36
- ownerCreateSecret(command: OwnerCreateSecretCommand): Promise<SecretRecord>;
37
- ownerUpdateSecret(command: import("./contracts.js").OwnerUpdateSecretCommand): Promise<SecretRecord>;
38
- ownerWriteSecret(command: VaultWriteSecretCommand): Promise<SecretRecord>;
39
- ownerRemoveSecret(command: OwnerDeleteSecretCommand): Promise<void>;
40
- ownerDeleteSecret(command: OwnerDeleteSecretCommand): Promise<void>;
10
+ ownerGrantAgentSecret(actor: VaultPrincipal & {
11
+ kind: "owner";
12
+ }, rootAgentId: string, secretAlias: string, request?: {
13
+ requestId?: string;
14
+ }): Promise<AgentSecretGrant>;
15
+ ownerGrantSecretDestination(actor: VaultPrincipal & {
16
+ kind: "owner";
17
+ }, secretAlias: string, siteId: string, request?: {
18
+ requestId?: string;
19
+ }): Promise<SecretDestinationGrant>;
20
+ ownerRevokeAgentSecret(actor: VaultPrincipal & {
21
+ kind: "owner";
22
+ }, rootAgentId: string, secretAlias: string, request?: {
23
+ requestId?: string;
24
+ }): Promise<void>;
25
+ ownerRevokeSecretDestination(actor: VaultPrincipal & {
26
+ kind: "owner";
27
+ }, secretAlias: string, siteId: string, request?: {
28
+ requestId?: string;
29
+ }): Promise<void>;
30
+ ownerListGrants(actor: VaultPrincipal & {
31
+ kind: "owner";
32
+ }, rootAgentId?: string, secretAlias?: string): Promise<{
33
+ agentSecrets: readonly AgentSecretGrant[];
34
+ secretDestinations: readonly SecretDestinationGrant[];
35
+ }>;
41
36
  agentAuthorizeDispatch(request: DispatchRequest): Promise<DispatchAuthorization>;
42
37
  agentDispatchSecret(request: DispatchRequest): Promise<DispatchResult>;
38
+ ownerApproveDispatch(actor: VaultPrincipal & {
39
+ kind: "owner";
40
+ }, requestId: string, decision: DispatchApprovalDecision): Promise<DispatchResult | null>;
41
+ agentGetRuntimeManifest(command: {
42
+ agent: VaultPrincipal & {
43
+ kind: "agent";
44
+ };
45
+ proof: any;
46
+ requestId: string;
47
+ requestedAt: string;
48
+ }): Promise<AgentRuntimeManifest>;
49
+ agentListSecrets(command: {
50
+ agent: VaultPrincipal & {
51
+ kind: "agent";
52
+ };
53
+ proof: any;
54
+ requestId: string;
55
+ requestedAt: string;
56
+ }): Promise<readonly AgentVisibleSecretRecord[]>;
57
+ agentListRequests(command: {
58
+ agent: VaultPrincipal & {
59
+ kind: "agent";
60
+ };
61
+ proof: any;
62
+ requestId: string;
63
+ requestedAt: string;
64
+ }): Promise<readonly AgentVisibleRequestRecord[]>;
65
+ agentGetRequest(command: {
66
+ agent: VaultPrincipal & {
67
+ kind: "agent";
68
+ };
69
+ proof: any;
70
+ requestId: string;
71
+ requestedAt: string;
72
+ targetRequestId: string;
73
+ }): Promise<any>;
74
+ ownerRegisterAgentIdentity(command: {
75
+ vaultId: VaultId;
76
+ requestId: string;
77
+ owner: VaultPrincipal;
78
+ agentRecord: AgentIdentityRecord;
79
+ requestedAt: string;
80
+ }): Promise<void>;
81
+ ownerUpdateAgentIdentity(command: {
82
+ vaultId: VaultId;
83
+ requestId: string;
84
+ owner: VaultPrincipal;
85
+ rootAgentId: string;
86
+ nickname?: string;
87
+ metadata?: Record<string, any>;
88
+ requestedAt: string;
89
+ }): Promise<AgentIdentityRecord>;
90
+ ownerCreateSecret(command: OwnerCreateSecretCommand): Promise<SecretRecord>;
91
+ ownerUpdateSecret(command: OwnerUpdateSecretCommand): Promise<SecretRecord>;
92
+ ownerRemoveSecret(command: {
93
+ kind: "owner.remove_secret";
94
+ vaultId: VaultId;
95
+ requestId: string;
96
+ owner: VaultPrincipal;
97
+ alias: string;
98
+ requestedAt: string;
99
+ }): Promise<void>;
100
+ ownerWriteSecret(command: any): Promise<SecretRecord>;
43
101
  ownerReadAudit(actor: VaultPrincipal & {
44
102
  kind: "owner";
45
- }, query: AuditQuery, request?: Omit<import("./contracts.js").OwnerAuditRequest, "actor" | "query" | "vaultId">): Promise<readonly AuditEntry[]>;
103
+ }, query: AuditQuery): Promise<readonly AuditEntry[]>;
46
104
  ownerExportSecret(actor: VaultPrincipal & {
47
105
  kind: "owner";
48
- }, alias: string, request?: Omit<OwnerExportSecretRequest, "actor" | "alias" | "vaultId">): Promise<OwnerSecretExport>;
49
- private isCapabilityMatch;
106
+ }, alias: string): Promise<OwnerSecretExport>;
50
107
  ownerListAgents(actor: VaultPrincipal & {
51
108
  kind: "owner";
52
- }, request?: Omit<OwnerListAgentsRequest, "actor" | "vaultId">): Promise<readonly AgentIdentityRecord[]>;
53
- ownerListCapabilities(actor: VaultPrincipal & {
54
- kind: "owner";
55
- }, agentId?: string, request?: Omit<OwnerListCapabilitiesRequest, "actor" | "agentId" | "vaultId">): Promise<readonly AgentCapability[]>;
109
+ }): Promise<readonly AgentIdentityRecord[]>;
56
110
  ownerListRequests(actor: VaultPrincipal & {
57
111
  kind: "owner";
58
- }, agentId?: string, request?: Omit<OwnerListRequestsRequest, "actor" | "agentId" | "vaultId">): Promise<readonly OwnerVisibleRequestRecord[]>;
112
+ }, rootAgentId?: string): Promise<readonly OwnerVisibleRequestRecord[]>;
59
113
  ownerGetRequest(actor: VaultPrincipal & {
60
114
  kind: "owner";
61
- }, targetRequestId: string, request?: Omit<OwnerGetRequestRequest, "actor" | "targetRequestId" | "vaultId">): Promise<OwnerRequestRecord>;
115
+ }, requestId: string): Promise<OwnerRequestRecord>;
62
116
  ownerListSecrets(actor: VaultPrincipal & {
63
117
  kind: "owner";
64
- }, request?: {
65
- requestId?: string;
66
118
  }): Promise<readonly AgentVisibleSecretRecord[]>;
67
- agentListCapabilities(request: AgentListCapabilitiesRequest): Promise<readonly import("./contracts.js").AgentCapabilityState[]>;
68
- agentListSecrets(request: AgentListSecretsRequest): Promise<readonly AgentVisibleSecretRecord[]>;
69
- agentListRequests(request: AgentListRequestsRequest): Promise<readonly AgentVisibleRequestRecord[]>;
70
- agentGetRequest(request: AgentGetRequestRequest): Promise<AgentRequestResult>;
71
- agentGetRuntimeManifest(command: AgentGetRuntimeManifestRequest): Promise<AgentRuntimeManifest>;
72
- agentSubmitCapabilityRequest(command: AgentSubmitCapabilityRequestCommand): Promise<CapabilityStateRecord>;
73
- ownerRevokeCapability(command: OwnerRevokeCapabilityCommand): Promise<void>;
74
- ownerIssueSessionToken(request: OwnerIssueSessionTokenRequest): Promise<OwnerSessionToken>;
119
+ ownerIssueSessionToken(request: {
120
+ vaultId: VaultId;
121
+ actor: VaultPrincipal;
122
+ rootAgentId: string;
123
+ }): Promise<{
124
+ token: string;
125
+ rootAgentId: string;
126
+ issuedAt: string;
127
+ }>;
75
128
  ownerIssueAllAgentSessionTokens(actor: VaultPrincipal & {
76
129
  kind: "owner";
77
- }): Promise<OwnerSessionToken[]>;
130
+ }): Promise<{
131
+ token: string;
132
+ rootAgentId: string;
133
+ issuedAt: string;
134
+ }[]>;
78
135
  ownerRevokeSessionToken(request: {
79
136
  vaultId: VaultId;
80
- actor: VaultPrincipal & {
81
- kind: "owner";
82
- };
137
+ actor: VaultPrincipal;
83
138
  token: string;
84
139
  }): Promise<void>;
85
- ownerListCapabilityStates(command: OwnerListCapabilityStatesRequest): Promise<readonly CapabilityStateRecord[]>;
86
- ownerApproveCapabilityRead(command: import("./contracts.js").OwnerApproveCapabilityReadCommand): Promise<CapabilityStateRecord>;
87
- ownerAllowOnce(command: OwnerAllowOnceCommand): Promise<DispatchResult>;
88
- ownerAllowAlways(command: OwnerAllowAlwaysCommand): Promise<DispatchResult>;
89
- ownerDeny(command: OwnerDenyCommand): Promise<CapabilityStateRecord>;
140
+ private readonly _requestObservers;
141
+ ownerOnPendingDispatch(callback: (record: RequestRecord) => void): () => void;
142
+ ownerOnGrantState(callback: (record: any) => void): () => void;
143
+ private _recordRequestInternal;
144
+ private toAgentVisibleRequestRecord;
145
+ private toOwnerVisibleRequestRecord;
146
+ private toOwnerRequestRecord;
90
147
  }
91
148
  export declare function createVaultCore(deps: VaultCoreDependencies): VaultCore;