@runtypelabs/sdk 8.0.3 → 9.1.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
@@ -6437,7 +6437,7 @@ var Runtype = class {
6437
6437
 
6438
6438
  // src/version.ts
6439
6439
  var FALLBACK_VERSION = "0.0.0";
6440
- var SDK_VERSION = "8.0.3".length > 0 ? "8.0.3" : FALLBACK_VERSION;
6440
+ var SDK_VERSION = "9.1.0".length > 0 ? "9.1.0" : FALLBACK_VERSION;
6441
6441
  var RUNTYPE_CLIENT_KIND = "sdk";
6442
6442
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6443
6443
 
package/dist/index.d.cts CHANGED
@@ -2804,6 +2804,8 @@ interface paths {
2804
2804
  agentSpec?: unknown;
2805
2805
  cancelRequestedAt: string | null;
2806
2806
  completedAt: string | null;
2807
+ /** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
2808
+ conversationId: string | null;
2807
2809
  createdAt: string;
2808
2810
  executionId: string;
2809
2811
  /** @enum {string} */
@@ -2937,6 +2939,8 @@ interface paths {
2937
2939
  agentSpec?: unknown;
2938
2940
  cancelRequestedAt: string | null;
2939
2941
  completedAt: string | null;
2942
+ /** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
2943
+ conversationId: string | null;
2940
2944
  createdAt: string;
2941
2945
  executionId: string;
2942
2946
  /** @enum {string} */
@@ -5292,6 +5296,11 @@ interface paths {
5292
5296
  "application/json": {
5293
5297
  batchExecutionId: string;
5294
5298
  completedAt?: string;
5299
+ /**
5300
+ * @description Run-level engine summary derived from the batch's per-record executionEngine values: 'runtime' or 'legacy' when every attributed record ran on that engine, 'mixed' when the batch spans both (e.g. a mid-flight fallback), and null when the run has no attributed records (runs recorded before attribution shipped).
5301
+ * @enum {string|null}
5302
+ */
5303
+ executionEngineSummary?: "runtime" | "legacy" | "mixed" | null;
5295
5304
  failedRecords: number;
5296
5305
  flowId: string;
5297
5306
  processedRecords: number;
@@ -5587,6 +5596,11 @@ interface paths {
5587
5596
  durationMs: number | null;
5588
5597
  errorMessage?: string | null;
5589
5598
  estimatedCost?: string | null;
5599
+ /**
5600
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
5601
+ * @enum {string|null}
5602
+ */
5603
+ executionEngine?: "runtime" | "legacy" | null;
5590
5604
  executionSessionId: string | null;
5591
5605
  flowId: string | null;
5592
5606
  flowVersionId: string | null;
@@ -6850,6 +6864,15 @@ interface paths {
6850
6864
  "application/json": components["schemas"]["Error"];
6851
6865
  };
6852
6866
  };
6867
+ /** @description Approval-gated execution is unsupported because Client Chat has no continuation channel that can deliver an owner-approved result back to the visitor (`APPROVAL_MODE_UNSUPPORTED`). */
6868
+ 501: {
6869
+ headers: {
6870
+ [name: string]: unknown;
6871
+ };
6872
+ content: {
6873
+ "application/json": components["schemas"]["Error"];
6874
+ };
6875
+ };
6853
6876
  };
6854
6877
  };
6855
6878
  delete?: never;
@@ -7771,6 +7794,8 @@ interface paths {
7771
7794
  requestBody: {
7772
7795
  content: {
7773
7796
  "application/json": {
7797
+ /** @description Id for the assistant message this resumed leg produces. The leg's completion is persisted to the conversation, so sending the id the client already uses locally makes a later re-send of that same message deduplicate exactly instead of by text. Optional and backward compatible. */
7798
+ assistantMessageId?: string;
7774
7799
  clientTools?: {
7775
7800
  description: string;
7776
7801
  name: string;
@@ -9297,7 +9322,8 @@ interface paths {
9297
9322
  [key: string]: unknown;
9298
9323
  };
9299
9324
  modelId?: string;
9300
- ownerId?: string;
9325
+ /** @description Owner key for this conversation, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
9326
+ ownerId?: string | null;
9301
9327
  systemPrompt?: string;
9302
9328
  /** @default New Chat */
9303
9329
  title?: string;
@@ -9541,7 +9567,8 @@ interface paths {
9541
9567
  [key: string]: unknown;
9542
9568
  };
9543
9569
  modelId?: string;
9544
- ownerId?: string;
9570
+ /** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
9571
+ ownerId?: string | null;
9545
9572
  systemPrompt?: string;
9546
9573
  title?: string;
9547
9574
  };
@@ -11087,7 +11114,7 @@ interface paths {
11087
11114
  /** @default true */
11088
11115
  createVersionOnChange?: boolean;
11089
11116
  };
11090
- /** @description For FLOW dispatches this compatibility field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. Agent dispatches still require an explicit `true` and remain subject to their separate runtime-agent rollout gate. */
11117
+ /** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
11091
11118
  useRuntimePackage?: boolean;
11092
11119
  versionLabel?: string;
11093
11120
  versionNotes?: string;
@@ -11452,7 +11479,7 @@ interface paths {
11452
11479
  /** @default true */
11453
11480
  createVersionOnChange?: boolean;
11454
11481
  };
11455
- /** @description For FLOW dispatches this compatibility field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. Agent dispatches still require an explicit `true` and remain subject to their separate runtime-agent rollout gate. */
11482
+ /** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
11456
11483
  useRuntimePackage?: boolean;
11457
11484
  versionLabel?: string;
11458
11485
  versionNotes?: string;
@@ -15604,6 +15631,11 @@ interface paths {
15604
15631
  errorMessage: string | null;
15605
15632
  errorStack: string | null;
15606
15633
  executedAt: string;
15634
+ /**
15635
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
15636
+ * @enum {string|null}
15637
+ */
15638
+ executionEngine?: "runtime" | "legacy" | null;
15607
15639
  executionSessionId: string | null;
15608
15640
  inputVariables?: unknown;
15609
15641
  messageHistory: unknown[] | null;
@@ -17813,6 +17845,11 @@ interface paths {
17813
17845
  durationMs: number | null;
17814
17846
  errorMessage?: string | null;
17815
17847
  estimatedCost?: string | null;
17848
+ /**
17849
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
17850
+ * @enum {string|null}
17851
+ */
17852
+ executionEngine?: "runtime" | "legacy" | null;
17816
17853
  executionSessionId: string | null;
17817
17854
  flowId: string | null;
17818
17855
  flowVersionId: string | null;
@@ -34829,6 +34866,7 @@ interface paths {
34829
34866
  type?: string;
34830
34867
  search?: string;
34831
34868
  name?: string;
34869
+ ownerId?: string;
34832
34870
  distinct?: string;
34833
34871
  includeFields?: string;
34834
34872
  include_fields?: string;
@@ -34876,6 +34914,7 @@ interface paths {
34876
34914
  };
34877
34915
  name: string;
34878
34916
  organizationId: string | null;
34917
+ ownerId: string | null;
34879
34918
  productSurfaceId: string | null;
34880
34919
  schemaValid: boolean | null;
34881
34920
  type: string;
@@ -34959,6 +34998,8 @@ interface paths {
34959
34998
  [key: string]: unknown;
34960
34999
  };
34961
35000
  name: string;
35001
+ /** @description Owner key for this record, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
35002
+ ownerId?: string | null;
34962
35003
  type: string;
34963
35004
  };
34964
35005
  };
@@ -34987,6 +35028,7 @@ interface paths {
34987
35028
  };
34988
35029
  name: string;
34989
35030
  organizationId: string | null;
35031
+ ownerId: string | null;
34990
35032
  productSurfaceId: string | null;
34991
35033
  schemaValid: boolean | null;
34992
35034
  schemaWarnings?: {
@@ -35315,6 +35357,7 @@ interface paths {
35315
35357
  type?: string;
35316
35358
  search?: string;
35317
35359
  name?: string;
35360
+ ownerId?: string;
35318
35361
  distinct?: string;
35319
35362
  includeFields?: string;
35320
35363
  include_fields?: string;
@@ -35818,6 +35861,7 @@ interface paths {
35818
35861
  };
35819
35862
  name: string;
35820
35863
  organizationId: string | null;
35864
+ ownerId: string | null;
35821
35865
  productSurfaceId: string | null;
35822
35866
  schemaValid: boolean | null;
35823
35867
  type: string;
@@ -35899,6 +35943,8 @@ interface paths {
35899
35943
  [key: string]: unknown;
35900
35944
  };
35901
35945
  name?: string;
35946
+ /** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
35947
+ ownerId?: string | null;
35902
35948
  type?: string;
35903
35949
  };
35904
35950
  };
@@ -35927,6 +35973,7 @@ interface paths {
35927
35973
  };
35928
35974
  name: string;
35929
35975
  organizationId: string | null;
35976
+ ownerId: string | null;
35930
35977
  productSurfaceId: string | null;
35931
35978
  schemaValid: boolean | null;
35932
35979
  schemaWarnings?: {
@@ -36226,14 +36273,23 @@ interface paths {
36226
36273
  "application/json": {
36227
36274
  data: {
36228
36275
  createdAt: string;
36276
+ estimatedCost: string | null;
36277
+ /**
36278
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
36279
+ * @enum {string|null}
36280
+ */
36281
+ executionEngine?: "runtime" | "legacy" | null;
36282
+ executionTimeMs: number | null;
36229
36283
  flowId: string | null;
36230
36284
  flowName: string | null;
36231
36285
  id: string;
36286
+ modelUsed: string | null;
36232
36287
  promptId: string | null;
36233
36288
  promptName: string | null;
36234
36289
  recordId: string;
36235
36290
  result?: unknown;
36236
36291
  status: string;
36292
+ totalTokens: number | null;
36237
36293
  }[];
36238
36294
  pagination: {
36239
36295
  hasMore: boolean;
@@ -36426,6 +36482,11 @@ interface paths {
36426
36482
  durationMs: number | null;
36427
36483
  errorMessage?: string | null;
36428
36484
  estimatedCost?: string | null;
36485
+ /**
36486
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
36487
+ * @enum {string|null}
36488
+ */
36489
+ executionEngine?: "runtime" | "legacy" | null;
36429
36490
  executionSessionId: string | null;
36430
36491
  flowId: string | null;
36431
36492
  flowVersionId: string | null;
@@ -37519,6 +37580,7 @@ interface paths {
37519
37580
  } | null;
37520
37581
  name: string;
37521
37582
  organizationId: string | null;
37583
+ ownerId?: string | null;
37522
37584
  productSurfaceId?: string | null;
37523
37585
  schemaValid?: boolean | null;
37524
37586
  type: string;
@@ -37685,6 +37747,7 @@ interface paths {
37685
37747
  } | null;
37686
37748
  name: string;
37687
37749
  organizationId: string | null;
37750
+ ownerId?: string | null;
37688
37751
  productSurfaceId?: string | null;
37689
37752
  schemaValid?: boolean | null;
37690
37753
  type: string;
@@ -37831,6 +37894,7 @@ interface paths {
37831
37894
  } | null;
37832
37895
  name: string;
37833
37896
  organizationId: string | null;
37897
+ ownerId?: string | null;
37834
37898
  productSurfaceId?: string | null;
37835
37899
  schemaValid?: boolean | null;
37836
37900
  type: string;
@@ -37979,6 +38043,7 @@ interface paths {
37979
38043
  } | null;
37980
38044
  name: string;
37981
38045
  organizationId: string | null;
38046
+ ownerId?: string | null;
37982
38047
  productSurfaceId?: string | null;
37983
38048
  schemaValid?: boolean | null;
37984
38049
  type: string;
@@ -38470,6 +38535,11 @@ interface paths {
38470
38535
  durationMs: number | null;
38471
38536
  error: string | null;
38472
38537
  executedAt: string | null;
38538
+ /**
38539
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
38540
+ * @enum {string|null}
38541
+ */
38542
+ executionEngine?: "runtime" | "legacy" | null;
38473
38543
  failedAt: string | null;
38474
38544
  failedStepCount: number | null;
38475
38545
  flowId: string | null;
@@ -38657,6 +38727,11 @@ interface paths {
38657
38727
  durationMs: number | null;
38658
38728
  error: string | null;
38659
38729
  executedAt: string | null;
38730
+ /**
38731
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
38732
+ * @enum {string|null}
38733
+ */
38734
+ executionEngine?: "runtime" | "legacy" | null;
38660
38735
  failedAt: string | null;
38661
38736
  failedStepCount: number | null;
38662
38737
  flowId: string | null;
@@ -41667,6 +41742,8 @@ interface paths {
41667
41742
  } | null;
41668
41743
  name: string;
41669
41744
  productId: string;
41745
+ /** @description Name of the product this surface belongs to. Non-nullable: the list query inner-joins products (so a surface with no product cannot appear) and products.name is NOT NULL. Present so a cross-product picker can disambiguate two surfaces that share a name. */
41746
+ productName: string;
41670
41747
  status: string;
41671
41748
  type: string;
41672
41749
  updatedAt: string;
@@ -41987,7 +42064,7 @@ interface paths {
41987
42064
  };
41988
42065
  toolType: string;
41989
42066
  updatedAt: string;
41990
- userId: string;
42067
+ userId: string | null;
41991
42068
  validation?: {
41992
42069
  warnings: {
41993
42070
  code: string;
@@ -42485,7 +42562,7 @@ interface paths {
42485
42562
  };
42486
42563
  toolType: string;
42487
42564
  updatedAt: string;
42488
- userId: string;
42565
+ userId: string | null;
42489
42566
  validation?: {
42490
42567
  warnings: {
42491
42568
  code: string;
@@ -43085,7 +43162,7 @@ interface paths {
43085
43162
  };
43086
43163
  toolType: string;
43087
43164
  updatedAt: string;
43088
- userId: string;
43165
+ userId: string | null;
43089
43166
  };
43090
43167
  };
43091
43168
  };
@@ -43178,7 +43255,7 @@ interface paths {
43178
43255
  };
43179
43256
  toolType: string;
43180
43257
  updatedAt: string;
43181
- userId: string;
43258
+ userId: string | null;
43182
43259
  validation?: {
43183
43260
  warnings: {
43184
43261
  code: string;
@@ -45060,6 +45137,11 @@ interface components {
45060
45137
  cases: {
45061
45138
  /** @description The saved eval case id; null when the case row was deleted or the record could not be mapped to a case. */
45062
45139
  caseId: string | null;
45140
+ /**
45141
+ * @description Engine that actually executed this graded case ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
45142
+ * @enum {string|null}
45143
+ */
45144
+ executionEngine?: "runtime" | "legacy" | null;
45063
45145
  name: string;
45064
45146
  /** @description For a checkpoint ("saved from run") case run in next-step mode: the tool-call intent(s) the target emitted as its graded next step. An empty array means it replied with a message instead of calling a tool. Null for ordinary runs and for runs recorded before this field shipped. */
45065
45147
  nextStepToolCalls: {
@@ -47861,6 +47943,16 @@ interface CreatePromptRequest {
47861
47943
  interface CreateRecordRequest {
47862
47944
  type: string;
47863
47945
  name: string;
47946
+ /**
47947
+ * First-class owner key (#3395) — persisted to the indexed `owner_id` column
47948
+ * and queryable via {@link RecordListParams.ownerId}. A nested
47949
+ * `metadata.ownerId` is still lifted into the column by the API; a top-level
47950
+ * value here wins over it.
47951
+ *
47952
+ * On `records.update()` (which takes `Partial<CreateRecordRequest>`),
47953
+ * `null` CLEARS the stored owner and omitting the field leaves it untouched.
47954
+ */
47955
+ ownerId?: string | null;
47864
47956
  metadata?: Metadata;
47865
47957
  }
47866
47958
  interface BulkEditCondition {
@@ -48263,6 +48355,7 @@ interface ListParams {
48263
48355
  interface RecordListParams extends ListParams {
48264
48356
  metadataKeys?: string;
48265
48357
  metadataKeysAll?: string;
48358
+ ownerId?: string;
48266
48359
  minFields?: number;
48267
48360
  maxFields?: number;
48268
48361
  metadataTypes?: string;
@@ -48280,9 +48373,10 @@ interface FlowToolConfig {
48280
48373
  flowId?: string;
48281
48374
  toolId?: string;
48282
48375
  /**
48283
- * Inline flow definition. Runtime-selected agent dispatches support this with
48284
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48285
- * require a `flowId`/`toolId` reference.
48376
+ * Inline flow definition. Runtime-selected agent dispatches support this
48377
+ * (the runtime lane is the default unless `options.useRuntimePackage: false`
48378
+ * opts out); hosted flow definitions currently require a `flowId`/`toolId`
48379
+ * reference.
48286
48380
  */
48287
48381
  flow?: Record<string, unknown>;
48288
48382
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48430,9 +48524,10 @@ interface RuntimeFlowToolConfig {
48430
48524
  flowId?: string;
48431
48525
  toolId?: string;
48432
48526
  /**
48433
- * Inline flow definition. Runtime-selected agent dispatches support this with
48434
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48435
- * require a `flowId`/`toolId` reference.
48527
+ * Inline flow definition. Runtime-selected agent dispatches support this
48528
+ * (the runtime lane is the default unless `options.useRuntimePackage: false`
48529
+ * opts out); hosted flow definitions currently require a `flowId`/`toolId`
48530
+ * reference.
48436
48531
  */
48437
48532
  flow?: Record<string, unknown>;
48438
48533
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48672,14 +48767,24 @@ interface CreateConversationRequest {
48672
48767
  title?: string;
48673
48768
  modelId?: string;
48674
48769
  systemPrompt?: string;
48675
- ownerId?: string;
48770
+ /**
48771
+ * First-class owner key (#3395) — persisted to the indexed `owner_id` column
48772
+ * and queryable via {@link ConversationListParams.ownerId}. `null` is accepted
48773
+ * for symmetry with {@link UpdateConversationRequest} and simply means "no
48774
+ * owner" on create.
48775
+ */
48776
+ ownerId?: string | null;
48676
48777
  metadata?: Record<string, unknown>;
48677
48778
  }
48678
48779
  interface UpdateConversationRequest {
48679
48780
  title?: string;
48680
48781
  modelId?: string;
48681
48782
  systemPrompt?: string;
48682
- ownerId?: string;
48783
+ /**
48784
+ * First-class owner key (#3395). `null` CLEARS the stored owner; omitting the
48785
+ * field leaves it untouched.
48786
+ */
48787
+ ownerId?: string | null;
48683
48788
  metadata?: Record<string, unknown>;
48684
48789
  messages?: ConversationMessage[];
48685
48790
  }
package/dist/index.d.ts CHANGED
@@ -2804,6 +2804,8 @@ interface paths {
2804
2804
  agentSpec?: unknown;
2805
2805
  cancelRequestedAt: string | null;
2806
2806
  completedAt: string | null;
2807
+ /** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
2808
+ conversationId: string | null;
2807
2809
  createdAt: string;
2808
2810
  executionId: string;
2809
2811
  /** @enum {string} */
@@ -2937,6 +2939,8 @@ interface paths {
2937
2939
  agentSpec?: unknown;
2938
2940
  cancelRequestedAt: string | null;
2939
2941
  completedAt: string | null;
2942
+ /** @description The conversation thread this run belongs to, so consumers can group a multi-turn conversation's runs without a per-run log query. This is the run's OWN thread, distinct from `parentConversationId` (subagent lineage, the conversation of the run that spawned it). `null` on stateless surfaces (webhook, schedule, eval, one-shot API) and on runs persisted before the column existed. */
2943
+ conversationId: string | null;
2940
2944
  createdAt: string;
2941
2945
  executionId: string;
2942
2946
  /** @enum {string} */
@@ -5292,6 +5296,11 @@ interface paths {
5292
5296
  "application/json": {
5293
5297
  batchExecutionId: string;
5294
5298
  completedAt?: string;
5299
+ /**
5300
+ * @description Run-level engine summary derived from the batch's per-record executionEngine values: 'runtime' or 'legacy' when every attributed record ran on that engine, 'mixed' when the batch spans both (e.g. a mid-flight fallback), and null when the run has no attributed records (runs recorded before attribution shipped).
5301
+ * @enum {string|null}
5302
+ */
5303
+ executionEngineSummary?: "runtime" | "legacy" | "mixed" | null;
5295
5304
  failedRecords: number;
5296
5305
  flowId: string;
5297
5306
  processedRecords: number;
@@ -5587,6 +5596,11 @@ interface paths {
5587
5596
  durationMs: number | null;
5588
5597
  errorMessage?: string | null;
5589
5598
  estimatedCost?: string | null;
5599
+ /**
5600
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
5601
+ * @enum {string|null}
5602
+ */
5603
+ executionEngine?: "runtime" | "legacy" | null;
5590
5604
  executionSessionId: string | null;
5591
5605
  flowId: string | null;
5592
5606
  flowVersionId: string | null;
@@ -6850,6 +6864,15 @@ interface paths {
6850
6864
  "application/json": components["schemas"]["Error"];
6851
6865
  };
6852
6866
  };
6867
+ /** @description Approval-gated execution is unsupported because Client Chat has no continuation channel that can deliver an owner-approved result back to the visitor (`APPROVAL_MODE_UNSUPPORTED`). */
6868
+ 501: {
6869
+ headers: {
6870
+ [name: string]: unknown;
6871
+ };
6872
+ content: {
6873
+ "application/json": components["schemas"]["Error"];
6874
+ };
6875
+ };
6853
6876
  };
6854
6877
  };
6855
6878
  delete?: never;
@@ -7771,6 +7794,8 @@ interface paths {
7771
7794
  requestBody: {
7772
7795
  content: {
7773
7796
  "application/json": {
7797
+ /** @description Id for the assistant message this resumed leg produces. The leg's completion is persisted to the conversation, so sending the id the client already uses locally makes a later re-send of that same message deduplicate exactly instead of by text. Optional and backward compatible. */
7798
+ assistantMessageId?: string;
7774
7799
  clientTools?: {
7775
7800
  description: string;
7776
7801
  name: string;
@@ -9297,7 +9322,8 @@ interface paths {
9297
9322
  [key: string]: unknown;
9298
9323
  };
9299
9324
  modelId?: string;
9300
- ownerId?: string;
9325
+ /** @description Owner key for this conversation, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
9326
+ ownerId?: string | null;
9301
9327
  systemPrompt?: string;
9302
9328
  /** @default New Chat */
9303
9329
  title?: string;
@@ -9541,7 +9567,8 @@ interface paths {
9541
9567
  [key: string]: unknown;
9542
9568
  };
9543
9569
  modelId?: string;
9544
- ownerId?: string;
9570
+ /** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
9571
+ ownerId?: string | null;
9545
9572
  systemPrompt?: string;
9546
9573
  title?: string;
9547
9574
  };
@@ -11087,7 +11114,7 @@ interface paths {
11087
11114
  /** @default true */
11088
11115
  createVersionOnChange?: boolean;
11089
11116
  };
11090
- /** @description For FLOW dispatches this compatibility field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. Agent dispatches still require an explicit `true` and remain subject to their separate runtime-agent rollout gate. */
11117
+ /** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
11091
11118
  useRuntimePackage?: boolean;
11092
11119
  versionLabel?: string;
11093
11120
  versionNotes?: string;
@@ -11452,7 +11479,7 @@ interface paths {
11452
11479
  /** @default true */
11453
11480
  createVersionOnChange?: boolean;
11454
11481
  };
11455
- /** @description For FLOW dispatches this compatibility field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. Agent dispatches still require an explicit `true` and remain subject to their separate runtime-agent rollout gate. */
11482
+ /** @description Compatibility execution-lane OPT-OUT. For FLOW dispatches the field is accepted but ignored: eligible flows always use the @runtypelabs/runtime lane, while ineligible flows still fold to legacy silently. For AGENT dispatches, an eligible agent now uses the @runtypelabs/runtime lane by DEFAULT when this field is omitted; only an explicit `false` forces the legacy engine. Definitions the runtime lane cannot execute faithfully still fold to legacy on their own. */
11456
11483
  useRuntimePackage?: boolean;
11457
11484
  versionLabel?: string;
11458
11485
  versionNotes?: string;
@@ -15604,6 +15631,11 @@ interface paths {
15604
15631
  errorMessage: string | null;
15605
15632
  errorStack: string | null;
15606
15633
  executedAt: string;
15634
+ /**
15635
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
15636
+ * @enum {string|null}
15637
+ */
15638
+ executionEngine?: "runtime" | "legacy" | null;
15607
15639
  executionSessionId: string | null;
15608
15640
  inputVariables?: unknown;
15609
15641
  messageHistory: unknown[] | null;
@@ -17813,6 +17845,11 @@ interface paths {
17813
17845
  durationMs: number | null;
17814
17846
  errorMessage?: string | null;
17815
17847
  estimatedCost?: string | null;
17848
+ /**
17849
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
17850
+ * @enum {string|null}
17851
+ */
17852
+ executionEngine?: "runtime" | "legacy" | null;
17816
17853
  executionSessionId: string | null;
17817
17854
  flowId: string | null;
17818
17855
  flowVersionId: string | null;
@@ -34829,6 +34866,7 @@ interface paths {
34829
34866
  type?: string;
34830
34867
  search?: string;
34831
34868
  name?: string;
34869
+ ownerId?: string;
34832
34870
  distinct?: string;
34833
34871
  includeFields?: string;
34834
34872
  include_fields?: string;
@@ -34876,6 +34914,7 @@ interface paths {
34876
34914
  };
34877
34915
  name: string;
34878
34916
  organizationId: string | null;
34917
+ ownerId: string | null;
34879
34918
  productSurfaceId: string | null;
34880
34919
  schemaValid: boolean | null;
34881
34920
  type: string;
@@ -34959,6 +34998,8 @@ interface paths {
34959
34998
  [key: string]: unknown;
34960
34999
  };
34961
35000
  name: string;
35001
+ /** @description Owner key for this record, stored in the indexed owner_id column and filterable via ?ownerId=. Overrides a nested metadata.ownerId. Null means no owner. */
35002
+ ownerId?: string | null;
34962
35003
  type: string;
34963
35004
  };
34964
35005
  };
@@ -34987,6 +35028,7 @@ interface paths {
34987
35028
  };
34988
35029
  name: string;
34989
35030
  organizationId: string | null;
35031
+ ownerId: string | null;
34990
35032
  productSurfaceId: string | null;
34991
35033
  schemaValid: boolean | null;
34992
35034
  schemaWarnings?: {
@@ -35315,6 +35357,7 @@ interface paths {
35315
35357
  type?: string;
35316
35358
  search?: string;
35317
35359
  name?: string;
35360
+ ownerId?: string;
35318
35361
  distinct?: string;
35319
35362
  includeFields?: string;
35320
35363
  include_fields?: string;
@@ -35818,6 +35861,7 @@ interface paths {
35818
35861
  };
35819
35862
  name: string;
35820
35863
  organizationId: string | null;
35864
+ ownerId: string | null;
35821
35865
  productSurfaceId: string | null;
35822
35866
  schemaValid: boolean | null;
35823
35867
  type: string;
@@ -35899,6 +35943,8 @@ interface paths {
35899
35943
  [key: string]: unknown;
35900
35944
  };
35901
35945
  name?: string;
35946
+ /** @description Reassigns the owner (indexed owner_id column, filterable via ?ownerId=). Overrides a nested metadata.ownerId. Null clears the owner; omit to leave it unchanged. */
35947
+ ownerId?: string | null;
35902
35948
  type?: string;
35903
35949
  };
35904
35950
  };
@@ -35927,6 +35973,7 @@ interface paths {
35927
35973
  };
35928
35974
  name: string;
35929
35975
  organizationId: string | null;
35976
+ ownerId: string | null;
35930
35977
  productSurfaceId: string | null;
35931
35978
  schemaValid: boolean | null;
35932
35979
  schemaWarnings?: {
@@ -36226,14 +36273,23 @@ interface paths {
36226
36273
  "application/json": {
36227
36274
  data: {
36228
36275
  createdAt: string;
36276
+ estimatedCost: string | null;
36277
+ /**
36278
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
36279
+ * @enum {string|null}
36280
+ */
36281
+ executionEngine?: "runtime" | "legacy" | null;
36282
+ executionTimeMs: number | null;
36229
36283
  flowId: string | null;
36230
36284
  flowName: string | null;
36231
36285
  id: string;
36286
+ modelUsed: string | null;
36232
36287
  promptId: string | null;
36233
36288
  promptName: string | null;
36234
36289
  recordId: string;
36235
36290
  result?: unknown;
36236
36291
  status: string;
36292
+ totalTokens: number | null;
36237
36293
  }[];
36238
36294
  pagination: {
36239
36295
  hasMore: boolean;
@@ -36426,6 +36482,11 @@ interface paths {
36426
36482
  durationMs: number | null;
36427
36483
  errorMessage?: string | null;
36428
36484
  estimatedCost?: string | null;
36485
+ /**
36486
+ * @description Engine that actually executed this step ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
36487
+ * @enum {string|null}
36488
+ */
36489
+ executionEngine?: "runtime" | "legacy" | null;
36429
36490
  executionSessionId: string | null;
36430
36491
  flowId: string | null;
36431
36492
  flowVersionId: string | null;
@@ -37519,6 +37580,7 @@ interface paths {
37519
37580
  } | null;
37520
37581
  name: string;
37521
37582
  organizationId: string | null;
37583
+ ownerId?: string | null;
37522
37584
  productSurfaceId?: string | null;
37523
37585
  schemaValid?: boolean | null;
37524
37586
  type: string;
@@ -37685,6 +37747,7 @@ interface paths {
37685
37747
  } | null;
37686
37748
  name: string;
37687
37749
  organizationId: string | null;
37750
+ ownerId?: string | null;
37688
37751
  productSurfaceId?: string | null;
37689
37752
  schemaValid?: boolean | null;
37690
37753
  type: string;
@@ -37831,6 +37894,7 @@ interface paths {
37831
37894
  } | null;
37832
37895
  name: string;
37833
37896
  organizationId: string | null;
37897
+ ownerId?: string | null;
37834
37898
  productSurfaceId?: string | null;
37835
37899
  schemaValid?: boolean | null;
37836
37900
  type: string;
@@ -37979,6 +38043,7 @@ interface paths {
37979
38043
  } | null;
37980
38044
  name: string;
37981
38045
  organizationId: string | null;
38046
+ ownerId?: string | null;
37982
38047
  productSurfaceId?: string | null;
37983
38048
  schemaValid?: boolean | null;
37984
38049
  type: string;
@@ -38470,6 +38535,11 @@ interface paths {
38470
38535
  durationMs: number | null;
38471
38536
  error: string | null;
38472
38537
  executedAt: string | null;
38538
+ /**
38539
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
38540
+ * @enum {string|null}
38541
+ */
38542
+ executionEngine?: "runtime" | "legacy" | null;
38473
38543
  failedAt: string | null;
38474
38544
  failedStepCount: number | null;
38475
38545
  flowId: string | null;
@@ -38657,6 +38727,11 @@ interface paths {
38657
38727
  durationMs: number | null;
38658
38728
  error: string | null;
38659
38729
  executedAt: string | null;
38730
+ /**
38731
+ * @description Engine that actually executed this record execution ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
38732
+ * @enum {string|null}
38733
+ */
38734
+ executionEngine?: "runtime" | "legacy" | null;
38660
38735
  failedAt: string | null;
38661
38736
  failedStepCount: number | null;
38662
38737
  flowId: string | null;
@@ -41667,6 +41742,8 @@ interface paths {
41667
41742
  } | null;
41668
41743
  name: string;
41669
41744
  productId: string;
41745
+ /** @description Name of the product this surface belongs to. Non-nullable: the list query inner-joins products (so a surface with no product cannot appear) and products.name is NOT NULL. Present so a cross-product picker can disambiguate two surfaces that share a name. */
41746
+ productName: string;
41670
41747
  status: string;
41671
41748
  type: string;
41672
41749
  updatedAt: string;
@@ -41987,7 +42064,7 @@ interface paths {
41987
42064
  };
41988
42065
  toolType: string;
41989
42066
  updatedAt: string;
41990
- userId: string;
42067
+ userId: string | null;
41991
42068
  validation?: {
41992
42069
  warnings: {
41993
42070
  code: string;
@@ -42485,7 +42562,7 @@ interface paths {
42485
42562
  };
42486
42563
  toolType: string;
42487
42564
  updatedAt: string;
42488
- userId: string;
42565
+ userId: string | null;
42489
42566
  validation?: {
42490
42567
  warnings: {
42491
42568
  code: string;
@@ -43085,7 +43162,7 @@ interface paths {
43085
43162
  };
43086
43163
  toolType: string;
43087
43164
  updatedAt: string;
43088
- userId: string;
43165
+ userId: string | null;
43089
43166
  };
43090
43167
  };
43091
43168
  };
@@ -43178,7 +43255,7 @@ interface paths {
43178
43255
  };
43179
43256
  toolType: string;
43180
43257
  updatedAt: string;
43181
- userId: string;
43258
+ userId: string | null;
43182
43259
  validation?: {
43183
43260
  warnings: {
43184
43261
  code: string;
@@ -45060,6 +45137,11 @@ interface components {
45060
45137
  cases: {
45061
45138
  /** @description The saved eval case id; null when the case row was deleted or the record could not be mapped to a case. */
45062
45139
  caseId: string | null;
45140
+ /**
45141
+ * @description Engine that actually executed this graded case ('runtime' | 'legacy'). Recorded at write time from the committed lane decision; never inferred later. Null for rows written before attribution shipped and for units that never started executing (externally executed runs carry no engine).
45142
+ * @enum {string|null}
45143
+ */
45144
+ executionEngine?: "runtime" | "legacy" | null;
45063
45145
  name: string;
45064
45146
  /** @description For a checkpoint ("saved from run") case run in next-step mode: the tool-call intent(s) the target emitted as its graded next step. An empty array means it replied with a message instead of calling a tool. Null for ordinary runs and for runs recorded before this field shipped. */
45065
45147
  nextStepToolCalls: {
@@ -47861,6 +47943,16 @@ interface CreatePromptRequest {
47861
47943
  interface CreateRecordRequest {
47862
47944
  type: string;
47863
47945
  name: string;
47946
+ /**
47947
+ * First-class owner key (#3395) — persisted to the indexed `owner_id` column
47948
+ * and queryable via {@link RecordListParams.ownerId}. A nested
47949
+ * `metadata.ownerId` is still lifted into the column by the API; a top-level
47950
+ * value here wins over it.
47951
+ *
47952
+ * On `records.update()` (which takes `Partial<CreateRecordRequest>`),
47953
+ * `null` CLEARS the stored owner and omitting the field leaves it untouched.
47954
+ */
47955
+ ownerId?: string | null;
47864
47956
  metadata?: Metadata;
47865
47957
  }
47866
47958
  interface BulkEditCondition {
@@ -48263,6 +48355,7 @@ interface ListParams {
48263
48355
  interface RecordListParams extends ListParams {
48264
48356
  metadataKeys?: string;
48265
48357
  metadataKeysAll?: string;
48358
+ ownerId?: string;
48266
48359
  minFields?: number;
48267
48360
  maxFields?: number;
48268
48361
  metadataTypes?: string;
@@ -48280,9 +48373,10 @@ interface FlowToolConfig {
48280
48373
  flowId?: string;
48281
48374
  toolId?: string;
48282
48375
  /**
48283
- * Inline flow definition. Runtime-selected agent dispatches support this with
48284
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48285
- * require a `flowId`/`toolId` reference.
48376
+ * Inline flow definition. Runtime-selected agent dispatches support this
48377
+ * (the runtime lane is the default unless `options.useRuntimePackage: false`
48378
+ * opts out); hosted flow definitions currently require a `flowId`/`toolId`
48379
+ * reference.
48286
48380
  */
48287
48381
  flow?: Record<string, unknown>;
48288
48382
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48430,9 +48524,10 @@ interface RuntimeFlowToolConfig {
48430
48524
  flowId?: string;
48431
48525
  toolId?: string;
48432
48526
  /**
48433
- * Inline flow definition. Runtime-selected agent dispatches support this with
48434
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48435
- * require a `flowId`/`toolId` reference.
48527
+ * Inline flow definition. Runtime-selected agent dispatches support this
48528
+ * (the runtime lane is the default unless `options.useRuntimePackage: false`
48529
+ * opts out); hosted flow definitions currently require a `flowId`/`toolId`
48530
+ * reference.
48436
48531
  */
48437
48532
  flow?: Record<string, unknown>;
48438
48533
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48672,14 +48767,24 @@ interface CreateConversationRequest {
48672
48767
  title?: string;
48673
48768
  modelId?: string;
48674
48769
  systemPrompt?: string;
48675
- ownerId?: string;
48770
+ /**
48771
+ * First-class owner key (#3395) — persisted to the indexed `owner_id` column
48772
+ * and queryable via {@link ConversationListParams.ownerId}. `null` is accepted
48773
+ * for symmetry with {@link UpdateConversationRequest} and simply means "no
48774
+ * owner" on create.
48775
+ */
48776
+ ownerId?: string | null;
48676
48777
  metadata?: Record<string, unknown>;
48677
48778
  }
48678
48779
  interface UpdateConversationRequest {
48679
48780
  title?: string;
48680
48781
  modelId?: string;
48681
48782
  systemPrompt?: string;
48682
- ownerId?: string;
48783
+ /**
48784
+ * First-class owner key (#3395). `null` CLEARS the stored owner; omitting the
48785
+ * field leaves it untouched.
48786
+ */
48787
+ ownerId?: string | null;
48683
48788
  metadata?: Record<string, unknown>;
48684
48789
  messages?: ConversationMessage[];
48685
48790
  }
package/dist/index.mjs CHANGED
@@ -6249,7 +6249,7 @@ var Runtype = class {
6249
6249
 
6250
6250
  // src/version.ts
6251
6251
  var FALLBACK_VERSION = "0.0.0";
6252
- var SDK_VERSION = "8.0.3".length > 0 ? "8.0.3" : FALLBACK_VERSION;
6252
+ var SDK_VERSION = "9.1.0".length > 0 ? "9.1.0" : FALLBACK_VERSION;
6253
6253
  var RUNTYPE_CLIENT_KIND = "sdk";
6254
6254
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6255
6255
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "8.0.3",
3
+ "version": "9.1.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",