@runtypelabs/sdk 11.13.1 → 11.14.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.1";
14748
+ const SDK_VERSION = "11.14.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: {
@@ -11126,6 +11235,11 @@ interface paths {
11126
11235
  placeholder: string;
11127
11236
  /** @description Persona theme tokens stored on the client token, passed through verbatim. Null when unthemed. */
11128
11237
  theme?: unknown;
11238
+ /** @description Present only when the bound chat surface enables WebMCP and lists `requireConfirmFor` patterns. */
11239
+ webmcp?: {
11240
+ /** @description The bound chat surface's `behavior.webmcp.requireConfirmFor` patterns. A client must show its confirmation for a matching page tool even when its own auto-approval policy would skip it. This is client-side behavior, not a server-enforced boundary. */
11241
+ requireConfirmFor: string[];
11242
+ };
11129
11243
  /** @description Opening message to render before the visitor's first turn. Null when the client token sets none. */
11130
11244
  welcomeMessage: string | null;
11131
11245
  };
@@ -61477,6 +61591,15 @@ interface components {
61477
61591
  /** @description After this time the draft can no longer start a call. A call already running keeps it. */
61478
61592
  expiresAt: string;
61479
61593
  };
61594
+ CredentialLifecycleError: components["schemas"]["Error"] & {
61595
+ /**
61596
+ * @description CREDENTIAL_REVOKED: the credential was revoked; revocation is permanent, so create a new one. CREDENTIAL_INACTIVE: activate the credential before you rotate it.
61597
+ * @enum {string}
61598
+ */
61599
+ code: "CREDENTIAL_REVOKED" | "CREDENTIAL_INACTIVE";
61600
+ /** @description Human-readable reason. */
61601
+ message: string;
61602
+ };
61480
61603
  DailyUsageResponse: {
61481
61604
  daily?: {
61482
61605
  atSpendLimit: boolean;
@@ -71475,6 +71598,13 @@ export declare class ClientTokensEndpoint {
71475
71598
  * @returns The updated token with the new plain token value (shown only once)
71476
71599
  */
71477
71600
  regenerate(id: string): Promise<CreateClientTokenResponse>;
71601
+ /**
71602
+ * Permanently revoke a client token. Unlike `update(id, { isActive: false })`, it can never be re-enabled.
71603
+ */
71604
+ revoke(id: string): Promise<{
71605
+ success: boolean;
71606
+ message: string;
71607
+ }>;
71478
71608
  /**
71479
71609
  * Get the plain token value for a client token
71480
71610
  *
@@ -72941,6 +73071,8 @@ export declare class AgentsEndpoint {
72941
73071
  * ```
72942
73072
  */
72943
73073
  runTask(id: string, options: RunTaskOptions): Promise<RunTaskResult>;
73074
+ /** Status for a session that decided no terminal outcome itself: stall, budget, then session cap. */
73075
+ private resolveContinuingRunTaskStatus;
72944
73076
  /** Error message patterns from server-side sessions that indicate a transient network failure
72945
73077
  * (e.g. AI provider connection dropped). These are retried automatically. */
72946
73078
  private static readonly RETRYABLE_SESSION_ERROR_PATTERNS;
@@ -74676,6 +74808,12 @@ export declare class RuntypeFlowBuilder {
74676
74808
  private addRawStep;
74677
74809
  private addStep;
74678
74810
  }
74811
+ /**
74812
+ * Lifecycle of a batch execution as the API writes it: `batch_executions.status` and the
74813
+ * BatchExecutionDO state. Every SDK, CLI and MCP consumer classifies batch status through this list.
74814
+ */
74815
+ declare const BATCH_EXECUTION_STATUSES: readonly ['queued', 'processing', 'completed', 'failed', 'cancelled'];
74816
+ type BatchExecutionStatus = (typeof BATCH_EXECUTION_STATUSES)[number];
74679
74817
  interface BatchScheduleConfig {
74680
74818
  /** Flow ID to execute for each record */
74681
74819
  flowId: string;
@@ -74700,7 +74838,8 @@ interface BatchScheduleConfig {
74700
74838
  }
74701
74839
  interface BatchStatus {
74702
74840
  batchId: string;
74703
- status: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74841
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
74842
+ status: BatchExecutionStatus;
74704
74843
  totalRecords: number;
74705
74844
  processedRecords: number;
74706
74845
  failedRecords: number;
@@ -74710,7 +74849,7 @@ interface BatchStatus {
74710
74849
  }
74711
74850
  interface BatchListParams {
74712
74851
  /** Filter by status */
74713
- status?: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74852
+ status?: BatchExecutionStatus;
74714
74853
  /** Filter by flow ID */
74715
74854
  flowId?: string;
74716
74855
  /** Filter by record type */
@@ -74789,7 +74928,7 @@ export declare class BatchesNamespace {
74789
74928
  * const batches = await Runtype.batches.list()
74790
74929
  *
74791
74930
  * // Filter by status
74792
- * const running = await Runtype.batches.list({ status: 'running' })
74931
+ * const running = await Runtype.batches.list({ status: 'processing' })
74793
74932
  *
74794
74933
  * // Filter by flow
74795
74934
  * const flowBatches = await Runtype.batches.list({ flowId: 'flow_123' })
@@ -77849,6 +77988,11 @@ export declare class ClientTokensNamespace {
77849
77988
  delete(id: string): Promise<void>;
77850
77989
  /** Issue a new value; the previous value stops working immediately. */
77851
77990
  regenerate(id: string): Promise<CreateClientTokenResponse>;
77991
+ /** Permanently revoke a token. Unlike `update(id, { isActive: false })`, it can never be re-enabled. */
77992
+ revoke(id: string): Promise<{
77993
+ success: boolean;
77994
+ message: string;
77995
+ }>;
77852
77996
  /** Read a stored token value. Fails for a reveal-once live token. */
77853
77997
  getToken(id: string): Promise<{
77854
77998
  token: string;
@@ -79383,23 +79527,7 @@ export declare function createFlowEventTranslator(): (event: unknown) => Compati
79383
79527
  * Returns 0+ callback events per unified event. Construct one per stream.
79384
79528
  */
79385
79529
  export declare function createAgentEventTranslator(): (event: unknown) => CompatibilityEvent[];
79386
- /**
79387
- * BatchBuilder - Fluent builder for batch operations
79388
- *
79389
- * Provides a chainable API for building batch dispatch configurations
79390
- * that execute a flow across multiple records of the same type.
79391
- *
79392
- * @example
79393
- * ```typescript
79394
- * import { BatchBuilder } from '@runtypelabs/sdk'
79395
- *
79396
- * const batch = await new BatchBuilder()
79397
- * .useFlow('flow_abc123')
79398
- * .forRecordType('customer')
79399
- * .withOptions({ async: true })
79400
- * .run(apiClient)
79401
- * ```
79402
- */
79530
+ /** Execution options for a batch run across records of one type. */
79403
79531
  interface BatchOptions {
79404
79532
  /** Run batch asynchronously (default: true) */
79405
79533
  async?: boolean;
@@ -79430,7 +79558,8 @@ interface BatchRequest {
79430
79558
  }
79431
79559
  interface BatchResult {
79432
79560
  batchId: string;
79433
- status: 'queued' | 'running' | 'completed' | 'failed';
79561
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
79562
+ status: BatchExecutionStatus;
79434
79563
  totalRecords: number;
79435
79564
  processedRecords: number;
79436
79565
  failedRecords: number;
@@ -80653,5 +80782,5 @@ export declare function isPreservationSensitiveTask(state: Pick<{
80653
80782
  export declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | undefined, candidatePaths: string[] | undefined): string[];
80654
80783
  export declare function getDefaultPlanPath(taskName: string): string;
80655
80784
  export declare function sanitizeTaskSlug(taskName: string): string;
80656
- 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 };
80785
+ 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 };
80657
80786
  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: {
@@ -11126,6 +11235,11 @@ interface paths {
11126
11235
  placeholder: string;
11127
11236
  /** @description Persona theme tokens stored on the client token, passed through verbatim. Null when unthemed. */
11128
11237
  theme?: unknown;
11238
+ /** @description Present only when the bound chat surface enables WebMCP and lists `requireConfirmFor` patterns. */
11239
+ webmcp?: {
11240
+ /** @description The bound chat surface's `behavior.webmcp.requireConfirmFor` patterns. A client must show its confirmation for a matching page tool even when its own auto-approval policy would skip it. This is client-side behavior, not a server-enforced boundary. */
11241
+ requireConfirmFor: string[];
11242
+ };
11129
11243
  /** @description Opening message to render before the visitor's first turn. Null when the client token sets none. */
11130
11244
  welcomeMessage: string | null;
11131
11245
  };
@@ -61477,6 +61591,15 @@ interface components {
61477
61591
  /** @description After this time the draft can no longer start a call. A call already running keeps it. */
61478
61592
  expiresAt: string;
61479
61593
  };
61594
+ CredentialLifecycleError: components["schemas"]["Error"] & {
61595
+ /**
61596
+ * @description CREDENTIAL_REVOKED: the credential was revoked; revocation is permanent, so create a new one. CREDENTIAL_INACTIVE: activate the credential before you rotate it.
61597
+ * @enum {string}
61598
+ */
61599
+ code: "CREDENTIAL_REVOKED" | "CREDENTIAL_INACTIVE";
61600
+ /** @description Human-readable reason. */
61601
+ message: string;
61602
+ };
61480
61603
  DailyUsageResponse: {
61481
61604
  daily?: {
61482
61605
  atSpendLimit: boolean;
@@ -71475,6 +71598,13 @@ export declare class ClientTokensEndpoint {
71475
71598
  * @returns The updated token with the new plain token value (shown only once)
71476
71599
  */
71477
71600
  regenerate(id: string): Promise<CreateClientTokenResponse>;
71601
+ /**
71602
+ * Permanently revoke a client token. Unlike `update(id, { isActive: false })`, it can never be re-enabled.
71603
+ */
71604
+ revoke(id: string): Promise<{
71605
+ success: boolean;
71606
+ message: string;
71607
+ }>;
71478
71608
  /**
71479
71609
  * Get the plain token value for a client token
71480
71610
  *
@@ -72941,6 +73071,8 @@ export declare class AgentsEndpoint {
72941
73071
  * ```
72942
73072
  */
72943
73073
  runTask(id: string, options: RunTaskOptions): Promise<RunTaskResult>;
73074
+ /** Status for a session that decided no terminal outcome itself: stall, budget, then session cap. */
73075
+ private resolveContinuingRunTaskStatus;
72944
73076
  /** Error message patterns from server-side sessions that indicate a transient network failure
72945
73077
  * (e.g. AI provider connection dropped). These are retried automatically. */
72946
73078
  private static readonly RETRYABLE_SESSION_ERROR_PATTERNS;
@@ -74676,6 +74808,12 @@ export declare class RuntypeFlowBuilder {
74676
74808
  private addRawStep;
74677
74809
  private addStep;
74678
74810
  }
74811
+ /**
74812
+ * Lifecycle of a batch execution as the API writes it: `batch_executions.status` and the
74813
+ * BatchExecutionDO state. Every SDK, CLI and MCP consumer classifies batch status through this list.
74814
+ */
74815
+ declare const BATCH_EXECUTION_STATUSES: readonly ['queued', 'processing', 'completed', 'failed', 'cancelled'];
74816
+ type BatchExecutionStatus = (typeof BATCH_EXECUTION_STATUSES)[number];
74679
74817
  interface BatchScheduleConfig {
74680
74818
  /** Flow ID to execute for each record */
74681
74819
  flowId: string;
@@ -74700,7 +74838,8 @@ interface BatchScheduleConfig {
74700
74838
  }
74701
74839
  interface BatchStatus {
74702
74840
  batchId: string;
74703
- status: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74841
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
74842
+ status: BatchExecutionStatus;
74704
74843
  totalRecords: number;
74705
74844
  processedRecords: number;
74706
74845
  failedRecords: number;
@@ -74710,7 +74849,7 @@ interface BatchStatus {
74710
74849
  }
74711
74850
  interface BatchListParams {
74712
74851
  /** Filter by status */
74713
- status?: 'queued' | 'scheduled' | 'running' | 'completed' | 'failed' | 'cancelled';
74852
+ status?: BatchExecutionStatus;
74714
74853
  /** Filter by flow ID */
74715
74854
  flowId?: string;
74716
74855
  /** Filter by record type */
@@ -74789,7 +74928,7 @@ export declare class BatchesNamespace {
74789
74928
  * const batches = await Runtype.batches.list()
74790
74929
  *
74791
74930
  * // Filter by status
74792
- * const running = await Runtype.batches.list({ status: 'running' })
74931
+ * const running = await Runtype.batches.list({ status: 'processing' })
74793
74932
  *
74794
74933
  * // Filter by flow
74795
74934
  * const flowBatches = await Runtype.batches.list({ flowId: 'flow_123' })
@@ -77849,6 +77988,11 @@ export declare class ClientTokensNamespace {
77849
77988
  delete(id: string): Promise<void>;
77850
77989
  /** Issue a new value; the previous value stops working immediately. */
77851
77990
  regenerate(id: string): Promise<CreateClientTokenResponse>;
77991
+ /** Permanently revoke a token. Unlike `update(id, { isActive: false })`, it can never be re-enabled. */
77992
+ revoke(id: string): Promise<{
77993
+ success: boolean;
77994
+ message: string;
77995
+ }>;
77852
77996
  /** Read a stored token value. Fails for a reveal-once live token. */
77853
77997
  getToken(id: string): Promise<{
77854
77998
  token: string;
@@ -79383,23 +79527,7 @@ export declare function createFlowEventTranslator(): (event: unknown) => Compati
79383
79527
  * Returns 0+ callback events per unified event. Construct one per stream.
79384
79528
  */
79385
79529
  export declare function createAgentEventTranslator(): (event: unknown) => CompatibilityEvent[];
79386
- /**
79387
- * BatchBuilder - Fluent builder for batch operations
79388
- *
79389
- * Provides a chainable API for building batch dispatch configurations
79390
- * that execute a flow across multiple records of the same type.
79391
- *
79392
- * @example
79393
- * ```typescript
79394
- * import { BatchBuilder } from '@runtypelabs/sdk'
79395
- *
79396
- * const batch = await new BatchBuilder()
79397
- * .useFlow('flow_abc123')
79398
- * .forRecordType('customer')
79399
- * .withOptions({ async: true })
79400
- * .run(apiClient)
79401
- * ```
79402
- */
79530
+ /** Execution options for a batch run across records of one type. */
79403
79531
  interface BatchOptions {
79404
79532
  /** Run batch asynchronously (default: true) */
79405
79533
  async?: boolean;
@@ -79430,7 +79558,8 @@ interface BatchRequest {
79430
79558
  }
79431
79559
  interface BatchResult {
79432
79560
  batchId: string;
79433
- status: 'queued' | 'running' | 'completed' | 'failed';
79561
+ /** 'queued' | 'processing' while in flight; 'completed' | 'failed' | 'cancelled' once terminal. */
79562
+ status: BatchExecutionStatus;
79434
79563
  totalRecords: number;
79435
79564
  processedRecords: number;
79436
79565
  failedRecords: number;
@@ -80653,5 +80782,5 @@ export declare function isPreservationSensitiveTask(state: Pick<{
80653
80782
  export declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | undefined, candidatePaths: string[] | undefined): string[];
80654
80783
  export declare function getDefaultPlanPath(taskName: string): string;
80655
80784
  export declare function sanitizeTaskSlug(taskName: string): string;
80656
- 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 };
80785
+ 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 };
80657
80786
  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.1";
14747
+ const SDK_VERSION = "11.14.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.1",
3
+ "version": "11.14.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.104.3",
27
+ "@runtypelabs/shared": "3.105.1",
28
28
  "openapi-typescript": "^7.13.0",
29
29
  "tsdown": "^0.23.2",
30
30
  "typescript": "^6.0.3",