@opengeni/runtime 3.1.2 → 3.2.2

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/dist/index.js CHANGED
@@ -187,7 +187,7 @@ import {
187
187
  workspaceEnvironmentInstructions,
188
188
  wrapAttemptToolDefinitions,
189
189
  wrapAttemptToolExecute
190
- } from "./chunk-TE3JIUL6.js";
190
+ } from "./chunk-2AUDDDO2.js";
191
191
  import {
192
192
  ActiveBackendUnresolvableError,
193
193
  BROWSER_CONTROL_ADMIN_TOKEN_FILE,
@@ -3,7 +3,7 @@ import {
3
3
  prepareAgentTools,
4
4
  secretArgumentMode,
5
5
  sessionMcpApprovalConnectionId
6
- } from "./chunk-TE3JIUL6.js";
6
+ } from "./chunk-2AUDDDO2.js";
7
7
  import "./chunk-462CH77G.js";
8
8
  import "./chunk-4KFT2G3W.js";
9
9
  import "./chunk-7OUG7WBV.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/runtime",
3
- "version": "3.1.2",
3
+ "version": "3.2.2",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,19 +75,19 @@
75
75
  "@openai/agents": "0.14.3",
76
76
  "@openai/agents-core": "0.14.3",
77
77
  "@openai/agents-extensions": "0.14.3",
78
- "@opengeni/agent-proto": "3.1.2",
79
- "@opengeni/capabilities": "3.1.2",
80
- "@opengeni/codemode": "3.1.2",
81
- "@opengeni/codex": "3.1.2",
82
- "@opengeni/config": "3.1.2",
83
- "@opengeni/contracts": "3.1.2",
84
- "@opengeni/interaction": "3.1.2",
85
- "@opengeni/network": "3.1.2",
86
- "@opengeni/observability": "3.1.2",
87
- "@opengeni/sdk": "3.1.2",
88
- "@opengeni/tool-gateway": "3.1.2",
89
- "@opengeni/vaults": "3.1.2",
90
- "@opengeni/xai-subscription": "3.1.2",
78
+ "@opengeni/agent-proto": "3.2.2",
79
+ "@opengeni/capabilities": "3.2.2",
80
+ "@opengeni/codemode": "3.2.2",
81
+ "@opengeni/codex": "3.2.2",
82
+ "@opengeni/config": "3.2.2",
83
+ "@opengeni/contracts": "3.2.2",
84
+ "@opengeni/interaction": "3.2.2",
85
+ "@opengeni/network": "3.2.2",
86
+ "@opengeni/observability": "3.2.2",
87
+ "@opengeni/sdk": "3.2.2",
88
+ "@opengeni/tool-gateway": "3.2.2",
89
+ "@opengeni/vaults": "3.2.2",
90
+ "@opengeni/xai-subscription": "3.2.2",
91
91
  "debug": "4.4.3",
92
92
  "modal": "0.9.0",
93
93
  "openai": "6.47.0",
@@ -193,3 +193,54 @@ README's Workspace tools section for approval and migration details.
193
193
  Never put tokens in prompts, Skills, `modelContext`, tool URLs, browser code,
194
194
  or logs. Opengeni stores Connection and MCP header secrets encrypted and keeps
195
195
  them out of the model's context.
196
+
197
+ ### Your product as a vault provider
198
+
199
+ Use native vaults when the agent needs to discover and use stored credentials.
200
+ An embedding product can expose multiple remote vaults through a signed
201
+ `external` connection; an in-process host can keep using
202
+ `connectionCredentials.vaultProvider`. Keep the simple chat/tool integration
203
+ above unchanged unless the product actually needs this optional capability.
204
+
205
+ Configure remote connections on the server with `vaultsApi(client, workspaceId)`
206
+ from `@opengeni/sdk`: `installVaultProvider`, `getVaultProviderCatalog`,
207
+ `listProviderVaults`, and `linkProviderVault`. Never put provider tokens or the
208
+ signing secret in browser code, model context, or URL parameters. Verify each
209
+ request's raw-body signature and map its native account/workspace/subject to
210
+ the host's actual tenant/user before authorizing it. A shared connection must
211
+ not return a different user's inventory into the same metadata mirror; use
212
+ separate user-owned connections for user-specific stores.
213
+
214
+ Connection setup uses the existing `connections:write` and `secrets:write`
215
+ permissions and native owner checks, including authorized agent attempts for
216
+ shared connections. Personal setup requires the verified owner, and
217
+ organization setup requires its admin. List/read/write operations always use
218
+ the registered connection endpoint, not a per-call URL chosen by a tool caller.
219
+
220
+ `getVaultProviderCatalog` includes deployment availability even before anyone
221
+ connects; disable unavailable setup choices instead of collecting credentials
222
+ that this deployment cannot use. `listVaultProviderConnections` remains a
223
+ metadata-only convenience when only existing connections are needed.
224
+
225
+ For a remote host, use `createExternalVaultReceiver` from the server-only
226
+ `@opengeni/sdk/external-vault-receiver` subpath and a durable atomic replay and
227
+ mutation store. The in-memory store is only for local tests. Its
228
+ `resolveConnection` binds the native connection to one fixed host inventory;
229
+ `authorize` checks the mapped person on every operation. If the host must
230
+ register the native connection ID first, install returns saved/pending setup;
231
+ register that ID, then verify. Never accept all unknown connections into one
232
+ default tenant to avoid this registration step.
233
+
234
+ Provider capabilities are granular: do not assume every read-write vault can
235
+ update TOTP, upload files, restore history or archive items. Distinguish cached
236
+ metadata from live value reads. Incomplete discovery or an unavailable source
237
+ is not proof that the user has no matching secret. For a saved-but-pending
238
+ setup (`discoveryPending: true`), use `verifyVaultProviderConnection` with the
239
+ connection ID rather than resubmitting a consumed bootstrap token.
240
+
241
+ The native secret ask card still saves to hosted vaults only. If the host must
242
+ own collection, collect in the host UI and expose the saved item via its
243
+ provider. Keep short-lived per-attempt credentials on the existing renewable
244
+ credential callback: a stored item does not replace expiry/renewal, Git/MCP
245
+ transport bindings or cleanup. See the product's external-vault and credential
246
+ provider documentation before implementing either path.
@@ -5,10 +5,8 @@ description: Use when signing in, creating accounts, storing or using passwords,
5
5
 
6
6
  # Secrets: sign in and use credentials yourself
7
7
 
8
- You are trusted with the user's vaults. Act on your own: sign in, create
9
- accounts when the task allows it, enroll your own 2FA, fetch email and SMS
10
- codes, and solve CAPTCHAs. You never need to see a value: write a reference and
11
- it resolves where it runs.
8
+ Use references instead of viewing values. Sign in, create accounts when the
9
+ task allows it, enroll 2FA, fetch codes and solve CAPTCHAs yourself.
12
10
 
13
11
  ## References
14
12
 
@@ -30,16 +28,15 @@ The `secret_*` tools take references as names and never resolve them.
30
28
 
31
29
  ## Tools
32
30
 
33
- - `secret_search {query?, website?, type?, vault?, cursor?}`: items and
34
- references, never values; no filters lists all, page one lists vaults.
35
- Repeat with `cursor` while `nextCursor` is set.
36
- - `secret_save {item, vault?, saveTo?, type?, websites?, username?, fields?, mode?}`:
37
- each field takes one of `value`, `generate`, `fromReference` or
38
- `restoreVersion`. Use `generate` for new passwords.
39
- - `secret_move {reference, toVault, mode, newName?}`: move or copy an item.
40
- - `secret_delete {reference}`: archive an item.
41
- - `secret_get {reference}`: plaintext, only with `secrets:read`. Use it only
42
- when a tool cannot take a reference.
31
+ - `secret_search`: metadata and references, never values. No filters lists all;
32
+ page one lists vaults. Follow `nextCursor` with unchanged filters. Check
33
+ `complete` and freshness before inferring absence. `refresh: true` requests
34
+ fresh inventory without bypassing rate limits.
35
+ - `secret_save`: each field takes `value`, `generate`, `fromReference` or
36
+ `restoreVersion`. Generate new passwords.
37
+ - `secret_move`: move or copy to another vault.
38
+ - `secret_delete`: archive an item.
39
+ - `secret_get`: plaintext with `secrets:read`, only if references cannot work.
43
40
 
44
41
  ## Login ladder
45
42
 
@@ -65,9 +62,9 @@ after one failure.
65
62
 
66
63
  - `saveTo`: `user` (Only me, reused later), `task` (throwaway, shared with this
67
64
  task's sessions) or `workspace` (team keys, schedules that run without you).
68
- - Name items after the service and account ("GitHub", "GitHub ops bot") and
69
- record `websites` and `username`.
70
- - Move an item with `secret_move` when a schedule or teammate needs it.
65
+ - Name items by service/account; record `websites` and `username`.
66
+ - Respect provider capabilities. Ask cards save to hosted vaults only.
67
+ Provider write and move limits: `references/troubleshooting.md`.
71
68
 
72
69
  ## Missing secrets and errors
73
70
 
@@ -75,12 +72,16 @@ A tool result with `secret_reference_error` ran nothing. For a missing secret
75
72
  it includes `askCard`: call `request_human_input` with it, changing only
76
73
  `saveTo` or `prompt`, then retry with the returned reference.
77
74
 
75
+ An unavailable or incomplete provider is not a missing secret: respect retry
76
+ times or reconnect/unlock it. Inspect unknown write outcomes before retrying;
77
+ never repeat a create just because its inventory refresh failed.
78
+
78
79
  ## Playbooks
79
80
 
80
- - `references/login-playbook.md`: browser sign-in, codes, CAPTCHAs.
81
- - `references/account-creation.md`: sign-ups and generated passwords.
82
- - `references/2fa-enrollment.md`: enroll and use your own TOTP.
83
- - `references/api-keys.md`: CLIs, env vars, config files, `secretfile`.
84
- - `references/ask-card.md`: the `kind: "secret"` question.
85
- - `references/troubleshooting.md`: every error code and what to do.
86
- - `references/codemode-and-scripts.md`: escaping in `ogtool` and scripts.
81
+ - Login: `references/login-playbook.md`.
82
+ - Sign-up: `references/account-creation.md`.
83
+ - TOTP: `references/2fa-enrollment.md`.
84
+ - CLI/files: `references/api-keys.md`.
85
+ - Secret card: `references/ask-card.md`.
86
+ - Errors: `references/troubleshooting.md`.
87
+ - Escaping: `references/codemode-and-scripts.md`.
@@ -23,6 +23,21 @@ and a `hint`. Fix the reference and retry the same action.
23
23
 
24
24
  ## Save and vault errors
25
25
 
26
+ Connected providers advertise their supported operations. Do not work around a
27
+ read-only or unsupported operation by exposing values in logs or process
28
+ arguments. A move requires recoverable removal at the source; a copy may still
29
+ be supported without it. Ask cards save to hosted vaults only.
30
+
31
+ An offline, locked, rate-limited or incomplete source is not proof that a secret
32
+ is missing. Check search `complete` and source freshness, preserve filters while
33
+ paging, and request `refresh: true` deliberately. It respects rate limits. Report
34
+ the reconnect or unlock action rather than asking for the secret again.
35
+
36
+ For `provider_outcome_unknown`, inspect the provider before retrying: a write
37
+ may already have succeeded. `provider_inventory_incomplete` with `saved: true`
38
+ means the write succeeded but the subsequent inventory refresh failed. Refresh
39
+ the inventory; never automatically repeat the create.
40
+
26
41
  | Error | What to do |
27
42
  |---|---|
28
43
  | `vault_read_only` | A connected vault is read-only. Save to an Opengeni vault (`saveTo` without `vault`) or ask the user to make it writable. |