@cadenya/cadenya 1.6.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
@@ -1047,7 +1047,7 @@ export interface Capability_TopK {
1047
1047
  export interface Capability_TopP {
1048
1048
  }
1049
1049
  /**
1050
- * 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.
1051
1051
  */
1052
1052
  export interface CompactObjectiveRequest {
1053
1053
  workspaceId?: string;
@@ -1060,15 +1060,6 @@ export interface CompactObjectiveRequest {
1060
1060
  */
1061
1061
  compactionConfig?: AgentVariationSpec_CompactionConfig;
1062
1062
  }
1063
- /**
1064
- * Compact objective response
1065
- */
1066
- export interface CompactObjectiveResponse {
1067
- /**
1068
- * The new context window created by the compaction
1069
- */
1070
- contextWindow?: ObjectiveContextWindowData;
1071
- }
1072
1063
  /**
1073
1064
  * SummarizationStrategy configures LLM-powered summarization of older conversation turns.
1074
1065
  */
@@ -1203,14 +1194,23 @@ export interface ContinueObjectiveRequest {
1203
1194
  */
1204
1195
  objectiveId?: string;
1205
1196
  /**
1206
- * The message to continue an objective that has completed (or you are enqueing)
1197
+ * The user message to send to the objective.
1207
1198
  */
1208
1199
  message: string;
1209
1200
  /**
1210
- * 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.
1211
1206
  */
1212
1207
  enqueue?: boolean;
1213
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;
1214
1214
  export interface CreateAIProviderKeyRequest {
1215
1215
  /**
1216
1216
  * The workspace that will own this key.
@@ -1308,6 +1308,124 @@ export interface CreateAgentVariationRequest {
1308
1308
  metadata: CreateResourceMetadata;
1309
1309
  spec: AgentVariationSpec;
1310
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;
1311
1429
  export interface CreateMemoryEntryRequest {
1312
1430
  workspaceId?: string;
1313
1431
  /**
@@ -1366,7 +1484,7 @@ export interface CreateObjectiveRequest {
1366
1484
  * (liquid) to produce the objective's system prompt. If the agent has a
1367
1485
  * system_prompt_data_schema, this must satisfy it.
1368
1486
  */
1369
- systemPromptData: Record<string, unknown>;
1487
+ systemPromptData?: Record<string, unknown>;
1370
1488
  /**
1371
1489
  * Optional explicit first user message for the LLM chat history. When not set,
1372
1490
  * the selected variation's first_user_message_template is rendered with
@@ -1705,6 +1823,16 @@ export interface GoogleProtobufAny {
1705
1823
  */
1706
1824
  '@type'?: string;
1707
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
+ }
1708
1836
  export interface ListAIProviderKeysResponse {
1709
1837
  items: Array<AIProviderKey>;
1710
1838
  pagination?: Page;
@@ -1789,6 +1917,13 @@ export interface ListObjectiveFeedbackResponse {
1789
1917
  items: Array<ObjectiveFeedback>;
1790
1918
  pagination?: Page;
1791
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
+ }
1792
1927
  export interface ListObjectiveToolCallsResponse {
1793
1928
  items: Array<ObjectiveToolCall>;
1794
1929
  pagination?: Page;
@@ -2158,6 +2293,10 @@ export interface ModelBasePricing {
2158
2293
  * Default output token rate, in cents per million tokens.
2159
2294
  */
2160
2295
  outputPricePerMillionTokens: string;
2296
+ /**
2297
+ * Default cached input token rate, in cents per million tokens.
2298
+ */
2299
+ cachedInputPricePerMillionTokens: string;
2161
2300
  }
2162
2301
  /**
2163
2302
  * ModelInfo carries server-derived, read-only details about a model.
@@ -2194,6 +2333,10 @@ export interface ModelPricingOverride {
2194
2333
  * Override for output token price, in cents per million tokens.
2195
2334
  */
2196
2335
  outputPricePerMillionTokens?: string;
2336
+ /**
2337
+ * Override for cached input token price, in cents per million tokens.
2338
+ */
2339
+ cachedInputPricePerMillionTokens?: string;
2197
2340
  }
2198
2341
  export interface ModelSpec {
2199
2342
  /**
@@ -2225,6 +2368,14 @@ export interface ModelSpec {
2225
2368
  * price on reads, see input_price_per_million_tokens.
2226
2369
  */
2227
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;
2228
2379
  /**
2229
2380
  * The inference knobs this model supports. Catalog data; drives which
2230
2381
  * ModelConfig fields a variation on this model may set. Reasoning support
@@ -2271,7 +2422,7 @@ export interface Notice {
2271
2422
  /**
2272
2423
  * The current lifecycle state of the objective.
2273
2424
  */
2274
- 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';
2275
2426
  /**
2276
2427
  * Objective is the data for an objective. It contains the snapshotted fields for the selected agent and variation. Secrets are returned
2277
2428
  * only with their names, and the output definition is copied from the agent's configuration.
@@ -2478,7 +2629,7 @@ export interface ObjectiveEvent {
2478
2629
  */
2479
2630
  startedAt?: string;
2480
2631
  }
2481
- 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;
2482
2633
  export interface ObjectiveEventInfo {
2483
2634
  objective?: OperationMetadata;
2484
2635
  createdBy: Profile;
@@ -2603,15 +2754,51 @@ export interface ObjectiveInfo {
2603
2754
  */
2604
2755
  widget?: BareMetadata;
2605
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;
2606
2793
  /**
2607
2794
  * The state before this write. OBJECTIVE_STATE_UNSPECIFIED when the
2608
2795
  * objective was just created.
2609
2796
  */
2610
- 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';
2611
2798
  /**
2612
2799
  * The state after this write.
2613
2800
  */
2614
- 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';
2615
2802
  /**
2616
2803
  * ObjectiveStateChanged is written every time the objective's lifecycle state
2617
2804
  * is set, including the initial move into OBJECTIVE_STATE_PENDING at creation. Terminal
@@ -2665,7 +2852,7 @@ export interface ObjectiveTool {
2665
2852
  * Current status of the tool call
2666
2853
  */
2667
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';
2668
- 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';
2669
2856
  /**
2670
2857
  * ObjectiveToolCall is a record of a tool call made during an objective's execution.
2671
2858
  * Tool calls are mutable — their status changes as they are approved, denied, or executed.
@@ -2776,7 +2963,7 @@ export interface ObjectiveToolCallResult_TextBlock {
2776
2963
  * Current status of the tool call
2777
2964
  */
2778
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';
2779
- 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';
2780
2967
  /**
2781
2968
  * ObjectiveToolCallWithResult is an ObjectiveToolCall plus the content the
2782
2969
  * tool returned. Returned by GetObjectiveToolCall.
@@ -3033,6 +3220,21 @@ export interface PublishAgentRequest {
3033
3220
  */
3034
3221
  id?: string;
3035
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
+ }
3036
3238
  /**
3037
3239
  * Reasoning carries the human-readable reasoning text a model produced while
3038
3240
  * working on an iteration — extended thinking (Anthropic, Gemini) or reasoning
@@ -3074,6 +3276,17 @@ export interface RemoveAgentVariationMemoryLayerRequest {
3074
3276
  */
3075
3277
  memoryLayerId: string;
3076
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
+ }
3077
3290
  export type ResolvedSecretSource = 'RESOLVED_SECRET_SOURCE_UNSPECIFIED' | 'RESOLVED_SECRET_SOURCE_WORKSPACE' | 'RESOLVED_SECRET_SOURCE_TOOLSET' | 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
3078
3291
  /**
3079
3292
  * ResolvedSecret is a resolved secret value from the workspace, toolset, or objective. When a tool is called, it will rely
@@ -4063,6 +4276,38 @@ export interface ToolSetSpec {
4063
4276
  * request. Read-modify-write to add or remove a single overlay.
4064
4277
  */
4065
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;
4066
4311
  }
4067
4312
  /**
4068
4313
  * ToolSetUsage describes one agent variation that uses the tool set (or, when
@@ -4392,8 +4637,9 @@ export interface UpdateMemoryLayerRequest {
4392
4637
  * Update model request. update_mask must list leaf paths: metadata.name,
4393
4638
  * metadata.external_id, metadata.labels, spec.provider_model_id,
4394
4639
  * spec.provider, spec.family, spec.max_input_tokens, spec.max_output_tokens,
4395
- * spec.capabilities, pricing_override.input_price_per_million_tokens, and
4396
- * 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
4397
4643
  * (PROVENANCE_SYNCED_FROM_PROVIDER) reject metadata.name and spec.* paths.
4398
4644
  * spec price fields are never writable; price changes go through
4399
4645
  * pricing_override, where a masked-but-absent field clears the override.
@@ -4651,7 +4897,7 @@ export type WebhookDeliveryDataStatus = 'WEBHOOK_DELIVERY_STATUS_UNSPECIFIED' |
4651
4897
  /**
4652
4898
  * The type of objective event that triggered this webhook delivery
4653
4899
  */
4654
- 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';
4655
4901
  export interface WebhookDeliveryData {
4656
4902
  /**
4657
4903
  * Related resources
@@ -4686,6 +4932,21 @@ export interface WebhookDeliveryData {
4686
4932
  */
4687
4933
  responseContentLength: string;
4688
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
+ }
4689
4950
  /**
4690
4951
  * The current lifecycle state of the widget. Output only. Widgets are
4691
4952
  * created STATE_ACTIVE; use the :archive and :unarchive actions to
@@ -5328,6 +5589,10 @@ export interface ObjectiveEventData_Heartbeat {
5328
5589
  type: 'heartbeat';
5329
5590
  heartbeat: ObjectiveHeartbeat;
5330
5591
  }
5592
+ export interface ObjectiveEventData_Interrupted {
5593
+ type: 'interrupted';
5594
+ interrupted: ObjectiveInterrupted;
5595
+ }
5331
5596
  export interface CallableTool_Tool {
5332
5597
  type: 'tool';
5333
5598
  tool: ResourceMetadata;
@@ -5374,6 +5639,34 @@ export interface MemoryEntryCreateSpec_UploadId {
5374
5639
  key: string;
5375
5640
  description?: string;
5376
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
+ }
5377
5670
  export interface SetToolCallContentRequest_ContentBlock_Text {
5378
5671
  type: 'text';
5379
5672
  text: SetToolCallContentRequest_TextBlock;
@@ -5600,6 +5893,23 @@ export interface ModelSpec_Capability_Caching {
5600
5893
  type: 'caching';
5601
5894
  caching: Capability_Caching;
5602
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
+ }
5603
5913
  /**
5604
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.
5605
5915
  */
@@ -5620,12 +5930,13 @@ export type AgentPoolServiceListAgentPoolsState = 'AGENT_POOL_STATE_UNSPECIFIED'
5620
5930
  export type AgentServiceListAgentsState = 'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED';
5621
5931
  export type AgentServiceListAgentsVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
5622
5932
  export type AgentServiceListAgentFeedbackSentiment = 'FEEDBACK_SENTIMENT_UNSPECIFIED' | 'FEEDBACK_SENTIMENT_POSITIVE' | 'FEEDBACK_SENTIMENT_NEGATIVE';
5623
- 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';
5624
5934
  export type MemoryServiceListMemoryLayersType = 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
5625
5935
  export type ModelServiceListModelsState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
5626
- 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';
5627
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';
5628
- 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';
5629
5940
  export type ToolServiceListToolSetsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
5630
5941
  export type ToolServiceListToolsStates = 'STATE_UNSPECIFIED' | 'STATE_AVAILABLE' | 'STATE_OMITTED' | 'STATE_ARCHIVED';
5631
5942
  export type WidgetSessionServiceListWidgetSessionsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_EXPIRED' | 'STATE_REVOKED' | 'STATE_EXHAUSTED';