@the-ai-company/cbio-node-runtime 1.63.2 → 1.63.5
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 +48 -209
- package/dist/clients/agent/client.d.ts +18 -40
- package/dist/clients/agent/client.js +22 -109
- package/dist/clients/agent/client.js.map +1 -1
- package/dist/clients/agent/contracts.d.ts +1 -8
- package/dist/clients/agent/index.d.ts +1 -1
- package/dist/clients/owner/client.d.ts +2 -102
- package/dist/clients/owner/client.js +119 -240
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/contracts.d.ts +37 -70
- package/dist/clients/owner/index.d.ts +2 -4
- package/dist/clients/owner/index.js +1 -2
- package/dist/clients/owner/index.js.map +1 -1
- package/dist/internal/id-factory.d.ts +0 -2
- package/dist/internal/id-factory.js +0 -6
- package/dist/internal/id-factory.js.map +1 -1
- package/dist/protocol/identity.d.ts +1 -1
- package/dist/protocol/identity.js +3 -3
- package/dist/protocol/identity.js.map +1 -1
- package/dist/public-types.d.ts +5 -0
- package/dist/public-types.js +2 -0
- package/dist/public-types.js.map +1 -0
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/identity.d.ts +2 -2
- package/dist/runtime/identity.js +3 -5
- package/dist/runtime/identity.js.map +1 -1
- package/dist/runtime/index.d.ts +10 -11
- package/dist/runtime/index.js +7 -8
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/owner-session.d.ts +7 -6
- package/dist/runtime/owner-session.js +5 -6
- package/dist/runtime/owner-session.js.map +1 -1
- package/dist/storage/fs.d.ts +3 -2
- package/dist/storage/fs.js +8 -5
- package/dist/storage/fs.js.map +1 -1
- package/dist/storage/prefix.d.ts +1 -0
- package/dist/storage/prefix.js +7 -0
- package/dist/storage/prefix.js.map +1 -1
- package/dist/storage/provider.d.ts +2 -0
- package/dist/vault-core/contracts.d.ts +112 -193
- package/dist/vault-core/contracts.js +5 -8
- package/dist/vault-core/contracts.js.map +1 -1
- package/dist/vault-core/core.d.ts +127 -62
- package/dist/vault-core/core.js +500 -1182
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-core/defaults.d.ts +26 -42
- package/dist/vault-core/defaults.js +73 -229
- package/dist/vault-core/defaults.js.map +1 -1
- package/dist/vault-core/errors.d.ts +3 -2
- package/dist/vault-core/errors.js.map +1 -1
- package/dist/vault-core/index.d.ts +5 -5
- package/dist/vault-core/index.js +2 -2
- package/dist/vault-core/index.js.map +1 -1
- package/dist/vault-core/persistence.d.ts +78 -118
- package/dist/vault-core/persistence.js +329 -421
- package/dist/vault-core/persistence.js.map +1 -1
- package/dist/vault-core/ports.d.ts +19 -24
- package/dist/vault-core/read-policy.d.ts +3 -2
- package/dist/vault-core/read-policy.js.map +1 -1
- package/dist/vault-core/tool-metadata.js +2 -2
- package/dist/vault-core/tool-metadata.js.map +1 -1
- package/dist/vault-ingress/defaults.d.ts +4 -2
- package/dist/vault-ingress/defaults.js +14 -8
- package/dist/vault-ingress/defaults.js.map +1 -1
- package/dist/vault-ingress/index.d.ts +43 -117
- package/dist/vault-ingress/index.js +98 -453
- package/dist/vault-ingress/index.js.map +1 -1
- package/dist/vault-ingress/remote-transport.d.ts +5 -3
- package/dist/vault-ingress/remote-transport.js +8 -28
- package/dist/vault-ingress/remote-transport.js.map +1 -1
- package/docs/ARCHITECTURE.md +39 -22
- package/docs/CUSTODY_MODEL.md +1 -1
- package/docs/IDENTITY_MODEL.md +5 -5
- package/docs/MIGRATION-1.51.md +19 -19
- package/docs/MIGRATION-1.65.md +61 -0
- package/docs/PROCESS_ISOLATION.md +2 -2
- package/docs/REFERENCE.md +42 -200
- package/docs/api/README.md +50 -22
- package/docs/api/classes/IdentityError.md +1 -1
- package/docs/api/classes/OwnerClientError.md +1 -1
- package/docs/api/classes/PersistentVaultAgentIdentityRegistry.md +89 -0
- package/docs/api/classes/PersistentVaultAgentSecretGrantRegistry.md +125 -0
- package/docs/api/classes/PersistentVaultAuditLog.md +65 -0
- package/docs/api/classes/PersistentVaultCustomHttpFlowRegistry.md +69 -0
- package/docs/api/classes/PersistentVaultSecretCustody.md +93 -0
- package/docs/api/classes/PersistentVaultSecretDestinationGrantRegistry.md +125 -0
- package/docs/api/classes/PersistentVaultSecretRepository.md +127 -0
- package/docs/api/classes/VaultCore.md +299 -214
- package/docs/api/classes/VaultCoreError.md +3 -3
- package/docs/api/enumerations/AuditAction.md +143 -0
- package/docs/api/enumerations/AuditOutcome.md +35 -0
- package/docs/api/enumerations/DispatchStatus.md +35 -0
- package/docs/api/enumerations/IdentityErrorCode.md +1 -1
- package/docs/api/enumerations/OwnerClientErrorCode.md +1 -1
- package/docs/api/functions/createAgentClient.md +1 -15
- package/docs/api/functions/createIdentity.md +2 -2
- package/docs/api/functions/createOwnerClient.md +17 -0
- package/docs/api/functions/createOwnerSession.md +1 -1
- package/docs/api/functions/createPersistentVaultCoreDependencies.md +4 -4
- 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 +5 -9
- package/docs/api/functions/createWorkspaceStorage.md +1 -1
- package/docs/api/functions/deriveRootAgentId.md +17 -0
- package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +1 -1
- package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
- package/docs/api/functions/handleVaultAgentControlHttp.md +2 -2
- package/docs/api/functions/handleVaultHttpDispatch.md +2 -2
- package/docs/api/functions/initializeVaultCustody.md +7 -3
- 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 +4 -8
- 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 +20 -59
- package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
- package/docs/api/interfaces/AgentDispatchTransport.md +12 -44
- package/docs/api/interfaces/AgentIdentity.md +3 -3
- package/docs/api/interfaces/AgentIdentityRecord.md +47 -0
- package/docs/api/interfaces/AgentRequestResult.md +35 -0
- package/docs/api/interfaces/AgentRuntimeManifest.md +55 -0
- package/docs/api/interfaces/AgentSecretGrant.md +41 -0
- package/docs/api/interfaces/AgentSigner.md +1 -1
- package/docs/api/interfaces/AgentVisibleRequestRecord.md +53 -0
- package/docs/api/interfaces/AgentVisibleSecretRecord.md +65 -0
- package/docs/api/interfaces/AuditEntry.md +83 -0
- package/docs/api/interfaces/CbioRuntime.md +13 -150
- package/docs/api/interfaces/CreateAgentClientOptions.md +4 -10
- package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
- package/docs/api/interfaces/{CreateVaultClientOptions.md → CreateOwnerClientOptions.md} +9 -11
- package/docs/api/interfaces/CreateOwnerSessionOptions.md +3 -117
- package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +3 -131
- package/docs/api/interfaces/CreateVaultOptions.md +1 -121
- package/docs/api/interfaces/CreatedVault.md +2 -2
- package/docs/api/interfaces/CustomHttpFlowDefinition.md +71 -0
- package/docs/api/interfaces/DefaultPolicyEngineOptions.md +1 -13
- package/docs/api/interfaces/DispatchAuthorization.md +43 -0
- package/docs/api/interfaces/DispatchInstruction.md +47 -0
- package/docs/api/interfaces/DispatchRequest.md +83 -0
- package/docs/api/interfaces/DispatchResult.md +53 -0
- package/docs/api/interfaces/IStorageProvider.md +13 -1
- package/docs/api/interfaces/InitializeVaultCustodyOptions.md +31 -11
- package/docs/api/interfaces/InitializedVaultCustody.md +1 -7
- package/docs/api/interfaces/OwnerAgentProvisionResult.md +2 -2
- package/docs/api/interfaces/OwnerClient.md +417 -0
- package/docs/api/interfaces/OwnerCreateSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerRemoveSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerRequestRecord.md +97 -0
- package/docs/api/interfaces/OwnerSensitiveActionConfirmation.md +1 -1
- package/docs/api/interfaces/OwnerSensitiveActionContext.md +1 -1
- package/docs/api/interfaces/OwnerSession.md +3 -3
- package/docs/api/interfaces/OwnerUpdateSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerVisibleRequestRecord.md +73 -0
- package/docs/api/interfaces/RecoverVaultOptions.md +1 -121
- package/docs/api/interfaces/RecoveredVault.md +2 -2
- package/docs/api/interfaces/RequestRecord.md +107 -0
- package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
- package/docs/api/interfaces/SecretAlias.md +11 -0
- package/docs/api/interfaces/SecretDestinationGrant.md +41 -0
- package/docs/api/interfaces/SecretId.md +11 -0
- package/docs/api/interfaces/SecretRecord.md +89 -0
- package/docs/api/interfaces/Signer.md +1 -1
- package/docs/api/interfaces/VaultApproveDispatchInput.md +3 -9
- package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
- package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -5
- package/docs/api/interfaces/VaultCreateAgentInput.md +1 -1
- package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
- package/docs/api/interfaces/VaultGetRequestInput.md +17 -0
- package/docs/api/interfaces/VaultGrantAgentSecretInput.md +23 -0
- package/docs/api/interfaces/VaultGrantSecretDestinationInput.md +23 -0
- package/docs/api/interfaces/VaultId.md +11 -0
- package/docs/api/interfaces/VaultImportAgentInput.md +1 -1
- package/docs/api/interfaces/VaultIssueSessionTokenInput.md +5 -5
- package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
- package/docs/api/interfaces/VaultListGrantsInput.md +23 -0
- package/docs/api/interfaces/VaultListRequestsInput.md +17 -0
- package/docs/api/interfaces/VaultListSecretsInput.md +1 -1
- package/docs/api/interfaces/VaultMetadata.md +1 -1
- package/docs/api/interfaces/VaultObject.md +2 -2
- package/docs/api/interfaces/VaultPrincipal.md +17 -0
- package/docs/api/interfaces/VaultProfile.md +1 -1
- package/docs/api/interfaces/VaultReadAgentPrivateKeyInput.md +7 -7
- package/docs/api/interfaces/VaultReadSecretPlaintextInput.md +1 -1
- package/docs/api/interfaces/VaultRegisterFlowInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeAgentSecretInput.md +23 -0
- package/docs/api/interfaces/VaultRevokeSecretDestinationInput.md +23 -0
- package/docs/api/interfaces/VaultRevokeSessionTokenInput.md +1 -1
- package/docs/api/interfaces/VaultService.md +547 -0
- package/docs/api/interfaces/VaultUpdateAgentInput.md +7 -7
- package/docs/api/type-aliases/AgentId.md +7 -0
- package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
- package/docs/api/type-aliases/DispatchApprovalDecision.md +7 -0
- package/docs/api/type-aliases/GrantStatus.md +7 -0
- package/docs/api/type-aliases/SecretLifecycleStatus.md +7 -0
- package/docs/api/type-aliases/VaultPrincipalKind.md +7 -0
- package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +2 -2
- package/docs/es/README.md +3 -3
- package/docs/fr/README.md +3 -3
- package/docs/ja/README.md +5 -5
- package/docs/ko/README.md +5 -5
- package/docs/pt/README.md +3 -3
- package/docs/zh/PROCESS_ISOLATION.md +2 -2
- package/docs/zh/README.md +24 -24
- package/examples/process-isolation.ts +26 -35
- package/package.json +3 -2
- package/docs/api/functions/createOwnerHttpFlowBoundary.md +0 -17
- package/docs/api/functions/createStandardAcquireBoundary.md +0 -31
- package/docs/api/functions/createStandardDispatchBoundary.md +0 -23
- package/docs/api/functions/createVaultClient.md +0 -32
- package/docs/api/functions/deriveIdentityId.md +0 -17
- package/docs/api/functions/wrapVaultCoreAsVaultService.md +0 -31
- package/docs/api/interfaces/AgentSubmitCapabilityRequestInput.md +0 -41
- package/docs/api/interfaces/VaultApproveCapabilityRequestInput.md +0 -23
- package/docs/api/interfaces/VaultClient.md +0 -473
- package/docs/api/interfaces/VaultGrantCapabilityInput.md +0 -79
- package/docs/api/interfaces/VaultGrantCapabilityRequest.md +0 -23
- package/docs/api/interfaces/VaultIdentity.md +0 -11
- package/docs/api/interfaces/VaultListCapabilitiesInput.md +0 -17
- package/docs/api/interfaces/VaultRevokeCapabilityInput.md +0 -23
- package/docs/api/interfaces/VaultSigner.md +0 -21
- package/docs/api/interfaces/VaultSubmitCapabilityRequestInput.md +0 -73
- package/docs/api/type-aliases/AgentCapabilityEnvelope.md +0 -7
- package/docs/api/type-aliases/AgentVisibleSecretRecord.md +0 -7
- package/docs/api/type-aliases/OwnerGrantCapabilityInput.md +0 -7
|
@@ -1,140 +1,100 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type { AgentIdentityRegistry, AuditLog, CapabilityStateRegistry, CapabilityRevocationRegistry, CustomHttpFlowRegistry, RequestRecordRegistry, RateLimitStore, ReplayGuard, SecretCustody, SecretRepository, VaultCoreDependencies } from "./ports.js";
|
|
4
|
-
import { type VaultCoreDependenciesOptions } from "./defaults.js";
|
|
5
|
-
export declare const DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY = "working-key.sealed";
|
|
6
|
-
export interface InitializeVaultCustodyOptions {
|
|
7
|
-
vaultWorkingKey?: string;
|
|
8
|
-
vaultRecoveryKey?: string;
|
|
9
|
-
storageKey?: string;
|
|
10
|
-
overwrite?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface InitializedVaultCustody {
|
|
13
|
-
vaultWorkingKey: string;
|
|
14
|
-
vaultRecoveryKey: string;
|
|
15
|
-
storageKey: string;
|
|
16
|
-
}
|
|
17
|
-
export interface CreatePersistentVaultCoreDependenciesOptions extends VaultCoreDependenciesOptions {
|
|
18
|
-
vaultWorkingKey: string;
|
|
19
|
-
}
|
|
20
|
-
export declare function initializeVaultCustody(storage: IStorageProvider, options?: InitializeVaultCustodyOptions): Promise<InitializedVaultCustody>;
|
|
21
|
-
export declare function recoverVaultWorkingKey(storage: IStorageProvider, vaultRecoveryKey: string, storageKey?: string): Promise<string>;
|
|
22
|
-
/**
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
1
|
+
import { type AgentSecretGrant, type SecretDestinationGrant, type AgentIdentityRecord, type AuditEntry, type AuditQuery, type CustomHttpFlowDefinition, type RequestRecord, type SecretId, type SecretRecord, type VaultId } from "./contracts.js";
|
|
2
|
+
import type { AgentIdentityRegistry, AgentSecretGrantRegistry, SecretDestinationGrantRegistry, AuditLog, CustomHttpFlowRegistry, RequestRecordRegistry, SecretCustody, SecretRepository } from "./ports.js";
|
|
25
3
|
export declare class FileSecretRepository implements SecretRepository {
|
|
26
|
-
private readonly
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
private isActive;
|
|
4
|
+
private readonly _baseDir;
|
|
5
|
+
constructor(baseDir: string);
|
|
6
|
+
private _getPath;
|
|
7
|
+
private _getAliasPath;
|
|
31
8
|
save(record: SecretRecord): Promise<void>;
|
|
32
9
|
delete(secretId: SecretId): Promise<void>;
|
|
33
|
-
getByAlias(alias:
|
|
10
|
+
getByAlias(alias: {
|
|
11
|
+
value: string;
|
|
12
|
+
}): Promise<SecretRecord | null>;
|
|
34
13
|
getById(secretId: SecretId): Promise<SecretRecord | null>;
|
|
35
14
|
list(vaultId: VaultId): Promise<readonly SecretRecord[]>;
|
|
36
15
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
register(identity: AgentIdentityRecord): Promise<void>;
|
|
46
|
-
get(vaultId: VaultId, agentId: string): Promise<AgentIdentityRecord | null>;
|
|
47
|
-
list(vaultId: VaultId): Promise<readonly AgentIdentityRecord[]>;
|
|
16
|
+
export declare class FileSecretCustody implements SecretCustody {
|
|
17
|
+
private readonly _baseDir;
|
|
18
|
+
private readonly _workingKey;
|
|
19
|
+
constructor(baseDir: string, workingKey: string);
|
|
20
|
+
private _getPath;
|
|
21
|
+
store(secretId: SecretId, plaintext: string): Promise<void>;
|
|
22
|
+
load(secretId: SecretId): Promise<string | null>;
|
|
23
|
+
delete(secretId: SecretId): Promise<void>;
|
|
48
24
|
}
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
25
|
export declare class FileAuditLog implements AuditLog {
|
|
53
|
-
private readonly
|
|
54
|
-
|
|
55
|
-
private
|
|
56
|
-
constructor(_storage: IStorageProvider, _key?: string, _lockKey?: string);
|
|
57
|
-
private hash;
|
|
58
|
-
private verifyEnvelopeChain;
|
|
59
|
-
private loadEntries;
|
|
26
|
+
private readonly _baseDir;
|
|
27
|
+
constructor(baseDir: string);
|
|
28
|
+
private _getPath;
|
|
60
29
|
append(entry: AuditEntry): Promise<void>;
|
|
61
30
|
query(query: AuditQuery): Promise<readonly AuditEntry[]>;
|
|
62
31
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
constructor(_storage: IStorageProvider, _vaultWorkingKey: string, _keyPrefix?: string);
|
|
71
|
-
private key;
|
|
72
|
-
store(secretId: SecretId, plaintext: string): Promise<void>;
|
|
73
|
-
load(secretId: SecretId): Promise<string | null>;
|
|
74
|
-
delete(secretId: SecretId): Promise<void>;
|
|
32
|
+
export declare class FileAgentIdentityRegistry implements AgentIdentityRegistry {
|
|
33
|
+
private readonly _baseDir;
|
|
34
|
+
constructor(baseDir: string);
|
|
35
|
+
private _getPath;
|
|
36
|
+
register(identity: AgentIdentityRecord): Promise<void>;
|
|
37
|
+
get(vaultId: VaultId, rootAgentId: string): Promise<AgentIdentityRecord | null>;
|
|
38
|
+
list(vaultId: VaultId): Promise<readonly AgentIdentityRecord[]>;
|
|
75
39
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
assertNotReplayed(request: DispatchRequest): Promise<void>;
|
|
40
|
+
export declare class FileAgentSecretGrantRegistry implements AgentSecretGrantRegistry {
|
|
41
|
+
private readonly _baseDir;
|
|
42
|
+
constructor(baseDir: string);
|
|
43
|
+
private _getPath;
|
|
44
|
+
upsert(grant: AgentSecretGrant): Promise<void>;
|
|
45
|
+
get(vaultId: VaultId, rootAgentId: string, secretAlias: string): Promise<AgentSecretGrant | null>;
|
|
46
|
+
list(vaultId: VaultId, rootAgentId?: string): Promise<readonly AgentSecretGrant[]>;
|
|
47
|
+
delete(vaultId: VaultId, rootAgentId: string, secretAlias: string): Promise<void>;
|
|
85
48
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
upsert(capability: CapabilityStateRecord): Promise<void>;
|
|
95
|
-
getByCapabilityId(vaultId: VaultId, agentId: string, capabilityId: string): Promise<CapabilityStateRecord | null>;
|
|
96
|
-
getByRequestId(vaultId: VaultId, requestId: string): Promise<CapabilityStateRecord | null>;
|
|
97
|
-
deleteByRequestId(vaultId: VaultId, requestId: string): Promise<void>;
|
|
98
|
-
list(vaultId: VaultId, agentId?: string): Promise<readonly CapabilityStateRecord[]>;
|
|
49
|
+
export declare class FileSecretDestinationGrantRegistry implements SecretDestinationGrantRegistry {
|
|
50
|
+
private readonly _baseDir;
|
|
51
|
+
constructor(baseDir: string);
|
|
52
|
+
private _getPath;
|
|
53
|
+
upsert(grant: SecretDestinationGrant): Promise<void>;
|
|
54
|
+
get(vaultId: VaultId, secretAlias: string, domain: string): Promise<SecretDestinationGrant | null>;
|
|
55
|
+
list(vaultId: VaultId, secretAlias?: string): Promise<readonly SecretDestinationGrant[]>;
|
|
56
|
+
delete(vaultId: VaultId, secretAlias: string, domain: string): Promise<void>;
|
|
99
57
|
}
|
|
100
58
|
export declare class FileRequestRecordRegistry implements RequestRecordRegistry {
|
|
101
|
-
private readonly
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
private loadState;
|
|
59
|
+
private readonly _baseDir;
|
|
60
|
+
constructor(baseDir: string);
|
|
61
|
+
private _getPath;
|
|
105
62
|
save(record: RequestRecord): Promise<void>;
|
|
106
63
|
get(vaultId: VaultId, requestId: string): Promise<RequestRecord | null>;
|
|
107
|
-
list(vaultId: VaultId,
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
export declare class FileRateLimitStore implements RateLimitStore {
|
|
113
|
-
private readonly _lockKey;
|
|
114
|
-
private readonly _repo;
|
|
115
|
-
constructor(storage: IStorageProvider, vaultWorkingKey: string, key?: string, _lockKey?: string);
|
|
116
|
-
consume(key: string, maxRequests: number, windowMs: number, nowMs: number): Promise<void>;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @internal
|
|
120
|
-
*/
|
|
121
|
-
export declare class FileCapabilityRevocationRegistry implements CapabilityRevocationRegistry {
|
|
122
|
-
private readonly _lockKey;
|
|
123
|
-
private readonly _repo;
|
|
124
|
-
constructor(storage: IStorageProvider, vaultWorkingKey: string, key?: string, _lockKey?: string);
|
|
125
|
-
private compositeKey;
|
|
126
|
-
get(vaultId: VaultId, agentId: string, capabilityId: string): Promise<number>;
|
|
127
|
-
revoke(vaultId: VaultId, agentId: string, capabilityId: string): Promise<number>;
|
|
64
|
+
list(vaultId: VaultId, rootAgentId?: string): Promise<readonly RequestRecord[]>;
|
|
128
65
|
}
|
|
129
|
-
/**
|
|
130
|
-
* @internal
|
|
131
|
-
*/
|
|
132
66
|
export declare class FileCustomHttpFlowRegistry implements CustomHttpFlowRegistry {
|
|
133
|
-
private readonly
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
private loadState;
|
|
67
|
+
private readonly _baseDir;
|
|
68
|
+
constructor(baseDir: string);
|
|
69
|
+
private _getPath;
|
|
137
70
|
register(flow: CustomHttpFlowDefinition): Promise<void>;
|
|
138
71
|
get(vaultId: VaultId, flowId: string): Promise<CustomHttpFlowDefinition | null>;
|
|
139
72
|
}
|
|
140
|
-
export declare
|
|
73
|
+
export declare const DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY = "master_key.sealed";
|
|
74
|
+
export interface InitializeVaultCustodyOptions {
|
|
75
|
+
storage: {
|
|
76
|
+
read(key: string): Promise<Uint8Array | null>;
|
|
77
|
+
write(key: string, data: Uint8Array): Promise<void>;
|
|
78
|
+
};
|
|
79
|
+
password?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface InitializedVaultCustody {
|
|
82
|
+
vaultWorkingKey: string;
|
|
83
|
+
vaultRecoveryKey: string;
|
|
84
|
+
}
|
|
85
|
+
export declare function initializeVaultCustody(storage: {
|
|
86
|
+
read(key: string): Promise<Uint8Array | null>;
|
|
87
|
+
write(key: string, data: Uint8Array): Promise<void>;
|
|
88
|
+
}, options?: {
|
|
89
|
+
password?: string;
|
|
90
|
+
}): Promise<InitializedVaultCustody>;
|
|
91
|
+
export declare function recoverVaultWorkingKey(storage: {
|
|
92
|
+
read(key: string): Promise<Uint8Array | null>;
|
|
93
|
+
}, recoveryKey: string): Promise<string>;
|
|
94
|
+
export interface CreatePersistentVaultCoreDependenciesOptions {
|
|
95
|
+
vaultId: string;
|
|
96
|
+
vaultWorkingKey: string;
|
|
97
|
+
}
|
|
98
|
+
export declare function createPersistentVaultCoreDependencies(storage: {
|
|
99
|
+
getBaseDir(): string;
|
|
100
|
+
}, options: CreatePersistentVaultCoreDependenciesOptions): any;
|