@runtypelabs/sdk 11.20.1 → 11.22.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/dist/index.cjs CHANGED
@@ -14832,7 +14832,7 @@ function transformQueryParams(params) {
14832
14832
  return result;
14833
14833
  }
14834
14834
  // src/version.ts
14835
- const SDK_VERSION = "11.20.1";
14835
+ const SDK_VERSION = "11.22.0";
14836
14836
  /**
14837
14837
  * Canonical client identity the API uses for attribution
14838
14838
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/dist/index.d.cts CHANGED
@@ -10145,6 +10145,11 @@ interface paths {
10145
10145
  untrustedContentHint?: boolean;
10146
10146
  }[];
10147
10147
  clientToolsFingerprint?: string;
10148
+ /**
10149
+ * @description Set to `socket` to receive this turn on the client session socket named by `realtime` in the init response, instead of in this response. When the server honors it, the response is `202 {executionId, conversationId, delivery: "socket"}`. Otherwise the turn streams over Server-Sent Events as usual.
10150
+ * @enum {string}
10151
+ */
10152
+ delivery?: "socket";
10148
10153
  /** @description Customer-native auth proof for the Identity Exchange. When present and the surface has a matching integration, the verified tenant/end-user replace any body-asserted tenant/endUser (which are never trusted for web-embedded callers). A proof that fails verification is rejected with 401 `invalid_identity_proof`. */
10149
10154
  identityProof?: {
10150
10155
  provider: string;
@@ -10217,7 +10222,7 @@ interface paths {
10217
10222
  "text/event-stream": unknown;
10218
10223
  };
10219
10224
  };
10220
- /** @description Input accepted without a new response stream: a steer receipt from the running execution, or (for `auto`) a queued handle for the next turn */
10225
+ /** @description Input accepted without a new response stream: a steer receipt from the running execution, (for `auto`) a queued handle for the next turn, or, with `delivery: "socket"`, a turn whose events arrive on the client session socket */
10221
10226
  202: {
10222
10227
  headers: {
10223
10228
  [name: string]: unknown;
@@ -10242,7 +10247,7 @@ interface paths {
10242
10247
  status: string;
10243
10248
  } & {
10244
10249
  [key: string]: unknown;
10245
- });
10250
+ }) | components["schemas"]["ClientSocketDeliveryAccepted"];
10246
10251
  };
10247
10252
  };
10248
10253
  /** @description Validation error */
@@ -11337,6 +11342,13 @@ interface paths {
11337
11342
  /** @description Flow name. Present only for a flow session; the agent branch returns `id` alone because the widget does not render either field. */
11338
11343
  name?: string;
11339
11344
  };
11345
+ /** @description Present when this conversation can receive its turns on the client session socket. Send `delivery: "socket"` on chat and resume to use it. Without this field, stream over Server-Sent Events. */
11346
+ realtime?: {
11347
+ /** @description The client session socket protocol, `runtype-client-session-v1`. */
11348
+ protocol: string;
11349
+ /** @description The `wss://` URL to open. Add `protocol`, `sessionId` and `clientVersion` query parameters and offer `runtype.bearer`, the client token and the visitor credential as WebSocket subprotocols. */
11350
+ url: string;
11351
+ };
11340
11352
  /** @description The created (or resumed) client session ID. */
11341
11353
  sessionId: string;
11342
11354
  /** @description The flow or agent this session executes against, resolved server-side. Canonical replacement for `flow.id`, and the exact key to pass as `targetId` when listing or deleting this conversation's history. Matches the value stored on the conversation record; an agent-only token resolves to its agent id. Absent only on the data-only Runtype App branch, which is not chat-capable. */
@@ -11467,6 +11479,11 @@ interface paths {
11467
11479
  untrustedContentHint?: boolean;
11468
11480
  }[];
11469
11481
  clientToolsFingerprint?: string;
11482
+ /**
11483
+ * @description Set to `socket` to receive the resumed turn on the client session socket. When the server honors it, the response is `202 {executionId, conversationId, delivery: "socket"}`. Otherwise the resumed turn streams as usual.
11484
+ * @enum {string}
11485
+ */
11486
+ delivery?: "socket";
11470
11487
  executionId: string;
11471
11488
  messages?: {
11472
11489
  content: string | ({
@@ -11516,6 +11533,19 @@ interface paths {
11516
11533
  "text/event-stream": unknown;
11517
11534
  };
11518
11535
  };
11536
+ /** @description The resumed turn is running without a response stream: with `delivery: "socket"` its events arrive on the client session socket; otherwise read them from the conversation events stream */
11537
+ 202: {
11538
+ headers: {
11539
+ [name: string]: unknown;
11540
+ };
11541
+ content: {
11542
+ "application/json": components["schemas"]["ClientSocketDeliveryAccepted"] | {
11543
+ executionId: string;
11544
+ /** @enum {string} */
11545
+ status: "running";
11546
+ };
11547
+ };
11548
+ };
11519
11549
  /** @description Validation error */
11520
11550
  400: {
11521
11551
  headers: {
@@ -61919,6 +61949,17 @@ interface components {
61919
61949
  /** @enum {string} */
61920
61950
  status: "pending" | "applied" | "settled" | "not_applied";
61921
61951
  };
61952
+ ClientSocketDeliveryAccepted: {
61953
+ /** @description The conversation the socket is open on. */
61954
+ conversationId: string;
61955
+ /**
61956
+ * @description Always `socket`: this response carries no events; read them from the socket.
61957
+ * @enum {string}
61958
+ */
61959
+ delivery: "socket";
61960
+ /** @description The turn whose events arrive on the client session socket. */
61961
+ executionId: string;
61962
+ };
61922
61963
  CollectionEnsureConflict: {
61923
61964
  /** @enum {string} */
61924
61965
  code: "external_modification" | "remote_changed";
@@ -80020,6 +80061,11 @@ interface SimulationEpisodeMetrics {
80020
80061
  interruptedMidTurn?: true;
80021
80062
  /** The episode ended `agent_error` because the client model's provider stalled after its retries; unscored. */
80022
80063
  clientModelStall?: true;
80064
+ /** The read a `recording_miss` episode stopped on; upload its answer, then repair the run to play it again. */
80065
+ recordingMiss?: {
80066
+ tool: string;
80067
+ arguments?: Record<string, unknown>;
80068
+ };
80023
80069
  scoringFailed?: true;
80024
80070
  /** Scoring failed because no goal-judge attempt returned a valid verdict: the judge, not the episode, gave no verdict. */
80025
80071
  goalJudgeModelError?: true;
package/dist/index.d.ts CHANGED
@@ -10145,6 +10145,11 @@ interface paths {
10145
10145
  untrustedContentHint?: boolean;
10146
10146
  }[];
10147
10147
  clientToolsFingerprint?: string;
10148
+ /**
10149
+ * @description Set to `socket` to receive this turn on the client session socket named by `realtime` in the init response, instead of in this response. When the server honors it, the response is `202 {executionId, conversationId, delivery: "socket"}`. Otherwise the turn streams over Server-Sent Events as usual.
10150
+ * @enum {string}
10151
+ */
10152
+ delivery?: "socket";
10148
10153
  /** @description Customer-native auth proof for the Identity Exchange. When present and the surface has a matching integration, the verified tenant/end-user replace any body-asserted tenant/endUser (which are never trusted for web-embedded callers). A proof that fails verification is rejected with 401 `invalid_identity_proof`. */
10149
10154
  identityProof?: {
10150
10155
  provider: string;
@@ -10217,7 +10222,7 @@ interface paths {
10217
10222
  "text/event-stream": unknown;
10218
10223
  };
10219
10224
  };
10220
- /** @description Input accepted without a new response stream: a steer receipt from the running execution, or (for `auto`) a queued handle for the next turn */
10225
+ /** @description Input accepted without a new response stream: a steer receipt from the running execution, (for `auto`) a queued handle for the next turn, or, with `delivery: "socket"`, a turn whose events arrive on the client session socket */
10221
10226
  202: {
10222
10227
  headers: {
10223
10228
  [name: string]: unknown;
@@ -10242,7 +10247,7 @@ interface paths {
10242
10247
  status: string;
10243
10248
  } & {
10244
10249
  [key: string]: unknown;
10245
- });
10250
+ }) | components["schemas"]["ClientSocketDeliveryAccepted"];
10246
10251
  };
10247
10252
  };
10248
10253
  /** @description Validation error */
@@ -11337,6 +11342,13 @@ interface paths {
11337
11342
  /** @description Flow name. Present only for a flow session; the agent branch returns `id` alone because the widget does not render either field. */
11338
11343
  name?: string;
11339
11344
  };
11345
+ /** @description Present when this conversation can receive its turns on the client session socket. Send `delivery: "socket"` on chat and resume to use it. Without this field, stream over Server-Sent Events. */
11346
+ realtime?: {
11347
+ /** @description The client session socket protocol, `runtype-client-session-v1`. */
11348
+ protocol: string;
11349
+ /** @description The `wss://` URL to open. Add `protocol`, `sessionId` and `clientVersion` query parameters and offer `runtype.bearer`, the client token and the visitor credential as WebSocket subprotocols. */
11350
+ url: string;
11351
+ };
11340
11352
  /** @description The created (or resumed) client session ID. */
11341
11353
  sessionId: string;
11342
11354
  /** @description The flow or agent this session executes against, resolved server-side. Canonical replacement for `flow.id`, and the exact key to pass as `targetId` when listing or deleting this conversation's history. Matches the value stored on the conversation record; an agent-only token resolves to its agent id. Absent only on the data-only Runtype App branch, which is not chat-capable. */
@@ -11467,6 +11479,11 @@ interface paths {
11467
11479
  untrustedContentHint?: boolean;
11468
11480
  }[];
11469
11481
  clientToolsFingerprint?: string;
11482
+ /**
11483
+ * @description Set to `socket` to receive the resumed turn on the client session socket. When the server honors it, the response is `202 {executionId, conversationId, delivery: "socket"}`. Otherwise the resumed turn streams as usual.
11484
+ * @enum {string}
11485
+ */
11486
+ delivery?: "socket";
11470
11487
  executionId: string;
11471
11488
  messages?: {
11472
11489
  content: string | ({
@@ -11516,6 +11533,19 @@ interface paths {
11516
11533
  "text/event-stream": unknown;
11517
11534
  };
11518
11535
  };
11536
+ /** @description The resumed turn is running without a response stream: with `delivery: "socket"` its events arrive on the client session socket; otherwise read them from the conversation events stream */
11537
+ 202: {
11538
+ headers: {
11539
+ [name: string]: unknown;
11540
+ };
11541
+ content: {
11542
+ "application/json": components["schemas"]["ClientSocketDeliveryAccepted"] | {
11543
+ executionId: string;
11544
+ /** @enum {string} */
11545
+ status: "running";
11546
+ };
11547
+ };
11548
+ };
11519
11549
  /** @description Validation error */
11520
11550
  400: {
11521
11551
  headers: {
@@ -61919,6 +61949,17 @@ interface components {
61919
61949
  /** @enum {string} */
61920
61950
  status: "pending" | "applied" | "settled" | "not_applied";
61921
61951
  };
61952
+ ClientSocketDeliveryAccepted: {
61953
+ /** @description The conversation the socket is open on. */
61954
+ conversationId: string;
61955
+ /**
61956
+ * @description Always `socket`: this response carries no events; read them from the socket.
61957
+ * @enum {string}
61958
+ */
61959
+ delivery: "socket";
61960
+ /** @description The turn whose events arrive on the client session socket. */
61961
+ executionId: string;
61962
+ };
61922
61963
  CollectionEnsureConflict: {
61923
61964
  /** @enum {string} */
61924
61965
  code: "external_modification" | "remote_changed";
@@ -80020,6 +80061,11 @@ interface SimulationEpisodeMetrics {
80020
80061
  interruptedMidTurn?: true;
80021
80062
  /** The episode ended `agent_error` because the client model's provider stalled after its retries; unscored. */
80022
80063
  clientModelStall?: true;
80064
+ /** The read a `recording_miss` episode stopped on; upload its answer, then repair the run to play it again. */
80065
+ recordingMiss?: {
80066
+ tool: string;
80067
+ arguments?: Record<string, unknown>;
80068
+ };
80023
80069
  scoringFailed?: true;
80024
80070
  /** Scoring failed because no goal-judge attempt returned a valid verdict: the judge, not the episode, gave no verdict. */
80025
80071
  goalJudgeModelError?: true;
package/dist/index.mjs CHANGED
@@ -14831,7 +14831,7 @@ function transformQueryParams(params) {
14831
14831
  return result;
14832
14832
  }
14833
14833
  // src/version.ts
14834
- const SDK_VERSION = "11.20.1";
14834
+ const SDK_VERSION = "11.22.0";
14835
14835
  /**
14836
14836
  * Canonical client identity the API uses for attribution
14837
14837
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "11.20.1",
3
+ "version": "11.22.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {},
26
26
  "devDependencies": {
27
- "@runtypelabs/shared": "3.117.0",
27
+ "@runtypelabs/shared": "3.119.0",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.2",
30
30
  "typescript": "^6.0.3",