@runtypelabs/sdk 6.6.0 → 6.6.2

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
@@ -6449,7 +6449,7 @@ var Runtype = class {
6449
6449
 
6450
6450
  // src/version.ts
6451
6451
  var FALLBACK_VERSION = "0.0.0";
6452
- var SDK_VERSION = "6.6.0".length > 0 ? "6.6.0" : FALLBACK_VERSION;
6452
+ var SDK_VERSION = "6.6.2".length > 0 ? "6.6.2" : FALLBACK_VERSION;
6453
6453
  var RUNTYPE_CLIENT_KIND = "sdk";
6454
6454
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6455
6455
 
package/dist/index.d.cts CHANGED
@@ -5134,7 +5134,7 @@ interface paths {
5134
5134
  maxRetries?: number;
5135
5135
  /** @description Model id applied to every prompt step in this batch. */
5136
5136
  modelOverride?: string;
5137
- /** @description Completed results buffered before partial progress is persisted. */
5137
+ /** @description Deprecated and ignored. Completed results are now persisted per record as they finish, so no partial progress is held in memory and this threshold has no effect. Still accepted for backward compatibility. */
5138
5138
  progressFlushSize?: number;
5139
5139
  /** @description Max records dispatched in parallel within a processing chunk. */
5140
5140
  recordConcurrency?: number;
@@ -10156,6 +10156,9 @@ interface paths {
10156
10156
  [key: string]: unknown;
10157
10157
  };
10158
10158
  flow: {
10159
+ agents?: {
10160
+ [key: string]: unknown;
10161
+ };
10159
10162
  contentHash?: string;
10160
10163
  description?: string;
10161
10164
  id?: string;
@@ -10517,6 +10520,9 @@ interface paths {
10517
10520
  [key: string]: unknown;
10518
10521
  };
10519
10522
  flow?: {
10523
+ agents?: {
10524
+ [key: string]: unknown;
10525
+ };
10520
10526
  contentHash?: string;
10521
10527
  description?: string;
10522
10528
  id?: string;
@@ -14848,6 +14854,108 @@ interface paths {
14848
14854
  patch?: never;
14849
14855
  trace?: never;
14850
14856
  };
14857
+ "/v1/executions/{executionId}/journal": {
14858
+ parameters: {
14859
+ query?: never;
14860
+ header?: never;
14861
+ path?: never;
14862
+ cookie?: never;
14863
+ };
14864
+ /**
14865
+ * Read an execution journal
14866
+ * @description Returns the durable flow-execution journal events for an execution the caller owns, in replay order. At most 1000 events are returned; when the execution has more, the response is capped at that many rows and `truncated` is true.
14867
+ */
14868
+ get: {
14869
+ parameters: {
14870
+ query?: never;
14871
+ header?: never;
14872
+ path: {
14873
+ /** @description Execution ID to read */
14874
+ executionId: string;
14875
+ };
14876
+ cookie?: never;
14877
+ };
14878
+ requestBody?: never;
14879
+ responses: {
14880
+ /** @description Journal events returned */
14881
+ 200: {
14882
+ headers: {
14883
+ [name: string]: unknown;
14884
+ };
14885
+ content: {
14886
+ "application/json": {
14887
+ executionId: string;
14888
+ journalEvents: {
14889
+ attempt: number | null;
14890
+ createdAt: string | null;
14891
+ eventName: string;
14892
+ id: string;
14893
+ payload: {
14894
+ [key: string]: unknown;
14895
+ };
14896
+ seq: number;
14897
+ stepId: string | null;
14898
+ }[];
14899
+ /** @description True when the execution has more than 1000 journal events and the returned list is capped. */
14900
+ truncated: boolean;
14901
+ };
14902
+ };
14903
+ };
14904
+ /** @description Invalid execution ID */
14905
+ 400: {
14906
+ headers: {
14907
+ [name: string]: unknown;
14908
+ };
14909
+ content: {
14910
+ "application/json": components["schemas"]["Error"];
14911
+ };
14912
+ };
14913
+ /** @description Unauthorized */
14914
+ 401: {
14915
+ headers: {
14916
+ [name: string]: unknown;
14917
+ };
14918
+ content: {
14919
+ "application/json": components["schemas"]["Error"];
14920
+ };
14921
+ };
14922
+ /** @description Insufficient API key permissions */
14923
+ 403: {
14924
+ headers: {
14925
+ [name: string]: unknown;
14926
+ };
14927
+ content: {
14928
+ "application/json": components["schemas"]["Error"];
14929
+ };
14930
+ };
14931
+ /** @description Not found */
14932
+ 404: {
14933
+ headers: {
14934
+ [name: string]: unknown;
14935
+ };
14936
+ content: {
14937
+ "application/json": components["schemas"]["Error"];
14938
+ };
14939
+ };
14940
+ /** @description Internal server error */
14941
+ 500: {
14942
+ headers: {
14943
+ [name: string]: unknown;
14944
+ };
14945
+ content: {
14946
+ "application/json": components["schemas"]["Error"];
14947
+ };
14948
+ };
14949
+ };
14950
+ };
14951
+ put?: never;
14952
+ post?: never;
14953
+ delete?: never;
14954
+ options?: never;
14955
+ head?: never;
14956
+ patch?: never;
14957
+ trace?: never;
14958
+ };
14851
14959
  "/v1/feedback": {
14852
14960
  parameters: {
14853
14961
  query?: never;
@@ -27273,7 +27381,7 @@ interface paths {
27273
27381
  put?: never;
27274
27382
  /**
27275
27383
  * Create surface
27276
- * @description Create a new surface for a product. Checks entitlement limits via Schematic.
27384
+ * @description Create a new surface for a product.
27277
27385
  */
27278
27386
  post: {
27279
27387
  parameters: {
@@ -27353,15 +27461,6 @@ interface paths {
27353
27461
  "application/json": components["schemas"]["Error"];
27354
27462
  };
27355
27463
  };
27356
- /** @description Surface limit exceeded */
27357
- 402: {
27358
- headers: {
27359
- [name: string]: unknown;
27360
- };
27361
- content: {
27362
- "application/json": components["schemas"]["Error"];
27363
- };
27364
- };
27365
27464
  /** @description Insufficient permissions */
27366
27465
  403: {
27367
27466
  headers: {
@@ -27477,15 +27576,6 @@ interface paths {
27477
27576
  "application/json": components["schemas"]["Error"];
27478
27577
  };
27479
27578
  };
27480
- /** @description Plan surface limit reached for the target environment (only a create counts against the quota) */
27481
- 402: {
27482
- headers: {
27483
- [name: string]: unknown;
27484
- };
27485
- content: {
27486
- "application/json": components["schemas"]["Error"];
27487
- };
27488
- };
27489
27579
  /** @description Insufficient permissions */
27490
27580
  403: {
27491
27581
  headers: {
@@ -27830,15 +27920,6 @@ interface paths {
27830
27920
  "application/json": components["schemas"]["Error"];
27831
27921
  };
27832
27922
  };
27833
- /** @description Surface limit exceeded */
27834
- 402: {
27835
- headers: {
27836
- [name: string]: unknown;
27837
- };
27838
- content: {
27839
- "application/json": components["schemas"]["Error"];
27840
- };
27841
- };
27842
27923
  /** @description Insufficient permissions */
27843
27924
  403: {
27844
27925
  headers: {
@@ -28117,6 +28198,16 @@ interface paths {
28117
28198
  id: string;
28118
28199
  isEntryPoint: boolean;
28119
28200
  surfaceId: string;
28201
+ /** @description Advisory findings about this binding. Present only when non-empty; never blocks the mutation. */
28202
+ warnings?: {
28203
+ /** @description Stable advisory code, e.g. `APPROVAL_UNANSWERABLE_ON_SURFACE` when an approval-gated agent is bound to a surface with no human to answer the prompt. */
28204
+ code: string;
28205
+ message: string;
28206
+ path: string;
28207
+ /** @enum {string} */
28208
+ severity: "warning";
28209
+ suggestedFix?: string;
28210
+ }[];
28120
28211
  };
28121
28212
  };
28122
28213
  };
@@ -28261,6 +28352,16 @@ interface paths {
28261
28352
  id: string;
28262
28353
  isEntryPoint: boolean;
28263
28354
  surfaceId: string;
28355
+ /** @description Advisory findings about this binding. Present only when non-empty; never blocks the mutation. */
28356
+ warnings?: {
28357
+ /** @description Stable advisory code, e.g. `APPROVAL_UNANSWERABLE_ON_SURFACE` when an approval-gated agent is bound to a surface with no human to answer the prompt. */
28358
+ code: string;
28359
+ message: string;
28360
+ path: string;
28361
+ /** @enum {string} */
28362
+ severity: "warning";
28363
+ suggestedFix?: string;
28364
+ }[];
28264
28365
  };
28265
28366
  };
28266
28367
  };
@@ -36106,11 +36207,23 @@ interface paths {
36106
36207
  record: {
36107
36208
  createdAt: string;
36108
36209
  id: string;
36210
+ messages?: {
36211
+ content: string;
36212
+ role: string;
36213
+ }[] | null;
36109
36214
  metadata: {
36110
36215
  [key: string]: unknown;
36111
36216
  };
36217
+ metadataLabels?: {
36218
+ [key: string]: string;
36219
+ } | null;
36220
+ metadataSchema?: {
36221
+ [key: string]: unknown;
36222
+ } | null;
36112
36223
  name: string;
36113
36224
  organizationId: string | null;
36225
+ productSurfaceId?: string | null;
36226
+ schemaValid?: boolean | null;
36114
36227
  type: string;
36115
36228
  updatedAt: string;
36116
36229
  userId: string;
@@ -36260,11 +36373,23 @@ interface paths {
36260
36373
  records: {
36261
36374
  createdAt: string;
36262
36375
  id: string;
36376
+ messages?: {
36377
+ content: string;
36378
+ role: string;
36379
+ }[] | null;
36263
36380
  metadata: {
36264
36381
  [key: string]: unknown;
36265
36382
  };
36383
+ metadataLabels?: {
36384
+ [key: string]: string;
36385
+ } | null;
36386
+ metadataSchema?: {
36387
+ [key: string]: unknown;
36388
+ } | null;
36266
36389
  name: string;
36267
36390
  organizationId: string | null;
36391
+ productSurfaceId?: string | null;
36392
+ schemaValid?: boolean | null;
36268
36393
  type: string;
36269
36394
  updatedAt: string;
36270
36395
  userId: string;
@@ -36394,11 +36519,23 @@ interface paths {
36394
36519
  record: {
36395
36520
  createdAt: string;
36396
36521
  id: string;
36522
+ messages?: {
36523
+ content: string;
36524
+ role: string;
36525
+ }[] | null;
36397
36526
  metadata: {
36398
36527
  [key: string]: unknown;
36399
36528
  };
36529
+ metadataLabels?: {
36530
+ [key: string]: string;
36531
+ } | null;
36532
+ metadataSchema?: {
36533
+ [key: string]: unknown;
36534
+ } | null;
36400
36535
  name: string;
36401
36536
  organizationId: string | null;
36537
+ productSurfaceId?: string | null;
36538
+ schemaValid?: boolean | null;
36402
36539
  type: string;
36403
36540
  updatedAt: string;
36404
36541
  userId: string;
@@ -36530,11 +36667,23 @@ interface paths {
36530
36667
  record: {
36531
36668
  createdAt: string;
36532
36669
  id: string;
36670
+ messages?: {
36671
+ content: string;
36672
+ role: string;
36673
+ }[] | null;
36533
36674
  metadata: {
36534
36675
  [key: string]: unknown;
36535
36676
  };
36677
+ metadataLabels?: {
36678
+ [key: string]: string;
36679
+ } | null;
36680
+ metadataSchema?: {
36681
+ [key: string]: unknown;
36682
+ } | null;
36536
36683
  name: string;
36537
36684
  organizationId: string | null;
36685
+ productSurfaceId?: string | null;
36686
+ schemaValid?: boolean | null;
36538
36687
  type: string;
36539
36688
  updatedAt: string;
36540
36689
  userId: string;
@@ -36945,7 +37094,7 @@ interface paths {
36945
37094
  [name: string]: unknown;
36946
37095
  };
36947
37096
  content: {
36948
- "application/json": components["schemas"]["Error"];
37097
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
36949
37098
  };
36950
37099
  };
36951
37100
  /** @description Insufficient permissions */
@@ -37496,7 +37645,7 @@ interface paths {
37496
37645
  [name: string]: unknown;
37497
37646
  };
37498
37647
  content: {
37499
- "application/json": components["schemas"]["Error"];
37648
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
37500
37649
  };
37501
37650
  };
37502
37651
  /** @description Insufficient permissions */
@@ -37711,7 +37860,7 @@ interface paths {
37711
37860
  [name: string]: unknown;
37712
37861
  };
37713
37862
  content: {
37714
- "application/json": components["schemas"]["Error"];
37863
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
37715
37864
  };
37716
37865
  };
37717
37866
  /** @description Insufficient permissions */
@@ -44223,6 +44372,16 @@ interface components {
44223
44372
  requestedSchema?: {
44224
44373
  [key: string]: unknown;
44225
44374
  };
44375
+ requests?: {
44376
+ message: string;
44377
+ /** @enum {string} */
44378
+ mode: "form" | "url";
44379
+ name: string;
44380
+ requestedSchema?: {
44381
+ [key: string]: unknown;
44382
+ };
44383
+ url?: string;
44384
+ }[];
44226
44385
  serverName?: string;
44227
44386
  url?: string;
44228
44387
  };
@@ -44577,6 +44736,14 @@ interface components {
44577
44736
  error: string;
44578
44737
  message?: string;
44579
44738
  };
44739
+ ScheduleEntitlementError: components["schemas"]["Error"] & {
44740
+ /** @description Stable error code (e.g. ACTIVE_SCHEDULE_LIMIT, SCHEDULE_FREQUENCY_LIMIT). */
44741
+ code?: string;
44742
+ /** @description Human-readable error message. */
44743
+ message?: string;
44744
+ /** @description Dashboard-relative URL to the billing/upgrade page. */
44745
+ upgradeUrl?: string;
44746
+ };
44580
44747
  SkillEnsureConflict: {
44581
44748
  /** @enum {string} */
44582
44749
  code: "external_modification" | "remote_changed";
@@ -45457,8 +45624,8 @@ interface RetrieveRecordStepConfig$1 {
45457
45624
  recordId?: string;
45458
45625
  /**
45459
45626
  * Optional chip-style filter (metadata + top-level columns: id, name,
45460
- * createdAt, updatedAt). Coexists with recordType/recordName for
45461
- * backward compatibility; the API executor prefers recordFilter when
45627
+ * createdAt, updatedAt, schemaValid). Coexists with recordType/recordName
45628
+ * for backward compatibility; the API executor prefers recordFilter when
45462
45629
  * both are set.
45463
45630
  */
45464
45631
  recordFilter?: RecordFilter;
@@ -45485,8 +45652,8 @@ interface GetRecordStepConfig$1 {
45485
45652
  recordName?: string;
45486
45653
  /**
45487
45654
  * Optional chip-style filter (metadata + top-level columns: id, name,
45488
- * createdAt, updatedAt). Coexists with recordType/recordName; the API
45489
- * executor prefers recordFilter when both are set.
45655
+ * createdAt, updatedAt, schemaValid). Coexists with recordType/recordName;
45656
+ * the API executor prefers recordFilter when both are set.
45490
45657
  */
45491
45658
  recordFilter?: RecordFilter;
45492
45659
  fieldsToInclude?: string | string[];
@@ -45511,8 +45678,8 @@ interface ListRecordsStepConfig$1 {
45511
45678
  recordName?: string;
45512
45679
  /**
45513
45680
  * Optional chip-style filter (metadata + top-level columns: id, name,
45514
- * createdAt, updatedAt). Coexists with recordType/recordName; the API
45515
- * executor prefers recordFilter when both are set.
45681
+ * createdAt, updatedAt, schemaValid). Coexists with recordType/recordName;
45682
+ * the API executor prefers recordFilter when both are set.
45516
45683
  */
45517
45684
  recordFilter?: RecordFilter;
45518
45685
  /** Max records returned (default 50, capped at 1000). */
@@ -51599,7 +51766,8 @@ interface ClientToken {
51599
51766
  id: string;
51600
51767
  name: string | null;
51601
51768
  flowIds: string[];
51602
- defaultFlowId: string;
51769
+ defaultFlowId: string | null;
51770
+ agentIds: string[];
51603
51771
  allowedOrigins: string[];
51604
51772
  environment: ClientTokenEnvironment;
51605
51773
  pinToVersion: ClientTokenVersionPin | null;
@@ -51611,6 +51779,10 @@ interface ClientToken {
51611
51779
  isActive: boolean;
51612
51780
  tokenPrefix: string;
51613
51781
  tokenHint: string | null;
51782
+ /** Publishable token value. Null for legacy rows until regenerated. */
51783
+ tokenValue: string | null;
51784
+ /** Product chat surface this token was minted for, when surface-bound. */
51785
+ productSurfaceId?: string | null;
51614
51786
  conversationCount?: number;
51615
51787
  lastUsedAt: string | null;
51616
51788
  createdAt: string;
@@ -51621,8 +51793,9 @@ interface ClientToken {
51621
51793
  */
51622
51794
  interface CreateClientTokenRequest {
51623
51795
  name: string;
51624
- flowIds: string[];
51625
- defaultFlowId: string;
51796
+ flowIds?: string[];
51797
+ defaultFlowId?: string;
51798
+ agentIds?: string[];
51626
51799
  allowedOrigins: string[];
51627
51800
  environment?: ClientTokenEnvironment;
51628
51801
  pinToVersion?: ClientTokenVersionPin;
@@ -51631,6 +51804,7 @@ interface CreateClientTokenRequest {
51631
51804
  maxMessagesPerSession?: number;
51632
51805
  sessionIdleTimeoutMinutes?: number;
51633
51806
  config?: ClientTokenConfig;
51807
+ productSurfaceId?: string;
51634
51808
  }
51635
51809
  /**
51636
51810
  * Request to update a client token
@@ -51639,6 +51813,7 @@ interface UpdateClientTokenRequest {
51639
51813
  name?: string;
51640
51814
  flowIds?: string[];
51641
51815
  defaultFlowId?: string;
51816
+ agentIds?: string[];
51642
51817
  allowedOrigins?: string[];
51643
51818
  pinToVersion?: ClientTokenVersionPin;
51644
51819
  rateLimitPerMinute?: number;
package/dist/index.d.ts CHANGED
@@ -5134,7 +5134,7 @@ interface paths {
5134
5134
  maxRetries?: number;
5135
5135
  /** @description Model id applied to every prompt step in this batch. */
5136
5136
  modelOverride?: string;
5137
- /** @description Completed results buffered before partial progress is persisted. */
5137
+ /** @description Deprecated and ignored. Completed results are now persisted per record as they finish, so no partial progress is held in memory and this threshold has no effect. Still accepted for backward compatibility. */
5138
5138
  progressFlushSize?: number;
5139
5139
  /** @description Max records dispatched in parallel within a processing chunk. */
5140
5140
  recordConcurrency?: number;
@@ -10156,6 +10156,9 @@ interface paths {
10156
10156
  [key: string]: unknown;
10157
10157
  };
10158
10158
  flow: {
10159
+ agents?: {
10160
+ [key: string]: unknown;
10161
+ };
10159
10162
  contentHash?: string;
10160
10163
  description?: string;
10161
10164
  id?: string;
@@ -10517,6 +10520,9 @@ interface paths {
10517
10520
  [key: string]: unknown;
10518
10521
  };
10519
10522
  flow?: {
10523
+ agents?: {
10524
+ [key: string]: unknown;
10525
+ };
10520
10526
  contentHash?: string;
10521
10527
  description?: string;
10522
10528
  id?: string;
@@ -14848,6 +14854,108 @@ interface paths {
14848
14854
  patch?: never;
14849
14855
  trace?: never;
14850
14856
  };
14857
+ "/v1/executions/{executionId}/journal": {
14858
+ parameters: {
14859
+ query?: never;
14860
+ header?: never;
14861
+ path?: never;
14862
+ cookie?: never;
14863
+ };
14864
+ /**
14865
+ * Read an execution journal
14866
+ * @description Returns the durable flow-execution journal events for an execution the caller owns, in replay order. At most 1000 events are returned; when the execution has more, the response is capped at that many rows and `truncated` is true.
14867
+ */
14868
+ get: {
14869
+ parameters: {
14870
+ query?: never;
14871
+ header?: never;
14872
+ path: {
14873
+ /** @description Execution ID to read */
14874
+ executionId: string;
14875
+ };
14876
+ cookie?: never;
14877
+ };
14878
+ requestBody?: never;
14879
+ responses: {
14880
+ /** @description Journal events returned */
14881
+ 200: {
14882
+ headers: {
14883
+ [name: string]: unknown;
14884
+ };
14885
+ content: {
14886
+ "application/json": {
14887
+ executionId: string;
14888
+ journalEvents: {
14889
+ attempt: number | null;
14890
+ createdAt: string | null;
14891
+ eventName: string;
14892
+ id: string;
14893
+ payload: {
14894
+ [key: string]: unknown;
14895
+ };
14896
+ seq: number;
14897
+ stepId: string | null;
14898
+ }[];
14899
+ /** @description True when the execution has more than 1000 journal events and the returned list is capped. */
14900
+ truncated: boolean;
14901
+ };
14902
+ };
14903
+ };
14904
+ /** @description Invalid execution ID */
14905
+ 400: {
14906
+ headers: {
14907
+ [name: string]: unknown;
14908
+ };
14909
+ content: {
14910
+ "application/json": components["schemas"]["Error"];
14911
+ };
14912
+ };
14913
+ /** @description Unauthorized */
14914
+ 401: {
14915
+ headers: {
14916
+ [name: string]: unknown;
14917
+ };
14918
+ content: {
14919
+ "application/json": components["schemas"]["Error"];
14920
+ };
14921
+ };
14922
+ /** @description Insufficient API key permissions */
14923
+ 403: {
14924
+ headers: {
14925
+ [name: string]: unknown;
14926
+ };
14927
+ content: {
14928
+ "application/json": components["schemas"]["Error"];
14929
+ };
14930
+ };
14931
+ /** @description Not found */
14932
+ 404: {
14933
+ headers: {
14934
+ [name: string]: unknown;
14935
+ };
14936
+ content: {
14937
+ "application/json": components["schemas"]["Error"];
14938
+ };
14939
+ };
14940
+ /** @description Internal server error */
14941
+ 500: {
14942
+ headers: {
14943
+ [name: string]: unknown;
14944
+ };
14945
+ content: {
14946
+ "application/json": components["schemas"]["Error"];
14947
+ };
14948
+ };
14949
+ };
14950
+ };
14951
+ put?: never;
14952
+ post?: never;
14953
+ delete?: never;
14954
+ options?: never;
14955
+ head?: never;
14956
+ patch?: never;
14957
+ trace?: never;
14958
+ };
14851
14959
  "/v1/feedback": {
14852
14960
  parameters: {
14853
14961
  query?: never;
@@ -27273,7 +27381,7 @@ interface paths {
27273
27381
  put?: never;
27274
27382
  /**
27275
27383
  * Create surface
27276
- * @description Create a new surface for a product. Checks entitlement limits via Schematic.
27384
+ * @description Create a new surface for a product.
27277
27385
  */
27278
27386
  post: {
27279
27387
  parameters: {
@@ -27353,15 +27461,6 @@ interface paths {
27353
27461
  "application/json": components["schemas"]["Error"];
27354
27462
  };
27355
27463
  };
27356
- /** @description Surface limit exceeded */
27357
- 402: {
27358
- headers: {
27359
- [name: string]: unknown;
27360
- };
27361
- content: {
27362
- "application/json": components["schemas"]["Error"];
27363
- };
27364
- };
27365
27464
  /** @description Insufficient permissions */
27366
27465
  403: {
27367
27466
  headers: {
@@ -27477,15 +27576,6 @@ interface paths {
27477
27576
  "application/json": components["schemas"]["Error"];
27478
27577
  };
27479
27578
  };
27480
- /** @description Plan surface limit reached for the target environment (only a create counts against the quota) */
27481
- 402: {
27482
- headers: {
27483
- [name: string]: unknown;
27484
- };
27485
- content: {
27486
- "application/json": components["schemas"]["Error"];
27487
- };
27488
- };
27489
27579
  /** @description Insufficient permissions */
27490
27580
  403: {
27491
27581
  headers: {
@@ -27830,15 +27920,6 @@ interface paths {
27830
27920
  "application/json": components["schemas"]["Error"];
27831
27921
  };
27832
27922
  };
27833
- /** @description Surface limit exceeded */
27834
- 402: {
27835
- headers: {
27836
- [name: string]: unknown;
27837
- };
27838
- content: {
27839
- "application/json": components["schemas"]["Error"];
27840
- };
27841
- };
27842
27923
  /** @description Insufficient permissions */
27843
27924
  403: {
27844
27925
  headers: {
@@ -28117,6 +28198,16 @@ interface paths {
28117
28198
  id: string;
28118
28199
  isEntryPoint: boolean;
28119
28200
  surfaceId: string;
28201
+ /** @description Advisory findings about this binding. Present only when non-empty; never blocks the mutation. */
28202
+ warnings?: {
28203
+ /** @description Stable advisory code, e.g. `APPROVAL_UNANSWERABLE_ON_SURFACE` when an approval-gated agent is bound to a surface with no human to answer the prompt. */
28204
+ code: string;
28205
+ message: string;
28206
+ path: string;
28207
+ /** @enum {string} */
28208
+ severity: "warning";
28209
+ suggestedFix?: string;
28210
+ }[];
28120
28211
  };
28121
28212
  };
28122
28213
  };
@@ -28261,6 +28352,16 @@ interface paths {
28261
28352
  id: string;
28262
28353
  isEntryPoint: boolean;
28263
28354
  surfaceId: string;
28355
+ /** @description Advisory findings about this binding. Present only when non-empty; never blocks the mutation. */
28356
+ warnings?: {
28357
+ /** @description Stable advisory code, e.g. `APPROVAL_UNANSWERABLE_ON_SURFACE` when an approval-gated agent is bound to a surface with no human to answer the prompt. */
28358
+ code: string;
28359
+ message: string;
28360
+ path: string;
28361
+ /** @enum {string} */
28362
+ severity: "warning";
28363
+ suggestedFix?: string;
28364
+ }[];
28264
28365
  };
28265
28366
  };
28266
28367
  };
@@ -36106,11 +36207,23 @@ interface paths {
36106
36207
  record: {
36107
36208
  createdAt: string;
36108
36209
  id: string;
36210
+ messages?: {
36211
+ content: string;
36212
+ role: string;
36213
+ }[] | null;
36109
36214
  metadata: {
36110
36215
  [key: string]: unknown;
36111
36216
  };
36217
+ metadataLabels?: {
36218
+ [key: string]: string;
36219
+ } | null;
36220
+ metadataSchema?: {
36221
+ [key: string]: unknown;
36222
+ } | null;
36112
36223
  name: string;
36113
36224
  organizationId: string | null;
36225
+ productSurfaceId?: string | null;
36226
+ schemaValid?: boolean | null;
36114
36227
  type: string;
36115
36228
  updatedAt: string;
36116
36229
  userId: string;
@@ -36260,11 +36373,23 @@ interface paths {
36260
36373
  records: {
36261
36374
  createdAt: string;
36262
36375
  id: string;
36376
+ messages?: {
36377
+ content: string;
36378
+ role: string;
36379
+ }[] | null;
36263
36380
  metadata: {
36264
36381
  [key: string]: unknown;
36265
36382
  };
36383
+ metadataLabels?: {
36384
+ [key: string]: string;
36385
+ } | null;
36386
+ metadataSchema?: {
36387
+ [key: string]: unknown;
36388
+ } | null;
36266
36389
  name: string;
36267
36390
  organizationId: string | null;
36391
+ productSurfaceId?: string | null;
36392
+ schemaValid?: boolean | null;
36268
36393
  type: string;
36269
36394
  updatedAt: string;
36270
36395
  userId: string;
@@ -36394,11 +36519,23 @@ interface paths {
36394
36519
  record: {
36395
36520
  createdAt: string;
36396
36521
  id: string;
36522
+ messages?: {
36523
+ content: string;
36524
+ role: string;
36525
+ }[] | null;
36397
36526
  metadata: {
36398
36527
  [key: string]: unknown;
36399
36528
  };
36529
+ metadataLabels?: {
36530
+ [key: string]: string;
36531
+ } | null;
36532
+ metadataSchema?: {
36533
+ [key: string]: unknown;
36534
+ } | null;
36400
36535
  name: string;
36401
36536
  organizationId: string | null;
36537
+ productSurfaceId?: string | null;
36538
+ schemaValid?: boolean | null;
36402
36539
  type: string;
36403
36540
  updatedAt: string;
36404
36541
  userId: string;
@@ -36530,11 +36667,23 @@ interface paths {
36530
36667
  record: {
36531
36668
  createdAt: string;
36532
36669
  id: string;
36670
+ messages?: {
36671
+ content: string;
36672
+ role: string;
36673
+ }[] | null;
36533
36674
  metadata: {
36534
36675
  [key: string]: unknown;
36535
36676
  };
36677
+ metadataLabels?: {
36678
+ [key: string]: string;
36679
+ } | null;
36680
+ metadataSchema?: {
36681
+ [key: string]: unknown;
36682
+ } | null;
36536
36683
  name: string;
36537
36684
  organizationId: string | null;
36685
+ productSurfaceId?: string | null;
36686
+ schemaValid?: boolean | null;
36538
36687
  type: string;
36539
36688
  updatedAt: string;
36540
36689
  userId: string;
@@ -36945,7 +37094,7 @@ interface paths {
36945
37094
  [name: string]: unknown;
36946
37095
  };
36947
37096
  content: {
36948
- "application/json": components["schemas"]["Error"];
37097
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
36949
37098
  };
36950
37099
  };
36951
37100
  /** @description Insufficient permissions */
@@ -37496,7 +37645,7 @@ interface paths {
37496
37645
  [name: string]: unknown;
37497
37646
  };
37498
37647
  content: {
37499
- "application/json": components["schemas"]["Error"];
37648
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
37500
37649
  };
37501
37650
  };
37502
37651
  /** @description Insufficient permissions */
@@ -37711,7 +37860,7 @@ interface paths {
37711
37860
  [name: string]: unknown;
37712
37861
  };
37713
37862
  content: {
37714
- "application/json": components["schemas"]["Error"];
37863
+ "application/json": components["schemas"]["ScheduleEntitlementError"];
37715
37864
  };
37716
37865
  };
37717
37866
  /** @description Insufficient permissions */
@@ -44223,6 +44372,16 @@ interface components {
44223
44372
  requestedSchema?: {
44224
44373
  [key: string]: unknown;
44225
44374
  };
44375
+ requests?: {
44376
+ message: string;
44377
+ /** @enum {string} */
44378
+ mode: "form" | "url";
44379
+ name: string;
44380
+ requestedSchema?: {
44381
+ [key: string]: unknown;
44382
+ };
44383
+ url?: string;
44384
+ }[];
44226
44385
  serverName?: string;
44227
44386
  url?: string;
44228
44387
  };
@@ -44577,6 +44736,14 @@ interface components {
44577
44736
  error: string;
44578
44737
  message?: string;
44579
44738
  };
44739
+ ScheduleEntitlementError: components["schemas"]["Error"] & {
44740
+ /** @description Stable error code (e.g. ACTIVE_SCHEDULE_LIMIT, SCHEDULE_FREQUENCY_LIMIT). */
44741
+ code?: string;
44742
+ /** @description Human-readable error message. */
44743
+ message?: string;
44744
+ /** @description Dashboard-relative URL to the billing/upgrade page. */
44745
+ upgradeUrl?: string;
44746
+ };
44580
44747
  SkillEnsureConflict: {
44581
44748
  /** @enum {string} */
44582
44749
  code: "external_modification" | "remote_changed";
@@ -45457,8 +45624,8 @@ interface RetrieveRecordStepConfig$1 {
45457
45624
  recordId?: string;
45458
45625
  /**
45459
45626
  * Optional chip-style filter (metadata + top-level columns: id, name,
45460
- * createdAt, updatedAt). Coexists with recordType/recordName for
45461
- * backward compatibility; the API executor prefers recordFilter when
45627
+ * createdAt, updatedAt, schemaValid). Coexists with recordType/recordName
45628
+ * for backward compatibility; the API executor prefers recordFilter when
45462
45629
  * both are set.
45463
45630
  */
45464
45631
  recordFilter?: RecordFilter;
@@ -45485,8 +45652,8 @@ interface GetRecordStepConfig$1 {
45485
45652
  recordName?: string;
45486
45653
  /**
45487
45654
  * Optional chip-style filter (metadata + top-level columns: id, name,
45488
- * createdAt, updatedAt). Coexists with recordType/recordName; the API
45489
- * executor prefers recordFilter when both are set.
45655
+ * createdAt, updatedAt, schemaValid). Coexists with recordType/recordName;
45656
+ * the API executor prefers recordFilter when both are set.
45490
45657
  */
45491
45658
  recordFilter?: RecordFilter;
45492
45659
  fieldsToInclude?: string | string[];
@@ -45511,8 +45678,8 @@ interface ListRecordsStepConfig$1 {
45511
45678
  recordName?: string;
45512
45679
  /**
45513
45680
  * Optional chip-style filter (metadata + top-level columns: id, name,
45514
- * createdAt, updatedAt). Coexists with recordType/recordName; the API
45515
- * executor prefers recordFilter when both are set.
45681
+ * createdAt, updatedAt, schemaValid). Coexists with recordType/recordName;
45682
+ * the API executor prefers recordFilter when both are set.
45516
45683
  */
45517
45684
  recordFilter?: RecordFilter;
45518
45685
  /** Max records returned (default 50, capped at 1000). */
@@ -51599,7 +51766,8 @@ interface ClientToken {
51599
51766
  id: string;
51600
51767
  name: string | null;
51601
51768
  flowIds: string[];
51602
- defaultFlowId: string;
51769
+ defaultFlowId: string | null;
51770
+ agentIds: string[];
51603
51771
  allowedOrigins: string[];
51604
51772
  environment: ClientTokenEnvironment;
51605
51773
  pinToVersion: ClientTokenVersionPin | null;
@@ -51611,6 +51779,10 @@ interface ClientToken {
51611
51779
  isActive: boolean;
51612
51780
  tokenPrefix: string;
51613
51781
  tokenHint: string | null;
51782
+ /** Publishable token value. Null for legacy rows until regenerated. */
51783
+ tokenValue: string | null;
51784
+ /** Product chat surface this token was minted for, when surface-bound. */
51785
+ productSurfaceId?: string | null;
51614
51786
  conversationCount?: number;
51615
51787
  lastUsedAt: string | null;
51616
51788
  createdAt: string;
@@ -51621,8 +51793,9 @@ interface ClientToken {
51621
51793
  */
51622
51794
  interface CreateClientTokenRequest {
51623
51795
  name: string;
51624
- flowIds: string[];
51625
- defaultFlowId: string;
51796
+ flowIds?: string[];
51797
+ defaultFlowId?: string;
51798
+ agentIds?: string[];
51626
51799
  allowedOrigins: string[];
51627
51800
  environment?: ClientTokenEnvironment;
51628
51801
  pinToVersion?: ClientTokenVersionPin;
@@ -51631,6 +51804,7 @@ interface CreateClientTokenRequest {
51631
51804
  maxMessagesPerSession?: number;
51632
51805
  sessionIdleTimeoutMinutes?: number;
51633
51806
  config?: ClientTokenConfig;
51807
+ productSurfaceId?: string;
51634
51808
  }
51635
51809
  /**
51636
51810
  * Request to update a client token
@@ -51639,6 +51813,7 @@ interface UpdateClientTokenRequest {
51639
51813
  name?: string;
51640
51814
  flowIds?: string[];
51641
51815
  defaultFlowId?: string;
51816
+ agentIds?: string[];
51642
51817
  allowedOrigins?: string[];
51643
51818
  pinToVersion?: ClientTokenVersionPin;
51644
51819
  rateLimitPerMinute?: number;
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.6.0".length > 0 ? "6.6.0" : FALLBACK_VERSION;
6264
+ var SDK_VERSION = "6.6.2".length > 0 ? "6.6.2" : FALLBACK_VERSION;
6265
6265
  var RUNTYPE_CLIENT_KIND = "sdk";
6266
6266
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6267
6267
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "6.6.0",
3
+ "version": "6.6.2",
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",