@runtypelabs/sdk 9.0.0 → 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 = "9.0.0".length > 0 ? "9.0.0" : 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;
@@ -9299,7 +9322,8 @@ interface paths {
9299
9322
  [key: string]: unknown;
9300
9323
  };
9301
9324
  modelId?: string;
9302
- 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;
9303
9327
  systemPrompt?: string;
9304
9328
  /** @default New Chat */
9305
9329
  title?: string;
@@ -9543,7 +9567,8 @@ interface paths {
9543
9567
  [key: string]: unknown;
9544
9568
  };
9545
9569
  modelId?: string;
9546
- 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;
9547
9572
  systemPrompt?: string;
9548
9573
  title?: string;
9549
9574
  };
@@ -11089,7 +11114,7 @@ interface paths {
11089
11114
  /** @default true */
11090
11115
  createVersionOnChange?: boolean;
11091
11116
  };
11092
- /** @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. */
11093
11118
  useRuntimePackage?: boolean;
11094
11119
  versionLabel?: string;
11095
11120
  versionNotes?: string;
@@ -11454,7 +11479,7 @@ interface paths {
11454
11479
  /** @default true */
11455
11480
  createVersionOnChange?: boolean;
11456
11481
  };
11457
- /** @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. */
11458
11483
  useRuntimePackage?: boolean;
11459
11484
  versionLabel?: string;
11460
11485
  versionNotes?: string;
@@ -15606,6 +15631,11 @@ interface paths {
15606
15631
  errorMessage: string | null;
15607
15632
  errorStack: string | null;
15608
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;
15609
15639
  executionSessionId: string | null;
15610
15640
  inputVariables?: unknown;
15611
15641
  messageHistory: unknown[] | null;
@@ -17815,6 +17845,11 @@ interface paths {
17815
17845
  durationMs: number | null;
17816
17846
  errorMessage?: string | null;
17817
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;
17818
17853
  executionSessionId: string | null;
17819
17854
  flowId: string | null;
17820
17855
  flowVersionId: string | null;
@@ -34831,6 +34866,7 @@ interface paths {
34831
34866
  type?: string;
34832
34867
  search?: string;
34833
34868
  name?: string;
34869
+ ownerId?: string;
34834
34870
  distinct?: string;
34835
34871
  includeFields?: string;
34836
34872
  include_fields?: string;
@@ -34878,6 +34914,7 @@ interface paths {
34878
34914
  };
34879
34915
  name: string;
34880
34916
  organizationId: string | null;
34917
+ ownerId: string | null;
34881
34918
  productSurfaceId: string | null;
34882
34919
  schemaValid: boolean | null;
34883
34920
  type: string;
@@ -34961,6 +34998,8 @@ interface paths {
34961
34998
  [key: string]: unknown;
34962
34999
  };
34963
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;
34964
35003
  type: string;
34965
35004
  };
34966
35005
  };
@@ -34989,6 +35028,7 @@ interface paths {
34989
35028
  };
34990
35029
  name: string;
34991
35030
  organizationId: string | null;
35031
+ ownerId: string | null;
34992
35032
  productSurfaceId: string | null;
34993
35033
  schemaValid: boolean | null;
34994
35034
  schemaWarnings?: {
@@ -35317,6 +35357,7 @@ interface paths {
35317
35357
  type?: string;
35318
35358
  search?: string;
35319
35359
  name?: string;
35360
+ ownerId?: string;
35320
35361
  distinct?: string;
35321
35362
  includeFields?: string;
35322
35363
  include_fields?: string;
@@ -35820,6 +35861,7 @@ interface paths {
35820
35861
  };
35821
35862
  name: string;
35822
35863
  organizationId: string | null;
35864
+ ownerId: string | null;
35823
35865
  productSurfaceId: string | null;
35824
35866
  schemaValid: boolean | null;
35825
35867
  type: string;
@@ -35901,6 +35943,8 @@ interface paths {
35901
35943
  [key: string]: unknown;
35902
35944
  };
35903
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;
35904
35948
  type?: string;
35905
35949
  };
35906
35950
  };
@@ -35929,6 +35973,7 @@ interface paths {
35929
35973
  };
35930
35974
  name: string;
35931
35975
  organizationId: string | null;
35976
+ ownerId: string | null;
35932
35977
  productSurfaceId: string | null;
35933
35978
  schemaValid: boolean | null;
35934
35979
  schemaWarnings?: {
@@ -36228,14 +36273,23 @@ interface paths {
36228
36273
  "application/json": {
36229
36274
  data: {
36230
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;
36231
36283
  flowId: string | null;
36232
36284
  flowName: string | null;
36233
36285
  id: string;
36286
+ modelUsed: string | null;
36234
36287
  promptId: string | null;
36235
36288
  promptName: string | null;
36236
36289
  recordId: string;
36237
36290
  result?: unknown;
36238
36291
  status: string;
36292
+ totalTokens: number | null;
36239
36293
  }[];
36240
36294
  pagination: {
36241
36295
  hasMore: boolean;
@@ -36428,6 +36482,11 @@ interface paths {
36428
36482
  durationMs: number | null;
36429
36483
  errorMessage?: string | null;
36430
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;
36431
36490
  executionSessionId: string | null;
36432
36491
  flowId: string | null;
36433
36492
  flowVersionId: string | null;
@@ -37521,6 +37580,7 @@ interface paths {
37521
37580
  } | null;
37522
37581
  name: string;
37523
37582
  organizationId: string | null;
37583
+ ownerId?: string | null;
37524
37584
  productSurfaceId?: string | null;
37525
37585
  schemaValid?: boolean | null;
37526
37586
  type: string;
@@ -37687,6 +37747,7 @@ interface paths {
37687
37747
  } | null;
37688
37748
  name: string;
37689
37749
  organizationId: string | null;
37750
+ ownerId?: string | null;
37690
37751
  productSurfaceId?: string | null;
37691
37752
  schemaValid?: boolean | null;
37692
37753
  type: string;
@@ -37833,6 +37894,7 @@ interface paths {
37833
37894
  } | null;
37834
37895
  name: string;
37835
37896
  organizationId: string | null;
37897
+ ownerId?: string | null;
37836
37898
  productSurfaceId?: string | null;
37837
37899
  schemaValid?: boolean | null;
37838
37900
  type: string;
@@ -37981,6 +38043,7 @@ interface paths {
37981
38043
  } | null;
37982
38044
  name: string;
37983
38045
  organizationId: string | null;
38046
+ ownerId?: string | null;
37984
38047
  productSurfaceId?: string | null;
37985
38048
  schemaValid?: boolean | null;
37986
38049
  type: string;
@@ -38472,6 +38535,11 @@ interface paths {
38472
38535
  durationMs: number | null;
38473
38536
  error: string | null;
38474
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;
38475
38543
  failedAt: string | null;
38476
38544
  failedStepCount: number | null;
38477
38545
  flowId: string | null;
@@ -38659,6 +38727,11 @@ interface paths {
38659
38727
  durationMs: number | null;
38660
38728
  error: string | null;
38661
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;
38662
38735
  failedAt: string | null;
38663
38736
  failedStepCount: number | null;
38664
38737
  flowId: string | null;
@@ -45064,6 +45137,11 @@ interface components {
45064
45137
  cases: {
45065
45138
  /** @description The saved eval case id; null when the case row was deleted or the record could not be mapped to a case. */
45066
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;
45067
45145
  name: string;
45068
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. */
45069
45147
  nextStepToolCalls: {
@@ -47865,6 +47943,16 @@ interface CreatePromptRequest {
47865
47943
  interface CreateRecordRequest {
47866
47944
  type: string;
47867
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;
47868
47956
  metadata?: Metadata;
47869
47957
  }
47870
47958
  interface BulkEditCondition {
@@ -48267,6 +48355,7 @@ interface ListParams {
48267
48355
  interface RecordListParams extends ListParams {
48268
48356
  metadataKeys?: string;
48269
48357
  metadataKeysAll?: string;
48358
+ ownerId?: string;
48270
48359
  minFields?: number;
48271
48360
  maxFields?: number;
48272
48361
  metadataTypes?: string;
@@ -48284,9 +48373,10 @@ interface FlowToolConfig {
48284
48373
  flowId?: string;
48285
48374
  toolId?: string;
48286
48375
  /**
48287
- * Inline flow definition. Runtime-selected agent dispatches support this with
48288
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48289
- * 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.
48290
48380
  */
48291
48381
  flow?: Record<string, unknown>;
48292
48382
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48434,9 +48524,10 @@ interface RuntimeFlowToolConfig {
48434
48524
  flowId?: string;
48435
48525
  toolId?: string;
48436
48526
  /**
48437
- * Inline flow definition. Runtime-selected agent dispatches support this with
48438
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48439
- * 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.
48440
48531
  */
48441
48532
  flow?: Record<string, unknown>;
48442
48533
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48676,14 +48767,24 @@ interface CreateConversationRequest {
48676
48767
  title?: string;
48677
48768
  modelId?: string;
48678
48769
  systemPrompt?: string;
48679
- 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;
48680
48777
  metadata?: Record<string, unknown>;
48681
48778
  }
48682
48779
  interface UpdateConversationRequest {
48683
48780
  title?: string;
48684
48781
  modelId?: string;
48685
48782
  systemPrompt?: string;
48686
- 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;
48687
48788
  metadata?: Record<string, unknown>;
48688
48789
  messages?: ConversationMessage[];
48689
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;
@@ -9299,7 +9322,8 @@ interface paths {
9299
9322
  [key: string]: unknown;
9300
9323
  };
9301
9324
  modelId?: string;
9302
- 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;
9303
9327
  systemPrompt?: string;
9304
9328
  /** @default New Chat */
9305
9329
  title?: string;
@@ -9543,7 +9567,8 @@ interface paths {
9543
9567
  [key: string]: unknown;
9544
9568
  };
9545
9569
  modelId?: string;
9546
- 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;
9547
9572
  systemPrompt?: string;
9548
9573
  title?: string;
9549
9574
  };
@@ -11089,7 +11114,7 @@ interface paths {
11089
11114
  /** @default true */
11090
11115
  createVersionOnChange?: boolean;
11091
11116
  };
11092
- /** @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. */
11093
11118
  useRuntimePackage?: boolean;
11094
11119
  versionLabel?: string;
11095
11120
  versionNotes?: string;
@@ -11454,7 +11479,7 @@ interface paths {
11454
11479
  /** @default true */
11455
11480
  createVersionOnChange?: boolean;
11456
11481
  };
11457
- /** @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. */
11458
11483
  useRuntimePackage?: boolean;
11459
11484
  versionLabel?: string;
11460
11485
  versionNotes?: string;
@@ -15606,6 +15631,11 @@ interface paths {
15606
15631
  errorMessage: string | null;
15607
15632
  errorStack: string | null;
15608
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;
15609
15639
  executionSessionId: string | null;
15610
15640
  inputVariables?: unknown;
15611
15641
  messageHistory: unknown[] | null;
@@ -17815,6 +17845,11 @@ interface paths {
17815
17845
  durationMs: number | null;
17816
17846
  errorMessage?: string | null;
17817
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;
17818
17853
  executionSessionId: string | null;
17819
17854
  flowId: string | null;
17820
17855
  flowVersionId: string | null;
@@ -34831,6 +34866,7 @@ interface paths {
34831
34866
  type?: string;
34832
34867
  search?: string;
34833
34868
  name?: string;
34869
+ ownerId?: string;
34834
34870
  distinct?: string;
34835
34871
  includeFields?: string;
34836
34872
  include_fields?: string;
@@ -34878,6 +34914,7 @@ interface paths {
34878
34914
  };
34879
34915
  name: string;
34880
34916
  organizationId: string | null;
34917
+ ownerId: string | null;
34881
34918
  productSurfaceId: string | null;
34882
34919
  schemaValid: boolean | null;
34883
34920
  type: string;
@@ -34961,6 +34998,8 @@ interface paths {
34961
34998
  [key: string]: unknown;
34962
34999
  };
34963
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;
34964
35003
  type: string;
34965
35004
  };
34966
35005
  };
@@ -34989,6 +35028,7 @@ interface paths {
34989
35028
  };
34990
35029
  name: string;
34991
35030
  organizationId: string | null;
35031
+ ownerId: string | null;
34992
35032
  productSurfaceId: string | null;
34993
35033
  schemaValid: boolean | null;
34994
35034
  schemaWarnings?: {
@@ -35317,6 +35357,7 @@ interface paths {
35317
35357
  type?: string;
35318
35358
  search?: string;
35319
35359
  name?: string;
35360
+ ownerId?: string;
35320
35361
  distinct?: string;
35321
35362
  includeFields?: string;
35322
35363
  include_fields?: string;
@@ -35820,6 +35861,7 @@ interface paths {
35820
35861
  };
35821
35862
  name: string;
35822
35863
  organizationId: string | null;
35864
+ ownerId: string | null;
35823
35865
  productSurfaceId: string | null;
35824
35866
  schemaValid: boolean | null;
35825
35867
  type: string;
@@ -35901,6 +35943,8 @@ interface paths {
35901
35943
  [key: string]: unknown;
35902
35944
  };
35903
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;
35904
35948
  type?: string;
35905
35949
  };
35906
35950
  };
@@ -35929,6 +35973,7 @@ interface paths {
35929
35973
  };
35930
35974
  name: string;
35931
35975
  organizationId: string | null;
35976
+ ownerId: string | null;
35932
35977
  productSurfaceId: string | null;
35933
35978
  schemaValid: boolean | null;
35934
35979
  schemaWarnings?: {
@@ -36228,14 +36273,23 @@ interface paths {
36228
36273
  "application/json": {
36229
36274
  data: {
36230
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;
36231
36283
  flowId: string | null;
36232
36284
  flowName: string | null;
36233
36285
  id: string;
36286
+ modelUsed: string | null;
36234
36287
  promptId: string | null;
36235
36288
  promptName: string | null;
36236
36289
  recordId: string;
36237
36290
  result?: unknown;
36238
36291
  status: string;
36292
+ totalTokens: number | null;
36239
36293
  }[];
36240
36294
  pagination: {
36241
36295
  hasMore: boolean;
@@ -36428,6 +36482,11 @@ interface paths {
36428
36482
  durationMs: number | null;
36429
36483
  errorMessage?: string | null;
36430
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;
36431
36490
  executionSessionId: string | null;
36432
36491
  flowId: string | null;
36433
36492
  flowVersionId: string | null;
@@ -37521,6 +37580,7 @@ interface paths {
37521
37580
  } | null;
37522
37581
  name: string;
37523
37582
  organizationId: string | null;
37583
+ ownerId?: string | null;
37524
37584
  productSurfaceId?: string | null;
37525
37585
  schemaValid?: boolean | null;
37526
37586
  type: string;
@@ -37687,6 +37747,7 @@ interface paths {
37687
37747
  } | null;
37688
37748
  name: string;
37689
37749
  organizationId: string | null;
37750
+ ownerId?: string | null;
37690
37751
  productSurfaceId?: string | null;
37691
37752
  schemaValid?: boolean | null;
37692
37753
  type: string;
@@ -37833,6 +37894,7 @@ interface paths {
37833
37894
  } | null;
37834
37895
  name: string;
37835
37896
  organizationId: string | null;
37897
+ ownerId?: string | null;
37836
37898
  productSurfaceId?: string | null;
37837
37899
  schemaValid?: boolean | null;
37838
37900
  type: string;
@@ -37981,6 +38043,7 @@ interface paths {
37981
38043
  } | null;
37982
38044
  name: string;
37983
38045
  organizationId: string | null;
38046
+ ownerId?: string | null;
37984
38047
  productSurfaceId?: string | null;
37985
38048
  schemaValid?: boolean | null;
37986
38049
  type: string;
@@ -38472,6 +38535,11 @@ interface paths {
38472
38535
  durationMs: number | null;
38473
38536
  error: string | null;
38474
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;
38475
38543
  failedAt: string | null;
38476
38544
  failedStepCount: number | null;
38477
38545
  flowId: string | null;
@@ -38659,6 +38727,11 @@ interface paths {
38659
38727
  durationMs: number | null;
38660
38728
  error: string | null;
38661
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;
38662
38735
  failedAt: string | null;
38663
38736
  failedStepCount: number | null;
38664
38737
  flowId: string | null;
@@ -45064,6 +45137,11 @@ interface components {
45064
45137
  cases: {
45065
45138
  /** @description The saved eval case id; null when the case row was deleted or the record could not be mapped to a case. */
45066
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;
45067
45145
  name: string;
45068
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. */
45069
45147
  nextStepToolCalls: {
@@ -47865,6 +47943,16 @@ interface CreatePromptRequest {
47865
47943
  interface CreateRecordRequest {
47866
47944
  type: string;
47867
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;
47868
47956
  metadata?: Metadata;
47869
47957
  }
47870
47958
  interface BulkEditCondition {
@@ -48267,6 +48355,7 @@ interface ListParams {
48267
48355
  interface RecordListParams extends ListParams {
48268
48356
  metadataKeys?: string;
48269
48357
  metadataKeysAll?: string;
48358
+ ownerId?: string;
48270
48359
  minFields?: number;
48271
48360
  maxFields?: number;
48272
48361
  metadataTypes?: string;
@@ -48284,9 +48373,10 @@ interface FlowToolConfig {
48284
48373
  flowId?: string;
48285
48374
  toolId?: string;
48286
48375
  /**
48287
- * Inline flow definition. Runtime-selected agent dispatches support this with
48288
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48289
- * 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.
48290
48380
  */
48291
48381
  flow?: Record<string, unknown>;
48292
48382
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48434,9 +48524,10 @@ interface RuntimeFlowToolConfig {
48434
48524
  flowId?: string;
48435
48525
  toolId?: string;
48436
48526
  /**
48437
- * Inline flow definition. Runtime-selected agent dispatches support this with
48438
- * `options.useRuntimePackage: true`; hosted flow definitions currently
48439
- * 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.
48440
48531
  */
48441
48532
  flow?: Record<string, unknown>;
48442
48533
  /** Registered-flow name key for the runtime lane (`flowName ?? flowId`). */
@@ -48676,14 +48767,24 @@ interface CreateConversationRequest {
48676
48767
  title?: string;
48677
48768
  modelId?: string;
48678
48769
  systemPrompt?: string;
48679
- 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;
48680
48777
  metadata?: Record<string, unknown>;
48681
48778
  }
48682
48779
  interface UpdateConversationRequest {
48683
48780
  title?: string;
48684
48781
  modelId?: string;
48685
48782
  systemPrompt?: string;
48686
- 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;
48687
48788
  metadata?: Record<string, unknown>;
48688
48789
  messages?: ConversationMessage[];
48689
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 = "9.0.0".length > 0 ? "9.0.0" : 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": "9.0.0",
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",