@opengeni/sdk 1.2.1-canary.37222965366001 → 1.4.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.
- package/README.md +35 -4
- package/dist/adapters/next.js +2 -2
- package/dist/artifacts.js +4 -4
- package/dist/azure-live-transport.d.ts +32 -0
- package/dist/browser.js +3 -3
- package/dist/chat/index.js +5 -5
- package/dist/{chunk-5AN2FLNC.js → chunk-BVIIRSJY.js} +42 -3
- package/dist/chunk-BVIIRSJY.js.map +1 -0
- package/dist/{chunk-2VPO6IQC.js → chunk-CA2T7QT4.js} +2 -2
- package/dist/{chunk-TZFJUYCT.js → chunk-D534PIXF.js} +2 -2
- package/dist/{chunk-66AKEWV6.js → chunk-FYQAMXDW.js} +226 -29
- package/dist/chunk-FYQAMXDW.js.map +1 -0
- package/dist/{chunk-WIYAB33K.js → chunk-GYM54GKM.js} +1 -1
- package/dist/chunk-GYM54GKM.js.map +1 -0
- package/dist/{chunk-VYCTL62C.js → chunk-GZQSWAKD.js} +1 -1
- package/dist/chunk-GZQSWAKD.js.map +1 -0
- package/dist/{chunk-2ULNDOLD.js → chunk-LEBDXYMA.js} +2 -2
- package/dist/{chunk-2NIR4WBR.js → chunk-MXV5O25O.js} +2 -2
- package/dist/{chunk-2UXZUCEZ.js → chunk-ZNC44QEX.js} +77 -7
- package/dist/chunk-ZNC44QEX.js.map +1 -0
- package/dist/client.d.ts +19 -1
- package/dist/codex-realtime-controller.d.ts +13 -0
- package/dist/codex-realtime-controller.js +3 -1
- package/dist/codex-realtime-v3-wire.d.ts +3 -2
- package/dist/codex-realtime.d.ts +4 -0
- package/dist/core.js +4 -4
- package/dist/document-authority.js +3 -3
- package/dist/editable-artifacts.js +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +272 -9
- package/dist/index.js.map +1 -1
- package/dist/realtime.d.ts +1 -1
- package/dist/realtime.js +248 -2
- package/dist/realtime.js.map +1 -1
- package/dist/session-proxy-client.d.ts +7 -3
- package/dist/session-proxy.d.ts +41 -7
- package/dist/session-proxy.js +2 -2
- package/dist/site-browser-runtime.gen.d.ts +1 -1
- package/dist/site-document.js +1 -1
- package/dist/site-document.js.map +1 -1
- package/dist/site.js +3 -3
- package/dist/transcription.d.ts +1 -1
- package/dist/types.d.ts +65 -9
- package/package.json +3 -3
- package/src/azure-live-transport.ts +286 -0
- package/src/client.ts +76 -2
- package/src/codex-realtime-controller.ts +95 -2
- package/src/codex-realtime-v3-wire.ts +4 -3
- package/src/codex-realtime-v3.ts +11 -2
- package/src/codex-realtime.ts +9 -1
- package/src/index.ts +18 -0
- package/src/realtime.ts +15 -6
- package/src/session-proxy-client.ts +7 -3
- package/src/session-proxy.ts +334 -34
- package/src/site-browser-runtime.gen.ts +1 -1
- package/src/transcription.ts +3 -0
- package/src/types.ts +67 -7
- package/dist/chunk-2UXZUCEZ.js.map +0 -1
- package/dist/chunk-5AN2FLNC.js.map +0 -1
- package/dist/chunk-66AKEWV6.js.map +0 -1
- package/dist/chunk-VYCTL62C.js.map +0 -1
- package/dist/chunk-WIYAB33K.js.map +0 -1
- /package/dist/{chunk-2VPO6IQC.js.map → chunk-CA2T7QT4.js.map} +0 -0
- /package/dist/{chunk-TZFJUYCT.js.map → chunk-D534PIXF.js.map} +0 -0
- /package/dist/{chunk-2ULNDOLD.js.map → chunk-LEBDXYMA.js.map} +0 -0
- /package/dist/{chunk-2NIR4WBR.js.map → chunk-MXV5O25O.js.map} +0 -0
package/README.md
CHANGED
|
@@ -183,8 +183,16 @@ resolved user server-side, so each user sees only the chats they started;
|
|
|
183
183
|
`sessionList: "visible"` lists every chat OpenGeni lets the user read in the
|
|
184
184
|
workspace, and `false` disables listing. Archive and restore go through
|
|
185
185
|
`updateSessionArchive` unless `archive: false`. A "New chat" in `OpenGeniChat`
|
|
186
|
-
sends
|
|
187
|
-
`
|
|
186
|
+
sends `{ initialMessage, idempotencyKey }` plus any attached file `resources`
|
|
187
|
+
and, unless `modelSelection: false`, the user's explicit model choices, so it
|
|
188
|
+
needs the `createSession` hook. The hook sees them as input; the proxy adds the
|
|
189
|
+
files and applies those choices to the request the hook returns. Voice input
|
|
190
|
+
(`POST .../transcriptions`) is forwarded as the resolved user unless
|
|
191
|
+
`voiceInput: false`. The client config the proxy serves reports what it can do:
|
|
192
|
+
`sessionCreation` (a `createSession` hook exists), `archive`, and `artifacts`
|
|
193
|
+
(`false` unless `artifacts: true`). The stock UI hides "New chat" and
|
|
194
|
+
"Archive" when they are off, shows Site previews as unavailable without a
|
|
195
|
+
request, and shows the composer microphone only when `voiceInput.available`.
|
|
188
196
|
|
|
189
197
|
`listSessionPage` includes personal pinned details by default. A caller with a
|
|
190
198
|
separate `pinsOnly: true` read can pass `includePinned: false` on ordinary pages
|
|
@@ -205,8 +213,14 @@ workspace. Only the native routes `OpenGeniProvider` and the conversation use
|
|
|
205
213
|
are served: client config; workspace read, model catalog, live control stream,
|
|
206
214
|
and workspace Resume; session read/rename, events (list and SSE with
|
|
207
215
|
`Last-Event-ID` resume), send/steer/approval/human-input, queue, composer
|
|
208
|
-
draft, pause/resume
|
|
209
|
-
|
|
216
|
+
draft, pause/resume, and the session goal (read; pause/resume, forwarding only
|
|
217
|
+
`{ status: "paused" | "active" }`; and clear, the proxy's only `DELETE`); and, unless `files: false`, attachment upload and download
|
|
218
|
+
URLs plus the media the session produced (generated images and video,
|
|
219
|
+
published files, and browser or computer screenshots). Workspace-level
|
|
220
|
+
artifact reads (`artifacts/:id/content` with `Range`, `artifacts/:id/playback-source`)
|
|
221
|
+
must name their session in `x-opengeni-session-id`; the proxy runs
|
|
222
|
+
`authorizeSession` and forwards only an artifact OpenGeni proves that session
|
|
223
|
+
produced. Every other route or method is a 404 (cancel and workspace Pause are
|
|
210
224
|
refused); unknown query parameters on served reads pass through. Browser session creation is disabled
|
|
211
225
|
unless you supply `createSession`; the browser may then send only
|
|
212
226
|
`initialMessage` and `idempotencyKey`, and your hook returns the full request
|
|
@@ -1605,3 +1619,20 @@ Hosts, test doubles, and same-origin proxies must import
|
|
|
1605
1619
|
configuration or contract header. Do not copy its string value: the revision is
|
|
1606
1620
|
an executable compatibility boundary, and `getClientConfig()` intentionally
|
|
1607
1621
|
fails closed when server and SDK revisions differ.
|
|
1622
|
+
|
|
1623
|
+
### Action review facts
|
|
1624
|
+
|
|
1625
|
+
`getToolActionReview(workspaceId, sessionId, approvalId)` returns version 1 facts
|
|
1626
|
+
for an exact prepared connector action: title, selected account/count, material
|
|
1627
|
+
effects, optional provider-sourced examples, bounded fields, reason, status and
|
|
1628
|
+
available actions. Use `sendApprovalDecision` for the existing authenticated
|
|
1629
|
+
human decision. Facts never grant execution authority.
|
|
1630
|
+
|
|
1631
|
+
`getToolReviewDetails(workspaceId, sessionId, approvalId, { actionDigest, path,
|
|
1632
|
+
offset })` pages through the saved selection/values (25 rows per page). The
|
|
1633
|
+
reference is tied to the original action digest and requires the same session
|
|
1634
|
+
visibility permission; it never re-runs a search. Secret/write-only fields stay
|
|
1635
|
+
hidden. A missing legacy snapshot may return 404; other authorization or transport
|
|
1636
|
+
failures must not be interpreted as permission to execute. Responses are private
|
|
1637
|
+
and non-cacheable. Review states distinguish waiting, execution, cancellation,
|
|
1638
|
+
failure and uncertain outcome. Exact stored arguments are never client-editable.
|
package/dist/adapters/next.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSessionProxyHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-FYQAMXDW.js";
|
|
4
4
|
import "../chunk-UM4ZXXJR.js";
|
|
5
5
|
import "../chunk-U6CV2SXO.js";
|
|
6
6
|
import "../chunk-APXVSSSY.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-GYM54GKM.js";
|
|
8
8
|
import "../chunk-V6GIY62B.js";
|
|
9
9
|
|
|
10
10
|
// src/adapters/next.ts
|
package/dist/artifacts.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenGeniClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-MXV5O25O.js";
|
|
4
|
+
import "./chunk-CA2T7QT4.js";
|
|
5
|
+
import "./chunk-BVIIRSJY.js";
|
|
6
6
|
import "./chunk-VPVMLM7Q.js";
|
|
7
7
|
import "./chunk-APXVSSSY.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-GYM54GKM.js";
|
|
9
9
|
import "./chunk-NC57YMUO.js";
|
|
10
10
|
import "./chunk-V6GIY62B.js";
|
|
11
11
|
export {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type StartCodexRealtimeWebrtcOptions } from "./codex-realtime.js";
|
|
2
|
+
import type { RealtimeControllerTransportStarter } from "./codex-realtime-controller.js";
|
|
3
|
+
/** Azure Live has timed transcript fragments, not provider-finalized turns. */
|
|
4
|
+
export declare class AzureLiveDataChannel extends EventTarget {
|
|
5
|
+
private readonly raw;
|
|
6
|
+
private readonly drainTimeoutMs;
|
|
7
|
+
private pending;
|
|
8
|
+
private timer;
|
|
9
|
+
private ordinal;
|
|
10
|
+
private readonly prefix;
|
|
11
|
+
private closed;
|
|
12
|
+
private closeSent;
|
|
13
|
+
private providerClosed;
|
|
14
|
+
private readonly delegations;
|
|
15
|
+
private userSinceDelegation;
|
|
16
|
+
private draining;
|
|
17
|
+
private finishDrain;
|
|
18
|
+
private readonly onOpen;
|
|
19
|
+
private readonly onClose;
|
|
20
|
+
private readonly onError;
|
|
21
|
+
private readonly onMessage;
|
|
22
|
+
constructor(raw: RTCDataChannel, drainTimeoutMs?: number);
|
|
23
|
+
get readyState(): RTCDataChannelState;
|
|
24
|
+
asRtcDataChannel(): RTCDataChannel;
|
|
25
|
+
private emit;
|
|
26
|
+
private flush;
|
|
27
|
+
private receive;
|
|
28
|
+
send(payload: string): void;
|
|
29
|
+
drain(): Promise<void>;
|
|
30
|
+
close(): void;
|
|
31
|
+
}
|
|
32
|
+
export declare function createAzureLiveTransportStarter(options?: Pick<StartCodexRealtimeWebrtcOptions, "remoteAudio" | "createPeerConnection">): RealtimeControllerTransportStarter;
|
package/dist/browser.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveWorkspaceVoiceInputEnabled
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GZQSWAKD.js";
|
|
4
4
|
import {
|
|
5
5
|
OpenGeniToolCallError,
|
|
6
6
|
OpenGeniToolReapprovalRequiredError,
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
} from "./chunk-4SMEOV3P.js";
|
|
9
9
|
import {
|
|
10
10
|
OpenGeniClient
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BVIIRSJY.js";
|
|
12
12
|
import "./chunk-VPVMLM7Q.js";
|
|
13
13
|
import "./chunk-APXVSSSY.js";
|
|
14
14
|
import {
|
|
15
15
|
OPENGENI_API_CONTRACT_HEADER,
|
|
16
16
|
OPENGENI_API_CONTRACT_REVISION
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GYM54GKM.js";
|
|
18
18
|
import "./chunk-NC57YMUO.js";
|
|
19
19
|
import {
|
|
20
20
|
OpenGeniAllowanceExhaustedError,
|
package/dist/chat/index.js
CHANGED
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
EMPTY_FINAL_REPLY_NOTICE,
|
|
12
12
|
OpenGeniEmbeddingClient,
|
|
13
13
|
turnCompletedWithEmptyFinalReply
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-D534PIXF.js";
|
|
15
|
+
import "../chunk-MXV5O25O.js";
|
|
16
|
+
import "../chunk-CA2T7QT4.js";
|
|
17
17
|
import {
|
|
18
18
|
chatDefaults
|
|
19
19
|
} from "../chunk-UM4ZXXJR.js";
|
|
20
|
-
import "../chunk-
|
|
20
|
+
import "../chunk-BVIIRSJY.js";
|
|
21
21
|
import "../chunk-VPVMLM7Q.js";
|
|
22
22
|
import {
|
|
23
23
|
parseSseStream
|
|
24
24
|
} from "../chunk-APXVSSSY.js";
|
|
25
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-GYM54GKM.js";
|
|
26
26
|
import "../chunk-NC57YMUO.js";
|
|
27
27
|
import {
|
|
28
28
|
OpenGeniApiError,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
OPENGENI_API_CONTRACT_REVISION,
|
|
16
16
|
OPENGENI_CORRELATION_HEADER,
|
|
17
17
|
RETAINED_OUTPUT_MAX_PAGE_BYTES
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GYM54GKM.js";
|
|
19
19
|
import {
|
|
20
20
|
OpenGeniInteractionClient,
|
|
21
21
|
decodeComputerFrameMetadataHeader,
|
|
@@ -1011,6 +1011,23 @@ var OpenGeniClient = class {
|
|
|
1011
1011
|
options
|
|
1012
1012
|
);
|
|
1013
1013
|
}
|
|
1014
|
+
async getToolActionReview(workspaceId, sessionId, approvalId) {
|
|
1015
|
+
return await this.requestJson(
|
|
1016
|
+
"GET",
|
|
1017
|
+
`${sessionPath(workspaceId, sessionId)}/tool-reviews/${encodeURIComponent(approvalId)}`
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
async getToolReviewDetails(workspaceId, sessionId, approvalId, options) {
|
|
1021
|
+
const query = new URLSearchParams({
|
|
1022
|
+
actionDigest: options.actionDigest,
|
|
1023
|
+
path: options.path ?? "",
|
|
1024
|
+
offset: String(options.offset ?? 0)
|
|
1025
|
+
});
|
|
1026
|
+
return await this.requestJson(
|
|
1027
|
+
"GET",
|
|
1028
|
+
`${sessionPath(workspaceId, sessionId)}/tool-reviews/${encodeURIComponent(approvalId)}/details?${query}`
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1014
1031
|
/** Exact model-visible prefix captured from the latest provider request. */
|
|
1015
1032
|
async getSessionModelContext(workspaceId, sessionId) {
|
|
1016
1033
|
return await this.requestJson(
|
|
@@ -5079,9 +5096,12 @@ var OpenGeniClient = class {
|
|
|
5079
5096
|
);
|
|
5080
5097
|
}
|
|
5081
5098
|
async getConnectorToolPermissions(workspaceId, capabilityId, options = {}) {
|
|
5099
|
+
const query = new URLSearchParams();
|
|
5100
|
+
if (options.connectionId) query.set("connectionId", options.connectionId);
|
|
5101
|
+
if (options.instanceKey) query.set("instanceKey", options.instanceKey);
|
|
5082
5102
|
return await this.requestJson(
|
|
5083
5103
|
"GET",
|
|
5084
|
-
`/v1/workspaces/${workspaceId}/capabilities/${encodeURIComponent(capabilityId)}/tool-permissions`,
|
|
5104
|
+
`/v1/workspaces/${workspaceId}/capabilities/${encodeURIComponent(capabilityId)}/tool-permissions${query.size ? `?${query}` : ""}`,
|
|
5085
5105
|
void 0,
|
|
5086
5106
|
{},
|
|
5087
5107
|
options
|
|
@@ -5592,6 +5612,25 @@ var OpenGeniClient = class {
|
|
|
5592
5612
|
request
|
|
5593
5613
|
);
|
|
5594
5614
|
}
|
|
5615
|
+
/** List verified local and explicitly organization-shared bots, excluding personal accounts. */
|
|
5616
|
+
async listAvailableOpenGeniSlackBots(workspaceId) {
|
|
5617
|
+
return this.requestJson("GET", `/v1/workspaces/${workspaceId}/connections/slack-bot/available`);
|
|
5618
|
+
}
|
|
5619
|
+
/** Read configured sharing independently of installation credential health. */
|
|
5620
|
+
async getOpenGeniSlackBotOrganizationAccess(workspaceId, connectionId) {
|
|
5621
|
+
return this.requestJson(
|
|
5622
|
+
"GET",
|
|
5623
|
+
`/v1/workspaces/${workspaceId}/connections/${connectionId}/slack-bot/organization-access`
|
|
5624
|
+
);
|
|
5625
|
+
}
|
|
5626
|
+
/** An organization administrator may share an installed bot with authorized workspaces. */
|
|
5627
|
+
async setOpenGeniSlackBotOrganizationAccess(workspaceId, connectionId, request) {
|
|
5628
|
+
return this.requestJson(
|
|
5629
|
+
"PUT",
|
|
5630
|
+
`/v1/workspaces/${workspaceId}/connections/${connectionId}/slack-bot/organization-access`,
|
|
5631
|
+
request
|
|
5632
|
+
);
|
|
5633
|
+
}
|
|
5595
5634
|
/** Start the public Slack installation flow for the workspace-shared OpenGeni bot. */
|
|
5596
5635
|
async startOpenGeniSlackBotInstall(workspaceId, request = {}) {
|
|
5597
5636
|
return await this.requestJson(
|
|
@@ -6801,4 +6840,4 @@ export {
|
|
|
6801
6840
|
parseMediaGenerationResult,
|
|
6802
6841
|
OpenGeniClient
|
|
6803
6842
|
};
|
|
6804
|
-
//# sourceMappingURL=chunk-
|
|
6843
|
+
//# sourceMappingURL=chunk-BVIIRSJY.js.map
|