@the-ai-company/cbio-node-runtime 1.59.1 → 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 (125) hide show
  1. package/README.md +4 -2
  2. package/dist/clients/agent/client.d.ts +6 -0
  3. package/dist/clients/agent/client.js.map +1 -1
  4. package/dist/clients/owner/client.d.ts +9 -7
  5. package/dist/clients/owner/client.js +40 -11
  6. package/dist/clients/owner/client.js.map +1 -1
  7. package/dist/clients/owner/contracts.d.ts +21 -11
  8. package/dist/clients/owner/index.d.ts +1 -1
  9. package/dist/runtime/index.d.ts +1 -1
  10. package/dist/vault-core/contracts.d.ts +85 -3
  11. package/dist/vault-core/contracts.js +2 -0
  12. package/dist/vault-core/contracts.js.map +1 -1
  13. package/dist/vault-core/core.d.ts +14 -1
  14. package/dist/vault-core/core.js +180 -22
  15. package/dist/vault-core/core.js.map +1 -1
  16. package/dist/vault-core/defaults.d.ts +1 -0
  17. package/dist/vault-core/defaults.js +8 -4
  18. package/dist/vault-core/defaults.js.map +1 -1
  19. package/dist/vault-core/index.d.ts +1 -1
  20. package/dist/vault-core/index.js.map +1 -1
  21. package/dist/vault-core/persistence.d.ts +1 -0
  22. package/dist/vault-core/persistence.js +6 -3
  23. package/dist/vault-core/persistence.js.map +1 -1
  24. package/dist/vault-core/tool-metadata.js +4 -4
  25. package/dist/vault-core/tool-metadata.js.map +1 -1
  26. package/dist/vault-ingress/index.d.ts +15 -0
  27. package/dist/vault-ingress/index.js +20 -1
  28. package/dist/vault-ingress/index.js.map +1 -1
  29. package/docs/REFERENCE.md +8 -4
  30. package/docs/api/README.md +5 -5
  31. package/docs/api/classes/IdentityError.md +1 -1
  32. package/docs/api/classes/OwnerClientError.md +1 -1
  33. package/docs/api/classes/VaultCore.md +97 -1
  34. package/docs/api/classes/VaultCoreError.md +1 -1
  35. package/docs/api/enumerations/IdentityErrorCode.md +1 -1
  36. package/docs/api/enumerations/OwnerClientErrorCode.md +1 -1
  37. package/docs/api/functions/createAgentClient.md +1 -1
  38. package/docs/api/functions/createIdentity.md +1 -1
  39. package/docs/api/functions/createOwnerHttpFlowBoundary.md +1 -1
  40. package/docs/api/functions/createOwnerSession.md +1 -1
  41. package/docs/api/functions/createPersistentVaultCoreDependencies.md +1 -1
  42. package/docs/api/functions/createStandardAcquireBoundary.md +1 -1
  43. package/docs/api/functions/createStandardDispatchBoundary.md +1 -1
  44. package/docs/api/functions/createVault.md +1 -1
  45. package/docs/api/functions/createVaultClient.md +1 -1
  46. package/docs/api/functions/createVaultCore.md +1 -1
  47. package/docs/api/functions/createVaultCoreDependencies.md +1 -1
  48. package/docs/api/functions/createVaultService.md +1 -1
  49. package/docs/api/functions/createWorkspaceStorage.md +1 -1
  50. package/docs/api/functions/deriveIdentityId.md +1 -1
  51. package/docs/api/functions/deriveVaultWorkingKeyFromPassword.md +1 -1
  52. package/docs/api/functions/getDefaultWorkspaceDir.md +1 -1
  53. package/docs/api/functions/handleVaultAgentControlHttp.md +1 -1
  54. package/docs/api/functions/handleVaultHttpDispatch.md +1 -1
  55. package/docs/api/functions/initializeVaultCustody.md +1 -1
  56. package/docs/api/functions/listVaults.md +1 -1
  57. package/docs/api/functions/readVaultProfile.md +1 -1
  58. package/docs/api/functions/recoverVault.md +1 -1
  59. package/docs/api/functions/recoverVaultWorkingKey.md +1 -1
  60. package/docs/api/functions/restoreIdentity.md +1 -1
  61. package/docs/api/functions/updateVaultMetadata.md +1 -1
  62. package/docs/api/functions/wrapVaultCoreAsVaultService.md +1 -1
  63. package/docs/api/functions/writeVaultProfile.md +1 -1
  64. package/docs/api/interfaces/AgentClient.md +7 -1
  65. package/docs/api/interfaces/AgentDispatchIntent.md +1 -1
  66. package/docs/api/interfaces/AgentDispatchTransport.md +1 -1
  67. package/docs/api/interfaces/AgentIdentity.md +1 -1
  68. package/docs/api/interfaces/AgentSigner.md +1 -1
  69. package/docs/api/interfaces/AgentSubmitCapabilityRequestInput.md +1 -1
  70. package/docs/api/interfaces/CbioRuntime.md +1 -1
  71. package/docs/api/interfaces/CreateAgentClientOptions.md +1 -1
  72. package/docs/api/interfaces/CreateIdentityOptions.md +1 -1
  73. package/docs/api/interfaces/CreateOwnerSessionOptions.md +1 -1
  74. package/docs/api/interfaces/CreatePersistentVaultCoreDependenciesOptions.md +1 -1
  75. package/docs/api/interfaces/CreateVaultClientOptions.md +1 -1
  76. package/docs/api/interfaces/CreateVaultOptions.md +1 -1
  77. package/docs/api/interfaces/CreatedVault.md +1 -1
  78. package/docs/api/interfaces/DefaultPolicyEngineOptions.md +1 -1
  79. package/docs/api/interfaces/IStorageProvider.md +1 -1
  80. package/docs/api/interfaces/InitializeVaultCustodyOptions.md +1 -1
  81. package/docs/api/interfaces/InitializedVaultCustody.md +1 -1
  82. package/docs/api/interfaces/OwnerAgentProvisionResult.md +1 -1
  83. package/docs/api/interfaces/{OwnerStoreSecretInput.md → OwnerCreateSecretInput.md} +2 -2
  84. package/docs/api/interfaces/{VaultDeleteSecretInput.md → OwnerRemoveSecretInput.md} +2 -2
  85. package/docs/api/interfaces/OwnerSensitiveActionConfirmation.md +1 -1
  86. package/docs/api/interfaces/OwnerSensitiveActionContext.md +1 -1
  87. package/docs/api/interfaces/OwnerSession.md +1 -1
  88. package/docs/api/interfaces/{OwnerWriteSecretInput.md → OwnerUpdateSecretInput.md} +2 -2
  89. package/docs/api/interfaces/RecoverVaultOptions.md +1 -1
  90. package/docs/api/interfaces/RecoveredVault.md +1 -1
  91. package/docs/api/interfaces/RestoreIdentityOptions.md +1 -1
  92. package/docs/api/interfaces/Signer.md +1 -1
  93. package/docs/api/interfaces/VaultApproveCapabilityRequestInput.md +1 -1
  94. package/docs/api/interfaces/VaultApproveDispatchInput.md +1 -1
  95. package/docs/api/interfaces/VaultAuditQueryInput.md +1 -1
  96. package/docs/api/interfaces/VaultClient.md +55 -23
  97. package/docs/api/interfaces/VaultCoreDependenciesOptions.md +1 -1
  98. package/docs/api/interfaces/VaultCreateAgentInput.md +1 -1
  99. package/docs/api/interfaces/VaultExportSecretInput.md +1 -1
  100. package/docs/api/interfaces/VaultGrantCapabilityInput.md +1 -1
  101. package/docs/api/interfaces/VaultGrantCapabilityRequest.md +1 -1
  102. package/docs/api/interfaces/VaultIdentity.md +1 -1
  103. package/docs/api/interfaces/VaultImportAgentInput.md +1 -1
  104. package/docs/api/interfaces/VaultIssueSessionTokenInput.md +1 -1
  105. package/docs/api/interfaces/VaultListAgentsInput.md +1 -1
  106. package/docs/api/interfaces/VaultListCapabilitiesInput.md +1 -1
  107. package/docs/api/interfaces/VaultListSecretsInput.md +1 -1
  108. package/docs/api/interfaces/VaultMetadata.md +1 -1
  109. package/docs/api/interfaces/VaultObject.md +1 -1
  110. package/docs/api/interfaces/VaultProfile.md +1 -1
  111. package/docs/api/interfaces/VaultReadAgentPrivateKeyInput.md +1 -1
  112. package/docs/api/interfaces/VaultReadSecretPlaintextInput.md +1 -1
  113. package/docs/api/interfaces/VaultRegisterFlowInput.md +1 -1
  114. package/docs/api/interfaces/VaultRevokeCapabilityInput.md +1 -1
  115. package/docs/api/interfaces/VaultRevokeSessionTokenInput.md +1 -1
  116. package/docs/api/interfaces/VaultSigner.md +1 -1
  117. package/docs/api/interfaces/VaultSubmitCapabilityRequestInput.md +1 -1
  118. package/docs/api/interfaces/VaultUpdateAgentInput.md +1 -1
  119. package/docs/api/type-aliases/AgentCapabilityEnvelope.md +1 -1
  120. package/docs/api/type-aliases/AgentVisibleSecretRecord.md +1 -1
  121. package/docs/api/type-aliases/CbioRuntimeModule.md +1 -1
  122. package/docs/api/type-aliases/OwnerGrantCapabilityInput.md +1 -1
  123. package/docs/api/variables/DEFAULT_VAULT_KEY_CUSTODY_BLOB_KEY.md +1 -1
  124. package/docs/zh/README.md +2 -0
  125. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.59.1**](../README.md)
1
+ [**CBIO Node Runtime Agent API v1.60.0**](../README.md)
2
2
 
3
3
  ***
4
4
 
@@ -92,21 +92,21 @@ The private key is stored in the vault for managed custody.
92
92
 
93
93
  ***
94
94
 
95
- ### ownerDeleteSecret()
95
+ ### ownerCreateSecret()
96
96
 
97
- > **ownerDeleteSecret**(`input`): `Promise`\<`void`\>
97
+ > **ownerCreateSecret**(`input`): `Promise`\<`SecretRecord`\>
98
98
 
99
- Permanently deletes a secret from the vault.
99
+ Inserts a new active secret into the vault.
100
100
 
101
101
  #### Parameters
102
102
 
103
103
  ##### input
104
104
 
105
- [`VaultDeleteSecretInput`](VaultDeleteSecretInput.md)
105
+ [`OwnerCreateSecretInput`](OwnerCreateSecretInput.md)
106
106
 
107
107
  #### Returns
108
108
 
109
- `Promise`\<`void`\>
109
+ `Promise`\<`SecretRecord`\>
110
110
 
111
111
  ***
112
112
 
@@ -144,6 +144,22 @@ Exports a secret's plaintext.
144
144
 
145
145
  ***
146
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
+
147
163
  ### ownerGrantCapability()
148
164
 
149
165
  > **ownerGrantCapability**(`input`): `Promise`\<`AgentCapability`\>
@@ -256,6 +272,22 @@ Lists all active capabilities granted to agents.
256
272
 
257
273
  ***
258
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
+
259
291
  ### ownerListSecrets()
260
292
 
261
293
  > **ownerListSecrets**(`input?`): `Promise`\<readonly `AgentVisibleSecretRecord`[]\>
@@ -356,17 +388,17 @@ Registers a reusable HTTP request template for complex secret exchange patterns.
356
388
 
357
389
  ***
358
390
 
359
- ### ownerRevokeCapability()
391
+ ### ownerRemoveSecret()
360
392
 
361
- > **ownerRevokeCapability**(`input`): `Promise`\<`void`\>
393
+ > **ownerRemoveSecret**(`input`): `Promise`\<`void`\>
362
394
 
363
- Revokes a previously granted capability.
395
+ Logically removes the current active secret.
364
396
 
365
397
  #### Parameters
366
398
 
367
399
  ##### input
368
400
 
369
- [`VaultRevokeCapabilityInput`](VaultRevokeCapabilityInput.md)
401
+ [`OwnerRemoveSecretInput`](OwnerRemoveSecretInput.md)
370
402
 
371
403
  #### Returns
372
404
 
@@ -374,15 +406,17 @@ Revokes a previously granted capability.
374
406
 
375
407
  ***
376
408
 
377
- ### ownerRevokeSessionToken()
409
+ ### ownerRevokeCapability()
378
410
 
379
- > **ownerRevokeSessionToken**(`input`): `Promise`\<`void`\>
411
+ > **ownerRevokeCapability**(`input`): `Promise`\<`void`\>
412
+
413
+ Revokes a previously granted capability.
380
414
 
381
415
  #### Parameters
382
416
 
383
417
  ##### input
384
418
 
385
- [`VaultRevokeSessionTokenInput`](VaultRevokeSessionTokenInput.md)
419
+ [`VaultRevokeCapabilityInput`](VaultRevokeCapabilityInput.md)
386
420
 
387
421
  #### Returns
388
422
 
@@ -390,21 +424,19 @@ Revokes a previously granted capability.
390
424
 
391
425
  ***
392
426
 
393
- ### ownerStoreSecret()
394
-
395
- > **ownerStoreSecret**(`input`): `Promise`\<`SecretRecord`\>
427
+ ### ownerRevokeSessionToken()
396
428
 
397
- Securely stores a new secret in the vault.
429
+ > **ownerRevokeSessionToken**(`input`): `Promise`\<`void`\>
398
430
 
399
431
  #### Parameters
400
432
 
401
433
  ##### input
402
434
 
403
- [`OwnerStoreSecretInput`](OwnerStoreSecretInput.md)
435
+ [`VaultRevokeSessionTokenInput`](VaultRevokeSessionTokenInput.md)
404
436
 
405
437
  #### Returns
406
438
 
407
- `Promise`\<`SecretRecord`\>
439
+ `Promise`\<`void`\>
408
440
 
409
441
  ***
410
442
 
@@ -440,17 +472,17 @@ Securely stores a new secret in the vault.
440
472
 
441
473
  ***
442
474
 
443
- ### ownerWriteSecret()
475
+ ### ownerUpdateSecret()
444
476
 
445
- > **ownerWriteSecret**(`input`): `Promise`\<`SecretRecord`\>
477
+ > **ownerUpdateSecret**(`input`): `Promise`\<`SecretRecord`\>
446
478
 
447
- Stores a manually provided secret in the vault.
479
+ Inserts a new successor secret and marks the previous active version as superseded.
448
480
 
449
481
  #### Parameters
450
482
 
451
483
  ##### input
452
484
 
453
- [`OwnerWriteSecretInput`](OwnerWriteSecretInput.md)
485
+ [`OwnerUpdateSecretInput`](OwnerUpdateSecretInput.md)
454
486
 
455
487
  #### Returns
456
488
 
@@ -1,4 +1,4 @@
1
- [**CBIO Node Runtime Agent API v1.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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.59.1**](../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
@@ -125,6 +125,7 @@ const agent = createAgentClient({
125
125
  const result = await agent.agentDispatch({ ... });
126
126
  const requests = await agent.agentListRequests();
127
127
  const request = await agent.agentGetRequest(result.requestId);
128
+ const ownerView = await client.ownerGetRequest({ requestId: result.requestId });
128
129
  ```
129
130
 
130
131
  Agent 进程不会直接使用原始私钥执行请求。即使 Agent 拥有身份材料,也应先换取 session token,再进行 dispatch。
@@ -133,6 +134,7 @@ Agent 进程不会直接使用原始私钥执行请求。即使 Agent 拥有身
133
134
  - `agentDispatch(...)` = 立刻尝试执行真实任务
134
135
  - `agentSubmitCapabilityRequest(...)` = 只申请权限,不会执行任务
135
136
  - `agentListRequests()` / `agentGetRequest(...)` = 在请求执行后查看异步结果
137
+ - `ownerListRequests()` / `ownerGetRequest(...)` = owner 查看完整请求记录,用于决定是否放行 read
136
138
 
137
139
  ```ts
138
140
  const manifest = await agent.agentIntrospect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-ai-company/cbio-node-runtime",
3
- "version": "1.59.1",
3
+ "version": "1.60.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },