@runtypelabs/sdk 10.13.7 → 10.14.1

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
@@ -126,7 +126,7 @@ interface paths {
126
126
  };
127
127
  /**
128
128
  * Identity assertion signing keys (JWKS)
129
- * @description Public keys that verify the Runtype-signed `{{_identity.token}}` a tool call carries. Verify offline: check the ES256 signature against the key whose `kid` matches the token header, then `iss` (pin it to the one Runtype organization you trust: `<API origin>/orgs/<organizationId>`), `aud` (your host), `exp`, and the per-scope assurance in the `runtype` claim. Cache the response for up to five minutes; re-fetch when a token names an unknown `kid`.
129
+ * @description Public keys that verify the Runtype-signed `{{_identity.token}}` a tool call carries. Verify offline: check the ES256 signature against the key whose `kid` matches the token header, then the header `typ` (`runtype-identity+jwt`), `iss` (pin it to the one Runtype organization you trust: `<API origin>/orgs/<organizationId>`), `aud` (your host), `exp`, and the per-scope assurance in the `runtype` claim. The same keys sign agent access tokens (`typ: at+jwt`) under the separate issuer `<API origin>/orgs/<organizationId>/agents`; accept those only if you pin that issuer explicitly. Cache the response for up to five minutes; re-fetch when a token names an unknown `kid`.
130
130
  */
131
131
  get: {
132
132
  parameters: {
@@ -156,6 +156,54 @@ interface paths {
156
156
  patch?: never;
157
157
  trace?: never;
158
158
  };
159
+ "/.well-known/oauth-authorization-server/orgs/{organizationId}/agents": {
160
+ parameters: {
161
+ query?: never;
162
+ header?: never;
163
+ path?: never;
164
+ cookie?: never;
165
+ };
166
+ /**
167
+ * Agent issuer metadata
168
+ * @description RFC 8414 authorization server metadata for the agents issuer of one organization. A resource server that accepts agent tokens pins this `issuer`, verifies against `jwks_uri`, and checks `typ: at+jwt` and `aud`.
169
+ */
170
+ get: {
171
+ parameters: {
172
+ query?: never;
173
+ header?: never;
174
+ path: {
175
+ organizationId: string;
176
+ };
177
+ cookie?: never;
178
+ };
179
+ requestBody?: never;
180
+ responses: {
181
+ /** @description The issuer metadata. */
182
+ 200: {
183
+ headers: {
184
+ [name: string]: unknown;
185
+ };
186
+ content: {
187
+ "application/json": components["schemas"]["AgentIssuerMetadata"];
188
+ };
189
+ };
190
+ /** @description Agent tokens are not available for this organization. */
191
+ 404: {
192
+ headers: {
193
+ [name: string]: unknown;
194
+ };
195
+ content?: never;
196
+ };
197
+ };
198
+ };
199
+ put?: never;
200
+ post?: never;
201
+ delete?: never;
202
+ options?: never;
203
+ head?: never;
204
+ patch?: never;
205
+ trace?: never;
206
+ };
159
207
  "/v1/agent-aliases": {
160
208
  parameters: {
161
209
  query?: never;
@@ -2237,7 +2285,7 @@ interface paths {
2237
2285
  };
2238
2286
  /**
2239
2287
  * Update agent
2240
- * @description Update an existing agent. Supports partial updates — only provided fields are changed. Both config and externalConfig are merged onto the stored values, so a partial write preserves keys it omits (notably externalConfig.protocol and externalConfig.cachedAgentCard). To REMOVE a value, send it explicitly as null: a null field clears that field, and externalConfig: null clears the whole object. Nested values replace atomically — sending auth replaces the entire auth block, so switching auth type cannot reuse the previous credential. Agent management responses return a configured auth.credentials value as <redacted>; echoing that placeholder on an update preserves the stored credential only when auth.type is unchanged. Repointing an external agent (endpoint, agentCardUrl or protocol) discards the cached agent card, which is re-fetched by POST /agents/{id}/refresh-agent-card. Moving externalConfig.endpoint to a different host additionally requires re-sending externalConfig.auth: a stored credential is never carried to a host it was not configured against, so a repoint that omits auth is rejected with 400.
2288
+ * @description Update an existing agent. Supports partial updates — only provided fields are changed. Both config and externalConfig are merged onto the stored values, so a partial write preserves keys it omits (notably externalConfig.protocol and externalConfig.cachedAgentCard). To REMOVE a value, send it explicitly as null: a null field clears that field, and externalConfig: null clears the whole object. Nested values replace atomically — sending auth replaces the entire auth block, so switching auth type cannot reuse the previous credential. Agent management responses return a configured auth.credentials value as <redacted>; echoing that placeholder on an update preserves the stored credential only when auth.type is unchanged. Repointing an A2A external agent (endpoint, agentCardUrl, protocol, transport or deviceId) re-fetches and caches the agent card from its new location, as create does, and rejects the update with 400 or 502 when no card can be fetched; an explicitly sent cachedAgentCard is kept as sent, and switching to the runtype-stream protocol discards the card. Moving externalConfig.endpoint to a different host additionally requires re-sending externalConfig.auth: a stored credential is never carried to a host it was not configured against, so a repoint that omits auth is rejected with 400.
2241
2289
  */
2242
2290
  put: {
2243
2291
  parameters: {
@@ -4288,6 +4336,345 @@ interface paths {
4288
4336
  patch?: never;
4289
4337
  trace?: never;
4290
4338
  };
4339
+ "/v1/agents/{id}/credentials": {
4340
+ parameters: {
4341
+ query?: never;
4342
+ header?: never;
4343
+ path?: never;
4344
+ cookie?: never;
4345
+ };
4346
+ /**
4347
+ * List agent credentials
4348
+ * @description Every credential an external agent has held for the agent token endpoint, newest first. Secrets are never returned.
4349
+ */
4350
+ get: {
4351
+ parameters: {
4352
+ query?: never;
4353
+ header?: never;
4354
+ path: {
4355
+ /** @description Agent ID */
4356
+ id: string;
4357
+ };
4358
+ cookie?: never;
4359
+ };
4360
+ requestBody?: never;
4361
+ responses: {
4362
+ /** @description The credentials */
4363
+ 200: {
4364
+ headers: {
4365
+ [name: string]: unknown;
4366
+ };
4367
+ content: {
4368
+ "application/json": components["schemas"]["AgentCredentialList"];
4369
+ };
4370
+ };
4371
+ /** @description Invalid request */
4372
+ 400: {
4373
+ headers: {
4374
+ [name: string]: unknown;
4375
+ };
4376
+ content: {
4377
+ "application/json": components["schemas"]["Error"];
4378
+ };
4379
+ };
4380
+ /** @description Unauthorized */
4381
+ 401: {
4382
+ headers: {
4383
+ [name: string]: unknown;
4384
+ };
4385
+ content: {
4386
+ "application/json": components["schemas"]["Error"];
4387
+ };
4388
+ };
4389
+ /** @description Forbidden */
4390
+ 403: {
4391
+ headers: {
4392
+ [name: string]: unknown;
4393
+ };
4394
+ content: {
4395
+ "application/json": components["schemas"]["Error"];
4396
+ };
4397
+ };
4398
+ /** @description Agent or credential not found */
4399
+ 404: {
4400
+ headers: {
4401
+ [name: string]: unknown;
4402
+ };
4403
+ content: {
4404
+ "application/json": components["schemas"]["Error"];
4405
+ };
4406
+ };
4407
+ };
4408
+ };
4409
+ put?: never;
4410
+ post?: never;
4411
+ delete?: never;
4412
+ options?: never;
4413
+ head?: never;
4414
+ patch?: never;
4415
+ trace?: never;
4416
+ };
4417
+ "/v1/agents/{id}/credentials/keys": {
4418
+ parameters: {
4419
+ query?: never;
4420
+ header?: never;
4421
+ path?: never;
4422
+ cookie?: never;
4423
+ };
4424
+ get?: never;
4425
+ put?: never;
4426
+ /**
4427
+ * Register an agent public key
4428
+ * @description Register a public JWK the external agent signs `private_key_jwt` client assertions with. Symmetric keys, keys with private members and algorithms outside the allowlist are refused.
4429
+ */
4430
+ post: {
4431
+ parameters: {
4432
+ query?: never;
4433
+ header?: never;
4434
+ path: {
4435
+ /** @description Agent ID */
4436
+ id: string;
4437
+ };
4438
+ cookie?: never;
4439
+ };
4440
+ requestBody: {
4441
+ content: {
4442
+ "application/json": components["schemas"]["RegisterAgentPublicKeyRequest"];
4443
+ };
4444
+ };
4445
+ responses: {
4446
+ /** @description The registered key */
4447
+ 201: {
4448
+ headers: {
4449
+ [name: string]: unknown;
4450
+ };
4451
+ content: {
4452
+ "application/json": components["schemas"]["AgentCredential"];
4453
+ };
4454
+ };
4455
+ /** @description Invalid request */
4456
+ 400: {
4457
+ headers: {
4458
+ [name: string]: unknown;
4459
+ };
4460
+ content: {
4461
+ "application/json": components["schemas"]["Error"];
4462
+ };
4463
+ };
4464
+ /** @description Unauthorized */
4465
+ 401: {
4466
+ headers: {
4467
+ [name: string]: unknown;
4468
+ };
4469
+ content: {
4470
+ "application/json": components["schemas"]["Error"];
4471
+ };
4472
+ };
4473
+ /** @description Forbidden */
4474
+ 403: {
4475
+ headers: {
4476
+ [name: string]: unknown;
4477
+ };
4478
+ content: {
4479
+ "application/json": components["schemas"]["Error"];
4480
+ };
4481
+ };
4482
+ /** @description Agent or credential not found */
4483
+ 404: {
4484
+ headers: {
4485
+ [name: string]: unknown;
4486
+ };
4487
+ content: {
4488
+ "application/json": components["schemas"]["Error"];
4489
+ };
4490
+ };
4491
+ /** @description Conflict */
4492
+ 409: {
4493
+ headers: {
4494
+ [name: string]: unknown;
4495
+ };
4496
+ content: {
4497
+ "application/json": components["schemas"]["Error"];
4498
+ };
4499
+ };
4500
+ };
4501
+ };
4502
+ delete?: never;
4503
+ options?: never;
4504
+ head?: never;
4505
+ patch?: never;
4506
+ trace?: never;
4507
+ };
4508
+ "/v1/agents/{id}/credentials/secrets": {
4509
+ parameters: {
4510
+ query?: never;
4511
+ header?: never;
4512
+ path?: never;
4513
+ cookie?: never;
4514
+ };
4515
+ get?: never;
4516
+ put?: never;
4517
+ /**
4518
+ * Create an agent client secret
4519
+ * @description Create an `rt_agent_sk_` client secret for the token endpoint. It is shown once. An agent holds at most two active secrets, so you can rotate without downtime: create the new one, switch the agent, then revoke the old one.
4520
+ */
4521
+ post: {
4522
+ parameters: {
4523
+ query?: never;
4524
+ header?: never;
4525
+ path: {
4526
+ /** @description Agent ID */
4527
+ id: string;
4528
+ };
4529
+ cookie?: never;
4530
+ };
4531
+ requestBody?: {
4532
+ content: {
4533
+ "application/json": components["schemas"]["CreateAgentClientSecretRequest"];
4534
+ };
4535
+ };
4536
+ responses: {
4537
+ /** @description The new secret */
4538
+ 201: {
4539
+ headers: {
4540
+ [name: string]: unknown;
4541
+ };
4542
+ content: {
4543
+ "application/json": components["schemas"]["AgentClientSecretCreated"];
4544
+ };
4545
+ };
4546
+ /** @description Invalid request */
4547
+ 400: {
4548
+ headers: {
4549
+ [name: string]: unknown;
4550
+ };
4551
+ content: {
4552
+ "application/json": components["schemas"]["Error"];
4553
+ };
4554
+ };
4555
+ /** @description Unauthorized */
4556
+ 401: {
4557
+ headers: {
4558
+ [name: string]: unknown;
4559
+ };
4560
+ content: {
4561
+ "application/json": components["schemas"]["Error"];
4562
+ };
4563
+ };
4564
+ /** @description Forbidden */
4565
+ 403: {
4566
+ headers: {
4567
+ [name: string]: unknown;
4568
+ };
4569
+ content: {
4570
+ "application/json": components["schemas"]["Error"];
4571
+ };
4572
+ };
4573
+ /** @description Agent or credential not found */
4574
+ 404: {
4575
+ headers: {
4576
+ [name: string]: unknown;
4577
+ };
4578
+ content: {
4579
+ "application/json": components["schemas"]["Error"];
4580
+ };
4581
+ };
4582
+ /** @description Conflict */
4583
+ 409: {
4584
+ headers: {
4585
+ [name: string]: unknown;
4586
+ };
4587
+ content: {
4588
+ "application/json": components["schemas"]["Error"];
4589
+ };
4590
+ };
4591
+ };
4592
+ };
4593
+ delete?: never;
4594
+ options?: never;
4595
+ head?: never;
4596
+ patch?: never;
4597
+ trace?: never;
4598
+ };
4599
+ "/v1/agents/{id}/credentials/{credentialId}/revoke": {
4600
+ parameters: {
4601
+ query?: never;
4602
+ header?: never;
4603
+ path?: never;
4604
+ cookie?: never;
4605
+ };
4606
+ get?: never;
4607
+ put?: never;
4608
+ /**
4609
+ * Revoke an agent credential
4610
+ * @description Revoke a key or secret. The next token request that uses it fails; tokens already issued expire within 300 seconds.
4611
+ */
4612
+ post: {
4613
+ parameters: {
4614
+ query?: never;
4615
+ header?: never;
4616
+ path: {
4617
+ /** @description Agent ID */
4618
+ id: string;
4619
+ credentialId: string;
4620
+ };
4621
+ cookie?: never;
4622
+ };
4623
+ requestBody?: never;
4624
+ responses: {
4625
+ /** @description The revoked credential */
4626
+ 200: {
4627
+ headers: {
4628
+ [name: string]: unknown;
4629
+ };
4630
+ content: {
4631
+ "application/json": components["schemas"]["AgentCredential"];
4632
+ };
4633
+ };
4634
+ /** @description Invalid request */
4635
+ 400: {
4636
+ headers: {
4637
+ [name: string]: unknown;
4638
+ };
4639
+ content: {
4640
+ "application/json": components["schemas"]["Error"];
4641
+ };
4642
+ };
4643
+ /** @description Unauthorized */
4644
+ 401: {
4645
+ headers: {
4646
+ [name: string]: unknown;
4647
+ };
4648
+ content: {
4649
+ "application/json": components["schemas"]["Error"];
4650
+ };
4651
+ };
4652
+ /** @description Forbidden */
4653
+ 403: {
4654
+ headers: {
4655
+ [name: string]: unknown;
4656
+ };
4657
+ content: {
4658
+ "application/json": components["schemas"]["Error"];
4659
+ };
4660
+ };
4661
+ /** @description Agent or credential not found */
4662
+ 404: {
4663
+ headers: {
4664
+ [name: string]: unknown;
4665
+ };
4666
+ content: {
4667
+ "application/json": components["schemas"]["Error"];
4668
+ };
4669
+ };
4670
+ };
4671
+ };
4672
+ delete?: never;
4673
+ options?: never;
4674
+ head?: never;
4675
+ patch?: never;
4676
+ trace?: never;
4677
+ };
4291
4678
  "/v1/agents/{id}/deployments": {
4292
4679
  parameters: {
4293
4680
  query?: never;
@@ -4458,13 +4845,13 @@ interface paths {
4458
4845
  "application/json": components["schemas"]["AsyncDispatchHandle"];
4459
4846
  };
4460
4847
  };
4461
- /** @description Invalid agent ID or request body */
4848
+ /** @description Invalid agent ID or request body, or an external agent that opts into identity assertion called with no identity to assert (IDENTITY_ASSERTION_UNAVAILABLE; the agent was not called) */
4462
4849
  400: {
4463
4850
  headers: {
4464
4851
  [name: string]: unknown;
4465
4852
  };
4466
4853
  content: {
4467
- "application/json": components["schemas"]["Error"];
4854
+ "application/json": components["schemas"]["Error"] | components["schemas"]["IdentityAssertionUnavailableError"];
4468
4855
  };
4469
4856
  };
4470
4857
  /** @description Unauthorized */
@@ -5325,10 +5712,12 @@ interface paths {
5325
5712
  };
5326
5713
  /**
5327
5714
  * Export agent for runtime
5328
- * @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). Skills bound to the agent are snapshotted into `skills`, each with the skill version it resolved to, and the runtime loads them with no host wiring. 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.
5715
+ * @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). Skills bound to the agent are snapshotted into `skills`, each with the skill version it resolved to, and the runtime loads them with no host wiring. MCP credential values and external-agent auth credentials are replaced with secret-name references. An export that would carry a literal credential typed into a tool config or MCP server is refused with `422` and code `raw_credential_in_export`. 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.
5329
5716
  *
5330
5717
  * 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.
5331
5718
  *
5719
+ * The response also carries `warnings`: each referenced sub-agent or flow the export could not embed, with the reason (`not_found`, `claude_managed_unsupported`, `max_depth_exceeded` for nesting deeper than 3 levels, `invalid_flow_config`, `unresolved_tool_ref`, or `unsupported_mcp_auth`). The export still returns `200` and leaves the referencing capability or tool out of the artifact. The array is empty when every child was embedded.
5720
+ *
5332
5721
  * Pass at most one release selector. `versionId` exports that published version; `alias` exports the version a release alias (for example `staging`, `live` or `pr-42`) currently points at, resolved exactly as the execution selector `agent: { agentId, alias }` resolves it. With neither, the export follows the agent's default target: the version its `live` alias names when the org runs on release aliases, otherwise the agent's current definition. A version-backed export carries `release` with the resolved `versionId`, plus `alias` and `aliasRevision` when an alias selected it. An unknown version or alias, or an archived or expired alias, answers `404`.
5333
5722
  */
5334
5723
  get: {
@@ -5349,7 +5738,7 @@ interface paths {
5349
5738
  };
5350
5739
  requestBody?: never;
5351
5740
  responses: {
5352
- /** @description Exported agent definition, or with `format=bundle` a zip archive. Two bundle exports of the same version are byte-identical. The bundle `manifest.json` records the runtime version and source commit, the agent `versionId`/alias, the entrypoints, `hostDependencies`, and `contentHash`: sha256 over the `sha256sum` listing (`<sha256> <path>` lines sorted by path) of every file except `manifest.json`. The same hash is sent in the `X-Runtype-Bundle-Content-Hash` header. */
5741
+ /** @description Exported agent definition, or with `format=bundle` a zip archive. Two bundle exports of the same version are byte-identical. The bundle `manifest.json` records the runtime version and source commit, the agent `versionId`/alias, the entrypoints, `hostDependencies`, `warnings`, and `contentHash`: sha256 over the `sha256sum` listing (`<sha256> <path>` lines sorted by path) of every file except `manifest.json`. The same hash is sent in the `X-Runtype-Bundle-Content-Hash` header. */
5353
5742
  200: {
5354
5743
  headers: {
5355
5744
  [name: string]: unknown;
@@ -5379,6 +5768,8 @@ interface paths {
5379
5768
  };
5380
5769
  /** @description Skills bound to the agent, snapshotted with the skill version each resolved to. `executeAgent` loads them with no host wiring. Absent when the agent has no bound skills. */
5381
5770
  skills?: components["schemas"]["RuntimeExportedSkill"][];
5771
+ /** @description Referenced sub-agents and flows the export could not embed, each with the reason. The export still returns `200`; a tool or capability that names a dropped child is absent from the artifact. Empty when every child was embedded. */
5772
+ warnings: components["schemas"]["RuntimeExportWarning"][];
5382
5773
  };
5383
5774
  "application/zip": string;
5384
5775
  };
@@ -5419,13 +5810,13 @@ interface paths {
5419
5810
  "application/json": components["schemas"]["Error"];
5420
5811
  };
5421
5812
  };
5422
- /** @description The agent type cannot export a selected version */
5813
+ /** @description The agent type cannot export a selected version (code `selector_unsupported_agent_type`), or the export would carry a literal credential (code `raw_credential_in_export`; `details` names each tool or MCP server field without echoing the value) */
5423
5814
  422: {
5424
5815
  headers: {
5425
5816
  [name: string]: unknown;
5426
5817
  };
5427
5818
  content: {
5428
- "application/json": components["schemas"]["Error"];
5819
+ "application/json": components["schemas"]["RuntimeExportError"];
5429
5820
  };
5430
5821
  };
5431
5822
  /** @description Internal server error */
@@ -5898,7 +6289,100 @@ interface paths {
5898
6289
  patch?: never;
5899
6290
  trace?: never;
5900
6291
  };
5901
- "/v1/agents/{id}/runs": {
6292
+ "/v1/agents/{id}/runs": {
6293
+ parameters: {
6294
+ query?: never;
6295
+ header?: never;
6296
+ path?: never;
6297
+ cookie?: never;
6298
+ };
6299
+ /**
6300
+ * List managed agent runs
6301
+ * @description List the durable per-turn run summaries for a saved Claude Managed agent, newest first, optionally scoped to one conversation. Each row is written when a managed turn settles. Auth: agent ownership + AGENTS:READ (the same trust level as the events reconnect route).
6302
+ */
6303
+ get: {
6304
+ parameters: {
6305
+ query?: {
6306
+ /** @description Scope to a single conversation key. */
6307
+ conversationId?: string;
6308
+ /** @description Max rows to return (default 50, capped at 200). */
6309
+ limit?: number;
6310
+ };
6311
+ header?: never;
6312
+ path: {
6313
+ id: string;
6314
+ };
6315
+ cookie?: never;
6316
+ };
6317
+ requestBody?: never;
6318
+ responses: {
6319
+ /** @description The agent run summaries */
6320
+ 200: {
6321
+ headers: {
6322
+ [name: string]: unknown;
6323
+ };
6324
+ content: {
6325
+ "application/json": {
6326
+ runs: components["schemas"]["ManagedAgentRunSummary"][];
6327
+ };
6328
+ };
6329
+ };
6330
+ /** @description Invalid agent ID */
6331
+ 400: {
6332
+ headers: {
6333
+ [name: string]: unknown;
6334
+ };
6335
+ content: {
6336
+ "application/json": components["schemas"]["Error"];
6337
+ };
6338
+ };
6339
+ /** @description Unauthorized */
6340
+ 401: {
6341
+ headers: {
6342
+ [name: string]: unknown;
6343
+ };
6344
+ content: {
6345
+ "application/json": components["schemas"]["Error"];
6346
+ };
6347
+ };
6348
+ /** @description Insufficient permissions */
6349
+ 403: {
6350
+ headers: {
6351
+ [name: string]: unknown;
6352
+ };
6353
+ content: {
6354
+ "application/json": components["schemas"]["Error"];
6355
+ };
6356
+ };
6357
+ /** @description Agent not found */
6358
+ 404: {
6359
+ headers: {
6360
+ [name: string]: unknown;
6361
+ };
6362
+ content: {
6363
+ "application/json": components["schemas"]["Error"];
6364
+ };
6365
+ };
6366
+ /** @description Internal server error */
6367
+ 500: {
6368
+ headers: {
6369
+ [name: string]: unknown;
6370
+ };
6371
+ content: {
6372
+ "application/json": components["schemas"]["Error"];
6373
+ };
6374
+ };
6375
+ };
6376
+ };
6377
+ put?: never;
6378
+ post?: never;
6379
+ delete?: never;
6380
+ options?: never;
6381
+ head?: never;
6382
+ patch?: never;
6383
+ trace?: never;
6384
+ };
6385
+ "/v1/agents/{id}/runs/{runId}": {
5902
6386
  parameters: {
5903
6387
  query?: never;
5904
6388
  header?: never;
@@ -5906,33 +6390,30 @@ interface paths {
5906
6390
  cookie?: never;
5907
6391
  };
5908
6392
  /**
5909
- * List managed agent runs
5910
- * @description List the durable per-turn run summaries for a saved Claude Managed agent, newest first, optionally scoped to one conversation. Each row is written when a managed turn settles. Auth: agent ownership + AGENTS:READ (the same trust level as the events reconnect route).
6393
+ * Get a managed agent run
6394
+ * @description Fetch one durable run summary plus its deliverable pointers (the swept `/mnt/session/outputs/` files; the bytes live in asset storage). Auth: agent ownership + AGENTS:READ.
5911
6395
  */
5912
6396
  get: {
5913
6397
  parameters: {
5914
- query?: {
5915
- /** @description Scope to a single conversation key. */
5916
- conversationId?: string;
5917
- /** @description Max rows to return (default 50, capped at 200). */
5918
- limit?: number;
5919
- };
6398
+ query?: never;
5920
6399
  header?: never;
5921
6400
  path: {
5922
6401
  id: string;
6402
+ runId: string;
5923
6403
  };
5924
6404
  cookie?: never;
5925
6405
  };
5926
6406
  requestBody?: never;
5927
6407
  responses: {
5928
- /** @description The agent run summaries */
6408
+ /** @description The run summary and its deliverables */
5929
6409
  200: {
5930
6410
  headers: {
5931
6411
  [name: string]: unknown;
5932
6412
  };
5933
6413
  content: {
5934
6414
  "application/json": {
5935
- runs: components["schemas"]["ManagedAgentRunSummary"][];
6415
+ outputs: components["schemas"]["ManagedAgentRunOutput"][];
6416
+ run: components["schemas"]["ManagedAgentRunSummary"];
5936
6417
  };
5937
6418
  };
5938
6419
  };
@@ -5963,7 +6444,7 @@ interface paths {
5963
6444
  "application/json": components["schemas"]["Error"];
5964
6445
  };
5965
6446
  };
5966
- /** @description Agent not found */
6447
+ /** @description Agent or run not found */
5967
6448
  404: {
5968
6449
  headers: {
5969
6450
  [name: string]: unknown;
@@ -5991,7 +6472,7 @@ interface paths {
5991
6472
  patch?: never;
5992
6473
  trace?: never;
5993
6474
  };
5994
- "/v1/agents/{id}/runs/{runId}": {
6475
+ "/v1/agents/{id}/token-audience-policy": {
5995
6476
  parameters: {
5996
6477
  query?: never;
5997
6478
  header?: never;
@@ -5999,34 +6480,31 @@ interface paths {
5999
6480
  cookie?: never;
6000
6481
  };
6001
6482
  /**
6002
- * Get a managed agent run
6003
- * @description Fetch one durable run summary plus its deliverable pointers (the swept `/mnt/session/outputs/` files; the bytes live in asset storage). Auth: agent ownership + AGENTS:READ.
6483
+ * Get the agent token audience policy
6484
+ * @description The resources this agent may get tokens for, with the grants, scopes and TTL ceiling of each.
6004
6485
  */
6005
6486
  get: {
6006
6487
  parameters: {
6007
6488
  query?: never;
6008
6489
  header?: never;
6009
6490
  path: {
6491
+ /** @description Agent ID */
6010
6492
  id: string;
6011
- runId: string;
6012
6493
  };
6013
6494
  cookie?: never;
6014
6495
  };
6015
6496
  requestBody?: never;
6016
6497
  responses: {
6017
- /** @description The run summary and its deliverables */
6498
+ /** @description The policy */
6018
6499
  200: {
6019
6500
  headers: {
6020
6501
  [name: string]: unknown;
6021
6502
  };
6022
6503
  content: {
6023
- "application/json": {
6024
- outputs: components["schemas"]["ManagedAgentRunOutput"][];
6025
- run: components["schemas"]["ManagedAgentRunSummary"];
6026
- };
6504
+ "application/json": components["schemas"]["TokenAudiencePolicy"];
6027
6505
  };
6028
6506
  };
6029
- /** @description Invalid agent ID */
6507
+ /** @description Invalid request */
6030
6508
  400: {
6031
6509
  headers: {
6032
6510
  [name: string]: unknown;
@@ -6044,7 +6522,7 @@ interface paths {
6044
6522
  "application/json": components["schemas"]["Error"];
6045
6523
  };
6046
6524
  };
6047
- /** @description Insufficient permissions */
6525
+ /** @description Forbidden */
6048
6526
  403: {
6049
6527
  headers: {
6050
6528
  [name: string]: unknown;
@@ -6053,7 +6531,7 @@ interface paths {
6053
6531
  "application/json": components["schemas"]["Error"];
6054
6532
  };
6055
6533
  };
6056
- /** @description Agent or run not found */
6534
+ /** @description Agent or credential not found */
6057
6535
  404: {
6058
6536
  headers: {
6059
6537
  [name: string]: unknown;
@@ -6062,8 +6540,75 @@ interface paths {
6062
6540
  "application/json": components["schemas"]["Error"];
6063
6541
  };
6064
6542
  };
6065
- /** @description Internal server error */
6066
- 500: {
6543
+ };
6544
+ };
6545
+ /**
6546
+ * Replace the agent token audience policy
6547
+ * @description Replace every entry of the policy at once. Each change increases `policyRevision`, takes effect on the next token request, and is audited with you as the actor. Resource URIs are stored in canonical form.
6548
+ */
6549
+ put: {
6550
+ parameters: {
6551
+ query?: never;
6552
+ header?: never;
6553
+ path: {
6554
+ /** @description Agent ID */
6555
+ id: string;
6556
+ };
6557
+ cookie?: never;
6558
+ };
6559
+ requestBody: {
6560
+ content: {
6561
+ "application/json": components["schemas"]["ReplaceTokenAudiencePolicyRequest"];
6562
+ };
6563
+ };
6564
+ responses: {
6565
+ /** @description The new policy */
6566
+ 200: {
6567
+ headers: {
6568
+ [name: string]: unknown;
6569
+ };
6570
+ content: {
6571
+ "application/json": components["schemas"]["ReplaceTokenAudiencePolicyResponse"];
6572
+ };
6573
+ };
6574
+ /** @description Invalid request */
6575
+ 400: {
6576
+ headers: {
6577
+ [name: string]: unknown;
6578
+ };
6579
+ content: {
6580
+ "application/json": components["schemas"]["Error"];
6581
+ };
6582
+ };
6583
+ /** @description Unauthorized */
6584
+ 401: {
6585
+ headers: {
6586
+ [name: string]: unknown;
6587
+ };
6588
+ content: {
6589
+ "application/json": components["schemas"]["Error"];
6590
+ };
6591
+ };
6592
+ /** @description Forbidden */
6593
+ 403: {
6594
+ headers: {
6595
+ [name: string]: unknown;
6596
+ };
6597
+ content: {
6598
+ "application/json": components["schemas"]["Error"];
6599
+ };
6600
+ };
6601
+ /** @description Agent or credential not found */
6602
+ 404: {
6603
+ headers: {
6604
+ [name: string]: unknown;
6605
+ };
6606
+ content: {
6607
+ "application/json": components["schemas"]["Error"];
6608
+ };
6609
+ };
6610
+ /** @description Conflict */
6611
+ 409: {
6067
6612
  headers: {
6068
6613
  [name: string]: unknown;
6069
6614
  };
@@ -6073,7 +6618,6 @@ interface paths {
6073
6618
  };
6074
6619
  };
6075
6620
  };
6076
- put?: never;
6077
6621
  post?: never;
6078
6622
  delete?: never;
6079
6623
  options?: never;
@@ -7302,7 +7846,7 @@ interface paths {
7302
7846
  put?: never;
7303
7847
  /**
7304
7848
  * Submit a batch flow execution
7305
- * @description Submits a batch of records for flow execution. Checks daily execution limits and feature gating.
7849
+ * @description Submits a batch of records for flow execution. Checks daily execution limits and feature gating, and refuses up front (422 RUNTIME_LANE_INELIGIBLE) a flow the batch host cannot run.
7306
7850
  */
7307
7851
  post: {
7308
7852
  parameters: {
@@ -7410,6 +7954,15 @@ interface paths {
7410
7954
  "application/json": components["schemas"]["Error"];
7411
7955
  };
7412
7956
  };
7957
+ /** @description The flow uses capabilities the batch host cannot run (RUNTIME_LANE_INELIGIBLE, with `reasons` such as `ineligible:wait-until`). Nothing is queued and no executions are counted. */
7958
+ 422: {
7959
+ headers: {
7960
+ [name: string]: unknown;
7961
+ };
7962
+ content: {
7963
+ "application/json": components["schemas"]["BatchLaneRefusalError"];
7964
+ };
7965
+ };
7413
7966
  /** @description Rate limit exceeded */
7414
7967
  429: {
7415
7968
  headers: {
@@ -21043,9 +21596,11 @@ interface paths {
21043
21596
  };
21044
21597
  /**
21045
21598
  * Export flow for runtime (limited preview)
21046
- * @description Export a fully-resolved, self-contained flow definition that the @runtypelabs/runtime package can consume directly at boot. All step configs are inlined; no live DB queries are needed at execution time. 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.
21599
+ * @description Export a fully-resolved, self-contained flow definition that the @runtypelabs/runtime package can consume directly at boot. All step configs are inlined; no live DB queries are needed at execution time. An export that would carry a literal credential typed into a tool config or MCP server is refused with `422` and code `raw_credential_in_export`. 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.
21047
21600
  *
21048
21601
  * 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 flow'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, and the export is never refused for a declared dependency.
21602
+ *
21603
+ * The response also carries `warnings`: each Claude Managed agent the flow references (embedded only as a stub the runtime cannot run), and each child flow or sub-agent that an embedded agent could not include, with the reason. The array is empty when every child was embedded.
21049
21604
  */
21050
21605
  get: {
21051
21606
  parameters: {
@@ -21080,6 +21635,8 @@ interface paths {
21080
21635
  steps: {
21081
21636
  [key: string]: unknown;
21082
21637
  }[];
21638
+ /** @description Referenced sub-agents and flows the export could not embed, each with the reason. The export still returns `200`; a tool or capability that names a dropped child is absent from the artifact. Empty when every child was embedded. */
21639
+ warnings: components["schemas"]["RuntimeExportWarning"][];
21083
21640
  };
21084
21641
  };
21085
21642
  };
@@ -21119,6 +21676,15 @@ interface paths {
21119
21676
  "application/json": components["schemas"]["Error"];
21120
21677
  };
21121
21678
  };
21679
+ /** @description The export would carry a literal credential (code `raw_credential_in_export`); `details` names each tool or MCP server field without echoing the value */
21680
+ 422: {
21681
+ headers: {
21682
+ [name: string]: unknown;
21683
+ };
21684
+ content: {
21685
+ "application/json": components["schemas"]["RuntimeExportError"];
21686
+ };
21687
+ };
21122
21688
  /** @description Internal server error */
21123
21689
  500: {
21124
21690
  headers: {
@@ -21968,6 +22534,116 @@ interface paths {
21968
22534
  };
21969
22535
  trace?: never;
21970
22536
  };
22537
+ "/v1/identity/token": {
22538
+ parameters: {
22539
+ query?: never;
22540
+ header?: never;
22541
+ path?: never;
22542
+ cookie?: never;
22543
+ };
22544
+ get?: never;
22545
+ put?: never;
22546
+ /**
22547
+ * Get an agent access token
22548
+ * @description OAuth 2.0 token endpoint for agents running outside Runtype. An external agent authenticates as the OAuth client (`private_key_jwt`, `client_secret_basic` or `client_secret_post`) and gets a short-lived RFC 9068 access token whose `sub` is `agent:<agentId>` and whose `aud` is the requested resource, when the agent audience policy allows that resource. Errors follow RFC 6749 §5.2. Responses are never cached.
22549
+ */
22550
+ post: {
22551
+ parameters: {
22552
+ query?: never;
22553
+ header?: never;
22554
+ path?: never;
22555
+ cookie?: never;
22556
+ };
22557
+ requestBody: {
22558
+ content: {
22559
+ "application/x-www-form-urlencoded": {
22560
+ /** @description Not accepted; the actor is the authenticated client. */
22561
+ actor_token?: string;
22562
+ /** @description Not accepted; name the target with `resource`. */
22563
+ audience?: string;
22564
+ /** @description A JWT signed with a registered key (`private_key_jwt`): `iss` and `sub` are the agent ID, `aud` is the agents issuer, `jti` is unique, and `exp - iat` is at most 300 seconds. */
22565
+ client_assertion?: string;
22566
+ /** @enum {string} */
22567
+ client_assertion_type?: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
22568
+ /** @description The agent ID. Required with `client_secret`; optional with a client assertion, whose `sub` names the agent. */
22569
+ client_id?: string;
22570
+ /** @description An `rt_agent_sk_` client secret (`client_secret_post`). Prefer HTTP Basic or a client assertion. */
22571
+ client_secret?: string;
22572
+ /**
22573
+ * @description Always `client_credentials`. Token exchange returns `unsupported_grant_type`.
22574
+ * @enum {string}
22575
+ */
22576
+ grant_type: "client_credentials";
22577
+ /** @description The canonical resource URI (RFC 8707) the token is for, for example `https://mcp.example.com/mcp`. It must be on the agent audience policy for the principal grant. */
22578
+ resource: string;
22579
+ /** @description Space-separated scopes; each must be allowed by the policy entry for `resource`. */
22580
+ scope?: string;
22581
+ };
22582
+ };
22583
+ };
22584
+ responses: {
22585
+ /** @description The issued token. */
22586
+ 200: {
22587
+ headers: {
22588
+ [name: string]: unknown;
22589
+ };
22590
+ content: {
22591
+ "application/json": components["schemas"]["AgentAccessTokenResponse"];
22592
+ };
22593
+ };
22594
+ /** @description The request was refused. */
22595
+ 400: {
22596
+ headers: {
22597
+ [name: string]: unknown;
22598
+ };
22599
+ content: {
22600
+ "application/json": components["schemas"]["AgentAccessTokenError"];
22601
+ };
22602
+ };
22603
+ /** @description Client authentication failed. */
22604
+ 401: {
22605
+ headers: {
22606
+ [name: string]: unknown;
22607
+ };
22608
+ content: {
22609
+ "application/json": components["schemas"]["AgentAccessTokenError"];
22610
+ };
22611
+ };
22612
+ /** @description Too many token requests. */
22613
+ 429: {
22614
+ headers: {
22615
+ [name: string]: unknown;
22616
+ };
22617
+ content: {
22618
+ "application/json": components["schemas"]["AgentAccessTokenError"];
22619
+ };
22620
+ };
22621
+ /** @description No token was issued. */
22622
+ 500: {
22623
+ headers: {
22624
+ [name: string]: unknown;
22625
+ };
22626
+ content: {
22627
+ "application/json": components["schemas"]["AgentAccessTokenError"];
22628
+ };
22629
+ };
22630
+ /** @description Issuance is temporarily unavailable. */
22631
+ 503: {
22632
+ headers: {
22633
+ [name: string]: unknown;
22634
+ };
22635
+ content: {
22636
+ "application/json": components["schemas"]["AgentAccessTokenError"];
22637
+ };
22638
+ };
22639
+ };
22640
+ };
22641
+ delete?: never;
22642
+ options?: never;
22643
+ head?: never;
22644
+ patch?: never;
22645
+ trace?: never;
22646
+ };
21971
22647
  "/v1/integration-configs": {
21972
22648
  parameters: {
21973
22649
  query?: never;
@@ -31620,6 +32296,10 @@ interface paths {
31620
32296
  publishedVersionIds?: {
31621
32297
  [key: string]: string | null;
31622
32298
  };
32299
+ /** @description Display name per capability flow or agent id */
32300
+ resourceNames?: {
32301
+ [key: string]: string;
32302
+ };
31623
32303
  /** @description Tool ids from each capability agent config (tools.toolIds) */
31624
32304
  toolIdsByAgent?: {
31625
32305
  [key: string]: string[];
@@ -43304,7 +43984,7 @@ interface paths {
43304
43984
  put?: never;
43305
43985
  /**
43306
43986
  * Send a rendered email from a standalone runtime
43307
- * @description Hosted fulfillment of the runtime EmailSender seam. Accepts a fully RENDERED message (no template strings) and dispatches it through the platform email path with the managed-send-from-domain gate evaluated against the authenticated account. Requires a Runtype API key with the FLOWS:EXECUTE scope. Requires an Enterprise plan: ineligible accounts receive 403 (code `BYOC_PLAN_REQUIRED`).
43987
+ * @description Hosted fulfillment of the runtime EmailSender seam. Accepts a fully RENDERED message (no template strings) and dispatches it through the platform email path with the managed-send-from-domain gate evaluated against the authenticated account. Requires a Runtype API key with the RUNTIME:EXECUTE scope (FLOWS:EXECUTE also accepted). Requires an Enterprise plan: ineligible accounts receive 403 (code `BYOC_PLAN_REQUIRED`).
43308
43988
  */
43309
43989
  post: {
43310
43990
  parameters: {
@@ -43384,7 +44064,7 @@ interface paths {
43384
44064
  "application/json": components["schemas"]["RuntimeEmailAdmissionError"];
43385
44065
  };
43386
44066
  };
43387
- /** @description Not an API key, missing FLOWS:EXECUTE scope, custom sender on the managed domain, or the account is not on an Enterprise plan (code `BYOC_PLAN_REQUIRED`) */
44067
+ /** @description Not an API key, missing RUNTIME:EXECUTE scope, custom sender on the managed domain, or the account is not on an Enterprise plan (code `BYOC_PLAN_REQUIRED`) */
43388
44068
  403: {
43389
44069
  headers: {
43390
44070
  [name: string]: unknown;
@@ -44711,13 +45391,13 @@ interface paths {
44711
45391
  };
44712
45392
  };
44713
45393
  };
44714
- /** @description Validation error */
45394
+ /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
44715
45395
  400: {
44716
45396
  headers: {
44717
45397
  [name: string]: unknown;
44718
45398
  };
44719
45399
  content: {
44720
- "application/json": components["schemas"]["Error"];
45400
+ "application/json": components["schemas"]["ScheduleValidationError"];
44721
45401
  };
44722
45402
  };
44723
45403
  /** @description Unauthorized */
@@ -44925,13 +45605,13 @@ interface paths {
44925
45605
  "application/json": components["schemas"]["ScheduleEnsureResponse"];
44926
45606
  };
44927
45607
  };
44928
- /** @description Validation error */
45608
+ /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
44929
45609
  400: {
44930
45610
  headers: {
44931
45611
  [name: string]: unknown;
44932
45612
  };
44933
45613
  content: {
44934
- "application/json": components["schemas"]["Error"];
45614
+ "application/json": components["schemas"]["ScheduleValidationError"];
44935
45615
  };
44936
45616
  };
44937
45617
  /** @description Unauthorized */
@@ -45487,13 +46167,13 @@ interface paths {
45487
46167
  };
45488
46168
  };
45489
46169
  };
45490
- /** @description Validation error */
46170
+ /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
45491
46171
  400: {
45492
46172
  headers: {
45493
46173
  [name: string]: unknown;
45494
46174
  };
45495
46175
  content: {
45496
- "application/json": components["schemas"]["Error"];
46176
+ "application/json": components["schemas"]["ScheduleValidationError"];
45497
46177
  };
45498
46178
  };
45499
46179
  /** @description Unauthorized */
@@ -49064,6 +49744,7 @@ interface paths {
49064
49744
  toolType: string;
49065
49745
  updatedAt: string;
49066
49746
  userId: string | null;
49747
+ /** @description Non-blocking findings from a successful write. `warnings` also carries `SESSION_PREVIEW_URL` when `config.url` or `config.serverUrl` is a session sandbox preview URL, which stops working when that sandbox container stops. */
49067
49748
  validation?: {
49068
49749
  recommendations?: components["schemas"]["FlowValidationIssue"][];
49069
49750
  warnings: {
@@ -49563,6 +50244,7 @@ interface paths {
49563
50244
  toolType: string;
49564
50245
  updatedAt: string;
49565
50246
  userId: string | null;
50247
+ /** @description Non-blocking findings from a successful write. `warnings` also carries `SESSION_PREVIEW_URL` when `config.url` or `config.serverUrl` is a session sandbox preview URL, which stops working when that sandbox container stops. */
49566
50248
  validation?: {
49567
50249
  recommendations?: components["schemas"]["FlowValidationIssue"][];
49568
50250
  warnings: {
@@ -49719,7 +50401,7 @@ interface paths {
49719
50401
  put?: never;
49720
50402
  /**
49721
50403
  * Deploy Runtype Sandbox
49722
- * @description Deploy a live Runtype Sandbox preview. Omitted retention preserves unlimited legacy retention; explicit retention is metered and rollout-gated. Provider sleep or loss can end availability earlier.
50404
+ * @description Deploy a session-tier Runtype Sandbox preview. The preview URL is the credential and is bound to the container epoch: a new container mints a new URL, reported by effectivePolicy.freshContainer and previewUrlChanged. Omitted retention preserves unlimited retention; explicit retention is metered and rollout-gated, and the preview is refused from the retention deadline on. sleepPolicy { mode: "never" } keeps the container running until that deadline and requires retention of 10m, 1h or 24h. A redeploy stops the previous server first and fails if the new server never answers on the port.
49723
50405
  */
49724
50406
  post: {
49725
50407
  parameters: {
@@ -49770,11 +50452,17 @@ interface paths {
49770
50452
  effectivePolicy?: {
49771
50453
  autoDeleteInterval?: number;
49772
50454
  autoStopInterval?: number;
50455
+ /** @description Runtype Sandbox: the container epoch the preview URL is bound to; a new epoch mints a new URL. */
50456
+ containerEpoch?: number;
49773
50457
  expiresAt: string | null;
50458
+ /** @description Runtype Sandbox: true when this deploy started a new container rather than reusing a running one. */
50459
+ freshContainer?: boolean;
49774
50460
  /** @enum {string} */
49775
50461
  metering: "active" | "legacy-untracked";
49776
50462
  /** @enum {string} */
49777
50463
  origin: "explicit" | "legacy-default";
50464
+ /** @description Runtype Sandbox: true when the preview URL differs from the one the previous successful deploy to this sandbox returned. Re-register any saved copy of the old URL. False for a first deploy. */
50465
+ previewUrlChanged?: boolean;
49778
50466
  /** @enum {string} */
49779
50467
  retention: "10m" | "1h" | "24h" | "unlimited";
49780
50468
  sleepPolicy?: {
@@ -49986,11 +50674,17 @@ interface paths {
49986
50674
  effectivePolicy?: {
49987
50675
  autoDeleteInterval?: number;
49988
50676
  autoStopInterval?: number;
50677
+ /** @description Runtype Sandbox: the container epoch the preview URL is bound to; a new epoch mints a new URL. */
50678
+ containerEpoch?: number;
49989
50679
  expiresAt: string | null;
50680
+ /** @description Runtype Sandbox: true when this deploy started a new container rather than reusing a running one. */
50681
+ freshContainer?: boolean;
49990
50682
  /** @enum {string} */
49991
50683
  metering: "active" | "legacy-untracked";
49992
50684
  /** @enum {string} */
49993
50685
  origin: "explicit" | "legacy-default";
50686
+ /** @description Runtype Sandbox: true when the preview URL differs from the one the previous successful deploy to this sandbox returned. Re-register any saved copy of the old URL. False for a first deploy. */
50687
+ previewUrlChanged?: boolean;
49994
50688
  /** @enum {string} */
49995
50689
  retention: "10m" | "1h" | "24h" | "unlimited";
49996
50690
  sleepPolicy?: {
@@ -50377,6 +51071,7 @@ interface paths {
50377
51071
  toolType: string;
50378
51072
  updatedAt: string;
50379
51073
  userId: string | null;
51074
+ /** @description Non-blocking findings from a successful write. `warnings` also carries `SESSION_PREVIEW_URL` when `config.url` or `config.serverUrl` is a session sandbox preview URL, which stops working when that sandbox container stops. */
50380
51075
  validation?: {
50381
51076
  recommendations?: components["schemas"]["FlowValidationIssue"][];
50382
51077
  warnings: {
@@ -51600,6 +52295,23 @@ interface components {
51600
52295
  timestamp?: string;
51601
52296
  };
51602
52297
  };
52298
+ AgentAccessTokenError: {
52299
+ /** @enum {string} */
52300
+ error: "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type" | "invalid_target" | "invalid_scope" | "temporarily_unavailable" | "server_error";
52301
+ error_description?: string;
52302
+ };
52303
+ AgentAccessTokenResponse: {
52304
+ /** @description An RFC 9068 `at+jwt` signed with the keys at `/.well-known/jwks.json`. */
52305
+ access_token: string;
52306
+ /** @description Seconds until the token expires; at most 300. */
52307
+ expires_in: number;
52308
+ /** @enum {string} */
52309
+ issued_token_type: "urn:ietf:params:oauth:token-type:access_token";
52310
+ /** @description The granted scopes, when any were requested and allowed. */
52311
+ scope?: string;
52312
+ /** @enum {string} */
52313
+ token_type: "Bearer";
52314
+ };
51603
52315
  AgentApprovalContinuationJsonResponse: {
51604
52316
  blockReason?: string;
51605
52317
  code?: string;
@@ -51631,6 +52343,40 @@ interface components {
51631
52343
  /** @default true */
51632
52344
  streamResponse: boolean;
51633
52345
  };
52346
+ AgentClientSecretCreated: {
52347
+ clientId: string;
52348
+ /** @description The `rt_agent_sk_` secret. Shown only in this response; Runtype stores only its hash. */
52349
+ clientSecret: string;
52350
+ credential: components["schemas"]["AgentCredential"];
52351
+ };
52352
+ AgentCredential: {
52353
+ agentId: string;
52354
+ /** @description The pinned signing algorithm of a public key. */
52355
+ algorithm: string | null;
52356
+ createdAt: string;
52357
+ /** @description Who registered it; provenance only. */
52358
+ createdByUserId: string | null;
52359
+ expiresAt: string | null;
52360
+ id: string;
52361
+ /** @description Key ID; for a client secret, a generated identifier. */
52362
+ kid: string;
52363
+ /** @enum {string} */
52364
+ kind: "public_key" | "client_secret";
52365
+ /** @description The registered public JWK. */
52366
+ publicJwk: {
52367
+ [key: string]: unknown;
52368
+ } | null;
52369
+ revokedAt: string | null;
52370
+ /** @description The last four characters of a client secret. */
52371
+ secretHint: string | null;
52372
+ /** @enum {string} */
52373
+ status: "active" | "expired" | "revoked";
52374
+ };
52375
+ AgentCredentialList: {
52376
+ /** @description The OAuth client ID of the agent: its agent ID. */
52377
+ clientId: string;
52378
+ credentials: components["schemas"]["AgentCredential"][];
52379
+ };
51634
52380
  /** @description Source-organization ids and hashes this version was promoted from, linked on the receipt. Provenance only: it never authorizes anything, and the target credentials alone decide what the activation may do. */
51635
52381
  AgentDeploymentPromotion: {
51636
52382
  sourceAgentId?: string;
@@ -51785,6 +52531,17 @@ interface components {
51785
52531
  /** @description The pinned versionNumber; null follows the published version. */
51786
52532
  version: number | null;
51787
52533
  };
52534
+ AgentIssuerMetadata: {
52535
+ grant_types_supported: string[];
52536
+ /** @description `<API origin>/orgs/<organizationId>/agents`, matching this document URL. */
52537
+ issuer: string;
52538
+ jwks_uri: string;
52539
+ response_types_supported: string[];
52540
+ service_documentation: string;
52541
+ token_endpoint: string;
52542
+ token_endpoint_auth_methods_supported: string[];
52543
+ token_endpoint_auth_signing_alg_values_supported: string[];
52544
+ };
51788
52545
  AgentPullResponse: {
51789
52546
  agentId: string;
51790
52547
  /** @description The agent's capabilities in display order, in the shape ensure's capabilities accepts. parametersSchema appears only when it differs from the one ensure would derive. */
@@ -52181,6 +52938,15 @@ interface components {
52181
52938
  } & {
52182
52939
  [key: string]: unknown;
52183
52940
  };
52941
+ BatchLaneRefusalError: components["schemas"]["Error"] & {
52942
+ /**
52943
+ * @description The flow uses capabilities the batch host cannot run.
52944
+ * @enum {string}
52945
+ */
52946
+ code: "RUNTIME_LANE_INELIGIBLE";
52947
+ /** @description Stable `ineligible:*` reason codes, e.g. `ineligible:wait-until`. */
52948
+ reasons: string[];
52949
+ };
52184
52950
  BuiltinToolExecuteResult: {
52185
52951
  /** @description Execution metadata for the caller, never part of a model-facing tool result. builtin:typesafe_judge sets metadata.judgment: requestedModel, resolvedModelId, keySource, questionSetId and questionSetVersion (configured mode), usage { inputTokens, outputTokens, reported }, and estimatedCostUsd (provider rates, before margin). */
52186
52952
  metadata?: {
@@ -52551,6 +53317,10 @@ interface components {
52551
53317
  toolName: string;
52552
53318
  }[];
52553
53319
  };
53320
+ CreateAgentClientSecretRequest: {
53321
+ /** @description Days until the secret expires; defaults to 90, at most 365. */
53322
+ lifetimeDays?: number;
53323
+ };
52554
53324
  CreateProductCommentRequest: {
52555
53325
  /**
52556
53326
  * @description `assistant` when the caller's client posts the Assistant's answer to an `@assistant`; defaults to `user`
@@ -54411,6 +55181,12 @@ interface components {
54411
55181
  x: string;
54412
55182
  y: string;
54413
55183
  };
55184
+ IdentityAssertionUnavailableError: components["schemas"]["Error"] & {
55185
+ /** @enum {string} */
55186
+ code: "IDENTITY_ASSERTION_UNAVAILABLE";
55187
+ /** @description What to change: pass endUser or tenant, set a tenancyStrategy, or use an org. */
55188
+ message: string;
55189
+ };
54414
55190
  InputDeliveryReceipt: {
54415
55191
  deliveryId: string;
54416
55192
  executionId: string;
@@ -54840,6 +55616,31 @@ interface components {
54840
55616
  recordName?: string;
54841
55617
  schemaVersion: number;
54842
55618
  };
55619
+ RegisterAgentPublicKeyRequest: {
55620
+ /**
55621
+ * @description The algorithm client assertions are signed with; defaults to the JWK `alg`.
55622
+ * @enum {string}
55623
+ */
55624
+ algorithm?: "ES256" | "ES384" | "PS256" | "PS384" | "PS512" | "RS256" | "RS384" | "RS512" | "EdDSA";
55625
+ /**
55626
+ * Format: date-time
55627
+ * @description When the key stops being accepted.
55628
+ */
55629
+ expiresAt?: string;
55630
+ /** @description A public JWK (EC P-256/P-384, RSA of at least 2048 bits, or OKP Ed25519) with no private members. */
55631
+ jwk: {
55632
+ [key: string]: unknown;
55633
+ };
55634
+ };
55635
+ ReplaceTokenAudiencePolicyRequest: {
55636
+ entries: components["schemas"]["TokenAudiencePolicyEntry"][];
55637
+ /** @description Refuse with 409 unless the current revision equals this. */
55638
+ expectedPolicyRevision?: number;
55639
+ };
55640
+ ReplaceTokenAudiencePolicyResponse: components["schemas"]["TokenAudiencePolicy"] & {
55641
+ /** @description Resources that are session sandbox preview URLs, which stop working when the sandbox container stops. Present only when non-empty; never blocks the write. */
55642
+ warnings?: components["schemas"]["SessionPreviewUrlWarning"][];
55643
+ };
54843
55644
  ResolvedQuestionSet: {
54844
55645
  calibration: {
54845
55646
  createdAt: string;
@@ -55071,6 +55872,30 @@ interface components {
55071
55872
  error: string;
55072
55873
  message?: string;
55073
55874
  };
55875
+ RuntimeExportError: components["schemas"]["Error"] & {
55876
+ /** @description Stable refusal code: `raw_credential_in_export` or `selector_unsupported_agent_type`. */
55877
+ code?: string;
55878
+ };
55879
+ RuntimeExportWarning: {
55880
+ childId?: string;
55881
+ /** @enum {string} */
55882
+ childKind: "agent" | "flow";
55883
+ /**
55884
+ * @description `child_dropped`: the child is absent from the artifact. `child_stubbed`: the artifact carries a stub the runtime cannot run.
55885
+ * @enum {string}
55886
+ */
55887
+ code: "child_dropped" | "child_stubbed";
55888
+ message: string;
55889
+ /** @description The agent whose capability referenced the child, when the child came from one. */
55890
+ parentId?: string;
55891
+ /**
55892
+ * @description Why the export could not embed the child.
55893
+ * @enum {string}
55894
+ */
55895
+ reason: "not_found" | "claude_managed_unsupported" | "max_depth_exceeded" | "invalid_flow_config" | "unresolved_tool_ref" | "unsupported_mcp_auth";
55896
+ /** @description The capability or tool name that referenced the child. */
55897
+ toolName?: string;
55898
+ };
55074
55899
  RuntimeExportedSkill: {
55075
55900
  approvalDelta: string[];
55076
55901
  body: string;
@@ -55220,6 +56045,22 @@ interface components {
55220
56045
  */
55221
56046
  kind: "run" | "records" | "none";
55222
56047
  };
56048
+ ScheduleValidationError: components["schemas"]["Error"] & {
56049
+ /** @description Stable error code. SCHEDULE_AGENT_CONFIG_UNSUPPORTED: the target agent uses config a schedule cannot supply; `details[].path` names it. */
56050
+ code?: string;
56051
+ /** @description Human-readable error message. */
56052
+ message?: string;
56053
+ };
56054
+ SessionPreviewUrlWarning: {
56055
+ /** @enum {string} */
56056
+ code: "SESSION_PREVIEW_URL";
56057
+ message: string;
56058
+ /** @description The saved field that holds the URL, for example `entries[0].resource`. */
56059
+ path: string;
56060
+ /** @enum {string} */
56061
+ severity: "warning";
56062
+ suggestedFix: string;
56063
+ };
55223
56064
  SkillEnsureConflict: {
55224
56065
  /** @enum {string} */
55225
56066
  code: "external_modification" | "remote_changed";
@@ -55346,6 +56187,29 @@ interface components {
55346
56187
  surfaceId: string;
55347
56188
  updatedAt: string | null;
55348
56189
  };
56190
+ TokenAudiencePolicy: {
56191
+ agentId: string;
56192
+ entries: components["schemas"]["TokenAudiencePolicyEntry"][];
56193
+ /** @description Increases on every change; 0 when no policy was ever set. */
56194
+ policyRevision: number;
56195
+ updatedAt: string | null;
56196
+ updatedByUserId: string | null;
56197
+ };
56198
+ TokenAudiencePolicyEntry: {
56199
+ /** @description `principal` lets the agent get its own tokens for this resource with client credentials. */
56200
+ allowedGrants: ("principal" | "delegated")[];
56201
+ /** @description Scopes a token for this resource may carry. */
56202
+ allowedScopes?: string[];
56203
+ /** @description Canonical resource URI (https, no query or fragment), for example `https://mcp.example.com/mcp`. */
56204
+ resource: string;
56205
+ /**
56206
+ * @description Always `resource` in this release.
56207
+ * @enum {string}
56208
+ */
56209
+ targetKind?: "resource";
56210
+ /** @description Lowers the 300-second token lifetime for this resource. */
56211
+ ttlCeilingSeconds?: number | null;
56212
+ };
55349
56213
  ToolApprovalGrant: {
55350
56214
  agentId: string;
55351
56215
  createdAt: string;
@@ -57990,6 +58854,12 @@ export interface SandboxDeployEffectivePolicy {
57990
58854
  sleepPolicy?: SandboxDeploySleepPolicy;
57991
58855
  autoStopInterval?: number;
57992
58856
  autoDeleteInterval?: number;
58857
+ /** Runtype Sandbox: the container epoch the preview URL is bound to; a new epoch mints a new URL. */
58858
+ containerEpoch?: number;
58859
+ /** Runtype Sandbox: `true` when this deploy started a new container rather than reusing a running one. */
58860
+ freshContainer?: boolean;
58861
+ /** Runtype Sandbox: `true` when the URL differs from the previous successful deploy's; re-register any saved copy. */
58862
+ previewUrlChanged?: boolean;
57993
58863
  }
57994
58864
  export interface DeploySandboxRequest {
57995
58865
  code: string;
@@ -58028,7 +58898,7 @@ export interface DeployCfSandboxRequest {
58028
58898
  files?: Record<string, string>;
58029
58899
  /** Omission preserves unlimited legacy retention. Explicit policy requires lifecycle rollout enablement. */
58030
58900
  retention?: SandboxDeployRetention;
58031
- /** Legacy Runtype Sandbox supports idle sleep only; continuous keepAlive is unavailable. */
58901
+ /** `{ mode: 'never' }` keeps the container running until the retention deadline; requires retention of 10m, 1h or 24h. */
58032
58902
  sleepPolicy?: SandboxDeploySleepPolicy;
58033
58903
  }
58034
58904
  export interface DeployCfSandboxResponse {
@@ -58036,7 +58906,7 @@ export interface DeployCfSandboxResponse {
58036
58906
  previewUrl: string;
58037
58907
  output: string;
58038
58908
  status: 'running' | 'error';
58039
- stage?: 'validate_port' | 'validate_files' | 'write_package_json' | 'npm_install' | 'write_main_file' | 'write_additional_files' | 'start_process' | 'expose_port';
58909
+ stage?: 'validate_port' | 'validate_files' | 'write_package_json' | 'npm_install' | 'write_main_file' | 'write_additional_files' | 'start_process' | 'wait_for_port' | 'expose_port';
58040
58910
  error?: string;
58041
58911
  effectivePolicy?: SandboxDeployEffectivePolicy;
58042
58912
  }