@cadenya/cadenya 0.41.0 → 0.43.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/CHANGELOG.md +25 -0
- package/README.md +4 -4
- package/client.d.mts +17 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -5
- package/client.d.ts.map +1 -1
- package/client.js +11 -1
- package/client.js.map +1 -1
- package/client.mjs +12 -2
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +4 -2
- package/resources/account.d.mts +38 -1
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +38 -1
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +6 -0
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +6 -0
- package/resources/account.mjs.map +1 -1
- package/resources/{agents/variations.d.ts → agent-variations.d.mts} +124 -49
- package/resources/agent-variations.d.mts.map +1 -0
- package/resources/{agents/variations.d.mts → agent-variations.d.ts} +124 -49
- package/resources/agent-variations.d.ts.map +1 -0
- package/resources/{agents/variations.js → agent-variations.js} +29 -8
- package/resources/agent-variations.js.map +1 -0
- package/resources/{agents/variations.mjs → agent-variations.mjs} +27 -6
- package/resources/agent-variations.mjs.map +1 -0
- package/resources/agents/agents.d.mts +2 -11
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -11
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -4
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +0 -4
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.mts +0 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +0 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +1 -3
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +0 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +2 -2
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +2 -2
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/index.d.mts +4 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/objectives/feedback.d.mts +6 -6
- package/resources/objectives/feedback.d.ts +6 -6
- package/resources/objectives/index.d.mts +1 -1
- package/resources/objectives/index.d.mts.map +1 -1
- package/resources/objectives/index.d.ts +1 -1
- package/resources/objectives/index.d.ts.map +1 -1
- package/resources/objectives/index.js.map +1 -1
- package/resources/objectives/index.mjs.map +1 -1
- package/resources/objectives/objectives.d.mts +43 -3
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +43 -3
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +7 -0
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +7 -0
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tasks.d.mts +6 -6
- package/resources/objectives/tasks.d.ts +6 -6
- package/resources/objectives/tool-calls.d.mts +1 -0
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +1 -0
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tools.d.mts +6 -6
- package/resources/objectives/tools.d.ts +6 -6
- package/resources/shared.d.mts +13 -7
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +13 -7
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +116 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +116 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +23 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +19 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +84 -1
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/account.ts +44 -0
- package/src/resources/{agents/variations.ts → agent-variations.ts} +175 -64
- package/src/resources/agents/agents.ts +2 -50
- package/src/resources/agents/index.ts +0 -19
- package/src/resources/agents/webhook-deliveries.ts +4 -2
- package/src/resources/index.ts +35 -1
- package/src/resources/objectives/feedback.ts +6 -6
- package/src/resources/objectives/index.ts +3 -0
- package/src/resources/objectives/objectives.ts +59 -2
- package/src/resources/objectives/tasks.ts +6 -6
- package/src/resources/objectives/tool-calls.ts +7 -0
- package/src/resources/objectives/tools.ts +6 -6
- package/src/resources/shared.ts +14 -7
- package/src/resources/webhooks.ts +156 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agents/variations.d.mts.map +0 -1
- package/resources/agents/variations.d.ts.map +0 -1
- package/resources/agents/variations.js.map +0 -1
- package/resources/agents/variations.mjs.map +0 -1
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import * as AccountAPI from "
|
|
3
|
-
import * as Shared from "
|
|
4
|
-
import { APIPromise } from "
|
|
5
|
-
import { CursorPagination, type CursorPaginationParams, PagePromise } from "
|
|
6
|
-
import { RequestOptions } from "
|
|
7
|
-
export declare class
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as AccountAPI from "./account.mjs";
|
|
3
|
+
import * as Shared from "./shared.mjs";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
|
+
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../core/pagination.mjs";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
7
|
+
export declare class AgentVariations extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new variation for an agent
|
|
10
10
|
*/
|
|
11
|
-
create(agentID: string, body:
|
|
11
|
+
create(agentID: string, body: AgentVariationCreateParams, options?: RequestOptions): APIPromise<AgentVariation>;
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves a variation by ID from an agent
|
|
14
14
|
*/
|
|
15
|
-
retrieve(id: string, params:
|
|
15
|
+
retrieve(id: string, params: AgentVariationRetrieveParams, options?: RequestOptions): APIPromise<AgentVariation>;
|
|
16
16
|
/**
|
|
17
17
|
* Updates a variation for an agent
|
|
18
18
|
*/
|
|
19
|
-
update(id: string, params:
|
|
19
|
+
update(id: string, params: AgentVariationUpdateParams, options?: RequestOptions): APIPromise<AgentVariation>;
|
|
20
20
|
/**
|
|
21
21
|
* Lists all variations for an agent
|
|
22
22
|
*/
|
|
23
|
-
list(agentID: string, query?:
|
|
23
|
+
list(agentID: string, query?: AgentVariationListParams | null | undefined, options?: RequestOptions): PagePromise<AgentVariationsCursorPagination, AgentVariation>;
|
|
24
24
|
/**
|
|
25
25
|
* Deletes a variation from an agent
|
|
26
26
|
*/
|
|
27
|
-
delete(id: string, params:
|
|
27
|
+
delete(id: string, params: AgentVariationDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Assigns a tool, tool set, or sub-agent to a variation. Exactly one target ID
|
|
30
|
+
* must be set.
|
|
31
|
+
*/
|
|
32
|
+
addAssignment(agentVariationID: string, body: AgentVariationAddAssignmentParams, options?: RequestOptions): APIPromise<VariationAssignment>;
|
|
33
|
+
/**
|
|
34
|
+
* Detaches an assignment from a variation, identified by the assignment ID
|
|
35
|
+
* returned when it was added.
|
|
36
|
+
*/
|
|
37
|
+
removeAssignment(id: string, params: AgentVariationRemoveAssignmentParams, options?: RequestOptions): APIPromise<void>;
|
|
28
38
|
}
|
|
29
39
|
export type AgentVariationsCursorPagination = CursorPagination<AgentVariation>;
|
|
30
40
|
/**
|
|
@@ -48,6 +58,12 @@ export interface AgentVariation {
|
|
|
48
58
|
* AgentVariationInfo provides read-only summary information about a variation
|
|
49
59
|
*/
|
|
50
60
|
export interface AgentVariationInfo {
|
|
61
|
+
/**
|
|
62
|
+
* All tools, tool sets, and sub-agents assigned to this variation. Populated on
|
|
63
|
+
* reads so clients can render a variation's full assignment list without calling
|
|
64
|
+
* the add/remove endpoints just to enumerate.
|
|
65
|
+
*/
|
|
66
|
+
assignments?: Array<VariationAssignment>;
|
|
51
67
|
/**
|
|
52
68
|
* Profile represents a human user at the account level. Profiles are
|
|
53
69
|
* account-scoped resources that can be associated with multiple workspaces through
|
|
@@ -85,14 +101,10 @@ export interface AgentVariationInfo {
|
|
|
85
101
|
*/
|
|
86
102
|
export interface AgentVariationSpec {
|
|
87
103
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
agentDocuments?: Array<AgentVariationSpecAgentDocument>;
|
|
92
|
-
/**
|
|
93
|
-
* Tools assigned to this variation
|
|
104
|
+
* CompactionConfig defines how context window compaction behaves for objectives
|
|
105
|
+
* using this variation.
|
|
94
106
|
*/
|
|
95
|
-
|
|
107
|
+
compactionConfig?: AgentVariationSpecCompactionConfig;
|
|
96
108
|
/**
|
|
97
109
|
* Execution constraints
|
|
98
110
|
*/
|
|
@@ -134,34 +146,26 @@ export interface AgentVariationSpec {
|
|
|
134
146
|
*/
|
|
135
147
|
weight?: number;
|
|
136
148
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
documentMetadata?: Shared.ResourceMetadata;
|
|
143
|
-
documentNamespaceId?: string;
|
|
149
|
+
/**
|
|
150
|
+
* CompactionConfig defines how context window compaction behaves for objectives
|
|
151
|
+
* using this variation.
|
|
152
|
+
*/
|
|
153
|
+
export interface AgentVariationSpecCompactionConfig {
|
|
144
154
|
/**
|
|
145
|
-
*
|
|
155
|
+
* SummarizationStrategy configures LLM-powered summarization of older conversation
|
|
156
|
+
* turns.
|
|
146
157
|
*/
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
export interface AgentVariationSpecAgentTool {
|
|
150
|
-
agentId?: string;
|
|
158
|
+
summarization?: CompactionConfigSummarizationStrategy;
|
|
151
159
|
/**
|
|
152
|
-
*
|
|
160
|
+
* ToolResultClearingStrategy configures clearing of older tool result content.
|
|
153
161
|
*/
|
|
154
|
-
|
|
155
|
-
toolId?: string;
|
|
162
|
+
toolResultClearing?: CompactionConfigToolResultClearingStrategy;
|
|
156
163
|
/**
|
|
157
|
-
*
|
|
164
|
+
* Trigger threshold as a percentage of the model's context window (0.0 to 1.0).
|
|
165
|
+
* When input tokens reach this percentage of the model's limit, compaction
|
|
166
|
+
* triggers. Default: 0.75 (75%)
|
|
158
167
|
*/
|
|
159
|
-
|
|
160
|
-
toolSetId?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
163
|
-
*/
|
|
164
|
-
toolSetMetadata?: Shared.ResourceMetadata;
|
|
168
|
+
triggerThreshold?: number;
|
|
165
169
|
}
|
|
166
170
|
export interface AgentVariationSpecConstraints {
|
|
167
171
|
/**
|
|
@@ -204,6 +208,29 @@ export interface AgentVariationSpecToolSelection {
|
|
|
204
208
|
*/
|
|
205
209
|
autoDiscovery?: ToolSelectionAutoDiscovery;
|
|
206
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* SummarizationStrategy configures LLM-powered summarization of older conversation
|
|
213
|
+
* turns.
|
|
214
|
+
*/
|
|
215
|
+
export interface CompactionConfigSummarizationStrategy {
|
|
216
|
+
/**
|
|
217
|
+
* Custom instructions that guide what the summarizer preserves. Replaces the
|
|
218
|
+
* default summarization prompt entirely. Example: "Preserve all code snippets,
|
|
219
|
+
* variable names, and technical decisions."
|
|
220
|
+
*/
|
|
221
|
+
instructions?: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* ToolResultClearingStrategy configures clearing of older tool result content.
|
|
225
|
+
*/
|
|
226
|
+
export interface CompactionConfigToolResultClearingStrategy {
|
|
227
|
+
/**
|
|
228
|
+
* Number of most recent tool call results to keep intact. Older tool results have
|
|
229
|
+
* their content replaced with "[result cleared]" while preserving the assistant
|
|
230
|
+
* tool call message (function name, arguments). Default: 2
|
|
231
|
+
*/
|
|
232
|
+
preserveRecentResults?: number;
|
|
233
|
+
}
|
|
207
234
|
/**
|
|
208
235
|
* AssignedTools is used to indicate that the agent should only use the tools/tool
|
|
209
236
|
* sets that are explicitly assigned to it. Allow discovery is used when the agent
|
|
@@ -223,7 +250,47 @@ export interface ToolSelectionAutoDiscovery {
|
|
|
223
250
|
hints?: Array<string>;
|
|
224
251
|
maxTools?: number;
|
|
225
252
|
}
|
|
226
|
-
|
|
253
|
+
/**
|
|
254
|
+
* VariationAssignment is a read-only reference to a single tool, tool set, or
|
|
255
|
+
* sub-agent attached to a variation. Clients read the full set of assignments via
|
|
256
|
+
* `AgentVariationInfo.assignments`; mutations go through the dedicated add/remove
|
|
257
|
+
* assignment endpoints under /v1/agent_variations/{id}/assignments.
|
|
258
|
+
*
|
|
259
|
+
* The `id` identifies the assignment row itself (not the referenced resource) and
|
|
260
|
+
* is the handle used to remove the assignment. It is returned by the add endpoint
|
|
261
|
+
* and present on every entry in AgentVariationInfo.assignments.
|
|
262
|
+
*/
|
|
263
|
+
export interface VariationAssignment {
|
|
264
|
+
id?: string;
|
|
265
|
+
/**
|
|
266
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
267
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
268
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
269
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
270
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
271
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
272
|
+
*/
|
|
273
|
+
agent?: Shared.BareMetadata;
|
|
274
|
+
/**
|
|
275
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
276
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
277
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
278
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
279
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
280
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
281
|
+
*/
|
|
282
|
+
tool?: Shared.BareMetadata;
|
|
283
|
+
/**
|
|
284
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
285
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
286
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
287
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
288
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
289
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
290
|
+
*/
|
|
291
|
+
toolSet?: Shared.BareMetadata;
|
|
292
|
+
}
|
|
293
|
+
export interface AgentVariationCreateParams {
|
|
227
294
|
/**
|
|
228
295
|
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
229
296
|
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
@@ -235,13 +302,13 @@ export interface VariationCreateParams {
|
|
|
235
302
|
*/
|
|
236
303
|
spec: AgentVariationSpec;
|
|
237
304
|
}
|
|
238
|
-
export interface
|
|
305
|
+
export interface AgentVariationRetrieveParams {
|
|
239
306
|
/**
|
|
240
307
|
* Agent ID (from path)
|
|
241
308
|
*/
|
|
242
309
|
agentId: string;
|
|
243
310
|
}
|
|
244
|
-
export interface
|
|
311
|
+
export interface AgentVariationUpdateParams {
|
|
245
312
|
/**
|
|
246
313
|
* Path param: Agent ID (from path)
|
|
247
314
|
*/
|
|
@@ -263,7 +330,7 @@ export interface VariationUpdateParams {
|
|
|
263
330
|
*/
|
|
264
331
|
updateMask?: string;
|
|
265
332
|
}
|
|
266
|
-
export interface
|
|
333
|
+
export interface AgentVariationListParams extends CursorPaginationParams {
|
|
267
334
|
/**
|
|
268
335
|
* When set to true you may use more of your alloted API rate-limit
|
|
269
336
|
*/
|
|
@@ -273,13 +340,21 @@ export interface VariationListParams extends CursorPaginationParams {
|
|
|
273
340
|
*/
|
|
274
341
|
sortOrder?: string;
|
|
275
342
|
}
|
|
276
|
-
export interface
|
|
343
|
+
export interface AgentVariationDeleteParams {
|
|
277
344
|
/**
|
|
278
345
|
* Agent ID (from path)
|
|
279
346
|
*/
|
|
280
347
|
agentId: string;
|
|
281
348
|
}
|
|
282
|
-
export
|
|
283
|
-
|
|
349
|
+
export interface AgentVariationAddAssignmentParams {
|
|
350
|
+
subAgentId?: string;
|
|
351
|
+
toolId?: string;
|
|
352
|
+
toolSetId?: string;
|
|
353
|
+
}
|
|
354
|
+
export interface AgentVariationRemoveAssignmentParams {
|
|
355
|
+
agentVariationId: string;
|
|
356
|
+
}
|
|
357
|
+
export declare namespace AgentVariations {
|
|
358
|
+
export { type AgentVariation as AgentVariation, type AgentVariationInfo as AgentVariationInfo, type AgentVariationSpec as AgentVariationSpec, type AgentVariationSpecCompactionConfig as AgentVariationSpecCompactionConfig, type AgentVariationSpecConstraints as AgentVariationSpecConstraints, type AgentVariationSpecModelConfig as AgentVariationSpecModelConfig, type AgentVariationSpecToolSelection as AgentVariationSpecToolSelection, type CompactionConfigSummarizationStrategy as CompactionConfigSummarizationStrategy, type CompactionConfigToolResultClearingStrategy as CompactionConfigToolResultClearingStrategy, type ToolSelectionAssignedTools as ToolSelectionAssignedTools, type ToolSelectionAutoDiscovery as ToolSelectionAutoDiscovery, type VariationAssignment as VariationAssignment, type AgentVariationsCursorPagination as AgentVariationsCursorPagination, type AgentVariationCreateParams as AgentVariationCreateParams, type AgentVariationRetrieveParams as AgentVariationRetrieveParams, type AgentVariationUpdateParams as AgentVariationUpdateParams, type AgentVariationListParams as AgentVariationListParams, type AgentVariationDeleteParams as AgentVariationDeleteParams, type AgentVariationAddAssignmentParams as AgentVariationAddAssignmentParams, type AgentVariationRemoveAssignmentParams as AgentVariationRemoveAssignmentParams, };
|
|
284
359
|
}
|
|
285
|
-
//# sourceMappingURL=variations.d.
|
|
360
|
+
//# sourceMappingURL=agent-variations.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-variations.d.mts","sourceRoot":"","sources":["../src/resources/agent-variations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAI7B;;OAEG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAK7B;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAK7B;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,+BAA+B,EAAE,cAAc,CAAC;IAO/D;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQlG;;;OAGG;IACH,aAAa,CACX,gBAAgB,EAAE,MAAM,EACxB,I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CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
import { APIResource } from "
|
|
2
|
-
import * as AccountAPI from "
|
|
3
|
-
import * as Shared from "
|
|
4
|
-
import { APIPromise } from "
|
|
5
|
-
import { CursorPagination, type CursorPaginationParams, PagePromise } from "
|
|
6
|
-
import { RequestOptions } from "
|
|
7
|
-
export declare class
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as AccountAPI from "./account.js";
|
|
3
|
+
import * as Shared from "./shared.js";
|
|
4
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
5
|
+
import { CursorPagination, type CursorPaginationParams, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
7
|
+
export declare class AgentVariations extends APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new variation for an agent
|
|
10
10
|
*/
|
|
11
|
-
create(agentID: string, body:
|
|
11
|
+
create(agentID: string, body: AgentVariationCreateParams, options?: RequestOptions): APIPromise<AgentVariation>;
|
|
12
12
|
/**
|
|
13
13
|
* Retrieves a variation by ID from an agent
|
|
14
14
|
*/
|
|
15
|
-
retrieve(id: string, params:
|
|
15
|
+
retrieve(id: string, params: AgentVariationRetrieveParams, options?: RequestOptions): APIPromise<AgentVariation>;
|
|
16
16
|
/**
|
|
17
17
|
* Updates a variation for an agent
|
|
18
18
|
*/
|
|
19
|
-
update(id: string, params:
|
|
19
|
+
update(id: string, params: AgentVariationUpdateParams, options?: RequestOptions): APIPromise<AgentVariation>;
|
|
20
20
|
/**
|
|
21
21
|
* Lists all variations for an agent
|
|
22
22
|
*/
|
|
23
|
-
list(agentID: string, query?:
|
|
23
|
+
list(agentID: string, query?: AgentVariationListParams | null | undefined, options?: RequestOptions): PagePromise<AgentVariationsCursorPagination, AgentVariation>;
|
|
24
24
|
/**
|
|
25
25
|
* Deletes a variation from an agent
|
|
26
26
|
*/
|
|
27
|
-
delete(id: string, params:
|
|
27
|
+
delete(id: string, params: AgentVariationDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Assigns a tool, tool set, or sub-agent to a variation. Exactly one target ID
|
|
30
|
+
* must be set.
|
|
31
|
+
*/
|
|
32
|
+
addAssignment(agentVariationID: string, body: AgentVariationAddAssignmentParams, options?: RequestOptions): APIPromise<VariationAssignment>;
|
|
33
|
+
/**
|
|
34
|
+
* Detaches an assignment from a variation, identified by the assignment ID
|
|
35
|
+
* returned when it was added.
|
|
36
|
+
*/
|
|
37
|
+
removeAssignment(id: string, params: AgentVariationRemoveAssignmentParams, options?: RequestOptions): APIPromise<void>;
|
|
28
38
|
}
|
|
29
39
|
export type AgentVariationsCursorPagination = CursorPagination<AgentVariation>;
|
|
30
40
|
/**
|
|
@@ -48,6 +58,12 @@ export interface AgentVariation {
|
|
|
48
58
|
* AgentVariationInfo provides read-only summary information about a variation
|
|
49
59
|
*/
|
|
50
60
|
export interface AgentVariationInfo {
|
|
61
|
+
/**
|
|
62
|
+
* All tools, tool sets, and sub-agents assigned to this variation. Populated on
|
|
63
|
+
* reads so clients can render a variation's full assignment list without calling
|
|
64
|
+
* the add/remove endpoints just to enumerate.
|
|
65
|
+
*/
|
|
66
|
+
assignments?: Array<VariationAssignment>;
|
|
51
67
|
/**
|
|
52
68
|
* Profile represents a human user at the account level. Profiles are
|
|
53
69
|
* account-scoped resources that can be associated with multiple workspaces through
|
|
@@ -85,14 +101,10 @@ export interface AgentVariationInfo {
|
|
|
85
101
|
*/
|
|
86
102
|
export interface AgentVariationSpec {
|
|
87
103
|
/**
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*/
|
|
91
|
-
agentDocuments?: Array<AgentVariationSpecAgentDocument>;
|
|
92
|
-
/**
|
|
93
|
-
* Tools assigned to this variation
|
|
104
|
+
* CompactionConfig defines how context window compaction behaves for objectives
|
|
105
|
+
* using this variation.
|
|
94
106
|
*/
|
|
95
|
-
|
|
107
|
+
compactionConfig?: AgentVariationSpecCompactionConfig;
|
|
96
108
|
/**
|
|
97
109
|
* Execution constraints
|
|
98
110
|
*/
|
|
@@ -134,34 +146,26 @@ export interface AgentVariationSpec {
|
|
|
134
146
|
*/
|
|
135
147
|
weight?: number;
|
|
136
148
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
documentMetadata?: Shared.ResourceMetadata;
|
|
143
|
-
documentNamespaceId?: string;
|
|
149
|
+
/**
|
|
150
|
+
* CompactionConfig defines how context window compaction behaves for objectives
|
|
151
|
+
* using this variation.
|
|
152
|
+
*/
|
|
153
|
+
export interface AgentVariationSpecCompactionConfig {
|
|
144
154
|
/**
|
|
145
|
-
*
|
|
155
|
+
* SummarizationStrategy configures LLM-powered summarization of older conversation
|
|
156
|
+
* turns.
|
|
146
157
|
*/
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
export interface AgentVariationSpecAgentTool {
|
|
150
|
-
agentId?: string;
|
|
158
|
+
summarization?: CompactionConfigSummarizationStrategy;
|
|
151
159
|
/**
|
|
152
|
-
*
|
|
160
|
+
* ToolResultClearingStrategy configures clearing of older tool result content.
|
|
153
161
|
*/
|
|
154
|
-
|
|
155
|
-
toolId?: string;
|
|
162
|
+
toolResultClearing?: CompactionConfigToolResultClearingStrategy;
|
|
156
163
|
/**
|
|
157
|
-
*
|
|
164
|
+
* Trigger threshold as a percentage of the model's context window (0.0 to 1.0).
|
|
165
|
+
* When input tokens reach this percentage of the model's limit, compaction
|
|
166
|
+
* triggers. Default: 0.75 (75%)
|
|
158
167
|
*/
|
|
159
|
-
|
|
160
|
-
toolSetId?: string;
|
|
161
|
-
/**
|
|
162
|
-
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
163
|
-
*/
|
|
164
|
-
toolSetMetadata?: Shared.ResourceMetadata;
|
|
168
|
+
triggerThreshold?: number;
|
|
165
169
|
}
|
|
166
170
|
export interface AgentVariationSpecConstraints {
|
|
167
171
|
/**
|
|
@@ -204,6 +208,29 @@ export interface AgentVariationSpecToolSelection {
|
|
|
204
208
|
*/
|
|
205
209
|
autoDiscovery?: ToolSelectionAutoDiscovery;
|
|
206
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* SummarizationStrategy configures LLM-powered summarization of older conversation
|
|
213
|
+
* turns.
|
|
214
|
+
*/
|
|
215
|
+
export interface CompactionConfigSummarizationStrategy {
|
|
216
|
+
/**
|
|
217
|
+
* Custom instructions that guide what the summarizer preserves. Replaces the
|
|
218
|
+
* default summarization prompt entirely. Example: "Preserve all code snippets,
|
|
219
|
+
* variable names, and technical decisions."
|
|
220
|
+
*/
|
|
221
|
+
instructions?: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* ToolResultClearingStrategy configures clearing of older tool result content.
|
|
225
|
+
*/
|
|
226
|
+
export interface CompactionConfigToolResultClearingStrategy {
|
|
227
|
+
/**
|
|
228
|
+
* Number of most recent tool call results to keep intact. Older tool results have
|
|
229
|
+
* their content replaced with "[result cleared]" while preserving the assistant
|
|
230
|
+
* tool call message (function name, arguments). Default: 2
|
|
231
|
+
*/
|
|
232
|
+
preserveRecentResults?: number;
|
|
233
|
+
}
|
|
207
234
|
/**
|
|
208
235
|
* AssignedTools is used to indicate that the agent should only use the tools/tool
|
|
209
236
|
* sets that are explicitly assigned to it. Allow discovery is used when the agent
|
|
@@ -223,7 +250,47 @@ export interface ToolSelectionAutoDiscovery {
|
|
|
223
250
|
hints?: Array<string>;
|
|
224
251
|
maxTools?: number;
|
|
225
252
|
}
|
|
226
|
-
|
|
253
|
+
/**
|
|
254
|
+
* VariationAssignment is a read-only reference to a single tool, tool set, or
|
|
255
|
+
* sub-agent attached to a variation. Clients read the full set of assignments via
|
|
256
|
+
* `AgentVariationInfo.assignments`; mutations go through the dedicated add/remove
|
|
257
|
+
* assignment endpoints under /v1/agent_variations/{id}/assignments.
|
|
258
|
+
*
|
|
259
|
+
* The `id` identifies the assignment row itself (not the referenced resource) and
|
|
260
|
+
* is the handle used to remove the assignment. It is returned by the add endpoint
|
|
261
|
+
* and present on every entry in AgentVariationInfo.assignments.
|
|
262
|
+
*/
|
|
263
|
+
export interface VariationAssignment {
|
|
264
|
+
id?: string;
|
|
265
|
+
/**
|
|
266
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
267
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
268
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
269
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
270
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
271
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
272
|
+
*/
|
|
273
|
+
agent?: Shared.BareMetadata;
|
|
274
|
+
/**
|
|
275
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
276
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
277
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
278
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
279
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
280
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
281
|
+
*/
|
|
282
|
+
tool?: Shared.BareMetadata;
|
|
283
|
+
/**
|
|
284
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
285
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
286
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
287
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
288
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
289
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
290
|
+
*/
|
|
291
|
+
toolSet?: Shared.BareMetadata;
|
|
292
|
+
}
|
|
293
|
+
export interface AgentVariationCreateParams {
|
|
227
294
|
/**
|
|
228
295
|
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
229
296
|
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
@@ -235,13 +302,13 @@ export interface VariationCreateParams {
|
|
|
235
302
|
*/
|
|
236
303
|
spec: AgentVariationSpec;
|
|
237
304
|
}
|
|
238
|
-
export interface
|
|
305
|
+
export interface AgentVariationRetrieveParams {
|
|
239
306
|
/**
|
|
240
307
|
* Agent ID (from path)
|
|
241
308
|
*/
|
|
242
309
|
agentId: string;
|
|
243
310
|
}
|
|
244
|
-
export interface
|
|
311
|
+
export interface AgentVariationUpdateParams {
|
|
245
312
|
/**
|
|
246
313
|
* Path param: Agent ID (from path)
|
|
247
314
|
*/
|
|
@@ -263,7 +330,7 @@ export interface VariationUpdateParams {
|
|
|
263
330
|
*/
|
|
264
331
|
updateMask?: string;
|
|
265
332
|
}
|
|
266
|
-
export interface
|
|
333
|
+
export interface AgentVariationListParams extends CursorPaginationParams {
|
|
267
334
|
/**
|
|
268
335
|
* When set to true you may use more of your alloted API rate-limit
|
|
269
336
|
*/
|
|
@@ -273,13 +340,21 @@ export interface VariationListParams extends CursorPaginationParams {
|
|
|
273
340
|
*/
|
|
274
341
|
sortOrder?: string;
|
|
275
342
|
}
|
|
276
|
-
export interface
|
|
343
|
+
export interface AgentVariationDeleteParams {
|
|
277
344
|
/**
|
|
278
345
|
* Agent ID (from path)
|
|
279
346
|
*/
|
|
280
347
|
agentId: string;
|
|
281
348
|
}
|
|
282
|
-
export
|
|
283
|
-
|
|
349
|
+
export interface AgentVariationAddAssignmentParams {
|
|
350
|
+
subAgentId?: string;
|
|
351
|
+
toolId?: string;
|
|
352
|
+
toolSetId?: string;
|
|
353
|
+
}
|
|
354
|
+
export interface AgentVariationRemoveAssignmentParams {
|
|
355
|
+
agentVariationId: string;
|
|
356
|
+
}
|
|
357
|
+
export declare namespace AgentVariations {
|
|
358
|
+
export { type AgentVariation as AgentVariation, type AgentVariationInfo as AgentVariationInfo, type AgentVariationSpec as AgentVariationSpec, type AgentVariationSpecCompactionConfig as AgentVariationSpecCompactionConfig, type AgentVariationSpecConstraints as AgentVariationSpecConstraints, type AgentVariationSpecModelConfig as AgentVariationSpecModelConfig, type AgentVariationSpecToolSelection as AgentVariationSpecToolSelection, type CompactionConfigSummarizationStrategy as CompactionConfigSummarizationStrategy, type CompactionConfigToolResultClearingStrategy as CompactionConfigToolResultClearingStrategy, type ToolSelectionAssignedTools as ToolSelectionAssignedTools, type ToolSelectionAutoDiscovery as ToolSelectionAutoDiscovery, type VariationAssignment as VariationAssignment, type AgentVariationsCursorPagination as AgentVariationsCursorPagination, type AgentVariationCreateParams as AgentVariationCreateParams, type AgentVariationRetrieveParams as AgentVariationRetrieveParams, type AgentVariationUpdateParams as AgentVariationUpdateParams, type AgentVariationListParams as AgentVariationListParams, type AgentVariationDeleteParams as AgentVariationDeleteParams, type AgentVariationAddAssignmentParams as AgentVariationAddAssignmentParams, type AgentVariationRemoveAssignmentParams as AgentVariationRemoveAssignmentParams, };
|
|
284
359
|
}
|
|
285
|
-
//# sourceMappingURL=variations.d.
|
|
360
|
+
//# sourceMappingURL=agent-variations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-variations.d.ts","sourceRoot":"","sources":["../src/resources/agent-variations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,WAAW,EAAE;OAE9D,EAAE,cAAc,EAAE;AAGzB,qBAAa,eAAgB,SAAQ,WAAW;IAC9C;;OAEG;IACH,MAAM,CACJ,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAI7B;;OAEG;IACH,QAAQ,CACN,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,4BAA4B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAK7B;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,0BAA0B,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,cAAc,CAAC;IAK7B;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,+BAA+B,EAAE,cAAc,CAAC;IAO/D;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAQlG;;;OAGG;IAC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oCAAoC;IACnD,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,eAAe,CAAC;IACvC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,oCAAoC,IAAI,oCAAoC,GAClF,CAAC;CACH"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
const resource_1 = require("
|
|
6
|
-
const pagination_1 = require("
|
|
7
|
-
const headers_1 = require("
|
|
8
|
-
const path_1 = require("
|
|
9
|
-
class
|
|
4
|
+
exports.AgentVariations = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const headers_1 = require("../internal/headers.js");
|
|
8
|
+
const path_1 = require("../internal/utils/path.js");
|
|
9
|
+
class AgentVariations extends resource_1.APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Creates a new variation for an agent
|
|
12
12
|
*/
|
|
@@ -46,6 +46,27 @@ class Variations extends resource_1.APIResource {
|
|
|
46
46
|
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Assigns a tool, tool set, or sub-agent to a variation. Exactly one target ID
|
|
51
|
+
* must be set.
|
|
52
|
+
*/
|
|
53
|
+
addAssignment(agentVariationID, body, options) {
|
|
54
|
+
return this._client.post((0, path_1.path) `/v1/agent_variations/${agentVariationID}/assignments`, {
|
|
55
|
+
body,
|
|
56
|
+
...options,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Detaches an assignment from a variation, identified by the assignment ID
|
|
61
|
+
* returned when it was added.
|
|
62
|
+
*/
|
|
63
|
+
removeAssignment(id, params, options) {
|
|
64
|
+
const { agentVariationId } = params;
|
|
65
|
+
return this._client.delete((0, path_1.path) `/v1/agent_variations/${agentVariationId}/assignments/${id}`, {
|
|
66
|
+
...options,
|
|
67
|
+
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
49
70
|
}
|
|
50
|
-
exports.
|
|
51
|
-
//# sourceMappingURL=variations.js.map
|
|
71
|
+
exports.AgentVariations = AgentVariations;
|
|
72
|
+
//# sourceMappingURL=agent-variations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-variations.js","sourceRoot":"","sources":["../src/resources/agent-variations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,sDAAgG;AAChG,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;OAEG;IACH,MAAM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EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,aAAa,CACX,gBAAwB,EACxB,IAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,gBAAgB,cAAc,EAAE;YACnF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,gBAAgB,CACd,EAAU,EACV,MAA4C,EAC5C,OAAwB;QAExB,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,wBAAwB,gBAAgB,gBAAgB,EAAE,EAAE,EAAE;YAC3F,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AA3FD,0CA2FC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "
|
|
3
|
-
import { CursorPagination } from "
|
|
4
|
-
import { buildHeaders } from "
|
|
5
|
-
import { path } from "
|
|
6
|
-
export class
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { CursorPagination } from "../core/pagination.mjs";
|
|
4
|
+
import { buildHeaders } from "../internal/headers.mjs";
|
|
5
|
+
import { path } from "../internal/utils/path.mjs";
|
|
6
|
+
export class AgentVariations extends APIResource {
|
|
7
7
|
/**
|
|
8
8
|
* Creates a new variation for an agent
|
|
9
9
|
*/
|
|
@@ -43,5 +43,26 @@ export class Variations extends APIResource {
|
|
|
43
43
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Assigns a tool, tool set, or sub-agent to a variation. Exactly one target ID
|
|
48
|
+
* must be set.
|
|
49
|
+
*/
|
|
50
|
+
addAssignment(agentVariationID, body, options) {
|
|
51
|
+
return this._client.post(path `/v1/agent_variations/${agentVariationID}/assignments`, {
|
|
52
|
+
body,
|
|
53
|
+
...options,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Detaches an assignment from a variation, identified by the assignment ID
|
|
58
|
+
* returned when it was added.
|
|
59
|
+
*/
|
|
60
|
+
removeAssignment(id, params, options) {
|
|
61
|
+
const { agentVariationId } = params;
|
|
62
|
+
return this._client.delete(path `/v1/agent_variations/${agentVariationId}/assignments/${id}`, {
|
|
63
|
+
...options,
|
|
64
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
65
|
+
});
|
|
66
|
+
}
|
|
46
67
|
}
|
|
47
|
-
//# sourceMappingURL=variations.mjs.map
|
|
68
|
+
//# sourceMappingURL=agent-variations.mjs.map
|