@cadenya/cadenya 0.40.0 → 0.42.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 +29 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +2 -2
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -2
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.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/variations.d.mts +65 -18
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +65 -18
- package/resources/agents/variations.d.ts.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +2 -2
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +2 -2
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- 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 +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 +41 -1
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +41 -1
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +7 -0
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +7 -0
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +1 -0
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +1 -0
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/src/client.ts +6 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/agents/agents.ts +6 -2
- package/src/resources/agents/index.ts +3 -1
- package/src/resources/agents/variations.ts +75 -22
- package/src/resources/agents/webhook-deliveries.ts +4 -2
- package/src/resources/index.ts +3 -0
- package/src/resources/objectives/index.ts +3 -0
- package/src/resources/objectives/objectives.ts +57 -0
- package/src/resources/objectives/tool-calls.ts +7 -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
|
@@ -81,6 +81,18 @@ export class Objectives extends APIResource {
|
|
|
81
81
|
return this._client.post(path`/v1/objectives/${objectiveID}/cancel`, { body, ...options });
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Triggers compaction on a running objective. Optionally override the variation's
|
|
86
|
+
* compaction config.
|
|
87
|
+
*/
|
|
88
|
+
compact(
|
|
89
|
+
objectiveID: string,
|
|
90
|
+
body: ObjectiveCompactParams,
|
|
91
|
+
options?: RequestOptions,
|
|
92
|
+
): APIPromise<ObjectiveCompactResponse> {
|
|
93
|
+
return this._client.post(path`/v1/objectives/${objectiveID}/compact`, { body, ...options });
|
|
94
|
+
}
|
|
95
|
+
|
|
84
96
|
/**
|
|
85
97
|
* Continues an objective that has completed
|
|
86
98
|
*/
|
|
@@ -173,6 +185,28 @@ export interface CallableTool {
|
|
|
173
185
|
tool?: Shared.ResourceMetadata;
|
|
174
186
|
}
|
|
175
187
|
|
|
188
|
+
export interface ContextWindowCompacted {
|
|
189
|
+
/**
|
|
190
|
+
* Number of messages that were compacted
|
|
191
|
+
*/
|
|
192
|
+
messagesCompacted?: number;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* The new context window created by this compaction
|
|
196
|
+
*/
|
|
197
|
+
newContextWindow?: ObjectiveContextWindowData;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* The strategies that were applied during this compaction
|
|
201
|
+
*/
|
|
202
|
+
strategies?: Array<string>;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The summary generated by the summarization strategy, if used.
|
|
206
|
+
*/
|
|
207
|
+
summary?: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
176
210
|
export interface Objective {
|
|
177
211
|
data: ObjectiveData;
|
|
178
212
|
|
|
@@ -320,6 +354,8 @@ export interface ObjectiveError {
|
|
|
320
354
|
export interface ObjectiveEventData {
|
|
321
355
|
assistantMessage?: AssistantMessage;
|
|
322
356
|
|
|
357
|
+
contextWindowCompacted?: ContextWindowCompacted;
|
|
358
|
+
|
|
323
359
|
error?: ObjectiveError;
|
|
324
360
|
|
|
325
361
|
subObjectiveCreated?: SubObjectiveCreated;
|
|
@@ -541,6 +577,16 @@ export interface UserMessage {
|
|
|
541
577
|
content?: string;
|
|
542
578
|
}
|
|
543
579
|
|
|
580
|
+
/**
|
|
581
|
+
* Compact objective response
|
|
582
|
+
*/
|
|
583
|
+
export interface ObjectiveCompactResponse {
|
|
584
|
+
/**
|
|
585
|
+
* The new context window created by the compaction
|
|
586
|
+
*/
|
|
587
|
+
contextWindow?: ObjectiveContextWindowData;
|
|
588
|
+
}
|
|
589
|
+
|
|
544
590
|
export interface ObjectiveContinueResponse {
|
|
545
591
|
data: ObjectiveEventData;
|
|
546
592
|
|
|
@@ -630,6 +676,14 @@ export interface ObjectiveCancelParams {
|
|
|
630
676
|
reason?: string;
|
|
631
677
|
}
|
|
632
678
|
|
|
679
|
+
export interface ObjectiveCompactParams {
|
|
680
|
+
/**
|
|
681
|
+
* CompactionConfig defines how context window compaction behaves for objectives
|
|
682
|
+
* using this variation.
|
|
683
|
+
*/
|
|
684
|
+
compactionConfig?: VariationsAPI.AgentVariationSpecCompactionConfig;
|
|
685
|
+
}
|
|
686
|
+
|
|
633
687
|
export interface ObjectiveContinueParams {
|
|
634
688
|
/**
|
|
635
689
|
* When set to true, the message will be enqueued for when the agent loop is
|
|
@@ -691,6 +745,7 @@ export declare namespace Objectives {
|
|
|
691
745
|
type AssistantMessage as AssistantMessage,
|
|
692
746
|
type AssistantToolCall as AssistantToolCall,
|
|
693
747
|
type CallableTool as CallableTool,
|
|
748
|
+
type ContextWindowCompacted as ContextWindowCompacted,
|
|
694
749
|
type Objective as Objective,
|
|
695
750
|
type ObjectiveContextWindow as ObjectiveContextWindow,
|
|
696
751
|
type ObjectiveContextWindowData as ObjectiveContextWindowData,
|
|
@@ -710,6 +765,7 @@ export declare namespace Objectives {
|
|
|
710
765
|
type ToolError as ToolError,
|
|
711
766
|
type ToolResult as ToolResult,
|
|
712
767
|
type UserMessage as UserMessage,
|
|
768
|
+
type ObjectiveCompactResponse as ObjectiveCompactResponse,
|
|
713
769
|
type ObjectiveContinueResponse as ObjectiveContinueResponse,
|
|
714
770
|
type ObjectiveListEventsResponse as ObjectiveListEventsResponse,
|
|
715
771
|
type ObjectivesCursorPagination as ObjectivesCursorPagination,
|
|
@@ -718,6 +774,7 @@ export declare namespace Objectives {
|
|
|
718
774
|
type ObjectiveCreateParams as ObjectiveCreateParams,
|
|
719
775
|
type ObjectiveListParams as ObjectiveListParams,
|
|
720
776
|
type ObjectiveCancelParams as ObjectiveCancelParams,
|
|
777
|
+
type ObjectiveCompactParams as ObjectiveCompactParams,
|
|
721
778
|
type ObjectiveContinueParams as ObjectiveContinueParams,
|
|
722
779
|
type ObjectiveListContextWindowsParams as ObjectiveListContextWindowsParams,
|
|
723
780
|
type ObjectiveListEventsParams as ObjectiveListEventsParams,
|
|
@@ -85,6 +85,13 @@ export interface ObjectiveToolCall {
|
|
|
85
85
|
| 'TOOL_CALL_STATUS_APPROVED'
|
|
86
86
|
| 'TOOL_CALL_STATUS_DENIED';
|
|
87
87
|
|
|
88
|
+
executionStatus?:
|
|
89
|
+
| 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED'
|
|
90
|
+
| 'TOOL_CALL_EXECUTION_STATUS_PENDING'
|
|
91
|
+
| 'TOOL_CALL_EXECUTION_STATUS_RUNNING'
|
|
92
|
+
| 'TOOL_CALL_EXECUTION_STATUS_COMPLETED'
|
|
93
|
+
| 'TOOL_CALL_EXECUTION_STATUS_ERRORED';
|
|
94
|
+
|
|
88
95
|
info?: ObjectiveToolCallInfo;
|
|
89
96
|
}
|
|
90
97
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.42.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.42.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.42.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.42.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|