@cadenya/cadenya 1.1.0 → 1.2.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/api.md +7 -7
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/resources/agent-variations.d.ts +42 -32
- package/dist/resources/agent-variations.d.ts.map +1 -1
- package/dist/resources/agent-variations.js +22 -20
- package/dist/resources/agent-variations.js.map +1 -1
- package/dist/resources/agents.d.ts +3 -1
- package/dist/resources/agents.d.ts.map +1 -1
- package/dist/resources/agents.js.map +1 -1
- package/dist/resources/tool-search.d.ts +1 -1
- package/dist/resources/tool-search.js +1 -1
- package/dist/resources/tool-search.js.map +1 -1
- package/dist/types.d.ts +217 -67
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +40 -0
- package/dist/types.js.map +1 -1
- package/dist/webhooks.d.ts +7 -1
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/resources/agent-variations.ts +59 -47
- package/src/resources/agents.ts +3 -1
- package/src/resources/tool-search.ts +1 -1
- package/src/types.ts +266 -69
- package/src/webhooks.ts +7 -1
package/src/types.ts
CHANGED
|
@@ -274,7 +274,8 @@ export interface AccountSpec {
|
|
|
274
274
|
/**
|
|
275
275
|
* Attach a single tool, tool set, or sub-agent to a variation. Exactly one
|
|
276
276
|
* of the target fields must be set; the assignment kind is inferred from the
|
|
277
|
-
* populated field.
|
|
277
|
+
* populated field. Adding an existing target returns AlreadyExists.
|
|
278
|
+
* All targets must be in the variation's workspace and eligible for assignment.
|
|
278
279
|
*/
|
|
279
280
|
export type AddAgentVariationAssignmentRequest =
|
|
280
281
|
| AddAgentVariationAssignmentRequest_ToolId
|
|
@@ -282,9 +283,10 @@ export type AddAgentVariationAssignmentRequest =
|
|
|
282
283
|
| AddAgentVariationAssignmentRequest_SubAgentId;
|
|
283
284
|
|
|
284
285
|
/**
|
|
285
|
-
* Attach a memory layer to a variation.
|
|
286
|
+
* Attach a memory layer to a variation. Use UpdateAgentVariationMemoryLayer or
|
|
287
|
+
* replace the spec list to reposition an existing layer. Rejected when:
|
|
288
|
+
* - the layer is already assigned, regardless of position (AlreadyExists)
|
|
286
289
|
* - the layer is system-managed (FailedPrecondition)
|
|
287
|
-
* - the layer is already assigned to this variation (AlreadyExists)
|
|
288
290
|
* - the variation is already at the 10-assignment cap (FailedPrecondition)
|
|
289
291
|
* - the position is already in use on this variation (InvalidArgument)
|
|
290
292
|
*/
|
|
@@ -591,26 +593,27 @@ export interface AgentVariationInfo {
|
|
|
591
593
|
* Total number of objective feedbacks received for this variation
|
|
592
594
|
*/
|
|
593
595
|
feedbackCount: number;
|
|
594
|
-
/**
|
|
595
|
-
* All tools, tool sets, and sub-agents assigned to this variation.
|
|
596
|
-
* Populated on reads so clients can render a variation's full assignment
|
|
597
|
-
* list without calling the add/remove endpoints just to enumerate.
|
|
598
|
-
*/
|
|
599
|
-
assignments: Array<VariationAssignment>;
|
|
600
|
-
/**
|
|
601
|
-
* Read-only list of memory layer assignments for this variation,
|
|
602
|
-
* returned in ascending `position` (most specific first — resolution
|
|
603
|
-
* order). Capped at 10 entries.
|
|
604
|
-
*/
|
|
605
|
-
memoryLayerAssignments: Array<VariationMemoryLayerAssignment>;
|
|
606
596
|
/**
|
|
607
597
|
* Count of memory layer assignments.
|
|
608
598
|
*/
|
|
609
599
|
memoryLayerCount: number;
|
|
600
|
+
/**
|
|
601
|
+
* Number of distinct callable tools available through this variation's
|
|
602
|
+
* assignments after normalization. Expands tool sets and deduplicates tools
|
|
603
|
+
* also assigned directly. Each sub-agent contributes one callable tool;
|
|
604
|
+
* its own assignments are not expanded. Counts the full normalized set,
|
|
605
|
+
* regardless of which tools progressive discovery has loaded.
|
|
606
|
+
*/
|
|
607
|
+
effectiveToolCount: number;
|
|
610
608
|
}
|
|
611
609
|
|
|
612
610
|
/**
|
|
613
|
-
* AgentVariationSpec defines the operational configuration for a
|
|
611
|
+
* AgentVariationSpec defines the complete operational configuration for a
|
|
612
|
+
* variation, including assignments. Reads always populate both assignment lists,
|
|
613
|
+
* even when include_info is false. Create and update validate and persist the
|
|
614
|
+
* configuration atomically: any invalid target or cascade rejects the entire
|
|
615
|
+
* request. Targets must belong to the variation's workspace and pass the same
|
|
616
|
+
* eligibility checks as the dedicated add methods.
|
|
614
617
|
*/
|
|
615
618
|
export interface AgentVariationSpec {
|
|
616
619
|
/**
|
|
@@ -651,6 +654,22 @@ export interface AgentVariationSpec {
|
|
|
651
654
|
* creation is rejected with InvalidArgument.
|
|
652
655
|
*/
|
|
653
656
|
firstUserMessageTemplate?: string;
|
|
657
|
+
/**
|
|
658
|
+
* Complete set of assigned tools, tool sets, and sub-agents. Order has no
|
|
659
|
+
* meaning. Duplicate (target kind, canonical target ID) pairs are collapsed.
|
|
660
|
+
* On create, omitted or empty means no assignments. On update, selecting
|
|
661
|
+
* spec.assignments in update_mask replaces the entire set; empty clears it.
|
|
662
|
+
*/
|
|
663
|
+
assignments?: Array<VariationAssignment>;
|
|
664
|
+
/**
|
|
665
|
+
* Complete baseline memory cascade, returned in ascending position. At most
|
|
666
|
+
* 10 whole layers; system-managed layers cannot be assigned. Duplicate layer
|
|
667
|
+
* IDs (after alias resolution) or positions are InvalidArgument. Validate the
|
|
668
|
+
* final cascade, so swapping two positions in one update is supported.
|
|
669
|
+
* On create, omitted or empty means no layers. On update, selecting
|
|
670
|
+
* spec.memory_layer_assignments replaces the entire list; empty clears it.
|
|
671
|
+
*/
|
|
672
|
+
memoryLayerAssignments?: Array<VariationMemoryLayerAssignment>;
|
|
654
673
|
}
|
|
655
674
|
|
|
656
675
|
/**
|
|
@@ -1200,7 +1219,9 @@ export interface CreateAgentRequest {
|
|
|
1200
1219
|
metadata: CreateResourceMetadata;
|
|
1201
1220
|
spec: AgentSpec;
|
|
1202
1221
|
/**
|
|
1203
|
-
* Optional default variation to add to the agent on create
|
|
1222
|
+
* Optional default variation to add to the agent on create. Its spec accepts
|
|
1223
|
+
* assignments and memory_layer_assignments using the same atomic validation
|
|
1224
|
+
* as CreateAgentVariation. Failure rejects the entire agent creation.
|
|
1204
1225
|
*/
|
|
1205
1226
|
defaultVariation?: CreateAgentVariationRequest;
|
|
1206
1227
|
}
|
|
@@ -2272,7 +2293,7 @@ export interface Notice {
|
|
|
2272
2293
|
/**
|
|
2273
2294
|
* The current lifecycle state of the objective.
|
|
2274
2295
|
*/
|
|
2275
|
-
export type ObjectiveState = '
|
|
2296
|
+
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';
|
|
2276
2297
|
|
|
2277
2298
|
/**
|
|
2278
2299
|
* Objective is the data for an objective. It contains the snapshotted fields for the selected agent and variation. Secrets are returned
|
|
@@ -2339,7 +2360,7 @@ export interface Objective {
|
|
|
2339
2360
|
memoryCascade: Array<MemoryReference>;
|
|
2340
2361
|
/**
|
|
2341
2362
|
* The output of the objective, populated when the objective completes. Will match the schema of output_json_schema or output_json_inferred.
|
|
2342
|
-
* This will only be set if the state of the objective is set to
|
|
2363
|
+
* This will only be set if the state of the objective is set to OBJECTIVE_STATE_FINALIZED
|
|
2343
2364
|
*/
|
|
2344
2365
|
output?: Record<string, unknown>;
|
|
2345
2366
|
/**
|
|
@@ -2504,7 +2525,8 @@ export type ObjectiveEventData =
|
|
|
2504
2525
|
| ObjectiveEventData_Finalized
|
|
2505
2526
|
| ObjectiveEventData_Notice
|
|
2506
2527
|
| ObjectiveEventData_TimedOut
|
|
2507
|
-
| ObjectiveEventData_Reasoning
|
|
2528
|
+
| ObjectiveEventData_Reasoning
|
|
2529
|
+
| ObjectiveEventData_StateChanged;
|
|
2508
2530
|
|
|
2509
2531
|
export interface ObjectiveEventInfo {
|
|
2510
2532
|
objective?: OperationMetadata;
|
|
@@ -2628,6 +2650,41 @@ export interface ObjectiveInfo {
|
|
|
2628
2650
|
widget?: BareMetadata;
|
|
2629
2651
|
}
|
|
2630
2652
|
|
|
2653
|
+
/**
|
|
2654
|
+
* The state before this write. OBJECTIVE_STATE_UNSPECIFIED when the
|
|
2655
|
+
* objective was just created.
|
|
2656
|
+
*/
|
|
2657
|
+
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';
|
|
2658
|
+
|
|
2659
|
+
/**
|
|
2660
|
+
* The state after this write.
|
|
2661
|
+
*/
|
|
2662
|
+
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';
|
|
2663
|
+
|
|
2664
|
+
/**
|
|
2665
|
+
* ObjectiveStateChanged is written every time the objective's lifecycle state
|
|
2666
|
+
* is set, including the initial move into OBJECTIVE_STATE_PENDING at creation. Terminal
|
|
2667
|
+
* transitions also write their dedicated event (cancelled, timedOut,
|
|
2668
|
+
* finalized, error) immediately before this one, so consumers that only care
|
|
2669
|
+
* about the outcome can keep listening for those.
|
|
2670
|
+
*/
|
|
2671
|
+
export interface ObjectiveStateChanged {
|
|
2672
|
+
/**
|
|
2673
|
+
* The state before this write. OBJECTIVE_STATE_UNSPECIFIED when the
|
|
2674
|
+
* objective was just created.
|
|
2675
|
+
*/
|
|
2676
|
+
fromState: ObjectiveStateChangedFromState;
|
|
2677
|
+
/**
|
|
2678
|
+
* The state after this write.
|
|
2679
|
+
*/
|
|
2680
|
+
toState: ObjectiveStateChangedToState;
|
|
2681
|
+
/**
|
|
2682
|
+
* The status message recorded with the transition, if any (e.g.
|
|
2683
|
+
* "Continued", or the error summary on a failure).
|
|
2684
|
+
*/
|
|
2685
|
+
message?: string;
|
|
2686
|
+
}
|
|
2687
|
+
|
|
2631
2688
|
/**
|
|
2632
2689
|
* ObjectiveTimedOut is the terminal event written when an objective is
|
|
2633
2690
|
* finalized by the inactivity sweep because it saw no activity (no user
|
|
@@ -3075,6 +3132,38 @@ export interface Reasoning {
|
|
|
3075
3132
|
content: string;
|
|
3076
3133
|
}
|
|
3077
3134
|
|
|
3135
|
+
/**
|
|
3136
|
+
* Detach a target by its foreign key. Removing an unassigned target returns
|
|
3137
|
+
* NotFound. The parent variation must exist and be accessible.
|
|
3138
|
+
*/
|
|
3139
|
+
export type RemoveAgentVariationAssignmentRequest =
|
|
3140
|
+
| RemoveAgentVariationAssignmentRequest_ToolId
|
|
3141
|
+
| RemoveAgentVariationAssignmentRequest_ToolSetId
|
|
3142
|
+
| RemoveAgentVariationAssignmentRequest_SubAgentId;
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* Remove by memory layer ID. An unassigned layer returns NotFound.
|
|
3146
|
+
* The parent variation must still exist and be accessible.
|
|
3147
|
+
*/
|
|
3148
|
+
export interface RemoveAgentVariationMemoryLayerRequest {
|
|
3149
|
+
/**
|
|
3150
|
+
* Workspace ID.
|
|
3151
|
+
*/
|
|
3152
|
+
workspaceId?: string;
|
|
3153
|
+
/**
|
|
3154
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
3155
|
+
*/
|
|
3156
|
+
agentId?: string;
|
|
3157
|
+
/**
|
|
3158
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
3159
|
+
*/
|
|
3160
|
+
variationId?: string;
|
|
3161
|
+
/**
|
|
3162
|
+
* Layer to detach. Accepts memlyr_… or external_id:<value>.
|
|
3163
|
+
*/
|
|
3164
|
+
memoryLayerId: string;
|
|
3165
|
+
}
|
|
3166
|
+
|
|
3078
3167
|
export type ResolvedSecretSource = 'RESOLVED_SECRET_SOURCE_UNSPECIFIED' | 'RESOLVED_SECRET_SOURCE_WORKSPACE' | 'RESOLVED_SECRET_SOURCE_TOOLSET' | 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
|
|
3079
3168
|
|
|
3080
3169
|
/**
|
|
@@ -4397,7 +4486,7 @@ export interface UpdateAgentScheduleRequest {
|
|
|
4397
4486
|
/**
|
|
4398
4487
|
* Update an existing memory layer assignment. Only `position` is mutable.
|
|
4399
4488
|
* A new position that collides with another assignment on the same variation
|
|
4400
|
-
* is rejected with InvalidArgument.
|
|
4489
|
+
* is rejected with InvalidArgument. An unassigned layer returns NotFound.
|
|
4401
4490
|
*/
|
|
4402
4491
|
export interface UpdateAgentVariationMemoryLayerRequest {
|
|
4403
4492
|
/**
|
|
@@ -4412,11 +4501,14 @@ export interface UpdateAgentVariationMemoryLayerRequest {
|
|
|
4412
4501
|
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
4413
4502
|
*/
|
|
4414
4503
|
variationId?: string;
|
|
4415
|
-
|
|
4504
|
+
/**
|
|
4505
|
+
* Layer to reposition. Accepts memlyr_… or external_id:<value>.
|
|
4506
|
+
*/
|
|
4507
|
+
memoryLayerId: string;
|
|
4416
4508
|
/**
|
|
4417
4509
|
* New position. Only field currently updatable on an assignment.
|
|
4418
4510
|
*/
|
|
4419
|
-
position
|
|
4511
|
+
position: number;
|
|
4420
4512
|
}
|
|
4421
4513
|
|
|
4422
4514
|
/**
|
|
@@ -4438,7 +4530,13 @@ export interface UpdateAgentVariationRequest {
|
|
|
4438
4530
|
metadata?: UpdateResourceMetadata;
|
|
4439
4531
|
spec?: AgentVariationSpec;
|
|
4440
4532
|
/**
|
|
4441
|
-
* Fields to update
|
|
4533
|
+
* Fields to update. Assignment lists are replaced as a whole, never merged.
|
|
4534
|
+
* Select spec.assignments or spec.memory_layer_assignments to replace/clear
|
|
4535
|
+
* one list. Selecting spec replaces the entire spec (including omitted lists);
|
|
4536
|
+
* * replaces all mutable fields. Element/index paths are not supported.
|
|
4537
|
+
* Without a mask, infer paths from non-empty fields: non-empty assignment
|
|
4538
|
+
* lists replace existing lists, while omitted/empty lists remain unchanged.
|
|
4539
|
+
* To clear a list, explicitly include its path in the mask.
|
|
4442
4540
|
*/
|
|
4443
4541
|
updateMask?: string;
|
|
4444
4542
|
}
|
|
@@ -4699,45 +4797,31 @@ export interface UserMessage {
|
|
|
4699
4797
|
}
|
|
4700
4798
|
|
|
4701
4799
|
/**
|
|
4702
|
-
* A
|
|
4703
|
-
*
|
|
4704
|
-
*
|
|
4705
|
-
*
|
|
4706
|
-
* The `id` identifies the assignment itself (not the referenced resource) and
|
|
4707
|
-
* is the handle used to remove the assignment. It is returned by the add
|
|
4708
|
-
* endpoint and present on every entry in `AgentVariationInfo.assignments`.
|
|
4800
|
+
* A tool, tool set, or sub-agent assigned to a variation, identified only by
|
|
4801
|
+
* the target resource ID. The same shape is accepted in a spec and returned
|
|
4802
|
+
* on reads. Assignment junction records are an internal implementation detail.
|
|
4709
4803
|
*/
|
|
4710
4804
|
export type VariationAssignment =
|
|
4711
|
-
|
|
|
4712
|
-
|
|
|
4713
|
-
|
|
|
4805
|
+
| VariationAssignment_ToolId
|
|
4806
|
+
| VariationAssignment_ToolSetId
|
|
4807
|
+
| VariationAssignment_SubAgentId;
|
|
4714
4808
|
|
|
4715
4809
|
/**
|
|
4716
|
-
*
|
|
4717
|
-
*
|
|
4718
|
-
*
|
|
4719
|
-
*
|
|
4720
|
-
* Variations only support whole-layer attachments — entry pinning is an
|
|
4721
|
-
* objective-level capability.
|
|
4810
|
+
* A whole memory layer in a variation's baseline memory cascade. Identified
|
|
4811
|
+
* by the memory layer ID; no assignment junction ID is exposed. Entry pinning
|
|
4812
|
+
* remains an objective-level capability.
|
|
4722
4813
|
*/
|
|
4723
4814
|
export interface VariationMemoryLayerAssignment {
|
|
4724
4815
|
/**
|
|
4725
|
-
*
|
|
4726
|
-
*
|
|
4816
|
+
* Accepts the canonical memlyr_… ID or external_id:<value> on input.
|
|
4817
|
+
* Reads always return the canonical ID.
|
|
4727
4818
|
*/
|
|
4728
|
-
|
|
4729
|
-
/**
|
|
4730
|
-
* The attached memory layer.
|
|
4731
|
-
*/
|
|
4732
|
-
memoryLayer: BareMetadata;
|
|
4819
|
+
memoryLayerId: string;
|
|
4733
4820
|
/**
|
|
4734
|
-
* Position
|
|
4735
|
-
*
|
|
4736
|
-
*
|
|
4737
|
-
*
|
|
4738
|
-
* Positions must be unique within a variation; a request that would
|
|
4739
|
-
* collide with an existing assignment's position is rejected with
|
|
4740
|
-
* InvalidArgument.
|
|
4821
|
+
* Position is specificity: lower positions are consulted first; the highest
|
|
4822
|
+
* position is the most general fallback. Gaps and zero are valid. Positions
|
|
4823
|
+
* must be unique within a variation. Explicitly required in a full spec;
|
|
4824
|
+
* only AddAgentVariationMemoryLayer can choose an append position for you.
|
|
4741
4825
|
*/
|
|
4742
4826
|
position: number;
|
|
4743
4827
|
}
|
|
@@ -4764,7 +4848,7 @@ export type WebhookDeliveryDataStatus = 'WEBHOOK_DELIVERY_STATUS_UNSPECIFIED' |
|
|
|
4764
4848
|
/**
|
|
4765
4849
|
* The type of objective event that triggered this webhook delivery
|
|
4766
4850
|
*/
|
|
4767
|
-
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';
|
|
4851
|
+
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';
|
|
4768
4852
|
|
|
4769
4853
|
export interface WebhookDeliveryData {
|
|
4770
4854
|
/**
|
|
@@ -5109,22 +5193,28 @@ export interface ObjectiveEventWebhookData {
|
|
|
5109
5193
|
data: ObjectiveEventWebhookDataData;
|
|
5110
5194
|
}
|
|
5111
5195
|
|
|
5112
|
-
export interface
|
|
5113
|
-
type: '
|
|
5114
|
-
|
|
5115
|
-
|
|
5196
|
+
export interface VariationAssignment_ToolId {
|
|
5197
|
+
type: 'toolId';
|
|
5198
|
+
/**
|
|
5199
|
+
* Canonical tool ID.
|
|
5200
|
+
*/
|
|
5201
|
+
toolId: string;
|
|
5116
5202
|
}
|
|
5117
5203
|
|
|
5118
|
-
export interface
|
|
5119
|
-
type: '
|
|
5120
|
-
|
|
5121
|
-
|
|
5204
|
+
export interface VariationAssignment_ToolSetId {
|
|
5205
|
+
type: 'toolSetId';
|
|
5206
|
+
/**
|
|
5207
|
+
* Canonical tool set ID.
|
|
5208
|
+
*/
|
|
5209
|
+
toolSetId: string;
|
|
5122
5210
|
}
|
|
5123
5211
|
|
|
5124
|
-
export interface
|
|
5125
|
-
type: '
|
|
5126
|
-
|
|
5127
|
-
|
|
5212
|
+
export interface VariationAssignment_SubAgentId {
|
|
5213
|
+
type: 'subAgentId';
|
|
5214
|
+
/**
|
|
5215
|
+
* Canonical sub-agent ID.
|
|
5216
|
+
*/
|
|
5217
|
+
subAgentId: string;
|
|
5128
5218
|
}
|
|
5129
5219
|
|
|
5130
5220
|
export interface ObjectiveToolCallResult_ContentBlock_Text {
|
|
@@ -5452,6 +5542,11 @@ export interface ObjectiveEventData_Reasoning {
|
|
|
5452
5542
|
reasoning: Reasoning;
|
|
5453
5543
|
}
|
|
5454
5544
|
|
|
5545
|
+
export interface ObjectiveEventData_StateChanged {
|
|
5546
|
+
type: 'stateChanged';
|
|
5547
|
+
stateChanged: ObjectiveStateChanged;
|
|
5548
|
+
}
|
|
5549
|
+
|
|
5455
5550
|
export interface CallableTool_Tool {
|
|
5456
5551
|
type: 'tool';
|
|
5457
5552
|
tool: ResourceMetadata;
|
|
@@ -5562,6 +5657,57 @@ export interface AddAgentVariationAssignmentRequest_SubAgentId {
|
|
|
5562
5657
|
variationId?: string;
|
|
5563
5658
|
}
|
|
5564
5659
|
|
|
5660
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolId {
|
|
5661
|
+
type: 'toolId';
|
|
5662
|
+
toolId: string;
|
|
5663
|
+
/**
|
|
5664
|
+
* Workspace ID.
|
|
5665
|
+
*/
|
|
5666
|
+
workspaceId?: string;
|
|
5667
|
+
/**
|
|
5668
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5669
|
+
*/
|
|
5670
|
+
agentId?: string;
|
|
5671
|
+
/**
|
|
5672
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5673
|
+
*/
|
|
5674
|
+
variationId?: string;
|
|
5675
|
+
}
|
|
5676
|
+
|
|
5677
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolSetId {
|
|
5678
|
+
type: 'toolSetId';
|
|
5679
|
+
toolSetId: string;
|
|
5680
|
+
/**
|
|
5681
|
+
* Workspace ID.
|
|
5682
|
+
*/
|
|
5683
|
+
workspaceId?: string;
|
|
5684
|
+
/**
|
|
5685
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5686
|
+
*/
|
|
5687
|
+
agentId?: string;
|
|
5688
|
+
/**
|
|
5689
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5690
|
+
*/
|
|
5691
|
+
variationId?: string;
|
|
5692
|
+
}
|
|
5693
|
+
|
|
5694
|
+
export interface RemoveAgentVariationAssignmentRequest_SubAgentId {
|
|
5695
|
+
type: 'subAgentId';
|
|
5696
|
+
subAgentId: string;
|
|
5697
|
+
/**
|
|
5698
|
+
* Workspace ID.
|
|
5699
|
+
*/
|
|
5700
|
+
workspaceId?: string;
|
|
5701
|
+
/**
|
|
5702
|
+
* Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
|
|
5703
|
+
*/
|
|
5704
|
+
agentId?: string;
|
|
5705
|
+
/**
|
|
5706
|
+
* Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
|
|
5707
|
+
*/
|
|
5708
|
+
variationId?: string;
|
|
5709
|
+
}
|
|
5710
|
+
|
|
5565
5711
|
export interface AIProviderCredential_ApiKey {
|
|
5566
5712
|
type: 'apiKey';
|
|
5567
5713
|
/**
|
|
@@ -5664,13 +5810,13 @@ export type AgentServiceListAgentsVariationSelectionMode = 'VARIATION_SELECTION_
|
|
|
5664
5810
|
|
|
5665
5811
|
export type AgentServiceListAgentFeedbackSentiment = 'FEEDBACK_SENTIMENT_UNSPECIFIED' | 'FEEDBACK_SENTIMENT_POSITIVE' | 'FEEDBACK_SENTIMENT_NEGATIVE';
|
|
5666
5812
|
|
|
5667
|
-
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';
|
|
5813
|
+
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';
|
|
5668
5814
|
|
|
5669
5815
|
export type MemoryServiceListMemoryLayersType = 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
|
|
5670
5816
|
|
|
5671
5817
|
export type ModelServiceListModelsState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
|
|
5672
5818
|
|
|
5673
|
-
export type ObjectiveServiceListObjectivesState = '
|
|
5819
|
+
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';
|
|
5674
5820
|
|
|
5675
5821
|
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';
|
|
5676
5822
|
|
|
@@ -5731,6 +5877,8 @@ export interface ObjectiveEpisodicConfigParam {
|
|
|
5731
5877
|
key: string;
|
|
5732
5878
|
}
|
|
5733
5879
|
|
|
5880
|
+
export type RemoveAgentVariationAssignmentRequestParam = RemoveAgentVariationAssignmentRequest_ToolIdParam | RemoveAgentVariationAssignmentRequest_ToolSetIdParam | RemoveAgentVariationAssignmentRequest_SubAgentIdParam;
|
|
5881
|
+
|
|
5734
5882
|
export interface WidgetSessionSpecParam {
|
|
5735
5883
|
/**
|
|
5736
5884
|
* Widget this session is minted against. Accepts the canonical `wgt_…` form
|
|
@@ -5784,6 +5932,21 @@ export interface AddAgentVariationAssignmentRequest_SubAgentIdParam {
|
|
|
5784
5932
|
subAgentId: string;
|
|
5785
5933
|
}
|
|
5786
5934
|
|
|
5935
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolIdParam {
|
|
5936
|
+
type: 'toolId';
|
|
5937
|
+
toolId: string;
|
|
5938
|
+
}
|
|
5939
|
+
|
|
5940
|
+
export interface RemoveAgentVariationAssignmentRequest_ToolSetIdParam {
|
|
5941
|
+
type: 'toolSetId';
|
|
5942
|
+
toolSetId: string;
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5945
|
+
export interface RemoveAgentVariationAssignmentRequest_SubAgentIdParam {
|
|
5946
|
+
type: 'subAgentId';
|
|
5947
|
+
subAgentId: string;
|
|
5948
|
+
}
|
|
5949
|
+
|
|
5787
5950
|
|
|
5788
5951
|
// ---- request wire projections (strip readOnly at runtime) ----
|
|
5789
5952
|
|
|
@@ -5836,6 +5999,16 @@ export function wireObjectiveEpisodicConfig(value: ObjectiveEpisodicConfigParam
|
|
|
5836
5999
|
return out;
|
|
5837
6000
|
}
|
|
5838
6001
|
|
|
6002
|
+
export function wireRemoveAgentVariationAssignmentRequest(value: RemoveAgentVariationAssignmentRequestParam | null | undefined): unknown {
|
|
6003
|
+
if (value == null || typeof value !== 'object') return value;
|
|
6004
|
+
switch ((value as never as Record<string, unknown>)["type"]) {
|
|
6005
|
+
case "toolId": return wireRemoveAgentVariationAssignmentRequest_ToolId((value as never));
|
|
6006
|
+
case "toolSetId": return wireRemoveAgentVariationAssignmentRequest_ToolSetId((value as never));
|
|
6007
|
+
case "subAgentId": return wireRemoveAgentVariationAssignmentRequest_SubAgentId((value as never));
|
|
6008
|
+
default: return value;
|
|
6009
|
+
}
|
|
6010
|
+
}
|
|
6011
|
+
|
|
5839
6012
|
export function wireWidgetSessionSpec(value: WidgetSessionSpecParam | null | undefined): unknown {
|
|
5840
6013
|
if (value == null || typeof value !== 'object') return value;
|
|
5841
6014
|
const out: Record<string, unknown> = {};
|
|
@@ -5871,3 +6044,27 @@ export function wireAddAgentVariationAssignmentRequest_SubAgentId(value: AddAgen
|
|
|
5871
6044
|
return out;
|
|
5872
6045
|
}
|
|
5873
6046
|
|
|
6047
|
+
export function wireRemoveAgentVariationAssignmentRequest_ToolId(value: RemoveAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown {
|
|
6048
|
+
if (value == null || typeof value !== 'object') return value;
|
|
6049
|
+
const out: Record<string, unknown> = {};
|
|
6050
|
+
if (value.type !== undefined) out["type"] = value.type;
|
|
6051
|
+
if (value.toolId !== undefined) out["toolId"] = value.toolId;
|
|
6052
|
+
return out;
|
|
6053
|
+
}
|
|
6054
|
+
|
|
6055
|
+
export function wireRemoveAgentVariationAssignmentRequest_ToolSetId(value: RemoveAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown {
|
|
6056
|
+
if (value == null || typeof value !== 'object') return value;
|
|
6057
|
+
const out: Record<string, unknown> = {};
|
|
6058
|
+
if (value.type !== undefined) out["type"] = value.type;
|
|
6059
|
+
if (value.toolSetId !== undefined) out["toolSetId"] = value.toolSetId;
|
|
6060
|
+
return out;
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6063
|
+
export function wireRemoveAgentVariationAssignmentRequest_SubAgentId(value: RemoveAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown {
|
|
6064
|
+
if (value == null || typeof value !== 'object') return value;
|
|
6065
|
+
const out: Record<string, unknown> = {};
|
|
6066
|
+
if (value.type !== undefined) out["type"] = value.type;
|
|
6067
|
+
if (value.subAgentId !== undefined) out["subAgentId"] = value.subAgentId;
|
|
6068
|
+
return out;
|
|
6069
|
+
}
|
|
6070
|
+
|
package/src/webhooks.ts
CHANGED
|
@@ -68,6 +68,11 @@ export type ObjectiveEventMemoryReadWebhookEvent = ObjectiveEventWebhookData & {
|
|
|
68
68
|
*/
|
|
69
69
|
export type ObjectiveEventReasoningWebhookEvent = ObjectiveEventWebhookData & { type: 'objective_event.reasoning' };
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Objective state changed event
|
|
73
|
+
*/
|
|
74
|
+
export type ObjectiveEventStateChangedWebhookEvent = ObjectiveEventWebhookData & { type: 'objective_event.state_changed' };
|
|
75
|
+
|
|
71
76
|
export type UnwrapWebhookEvent =
|
|
72
77
|
| ObjectiveEventUserMessageWebhookEvent
|
|
73
78
|
| ObjectiveEventAssistantMessageWebhookEvent
|
|
@@ -81,7 +86,8 @@ export type UnwrapWebhookEvent =
|
|
|
81
86
|
| ObjectiveEventSubAgentUpdatedWebhookEvent
|
|
82
87
|
| ObjectiveEventErrorWebhookEvent
|
|
83
88
|
| ObjectiveEventMemoryReadWebhookEvent
|
|
84
|
-
| ObjectiveEventReasoningWebhookEvent
|
|
89
|
+
| ObjectiveEventReasoningWebhookEvent
|
|
90
|
+
| ObjectiveEventStateChangedWebhookEvent;
|
|
85
91
|
|
|
86
92
|
export class Webhooks {
|
|
87
93
|
constructor(private readonly secret: string | undefined) {}
|