@cadenya/cadenya 0.66.0 → 0.68.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 +16 -0
- package/README.md +2 -2
- package/client.d.mts +42 -81
- package/client.d.mts.map +1 -1
- package/client.d.ts +42 -81
- package/client.d.ts.map +1 -1
- package/client.js +24 -63
- package/client.js.map +1 -1
- package/client.mjs +24 -63
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +18 -22
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +18 -22
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +2 -6
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +2 -6
- package/resources/account.mjs.map +1 -1
- package/resources/agents/agents.d.mts +34 -21
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +34 -21
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +17 -16
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +17 -16
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/feedback.d.mts +15 -15
- package/resources/agents/feedback.d.mts.map +1 -1
- package/resources/agents/feedback.d.ts +15 -15
- package/resources/agents/feedback.d.ts.map +1 -1
- package/resources/agents/feedback.js +4 -8
- package/resources/agents/feedback.js.map +1 -1
- package/resources/agents/feedback.mjs +4 -8
- package/resources/agents/feedback.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/schedules.d.mts +44 -26
- package/resources/agents/schedules.d.mts.map +1 -1
- package/resources/agents/schedules.d.ts +44 -26
- package/resources/agents/schedules.d.ts.map +1 -1
- package/resources/agents/schedules.js +20 -19
- package/resources/agents/schedules.js.map +1 -1
- package/resources/agents/schedules.mjs +20 -19
- package/resources/agents/schedules.mjs.map +1 -1
- package/resources/agents/variations.d.mts +88 -43
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +88 -43
- package/resources/agents/variations.d.ts.map +1 -1
- package/resources/agents/variations.js +31 -32
- package/resources/agents/variations.js.map +1 -1
- package/resources/agents/variations.mjs +31 -32
- package/resources/agents/variations.mjs.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +10 -11
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +10 -11
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/agents/webhook-deliveries.js +4 -8
- package/resources/agents/webhook-deliveries.js.map +1 -1
- package/resources/agents/webhook-deliveries.mjs +4 -8
- package/resources/agents/webhook-deliveries.mjs.map +1 -1
- package/resources/api-keys.d.mts +48 -28
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +48 -28
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +21 -17
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +21 -17
- package/resources/api-keys.mjs.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
- package/resources/bulk-workspace-resources/index.d.mts +1 -1
- package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/index.d.ts +1 -1
- package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/index.js.map +1 -1
- package/resources/bulk-workspace-resources/index.mjs.map +1 -1
- package/resources/bulk-workspace-resources/results.d.mts +30 -35
- package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/results.d.ts +30 -35
- package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/results.js +6 -10
- package/resources/bulk-workspace-resources/results.js.map +1 -1
- package/resources/bulk-workspace-resources/results.mjs +6 -10
- package/resources/bulk-workspace-resources/results.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/memory-layers/entries.d.mts +40 -33
- package/resources/memory-layers/entries.d.mts.map +1 -1
- package/resources/memory-layers/entries.d.ts +40 -33
- package/resources/memory-layers/entries.d.ts.map +1 -1
- package/resources/memory-layers/entries.js +19 -23
- package/resources/memory-layers/entries.js.map +1 -1
- package/resources/memory-layers/entries.mjs +19 -23
- package/resources/memory-layers/entries.mjs.map +1 -1
- package/resources/memory-layers/index.d.mts +1 -1
- package/resources/memory-layers/index.d.mts.map +1 -1
- package/resources/memory-layers/index.d.ts +1 -1
- package/resources/memory-layers/index.d.ts.map +1 -1
- package/resources/memory-layers/index.js.map +1 -1
- package/resources/memory-layers/index.mjs.map +1 -1
- package/resources/memory-layers/memory-layers.d.mts +33 -22
- package/resources/memory-layers/memory-layers.d.mts.map +1 -1
- package/resources/memory-layers/memory-layers.d.ts +33 -22
- package/resources/memory-layers/memory-layers.d.ts.map +1 -1
- package/resources/memory-layers/memory-layers.js +17 -20
- package/resources/memory-layers/memory-layers.js.map +1 -1
- package/resources/memory-layers/memory-layers.mjs +17 -20
- package/resources/memory-layers/memory-layers.mjs.map +1 -1
- package/resources/models.d.mts +18 -12
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +18 -12
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +14 -13
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +14 -13
- package/resources/models.mjs.map +1 -1
- package/resources/objectives/feedback.d.mts +19 -8
- package/resources/objectives/feedback.d.mts.map +1 -1
- package/resources/objectives/feedback.d.ts +19 -8
- package/resources/objectives/feedback.d.ts.map +1 -1
- package/resources/objectives/feedback.js +9 -4
- package/resources/objectives/feedback.js.map +1 -1
- package/resources/objectives/feedback.mjs +9 -4
- package/resources/objectives/feedback.mjs.map +1 -1
- 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 +63 -44
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +63 -44
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +31 -16
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +31 -16
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tasks.d.mts +7 -2
- package/resources/objectives/tasks.d.mts.map +1 -1
- package/resources/objectives/tasks.d.ts +7 -2
- package/resources/objectives/tasks.d.ts.map +1 -1
- package/resources/objectives/tasks.js +5 -4
- package/resources/objectives/tasks.js.map +1 -1
- package/resources/objectives/tasks.mjs +5 -4
- package/resources/objectives/tasks.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +18 -9
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +18 -9
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tool-calls.js +7 -12
- package/resources/objectives/tool-calls.js.map +1 -1
- package/resources/objectives/tool-calls.mjs +7 -12
- package/resources/objectives/tool-calls.mjs.map +1 -1
- package/resources/objectives/tools.d.mts +5 -1
- package/resources/objectives/tools.d.mts.map +1 -1
- package/resources/objectives/tools.d.ts +5 -1
- package/resources/objectives/tools.d.ts.map +1 -1
- package/resources/objectives/tools.js +3 -2
- package/resources/objectives/tools.js.map +1 -1
- package/resources/objectives/tools.mjs +3 -2
- package/resources/objectives/tools.mjs.map +1 -1
- package/resources/search.d.mts +1 -1
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +6 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +6 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tool-sets/index.d.mts +1 -1
- package/resources/tool-sets/index.d.mts.map +1 -1
- package/resources/tool-sets/index.d.ts +1 -1
- package/resources/tool-sets/index.d.ts.map +1 -1
- package/resources/tool-sets/index.js.map +1 -1
- package/resources/tool-sets/index.mjs.map +1 -1
- package/resources/tool-sets/tool-sets.d.mts +66 -43
- package/resources/tool-sets/tool-sets.d.mts.map +1 -1
- package/resources/tool-sets/tool-sets.d.ts +66 -43
- package/resources/tool-sets/tool-sets.d.ts.map +1 -1
- package/resources/tool-sets/tool-sets.js +23 -23
- package/resources/tool-sets/tool-sets.js.map +1 -1
- package/resources/tool-sets/tool-sets.mjs +23 -23
- package/resources/tool-sets/tool-sets.mjs.map +1 -1
- package/resources/tool-sets/tools.d.mts +50 -31
- package/resources/tool-sets/tools.d.mts.map +1 -1
- package/resources/tool-sets/tools.d.ts +50 -31
- package/resources/tool-sets/tools.d.ts.map +1 -1
- package/resources/tool-sets/tools.js +22 -21
- package/resources/tool-sets/tools.js.map +1 -1
- package/resources/tool-sets/tools.mjs +22 -21
- package/resources/tool-sets/tools.mjs.map +1 -1
- package/resources/uploads.d.mts +21 -19
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +21 -19
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -11
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -11
- package/resources/uploads.mjs.map +1 -1
- package/resources/workspace-secrets.d.mts +33 -13
- package/resources/workspace-secrets.d.mts.map +1 -1
- package/resources/workspace-secrets.d.ts +33 -13
- package/resources/workspace-secrets.d.ts.map +1 -1
- package/resources/workspace-secrets.js +16 -13
- package/resources/workspace-secrets.js.map +1 -1
- package/resources/workspace-secrets.mjs +16 -13
- package/resources/workspace-secrets.mjs.map +1 -1
- package/resources/workspaces.d.mts +2 -6
- package/resources/workspaces.d.mts.map +1 -1
- package/resources/workspaces.d.ts +2 -6
- package/resources/workspaces.d.ts.map +1 -1
- package/resources/workspaces.js +2 -6
- package/resources/workspaces.js.map +1 -1
- package/resources/workspaces.mjs +2 -6
- package/resources/workspaces.mjs.map +1 -1
- package/src/client.ts +54 -63
- package/src/resources/account.ts +18 -22
- package/src/resources/agents/agents.ts +49 -24
- package/src/resources/agents/feedback.ts +18 -16
- package/src/resources/agents/index.ts +2 -0
- package/src/resources/agents/schedules.ts +69 -37
- package/src/resources/agents/variations.ts +141 -73
- package/src/resources/agents/webhook-deliveries.ts +13 -12
- package/src/resources/api-keys.ts +67 -32
- package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
- package/src/resources/bulk-workspace-resources/index.ts +1 -0
- package/src/resources/bulk-workspace-resources/results.ts +33 -36
- package/src/resources/index.ts +22 -1
- package/src/resources/memory-layers/entries.ts +67 -44
- package/src/resources/memory-layers/index.ts +2 -0
- package/src/resources/memory-layers/memory-layers.ts +53 -25
- package/src/resources/models.ts +28 -13
- package/src/resources/objectives/feedback.ts +29 -11
- package/src/resources/objectives/index.ts +1 -0
- package/src/resources/objectives/objectives.ts +100 -50
- package/src/resources/objectives/tasks.ts +16 -5
- package/src/resources/objectives/tool-calls.ts +33 -20
- package/src/resources/objectives/tools.ts +9 -3
- package/src/resources/search.ts +6 -1
- package/src/resources/tool-sets/index.ts +2 -0
- package/src/resources/tool-sets/tool-sets.ts +88 -50
- package/src/resources/tool-sets/tools.ts +75 -42
- package/src/resources/uploads.ts +25 -20
- package/src/resources/workspace-secrets.ts +60 -19
- package/src/resources/workspaces.ts +2 -6
- 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
|
@@ -12,8 +12,11 @@ export class Tasks extends APIResource {
|
|
|
12
12
|
* Retrieves a task by ID from an objective
|
|
13
13
|
*/
|
|
14
14
|
retrieve(id: string, params: TaskRetrieveParams, options?: RequestOptions): APIPromise<ObjectiveTask> {
|
|
15
|
-
const { objectiveId } = params;
|
|
16
|
-
return this._client.get(
|
|
15
|
+
const { workspaceId, objectiveId } = params;
|
|
16
|
+
return this._client.get(
|
|
17
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveId}/tasks/${id}`,
|
|
18
|
+
options,
|
|
19
|
+
);
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
/**
|
|
@@ -21,11 +24,12 @@ export class Tasks extends APIResource {
|
|
|
21
24
|
*/
|
|
22
25
|
list(
|
|
23
26
|
objectiveID: string,
|
|
24
|
-
|
|
27
|
+
params: TaskListParams,
|
|
25
28
|
options?: RequestOptions,
|
|
26
29
|
): PagePromise<ObjectiveTasksCursorPagination, ObjectiveTask> {
|
|
30
|
+
const { workspaceId, ...query } = params;
|
|
27
31
|
return this._client.getAPIList(
|
|
28
|
-
path`/v1/objectives/${objectiveID}/tasks`,
|
|
32
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/tasks`,
|
|
29
33
|
CursorPagination<ObjectiveTask>,
|
|
30
34
|
{ query, ...options },
|
|
31
35
|
);
|
|
@@ -75,6 +79,8 @@ export interface ObjectiveTaskData {
|
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
export interface TaskRetrieveParams {
|
|
82
|
+
workspaceId: string;
|
|
83
|
+
|
|
78
84
|
/**
|
|
79
85
|
* The ID of the objective. Supports "external_id:" prefix for external IDs.
|
|
80
86
|
*/
|
|
@@ -83,7 +89,12 @@ export interface TaskRetrieveParams {
|
|
|
83
89
|
|
|
84
90
|
export interface TaskListParams extends CursorPaginationParams {
|
|
85
91
|
/**
|
|
86
|
-
*
|
|
92
|
+
* Path param
|
|
93
|
+
*/
|
|
94
|
+
workspaceId: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Query param: Sort order for results
|
|
87
98
|
*/
|
|
88
99
|
sortOrder?: string;
|
|
89
100
|
}
|
|
@@ -15,11 +15,12 @@ export class ToolCalls extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
list(
|
|
17
17
|
objectiveID: string,
|
|
18
|
-
|
|
18
|
+
params: ToolCallListParams,
|
|
19
19
|
options?: RequestOptions,
|
|
20
20
|
): PagePromise<ObjectiveToolCallsCursorPagination, ObjectiveToolCall> {
|
|
21
|
+
const { workspaceId, ...query } = params;
|
|
21
22
|
return this._client.getAPIList(
|
|
22
|
-
path`/v1/objectives/${objectiveID}/tool_calls`,
|
|
23
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/tool_calls`,
|
|
23
24
|
CursorPagination<ObjectiveToolCall>,
|
|
24
25
|
{ query, ...options },
|
|
25
26
|
);
|
|
@@ -34,11 +35,11 @@ export class ToolCalls extends APIResource {
|
|
|
34
35
|
params: ToolCallApproveParams,
|
|
35
36
|
options?: RequestOptions,
|
|
36
37
|
): APIPromise<ObjectiveToolCall> {
|
|
37
|
-
const { objectiveId, ...body } = params;
|
|
38
|
-
return this._client.put(
|
|
39
|
-
|
|
40
|
-
...options,
|
|
41
|
-
|
|
38
|
+
const { workspaceId, objectiveId, ...body } = params;
|
|
39
|
+
return this._client.put(
|
|
40
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveId}/tool_calls/${toolCallID}/approve`,
|
|
41
|
+
{ body, ...options },
|
|
42
|
+
);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/**
|
|
@@ -51,11 +52,11 @@ export class ToolCalls extends APIResource {
|
|
|
51
52
|
params: ToolCallDenyParams,
|
|
52
53
|
options?: RequestOptions,
|
|
53
54
|
): APIPromise<ObjectiveToolCall> {
|
|
54
|
-
const { objectiveId, ...body } = params;
|
|
55
|
-
return this._client.put(
|
|
56
|
-
|
|
57
|
-
...options,
|
|
58
|
-
|
|
55
|
+
const { workspaceId, objectiveId, ...body } = params;
|
|
56
|
+
return this._client.put(
|
|
57
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveId}/tool_calls/${toolCallID}/deny`,
|
|
58
|
+
{ body, ...options },
|
|
59
|
+
);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -120,18 +121,18 @@ export interface ObjectiveToolCallData {
|
|
|
120
121
|
result?: string;
|
|
121
122
|
|
|
122
123
|
/**
|
|
123
|
-
*
|
|
124
|
-
* account-scoped
|
|
125
|
-
*
|
|
124
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
125
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
126
|
+
* workspaces.
|
|
126
127
|
*/
|
|
127
128
|
statusChangedBy?: AccountAPI.Profile;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
export interface ObjectiveToolCallInfo {
|
|
131
132
|
/**
|
|
132
|
-
*
|
|
133
|
-
* account-scoped
|
|
134
|
-
*
|
|
133
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
134
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
135
|
+
* workspaces.
|
|
135
136
|
*/
|
|
136
137
|
createdBy?: AccountAPI.Profile;
|
|
137
138
|
|
|
@@ -144,12 +145,17 @@ export interface ObjectiveToolCallInfo {
|
|
|
144
145
|
|
|
145
146
|
export interface ToolCallListParams extends CursorPaginationParams {
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Path param
|
|
149
|
+
*/
|
|
150
|
+
workspaceId: string;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
148
154
|
*/
|
|
149
155
|
includeInfo?: boolean;
|
|
150
156
|
|
|
151
157
|
/**
|
|
152
|
-
* Filter by tool call status
|
|
158
|
+
* Query param: Filter by tool call status
|
|
153
159
|
*/
|
|
154
160
|
status?:
|
|
155
161
|
| 'TOOL_CALL_STATUS_UNSPECIFIED'
|
|
@@ -160,6 +166,8 @@ export interface ToolCallListParams extends CursorPaginationParams {
|
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
export interface ToolCallApproveParams {
|
|
169
|
+
workspaceId: string;
|
|
170
|
+
|
|
163
171
|
/**
|
|
164
172
|
* The ID of the objective. Supports "external_id:" prefix for external IDs.
|
|
165
173
|
*/
|
|
@@ -167,6 +175,11 @@ export interface ToolCallApproveParams {
|
|
|
167
175
|
}
|
|
168
176
|
|
|
169
177
|
export interface ToolCallDenyParams {
|
|
178
|
+
/**
|
|
179
|
+
* Path param
|
|
180
|
+
*/
|
|
181
|
+
workspaceId: string;
|
|
182
|
+
|
|
170
183
|
/**
|
|
171
184
|
* Path param: The ID of the objective. Supports "external_id:" prefix for external
|
|
172
185
|
* IDs.
|
|
@@ -13,11 +13,12 @@ export class Tools extends APIResource {
|
|
|
13
13
|
*/
|
|
14
14
|
list(
|
|
15
15
|
objectiveID: string,
|
|
16
|
-
|
|
16
|
+
params: ToolListParams,
|
|
17
17
|
options?: RequestOptions,
|
|
18
18
|
): PagePromise<ObjectiveToolsCursorPagination, ObjectiveTool> {
|
|
19
|
+
const { workspaceId, ...query } = params;
|
|
19
20
|
return this._client.getAPIList(
|
|
20
|
-
path`/v1/objectives/${objectiveID}/tools`,
|
|
21
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/tools`,
|
|
21
22
|
CursorPagination<ObjectiveTool>,
|
|
22
23
|
{ query, ...options },
|
|
23
24
|
);
|
|
@@ -48,7 +49,12 @@ export interface ObjectiveTool {
|
|
|
48
49
|
snapshot?: ToolSetsToolsAPI.Tool;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
export interface ToolListParams extends CursorPaginationParams {
|
|
52
|
+
export interface ToolListParams extends CursorPaginationParams {
|
|
53
|
+
/**
|
|
54
|
+
* Path param
|
|
55
|
+
*/
|
|
56
|
+
workspaceId: string;
|
|
57
|
+
}
|
|
52
58
|
|
|
53
59
|
export declare namespace Tools {
|
|
54
60
|
export {
|
package/src/resources/search.ts
CHANGED
|
@@ -6,16 +6,21 @@ import * as ToolSetsAPI from './tool-sets/tool-sets';
|
|
|
6
6
|
import * as ToolsAPI from './tool-sets/tools';
|
|
7
7
|
import { APIPromise } from '../core/api-promise';
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
9
10
|
|
|
10
11
|
export class Search extends APIResource {
|
|
11
12
|
/**
|
|
12
13
|
* Searches for tools or tool sets in the workspace
|
|
13
14
|
*/
|
|
14
15
|
searchToolsOrToolSets(
|
|
16
|
+
workspaceID: string,
|
|
15
17
|
query: SearchSearchToolsOrToolSetsParams | null | undefined = {},
|
|
16
18
|
options?: RequestOptions,
|
|
17
19
|
): APIPromise<SearchSearchToolsOrToolSetsResponse> {
|
|
18
|
-
return this._client.get(
|
|
20
|
+
return this._client.get(path`/v1/workspaces/${workspaceID}/search/tools_or_tool_sets`, {
|
|
21
|
+
query,
|
|
22
|
+
...options,
|
|
23
|
+
});
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
|
|
@@ -15,8 +15,10 @@ export {
|
|
|
15
15
|
type ToolSetInfo,
|
|
16
16
|
type ToolSetSpec,
|
|
17
17
|
type ToolSetCreateParams,
|
|
18
|
+
type ToolSetRetrieveParams,
|
|
18
19
|
type ToolSetUpdateParams,
|
|
19
20
|
type ToolSetListParams,
|
|
21
|
+
type ToolSetDeleteParams,
|
|
20
22
|
type ToolSetListEventsParams,
|
|
21
23
|
type ToolSetsCursorPagination,
|
|
22
24
|
type ToolSetEventsCursorPagination,
|
|
@@ -27,15 +27,11 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
27
27
|
import { path } from '../../internal/utils/path';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
30
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
31
|
+
* and tools define specific capabilities available to agents.
|
|
33
32
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Authentication: Bearer token (JWT)
|
|
38
|
-
* Scope: Workspace-level operations
|
|
33
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
34
|
+
* (profile) actors cannot.
|
|
39
35
|
*/
|
|
40
36
|
export class ToolSets extends APIResource {
|
|
41
37
|
tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
|
|
@@ -43,39 +39,46 @@ export class ToolSets extends APIResource {
|
|
|
43
39
|
/**
|
|
44
40
|
* Creates a new tool set in the workspace
|
|
45
41
|
*/
|
|
46
|
-
create(body: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
47
|
-
return this._client.post(
|
|
42
|
+
create(workspaceID: string, body: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
43
|
+
return this._client.post(path`/v1/workspaces/${workspaceID}/tool_sets`, { body, ...options });
|
|
48
44
|
}
|
|
49
45
|
|
|
50
46
|
/**
|
|
51
47
|
* Retrieves a tool set by ID from the workspace
|
|
52
48
|
*/
|
|
53
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<ToolSet> {
|
|
54
|
-
|
|
49
|
+
retrieve(id: string, params: ToolSetRetrieveParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
50
|
+
const { workspaceId } = params;
|
|
51
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, options);
|
|
55
52
|
}
|
|
56
53
|
|
|
57
54
|
/**
|
|
58
55
|
* Updates a tool set in the workspace
|
|
59
56
|
*/
|
|
60
|
-
update(id: string,
|
|
61
|
-
|
|
57
|
+
update(id: string, params: ToolSetUpdateParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
58
|
+
const { workspaceId, ...body } = params;
|
|
59
|
+
return this._client.put(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, { body, ...options });
|
|
62
60
|
}
|
|
63
61
|
|
|
64
62
|
/**
|
|
65
63
|
* Lists all tool sets in the workspace
|
|
66
64
|
*/
|
|
67
65
|
list(
|
|
66
|
+
workspaceID: string,
|
|
68
67
|
query: ToolSetListParams | null | undefined = {},
|
|
69
68
|
options?: RequestOptions,
|
|
70
69
|
): PagePromise<ToolSetsCursorPagination, ToolSet> {
|
|
71
|
-
return this._client.getAPIList(
|
|
70
|
+
return this._client.getAPIList(path`/v1/workspaces/${workspaceID}/tool_sets`, CursorPagination<ToolSet>, {
|
|
71
|
+
query,
|
|
72
|
+
...options,
|
|
73
|
+
});
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
/**
|
|
75
77
|
* Deletes a tool set in the workspace
|
|
76
78
|
*/
|
|
77
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
78
|
-
|
|
79
|
+
delete(id: string, params: ToolSetDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
80
|
+
const { workspaceId } = params;
|
|
81
|
+
return this._client.delete(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, {
|
|
79
82
|
...options,
|
|
80
83
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
81
84
|
});
|
|
@@ -86,13 +89,15 @@ export class ToolSets extends APIResource {
|
|
|
86
89
|
*/
|
|
87
90
|
listEvents(
|
|
88
91
|
toolSetID: string,
|
|
89
|
-
|
|
92
|
+
params: ToolSetListEventsParams,
|
|
90
93
|
options?: RequestOptions,
|
|
91
94
|
): PagePromise<ToolSetEventsCursorPagination, ToolSetEvent> {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
const { workspaceId, ...query } = params;
|
|
96
|
+
return this._client.getAPIList(
|
|
97
|
+
path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/events`,
|
|
98
|
+
CursorPagination<ToolSetEvent>,
|
|
99
|
+
{ query, ...options },
|
|
100
|
+
);
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -143,46 +148,46 @@ export namespace McpToolFilter {
|
|
|
143
148
|
}
|
|
144
149
|
|
|
145
150
|
/**
|
|
146
|
-
*
|
|
151
|
+
* Emitted when a tool set sync operation completes successfully.
|
|
147
152
|
*/
|
|
148
153
|
export interface SyncCompleted {
|
|
149
154
|
/**
|
|
150
|
-
* Optional message with additional details
|
|
155
|
+
* Optional message with additional details.
|
|
151
156
|
*/
|
|
152
157
|
message?: string;
|
|
153
158
|
|
|
154
159
|
/**
|
|
155
|
-
* Number of tools synced
|
|
160
|
+
* Number of tools synced.
|
|
156
161
|
*/
|
|
157
162
|
toolsSynced?: number;
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
/**
|
|
161
|
-
*
|
|
166
|
+
* Emitted when a tool set sync operation fails.
|
|
162
167
|
*/
|
|
163
168
|
export interface SyncFailed {
|
|
164
169
|
/**
|
|
165
|
-
* Indicates this is an error event
|
|
170
|
+
* Indicates this is an error event.
|
|
166
171
|
*/
|
|
167
172
|
error?: boolean;
|
|
168
173
|
|
|
169
174
|
/**
|
|
170
|
-
* Optional error type/code for programmatic handling
|
|
175
|
+
* Optional error type/code for programmatic handling.
|
|
171
176
|
*/
|
|
172
177
|
errorType?: string;
|
|
173
178
|
|
|
174
179
|
/**
|
|
175
|
-
* Error message describing what went wrong
|
|
180
|
+
* Error message describing what went wrong.
|
|
176
181
|
*/
|
|
177
182
|
message?: string;
|
|
178
183
|
}
|
|
179
184
|
|
|
180
185
|
/**
|
|
181
|
-
*
|
|
186
|
+
* Emitted when a tool set sync operation begins.
|
|
182
187
|
*/
|
|
183
188
|
export interface SyncStarted {
|
|
184
189
|
/**
|
|
185
|
-
*
|
|
190
|
+
* Human-readable message describing the start of the sync.
|
|
186
191
|
*/
|
|
187
192
|
message?: string;
|
|
188
193
|
}
|
|
@@ -251,7 +256,7 @@ export namespace ToolSetAdapterMcp {
|
|
|
251
256
|
}
|
|
252
257
|
|
|
253
258
|
/**
|
|
254
|
-
*
|
|
259
|
+
* A single event in the tool set's operation timeline.
|
|
255
260
|
*/
|
|
256
261
|
export interface ToolSetEvent {
|
|
257
262
|
/**
|
|
@@ -261,14 +266,14 @@ export interface ToolSetEvent {
|
|
|
261
266
|
metadata: Shared.OperationMetadata;
|
|
262
267
|
|
|
263
268
|
/**
|
|
264
|
-
*
|
|
269
|
+
* Event payload for a tool set operation.
|
|
265
270
|
*/
|
|
266
271
|
event?: ToolSetEventData;
|
|
267
272
|
|
|
268
273
|
info?: ToolSetEvent.Info;
|
|
269
274
|
|
|
270
275
|
/**
|
|
271
|
-
* The tool set this event is associated with
|
|
276
|
+
* The tool set this event is associated with.
|
|
272
277
|
*/
|
|
273
278
|
toolSetId?: string;
|
|
274
279
|
}
|
|
@@ -276,9 +281,9 @@ export interface ToolSetEvent {
|
|
|
276
281
|
export namespace ToolSetEvent {
|
|
277
282
|
export interface Info {
|
|
278
283
|
/**
|
|
279
|
-
*
|
|
280
|
-
* account-scoped
|
|
281
|
-
*
|
|
284
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
285
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
286
|
+
* workspaces.
|
|
282
287
|
*/
|
|
283
288
|
createdBy?: AccountAPI.Profile;
|
|
284
289
|
|
|
@@ -290,26 +295,26 @@ export namespace ToolSetEvent {
|
|
|
290
295
|
}
|
|
291
296
|
|
|
292
297
|
/**
|
|
293
|
-
*
|
|
298
|
+
* Event payload for a tool set operation.
|
|
294
299
|
*/
|
|
295
300
|
export interface ToolSetEventData {
|
|
296
301
|
/**
|
|
297
|
-
*
|
|
302
|
+
* Emitted when a tool set sync operation completes successfully.
|
|
298
303
|
*/
|
|
299
304
|
syncCompleted?: SyncCompleted;
|
|
300
305
|
|
|
301
306
|
/**
|
|
302
|
-
*
|
|
307
|
+
* Emitted when a tool set sync operation fails.
|
|
303
308
|
*/
|
|
304
309
|
syncFailed?: SyncFailed;
|
|
305
310
|
|
|
306
311
|
/**
|
|
307
|
-
*
|
|
312
|
+
* Emitted when a tool set sync operation begins.
|
|
308
313
|
*/
|
|
309
314
|
syncStarted?: SyncStarted;
|
|
310
315
|
|
|
311
316
|
/**
|
|
312
|
-
* Type of the event (e.g., "sync_started", "sync_completed", "sync_failed")
|
|
317
|
+
* Type of the event (e.g., "sync_started", "sync_completed", "sync_failed").
|
|
313
318
|
*/
|
|
314
319
|
type?: string;
|
|
315
320
|
}
|
|
@@ -318,9 +323,9 @@ export interface ToolSetInfo {
|
|
|
318
323
|
agentCount?: number;
|
|
319
324
|
|
|
320
325
|
/**
|
|
321
|
-
*
|
|
322
|
-
* account-scoped
|
|
323
|
-
*
|
|
326
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
327
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
328
|
+
* workspaces.
|
|
324
329
|
*/
|
|
325
330
|
createdBy?: AccountAPI.Profile;
|
|
326
331
|
|
|
@@ -346,16 +351,35 @@ export interface ToolSetCreateParams {
|
|
|
346
351
|
spec: ToolSetSpec;
|
|
347
352
|
}
|
|
348
353
|
|
|
354
|
+
export interface ToolSetRetrieveParams {
|
|
355
|
+
/**
|
|
356
|
+
* Workspace ID.
|
|
357
|
+
*/
|
|
358
|
+
workspaceId: string;
|
|
359
|
+
}
|
|
360
|
+
|
|
349
361
|
export interface ToolSetUpdateParams {
|
|
350
362
|
/**
|
|
351
|
-
*
|
|
352
|
-
|
|
353
|
-
|
|
363
|
+
* Path param: Workspace ID.
|
|
364
|
+
*/
|
|
365
|
+
workspaceId: string;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
369
|
+
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
370
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
371
|
+
* server.
|
|
354
372
|
*/
|
|
355
373
|
metadata?: Shared.UpdateResourceMetadata;
|
|
356
374
|
|
|
375
|
+
/**
|
|
376
|
+
* Body param
|
|
377
|
+
*/
|
|
357
378
|
spec?: ToolSetSpec;
|
|
358
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Body param
|
|
382
|
+
*/
|
|
359
383
|
updateMask?: string;
|
|
360
384
|
}
|
|
361
385
|
|
|
@@ -386,14 +410,26 @@ export interface ToolSetListParams extends CursorPaginationParams {
|
|
|
386
410
|
sortOrder?: string;
|
|
387
411
|
}
|
|
388
412
|
|
|
413
|
+
export interface ToolSetDeleteParams {
|
|
414
|
+
/**
|
|
415
|
+
* Workspace ID.
|
|
416
|
+
*/
|
|
417
|
+
workspaceId: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
389
420
|
export interface ToolSetListEventsParams extends CursorPaginationParams {
|
|
390
421
|
/**
|
|
391
|
-
*
|
|
422
|
+
* Path param: Workspace ID.
|
|
423
|
+
*/
|
|
424
|
+
workspaceId: string;
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
392
428
|
*/
|
|
393
429
|
includeInfo?: boolean;
|
|
394
430
|
|
|
395
431
|
/**
|
|
396
|
-
* Sort order for results (asc or desc by creation time)
|
|
432
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
397
433
|
*/
|
|
398
434
|
sortOrder?: string;
|
|
399
435
|
}
|
|
@@ -417,8 +453,10 @@ export declare namespace ToolSets {
|
|
|
417
453
|
type ToolSetsCursorPagination as ToolSetsCursorPagination,
|
|
418
454
|
type ToolSetEventsCursorPagination as ToolSetEventsCursorPagination,
|
|
419
455
|
type ToolSetCreateParams as ToolSetCreateParams,
|
|
456
|
+
type ToolSetRetrieveParams as ToolSetRetrieveParams,
|
|
420
457
|
type ToolSetUpdateParams as ToolSetUpdateParams,
|
|
421
458
|
type ToolSetListParams as ToolSetListParams,
|
|
459
|
+
type ToolSetDeleteParams as ToolSetDeleteParams,
|
|
422
460
|
type ToolSetListEventsParams as ToolSetListEventsParams,
|
|
423
461
|
};
|
|
424
462
|
|