@runtypelabs/sdk 9.5.0 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -6484,7 +6484,7 @@ var Runtype = class {
6484
6484
 
6485
6485
  // src/version.ts
6486
6486
  var FALLBACK_VERSION = "0.0.0";
6487
- var SDK_VERSION = "9.5.0".length > 0 ? "9.5.0" : FALLBACK_VERSION;
6487
+ var SDK_VERSION = "9.6.0".length > 0 ? "9.6.0" : FALLBACK_VERSION;
6488
6488
  var RUNTYPE_CLIENT_KIND = "sdk";
6489
6489
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6490
6490
 
package/dist/index.d.cts CHANGED
@@ -564,7 +564,6 @@ interface paths {
564
564
  id: string;
565
565
  lastRunAt?: string | null;
566
566
  name: string;
567
- primaryFlowId: string | null;
568
567
  status: string;
569
568
  updatedAt: string;
570
569
  }[];
@@ -977,7 +976,11 @@ interface paths {
977
976
  icon?: string;
978
977
  maxTurns?: number;
979
978
  name: string;
980
- primaryFlowId?: string | null;
979
+ /**
980
+ * @deprecated
981
+ * @description primaryFlowId is retired: primary-flow agents were removed (ADR 0024). Attach the flow to the agent as a runtime tool ({ toolType: 'flow', flowId }) or dispatch the flow directly via POST /v1/dispatch.
982
+ */
983
+ primaryFlowId?: null;
981
984
  };
982
985
  };
983
986
  };
@@ -1026,7 +1029,6 @@ interface paths {
1026
1029
  lastModifiedSource: string | null;
1027
1030
  name: string;
1028
1031
  organizationId: string | null;
1029
- primaryFlowId: string | null;
1030
1032
  publishedVersionId: string | null;
1031
1033
  status: string;
1032
1034
  updatedAt: string;
@@ -1699,11 +1701,6 @@ interface paths {
1699
1701
  lastModifiedSource: string | null;
1700
1702
  name: string;
1701
1703
  organizationId: string | null;
1702
- primaryFlow: {
1703
- id: string;
1704
- name: string;
1705
- } | null;
1706
- primaryFlowId: string | null;
1707
1704
  publishedVersionId: string | null;
1708
1705
  status: string;
1709
1706
  updatedAt: string;
@@ -2107,7 +2104,11 @@ interface paths {
2107
2104
  icon?: string;
2108
2105
  maxTurns?: number;
2109
2106
  name?: string;
2110
- primaryFlowId?: string | null;
2107
+ /**
2108
+ * @deprecated
2109
+ * @description primaryFlowId is retired: primary-flow agents were removed (ADR 0024). Attach the flow to the agent as a runtime tool ({ toolType: 'flow', flowId }) or dispatch the flow directly via POST /v1/dispatch.
2110
+ */
2111
+ primaryFlowId?: null;
2111
2112
  };
2112
2113
  };
2113
2114
  };
@@ -2143,7 +2144,6 @@ interface paths {
2143
2144
  lastModifiedSource: string | null;
2144
2145
  name: string;
2145
2146
  organizationId: string | null;
2146
- primaryFlowId: string | null;
2147
2147
  publishedVersionId: string | null;
2148
2148
  status: string;
2149
2149
  updatedAt: string;
@@ -3567,9 +3567,6 @@ interface paths {
3567
3567
  hostDependencies: components["schemas"]["RuntimeHostDependency"][];
3568
3568
  id: string;
3569
3569
  name: string;
3570
- primaryFlow?: {
3571
- [key: string]: unknown;
3572
- };
3573
3570
  };
3574
3571
  };
3575
3572
  };
@@ -3768,7 +3765,6 @@ interface paths {
3768
3765
  id: string;
3769
3766
  name: string;
3770
3767
  organizationId: string | null;
3771
- primaryFlowId: string | null;
3772
3768
  status: string;
3773
3769
  updatedAt: string;
3774
3770
  userId: string;
@@ -5040,6 +5036,8 @@ interface paths {
5040
5036
  content: {
5041
5037
  "application/json": {
5042
5038
  hasOrganization: boolean;
5039
+ /** @enum {string|null} */
5040
+ onboardingIntent: "build_new" | "connect_existing" | "unstated" | null;
5043
5041
  orgId?: string | null;
5044
5042
  orgRole?: string | null;
5045
5043
  orgSlug?: string | null;
@@ -5245,23 +5243,23 @@ interface paths {
5245
5243
  requestBody?: {
5246
5244
  content: {
5247
5245
  "application/json": {
5248
- /** @description Agent to execute per record instead of a flow. Each record then carries its conversation in metadata.messages. */
5249
- agentId?: string;
5246
+ /** @description Agent to execute per record instead of a flow. Saved records are loaded and their conversation read from metadata.messages; inline records reach the agent only when their type is _agent_eval or _agent_schedule and metadata.messages carries the conversation. Any other inline record type fails per record. */
5247
+ agentId?: string | null;
5250
5248
  flowDefinition?: components["schemas"]["BatchFlowDefinition"];
5251
5249
  /** @description Saved flow to execute per record. One of flowId, flowDefinition, or agentId is required. */
5252
- flowId?: string;
5250
+ flowId?: string | null;
5253
5251
  /** @description Flow input variables applied to every record execution. */
5254
5252
  inputs?: {
5255
5253
  [key: string]: unknown;
5256
- };
5254
+ } | null;
5257
5255
  /** @description Conversation seed passed unchanged to every record execution. Records cannot see each other's history. */
5258
5256
  messages?: ({
5259
5257
  content?: unknown;
5260
5258
  role: string;
5261
5259
  } & {
5262
5260
  [key: string]: unknown;
5263
- })[];
5264
- options?: {
5261
+ })[] | null;
5262
+ options?: ({
5265
5263
  /** @description Records admitted to one processing chunk before progress is flushed and batch gates are re-checked. */
5266
5264
  chunkSize?: number;
5267
5265
  /** @description Flow-wide deadline passed to every per-record flow execution. */
@@ -5282,11 +5280,11 @@ interface paths {
5282
5280
  timeoutMs?: number;
5283
5281
  } & {
5284
5282
  [key: string]: unknown;
5285
- };
5283
+ }) | null;
5286
5284
  /** @description Saved record ids to process. May be combined with records; the batch runs the union. At least one of recordIds or records must be non-empty. Maximum 50000 records per batch across both. */
5287
- recordIds?: string[];
5285
+ recordIds?: string[] | null;
5288
5286
  /** @description Inline records to process without saving them first. May be combined with recordIds. Maximum 50000 records per batch across both. */
5289
- records?: components["schemas"]["BatchInlineRecord"][];
5287
+ records?: components["schemas"]["BatchInlineRecord"][] | null;
5290
5288
  } & {
5291
5289
  [key: string]: unknown;
5292
5290
  };
@@ -7818,7 +7816,7 @@ interface paths {
7818
7816
  };
7819
7817
  /** @description The created (or resumed) client session ID. */
7820
7818
  sessionId: string;
7821
- /** @description The flow or agent this session executes against, resolved server-side. Canonical replacement for `flow.id`, and the exact key to pass as `targetId` when listing or deleting this conversation's history. Matches the value stored on the conversation record, including the case where an agent-only token resolves its agent to a primary flow. Absent only on the data-only Runtype App branch, which is not chat-capable. */
7819
+ /** @description The flow or agent this session executes against, resolved server-side. Canonical replacement for `flow.id`, and the exact key to pass as `targetId` when listing or deleting this conversation's history. Matches the value stored on the conversation record; an agent-only token resolves to its agent id. Absent only on the data-only Runtype App branch, which is not chat-capable. */
7822
7820
  targetId?: string;
7823
7821
  /** @description The browser's anonymous visitor identity. Present when the request opts into visitor history (or supplies a visitor token, identity proof, or conversation id). Authenticates the `/client/conversations*` history routes, which the site-wide client token alone cannot reach. */
7824
7822
  visitor?: {
@@ -42215,6 +42213,256 @@ interface paths {
42215
42213
  patch?: never;
42216
42214
  trace?: never;
42217
42215
  };
42216
+ "/v1/surfaces/{surfaceId}": {
42217
+ parameters: {
42218
+ query?: never;
42219
+ header?: never;
42220
+ path?: never;
42221
+ cookie?: never;
42222
+ };
42223
+ /**
42224
+ * Get surface details
42225
+ * @description Get an authorized surface by its globally unique ID, including items and keys.
42226
+ */
42227
+ get: {
42228
+ parameters: {
42229
+ query?: never;
42230
+ header?: never;
42231
+ path: {
42232
+ surfaceId: string;
42233
+ };
42234
+ cookie?: never;
42235
+ };
42236
+ requestBody?: never;
42237
+ responses: {
42238
+ /** @description Surface details */
42239
+ 200: {
42240
+ headers: {
42241
+ [name: string]: unknown;
42242
+ };
42243
+ content: {
42244
+ "application/json": {
42245
+ behavior?: unknown;
42246
+ createdAt: string;
42247
+ /** @description Canonical public URL of this surface (MCP, API, A2A, AG-UI, webhook, chat). Null for surface types reached through their own channels (Slack, email, schedule, ...). Clients should use this instead of constructing the URL themselves. */
42248
+ endpoint: string | null;
42249
+ id: string;
42250
+ inbound?: unknown;
42251
+ items: {
42252
+ agentId: string | null;
42253
+ agentType: string | null;
42254
+ cachedSkills: unknown[] | null;
42255
+ capabilityId: string;
42256
+ capabilityName: string | null;
42257
+ config?: unknown;
42258
+ createdAt: string;
42259
+ displayOrder: number | null;
42260
+ enabled: boolean;
42261
+ endpointSlug: string | null;
42262
+ exposedDescription: string | null;
42263
+ exposedName: string | null;
42264
+ flowId: string | null;
42265
+ id: string;
42266
+ isEntryPoint: boolean;
42267
+ parametersSchema?: unknown;
42268
+ }[];
42269
+ keys: {
42270
+ canReveal: boolean;
42271
+ createdAt: string;
42272
+ environment: string;
42273
+ expiresAt: string | null;
42274
+ id: string;
42275
+ isActive: boolean;
42276
+ isDevelopment: boolean;
42277
+ keyHint: string | null;
42278
+ keyPrefix: string;
42279
+ lastUsedAt: string | null;
42280
+ name: string | null;
42281
+ rateLimitPerDay: number | null;
42282
+ rateLimitPerMinute: number | null;
42283
+ scopeTargetIds: string[] | null;
42284
+ scopes: string[];
42285
+ usageCount: number | null;
42286
+ }[];
42287
+ name: string;
42288
+ outbound?: unknown;
42289
+ productId: string;
42290
+ scopeTargets: {
42291
+ capabilityId?: string;
42292
+ id: string;
42293
+ name: string;
42294
+ surfaceItemId?: string;
42295
+ }[];
42296
+ status: string;
42297
+ type: string;
42298
+ updatedAt: string;
42299
+ webhookHealth: components["schemas"]["WebhookHealth"];
42300
+ };
42301
+ };
42302
+ };
42303
+ /** @description Invalid surface ID */
42304
+ 400: {
42305
+ headers: {
42306
+ [name: string]: unknown;
42307
+ };
42308
+ content: {
42309
+ "application/json": components["schemas"]["Error"];
42310
+ };
42311
+ };
42312
+ /** @description Unauthorized */
42313
+ 401: {
42314
+ headers: {
42315
+ [name: string]: unknown;
42316
+ };
42317
+ content: {
42318
+ "application/json": components["schemas"]["Error"];
42319
+ };
42320
+ };
42321
+ /** @description Insufficient permissions */
42322
+ 403: {
42323
+ headers: {
42324
+ [name: string]: unknown;
42325
+ };
42326
+ content: {
42327
+ "application/json": components["schemas"]["Error"];
42328
+ };
42329
+ };
42330
+ /** @description Surface not found */
42331
+ 404: {
42332
+ headers: {
42333
+ [name: string]: unknown;
42334
+ };
42335
+ content: {
42336
+ "application/json": components["schemas"]["Error"];
42337
+ };
42338
+ };
42339
+ /** @description Internal server error */
42340
+ 500: {
42341
+ headers: {
42342
+ [name: string]: unknown;
42343
+ };
42344
+ content: {
42345
+ "application/json": components["schemas"]["Error"];
42346
+ };
42347
+ };
42348
+ };
42349
+ };
42350
+ put?: never;
42351
+ post?: never;
42352
+ delete?: never;
42353
+ options?: never;
42354
+ head?: never;
42355
+ patch?: never;
42356
+ trace?: never;
42357
+ };
42358
+ "/v1/surfaces/{surfaceId}/test-deliveries": {
42359
+ parameters: {
42360
+ query?: never;
42361
+ header?: never;
42362
+ path?: never;
42363
+ cookie?: never;
42364
+ };
42365
+ get?: never;
42366
+ put?: never;
42367
+ /**
42368
+ * Send a provider fixture through a surface’s real ingress
42369
+ * @description Resolve an authorized surface by its globally unique ID and send a provider-native fixture through the same authenticated ingress used by production deliveries.
42370
+ */
42371
+ post: {
42372
+ parameters: {
42373
+ query?: never;
42374
+ header?: never;
42375
+ path: {
42376
+ surfaceId: string;
42377
+ };
42378
+ cookie?: never;
42379
+ };
42380
+ requestBody: {
42381
+ content: {
42382
+ "application/json": {
42383
+ /** @enum {string} */
42384
+ fixture: "github.pull_request.opened" | "github.pull_request.merged_plan";
42385
+ planningPath?: string;
42386
+ pullRequest: number;
42387
+ repeat?: number;
42388
+ repository: string;
42389
+ };
42390
+ };
42391
+ };
42392
+ responses: {
42393
+ /** @description Provider delivery attempts accepted by the surface ingress. */
42394
+ 200: {
42395
+ headers: {
42396
+ [name: string]: unknown;
42397
+ };
42398
+ content: {
42399
+ "application/json": {
42400
+ [key: string]: unknown;
42401
+ };
42402
+ };
42403
+ };
42404
+ /** @description Invalid fixture or repository state. */
42405
+ 400: {
42406
+ headers: {
42407
+ [name: string]: unknown;
42408
+ };
42409
+ content: {
42410
+ "application/json": components["schemas"]["Error"];
42411
+ };
42412
+ };
42413
+ /** @description Authentication required. */
42414
+ 401: {
42415
+ headers: {
42416
+ [name: string]: unknown;
42417
+ };
42418
+ content: {
42419
+ "application/json": components["schemas"]["Error"];
42420
+ };
42421
+ };
42422
+ /** @description Insufficient permissions. */
42423
+ 403: {
42424
+ headers: {
42425
+ [name: string]: unknown;
42426
+ };
42427
+ content: {
42428
+ "application/json": components["schemas"]["Error"];
42429
+ };
42430
+ };
42431
+ /** @description Surface not found. */
42432
+ 404: {
42433
+ headers: {
42434
+ [name: string]: unknown;
42435
+ };
42436
+ content: {
42437
+ "application/json": components["schemas"]["Error"];
42438
+ };
42439
+ };
42440
+ /** @description The surface or provider credential is not ready. */
42441
+ 409: {
42442
+ headers: {
42443
+ [name: string]: unknown;
42444
+ };
42445
+ content: {
42446
+ "application/json": components["schemas"]["Error"];
42447
+ };
42448
+ };
42449
+ /** @description GitHub or the surface ingress rejected the delivery. */
42450
+ 502: {
42451
+ headers: {
42452
+ [name: string]: unknown;
42453
+ };
42454
+ content: {
42455
+ "application/json": components["schemas"]["Error"];
42456
+ };
42457
+ };
42458
+ };
42459
+ };
42460
+ delete?: never;
42461
+ options?: never;
42462
+ head?: never;
42463
+ patch?: never;
42464
+ trace?: never;
42465
+ };
42218
42466
  "/v1/tool-approval-grants": {
42219
42467
  parameters: {
42220
42468
  query?: never;
@@ -44193,6 +44441,91 @@ interface paths {
44193
44441
  patch?: never;
44194
44442
  trace?: never;
44195
44443
  };
44444
+ "/v1/users/onboarding/intent": {
44445
+ parameters: {
44446
+ query?: never;
44447
+ header?: never;
44448
+ path?: never;
44449
+ cookie?: never;
44450
+ };
44451
+ get?: never;
44452
+ put?: never;
44453
+ /**
44454
+ * Set onboarding intent
44455
+ * @description Record what the authenticated user came to Runtype to do (dashboard only). Readable afterwards on GET /v1/auth/me.
44456
+ */
44457
+ post: {
44458
+ parameters: {
44459
+ query?: never;
44460
+ header?: never;
44461
+ path?: never;
44462
+ cookie?: never;
44463
+ };
44464
+ requestBody?: {
44465
+ content: {
44466
+ "application/json": {
44467
+ /** @enum {string} */
44468
+ onboardingIntent: "build_new" | "connect_existing" | "unstated";
44469
+ };
44470
+ };
44471
+ };
44472
+ responses: {
44473
+ /** @description Stored onboarding intent */
44474
+ 200: {
44475
+ headers: {
44476
+ [name: string]: unknown;
44477
+ };
44478
+ content: {
44479
+ "application/json": {
44480
+ /** @enum {string} */
44481
+ onboardingIntent: "build_new" | "connect_existing" | "unstated";
44482
+ };
44483
+ };
44484
+ };
44485
+ /** @description Validation error */
44486
+ 400: {
44487
+ headers: {
44488
+ [name: string]: unknown;
44489
+ };
44490
+ content: {
44491
+ "application/json": components["schemas"]["Error"];
44492
+ };
44493
+ };
44494
+ /** @description Unauthorized */
44495
+ 401: {
44496
+ headers: {
44497
+ [name: string]: unknown;
44498
+ };
44499
+ content: {
44500
+ "application/json": components["schemas"]["Error"];
44501
+ };
44502
+ };
44503
+ /** @description Insufficient permissions */
44504
+ 403: {
44505
+ headers: {
44506
+ [name: string]: unknown;
44507
+ };
44508
+ content: {
44509
+ "application/json": components["schemas"]["Error"];
44510
+ };
44511
+ };
44512
+ /** @description Internal server error */
44513
+ 500: {
44514
+ headers: {
44515
+ [name: string]: unknown;
44516
+ };
44517
+ content: {
44518
+ "application/json": components["schemas"]["Error"];
44519
+ };
44520
+ };
44521
+ };
44522
+ };
44523
+ delete?: never;
44524
+ options?: never;
44525
+ head?: never;
44526
+ patch?: never;
44527
+ trace?: never;
44528
+ };
44196
44529
  "/v1/users/onboarding/reset": {
44197
44530
  parameters: {
44198
44531
  query?: never;
@@ -44300,6 +44633,7 @@ interface paths {
44300
44633
  enableDashboardAssistant: boolean;
44301
44634
  enableEndUserUsageAnalytics: boolean;
44302
44635
  enableMassiveWebRender: boolean;
44636
+ enableOnboardingIntentGate: boolean;
44303
44637
  enableRuntown: boolean;
44304
44638
  enableRuntypeApps: boolean;
44305
44639
  enableSelfServeOauthClients: boolean;
@@ -45111,8 +45445,8 @@ interface components {
45111
45445
  targetKind: "flow" | "agent";
45112
45446
  };
45113
45447
  /** @description Inline flow definition executed per record without saving the flow. */
45114
- BatchFlowDefinition: {
45115
- description?: string;
45448
+ BatchFlowDefinition: ({
45449
+ description?: string | null;
45116
45450
  /** @description Saved-flow identity retained when the definition is a pinned snapshot. */
45117
45451
  id?: string;
45118
45452
  name: string;
@@ -45122,7 +45456,7 @@ interface components {
45122
45456
  }[];
45123
45457
  } & {
45124
45458
  [key: string]: unknown;
45125
- };
45459
+ }) | null;
45126
45460
  /** @description An ad-hoc record processed in place of a saved record. Inline records never touch the records table; each is minted a synthetic id for the lifetime of the batch. */
45127
45461
  BatchInlineRecord: {
45128
45462
  /** @description Arbitrary JSON payload exposed to the flow as {{_record.metadata.*}}. Any shape is accepted; nothing is written to the records table. */
@@ -56116,7 +56450,6 @@ interface Agent {
56116
56450
  name: string;
56117
56451
  description: string | null;
56118
56452
  agentType: string;
56119
- primaryFlowId: string | null;
56120
56453
  config: Record<string, unknown> | null;
56121
56454
  externalConfig: Record<string, unknown> | null;
56122
56455
  createdAt: string;
package/dist/index.d.ts CHANGED
@@ -564,7 +564,6 @@ interface paths {
564
564
  id: string;
565
565
  lastRunAt?: string | null;
566
566
  name: string;
567
- primaryFlowId: string | null;
568
567
  status: string;
569
568
  updatedAt: string;
570
569
  }[];
@@ -977,7 +976,11 @@ interface paths {
977
976
  icon?: string;
978
977
  maxTurns?: number;
979
978
  name: string;
980
- primaryFlowId?: string | null;
979
+ /**
980
+ * @deprecated
981
+ * @description primaryFlowId is retired: primary-flow agents were removed (ADR 0024). Attach the flow to the agent as a runtime tool ({ toolType: 'flow', flowId }) or dispatch the flow directly via POST /v1/dispatch.
982
+ */
983
+ primaryFlowId?: null;
981
984
  };
982
985
  };
983
986
  };
@@ -1026,7 +1029,6 @@ interface paths {
1026
1029
  lastModifiedSource: string | null;
1027
1030
  name: string;
1028
1031
  organizationId: string | null;
1029
- primaryFlowId: string | null;
1030
1032
  publishedVersionId: string | null;
1031
1033
  status: string;
1032
1034
  updatedAt: string;
@@ -1699,11 +1701,6 @@ interface paths {
1699
1701
  lastModifiedSource: string | null;
1700
1702
  name: string;
1701
1703
  organizationId: string | null;
1702
- primaryFlow: {
1703
- id: string;
1704
- name: string;
1705
- } | null;
1706
- primaryFlowId: string | null;
1707
1704
  publishedVersionId: string | null;
1708
1705
  status: string;
1709
1706
  updatedAt: string;
@@ -2107,7 +2104,11 @@ interface paths {
2107
2104
  icon?: string;
2108
2105
  maxTurns?: number;
2109
2106
  name?: string;
2110
- primaryFlowId?: string | null;
2107
+ /**
2108
+ * @deprecated
2109
+ * @description primaryFlowId is retired: primary-flow agents were removed (ADR 0024). Attach the flow to the agent as a runtime tool ({ toolType: 'flow', flowId }) or dispatch the flow directly via POST /v1/dispatch.
2110
+ */
2111
+ primaryFlowId?: null;
2111
2112
  };
2112
2113
  };
2113
2114
  };
@@ -2143,7 +2144,6 @@ interface paths {
2143
2144
  lastModifiedSource: string | null;
2144
2145
  name: string;
2145
2146
  organizationId: string | null;
2146
- primaryFlowId: string | null;
2147
2147
  publishedVersionId: string | null;
2148
2148
  status: string;
2149
2149
  updatedAt: string;
@@ -3567,9 +3567,6 @@ interface paths {
3567
3567
  hostDependencies: components["schemas"]["RuntimeHostDependency"][];
3568
3568
  id: string;
3569
3569
  name: string;
3570
- primaryFlow?: {
3571
- [key: string]: unknown;
3572
- };
3573
3570
  };
3574
3571
  };
3575
3572
  };
@@ -3768,7 +3765,6 @@ interface paths {
3768
3765
  id: string;
3769
3766
  name: string;
3770
3767
  organizationId: string | null;
3771
- primaryFlowId: string | null;
3772
3768
  status: string;
3773
3769
  updatedAt: string;
3774
3770
  userId: string;
@@ -5040,6 +5036,8 @@ interface paths {
5040
5036
  content: {
5041
5037
  "application/json": {
5042
5038
  hasOrganization: boolean;
5039
+ /** @enum {string|null} */
5040
+ onboardingIntent: "build_new" | "connect_existing" | "unstated" | null;
5043
5041
  orgId?: string | null;
5044
5042
  orgRole?: string | null;
5045
5043
  orgSlug?: string | null;
@@ -5245,23 +5243,23 @@ interface paths {
5245
5243
  requestBody?: {
5246
5244
  content: {
5247
5245
  "application/json": {
5248
- /** @description Agent to execute per record instead of a flow. Each record then carries its conversation in metadata.messages. */
5249
- agentId?: string;
5246
+ /** @description Agent to execute per record instead of a flow. Saved records are loaded and their conversation read from metadata.messages; inline records reach the agent only when their type is _agent_eval or _agent_schedule and metadata.messages carries the conversation. Any other inline record type fails per record. */
5247
+ agentId?: string | null;
5250
5248
  flowDefinition?: components["schemas"]["BatchFlowDefinition"];
5251
5249
  /** @description Saved flow to execute per record. One of flowId, flowDefinition, or agentId is required. */
5252
- flowId?: string;
5250
+ flowId?: string | null;
5253
5251
  /** @description Flow input variables applied to every record execution. */
5254
5252
  inputs?: {
5255
5253
  [key: string]: unknown;
5256
- };
5254
+ } | null;
5257
5255
  /** @description Conversation seed passed unchanged to every record execution. Records cannot see each other's history. */
5258
5256
  messages?: ({
5259
5257
  content?: unknown;
5260
5258
  role: string;
5261
5259
  } & {
5262
5260
  [key: string]: unknown;
5263
- })[];
5264
- options?: {
5261
+ })[] | null;
5262
+ options?: ({
5265
5263
  /** @description Records admitted to one processing chunk before progress is flushed and batch gates are re-checked. */
5266
5264
  chunkSize?: number;
5267
5265
  /** @description Flow-wide deadline passed to every per-record flow execution. */
@@ -5282,11 +5280,11 @@ interface paths {
5282
5280
  timeoutMs?: number;
5283
5281
  } & {
5284
5282
  [key: string]: unknown;
5285
- };
5283
+ }) | null;
5286
5284
  /** @description Saved record ids to process. May be combined with records; the batch runs the union. At least one of recordIds or records must be non-empty. Maximum 50000 records per batch across both. */
5287
- recordIds?: string[];
5285
+ recordIds?: string[] | null;
5288
5286
  /** @description Inline records to process without saving them first. May be combined with recordIds. Maximum 50000 records per batch across both. */
5289
- records?: components["schemas"]["BatchInlineRecord"][];
5287
+ records?: components["schemas"]["BatchInlineRecord"][] | null;
5290
5288
  } & {
5291
5289
  [key: string]: unknown;
5292
5290
  };
@@ -7818,7 +7816,7 @@ interface paths {
7818
7816
  };
7819
7817
  /** @description The created (or resumed) client session ID. */
7820
7818
  sessionId: string;
7821
- /** @description The flow or agent this session executes against, resolved server-side. Canonical replacement for `flow.id`, and the exact key to pass as `targetId` when listing or deleting this conversation's history. Matches the value stored on the conversation record, including the case where an agent-only token resolves its agent to a primary flow. Absent only on the data-only Runtype App branch, which is not chat-capable. */
7819
+ /** @description The flow or agent this session executes against, resolved server-side. Canonical replacement for `flow.id`, and the exact key to pass as `targetId` when listing or deleting this conversation's history. Matches the value stored on the conversation record; an agent-only token resolves to its agent id. Absent only on the data-only Runtype App branch, which is not chat-capable. */
7822
7820
  targetId?: string;
7823
7821
  /** @description The browser's anonymous visitor identity. Present when the request opts into visitor history (or supplies a visitor token, identity proof, or conversation id). Authenticates the `/client/conversations*` history routes, which the site-wide client token alone cannot reach. */
7824
7822
  visitor?: {
@@ -42215,6 +42213,256 @@ interface paths {
42215
42213
  patch?: never;
42216
42214
  trace?: never;
42217
42215
  };
42216
+ "/v1/surfaces/{surfaceId}": {
42217
+ parameters: {
42218
+ query?: never;
42219
+ header?: never;
42220
+ path?: never;
42221
+ cookie?: never;
42222
+ };
42223
+ /**
42224
+ * Get surface details
42225
+ * @description Get an authorized surface by its globally unique ID, including items and keys.
42226
+ */
42227
+ get: {
42228
+ parameters: {
42229
+ query?: never;
42230
+ header?: never;
42231
+ path: {
42232
+ surfaceId: string;
42233
+ };
42234
+ cookie?: never;
42235
+ };
42236
+ requestBody?: never;
42237
+ responses: {
42238
+ /** @description Surface details */
42239
+ 200: {
42240
+ headers: {
42241
+ [name: string]: unknown;
42242
+ };
42243
+ content: {
42244
+ "application/json": {
42245
+ behavior?: unknown;
42246
+ createdAt: string;
42247
+ /** @description Canonical public URL of this surface (MCP, API, A2A, AG-UI, webhook, chat). Null for surface types reached through their own channels (Slack, email, schedule, ...). Clients should use this instead of constructing the URL themselves. */
42248
+ endpoint: string | null;
42249
+ id: string;
42250
+ inbound?: unknown;
42251
+ items: {
42252
+ agentId: string | null;
42253
+ agentType: string | null;
42254
+ cachedSkills: unknown[] | null;
42255
+ capabilityId: string;
42256
+ capabilityName: string | null;
42257
+ config?: unknown;
42258
+ createdAt: string;
42259
+ displayOrder: number | null;
42260
+ enabled: boolean;
42261
+ endpointSlug: string | null;
42262
+ exposedDescription: string | null;
42263
+ exposedName: string | null;
42264
+ flowId: string | null;
42265
+ id: string;
42266
+ isEntryPoint: boolean;
42267
+ parametersSchema?: unknown;
42268
+ }[];
42269
+ keys: {
42270
+ canReveal: boolean;
42271
+ createdAt: string;
42272
+ environment: string;
42273
+ expiresAt: string | null;
42274
+ id: string;
42275
+ isActive: boolean;
42276
+ isDevelopment: boolean;
42277
+ keyHint: string | null;
42278
+ keyPrefix: string;
42279
+ lastUsedAt: string | null;
42280
+ name: string | null;
42281
+ rateLimitPerDay: number | null;
42282
+ rateLimitPerMinute: number | null;
42283
+ scopeTargetIds: string[] | null;
42284
+ scopes: string[];
42285
+ usageCount: number | null;
42286
+ }[];
42287
+ name: string;
42288
+ outbound?: unknown;
42289
+ productId: string;
42290
+ scopeTargets: {
42291
+ capabilityId?: string;
42292
+ id: string;
42293
+ name: string;
42294
+ surfaceItemId?: string;
42295
+ }[];
42296
+ status: string;
42297
+ type: string;
42298
+ updatedAt: string;
42299
+ webhookHealth: components["schemas"]["WebhookHealth"];
42300
+ };
42301
+ };
42302
+ };
42303
+ /** @description Invalid surface ID */
42304
+ 400: {
42305
+ headers: {
42306
+ [name: string]: unknown;
42307
+ };
42308
+ content: {
42309
+ "application/json": components["schemas"]["Error"];
42310
+ };
42311
+ };
42312
+ /** @description Unauthorized */
42313
+ 401: {
42314
+ headers: {
42315
+ [name: string]: unknown;
42316
+ };
42317
+ content: {
42318
+ "application/json": components["schemas"]["Error"];
42319
+ };
42320
+ };
42321
+ /** @description Insufficient permissions */
42322
+ 403: {
42323
+ headers: {
42324
+ [name: string]: unknown;
42325
+ };
42326
+ content: {
42327
+ "application/json": components["schemas"]["Error"];
42328
+ };
42329
+ };
42330
+ /** @description Surface not found */
42331
+ 404: {
42332
+ headers: {
42333
+ [name: string]: unknown;
42334
+ };
42335
+ content: {
42336
+ "application/json": components["schemas"]["Error"];
42337
+ };
42338
+ };
42339
+ /** @description Internal server error */
42340
+ 500: {
42341
+ headers: {
42342
+ [name: string]: unknown;
42343
+ };
42344
+ content: {
42345
+ "application/json": components["schemas"]["Error"];
42346
+ };
42347
+ };
42348
+ };
42349
+ };
42350
+ put?: never;
42351
+ post?: never;
42352
+ delete?: never;
42353
+ options?: never;
42354
+ head?: never;
42355
+ patch?: never;
42356
+ trace?: never;
42357
+ };
42358
+ "/v1/surfaces/{surfaceId}/test-deliveries": {
42359
+ parameters: {
42360
+ query?: never;
42361
+ header?: never;
42362
+ path?: never;
42363
+ cookie?: never;
42364
+ };
42365
+ get?: never;
42366
+ put?: never;
42367
+ /**
42368
+ * Send a provider fixture through a surface’s real ingress
42369
+ * @description Resolve an authorized surface by its globally unique ID and send a provider-native fixture through the same authenticated ingress used by production deliveries.
42370
+ */
42371
+ post: {
42372
+ parameters: {
42373
+ query?: never;
42374
+ header?: never;
42375
+ path: {
42376
+ surfaceId: string;
42377
+ };
42378
+ cookie?: never;
42379
+ };
42380
+ requestBody: {
42381
+ content: {
42382
+ "application/json": {
42383
+ /** @enum {string} */
42384
+ fixture: "github.pull_request.opened" | "github.pull_request.merged_plan";
42385
+ planningPath?: string;
42386
+ pullRequest: number;
42387
+ repeat?: number;
42388
+ repository: string;
42389
+ };
42390
+ };
42391
+ };
42392
+ responses: {
42393
+ /** @description Provider delivery attempts accepted by the surface ingress. */
42394
+ 200: {
42395
+ headers: {
42396
+ [name: string]: unknown;
42397
+ };
42398
+ content: {
42399
+ "application/json": {
42400
+ [key: string]: unknown;
42401
+ };
42402
+ };
42403
+ };
42404
+ /** @description Invalid fixture or repository state. */
42405
+ 400: {
42406
+ headers: {
42407
+ [name: string]: unknown;
42408
+ };
42409
+ content: {
42410
+ "application/json": components["schemas"]["Error"];
42411
+ };
42412
+ };
42413
+ /** @description Authentication required. */
42414
+ 401: {
42415
+ headers: {
42416
+ [name: string]: unknown;
42417
+ };
42418
+ content: {
42419
+ "application/json": components["schemas"]["Error"];
42420
+ };
42421
+ };
42422
+ /** @description Insufficient permissions. */
42423
+ 403: {
42424
+ headers: {
42425
+ [name: string]: unknown;
42426
+ };
42427
+ content: {
42428
+ "application/json": components["schemas"]["Error"];
42429
+ };
42430
+ };
42431
+ /** @description Surface not found. */
42432
+ 404: {
42433
+ headers: {
42434
+ [name: string]: unknown;
42435
+ };
42436
+ content: {
42437
+ "application/json": components["schemas"]["Error"];
42438
+ };
42439
+ };
42440
+ /** @description The surface or provider credential is not ready. */
42441
+ 409: {
42442
+ headers: {
42443
+ [name: string]: unknown;
42444
+ };
42445
+ content: {
42446
+ "application/json": components["schemas"]["Error"];
42447
+ };
42448
+ };
42449
+ /** @description GitHub or the surface ingress rejected the delivery. */
42450
+ 502: {
42451
+ headers: {
42452
+ [name: string]: unknown;
42453
+ };
42454
+ content: {
42455
+ "application/json": components["schemas"]["Error"];
42456
+ };
42457
+ };
42458
+ };
42459
+ };
42460
+ delete?: never;
42461
+ options?: never;
42462
+ head?: never;
42463
+ patch?: never;
42464
+ trace?: never;
42465
+ };
42218
42466
  "/v1/tool-approval-grants": {
42219
42467
  parameters: {
42220
42468
  query?: never;
@@ -44193,6 +44441,91 @@ interface paths {
44193
44441
  patch?: never;
44194
44442
  trace?: never;
44195
44443
  };
44444
+ "/v1/users/onboarding/intent": {
44445
+ parameters: {
44446
+ query?: never;
44447
+ header?: never;
44448
+ path?: never;
44449
+ cookie?: never;
44450
+ };
44451
+ get?: never;
44452
+ put?: never;
44453
+ /**
44454
+ * Set onboarding intent
44455
+ * @description Record what the authenticated user came to Runtype to do (dashboard only). Readable afterwards on GET /v1/auth/me.
44456
+ */
44457
+ post: {
44458
+ parameters: {
44459
+ query?: never;
44460
+ header?: never;
44461
+ path?: never;
44462
+ cookie?: never;
44463
+ };
44464
+ requestBody?: {
44465
+ content: {
44466
+ "application/json": {
44467
+ /** @enum {string} */
44468
+ onboardingIntent: "build_new" | "connect_existing" | "unstated";
44469
+ };
44470
+ };
44471
+ };
44472
+ responses: {
44473
+ /** @description Stored onboarding intent */
44474
+ 200: {
44475
+ headers: {
44476
+ [name: string]: unknown;
44477
+ };
44478
+ content: {
44479
+ "application/json": {
44480
+ /** @enum {string} */
44481
+ onboardingIntent: "build_new" | "connect_existing" | "unstated";
44482
+ };
44483
+ };
44484
+ };
44485
+ /** @description Validation error */
44486
+ 400: {
44487
+ headers: {
44488
+ [name: string]: unknown;
44489
+ };
44490
+ content: {
44491
+ "application/json": components["schemas"]["Error"];
44492
+ };
44493
+ };
44494
+ /** @description Unauthorized */
44495
+ 401: {
44496
+ headers: {
44497
+ [name: string]: unknown;
44498
+ };
44499
+ content: {
44500
+ "application/json": components["schemas"]["Error"];
44501
+ };
44502
+ };
44503
+ /** @description Insufficient permissions */
44504
+ 403: {
44505
+ headers: {
44506
+ [name: string]: unknown;
44507
+ };
44508
+ content: {
44509
+ "application/json": components["schemas"]["Error"];
44510
+ };
44511
+ };
44512
+ /** @description Internal server error */
44513
+ 500: {
44514
+ headers: {
44515
+ [name: string]: unknown;
44516
+ };
44517
+ content: {
44518
+ "application/json": components["schemas"]["Error"];
44519
+ };
44520
+ };
44521
+ };
44522
+ };
44523
+ delete?: never;
44524
+ options?: never;
44525
+ head?: never;
44526
+ patch?: never;
44527
+ trace?: never;
44528
+ };
44196
44529
  "/v1/users/onboarding/reset": {
44197
44530
  parameters: {
44198
44531
  query?: never;
@@ -44300,6 +44633,7 @@ interface paths {
44300
44633
  enableDashboardAssistant: boolean;
44301
44634
  enableEndUserUsageAnalytics: boolean;
44302
44635
  enableMassiveWebRender: boolean;
44636
+ enableOnboardingIntentGate: boolean;
44303
44637
  enableRuntown: boolean;
44304
44638
  enableRuntypeApps: boolean;
44305
44639
  enableSelfServeOauthClients: boolean;
@@ -45111,8 +45445,8 @@ interface components {
45111
45445
  targetKind: "flow" | "agent";
45112
45446
  };
45113
45447
  /** @description Inline flow definition executed per record without saving the flow. */
45114
- BatchFlowDefinition: {
45115
- description?: string;
45448
+ BatchFlowDefinition: ({
45449
+ description?: string | null;
45116
45450
  /** @description Saved-flow identity retained when the definition is a pinned snapshot. */
45117
45451
  id?: string;
45118
45452
  name: string;
@@ -45122,7 +45456,7 @@ interface components {
45122
45456
  }[];
45123
45457
  } & {
45124
45458
  [key: string]: unknown;
45125
- };
45459
+ }) | null;
45126
45460
  /** @description An ad-hoc record processed in place of a saved record. Inline records never touch the records table; each is minted a synthetic id for the lifetime of the batch. */
45127
45461
  BatchInlineRecord: {
45128
45462
  /** @description Arbitrary JSON payload exposed to the flow as {{_record.metadata.*}}. Any shape is accepted; nothing is written to the records table. */
@@ -56116,7 +56450,6 @@ interface Agent {
56116
56450
  name: string;
56117
56451
  description: string | null;
56118
56452
  agentType: string;
56119
- primaryFlowId: string | null;
56120
56453
  config: Record<string, unknown> | null;
56121
56454
  externalConfig: Record<string, unknown> | null;
56122
56455
  createdAt: string;
package/dist/index.mjs CHANGED
@@ -6289,7 +6289,7 @@ var Runtype = class {
6289
6289
 
6290
6290
  // src/version.ts
6291
6291
  var FALLBACK_VERSION = "0.0.0";
6292
- var SDK_VERSION = "9.5.0".length > 0 ? "9.5.0" : FALLBACK_VERSION;
6292
+ var SDK_VERSION = "9.6.0".length > 0 ? "9.6.0" : FALLBACK_VERSION;
6293
6293
  var RUNTYPE_CLIENT_KIND = "sdk";
6294
6294
  var SDK_USER_AGENT = `runtype-sdk/${SDK_VERSION} (typescript)`;
6295
6295
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runtypelabs/sdk",
3
- "version": "9.5.0",
3
+ "version": "9.6.0",
4
4
  "type": "module",
5
5
  "description": "TypeScript SDK for the Runtype API with fluent methods. Use it to quickly realize AI products, agents, and workflows.",
6
6
  "main": "dist/index.cjs",