@cadenya/cadenya 0.103.0 → 0.105.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/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/objectives/index.d.mts +2 -2
- package/resources/objectives/index.d.mts.map +1 -1
- package/resources/objectives/index.d.ts +2 -2
- 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 +115 -3
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +115 -3
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +10 -0
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +10 -0
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +64 -3
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +64 -3
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tool-calls.js +9 -0
- package/resources/objectives/tool-calls.js.map +1 -1
- package/resources/objectives/tool-calls.mjs +9 -0
- package/resources/objectives/tool-calls.mjs.map +1 -1
- package/resources/tool-sets/index.d.mts +2 -2
- package/resources/tool-sets/index.d.mts.map +1 -1
- package/resources/tool-sets/index.d.ts +2 -2
- 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 +25 -3
- package/resources/tool-sets/tool-sets.d.mts.map +1 -1
- package/resources/tool-sets/tool-sets.d.ts +25 -3
- package/resources/tool-sets/tool-sets.d.ts.map +1 -1
- package/resources/tool-sets/tool-sets.js.map +1 -1
- package/resources/tool-sets/tool-sets.mjs.map +1 -1
- package/resources/tool-sets/tools.d.mts +14 -1
- package/resources/tool-sets/tools.d.mts.map +1 -1
- package/resources/tool-sets/tools.d.ts +14 -1
- package/resources/tool-sets/tools.d.ts.map +1 -1
- package/src/client.ts +10 -0
- package/src/resources/index.ts +5 -0
- package/src/resources/objectives/index.ts +9 -0
- package/src/resources/objectives/objectives.ts +151 -0
- package/src/resources/objectives/tool-calls.ts +99 -2
- package/src/resources/tool-sets/index.ts +2 -0
- package/src/resources/tool-sets/tool-sets.ts +27 -0
- package/src/resources/tool-sets/tools.ts +15 -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
|
@@ -74,6 +74,23 @@ export class ToolCalls extends APIResource {
|
|
|
74
74
|
{ body, ...options },
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* For bare tool calls (tool sets with no execution adapter), sets the content an
|
|
80
|
+
* external API consumer supplies for the call — used for human-in-the-loop tools
|
|
81
|
+
* and reverse harnesses that execute tools locally and report results back.
|
|
82
|
+
*/
|
|
83
|
+
setContent(
|
|
84
|
+
toolCallID: string,
|
|
85
|
+
params: ToolCallSetContentParams,
|
|
86
|
+
options?: RequestOptions,
|
|
87
|
+
): APIPromise<ObjectiveToolCall> {
|
|
88
|
+
const { workspaceId, objectiveId, ...body } = params;
|
|
89
|
+
return this._client.post(
|
|
90
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveId}/tool_calls/${toolCallID}:setContent`,
|
|
91
|
+
{ body, ...options },
|
|
92
|
+
);
|
|
93
|
+
}
|
|
77
94
|
}
|
|
78
95
|
|
|
79
96
|
export type ObjectiveToolCallsCursorPagination = CursorPagination<ObjectiveToolCall>;
|
|
@@ -91,7 +108,8 @@ export interface ObjectiveToolCall {
|
|
|
91
108
|
| 'TOOL_CALL_EXECUTION_STATUS_PENDING'
|
|
92
109
|
| 'TOOL_CALL_EXECUTION_STATUS_RUNNING'
|
|
93
110
|
| 'TOOL_CALL_EXECUTION_STATUS_COMPLETED'
|
|
94
|
-
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED'
|
|
111
|
+
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED'
|
|
112
|
+
| 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
|
|
95
113
|
|
|
96
114
|
/**
|
|
97
115
|
* Metadata for ephemeral operations and activities (e.g., objectives, executions,
|
|
@@ -261,7 +279,8 @@ export interface ObjectiveToolCallWithResult {
|
|
|
261
279
|
| 'TOOL_CALL_EXECUTION_STATUS_PENDING'
|
|
262
280
|
| 'TOOL_CALL_EXECUTION_STATUS_RUNNING'
|
|
263
281
|
| 'TOOL_CALL_EXECUTION_STATUS_COMPLETED'
|
|
264
|
-
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED'
|
|
282
|
+
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED'
|
|
283
|
+
| 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
|
|
265
284
|
|
|
266
285
|
info: ObjectiveToolCallInfo;
|
|
267
286
|
|
|
@@ -313,6 +332,46 @@ export interface ResolvedSecret {
|
|
|
313
332
|
| 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
|
|
314
333
|
}
|
|
315
334
|
|
|
335
|
+
export interface SetToolCallContentRequestAudioBlock {
|
|
336
|
+
/**
|
|
337
|
+
* Base64-encoded audio bytes.
|
|
338
|
+
*/
|
|
339
|
+
data: string;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* IANA media type of the audio, e.g. audio/wav.
|
|
343
|
+
*/
|
|
344
|
+
mimeType: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* ContentBlock is a single block of tool call content supplied on input. Exactly
|
|
349
|
+
* one of the variants is set.
|
|
350
|
+
*/
|
|
351
|
+
export interface SetToolCallContentRequestContentBlock {
|
|
352
|
+
audio?: SetToolCallContentRequestAudioBlock;
|
|
353
|
+
|
|
354
|
+
image?: SetToolCallContentRequestImageBlock;
|
|
355
|
+
|
|
356
|
+
text?: SetToolCallContentRequestTextBlock;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
export interface SetToolCallContentRequestImageBlock {
|
|
360
|
+
/**
|
|
361
|
+
* Base64-encoded image bytes.
|
|
362
|
+
*/
|
|
363
|
+
data: string;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* IANA media type of the image, e.g. image/png.
|
|
367
|
+
*/
|
|
368
|
+
mimeType: string;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export interface SetToolCallContentRequestTextBlock {
|
|
372
|
+
text: string;
|
|
373
|
+
}
|
|
374
|
+
|
|
316
375
|
export interface ToolCallRetrieveParams {
|
|
317
376
|
workspaceId: string;
|
|
318
377
|
|
|
@@ -328,6 +387,19 @@ export interface ToolCallListParams extends CursorPaginationParams {
|
|
|
328
387
|
*/
|
|
329
388
|
workspaceId: string;
|
|
330
389
|
|
|
390
|
+
/**
|
|
391
|
+
* Query param: Filter by tool call execution status. Useful for reverse-harness
|
|
392
|
+
* polling of bare tool calls waiting for externally supplied content
|
|
393
|
+
* (TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT).
|
|
394
|
+
*/
|
|
395
|
+
executionStatus?:
|
|
396
|
+
| 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED'
|
|
397
|
+
| 'TOOL_CALL_EXECUTION_STATUS_PENDING'
|
|
398
|
+
| 'TOOL_CALL_EXECUTION_STATUS_RUNNING'
|
|
399
|
+
| 'TOOL_CALL_EXECUTION_STATUS_COMPLETED'
|
|
400
|
+
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED'
|
|
401
|
+
| 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
|
|
402
|
+
|
|
331
403
|
/**
|
|
332
404
|
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
333
405
|
*/
|
|
@@ -372,6 +444,26 @@ export interface ToolCallDenyParams {
|
|
|
372
444
|
memo?: string;
|
|
373
445
|
}
|
|
374
446
|
|
|
447
|
+
export interface ToolCallSetContentParams {
|
|
448
|
+
/**
|
|
449
|
+
* Path param
|
|
450
|
+
*/
|
|
451
|
+
workspaceId: string;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Path param: The ID of the objective. Supports "external_id:" prefix for external
|
|
455
|
+
* IDs.
|
|
456
|
+
*/
|
|
457
|
+
objectiveId: string;
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Body param: The content to set on the tool call. Mirrors
|
|
461
|
+
* ObjectiveToolCallResult.ContentBlock but writable: media blocks carry raw data
|
|
462
|
+
* on input where the result-side carries a signed url on output.
|
|
463
|
+
*/
|
|
464
|
+
content: Array<SetToolCallContentRequestContentBlock>;
|
|
465
|
+
}
|
|
466
|
+
|
|
375
467
|
export declare namespace ToolCalls {
|
|
376
468
|
export {
|
|
377
469
|
type ObjectiveToolCall as ObjectiveToolCall,
|
|
@@ -384,10 +476,15 @@ export declare namespace ToolCalls {
|
|
|
384
476
|
type ObjectiveToolCallResultTextBlock as ObjectiveToolCallResultTextBlock,
|
|
385
477
|
type ObjectiveToolCallWithResult as ObjectiveToolCallWithResult,
|
|
386
478
|
type ResolvedSecret as ResolvedSecret,
|
|
479
|
+
type SetToolCallContentRequestAudioBlock as SetToolCallContentRequestAudioBlock,
|
|
480
|
+
type SetToolCallContentRequestContentBlock as SetToolCallContentRequestContentBlock,
|
|
481
|
+
type SetToolCallContentRequestImageBlock as SetToolCallContentRequestImageBlock,
|
|
482
|
+
type SetToolCallContentRequestTextBlock as SetToolCallContentRequestTextBlock,
|
|
387
483
|
type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination,
|
|
388
484
|
type ToolCallRetrieveParams as ToolCallRetrieveParams,
|
|
389
485
|
type ToolCallListParams as ToolCallListParams,
|
|
390
486
|
type ToolCallApproveParams as ToolCallApproveParams,
|
|
391
487
|
type ToolCallDenyParams as ToolCallDenyParams,
|
|
488
|
+
type ToolCallSetContentParams as ToolCallSetContentParams,
|
|
392
489
|
};
|
|
393
490
|
}
|
|
@@ -23,6 +23,7 @@ export {
|
|
|
23
23
|
type ToolFilter,
|
|
24
24
|
type ToolSet,
|
|
25
25
|
type ToolSetAdapter,
|
|
26
|
+
type ToolSetAdapterBare,
|
|
26
27
|
type ToolSetAdapterHTTP,
|
|
27
28
|
type ToolSetAdapterMcp,
|
|
28
29
|
type ToolSetAdapterOpenAPI,
|
|
@@ -45,6 +46,7 @@ export {
|
|
|
45
46
|
} from './tool-sets';
|
|
46
47
|
export {
|
|
47
48
|
Tools,
|
|
49
|
+
type ConfigBare,
|
|
48
50
|
type ConfigHTTP,
|
|
49
51
|
type ConfigMcp,
|
|
50
52
|
type ConfigOpenAPI,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
} from './secrets';
|
|
19
19
|
import * as ToolsAPI from './tools';
|
|
20
20
|
import {
|
|
21
|
+
ConfigBare,
|
|
21
22
|
ConfigHTTP,
|
|
22
23
|
ConfigMcp,
|
|
23
24
|
ConfigOpenAPI,
|
|
@@ -281,6 +282,15 @@ export interface ToolSet {
|
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
export interface ToolSetAdapter {
|
|
285
|
+
/**
|
|
286
|
+
* Bare tool sets define tools without an execution adapter. A bare tool call
|
|
287
|
+
* doesn't fire anything: the objective's workflow pauses and waits for an external
|
|
288
|
+
* API consumer to set the tool call's content (e.g. human-in-the-loop tools, or a
|
|
289
|
+
* reverse harness that polls for pending tool calls, executes locally, and reports
|
|
290
|
+
* results back via SetToolCallContent).
|
|
291
|
+
*/
|
|
292
|
+
bare?: ToolSetAdapterBare;
|
|
293
|
+
|
|
284
294
|
http?: ToolSetAdapterHTTP;
|
|
285
295
|
|
|
286
296
|
mcp?: ToolSetAdapterMcp;
|
|
@@ -288,6 +298,21 @@ export interface ToolSetAdapter {
|
|
|
288
298
|
openapi?: ToolSetAdapterOpenAPI;
|
|
289
299
|
}
|
|
290
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Bare tool sets define tools without an execution adapter. A bare tool call
|
|
303
|
+
* doesn't fire anything: the objective's workflow pauses and waits for an external
|
|
304
|
+
* API consumer to set the tool call's content (e.g. human-in-the-loop tools, or a
|
|
305
|
+
* reverse harness that polls for pending tool calls, executes locally, and reports
|
|
306
|
+
* results back via SetToolCallContent).
|
|
307
|
+
*/
|
|
308
|
+
export interface ToolSetAdapterBare {
|
|
309
|
+
/**
|
|
310
|
+
* How long to wait for content to be set before the tool call errors. If unset,
|
|
311
|
+
* the call waits indefinitely.
|
|
312
|
+
*/
|
|
313
|
+
contentTimeout?: number;
|
|
314
|
+
}
|
|
315
|
+
|
|
291
316
|
export interface ToolSetAdapterHTTP {
|
|
292
317
|
baseUrl?: string;
|
|
293
318
|
|
|
@@ -610,6 +635,7 @@ export declare namespace ToolSets {
|
|
|
610
635
|
type ToolFilter as ToolFilter,
|
|
611
636
|
type ToolSet as ToolSet,
|
|
612
637
|
type ToolSetAdapter as ToolSetAdapter,
|
|
638
|
+
type ToolSetAdapterBare as ToolSetAdapterBare,
|
|
613
639
|
type ToolSetAdapterHTTP as ToolSetAdapterHTTP,
|
|
614
640
|
type ToolSetAdapterMcp as ToolSetAdapterMcp,
|
|
615
641
|
type ToolSetAdapterOpenAPI as ToolSetAdapterOpenAPI,
|
|
@@ -633,6 +659,7 @@ export declare namespace ToolSets {
|
|
|
633
659
|
|
|
634
660
|
export {
|
|
635
661
|
Tools as Tools,
|
|
662
|
+
type ConfigBare as ConfigBare,
|
|
636
663
|
type ConfigHTTP as ConfigHTTP,
|
|
637
664
|
type ConfigMcp as ConfigMcp,
|
|
638
665
|
type ConfigOpenAPI as ConfigOpenAPI,
|
|
@@ -101,6 +101,13 @@ export class Tools extends APIResource {
|
|
|
101
101
|
|
|
102
102
|
export type ToolsCursorPagination = CursorPagination<Tool>;
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Marks the tool as bare: it has no execution adapter of its own and relies on the
|
|
106
|
+
* parent tool set being a Bare tool set. Present so a webhook consumer can tell a
|
|
107
|
+
* tool is bare from the tool data alone, without cross-referencing the tool set.
|
|
108
|
+
*/
|
|
109
|
+
export interface ConfigBare {}
|
|
110
|
+
|
|
104
111
|
export interface ConfigHTTP {
|
|
105
112
|
requestMethod: 'HTTP_METHOD_UNSPECIFIED' | 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
106
113
|
|
|
@@ -240,6 +247,13 @@ export interface ToolSpec {
|
|
|
240
247
|
* be Http. If the tool is an inline tool, the adapter will be Inline.
|
|
241
248
|
*/
|
|
242
249
|
export interface ToolSpecConfig {
|
|
250
|
+
/**
|
|
251
|
+
* Marks the tool as bare: it has no execution adapter of its own and relies on the
|
|
252
|
+
* parent tool set being a Bare tool set. Present so a webhook consumer can tell a
|
|
253
|
+
* tool is bare from the tool data alone, without cross-referencing the tool set.
|
|
254
|
+
*/
|
|
255
|
+
bare?: ConfigBare;
|
|
256
|
+
|
|
243
257
|
http?: ConfigHTTP;
|
|
244
258
|
|
|
245
259
|
mcp?: ConfigMcp;
|
|
@@ -392,6 +406,7 @@ export interface ToolRestoreParams {
|
|
|
392
406
|
|
|
393
407
|
export declare namespace Tools {
|
|
394
408
|
export {
|
|
409
|
+
type ConfigBare as ConfigBare,
|
|
395
410
|
type ConfigHTTP as ConfigHTTP,
|
|
396
411
|
type ConfigMcp as ConfigMcp,
|
|
397
412
|
type ConfigOpenAPI as ConfigOpenAPI,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.105.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.105.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.105.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.105.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|