@opengeni/sdk 0.28.2 → 0.32.1
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 +28 -9
- package/dist/client.d.ts +643 -0
- package/dist/desktop.d.ts +71 -0
- package/dist/errors.d.ts +39 -0
- package/dist/index.d.ts +25 -4209
- package/dist/index.js +195 -3
- package/dist/index.js.map +1 -1
- package/dist/mcp-output.d.ts +15 -0
- package/dist/preference-registry.d.ts +169 -0
- package/dist/proxy.d.ts +64 -0
- package/dist/sse.d.ts +14 -0
- package/dist/stream.d.ts +48 -0
- package/dist/terminal.d.ts +49 -0
- package/dist/transcription.d.ts +189 -0
- package/dist/types.d.ts +3221 -0
- package/dist/workspace-control-stream.d.ts +12 -0
- package/dist/workspace-instruction-policies.d.ts +98 -0
- package/dist/workspace-state.d.ts +122 -0
- package/package.json +3 -3
- package/src/client.ts +279 -2
- package/src/index.ts +67 -0
- package/src/preference-registry.ts +210 -0
- package/src/transcription.ts +16 -0
- package/src/types.ts +269 -13
- package/src/workspace-state.ts +134 -0
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ for await (const event of client.streamEvents(workspaceId, session.id)) {
|
|
|
32
32
|
}
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Omit `firstPartyMcpTools` for the
|
|
35
|
+
Omit `firstPartyMcpTools` for the complete OpenGeni tool catalog. An explicit
|
|
36
36
|
`[]` exposes no broad first-party tools; attached resources and separately
|
|
37
37
|
selected `files`/`docs` MCP servers are unaffected.
|
|
38
38
|
|
|
@@ -210,9 +210,12 @@ await client.sendApprovalDecision(workspaceId, sessionId, { approvalId, decision
|
|
|
210
210
|
## Session tool policy and native web search
|
|
211
211
|
|
|
212
212
|
Omitting `tools` when creating a top-level session selects the current
|
|
213
|
-
workspace-default capability policy
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
workspace-default capability policy, including the built-in `files` server.
|
|
214
|
+
Passing `tools`, including `[]`, is an intentional fixed narrowing and can
|
|
215
|
+
therefore disable file-download access for that session. OpenGeni's own web UI
|
|
216
|
+
keeps `files` enabled as a hidden default, while API and embedded clients retain
|
|
217
|
+
exact control over the explicit list. Supported Responses providers attach
|
|
218
|
+
their native bounded web-search tool independently of this MCP policy.
|
|
216
219
|
|
|
217
220
|
Existing explicit sessions are not widened when a new default capability is
|
|
218
221
|
introduced. Opt one in explicitly with the current optimistic-concurrency
|
|
@@ -222,14 +225,25 @@ version; the audited change takes effect on its next attempt:
|
|
|
222
225
|
const session = await client.getSession(workspaceId, sessionId);
|
|
223
226
|
const updated = await client.updateSessionToolPolicy(workspaceId, sessionId, {
|
|
224
227
|
mode: "workspace_default",
|
|
225
|
-
expectedVersion: session.toolPolicyVersion
|
|
228
|
+
expectedVersion: session.toolPolicyVersion,
|
|
226
229
|
});
|
|
227
230
|
```
|
|
228
231
|
|
|
229
|
-
To keep a fixed
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
To keep a fixed allow-list, replace both connected MCP servers and individual
|
|
233
|
+
OpenGeni tools atomically:
|
|
234
|
+
|
|
235
|
+
```ts
|
|
236
|
+
await client.updateSessionToolPolicy(workspaceId, sessionId, {
|
|
237
|
+
mode: "explicit",
|
|
238
|
+
tools,
|
|
239
|
+
firstPartyMcpTools,
|
|
240
|
+
expectedVersion: session.toolPolicyVersion,
|
|
241
|
+
});
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Follow-up Send and Steer requests inherit this session policy and cannot carry
|
|
245
|
+
a private one-turn tool override. `tool_search` discovers deferred MCP schemas;
|
|
246
|
+
it is not public web search.
|
|
233
247
|
|
|
234
248
|
## Goals
|
|
235
249
|
|
|
@@ -244,6 +258,11 @@ await client.resumeGoal(workspaceId, sessionId); // resets counters, re-arms con
|
|
|
244
258
|
`uploadFile` wraps the three-step flow (begin → signed PUT → complete) in one
|
|
245
259
|
call; the lower-level steps are exported for resumable/custom flows.
|
|
246
260
|
|
|
261
|
+
Browser hosts need no storage credentials or per-application registration.
|
|
262
|
+
OpenGeni authorizes the workspace request and returns a short-lived,
|
|
263
|
+
object-scoped signed URL; operators must configure the private object store to
|
|
264
|
+
allow CORS from `*` so any product embedding the SDK can use that URL.
|
|
265
|
+
|
|
247
266
|
```ts
|
|
248
267
|
const file = await client.uploadFile(workspaceId, {
|
|
249
268
|
filename: "incident-notes.md",
|