@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
|
@@ -10,38 +10,41 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
10
10
|
import { path } from '../../internal/utils/path';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* All operations are implicitly scoped to the workspace determined by the JWT token.
|
|
13
|
+
* Manage tool sets and the tools they contain. Tool sets group related tools,
|
|
14
|
+
* and tools define specific capabilities available to agents.
|
|
16
15
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* Authentication: Bearer token (JWT)
|
|
21
|
-
* Scope: Workspace-level operations
|
|
16
|
+
* When a tool set is managed, only API key actors can modify its tools; human
|
|
17
|
+
* (profile) actors cannot.
|
|
22
18
|
*/
|
|
23
19
|
export class Tools extends APIResource {
|
|
24
20
|
/**
|
|
25
21
|
* Creates a new tool in the tool set
|
|
26
22
|
*/
|
|
27
|
-
create(toolSetID: string,
|
|
28
|
-
|
|
23
|
+
create(toolSetID: string, params: ToolCreateParams, options?: RequestOptions): APIPromise<Tool> {
|
|
24
|
+
const { workspaceId, ...body } = params;
|
|
25
|
+
return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`, {
|
|
26
|
+
body,
|
|
27
|
+
...options,
|
|
28
|
+
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Retrieves a tool by ID from the workspace
|
|
33
33
|
*/
|
|
34
34
|
retrieve(id: string, params: ToolRetrieveParams, options?: RequestOptions): APIPromise<Tool> {
|
|
35
|
-
const { toolSetId } = params;
|
|
36
|
-
return this._client.get(path`/v1/tool_sets/${toolSetId}/tools/${id}`, options);
|
|
35
|
+
const { workspaceId, toolSetId } = params;
|
|
36
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, options);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Updates a tool in the tool set
|
|
41
41
|
*/
|
|
42
42
|
update(id: string, params: ToolUpdateParams, options?: RequestOptions): APIPromise<Tool> {
|
|
43
|
-
const { toolSetId, ...body } = params;
|
|
44
|
-
return this._client.put(path`/v1/tool_sets/${toolSetId}/tools/${id}`, {
|
|
43
|
+
const { workspaceId, toolSetId, ...body } = params;
|
|
44
|
+
return this._client.put(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
|
|
45
|
+
body,
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/**
|
|
@@ -49,21 +52,23 @@ export class Tools extends APIResource {
|
|
|
49
52
|
*/
|
|
50
53
|
list(
|
|
51
54
|
toolSetID: string,
|
|
52
|
-
|
|
55
|
+
params: ToolListParams,
|
|
53
56
|
options?: RequestOptions,
|
|
54
57
|
): PagePromise<ToolsCursorPagination, Tool> {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
const { workspaceId, ...query } = params;
|
|
59
|
+
return this._client.getAPIList(
|
|
60
|
+
path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`,
|
|
61
|
+
CursorPagination<Tool>,
|
|
62
|
+
{ query, ...options },
|
|
63
|
+
);
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
/**
|
|
62
67
|
* Deletes a tool in the tool set
|
|
63
68
|
*/
|
|
64
69
|
delete(id: string, params: ToolDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
65
|
-
const { toolSetId } = params;
|
|
66
|
-
return this._client.delete(path`/v1/tool_sets/${toolSetId}/tools/${id}`, {
|
|
70
|
+
const { workspaceId, toolSetId } = params;
|
|
71
|
+
return this._client.delete(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
|
|
67
72
|
...options,
|
|
68
73
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
69
74
|
});
|
|
@@ -117,9 +122,9 @@ export interface Tool {
|
|
|
117
122
|
|
|
118
123
|
export interface ToolInfo {
|
|
119
124
|
/**
|
|
120
|
-
*
|
|
121
|
-
* account-scoped
|
|
122
|
-
*
|
|
125
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
126
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
127
|
+
* workspaces.
|
|
123
128
|
*/
|
|
124
129
|
createdBy?: AccountAPI.Profile;
|
|
125
130
|
|
|
@@ -163,27 +168,45 @@ export interface ToolSpecConfig {
|
|
|
163
168
|
|
|
164
169
|
export interface ToolCreateParams {
|
|
165
170
|
/**
|
|
166
|
-
*
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
* Path param: Workspace ID.
|
|
172
|
+
*/
|
|
173
|
+
workspaceId: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Body param: CreateResourceMetadata contains the user-provided fields for
|
|
177
|
+
* creating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
178
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
179
|
+
* server.
|
|
169
180
|
*/
|
|
170
181
|
metadata: Shared.CreateResourceMetadata;
|
|
171
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Body param
|
|
185
|
+
*/
|
|
172
186
|
spec: ToolSpec;
|
|
173
187
|
}
|
|
174
188
|
|
|
175
189
|
export interface ToolRetrieveParams {
|
|
176
190
|
/**
|
|
177
|
-
*
|
|
178
|
-
|
|
191
|
+
* Workspace ID.
|
|
192
|
+
*/
|
|
193
|
+
workspaceId: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
|
|
179
197
|
*/
|
|
180
198
|
toolSetId: string;
|
|
181
199
|
}
|
|
182
200
|
|
|
183
201
|
export interface ToolUpdateParams {
|
|
184
202
|
/**
|
|
185
|
-
* Path param:
|
|
186
|
-
|
|
203
|
+
* Path param: Workspace ID.
|
|
204
|
+
*/
|
|
205
|
+
workspaceId: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Path param: Tool set ID. Accepts the canonical ts\_… form or the
|
|
209
|
+
* external_id:<value> form.
|
|
187
210
|
*/
|
|
188
211
|
toolSetId: string;
|
|
189
212
|
|
|
@@ -208,43 +231,49 @@ export interface ToolUpdateParams {
|
|
|
208
231
|
|
|
209
232
|
export interface ToolListParams extends CursorPaginationParams {
|
|
210
233
|
/**
|
|
211
|
-
*
|
|
234
|
+
* Path param: Workspace ID.
|
|
235
|
+
*/
|
|
236
|
+
workspaceId: string;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Query param: Filter by bundle_key — return only resources owned by this bundle.
|
|
212
240
|
*/
|
|
213
241
|
bundleKey?: string;
|
|
214
242
|
|
|
215
243
|
/**
|
|
216
|
-
* When set to true you may use more of your alloted API rate-limit
|
|
244
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
217
245
|
*/
|
|
218
246
|
includeInfo?: boolean;
|
|
219
247
|
|
|
220
248
|
/**
|
|
221
|
-
* Filter by tool name (exact match). Multiple values are OR'd
|
|
249
|
+
* Query param: Filter by tool name (exact match). Multiple values are OR'd
|
|
250
|
+
* together.
|
|
222
251
|
*/
|
|
223
252
|
names?: Array<string>;
|
|
224
253
|
|
|
225
254
|
/**
|
|
226
|
-
* Filter expression (query param: prefix)
|
|
255
|
+
* Query param: Filter expression (query param: prefix)
|
|
227
256
|
*/
|
|
228
257
|
prefix?: string;
|
|
229
258
|
|
|
230
259
|
/**
|
|
231
|
-
* Free-form search query
|
|
260
|
+
* Query param: Free-form search query
|
|
232
261
|
*/
|
|
233
262
|
query?: string;
|
|
234
263
|
|
|
235
264
|
/**
|
|
236
|
-
* Filter by approval requirement. Omitted = no filter; true = only
|
|
237
|
-
* approval; false = only tools not requiring approval.
|
|
265
|
+
* Query param: Filter by approval requirement. Omitted = no filter; true = only
|
|
266
|
+
* tools requiring approval; false = only tools not requiring approval.
|
|
238
267
|
*/
|
|
239
268
|
requiresApproval?: boolean;
|
|
240
269
|
|
|
241
270
|
/**
|
|
242
|
-
* Sort order for results (asc or desc by creation time)
|
|
271
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
243
272
|
*/
|
|
244
273
|
sortOrder?: string;
|
|
245
274
|
|
|
246
275
|
/**
|
|
247
|
-
* Filter by tool status. Multiple values are OR'd together.
|
|
276
|
+
* Query param: Filter by tool status. Multiple values are OR'd together.
|
|
248
277
|
*/
|
|
249
278
|
statuses?: Array<
|
|
250
279
|
'TOOL_STATUS_UNSPECIFIED' | 'TOOL_STATUS_AVAILABLE' | 'TOOL_STATUS_OMITTED' | 'TOOL_STATUS_ARCHIVED'
|
|
@@ -253,8 +282,12 @@ export interface ToolListParams extends CursorPaginationParams {
|
|
|
253
282
|
|
|
254
283
|
export interface ToolDeleteParams {
|
|
255
284
|
/**
|
|
256
|
-
*
|
|
257
|
-
|
|
285
|
+
* Workspace ID.
|
|
286
|
+
*/
|
|
287
|
+
workspaceId: string;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
|
|
258
291
|
*/
|
|
259
292
|
toolSetId: string;
|
|
260
293
|
}
|
package/src/resources/uploads.ts
CHANGED
|
@@ -8,13 +8,9 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* MemoryEntry).
|
|
15
|
-
*
|
|
16
|
-
* Authentication: Bearer token (JWT)
|
|
17
|
-
* Scope: Workspace-level operations
|
|
11
|
+
* Issue short-lived presigned URLs for direct client-to-object-storage
|
|
12
|
+
* uploads. Created uploads can be referenced by id when creating or updating
|
|
13
|
+
* resources that accept binary content (e.g., MemoryEntry).
|
|
18
14
|
*/
|
|
19
15
|
export class Uploads extends APIResource {
|
|
20
16
|
/**
|
|
@@ -22,27 +18,28 @@ export class Uploads extends APIResource {
|
|
|
22
18
|
* returned id is used to reference the upload from resources that accept binary
|
|
23
19
|
* content.
|
|
24
20
|
*/
|
|
25
|
-
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload> {
|
|
26
|
-
return this._client.post(
|
|
21
|
+
create(workspaceID: string, body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload> {
|
|
22
|
+
return this._client.post(path`/v1/workspaces/${workspaceID}/uploads`, { body, ...options });
|
|
27
23
|
}
|
|
28
24
|
|
|
29
25
|
/**
|
|
30
26
|
* Retrieves the current state of an upload, including its lifecycle status
|
|
31
27
|
*/
|
|
32
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Upload> {
|
|
33
|
-
|
|
28
|
+
retrieve(id: string, params: UploadRetrieveParams, options?: RequestOptions): APIPromise<Upload> {
|
|
29
|
+
const { workspaceId } = params;
|
|
30
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/uploads/${id}`, options);
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
35
|
+
* A handle representing a single file upload flow. Clients call CreateUpload to
|
|
36
|
+
* receive a short-lived presigned URL, PUT the file directly to object storage,
|
|
37
|
+
* then reference the upload by id when creating or updating resources that accept
|
|
38
|
+
* binary content.
|
|
42
39
|
*
|
|
43
|
-
* Uploads are one-shot: once consumed by a creating or updating resource
|
|
40
|
+
* Uploads are one-shot: once consumed by a creating or updating resource the
|
|
44
41
|
* upload transitions to UPLOAD_STATUS_CONSUMED and cannot be reused. Unused
|
|
45
|
-
* uploads expire and are garbage-collected
|
|
42
|
+
* uploads expire and are garbage-collected.
|
|
46
43
|
*/
|
|
47
44
|
export interface Upload {
|
|
48
45
|
info: UploadInfo;
|
|
@@ -57,9 +54,9 @@ export interface Upload {
|
|
|
57
54
|
|
|
58
55
|
export interface UploadInfo {
|
|
59
56
|
/**
|
|
60
|
-
*
|
|
61
|
-
* account-scoped
|
|
62
|
-
*
|
|
57
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
58
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
59
|
+
* workspaces.
|
|
63
60
|
*/
|
|
64
61
|
createdBy?: AccountAPI.Profile;
|
|
65
62
|
|
|
@@ -118,11 +115,19 @@ export interface UploadCreateParams {
|
|
|
118
115
|
spec: UploadSpec;
|
|
119
116
|
}
|
|
120
117
|
|
|
118
|
+
export interface UploadRetrieveParams {
|
|
119
|
+
/**
|
|
120
|
+
* Workspace ID.
|
|
121
|
+
*/
|
|
122
|
+
workspaceId: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
121
125
|
export declare namespace Uploads {
|
|
122
126
|
export {
|
|
123
127
|
type Upload as Upload,
|
|
124
128
|
type UploadInfo as UploadInfo,
|
|
125
129
|
type UploadSpec as UploadSpec,
|
|
126
130
|
type UploadCreateParams as UploadCreateParams,
|
|
131
|
+
type UploadRetrieveParams as UploadRetrieveParams,
|
|
127
132
|
};
|
|
128
133
|
}
|
|
@@ -13,15 +13,24 @@ export class WorkspaceSecrets extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Creates a new workspace secret in the workspace
|
|
15
15
|
*/
|
|
16
|
-
create(
|
|
17
|
-
|
|
16
|
+
create(
|
|
17
|
+
workspaceID: string,
|
|
18
|
+
body: WorkspaceSecretCreateParams,
|
|
19
|
+
options?: RequestOptions,
|
|
20
|
+
): APIPromise<WorkspaceSecret> {
|
|
21
|
+
return this._client.post(path`/v1/workspaces/${workspaceID}/workspace_secrets`, { body, ...options });
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
/**
|
|
21
25
|
* Retrieves a workspace secret by ID from the workspace
|
|
22
26
|
*/
|
|
23
|
-
retrieve(
|
|
24
|
-
|
|
27
|
+
retrieve(
|
|
28
|
+
id: string,
|
|
29
|
+
params: WorkspaceSecretRetrieveParams,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<WorkspaceSecret> {
|
|
32
|
+
const { workspaceId } = params;
|
|
33
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/workspace_secrets/${id}`, options);
|
|
25
34
|
}
|
|
26
35
|
|
|
27
36
|
/**
|
|
@@ -29,30 +38,37 @@ export class WorkspaceSecrets extends APIResource {
|
|
|
29
38
|
*/
|
|
30
39
|
update(
|
|
31
40
|
id: string,
|
|
32
|
-
|
|
41
|
+
params: WorkspaceSecretUpdateParams,
|
|
33
42
|
options?: RequestOptions,
|
|
34
43
|
): APIPromise<WorkspaceSecret> {
|
|
35
|
-
|
|
44
|
+
const { workspaceId, ...body } = params;
|
|
45
|
+
return this._client.patch(path`/v1/workspaces/${workspaceId}/workspace_secrets/${id}`, {
|
|
46
|
+
body,
|
|
47
|
+
...options,
|
|
48
|
+
});
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
/**
|
|
39
52
|
* Lists all workspace secrets in the workspace
|
|
40
53
|
*/
|
|
41
54
|
list(
|
|
55
|
+
workspaceID: string,
|
|
42
56
|
query: WorkspaceSecretListParams | null | undefined = {},
|
|
43
57
|
options?: RequestOptions,
|
|
44
58
|
): PagePromise<WorkspaceSecretsCursorPagination, WorkspaceSecret> {
|
|
45
|
-
return this._client.getAPIList(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
59
|
+
return this._client.getAPIList(
|
|
60
|
+
path`/v1/workspaces/${workspaceID}/workspace_secrets`,
|
|
61
|
+
CursorPagination<WorkspaceSecret>,
|
|
62
|
+
{ query, ...options },
|
|
63
|
+
);
|
|
49
64
|
}
|
|
50
65
|
|
|
51
66
|
/**
|
|
52
67
|
* Deletes a workspace secret from the workspace
|
|
53
68
|
*/
|
|
54
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
55
|
-
|
|
69
|
+
delete(id: string, params: WorkspaceSecretDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
70
|
+
const { workspaceId } = params;
|
|
71
|
+
return this._client.delete(path`/v1/workspaces/${workspaceId}/workspace_secrets/${id}`, {
|
|
56
72
|
...options,
|
|
57
73
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
58
74
|
});
|
|
@@ -77,9 +93,9 @@ export interface WorkspaceSecret {
|
|
|
77
93
|
|
|
78
94
|
export interface WorkspaceSecretInfo {
|
|
79
95
|
/**
|
|
80
|
-
*
|
|
81
|
-
* account-scoped
|
|
82
|
-
*
|
|
96
|
+
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
97
|
+
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
98
|
+
* workspaces.
|
|
83
99
|
*/
|
|
84
100
|
createdBy?: AccountAPI.Profile;
|
|
85
101
|
|
|
@@ -101,18 +117,34 @@ export interface WorkspaceSecretCreateParams {
|
|
|
101
117
|
spec: WorkspaceSecretSpec;
|
|
102
118
|
}
|
|
103
119
|
|
|
120
|
+
export interface WorkspaceSecretRetrieveParams {
|
|
121
|
+
/**
|
|
122
|
+
* The workspace the secret belongs to.
|
|
123
|
+
*/
|
|
124
|
+
workspaceId: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
104
127
|
export interface WorkspaceSecretUpdateParams {
|
|
105
128
|
/**
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
129
|
+
* Path param: The workspace the secret belongs to.
|
|
130
|
+
*/
|
|
131
|
+
workspaceId: string;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
135
|
+
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
136
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
137
|
+
* server.
|
|
109
138
|
*/
|
|
110
139
|
metadata?: Shared.UpdateResourceMetadata;
|
|
111
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Body param
|
|
143
|
+
*/
|
|
112
144
|
spec?: WorkspaceSecretSpec;
|
|
113
145
|
|
|
114
146
|
/**
|
|
115
|
-
* Fields to update
|
|
147
|
+
* Body param: Fields to update.
|
|
116
148
|
*/
|
|
117
149
|
updateMask?: string;
|
|
118
150
|
}
|
|
@@ -144,6 +176,13 @@ export interface WorkspaceSecretListParams extends CursorPaginationParams {
|
|
|
144
176
|
sortOrder?: string;
|
|
145
177
|
}
|
|
146
178
|
|
|
179
|
+
export interface WorkspaceSecretDeleteParams {
|
|
180
|
+
/**
|
|
181
|
+
* The workspace the secret belongs to.
|
|
182
|
+
*/
|
|
183
|
+
workspaceId: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
147
186
|
export declare namespace WorkspaceSecrets {
|
|
148
187
|
export {
|
|
149
188
|
type WorkspaceSecret as WorkspaceSecret,
|
|
@@ -151,7 +190,9 @@ export declare namespace WorkspaceSecrets {
|
|
|
151
190
|
type WorkspaceSecretSpec as WorkspaceSecretSpec,
|
|
152
191
|
type WorkspaceSecretsCursorPagination as WorkspaceSecretsCursorPagination,
|
|
153
192
|
type WorkspaceSecretCreateParams as WorkspaceSecretCreateParams,
|
|
193
|
+
type WorkspaceSecretRetrieveParams as WorkspaceSecretRetrieveParams,
|
|
154
194
|
type WorkspaceSecretUpdateParams as WorkspaceSecretUpdateParams,
|
|
155
195
|
type WorkspaceSecretListParams as WorkspaceSecretListParams,
|
|
196
|
+
type WorkspaceSecretDeleteParams as WorkspaceSecretDeleteParams,
|
|
156
197
|
};
|
|
157
198
|
}
|
|
@@ -7,12 +7,8 @@ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../c
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* Workspaces provide organizational grouping for resources within an account.
|
|
13
|
-
*
|
|
14
|
-
* Authentication: Bearer token (JWT)
|
|
15
|
-
* Scope: Account-level operations (manages workspaces themselves, not resources within workspaces)
|
|
10
|
+
* Manage workspaces within an account. Workspaces provide organizational
|
|
11
|
+
* grouping and isolation for resources such as agents, tools, and API keys.
|
|
16
12
|
*/
|
|
17
13
|
export class Workspaces extends APIResource {
|
|
18
14
|
/**
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.68.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.68.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.68.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.68.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|