@cadenya/cadenya 1.5.0 → 1.7.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/types.d.ts CHANGED
@@ -243,12 +243,25 @@ export interface AccountSpec {
243
243
  workspaces: Array<Workspace>;
244
244
  }
245
245
  /**
246
- * Attach a single tool, tool set, or sub-agent to a variation. Exactly one
246
+ * Activate an inactive pool.
247
+ */
248
+ export interface ActivateAgentPoolRequest {
249
+ /**
250
+ * Workspace ID.
251
+ */
252
+ workspaceId?: string;
253
+ /**
254
+ * AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
255
+ */
256
+ id?: string;
257
+ }
258
+ /**
259
+ * Attach a single tool, tool set, sub-agent, or agent pool to a variation. Exactly one
247
260
  * of the target fields must be set; the assignment kind is inferred from the
248
261
  * populated field. Adding an existing target returns AlreadyExists.
249
262
  * All targets must be in the variation's workspace and eligible for assignment.
250
263
  */
251
- export type AddAgentVariationAssignmentRequest = AddAgentVariationAssignmentRequest_ToolId | AddAgentVariationAssignmentRequest_ToolSetId | AddAgentVariationAssignmentRequest_SubAgentId;
264
+ export type AddAgentVariationAssignmentRequest = AddAgentVariationAssignmentRequest_ToolId | AddAgentVariationAssignmentRequest_ToolSetId | AddAgentVariationAssignmentRequest_SubAgentId | AddAgentVariationAssignmentRequest_AgentPoolId;
252
265
  /**
253
266
  * Attach a memory layer to a variation. Use UpdateAgentVariationMemoryLayer or
254
267
  * replace the spec list to reposition an existing layer. Rejected when:
@@ -337,6 +350,97 @@ export interface AgentInfo {
337
350
  variationCount: number;
338
351
  createdBy?: Profile;
339
352
  }
353
+ /**
354
+ * Output only. Pools are created INACTIVE. Use :activate, :deactivate,
355
+ * :archive, and :unarchive to transition states. Unarchive returns INACTIVE.
356
+ */
357
+ export type AgentPoolState = 'AGENT_POOL_STATE_UNSPECIFIED' | 'AGENT_POOL_STATE_ACTIVE' | 'AGENT_POOL_STATE_INACTIVE' | 'AGENT_POOL_STATE_ARCHIVED';
358
+ /**
359
+ * A workspace-scoped group of agents. When assigned to a variation, the pool
360
+ * exposes one callable target that routes a request to a member agent.
361
+ * Pool membership references agents; variation assignments reference the pool.
362
+ */
363
+ export interface AgentPool {
364
+ metadata: ResourceMetadata;
365
+ spec: AgentPoolSpec;
366
+ info?: AgentPoolInfo;
367
+ /**
368
+ * Output only. Pools are created INACTIVE. Use :activate, :deactivate,
369
+ * :archive, and :unarchive to transition states. Unarchive returns INACTIVE.
370
+ */
371
+ state: AgentPoolState;
372
+ }
373
+ /**
374
+ * A member of a pool, identified by its agent ID. This is distinct from a
375
+ * VariationAssignment, which attaches the entire pool to a variation.
376
+ */
377
+ export interface AgentPoolAssignment {
378
+ /**
379
+ * Canonical ID of an agent in the pool's workspace.
380
+ */
381
+ agentId: string;
382
+ }
383
+ /**
384
+ * AgentPoolInfo represents the information of an agent pool.
385
+ */
386
+ export interface AgentPoolInfo {
387
+ /**
388
+ * Number of member agents in spec.assignments.
389
+ */
390
+ assignedAgents: number;
391
+ createdBy: Profile;
392
+ }
393
+ /**
394
+ * AgentPoolSpec describes the pool's purpose, membership, input schema, and routing instructions.
395
+ */
396
+ export interface AgentPoolSpec {
397
+ /**
398
+ * Describes when a calling agent should use this pool.
399
+ */
400
+ description: string;
401
+ /**
402
+ * JSON Schema defining the input arguments for this pool's callable tool.
403
+ * When the pool is assigned to an agent variation, this schema tells the LLM
404
+ * what arguments to supply. The supplied arguments provide the context used
405
+ * to route the request to an agent in the pool.
406
+ */
407
+ state?: Record<string, unknown>;
408
+ /**
409
+ * Complete set of member agents, all in the pool's workspace. At least one
410
+ * member is required. Order has no meaning; duplicate agent IDs are invalid.
411
+ */
412
+ assignments: Array<AgentPoolAssignment>;
413
+ /**
414
+ * Instructions for routing requests to an agent in the pool.
415
+ * If empty, defaults to "Which agent is best suited to handle this request?".
416
+ */
417
+ instructions?: string;
418
+ }
419
+ /**
420
+ * Partial input for UpdateAgentPool. The server applies update_mask, then
421
+ * validates the resulting AgentPoolSpec before persisting any changes.
422
+ */
423
+ export interface AgentPoolUpdateSpec {
424
+ /**
425
+ * Omit to leave unchanged, unless the mask selects this field or all of spec.
426
+ */
427
+ description?: string;
428
+ /**
429
+ * JSON Schema for the pool's callable input arguments. Update through
430
+ * spec.state in the update mask.
431
+ */
432
+ state?: Record<string, unknown>;
433
+ /**
434
+ * Replacement membership. A selected empty list is invalid because a pool
435
+ * must retain at least one member. Unselected fields remain unchanged.
436
+ */
437
+ assignments?: Array<AgentPoolAssignment>;
438
+ /**
439
+ * Routing instructions to update through spec.instructions in the update
440
+ * mask. Selecting this field with an empty value restores the default question.
441
+ */
442
+ instructions?: string;
443
+ }
340
444
  /**
341
445
  * The current lifecycle state of the schedule. Output only. Schedules are
342
446
  * created STATE_ACTIVE; use the :pause, :resume, and :archive actions to
@@ -553,23 +657,27 @@ export interface AgentVariationInfo {
553
657
  /**
554
658
  * Number of distinct callable tools available through this variation's
555
659
  * assignments after normalization. Expands tool sets and deduplicates tools
556
- * also assigned directly. Each sub-agent contributes one callable tool;
557
- * its own assignments are not expanded. Counts the full normalized set,
558
- * regardless of which tools progressive discovery has loaded.
660
+ * also assigned directly. Each sub-agent or pool contributes one callable
661
+ * tool; sub-agent assignments and pool members are not expanded. Counts the
662
+ * full normalized set, regardless of which tools progressive discovery has loaded.
559
663
  */
560
664
  effectiveToolCount: number;
561
665
  /**
562
666
  * Current display metadata for targets explicitly referenced by
563
667
  * spec.assignments and spec.memory_layer_assignments, keyed by canonical
564
- * resource ID. Includes tools, tool sets, sub-agents, and memory layers in
565
- * one map; each value's id equals its key. Does not expand tools within
566
- * assigned tool sets or assignments within sub-agents.
668
+ * resource ID. Includes tools, tool sets, sub-agents, agent pools,
669
+ * and memory layers in one map; each value's id equals its key. Does not expand
670
+ * tools within assigned tool sets, assignments within sub-agents, or pool members.
567
671
  * Populated whenever info is returned; empty when there are no assignments.
568
672
  * Missing or inaccessible targets are omitted, and names may be absent.
569
673
  * Clients use spec for assignment type/order and fall back to the ID when
570
674
  * display metadata is unavailable. This map never accepts assignment writes.
571
675
  */
572
676
  assignmentMetadata: Record<string, BareMetadata>;
677
+ /**
678
+ * Number of agent pools assigned to this variation.
679
+ */
680
+ agentPoolCount: number;
573
681
  }
574
682
  /**
575
683
  * AgentVariationSpec defines the complete operational configuration for a
@@ -589,7 +697,7 @@ export interface AgentVariationSpec {
589
697
  * ProgressiveDiscovery is an optional config that, when set, will load a Cadenya provided tool that
590
698
  * can search for tools in the assigned tool sets or tools.
591
699
  *
592
- * Note: Sub-agents are always loaded as a tool regardless of this value.
700
+ * Note: Sub-agents and agent pools are always loaded as tools regardless of this value.
593
701
  */
594
702
  progressiveDiscovery?: AgentVariationSpec_ProgressiveDiscovery;
595
703
  /**
@@ -619,7 +727,7 @@ export interface AgentVariationSpec {
619
727
  */
620
728
  firstUserMessageTemplate?: string;
621
729
  /**
622
- * Complete set of assigned tools, tool sets, and sub-agents. Order has no
730
+ * Complete set of assigned tools, tool sets, sub-agents, and agent pools. Order has no
623
731
  * meaning. Duplicate (target kind, canonical target ID) pairs are collapsed.
624
732
  * On create, omitted or empty means no assignments. On update, selecting
625
733
  * spec.assignments in update_mask replaces the entire set; empty clears it.
@@ -764,6 +872,19 @@ export interface ApproveToolCallRequest {
764
872
  */
765
873
  toolCallId?: string;
766
874
  }
875
+ /**
876
+ * Archive an active or inactive pool, preserving membership and assignments.
877
+ */
878
+ export interface ArchiveAgentPoolRequest {
879
+ /**
880
+ * Workspace ID.
881
+ */
882
+ workspaceId?: string;
883
+ /**
884
+ * AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
885
+ */
886
+ id?: string;
887
+ }
767
888
  /**
768
889
  * Archive agent request
769
890
  */
@@ -858,7 +979,7 @@ export interface BedrockConfig {
858
979
  * CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective
859
980
  * might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
860
981
  */
861
- export type CallableTool = CallableTool_Tool | CallableTool_Agent | CallableTool_CadenyaProvidedTool;
982
+ export type CallableTool = CallableTool_Tool | CallableTool_Agent | CallableTool_CadenyaProvidedTool | CallableTool_AgentPool;
862
983
  export interface CancelObjectiveRequest {
863
984
  workspaceId?: string;
864
985
  /**
@@ -926,7 +1047,7 @@ export interface Capability_TopK {
926
1047
  export interface Capability_TopP {
927
1048
  }
928
1049
  /**
929
- * Compact objective request — triggers compaction on a running objective.
1050
+ * Compact objective request. Compaction is queued for a busy agent loop and starts immediately for a waiting objective.
930
1051
  */
931
1052
  export interface CompactObjectiveRequest {
932
1053
  workspaceId?: string;
@@ -939,15 +1060,6 @@ export interface CompactObjectiveRequest {
939
1060
  */
940
1061
  compactionConfig?: AgentVariationSpec_CompactionConfig;
941
1062
  }
942
- /**
943
- * Compact objective response
944
- */
945
- export interface CompactObjectiveResponse {
946
- /**
947
- * The new context window created by the compaction
948
- */
949
- contextWindow?: ObjectiveContextWindowData;
950
- }
951
1063
  /**
952
1064
  * SummarizationStrategy configures LLM-powered summarization of older conversation turns.
953
1065
  */
@@ -1082,14 +1194,23 @@ export interface ContinueObjectiveRequest {
1082
1194
  */
1083
1195
  objectiveId?: string;
1084
1196
  /**
1085
- * The message to continue an objective that has completed (or you are enqueing)
1197
+ * The user message to send to the objective.
1086
1198
  */
1087
1199
  message: string;
1088
1200
  /**
1089
- * When set to true, the message will be enqueued for when the agent loop is available to process it.
1201
+ * When false, the objective must be waiting and the message is sent immediately.
1202
+ * When true, a waiting objective still receives the message immediately; an
1203
+ * objective whose agent loop is busy queues it instead, and the agent picks it
1204
+ * up before its next assistant turn. Queued messages can be listed and removed
1205
+ * until then.
1090
1206
  */
1091
1207
  enqueue?: boolean;
1092
1208
  }
1209
+ /**
1210
+ * ContinueObjectiveResponse reports whether the message joined the conversation
1211
+ * immediately or was queued for the agent loop.
1212
+ */
1213
+ export type ContinueObjectiveResponse = ContinueObjectiveResponse_Event | ContinueObjectiveResponse_QueuedAction;
1093
1214
  export interface CreateAIProviderKeyRequest {
1094
1215
  /**
1095
1216
  * The workspace that will own this key.
@@ -1129,6 +1250,17 @@ export interface CreateAccountResourceMetadata {
1129
1250
  */
1130
1251
  labels?: Record<string, string>;
1131
1252
  }
1253
+ /**
1254
+ * Create a pool in INACTIVE state. Validate and persist membership atomically.
1255
+ */
1256
+ export interface CreateAgentPoolRequest {
1257
+ /**
1258
+ * Workspace ID.
1259
+ */
1260
+ workspaceId?: string;
1261
+ metadata: CreateResourceMetadata;
1262
+ spec: AgentPoolSpec;
1263
+ }
1132
1264
  /**
1133
1265
  * Create agent request
1134
1266
  */
@@ -1176,6 +1308,124 @@ export interface CreateAgentVariationRequest {
1176
1308
  metadata: CreateResourceMetadata;
1177
1309
  spec: AgentVariationSpec;
1178
1310
  }
1311
+ /**
1312
+ * The request body for creating an objective and streaming its events.
1313
+ * Accepts everything Create objective accepts, and additionally requires
1314
+ * `metadata.externalId`, which is the idempotency key for the stream.
1315
+ */
1316
+ export interface CreateAndStreamObjectiveRequest {
1317
+ workspaceId: string;
1318
+ agentId: string;
1319
+ /**
1320
+ * Optional explicit variation selection. Overrides the agent's variation_selection_mode.
1321
+ */
1322
+ variationId?: string;
1323
+ /**
1324
+ * Required here, though Create objective leaves it optional: the external
1325
+ * ID inside it is the idempotency key that makes a retry of this request
1326
+ * resume the objective instead of starting another.
1327
+ */
1328
+ metadata: CreateAndStreamObjectiveRequest_Metadata;
1329
+ /**
1330
+ * Arbitrary data rendered into the selected variation's system_prompt_template
1331
+ * (liquid) to produce the objective's system prompt. If the agent has a
1332
+ * system_prompt_data_schema, this must satisfy it.
1333
+ */
1334
+ systemPromptData?: Record<string, unknown>;
1335
+ /**
1336
+ * Optional explicit first user message for the LLM chat history. When not set,
1337
+ * the selected variation's first_user_message_template is rendered with
1338
+ * first_user_message_data instead. If neither this field nor a
1339
+ * first_user_message_template is present, the request is rejected with InvalidArgument.
1340
+ */
1341
+ firstUserMessage?: string;
1342
+ /**
1343
+ * Secrets that can be used in the headers for tool calls using the secret interpolation format.
1344
+ */
1345
+ secrets?: Array<CreateObjectiveRequest_Secret>;
1346
+ /**
1347
+ * Memory layers/entries layered over the baseline cascade inherited
1348
+ * from the selected variation — element-level rules over inherited
1349
+ * styles, in CSS terms.
1350
+ *
1351
+ * Array order is resolution order: EARLIER elements are more specific
1352
+ * and are consulted first. Entries pinned via memory_entry_id behave
1353
+ * as single-entry layers at their position.
1354
+ *
1355
+ * System-managed layers (e.g., episodic) cannot be referenced here;
1356
+ * they attach themselves automatically based on the episodic key.
1357
+ *
1358
+ * Size cap: the TOTAL effective cascade (this field + the variation's
1359
+ * memory layer assignments) must not exceed 10 entries. A request
1360
+ * that would produce a larger cascade is rejected with
1361
+ * InvalidArgument.
1362
+ */
1363
+ memoryCascade?: Array<MemoryReference>;
1364
+ /**
1365
+ * Arbitrary data rendered into the selected variation's first_user_message_template
1366
+ * (liquid) to produce the first user message. Separate from `system_prompt_data`,
1367
+ * which renders the system prompt template.
1368
+ */
1369
+ firstUserMessageData?: Record<string, unknown>;
1370
+ /**
1371
+ * If the agent variation that is selected has episodic memory enabled, then this key is used to create/update a memory layer
1372
+ * specific to the episodic memory. The layer may have a TTL configured by the variation.
1373
+ */
1374
+ episodicMemory?: ObjectiveEpisodicConfig;
1375
+ /**
1376
+ * Optional tenant assertion — the customer's org/company identifier for the
1377
+ * end user this objective serves. Upserts the tenant record in the
1378
+ * workspace and associates the objective with it.
1379
+ */
1380
+ tenant?: TenantAssertion;
1381
+ /**
1382
+ * Optional subject assertion — the person within the tenant this objective
1383
+ * serves. Requires `tenant`; a subject asserted without a tenant is
1384
+ * rejected with InvalidArgument.
1385
+ */
1386
+ subject?: SubjectAssertion;
1387
+ /**
1388
+ * Parameters forced onto this objective's tool calls. A pinned parameter
1389
+ * is removed from the tool schema the LLM sees, and its value is always
1390
+ * overwritten server-side with the pinned value — the model cannot choose
1391
+ * a different value for it. By default a pinned key applies to every tool
1392
+ * with a top-level parameter of the same name; a tool set's overlays
1393
+ * (ToolSetSpec.overlays) can bind pinned keys to nested paths, differently
1394
+ * named parameters, or a subset of tools.
1395
+ */
1396
+ pinnedParameters?: Record<string, string>;
1397
+ }
1398
+ /**
1399
+ * Objective metadata, with an external ID that is required here because
1400
+ * it is the request's idempotency key: repeating a request that carries
1401
+ * an external ID already in use attaches to that objective instead of
1402
+ * starting a second one.
1403
+ */
1404
+ export interface CreateAndStreamObjectiveRequest_Metadata {
1405
+ /**
1406
+ * Key-value pairs for categorization and filtering. Values are 0-63
1407
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
1408
+ * follow the same shape and additionally accept an optional DNS-subdomain
1409
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
1410
+ * Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}
1411
+ */
1412
+ labels?: Record<string, string>;
1413
+ /**
1414
+ * External ID for the objective (e.g., a workflow ID from an external
1415
+ * system), and this request's idempotency key. Required here, though
1416
+ * Create objective leaves it optional. Reusing a value that already
1417
+ * exists in the workspace attaches to that objective and streams it
1418
+ * rather than creating another; Create objective instead rejects a
1419
+ * duplicate with AlreadyExists.
1420
+ */
1421
+ externalId: string;
1422
+ }
1423
+ /**
1424
+ * One message on the create-and-stream feed. The first message is always
1425
+ * the `objective` variant, sent as soon as the objective exists; every
1426
+ * message after it is an `event`.
1427
+ */
1428
+ export type CreateAndStreamObjectiveResponse = CreateAndStreamObjectiveResponse_Objective | CreateAndStreamObjectiveResponse_Event;
1179
1429
  export interface CreateMemoryEntryRequest {
1180
1430
  workspaceId?: string;
1181
1431
  /**
@@ -1234,7 +1484,7 @@ export interface CreateObjectiveRequest {
1234
1484
  * (liquid) to produce the objective's system prompt. If the agent has a
1235
1485
  * system_prompt_data_schema, this must satisfy it.
1236
1486
  */
1237
- systemPromptData: Record<string, unknown>;
1487
+ systemPromptData?: Record<string, unknown>;
1238
1488
  /**
1239
1489
  * Optional explicit first user message for the LLM chat history. When not set,
1240
1490
  * the selected variation's first_user_message_template is rendered with
@@ -1465,6 +1715,19 @@ export interface CredentialGoogleServiceAccount {
1465
1715
  export interface CredentialHeaders {
1466
1716
  headers?: Record<string, string>;
1467
1717
  }
1718
+ /**
1719
+ * Deactivate an active pool.
1720
+ */
1721
+ export interface DeactivateAgentPoolRequest {
1722
+ /**
1723
+ * Workspace ID.
1724
+ */
1725
+ workspaceId?: string;
1726
+ /**
1727
+ * AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
1728
+ */
1729
+ id?: string;
1730
+ }
1468
1731
  /**
1469
1732
  * Delete tenant widget sessions response.
1470
1733
  */
@@ -1560,6 +1823,16 @@ export interface GoogleProtobufAny {
1560
1823
  */
1561
1824
  '@type'?: string;
1562
1825
  }
1826
+ /**
1827
+ * InterruptObjectiveRequest stops a running objective without cancelling background agents.
1828
+ */
1829
+ export interface InterruptObjectiveRequest {
1830
+ workspaceId?: string;
1831
+ /**
1832
+ * Supports the "external_id:" prefix.
1833
+ */
1834
+ objectiveId?: string;
1835
+ }
1563
1836
  export interface ListAIProviderKeysResponse {
1564
1837
  items: Array<AIProviderKey>;
1565
1838
  pagination?: Page;
@@ -1579,6 +1852,13 @@ export interface ListAgentFeedbackResponse {
1579
1852
  items: Array<ObjectiveFeedback>;
1580
1853
  pagination?: Page;
1581
1854
  }
1855
+ /**
1856
+ * List agent pools response
1857
+ */
1858
+ export interface ListAgentPoolsResponse {
1859
+ items: Array<AgentPool>;
1860
+ pagination?: Page;
1861
+ }
1582
1862
  /**
1583
1863
  * List agent schedules response.
1584
1864
  */
@@ -1637,6 +1917,13 @@ export interface ListObjectiveFeedbackResponse {
1637
1917
  items: Array<ObjectiveFeedback>;
1638
1918
  pagination?: Page;
1639
1919
  }
1920
+ export interface ListObjectiveQueuedActionsResponse {
1921
+ /**
1922
+ * Queued actions in the order they were sent, oldest first.
1923
+ */
1924
+ items: Array<ObjectiveQueuedAction>;
1925
+ pagination?: Page;
1926
+ }
1640
1927
  export interface ListObjectiveToolCallsResponse {
1641
1928
  items: Array<ObjectiveToolCall>;
1642
1929
  pagination?: Page;
@@ -2006,6 +2293,10 @@ export interface ModelBasePricing {
2006
2293
  * Default output token rate, in cents per million tokens.
2007
2294
  */
2008
2295
  outputPricePerMillionTokens: string;
2296
+ /**
2297
+ * Default cached input token rate, in cents per million tokens.
2298
+ */
2299
+ cachedInputPricePerMillionTokens: string;
2009
2300
  }
2010
2301
  /**
2011
2302
  * ModelInfo carries server-derived, read-only details about a model.
@@ -2042,6 +2333,10 @@ export interface ModelPricingOverride {
2042
2333
  * Override for output token price, in cents per million tokens.
2043
2334
  */
2044
2335
  outputPricePerMillionTokens?: string;
2336
+ /**
2337
+ * Override for cached input token price, in cents per million tokens.
2338
+ */
2339
+ cachedInputPricePerMillionTokens?: string;
2045
2340
  }
2046
2341
  export interface ModelSpec {
2047
2342
  /**
@@ -2073,6 +2368,14 @@ export interface ModelSpec {
2073
2368
  * price on reads, see input_price_per_million_tokens.
2074
2369
  */
2075
2370
  outputPricePerMillionTokens: string;
2371
+ /**
2372
+ * Cost per million input tokens served from the provider's prompt cache, in
2373
+ * cents (e.g., 30 = $0.30). Cached tokens are a subset of the input tokens
2374
+ * and are billed at this rate instead of the input rate. Zero means the rate
2375
+ * is not known and cached tokens are costed at the input rate. Effective
2376
+ * price on reads, see input_price_per_million_tokens.
2377
+ */
2378
+ cachedInputPricePerMillionTokens?: string;
2076
2379
  /**
2077
2380
  * The inference knobs this model supports. Catalog data; drives which
2078
2381
  * ModelConfig fields a variation on this model may set. Reasoning support
@@ -2119,7 +2422,7 @@ export interface Notice {
2119
2422
  /**
2120
2423
  * The current lifecycle state of the objective.
2121
2424
  */
2122
- export type ObjectiveState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
2425
+ export type ObjectiveState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT' | 'OBJECTIVE_STATE_INTERRUPTING';
2123
2426
  /**
2124
2427
  * Objective is the data for an objective. It contains the snapshotted fields for the selected agent and variation. Secrets are returned
2125
2428
  * only with their names, and the output definition is copied from the agent's configuration.
@@ -2326,7 +2629,7 @@ export interface ObjectiveEvent {
2326
2629
  */
2327
2630
  startedAt?: string;
2328
2631
  }
2329
- export type ObjectiveEventData = ObjectiveEventData_UserMessage | ObjectiveEventData_ToolApprovalRequested | ObjectiveEventData_ToolApproved | ObjectiveEventData_ToolDenied | ObjectiveEventData_ToolCalled | ObjectiveEventData_Error | ObjectiveEventData_AssistantMessage | ObjectiveEventData_ToolResult | ObjectiveEventData_ToolError | ObjectiveEventData_ContextWindowCompacted | ObjectiveEventData_MemoryRead | ObjectiveEventData_Cancelled | ObjectiveEventData_SubAgentSpawned | ObjectiveEventData_SubAgentUpdated | ObjectiveEventData_Finalized | ObjectiveEventData_Notice | ObjectiveEventData_TimedOut | ObjectiveEventData_Reasoning | ObjectiveEventData_StateChanged | ObjectiveEventData_Heartbeat;
2632
+ export type ObjectiveEventData = ObjectiveEventData_UserMessage | ObjectiveEventData_ToolApprovalRequested | ObjectiveEventData_ToolApproved | ObjectiveEventData_ToolDenied | ObjectiveEventData_ToolCalled | ObjectiveEventData_Error | ObjectiveEventData_AssistantMessage | ObjectiveEventData_ToolResult | ObjectiveEventData_ToolError | ObjectiveEventData_ContextWindowCompacted | ObjectiveEventData_MemoryRead | ObjectiveEventData_Cancelled | ObjectiveEventData_SubAgentSpawned | ObjectiveEventData_SubAgentUpdated | ObjectiveEventData_Finalized | ObjectiveEventData_Notice | ObjectiveEventData_TimedOut | ObjectiveEventData_Reasoning | ObjectiveEventData_StateChanged | ObjectiveEventData_Heartbeat | ObjectiveEventData_Interrupted;
2330
2633
  export interface ObjectiveEventInfo {
2331
2634
  objective?: OperationMetadata;
2332
2635
  createdBy: Profile;
@@ -2451,15 +2754,51 @@ export interface ObjectiveInfo {
2451
2754
  */
2452
2755
  widget?: BareMetadata;
2453
2756
  }
2757
+ /**
2758
+ * ObjectiveInterrupted confirms that foreground execution stopped and the objective is waiting.
2759
+ */
2760
+ export interface ObjectiveInterrupted {
2761
+ message: string;
2762
+ }
2763
+ export type ObjectiveQueuedActionState = 'STATE_UNSPECIFIED' | 'STATE_QUEUED' | 'STATE_SENT' | 'STATE_REMOVED' | 'STATE_DISCARDED';
2764
+ /**
2765
+ * ObjectiveQueuedAction is work sent to an objective while its agent loop was
2766
+ * busy. The agent picks queued actions up in order at the next boundary where
2767
+ * it can act on them: after its current tool calls settle, before its next
2768
+ * assistant turn. Until then a queued action can be removed and the agent never
2769
+ * learns about it.
2770
+ */
2771
+ export interface ObjectiveQueuedAction {
2772
+ metadata: OperationMetadata;
2773
+ /**
2774
+ * The objective this action was sent to.
2775
+ */
2776
+ objectiveId: string;
2777
+ data: ObjectiveQueuedActionData;
2778
+ state: ObjectiveQueuedActionState;
2779
+ /**
2780
+ * When the agent loop picked the action up. Unset until the action is sent.
2781
+ */
2782
+ sentAt?: string;
2783
+ /**
2784
+ * The conversation event a sent user message became. Unset for other
2785
+ * actions and for user messages that have not been sent.
2786
+ */
2787
+ objectiveEventId?: string;
2788
+ }
2789
+ /**
2790
+ * ObjectiveQueuedActionData is the action to perform.
2791
+ */
2792
+ export type ObjectiveQueuedActionData = ObjectiveQueuedActionData_UserMessage | ObjectiveQueuedActionData_Compaction;
2454
2793
  /**
2455
2794
  * The state before this write. OBJECTIVE_STATE_UNSPECIFIED when the
2456
2795
  * objective was just created.
2457
2796
  */
2458
- export type ObjectiveStateChangedFromState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
2797
+ export type ObjectiveStateChangedFromState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT' | 'OBJECTIVE_STATE_INTERRUPTING';
2459
2798
  /**
2460
2799
  * The state after this write.
2461
2800
  */
2462
- export type ObjectiveStateChangedToState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
2801
+ export type ObjectiveStateChangedToState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT' | 'OBJECTIVE_STATE_INTERRUPTING';
2463
2802
  /**
2464
2803
  * ObjectiveStateChanged is written every time the objective's lifecycle state
2465
2804
  * is set, including the initial move into OBJECTIVE_STATE_PENDING at creation. Terminal
@@ -2513,7 +2852,7 @@ export interface ObjectiveTool {
2513
2852
  * Current status of the tool call
2514
2853
  */
2515
2854
  export type ObjectiveToolCallStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
2516
- export type ObjectiveToolCallExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
2855
+ export type ObjectiveToolCallExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT' | 'TOOL_CALL_EXECUTION_STATUS_INTERRUPTED';
2517
2856
  /**
2518
2857
  * ObjectiveToolCall is a record of a tool call made during an objective's execution.
2519
2858
  * Tool calls are mutable — their status changes as they are approved, denied, or executed.
@@ -2624,7 +2963,7 @@ export interface ObjectiveToolCallResult_TextBlock {
2624
2963
  * Current status of the tool call
2625
2964
  */
2626
2965
  export type ObjectiveToolCallWithResultStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
2627
- export type ObjectiveToolCallWithResultExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
2966
+ export type ObjectiveToolCallWithResultExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT' | 'TOOL_CALL_EXECUTION_STATUS_INTERRUPTED';
2628
2967
  /**
2629
2968
  * ObjectiveToolCallWithResult is an ObjectiveToolCall plus the content the
2630
2969
  * tool returned. Returned by GetObjectiveToolCall.
@@ -2881,6 +3220,21 @@ export interface PublishAgentRequest {
2881
3220
  */
2882
3221
  id?: string;
2883
3222
  }
3223
+ /**
3224
+ * QueuedCompaction is a compaction waiting to run.
3225
+ */
3226
+ export interface QueuedCompaction {
3227
+ /**
3228
+ * Optional compaction config override. When not set, uses the variation's compaction_config.
3229
+ */
3230
+ compactionConfig?: AgentVariationSpec_CompactionConfig;
3231
+ }
3232
+ /**
3233
+ * QueuedUserMessage is a user message waiting to join the conversation.
3234
+ */
3235
+ export interface QueuedUserMessage {
3236
+ content: string;
3237
+ }
2884
3238
  /**
2885
3239
  * Reasoning carries the human-readable reasoning text a model produced while
2886
3240
  * working on an iteration — extended thinking (Anthropic, Gemini) or reasoning
@@ -2899,7 +3253,7 @@ export interface Reasoning {
2899
3253
  * Detach a target by its foreign key. Removing an unassigned target returns
2900
3254
  * NotFound. The parent variation must exist and be accessible.
2901
3255
  */
2902
- export type RemoveAgentVariationAssignmentRequest = RemoveAgentVariationAssignmentRequest_ToolId | RemoveAgentVariationAssignmentRequest_ToolSetId | RemoveAgentVariationAssignmentRequest_SubAgentId;
3256
+ export type RemoveAgentVariationAssignmentRequest = RemoveAgentVariationAssignmentRequest_ToolId | RemoveAgentVariationAssignmentRequest_ToolSetId | RemoveAgentVariationAssignmentRequest_SubAgentId | RemoveAgentVariationAssignmentRequest_AgentPoolId;
2903
3257
  /**
2904
3258
  * Remove by memory layer ID. An unassigned layer returns NotFound.
2905
3259
  * The parent variation must still exist and be accessible.
@@ -2922,6 +3276,17 @@ export interface RemoveAgentVariationMemoryLayerRequest {
2922
3276
  */
2923
3277
  memoryLayerId: string;
2924
3278
  }
3279
+ export interface RemoveObjectiveQueuedActionRequest {
3280
+ workspaceId?: string;
3281
+ /**
3282
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
3283
+ */
3284
+ objectiveId?: string;
3285
+ /**
3286
+ * The ID of the queued action to remove.
3287
+ */
3288
+ queuedActionId?: string;
3289
+ }
2925
3290
  export type ResolvedSecretSource = 'RESOLVED_SECRET_SOURCE_UNSPECIFIED' | 'RESOLVED_SECRET_SOURCE_WORKSPACE' | 'RESOLVED_SECRET_SOURCE_TOOLSET' | 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
2926
3291
  /**
2927
3292
  * ResolvedSecret is a resolved secret value from the workspace, toolset, or objective. When a tool is called, it will rely
@@ -3911,6 +4276,38 @@ export interface ToolSetSpec {
3911
4276
  * request. Read-modify-write to add or remove a single overlay.
3912
4277
  */
3913
4278
  overlays?: Array<ToolOverlay>;
4279
+ /**
4280
+ * The tool set's secrets, identified by normalized name. Order has no
4281
+ * meaning. Values are write-only; reads return names only.
4282
+ *
4283
+ * On create, the tool set and its secrets are written together, so the first
4284
+ * sync and source validation already use them. On update, selecting
4285
+ * spec.secrets in update_mask replaces the set: names not listed are
4286
+ * deleted, listed names are created or have their value replaced, and a
4287
+ * listed name without a value keeps its stored value. An empty masked list
4288
+ * deletes every secret. Without a mask, a non-empty list creates or updates
4289
+ * the listed secrets and deletes nothing.
4290
+ */
4291
+ secrets?: Array<ToolSetSpec_Secret>;
4292
+ }
4293
+ /**
4294
+ * A secret scoped to this tool set. Adapter headers and tool configuration
4295
+ * reference it as `{{ secrets.NAME }}`. The same secrets are managed one at
4296
+ * a time through the tool set secret operations.
4297
+ */
4298
+ export interface ToolSetSpec_Secret {
4299
+ /**
4300
+ * Secret name, normalized to upper case with characters outside A-Z, 0-9
4301
+ * and _ replaced by _. It is also the secret's external id, so
4302
+ * `{{ secrets.<name> }}` resolves to it.
4303
+ */
4304
+ name: string;
4305
+ /**
4306
+ * Secret value. Write-only: never returned by any API, so reads list names
4307
+ * with an empty value. Required for a secret the tool set does not have
4308
+ * yet; on update, an entry without a value keeps the stored value.
4309
+ */
4310
+ value?: string;
3914
4311
  }
3915
4312
  /**
3916
4313
  * ToolSetUsage describes one agent variation that uses the tool set (or, when
@@ -3966,6 +4363,19 @@ export interface ToolSpec {
3966
4363
  * If the tool is an inline tool, the adapter will be Inline.
3967
4364
  */
3968
4365
  export type ToolSpec_Config = ToolSpec_Config_Http | ToolSpec_Config_Mcp | ToolSpec_Config_Openapi | ToolSpec_Config_Bare;
4366
+ /**
4367
+ * Restore an archived pool to INACTIVE; activate it separately to route requests.
4368
+ */
4369
+ export interface UnarchiveAgentPoolRequest {
4370
+ /**
4371
+ * Workspace ID.
4372
+ */
4373
+ workspaceId?: string;
4374
+ /**
4375
+ * AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
4376
+ */
4377
+ id?: string;
4378
+ }
3969
4379
  /**
3970
4380
  * Unarchive agent request
3971
4381
  */
@@ -4079,6 +4489,31 @@ export interface UpdateAccountResourceMetadata {
4079
4489
  */
4080
4490
  labels?: Record<string, string>;
4081
4491
  }
4492
+ /**
4493
+ * Update agent pool request
4494
+ */
4495
+ export interface UpdateAgentPoolRequest {
4496
+ /**
4497
+ * Workspace ID.
4498
+ */
4499
+ workspaceId?: string;
4500
+ /**
4501
+ * AgentPool ID. Accepts the canonical `apool_…` form or the `external_id:<value>` form.
4502
+ */
4503
+ id?: string;
4504
+ metadata?: UpdateResourceMetadata;
4505
+ spec?: AgentPoolUpdateSpec;
4506
+ /**
4507
+ * Fields to update. Only metadata and spec are mutable; top-level state and info
4508
+ * paths are invalid. spec.assignments replaces the entire membership list.
4509
+ * A spec mask replaces the full spec; * replaces all mutable fields.
4510
+ * Without a mask, infer paths from non-empty fields. Empty or omitted
4511
+ * membership then leaves the existing list unchanged. Element/index paths
4512
+ * are invalid. Validate the merged pool atomically: an empty description
4513
+ * or membership (including an explicitly masked empty list) is invalid.
4514
+ */
4515
+ updateMask?: string;
4516
+ }
4082
4517
  /**
4083
4518
  * Update agent request
4084
4519
  */
@@ -4202,8 +4637,9 @@ export interface UpdateMemoryLayerRequest {
4202
4637
  * Update model request. update_mask must list leaf paths: metadata.name,
4203
4638
  * metadata.external_id, metadata.labels, spec.provider_model_id,
4204
4639
  * spec.provider, spec.family, spec.max_input_tokens, spec.max_output_tokens,
4205
- * spec.capabilities, pricing_override.input_price_per_million_tokens, and
4206
- * pricing_override.output_price_per_million_tokens. Synced models
4640
+ * spec.capabilities, pricing_override.input_price_per_million_tokens,
4641
+ * pricing_override.output_price_per_million_tokens, and
4642
+ * pricing_override.cached_input_price_per_million_tokens. Synced models
4207
4643
  * (PROVENANCE_SYNCED_FROM_PROVIDER) reject metadata.name and spec.* paths.
4208
4644
  * spec price fields are never writable; price changes go through
4209
4645
  * pricing_override, where a masked-but-absent field clears the override.
@@ -4418,11 +4854,11 @@ export interface UserMessage {
4418
4854
  content: string;
4419
4855
  }
4420
4856
  /**
4421
- * A tool, tool set, or sub-agent assigned to a variation, identified only by
4857
+ * A tool, tool set, sub-agent, or agent pool assigned to a variation, identified only by
4422
4858
  * the target resource ID. The same shape is accepted in a spec and returned
4423
4859
  * on reads. Assignment junction records are an internal implementation detail.
4424
4860
  */
4425
- export type VariationAssignment = VariationAssignment_ToolId | VariationAssignment_ToolSetId | VariationAssignment_SubAgentId;
4861
+ export type VariationAssignment = VariationAssignment_ToolId | VariationAssignment_ToolSetId | VariationAssignment_SubAgentId | VariationAssignment_AgentPoolId;
4426
4862
  /**
4427
4863
  * A whole memory layer in a variation's baseline memory cascade. Identified
4428
4864
  * by the memory layer ID; no assignment junction ID is exposed. Entry pinning
@@ -4461,7 +4897,7 @@ export type WebhookDeliveryDataStatus = 'WEBHOOK_DELIVERY_STATUS_UNSPECIFIED' |
4461
4897
  /**
4462
4898
  * The type of objective event that triggered this webhook delivery
4463
4899
  */
4464
- export type WebhookDeliveryDataEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING' | 'OBJECTIVE_EVENT_TYPE_STATE_CHANGED' | 'OBJECTIVE_EVENT_TYPE_HEARTBEAT';
4900
+ export type WebhookDeliveryDataEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING' | 'OBJECTIVE_EVENT_TYPE_STATE_CHANGED' | 'OBJECTIVE_EVENT_TYPE_HEARTBEAT' | 'OBJECTIVE_EVENT_TYPE_INTERRUPTED';
4465
4901
  export interface WebhookDeliveryData {
4466
4902
  /**
4467
4903
  * Related resources
@@ -4496,6 +4932,21 @@ export interface WebhookDeliveryData {
4496
4932
  */
4497
4933
  responseContentLength: string;
4498
4934
  }
4935
+ /**
4936
+ * WhoamiResponse describes the authenticated caller.
4937
+ */
4938
+ export interface WhoamiResponse {
4939
+ /**
4940
+ * The caller's profile.
4941
+ */
4942
+ profile: Profile;
4943
+ /**
4944
+ * Metadata of the caller's default workspace: the one they chose, while
4945
+ * they can still access it, otherwise the first workspace they can access.
4946
+ * Unset when the caller can access no workspace.
4947
+ */
4948
+ defaultWorkspace?: AccountResourceMetadata;
4949
+ }
4499
4950
  /**
4500
4951
  * The current lifecycle state of the widget. Output only. Widgets are
4501
4952
  * created STATE_ACTIVE; use the :archive and :unarchive actions to
@@ -4846,6 +5297,13 @@ export interface VariationAssignment_SubAgentId {
4846
5297
  */
4847
5298
  subAgentId: string;
4848
5299
  }
5300
+ export interface VariationAssignment_AgentPoolId {
5301
+ type: 'agentPoolId';
5302
+ /**
5303
+ * Canonical agent pool ID. Attaches the pool as a single callable target.
5304
+ */
5305
+ agentPoolId: string;
5306
+ }
4849
5307
  export interface ObjectiveToolCallResult_ContentBlock_Text {
4850
5308
  type: 'text';
4851
5309
  text: ObjectiveToolCallResult_TextBlock;
@@ -5131,6 +5589,10 @@ export interface ObjectiveEventData_Heartbeat {
5131
5589
  type: 'heartbeat';
5132
5590
  heartbeat: ObjectiveHeartbeat;
5133
5591
  }
5592
+ export interface ObjectiveEventData_Interrupted {
5593
+ type: 'interrupted';
5594
+ interrupted: ObjectiveInterrupted;
5595
+ }
5134
5596
  export interface CallableTool_Tool {
5135
5597
  type: 'tool';
5136
5598
  tool: ResourceMetadata;
@@ -5143,6 +5605,13 @@ export interface CallableTool_CadenyaProvidedTool {
5143
5605
  type: 'cadenyaProvidedTool';
5144
5606
  cadenyaProvidedTool: ResourceMetadata;
5145
5607
  }
5608
+ export interface CallableTool_AgentPool {
5609
+ type: 'agentPool';
5610
+ /**
5611
+ * Agent pool responsible for routing this call to a member agent.
5612
+ */
5613
+ agentPool: ResourceMetadata;
5614
+ }
5146
5615
  export interface MemoryEntryCreateSpec_Content {
5147
5616
  type: 'content';
5148
5617
  /**
@@ -5170,6 +5639,34 @@ export interface MemoryEntryCreateSpec_UploadId {
5170
5639
  key: string;
5171
5640
  description?: string;
5172
5641
  }
5642
+ export interface ObjectiveQueuedActionData_UserMessage {
5643
+ type: 'userMessage';
5644
+ /**
5645
+ * A user message appended to the conversation before the next assistant turn.
5646
+ */
5647
+ userMessage: QueuedUserMessage;
5648
+ }
5649
+ export interface ObjectiveQueuedActionData_Compaction {
5650
+ type: 'compaction';
5651
+ /**
5652
+ * A compaction of the conversation run before the next assistant turn.
5653
+ */
5654
+ compaction: QueuedCompaction;
5655
+ }
5656
+ export interface ContinueObjectiveResponse_Event {
5657
+ type: 'event';
5658
+ /**
5659
+ * The user message event, when the objective was waiting and the message was sent immediately.
5660
+ */
5661
+ event: ObjectiveEvent;
5662
+ }
5663
+ export interface ContinueObjectiveResponse_QueuedAction {
5664
+ type: 'queuedAction';
5665
+ /**
5666
+ * The queued action, when the agent loop was busy and the message was queued.
5667
+ */
5668
+ queuedAction: ObjectiveQueuedAction;
5669
+ }
5173
5670
  export interface SetToolCallContentRequest_ContentBlock_Text {
5174
5671
  type: 'text';
5175
5672
  text: SetToolCallContentRequest_TextBlock;
@@ -5230,6 +5727,25 @@ export interface AddAgentVariationAssignmentRequest_SubAgentId {
5230
5727
  */
5231
5728
  variationId?: string;
5232
5729
  }
5730
+ export interface AddAgentVariationAssignmentRequest_AgentPoolId {
5731
+ type: 'agentPoolId';
5732
+ /**
5733
+ * Canonical agent pool ID in the variation's workspace.
5734
+ */
5735
+ agentPoolId: string;
5736
+ /**
5737
+ * Workspace ID.
5738
+ */
5739
+ workspaceId?: string;
5740
+ /**
5741
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
5742
+ */
5743
+ agentId?: string;
5744
+ /**
5745
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
5746
+ */
5747
+ variationId?: string;
5748
+ }
5233
5749
  export interface RemoveAgentVariationAssignmentRequest_ToolId {
5234
5750
  type: 'toolId';
5235
5751
  toolId: string;
@@ -5278,6 +5794,25 @@ export interface RemoveAgentVariationAssignmentRequest_SubAgentId {
5278
5794
  */
5279
5795
  variationId?: string;
5280
5796
  }
5797
+ export interface RemoveAgentVariationAssignmentRequest_AgentPoolId {
5798
+ type: 'agentPoolId';
5799
+ /**
5800
+ * Canonical agent pool ID in the variation's workspace.
5801
+ */
5802
+ agentPoolId: string;
5803
+ /**
5804
+ * Workspace ID.
5805
+ */
5806
+ workspaceId?: string;
5807
+ /**
5808
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
5809
+ */
5810
+ agentId?: string;
5811
+ /**
5812
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
5813
+ */
5814
+ variationId?: string;
5815
+ }
5281
5816
  export interface AIProviderCredential_ApiKey {
5282
5817
  type: 'apiKey';
5283
5818
  /**
@@ -5358,6 +5893,23 @@ export interface ModelSpec_Capability_Caching {
5358
5893
  type: 'caching';
5359
5894
  caching: Capability_Caching;
5360
5895
  }
5896
+ export interface CreateAndStreamObjectiveResponse_Objective {
5897
+ type: 'objective';
5898
+ /**
5899
+ * The objective. Sent exactly once, as the first message. On a repeated
5900
+ * request that attached to an existing objective, this is that
5901
+ * objective rather than a newly created one.
5902
+ */
5903
+ objective: Objective;
5904
+ }
5905
+ export interface CreateAndStreamObjectiveResponse_Event {
5906
+ type: 'event';
5907
+ /**
5908
+ * An objective event, identical to the payloads Stream objective events
5909
+ * yields — including transient hb_ heartbeats.
5910
+ */
5911
+ event: ObjectiveEvent;
5912
+ }
5361
5913
  /**
5362
5914
  * TOKEN_EXPIRED identifies access-token expiry beyond the 60-second clock-skew tolerance. That token cannot renew; use already-installed newer credentials or require explicit app reauthentication. SESSION_* reasons are terminal. Never infer renewability from HTTP status alone.
5363
5915
  */
@@ -5374,15 +5926,17 @@ export interface WidgetSessionErrorInfo {
5374
5926
  */
5375
5927
  metadata?: Record<string, string>;
5376
5928
  }
5929
+ export type AgentPoolServiceListAgentPoolsState = 'AGENT_POOL_STATE_UNSPECIFIED' | 'AGENT_POOL_STATE_ACTIVE' | 'AGENT_POOL_STATE_INACTIVE' | 'AGENT_POOL_STATE_ARCHIVED';
5377
5930
  export type AgentServiceListAgentsState = 'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED';
5378
5931
  export type AgentServiceListAgentsVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
5379
5932
  export type AgentServiceListAgentFeedbackSentiment = 'FEEDBACK_SENTIMENT_UNSPECIFIED' | 'FEEDBACK_SENTIMENT_POSITIVE' | 'FEEDBACK_SENTIMENT_NEGATIVE';
5380
- export type AgentServiceListAgentWebhookDeliveriesEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING' | 'OBJECTIVE_EVENT_TYPE_STATE_CHANGED' | 'OBJECTIVE_EVENT_TYPE_HEARTBEAT';
5933
+ export type AgentServiceListAgentWebhookDeliveriesEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING' | 'OBJECTIVE_EVENT_TYPE_STATE_CHANGED' | 'OBJECTIVE_EVENT_TYPE_HEARTBEAT' | 'OBJECTIVE_EVENT_TYPE_INTERRUPTED';
5381
5934
  export type MemoryServiceListMemoryLayersType = 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
5382
5935
  export type ModelServiceListModelsState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
5383
- export type ObjectiveServiceListObjectivesState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT';
5936
+ export type ObjectiveServiceListObjectivesState = 'OBJECTIVE_STATE_UNSPECIFIED' | 'OBJECTIVE_STATE_PENDING' | 'OBJECTIVE_STATE_RUNNING' | 'OBJECTIVE_STATE_WAITING' | 'OBJECTIVE_STATE_FAILED' | 'OBJECTIVE_STATE_CANCELLED' | 'OBJECTIVE_STATE_FINALIZED' | 'OBJECTIVE_STATE_TIMED_OUT' | 'OBJECTIVE_STATE_INTERRUPTING';
5937
+ export type ObjectiveServiceListObjectiveQueuedActionsState = 'STATE_UNSPECIFIED' | 'STATE_QUEUED' | 'STATE_SENT' | 'STATE_REMOVED' | 'STATE_DISCARDED';
5384
5938
  export type ObjectiveServiceListObjectiveToolCallsStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
5385
- export type ObjectiveServiceListObjectiveToolCallsExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
5939
+ export type ObjectiveServiceListObjectiveToolCallsExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT' | 'TOOL_CALL_EXECUTION_STATUS_INTERRUPTED';
5386
5940
  export type ToolServiceListToolSetsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
5387
5941
  export type ToolServiceListToolsStates = 'STATE_UNSPECIFIED' | 'STATE_AVAILABLE' | 'STATE_OMITTED' | 'STATE_ARCHIVED';
5388
5942
  export type WidgetSessionServiceListWidgetSessionsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_EXPIRED' | 'STATE_REVOKED' | 'STATE_EXHAUSTED';
@@ -5407,7 +5961,7 @@ export interface APIKeySpecParam {
5407
5961
  */
5408
5962
  permissions?: Array<string>;
5409
5963
  }
5410
- export type AddAgentVariationAssignmentRequestParam = AddAgentVariationAssignmentRequest_ToolIdParam | AddAgentVariationAssignmentRequest_ToolSetIdParam | AddAgentVariationAssignmentRequest_SubAgentIdParam;
5964
+ export type AddAgentVariationAssignmentRequestParam = AddAgentVariationAssignmentRequest_ToolIdParam | AddAgentVariationAssignmentRequest_ToolSetIdParam | AddAgentVariationAssignmentRequest_SubAgentIdParam | AddAgentVariationAssignmentRequest_AgentPoolIdParam;
5411
5965
  export interface CreateAgentVariationRequestParam {
5412
5966
  metadata: CreateResourceMetadata;
5413
5967
  spec: AgentVariationSpec;
@@ -5427,7 +5981,7 @@ export interface ObjectiveEpisodicConfigParam {
5427
5981
  */
5428
5982
  key: string;
5429
5983
  }
5430
- export type RemoveAgentVariationAssignmentRequestParam = RemoveAgentVariationAssignmentRequest_ToolIdParam | RemoveAgentVariationAssignmentRequest_ToolSetIdParam | RemoveAgentVariationAssignmentRequest_SubAgentIdParam;
5984
+ export type RemoveAgentVariationAssignmentRequestParam = RemoveAgentVariationAssignmentRequest_ToolIdParam | RemoveAgentVariationAssignmentRequest_ToolSetIdParam | RemoveAgentVariationAssignmentRequest_SubAgentIdParam | RemoveAgentVariationAssignmentRequest_AgentPoolIdParam;
5431
5985
  export interface WidgetSessionSpecParam {
5432
5986
  /**
5433
5987
  * Widget this session is minted against. Accepts the canonical `wgt_…` form
@@ -5478,6 +6032,13 @@ export interface AddAgentVariationAssignmentRequest_SubAgentIdParam {
5478
6032
  type: 'subAgentId';
5479
6033
  subAgentId: string;
5480
6034
  }
6035
+ export interface AddAgentVariationAssignmentRequest_AgentPoolIdParam {
6036
+ type: 'agentPoolId';
6037
+ /**
6038
+ * Canonical agent pool ID in the variation's workspace.
6039
+ */
6040
+ agentPoolId: string;
6041
+ }
5481
6042
  export interface RemoveAgentVariationAssignmentRequest_ToolIdParam {
5482
6043
  type: 'toolId';
5483
6044
  toolId: string;
@@ -5490,6 +6051,13 @@ export interface RemoveAgentVariationAssignmentRequest_SubAgentIdParam {
5490
6051
  type: 'subAgentId';
5491
6052
  subAgentId: string;
5492
6053
  }
6054
+ export interface RemoveAgentVariationAssignmentRequest_AgentPoolIdParam {
6055
+ type: 'agentPoolId';
6056
+ /**
6057
+ * Canonical agent pool ID in the variation's workspace.
6058
+ */
6059
+ agentPoolId: string;
6060
+ }
5493
6061
  export declare function wireArray<T>(value: Array<T> | null | undefined, fn: (v: T) => unknown): unknown;
5494
6062
  export declare function wireMap<T>(value: Record<string, T> | null | undefined, fn: (v: T) => unknown): unknown;
5495
6063
  export declare function wireAPIKeySpec(value: APIKeySpecParam | null | undefined): unknown;
@@ -5502,7 +6070,9 @@ export declare function wireWidgetSessionSpec(value: WidgetSessionSpecParam | nu
5502
6070
  export declare function wireAddAgentVariationAssignmentRequest_ToolId(value: AddAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
5503
6071
  export declare function wireAddAgentVariationAssignmentRequest_ToolSetId(value: AddAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
5504
6072
  export declare function wireAddAgentVariationAssignmentRequest_SubAgentId(value: AddAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
6073
+ export declare function wireAddAgentVariationAssignmentRequest_AgentPoolId(value: AddAgentVariationAssignmentRequest_AgentPoolIdParam | null | undefined): unknown;
5505
6074
  export declare function wireRemoveAgentVariationAssignmentRequest_ToolId(value: RemoveAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
5506
6075
  export declare function wireRemoveAgentVariationAssignmentRequest_ToolSetId(value: RemoveAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
5507
6076
  export declare function wireRemoveAgentVariationAssignmentRequest_SubAgentId(value: RemoveAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
6077
+ export declare function wireRemoveAgentVariationAssignmentRequest_AgentPoolId(value: RemoveAgentVariationAssignmentRequest_AgentPoolIdParam | null | undefined): unknown;
5508
6078
  //# sourceMappingURL=types.d.ts.map