@cadenya/cadenya 0.85.0 → 0.87.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/package.json +1 -1
- package/resources/agents/schedules.d.mts +12 -5
- package/resources/agents/schedules.d.mts.map +1 -1
- package/resources/agents/schedules.d.ts +12 -5
- package/resources/agents/schedules.d.ts.map +1 -1
- package/resources/agents/variations.d.mts +11 -2
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +11 -2
- package/resources/agents/variations.d.ts.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 +29 -7
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +29 -7
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +95 -5
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +95 -5
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tool-calls.js +8 -0
- package/resources/objectives/tool-calls.js.map +1 -1
- package/resources/objectives/tool-calls.mjs +8 -0
- package/resources/objectives/tool-calls.mjs.map +1 -1
- package/src/resources/agents/schedules.ts +14 -6
- package/src/resources/agents/variations.ts +12 -2
- package/src/resources/objectives/index.ts +7 -0
- package/src/resources/objectives/objectives.ts +39 -5
- package/src/resources/objectives/tool-calls.ts +143 -5
- 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,6 +10,22 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
10
10
|
import { path } from '../../internal/utils/path';
|
|
11
11
|
|
|
12
12
|
export class ToolCalls extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a single tool call, including the content the tool returned. Media
|
|
15
|
+
* content (images, audio) is served as short-lived signed URLs.
|
|
16
|
+
*/
|
|
17
|
+
retrieve(
|
|
18
|
+
toolCallID: string,
|
|
19
|
+
params: ToolCallRetrieveParams,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): APIPromise<ObjectiveToolCallWithResult> {
|
|
22
|
+
const { workspaceId, objectiveId } = params;
|
|
23
|
+
return this._client.get(
|
|
24
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveId}/tool_calls/${toolCallID}`,
|
|
25
|
+
options,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
13
29
|
/**
|
|
14
30
|
* Lists all tool calls for an objective
|
|
15
31
|
*/
|
|
@@ -115,11 +131,6 @@ export interface ObjectiveToolCallData {
|
|
|
115
131
|
*/
|
|
116
132
|
memo?: string;
|
|
117
133
|
|
|
118
|
-
/**
|
|
119
|
-
* The result content returned by the tool after execution
|
|
120
|
-
*/
|
|
121
|
-
result?: string;
|
|
122
|
-
|
|
123
134
|
/**
|
|
124
135
|
* A profile identifies a user or non-human principal (such as an API key) at the
|
|
125
136
|
* account level. Profiles are account-scoped and can be granted access to multiple
|
|
@@ -143,6 +154,126 @@ export interface ObjectiveToolCallInfo {
|
|
|
143
154
|
objective?: Shared.OperationMetadata;
|
|
144
155
|
}
|
|
145
156
|
|
|
157
|
+
/**
|
|
158
|
+
* ObjectiveToolCallResult is the content a tool returned after execution. Tools
|
|
159
|
+
* can return multiple content blocks, and blocks can be multi-modal (text, image,
|
|
160
|
+
* audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
|
|
161
|
+
* rather than inline bytes.
|
|
162
|
+
*/
|
|
163
|
+
export interface ObjectiveToolCallResult {
|
|
164
|
+
content: Array<ObjectiveToolCallResultContentBlock>;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface ObjectiveToolCallResultAudioBlock {
|
|
168
|
+
/**
|
|
169
|
+
* When the signed URL expires.
|
|
170
|
+
*/
|
|
171
|
+
expiresAt: string;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* IANA media type of the stored audio, e.g. audio/wav.
|
|
175
|
+
*/
|
|
176
|
+
mimeType: string;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Size of the stored audio in bytes.
|
|
180
|
+
*/
|
|
181
|
+
sizeBytes: string;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Short-lived signed URL to download the stored audio.
|
|
185
|
+
*/
|
|
186
|
+
url: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* ContentBlock is a single block of tool result content. Exactly one of the
|
|
191
|
+
* variants is set.
|
|
192
|
+
*/
|
|
193
|
+
export interface ObjectiveToolCallResultContentBlock {
|
|
194
|
+
audio?: ObjectiveToolCallResultAudioBlock;
|
|
195
|
+
|
|
196
|
+
image?: ObjectiveToolCallResultImageBlock;
|
|
197
|
+
|
|
198
|
+
text?: ObjectiveToolCallResultTextBlock;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface ObjectiveToolCallResultImageBlock {
|
|
202
|
+
/**
|
|
203
|
+
* When the signed URL expires.
|
|
204
|
+
*/
|
|
205
|
+
expiresAt: string;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* IANA media type of the stored image, e.g. image/png.
|
|
209
|
+
*/
|
|
210
|
+
mimeType: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Size of the stored image in bytes.
|
|
214
|
+
*/
|
|
215
|
+
sizeBytes: string;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Short-lived signed URL to download the stored image.
|
|
219
|
+
*/
|
|
220
|
+
url: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface ObjectiveToolCallResultTextBlock {
|
|
224
|
+
text: string;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* ObjectiveToolCallWithResult is an ObjectiveToolCall plus the content the tool
|
|
229
|
+
* returned. Returned by GetObjectiveToolCall.
|
|
230
|
+
*/
|
|
231
|
+
export interface ObjectiveToolCallWithResult {
|
|
232
|
+
data: ObjectiveToolCallData;
|
|
233
|
+
|
|
234
|
+
executionStatus:
|
|
235
|
+
| 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED'
|
|
236
|
+
| 'TOOL_CALL_EXECUTION_STATUS_PENDING'
|
|
237
|
+
| 'TOOL_CALL_EXECUTION_STATUS_RUNNING'
|
|
238
|
+
| 'TOOL_CALL_EXECUTION_STATUS_COMPLETED'
|
|
239
|
+
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED';
|
|
240
|
+
|
|
241
|
+
info: ObjectiveToolCallInfo;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Metadata for ephemeral operations and activities (e.g., objectives, executions,
|
|
245
|
+
* runs)
|
|
246
|
+
*/
|
|
247
|
+
metadata: Shared.OperationMetadata;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Current status of the tool call
|
|
251
|
+
*/
|
|
252
|
+
status:
|
|
253
|
+
| 'TOOL_CALL_STATUS_UNSPECIFIED'
|
|
254
|
+
| 'TOOL_CALL_STATUS_AUTO_APPROVED'
|
|
255
|
+
| 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL'
|
|
256
|
+
| 'TOOL_CALL_STATUS_APPROVED'
|
|
257
|
+
| 'TOOL_CALL_STATUS_DENIED';
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* ObjectiveToolCallResult is the content a tool returned after execution. Tools
|
|
261
|
+
* can return multiple content blocks, and blocks can be multi-modal (text, image,
|
|
262
|
+
* audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
|
|
263
|
+
* rather than inline bytes.
|
|
264
|
+
*/
|
|
265
|
+
result?: ObjectiveToolCallResult;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export interface ToolCallRetrieveParams {
|
|
269
|
+
workspaceId: string;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The ID of the objective. Supports "external_id:" prefix for external IDs.
|
|
273
|
+
*/
|
|
274
|
+
objectiveId: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
146
277
|
export interface ToolCallListParams extends CursorPaginationParams {
|
|
147
278
|
/**
|
|
148
279
|
* Path param
|
|
@@ -198,7 +329,14 @@ export declare namespace ToolCalls {
|
|
|
198
329
|
type ObjectiveToolCall as ObjectiveToolCall,
|
|
199
330
|
type ObjectiveToolCallData as ObjectiveToolCallData,
|
|
200
331
|
type ObjectiveToolCallInfo as ObjectiveToolCallInfo,
|
|
332
|
+
type ObjectiveToolCallResult as ObjectiveToolCallResult,
|
|
333
|
+
type ObjectiveToolCallResultAudioBlock as ObjectiveToolCallResultAudioBlock,
|
|
334
|
+
type ObjectiveToolCallResultContentBlock as ObjectiveToolCallResultContentBlock,
|
|
335
|
+
type ObjectiveToolCallResultImageBlock as ObjectiveToolCallResultImageBlock,
|
|
336
|
+
type ObjectiveToolCallResultTextBlock as ObjectiveToolCallResultTextBlock,
|
|
337
|
+
type ObjectiveToolCallWithResult as ObjectiveToolCallWithResult,
|
|
201
338
|
type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination,
|
|
339
|
+
type ToolCallRetrieveParams as ToolCallRetrieveParams,
|
|
202
340
|
type ToolCallListParams as ToolCallListParams,
|
|
203
341
|
type ToolCallApproveParams as ToolCallApproveParams,
|
|
204
342
|
type ToolCallDenyParams as ToolCallDenyParams,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.87.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.87.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.87.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.87.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|