@runtypelabs/sdk 10.13.6 → 10.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
@@ -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;
@@ -1291,6 +1339,8 @@ interface paths {
1291
1339
  endpoint: string;
1292
1340
  /** @enum {string} */
1293
1341
  framework?: "langchain" | "vercel_ai" | "crewai" | "cloudflare" | "autogen" | "flue" | "mastra" | "custom";
1342
+ /** @description Send a short-lived, Runtype-signed identity assertion (ES256 JWT, `aud` = endpoint host) in the `X-Runtype-Identity` header. Requires a tenancy strategy and a resolved tenant or end user; a call without one is refused before it reaches the agent. */
1343
+ identityAssertion?: boolean;
1294
1344
  /** @enum {string} */
1295
1345
  protocol?: "a2a" | "runtype-stream";
1296
1346
  retryCount?: number;
@@ -2235,7 +2285,7 @@ interface paths {
2235
2285
  };
2236
2286
  /**
2237
2287
  * Update agent
2238
- * @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.
2239
2289
  */
2240
2290
  put: {
2241
2291
  parameters: {
@@ -2650,6 +2700,8 @@ interface paths {
2650
2700
  endpoint?: string;
2651
2701
  /** @enum {string|null} */
2652
2702
  framework?: "langchain" | "vercel_ai" | "crewai" | "cloudflare" | "autogen" | "flue" | "mastra" | "custom" | null;
2703
+ /** @description Send a short-lived, Runtype-signed identity assertion (ES256 JWT, `aud` = endpoint host) in the `X-Runtype-Identity` header. Requires a tenancy strategy and a resolved tenant or end user; a call without one is refused before it reaches the agent. */
2704
+ identityAssertion?: boolean | null;
2653
2705
  /** @enum {string|null} */
2654
2706
  protocol?: "a2a" | "runtype-stream" | null;
2655
2707
  retryCount?: number | null;
@@ -4284,6 +4336,345 @@ interface paths {
4284
4336
  patch?: never;
4285
4337
  trace?: never;
4286
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
+ };
4287
4678
  "/v1/agents/{id}/deployments": {
4288
4679
  parameters: {
4289
4680
  query?: never;
@@ -4454,13 +4845,13 @@ interface paths {
4454
4845
  "application/json": components["schemas"]["AsyncDispatchHandle"];
4455
4846
  };
4456
4847
  };
4457
- /** @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) */
4458
4849
  400: {
4459
4850
  headers: {
4460
4851
  [name: string]: unknown;
4461
4852
  };
4462
4853
  content: {
4463
- "application/json": components["schemas"]["Error"];
4854
+ "application/json": components["schemas"]["Error"] | components["schemas"]["IdentityAssertionUnavailableError"];
4464
4855
  };
4465
4856
  };
4466
4857
  /** @description Unauthorized */
@@ -5321,10 +5712,12 @@ interface paths {
5321
5712
  };
5322
5713
  /**
5323
5714
  * Export agent for runtime
5324
- * @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.
5325
5716
  *
5326
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.
5327
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
+ *
5328
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`.
5329
5722
  */
5330
5723
  get: {
@@ -5345,7 +5738,7 @@ interface paths {
5345
5738
  };
5346
5739
  requestBody?: never;
5347
5740
  responses: {
5348
- /** @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. */
5349
5742
  200: {
5350
5743
  headers: {
5351
5744
  [name: string]: unknown;
@@ -5375,6 +5768,8 @@ interface paths {
5375
5768
  };
5376
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. */
5377
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"][];
5378
5773
  };
5379
5774
  "application/zip": string;
5380
5775
  };
@@ -5415,13 +5810,13 @@ interface paths {
5415
5810
  "application/json": components["schemas"]["Error"];
5416
5811
  };
5417
5812
  };
5418
- /** @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) */
5419
5814
  422: {
5420
5815
  headers: {
5421
5816
  [name: string]: unknown;
5422
5817
  };
5423
5818
  content: {
5424
- "application/json": components["schemas"]["Error"];
5819
+ "application/json": components["schemas"]["RuntimeExportError"];
5425
5820
  };
5426
5821
  };
5427
5822
  /** @description Internal server error */
@@ -5894,7 +6289,100 @@ interface paths {
5894
6289
  patch?: never;
5895
6290
  trace?: never;
5896
6291
  };
5897
- "/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}": {
5898
6386
  parameters: {
5899
6387
  query?: never;
5900
6388
  header?: never;
@@ -5902,33 +6390,30 @@ interface paths {
5902
6390
  cookie?: never;
5903
6391
  };
5904
6392
  /**
5905
- * List managed agent runs
5906
- * @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.
5907
6395
  */
5908
6396
  get: {
5909
6397
  parameters: {
5910
- query?: {
5911
- /** @description Scope to a single conversation key. */
5912
- conversationId?: string;
5913
- /** @description Max rows to return (default 50, capped at 200). */
5914
- limit?: number;
5915
- };
6398
+ query?: never;
5916
6399
  header?: never;
5917
6400
  path: {
5918
6401
  id: string;
6402
+ runId: string;
5919
6403
  };
5920
6404
  cookie?: never;
5921
6405
  };
5922
6406
  requestBody?: never;
5923
6407
  responses: {
5924
- /** @description The agent run summaries */
6408
+ /** @description The run summary and its deliverables */
5925
6409
  200: {
5926
6410
  headers: {
5927
6411
  [name: string]: unknown;
5928
6412
  };
5929
6413
  content: {
5930
6414
  "application/json": {
5931
- runs: components["schemas"]["ManagedAgentRunSummary"][];
6415
+ outputs: components["schemas"]["ManagedAgentRunOutput"][];
6416
+ run: components["schemas"]["ManagedAgentRunSummary"];
5932
6417
  };
5933
6418
  };
5934
6419
  };
@@ -5959,7 +6444,7 @@ interface paths {
5959
6444
  "application/json": components["schemas"]["Error"];
5960
6445
  };
5961
6446
  };
5962
- /** @description Agent not found */
6447
+ /** @description Agent or run not found */
5963
6448
  404: {
5964
6449
  headers: {
5965
6450
  [name: string]: unknown;
@@ -5987,7 +6472,7 @@ interface paths {
5987
6472
  patch?: never;
5988
6473
  trace?: never;
5989
6474
  };
5990
- "/v1/agents/{id}/runs/{runId}": {
6475
+ "/v1/agents/{id}/token-audience-policy": {
5991
6476
  parameters: {
5992
6477
  query?: never;
5993
6478
  header?: never;
@@ -5995,34 +6480,31 @@ interface paths {
5995
6480
  cookie?: never;
5996
6481
  };
5997
6482
  /**
5998
- * Get a managed agent run
5999
- * @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.
6000
6485
  */
6001
6486
  get: {
6002
6487
  parameters: {
6003
6488
  query?: never;
6004
6489
  header?: never;
6005
6490
  path: {
6491
+ /** @description Agent ID */
6006
6492
  id: string;
6007
- runId: string;
6008
6493
  };
6009
6494
  cookie?: never;
6010
6495
  };
6011
6496
  requestBody?: never;
6012
6497
  responses: {
6013
- /** @description The run summary and its deliverables */
6498
+ /** @description The policy */
6014
6499
  200: {
6015
6500
  headers: {
6016
6501
  [name: string]: unknown;
6017
6502
  };
6018
6503
  content: {
6019
- "application/json": {
6020
- outputs: components["schemas"]["ManagedAgentRunOutput"][];
6021
- run: components["schemas"]["ManagedAgentRunSummary"];
6022
- };
6504
+ "application/json": components["schemas"]["TokenAudiencePolicy"];
6023
6505
  };
6024
6506
  };
6025
- /** @description Invalid agent ID */
6507
+ /** @description Invalid request */
6026
6508
  400: {
6027
6509
  headers: {
6028
6510
  [name: string]: unknown;
@@ -6040,7 +6522,7 @@ interface paths {
6040
6522
  "application/json": components["schemas"]["Error"];
6041
6523
  };
6042
6524
  };
6043
- /** @description Insufficient permissions */
6525
+ /** @description Forbidden */
6044
6526
  403: {
6045
6527
  headers: {
6046
6528
  [name: string]: unknown;
@@ -6049,7 +6531,7 @@ interface paths {
6049
6531
  "application/json": components["schemas"]["Error"];
6050
6532
  };
6051
6533
  };
6052
- /** @description Agent or run not found */
6534
+ /** @description Agent or credential not found */
6053
6535
  404: {
6054
6536
  headers: {
6055
6537
  [name: string]: unknown;
@@ -6058,8 +6540,75 @@ interface paths {
6058
6540
  "application/json": components["schemas"]["Error"];
6059
6541
  };
6060
6542
  };
6061
- /** @description Internal server error */
6062
- 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: {
6063
6612
  headers: {
6064
6613
  [name: string]: unknown;
6065
6614
  };
@@ -6069,7 +6618,6 @@ interface paths {
6069
6618
  };
6070
6619
  };
6071
6620
  };
6072
- put?: never;
6073
6621
  post?: never;
6074
6622
  delete?: never;
6075
6623
  options?: never;
@@ -7298,7 +7846,7 @@ interface paths {
7298
7846
  put?: never;
7299
7847
  /**
7300
7848
  * Submit a batch flow execution
7301
- * @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.
7302
7850
  */
7303
7851
  post: {
7304
7852
  parameters: {
@@ -7406,6 +7954,15 @@ interface paths {
7406
7954
  "application/json": components["schemas"]["Error"];
7407
7955
  };
7408
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
+ };
7409
7966
  /** @description Rate limit exceeded */
7410
7967
  429: {
7411
7968
  headers: {
@@ -21039,9 +21596,11 @@ interface paths {
21039
21596
  };
21040
21597
  /**
21041
21598
  * Export flow for runtime (limited preview)
21042
- * @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.
21043
21600
  *
21044
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.
21045
21604
  */
21046
21605
  get: {
21047
21606
  parameters: {
@@ -21076,6 +21635,8 @@ interface paths {
21076
21635
  steps: {
21077
21636
  [key: string]: unknown;
21078
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"][];
21079
21640
  };
21080
21641
  };
21081
21642
  };
@@ -21115,6 +21676,15 @@ interface paths {
21115
21676
  "application/json": components["schemas"]["Error"];
21116
21677
  };
21117
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
+ };
21118
21688
  /** @description Internal server error */
21119
21689
  500: {
21120
21690
  headers: {
@@ -21964,6 +22534,116 @@ interface paths {
21964
22534
  };
21965
22535
  trace?: never;
21966
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
+ };
21967
22647
  "/v1/integration-configs": {
21968
22648
  parameters: {
21969
22649
  query?: never;
@@ -31616,6 +32296,10 @@ interface paths {
31616
32296
  publishedVersionIds?: {
31617
32297
  [key: string]: string | null;
31618
32298
  };
32299
+ /** @description Display name per capability flow or agent id */
32300
+ resourceNames?: {
32301
+ [key: string]: string;
32302
+ };
31619
32303
  /** @description Tool ids from each capability agent config (tools.toolIds) */
31620
32304
  toolIdsByAgent?: {
31621
32305
  [key: string]: string[];
@@ -43300,7 +43984,7 @@ interface paths {
43300
43984
  put?: never;
43301
43985
  /**
43302
43986
  * Send a rendered email from a standalone runtime
43303
- * @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`).
43304
43988
  */
43305
43989
  post: {
43306
43990
  parameters: {
@@ -43380,7 +44064,7 @@ interface paths {
43380
44064
  "application/json": components["schemas"]["RuntimeEmailAdmissionError"];
43381
44065
  };
43382
44066
  };
43383
- /** @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`) */
43384
44068
  403: {
43385
44069
  headers: {
43386
44070
  [name: string]: unknown;
@@ -44707,13 +45391,13 @@ interface paths {
44707
45391
  };
44708
45392
  };
44709
45393
  };
44710
- /** @description Validation error */
45394
+ /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
44711
45395
  400: {
44712
45396
  headers: {
44713
45397
  [name: string]: unknown;
44714
45398
  };
44715
45399
  content: {
44716
- "application/json": components["schemas"]["Error"];
45400
+ "application/json": components["schemas"]["ScheduleValidationError"];
44717
45401
  };
44718
45402
  };
44719
45403
  /** @description Unauthorized */
@@ -44921,13 +45605,13 @@ interface paths {
44921
45605
  "application/json": components["schemas"]["ScheduleEnsureResponse"];
44922
45606
  };
44923
45607
  };
44924
- /** @description Validation error */
45608
+ /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
44925
45609
  400: {
44926
45610
  headers: {
44927
45611
  [name: string]: unknown;
44928
45612
  };
44929
45613
  content: {
44930
- "application/json": components["schemas"]["Error"];
45614
+ "application/json": components["schemas"]["ScheduleValidationError"];
44931
45615
  };
44932
45616
  };
44933
45617
  /** @description Unauthorized */
@@ -45483,13 +46167,13 @@ interface paths {
45483
46167
  };
45484
46168
  };
45485
46169
  };
45486
- /** @description Validation error */
46170
+ /** @description Validation error, or SCHEDULE_AGENT_CONFIG_UNSUPPORTED for an agent a schedule cannot run */
45487
46171
  400: {
45488
46172
  headers: {
45489
46173
  [name: string]: unknown;
45490
46174
  };
45491
46175
  content: {
45492
- "application/json": components["schemas"]["Error"];
46176
+ "application/json": components["schemas"]["ScheduleValidationError"];
45493
46177
  };
45494
46178
  };
45495
46179
  /** @description Unauthorized */
@@ -48685,8 +49369,14 @@ interface paths {
48685
49369
  requestBody: {
48686
49370
  content: {
48687
49371
  "application/json": {
49372
+ /** @description Reuse a previous delivery ID (`X-GitHub-Delivery`), so the ingress can show it handles a repeat once. */
49373
+ deliveryId?: string;
48688
49374
  /** @enum {string} */
48689
49375
  fixture: "github.pull_request.opened" | "github.pull_request.merged_plan";
49376
+ /** @description Send and sign this payload instead of the fixture built from the pull request (an edited fixture). */
49377
+ payload?: {
49378
+ [key: string]: unknown;
49379
+ };
48690
49380
  planningPath?: string;
48691
49381
  pullRequest: number;
48692
49382
  repeat?: number;
@@ -49054,6 +49744,7 @@ interface paths {
49054
49744
  toolType: string;
49055
49745
  updatedAt: string;
49056
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. */
49057
49748
  validation?: {
49058
49749
  recommendations?: components["schemas"]["FlowValidationIssue"][];
49059
49750
  warnings: {
@@ -49553,6 +50244,7 @@ interface paths {
49553
50244
  toolType: string;
49554
50245
  updatedAt: string;
49555
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. */
49556
50248
  validation?: {
49557
50249
  recommendations?: components["schemas"]["FlowValidationIssue"][];
49558
50250
  warnings: {
@@ -49709,7 +50401,7 @@ interface paths {
49709
50401
  put?: never;
49710
50402
  /**
49711
50403
  * Deploy Runtype Sandbox
49712
- * @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.
49713
50405
  */
49714
50406
  post: {
49715
50407
  parameters: {
@@ -49760,11 +50452,17 @@ interface paths {
49760
50452
  effectivePolicy?: {
49761
50453
  autoDeleteInterval?: number;
49762
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;
49763
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;
49764
50460
  /** @enum {string} */
49765
50461
  metering: "active" | "legacy-untracked";
49766
50462
  /** @enum {string} */
49767
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;
49768
50466
  /** @enum {string} */
49769
50467
  retention: "10m" | "1h" | "24h" | "unlimited";
49770
50468
  sleepPolicy?: {
@@ -49976,11 +50674,17 @@ interface paths {
49976
50674
  effectivePolicy?: {
49977
50675
  autoDeleteInterval?: number;
49978
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;
49979
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;
49980
50682
  /** @enum {string} */
49981
50683
  metering: "active" | "legacy-untracked";
49982
50684
  /** @enum {string} */
49983
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;
49984
50688
  /** @enum {string} */
49985
50689
  retention: "10m" | "1h" | "24h" | "unlimited";
49986
50690
  sleepPolicy?: {
@@ -50367,6 +51071,7 @@ interface paths {
50367
51071
  toolType: string;
50368
51072
  updatedAt: string;
50369
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. */
50370
51075
  validation?: {
50371
51076
  recommendations?: components["schemas"]["FlowValidationIssue"][];
50372
51077
  warnings: {
@@ -51590,6 +52295,23 @@ interface components {
51590
52295
  timestamp?: string;
51591
52296
  };
51592
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
+ };
51593
52315
  AgentApprovalContinuationJsonResponse: {
51594
52316
  blockReason?: string;
51595
52317
  code?: string;
@@ -51621,6 +52343,40 @@ interface components {
51621
52343
  /** @default true */
51622
52344
  streamResponse: boolean;
51623
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
+ };
51624
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. */
51625
52381
  AgentDeploymentPromotion: {
51626
52382
  sourceAgentId?: string;
@@ -51775,6 +52531,17 @@ interface components {
51775
52531
  /** @description The pinned versionNumber; null follows the published version. */
51776
52532
  version: number | null;
51777
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
+ };
51778
52545
  AgentPullResponse: {
51779
52546
  agentId: string;
51780
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. */
@@ -52171,6 +52938,15 @@ interface components {
52171
52938
  } & {
52172
52939
  [key: string]: unknown;
52173
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
+ };
52174
52950
  BuiltinToolExecuteResult: {
52175
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). */
52176
52952
  metadata?: {
@@ -52541,6 +53317,10 @@ interface components {
52541
53317
  toolName: string;
52542
53318
  }[];
52543
53319
  };
53320
+ CreateAgentClientSecretRequest: {
53321
+ /** @description Days until the secret expires; defaults to 90, at most 365. */
53322
+ lifetimeDays?: number;
53323
+ };
52544
53324
  CreateProductCommentRequest: {
52545
53325
  /**
52546
53326
  * @description `assistant` when the caller's client posts the Assistant's answer to an `@assistant`; defaults to `user`
@@ -54401,6 +55181,12 @@ interface components {
54401
55181
  x: string;
54402
55182
  y: string;
54403
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
+ };
54404
55190
  InputDeliveryReceipt: {
54405
55191
  deliveryId: string;
54406
55192
  executionId: string;
@@ -54830,6 +55616,31 @@ interface components {
54830
55616
  recordName?: string;
54831
55617
  schemaVersion: number;
54832
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
+ };
54833
55644
  ResolvedQuestionSet: {
54834
55645
  calibration: {
54835
55646
  createdAt: string;
@@ -55061,6 +55872,30 @@ interface components {
55061
55872
  error: string;
55062
55873
  message?: string;
55063
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
+ };
55064
55899
  RuntimeExportedSkill: {
55065
55900
  approvalDelta: string[];
55066
55901
  body: string;
@@ -55210,6 +56045,22 @@ interface components {
55210
56045
  */
55211
56046
  kind: "run" | "records" | "none";
55212
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
+ };
55213
56064
  SkillEnsureConflict: {
55214
56065
  /** @enum {string} */
55215
56066
  code: "external_modification" | "remote_changed";
@@ -55336,6 +56187,29 @@ interface components {
55336
56187
  surfaceId: string;
55337
56188
  updatedAt: string | null;
55338
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
+ };
55339
56213
  ToolApprovalGrant: {
55340
56214
  agentId: string;
55341
56215
  createdAt: string;
@@ -57980,6 +58854,12 @@ export interface SandboxDeployEffectivePolicy {
57980
58854
  sleepPolicy?: SandboxDeploySleepPolicy;
57981
58855
  autoStopInterval?: number;
57982
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;
57983
58863
  }
57984
58864
  export interface DeploySandboxRequest {
57985
58865
  code: string;
@@ -58018,7 +58898,7 @@ export interface DeployCfSandboxRequest {
58018
58898
  files?: Record<string, string>;
58019
58899
  /** Omission preserves unlimited legacy retention. Explicit policy requires lifecycle rollout enablement. */
58020
58900
  retention?: SandboxDeployRetention;
58021
- /** 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. */
58022
58902
  sleepPolicy?: SandboxDeploySleepPolicy;
58023
58903
  }
58024
58904
  export interface DeployCfSandboxResponse {
@@ -58026,7 +58906,7 @@ export interface DeployCfSandboxResponse {
58026
58906
  previewUrl: string;
58027
58907
  output: string;
58028
58908
  status: 'running' | 'error';
58029
- 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';
58030
58910
  error?: string;
58031
58911
  effectivePolicy?: SandboxDeployEffectivePolicy;
58032
58912
  }