@runtypelabs/sdk 11.13.2 → 11.15.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
@@ -1999,6 +1999,7 @@ function withDetachedReconnect(response, reattach, options = {}) {
1999
1999
  };
2000
2000
  let current = response;
2001
2001
  let legs = 0;
2002
+ let legFailure;
2002
2003
  const enqueue = (chunk) => {
2003
2004
  if (cancelled) return;
2004
2005
  controller.enqueue(chunk);
@@ -2054,9 +2055,14 @@ function withDetachedReconnect(response, reattach, options = {}) {
2054
2055
  break;
2055
2056
  }
2056
2057
  }
2058
+ } catch (error) {
2059
+ legFailure = { error };
2057
2060
  } finally {
2058
2061
  activeReader = null;
2059
- if (!cancelled) controller.close();
2062
+ if (!cancelled) {
2063
+ if (legFailure) controller.error(legFailure.error);
2064
+ else controller.close();
2065
+ }
2060
2066
  }
2061
2067
  },
2062
2068
  async cancel(reason) {
@@ -5939,6 +5945,12 @@ var ClientTokensEndpoint = class {
5939
5945
  return this.client.post(`/client-tokens/${id}/regenerate`);
5940
5946
  }
5941
5947
  /**
5948
+ * Permanently revoke a client token. Unlike `update(id, { isActive: false })`, it can never be re-enabled.
5949
+ */
5950
+ async revoke(id) {
5951
+ return this.client.post(`/client-tokens/${id}/revoke`);
5952
+ }
5953
+ /**
5942
5954
  * Get the plain token value for a client token
5943
5955
  *
5944
5956
  * Note: Only works if the token was just created or regenerated in the same session
@@ -7809,34 +7821,37 @@ var AgentsEndpoint = class AgentsEndpoint {
7809
7821
  state.consecutiveEmptySessions = (state.consecutiveEmptySessions || 0) + 1;
7810
7822
  if (shouldRequestModelEscalation(workflow.stallPolicy, state.consecutiveEmptySessions)) state.stallEscalationRequested = true;
7811
7823
  }
7824
+ let sessionStopStatus;
7825
+ let retryDelayMs;
7812
7826
  if (sessionResult.stopReason === "complete" && !detectedTaskCompletion) {
7813
7827
  const currentPhase = workflow.phases.find((p) => p.name === state.workflowPhase);
7814
- if (currentPhase?.canAcceptCompletion ? currentPhase.canAcceptCompletion(state, sessionTrace) : true) state.status = "complete";
7828
+ if (currentPhase?.canAcceptCompletion ? currentPhase.canAcceptCompletion(state, sessionTrace) : true) sessionStopStatus = "complete";
7815
7829
  } else if (sessionResult.stopReason === "error") {
7816
7830
  if (AgentsEndpoint.isRetryableSessionError(sessionResult.error) && consecutiveServerNetworkErrors < maxServerNetworkRetries) {
7817
7831
  consecutiveServerNetworkErrors++;
7818
- const delayMs = Math.min(5e3 * Math.pow(2, consecutiveServerNetworkErrors - 1), 3e4);
7819
- const delaySec = Math.round(delayMs / 1e3);
7820
- await this.emitContextNotice(options.onContextNotice, {
7821
- kind: "server_network_retry",
7822
- sessionIndex: session,
7823
- message: `Server network error: ${sessionResult.error}. Retrying in ${delaySec}s (attempt ${consecutiveServerNetworkErrors}/${maxServerNetworkRetries})...`
7824
- });
7825
- await sleepWithAbort(delayMs, options.abortSignal);
7826
- } else state.status = "error";
7827
- } else if (sessionResult.stopReason === "max_cost") state.status = "budget_exceeded";
7828
- else if (sessionResult.stopReason === "paused") state.status = "paused";
7829
- else if (acceptedTaskCompletion) state.status = "complete";
7830
- else if ((state.consecutiveEmptySessions || 0) >= resolveStallStopAfter(workflow.stallPolicy)) state.status = "stalled";
7831
- else if (maxCost && state.totalCost >= maxCost) state.status = "budget_exceeded";
7832
- else if (session + 1 >= maxSessions) state.status = "max_sessions";
7832
+ retryDelayMs = Math.min(5e3 * Math.pow(2, consecutiveServerNetworkErrors - 1), 3e4);
7833
+ } else sessionStopStatus = "error";
7834
+ } else if (sessionResult.stopReason === "max_cost") sessionStopStatus = "budget_exceeded";
7835
+ else if (sessionResult.stopReason === "paused") sessionStopStatus = "paused";
7836
+ else if (acceptedTaskCompletion) sessionStopStatus = "complete";
7837
+ state.status = sessionStopStatus ?? this.resolveContinuingRunTaskStatus(state, workflow, maxCost, session + 1 >= maxSessions);
7838
+ if (state.status === "running" && retryDelayMs !== void 0) {
7839
+ const delaySec = Math.round(retryDelayMs / 1e3);
7840
+ await this.emitContextNotice(options.onContextNotice, {
7841
+ kind: "server_network_retry",
7842
+ sessionIndex: session,
7843
+ message: `Server network error: ${sessionResult.error}. Retrying in ${delaySec}s (attempt ${consecutiveServerNetworkErrors}/${maxServerNetworkRetries})...`
7844
+ });
7845
+ await sleepWithAbort(retryDelayMs, options.abortSignal);
7846
+ }
7833
7847
  if (options.abortSignal?.aborted) state.status = "paused";
7834
7848
  if (options.trackProgress) recordId = await this.syncProgressRecord(state, recordId);
7835
7849
  if (options.onSession) {
7836
- if (await options.onSession(state) === false) state.status = "paused";
7850
+ if (await options.onSession(state) === false && state.status === "running") state.status = "paused";
7837
7851
  }
7838
7852
  if (state.status !== "running") break;
7839
7853
  }
7854
+ if (state.status === "running") state.status = "max_sessions";
7840
7855
  return {
7841
7856
  status: state.status,
7842
7857
  sessionCount: state.sessionCount,
@@ -7847,6 +7862,13 @@ var AgentsEndpoint = class AgentsEndpoint {
7847
7862
  recordId
7848
7863
  };
7849
7864
  }
7865
+ /** Status for a session that decided no terminal outcome itself: stall, budget, then session cap. */
7866
+ resolveContinuingRunTaskStatus(state, workflow, maxCost, isLastSession) {
7867
+ if ((state.consecutiveEmptySessions || 0) >= resolveStallStopAfter(workflow.stallPolicy)) return "stalled";
7868
+ if (maxCost && state.totalCost >= maxCost) return "budget_exceeded";
7869
+ if (isLastSession) return "max_sessions";
7870
+ return "running";
7871
+ }
7850
7872
  /** Returns true if a server-side session error message indicates a transient
7851
7873
  * network failure that is safe to retry. */
7852
7874
  static isRetryableSessionError(errorMessage) {
@@ -11097,7 +11119,7 @@ var BatchesNamespace = class {
11097
11119
  * const batches = await Runtype.batches.list()
11098
11120
  *
11099
11121
  * // Filter by status
11100
- * const running = await Runtype.batches.list({ status: 'running' })
11122
+ * const running = await Runtype.batches.list({ status: 'processing' })
11101
11123
  *
11102
11124
  * // Filter by flow
11103
11125
  * const flowBatches = await Runtype.batches.list({ flowId: 'flow_123' })
@@ -13561,6 +13583,10 @@ var ClientTokensNamespace = class {
13561
13583
  async regenerate(id) {
13562
13584
  return this.getClient().post(`/client-tokens/${id}/regenerate`);
13563
13585
  }
13586
+ /** Permanently revoke a token. Unlike `update(id, { isActive: false })`, it can never be re-enabled. */
13587
+ async revoke(id) {
13588
+ return this.getClient().post(`/client-tokens/${id}/revoke`);
13589
+ }
13564
13590
  /** Read a stored token value. Fails for a reveal-once live token. */
13565
13591
  async getToken(id) {
13566
13592
  return this.getClient().get(`/client-tokens/${id}/token`);
@@ -14719,7 +14745,7 @@ function transformQueryParams(params) {
14719
14745
  return result;
14720
14746
  }
14721
14747
  // src/version.ts
14722
- const SDK_VERSION = "11.13.2";
14748
+ const SDK_VERSION = "11.15.0";
14723
14749
  /**
14724
14750
  * Canonical client identity the API uses for attribution
14725
14751
  * (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
package/dist/index.d.cts CHANGED
@@ -8143,7 +8143,8 @@ interface paths {
8143
8143
  content: {
8144
8144
  "application/json": {
8145
8145
  batchExecutionId: string;
8146
- status: string;
8146
+ /** @enum {string} */
8147
+ status: "queued" | "processing" | "completed" | "failed" | "cancelled";
8147
8148
  };
8148
8149
  };
8149
8150
  };
@@ -8261,7 +8262,8 @@ interface paths {
8261
8262
  progress?: number;
8262
8263
  results?: unknown[];
8263
8264
  startedAt: string;
8264
- status: string;
8265
+ /** @enum {string} */
8266
+ status: "queued" | "processing" | "completed" | "failed" | "cancelled";
8265
8267
  successCount?: number;
8266
8268
  totalRecords: number;
8267
8269
  };
@@ -9304,6 +9306,15 @@ interface paths {
9304
9306
  "application/json": components["schemas"]["Error"];
9305
9307
  };
9306
9308
  };
9309
+ /** @description The token was revoked and cannot be reactivated (code CREDENTIAL_REVOKED) */
9310
+ 409: {
9311
+ headers: {
9312
+ [name: string]: unknown;
9313
+ };
9314
+ content: {
9315
+ "application/json": components["schemas"]["CredentialLifecycleError"];
9316
+ };
9317
+ };
9307
9318
  /** @description Internal server error */
9308
9319
  500: {
9309
9320
  headers: {
@@ -9592,6 +9603,104 @@ interface paths {
9592
9603
  "application/json": components["schemas"]["Error"];
9593
9604
  };
9594
9605
  };
9606
+ /** @description The token is inactive (code CREDENTIAL_INACTIVE) or revoked (code CREDENTIAL_REVOKED) and cannot be rotated */
9607
+ 409: {
9608
+ headers: {
9609
+ [name: string]: unknown;
9610
+ };
9611
+ content: {
9612
+ "application/json": components["schemas"]["CredentialLifecycleError"];
9613
+ };
9614
+ };
9615
+ /** @description Internal server error */
9616
+ 500: {
9617
+ headers: {
9618
+ [name: string]: unknown;
9619
+ };
9620
+ content: {
9621
+ "application/json": components["schemas"]["Error"];
9622
+ };
9623
+ };
9624
+ };
9625
+ };
9626
+ delete?: never;
9627
+ options?: never;
9628
+ head?: never;
9629
+ patch?: never;
9630
+ trace?: never;
9631
+ };
9632
+ "/v1/client-tokens/{id}/revoke": {
9633
+ parameters: {
9634
+ query?: never;
9635
+ header?: never;
9636
+ path?: never;
9637
+ cookie?: never;
9638
+ };
9639
+ get?: never;
9640
+ put?: never;
9641
+ /**
9642
+ * Revoke client token
9643
+ * @description Permanently revoke a client token. Unlike setting isActive to false, revocation is terminal: the token can never be reactivated or regenerated. Revoking an already-revoked token succeeds.
9644
+ */
9645
+ post: {
9646
+ parameters: {
9647
+ query?: never;
9648
+ header?: never;
9649
+ path: {
9650
+ id: string;
9651
+ };
9652
+ cookie?: never;
9653
+ };
9654
+ requestBody?: never;
9655
+ responses: {
9656
+ /** @description Client token revoked */
9657
+ 200: {
9658
+ headers: {
9659
+ [name: string]: unknown;
9660
+ };
9661
+ content: {
9662
+ "application/json": {
9663
+ message: string;
9664
+ success: boolean;
9665
+ };
9666
+ };
9667
+ };
9668
+ /** @description Invalid client token ID */
9669
+ 400: {
9670
+ headers: {
9671
+ [name: string]: unknown;
9672
+ };
9673
+ content: {
9674
+ "application/json": components["schemas"]["Error"];
9675
+ };
9676
+ };
9677
+ /** @description Unauthorized */
9678
+ 401: {
9679
+ headers: {
9680
+ [name: string]: unknown;
9681
+ };
9682
+ content: {
9683
+ "application/json": components["schemas"]["Error"];
9684
+ };
9685
+ };
9686
+ /** @description Insufficient permissions */
9687
+ 403: {
9688
+ headers: {
9689
+ [name: string]: unknown;
9690
+ };
9691
+ content: {
9692
+ "application/json": components["schemas"]["Error"];
9693
+ };
9694
+ };
9695
+ /** @description Client token not found */
9696
+ 404: {
9697
+ headers: {
9698
+ [name: string]: unknown;
9699
+ };
9700
+ content: {
9701
+ "application/json": components["schemas"]["Error"];
9702
+ };
9703
+ };
9595
9704
  /** @description Internal server error */
9596
9705
  500: {
9597
9706
  headers: {
@@ -11050,7 +11159,10 @@ interface paths {
11050
11159
  */
11051
11160
  post: {
11052
11161
  parameters: {
11053
- query?: never;
11162
+ query?: {
11163
+ /** @description Optional Persona SDK version for telemetry. Does not affect authorization or behavior. */
11164
+ personaVersion?: string;
11165
+ };
11054
11166
  header?: never;
11055
11167
  path?: never;
11056
11168
  cookie?: never;
@@ -11105,6 +11217,7 @@ interface paths {
11105
11217
  visitorHistory?: boolean;
11106
11218
  visitorToken?: string;
11107
11219
  };
11220
+ "text/plain": string;
11108
11221
  };
11109
11222
  };
11110
11223
  responses: {
@@ -30708,6 +30821,15 @@ interface paths {
30708
30821
  "application/json": components["schemas"]["Error"];
30709
30822
  };
30710
30823
  };
30824
+ /** @description Another open conversation already exists for this thread */
30825
+ 409: {
30826
+ headers: {
30827
+ [name: string]: unknown;
30828
+ };
30829
+ content: {
30830
+ "application/json": components["schemas"]["Error"];
30831
+ };
30832
+ };
30711
30833
  /** @description Internal server error */
30712
30834
  500: {
30713
30835
  headers: {
@@ -35448,6 +35570,18 @@ interface paths {
35448
35570
  executionId: string;
35449
35571
  /** @description Budget expiry. Absent means the overlay did not answer, which is not false and not null. */
35450
35572
  expiresAt?: string | null;
35573
+ /** @description Set when an external agent (A2A or runtype-stream) answered the turn: the protocol, declared framework and endpoint host stamped on the run header when it was invoked. Null on any other run, and on an external-agent run whose header predates the stamp. A repointed agent keeps one agentId, so this is what tells two of its runs apart. */
35574
+ externalAgent?: {
35575
+ /** @description Hostname of the endpoint that answered, never its path or query. */
35576
+ endpointHost: string | null;
35577
+ /** @description The framework the agent's config declares, a builder-chosen label; null when unset. */
35578
+ framework: string | null;
35579
+ /**
35580
+ * @description The wire protocol the external agent answered over.
35581
+ * @enum {string}
35582
+ */
35583
+ protocol: "a2a" | "runtype-stream";
35584
+ } | null;
35451
35585
  /** @description Fidelity of the projection behind this row. */
35452
35586
  fidelityTier: string | null;
35453
35587
  /** @description Flow that ran. */
@@ -36487,7 +36621,7 @@ interface paths {
36487
36621
  content: {
36488
36622
  "application/json": {
36489
36623
  /** @enum {string} */
36490
- configurationStatus: "configured" | "needs_configuration" | "invalid";
36624
+ configurationStatus: "configured" | "needs_configuration" | "revoked" | "invalid";
36491
36625
  configurationUrl: string;
36492
36626
  handoff?: {
36493
36627
  expiresAt?: string;
@@ -36510,7 +36644,7 @@ interface paths {
36510
36644
  secretId?: string;
36511
36645
  secretKey: string;
36512
36646
  /** @enum {string} */
36513
- status: "configured" | "needs_configuration" | "invalid";
36647
+ status: "configured" | "needs_configuration" | "revoked" | "invalid";
36514
36648
  version?: number;
36515
36649
  }[];
36516
36650
  };
@@ -52943,7 +53077,7 @@ interface paths {
52943
53077
  };
52944
53078
  };
52945
53079
  };
52946
- /** @description Invalid ID format, RUNTIME_LANE_INELIGIBLE for a flow target the batch host cannot run, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
53080
+ /** @description Invalid ID format, RUNTIME_LANE_INELIGIBLE for a flow target the batch host cannot run, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or SCHEDULE_ONE_TIME_ELAPSED for a one-time schedule whose runAt has passed */
52947
53081
  400: {
52948
53082
  headers: {
52949
53083
  [name: string]: unknown;
@@ -53595,7 +53729,7 @@ interface paths {
53595
53729
  content: {
53596
53730
  "application/json": {
53597
53731
  /** @enum {string} */
53598
- configurationStatus: "configured" | "needs_configuration" | "invalid";
53732
+ configurationStatus: "configured" | "needs_configuration" | "revoked" | "invalid";
53599
53733
  description?: string;
53600
53734
  handoff?: {
53601
53735
  expiresAt?: string;
@@ -53615,7 +53749,7 @@ interface paths {
53615
53749
  secretId?: string;
53616
53750
  secretKey: string;
53617
53751
  /** @enum {string} */
53618
- status: "configured" | "needs_configuration" | "invalid";
53752
+ status: "configured" | "needs_configuration" | "revoked" | "invalid";
53619
53753
  version?: number;
53620
53754
  }[];
53621
53755
  pendingConfigurationCount: number;
@@ -53740,7 +53874,7 @@ interface paths {
53740
53874
  "application/json": {
53741
53875
  manifest: {
53742
53876
  /** @enum {string} */
53743
- configurationStatus: "configured" | "needs_configuration" | "invalid";
53877
+ configurationStatus: "configured" | "needs_configuration" | "revoked" | "invalid";
53744
53878
  description?: string;
53745
53879
  handoff?: {
53746
53880
  expiresAt?: string;
@@ -53760,7 +53894,7 @@ interface paths {
53760
53894
  secretId?: string;
53761
53895
  secretKey: string;
53762
53896
  /** @enum {string} */
53763
- status: "configured" | "needs_configuration" | "invalid";
53897
+ status: "configured" | "needs_configuration" | "revoked" | "invalid";
53764
53898
  version?: number;
53765
53899
  }[];
53766
53900
  pendingConfigurationCount: number;
@@ -61482,6 +61616,15 @@ interface components {
61482
61616
  /** @description After this time the draft can no longer start a call. A call already running keeps it. */
61483
61617
  expiresAt: string;
61484
61618
  };
61619
+ CredentialLifecycleError: components["schemas"]["Error"] & {
61620
+ /**
61621
+ * @description CREDENTIAL_REVOKED: the credential was revoked; revocation is permanent, so create a new one. CREDENTIAL_INACTIVE: activate the credential before you rotate it.
61622
+ * @enum {string}
61623
+ */
61624
+ code: "CREDENTIAL_REVOKED" | "CREDENTIAL_INACTIVE";
61625
+ /** @description Human-readable reason. */
61626
+ message: string;
61627
+ };
61485
61628
  DailyUsageResponse: {
61486
61629
  daily?: {
61487
61630
  atSpendLimit: boolean;
@@ -63920,6 +64063,18 @@ interface components {
63920
64063
  executionId: string;
63921
64064
  /** @description Budget expiry. Absent means the overlay did not answer, which is not false and not null. */
63922
64065
  expiresAt?: string | null;
64066
+ /** @description Set when an external agent (A2A or runtype-stream) answered the turn: the protocol, declared framework and endpoint host stamped on the run header when it was invoked. Null on any other run, and on an external-agent run whose header predates the stamp. A repointed agent keeps one agentId, so this is what tells two of its runs apart. */
64067
+ externalAgent?: {
64068
+ /** @description Hostname of the endpoint that answered, never its path or query. */
64069
+ endpointHost: string | null;
64070
+ /** @description The framework the agent's config declares, a builder-chosen label; null when unset. */
64071
+ framework: string | null;
64072
+ /**
64073
+ * @description The wire protocol the external agent answered over.
64074
+ * @enum {string}
64075
+ */
64076
+ protocol: "a2a" | "runtype-stream";
64077
+ } | null;
63923
64078
  /** @description Fidelity of the projection behind this row. */
63924
64079
  fidelityTier: string | null;
63925
64080
  /** @description Flow that ran. */
@@ -64571,7 +64726,7 @@ interface components {
64571
64726
  kind: "run" | "records" | "none";
64572
64727
  };
64573
64728
  ScheduleValidationError: components["schemas"]["Error"] & {
64574
- /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. RUNTIME_LANE_INELIGIBLE: the target flow uses capabilities the batch host cannot run; `reasons` names them. */
64729
+ /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. RUNTIME_LANE_INELIGIBLE: the target flow uses capabilities the batch host cannot run; `reasons` names them. SCHEDULE_ONE_TIME_ELAPSED: a resumed one-time schedule has no future `runAt` to fire at. */
64575
64730
  code?: string;
64576
64731
  /** @description Human-readable error message. */
64577
64732
  message?: string;
@@ -71480,6 +71635,13 @@ export declare class ClientTokensEndpoint {
71480
71635
  * @returns The updated token with the new plain token value (shown only once)
71481
71636
  */
71482
71637
  regenerate(id: string): Promise<CreateClientTokenResponse>;
71638
+ /**
71639
+ * Permanently revoke a client token. Unlike `update(id, { isActive: false })`, it can never be re-enabled.
71640
+ */
71641
+ revoke(id: string): Promise<{
71642
+ success: boolean;
71643
+ message: string;
71644
+ }>;
71483
71645
  /**
71484
71646
  * Get the plain token value for a client token
71485
71647
  *
@@ -72946,6 +73108,8 @@ export declare class AgentsEndpoint {
72946
73108
  * ```
72947
73109
  */
72948
73110
  runTask(id: string, options: RunTaskOptions): Promise<RunTaskResult>;
73111
+ /** Status for a session that decided no terminal outcome itself: stall, budget, then session cap. */
73112
+ private resolveContinuingRunTaskStatus;
72949
73113
  /** Error message patterns from server-side sessions that indicate a transient network failure
72950
73114
  * (e.g. AI provider connection dropped). These are retried automatically. */
72951
73115
  private static readonly RETRYABLE_SESSION_ERROR_PATTERNS;
@@ -74681,6 +74845,12 @@ export declare class RuntypeFlowBuilder {
74681
74845
  private addRawStep;
74682
74846
  private addStep;
74683
74847
  }
74848
+ /**
74849
+ * Lifecycle of a batch execution as the API writes it: `batch_executions.status` and the
74850
+ * BatchExecutionDO state. Every SDK, CLI and MCP consumer classifies batch status through this list.
74851
+ */
74852
+ declare const BATCH_EXECUTION_STATUSES: readonly ['queued', 'processing', 'completed', 'failed', 'cancelled'];
74853
+ type BatchExecutionStatus = (typeof BATCH_EXECUTION_STATUSES)[number];
74684
74854
  interface BatchScheduleConfig {
74685
74855
  /** Flow ID to execute for each record */
74686
74856
  flowId: string;
@@ -74705,7 +74875,8 @@ interface BatchScheduleConfig {
74705
74875
  }
74706
74876
  interface BatchStatus {
74707
74877
  batchId: string;
74708
- status: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74878
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
74879
+ status: BatchExecutionStatus;
74709
74880
  totalRecords: number;
74710
74881
  processedRecords: number;
74711
74882
  failedRecords: number;
@@ -74715,7 +74886,7 @@ interface BatchStatus {
74715
74886
  }
74716
74887
  interface BatchListParams {
74717
74888
  /** Filter by status */
74718
- status?: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74889
+ status?: BatchExecutionStatus;
74719
74890
  /** Filter by flow ID */
74720
74891
  flowId?: string;
74721
74892
  /** Filter by record type */
@@ -74794,7 +74965,7 @@ export declare class BatchesNamespace {
74794
74965
  * const batches = await Runtype.batches.list()
74795
74966
  *
74796
74967
  * // Filter by status
74797
- * const running = await Runtype.batches.list({ status: 'running' })
74968
+ * const running = await Runtype.batches.list({ status: 'processing' })
74798
74969
  *
74799
74970
  * // Filter by flow
74800
74971
  * const flowBatches = await Runtype.batches.list({ flowId: 'flow_123' })
@@ -76760,6 +76931,16 @@ interface RunListRow {
76760
76931
  /** Its display name when the API could resolve one; null otherwise. */
76761
76932
  label: string | null;
76762
76933
  } | null;
76934
+ /**
76935
+ * The external agent that answered the turn: wire protocol, the framework its
76936
+ * config declares, and the endpoint hostname. NULL on any other run, and on an
76937
+ * external-agent run whose header predates the stamp.
76938
+ */
76939
+ externalAgent?: {
76940
+ protocol: 'a2a' | 'runtype-stream';
76941
+ framework: string | null;
76942
+ endpointHost: string | null;
76943
+ } | null;
76763
76944
  stopReason?: string | null;
76764
76945
  iterations?: number | null;
76765
76946
  /**
@@ -77854,6 +78035,11 @@ export declare class ClientTokensNamespace {
77854
78035
  delete(id: string): Promise<void>;
77855
78036
  /** Issue a new value; the previous value stops working immediately. */
77856
78037
  regenerate(id: string): Promise<CreateClientTokenResponse>;
78038
+ /** Permanently revoke a token. Unlike `update(id, { isActive: false })`, it can never be re-enabled. */
78039
+ revoke(id: string): Promise<{
78040
+ success: boolean;
78041
+ message: string;
78042
+ }>;
77857
78043
  /** Read a stored token value. Fails for a reveal-once live token. */
77858
78044
  getToken(id: string): Promise<{
77859
78045
  token: string;
@@ -79388,23 +79574,7 @@ export declare function createFlowEventTranslator(): (event: unknown) => Compati
79388
79574
  * Returns 0+ callback events per unified event. Construct one per stream.
79389
79575
  */
79390
79576
  export declare function createAgentEventTranslator(): (event: unknown) => CompatibilityEvent[];
79391
- /**
79392
- * BatchBuilder - Fluent builder for batch operations
79393
- *
79394
- * Provides a chainable API for building batch dispatch configurations
79395
- * that execute a flow across multiple records of the same type.
79396
- *
79397
- * @example
79398
- * ```typescript
79399
- * import { BatchBuilder } from '@runtypelabs/sdk'
79400
- *
79401
- * const batch = await new BatchBuilder()
79402
- * .useFlow('flow_abc123')
79403
- * .forRecordType('customer')
79404
- * .withOptions({ async: true })
79405
- * .run(apiClient)
79406
- * ```
79407
- */
79577
+ /** Execution options for a batch run across records of one type. */
79408
79578
  interface BatchOptions {
79409
79579
  /** Run batch asynchronously (default: true) */
79410
79580
  async?: boolean;
@@ -79435,7 +79605,8 @@ interface BatchRequest {
79435
79605
  }
79436
79606
  interface BatchResult {
79437
79607
  batchId: string;
79438
- status: 'queued' | 'running' | 'completed' | 'failed';
79608
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
79609
+ status: BatchExecutionStatus;
79439
79610
  totalRecords: number;
79440
79611
  processedRecords: number;
79441
79612
  failedRecords: number;
@@ -80658,5 +80829,5 @@ export declare function isPreservationSensitiveTask(state: Pick<{
80658
80829
  export declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | undefined, candidatePaths: string[] | undefined): string[];
80659
80830
  export declare function getDefaultPlanPath(taskName: string): string;
80660
80831
  export declare function sanitizeTaskSlug(taskName: string): string;
80661
- export type { A2AHandlerOptions, A2ARunInput, A2ATextMessage, AIGrader, ActivateAgentAliasInput, ActivateAgentPromotionInput, AgentAlias, AgentAliasActivation, AgentAliasArchiveFailure, AgentAliasArchived, AgentAliasList, AgentAliasTransport, AgentCapabilityChange, AgentCapabilityDeclaration, AgentDefinition, AgentDefinitionConfig, AgentDeploymentList, AgentDeploymentPromotion, AgentDeploymentReceipt, AgentPromotionManifest, AgentPromotionTransport, AgentPromotionValidation, AgentPullResult, AgentSkillBinding, AgentSkillBindingChange, AgentStreamEvent, ApiKeyRequest, ApiKeyRequestDelivery, ApiKeyRequestEnvironment, ApiKeyRequestHandoff, ApiKeyRequestListParams, ApiKeyRequestRequester, ApiKeyRequestStatus, ApplyGeneratedProposalOptions, ApplyGeneratedProposalResult, ArchiveAgentAliasEverywhereResult, ArchiveAgentAliasInput, AttachRuntimeToolsOptions, BatchClient, BatchListParams, BatchOptions, BatchRequest, BatchResult, BatchScheduleConfig, BatchStatus, BindSignalSetInput, BindSkillInput, BuiltInGraderId, CaseExpected, CheckGrader, ClaimApiKeyRequestInput, ClaimApiKeyRequestResponse, ClientConversation, ClientToken, ClientTokenConfig, ClientTokenDefinition, ClientTokenEnvironment, ClientTokenVersionPin, ClientWidgetTheme, CollectionPullResult, CollectionSchemaChange, ConditionalGetResult, ConditionalStepConfig, ContextErrorHandling, ContextFallback, CreateApiKeyRequestInput, CreateApiKeyRequestResponse, CreateClientTokenRequest, CreateClientTokenResponse, CreateEvalSuiteInput, CreatePromptData, CreateSignalSetInput, DecisionModelCatalog, DecisionModelCatalogEntry, DecomposeCriteriaResult, DefineAgentInput, DefineEvalCaseInput, DefineEvalInput, DefineFlowInput, DefineProductInput, DefineScheduleInput, DefineSkillInput, DefineSurfaceInput, DefineToolInput, DetachedReattach, DetachedReconnectOptions, DispatchClient, DispatchEvent, DispatchOptions, EnsureAgentConverged, EnsureAgentOptions, EnsureAgentPlan, EnsureAgentResult, EnsureClientTokenConverged, EnsureClientTokenOptions, EnsureClientTokenPlan, EnsureClientTokenResult, EnsureCollectionConverged, EnsureCollectionOptions, EnsureCollectionPlan, EnsureCollectionResult, EnsureEvalApplyOptions, EnsureEvalOptions, EnsureEvalPlan, EnsureEvalResult, EnsureFlowConverged, EnsureFlowOptions, EnsureFlowPlan, EnsureFlowResult, EnsureFpoOptions, EnsureFpoResult, EnsureProductConverged, EnsureProductOptions, EnsureProductPlan, EnsureProductResult, EnsureQuestionSetConverged, EnsureQuestionSetOptions, EnsureQuestionSetPlan, EnsureQuestionSetResult, EnsureScheduleConverged, EnsureScheduleOptions, EnsureSchedulePlan, EnsureScheduleResult, EnsureSkillConverged, EnsureSkillOptions, EnsureSkillPlan, EnsureSkillResult, EnsureSurfaceConverged, EnsureSurfaceOptions, EnsureSurfacePlan, EnsureSurfaceResult, EnsureToolConverged, EnsureToolOptions, EnsureToolPlan, EnsureToolResult, ErrorHandlingMode, EvalAgentSelector, EvalAgentTargetResolution, EvalCaseDefinition, EvalCaseInput, EvalCaseProposal, EvalCaseProposalAccepted, EvalCaseProposalListResult, EvalCasesGenerated, EvalClient, EvalDefinition, EvalEndUserIdentity, EvalIdentityDefaults, EvalListParams, EvalMessage, EvalOptions, EvalProposalSource, EvalProposalStatus, EvalProposedCase, EvalPullResult, EvalRecord, EvalRequest, EvalResult, EvalRunCaseScores, EvalRunConfig, EvalRunEvidence, EvalRunScores, EvalStatus, EvalSuiteCase, EvalSuiteCaseInput, EvalSuiteCoverage, EvalSuiteDetail, EvalSuiteLatestRun, EvalSuiteListResult, EvalSuiteRunQueued, EvalSuiteRunResult, EvalSuiteSummary, EvalTarget, EvalTenantIdentity, ExecutionStreamEvent, ExecutionTerminalOutcome, ExportSimulationDesignBriefResponse, ExtractionModelCatalog, ExtractionModelCatalogEntry, FallbackFailEvent, FallbackStartEvent, FallbackSuccessEvent, FallbackTrigger, FallbackTriggerType, FallbacksExhaustedEvent, FallbacksInitiatedEvent, FetchUrlStepConfig, FieldFormat, FlowCompleteEvent, FlowConfig, FlowDefinition, FlowDefinitionStep, FlowErrorEvent, FlowFallback, FlowInlineEvalInput, FlowPausedEvent, FlowPullResult, FlowStartEvent, FlowStreamEvent, FlowSummary, FlowValidationClient, FlowValidationIssue, FlowValidationResult, FpoEntityOutcome, FpoInput, GenerateEmbeddingStepConfig, GenerateEvalCasesInput, GeneratedRuntimeToolGateDecision, GeneratedRuntimeToolGateOptions, GetApiKeyRequestResponse, GetRecordStepConfig, GetSimulationEpisodeResponse, Gradeable, GraderConfig, GraderOutcome, GraderSeverity, HumanVerdict, JudgeAttemptDiagnostic, JudgeDiagnostics, JudgeParseError, ListAgentAliasesOptions, ListAgentDeploymentsOptions, ListConversationsResponse, ListRecordsStepConfig, ListSimulationEpisodesParams, ListSimulationEpisodesResponse, ListSimulationToolExchangesParams, ListSimulationToolExchangesResponse, LoopStepConfig, ManagedDeploymentAccepted, ManagedDeploymentCapability, ManagedDeploymentConfig, ManagedDeploymentCredentialAuthority, ManagedDeploymentDefinition, ManagedDeploymentDesiredSpec, ManagedDeploymentHealth, ManagedDeploymentLanguage, ManagedDeploymentProfileIdentity, ManagedDeploymentResource, ManagedDeploymentRetention, ManagedDeploymentRuntimeProfile, ManagedDeploymentSleepPolicy, ManagedDeploymentUpdateOptions, ManagedDeploymentWriteOptions, ManagedDeploymentWriteRequest, Message, MessageFallback, ModelFallback, ModelOverride, OrganizationAgentAlias, OrganizationAgentAliasList, PersistedGraderOutcome, PrepareAgentPromotionInput, PreviewSimulationVariantRequest, PreviewSimulationVariantResponse, ProductDefinition, ProductPullResult, PromoteAgentInput, PromoteAgentResult, PromptErrorHandling, PromptFallback, PromptListParams, PromptStepConfig, PullFpoResult, QuestionSetDefinition, QuestionSetPullResult, RecordCollectionDefinition, RecordCollectionValidationMode, RecordConfig, RecordFilter, RecordFilterCondition, RecordFilterGroup, RecordFilterOperator, RetrieveRecordStepConfig, RetryFallback, RollbackAgentAliasInput, RunEvalCaseResult, RunEvalInput, RunEvalResult, RunListParams, RunListResponse, RunListRow, AgentSkillBinding$1 as RuntypeAgentSkillBinding, ConditionalStepConfig$1 as RuntypeConditionalStepConfig, RuntypeConfig, FetchUrlStepConfig$1 as RuntypeFetchUrlStepConfig, FlowConfig$1 as RuntypeFlowConfig, GenerateEmbeddingStepConfig$1 as RuntypeGenerateEmbeddingStepConfig, GetRecordStepConfig$1 as RuntypeGetRecordStepConfig, ListRecordsStepConfig$1 as RuntypeListRecordsStepConfig, LoopStepConfig$1 as RuntypeLoopStepConfig, Message$1 as RuntypeMessage, ModelOverride$1 as RuntypeModelOverride, Prompt$1 as RuntypePrompt, PromptStepConfig$1 as RuntypePromptStepConfig, RecordConfig$1 as RuntypeRecordConfig, RetrieveRecordStepConfig$1 as RuntypeRetrieveRecordStepConfig, SearchStepConfig as RuntypeSearchStepConfig, SendEmailStepConfig as RuntypeSendEmailStepConfig, SendEventStepConfig as RuntypeSendEventStepConfig, SendStreamStepConfig as RuntypeSendStreamStepConfig, SetVariableStepConfig as RuntypeSetVariableStepConfig, Skill as RuntypeSkill, SkillBindingWithAgent as RuntypeSkillBindingWithAgent, SkillCapabilities as RuntypeSkillCapabilities, SkillFrontmatter as RuntypeSkillFrontmatter, SkillManifest as RuntypeSkillManifest, SkillProposal as RuntypeSkillProposal, SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, SkillVersion as RuntypeSkillVersion, TransformDataStepConfig as RuntypeTransformDataStepConfig, UpsertFlowConfig as RuntypeUpsertFlowConfig, UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, VectorSearchStepConfig as RuntypeVectorSearchStepConfig, WaitUntilStepConfig as RuntypeWaitUntilStepConfig, ScheduleDefinition, ScheduleDefinitionMessage, ScheduleEnsureTransport, SchedulePullResult, SearchStepConfig$1 as SearchStepConfig, SendEmailStepConfig$1 as SendEmailStepConfig, SendEventStepConfig$1 as SendEventStepConfig, SendStreamStepConfig$1 as SendStreamStepConfig, SetVariableStepConfig$1 as SetVariableStepConfig, SignalBinding, SignalPreviewReport, SignalSet, SignalSetDefinitionInput, SignalSetPreset, SignalSetVersion, SignalStatRow, SignalStatsParams, SimulationDesignBrief, SimulationEpisode, SimulationEpisodeMetrics, SimulationEpisodeScore, SimulationEpisodeStatus, SimulationEpisodeTranscript, SimulationHarnessCaptureSummary, SimulationReportedUsage, SimulationSelfReportedCost, SimulationServedBy, SimulationServedByCounts, SimulationTermination, SimulationToolCallFacts, SimulationToolExchange, SimulationToolProfile, SimulationTranscriptMessage, SimulationTurnLayerFacts, SkillDefinition, SkillListPage, SkillListPagination, SkillListParams, SkillManifestInput, SkillMarkdownInput, SkillOrigin, SkillProposalStatus, SkillPullResult, SkillStatus, SkillTrustLevel, SkillVersionStatus, SkillWithVersion, SkillWriteInput, StepCompleteEvent, StepDeltaEvent, StepFallback, StepFieldMeta, StepStartEvent, StepWaitingLocalEvent, StreamCallbacks, StreamConsumeOptions, StreamEvent, StreamEventOf, SurfaceDefinition, SurfaceDefinitionStatus, SurfaceDefinitionType, SurfacePullResult, ToolDefinition, ToolDefinitionType, ToolPullResult, TraceAlignmentOp, TraceCompare, TraceCompareCohortSide, TraceCompareCohorts, TraceCompareExecutionTotals, TraceCompareExecutions, TraceCompareRequest, TraceCompareResponse, TraceCompareSide, TraceQueryDimension, TraceQueryDistribution, TraceQueryFilters, TraceQueryGroup, TraceQueryMetrics, TraceQueryRequest, TraceQueryResponse, TraceQueryResult, TraceQuerySignalRateSample, TraceQueryWarning, TraceSlice, TraceSliceParams, TraceSliceResponse, TraceSliceSpan, TraceSliceSpanKind, TransformDataStepConfig$1 as TransformDataStepConfig, UnauthenticatedClaimApiKeyRequestInput, UpdateClientTokenRequest, UpdateEvalCaseInput, UpdateEvalSuiteInput, UpdatePromptData, UpdateSimulationTargetRequest, UpdateSimulationVariantRequest, UploadSimulationToolExchangesRequest, UploadedSimulationToolExchange, UpsertFlowConfig$1 as UpsertFlowConfig, UpsertRecordStepConfig$1 as UpsertRecordStepConfig, ValidateAgentPromotionInput, VectorSearchStepConfig$1 as VectorSearchStepConfig, WaitUntilStepConfig$1 as WaitUntilStepConfig, WorkflowCompileDeps, WorkflowCompletionCriteriaConfig, WorkflowConfig, WorkflowConfigFactory, WorkflowHookEntry, WorkflowHookKind, WorkflowHookRef, WorkflowHookSignatures, WorkflowMilestoneConfig, WorkflowPolicyConfig, WorkflowRecoveryConfig, WorkflowSlot };
80832
+ export type { A2AHandlerOptions, A2ARunInput, A2ATextMessage, AIGrader, ActivateAgentAliasInput, ActivateAgentPromotionInput, AgentAlias, AgentAliasActivation, AgentAliasArchiveFailure, AgentAliasArchived, AgentAliasList, AgentAliasTransport, AgentCapabilityChange, AgentCapabilityDeclaration, AgentDefinition, AgentDefinitionConfig, AgentDeploymentList, AgentDeploymentPromotion, AgentDeploymentReceipt, AgentPromotionManifest, AgentPromotionTransport, AgentPromotionValidation, AgentPullResult, AgentSkillBinding, AgentSkillBindingChange, AgentStreamEvent, ApiKeyRequest, ApiKeyRequestDelivery, ApiKeyRequestEnvironment, ApiKeyRequestHandoff, ApiKeyRequestListParams, ApiKeyRequestRequester, ApiKeyRequestStatus, ApplyGeneratedProposalOptions, ApplyGeneratedProposalResult, ArchiveAgentAliasEverywhereResult, ArchiveAgentAliasInput, AttachRuntimeToolsOptions, BatchClient, BatchExecutionStatus, BatchListParams, BatchOptions, BatchRequest, BatchResult, BatchScheduleConfig, BatchStatus, BindSignalSetInput, BindSkillInput, BuiltInGraderId, CaseExpected, CheckGrader, ClaimApiKeyRequestInput, ClaimApiKeyRequestResponse, ClientConversation, ClientToken, ClientTokenConfig, ClientTokenDefinition, ClientTokenEnvironment, ClientTokenVersionPin, ClientWidgetTheme, CollectionPullResult, CollectionSchemaChange, ConditionalGetResult, ConditionalStepConfig, ContextErrorHandling, ContextFallback, CreateApiKeyRequestInput, CreateApiKeyRequestResponse, CreateClientTokenRequest, CreateClientTokenResponse, CreateEvalSuiteInput, CreatePromptData, CreateSignalSetInput, DecisionModelCatalog, DecisionModelCatalogEntry, DecomposeCriteriaResult, DefineAgentInput, DefineEvalCaseInput, DefineEvalInput, DefineFlowInput, DefineProductInput, DefineScheduleInput, DefineSkillInput, DefineSurfaceInput, DefineToolInput, DetachedReattach, DetachedReconnectOptions, DispatchClient, DispatchEvent, DispatchOptions, EnsureAgentConverged, EnsureAgentOptions, EnsureAgentPlan, EnsureAgentResult, EnsureClientTokenConverged, EnsureClientTokenOptions, EnsureClientTokenPlan, EnsureClientTokenResult, EnsureCollectionConverged, EnsureCollectionOptions, EnsureCollectionPlan, EnsureCollectionResult, EnsureEvalApplyOptions, EnsureEvalOptions, EnsureEvalPlan, EnsureEvalResult, EnsureFlowConverged, EnsureFlowOptions, EnsureFlowPlan, EnsureFlowResult, EnsureFpoOptions, EnsureFpoResult, EnsureProductConverged, EnsureProductOptions, EnsureProductPlan, EnsureProductResult, EnsureQuestionSetConverged, EnsureQuestionSetOptions, EnsureQuestionSetPlan, EnsureQuestionSetResult, EnsureScheduleConverged, EnsureScheduleOptions, EnsureSchedulePlan, EnsureScheduleResult, EnsureSkillConverged, EnsureSkillOptions, EnsureSkillPlan, EnsureSkillResult, EnsureSurfaceConverged, EnsureSurfaceOptions, EnsureSurfacePlan, EnsureSurfaceResult, EnsureToolConverged, EnsureToolOptions, EnsureToolPlan, EnsureToolResult, ErrorHandlingMode, EvalAgentSelector, EvalAgentTargetResolution, EvalCaseDefinition, EvalCaseInput, EvalCaseProposal, EvalCaseProposalAccepted, EvalCaseProposalListResult, EvalCasesGenerated, EvalClient, EvalDefinition, EvalEndUserIdentity, EvalIdentityDefaults, EvalListParams, EvalMessage, EvalOptions, EvalProposalSource, EvalProposalStatus, EvalProposedCase, EvalPullResult, EvalRecord, EvalRequest, EvalResult, EvalRunCaseScores, EvalRunConfig, EvalRunEvidence, EvalRunScores, EvalStatus, EvalSuiteCase, EvalSuiteCaseInput, EvalSuiteCoverage, EvalSuiteDetail, EvalSuiteLatestRun, EvalSuiteListResult, EvalSuiteRunQueued, EvalSuiteRunResult, EvalSuiteSummary, EvalTarget, EvalTenantIdentity, ExecutionStreamEvent, ExecutionTerminalOutcome, ExportSimulationDesignBriefResponse, ExtractionModelCatalog, ExtractionModelCatalogEntry, FallbackFailEvent, FallbackStartEvent, FallbackSuccessEvent, FallbackTrigger, FallbackTriggerType, FallbacksExhaustedEvent, FallbacksInitiatedEvent, FetchUrlStepConfig, FieldFormat, FlowCompleteEvent, FlowConfig, FlowDefinition, FlowDefinitionStep, FlowErrorEvent, FlowFallback, FlowInlineEvalInput, FlowPausedEvent, FlowPullResult, FlowStartEvent, FlowStreamEvent, FlowSummary, FlowValidationClient, FlowValidationIssue, FlowValidationResult, FpoEntityOutcome, FpoInput, GenerateEmbeddingStepConfig, GenerateEvalCasesInput, GeneratedRuntimeToolGateDecision, GeneratedRuntimeToolGateOptions, GetApiKeyRequestResponse, GetRecordStepConfig, GetSimulationEpisodeResponse, Gradeable, GraderConfig, GraderOutcome, GraderSeverity, HumanVerdict, JudgeAttemptDiagnostic, JudgeDiagnostics, JudgeParseError, ListAgentAliasesOptions, ListAgentDeploymentsOptions, ListConversationsResponse, ListRecordsStepConfig, ListSimulationEpisodesParams, ListSimulationEpisodesResponse, ListSimulationToolExchangesParams, ListSimulationToolExchangesResponse, LoopStepConfig, ManagedDeploymentAccepted, ManagedDeploymentCapability, ManagedDeploymentConfig, ManagedDeploymentCredentialAuthority, ManagedDeploymentDefinition, ManagedDeploymentDesiredSpec, ManagedDeploymentHealth, ManagedDeploymentLanguage, ManagedDeploymentProfileIdentity, ManagedDeploymentResource, ManagedDeploymentRetention, ManagedDeploymentRuntimeProfile, ManagedDeploymentSleepPolicy, ManagedDeploymentUpdateOptions, ManagedDeploymentWriteOptions, ManagedDeploymentWriteRequest, Message, MessageFallback, ModelFallback, ModelOverride, OrganizationAgentAlias, OrganizationAgentAliasList, PersistedGraderOutcome, PrepareAgentPromotionInput, PreviewSimulationVariantRequest, PreviewSimulationVariantResponse, ProductDefinition, ProductPullResult, PromoteAgentInput, PromoteAgentResult, PromptErrorHandling, PromptFallback, PromptListParams, PromptStepConfig, PullFpoResult, QuestionSetDefinition, QuestionSetPullResult, RecordCollectionDefinition, RecordCollectionValidationMode, RecordConfig, RecordFilter, RecordFilterCondition, RecordFilterGroup, RecordFilterOperator, RetrieveRecordStepConfig, RetryFallback, RollbackAgentAliasInput, RunEvalCaseResult, RunEvalInput, RunEvalResult, RunListParams, RunListResponse, RunListRow, AgentSkillBinding$1 as RuntypeAgentSkillBinding, ConditionalStepConfig$1 as RuntypeConditionalStepConfig, RuntypeConfig, FetchUrlStepConfig$1 as RuntypeFetchUrlStepConfig, FlowConfig$1 as RuntypeFlowConfig, GenerateEmbeddingStepConfig$1 as RuntypeGenerateEmbeddingStepConfig, GetRecordStepConfig$1 as RuntypeGetRecordStepConfig, ListRecordsStepConfig$1 as RuntypeListRecordsStepConfig, LoopStepConfig$1 as RuntypeLoopStepConfig, Message$1 as RuntypeMessage, ModelOverride$1 as RuntypeModelOverride, Prompt$1 as RuntypePrompt, PromptStepConfig$1 as RuntypePromptStepConfig, RecordConfig$1 as RuntypeRecordConfig, RetrieveRecordStepConfig$1 as RuntypeRetrieveRecordStepConfig, SearchStepConfig as RuntypeSearchStepConfig, SendEmailStepConfig as RuntypeSendEmailStepConfig, SendEventStepConfig as RuntypeSendEventStepConfig, SendStreamStepConfig as RuntypeSendStreamStepConfig, SetVariableStepConfig as RuntypeSetVariableStepConfig, Skill as RuntypeSkill, SkillBindingWithAgent as RuntypeSkillBindingWithAgent, SkillCapabilities as RuntypeSkillCapabilities, SkillFrontmatter as RuntypeSkillFrontmatter, SkillManifest as RuntypeSkillManifest, SkillProposal as RuntypeSkillProposal, SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, SkillVersion as RuntypeSkillVersion, TransformDataStepConfig as RuntypeTransformDataStepConfig, UpsertFlowConfig as RuntypeUpsertFlowConfig, UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, VectorSearchStepConfig as RuntypeVectorSearchStepConfig, WaitUntilStepConfig as RuntypeWaitUntilStepConfig, ScheduleDefinition, ScheduleDefinitionMessage, ScheduleEnsureTransport, SchedulePullResult, SearchStepConfig$1 as SearchStepConfig, SendEmailStepConfig$1 as SendEmailStepConfig, SendEventStepConfig$1 as SendEventStepConfig, SendStreamStepConfig$1 as SendStreamStepConfig, SetVariableStepConfig$1 as SetVariableStepConfig, SignalBinding, SignalPreviewReport, SignalSet, SignalSetDefinitionInput, SignalSetPreset, SignalSetVersion, SignalStatRow, SignalStatsParams, SimulationDesignBrief, SimulationEpisode, SimulationEpisodeMetrics, SimulationEpisodeScore, SimulationEpisodeStatus, SimulationEpisodeTranscript, SimulationHarnessCaptureSummary, SimulationReportedUsage, SimulationSelfReportedCost, SimulationServedBy, SimulationServedByCounts, SimulationTermination, SimulationToolCallFacts, SimulationToolExchange, SimulationToolProfile, SimulationTranscriptMessage, SimulationTurnLayerFacts, SkillDefinition, SkillListPage, SkillListPagination, SkillListParams, SkillManifestInput, SkillMarkdownInput, SkillOrigin, SkillProposalStatus, SkillPullResult, SkillStatus, SkillTrustLevel, SkillVersionStatus, SkillWithVersion, SkillWriteInput, StepCompleteEvent, StepDeltaEvent, StepFallback, StepFieldMeta, StepStartEvent, StepWaitingLocalEvent, StreamCallbacks, StreamConsumeOptions, StreamEvent, StreamEventOf, SurfaceDefinition, SurfaceDefinitionStatus, SurfaceDefinitionType, SurfacePullResult, ToolDefinition, ToolDefinitionType, ToolPullResult, TraceAlignmentOp, TraceCompare, TraceCompareCohortSide, TraceCompareCohorts, TraceCompareExecutionTotals, TraceCompareExecutions, TraceCompareRequest, TraceCompareResponse, TraceCompareSide, TraceQueryDimension, TraceQueryDistribution, TraceQueryFilters, TraceQueryGroup, TraceQueryMetrics, TraceQueryRequest, TraceQueryResponse, TraceQueryResult, TraceQuerySignalRateSample, TraceQueryWarning, TraceSlice, TraceSliceParams, TraceSliceResponse, TraceSliceSpan, TraceSliceSpanKind, TransformDataStepConfig$1 as TransformDataStepConfig, UnauthenticatedClaimApiKeyRequestInput, UpdateClientTokenRequest, UpdateEvalCaseInput, UpdateEvalSuiteInput, UpdatePromptData, UpdateSimulationTargetRequest, UpdateSimulationVariantRequest, UploadSimulationToolExchangesRequest, UploadedSimulationToolExchange, UpsertFlowConfig$1 as UpsertFlowConfig, UpsertRecordStepConfig$1 as UpsertRecordStepConfig, ValidateAgentPromotionInput, VectorSearchStepConfig$1 as VectorSearchStepConfig, WaitUntilStepConfig$1 as WaitUntilStepConfig, WorkflowCompileDeps, WorkflowCompletionCriteriaConfig, WorkflowConfig, WorkflowConfigFactory, WorkflowHookEntry, WorkflowHookKind, WorkflowHookRef, WorkflowHookSignatures, WorkflowMilestoneConfig, WorkflowPolicyConfig, WorkflowRecoveryConfig, WorkflowSlot };
80662
80833
  export {}
package/dist/index.d.ts CHANGED
@@ -8143,7 +8143,8 @@ interface paths {
8143
8143
  content: {
8144
8144
  "application/json": {
8145
8145
  batchExecutionId: string;
8146
- status: string;
8146
+ /** @enum {string} */
8147
+ status: "queued" | "processing" | "completed" | "failed" | "cancelled";
8147
8148
  };
8148
8149
  };
8149
8150
  };
@@ -8261,7 +8262,8 @@ interface paths {
8261
8262
  progress?: number;
8262
8263
  results?: unknown[];
8263
8264
  startedAt: string;
8264
- status: string;
8265
+ /** @enum {string} */
8266
+ status: "queued" | "processing" | "completed" | "failed" | "cancelled";
8265
8267
  successCount?: number;
8266
8268
  totalRecords: number;
8267
8269
  };
@@ -9304,6 +9306,15 @@ interface paths {
9304
9306
  "application/json": components["schemas"]["Error"];
9305
9307
  };
9306
9308
  };
9309
+ /** @description The token was revoked and cannot be reactivated (code CREDENTIAL_REVOKED) */
9310
+ 409: {
9311
+ headers: {
9312
+ [name: string]: unknown;
9313
+ };
9314
+ content: {
9315
+ "application/json": components["schemas"]["CredentialLifecycleError"];
9316
+ };
9317
+ };
9307
9318
  /** @description Internal server error */
9308
9319
  500: {
9309
9320
  headers: {
@@ -9592,6 +9603,104 @@ interface paths {
9592
9603
  "application/json": components["schemas"]["Error"];
9593
9604
  };
9594
9605
  };
9606
+ /** @description The token is inactive (code CREDENTIAL_INACTIVE) or revoked (code CREDENTIAL_REVOKED) and cannot be rotated */
9607
+ 409: {
9608
+ headers: {
9609
+ [name: string]: unknown;
9610
+ };
9611
+ content: {
9612
+ "application/json": components["schemas"]["CredentialLifecycleError"];
9613
+ };
9614
+ };
9615
+ /** @description Internal server error */
9616
+ 500: {
9617
+ headers: {
9618
+ [name: string]: unknown;
9619
+ };
9620
+ content: {
9621
+ "application/json": components["schemas"]["Error"];
9622
+ };
9623
+ };
9624
+ };
9625
+ };
9626
+ delete?: never;
9627
+ options?: never;
9628
+ head?: never;
9629
+ patch?: never;
9630
+ trace?: never;
9631
+ };
9632
+ "/v1/client-tokens/{id}/revoke": {
9633
+ parameters: {
9634
+ query?: never;
9635
+ header?: never;
9636
+ path?: never;
9637
+ cookie?: never;
9638
+ };
9639
+ get?: never;
9640
+ put?: never;
9641
+ /**
9642
+ * Revoke client token
9643
+ * @description Permanently revoke a client token. Unlike setting isActive to false, revocation is terminal: the token can never be reactivated or regenerated. Revoking an already-revoked token succeeds.
9644
+ */
9645
+ post: {
9646
+ parameters: {
9647
+ query?: never;
9648
+ header?: never;
9649
+ path: {
9650
+ id: string;
9651
+ };
9652
+ cookie?: never;
9653
+ };
9654
+ requestBody?: never;
9655
+ responses: {
9656
+ /** @description Client token revoked */
9657
+ 200: {
9658
+ headers: {
9659
+ [name: string]: unknown;
9660
+ };
9661
+ content: {
9662
+ "application/json": {
9663
+ message: string;
9664
+ success: boolean;
9665
+ };
9666
+ };
9667
+ };
9668
+ /** @description Invalid client token ID */
9669
+ 400: {
9670
+ headers: {
9671
+ [name: string]: unknown;
9672
+ };
9673
+ content: {
9674
+ "application/json": components["schemas"]["Error"];
9675
+ };
9676
+ };
9677
+ /** @description Unauthorized */
9678
+ 401: {
9679
+ headers: {
9680
+ [name: string]: unknown;
9681
+ };
9682
+ content: {
9683
+ "application/json": components["schemas"]["Error"];
9684
+ };
9685
+ };
9686
+ /** @description Insufficient permissions */
9687
+ 403: {
9688
+ headers: {
9689
+ [name: string]: unknown;
9690
+ };
9691
+ content: {
9692
+ "application/json": components["schemas"]["Error"];
9693
+ };
9694
+ };
9695
+ /** @description Client token not found */
9696
+ 404: {
9697
+ headers: {
9698
+ [name: string]: unknown;
9699
+ };
9700
+ content: {
9701
+ "application/json": components["schemas"]["Error"];
9702
+ };
9703
+ };
9595
9704
  /** @description Internal server error */
9596
9705
  500: {
9597
9706
  headers: {
@@ -11050,7 +11159,10 @@ interface paths {
11050
11159
  */
11051
11160
  post: {
11052
11161
  parameters: {
11053
- query?: never;
11162
+ query?: {
11163
+ /** @description Optional Persona SDK version for telemetry. Does not affect authorization or behavior. */
11164
+ personaVersion?: string;
11165
+ };
11054
11166
  header?: never;
11055
11167
  path?: never;
11056
11168
  cookie?: never;
@@ -11105,6 +11217,7 @@ interface paths {
11105
11217
  visitorHistory?: boolean;
11106
11218
  visitorToken?: string;
11107
11219
  };
11220
+ "text/plain": string;
11108
11221
  };
11109
11222
  };
11110
11223
  responses: {
@@ -30708,6 +30821,15 @@ interface paths {
30708
30821
  "application/json": components["schemas"]["Error"];
30709
30822
  };
30710
30823
  };
30824
+ /** @description Another open conversation already exists for this thread */
30825
+ 409: {
30826
+ headers: {
30827
+ [name: string]: unknown;
30828
+ };
30829
+ content: {
30830
+ "application/json": components["schemas"]["Error"];
30831
+ };
30832
+ };
30711
30833
  /** @description Internal server error */
30712
30834
  500: {
30713
30835
  headers: {
@@ -35448,6 +35570,18 @@ interface paths {
35448
35570
  executionId: string;
35449
35571
  /** @description Budget expiry. Absent means the overlay did not answer, which is not false and not null. */
35450
35572
  expiresAt?: string | null;
35573
+ /** @description Set when an external agent (A2A or runtype-stream) answered the turn: the protocol, declared framework and endpoint host stamped on the run header when it was invoked. Null on any other run, and on an external-agent run whose header predates the stamp. A repointed agent keeps one agentId, so this is what tells two of its runs apart. */
35574
+ externalAgent?: {
35575
+ /** @description Hostname of the endpoint that answered, never its path or query. */
35576
+ endpointHost: string | null;
35577
+ /** @description The framework the agent's config declares, a builder-chosen label; null when unset. */
35578
+ framework: string | null;
35579
+ /**
35580
+ * @description The wire protocol the external agent answered over.
35581
+ * @enum {string}
35582
+ */
35583
+ protocol: "a2a" | "runtype-stream";
35584
+ } | null;
35451
35585
  /** @description Fidelity of the projection behind this row. */
35452
35586
  fidelityTier: string | null;
35453
35587
  /** @description Flow that ran. */
@@ -36487,7 +36621,7 @@ interface paths {
36487
36621
  content: {
36488
36622
  "application/json": {
36489
36623
  /** @enum {string} */
36490
- configurationStatus: "configured" | "needs_configuration" | "invalid";
36624
+ configurationStatus: "configured" | "needs_configuration" | "revoked" | "invalid";
36491
36625
  configurationUrl: string;
36492
36626
  handoff?: {
36493
36627
  expiresAt?: string;
@@ -36510,7 +36644,7 @@ interface paths {
36510
36644
  secretId?: string;
36511
36645
  secretKey: string;
36512
36646
  /** @enum {string} */
36513
- status: "configured" | "needs_configuration" | "invalid";
36647
+ status: "configured" | "needs_configuration" | "revoked" | "invalid";
36514
36648
  version?: number;
36515
36649
  }[];
36516
36650
  };
@@ -52943,7 +53077,7 @@ interface paths {
52943
53077
  };
52944
53078
  };
52945
53079
  };
52946
- /** @description Invalid ID format, RUNTIME_LANE_INELIGIBLE for a flow target the batch host cannot run, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
53080
+ /** @description Invalid ID format, RUNTIME_LANE_INELIGIBLE for a flow target the batch host cannot run, SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run, or SCHEDULE_ONE_TIME_ELAPSED for a one-time schedule whose runAt has passed */
52947
53081
  400: {
52948
53082
  headers: {
52949
53083
  [name: string]: unknown;
@@ -53595,7 +53729,7 @@ interface paths {
53595
53729
  content: {
53596
53730
  "application/json": {
53597
53731
  /** @enum {string} */
53598
- configurationStatus: "configured" | "needs_configuration" | "invalid";
53732
+ configurationStatus: "configured" | "needs_configuration" | "revoked" | "invalid";
53599
53733
  description?: string;
53600
53734
  handoff?: {
53601
53735
  expiresAt?: string;
@@ -53615,7 +53749,7 @@ interface paths {
53615
53749
  secretId?: string;
53616
53750
  secretKey: string;
53617
53751
  /** @enum {string} */
53618
- status: "configured" | "needs_configuration" | "invalid";
53752
+ status: "configured" | "needs_configuration" | "revoked" | "invalid";
53619
53753
  version?: number;
53620
53754
  }[];
53621
53755
  pendingConfigurationCount: number;
@@ -53740,7 +53874,7 @@ interface paths {
53740
53874
  "application/json": {
53741
53875
  manifest: {
53742
53876
  /** @enum {string} */
53743
- configurationStatus: "configured" | "needs_configuration" | "invalid";
53877
+ configurationStatus: "configured" | "needs_configuration" | "revoked" | "invalid";
53744
53878
  description?: string;
53745
53879
  handoff?: {
53746
53880
  expiresAt?: string;
@@ -53760,7 +53894,7 @@ interface paths {
53760
53894
  secretId?: string;
53761
53895
  secretKey: string;
53762
53896
  /** @enum {string} */
53763
- status: "configured" | "needs_configuration" | "invalid";
53897
+ status: "configured" | "needs_configuration" | "revoked" | "invalid";
53764
53898
  version?: number;
53765
53899
  }[];
53766
53900
  pendingConfigurationCount: number;
@@ -61482,6 +61616,15 @@ interface components {
61482
61616
  /** @description After this time the draft can no longer start a call. A call already running keeps it. */
61483
61617
  expiresAt: string;
61484
61618
  };
61619
+ CredentialLifecycleError: components["schemas"]["Error"] & {
61620
+ /**
61621
+ * @description CREDENTIAL_REVOKED: the credential was revoked; revocation is permanent, so create a new one. CREDENTIAL_INACTIVE: activate the credential before you rotate it.
61622
+ * @enum {string}
61623
+ */
61624
+ code: "CREDENTIAL_REVOKED" | "CREDENTIAL_INACTIVE";
61625
+ /** @description Human-readable reason. */
61626
+ message: string;
61627
+ };
61485
61628
  DailyUsageResponse: {
61486
61629
  daily?: {
61487
61630
  atSpendLimit: boolean;
@@ -63920,6 +64063,18 @@ interface components {
63920
64063
  executionId: string;
63921
64064
  /** @description Budget expiry. Absent means the overlay did not answer, which is not false and not null. */
63922
64065
  expiresAt?: string | null;
64066
+ /** @description Set when an external agent (A2A or runtype-stream) answered the turn: the protocol, declared framework and endpoint host stamped on the run header when it was invoked. Null on any other run, and on an external-agent run whose header predates the stamp. A repointed agent keeps one agentId, so this is what tells two of its runs apart. */
64067
+ externalAgent?: {
64068
+ /** @description Hostname of the endpoint that answered, never its path or query. */
64069
+ endpointHost: string | null;
64070
+ /** @description The framework the agent's config declares, a builder-chosen label; null when unset. */
64071
+ framework: string | null;
64072
+ /**
64073
+ * @description The wire protocol the external agent answered over.
64074
+ * @enum {string}
64075
+ */
64076
+ protocol: "a2a" | "runtype-stream";
64077
+ } | null;
63923
64078
  /** @description Fidelity of the projection behind this row. */
63924
64079
  fidelityTier: string | null;
63925
64080
  /** @description Flow that ran. */
@@ -64571,7 +64726,7 @@ interface components {
64571
64726
  kind: "run" | "records" | "none";
64572
64727
  };
64573
64728
  ScheduleValidationError: components["schemas"]["Error"] & {
64574
- /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. RUNTIME_LANE_INELIGIBLE: the target flow uses capabilities the batch host cannot run; `reasons` names them. */
64729
+ /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. RUNTIME_LANE_INELIGIBLE: the target flow uses capabilities the batch host cannot run; `reasons` names them. SCHEDULE_ONE_TIME_ELAPSED: a resumed one-time schedule has no future `runAt` to fire at. */
64575
64730
  code?: string;
64576
64731
  /** @description Human-readable error message. */
64577
64732
  message?: string;
@@ -71480,6 +71635,13 @@ export declare class ClientTokensEndpoint {
71480
71635
  * @returns The updated token with the new plain token value (shown only once)
71481
71636
  */
71482
71637
  regenerate(id: string): Promise<CreateClientTokenResponse>;
71638
+ /**
71639
+ * Permanently revoke a client token. Unlike `update(id, { isActive: false })`, it can never be re-enabled.
71640
+ */
71641
+ revoke(id: string): Promise<{
71642
+ success: boolean;
71643
+ message: string;
71644
+ }>;
71483
71645
  /**
71484
71646
  * Get the plain token value for a client token
71485
71647
  *
@@ -72946,6 +73108,8 @@ export declare class AgentsEndpoint {
72946
73108
  * ```
72947
73109
  */
72948
73110
  runTask(id: string, options: RunTaskOptions): Promise<RunTaskResult>;
73111
+ /** Status for a session that decided no terminal outcome itself: stall, budget, then session cap. */
73112
+ private resolveContinuingRunTaskStatus;
72949
73113
  /** Error message patterns from server-side sessions that indicate a transient network failure
72950
73114
  * (e.g. AI provider connection dropped). These are retried automatically. */
72951
73115
  private static readonly RETRYABLE_SESSION_ERROR_PATTERNS;
@@ -74681,6 +74845,12 @@ export declare class RuntypeFlowBuilder {
74681
74845
  private addRawStep;
74682
74846
  private addStep;
74683
74847
  }
74848
+ /**
74849
+ * Lifecycle of a batch execution as the API writes it: `batch_executions.status` and the
74850
+ * BatchExecutionDO state. Every SDK, CLI and MCP consumer classifies batch status through this list.
74851
+ */
74852
+ declare const BATCH_EXECUTION_STATUSES: readonly ['queued', 'processing', 'completed', 'failed', 'cancelled'];
74853
+ type BatchExecutionStatus = (typeof BATCH_EXECUTION_STATUSES)[number];
74684
74854
  interface BatchScheduleConfig {
74685
74855
  /** Flow ID to execute for each record */
74686
74856
  flowId: string;
@@ -74705,7 +74875,8 @@ interface BatchScheduleConfig {
74705
74875
  }
74706
74876
  interface BatchStatus {
74707
74877
  batchId: string;
74708
- status: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74878
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
74879
+ status: BatchExecutionStatus;
74709
74880
  totalRecords: number;
74710
74881
  processedRecords: number;
74711
74882
  failedRecords: number;
@@ -74715,7 +74886,7 @@ interface BatchStatus {
74715
74886
  }
74716
74887
  interface BatchListParams {
74717
74888
  /** Filter by status */
74718
- status?: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74889
+ status?: BatchExecutionStatus;
74719
74890
  /** Filter by flow ID */
74720
74891
  flowId?: string;
74721
74892
  /** Filter by record type */
@@ -74794,7 +74965,7 @@ export declare class BatchesNamespace {
74794
74965
  * const batches = await Runtype.batches.list()
74795
74966
  *
74796
74967
  * // Filter by status
74797
- * const running = await Runtype.batches.list({ status: 'running' })
74968
+ * const running = await Runtype.batches.list({ status: 'processing' })
74798
74969
  *
74799
74970
  * // Filter by flow
74800
74971
  * const flowBatches = await Runtype.batches.list({ flowId: 'flow_123' })
@@ -76760,6 +76931,16 @@ interface RunListRow {
76760
76931
  /** Its display name when the API could resolve one; null otherwise. */
76761
76932
  label: string | null;
76762
76933
  } | null;
76934
+ /**
76935
+ * The external agent that answered the turn: wire protocol, the framework its
76936
+ * config declares, and the endpoint hostname. NULL on any other run, and on an
76937
+ * external-agent run whose header predates the stamp.
76938
+ */
76939
+ externalAgent?: {
76940
+ protocol: 'a2a' | 'runtype-stream';
76941
+ framework: string | null;
76942
+ endpointHost: string | null;
76943
+ } | null;
76763
76944
  stopReason?: string | null;
76764
76945
  iterations?: number | null;
76765
76946
  /**
@@ -77854,6 +78035,11 @@ export declare class ClientTokensNamespace {
77854
78035
  delete(id: string): Promise<void>;
77855
78036
  /** Issue a new value; the previous value stops working immediately. */
77856
78037
  regenerate(id: string): Promise<CreateClientTokenResponse>;
78038
+ /** Permanently revoke a token. Unlike `update(id, { isActive: false })`, it can never be re-enabled. */
78039
+ revoke(id: string): Promise<{
78040
+ success: boolean;
78041
+ message: string;
78042
+ }>;
77857
78043
  /** Read a stored token value. Fails for a reveal-once live token. */
77858
78044
  getToken(id: string): Promise<{
77859
78045
  token: string;
@@ -79388,23 +79574,7 @@ export declare function createFlowEventTranslator(): (event: unknown) => Compati
79388
79574
  * Returns 0+ callback events per unified event. Construct one per stream.
79389
79575
  */
79390
79576
  export declare function createAgentEventTranslator(): (event: unknown) => CompatibilityEvent[];
79391
- /**
79392
- * BatchBuilder - Fluent builder for batch operations
79393
- *
79394
- * Provides a chainable API for building batch dispatch configurations
79395
- * that execute a flow across multiple records of the same type.
79396
- *
79397
- * @example
79398
- * ```typescript
79399
- * import { BatchBuilder } from '@runtypelabs/sdk'
79400
- *
79401
- * const batch = await new BatchBuilder()
79402
- * .useFlow('flow_abc123')
79403
- * .forRecordType('customer')
79404
- * .withOptions({ async: true })
79405
- * .run(apiClient)
79406
- * ```
79407
- */
79577
+ /** Execution options for a batch run across records of one type. */
79408
79578
  interface BatchOptions {
79409
79579
  /** Run batch asynchronously (default: true) */
79410
79580
  async?: boolean;
@@ -79435,7 +79605,8 @@ interface BatchRequest {
79435
79605
  }
79436
79606
  interface BatchResult {
79437
79607
  batchId: string;
79438
- status: 'queued' | 'running' | 'completed' | 'failed';
79608
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
79609
+ status: BatchExecutionStatus;
79439
79610
  totalRecords: number;
79440
79611
  processedRecords: number;
79441
79612
  failedRecords: number;
@@ -80658,5 +80829,5 @@ export declare function isPreservationSensitiveTask(state: Pick<{
80658
80829
  export declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | undefined, candidatePaths: string[] | undefined): string[];
80659
80830
  export declare function getDefaultPlanPath(taskName: string): string;
80660
80831
  export declare function sanitizeTaskSlug(taskName: string): string;
80661
- export type { A2AHandlerOptions, A2ARunInput, A2ATextMessage, AIGrader, ActivateAgentAliasInput, ActivateAgentPromotionInput, AgentAlias, AgentAliasActivation, AgentAliasArchiveFailure, AgentAliasArchived, AgentAliasList, AgentAliasTransport, AgentCapabilityChange, AgentCapabilityDeclaration, AgentDefinition, AgentDefinitionConfig, AgentDeploymentList, AgentDeploymentPromotion, AgentDeploymentReceipt, AgentPromotionManifest, AgentPromotionTransport, AgentPromotionValidation, AgentPullResult, AgentSkillBinding, AgentSkillBindingChange, AgentStreamEvent, ApiKeyRequest, ApiKeyRequestDelivery, ApiKeyRequestEnvironment, ApiKeyRequestHandoff, ApiKeyRequestListParams, ApiKeyRequestRequester, ApiKeyRequestStatus, ApplyGeneratedProposalOptions, ApplyGeneratedProposalResult, ArchiveAgentAliasEverywhereResult, ArchiveAgentAliasInput, AttachRuntimeToolsOptions, BatchClient, BatchListParams, BatchOptions, BatchRequest, BatchResult, BatchScheduleConfig, BatchStatus, BindSignalSetInput, BindSkillInput, BuiltInGraderId, CaseExpected, CheckGrader, ClaimApiKeyRequestInput, ClaimApiKeyRequestResponse, ClientConversation, ClientToken, ClientTokenConfig, ClientTokenDefinition, ClientTokenEnvironment, ClientTokenVersionPin, ClientWidgetTheme, CollectionPullResult, CollectionSchemaChange, ConditionalGetResult, ConditionalStepConfig, ContextErrorHandling, ContextFallback, CreateApiKeyRequestInput, CreateApiKeyRequestResponse, CreateClientTokenRequest, CreateClientTokenResponse, CreateEvalSuiteInput, CreatePromptData, CreateSignalSetInput, DecisionModelCatalog, DecisionModelCatalogEntry, DecomposeCriteriaResult, DefineAgentInput, DefineEvalCaseInput, DefineEvalInput, DefineFlowInput, DefineProductInput, DefineScheduleInput, DefineSkillInput, DefineSurfaceInput, DefineToolInput, DetachedReattach, DetachedReconnectOptions, DispatchClient, DispatchEvent, DispatchOptions, EnsureAgentConverged, EnsureAgentOptions, EnsureAgentPlan, EnsureAgentResult, EnsureClientTokenConverged, EnsureClientTokenOptions, EnsureClientTokenPlan, EnsureClientTokenResult, EnsureCollectionConverged, EnsureCollectionOptions, EnsureCollectionPlan, EnsureCollectionResult, EnsureEvalApplyOptions, EnsureEvalOptions, EnsureEvalPlan, EnsureEvalResult, EnsureFlowConverged, EnsureFlowOptions, EnsureFlowPlan, EnsureFlowResult, EnsureFpoOptions, EnsureFpoResult, EnsureProductConverged, EnsureProductOptions, EnsureProductPlan, EnsureProductResult, EnsureQuestionSetConverged, EnsureQuestionSetOptions, EnsureQuestionSetPlan, EnsureQuestionSetResult, EnsureScheduleConverged, EnsureScheduleOptions, EnsureSchedulePlan, EnsureScheduleResult, EnsureSkillConverged, EnsureSkillOptions, EnsureSkillPlan, EnsureSkillResult, EnsureSurfaceConverged, EnsureSurfaceOptions, EnsureSurfacePlan, EnsureSurfaceResult, EnsureToolConverged, EnsureToolOptions, EnsureToolPlan, EnsureToolResult, ErrorHandlingMode, EvalAgentSelector, EvalAgentTargetResolution, EvalCaseDefinition, EvalCaseInput, EvalCaseProposal, EvalCaseProposalAccepted, EvalCaseProposalListResult, EvalCasesGenerated, EvalClient, EvalDefinition, EvalEndUserIdentity, EvalIdentityDefaults, EvalListParams, EvalMessage, EvalOptions, EvalProposalSource, EvalProposalStatus, EvalProposedCase, EvalPullResult, EvalRecord, EvalRequest, EvalResult, EvalRunCaseScores, EvalRunConfig, EvalRunEvidence, EvalRunScores, EvalStatus, EvalSuiteCase, EvalSuiteCaseInput, EvalSuiteCoverage, EvalSuiteDetail, EvalSuiteLatestRun, EvalSuiteListResult, EvalSuiteRunQueued, EvalSuiteRunResult, EvalSuiteSummary, EvalTarget, EvalTenantIdentity, ExecutionStreamEvent, ExecutionTerminalOutcome, ExportSimulationDesignBriefResponse, ExtractionModelCatalog, ExtractionModelCatalogEntry, FallbackFailEvent, FallbackStartEvent, FallbackSuccessEvent, FallbackTrigger, FallbackTriggerType, FallbacksExhaustedEvent, FallbacksInitiatedEvent, FetchUrlStepConfig, FieldFormat, FlowCompleteEvent, FlowConfig, FlowDefinition, FlowDefinitionStep, FlowErrorEvent, FlowFallback, FlowInlineEvalInput, FlowPausedEvent, FlowPullResult, FlowStartEvent, FlowStreamEvent, FlowSummary, FlowValidationClient, FlowValidationIssue, FlowValidationResult, FpoEntityOutcome, FpoInput, GenerateEmbeddingStepConfig, GenerateEvalCasesInput, GeneratedRuntimeToolGateDecision, GeneratedRuntimeToolGateOptions, GetApiKeyRequestResponse, GetRecordStepConfig, GetSimulationEpisodeResponse, Gradeable, GraderConfig, GraderOutcome, GraderSeverity, HumanVerdict, JudgeAttemptDiagnostic, JudgeDiagnostics, JudgeParseError, ListAgentAliasesOptions, ListAgentDeploymentsOptions, ListConversationsResponse, ListRecordsStepConfig, ListSimulationEpisodesParams, ListSimulationEpisodesResponse, ListSimulationToolExchangesParams, ListSimulationToolExchangesResponse, LoopStepConfig, ManagedDeploymentAccepted, ManagedDeploymentCapability, ManagedDeploymentConfig, ManagedDeploymentCredentialAuthority, ManagedDeploymentDefinition, ManagedDeploymentDesiredSpec, ManagedDeploymentHealth, ManagedDeploymentLanguage, ManagedDeploymentProfileIdentity, ManagedDeploymentResource, ManagedDeploymentRetention, ManagedDeploymentRuntimeProfile, ManagedDeploymentSleepPolicy, ManagedDeploymentUpdateOptions, ManagedDeploymentWriteOptions, ManagedDeploymentWriteRequest, Message, MessageFallback, ModelFallback, ModelOverride, OrganizationAgentAlias, OrganizationAgentAliasList, PersistedGraderOutcome, PrepareAgentPromotionInput, PreviewSimulationVariantRequest, PreviewSimulationVariantResponse, ProductDefinition, ProductPullResult, PromoteAgentInput, PromoteAgentResult, PromptErrorHandling, PromptFallback, PromptListParams, PromptStepConfig, PullFpoResult, QuestionSetDefinition, QuestionSetPullResult, RecordCollectionDefinition, RecordCollectionValidationMode, RecordConfig, RecordFilter, RecordFilterCondition, RecordFilterGroup, RecordFilterOperator, RetrieveRecordStepConfig, RetryFallback, RollbackAgentAliasInput, RunEvalCaseResult, RunEvalInput, RunEvalResult, RunListParams, RunListResponse, RunListRow, AgentSkillBinding$1 as RuntypeAgentSkillBinding, ConditionalStepConfig$1 as RuntypeConditionalStepConfig, RuntypeConfig, FetchUrlStepConfig$1 as RuntypeFetchUrlStepConfig, FlowConfig$1 as RuntypeFlowConfig, GenerateEmbeddingStepConfig$1 as RuntypeGenerateEmbeddingStepConfig, GetRecordStepConfig$1 as RuntypeGetRecordStepConfig, ListRecordsStepConfig$1 as RuntypeListRecordsStepConfig, LoopStepConfig$1 as RuntypeLoopStepConfig, Message$1 as RuntypeMessage, ModelOverride$1 as RuntypeModelOverride, Prompt$1 as RuntypePrompt, PromptStepConfig$1 as RuntypePromptStepConfig, RecordConfig$1 as RuntypeRecordConfig, RetrieveRecordStepConfig$1 as RuntypeRetrieveRecordStepConfig, SearchStepConfig as RuntypeSearchStepConfig, SendEmailStepConfig as RuntypeSendEmailStepConfig, SendEventStepConfig as RuntypeSendEventStepConfig, SendStreamStepConfig as RuntypeSendStreamStepConfig, SetVariableStepConfig as RuntypeSetVariableStepConfig, Skill as RuntypeSkill, SkillBindingWithAgent as RuntypeSkillBindingWithAgent, SkillCapabilities as RuntypeSkillCapabilities, SkillFrontmatter as RuntypeSkillFrontmatter, SkillManifest as RuntypeSkillManifest, SkillProposal as RuntypeSkillProposal, SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, SkillVersion as RuntypeSkillVersion, TransformDataStepConfig as RuntypeTransformDataStepConfig, UpsertFlowConfig as RuntypeUpsertFlowConfig, UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, VectorSearchStepConfig as RuntypeVectorSearchStepConfig, WaitUntilStepConfig as RuntypeWaitUntilStepConfig, ScheduleDefinition, ScheduleDefinitionMessage, ScheduleEnsureTransport, SchedulePullResult, SearchStepConfig$1 as SearchStepConfig, SendEmailStepConfig$1 as SendEmailStepConfig, SendEventStepConfig$1 as SendEventStepConfig, SendStreamStepConfig$1 as SendStreamStepConfig, SetVariableStepConfig$1 as SetVariableStepConfig, SignalBinding, SignalPreviewReport, SignalSet, SignalSetDefinitionInput, SignalSetPreset, SignalSetVersion, SignalStatRow, SignalStatsParams, SimulationDesignBrief, SimulationEpisode, SimulationEpisodeMetrics, SimulationEpisodeScore, SimulationEpisodeStatus, SimulationEpisodeTranscript, SimulationHarnessCaptureSummary, SimulationReportedUsage, SimulationSelfReportedCost, SimulationServedBy, SimulationServedByCounts, SimulationTermination, SimulationToolCallFacts, SimulationToolExchange, SimulationToolProfile, SimulationTranscriptMessage, SimulationTurnLayerFacts, SkillDefinition, SkillListPage, SkillListPagination, SkillListParams, SkillManifestInput, SkillMarkdownInput, SkillOrigin, SkillProposalStatus, SkillPullResult, SkillStatus, SkillTrustLevel, SkillVersionStatus, SkillWithVersion, SkillWriteInput, StepCompleteEvent, StepDeltaEvent, StepFallback, StepFieldMeta, StepStartEvent, StepWaitingLocalEvent, StreamCallbacks, StreamConsumeOptions, StreamEvent, StreamEventOf, SurfaceDefinition, SurfaceDefinitionStatus, SurfaceDefinitionType, SurfacePullResult, ToolDefinition, ToolDefinitionType, ToolPullResult, TraceAlignmentOp, TraceCompare, TraceCompareCohortSide, TraceCompareCohorts, TraceCompareExecutionTotals, TraceCompareExecutions, TraceCompareRequest, TraceCompareResponse, TraceCompareSide, TraceQueryDimension, TraceQueryDistribution, TraceQueryFilters, TraceQueryGroup, TraceQueryMetrics, TraceQueryRequest, TraceQueryResponse, TraceQueryResult, TraceQuerySignalRateSample, TraceQueryWarning, TraceSlice, TraceSliceParams, TraceSliceResponse, TraceSliceSpan, TraceSliceSpanKind, TransformDataStepConfig$1 as TransformDataStepConfig, UnauthenticatedClaimApiKeyRequestInput, UpdateClientTokenRequest, UpdateEvalCaseInput, UpdateEvalSuiteInput, UpdatePromptData, UpdateSimulationTargetRequest, UpdateSimulationVariantRequest, UploadSimulationToolExchangesRequest, UploadedSimulationToolExchange, UpsertFlowConfig$1 as UpsertFlowConfig, UpsertRecordStepConfig$1 as UpsertRecordStepConfig, ValidateAgentPromotionInput, VectorSearchStepConfig$1 as VectorSearchStepConfig, WaitUntilStepConfig$1 as WaitUntilStepConfig, WorkflowCompileDeps, WorkflowCompletionCriteriaConfig, WorkflowConfig, WorkflowConfigFactory, WorkflowHookEntry, WorkflowHookKind, WorkflowHookRef, WorkflowHookSignatures, WorkflowMilestoneConfig, WorkflowPolicyConfig, WorkflowRecoveryConfig, WorkflowSlot };
80832
+ export type { A2AHandlerOptions, A2ARunInput, A2ATextMessage, AIGrader, ActivateAgentAliasInput, ActivateAgentPromotionInput, AgentAlias, AgentAliasActivation, AgentAliasArchiveFailure, AgentAliasArchived, AgentAliasList, AgentAliasTransport, AgentCapabilityChange, AgentCapabilityDeclaration, AgentDefinition, AgentDefinitionConfig, AgentDeploymentList, AgentDeploymentPromotion, AgentDeploymentReceipt, AgentPromotionManifest, AgentPromotionTransport, AgentPromotionValidation, AgentPullResult, AgentSkillBinding, AgentSkillBindingChange, AgentStreamEvent, ApiKeyRequest, ApiKeyRequestDelivery, ApiKeyRequestEnvironment, ApiKeyRequestHandoff, ApiKeyRequestListParams, ApiKeyRequestRequester, ApiKeyRequestStatus, ApplyGeneratedProposalOptions, ApplyGeneratedProposalResult, ArchiveAgentAliasEverywhereResult, ArchiveAgentAliasInput, AttachRuntimeToolsOptions, BatchClient, BatchExecutionStatus, BatchListParams, BatchOptions, BatchRequest, BatchResult, BatchScheduleConfig, BatchStatus, BindSignalSetInput, BindSkillInput, BuiltInGraderId, CaseExpected, CheckGrader, ClaimApiKeyRequestInput, ClaimApiKeyRequestResponse, ClientConversation, ClientToken, ClientTokenConfig, ClientTokenDefinition, ClientTokenEnvironment, ClientTokenVersionPin, ClientWidgetTheme, CollectionPullResult, CollectionSchemaChange, ConditionalGetResult, ConditionalStepConfig, ContextErrorHandling, ContextFallback, CreateApiKeyRequestInput, CreateApiKeyRequestResponse, CreateClientTokenRequest, CreateClientTokenResponse, CreateEvalSuiteInput, CreatePromptData, CreateSignalSetInput, DecisionModelCatalog, DecisionModelCatalogEntry, DecomposeCriteriaResult, DefineAgentInput, DefineEvalCaseInput, DefineEvalInput, DefineFlowInput, DefineProductInput, DefineScheduleInput, DefineSkillInput, DefineSurfaceInput, DefineToolInput, DetachedReattach, DetachedReconnectOptions, DispatchClient, DispatchEvent, DispatchOptions, EnsureAgentConverged, EnsureAgentOptions, EnsureAgentPlan, EnsureAgentResult, EnsureClientTokenConverged, EnsureClientTokenOptions, EnsureClientTokenPlan, EnsureClientTokenResult, EnsureCollectionConverged, EnsureCollectionOptions, EnsureCollectionPlan, EnsureCollectionResult, EnsureEvalApplyOptions, EnsureEvalOptions, EnsureEvalPlan, EnsureEvalResult, EnsureFlowConverged, EnsureFlowOptions, EnsureFlowPlan, EnsureFlowResult, EnsureFpoOptions, EnsureFpoResult, EnsureProductConverged, EnsureProductOptions, EnsureProductPlan, EnsureProductResult, EnsureQuestionSetConverged, EnsureQuestionSetOptions, EnsureQuestionSetPlan, EnsureQuestionSetResult, EnsureScheduleConverged, EnsureScheduleOptions, EnsureSchedulePlan, EnsureScheduleResult, EnsureSkillConverged, EnsureSkillOptions, EnsureSkillPlan, EnsureSkillResult, EnsureSurfaceConverged, EnsureSurfaceOptions, EnsureSurfacePlan, EnsureSurfaceResult, EnsureToolConverged, EnsureToolOptions, EnsureToolPlan, EnsureToolResult, ErrorHandlingMode, EvalAgentSelector, EvalAgentTargetResolution, EvalCaseDefinition, EvalCaseInput, EvalCaseProposal, EvalCaseProposalAccepted, EvalCaseProposalListResult, EvalCasesGenerated, EvalClient, EvalDefinition, EvalEndUserIdentity, EvalIdentityDefaults, EvalListParams, EvalMessage, EvalOptions, EvalProposalSource, EvalProposalStatus, EvalProposedCase, EvalPullResult, EvalRecord, EvalRequest, EvalResult, EvalRunCaseScores, EvalRunConfig, EvalRunEvidence, EvalRunScores, EvalStatus, EvalSuiteCase, EvalSuiteCaseInput, EvalSuiteCoverage, EvalSuiteDetail, EvalSuiteLatestRun, EvalSuiteListResult, EvalSuiteRunQueued, EvalSuiteRunResult, EvalSuiteSummary, EvalTarget, EvalTenantIdentity, ExecutionStreamEvent, ExecutionTerminalOutcome, ExportSimulationDesignBriefResponse, ExtractionModelCatalog, ExtractionModelCatalogEntry, FallbackFailEvent, FallbackStartEvent, FallbackSuccessEvent, FallbackTrigger, FallbackTriggerType, FallbacksExhaustedEvent, FallbacksInitiatedEvent, FetchUrlStepConfig, FieldFormat, FlowCompleteEvent, FlowConfig, FlowDefinition, FlowDefinitionStep, FlowErrorEvent, FlowFallback, FlowInlineEvalInput, FlowPausedEvent, FlowPullResult, FlowStartEvent, FlowStreamEvent, FlowSummary, FlowValidationClient, FlowValidationIssue, FlowValidationResult, FpoEntityOutcome, FpoInput, GenerateEmbeddingStepConfig, GenerateEvalCasesInput, GeneratedRuntimeToolGateDecision, GeneratedRuntimeToolGateOptions, GetApiKeyRequestResponse, GetRecordStepConfig, GetSimulationEpisodeResponse, Gradeable, GraderConfig, GraderOutcome, GraderSeverity, HumanVerdict, JudgeAttemptDiagnostic, JudgeDiagnostics, JudgeParseError, ListAgentAliasesOptions, ListAgentDeploymentsOptions, ListConversationsResponse, ListRecordsStepConfig, ListSimulationEpisodesParams, ListSimulationEpisodesResponse, ListSimulationToolExchangesParams, ListSimulationToolExchangesResponse, LoopStepConfig, ManagedDeploymentAccepted, ManagedDeploymentCapability, ManagedDeploymentConfig, ManagedDeploymentCredentialAuthority, ManagedDeploymentDefinition, ManagedDeploymentDesiredSpec, ManagedDeploymentHealth, ManagedDeploymentLanguage, ManagedDeploymentProfileIdentity, ManagedDeploymentResource, ManagedDeploymentRetention, ManagedDeploymentRuntimeProfile, ManagedDeploymentSleepPolicy, ManagedDeploymentUpdateOptions, ManagedDeploymentWriteOptions, ManagedDeploymentWriteRequest, Message, MessageFallback, ModelFallback, ModelOverride, OrganizationAgentAlias, OrganizationAgentAliasList, PersistedGraderOutcome, PrepareAgentPromotionInput, PreviewSimulationVariantRequest, PreviewSimulationVariantResponse, ProductDefinition, ProductPullResult, PromoteAgentInput, PromoteAgentResult, PromptErrorHandling, PromptFallback, PromptListParams, PromptStepConfig, PullFpoResult, QuestionSetDefinition, QuestionSetPullResult, RecordCollectionDefinition, RecordCollectionValidationMode, RecordConfig, RecordFilter, RecordFilterCondition, RecordFilterGroup, RecordFilterOperator, RetrieveRecordStepConfig, RetryFallback, RollbackAgentAliasInput, RunEvalCaseResult, RunEvalInput, RunEvalResult, RunListParams, RunListResponse, RunListRow, AgentSkillBinding$1 as RuntypeAgentSkillBinding, ConditionalStepConfig$1 as RuntypeConditionalStepConfig, RuntypeConfig, FetchUrlStepConfig$1 as RuntypeFetchUrlStepConfig, FlowConfig$1 as RuntypeFlowConfig, GenerateEmbeddingStepConfig$1 as RuntypeGenerateEmbeddingStepConfig, GetRecordStepConfig$1 as RuntypeGetRecordStepConfig, ListRecordsStepConfig$1 as RuntypeListRecordsStepConfig, LoopStepConfig$1 as RuntypeLoopStepConfig, Message$1 as RuntypeMessage, ModelOverride$1 as RuntypeModelOverride, Prompt$1 as RuntypePrompt, PromptStepConfig$1 as RuntypePromptStepConfig, RecordConfig$1 as RuntypeRecordConfig, RetrieveRecordStepConfig$1 as RuntypeRetrieveRecordStepConfig, SearchStepConfig as RuntypeSearchStepConfig, SendEmailStepConfig as RuntypeSendEmailStepConfig, SendEventStepConfig as RuntypeSendEventStepConfig, SendStreamStepConfig as RuntypeSendStreamStepConfig, SetVariableStepConfig as RuntypeSetVariableStepConfig, Skill as RuntypeSkill, SkillBindingWithAgent as RuntypeSkillBindingWithAgent, SkillCapabilities as RuntypeSkillCapabilities, SkillFrontmatter as RuntypeSkillFrontmatter, SkillManifest as RuntypeSkillManifest, SkillProposal as RuntypeSkillProposal, SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, SkillVersion as RuntypeSkillVersion, TransformDataStepConfig as RuntypeTransformDataStepConfig, UpsertFlowConfig as RuntypeUpsertFlowConfig, UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, VectorSearchStepConfig as RuntypeVectorSearchStepConfig, WaitUntilStepConfig as RuntypeWaitUntilStepConfig, ScheduleDefinition, ScheduleDefinitionMessage, ScheduleEnsureTransport, SchedulePullResult, SearchStepConfig$1 as SearchStepConfig, SendEmailStepConfig$1 as SendEmailStepConfig, SendEventStepConfig$1 as SendEventStepConfig, SendStreamStepConfig$1 as SendStreamStepConfig, SetVariableStepConfig$1 as SetVariableStepConfig, SignalBinding, SignalPreviewReport, SignalSet, SignalSetDefinitionInput, SignalSetPreset, SignalSetVersion, SignalStatRow, SignalStatsParams, SimulationDesignBrief, SimulationEpisode, SimulationEpisodeMetrics, SimulationEpisodeScore, SimulationEpisodeStatus, SimulationEpisodeTranscript, SimulationHarnessCaptureSummary, SimulationReportedUsage, SimulationSelfReportedCost, SimulationServedBy, SimulationServedByCounts, SimulationTermination, SimulationToolCallFacts, SimulationToolExchange, SimulationToolProfile, SimulationTranscriptMessage, SimulationTurnLayerFacts, SkillDefinition, SkillListPage, SkillListPagination, SkillListParams, SkillManifestInput, SkillMarkdownInput, SkillOrigin, SkillProposalStatus, SkillPullResult, SkillStatus, SkillTrustLevel, SkillVersionStatus, SkillWithVersion, SkillWriteInput, StepCompleteEvent, StepDeltaEvent, StepFallback, StepFieldMeta, StepStartEvent, StepWaitingLocalEvent, StreamCallbacks, StreamConsumeOptions, StreamEvent, StreamEventOf, SurfaceDefinition, SurfaceDefinitionStatus, SurfaceDefinitionType, SurfacePullResult, ToolDefinition, ToolDefinitionType, ToolPullResult, TraceAlignmentOp, TraceCompare, TraceCompareCohortSide, TraceCompareCohorts, TraceCompareExecutionTotals, TraceCompareExecutions, TraceCompareRequest, TraceCompareResponse, TraceCompareSide, TraceQueryDimension, TraceQueryDistribution, TraceQueryFilters, TraceQueryGroup, TraceQueryMetrics, TraceQueryRequest, TraceQueryResponse, TraceQueryResult, TraceQuerySignalRateSample, TraceQueryWarning, TraceSlice, TraceSliceParams, TraceSliceResponse, TraceSliceSpan, TraceSliceSpanKind, TransformDataStepConfig$1 as TransformDataStepConfig, UnauthenticatedClaimApiKeyRequestInput, UpdateClientTokenRequest, UpdateEvalCaseInput, UpdateEvalSuiteInput, UpdatePromptData, UpdateSimulationTargetRequest, UpdateSimulationVariantRequest, UploadSimulationToolExchangesRequest, UploadedSimulationToolExchange, UpsertFlowConfig$1 as UpsertFlowConfig, UpsertRecordStepConfig$1 as UpsertRecordStepConfig, ValidateAgentPromotionInput, VectorSearchStepConfig$1 as VectorSearchStepConfig, WaitUntilStepConfig$1 as WaitUntilStepConfig, WorkflowCompileDeps, WorkflowCompletionCriteriaConfig, WorkflowConfig, WorkflowConfigFactory, WorkflowHookEntry, WorkflowHookKind, WorkflowHookRef, WorkflowHookSignatures, WorkflowMilestoneConfig, WorkflowPolicyConfig, WorkflowRecoveryConfig, WorkflowSlot };
80662
80833
  export {}
package/dist/index.mjs CHANGED
@@ -1998,6 +1998,7 @@ function withDetachedReconnect(response, reattach, options = {}) {
1998
1998
  };
1999
1999
  let current = response;
2000
2000
  let legs = 0;
2001
+ let legFailure;
2001
2002
  const enqueue = (chunk) => {
2002
2003
  if (cancelled) return;
2003
2004
  controller.enqueue(chunk);
@@ -2053,9 +2054,14 @@ function withDetachedReconnect(response, reattach, options = {}) {
2053
2054
  break;
2054
2055
  }
2055
2056
  }
2057
+ } catch (error) {
2058
+ legFailure = { error };
2056
2059
  } finally {
2057
2060
  activeReader = null;
2058
- if (!cancelled) controller.close();
2061
+ if (!cancelled) {
2062
+ if (legFailure) controller.error(legFailure.error);
2063
+ else controller.close();
2064
+ }
2059
2065
  }
2060
2066
  },
2061
2067
  async cancel(reason) {
@@ -5938,6 +5944,12 @@ var ClientTokensEndpoint = class {
5938
5944
  return this.client.post(`/client-tokens/${id}/regenerate`);
5939
5945
  }
5940
5946
  /**
5947
+ * Permanently revoke a client token. Unlike `update(id, { isActive: false })`, it can never be re-enabled.
5948
+ */
5949
+ async revoke(id) {
5950
+ return this.client.post(`/client-tokens/${id}/revoke`);
5951
+ }
5952
+ /**
5941
5953
  * Get the plain token value for a client token
5942
5954
  *
5943
5955
  * Note: Only works if the token was just created or regenerated in the same session
@@ -7808,34 +7820,37 @@ var AgentsEndpoint = class AgentsEndpoint {
7808
7820
  state.consecutiveEmptySessions = (state.consecutiveEmptySessions || 0) + 1;
7809
7821
  if (shouldRequestModelEscalation(workflow.stallPolicy, state.consecutiveEmptySessions)) state.stallEscalationRequested = true;
7810
7822
  }
7823
+ let sessionStopStatus;
7824
+ let retryDelayMs;
7811
7825
  if (sessionResult.stopReason === "complete" && !detectedTaskCompletion) {
7812
7826
  const currentPhase = workflow.phases.find((p) => p.name === state.workflowPhase);
7813
- if (currentPhase?.canAcceptCompletion ? currentPhase.canAcceptCompletion(state, sessionTrace) : true) state.status = "complete";
7827
+ if (currentPhase?.canAcceptCompletion ? currentPhase.canAcceptCompletion(state, sessionTrace) : true) sessionStopStatus = "complete";
7814
7828
  } else if (sessionResult.stopReason === "error") {
7815
7829
  if (AgentsEndpoint.isRetryableSessionError(sessionResult.error) && consecutiveServerNetworkErrors < maxServerNetworkRetries) {
7816
7830
  consecutiveServerNetworkErrors++;
7817
- const delayMs = Math.min(5e3 * Math.pow(2, consecutiveServerNetworkErrors - 1), 3e4);
7818
- const delaySec = Math.round(delayMs / 1e3);
7819
- await this.emitContextNotice(options.onContextNotice, {
7820
- kind: "server_network_retry",
7821
- sessionIndex: session,
7822
- message: `Server network error: ${sessionResult.error}. Retrying in ${delaySec}s (attempt ${consecutiveServerNetworkErrors}/${maxServerNetworkRetries})...`
7823
- });
7824
- await sleepWithAbort(delayMs, options.abortSignal);
7825
- } else state.status = "error";
7826
- } else if (sessionResult.stopReason === "max_cost") state.status = "budget_exceeded";
7827
- else if (sessionResult.stopReason === "paused") state.status = "paused";
7828
- else if (acceptedTaskCompletion) state.status = "complete";
7829
- else if ((state.consecutiveEmptySessions || 0) >= resolveStallStopAfter(workflow.stallPolicy)) state.status = "stalled";
7830
- else if (maxCost && state.totalCost >= maxCost) state.status = "budget_exceeded";
7831
- else if (session + 1 >= maxSessions) state.status = "max_sessions";
7831
+ retryDelayMs = Math.min(5e3 * Math.pow(2, consecutiveServerNetworkErrors - 1), 3e4);
7832
+ } else sessionStopStatus = "error";
7833
+ } else if (sessionResult.stopReason === "max_cost") sessionStopStatus = "budget_exceeded";
7834
+ else if (sessionResult.stopReason === "paused") sessionStopStatus = "paused";
7835
+ else if (acceptedTaskCompletion) sessionStopStatus = "complete";
7836
+ state.status = sessionStopStatus ?? this.resolveContinuingRunTaskStatus(state, workflow, maxCost, session + 1 >= maxSessions);
7837
+ if (state.status === "running" && retryDelayMs !== void 0) {
7838
+ const delaySec = Math.round(retryDelayMs / 1e3);
7839
+ await this.emitContextNotice(options.onContextNotice, {
7840
+ kind: "server_network_retry",
7841
+ sessionIndex: session,
7842
+ message: `Server network error: ${sessionResult.error}. Retrying in ${delaySec}s (attempt ${consecutiveServerNetworkErrors}/${maxServerNetworkRetries})...`
7843
+ });
7844
+ await sleepWithAbort(retryDelayMs, options.abortSignal);
7845
+ }
7832
7846
  if (options.abortSignal?.aborted) state.status = "paused";
7833
7847
  if (options.trackProgress) recordId = await this.syncProgressRecord(state, recordId);
7834
7848
  if (options.onSession) {
7835
- if (await options.onSession(state) === false) state.status = "paused";
7849
+ if (await options.onSession(state) === false && state.status === "running") state.status = "paused";
7836
7850
  }
7837
7851
  if (state.status !== "running") break;
7838
7852
  }
7853
+ if (state.status === "running") state.status = "max_sessions";
7839
7854
  return {
7840
7855
  status: state.status,
7841
7856
  sessionCount: state.sessionCount,
@@ -7846,6 +7861,13 @@ var AgentsEndpoint = class AgentsEndpoint {
7846
7861
  recordId
7847
7862
  };
7848
7863
  }
7864
+ /** Status for a session that decided no terminal outcome itself: stall, budget, then session cap. */
7865
+ resolveContinuingRunTaskStatus(state, workflow, maxCost, isLastSession) {
7866
+ if ((state.consecutiveEmptySessions || 0) >= resolveStallStopAfter(workflow.stallPolicy)) return "stalled";
7867
+ if (maxCost && state.totalCost >= maxCost) return "budget_exceeded";
7868
+ if (isLastSession) return "max_sessions";
7869
+ return "running";
7870
+ }
7849
7871
  /** Returns true if a server-side session error message indicates a transient
7850
7872
  * network failure that is safe to retry. */
7851
7873
  static isRetryableSessionError(errorMessage) {
@@ -11096,7 +11118,7 @@ var BatchesNamespace = class {
11096
11118
  * const batches = await Runtype.batches.list()
11097
11119
  *
11098
11120
  * // Filter by status
11099
- * const running = await Runtype.batches.list({ status: 'running' })
11121
+ * const running = await Runtype.batches.list({ status: 'processing' })
11100
11122
  *
11101
11123
  * // Filter by flow
11102
11124
  * const flowBatches = await Runtype.batches.list({ flowId: 'flow_123' })
@@ -13560,6 +13582,10 @@ var ClientTokensNamespace = class {
13560
13582
  async regenerate(id) {
13561
13583
  return this.getClient().post(`/client-tokens/${id}/regenerate`);
13562
13584
  }
13585
+ /** Permanently revoke a token. Unlike `update(id, { isActive: false })`, it can never be re-enabled. */
13586
+ async revoke(id) {
13587
+ return this.getClient().post(`/client-tokens/${id}/revoke`);
13588
+ }
13563
13589
  /** Read a stored token value. Fails for a reveal-once live token. */
13564
13590
  async getToken(id) {
13565
13591
  return this.getClient().get(`/client-tokens/${id}/token`);
@@ -14718,7 +14744,7 @@ function transformQueryParams(params) {
14718
14744
  return result;
14719
14745
  }
14720
14746
  // src/version.ts
14721
- const SDK_VERSION = "11.13.2";
14747
+ const SDK_VERSION = "11.15.0";
14722
14748
  /**
14723
14749
  * Canonical client identity the API uses for attribution
14724
14750
  * (`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.13.2",
3
+ "version": "11.15.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.105.0",
27
+ "@runtypelabs/shared": "3.106.0",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.2",
30
30
  "typescript": "^6.0.3",