@the-ai-company/cbio-node-runtime 1.63.8 → 1.65.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 +9 -3
- package/dist/clients/agent/client.d.ts +1 -1
- package/dist/clients/owner/client.js +52 -31
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/contracts.d.ts +2 -0
- package/dist/vault-core/contracts.d.ts +2 -2
- package/dist/vault-core/contracts.js +2 -2
- package/dist/vault-core/contracts.js.map +1 -1
- package/dist/vault-core/core.d.ts +2 -1
- package/dist/vault-core/core.js +38 -36
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-core/errors.d.ts +1 -1
- package/dist/vault-core/errors.js.map +1 -1
- package/dist/vault-ingress/index.d.ts +0 -1
- package/dist/vault-ingress/index.js +0 -3
- package/dist/vault-ingress/index.js.map +1 -1
- package/docs/REFERENCE.md +28 -3
- 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/PersistentVaultAgentIdentityRegistry.md +1 -1
- package/docs/api/classes/PersistentVaultAgentSecretGrantRegistry.md +1 -1
- package/docs/api/classes/PersistentVaultAuditLog.md +1 -1
- package/docs/api/classes/PersistentVaultSecretCustody.md +1 -1
- package/docs/api/classes/PersistentVaultSecretDestinationGrantRegistry.md +1 -1
- package/docs/api/classes/PersistentVaultSecretRepository.md +1 -1
- package/docs/api/classes/VaultCore.md +1 -17
- package/docs/api/classes/VaultCoreError.md +1 -1
- package/docs/api/enumerations/AuditOperation.md +1 -1
- package/docs/api/enumerations/DispatchStatus.md +9 -9
- 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/createOwnerClient.md +1 -1
- package/docs/api/functions/createOwnerSession.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/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/writeVaultProfile.md +1 -1
- package/docs/api/interfaces/AgentClient.md +2 -2
- package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
- package/docs/api/interfaces/AgentDispatchTransport.md +1 -1
- package/docs/api/interfaces/AgentIdentity.md +1 -1
- package/docs/api/interfaces/AgentIdentityRecord.md +1 -1
- package/docs/api/interfaces/AgentRequestResult.md +1 -1
- package/docs/api/interfaces/AgentRuntimeManifest.md +1 -1
- package/docs/api/interfaces/AgentSecretGrant.md +1 -1
- package/docs/api/interfaces/AgentSigner.md +1 -1
- package/docs/api/interfaces/AgentVisibleRequestRecord.md +1 -1
- package/docs/api/interfaces/AgentVisibleSecretRecord.md +1 -1
- package/docs/api/interfaces/AuditEntry.md +1 -1
- 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/CreateOwnerClientOptions.md +1 -1
- package/docs/api/interfaces/CreateOwnerSessionOptions.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 +1 -1
- package/docs/api/interfaces/DispatchInstruction.md +1 -1
- package/docs/api/interfaces/DispatchRequest.md +1 -1
- package/docs/api/interfaces/DispatchResult.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/OwnerClient.md +39 -7
- package/docs/api/interfaces/OwnerCreateSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerRemoveSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerRequestRecord.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/OwnerUpdateSecretInput.md +1 -1
- package/docs/api/interfaces/OwnerVisibleRequestRecord.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 +1 -1
- package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
- package/docs/api/interfaces/SecretAlias.md +1 -1
- package/docs/api/interfaces/SecretDestinationGrant.md +1 -1
- package/docs/api/interfaces/SecretId.md +1 -1
- package/docs/api/interfaces/SecretRecord.md +1 -1
- 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/VaultId.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 +1 -17
- package/docs/api/interfaces/VaultUpdateAgentInput.md +1 -1
- package/docs/api/type-aliases/AgentId.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/SecretLifecycleStatus.md +1 -1
- 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 +9 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.65.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -42,18 +42,34 @@ A client for vault owners to manage secrets, agents, and grants.
|
|
|
42
42
|
|
|
43
43
|
### ownerCreateSecret()
|
|
44
44
|
|
|
45
|
+
#### Call Signature
|
|
46
|
+
|
|
45
47
|
> **ownerCreateSecret**(`input`): `Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
##### Parameters
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
###### input
|
|
50
52
|
|
|
51
53
|
[`OwnerCreateSecretInput`](OwnerCreateSecretInput.md)
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
##### Returns
|
|
54
56
|
|
|
55
57
|
`Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
|
56
58
|
|
|
59
|
+
#### Call Signature
|
|
60
|
+
|
|
61
|
+
> **ownerCreateSecret**(`input`): `Promise`\<[`SecretRecord`](SecretRecord.md)[]\>
|
|
62
|
+
|
|
63
|
+
##### Parameters
|
|
64
|
+
|
|
65
|
+
###### input
|
|
66
|
+
|
|
67
|
+
[`OwnerCreateSecretInput`](OwnerCreateSecretInput.md)[]
|
|
68
|
+
|
|
69
|
+
##### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<[`SecretRecord`](SecretRecord.md)[]\>
|
|
72
|
+
|
|
57
73
|
***
|
|
58
74
|
|
|
59
75
|
### ownerDenyDispatch()
|
|
@@ -388,14 +404,30 @@ A client for vault owners to manage secrets, agents, and grants.
|
|
|
388
404
|
|
|
389
405
|
### ownerUpdateSecret()
|
|
390
406
|
|
|
407
|
+
#### Call Signature
|
|
408
|
+
|
|
391
409
|
> **ownerUpdateSecret**(`input`): `Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
|
392
410
|
|
|
393
|
-
|
|
411
|
+
##### Parameters
|
|
394
412
|
|
|
395
|
-
|
|
413
|
+
###### input
|
|
396
414
|
|
|
397
415
|
[`OwnerUpdateSecretInput`](OwnerUpdateSecretInput.md)
|
|
398
416
|
|
|
399
|
-
|
|
417
|
+
##### Returns
|
|
400
418
|
|
|
401
419
|
`Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
|
420
|
+
|
|
421
|
+
#### Call Signature
|
|
422
|
+
|
|
423
|
+
> **ownerUpdateSecret**(`input`): `Promise`\<[`SecretRecord`](SecretRecord.md)[]\>
|
|
424
|
+
|
|
425
|
+
##### Parameters
|
|
426
|
+
|
|
427
|
+
###### input
|
|
428
|
+
|
|
429
|
+
[`OwnerUpdateSecretInput`](OwnerUpdateSecretInput.md)[]
|
|
430
|
+
|
|
431
|
+
##### Returns
|
|
432
|
+
|
|
433
|
+
`Promise`\<[`SecretRecord`](SecretRecord.md)[]\>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.65.0**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -493,19 +493,3 @@
|
|
|
493
493
|
#### Returns
|
|
494
494
|
|
|
495
495
|
`Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
|
496
|
-
|
|
497
|
-
***
|
|
498
|
-
|
|
499
|
-
### ownerWriteSecret()
|
|
500
|
-
|
|
501
|
-
> **ownerWriteSecret**(`request`): `Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
|
502
|
-
|
|
503
|
-
#### Parameters
|
|
504
|
-
|
|
505
|
-
##### request
|
|
506
|
-
|
|
507
|
-
`VaultWriteSecretCommand`
|
|
508
|
-
|
|
509
|
-
#### Returns
|
|
510
|
-
|
|
511
|
-
`Promise`\<[`SecretRecord`](SecretRecord.md)\>
|
package/docs/zh/README.md
CHANGED
|
@@ -97,12 +97,18 @@ const sessionToken = createdAgent.sessionToken;
|
|
|
97
97
|
v1.65+ 采用了简化的 **Grant(授权)** 模型,通过白名单控制访问:
|
|
98
98
|
|
|
99
99
|
```ts
|
|
100
|
-
// 1.
|
|
100
|
+
// 1. 创建机密(严格语义:别名重复则报错)
|
|
101
101
|
const record = await client.ownerCreateSecret({
|
|
102
102
|
alias: 'api-token',
|
|
103
103
|
plaintext: 'secret-value'
|
|
104
104
|
});
|
|
105
105
|
|
|
106
|
+
// 1b. 批量创建(原子性:全部成功或全部失败)
|
|
107
|
+
await client.ownerCreateSecret([
|
|
108
|
+
{ alias: 'stripe-key', plaintext: 'sk_test_...' },
|
|
109
|
+
{ alias: 'openai-key', plaintext: 'sk-proj-...' }
|
|
110
|
+
]);
|
|
111
|
+
|
|
106
112
|
// 2. 授权 Agent 使用该机密
|
|
107
113
|
await client.ownerGrantAgentSecret({
|
|
108
114
|
rootAgentId,
|
|
@@ -112,7 +118,7 @@ await client.ownerGrantAgentSecret({
|
|
|
112
118
|
// 3. 授权该机密可发送至的目标域名
|
|
113
119
|
await client.ownerGrantSecretDestination({
|
|
114
120
|
secretAlias: 'api-token',
|
|
115
|
-
|
|
121
|
+
siteId: 'api.example.com',
|
|
116
122
|
});
|
|
117
123
|
```
|
|
118
124
|
|
|
@@ -144,7 +150,7 @@ console.log(manifest.grants.agentSecrets); // 已获得的机密授权
|
|
|
144
150
|
|
|
145
151
|
### 7. 人机协同(HITL)与语义化审计
|
|
146
152
|
|
|
147
|
-
如果 Agent 尝试的请求未获授权,`agentDispatch` 会返回 `
|
|
153
|
+
如果 Agent 尝试的请求未获授权,`agentDispatch` 会返回 `AWAITING_APPROVAL` 状态,进入人工审批流。
|
|
148
154
|
|
|
149
155
|
```ts
|
|
150
156
|
// 审批待处理的请求
|