@cadenya/cadenya 0.65.0 → 0.67.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 +18 -18
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -18
- 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/agents/agents.d.mts +28 -11
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +28 -11
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +16 -10
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +16 -10
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/feedback.d.mts +14 -9
- package/resources/agents/feedback.d.mts.map +1 -1
- package/resources/agents/feedback.d.ts +14 -9
- package/resources/agents/feedback.d.ts.map +1 -1
- package/resources/agents/feedback.js +3 -2
- package/resources/agents/feedback.js.map +1 -1
- package/resources/agents/feedback.mjs +3 -2
- 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 +32 -11
- package/resources/agents/schedules.d.mts.map +1 -1
- package/resources/agents/schedules.d.ts +32 -11
- package/resources/agents/schedules.d.ts.map +1 -1
- package/resources/agents/schedules.js +18 -13
- package/resources/agents/schedules.js.map +1 -1
- package/resources/agents/schedules.mjs +18 -13
- package/resources/agents/schedules.mjs.map +1 -1
- package/resources/agents/variations.d.mts +51 -9
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +51 -9
- package/resources/agents/variations.d.ts.map +1 -1
- package/resources/agents/variations.js +28 -32
- package/resources/agents/variations.js.map +1 -1
- package/resources/agents/variations.mjs +28 -32
- package/resources/agents/variations.mjs.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +7 -3
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +7 -3
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/agents/webhook-deliveries.js +3 -2
- package/resources/agents/webhook-deliveries.js.map +1 -1
- package/resources/agents/webhook-deliveries.mjs +3 -2
- package/resources/agents/webhook-deliveries.mjs.map +1 -1
- package/resources/api-keys.d.mts +35 -12
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +35 -12
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +19 -12
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +19 -12
- package/resources/api-keys.mjs.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +21 -4
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +21 -4
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js +10 -9
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +10 -9
- 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 +8 -4
- package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/results.d.ts +8 -4
- package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/results.js +3 -2
- package/resources/bulk-workspace-resources/results.js.map +1 -1
- package/resources/bulk-workspace-resources/results.mjs +3 -2
- 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 +35 -14
- package/resources/memory-layers/entries.d.mts.map +1 -1
- package/resources/memory-layers/entries.d.ts +35 -14
- package/resources/memory-layers/entries.d.ts.map +1 -1
- package/resources/memory-layers/entries.js +15 -13
- package/resources/memory-layers/entries.js.map +1 -1
- package/resources/memory-layers/entries.mjs +15 -13
- 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 +32 -9
- package/resources/memory-layers/memory-layers.d.mts.map +1 -1
- package/resources/memory-layers/memory-layers.d.ts +32 -9
- package/resources/memory-layers/memory-layers.d.ts.map +1 -1
- package/resources/memory-layers/memory-layers.js +13 -10
- package/resources/memory-layers/memory-layers.js.map +1 -1
- package/resources/memory-layers/memory-layers.mjs +13 -10
- package/resources/memory-layers/memory-layers.mjs.map +1 -1
- package/resources/models.d.mts +15 -5
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +15 -5
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +11 -6
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +11 -6
- package/resources/models.mjs.map +1 -1
- package/resources/objectives/feedback.d.mts +16 -5
- package/resources/objectives/feedback.d.mts.map +1 -1
- package/resources/objectives/feedback.d.ts +16 -5
- 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 +49 -21
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +49 -21
- 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 +10 -2
- package/resources/objectives/tasks.d.mts.map +1 -1
- package/resources/objectives/tasks.d.ts +10 -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 +15 -3
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +15 -3
- 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 +39 -12
- package/resources/tool-sets/tool-sets.d.mts.map +1 -1
- package/resources/tool-sets/tool-sets.d.ts +39 -12
- package/resources/tool-sets/tool-sets.d.ts.map +1 -1
- package/resources/tool-sets/tool-sets.js +19 -15
- package/resources/tool-sets/tool-sets.js.map +1 -1
- package/resources/tool-sets/tool-sets.mjs +19 -15
- package/resources/tool-sets/tool-sets.mjs.map +1 -1
- package/resources/tool-sets/tools.d.mts +39 -14
- package/resources/tool-sets/tools.d.mts.map +1 -1
- package/resources/tool-sets/tools.d.ts +39 -14
- package/resources/tool-sets/tools.d.ts.map +1 -1
- package/resources/tool-sets/tools.js +18 -13
- package/resources/tool-sets/tools.js.map +1 -1
- package/resources/tool-sets/tools.mjs +18 -13
- package/resources/tool-sets/tools.mjs.map +1 -1
- package/resources/uploads.d.mts +9 -3
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +9 -3
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +5 -4
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +5 -4
- package/resources/uploads.mjs.map +1 -1
- package/resources/workspace-secrets.d.mts +30 -10
- package/resources/workspace-secrets.d.mts.map +1 -1
- package/resources/workspace-secrets.d.ts +30 -10
- 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/src/client.ts +30 -0
- package/src/resources/agents/agents.ts +43 -14
- package/src/resources/agents/feedback.ts +17 -10
- package/src/resources/agents/index.ts +2 -0
- package/src/resources/agents/schedules.ts +57 -22
- package/src/resources/agents/variations.ts +104 -39
- package/src/resources/agents/webhook-deliveries.ts +10 -4
- package/src/resources/api-keys.ts +54 -16
- package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +42 -8
- package/src/resources/bulk-workspace-resources/index.ts +1 -0
- package/src/resources/bulk-workspace-resources/results.ts +11 -5
- package/src/resources/index.ts +22 -1
- package/src/resources/memory-layers/entries.ts +62 -25
- package/src/resources/memory-layers/index.ts +2 -0
- package/src/resources/memory-layers/memory-layers.ts +52 -12
- package/src/resources/models.ts +25 -6
- package/src/resources/objectives/feedback.ts +26 -8
- package/src/resources/objectives/index.ts +1 -0
- package/src/resources/objectives/objectives.ts +86 -27
- package/src/resources/objectives/tasks.ts +19 -5
- package/src/resources/objectives/tool-calls.ts +30 -14
- 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 +61 -19
- package/src/resources/tool-sets/tools.ts +64 -25
- package/src/resources/uploads.ts +13 -4
- package/src/resources/workspace-secrets.ts +57 -16
- 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
|
@@ -52,33 +52,47 @@ export class Objectives extends APIResource {
|
|
|
52
52
|
/**
|
|
53
53
|
* Creates a new objective in the workspace
|
|
54
54
|
*/
|
|
55
|
-
create(body: ObjectiveCreateParams, options?: RequestOptions): APIPromise<Objective> {
|
|
56
|
-
return this._client.post(
|
|
55
|
+
create(workspaceID: string, body: ObjectiveCreateParams, options?: RequestOptions): APIPromise<Objective> {
|
|
56
|
+
return this._client.post(path`/v1/workspaces/${workspaceID}/objectives`, { body, ...options });
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Retrieves an objective by ID from the workspace
|
|
61
61
|
*/
|
|
62
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Objective> {
|
|
63
|
-
|
|
62
|
+
retrieve(id: string, params: ObjectiveRetrieveParams, options?: RequestOptions): APIPromise<Objective> {
|
|
63
|
+
const { workspaceId } = params;
|
|
64
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/objectives/${id}`, options);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
/**
|
|
67
68
|
* Lists all objectives in the workspace
|
|
68
69
|
*/
|
|
69
70
|
list(
|
|
71
|
+
workspaceID: string,
|
|
70
72
|
query: ObjectiveListParams | null | undefined = {},
|
|
71
73
|
options?: RequestOptions,
|
|
72
74
|
): PagePromise<ObjectivesCursorPagination, Objective> {
|
|
73
|
-
return this._client.getAPIList(
|
|
75
|
+
return this._client.getAPIList(
|
|
76
|
+
path`/v1/workspaces/${workspaceID}/objectives`,
|
|
77
|
+
CursorPagination<Objective>,
|
|
78
|
+
{ query, ...options },
|
|
79
|
+
);
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
/**
|
|
77
83
|
* Cancels a running or pending objective. The objective's state will be set to
|
|
78
84
|
* STATE_CANCELLED.
|
|
79
85
|
*/
|
|
80
|
-
cancel(
|
|
81
|
-
|
|
86
|
+
cancel(
|
|
87
|
+
objectiveID: string,
|
|
88
|
+
params: ObjectiveCancelParams,
|
|
89
|
+
options?: RequestOptions,
|
|
90
|
+
): APIPromise<Objective> {
|
|
91
|
+
const { workspaceId, ...body } = params;
|
|
92
|
+
return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/cancel`, {
|
|
93
|
+
body,
|
|
94
|
+
...options,
|
|
95
|
+
});
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
/**
|
|
@@ -87,10 +101,14 @@ export class Objectives extends APIResource {
|
|
|
87
101
|
*/
|
|
88
102
|
compact(
|
|
89
103
|
objectiveID: string,
|
|
90
|
-
|
|
104
|
+
params: ObjectiveCompactParams,
|
|
91
105
|
options?: RequestOptions,
|
|
92
106
|
): APIPromise<ObjectiveCompactResponse> {
|
|
93
|
-
|
|
107
|
+
const { workspaceId, ...body } = params;
|
|
108
|
+
return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/compact`, {
|
|
109
|
+
body,
|
|
110
|
+
...options,
|
|
111
|
+
});
|
|
94
112
|
}
|
|
95
113
|
|
|
96
114
|
/**
|
|
@@ -98,10 +116,14 @@ export class Objectives extends APIResource {
|
|
|
98
116
|
*/
|
|
99
117
|
continue(
|
|
100
118
|
objectiveID: string,
|
|
101
|
-
|
|
119
|
+
params: ObjectiveContinueParams,
|
|
102
120
|
options?: RequestOptions,
|
|
103
121
|
): APIPromise<ObjectiveContinueResponse> {
|
|
104
|
-
|
|
122
|
+
const { workspaceId, ...body } = params;
|
|
123
|
+
return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/continue`, {
|
|
124
|
+
body,
|
|
125
|
+
...options,
|
|
126
|
+
});
|
|
105
127
|
}
|
|
106
128
|
|
|
107
129
|
/**
|
|
@@ -110,11 +132,12 @@ export class Objectives extends APIResource {
|
|
|
110
132
|
*/
|
|
111
133
|
listContextWindows(
|
|
112
134
|
objectiveID: string,
|
|
113
|
-
|
|
135
|
+
params: ObjectiveListContextWindowsParams,
|
|
114
136
|
options?: RequestOptions,
|
|
115
137
|
): PagePromise<ObjectiveContextWindowsCursorPagination, ObjectiveContextWindow> {
|
|
138
|
+
const { workspaceId, ...query } = params;
|
|
116
139
|
return this._client.getAPIList(
|
|
117
|
-
path`/v1/objectives/${objectiveID}/context_windows`,
|
|
140
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/context_windows`,
|
|
118
141
|
CursorPagination<ObjectiveContextWindow>,
|
|
119
142
|
{ query, ...options },
|
|
120
143
|
);
|
|
@@ -125,11 +148,12 @@ export class Objectives extends APIResource {
|
|
|
125
148
|
*/
|
|
126
149
|
listEvents(
|
|
127
150
|
objectiveID: string,
|
|
128
|
-
|
|
151
|
+
params: ObjectiveListEventsParams,
|
|
129
152
|
options?: RequestOptions,
|
|
130
153
|
): PagePromise<ObjectiveListEventsResponsesCursorPagination, ObjectiveListEventsResponse> {
|
|
154
|
+
const { workspaceId, ...query } = params;
|
|
131
155
|
return this._client.getAPIList(
|
|
132
|
-
path`/v1/objectives/${objectiveID}/events`,
|
|
156
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/events`,
|
|
133
157
|
CursorPagination<ObjectiveListEventsResponse>,
|
|
134
158
|
{ query, ...options },
|
|
135
159
|
);
|
|
@@ -752,6 +776,13 @@ export interface ObjectiveCreateParams {
|
|
|
752
776
|
variationId?: string;
|
|
753
777
|
}
|
|
754
778
|
|
|
779
|
+
export interface ObjectiveRetrieveParams {
|
|
780
|
+
/**
|
|
781
|
+
* Workspace ID (from path).
|
|
782
|
+
*/
|
|
783
|
+
workspaceId: string;
|
|
784
|
+
}
|
|
785
|
+
|
|
755
786
|
export interface ObjectiveListParams extends CursorPaginationParams {
|
|
756
787
|
/**
|
|
757
788
|
* Agent ID for filtering
|
|
@@ -796,34 +827,51 @@ export interface ObjectiveListParams extends CursorPaginationParams {
|
|
|
796
827
|
|
|
797
828
|
export interface ObjectiveCancelParams {
|
|
798
829
|
/**
|
|
799
|
-
*
|
|
830
|
+
* Path param: Workspace ID (from path).
|
|
831
|
+
*/
|
|
832
|
+
workspaceId: string;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Body param: Optional reason for cancellation
|
|
800
836
|
*/
|
|
801
837
|
reason?: string;
|
|
802
838
|
}
|
|
803
839
|
|
|
804
840
|
export interface ObjectiveCompactParams {
|
|
805
841
|
/**
|
|
806
|
-
*
|
|
807
|
-
|
|
842
|
+
* Path param: Workspace ID (from path).
|
|
843
|
+
*/
|
|
844
|
+
workspaceId: string;
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Body param: CompactionConfig defines how context window compaction behaves for
|
|
848
|
+
* objectives using this variation.
|
|
808
849
|
*/
|
|
809
850
|
compactionConfig?: VariationsAPI.AgentVariationSpecCompactionConfig;
|
|
810
851
|
}
|
|
811
852
|
|
|
812
853
|
export interface ObjectiveContinueParams {
|
|
813
854
|
/**
|
|
814
|
-
*
|
|
815
|
-
|
|
855
|
+
* Path param: Workspace ID (from path).
|
|
856
|
+
*/
|
|
857
|
+
workspaceId: string;
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Body param: When set to true, the message will be enqueued for when the agent
|
|
861
|
+
* loop is available to process it.
|
|
816
862
|
*/
|
|
817
863
|
enqueue?: boolean;
|
|
818
864
|
|
|
819
865
|
/**
|
|
820
|
-
* The message to continue an objective that has completed (or you are
|
|
866
|
+
* Body param: The message to continue an objective that has completed (or you are
|
|
867
|
+
* enqueing)
|
|
821
868
|
*/
|
|
822
869
|
message?: string;
|
|
823
870
|
|
|
824
871
|
/**
|
|
825
|
-
* Secrets that should be included with the message. Helpful for when
|
|
826
|
-
* update secrets on the objective (IE: A secret expires and needs to
|
|
872
|
+
* Body param: Secrets that should be included with the message. Helpful for when
|
|
873
|
+
* you need to update secrets on the objective (IE: A secret expires and needs to
|
|
874
|
+
* be refreshed)
|
|
827
875
|
*/
|
|
828
876
|
secrets?: Array<ObjectiveContinueParams.Secret>;
|
|
829
877
|
}
|
|
@@ -838,24 +886,34 @@ export namespace ObjectiveContinueParams {
|
|
|
838
886
|
|
|
839
887
|
export interface ObjectiveListContextWindowsParams extends CursorPaginationParams {
|
|
840
888
|
/**
|
|
841
|
-
*
|
|
889
|
+
* Path param: Workspace ID (from path).
|
|
890
|
+
*/
|
|
891
|
+
workspaceId: string;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
842
895
|
*/
|
|
843
896
|
includeInfo?: boolean;
|
|
844
897
|
}
|
|
845
898
|
|
|
846
899
|
export interface ObjectiveListEventsParams extends CursorPaginationParams {
|
|
847
900
|
/**
|
|
848
|
-
*
|
|
901
|
+
* Path param: Workspace ID (from path).
|
|
902
|
+
*/
|
|
903
|
+
workspaceId: string;
|
|
904
|
+
|
|
905
|
+
/**
|
|
906
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
849
907
|
*/
|
|
850
908
|
includeInfo?: boolean;
|
|
851
909
|
|
|
852
910
|
/**
|
|
853
|
-
* Sort order for results (asc or desc by creation time)
|
|
911
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
854
912
|
*/
|
|
855
913
|
sortOrder?: string;
|
|
856
914
|
|
|
857
915
|
/**
|
|
858
|
-
* Optional context window ID to filter events by
|
|
916
|
+
* Query param: Optional context window ID to filter events by
|
|
859
917
|
*/
|
|
860
918
|
windowId?: string;
|
|
861
919
|
}
|
|
@@ -899,6 +957,7 @@ export declare namespace Objectives {
|
|
|
899
957
|
type ObjectiveContextWindowsCursorPagination as ObjectiveContextWindowsCursorPagination,
|
|
900
958
|
type ObjectiveListEventsResponsesCursorPagination as ObjectiveListEventsResponsesCursorPagination,
|
|
901
959
|
type ObjectiveCreateParams as ObjectiveCreateParams,
|
|
960
|
+
type ObjectiveRetrieveParams as ObjectiveRetrieveParams,
|
|
902
961
|
type ObjectiveListParams as ObjectiveListParams,
|
|
903
962
|
type ObjectiveCancelParams as ObjectiveCancelParams,
|
|
904
963
|
type ObjectiveCompactParams as ObjectiveCompactParams,
|
|
@@ -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,11 @@ export interface ObjectiveTaskData {
|
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
export interface TaskRetrieveParams {
|
|
82
|
+
/**
|
|
83
|
+
* Workspace ID (from path).
|
|
84
|
+
*/
|
|
85
|
+
workspaceId: string;
|
|
86
|
+
|
|
78
87
|
/**
|
|
79
88
|
* The ID of the objective. Supports "external_id:" prefix for external IDs.
|
|
80
89
|
*/
|
|
@@ -83,7 +92,12 @@ export interface TaskRetrieveParams {
|
|
|
83
92
|
|
|
84
93
|
export interface TaskListParams extends CursorPaginationParams {
|
|
85
94
|
/**
|
|
86
|
-
*
|
|
95
|
+
* Path param: Workspace ID (from path).
|
|
96
|
+
*/
|
|
97
|
+
workspaceId: string;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Query param: Sort order for results
|
|
87
101
|
*/
|
|
88
102
|
sortOrder?: string;
|
|
89
103
|
}
|
|
@@ -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
|
|
|
@@ -144,12 +145,17 @@ export interface ObjectiveToolCallInfo {
|
|
|
144
145
|
|
|
145
146
|
export interface ToolCallListParams extends CursorPaginationParams {
|
|
146
147
|
/**
|
|
147
|
-
*
|
|
148
|
+
* Path param: Workspace ID (from path).
|
|
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,11 @@ export interface ToolCallListParams extends CursorPaginationParams {
|
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
export interface ToolCallApproveParams {
|
|
169
|
+
/**
|
|
170
|
+
* Workspace ID (from path).
|
|
171
|
+
*/
|
|
172
|
+
workspaceId: string;
|
|
173
|
+
|
|
163
174
|
/**
|
|
164
175
|
* The ID of the objective. Supports "external_id:" prefix for external IDs.
|
|
165
176
|
*/
|
|
@@ -167,6 +178,11 @@ export interface ToolCallApproveParams {
|
|
|
167
178
|
}
|
|
168
179
|
|
|
169
180
|
export interface ToolCallDenyParams {
|
|
181
|
+
/**
|
|
182
|
+
* Path param: Workspace ID (from path).
|
|
183
|
+
*/
|
|
184
|
+
workspaceId: string;
|
|
185
|
+
|
|
170
186
|
/**
|
|
171
187
|
* Path param: The ID of the objective. Supports "external_id:" prefix for external
|
|
172
188
|
* 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: Workspace ID (from path).
|
|
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,
|
|
@@ -43,39 +43,46 @@ export class ToolSets extends APIResource {
|
|
|
43
43
|
/**
|
|
44
44
|
* Creates a new tool set in the workspace
|
|
45
45
|
*/
|
|
46
|
-
create(body: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
47
|
-
return this._client.post(
|
|
46
|
+
create(workspaceID: string, body: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
47
|
+
return this._client.post(path`/v1/workspaces/${workspaceID}/tool_sets`, { body, ...options });
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Retrieves a tool set by ID from the workspace
|
|
52
52
|
*/
|
|
53
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<ToolSet> {
|
|
54
|
-
|
|
53
|
+
retrieve(id: string, params: ToolSetRetrieveParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
54
|
+
const { workspaceId } = params;
|
|
55
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, options);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* Updates a tool set in the workspace
|
|
59
60
|
*/
|
|
60
|
-
update(id: string,
|
|
61
|
-
|
|
61
|
+
update(id: string, params: ToolSetUpdateParams, options?: RequestOptions): APIPromise<ToolSet> {
|
|
62
|
+
const { workspaceId, ...body } = params;
|
|
63
|
+
return this._client.put(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, { body, ...options });
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
/**
|
|
65
67
|
* Lists all tool sets in the workspace
|
|
66
68
|
*/
|
|
67
69
|
list(
|
|
70
|
+
workspaceID: string,
|
|
68
71
|
query: ToolSetListParams | null | undefined = {},
|
|
69
72
|
options?: RequestOptions,
|
|
70
73
|
): PagePromise<ToolSetsCursorPagination, ToolSet> {
|
|
71
|
-
return this._client.getAPIList(
|
|
74
|
+
return this._client.getAPIList(path`/v1/workspaces/${workspaceID}/tool_sets`, CursorPagination<ToolSet>, {
|
|
75
|
+
query,
|
|
76
|
+
...options,
|
|
77
|
+
});
|
|
72
78
|
}
|
|
73
79
|
|
|
74
80
|
/**
|
|
75
81
|
* Deletes a tool set in the workspace
|
|
76
82
|
*/
|
|
77
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
78
|
-
|
|
83
|
+
delete(id: string, params: ToolSetDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
84
|
+
const { workspaceId } = params;
|
|
85
|
+
return this._client.delete(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, {
|
|
79
86
|
...options,
|
|
80
87
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
81
88
|
});
|
|
@@ -86,13 +93,15 @@ export class ToolSets extends APIResource {
|
|
|
86
93
|
*/
|
|
87
94
|
listEvents(
|
|
88
95
|
toolSetID: string,
|
|
89
|
-
|
|
96
|
+
params: ToolSetListEventsParams,
|
|
90
97
|
options?: RequestOptions,
|
|
91
98
|
): PagePromise<ToolSetEventsCursorPagination, ToolSetEvent> {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
const { workspaceId, ...query } = params;
|
|
100
|
+
return this._client.getAPIList(
|
|
101
|
+
path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/events`,
|
|
102
|
+
CursorPagination<ToolSetEvent>,
|
|
103
|
+
{ query, ...options },
|
|
104
|
+
);
|
|
96
105
|
}
|
|
97
106
|
}
|
|
98
107
|
|
|
@@ -346,16 +355,35 @@ export interface ToolSetCreateParams {
|
|
|
346
355
|
spec: ToolSetSpec;
|
|
347
356
|
}
|
|
348
357
|
|
|
358
|
+
export interface ToolSetRetrieveParams {
|
|
359
|
+
/**
|
|
360
|
+
* Workspace ID (from path).
|
|
361
|
+
*/
|
|
362
|
+
workspaceId: string;
|
|
363
|
+
}
|
|
364
|
+
|
|
349
365
|
export interface ToolSetUpdateParams {
|
|
350
366
|
/**
|
|
351
|
-
*
|
|
352
|
-
|
|
353
|
-
|
|
367
|
+
* Path param: Workspace ID (from path).
|
|
368
|
+
*/
|
|
369
|
+
workspaceId: string;
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
373
|
+
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
374
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
375
|
+
* server.
|
|
354
376
|
*/
|
|
355
377
|
metadata?: Shared.UpdateResourceMetadata;
|
|
356
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Body param
|
|
381
|
+
*/
|
|
357
382
|
spec?: ToolSetSpec;
|
|
358
383
|
|
|
384
|
+
/**
|
|
385
|
+
* Body param
|
|
386
|
+
*/
|
|
359
387
|
updateMask?: string;
|
|
360
388
|
}
|
|
361
389
|
|
|
@@ -386,14 +414,26 @@ export interface ToolSetListParams extends CursorPaginationParams {
|
|
|
386
414
|
sortOrder?: string;
|
|
387
415
|
}
|
|
388
416
|
|
|
417
|
+
export interface ToolSetDeleteParams {
|
|
418
|
+
/**
|
|
419
|
+
* Workspace ID (from path).
|
|
420
|
+
*/
|
|
421
|
+
workspaceId: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
389
424
|
export interface ToolSetListEventsParams extends CursorPaginationParams {
|
|
390
425
|
/**
|
|
391
|
-
*
|
|
426
|
+
* Path param: Workspace ID (from path).
|
|
427
|
+
*/
|
|
428
|
+
workspaceId: string;
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
392
432
|
*/
|
|
393
433
|
includeInfo?: boolean;
|
|
394
434
|
|
|
395
435
|
/**
|
|
396
|
-
* Sort order for results (asc or desc by creation time)
|
|
436
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
397
437
|
*/
|
|
398
438
|
sortOrder?: string;
|
|
399
439
|
}
|
|
@@ -417,8 +457,10 @@ export declare namespace ToolSets {
|
|
|
417
457
|
type ToolSetsCursorPagination as ToolSetsCursorPagination,
|
|
418
458
|
type ToolSetEventsCursorPagination as ToolSetEventsCursorPagination,
|
|
419
459
|
type ToolSetCreateParams as ToolSetCreateParams,
|
|
460
|
+
type ToolSetRetrieveParams as ToolSetRetrieveParams,
|
|
420
461
|
type ToolSetUpdateParams as ToolSetUpdateParams,
|
|
421
462
|
type ToolSetListParams as ToolSetListParams,
|
|
463
|
+
type ToolSetDeleteParams as ToolSetDeleteParams,
|
|
422
464
|
type ToolSetListEventsParams as ToolSetListEventsParams,
|
|
423
465
|
};
|
|
424
466
|
|