@runtypelabs/sdk 6.5.0 → 6.6.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
@@ -89,6 +89,7 @@ __export(index_exports, {
89
89
  ToolEnsureConflictError: () => ToolEnsureConflictError,
90
90
  ToolsEndpoint: () => ToolsEndpoint,
91
91
  ToolsNamespace: () => ToolsNamespace,
92
+ TypedRecordsScope: () => TypedRecordsScope,
92
93
  UNIFIED_EVENTS_QUERY: () => UNIFIED_EVENTS_QUERY,
93
94
  UsersEndpoint: () => UsersEndpoint,
94
95
  applyGeneratedRuntimeToolProposalToDispatchRequest: () => applyGeneratedRuntimeToolProposalToDispatchRequest,
@@ -6448,7 +6449,7 @@ var Runtype = class {
6448
6449
 
6449
6450
  // src/version.ts
6450
6451
  var FALLBACK_VERSION = "0.0.0";
6451
- var SDK_VERSION = "6.5.0".length > 0 ? "6.5.0" : FALLBACK_VERSION;
6452
+ var SDK_VERSION = "6.6.0".length > 0 ? "6.6.0" : FALLBACK_VERSION;
6452
6453
  var RUNTYPE_CLIENT_KIND = "sdk";
6453
6454
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6454
6455
 
@@ -8695,6 +8696,69 @@ var RecordsEndpoint = class {
8695
8696
  limit: 1
8696
8697
  });
8697
8698
  }
8699
+ /**
8700
+ * Scope record operations to a single collection slug, typing `metadata`
8701
+ * against the customer-augmented `RecordCollections` map (§5.1). The returned
8702
+ * scope pins the record `type` filter to `slug` and types `.list/.get/.create/
8703
+ * .update` metadata as `CollectionMeta<S>`.
8704
+ *
8705
+ * @example
8706
+ * ```ts
8707
+ * const customers = client.records.from('customers')
8708
+ * await customers.create({ name: 'Acme', metadata: { tier: 'pro' } })
8709
+ * ```
8710
+ */
8711
+ from(slug) {
8712
+ return new TypedRecordsScope(this.client, slug);
8713
+ }
8714
+ };
8715
+ var TypedRecordsScope = class {
8716
+ constructor(client, slug) {
8717
+ this.client = client;
8718
+ this.slug = slug;
8719
+ }
8720
+ /** List records of this collection (the `type` filter is pinned to the slug). */
8721
+ async list(params) {
8722
+ return this.client.get("/records", {
8723
+ ...params,
8724
+ type: this.slug
8725
+ });
8726
+ }
8727
+ /**
8728
+ * Get a record of this collection by id. Throws if the fetched record belongs
8729
+ * to a different collection — otherwise `metadata` would be mistyped as this
8730
+ * scope's shape. Use `client.records.get()` for cross-collection reads.
8731
+ */
8732
+ async get(id) {
8733
+ const record = await this.client.get(`/records/${id}`);
8734
+ const type = record.type;
8735
+ if (type !== void 0 && type !== this.slug) throw this.typeMismatchError(id, type);
8736
+ return record;
8737
+ }
8738
+ /** Create a record in this collection (`type` is supplied from the slug). */
8739
+ async create(data) {
8740
+ return this.client.post("/records", {
8741
+ ...data,
8742
+ type: this.slug
8743
+ });
8744
+ }
8745
+ /**
8746
+ * Update a record in this collection. Guards BEFORE writing with a GET: this
8747
+ * scope's `metadata` type must not be written onto a record of another
8748
+ * collection, so a cross-collection id throws instead of mutating. That costs
8749
+ * one extra request; use `client.records.update()` to skip the guard.
8750
+ */
8751
+ async update(id, data) {
8752
+ const existing = await this.client.get(`/records/${id}`);
8753
+ const type = existing?.type;
8754
+ if (type !== void 0 && type !== this.slug) throw this.typeMismatchError(id, type);
8755
+ return this.client.put(`/records/${id}`, data);
8756
+ }
8757
+ typeMismatchError(id, actualType) {
8758
+ return new Error(
8759
+ `Record ${id} belongs to collection "${actualType}", not "${this.slug}". Use client.records.from("${actualType}") or the untyped client.records methods for cross-collection access.`
8760
+ );
8761
+ }
8698
8762
  };
8699
8763
  var CollectionsEndpoint = class {
8700
8764
  constructor(client) {
@@ -8758,6 +8822,15 @@ var CollectionsEndpoint = class {
8758
8822
  data ?? {}
8759
8823
  );
8760
8824
  }
8825
+ /**
8826
+ * Fetch generated TypeScript declarations for the account's schematized
8827
+ * collections (`GET /v1/collections/types.d.ts`) as a raw `.d.ts` string.
8828
+ * Powers `runtype records typegen`; write it to a file and augment the SDK's
8829
+ * `RecordCollections` map so `client.records.from(slug)` types metadata.
8830
+ */
8831
+ async typegen() {
8832
+ return this.client.get("/collections/types.d.ts");
8833
+ }
8761
8834
  };
8762
8835
  var ApiKeysEndpoint = class {
8763
8836
  constructor(client) {
@@ -14243,6 +14316,7 @@ var STEP_TYPE_TO_METHOD = {
14243
14316
  ToolEnsureConflictError,
14244
14317
  ToolsEndpoint,
14245
14318
  ToolsNamespace,
14319
+ TypedRecordsScope,
14246
14320
  UNIFIED_EVENTS_QUERY,
14247
14321
  UsersEndpoint,
14248
14322
  applyGeneratedRuntimeToolProposalToDispatchRequest,
package/dist/index.d.cts CHANGED
@@ -1925,9 +1925,16 @@ interface paths {
1925
1925
  }[];
1926
1926
  subagentConfig?: {
1927
1927
  allowNesting?: boolean;
1928
+ /** @enum {string} */
1929
+ defaultExecutionMode?: "attached" | "detached";
1928
1930
  defaultMaxTurns?: number;
1929
1931
  defaultModel?: string;
1932
+ /** @enum {string} */
1933
+ defaultNotify?: "none" | "narrate" | "react";
1930
1934
  defaultTimeoutMs?: number;
1935
+ detachedMaxBudgetMs?: number;
1936
+ detachedNoProgressBudgetMs?: number;
1937
+ executionModes?: ("attached" | "detached")[];
1931
1938
  maxSpawnsPerRun?: number;
1932
1939
  maxTurnsLimit?: number;
1933
1940
  toolPool: string[];
@@ -7396,6 +7403,72 @@ interface paths {
7396
7403
  patch?: never;
7397
7404
  trace?: never;
7398
7405
  };
7406
+ "/v1/collections/types.d.ts": {
7407
+ parameters: {
7408
+ query?: never;
7409
+ header?: never;
7410
+ path?: never;
7411
+ cookie?: never;
7412
+ };
7413
+ /**
7414
+ * Generate TypeScript types for schematized collections
7415
+ * @description Emit a TypeScript `.d.ts` module (one interface per schematized collection plus a `declare module '@runtypelabs/sdk'` augmentation of `RecordCollections`) so `client.records.from('<slug>')` types record metadata. Fetch it with `runtype records typegen`; commit and diff-check the output in CI to catch collection-schema drift.
7416
+ */
7417
+ get: {
7418
+ parameters: {
7419
+ query?: never;
7420
+ header?: never;
7421
+ path?: never;
7422
+ cookie?: never;
7423
+ };
7424
+ requestBody?: never;
7425
+ responses: {
7426
+ /** @description A TypeScript declaration module */
7427
+ 200: {
7428
+ headers: {
7429
+ [name: string]: unknown;
7430
+ };
7431
+ content: {
7432
+ "text/plain": string;
7433
+ };
7434
+ };
7435
+ /** @description Unauthorized */
7436
+ 401: {
7437
+ headers: {
7438
+ [name: string]: unknown;
7439
+ };
7440
+ content: {
7441
+ "application/json": components["schemas"]["Error"];
7442
+ };
7443
+ };
7444
+ /** @description Insufficient permissions */
7445
+ 403: {
7446
+ headers: {
7447
+ [name: string]: unknown;
7448
+ };
7449
+ content: {
7450
+ "application/json": components["schemas"]["Error"];
7451
+ };
7452
+ };
7453
+ /** @description Internal server error */
7454
+ 500: {
7455
+ headers: {
7456
+ [name: string]: unknown;
7457
+ };
7458
+ content: {
7459
+ "application/json": components["schemas"]["Error"];
7460
+ };
7461
+ };
7462
+ };
7463
+ };
7464
+ put?: never;
7465
+ post?: never;
7466
+ delete?: never;
7467
+ options?: never;
7468
+ head?: never;
7469
+ patch?: never;
7470
+ trace?: never;
7471
+ };
7399
7472
  "/v1/collections/{slug}": {
7400
7473
  parameters: {
7401
7474
  query?: never;
@@ -31360,7 +31433,7 @@ interface paths {
31360
31433
  requestBody?: {
31361
31434
  content: {
31362
31435
  "application/json": {
31363
- /** @default kimi-k2.6 */
31436
+ /** @default gemini-3.6-flash */
31364
31437
  model?: string;
31365
31438
  name: string;
31366
31439
  /**
@@ -31557,7 +31630,7 @@ interface paths {
31557
31630
  requestBody?: {
31558
31631
  content: {
31559
31632
  "application/json": {
31560
- /** @default kimi-k2.6 */
31633
+ /** @default gemini-3.6-flash */
31561
31634
  model?: string;
31562
31635
  name?: string;
31563
31636
  /**
@@ -51690,6 +51763,59 @@ declare function attachRuntimeToolsToDispatchRequest(request: DispatchRequest, r
51690
51763
  */
51691
51764
  declare function applyGeneratedRuntimeToolProposalToDispatchRequest(request: DispatchRequest, proposal: unknown, options?: ApplyGeneratedProposalOptions): ApplyGeneratedProposalResult;
51692
51765
 
51766
+ /**
51767
+ * Typed record collections — the SDK generic seam (§5.1 of the
51768
+ * Records→Collections plan).
51769
+ *
51770
+ * Customers describe their collection schemas by augmenting `RecordCollections`
51771
+ * via declaration merging — hand-authored, or generated by
51772
+ * `runtype records typegen` (`GET /v1/collections/types.d.ts`):
51773
+ *
51774
+ * declare module '@runtypelabs/sdk' {
51775
+ * interface RecordCollections {
51776
+ * customers: { email: string; tier?: 'free' | 'pro' }
51777
+ * }
51778
+ * }
51779
+ *
51780
+ * Then `client.records.from('customers')` returns a scope whose read/write
51781
+ * methods type `metadata` as that shape. Unregistered slugs fall back to
51782
+ * `Record<string, unknown>`, so `from()` is always usable — no codegen
51783
+ * required for it to be safe.
51784
+ *
51785
+ * NOTE: `packages/client` cannot depend on `@runtypelabs/shared`, so these
51786
+ * types are defined locally rather than reusing the shared dialect types.
51787
+ */
51788
+
51789
+ /**
51790
+ * Customer-augmented map of collection slug → metadata shape. Empty by default;
51791
+ * populated via declaration merging (see the module docstring). Because it is
51792
+ * augmented through the package's public name, it must stay exported from the
51793
+ * SDK entry point.
51794
+ */
51795
+ interface RecordCollections {
51796
+ }
51797
+ /** Resolve a slug to its augmented metadata shape, or the untyped fallback. */
51798
+ type CollectionMeta<S extends string> = S extends keyof RecordCollections ? RecordCollections[S] : Record<string, unknown>;
51799
+ /** A record (`GET /v1/records/{id}`) with `metadata` typed for slug `S`. */
51800
+ type TypedRuntypeRecord<S extends string> = Omit<RuntypeRecord, 'metadata'> & {
51801
+ metadata: CollectionMeta<S>;
51802
+ };
51803
+ /** A list-row record with `metadata` typed for slug `S`. */
51804
+ type TypedRecordListItem<S extends string> = Omit<RecordListItem, 'metadata'> & {
51805
+ metadata: CollectionMeta<S>;
51806
+ };
51807
+ /** A create/update record response with `metadata` typed for slug `S`. */
51808
+ type TypedRecordWriteResponse<S extends string> = Omit<RecordWriteResponse, 'metadata'> & {
51809
+ metadata: CollectionMeta<S>;
51810
+ };
51811
+ /**
51812
+ * Create/update body for a typed scope: `type` is pinned to the scope's slug
51813
+ * (so it is omitted here) and `metadata` is typed for slug `S`.
51814
+ */
51815
+ type TypedCreateRecordRequest<S extends string> = Omit<CreateRecordRequest, 'type' | 'metadata'> & {
51816
+ metadata?: CollectionMeta<S>;
51817
+ };
51818
+
51693
51819
  /**
51694
51820
  * Pluggable workflow architecture for marathon task execution.
51695
51821
  *
@@ -52026,6 +52152,48 @@ declare class RecordsEndpoint {
52026
52152
  type?: string;
52027
52153
  name?: string;
52028
52154
  }): Promise<PaginationResponse<RecordListItem>>;
52155
+ /**
52156
+ * Scope record operations to a single collection slug, typing `metadata`
52157
+ * against the customer-augmented `RecordCollections` map (§5.1). The returned
52158
+ * scope pins the record `type` filter to `slug` and types `.list/.get/.create/
52159
+ * .update` metadata as `CollectionMeta<S>`.
52160
+ *
52161
+ * @example
52162
+ * ```ts
52163
+ * const customers = client.records.from('customers')
52164
+ * await customers.create({ name: 'Acme', metadata: { tier: 'pro' } })
52165
+ * ```
52166
+ */
52167
+ from<S extends string>(slug: S): TypedRecordsScope<S>;
52168
+ }
52169
+ /**
52170
+ * A record scope bound to one collection slug. Mirrors the untyped
52171
+ * {@link RecordsEndpoint} read/write methods, but pins the record `type` to the
52172
+ * slug and types `metadata` as `CollectionMeta<S>`. Obtain one via
52173
+ * `client.records.from(slug)`.
52174
+ */
52175
+ declare class TypedRecordsScope<S extends string> {
52176
+ private client;
52177
+ private slug;
52178
+ constructor(client: ApiClient, slug: S);
52179
+ /** List records of this collection (the `type` filter is pinned to the slug). */
52180
+ list(params?: RecordListParams): Promise<PaginationResponse<TypedRecordListItem<S>>>;
52181
+ /**
52182
+ * Get a record of this collection by id. Throws if the fetched record belongs
52183
+ * to a different collection — otherwise `metadata` would be mistyped as this
52184
+ * scope's shape. Use `client.records.get()` for cross-collection reads.
52185
+ */
52186
+ get(id: string): Promise<TypedRuntypeRecord<S>>;
52187
+ /** Create a record in this collection (`type` is supplied from the slug). */
52188
+ create(data: TypedCreateRecordRequest<S>): Promise<TypedRecordWriteResponse<S>>;
52189
+ /**
52190
+ * Update a record in this collection. Guards BEFORE writing with a GET: this
52191
+ * scope's `metadata` type must not be written onto a record of another
52192
+ * collection, so a cross-collection id throws instead of mutating. That costs
52193
+ * one extra request; use `client.records.update()` to skip the guard.
52194
+ */
52195
+ update(id: string, data: Partial<TypedCreateRecordRequest<S>>): Promise<TypedRecordWriteResponse<S>>;
52196
+ private typeMismatchError;
52029
52197
  }
52030
52198
  /**
52031
52199
  * Record collections endpoint handlers.
@@ -52087,6 +52255,13 @@ declare class CollectionsEndpoint {
52087
52255
  validateExisting(slug: string, data?: {
52088
52256
  schema?: Record<string, unknown>;
52089
52257
  }): Promise<ValidateExistingRecordsResponse>;
52258
+ /**
52259
+ * Fetch generated TypeScript declarations for the account's schematized
52260
+ * collections (`GET /v1/collections/types.d.ts`) as a raw `.d.ts` string.
52261
+ * Powers `runtype records typegen`; write it to a file and augment the SDK's
52262
+ * `RecordCollections` map so `client.records.from(slug)` types metadata.
52263
+ */
52264
+ typegen(): Promise<string>;
52090
52265
  }
52091
52266
  /**
52092
52267
  * API Keys endpoint handlers
@@ -52773,7 +52948,7 @@ interface AgentToolStartEvent extends BaseAgentEvent {
52773
52948
  iteration: number;
52774
52949
  toolCallId: string;
52775
52950
  toolName: string;
52776
- toolType: 'flow' | 'mcp' | 'builtin' | 'custom' | 'external' | 'advisor' | 'subagent' | 'local';
52951
+ toolType: 'flow' | 'mcp' | 'builtin' | 'custom' | 'external' | 'advisor' | 'subagent' | 'local' | 'data_connection' | 'search';
52777
52952
  parameters?: Record<string, unknown>;
52778
52953
  hiddenParameterNames?: string[];
52779
52954
  /**
@@ -56081,4 +56256,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
56081
56256
  declare function getDefaultPlanPath(taskName: string): string;
56082
56257
  declare function sanitizeTaskSlug(taskName: string): string;
56083
56258
 
56084
- export { type AIGrader, type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, type BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CanonicalDispatchMessageContent, type CanonicalDispatchRequest, type CaseExpected, ChatEndpoint, type CheckGrader, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientWidgetTheme, CollectionsEndpoint, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateCollectionRequest, type CreateConversationRequest, type CreateEvalSuiteInput, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CurrentBilledSpendResponse, type CurrentBilledSpendSource, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DecomposeCriteriaResult, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchAgentInput, type DispatchApprovalContinuationResponse, type DispatchApproveRequest, type DispatchApproveResponse, type DispatchClient, type DispatchContinuationRequest, type DispatchContinuationResponse, type DispatchDetachedApprovalResponse, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchFlowInput, type DispatchMessageContent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type DispatchResponse, type DispatchResumeRequest, type DispatchResumeResponse, type EndUserUsageQuery, type EndUserUsageResponse, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, type ErrorHandlingMode, EvalBuilder, type EvalCaseDefinition, type EvalCaseInput, type EvalCaseProposal, type EvalCaseProposalAccepted, type EvalCaseProposalListResult, type EvalCasesGenerated, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalProposalSource, type EvalProposalStatus, type EvalProposedCase, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunCaseScores, type EvalRunConfig, type EvalRunScores, EvalRunner, type EvalStatus, type EvalSuiteCase, type EvalSuiteCaseInput, type EvalSuiteCoverage, type EvalSuiteDetail, type EvalSuiteLatestRun, type EvalSuiteListResult, type EvalSuiteRunQueued, type EvalSuiteRunResult, type EvalSuiteSummary, EvalSuitesNamespace, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowInlineEvalInput, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GenerateEvalCasesInput, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GetRecordStepConfig$1 as GetRecordStepConfig, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type HumanVerdict, type ImageContentPart, type InferCollectionSchemaResponse, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListCollectionsResponse, type ListConversationsResponse, type ListParams, type ListRecordsStepConfig$1 as ListRecordsStepConfig, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type PersistedGraderOutcome, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordCollection, type RecordCollectionWithHistory, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunEvalCaseResult, type RunEvalInput, type RunEvalResult, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, type AgentSkillBinding as RuntypeAgentSkillBinding, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type GetRecordStepConfig as RuntypeGetRecordStepConfig, type ListRecordsStepConfig as RuntypeListRecordsStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type SlackManifestRequest, type SlackManifestResponse, type SlackOAuthStartRequest, type SlackOAuthStartResponse, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UpdateClientTokenRequest, type UpdateCollectionRequest, type UpdateCollectionResponse, type UpdateConversationRequest, type UpdateEvalCaseInput, type UpdateEvalSuiteInput, type UpdateFlowRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type ValidateExistingRecordsResponse, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withUnifiedEvents };
56259
+ export { type AIGrader, type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, type BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CanonicalDispatchMessageContent, type CanonicalDispatchRequest, type CaseExpected, ChatEndpoint, type CheckGrader, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientWidgetTheme, type CollectionMeta, CollectionsEndpoint, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateCollectionRequest, type CreateConversationRequest, type CreateEvalSuiteInput, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CurrentBilledSpendResponse, type CurrentBilledSpendSource, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DecomposeCriteriaResult, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchAgentInput, type DispatchApprovalContinuationResponse, type DispatchApproveRequest, type DispatchApproveResponse, type DispatchClient, type DispatchContinuationRequest, type DispatchContinuationResponse, type DispatchDetachedApprovalResponse, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchFlowInput, type DispatchMessageContent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type DispatchResponse, type DispatchResumeRequest, type DispatchResumeResponse, type EndUserUsageQuery, type EndUserUsageResponse, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, type ErrorHandlingMode, EvalBuilder, type EvalCaseDefinition, type EvalCaseInput, type EvalCaseProposal, type EvalCaseProposalAccepted, type EvalCaseProposalListResult, type EvalCasesGenerated, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalProposalSource, type EvalProposalStatus, type EvalProposedCase, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunCaseScores, type EvalRunConfig, type EvalRunScores, EvalRunner, type EvalStatus, type EvalSuiteCase, type EvalSuiteCaseInput, type EvalSuiteCoverage, type EvalSuiteDetail, type EvalSuiteLatestRun, type EvalSuiteListResult, type EvalSuiteRunQueued, type EvalSuiteRunResult, type EvalSuiteSummary, EvalSuitesNamespace, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowInlineEvalInput, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GenerateEvalCasesInput, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GetRecordStepConfig$1 as GetRecordStepConfig, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type HumanVerdict, type ImageContentPart, type InferCollectionSchemaResponse, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListCollectionsResponse, type ListConversationsResponse, type ListParams, type ListRecordsStepConfig$1 as ListRecordsStepConfig, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type PersistedGraderOutcome, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordCollection, type RecordCollectionWithHistory, type RecordCollections, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunEvalCaseResult, type RunEvalInput, type RunEvalResult, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, type AgentSkillBinding as RuntypeAgentSkillBinding, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type GetRecordStepConfig as RuntypeGetRecordStepConfig, type ListRecordsStepConfig as RuntypeListRecordsStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type SlackManifestRequest, type SlackManifestResponse, type SlackOAuthStartRequest, type SlackOAuthStartResponse, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, type TypedCreateRecordRequest, type TypedRecordListItem, type TypedRecordWriteResponse, TypedRecordsScope, type TypedRuntypeRecord, UNIFIED_EVENTS_QUERY, type UpdateClientTokenRequest, type UpdateCollectionRequest, type UpdateCollectionResponse, type UpdateConversationRequest, type UpdateEvalCaseInput, type UpdateEvalSuiteInput, type UpdateFlowRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type ValidateExistingRecordsResponse, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withUnifiedEvents };
package/dist/index.d.ts CHANGED
@@ -1925,9 +1925,16 @@ interface paths {
1925
1925
  }[];
1926
1926
  subagentConfig?: {
1927
1927
  allowNesting?: boolean;
1928
+ /** @enum {string} */
1929
+ defaultExecutionMode?: "attached" | "detached";
1928
1930
  defaultMaxTurns?: number;
1929
1931
  defaultModel?: string;
1932
+ /** @enum {string} */
1933
+ defaultNotify?: "none" | "narrate" | "react";
1930
1934
  defaultTimeoutMs?: number;
1935
+ detachedMaxBudgetMs?: number;
1936
+ detachedNoProgressBudgetMs?: number;
1937
+ executionModes?: ("attached" | "detached")[];
1931
1938
  maxSpawnsPerRun?: number;
1932
1939
  maxTurnsLimit?: number;
1933
1940
  toolPool: string[];
@@ -7396,6 +7403,72 @@ interface paths {
7396
7403
  patch?: never;
7397
7404
  trace?: never;
7398
7405
  };
7406
+ "/v1/collections/types.d.ts": {
7407
+ parameters: {
7408
+ query?: never;
7409
+ header?: never;
7410
+ path?: never;
7411
+ cookie?: never;
7412
+ };
7413
+ /**
7414
+ * Generate TypeScript types for schematized collections
7415
+ * @description Emit a TypeScript `.d.ts` module (one interface per schematized collection plus a `declare module '@runtypelabs/sdk'` augmentation of `RecordCollections`) so `client.records.from('<slug>')` types record metadata. Fetch it with `runtype records typegen`; commit and diff-check the output in CI to catch collection-schema drift.
7416
+ */
7417
+ get: {
7418
+ parameters: {
7419
+ query?: never;
7420
+ header?: never;
7421
+ path?: never;
7422
+ cookie?: never;
7423
+ };
7424
+ requestBody?: never;
7425
+ responses: {
7426
+ /** @description A TypeScript declaration module */
7427
+ 200: {
7428
+ headers: {
7429
+ [name: string]: unknown;
7430
+ };
7431
+ content: {
7432
+ "text/plain": string;
7433
+ };
7434
+ };
7435
+ /** @description Unauthorized */
7436
+ 401: {
7437
+ headers: {
7438
+ [name: string]: unknown;
7439
+ };
7440
+ content: {
7441
+ "application/json": components["schemas"]["Error"];
7442
+ };
7443
+ };
7444
+ /** @description Insufficient permissions */
7445
+ 403: {
7446
+ headers: {
7447
+ [name: string]: unknown;
7448
+ };
7449
+ content: {
7450
+ "application/json": components["schemas"]["Error"];
7451
+ };
7452
+ };
7453
+ /** @description Internal server error */
7454
+ 500: {
7455
+ headers: {
7456
+ [name: string]: unknown;
7457
+ };
7458
+ content: {
7459
+ "application/json": components["schemas"]["Error"];
7460
+ };
7461
+ };
7462
+ };
7463
+ };
7464
+ put?: never;
7465
+ post?: never;
7466
+ delete?: never;
7467
+ options?: never;
7468
+ head?: never;
7469
+ patch?: never;
7470
+ trace?: never;
7471
+ };
7399
7472
  "/v1/collections/{slug}": {
7400
7473
  parameters: {
7401
7474
  query?: never;
@@ -31360,7 +31433,7 @@ interface paths {
31360
31433
  requestBody?: {
31361
31434
  content: {
31362
31435
  "application/json": {
31363
- /** @default kimi-k2.6 */
31436
+ /** @default gemini-3.6-flash */
31364
31437
  model?: string;
31365
31438
  name: string;
31366
31439
  /**
@@ -31557,7 +31630,7 @@ interface paths {
31557
31630
  requestBody?: {
31558
31631
  content: {
31559
31632
  "application/json": {
31560
- /** @default kimi-k2.6 */
31633
+ /** @default gemini-3.6-flash */
31561
31634
  model?: string;
31562
31635
  name?: string;
31563
31636
  /**
@@ -51690,6 +51763,59 @@ declare function attachRuntimeToolsToDispatchRequest(request: DispatchRequest, r
51690
51763
  */
51691
51764
  declare function applyGeneratedRuntimeToolProposalToDispatchRequest(request: DispatchRequest, proposal: unknown, options?: ApplyGeneratedProposalOptions): ApplyGeneratedProposalResult;
51692
51765
 
51766
+ /**
51767
+ * Typed record collections — the SDK generic seam (§5.1 of the
51768
+ * Records→Collections plan).
51769
+ *
51770
+ * Customers describe their collection schemas by augmenting `RecordCollections`
51771
+ * via declaration merging — hand-authored, or generated by
51772
+ * `runtype records typegen` (`GET /v1/collections/types.d.ts`):
51773
+ *
51774
+ * declare module '@runtypelabs/sdk' {
51775
+ * interface RecordCollections {
51776
+ * customers: { email: string; tier?: 'free' | 'pro' }
51777
+ * }
51778
+ * }
51779
+ *
51780
+ * Then `client.records.from('customers')` returns a scope whose read/write
51781
+ * methods type `metadata` as that shape. Unregistered slugs fall back to
51782
+ * `Record<string, unknown>`, so `from()` is always usable — no codegen
51783
+ * required for it to be safe.
51784
+ *
51785
+ * NOTE: `packages/client` cannot depend on `@runtypelabs/shared`, so these
51786
+ * types are defined locally rather than reusing the shared dialect types.
51787
+ */
51788
+
51789
+ /**
51790
+ * Customer-augmented map of collection slug → metadata shape. Empty by default;
51791
+ * populated via declaration merging (see the module docstring). Because it is
51792
+ * augmented through the package's public name, it must stay exported from the
51793
+ * SDK entry point.
51794
+ */
51795
+ interface RecordCollections {
51796
+ }
51797
+ /** Resolve a slug to its augmented metadata shape, or the untyped fallback. */
51798
+ type CollectionMeta<S extends string> = S extends keyof RecordCollections ? RecordCollections[S] : Record<string, unknown>;
51799
+ /** A record (`GET /v1/records/{id}`) with `metadata` typed for slug `S`. */
51800
+ type TypedRuntypeRecord<S extends string> = Omit<RuntypeRecord, 'metadata'> & {
51801
+ metadata: CollectionMeta<S>;
51802
+ };
51803
+ /** A list-row record with `metadata` typed for slug `S`. */
51804
+ type TypedRecordListItem<S extends string> = Omit<RecordListItem, 'metadata'> & {
51805
+ metadata: CollectionMeta<S>;
51806
+ };
51807
+ /** A create/update record response with `metadata` typed for slug `S`. */
51808
+ type TypedRecordWriteResponse<S extends string> = Omit<RecordWriteResponse, 'metadata'> & {
51809
+ metadata: CollectionMeta<S>;
51810
+ };
51811
+ /**
51812
+ * Create/update body for a typed scope: `type` is pinned to the scope's slug
51813
+ * (so it is omitted here) and `metadata` is typed for slug `S`.
51814
+ */
51815
+ type TypedCreateRecordRequest<S extends string> = Omit<CreateRecordRequest, 'type' | 'metadata'> & {
51816
+ metadata?: CollectionMeta<S>;
51817
+ };
51818
+
51693
51819
  /**
51694
51820
  * Pluggable workflow architecture for marathon task execution.
51695
51821
  *
@@ -52026,6 +52152,48 @@ declare class RecordsEndpoint {
52026
52152
  type?: string;
52027
52153
  name?: string;
52028
52154
  }): Promise<PaginationResponse<RecordListItem>>;
52155
+ /**
52156
+ * Scope record operations to a single collection slug, typing `metadata`
52157
+ * against the customer-augmented `RecordCollections` map (§5.1). The returned
52158
+ * scope pins the record `type` filter to `slug` and types `.list/.get/.create/
52159
+ * .update` metadata as `CollectionMeta<S>`.
52160
+ *
52161
+ * @example
52162
+ * ```ts
52163
+ * const customers = client.records.from('customers')
52164
+ * await customers.create({ name: 'Acme', metadata: { tier: 'pro' } })
52165
+ * ```
52166
+ */
52167
+ from<S extends string>(slug: S): TypedRecordsScope<S>;
52168
+ }
52169
+ /**
52170
+ * A record scope bound to one collection slug. Mirrors the untyped
52171
+ * {@link RecordsEndpoint} read/write methods, but pins the record `type` to the
52172
+ * slug and types `metadata` as `CollectionMeta<S>`. Obtain one via
52173
+ * `client.records.from(slug)`.
52174
+ */
52175
+ declare class TypedRecordsScope<S extends string> {
52176
+ private client;
52177
+ private slug;
52178
+ constructor(client: ApiClient, slug: S);
52179
+ /** List records of this collection (the `type` filter is pinned to the slug). */
52180
+ list(params?: RecordListParams): Promise<PaginationResponse<TypedRecordListItem<S>>>;
52181
+ /**
52182
+ * Get a record of this collection by id. Throws if the fetched record belongs
52183
+ * to a different collection — otherwise `metadata` would be mistyped as this
52184
+ * scope's shape. Use `client.records.get()` for cross-collection reads.
52185
+ */
52186
+ get(id: string): Promise<TypedRuntypeRecord<S>>;
52187
+ /** Create a record in this collection (`type` is supplied from the slug). */
52188
+ create(data: TypedCreateRecordRequest<S>): Promise<TypedRecordWriteResponse<S>>;
52189
+ /**
52190
+ * Update a record in this collection. Guards BEFORE writing with a GET: this
52191
+ * scope's `metadata` type must not be written onto a record of another
52192
+ * collection, so a cross-collection id throws instead of mutating. That costs
52193
+ * one extra request; use `client.records.update()` to skip the guard.
52194
+ */
52195
+ update(id: string, data: Partial<TypedCreateRecordRequest<S>>): Promise<TypedRecordWriteResponse<S>>;
52196
+ private typeMismatchError;
52029
52197
  }
52030
52198
  /**
52031
52199
  * Record collections endpoint handlers.
@@ -52087,6 +52255,13 @@ declare class CollectionsEndpoint {
52087
52255
  validateExisting(slug: string, data?: {
52088
52256
  schema?: Record<string, unknown>;
52089
52257
  }): Promise<ValidateExistingRecordsResponse>;
52258
+ /**
52259
+ * Fetch generated TypeScript declarations for the account's schematized
52260
+ * collections (`GET /v1/collections/types.d.ts`) as a raw `.d.ts` string.
52261
+ * Powers `runtype records typegen`; write it to a file and augment the SDK's
52262
+ * `RecordCollections` map so `client.records.from(slug)` types metadata.
52263
+ */
52264
+ typegen(): Promise<string>;
52090
52265
  }
52091
52266
  /**
52092
52267
  * API Keys endpoint handlers
@@ -52773,7 +52948,7 @@ interface AgentToolStartEvent extends BaseAgentEvent {
52773
52948
  iteration: number;
52774
52949
  toolCallId: string;
52775
52950
  toolName: string;
52776
- toolType: 'flow' | 'mcp' | 'builtin' | 'custom' | 'external' | 'advisor' | 'subagent' | 'local';
52951
+ toolType: 'flow' | 'mcp' | 'builtin' | 'custom' | 'external' | 'advisor' | 'subagent' | 'local' | 'data_connection' | 'search';
52777
52952
  parameters?: Record<string, unknown>;
52778
52953
  hiddenParameterNames?: string[];
52779
52954
  /**
@@ -56081,4 +56256,4 @@ declare function getLikelySupportingCandidatePaths(bestCandidatePath: string | u
56081
56256
  declare function getDefaultPlanPath(taskName: string): string;
56082
56257
  declare function sanitizeTaskSlug(taskName: string): string;
56083
56258
 
56084
- export { type AIGrader, type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, type BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CanonicalDispatchMessageContent, type CanonicalDispatchRequest, type CaseExpected, ChatEndpoint, type CheckGrader, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientWidgetTheme, CollectionsEndpoint, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateCollectionRequest, type CreateConversationRequest, type CreateEvalSuiteInput, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CurrentBilledSpendResponse, type CurrentBilledSpendSource, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DecomposeCriteriaResult, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchAgentInput, type DispatchApprovalContinuationResponse, type DispatchApproveRequest, type DispatchApproveResponse, type DispatchClient, type DispatchContinuationRequest, type DispatchContinuationResponse, type DispatchDetachedApprovalResponse, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchFlowInput, type DispatchMessageContent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type DispatchResponse, type DispatchResumeRequest, type DispatchResumeResponse, type EndUserUsageQuery, type EndUserUsageResponse, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, type ErrorHandlingMode, EvalBuilder, type EvalCaseDefinition, type EvalCaseInput, type EvalCaseProposal, type EvalCaseProposalAccepted, type EvalCaseProposalListResult, type EvalCasesGenerated, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalProposalSource, type EvalProposalStatus, type EvalProposedCase, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunCaseScores, type EvalRunConfig, type EvalRunScores, EvalRunner, type EvalStatus, type EvalSuiteCase, type EvalSuiteCaseInput, type EvalSuiteCoverage, type EvalSuiteDetail, type EvalSuiteLatestRun, type EvalSuiteListResult, type EvalSuiteRunQueued, type EvalSuiteRunResult, type EvalSuiteSummary, EvalSuitesNamespace, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowInlineEvalInput, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GenerateEvalCasesInput, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GetRecordStepConfig$1 as GetRecordStepConfig, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type HumanVerdict, type ImageContentPart, type InferCollectionSchemaResponse, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListCollectionsResponse, type ListConversationsResponse, type ListParams, type ListRecordsStepConfig$1 as ListRecordsStepConfig, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type PersistedGraderOutcome, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordCollection, type RecordCollectionWithHistory, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunEvalCaseResult, type RunEvalInput, type RunEvalResult, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, type AgentSkillBinding as RuntypeAgentSkillBinding, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type GetRecordStepConfig as RuntypeGetRecordStepConfig, type ListRecordsStepConfig as RuntypeListRecordsStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type SlackManifestRequest, type SlackManifestResponse, type SlackOAuthStartRequest, type SlackOAuthStartResponse, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, UNIFIED_EVENTS_QUERY, type UpdateClientTokenRequest, type UpdateCollectionRequest, type UpdateCollectionResponse, type UpdateConversationRequest, type UpdateEvalCaseInput, type UpdateEvalSuiteInput, type UpdateFlowRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type ValidateExistingRecordsResponse, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withUnifiedEvents };
56259
+ export { type AIGrader, type Agent, type AgentApprovalCompleteEvent, type AgentApprovalStartEvent, type AgentCompleteEvent, type AgentDefinition, type AgentDefinitionConfig, AgentDriftError, AgentEnsureConflictError, type AgentErrorEvent, type AgentEvent, type AgentEventType, type AgentExecuteRequest, type AgentExecuteResponse, type AgentIterationCompleteEvent, type AgentIterationStartEvent, type AgentMediaEvent, type AgentMessage, type AgentPausedEvent, type AgentPingEvent, type AgentPullResult, type AgentReflectionEvent, type AgentRuntimeToolDefinition, type AgentStartEvent, type AgentStreamCallbacks, type AgentStreamEvent, type AgentSubagentConfig, type AgentToolCompleteEvent, type AgentToolDeltaEvent, type AgentToolInputCompleteEvent, type AgentToolInputDeltaEvent, type AgentToolStartEvent, type AgentTurnCompleteEvent, type AgentTurnDeltaEvent, type AgentTurnStartEvent, type AgentVersionDetail, type AgentVersionListItem, type AgentVersionPublishResponse, AgentVersionsEndpoint, type AgentVersionsListResponse, AgentsEndpoint, AgentsNamespace, AnalyticsEndpoint, type ApiClient, type ApiKey, ApiKeysEndpoint, type ApiResponse, type ApplyGeneratedProposalOptions, type ApplyGeneratedProposalResult, type AssetReferenceContentPart, type AttachRuntimeToolsOptions, type BaseAgentEvent, BatchBuilder, type BatchClient, type BatchListParams, type BatchOptions, type BatchRequest, type BatchResult, type BatchScheduleConfig, type BatchStatus, BatchesNamespace, BillingEndpoint, type BillingSpendAnalyticsParams, type BindSkillInput, type BuiltInGraderId, type BuiltInTool, type BulkEditCondition, type BulkEditRequest, type BulkEditResponse, type BulkEditResult, type CanonicalDispatchMessageContent, type CanonicalDispatchRequest, type CaseExpected, ChatEndpoint, type CheckGrader, ClientBatchBuilder, type ClientConfig, type ClientConversation, ClientEvalBuilder, ClientFlowBuilder, type ClientToken, type ClientTokenConfig, type ClientTokenEnvironment, type ClientTokenVersionPin, ClientTokensEndpoint, type ClientToolDefinition, type ClientWidgetTheme, type CollectionMeta, CollectionsEndpoint, type ConditionalGetResult, type ConditionalStepConfig$1 as ConditionalStepConfig, type ContextErrorHandling, type ContextFallback, ContextTemplatesEndpoint, type Conversation, type ConversationListItem, type ConversationListParams, type ConversationMessage, type ConversationSource, ConversationsEndpoint, type ConversationsListResponse, type CreateApiKeyRequest, type CreateClientTokenRequest, type CreateClientTokenResponse, type CreateCollectionRequest, type CreateConversationRequest, type CreateEvalSuiteInput, type CreateFlowRequest, type CreateModelConfigRequest, type CreatePromptData, type CreatePromptRequest, type CreateProviderKeyRequest, type CreateRecordRequest, type CreateScheduleRequest, type CreateSecretRequest, type CreateToolRequest, type CurrentBilledSpendResponse, type CurrentBilledSpendSource, type CustomMCPServer, type CustomMCPServerAuth, type CustomToolConfig, DEFAULT_RECOVERY_AFTER_EMPTY_SESSIONS, DEFAULT_STALL_STOP_AFTER, type DecomposeCriteriaResult, type DefineAgentInput, type DefineEvalCaseInput, type DefineEvalInput, type DefineFlowInput, type DefineProductInput, type DefineSkillInput, type DefineSurfaceInput, type DefineToolInput, type DeployCfSandboxRequest, type DeployCfSandboxResponse, type DeploySandboxRequest, type DeploySandboxResponse, type DiscoveredModel, type DispatchAgentInput, type DispatchApprovalContinuationResponse, type DispatchApproveRequest, type DispatchApproveResponse, type DispatchClient, type DispatchContinuationRequest, type DispatchContinuationResponse, type DispatchDetachedApprovalResponse, DispatchEndpoint, type DispatchEnvironment, type DispatchEvent, type DispatchFlowInput, type DispatchMessageContent, type DispatchOptions$1 as DispatchOptions, type DispatchRequest, type DispatchResponse, type DispatchResumeRequest, type DispatchResumeResponse, type EndUserUsageQuery, type EndUserUsageResponse, type EnsureAgentConverged, type EnsureAgentOptions, type EnsureAgentPlan, type EnsureAgentResult, type EnsureEvalResult, type EnsureFlowConverged, type EnsureFlowOptions, type EnsureFlowPlan, type EnsureFlowResult, type EnsureFpoOptions, type EnsureFpoResult, type EnsureProductConverged, type EnsureProductOptions, type EnsureProductPlan, type EnsureProductResult, type EnsureSkillConverged, type EnsureSkillOptions, type EnsureSkillPlan, type EnsureSkillResult, type EnsureSurfaceConverged, type EnsureSurfaceOptions, type EnsureSurfacePlan, type EnsureSurfaceResult, type EnsureToolConverged, type EnsureToolOptions, type EnsureToolPlan, type EnsureToolResult, type ErrorHandlingMode, EvalBuilder, type EvalCaseDefinition, type EvalCaseInput, type EvalCaseProposal, type EvalCaseProposalAccepted, type EvalCaseProposalListResult, type EvalCasesGenerated, type EvalClient, type EvalDefinition, EvalEndpoint, type EvalListParams, type EvalMessage, type EvalOptions, type EvalProposalSource, type EvalProposalStatus, type EvalProposedCase, type EvalPullResult, type EvalRecord, type EvalRequest, type EvalResult, type EvalRunCaseScores, type EvalRunConfig, type EvalRunScores, EvalRunner, type EvalStatus, type EvalSuiteCase, type EvalSuiteCaseInput, type EvalSuiteCoverage, type EvalSuiteDetail, type EvalSuiteLatestRun, type EvalSuiteListResult, type EvalSuiteRunQueued, type EvalSuiteRunResult, type EvalSuiteSummary, EvalSuitesNamespace, type EvalTarget, EvalsNamespace, type ExecuteToolRequest, type ExecuteToolResponse, type ExecutionStreamEvent, type ExternalAgentContext, type ExternalToolConfig, type FallbackFailEvent, type FallbackStartEvent, type FallbackSuccessEvent, type FallbackTrigger, type FallbackTriggerType, type FallbacksExhaustedEvent, type FallbacksInitiatedEvent, type FetchUrlStepConfig$1 as FetchUrlStepConfig, type FieldFormat, type FileContentPart, type Flow, type FlowAttachment, FlowBuilder, type FlowCompleteEvent, type FlowConfig$1 as FlowConfig, type FlowDefinition, type FlowDefinitionStep, FlowDriftError, FlowEnsureConflictError, type FlowErrorEvent, type FlowFallback, type FlowInlineEvalInput, type FlowListItem, type FlowPausedEvent, type FlowPullResult, FlowResult, type FlowStartEvent, type FlowStep, type FlowStepDefinition, type FlowStepType, FlowStepsEndpoint, type FlowStreamEvent, type FlowSummary, type FlowToolConfig, type FlowValidationClient, type FlowValidationIssue, type FlowValidationResult, type FlowVersionDetail, type FlowVersionListItem, type FlowVersionPublishResponse, FlowVersionsEndpoint, type FlowVersionsListResponse, FlowsEndpoint, FlowsNamespace, type FpoEntityOutcome, type FpoInput, type GenerateEmbeddingStepConfig$1 as GenerateEmbeddingStepConfig, type GenerateEvalCasesInput, type GeneratedRuntimeToolGateDecision, type GeneratedRuntimeToolGateOptions, type GetRecordStepConfig$1 as GetRecordStepConfig, type Gradeable, type GraderConfig, type GraderOutcome, type GraderSeverity, type HumanVerdict, type ImageContentPart, type InferCollectionSchemaResponse, type Integration, type IntegrationTool, IntegrationsEndpoint, type IntegrationsListResponse, type JSONSchema, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, LEDGER_ARTIFACT_LINE_PREFIX, type ListCollectionsResponse, type ListConversationsResponse, type ListParams, type ListRecordsStepConfig$1 as ListRecordsStepConfig, type LocalToolConfig, type LocalToolDefinition, type LocalToolExecutionCompleteEvent, type LocalToolExecutionLoopSnapshotSlice, type LocalToolExecutionStartEvent, type LogEntry, type LogQueryParams, type LogQueryResponse, type LogQueryResult, type LogStatsParams, type LogStatsResponse, type LogStatsResult, LogsEndpoint, type Message$1 as Message, type MessageContent, type MessageFallback, type Metadata, type ModelConfig, ModelConfigsEndpoint, type ModelFallback, type ModelOverride, type ModelUsageDetail, type ModelUsageQueryParams, type ModelUsageResponse, type ModelUsageSummary, type ModelUsageTimeSeries, type PaginationResponse, type PersistedGraderOutcome, type ProductDefinition, ProductDriftError, ProductEnsureConflictError, type ProductPullResult, ProductsNamespace, type Prompt$1 as Prompt, type PromptErrorHandling, type PromptFallback, type PromptListParams, type PromptStepConfig$1 as PromptStepConfig, PromptsEndpoint, PromptsNamespace, type ProviderApiKey, type ProviderKeyModel, ProviderKeysEndpoint, type PullFpoResult, RUNTYPE_CLIENT_KIND, type ReasoningConfig, type ReasoningContentPart, type ReasoningValue, type RecordCollection, type RecordCollectionWithHistory, type RecordCollections, type RecordConfig$1 as RecordConfig, type RecordCostAggregation, type RecordCostModelBreakdown, type RecordFilter, type RecordFilterCondition, type RecordFilterGroup, type RecordFilterOperator, type RecordListItem, type RecordListParams, type RecordStepResult, type RecordStepResultsParams, type RecordStepResultsResponse, type RecordWriteResponse, RecordsEndpoint, type RetrieveRecordStepConfig$1 as RetrieveRecordStepConfig, type RetryFallback, type RunEvalCaseResult, type RunEvalInput, type RunEvalResult, type RunTaskContextBudgetBreakdown, type RunTaskContextCompactionEvent, type RunTaskContextCompactionStrategy, type RunTaskContextNoticeEvent, type RunTaskContextSummaryEntry, type RunTaskContinuation, type RunTaskOffloadRecorder, type RunTaskOnContextCompaction, type RunTaskOnContextNotice, type RunTaskOnSession, type RunTaskOptions, type RunTaskResult, type RunTaskResumeState, type RunTaskSessionSummary, type RunTaskState, type RunTaskStateSlice, type RunTaskStatus, type RunTaskToolTraceSlice, type RuntimeCustomToolConfig, type RuntimeExternalToolConfig, type RuntimeFlowToolConfig, type RuntimeLocalToolConfig, type RuntimeSubagentToolConfig, type RuntimeTool, type RuntimeToolConfig, Runtype, type AgentSkillBinding as RuntypeAgentSkillBinding, RuntypeApiError, RuntypeClient, type ConditionalStepConfig as RuntypeConditionalStepConfig, type RuntypeConfig, type FetchUrlStepConfig as RuntypeFetchUrlStepConfig, RuntypeFlowBuilder, type FlowConfig as RuntypeFlowConfig, type GenerateEmbeddingStepConfig as RuntypeGenerateEmbeddingStepConfig, type GetRecordStepConfig as RuntypeGetRecordStepConfig, type ListRecordsStepConfig as RuntypeListRecordsStepConfig, type Message as RuntypeMessage, type ModelOverride$1 as RuntypeModelOverride, type Prompt as RuntypePrompt, type PromptStepConfig as RuntypePromptStepConfig, type RuntypeRecord, type RecordConfig as RuntypeRecordConfig, type RetrieveRecordStepConfig as RuntypeRetrieveRecordStepConfig, type SearchStepConfig as RuntypeSearchStepConfig, type SendEmailStepConfig as RuntypeSendEmailStepConfig, type SendEventStepConfig as RuntypeSendEventStepConfig, type SendStreamStepConfig as RuntypeSendStreamStepConfig, type SetVariableStepConfig as RuntypeSetVariableStepConfig, type Skill as RuntypeSkill, type SkillCapabilities as RuntypeSkillCapabilities, type SkillFrontmatter as RuntypeSkillFrontmatter, type SkillManifest as RuntypeSkillManifest, type SkillProposal as RuntypeSkillProposal, type SkillRuntypeExtensions as RuntypeSkillRuntypeExtensions, type SkillScanFinding as RuntypeSkillScanFinding, type SkillScanResult as RuntypeSkillScanResult, type SkillScanVerdict as RuntypeSkillScanVerdict, type SkillVersion as RuntypeSkillVersion, type TransformDataStepConfig as RuntypeTransformDataStepConfig, type UpsertFlowConfig as RuntypeUpsertFlowConfig, type UpsertRecordStepConfig as RuntypeUpsertRecordStepConfig, type VectorSearchStepConfig as RuntypeVectorSearchStepConfig, type WaitUntilStepConfig as RuntypeWaitUntilStepConfig, SDK_USER_AGENT, SDK_VERSION, STEP_FIELD_REGISTRY, STEP_TYPE_TO_METHOD, type Schedule, type ScheduleExecutionOptions, type ScheduleListParams, type ScheduleMessage, type ScheduleMessageSet, type ScheduleMessages, type ScheduleMutationResponse, type ScheduleRun, type ScheduleRunNowResponse, type ScheduleStatusResponse, type ScheduleTarget, type ScheduleTrigger, SchedulesEndpoint, type SearchStepConfig$1 as SearchStepConfig, type Secret, type SecretCheckResponse, type SecretDeleteResponse, type SecretSetupUrlRequest, type SecretSetupUrlResponse, SecretsEndpoint, type SendEmailStepConfig$1 as SendEmailStepConfig, type SendEventStepConfig$1 as SendEventStepConfig, type SendStreamStepConfig$1 as SendStreamStepConfig, type SetVariableStepConfig$1 as SetVariableStepConfig, type SkillDefinition, SkillDriftError, SkillEnsureConflictError, type SkillListPage, type SkillListPagination, type SkillListParams, type SkillManifestInput, type SkillMarkdownInput, type SkillOrigin, type SkillProposalStatus, SkillProposalsNamespace, type SkillPullResult, type SkillStatus, type SkillTrustLevel, type SkillVersionStatus, type SkillWithVersion, type SkillWriteInput, SkillsNamespace, type SlackInstallRequest, type SlackManifestRequest, type SlackManifestResponse, type SlackOAuthStartRequest, type SlackOAuthStartResponse, type StepCompleteEvent, type StepDeltaEvent, type StepFallback, type StepFieldMeta, type StepStartEvent, type StepWaitingLocalEvent, type StreamCallbacks, type StreamConsumeOptions, type StreamEvent, type StreamEventOf, type SubagentToolConfig, type Surface, type SurfaceDefinition, type SurfaceDefinitionEnvironment, type SurfaceDefinitionStatus, type SurfaceDefinitionType, SurfaceDriftError, SurfaceEnsureConflictError, type SurfaceListParams, type SurfacePullResult, SurfacesEndpoint, SurfacesNamespace, type TextContentPart, type Tool, type ToolApprovalGrant, ToolApprovalGrantsEndpoint, type ToolConfig, type ToolDefinition, type ToolDefinitionType, ToolDriftError, ToolEnsureConflictError, type ToolPullResult, type ToolWithValidation, type ToolsConfig, ToolsEndpoint, ToolsNamespace, type TransformDataStepConfig$1 as TransformDataStepConfig, type TypedCreateRecordRequest, type TypedRecordListItem, type TypedRecordWriteResponse, TypedRecordsScope, type TypedRuntypeRecord, UNIFIED_EVENTS_QUERY, type UpdateClientTokenRequest, type UpdateCollectionRequest, type UpdateCollectionResponse, type UpdateConversationRequest, type UpdateEvalCaseInput, type UpdateEvalSuiteInput, type UpdateFlowRequest, type UpdatePromptData, type UpdateProviderKeyRequest, type UpdateScheduleRequest, type UpdateSecretRequest, type UpdateToolRequest, type UpdatedFlow, type UpsertFlowConfig$1 as UpsertFlowConfig, type UpsertOptions, type UpsertRecordStepConfig$1 as UpsertRecordStepConfig, type UserProfile, UsersEndpoint, type ValidateExistingRecordsResponse, type VectorSearchStepConfig$1 as VectorSearchStepConfig, type VersionType, type WaitUntilStepConfig$1 as WaitUntilStepConfig, type WorkflowCompileDeps, type WorkflowCompletionCriteriaConfig, type WorkflowConfig, type WorkflowConfigFactory, type WorkflowContext, type WorkflowDefinition, type WorkflowHookEntry, type WorkflowHookKind, type WorkflowHookRef, type WorkflowHookSignatures, type WorkflowMilestoneConfig, type WorkflowPhase, type WorkflowPolicyConfig, type WorkflowRecoveryConfig, type WorkflowSlot, type WorkflowStallPolicy, applyGeneratedRuntimeToolProposalToDispatchRequest, attachRuntimeToolsToDispatchRequest, buildEmptySessionNudge, buildGeneratedRuntimeToolGateOutput, buildLedgerOffloadReference, buildPolicyGuidance, buildSendViewOffloadMarker, calledTool, compileWorkflowConfig, completed, computeAgentContentHash, computeEvalContentHash, computeFlowContentHash, computeFpoContentHash, computeProductContentHash, computeSkillContentHash, computeSurfaceContentHash, computeToolContentHash, contains, cost, createAgentEventTranslator, createClient, createExternalTool, createFlowEventTranslator, defaultWorkflow, defaultWorkflowConfig, defineAgent, defineEval, defineFlow, defineFpo, definePlaybook, defineProduct, defineSkill, defineSurface, defineTool, deployWorkflow, ensureDefaultWorkflowHooks, ensureEval, ensureFpo, evaluateGeneratedRuntimeToolProposal, extractDeclaredToolResultChars, gameWorkflow, getDefaultPlanPath, getLikelySupportingCandidatePaths, interpolateWorkflowTemplate, isDiscoveryToolName, isMarathonArtifactPath, isPreservationSensitiveTask, isUnifiedEventType, isWorkflowHookRef, jsonField, judge, judges, latency, length, listWorkflowHooks, matchesExpected, maxToolCalls, noError, normalizeAgentDefinition, normalizeCandidatePath, normalizeFpoDefinition, normalizeProductDefinition, normalizeSkillDefinition, normalizeSurfaceDefinition, normalizeToolDefinition, notCalledTool, notContains, parseFinalBuffer, parseLedgerArtifactRelativePath, parseOffloadedOutputId, parseSSEChunk, processStream, pullEval, pullFpo, ranStep, regex, registerWorkflowHook, resolveStallStopAfter, resolveWorkflowHook, runEvalSuite, sanitizeTaskSlug, shouldInjectEmptySessionNudge, shouldRequestModelEscalation, stepOrder, streamEvents, toolOrder, unregisterWorkflowHook, usedNoTools, validJson, withUnifiedEvents };
package/dist/index.mjs CHANGED
@@ -6261,7 +6261,7 @@ var Runtype = class {
6261
6261
 
6262
6262
  // src/version.ts
6263
6263
  var FALLBACK_VERSION = "0.0.0";
6264
- var SDK_VERSION = "6.5.0".length > 0 ? "6.5.0" : FALLBACK_VERSION;
6264
+ var SDK_VERSION = "6.6.0".length > 0 ? "6.6.0" : FALLBACK_VERSION;
6265
6265
  var RUNTYPE_CLIENT_KIND = "sdk";
6266
6266
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6267
6267
 
@@ -8508,6 +8508,69 @@ var RecordsEndpoint = class {
8508
8508
  limit: 1
8509
8509
  });
8510
8510
  }
8511
+ /**
8512
+ * Scope record operations to a single collection slug, typing `metadata`
8513
+ * against the customer-augmented `RecordCollections` map (§5.1). The returned
8514
+ * scope pins the record `type` filter to `slug` and types `.list/.get/.create/
8515
+ * .update` metadata as `CollectionMeta<S>`.
8516
+ *
8517
+ * @example
8518
+ * ```ts
8519
+ * const customers = client.records.from('customers')
8520
+ * await customers.create({ name: 'Acme', metadata: { tier: 'pro' } })
8521
+ * ```
8522
+ */
8523
+ from(slug) {
8524
+ return new TypedRecordsScope(this.client, slug);
8525
+ }
8526
+ };
8527
+ var TypedRecordsScope = class {
8528
+ constructor(client, slug) {
8529
+ this.client = client;
8530
+ this.slug = slug;
8531
+ }
8532
+ /** List records of this collection (the `type` filter is pinned to the slug). */
8533
+ async list(params) {
8534
+ return this.client.get("/records", {
8535
+ ...params,
8536
+ type: this.slug
8537
+ });
8538
+ }
8539
+ /**
8540
+ * Get a record of this collection by id. Throws if the fetched record belongs
8541
+ * to a different collection — otherwise `metadata` would be mistyped as this
8542
+ * scope's shape. Use `client.records.get()` for cross-collection reads.
8543
+ */
8544
+ async get(id) {
8545
+ const record = await this.client.get(`/records/${id}`);
8546
+ const type = record.type;
8547
+ if (type !== void 0 && type !== this.slug) throw this.typeMismatchError(id, type);
8548
+ return record;
8549
+ }
8550
+ /** Create a record in this collection (`type` is supplied from the slug). */
8551
+ async create(data) {
8552
+ return this.client.post("/records", {
8553
+ ...data,
8554
+ type: this.slug
8555
+ });
8556
+ }
8557
+ /**
8558
+ * Update a record in this collection. Guards BEFORE writing with a GET: this
8559
+ * scope's `metadata` type must not be written onto a record of another
8560
+ * collection, so a cross-collection id throws instead of mutating. That costs
8561
+ * one extra request; use `client.records.update()` to skip the guard.
8562
+ */
8563
+ async update(id, data) {
8564
+ const existing = await this.client.get(`/records/${id}`);
8565
+ const type = existing?.type;
8566
+ if (type !== void 0 && type !== this.slug) throw this.typeMismatchError(id, type);
8567
+ return this.client.put(`/records/${id}`, data);
8568
+ }
8569
+ typeMismatchError(id, actualType) {
8570
+ return new Error(
8571
+ `Record ${id} belongs to collection "${actualType}", not "${this.slug}". Use client.records.from("${actualType}") or the untyped client.records methods for cross-collection access.`
8572
+ );
8573
+ }
8511
8574
  };
8512
8575
  var CollectionsEndpoint = class {
8513
8576
  constructor(client) {
@@ -8571,6 +8634,15 @@ var CollectionsEndpoint = class {
8571
8634
  data ?? {}
8572
8635
  );
8573
8636
  }
8637
+ /**
8638
+ * Fetch generated TypeScript declarations for the account's schematized
8639
+ * collections (`GET /v1/collections/types.d.ts`) as a raw `.d.ts` string.
8640
+ * Powers `runtype records typegen`; write it to a file and augment the SDK's
8641
+ * `RecordCollections` map so `client.records.from(slug)` types metadata.
8642
+ */
8643
+ async typegen() {
8644
+ return this.client.get("/collections/types.d.ts");
8645
+ }
8574
8646
  };
8575
8647
  var ApiKeysEndpoint = class {
8576
8648
  constructor(client) {
@@ -14055,6 +14127,7 @@ export {
14055
14127
  ToolEnsureConflictError,
14056
14128
  ToolsEndpoint,
14057
14129
  ToolsNamespace,
14130
+ TypedRecordsScope,
14058
14131
  UNIFIED_EVENTS_QUERY,
14059
14132
  UsersEndpoint,
14060
14133
  applyGeneratedRuntimeToolProposalToDispatchRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "6.5.0",
3
+ "version": "6.6.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",