@runtypelabs/sdk 10.8.0 → 10.8.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/dist/index.cjs CHANGED
@@ -8560,6 +8560,17 @@ var ToolApprovalGrantsEndpoint = class {
8560
8560
  };
8561
8561
  //#endregion
8562
8562
  //#region src/detached-buffered-follow.ts
8563
+ /** The release fields a response body carries, dropping any it does not name. */
8564
+ function releaseFieldsOf(data) {
8565
+ if (typeof data !== "object" || data === null) return {};
8566
+ const record = data;
8567
+ const resolution = record.agentTargetResolution;
8568
+ return {
8569
+ ...typeof record.agentVersionId === "string" ? { agentVersionId: record.agentVersionId } : {},
8570
+ ...typeof record.alias === "string" ? { alias: record.alias } : {},
8571
+ ...resolution === "alias" || resolution === "version" || resolution === "legacy-live-row" ? { agentTargetResolution: resolution } : {}
8572
+ };
8573
+ }
8563
8574
  function isDetachedToolOutputAck(data) {
8564
8575
  if (typeof data !== "object" || data === null) return false;
8565
8576
  const record = data;
@@ -8587,9 +8598,12 @@ function isLocalToolAwait(event) {
8587
8598
  * buffered continuation envelope a non-streaming local-tool loop expects.
8588
8599
  *
8589
8600
  * `after` is the last `seq` the loop had already consumed, so the replay
8590
- * never re-delivers the await the outputs just answered.
8601
+ * never re-delivers the await the outputs just answered. Version fields from
8602
+ * earlier responses (`carried`) and the ack land on the envelope, since the
8603
+ * events stream never repeats them.
8591
8604
  */
8592
- async function followDetachedResume(client, executionId, after) {
8605
+ async function followDetachedResume(client, ack, after, carried = {}) {
8606
+ const { executionId } = ack;
8593
8607
  const open = (cursor, signal) => client.requestStream(buildExecutionEventsPath(executionId, cursor ? { after: cursor } : {}), {
8594
8608
  method: "GET",
8595
8609
  ...signal ? { signal } : {}
@@ -8647,7 +8661,9 @@ async function followDetachedResume(client, executionId, after) {
8647
8661
  executionId,
8648
8662
  events,
8649
8663
  status,
8650
- ...error ? { error } : {}
8664
+ ...error ? { error } : {},
8665
+ ...carried,
8666
+ ...releaseFieldsOf(ack)
8651
8667
  };
8652
8668
  }
8653
8669
  //#endregion
@@ -10220,9 +10236,11 @@ var RuntypeFlowBuilder = class {
10220
10236
  }
10221
10237
  };
10222
10238
  let currentResponse;
10239
+ let carriedRelease = {};
10223
10240
  if (isStreaming) currentResponse = await client.dispatch(config);
10224
10241
  else {
10225
10242
  const data = await client.dispatchJson(config);
10243
+ carriedRelease = releaseFieldsOf(data);
10226
10244
  currentResponse = new Response(JSON.stringify(data), { headers: { "content-type": "application/json" } });
10227
10245
  }
10228
10246
  while (true) {
@@ -10257,7 +10275,11 @@ var RuntypeFlowBuilder = class {
10257
10275
  }).catch(() => null));
10258
10276
  else {
10259
10277
  const data = await client.post("/dispatch/resume", resumeData);
10260
- const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(client, data.executionId, pausedResult.resumeCursor) : data;
10278
+ carriedRelease = {
10279
+ ...carriedRelease,
10280
+ ...releaseFieldsOf(data)
10281
+ };
10282
+ const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(client, data, pausedResult.resumeCursor, carriedRelease) : data;
10261
10283
  currentResponse = new Response(JSON.stringify(envelope), { headers: { "content-type": "application/json" } });
10262
10284
  }
10263
10285
  } catch (error) {
@@ -11433,6 +11455,8 @@ const DEFINE_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
11433
11455
  "icon",
11434
11456
  ...AGENT_CONFIG_KEYS
11435
11457
  ]);
11458
+ /** A minted tool typeid; `alwaysLoaded` also holds tool names, which may begin with `tool_`. */
11459
+ const TOOL_TYPEID_PATTERN = /^tool_[0-7][0-9a-hjkmnp-tv-z]{25}$/;
11436
11460
  /**
11437
11461
  * Collect account-scoped `tool_…` references (inlined copy of
11438
11462
  * `collectNonPortableAgentToolRefs` in @runtypelabs/shared). The v1 ensure
@@ -11459,6 +11483,9 @@ function collectNonPortableToolRefs(config) {
11459
11483
  if (isPlainObject(tools.approval)) scanArray(tools.approval.require, "tools.approval.require");
11460
11484
  if (isPlainObject(tools.subagentConfig)) scanArray(tools.subagentConfig.toolPool, "tools.subagentConfig.toolPool");
11461
11485
  if (isPlainObject(tools.codeModeConfig)) scanArray(tools.codeModeConfig.toolPool, "tools.codeModeConfig.toolPool");
11486
+ if (isPlainObject(tools.toolSearch) && Array.isArray(tools.toolSearch.alwaysLoaded)) tools.toolSearch.alwaysLoaded.forEach((ref, i) => {
11487
+ if (typeof ref === "string" && TOOL_TYPEID_PATTERN.test(ref)) found.push(`tools.toolSearch.alwaysLoaded[${i}]`);
11488
+ });
11462
11489
  if (Array.isArray(tools.runtimeTools)) tools.runtimeTools.forEach((runtimeTool, i) => {
11463
11490
  if (!isPlainObject(runtimeTool) || !isPlainObject(runtimeTool.config)) return;
11464
11491
  const base = `tools.runtimeTools[${i}].config`;
@@ -13498,7 +13525,7 @@ function transformQueryParams(params) {
13498
13525
  }
13499
13526
  //#endregion
13500
13527
  //#region src/version.ts
13501
- const SDK_VERSION = "10.8.0";
13528
+ const SDK_VERSION = "10.8.1";
13502
13529
  /**
13503
13530
  * Canonical client identity the API uses for attribution
13504
13531
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
@@ -13709,9 +13736,11 @@ var RuntypeClient = class {
13709
13736
  }
13710
13737
  };
13711
13738
  let currentResponse;
13739
+ let carriedRelease = {};
13712
13740
  if (isStreaming) currentResponse = await this.dispatch.executeStream(modifiedRequest);
13713
13741
  else {
13714
13742
  const data = await this.dispatch.execute(modifiedRequest);
13743
+ carriedRelease = releaseFieldsOf(data);
13715
13744
  currentResponse = new Response(JSON.stringify(data), { headers: { "content-type": "application/json" } });
13716
13745
  }
13717
13746
  while (true) {
@@ -13745,7 +13774,11 @@ var RuntypeClient = class {
13745
13774
  if (isStreaming) currentResponse = await this.dispatch.resume(resumeData);
13746
13775
  else {
13747
13776
  const data = await this.dispatch.resume(resumeData);
13748
- const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(this, data.executionId, result.resumeCursor) : data;
13777
+ carriedRelease = {
13778
+ ...carriedRelease,
13779
+ ...releaseFieldsOf(data)
13780
+ };
13781
+ const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(this, data, result.resumeCursor, carriedRelease) : data;
13749
13782
  currentResponse = new Response(JSON.stringify(envelope), { headers: { "content-type": "application/json" } });
13750
13783
  }
13751
13784
  } catch (error) {
package/dist/index.d.cts CHANGED
@@ -1204,6 +1204,11 @@ interface paths {
1204
1204
  };
1205
1205
  };
1206
1206
  toolIds?: string[];
1207
+ toolSearch?: {
1208
+ alwaysLoaded?: string[];
1209
+ enabled?: boolean;
1210
+ threshold?: number;
1211
+ };
1207
1212
  };
1208
1213
  topK?: number;
1209
1214
  topP?: number;
@@ -1725,6 +1730,11 @@ interface paths {
1725
1730
  };
1726
1731
  };
1727
1732
  toolIds?: string[];
1733
+ toolSearch?: {
1734
+ alwaysLoaded?: string[];
1735
+ enabled?: boolean;
1736
+ threshold?: number;
1737
+ };
1728
1738
  };
1729
1739
  topK?: number;
1730
1740
  topP?: number;
@@ -2522,6 +2532,11 @@ interface paths {
2522
2532
  };
2523
2533
  };
2524
2534
  toolIds?: string[];
2535
+ toolSearch?: {
2536
+ alwaysLoaded?: string[];
2537
+ enabled?: boolean;
2538
+ threshold?: number;
2539
+ } | null;
2525
2540
  };
2526
2541
  topK?: number;
2527
2542
  topP?: number;
@@ -28736,7 +28751,7 @@ interface paths {
28736
28751
  /** @enum {string} */
28737
28752
  executorProvider?: "openai" | "anthropic" | "google" | "xai" | "vertex" | "vertex-anthropic" | "bedrock" | "tinfoil" | "vercel" | "generic-openai";
28738
28753
  inputCostPer1kTokens: number;
28739
- /** @default 4096 */
28754
+ /** @default 32768 */
28740
28755
  maxOutputTokens?: number;
28741
28756
  /**
28742
28757
  * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
@@ -29407,7 +29422,7 @@ interface paths {
29407
29422
  /** @enum {string} */
29408
29423
  executorProvider?: "openai" | "anthropic" | "google" | "xai" | "vertex" | "vertex-anthropic" | "bedrock" | "tinfoil" | "vercel" | "generic-openai";
29409
29424
  inputCostPer1kTokens: number;
29410
- /** @default 4096 */
29425
+ /** @default 32768 */
29411
29426
  maxOutputTokens?: number;
29412
29427
  /**
29413
29428
  * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
@@ -51005,6 +51020,11 @@ interface components {
51005
51020
  };
51006
51021
  };
51007
51022
  toolIds?: string[];
51023
+ toolSearch?: {
51024
+ alwaysLoaded?: string[];
51025
+ enabled?: boolean;
51026
+ threshold?: number;
51027
+ };
51008
51028
  };
51009
51029
  topK?: number;
51010
51030
  topP?: number;
@@ -51706,6 +51726,11 @@ interface components {
51706
51726
  };
51707
51727
  };
51708
51728
  toolIds?: string[];
51729
+ toolSearch?: {
51730
+ alwaysLoaded?: string[];
51731
+ enabled?: boolean;
51732
+ threshold?: number;
51733
+ } | null;
51709
51734
  };
51710
51735
  topK?: number;
51711
51736
  topP?: number;
@@ -51829,7 +51854,12 @@ interface components {
51829
51854
  };
51830
51855
  DispatchAgentJsonResponse: {
51831
51856
  agentExecutionId?: string;
51832
- /** @description The published agent version the run executed. Absent when no stored version ran. */
51857
+ /**
51858
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row. Matches `GET /v1/executions/{executionId}/status`.
51859
+ * @enum {string}
51860
+ */
51861
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
51862
+ /** @description The agent version recorded for the run. When `agentTargetResolution` is `legacy-live-row`, this is the version the agent row pointed at, and the run read the mutable row rather than that version. Absent when neither exists. */
51833
51863
  agentVersionId?: string;
51834
51864
  /** @description The release alias (for example `live`) the version was resolved through, when one was. */
51835
51865
  alias?: string;
@@ -51889,6 +51919,15 @@ interface components {
51889
51919
  status: "running";
51890
51920
  };
51891
51921
  DispatchDetachedToolOutputJsonResponse: {
51922
+ /**
51923
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row. Matches `GET /v1/executions/{executionId}/status`.
51924
+ * @enum {string}
51925
+ */
51926
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
51927
+ /** @description The agent version recorded for the run. When `agentTargetResolution` is `legacy-live-row`, this is the version the agent row pointed at, and the run read the mutable row rather than that version. Absent when neither exists. */
51928
+ agentVersionId?: string;
51929
+ /** @description The release alias (for example `live`) the version was resolved through, when one was. */
51930
+ alias?: string;
51892
51931
  executionId: string;
51893
51932
  /** @enum {string} */
51894
51933
  pauseKind: "client_tool" | "elicitation";
@@ -51939,6 +51978,15 @@ interface components {
51939
51978
  };
51940
51979
  DispatchResumeJsonResponse: components["schemas"]["DispatchToolOutputContinuationJsonResponse"] | components["schemas"]["DispatchDetachedToolOutputJsonResponse"];
51941
51980
  DispatchToolOutputContinuationJsonResponse: {
51981
+ /**
51982
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row. Matches `GET /v1/executions/{executionId}/status`.
51983
+ * @enum {string}
51984
+ */
51985
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
51986
+ /** @description The agent version recorded for the run. When `agentTargetResolution` is `legacy-live-row`, this is the version the agent row pointed at, and the run read the mutable row rather than that version. Absent when neither exists. */
51987
+ agentVersionId?: string;
51988
+ /** @description The release alias (for example `live`) the version was resolved through, when one was. */
51989
+ alias?: string;
51942
51990
  blockReason?: string;
51943
51991
  code?: string;
51944
51992
  error?: string;
@@ -60532,6 +60580,11 @@ interface AgentDefinitionConfig {
60532
60580
  }>;
60533
60581
  subagentConfig?: Record<string, unknown>;
60534
60582
  codeModeConfig?: Record<string, unknown>;
60583
+ toolSearch?: {
60584
+ enabled?: boolean;
60585
+ threshold?: number;
60586
+ alwaysLoaded?: string[];
60587
+ };
60535
60588
  };
60536
60589
  artifacts?: {
60537
60590
  enabled: true;
package/dist/index.d.ts CHANGED
@@ -1204,6 +1204,11 @@ interface paths {
1204
1204
  };
1205
1205
  };
1206
1206
  toolIds?: string[];
1207
+ toolSearch?: {
1208
+ alwaysLoaded?: string[];
1209
+ enabled?: boolean;
1210
+ threshold?: number;
1211
+ };
1207
1212
  };
1208
1213
  topK?: number;
1209
1214
  topP?: number;
@@ -1725,6 +1730,11 @@ interface paths {
1725
1730
  };
1726
1731
  };
1727
1732
  toolIds?: string[];
1733
+ toolSearch?: {
1734
+ alwaysLoaded?: string[];
1735
+ enabled?: boolean;
1736
+ threshold?: number;
1737
+ };
1728
1738
  };
1729
1739
  topK?: number;
1730
1740
  topP?: number;
@@ -2522,6 +2532,11 @@ interface paths {
2522
2532
  };
2523
2533
  };
2524
2534
  toolIds?: string[];
2535
+ toolSearch?: {
2536
+ alwaysLoaded?: string[];
2537
+ enabled?: boolean;
2538
+ threshold?: number;
2539
+ } | null;
2525
2540
  };
2526
2541
  topK?: number;
2527
2542
  topP?: number;
@@ -28736,7 +28751,7 @@ interface paths {
28736
28751
  /** @enum {string} */
28737
28752
  executorProvider?: "openai" | "anthropic" | "google" | "xai" | "vertex" | "vertex-anthropic" | "bedrock" | "tinfoil" | "vercel" | "generic-openai";
28738
28753
  inputCostPer1kTokens: number;
28739
- /** @default 4096 */
28754
+ /** @default 32768 */
28740
28755
  maxOutputTokens?: number;
28741
28756
  /**
28742
28757
  * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
@@ -29407,7 +29422,7 @@ interface paths {
29407
29422
  /** @enum {string} */
29408
29423
  executorProvider?: "openai" | "anthropic" | "google" | "xai" | "vertex" | "vertex-anthropic" | "bedrock" | "tinfoil" | "vercel" | "generic-openai";
29409
29424
  inputCostPer1kTokens: number;
29410
- /** @default 4096 */
29425
+ /** @default 32768 */
29411
29426
  maxOutputTokens?: number;
29412
29427
  /**
29413
29428
  * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
@@ -51005,6 +51020,11 @@ interface components {
51005
51020
  };
51006
51021
  };
51007
51022
  toolIds?: string[];
51023
+ toolSearch?: {
51024
+ alwaysLoaded?: string[];
51025
+ enabled?: boolean;
51026
+ threshold?: number;
51027
+ };
51008
51028
  };
51009
51029
  topK?: number;
51010
51030
  topP?: number;
@@ -51706,6 +51726,11 @@ interface components {
51706
51726
  };
51707
51727
  };
51708
51728
  toolIds?: string[];
51729
+ toolSearch?: {
51730
+ alwaysLoaded?: string[];
51731
+ enabled?: boolean;
51732
+ threshold?: number;
51733
+ } | null;
51709
51734
  };
51710
51735
  topK?: number;
51711
51736
  topP?: number;
@@ -51829,7 +51854,12 @@ interface components {
51829
51854
  };
51830
51855
  DispatchAgentJsonResponse: {
51831
51856
  agentExecutionId?: string;
51832
- /** @description The published agent version the run executed. Absent when no stored version ran. */
51857
+ /**
51858
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row. Matches `GET /v1/executions/{executionId}/status`.
51859
+ * @enum {string}
51860
+ */
51861
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
51862
+ /** @description The agent version recorded for the run. When `agentTargetResolution` is `legacy-live-row`, this is the version the agent row pointed at, and the run read the mutable row rather than that version. Absent when neither exists. */
51833
51863
  agentVersionId?: string;
51834
51864
  /** @description The release alias (for example `live`) the version was resolved through, when one was. */
51835
51865
  alias?: string;
@@ -51889,6 +51919,15 @@ interface components {
51889
51919
  status: "running";
51890
51920
  };
51891
51921
  DispatchDetachedToolOutputJsonResponse: {
51922
+ /**
51923
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row. Matches `GET /v1/executions/{executionId}/status`.
51924
+ * @enum {string}
51925
+ */
51926
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
51927
+ /** @description The agent version recorded for the run. When `agentTargetResolution` is `legacy-live-row`, this is the version the agent row pointed at, and the run read the mutable row rather than that version. Absent when neither exists. */
51928
+ agentVersionId?: string;
51929
+ /** @description The release alias (for example `live`) the version was resolved through, when one was. */
51930
+ alias?: string;
51892
51931
  executionId: string;
51893
51932
  /** @enum {string} */
51894
51933
  pauseKind: "client_tool" | "elicitation";
@@ -51939,6 +51978,15 @@ interface components {
51939
51978
  };
51940
51979
  DispatchResumeJsonResponse: components["schemas"]["DispatchToolOutputContinuationJsonResponse"] | components["schemas"]["DispatchDetachedToolOutputJsonResponse"];
51941
51980
  DispatchToolOutputContinuationJsonResponse: {
51981
+ /**
51982
+ * @description How the run selected its definition: `alias` or `version` for a request that named a selector, `legacy-live-row` for a run that read the mutable agent row. Matches `GET /v1/executions/{executionId}/status`.
51983
+ * @enum {string}
51984
+ */
51985
+ agentTargetResolution?: "alias" | "version" | "legacy-live-row";
51986
+ /** @description The agent version recorded for the run. When `agentTargetResolution` is `legacy-live-row`, this is the version the agent row pointed at, and the run read the mutable row rather than that version. Absent when neither exists. */
51987
+ agentVersionId?: string;
51988
+ /** @description The release alias (for example `live`) the version was resolved through, when one was. */
51989
+ alias?: string;
51942
51990
  blockReason?: string;
51943
51991
  code?: string;
51944
51992
  error?: string;
@@ -60532,6 +60580,11 @@ interface AgentDefinitionConfig {
60532
60580
  }>;
60533
60581
  subagentConfig?: Record<string, unknown>;
60534
60582
  codeModeConfig?: Record<string, unknown>;
60583
+ toolSearch?: {
60584
+ enabled?: boolean;
60585
+ threshold?: number;
60586
+ alwaysLoaded?: string[];
60587
+ };
60535
60588
  };
60536
60589
  artifacts?: {
60537
60590
  enabled: true;
package/dist/index.mjs CHANGED
@@ -8559,6 +8559,17 @@ var ToolApprovalGrantsEndpoint = class {
8559
8559
  };
8560
8560
  //#endregion
8561
8561
  //#region src/detached-buffered-follow.ts
8562
+ /** The release fields a response body carries, dropping any it does not name. */
8563
+ function releaseFieldsOf(data) {
8564
+ if (typeof data !== "object" || data === null) return {};
8565
+ const record = data;
8566
+ const resolution = record.agentTargetResolution;
8567
+ return {
8568
+ ...typeof record.agentVersionId === "string" ? { agentVersionId: record.agentVersionId } : {},
8569
+ ...typeof record.alias === "string" ? { alias: record.alias } : {},
8570
+ ...resolution === "alias" || resolution === "version" || resolution === "legacy-live-row" ? { agentTargetResolution: resolution } : {}
8571
+ };
8572
+ }
8562
8573
  function isDetachedToolOutputAck(data) {
8563
8574
  if (typeof data !== "object" || data === null) return false;
8564
8575
  const record = data;
@@ -8586,9 +8597,12 @@ function isLocalToolAwait(event) {
8586
8597
  * buffered continuation envelope a non-streaming local-tool loop expects.
8587
8598
  *
8588
8599
  * `after` is the last `seq` the loop had already consumed, so the replay
8589
- * never re-delivers the await the outputs just answered.
8600
+ * never re-delivers the await the outputs just answered. Version fields from
8601
+ * earlier responses (`carried`) and the ack land on the envelope, since the
8602
+ * events stream never repeats them.
8590
8603
  */
8591
- async function followDetachedResume(client, executionId, after) {
8604
+ async function followDetachedResume(client, ack, after, carried = {}) {
8605
+ const { executionId } = ack;
8592
8606
  const open = (cursor, signal) => client.requestStream(buildExecutionEventsPath(executionId, cursor ? { after: cursor } : {}), {
8593
8607
  method: "GET",
8594
8608
  ...signal ? { signal } : {}
@@ -8646,7 +8660,9 @@ async function followDetachedResume(client, executionId, after) {
8646
8660
  executionId,
8647
8661
  events,
8648
8662
  status,
8649
- ...error ? { error } : {}
8663
+ ...error ? { error } : {},
8664
+ ...carried,
8665
+ ...releaseFieldsOf(ack)
8650
8666
  };
8651
8667
  }
8652
8668
  //#endregion
@@ -10219,9 +10235,11 @@ var RuntypeFlowBuilder = class {
10219
10235
  }
10220
10236
  };
10221
10237
  let currentResponse;
10238
+ let carriedRelease = {};
10222
10239
  if (isStreaming) currentResponse = await client.dispatch(config);
10223
10240
  else {
10224
10241
  const data = await client.dispatchJson(config);
10242
+ carriedRelease = releaseFieldsOf(data);
10225
10243
  currentResponse = new Response(JSON.stringify(data), { headers: { "content-type": "application/json" } });
10226
10244
  }
10227
10245
  while (true) {
@@ -10256,7 +10274,11 @@ var RuntypeFlowBuilder = class {
10256
10274
  }).catch(() => null));
10257
10275
  else {
10258
10276
  const data = await client.post("/dispatch/resume", resumeData);
10259
- const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(client, data.executionId, pausedResult.resumeCursor) : data;
10277
+ carriedRelease = {
10278
+ ...carriedRelease,
10279
+ ...releaseFieldsOf(data)
10280
+ };
10281
+ const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(client, data, pausedResult.resumeCursor, carriedRelease) : data;
10260
10282
  currentResponse = new Response(JSON.stringify(envelope), { headers: { "content-type": "application/json" } });
10261
10283
  }
10262
10284
  } catch (error) {
@@ -11432,6 +11454,8 @@ const DEFINE_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
11432
11454
  "icon",
11433
11455
  ...AGENT_CONFIG_KEYS
11434
11456
  ]);
11457
+ /** A minted tool typeid; `alwaysLoaded` also holds tool names, which may begin with `tool_`. */
11458
+ const TOOL_TYPEID_PATTERN = /^tool_[0-7][0-9a-hjkmnp-tv-z]{25}$/;
11435
11459
  /**
11436
11460
  * Collect account-scoped `tool_…` references (inlined copy of
11437
11461
  * `collectNonPortableAgentToolRefs` in @runtypelabs/shared). The v1 ensure
@@ -11458,6 +11482,9 @@ function collectNonPortableToolRefs(config) {
11458
11482
  if (isPlainObject(tools.approval)) scanArray(tools.approval.require, "tools.approval.require");
11459
11483
  if (isPlainObject(tools.subagentConfig)) scanArray(tools.subagentConfig.toolPool, "tools.subagentConfig.toolPool");
11460
11484
  if (isPlainObject(tools.codeModeConfig)) scanArray(tools.codeModeConfig.toolPool, "tools.codeModeConfig.toolPool");
11485
+ if (isPlainObject(tools.toolSearch) && Array.isArray(tools.toolSearch.alwaysLoaded)) tools.toolSearch.alwaysLoaded.forEach((ref, i) => {
11486
+ if (typeof ref === "string" && TOOL_TYPEID_PATTERN.test(ref)) found.push(`tools.toolSearch.alwaysLoaded[${i}]`);
11487
+ });
11461
11488
  if (Array.isArray(tools.runtimeTools)) tools.runtimeTools.forEach((runtimeTool, i) => {
11462
11489
  if (!isPlainObject(runtimeTool) || !isPlainObject(runtimeTool.config)) return;
11463
11490
  const base = `tools.runtimeTools[${i}].config`;
@@ -13497,7 +13524,7 @@ function transformQueryParams(params) {
13497
13524
  }
13498
13525
  //#endregion
13499
13526
  //#region src/version.ts
13500
- const SDK_VERSION = "10.8.0";
13527
+ const SDK_VERSION = "10.8.1";
13501
13528
  /**
13502
13529
  * Canonical client identity the API uses for attribution
13503
13530
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
@@ -13708,9 +13735,11 @@ var RuntypeClient = class {
13708
13735
  }
13709
13736
  };
13710
13737
  let currentResponse;
13738
+ let carriedRelease = {};
13711
13739
  if (isStreaming) currentResponse = await this.dispatch.executeStream(modifiedRequest);
13712
13740
  else {
13713
13741
  const data = await this.dispatch.execute(modifiedRequest);
13742
+ carriedRelease = releaseFieldsOf(data);
13714
13743
  currentResponse = new Response(JSON.stringify(data), { headers: { "content-type": "application/json" } });
13715
13744
  }
13716
13745
  while (true) {
@@ -13744,7 +13773,11 @@ var RuntypeClient = class {
13744
13773
  if (isStreaming) currentResponse = await this.dispatch.resume(resumeData);
13745
13774
  else {
13746
13775
  const data = await this.dispatch.resume(resumeData);
13747
- const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(this, data.executionId, result.resumeCursor) : data;
13776
+ carriedRelease = {
13777
+ ...carriedRelease,
13778
+ ...releaseFieldsOf(data)
13779
+ };
13780
+ const envelope = isDetachedToolOutputAck(data) ? await followDetachedResume(this, data, result.resumeCursor, carriedRelease) : data;
13748
13781
  currentResponse = new Response(JSON.stringify(envelope), { headers: { "content-type": "application/json" } });
13749
13782
  }
13750
13783
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "10.8.0",
3
+ "version": "10.8.1",
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.68.1",
27
+ "@runtypelabs/shared": "3.68.2",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.0",
30
30
  "typescript": "^6.0.3",