@the-ai-company/cbio-node-runtime 1.48.3 → 1.48.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 +26 -10
- package/dist/clients/owner/client.d.ts +1 -0
- package/dist/clients/owner/client.js +17 -1
- package/dist/clients/owner/client.js.map +1 -1
- package/dist/clients/owner/contracts.d.ts +10 -0
- package/dist/vault-core/core.d.ts +5 -0
- package/dist/vault-core/core.js +34 -2
- package/dist/vault-core/core.js.map +1 -1
- package/dist/vault-ingress/index.d.ts +7 -0
- package/dist/vault-ingress/index.js +6 -0
- package/dist/vault-ingress/index.js.map +1 -1
- package/docs/REFERENCE.md +11 -8
- package/docs/api/README.md +2 -2
- package/docs/api/classes/IdentityError.md +1 -1
- package/docs/api/classes/VaultCore.md +33 -1
- package/docs/api/classes/VaultCoreError.md +1 -1
- package/docs/api/enumerations/IdentityErrorCode.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/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/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 +1 -1
- 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/AgentSigner.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/CreatePersistentVaultCoreDependenciesOptions.md +1 -1
- package/docs/api/interfaces/CreateVaultClientOptions.md +7 -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/OwnerDefineSecretTargetsInput.md +1 -1
- package/docs/api/interfaces/OwnerSecretTargetBinding.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/VaultAuditQueryInput.md +1 -1
- package/docs/api/interfaces/VaultClient.md +1 -1
- 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 +1 -1
- package/docs/api/interfaces/VaultIdentity.md +1 -1
- package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
- package/docs/api/interfaces/VaultListCapabilitiesInput.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/VaultRegisterAgentInput.md +1 -1
- package/docs/api/interfaces/VaultRegisterFlowInput.md +1 -1
- package/docs/api/interfaces/VaultRevokeCapabilityInput.md +1 -1
- package/docs/api/interfaces/VaultSigner.md +1 -1
- package/docs/api/type-aliases/AgentCapabilityEnvelope.md +1 -1
- package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
- package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +1 -1
- package/docs/zh/README.md +38 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.48.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.48.5**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -205,6 +205,22 @@ This is the primary implementation of the Vault logic.
|
|
|
205
205
|
|
|
206
206
|
***
|
|
207
207
|
|
|
208
|
+
### issueAllAgentSessionTokens()
|
|
209
|
+
|
|
210
|
+
> **issueAllAgentSessionTokens**(`actor`): `Promise`\<`OwnerSessionToken`[]\>
|
|
211
|
+
|
|
212
|
+
#### Parameters
|
|
213
|
+
|
|
214
|
+
##### actor
|
|
215
|
+
|
|
216
|
+
`VaultPrincipal` & `object`
|
|
217
|
+
|
|
218
|
+
#### Returns
|
|
219
|
+
|
|
220
|
+
`Promise`\<`OwnerSessionToken`[]\>
|
|
221
|
+
|
|
222
|
+
***
|
|
223
|
+
|
|
208
224
|
### listAgents()
|
|
209
225
|
|
|
210
226
|
> **listAgents**(`actor`, `request?`): `Promise`\<readonly `AgentIdentityRecord`[]\>
|
|
@@ -271,6 +287,22 @@ This is the primary implementation of the Vault logic.
|
|
|
271
287
|
|
|
272
288
|
***
|
|
273
289
|
|
|
290
|
+
### onPendingRequest()
|
|
291
|
+
|
|
292
|
+
> **onPendingRequest**(`callback`): () => `void`
|
|
293
|
+
|
|
294
|
+
#### Parameters
|
|
295
|
+
|
|
296
|
+
##### callback
|
|
297
|
+
|
|
298
|
+
(`record`) => `void`
|
|
299
|
+
|
|
300
|
+
#### Returns
|
|
301
|
+
|
|
302
|
+
() => `void`
|
|
303
|
+
|
|
304
|
+
***
|
|
305
|
+
|
|
274
306
|
### registerAgentIdentity()
|
|
275
307
|
|
|
276
308
|
> **registerAgentIdentity**(`command`): `Promise`\<`void`\>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[**CBIO Node Runtime Agent API v1.48.
|
|
1
|
+
[**CBIO Node Runtime Agent API v1.48.5**](../README.md)
|
|
2
2
|
|
|
3
3
|
***
|
|
4
4
|
|
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
27
|
+
### skipWarmup?
|
|
28
|
+
|
|
29
|
+
> `optional` **skipWarmup?**: `boolean`
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
27
33
|
### vault
|
|
28
34
|
|
|
29
35
|
> **vault**: `VaultService`
|
package/docs/zh/README.md
CHANGED
|
@@ -72,7 +72,43 @@ const record = await client.writeSecret({
|
|
|
72
72
|
|
|
73
73
|
---
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
### 4. 人机协同 (HITL) 工作流
|
|
76
|
+
|
|
77
|
+
系统采用 **“发现优先 (Discovery-first)”** 模型。如果 Agent 尝试执行的操作不在白名单内(即 Agent-Key-Action “铁三角”未对齐),动作将被自动暂停:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
// Agent 进程中
|
|
81
|
+
const result = await agent.dispatch({ ... });
|
|
82
|
+
if (result.status === 'PENDING') {
|
|
83
|
+
console.log("触发发现流程:等待所有者审批...");
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 或者:使用观察者模式监听推送 (v1.48.4+)
|
|
87
|
+
ownerClient.onPendingRequest((req) => {
|
|
88
|
+
console.log("收到新请求:", req.requestId);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// 或者:启动时自动发牌 (v1.48.4+ 默认行为)
|
|
92
|
+
const client = createVaultClient({
|
|
93
|
+
vault,
|
|
94
|
+
ownerIdentity: { identityId: 'owner-1' }
|
|
95
|
+
// skipWarmup: true // 如果不想自动发牌,请传入此参数
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
// 所有者进程中 (GUI 或 脚本)
|
|
99
|
+
const pending = await client.listPendingDispatches();
|
|
100
|
+
if (pending.length > 0) {
|
|
101
|
+
// 检查并批准请求,可选择将其设为“永久授权”
|
|
102
|
+
await client.approveDispatch({
|
|
103
|
+
requestId: pending[0].requestId,
|
|
104
|
+
permanent: true
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 详细文档
|
|
76
112
|
|
|
77
113
|
- [进程隔离 (A/B 架构)](../PROCESS_ISOLATION.md)
|
|
78
114
|
- [根目录 README (英文)](../../README.md)
|
|
@@ -81,5 +117,5 @@ const record = await client.writeSecret({
|
|
|
81
117
|
|
|
82
118
|
1. **机密隔离**:机密明文绝不离开安全进程。
|
|
83
119
|
2. **密码即权限**:主密码是唯一的管理授权来源。
|
|
84
|
-
3. **可审计性**:所有管理动作在高层均记录为 `vault-master` 身份。
|
|
120
|
+
3. **可审计性**:所有管理动作在高层均记录为 `vault-master` 或对应的 Agent 身份。
|
|
85
121
|
4. **二元状态**:保险箱要么被解锁并可见,要么是磁盘上一堆加密的碎片。
|