@the-ai-company/cbio-node-runtime 1.58.0 → 1.60.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.
Files changed (137) hide show
  1. package/README.md +55 -24
  2. package/dist/clients/agent/client.d.ts +9 -1
  3. package/dist/clients/agent/client.js +41 -11
  4. package/dist/clients/agent/client.js.map +1 -1
  5. package/dist/clients/agent/contracts.d.ts +5 -2
  6. package/dist/clients/owner/client.d.ts +15 -11
  7. package/dist/clients/owner/client.js +83 -30
  8. package/dist/clients/owner/client.js.map +1 -1
  9. package/dist/clients/owner/contracts.d.ts +32 -22
  10. package/dist/clients/owner/index.d.ts +1 -1
  11. package/dist/runtime/index.d.ts +1 -1
  12. package/dist/vault-core/contracts.d.ts +204 -26
  13. package/dist/vault-core/contracts.js +6 -2
  14. package/dist/vault-core/contracts.js.map +1 -1
  15. package/dist/vault-core/core.d.ts +23 -4
  16. package/dist/vault-core/core.js +480 -121
  17. package/dist/vault-core/core.js.map +1 -1
  18. package/dist/vault-core/defaults.d.ts +9 -2
  19. package/dist/vault-core/defaults.js +41 -14
  20. package/dist/vault-core/defaults.js.map +1 -1
  21. package/dist/vault-core/index.d.ts +1 -1
  22. package/dist/vault-core/index.js.map +1 -1
  23. package/dist/vault-core/persistence.d.ts +12 -2
  24. package/dist/vault-core/persistence.js +43 -4
  25. package/dist/vault-core/persistence.js.map +1 -1
  26. package/dist/vault-core/ports.d.ts +7 -1
  27. package/dist/vault-core/tool-metadata.js +27 -10
  28. package/dist/vault-core/tool-metadata.js.map +1 -1
  29. package/dist/vault-ingress/defaults.d.ts +2 -0
  30. package/dist/vault-ingress/defaults.js +6 -0
  31. package/dist/vault-ingress/defaults.js.map +1 -1
  32. package/dist/vault-ingress/index.d.ts +54 -9
  33. package/dist/vault-ingress/index.js +160 -46
  34. package/dist/vault-ingress/index.js.map +1 -1
  35. package/dist/vault-ingress/remote-transport.d.ts +2 -0
  36. package/dist/vault-ingress/remote-transport.js +33 -4
  37. package/dist/vault-ingress/remote-transport.js.map +1 -1
  38. package/docs/ARCHITECTURE.md +1 -1
  39. package/docs/REFERENCE.md +43 -30
  40. package/docs/WORKS_WITH_CUSTOM_FETCH.md +2 -2
  41. package/docs/api/README.md +5 -5
  42. package/docs/api/classes/IdentityError.md +1 -1
  43. package/docs/api/classes/OwnerClientError.md +1 -1
  44. package/docs/api/classes/VaultCore.md +176 -16
  45. package/docs/api/classes/VaultCoreError.md +1 -1
  46. package/docs/api/enumerations/IdentityErrorCode.md +1 -1
  47. package/docs/api/enumerations/OwnerClientErrorCode.md +1 -1
  48. package/docs/api/functions/createAgentClient.md +1 -1
  49. package/docs/api/functions/createIdentity.md +1 -1
  50. package/docs/api/functions/createOwnerHttpFlowBoundary.md +1 -1
  51. package/docs/api/functions/createOwnerSession.md +1 -1
  52. package/docs/api/functions/createPersistentVaultCoreDependencies.md +1 -1
  53. package/docs/api/functions/createStandardAcquireBoundary.md +1 -1
  54. package/docs/api/functions/createStandardDispatchBoundary.md +1 -1
  55. package/docs/api/functions/createVault.md +1 -1
  56. package/docs/api/functions/createVaultClient.md +1 -1
  57. package/docs/api/functions/createVaultCore.md +1 -1
  58. package/docs/api/functions/createVaultCoreDependencies.md +1 -1
  59. package/docs/api/functions/createVaultService.md +1 -1
  60. package/docs/api/functions/createWorkspaceStorage.md +1 -1
  61. package/docs/api/functions/deriveIdentityId.md +1 -1
  62. package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +1 -1
  63. package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
  64. package/docs/api/functions/handleVaultAgentControlHttp.md +1 -1
  65. package/docs/api/functions/handleVaultHttpDispatch.md +1 -1
  66. package/docs/api/functions/initializeVaultCustody.md +1 -1
  67. package/docs/api/functions/listVaults.md +1 -1
  68. package/docs/api/functions/readVaultProfile.md +1 -1
  69. package/docs/api/functions/recoverVault.md +1 -1
  70. package/docs/api/functions/recoverVaultWorkingKey.md +1 -1
  71. package/docs/api/functions/restoreIdentity.md +1 -1
  72. package/docs/api/functions/updateVaultMetadata.md +1 -1
  73. package/docs/api/functions/wrapVaultCoreAsVaultService.md +1 -1
  74. package/docs/api/functions/writeVaultProfile.md +1 -1
  75. package/docs/api/interfaces/AgentClient.md +33 -1
  76. package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
  77. package/docs/api/interfaces/AgentDispatchTransport.md +33 -1
  78. package/docs/api/interfaces/AgentIdentity.md +1 -1
  79. package/docs/api/interfaces/AgentSigner.md +1 -1
  80. package/docs/api/interfaces/AgentSubmitCapabilityRequestInput.md +9 -9
  81. package/docs/api/interfaces/CbioRuntime.md +1 -1
  82. package/docs/api/interfaces/CreateAgentClientOptions.md +1 -1
  83. package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
  84. package/docs/api/interfaces/CreateOwnerSessionOptions.md +1 -1
  85. package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +1 -1
  86. package/docs/api/interfaces/CreateVaultClientOptions.md +1 -1
  87. package/docs/api/interfaces/CreateVaultOptions.md +1 -1
  88. package/docs/api/interfaces/CreatedVault.md +1 -1
  89. package/docs/api/interfaces/DefaultPolicyEngineOptions.md +1 -1
  90. package/docs/api/interfaces/IStorageProvider.md +1 -1
  91. package/docs/api/interfaces/InitializeVaultCustodyOptions.md +1 -1
  92. package/docs/api/interfaces/InitializedVaultCustody.md +1 -1
  93. package/docs/api/interfaces/OwnerAgentProvisionResult.md +1 -1
  94. package/docs/api/interfaces/{OwnerStoreSecretInput.md → OwnerCreateSecretInput.md} +2 -2
  95. package/docs/api/interfaces/{VaultDeleteSecretInput.md → OwnerRemoveSecretInput.md} +2 -2
  96. package/docs/api/interfaces/OwnerSensitiveActionConfirmation.md +1 -1
  97. package/docs/api/interfaces/OwnerSensitiveActionContext.md +1 -1
  98. package/docs/api/interfaces/OwnerSession.md +1 -1
  99. package/docs/api/interfaces/{OwnerWriteSecretInput.md → OwnerUpdateSecretInput.md} +2 -2
  100. package/docs/api/interfaces/RecoverVaultOptions.md +1 -1
  101. package/docs/api/interfaces/RecoveredVault.md +1 -1
  102. package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
  103. package/docs/api/interfaces/Signer.md +1 -1
  104. package/docs/api/interfaces/VaultApproveCapabilityRequestInput.md +1 -1
  105. package/docs/api/interfaces/VaultApproveDispatchInput.md +1 -1
  106. package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
  107. package/docs/api/interfaces/VaultClient.md +112 -48
  108. package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -1
  109. package/docs/api/interfaces/VaultCreateAgentInput.md +1 -1
  110. package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
  111. package/docs/api/interfaces/VaultGrantCapabilityInput.md +9 -21
  112. package/docs/api/interfaces/VaultGrantCapabilityRequest.md +1 -1
  113. package/docs/api/interfaces/VaultIdentity.md +1 -1
  114. package/docs/api/interfaces/VaultImportAgentInput.md +1 -1
  115. package/docs/api/interfaces/VaultIssueSessionTokenInput.md +1 -1
  116. package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
  117. package/docs/api/interfaces/VaultListCapabilitiesInput.md +1 -1
  118. package/docs/api/interfaces/VaultListSecretsInput.md +1 -1
  119. package/docs/api/interfaces/VaultMetadata.md +1 -1
  120. package/docs/api/interfaces/VaultObject.md +1 -1
  121. package/docs/api/interfaces/VaultProfile.md +1 -1
  122. package/docs/api/interfaces/VaultReadAgentPrivateKeyInput.md +1 -1
  123. package/docs/api/interfaces/VaultReadSecretPlaintextInput.md +1 -1
  124. package/docs/api/interfaces/VaultRegisterFlowInput.md +1 -1
  125. package/docs/api/interfaces/VaultRevokeCapabilityInput.md +1 -1
  126. package/docs/api/interfaces/VaultRevokeSessionTokenInput.md +1 -1
  127. package/docs/api/interfaces/VaultSigner.md +1 -1
  128. package/docs/api/interfaces/VaultSubmitCapabilityRequestInput.md +11 -17
  129. package/docs/api/interfaces/VaultUpdateAgentInput.md +1 -1
  130. package/docs/api/type-aliases/AgentCapabilityEnvelope.md +1 -1
  131. package/docs/api/type-aliases/AgentVisibleSecretRecord.md +1 -1
  132. package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
  133. package/docs/api/type-aliases/OwnerGrantCapabilityInput.md +1 -1
  134. package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +1 -1
  135. package/docs/zh/README.md +27 -9
  136. package/examples/process-isolation.ts +6 -4
  137. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -9,46 +9,41 @@ In Sovereign Vault model, administrative actions are implicitly authorized by th
9
9
 
10
10
  ## Methods
11
11
 
12
- ### ownerCreateAgent()
12
+ ### ownerAllowAlways()
13
13
 
14
- > **ownerCreateAgent**(`input`): `Promise`\<[`OwnerAgentProvisionResult`](OwnerAgentProvisionResult.md)\>
15
-
16
- Generates a new identity and registers it as an agent in one step.
17
- The private key is stored in the vault for managed custody.
14
+ > **ownerAllowAlways**(`input`): `Promise`\<`DispatchResult`\>
18
15
 
19
16
  #### Parameters
20
17
 
21
18
  ##### input
22
19
 
23
- [`VaultCreateAgentInput`](VaultCreateAgentInput.md)
20
+ [`VaultApproveCapabilityRequestInput`](VaultApproveCapabilityRequestInput.md)
24
21
 
25
22
  #### Returns
26
23
 
27
- `Promise`\<[`OwnerAgentProvisionResult`](OwnerAgentProvisionResult.md)\>
24
+ `Promise`\<`DispatchResult`\>
28
25
 
29
26
  ***
30
27
 
31
- ### ownerDeleteSecret()
28
+ ### ownerAllowOnce()
32
29
 
33
- > **ownerDeleteSecret**(`input`): `Promise`\<`void`\>
34
-
35
- Permanently deletes a secret from the vault.
30
+ > **ownerAllowOnce**(`input`): `Promise`\<`DispatchResult`\>
36
31
 
37
32
  #### Parameters
38
33
 
39
34
  ##### input
40
35
 
41
- [`VaultDeleteSecretInput`](VaultDeleteSecretInput.md)
36
+ [`VaultApproveCapabilityRequestInput`](VaultApproveCapabilityRequestInput.md)
42
37
 
43
38
  #### Returns
44
39
 
45
- `Promise`\<`void`\>
40
+ `Promise`\<`DispatchResult`\>
46
41
 
47
42
  ***
48
43
 
49
- ### ownerExecuteCapabilityStateAndGrant()
44
+ ### ownerApproveCapabilityRead()
50
45
 
51
- > **ownerExecuteCapabilityStateAndGrant**(`input`): `Promise`\<`DispatchResult`\>
46
+ > **ownerApproveCapabilityRead**(`input`): `Promise`\<`CapabilityStateRecord`\>
52
47
 
53
48
  #### Parameters
54
49
 
@@ -58,13 +53,13 @@ Permanently deletes a secret from the vault.
58
53
 
59
54
  #### Returns
60
55
 
61
- `Promise`\<`DispatchResult`\>
56
+ `Promise`\<`CapabilityStateRecord`\>
62
57
 
63
58
  ***
64
59
 
65
- ### ownerExecuteCapabilityStateOnce()
60
+ ### ownerApproveCapabilityWrite()
66
61
 
67
- > **ownerExecuteCapabilityStateOnce**(`input`): `Promise`\<`DispatchResult`\>
62
+ > **ownerApproveCapabilityWrite**(`input`): `Promise`\<`CapabilityStateRecord`\>
68
63
 
69
64
  #### Parameters
70
65
 
@@ -74,7 +69,60 @@ Permanently deletes a secret from the vault.
74
69
 
75
70
  #### Returns
76
71
 
77
- `Promise`\<`DispatchResult`\>
72
+ `Promise`\<`CapabilityStateRecord`\>
73
+
74
+ ***
75
+
76
+ ### ownerCreateAgent()
77
+
78
+ > **ownerCreateAgent**(`input`): `Promise`\<[`OwnerAgentProvisionResult`](OwnerAgentProvisionResult.md)\>
79
+
80
+ Generates a new identity and registers it as an agent in one step.
81
+ The private key is stored in the vault for managed custody.
82
+
83
+ #### Parameters
84
+
85
+ ##### input
86
+
87
+ [`VaultCreateAgentInput`](VaultCreateAgentInput.md)
88
+
89
+ #### Returns
90
+
91
+ `Promise`\<[`OwnerAgentProvisionResult`](OwnerAgentProvisionResult.md)\>
92
+
93
+ ***
94
+
95
+ ### ownerCreateSecret()
96
+
97
+ > **ownerCreateSecret**(`input`): `Promise`\<`SecretRecord`\>
98
+
99
+ Inserts a new active secret into the vault.
100
+
101
+ #### Parameters
102
+
103
+ ##### input
104
+
105
+ [`OwnerCreateSecretInput`](OwnerCreateSecretInput.md)
106
+
107
+ #### Returns
108
+
109
+ `Promise`\<`SecretRecord`\>
110
+
111
+ ***
112
+
113
+ ### ownerDeny()
114
+
115
+ > **ownerDeny**(`requestId`): `Promise`\<`CapabilityStateRecord`\>
116
+
117
+ #### Parameters
118
+
119
+ ##### requestId
120
+
121
+ `string`
122
+
123
+ #### Returns
124
+
125
+ `Promise`\<`CapabilityStateRecord`\>
78
126
 
79
127
  ***
80
128
 
@@ -96,6 +144,22 @@ Exports a secret's plaintext.
96
144
 
97
145
  ***
98
146
 
147
+ ### ownerGetRequest()
148
+
149
+ > **ownerGetRequest**(`input`): `Promise`\<`OwnerRequestRecord`\>
150
+
151
+ #### Parameters
152
+
153
+ ##### input
154
+
155
+ `VaultGetRequestInput`
156
+
157
+ #### Returns
158
+
159
+ `Promise`\<`OwnerRequestRecord`\>
160
+
161
+ ***
162
+
99
163
  ### ownerGrantCapability()
100
164
 
101
165
  > **ownerGrantCapability**(`input`): `Promise`\<`AgentCapability`\>
@@ -208,6 +272,22 @@ Lists all active capabilities granted to agents.
208
272
 
209
273
  ***
210
274
 
275
+ ### ownerListRequests()
276
+
277
+ > **ownerListRequests**(`input?`): `Promise`\<readonly `OwnerVisibleRequestRecord`[]\>
278
+
279
+ #### Parameters
280
+
281
+ ##### input?
282
+
283
+ `VaultListRequestsInput`
284
+
285
+ #### Returns
286
+
287
+ `Promise`\<readonly `OwnerVisibleRequestRecord`[]\>
288
+
289
+ ***
290
+
211
291
  ### ownerListSecrets()
212
292
 
213
293
  > **ownerListSecrets**(`input?`): `Promise`\<readonly `AgentVisibleSecretRecord`[]\>
@@ -294,7 +374,7 @@ Reads the tamper-evident audit log for the vault.
294
374
 
295
375
  > **ownerRegisterFlow**(`input`): `Promise`\<`CustomHttpFlowDefinition`\>
296
376
 
297
- Registers a custom HTTP flow for complex secret usage.
377
+ Registers a reusable HTTP request template for complex secret exchange patterns.
298
378
 
299
379
  #### Parameters
300
380
 
@@ -308,19 +388,21 @@ Registers a custom HTTP flow for complex secret usage.
308
388
 
309
389
  ***
310
390
 
311
- ### ownerRejectCapabilityState()
391
+ ### ownerRemoveSecret()
312
392
 
313
- > **ownerRejectCapabilityState**(`requestId`): `Promise`\<`CapabilityStateRecord`\>
393
+ > **ownerRemoveSecret**(`input`): `Promise`\<`void`\>
394
+
395
+ Logically removes the current active secret.
314
396
 
315
397
  #### Parameters
316
398
 
317
- ##### requestId
399
+ ##### input
318
400
 
319
- `string`
401
+ [`OwnerRemoveSecretInput`](OwnerRemoveSecretInput.md)
320
402
 
321
403
  #### Returns
322
404
 
323
- `Promise`\<`CapabilityStateRecord`\>
405
+ `Promise`\<`void`\>
324
406
 
325
407
  ***
326
408
 
@@ -358,24 +440,6 @@ Revokes a previously granted capability.
358
440
 
359
441
  ***
360
442
 
361
- ### ownerStoreSecret()
362
-
363
- > **ownerStoreSecret**(`input`): `Promise`\<`SecretRecord`\>
364
-
365
- Securely stores a new secret in the vault.
366
-
367
- #### Parameters
368
-
369
- ##### input
370
-
371
- [`OwnerStoreSecretInput`](OwnerStoreSecretInput.md)
372
-
373
- #### Returns
374
-
375
- `Promise`\<`SecretRecord`\>
376
-
377
- ***
378
-
379
443
  ### ownerSubmitCapabilityRequest()
380
444
 
381
445
  > **ownerSubmitCapabilityRequest**(`input`): `Promise`\<`CapabilityStateRecord`\>
@@ -408,17 +472,17 @@ Securely stores a new secret in the vault.
408
472
 
409
473
  ***
410
474
 
411
- ### ownerWriteSecret()
475
+ ### ownerUpdateSecret()
412
476
 
413
- > **ownerWriteSecret**(`input`): `Promise`\<`SecretRecord`\>
477
+ > **ownerUpdateSecret**(`input`): `Promise`\<`SecretRecord`\>
414
478
 
415
- Stores a manually provided secret in the vault.
479
+ Inserts a new successor secret and marks the previous active version as superseded.
416
480
 
417
481
  #### Parameters
418
482
 
419
483
  ##### input
420
484
 
421
- [`OwnerWriteSecretInput`](OwnerWriteSecretInput.md)
485
+ [`OwnerUpdateSecretInput`](OwnerUpdateSecretInput.md)
422
486
 
423
487
  #### Returns
424
488
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -36,12 +36,6 @@
36
36
 
37
37
  ***
38
38
 
39
- ### methods
40
-
41
- > **methods**: readonly `string`[]
42
-
43
- ***
44
-
45
39
  ### operation?
46
40
 
47
41
  > `optional` **operation?**: `string`
@@ -62,30 +56,24 @@
62
56
 
63
57
  ***
64
58
 
65
- ### requestedAt?
66
-
67
- > `optional` **requestedAt?**: `string`
68
-
69
- ***
70
-
71
- ### scope
59
+ ### read
72
60
 
73
- > **scope**: `string`
61
+ > **read**: `CapabilityReadPolicy`
74
62
 
75
63
  ***
76
64
 
77
- ### secretAliases?
65
+ ### requestedAt?
78
66
 
79
- > `optional` **secretAliases?**: readonly `string`[]
67
+ > `optional` **requestedAt?**: `string`
80
68
 
81
69
  ***
82
70
 
83
- ### secretIds?
71
+ ### skipAudit?
84
72
 
85
- > `optional` **secretIds?**: readonly `string`[]
73
+ > `optional` **skipAudit?**: `boolean`
86
74
 
87
75
  ***
88
76
 
89
- ### skipAudit?
77
+ ### write
90
78
 
91
- > `optional` **skipAudit?**: `boolean`
79
+ > **write**: `CapabilityWritePolicy`
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -24,12 +24,6 @@
24
24
 
25
25
  ***
26
26
 
27
- ### methods
28
-
29
- > **methods**: readonly `string`[]
30
-
31
- ***
32
-
33
27
  ### operation?
34
28
 
35
29
  > `optional` **operation?**: `string`
@@ -50,30 +44,30 @@
50
44
 
51
45
  ***
52
46
 
53
- ### requestedAt?
47
+ ### read
54
48
 
55
- > `optional` **requestedAt?**: `string`
49
+ > **read**: `CapabilityReadPolicy`
56
50
 
57
51
  ***
58
52
 
59
- ### requester
53
+ ### requestedAt?
60
54
 
61
- > **requester**: `VaultPrincipal`
55
+ > `optional` **requestedAt?**: `string`
62
56
 
63
57
  ***
64
58
 
65
- ### scope
59
+ ### requester
66
60
 
67
- > **scope**: `string`
61
+ > **requester**: `VaultPrincipal`
68
62
 
69
63
  ***
70
64
 
71
- ### secretAliases?
65
+ ### skipAudit?
72
66
 
73
- > `optional` **secretAliases?**: readonly `string`[]
67
+ > `optional` **skipAudit?**: `boolean`
74
68
 
75
69
  ***
76
70
 
77
- ### skipAudit?
71
+ ### write
78
72
 
79
- > `optional` **skipAudit?**: `boolean`
73
+ > **write**: `CapabilityWritePolicy`
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.58.0**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
package/docs/zh/README.md CHANGED
@@ -101,9 +101,12 @@ const record = await client.ownerWriteSecret({
101
101
 
102
102
  await client.ownerGrantCapability({
103
103
  agentId,
104
- secretAliases: ['api-token'],
105
- scope: 'https://api.example.com/*',
106
- methods: ['POST']
104
+ write: {
105
+ secretIds: [record.secretId.value],
106
+ scope: 'https://api.example.com/*',
107
+ methods: ['POST']
108
+ },
109
+ read: { mode: 'full' }
107
110
  });
108
111
  ```
109
112
 
@@ -120,24 +123,33 @@ const agent = createAgentClient({
120
123
  });
121
124
 
122
125
  const result = await agent.agentDispatch({ ... });
126
+ const requests = await agent.agentListRequests();
127
+ const request = await agent.agentGetRequest(result.requestId);
128
+ const ownerView = await client.ownerGetRequest({ requestId: result.requestId });
123
129
  ```
124
130
 
125
131
  Agent 进程不会直接使用原始私钥执行请求。即使 Agent 拥有身份材料,也应先换取 session token,再进行 dispatch。
126
132
 
133
+ 给 LLM 的直白规则:
134
+ - `agentDispatch(...)` = 立刻尝试执行真实任务
135
+ - `agentSubmitCapabilityRequest(...)` = 只申请权限,不会执行任务
136
+ - `agentListRequests()` / `agentGetRequest(...)` = 在请求执行后查看异步结果
137
+ - `ownerListRequests()` / `ownerGetRequest(...)` = owner 查看完整请求记录,用于决定是否放行 read
138
+
127
139
  ```ts
128
140
  const manifest = await agent.agentIntrospect();
129
141
 
130
142
  console.log(manifest.agent.agentId);
131
143
  console.log(manifest.agent.identityId);
132
144
  console.log(manifest.agent.nickname);
133
- console.log(manifest.capabilities); // 同一张能力状态表里同时包含 GRANTED 和 PENDING
145
+ console.log(manifest.capabilities); // 同一组能力载体里包含 write/read 动作状态
134
146
  ```
135
147
 
136
- `agentListCapabilities()` 现在返回的也是同一张统一能力状态表,因此调度器或 Agent 重启后,不需要分别拼“已授权能力”和“待审批能力”。
148
+ `agentListCapabilities()` 返回能力载体视图,`agentListRequests()` / `agentGetRequest()` 则负责暴露请求历史和按权限裁剪后的结果。
137
149
 
138
150
  ### 7. 人机协同(HITL)工作流
139
151
 
140
- 系统采用统一的 **能力状态(capability state)** 模型。如果 Agent 尝试执行的动作不在白名单内,dispatch 会返回 `PENDING`,同时运行时会写入一条 `PENDING` 能力状态,等待 Owner 审批。
152
+ 如果 Agent 尝试执行的动作不在白名单内,dispatch 会返回 `PENDING`,同时运行时会写入一条能力载体记录,其 `write` 动作等待 Owner 审批。
141
153
 
142
154
  ```ts
143
155
  const result = await agent.agentDispatch({ ... });
@@ -146,14 +158,20 @@ if (result.status === 'PENDING') {
146
158
  }
147
159
 
148
160
  client.ownerOnCapabilityState((state) => {
149
- if (state.status === 'PENDING') {
161
+ if (state.actions.write.status === 'PENDING') {
150
162
  console.log('收到新的待审批能力状态:', state.requestId);
151
163
  }
152
164
  });
153
165
 
154
- const pending = await client.ownerListCapabilityStates({ status: 'PENDING' });
166
+ const pending = await client.ownerListCapabilityStates({ writeStatus: 'PENDING' });
155
167
  if (pending.length > 0) {
156
- await client.ownerExecuteCapabilityStateAndGrant({
168
+ await client.ownerApproveCapabilityWrite({
169
+ requestId: pending[0].requestId
170
+ });
171
+ await client.ownerAllowAlways({
172
+ requestId: pending[0].requestId
173
+ });
174
+ await client.ownerApproveCapabilityRead({
157
175
  requestId: pending[0].requestId
158
176
  });
159
177
  }
@@ -128,11 +128,13 @@ async function main() {
128
128
  vaultId: vault.vaultId,
129
129
  capabilityId: "cap-llm-1",
130
130
  agentId: agentIdentity.identityId,
131
- secretIds: [secret.secretId.value],
132
- secretAliases: ["api-token"],
133
131
  operation: "dispatch_http" as const,
134
- scope: "https://httpbin.org/post",
135
- methods: ["POST"],
132
+ write: {
133
+ secretIds: [secret.secretId.value],
134
+ scope: "https://httpbin.org/post",
135
+ methods: ["POST"],
136
+ },
137
+ read: { mode: "full" },
136
138
  issuedAt: new Date().toISOString(),
137
139
  };
138
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-ai-company/cbio-node-runtime",
3
- "version": "1.58.0",
3
+ "version": "1.60.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },