@cadenya/cadenya 0.42.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 +9 -0
- package/README.md +4 -4
- package/client.d.mts +15 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -3
- 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/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} +84 -47
- package/resources/agent-variations.d.mts.map +1 -0
- package/resources/{agents/variations.d.mts → agent-variations.d.ts} +84 -47
- 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/index.d.mts +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- 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/objectives.d.mts +3 -3
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +3 -3
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/tasks.d.mts +6 -6
- package/resources/objectives/tasks.d.ts +6 -6
- 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 +78 -1
- package/src/resources/account.ts +44 -0
- package/src/resources/{agents/variations.ts → agent-variations.ts} +130 -61
- package/src/resources/agents/agents.ts +2 -54
- package/src/resources/agents/index.ts +0 -21
- package/src/resources/index.ts +32 -1
- package/src/resources/objectives/feedback.ts +6 -6
- package/src/resources/objectives/objectives.ts +3 -3
- package/src/resources/objectives/tasks.ts +6 -6
- 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,19 +1,23 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import { APIResource } from '
|
|
4
|
-
import * as AccountAPI from '
|
|
5
|
-
import * as Shared from '
|
|
6
|
-
import { APIPromise } from '
|
|
7
|
-
import { CursorPagination, type CursorPaginationParams, PagePromise } from '
|
|
8
|
-
import { buildHeaders } from '
|
|
9
|
-
import { RequestOptions } from '
|
|
10
|
-
import { path } from '
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as AccountAPI from './account';
|
|
5
|
+
import * as Shared from './shared';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { CursorPagination, type CursorPaginationParams, PagePromise } from '../core/pagination';
|
|
8
|
+
import { buildHeaders } from '../internal/headers';
|
|
9
|
+
import { RequestOptions } from '../internal/request-options';
|
|
10
|
+
import { path } from '../internal/utils/path';
|
|
11
11
|
|
|
12
|
-
export class
|
|
12
|
+
export class AgentVariations extends APIResource {
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new variation for an agent
|
|
15
15
|
*/
|
|
16
|
-
create(
|
|
16
|
+
create(
|
|
17
|
+
agentID: string,
|
|
18
|
+
body: AgentVariationCreateParams,
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): APIPromise<AgentVariation> {
|
|
17
21
|
return this._client.post(path`/v1/agents/${agentID}/variations`, { body, ...options });
|
|
18
22
|
}
|
|
19
23
|
|
|
@@ -22,7 +26,7 @@ export class Variations extends APIResource {
|
|
|
22
26
|
*/
|
|
23
27
|
retrieve(
|
|
24
28
|
id: string,
|
|
25
|
-
params:
|
|
29
|
+
params: AgentVariationRetrieveParams,
|
|
26
30
|
options?: RequestOptions,
|
|
27
31
|
): APIPromise<AgentVariation> {
|
|
28
32
|
const { agentId } = params;
|
|
@@ -32,7 +36,11 @@ export class Variations extends APIResource {
|
|
|
32
36
|
/**
|
|
33
37
|
* Updates a variation for an agent
|
|
34
38
|
*/
|
|
35
|
-
update(
|
|
39
|
+
update(
|
|
40
|
+
id: string,
|
|
41
|
+
params: AgentVariationUpdateParams,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): APIPromise<AgentVariation> {
|
|
36
44
|
const { agentId, ...body } = params;
|
|
37
45
|
return this._client.patch(path`/v1/agents/${agentId}/variations/${id}`, { body, ...options });
|
|
38
46
|
}
|
|
@@ -42,7 +50,7 @@ export class Variations extends APIResource {
|
|
|
42
50
|
*/
|
|
43
51
|
list(
|
|
44
52
|
agentID: string,
|
|
45
|
-
query:
|
|
53
|
+
query: AgentVariationListParams | null | undefined = {},
|
|
46
54
|
options?: RequestOptions,
|
|
47
55
|
): PagePromise<AgentVariationsCursorPagination, AgentVariation> {
|
|
48
56
|
return this._client.getAPIList(path`/v1/agents/${agentID}/variations`, CursorPagination<AgentVariation>, {
|
|
@@ -54,13 +62,44 @@ export class Variations extends APIResource {
|
|
|
54
62
|
/**
|
|
55
63
|
* Deletes a variation from an agent
|
|
56
64
|
*/
|
|
57
|
-
delete(id: string, params:
|
|
65
|
+
delete(id: string, params: AgentVariationDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
58
66
|
const { agentId } = params;
|
|
59
67
|
return this._client.delete(path`/v1/agents/${agentId}/variations/${id}`, {
|
|
60
68
|
...options,
|
|
61
69
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
62
70
|
});
|
|
63
71
|
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Assigns a tool, tool set, or sub-agent to a variation. Exactly one target ID
|
|
75
|
+
* must be set.
|
|
76
|
+
*/
|
|
77
|
+
addAssignment(
|
|
78
|
+
agentVariationID: string,
|
|
79
|
+
body: AgentVariationAddAssignmentParams,
|
|
80
|
+
options?: RequestOptions,
|
|
81
|
+
): APIPromise<VariationAssignment> {
|
|
82
|
+
return this._client.post(path`/v1/agent_variations/${agentVariationID}/assignments`, {
|
|
83
|
+
body,
|
|
84
|
+
...options,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Detaches an assignment from a variation, identified by the assignment ID
|
|
90
|
+
* returned when it was added.
|
|
91
|
+
*/
|
|
92
|
+
removeAssignment(
|
|
93
|
+
id: string,
|
|
94
|
+
params: AgentVariationRemoveAssignmentParams,
|
|
95
|
+
options?: RequestOptions,
|
|
96
|
+
): APIPromise<void> {
|
|
97
|
+
const { agentVariationId } = params;
|
|
98
|
+
return this._client.delete(path`/v1/agent_variations/${agentVariationId}/assignments/${id}`, {
|
|
99
|
+
...options,
|
|
100
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
64
103
|
}
|
|
65
104
|
|
|
66
105
|
export type AgentVariationsCursorPagination = CursorPagination<AgentVariation>;
|
|
@@ -89,6 +128,13 @@ export interface AgentVariation {
|
|
|
89
128
|
* AgentVariationInfo provides read-only summary information about a variation
|
|
90
129
|
*/
|
|
91
130
|
export interface AgentVariationInfo {
|
|
131
|
+
/**
|
|
132
|
+
* All tools, tool sets, and sub-agents assigned to this variation. Populated on
|
|
133
|
+
* reads so clients can render a variation's full assignment list without calling
|
|
134
|
+
* the add/remove endpoints just to enumerate.
|
|
135
|
+
*/
|
|
136
|
+
assignments?: Array<VariationAssignment>;
|
|
137
|
+
|
|
92
138
|
/**
|
|
93
139
|
* Profile represents a human user at the account level. Profiles are
|
|
94
140
|
* account-scoped resources that can be associated with multiple workspaces through
|
|
@@ -132,11 +178,6 @@ export interface AgentVariationInfo {
|
|
|
132
178
|
* AgentVariationSpec defines the operational configuration for a variation
|
|
133
179
|
*/
|
|
134
180
|
export interface AgentVariationSpec {
|
|
135
|
-
/**
|
|
136
|
-
* Tools assigned to this variation
|
|
137
|
-
*/
|
|
138
|
-
agentTools?: Array<AgentVariationSpecAgentTool>;
|
|
139
|
-
|
|
140
181
|
/**
|
|
141
182
|
* CompactionConfig defines how context window compaction behaves for objectives
|
|
142
183
|
* using this variation.
|
|
@@ -192,29 +233,6 @@ export interface AgentVariationSpec {
|
|
|
192
233
|
weight?: number;
|
|
193
234
|
}
|
|
194
235
|
|
|
195
|
-
export interface AgentVariationSpecAgentTool {
|
|
196
|
-
agentId?: string;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
200
|
-
*/
|
|
201
|
-
agentMetadata?: Shared.ResourceMetadata;
|
|
202
|
-
|
|
203
|
-
toolId?: string;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
207
|
-
*/
|
|
208
|
-
toolMetadata?: Shared.ResourceMetadata;
|
|
209
|
-
|
|
210
|
-
toolSetId?: string;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
214
|
-
*/
|
|
215
|
-
toolSetMetadata?: Shared.ResourceMetadata;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
236
|
/**
|
|
219
237
|
* CompactionConfig defines how context window compaction behaves for objectives
|
|
220
238
|
* using this variation.
|
|
@@ -297,13 +315,6 @@ export interface CompactionConfigSummarizationStrategy {
|
|
|
297
315
|
* variable names, and technical decisions."
|
|
298
316
|
*/
|
|
299
317
|
instructions?: string;
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Minimum number of recent message turns to always preserve during compaction.
|
|
303
|
-
* These turns are never summarized, ensuring recent context stays intact. Default:
|
|
304
|
-
* 4
|
|
305
|
-
*/
|
|
306
|
-
minPreserveTurns?: number;
|
|
307
318
|
}
|
|
308
319
|
|
|
309
320
|
/**
|
|
@@ -340,7 +351,51 @@ export interface ToolSelectionAutoDiscovery {
|
|
|
340
351
|
maxTools?: number;
|
|
341
352
|
}
|
|
342
353
|
|
|
343
|
-
|
|
354
|
+
/**
|
|
355
|
+
* VariationAssignment is a read-only reference to a single tool, tool set, or
|
|
356
|
+
* sub-agent attached to a variation. Clients read the full set of assignments via
|
|
357
|
+
* `AgentVariationInfo.assignments`; mutations go through the dedicated add/remove
|
|
358
|
+
* assignment endpoints under /v1/agent_variations/{id}/assignments.
|
|
359
|
+
*
|
|
360
|
+
* The `id` identifies the assignment row itself (not the referenced resource) and
|
|
361
|
+
* is the handle used to remove the assignment. It is returned by the add endpoint
|
|
362
|
+
* and present on every entry in AgentVariationInfo.assignments.
|
|
363
|
+
*/
|
|
364
|
+
export interface VariationAssignment {
|
|
365
|
+
id?: string;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
369
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
370
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
371
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
372
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
373
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
374
|
+
*/
|
|
375
|
+
agent?: Shared.BareMetadata;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
379
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
380
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
381
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
382
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
383
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
384
|
+
*/
|
|
385
|
+
tool?: Shared.BareMetadata;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
389
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
390
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
391
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
392
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
393
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
394
|
+
*/
|
|
395
|
+
toolSet?: Shared.BareMetadata;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
export interface AgentVariationCreateParams {
|
|
344
399
|
/**
|
|
345
400
|
* CreateResourceMetadata contains the user-provided fields for creating a
|
|
346
401
|
* workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
|
|
@@ -354,14 +409,14 @@ export interface VariationCreateParams {
|
|
|
354
409
|
spec: AgentVariationSpec;
|
|
355
410
|
}
|
|
356
411
|
|
|
357
|
-
export interface
|
|
412
|
+
export interface AgentVariationRetrieveParams {
|
|
358
413
|
/**
|
|
359
414
|
* Agent ID (from path)
|
|
360
415
|
*/
|
|
361
416
|
agentId: string;
|
|
362
417
|
}
|
|
363
418
|
|
|
364
|
-
export interface
|
|
419
|
+
export interface AgentVariationUpdateParams {
|
|
365
420
|
/**
|
|
366
421
|
* Path param: Agent ID (from path)
|
|
367
422
|
*/
|
|
@@ -387,7 +442,7 @@ export interface VariationUpdateParams {
|
|
|
387
442
|
updateMask?: string;
|
|
388
443
|
}
|
|
389
444
|
|
|
390
|
-
export interface
|
|
445
|
+
export interface AgentVariationListParams extends CursorPaginationParams {
|
|
391
446
|
/**
|
|
392
447
|
* When set to true you may use more of your alloted API rate-limit
|
|
393
448
|
*/
|
|
@@ -399,19 +454,30 @@ export interface VariationListParams extends CursorPaginationParams {
|
|
|
399
454
|
sortOrder?: string;
|
|
400
455
|
}
|
|
401
456
|
|
|
402
|
-
export interface
|
|
457
|
+
export interface AgentVariationDeleteParams {
|
|
403
458
|
/**
|
|
404
459
|
* Agent ID (from path)
|
|
405
460
|
*/
|
|
406
461
|
agentId: string;
|
|
407
462
|
}
|
|
408
463
|
|
|
409
|
-
export
|
|
464
|
+
export interface AgentVariationAddAssignmentParams {
|
|
465
|
+
subAgentId?: string;
|
|
466
|
+
|
|
467
|
+
toolId?: string;
|
|
468
|
+
|
|
469
|
+
toolSetId?: string;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export interface AgentVariationRemoveAssignmentParams {
|
|
473
|
+
agentVariationId: string;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export declare namespace AgentVariations {
|
|
410
477
|
export {
|
|
411
478
|
type AgentVariation as AgentVariation,
|
|
412
479
|
type AgentVariationInfo as AgentVariationInfo,
|
|
413
480
|
type AgentVariationSpec as AgentVariationSpec,
|
|
414
|
-
type AgentVariationSpecAgentTool as AgentVariationSpecAgentTool,
|
|
415
481
|
type AgentVariationSpecCompactionConfig as AgentVariationSpecCompactionConfig,
|
|
416
482
|
type AgentVariationSpecConstraints as AgentVariationSpecConstraints,
|
|
417
483
|
type AgentVariationSpecModelConfig as AgentVariationSpecModelConfig,
|
|
@@ -420,11 +486,14 @@ export declare namespace Variations {
|
|
|
420
486
|
type CompactionConfigToolResultClearingStrategy as CompactionConfigToolResultClearingStrategy,
|
|
421
487
|
type ToolSelectionAssignedTools as ToolSelectionAssignedTools,
|
|
422
488
|
type ToolSelectionAutoDiscovery as ToolSelectionAutoDiscovery,
|
|
489
|
+
type VariationAssignment as VariationAssignment,
|
|
423
490
|
type AgentVariationsCursorPagination as AgentVariationsCursorPagination,
|
|
424
|
-
type
|
|
425
|
-
type
|
|
426
|
-
type
|
|
427
|
-
type
|
|
428
|
-
type
|
|
491
|
+
type AgentVariationCreateParams as AgentVariationCreateParams,
|
|
492
|
+
type AgentVariationRetrieveParams as AgentVariationRetrieveParams,
|
|
493
|
+
type AgentVariationUpdateParams as AgentVariationUpdateParams,
|
|
494
|
+
type AgentVariationListParams as AgentVariationListParams,
|
|
495
|
+
type AgentVariationDeleteParams as AgentVariationDeleteParams,
|
|
496
|
+
type AgentVariationAddAssignmentParams as AgentVariationAddAssignmentParams,
|
|
497
|
+
type AgentVariationRemoveAssignmentParams as AgentVariationRemoveAssignmentParams,
|
|
429
498
|
};
|
|
430
499
|
}
|
|
@@ -2,29 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as AccountAPI from '../account';
|
|
5
|
+
import * as AgentVariationsAPI from '../agent-variations';
|
|
5
6
|
import * as Shared from '../shared';
|
|
6
|
-
import * as VariationsAPI from './variations';
|
|
7
|
-
import {
|
|
8
|
-
AgentVariation,
|
|
9
|
-
AgentVariationInfo,
|
|
10
|
-
AgentVariationSpec,
|
|
11
|
-
AgentVariationSpecAgentTool,
|
|
12
|
-
AgentVariationSpecCompactionConfig,
|
|
13
|
-
AgentVariationSpecConstraints,
|
|
14
|
-
AgentVariationSpecModelConfig,
|
|
15
|
-
AgentVariationSpecToolSelection,
|
|
16
|
-
AgentVariationsCursorPagination,
|
|
17
|
-
CompactionConfigSummarizationStrategy,
|
|
18
|
-
CompactionConfigToolResultClearingStrategy,
|
|
19
|
-
ToolSelectionAssignedTools,
|
|
20
|
-
ToolSelectionAutoDiscovery,
|
|
21
|
-
VariationCreateParams,
|
|
22
|
-
VariationDeleteParams,
|
|
23
|
-
VariationListParams,
|
|
24
|
-
VariationRetrieveParams,
|
|
25
|
-
VariationUpdateParams,
|
|
26
|
-
Variations,
|
|
27
|
-
} from './variations';
|
|
28
7
|
import * as WebhookDeliveriesAPI from './webhook-deliveries';
|
|
29
8
|
import {
|
|
30
9
|
WebhookDeliveries,
|
|
@@ -48,7 +27,6 @@ import { path } from '../../internal/utils/path';
|
|
|
48
27
|
* Scope: Workspace-level operations
|
|
49
28
|
*/
|
|
50
29
|
export class Agents extends APIResource {
|
|
51
|
-
variations: VariationsAPI.Variations = new VariationsAPI.Variations(this._client);
|
|
52
30
|
webhookDeliveries: WebhookDeliveriesAPI.WebhookDeliveries = new WebhookDeliveriesAPI.WebhookDeliveries(
|
|
53
31
|
this._client,
|
|
54
32
|
);
|
|
@@ -160,13 +138,6 @@ export interface AgentSpec {
|
|
|
160
138
|
*/
|
|
161
139
|
description?: string;
|
|
162
140
|
|
|
163
|
-
/**
|
|
164
|
-
* The generated secret that will sign all webhooks that are sent to your
|
|
165
|
-
* configured Webhook URL. Formatted as "wh_asdf1234" per the
|
|
166
|
-
* https://www.standardwebhooks.com/ format.
|
|
167
|
-
*/
|
|
168
|
-
webhookEventsHmacSecret?: string;
|
|
169
|
-
|
|
170
141
|
/**
|
|
171
142
|
* The URL that Cadenya will send events for any objective assigned to the agent.
|
|
172
143
|
*/
|
|
@@ -213,7 +184,7 @@ export namespace AgentCreateParams {
|
|
|
213
184
|
/**
|
|
214
185
|
* AgentVariationSpec defines the operational configuration for a variation
|
|
215
186
|
*/
|
|
216
|
-
spec:
|
|
187
|
+
spec: AgentVariationsAPI.AgentVariationSpec;
|
|
217
188
|
}
|
|
218
189
|
}
|
|
219
190
|
|
|
@@ -253,7 +224,6 @@ export interface AgentListParams extends CursorPaginationParams {
|
|
|
253
224
|
sortOrder?: string;
|
|
254
225
|
}
|
|
255
226
|
|
|
256
|
-
Agents.Variations = Variations;
|
|
257
227
|
Agents.WebhookDeliveries = WebhookDeliveries;
|
|
258
228
|
|
|
259
229
|
export declare namespace Agents {
|
|
@@ -268,28 +238,6 @@ export declare namespace Agents {
|
|
|
268
238
|
type AgentListParams as AgentListParams,
|
|
269
239
|
};
|
|
270
240
|
|
|
271
|
-
export {
|
|
272
|
-
Variations as Variations,
|
|
273
|
-
type AgentVariation as AgentVariation,
|
|
274
|
-
type AgentVariationInfo as AgentVariationInfo,
|
|
275
|
-
type AgentVariationSpec as AgentVariationSpec,
|
|
276
|
-
type AgentVariationSpecAgentTool as AgentVariationSpecAgentTool,
|
|
277
|
-
type AgentVariationSpecCompactionConfig as AgentVariationSpecCompactionConfig,
|
|
278
|
-
type AgentVariationSpecConstraints as AgentVariationSpecConstraints,
|
|
279
|
-
type AgentVariationSpecModelConfig as AgentVariationSpecModelConfig,
|
|
280
|
-
type AgentVariationSpecToolSelection as AgentVariationSpecToolSelection,
|
|
281
|
-
type CompactionConfigSummarizationStrategy as CompactionConfigSummarizationStrategy,
|
|
282
|
-
type CompactionConfigToolResultClearingStrategy as CompactionConfigToolResultClearingStrategy,
|
|
283
|
-
type ToolSelectionAssignedTools as ToolSelectionAssignedTools,
|
|
284
|
-
type ToolSelectionAutoDiscovery as ToolSelectionAutoDiscovery,
|
|
285
|
-
type AgentVariationsCursorPagination as AgentVariationsCursorPagination,
|
|
286
|
-
type VariationCreateParams as VariationCreateParams,
|
|
287
|
-
type VariationRetrieveParams as VariationRetrieveParams,
|
|
288
|
-
type VariationUpdateParams as VariationUpdateParams,
|
|
289
|
-
type VariationListParams as VariationListParams,
|
|
290
|
-
type VariationDeleteParams as VariationDeleteParams,
|
|
291
|
-
};
|
|
292
|
-
|
|
293
241
|
export {
|
|
294
242
|
WebhookDeliveries as WebhookDeliveries,
|
|
295
243
|
type WebhookDelivery as WebhookDelivery,
|
|
@@ -11,27 +11,6 @@ export {
|
|
|
11
11
|
type AgentListParams,
|
|
12
12
|
type AgentsCursorPagination,
|
|
13
13
|
} from './agents';
|
|
14
|
-
export {
|
|
15
|
-
Variations,
|
|
16
|
-
type AgentVariation,
|
|
17
|
-
type AgentVariationInfo,
|
|
18
|
-
type AgentVariationSpec,
|
|
19
|
-
type AgentVariationSpecAgentTool,
|
|
20
|
-
type AgentVariationSpecCompactionConfig,
|
|
21
|
-
type AgentVariationSpecConstraints,
|
|
22
|
-
type AgentVariationSpecModelConfig,
|
|
23
|
-
type AgentVariationSpecToolSelection,
|
|
24
|
-
type CompactionConfigSummarizationStrategy,
|
|
25
|
-
type CompactionConfigToolResultClearingStrategy,
|
|
26
|
-
type ToolSelectionAssignedTools,
|
|
27
|
-
type ToolSelectionAutoDiscovery,
|
|
28
|
-
type VariationCreateParams,
|
|
29
|
-
type VariationRetrieveParams,
|
|
30
|
-
type VariationUpdateParams,
|
|
31
|
-
type VariationListParams,
|
|
32
|
-
type VariationDeleteParams,
|
|
33
|
-
type AgentVariationsCursorPagination,
|
|
34
|
-
} from './variations';
|
|
35
14
|
export {
|
|
36
15
|
WebhookDeliveries,
|
|
37
16
|
type WebhookDelivery,
|
package/src/resources/index.ts
CHANGED
|
@@ -11,7 +11,37 @@ export {
|
|
|
11
11
|
type APIKeyListParams,
|
|
12
12
|
type APIKeysCursorPagination,
|
|
13
13
|
} from './api-keys';
|
|
14
|
-
export {
|
|
14
|
+
export {
|
|
15
|
+
AccountResource,
|
|
16
|
+
type Account,
|
|
17
|
+
type AccountSpec,
|
|
18
|
+
type Profile,
|
|
19
|
+
type ProfileSpec,
|
|
20
|
+
type RotateWebhookSigningKeyResponse,
|
|
21
|
+
} from './account';
|
|
22
|
+
export {
|
|
23
|
+
AgentVariations,
|
|
24
|
+
type AgentVariation,
|
|
25
|
+
type AgentVariationInfo,
|
|
26
|
+
type AgentVariationSpec,
|
|
27
|
+
type AgentVariationSpecCompactionConfig,
|
|
28
|
+
type AgentVariationSpecConstraints,
|
|
29
|
+
type AgentVariationSpecModelConfig,
|
|
30
|
+
type AgentVariationSpecToolSelection,
|
|
31
|
+
type CompactionConfigSummarizationStrategy,
|
|
32
|
+
type CompactionConfigToolResultClearingStrategy,
|
|
33
|
+
type ToolSelectionAssignedTools,
|
|
34
|
+
type ToolSelectionAutoDiscovery,
|
|
35
|
+
type VariationAssignment,
|
|
36
|
+
type AgentVariationCreateParams,
|
|
37
|
+
type AgentVariationRetrieveParams,
|
|
38
|
+
type AgentVariationUpdateParams,
|
|
39
|
+
type AgentVariationListParams,
|
|
40
|
+
type AgentVariationDeleteParams,
|
|
41
|
+
type AgentVariationAddAssignmentParams,
|
|
42
|
+
type AgentVariationRemoveAssignmentParams,
|
|
43
|
+
type AgentVariationsCursorPagination,
|
|
44
|
+
} from './agent-variations';
|
|
15
45
|
export {
|
|
16
46
|
Agents,
|
|
17
47
|
type Agent,
|
|
@@ -96,6 +126,7 @@ export {
|
|
|
96
126
|
type ToolSetsCursorPagination,
|
|
97
127
|
type ToolSetEventsCursorPagination,
|
|
98
128
|
} from './tool-sets/tool-sets';
|
|
129
|
+
export { Webhooks, type UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent } from './webhooks';
|
|
99
130
|
export {
|
|
100
131
|
WorkspaceSecrets,
|
|
101
132
|
type WorkspaceSecret,
|
|
@@ -48,12 +48,12 @@ export interface ObjectiveFeedback {
|
|
|
48
48
|
data: ObjectiveFeedbackData;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* BareMetadata contains the minimal metadata for a resource
|
|
52
|
-
* These are used
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* objective.
|
|
56
|
-
*
|
|
51
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
52
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
53
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
54
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
55
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
56
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
57
57
|
*/
|
|
58
58
|
metadata: Shared.BareMetadata;
|
|
59
59
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as ObjectivesAPI from './objectives';
|
|
5
5
|
import * as AccountAPI from '../account';
|
|
6
|
+
import * as AgentVariationsAPI from '../agent-variations';
|
|
6
7
|
import * as Shared from '../shared';
|
|
7
8
|
import * as AgentsAPI from '../agents/agents';
|
|
8
|
-
import * as VariationsAPI from '../agents/variations';
|
|
9
9
|
import * as FeedbackAPI from './feedback';
|
|
10
10
|
import {
|
|
11
11
|
Feedback,
|
|
@@ -336,7 +336,7 @@ export interface ObjectiveData {
|
|
|
336
336
|
/**
|
|
337
337
|
* AgentVariation resource
|
|
338
338
|
*/
|
|
339
|
-
variation?:
|
|
339
|
+
variation?: AgentVariationsAPI.AgentVariation;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
export interface ObjectiveDataSecret {
|
|
@@ -681,7 +681,7 @@ export interface ObjectiveCompactParams {
|
|
|
681
681
|
* CompactionConfig defines how context window compaction behaves for objectives
|
|
682
682
|
* using this variation.
|
|
683
683
|
*/
|
|
684
|
-
compactionConfig?:
|
|
684
|
+
compactionConfig?: AgentVariationsAPI.AgentVariationSpecCompactionConfig;
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
export interface ObjectiveContinueParams {
|
|
@@ -42,12 +42,12 @@ export interface ObjectiveTask {
|
|
|
42
42
|
data: ObjectiveTaskData;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* BareMetadata contains the minimal metadata for a resource
|
|
46
|
-
* These are used
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* objective.
|
|
50
|
-
*
|
|
45
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
46
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
47
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
48
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
49
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
50
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
51
51
|
*/
|
|
52
52
|
metadata: Shared.BareMetadata;
|
|
53
53
|
}
|
|
@@ -31,12 +31,12 @@ export type ObjectiveToolsCursorPagination = CursorPagination<ObjectiveTool>;
|
|
|
31
31
|
*/
|
|
32
32
|
export interface ObjectiveTool {
|
|
33
33
|
/**
|
|
34
|
-
* BareMetadata contains the minimal metadata for a resource
|
|
35
|
-
* These are used
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* objective.
|
|
39
|
-
*
|
|
34
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
35
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
36
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
37
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
38
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
39
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
40
40
|
*/
|
|
41
41
|
metadata: Shared.BareMetadata;
|
|
42
42
|
|
package/src/resources/shared.ts
CHANGED
|
@@ -36,15 +36,22 @@ export interface AccountResourceMetadata {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* BareMetadata contains the minimal metadata for a resource
|
|
40
|
-
* These are used
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* objective.
|
|
44
|
-
*
|
|
39
|
+
* BareMetadata contains the minimal metadata for a resource: the ID and an
|
|
40
|
+
* optional human-readable name. These are used for reference fields where the full
|
|
41
|
+
* metadata (account scoping, timestamps, labels, external IDs) is not needed —
|
|
42
|
+
* e.g., the tool references inside an agent variation spec or the tools assigned
|
|
43
|
+
* to an objective. Both fields are server-populated; clients provide IDs through
|
|
44
|
+
* sibling fields rather than by constructing a BareMetadata themselves.
|
|
45
45
|
*/
|
|
46
46
|
export interface BareMetadata {
|
|
47
|
-
id
|
|
47
|
+
id?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Human-readable name of the referenced resource, populated by the server on reads
|
|
51
|
+
* for convenience. Absent on references to resources that do not have a name
|
|
52
|
+
* (e.g., objective tasks).
|
|
53
|
+
*/
|
|
54
|
+
name?: string;
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
/**
|