@opengeni/sdk 4.3.3-canary.39786771332001 → 4.5.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 +27 -0
- package/dist/adapters/next.js +2 -2
- package/dist/artifacts.js +4 -4
- package/dist/browser.d.ts +2 -0
- package/dist/browser.js +5 -3
- package/dist/chat/index.js +5 -5
- package/dist/{chunk-U3QZ5ND6.js → chunk-ARDVIZIJ.js} +2 -2
- package/dist/{chunk-DZU2GRJQ.js → chunk-BXMNDWAN.js} +256 -78
- package/dist/chunk-BXMNDWAN.js.map +1 -0
- package/dist/{chunk-LGXOUXWR.js → chunk-GRUMGFK6.js} +2 -2
- package/dist/{chunk-OIRAZ44Q.js → chunk-JBAGMSN2.js} +79 -20
- package/dist/chunk-JBAGMSN2.js.map +1 -0
- package/dist/{chunk-35S72HAE.js → chunk-U4JUWOZV.js} +5 -5
- package/dist/{chunk-GSLNG5KV.js → chunk-V4AIZAFF.js} +1 -1
- package/dist/chunk-V4AIZAFF.js.map +1 -0
- package/dist/{chunk-C7UMWRKU.js → chunk-VSOXNL3T.js} +2 -2
- package/dist/{chunk-D5FPXMF4.js → chunk-WI3WUT5H.js} +2 -2
- package/dist/client.d.ts +24 -1
- package/dist/codex-realtime-controller.js +1 -1
- package/dist/core.d.ts +2 -0
- package/dist/core.js +5 -3
- package/dist/document-authority.js +3 -3
- package/dist/editable-artifacts.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +35 -33
- package/dist/index.js.map +1 -1
- package/dist/read-retry.d.ts +61 -0
- package/dist/realtime.js +5 -5
- package/dist/session-proxy.d.ts +6 -1
- package/dist/session-proxy.js +2 -2
- package/dist/site-bridge-host.js +3 -3
- 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/types.d.ts +42 -0
- package/dist/workspace-artifacts.d.ts +5 -0
- package/dist/workspace-live-stream.d.ts +7 -0
- package/package.json +3 -3
- package/src/browser.ts +2 -0
- package/src/client.ts +191 -73
- package/src/core.ts +2 -0
- package/src/index.ts +4 -0
- package/src/read-retry.ts +207 -0
- package/src/session-proxy.ts +115 -14
- package/src/site-browser-runtime.gen.ts +1 -1
- package/src/types.ts +40 -0
- package/src/workspace-artifacts.ts +6 -0
- package/src/workspace-live-stream.ts +12 -1
- package/dist/chunk-DZU2GRJQ.js.map +0 -1
- package/dist/chunk-GSLNG5KV.js.map +0 -1
- package/dist/chunk-OIRAZ44Q.js.map +0 -1
- /package/dist/{chunk-U3QZ5ND6.js.map → chunk-ARDVIZIJ.js.map} +0 -0
- /package/dist/{chunk-LGXOUXWR.js.map → chunk-GRUMGFK6.js.map} +0 -0
- /package/dist/{chunk-35S72HAE.js.map → chunk-U4JUWOZV.js.map} +0 -0
- /package/dist/{chunk-C7UMWRKU.js.map → chunk-VSOXNL3T.js.map} +0 -0
- /package/dist/{chunk-D5FPXMF4.js.map → chunk-WI3WUT5H.js.map} +0 -0
package/README.md
CHANGED
|
@@ -1332,6 +1332,33 @@ unexpected successful non-JSON response to a mutation has `outcomeUnknown:
|
|
|
1332
1332
|
true` because the mutation might already have been accepted. Never turn that
|
|
1333
1333
|
condition into a new operation by changing its idempotency key.
|
|
1334
1334
|
|
|
1335
|
+
### Transient read retry
|
|
1336
|
+
|
|
1337
|
+
Safe JSON reads (`GET` and `HEAD`) that fail transiently are retried quietly
|
|
1338
|
+
inside a small budget, so an API rolling deploy or a short network blip does
|
|
1339
|
+
not surface as an error. A failure is transient when the request never got a
|
|
1340
|
+
response (`fetch` rejected with a `TypeError`, such as a reset connection) or a
|
|
1341
|
+
gateway answered `502`, `503` or `504`. Retries use jittered exponential
|
|
1342
|
+
backoff, or the server's `Retry-After` when it fits the budget, and stop as
|
|
1343
|
+
soon as the caller's signal aborts. Every attempt of one call carries the same
|
|
1344
|
+
correlation ID. Mutations are never retried; they keep the `outcomeUnknown`
|
|
1345
|
+
semantics above. Auth, permission, not-found, validation, rate-limit and other
|
|
1346
|
+
server errors, and a success response the client cannot accept, surface
|
|
1347
|
+
immediately. A `Retry-After` gets up to 20% extra spread so clients told the
|
|
1348
|
+
same instant do not return together.
|
|
1349
|
+
|
|
1350
|
+
```ts
|
|
1351
|
+
const client = new OpenGeniClient({
|
|
1352
|
+
baseUrl,
|
|
1353
|
+
// Defaults: 4 attempts, 250 ms first backoff, 2000 ms backoff cap, 5000 ms total.
|
|
1354
|
+
readRetry: { maxAttempts: 4, initialDelayMs: 250, maxDelayMs: 2_000, maxElapsedMs: 5_000 },
|
|
1355
|
+
// readRetry: false turns it off.
|
|
1356
|
+
});
|
|
1357
|
+
```
|
|
1358
|
+
|
|
1359
|
+
`isTransientRequestError(error)` reports whether an error is this kind of
|
|
1360
|
+
transient failure, for callers that keep their own longer retry loop.
|
|
1361
|
+
|
|
1335
1362
|
## Streaming guarantees
|
|
1336
1363
|
|
|
1337
1364
|
`client.streamEvents(...)` (and the underlying `streamSessionEvents`) delivers
|
package/dist/adapters/next.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSessionProxyHandler
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-JBAGMSN2.js";
|
|
4
4
|
import "../chunk-UM4ZXXJR.js";
|
|
5
5
|
import "../chunk-QGEIL4TR.js";
|
|
6
6
|
import "../chunk-72YZCZWF.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-V4AIZAFF.js";
|
|
8
8
|
import "../chunk-ODKRQUWR.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-ARDVIZIJ.js";
|
|
4
|
+
import "./chunk-WI3WUT5H.js";
|
|
5
|
+
import "./chunk-BXMNDWAN.js";
|
|
6
6
|
import "./chunk-X5ITQVXE.js";
|
|
7
7
|
import "./chunk-72YZCZWF.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-V4AIZAFF.js";
|
|
9
9
|
import "./chunk-POYRW6KT.js";
|
|
10
10
|
import "./chunk-ODKRQUWR.js";
|
|
11
11
|
export {
|
package/dist/browser.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type { OpenGeniGeneratedTools, OpenGeniDynamicToolNode, OpenGeniToolCallO
|
|
|
6
6
|
export type { FetchLike, FetchResponse, GetSessionOptions, OpenGeniClientOptions, OpenGeniRequestOptions, SendMessageInput, SteerMessageResult, TranscribeAudioInput, WorkspaceControlEventPage, } from "./client.js";
|
|
7
7
|
export { OpenGeniApiContractMismatchError, OpenGeniApiError, OpenGeniSetupError, OpenGeniAllowanceExhaustedError, OpenGeniSessionUsageLimitReachedError, OpenGeniSessionUsageLimitUnsupportedError, OpenGeniSecureContextRequiredError, OpenGeniSessionListCursorError, OpenGeniStreamError, formatErrorMessage, isRetryableStreamError, } from "./errors.js";
|
|
8
8
|
export type { OpenGeniSecureContextRequiredReason } from "./errors.js";
|
|
9
|
+
export { isTransientRequestError } from "./read-retry.js";
|
|
10
|
+
export type { OpenGeniReadRetryOptions } from "./read-retry.js";
|
|
9
11
|
export { resolveWorkspaceVoiceInputEnabled } from "./transcription.js";
|
|
10
12
|
export { OPENGENI_API_CONTRACT_HEADER, OPENGENI_API_CONTRACT_REVISION } from "./types.js";
|
|
11
13
|
export type { ConnectorToolPermission, ConnectorToolPermissionEntry, ConnectorToolPermissionsResponse, UpdateConnectorToolPermissionsRequest, SessionMcpToolPermissionsResponse, UpdateSessionMcpToolPermissionsRequest, } from "./types.js";
|
package/dist/browser.js
CHANGED
|
@@ -7,14 +7,15 @@ import {
|
|
|
7
7
|
OpenGeniToolsClient
|
|
8
8
|
} from "./chunk-ORYDCRFM.js";
|
|
9
9
|
import {
|
|
10
|
-
OpenGeniClient
|
|
11
|
-
|
|
10
|
+
OpenGeniClient,
|
|
11
|
+
isTransientRequestError
|
|
12
|
+
} from "./chunk-BXMNDWAN.js";
|
|
12
13
|
import "./chunk-X5ITQVXE.js";
|
|
13
14
|
import "./chunk-72YZCZWF.js";
|
|
14
15
|
import {
|
|
15
16
|
OPENGENI_API_CONTRACT_HEADER,
|
|
16
17
|
OPENGENI_API_CONTRACT_REVISION
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-V4AIZAFF.js";
|
|
18
19
|
import "./chunk-POYRW6KT.js";
|
|
19
20
|
import {
|
|
20
21
|
OpenGeniAllowanceExhaustedError,
|
|
@@ -47,6 +48,7 @@ export {
|
|
|
47
48
|
OpenGeniToolsClient,
|
|
48
49
|
formatErrorMessage,
|
|
49
50
|
isRetryableStreamError,
|
|
51
|
+
isTransientRequestError,
|
|
50
52
|
resolveWorkspaceVoiceInputEnabled
|
|
51
53
|
};
|
|
52
54
|
//# sourceMappingURL=browser.js.map
|
package/dist/chat/index.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
} from "../chunk-JO6THLOG.js";
|
|
10
10
|
import {
|
|
11
11
|
OpenGeniEmbeddingClient
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-GRUMGFK6.js";
|
|
13
|
+
import "../chunk-ARDVIZIJ.js";
|
|
14
|
+
import "../chunk-WI3WUT5H.js";
|
|
15
15
|
import {
|
|
16
16
|
chatDefaults
|
|
17
17
|
} from "../chunk-UM4ZXXJR.js";
|
|
@@ -24,12 +24,12 @@ import {
|
|
|
24
24
|
humanInputPending,
|
|
25
25
|
stringValue
|
|
26
26
|
} from "../chunk-OV3POE62.js";
|
|
27
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-BXMNDWAN.js";
|
|
28
28
|
import "../chunk-X5ITQVXE.js";
|
|
29
29
|
import {
|
|
30
30
|
parseSseStream
|
|
31
31
|
} from "../chunk-72YZCZWF.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-V4AIZAFF.js";
|
|
33
33
|
import "../chunk-POYRW6KT.js";
|
|
34
34
|
import {
|
|
35
35
|
OpenGeniApiError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenGeniDocumentAuthorityClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WI3WUT5H.js";
|
|
4
4
|
|
|
5
5
|
// src/artifact-client.ts
|
|
6
6
|
var OpenGeniClient = class extends OpenGeniDocumentAuthorityClient {
|
|
@@ -121,4 +121,4 @@ var OpenGeniClient = class extends OpenGeniDocumentAuthorityClient {
|
|
|
121
121
|
export {
|
|
122
122
|
OpenGeniClient
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=chunk-
|
|
124
|
+
//# sourceMappingURL=chunk-ARDVIZIJ.js.map
|