@runtypelabs/sdk 9.13.0 → 9.14.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.d.cts CHANGED
@@ -2711,6 +2711,8 @@ interface paths {
2711
2711
  data: {
2712
2712
  alias: string;
2713
2713
  archivedAt: string | null;
2714
+ /** @description Names of the per-alias secret bindings in force at this pointer. Executions that resolve through it read these ahead of the organization secret of the same name. Names only: a binding value is never returned by any read. */
2715
+ bindingNames: string[];
2714
2716
  contentHash: string | null;
2715
2717
  createdAt: string;
2716
2718
  expiresAt: string | null;
@@ -2813,6 +2815,8 @@ interface paths {
2813
2815
  "application/json": {
2814
2816
  alias: string;
2815
2817
  archivedAt: string | null;
2818
+ /** @description Names of the per-alias secret bindings in force at this pointer. Executions that resolve through it read these ahead of the organization secret of the same name. Names only: a binding value is never returned by any read. */
2819
+ bindingNames: string[];
2816
2820
  contentHash: string | null;
2817
2821
  createdAt: string;
2818
2822
  expiresAt: string | null;
@@ -2916,6 +2920,8 @@ interface paths {
2916
2920
  /** @description How many preview aliases this agent has active after the write. Null for `live`, which is never counted. Read it beside `previewLimit` to see a per-pull-request pipeline filling up before an activation is refused with PREVIEW_ALIAS_LIMIT. */
2917
2921
  activePreviewCount: number | null;
2918
2922
  alias: string;
2923
+ /** @description Per-alias secret binding names in force after this activation. Names only, never values. */
2924
+ bindingNames: string[];
2919
2925
  changed: boolean;
2920
2926
  /** @description The active-preview ceiling this agent is counted against. Null for `live`. */
2921
2927
  previewLimit: number | null;
@@ -3150,6 +3156,344 @@ interface paths {
3150
3156
  patch?: never;
3151
3157
  trace?: never;
3152
3158
  };
3159
+ "/v1/agents/{id}/aliases/{alias}/bindings": {
3160
+ parameters: {
3161
+ query?: never;
3162
+ header?: never;
3163
+ path?: never;
3164
+ cookie?: never;
3165
+ };
3166
+ /**
3167
+ * Read the secret binding names of a release alias
3168
+ * @description The per-alias secret binding NAMES this pointer carries. A binding value is write-only: no read surface returns it, and it never appears on a receipt, an audit envelope or a log line.
3169
+ */
3170
+ get: {
3171
+ parameters: {
3172
+ query?: never;
3173
+ header?: never;
3174
+ path: {
3175
+ id: string;
3176
+ alias: string;
3177
+ };
3178
+ cookie?: never;
3179
+ };
3180
+ requestBody?: never;
3181
+ responses: {
3182
+ /** @description Binding names */
3183
+ 200: {
3184
+ headers: {
3185
+ [name: string]: unknown;
3186
+ };
3187
+ content: {
3188
+ "application/json": {
3189
+ alias: string;
3190
+ /** @description Present on a write: false when the set was already identical and nothing moved. */
3191
+ changed?: boolean;
3192
+ names: string[];
3193
+ /** @description The `bind` receipt this write appended, or null when it changed nothing. */
3194
+ receiptId?: string | null;
3195
+ revision: number;
3196
+ };
3197
+ };
3198
+ };
3199
+ /** @description Invalid request */
3200
+ 400: {
3201
+ headers: {
3202
+ [name: string]: unknown;
3203
+ };
3204
+ content: {
3205
+ "application/json": components["schemas"]["Error"];
3206
+ };
3207
+ };
3208
+ /** @description Unauthorized */
3209
+ 401: {
3210
+ headers: {
3211
+ [name: string]: unknown;
3212
+ };
3213
+ content: {
3214
+ "application/json": components["schemas"]["Error"];
3215
+ };
3216
+ };
3217
+ /** @description Insufficient permissions */
3218
+ 403: {
3219
+ headers: {
3220
+ [name: string]: unknown;
3221
+ };
3222
+ content: {
3223
+ "application/json": components["schemas"]["Error"];
3224
+ };
3225
+ };
3226
+ /** @description Alias or agent not found */
3227
+ 404: {
3228
+ headers: {
3229
+ [name: string]: unknown;
3230
+ };
3231
+ content: {
3232
+ "application/json": components["schemas"]["Error"] & {
3233
+ agentId: string;
3234
+ alias: string;
3235
+ /** @enum {string} */
3236
+ code: "alias_not_found";
3237
+ };
3238
+ };
3239
+ };
3240
+ /** @description Internal server error */
3241
+ 500: {
3242
+ headers: {
3243
+ [name: string]: unknown;
3244
+ };
3245
+ content: {
3246
+ "application/json": components["schemas"]["Error"];
3247
+ };
3248
+ };
3249
+ };
3250
+ };
3251
+ /**
3252
+ * Replace the secret bindings of a release alias
3253
+ * @description Replace the complete set of `{{secret:NAME}}` values executions resolve when they reach this agent through this pointer. A binding wins over the organization secret of the same name, so one preview per pull request can aim its HTTP tools at that pull request environment while the version content stays byte-identical to what `live` runs. Whole-set replacement: a name you stop sending stops resolving. Values are encrypted at rest and never returned. Names beginning RUNTYPE_, PLATFORM_, CLOUDFLARE_ or INTERNAL_ are refused because they are platform-resolved before the alias plane. A change bumps the alias revision and appends a `bind` receipt; an identical set writes nothing. Requires the same deploy scope as activating this alias.
3254
+ */
3255
+ put: {
3256
+ parameters: {
3257
+ query?: never;
3258
+ header?: {
3259
+ /** @description The alias revision this write expects. Required on a `live` alias that already exists (428 without it) and refused with 412 when the stored revision has moved on. Optional on preview aliases and on the first `live` deployment, which has no revision yet. */
3260
+ "if-match"?: string;
3261
+ /** @description Replay key. Repeating an activation with the same key returns the receipt the first call produced instead of moving the pointer twice. */
3262
+ "idempotency-key"?: string;
3263
+ };
3264
+ path: {
3265
+ id: string;
3266
+ alias: string;
3267
+ };
3268
+ cookie?: never;
3269
+ };
3270
+ requestBody?: {
3271
+ content: {
3272
+ "application/json": {
3273
+ /** @description The complete binding set, NAME to value. An empty object clears every binding. */
3274
+ bindings: {
3275
+ [key: string]: string;
3276
+ };
3277
+ /** @description Why this binding write happened, recorded on the receipt for humans. */
3278
+ reason?: string;
3279
+ };
3280
+ };
3281
+ };
3282
+ responses: {
3283
+ /** @description Bindings replaced */
3284
+ 200: {
3285
+ headers: {
3286
+ [name: string]: unknown;
3287
+ };
3288
+ content: {
3289
+ "application/json": {
3290
+ alias: string;
3291
+ /** @description Present on a write: false when the set was already identical and nothing moved. */
3292
+ changed?: boolean;
3293
+ names: string[];
3294
+ /** @description The `bind` receipt this write appended, or null when it changed nothing. */
3295
+ receiptId?: string | null;
3296
+ revision: number;
3297
+ };
3298
+ };
3299
+ };
3300
+ /** @description Binding name or value rejected */
3301
+ 400: {
3302
+ headers: {
3303
+ [name: string]: unknown;
3304
+ };
3305
+ content: {
3306
+ "application/json": components["schemas"]["Error"] & {
3307
+ /** @enum {string} */
3308
+ code: "alias_binding_invalid";
3309
+ };
3310
+ };
3311
+ };
3312
+ /** @description Unauthorized */
3313
+ 401: {
3314
+ headers: {
3315
+ [name: string]: unknown;
3316
+ };
3317
+ content: {
3318
+ "application/json": components["schemas"]["Error"];
3319
+ };
3320
+ };
3321
+ /** @description Insufficient permissions */
3322
+ 403: {
3323
+ headers: {
3324
+ [name: string]: unknown;
3325
+ };
3326
+ content: {
3327
+ "application/json": components["schemas"]["Error"];
3328
+ };
3329
+ };
3330
+ /** @description Alias or agent not found */
3331
+ 404: {
3332
+ headers: {
3333
+ [name: string]: unknown;
3334
+ };
3335
+ content: {
3336
+ "application/json": components["schemas"]["Error"] & {
3337
+ agentId: string;
3338
+ alias: string;
3339
+ /** @enum {string} */
3340
+ code: "alias_not_found";
3341
+ };
3342
+ };
3343
+ };
3344
+ /** @description Alias revision mismatch */
3345
+ 412: {
3346
+ headers: {
3347
+ [name: string]: unknown;
3348
+ };
3349
+ content: {
3350
+ "application/json": components["schemas"]["Error"] & {
3351
+ actual: number | null;
3352
+ /** @enum {string} */
3353
+ code: "alias_revision_mismatch";
3354
+ expected: number;
3355
+ };
3356
+ };
3357
+ };
3358
+ /** @description If-Match required for the live alias */
3359
+ 428: {
3360
+ headers: {
3361
+ [name: string]: unknown;
3362
+ };
3363
+ content: {
3364
+ "application/json": components["schemas"]["Error"];
3365
+ };
3366
+ };
3367
+ /** @description Internal server error */
3368
+ 500: {
3369
+ headers: {
3370
+ [name: string]: unknown;
3371
+ };
3372
+ content: {
3373
+ "application/json": components["schemas"]["Error"];
3374
+ };
3375
+ };
3376
+ };
3377
+ };
3378
+ post?: never;
3379
+ /**
3380
+ * Clear the secret bindings of a release alias
3381
+ * @description Remove every per-alias secret binding from this pointer, so its executions fall back to the organization secrets. Equivalent to replacing the set with an empty object.
3382
+ */
3383
+ delete: {
3384
+ parameters: {
3385
+ query?: never;
3386
+ header?: {
3387
+ /** @description The alias revision this write expects. Required on a `live` alias that already exists (428 without it) and refused with 412 when the stored revision has moved on. Optional on preview aliases and on the first `live` deployment, which has no revision yet. */
3388
+ "if-match"?: string;
3389
+ /** @description Replay key. Repeating an activation with the same key returns the receipt the first call produced instead of moving the pointer twice. */
3390
+ "idempotency-key"?: string;
3391
+ };
3392
+ path: {
3393
+ id: string;
3394
+ alias: string;
3395
+ };
3396
+ cookie?: never;
3397
+ };
3398
+ requestBody?: never;
3399
+ responses: {
3400
+ /** @description Bindings cleared */
3401
+ 200: {
3402
+ headers: {
3403
+ [name: string]: unknown;
3404
+ };
3405
+ content: {
3406
+ "application/json": {
3407
+ alias: string;
3408
+ /** @description Present on a write: false when the set was already identical and nothing moved. */
3409
+ changed?: boolean;
3410
+ names: string[];
3411
+ /** @description The `bind` receipt this write appended, or null when it changed nothing. */
3412
+ receiptId?: string | null;
3413
+ revision: number;
3414
+ };
3415
+ };
3416
+ };
3417
+ /** @description Invalid request */
3418
+ 400: {
3419
+ headers: {
3420
+ [name: string]: unknown;
3421
+ };
3422
+ content: {
3423
+ "application/json": components["schemas"]["Error"];
3424
+ };
3425
+ };
3426
+ /** @description Unauthorized */
3427
+ 401: {
3428
+ headers: {
3429
+ [name: string]: unknown;
3430
+ };
3431
+ content: {
3432
+ "application/json": components["schemas"]["Error"];
3433
+ };
3434
+ };
3435
+ /** @description Insufficient permissions */
3436
+ 403: {
3437
+ headers: {
3438
+ [name: string]: unknown;
3439
+ };
3440
+ content: {
3441
+ "application/json": components["schemas"]["Error"];
3442
+ };
3443
+ };
3444
+ /** @description Alias or agent not found */
3445
+ 404: {
3446
+ headers: {
3447
+ [name: string]: unknown;
3448
+ };
3449
+ content: {
3450
+ "application/json": components["schemas"]["Error"] & {
3451
+ agentId: string;
3452
+ alias: string;
3453
+ /** @enum {string} */
3454
+ code: "alias_not_found";
3455
+ };
3456
+ };
3457
+ };
3458
+ /** @description Alias revision mismatch */
3459
+ 412: {
3460
+ headers: {
3461
+ [name: string]: unknown;
3462
+ };
3463
+ content: {
3464
+ "application/json": components["schemas"]["Error"] & {
3465
+ actual: number | null;
3466
+ /** @enum {string} */
3467
+ code: "alias_revision_mismatch";
3468
+ expected: number;
3469
+ };
3470
+ };
3471
+ };
3472
+ /** @description If-Match required for the live alias */
3473
+ 428: {
3474
+ headers: {
3475
+ [name: string]: unknown;
3476
+ };
3477
+ content: {
3478
+ "application/json": components["schemas"]["Error"];
3479
+ };
3480
+ };
3481
+ /** @description Internal server error */
3482
+ 500: {
3483
+ headers: {
3484
+ [name: string]: unknown;
3485
+ };
3486
+ content: {
3487
+ "application/json": components["schemas"]["Error"];
3488
+ };
3489
+ };
3490
+ };
3491
+ };
3492
+ options?: never;
3493
+ head?: never;
3494
+ patch?: never;
3495
+ trace?: never;
3496
+ };
3153
3497
  "/v1/agents/{id}/aliases/{alias}/rollback": {
3154
3498
  parameters: {
3155
3499
  query?: never;
@@ -3198,6 +3542,8 @@ interface paths {
3198
3542
  /** @description How many preview aliases this agent has active after the write. Null for `live`, which is never counted. Read it beside `previewLimit` to see a per-pull-request pipeline filling up before an activation is refused with PREVIEW_ALIAS_LIMIT. */
3199
3543
  activePreviewCount: number | null;
3200
3544
  alias: string;
3545
+ /** @description Per-alias secret binding names in force after this activation. Names only, never values. */
3546
+ bindingNames: string[];
3201
3547
  changed: boolean;
3202
3548
  /** @description The active-preview ceiling this agent is counted against. Null for `live`. */
3203
3549
  previewLimit: number | null;
@@ -3761,6 +4107,10 @@ interface paths {
3761
4107
  actorUserId: string | null;
3762
4108
  alias: string;
3763
4109
  aliasRevision: number;
4110
+ /** @description The per-alias secret binding NAMES in force when this receipt was written, as `{ names: [...] }`. Null when the pointer carried none. Values never appear here. */
4111
+ bindings: {
4112
+ [key: string]: unknown;
4113
+ } | null;
3764
4114
  createdAt: string;
3765
4115
  dependencies: {
3766
4116
  [key: string]: unknown;
@@ -4701,7 +5051,7 @@ interface paths {
4701
5051
  };
4702
5052
  /**
4703
5053
  * Export agent for runtime
4704
- * @description Export a fully-resolved, self-contained agent definition that the @runtypelabs/runtime package can consume directly at boot. Capabilities, flows, and nested sub-agents are inlined recursively (up to 3 levels). MCP credential values and external-agent auth credentials are replaced with secret-name references.
5054
+ * @description Export a fully-resolved, self-contained agent definition that the @runtypelabs/runtime package can consume directly at boot. Capabilities, flows, and nested sub-agents are inlined recursively (up to 3 levels). MCP credential values and external-agent auth credentials are replaced with secret-name references. Requires the `RUNTIME:EXPORT` scope and an Enterprise plan (the `byoc` entitlement); an unentitled account receives `403` with code `BYOC_PLAN_REQUIRED` in every environment.
4705
5055
  *
4706
5056
  * The response carries `hostDependencies`: the runtime seams the exported artifact needs a host to wire before it can run everything it describes. A durable-class step (`wait-until` or `crawl`) anywhere in the agent's executable closure declares a `durable-pause-host` dependency; a detached-capable dynamic subagent pool or a detached inline subagent tool declares a `background-run-coordinator` dependency. The array is empty when nothing needs wiring.
4707
5057
  */
@@ -12650,6 +13000,11 @@ interface paths {
12650
13000
  name?: string;
12651
13001
  steps?: unknown[];
12652
13002
  };
13003
+ /**
13004
+ * @description Where this turn's prior history comes from. "inline" (the default, and today's behavior) replays exactly the `messages` sent here. "stored" replays the transcript saved on the `conversationId` conversation, treats `messages` as the new delta, and appends both the delta and the settled assistant turn back onto it; it requires a saved `agent.agentId` and a `conversationId`, and is refused for a flow dispatch, an inline or `claude_managed` agent, `Prefer: respond-async`, a join, or a resume.
13005
+ * @enum {string}
13006
+ */
13007
+ history?: "inline" | "stored";
12653
13008
  /** @description Customer-native auth proof for the Identity Exchange. When present and the surface has a matching integration, the verified tenant/end-user replace any body-asserted tenant/endUser (which are never trusted for web-embedded callers). When Identity Exchange admission is disabled for the caller, the proof is accepted but ignored and confers no trust. */
12654
13009
  identityProof?: {
12655
13010
  provider: string;
@@ -12658,7 +13013,7 @@ interface paths {
12658
13013
  inputs?: {
12659
13014
  [key: string]: unknown;
12660
13015
  };
12661
- /** @description Conversation history for this turn. A `system` message that is not the first message keeps its position on OpenAI-family models (so a per-turn system message sent last leaves the cached leading prompt untouched) and is folded into the leading system prompt on providers that require a single leading system turn. */
13016
+ /** @description Conversation history for this turn, or with `history: "stored"` only the new delta. A `system` message that is not the first message keeps its position on OpenAI-family models (so a per-turn system message sent last leaves the cached leading prompt untouched) and is folded into the leading system prompt on providers that require a single leading system turn. A `tool` message must carry `toolResults` answering an assistant `toolCalls` entry issued earlier in the array. */
12662
13017
  messages?: {
12663
13018
  content: string | ({
12664
13019
  text: string;
@@ -12684,7 +13039,30 @@ interface paths {
12684
13039
  type: "reasoning";
12685
13040
  })[];
12686
13041
  /** @enum {string} */
12687
- role: "system" | "user" | "assistant";
13042
+ role: "system" | "user" | "assistant" | "tool";
13043
+ /** @description Assistant messages only. Every entry must be answered by the next tool message. */
13044
+ toolCalls?: {
13045
+ /** @default {} */
13046
+ args?: {
13047
+ [key: string]: unknown;
13048
+ };
13049
+ providerOptions?: {
13050
+ [key: string]: unknown;
13051
+ };
13052
+ toolCallId: string;
13053
+ toolName: string;
13054
+ }[];
13055
+ /** @description Tool messages only, and required on them. */
13056
+ toolResults?: {
13057
+ providerOptions?: {
13058
+ [key: string]: unknown;
13059
+ };
13060
+ /** @description Whatever the tool returned. */
13061
+ result?: unknown;
13062
+ /** @description Must answer a toolCalls entry issued earlier. */
13063
+ toolCallId: string;
13064
+ toolName: string;
13065
+ }[];
12688
13066
  }[];
12689
13067
  /**
12690
13068
  * @default {
@@ -13070,6 +13448,11 @@ interface paths {
13070
13448
  name?: string;
13071
13449
  steps?: unknown[];
13072
13450
  };
13451
+ /**
13452
+ * @description Where this turn's prior history comes from. "inline" (the default, and today's behavior) replays exactly the `messages` sent here. "stored" replays the transcript saved on the `conversationId` conversation, treats `messages` as the new delta, and appends both the delta and the settled assistant turn back onto it; it requires a saved `agent.agentId` and a `conversationId`, and is refused for a flow dispatch, an inline or `claude_managed` agent, `Prefer: respond-async`, a join, or a resume.
13453
+ * @enum {string}
13454
+ */
13455
+ history?: "inline" | "stored";
13073
13456
  /** @description Customer-native auth proof for the Identity Exchange. When present and the surface has a matching integration, the verified tenant/end-user replace any body-asserted tenant/endUser (which are never trusted for web-embedded callers). When Identity Exchange admission is disabled for the caller, the proof is accepted but ignored and confers no trust. */
13074
13457
  identityProof?: {
13075
13458
  provider: string;
@@ -13078,7 +13461,7 @@ interface paths {
13078
13461
  inputs?: {
13079
13462
  [key: string]: unknown;
13080
13463
  };
13081
- /** @description Conversation history for this turn. A `system` message that is not the first message keeps its position on OpenAI-family models (so a per-turn system message sent last leaves the cached leading prompt untouched) and is folded into the leading system prompt on providers that require a single leading system turn. */
13464
+ /** @description Conversation history for this turn, or with `history: "stored"` only the new delta. A `system` message that is not the first message keeps its position on OpenAI-family models (so a per-turn system message sent last leaves the cached leading prompt untouched) and is folded into the leading system prompt on providers that require a single leading system turn. A `tool` message must carry `toolResults` answering an assistant `toolCalls` entry issued earlier in the array. */
13082
13465
  messages?: {
13083
13466
  content: string | ({
13084
13467
  text: string;
@@ -13104,7 +13487,30 @@ interface paths {
13104
13487
  type: "reasoning";
13105
13488
  })[];
13106
13489
  /** @enum {string} */
13107
- role: "system" | "user" | "assistant";
13490
+ role: "system" | "user" | "assistant" | "tool";
13491
+ /** @description Assistant messages only. Every entry must be answered by the next tool message. */
13492
+ toolCalls?: {
13493
+ /** @default {} */
13494
+ args?: {
13495
+ [key: string]: unknown;
13496
+ };
13497
+ providerOptions?: {
13498
+ [key: string]: unknown;
13499
+ };
13500
+ toolCallId: string;
13501
+ toolName: string;
13502
+ }[];
13503
+ /** @description Tool messages only, and required on them. */
13504
+ toolResults?: {
13505
+ providerOptions?: {
13506
+ [key: string]: unknown;
13507
+ };
13508
+ /** @description Whatever the tool returned. */
13509
+ result?: unknown;
13510
+ /** @description Must answer a toolCalls entry issued earlier. */
13511
+ toolCallId: string;
13512
+ toolName: string;
13513
+ }[];
13108
13514
  }[];
13109
13515
  /**
13110
13516
  * @default {
@@ -27322,6 +27728,11 @@ interface paths {
27322
27728
  inputCostPer1kTokens: number;
27323
27729
  /** @default 4096 */
27324
27730
  maxOutputTokens?: number;
27731
+ /**
27732
+ * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
27733
+ * @enum {string}
27734
+ */
27735
+ midConversationSystemMessages?: "preserve" | "hoist";
27325
27736
  outputCostPer1kTokens: number;
27326
27737
  reasoning?: {
27327
27738
  defaultEffort?: string;
@@ -27988,6 +28399,11 @@ interface paths {
27988
28399
  inputCostPer1kTokens: number;
27989
28400
  /** @default 4096 */
27990
28401
  maxOutputTokens?: number;
28402
+ /**
28403
+ * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
28404
+ * @enum {string}
28405
+ */
28406
+ midConversationSystemMessages?: "preserve" | "hoist";
27991
28407
  outputCostPer1kTokens: number;
27992
28408
  reasoning?: {
27993
28409
  defaultEffort?: string;
@@ -36364,6 +36780,11 @@ interface paths {
36364
36780
  id: string;
36365
36781
  inputCostPer1kTokens?: number;
36366
36782
  maxOutputTokens?: number;
36783
+ /**
36784
+ * @description Where a system message that follows a conversation turn lands on this endpoint. Omitted keeps it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); "hoist" folds it for any endpoint whose chat template rejects a non-leading system role.
36785
+ * @enum {string}
36786
+ */
36787
+ midConversationSystemMessages?: "preserve" | "hoist";
36367
36788
  outputCostPer1kTokens?: number;
36368
36789
  reasoning?: {
36369
36790
  defaultEffort?: string;
@@ -47403,6 +47824,10 @@ interface components {
47403
47824
  /** @description Atomically save this definition and activate it at a release alias. Use { alias: "live" } to deploy to production, or any name matching ^[a-z0-9][a-z0-9-]{0,62}$ for a preview pointer. A non-live alias appends a candidate version and moves that one pointer: it never writes the agent row, its config hash, its capabilities, its draft pointer or its live pointer, so onConflict and expectedRemoteHash describe writes it never performs and are rejected with a 400 alongside it. A release alias is organization-owned, so a non-live deploy on a personal-scope agent is a 400 with code alias_requires_organization. Mutually exclusive with release. */
47404
47825
  AgentEnsureDeployTarget: {
47405
47826
  alias: string;
47827
+ /** @description The complete set of `{{secret:NAME}}` values executions resolve when they reach this agent through this pointer, ahead of the organization secret of the same name. One preview per pull request can aim its HTTP tools at that pull request environment while the version content stays byte-identical to what `live` runs. Whole-set replacement: a name you stop sending stops resolving, and an empty object clears them. Values are encrypted at rest and never returned; only their names appear on the deployment receipt. */
47828
+ bindings?: {
47829
+ [key: string]: string;
47830
+ };
47406
47831
  };
47407
47832
  /** @description Present when the converge carried release or deploy and the activation was applied. */
47408
47833
  AgentEnsureDeployment: {
@@ -47915,7 +48340,7 @@ interface components {
47915
48340
  };
47916
48341
  /** @description Import provenance, stored as metadata.importSource. */
47917
48342
  ConversationSource: {
47918
- /** @description The conversation id in the source system. */
48343
+ /** @description The conversation id in the source system. Re-creating with the same system and externalId returns the existing conversation with imported: false instead of a duplicate. */
47919
48344
  externalId?: string;
47920
48345
  /** Format: date-time */
47921
48346
  importedAt?: string;
@@ -47924,6 +48349,7 @@ interface components {
47924
48349
  };
47925
48350
  ConversationTranscriptMessage: {
47926
48351
  author?: components["schemas"]["ConversationMessageAuthor"];
48352
+ /** @description Plain string, or an array of {type:"text"|"image"|"file"|"reasoning"|"asset_ref"} parts. */
47927
48353
  content: string | (({
47928
48354
  text: string;
47929
48355
  /** @enum {string} */
@@ -47967,12 +48393,14 @@ interface components {
47967
48393
  })[];
47968
48394
  /** @description ISO 8601 when Runtype mints it; any string is accepted on import. */
47969
48395
  createdAt?: string;
48396
+ /** @description Minted when omitted. Use the source system id to make an import resumable. */
47970
48397
  id?: string;
47971
48398
  metadata?: {
47972
48399
  [key: string]: unknown;
47973
48400
  };
47974
48401
  /** @enum {string} */
47975
48402
  role: "system" | "user" | "assistant" | "tool";
48403
+ /** @description Assistant messages only. Every entry must be answered by the next tool message. */
47976
48404
  toolCalls?: {
47977
48405
  /** @default {} */
47978
48406
  args: {
@@ -47984,11 +48412,14 @@ interface components {
47984
48412
  toolCallId: string;
47985
48413
  toolName: string;
47986
48414
  }[];
48415
+ /** @description Tool messages only, and required on them. */
47987
48416
  toolResults?: {
47988
48417
  providerOptions?: {
47989
48418
  [key: string]: unknown;
47990
48419
  };
48420
+ /** @description Whatever the tool returned. */
47991
48421
  result?: unknown;
48422
+ /** @description Must answer a toolCalls entry issued earlier. */
47992
48423
  toolCallId: string;
47993
48424
  toolName: string;
47994
48425
  }[];
@@ -50102,6 +50533,8 @@ type OrganizationAgentAliasList = paths['/v1/agent-aliases']['get']['responses']
50102
50533
  type OrganizationAgentAlias = OrganizationAgentAliasList['data'][number];
50103
50534
  /** What activating or rolling back a pointer reports back. */
50104
50535
  type AgentAliasActivation = paths['/v1/agents/{id}/aliases/{alias}']['put']['responses'][200]['content']['application/json'];
50536
+ /** The per-alias secret binding NAMES a pointer carries. Values are write-only. */
50537
+ type AgentAliasBindings = paths['/v1/agents/{id}/aliases/{alias}/bindings']['get']['responses'][200]['content']['application/json'];
50105
50538
  /** What archiving a pointer reports back. */
50106
50539
  type AgentAliasArchived = paths['/v1/agents/{id}/aliases/{alias}']['delete']['responses'][200]['content']['application/json'];
50107
50540
  /** One append-only deployment receipt. */
@@ -51724,6 +52157,12 @@ interface ProviderKeyModel {
51724
52157
  supported: boolean;
51725
52158
  defaultEffort?: string;
51726
52159
  };
52160
+ /**
52161
+ * Where a `system` message that follows a conversation turn lands on this endpoint. Omitted keeps
52162
+ * it at its position (Mistral- and Gemma-family ids fold it into the leading prompt); `hoist` folds
52163
+ * it for an endpoint whose chat template rejects a non-leading system role.
52164
+ */
52165
+ midConversationSystemMessages?: 'preserve' | 'hoist';
51727
52166
  }
51728
52167
  /** Content part types for multi-modal messages */
51729
52168
  interface TextContentPart {
@@ -51941,8 +52380,7 @@ type DispatchRecordInput = Omit<NonNullable<GeneratedDispatchRequest['record']>,
51941
52380
  };
51942
52381
  type DispatchRequestEnvelope = Omit<CanonicalDispatchRequestEnvelope, 'record' | 'messages' | 'clientTools'> & {
51943
52382
  record?: DispatchRecordInput;
51944
- messages?: Array<{
51945
- role: 'system' | 'user' | 'assistant';
52383
+ messages?: Array<Omit<NonNullable<GeneratedDispatchRequest['messages']>[number], 'content'> & {
51946
52384
  content: DispatchMessageContent;
51947
52385
  }>;
51948
52386
  /**
@@ -55613,6 +56051,15 @@ interface RollbackAgentAliasInput {
55613
56051
  revision?: number;
55614
56052
  reason?: string;
55615
56053
  }
56054
+ interface SetAgentAliasBindingsInput {
56055
+ /** The complete set, NAME to value. An empty object clears every binding. */
56056
+ bindings: Record<string, string>;
56057
+ revision?: number;
56058
+ reason?: string;
56059
+ }
56060
+ interface ClearAgentAliasBindingsInput {
56061
+ revision?: number;
56062
+ }
55616
56063
  /**
55617
56064
  * One pointer an {@link AgentAliasesNamespace.archiveEverywhere} pass could not
55618
56065
  * archive. A stale revision (412) or a concurrent archive (404) is reported
@@ -55684,6 +56131,16 @@ declare class AgentAliasesNamespace {
55684
56131
  archive(agentId: string, alias: string, input?: ArchiveAgentAliasInput): Promise<AgentAliasArchived>;
55685
56132
  /** Re-aim a pointer at the version its receipt history records before this one. */
55686
56133
  rollback(agentId: string, alias: string, input?: RollbackAgentAliasInput): Promise<AgentAliasActivation>;
56134
+ /** The per-alias secret binding NAMES this pointer carries. Values are write-only. */
56135
+ getBindings(agentId: string, alias: string): Promise<AgentAliasBindings>;
56136
+ /**
56137
+ * Replace the complete set of `{{secret:NAME}}` values executions resolve
56138
+ * when they reach this agent through this pointer, ahead of the organization
56139
+ * secret of the same name. A name you stop sending stops resolving.
56140
+ */
56141
+ setBindings(agentId: string, alias: string, input: SetAgentAliasBindingsInput): Promise<AgentAliasBindings>;
56142
+ /** Drop every binding, so this pointer's executions fall back to organization secrets. */
56143
+ clearBindings(agentId: string, alias: string, input?: ClearAgentAliasBindingsInput): Promise<AgentAliasBindings>;
55687
56144
  private run;
55688
56145
  }
55689
56146
  /**
@@ -55881,6 +56338,13 @@ interface EnsureAgentOptions {
55881
56338
  */
55882
56339
  deploy?: {
55883
56340
  alias: string;
56341
+ /**
56342
+ * The complete set of `{{secret:NAME}}` values executions resolve when they
56343
+ * reach this agent through this pointer, ahead of the organization secret
56344
+ * of the same name. Whole-set replacement; an empty object clears them.
56345
+ * Values are write-only and never returned.
56346
+ */
56347
+ bindings?: Record<string, string>;
55884
56348
  };
55885
56349
  /**
55886
56350
  * TOCTOU guard binding a dry run to its apply: the write only proceeds if