@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
package/src/resources/index.ts
CHANGED
|
@@ -7,8 +7,11 @@ export {
|
|
|
7
7
|
type APIKeyInfo,
|
|
8
8
|
type APIKeySpec,
|
|
9
9
|
type APIKeyCreateParams,
|
|
10
|
+
type APIKeyRetrieveParams,
|
|
10
11
|
type APIKeyUpdateParams,
|
|
11
12
|
type APIKeyListParams,
|
|
13
|
+
type APIKeyDeleteParams,
|
|
14
|
+
type APIKeyRotateParams,
|
|
12
15
|
type APIKeysCursorPagination,
|
|
13
16
|
} from './api-keys';
|
|
14
17
|
export {
|
|
@@ -26,8 +29,10 @@ export {
|
|
|
26
29
|
type AgentSpec,
|
|
27
30
|
type Page,
|
|
28
31
|
type AgentCreateParams,
|
|
32
|
+
type AgentRetrieveParams,
|
|
29
33
|
type AgentUpdateParams,
|
|
30
34
|
type AgentListParams,
|
|
35
|
+
type AgentDeleteParams,
|
|
31
36
|
type AgentsCursorPagination,
|
|
32
37
|
} from './agents/agents';
|
|
33
38
|
export {
|
|
@@ -45,6 +50,7 @@ export {
|
|
|
45
50
|
type ToolSetEntry,
|
|
46
51
|
type VariationAssignmentEntry,
|
|
47
52
|
type VariationMemoryLayerEntry,
|
|
53
|
+
type BulkWorkspaceResourceRetrieveParams,
|
|
48
54
|
type BulkWorkspaceResourceListParams,
|
|
49
55
|
type BulkWorkspaceResourceApplyParams,
|
|
50
56
|
type BulkWorkspaceAppliesCursorPagination,
|
|
@@ -55,14 +61,17 @@ export {
|
|
|
55
61
|
type MemoryLayerInfo,
|
|
56
62
|
type MemoryLayerSpec,
|
|
57
63
|
type MemoryLayerCreateParams,
|
|
64
|
+
type MemoryLayerRetrieveParams,
|
|
58
65
|
type MemoryLayerUpdateParams,
|
|
59
66
|
type MemoryLayerListParams,
|
|
67
|
+
type MemoryLayerDeleteParams,
|
|
60
68
|
type MemoryLayersCursorPagination,
|
|
61
69
|
} from './memory-layers/memory-layers';
|
|
62
70
|
export {
|
|
63
71
|
Models,
|
|
64
72
|
type Model,
|
|
65
73
|
type ModelSpec,
|
|
74
|
+
type ModelRetrieveParams,
|
|
66
75
|
type ModelListParams,
|
|
67
76
|
type ModelSetStatusParams,
|
|
68
77
|
type ModelsCursorPagination,
|
|
@@ -98,6 +107,7 @@ export {
|
|
|
98
107
|
type ObjectiveContinueResponse,
|
|
99
108
|
type ObjectiveListEventsResponse,
|
|
100
109
|
type ObjectiveCreateParams,
|
|
110
|
+
type ObjectiveRetrieveParams,
|
|
101
111
|
type ObjectiveListParams,
|
|
102
112
|
type ObjectiveCancelParams,
|
|
103
113
|
type ObjectiveCompactParams,
|
|
@@ -128,13 +138,22 @@ export {
|
|
|
128
138
|
type ToolSetInfo,
|
|
129
139
|
type ToolSetSpec,
|
|
130
140
|
type ToolSetCreateParams,
|
|
141
|
+
type ToolSetRetrieveParams,
|
|
131
142
|
type ToolSetUpdateParams,
|
|
132
143
|
type ToolSetListParams,
|
|
144
|
+
type ToolSetDeleteParams,
|
|
133
145
|
type ToolSetListEventsParams,
|
|
134
146
|
type ToolSetsCursorPagination,
|
|
135
147
|
type ToolSetEventsCursorPagination,
|
|
136
148
|
} from './tool-sets/tool-sets';
|
|
137
|
-
export {
|
|
149
|
+
export {
|
|
150
|
+
Uploads,
|
|
151
|
+
type Upload,
|
|
152
|
+
type UploadInfo,
|
|
153
|
+
type UploadSpec,
|
|
154
|
+
type UploadCreateParams,
|
|
155
|
+
type UploadRetrieveParams,
|
|
156
|
+
} from './uploads';
|
|
138
157
|
export { Webhooks, type UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent } from './webhooks';
|
|
139
158
|
export {
|
|
140
159
|
WorkspaceSecrets,
|
|
@@ -142,8 +161,10 @@ export {
|
|
|
142
161
|
type WorkspaceSecretInfo,
|
|
143
162
|
type WorkspaceSecretSpec,
|
|
144
163
|
type WorkspaceSecretCreateParams,
|
|
164
|
+
type WorkspaceSecretRetrieveParams,
|
|
145
165
|
type WorkspaceSecretUpdateParams,
|
|
146
166
|
type WorkspaceSecretListParams,
|
|
167
|
+
type WorkspaceSecretDeleteParams,
|
|
147
168
|
type WorkspaceSecretsCursorPagination,
|
|
148
169
|
} from './workspace-secrets';
|
|
149
170
|
export {
|
|
@@ -28,10 +28,14 @@ export class Entries extends APIResource {
|
|
|
28
28
|
*/
|
|
29
29
|
create(
|
|
30
30
|
memoryLayerID: string,
|
|
31
|
-
|
|
31
|
+
params: EntryCreateParams,
|
|
32
32
|
options?: RequestOptions,
|
|
33
33
|
): APIPromise<MemoryEntryDetail> {
|
|
34
|
-
|
|
34
|
+
const { workspaceId, ...body } = params;
|
|
35
|
+
return this._client.post(path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`, {
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
/**
|
|
@@ -39,8 +43,11 @@ export class Entries extends APIResource {
|
|
|
39
43
|
* including the content body.
|
|
40
44
|
*/
|
|
41
45
|
retrieve(id: string, params: EntryRetrieveParams, options?: RequestOptions): APIPromise<MemoryEntryDetail> {
|
|
42
|
-
const { memoryLayerId } = params;
|
|
43
|
-
return this._client.get(
|
|
46
|
+
const { workspaceId, memoryLayerId } = params;
|
|
47
|
+
return this._client.get(
|
|
48
|
+
path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`,
|
|
49
|
+
options,
|
|
50
|
+
);
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
/**
|
|
@@ -48,8 +55,11 @@ export class Entries extends APIResource {
|
|
|
48
55
|
* resolved content body.
|
|
49
56
|
*/
|
|
50
57
|
update(id: string, params: EntryUpdateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail> {
|
|
51
|
-
const { memoryLayerId, ...body } = params;
|
|
52
|
-
return this._client.patch(
|
|
58
|
+
const { workspaceId, memoryLayerId, ...body } = params;
|
|
59
|
+
return this._client.patch(
|
|
60
|
+
path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`,
|
|
61
|
+
{ body, ...options },
|
|
62
|
+
);
|
|
53
63
|
}
|
|
54
64
|
|
|
55
65
|
/**
|
|
@@ -57,11 +67,12 @@ export class Entries extends APIResource {
|
|
|
57
67
|
*/
|
|
58
68
|
list(
|
|
59
69
|
memoryLayerID: string,
|
|
60
|
-
|
|
70
|
+
params: EntryListParams,
|
|
61
71
|
options?: RequestOptions,
|
|
62
72
|
): PagePromise<MemoryEntriesCursorPagination, MemoryEntry> {
|
|
73
|
+
const { workspaceId, ...query } = params;
|
|
63
74
|
return this._client.getAPIList(
|
|
64
|
-
path`/v1/memory_layers/${memoryLayerID}/entries`,
|
|
75
|
+
path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`,
|
|
65
76
|
CursorPagination<MemoryEntry>,
|
|
66
77
|
{ query, ...options },
|
|
67
78
|
);
|
|
@@ -71,11 +82,11 @@ export class Entries extends APIResource {
|
|
|
71
82
|
* Deletes a memory entry from a memory layer
|
|
72
83
|
*/
|
|
73
84
|
delete(id: string, params: EntryDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
74
|
-
const { memoryLayerId } = params;
|
|
75
|
-
return this._client.delete(
|
|
76
|
-
|
|
77
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
78
|
-
|
|
85
|
+
const { workspaceId, memoryLayerId } = params;
|
|
86
|
+
return this._client.delete(
|
|
87
|
+
path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`,
|
|
88
|
+
{ ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
|
|
89
|
+
);
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
|
|
@@ -229,21 +240,32 @@ export interface MemoryEntryUpdateSpec {
|
|
|
229
240
|
|
|
230
241
|
export interface EntryCreateParams {
|
|
231
242
|
/**
|
|
232
|
-
*
|
|
233
|
-
|
|
234
|
-
|
|
243
|
+
* Path param: Workspace ID (from path).
|
|
244
|
+
*/
|
|
245
|
+
workspaceId: string;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Body param: CreateResourceMetadata contains the user-provided fields for
|
|
249
|
+
* creating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
250
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
251
|
+
* server.
|
|
235
252
|
*/
|
|
236
253
|
metadata: Shared.CreateResourceMetadata;
|
|
237
254
|
|
|
238
255
|
/**
|
|
239
|
-
* MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It
|
|
240
|
-
* either inline content or a reference to a completed Upload; exactly one
|
|
241
|
-
* two must be set.
|
|
256
|
+
* Body param: MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It
|
|
257
|
+
* accepts either inline content or a reference to a completed Upload; exactly one
|
|
258
|
+
* of the two must be set.
|
|
242
259
|
*/
|
|
243
260
|
spec: MemoryEntryCreateSpec;
|
|
244
261
|
}
|
|
245
262
|
|
|
246
263
|
export interface EntryRetrieveParams {
|
|
264
|
+
/**
|
|
265
|
+
* Workspace ID (from path).
|
|
266
|
+
*/
|
|
267
|
+
workspaceId: string;
|
|
268
|
+
|
|
247
269
|
/**
|
|
248
270
|
* Memory layer ID (from path). Accepts canonical memlyr\_… form or
|
|
249
271
|
* external_id:<value> form (see common.proto "Path-parameter ID resolution").
|
|
@@ -252,6 +274,11 @@ export interface EntryRetrieveParams {
|
|
|
252
274
|
}
|
|
253
275
|
|
|
254
276
|
export interface EntryUpdateParams {
|
|
277
|
+
/**
|
|
278
|
+
* Path param: Workspace ID (from path).
|
|
279
|
+
*/
|
|
280
|
+
workspaceId: string;
|
|
281
|
+
|
|
255
282
|
/**
|
|
256
283
|
* Path param: Memory layer ID (from path). Accepts canonical memlyr\_… form or
|
|
257
284
|
* external_id:<value> form (see common.proto "Path-parameter ID resolution").
|
|
@@ -282,33 +309,43 @@ export interface EntryUpdateParams {
|
|
|
282
309
|
|
|
283
310
|
export interface EntryListParams extends CursorPaginationParams {
|
|
284
311
|
/**
|
|
285
|
-
*
|
|
312
|
+
* Path param: Workspace ID (from path).
|
|
313
|
+
*/
|
|
314
|
+
workspaceId: string;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Query param: Filter by bundle_key — return only resources owned by this bundle.
|
|
286
318
|
*/
|
|
287
319
|
bundleKey?: string;
|
|
288
320
|
|
|
289
321
|
/**
|
|
290
|
-
* When set to true you may use more of your alloted API rate-limit
|
|
322
|
+
* Query param: When set to true you may use more of your alloted API rate-limit
|
|
291
323
|
*/
|
|
292
324
|
includeInfo?: boolean;
|
|
293
325
|
|
|
294
326
|
/**
|
|
295
|
-
* Filter by key prefix (e.g., "skills/postmortem/" to list all
|
|
296
|
-
* hierarchy). Matches against the entry's key, not its name.
|
|
327
|
+
* Query param: Filter by key prefix (e.g., "skills/postmortem/" to list all
|
|
328
|
+
* entries under that hierarchy). Matches against the entry's key, not its name.
|
|
297
329
|
*/
|
|
298
330
|
prefix?: string;
|
|
299
331
|
|
|
300
332
|
/**
|
|
301
|
-
* Free-form search query
|
|
333
|
+
* Query param: Free-form search query
|
|
302
334
|
*/
|
|
303
335
|
query?: string;
|
|
304
336
|
|
|
305
337
|
/**
|
|
306
|
-
* Sort order for results (asc or desc by creation time)
|
|
338
|
+
* Query param: Sort order for results (asc or desc by creation time)
|
|
307
339
|
*/
|
|
308
340
|
sortOrder?: string;
|
|
309
341
|
}
|
|
310
342
|
|
|
311
343
|
export interface EntryDeleteParams {
|
|
344
|
+
/**
|
|
345
|
+
* Workspace ID (from path).
|
|
346
|
+
*/
|
|
347
|
+
workspaceId: string;
|
|
348
|
+
|
|
312
349
|
/**
|
|
313
350
|
* Memory layer ID (from path). Accepts canonical memlyr\_… form or
|
|
314
351
|
* external_id:<value> form (see common.proto "Path-parameter ID resolution").
|
|
@@ -21,7 +21,9 @@ export {
|
|
|
21
21
|
type MemoryLayerInfo,
|
|
22
22
|
type MemoryLayerSpec,
|
|
23
23
|
type MemoryLayerCreateParams,
|
|
24
|
+
type MemoryLayerRetrieveParams,
|
|
24
25
|
type MemoryLayerUpdateParams,
|
|
25
26
|
type MemoryLayerListParams,
|
|
27
|
+
type MemoryLayerDeleteParams,
|
|
26
28
|
type MemoryLayersCursorPagination,
|
|
27
29
|
} from './memory-layers';
|
|
@@ -43,39 +43,51 @@ export class MemoryLayers extends APIResource {
|
|
|
43
43
|
/**
|
|
44
44
|
* Creates a new memory layer in the workspace
|
|
45
45
|
*/
|
|
46
|
-
create(
|
|
47
|
-
|
|
46
|
+
create(
|
|
47
|
+
workspaceID: string,
|
|
48
|
+
body: MemoryLayerCreateParams,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<MemoryLayer> {
|
|
51
|
+
return this._client.post(path`/v1/workspaces/${workspaceID}/memory_layers`, { body, ...options });
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
/**
|
|
51
55
|
* Retrieves a memory layer by ID from the workspace
|
|
52
56
|
*/
|
|
53
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<MemoryLayer> {
|
|
54
|
-
|
|
57
|
+
retrieve(id: string, params: MemoryLayerRetrieveParams, options?: RequestOptions): APIPromise<MemoryLayer> {
|
|
58
|
+
const { workspaceId } = params;
|
|
59
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/memory_layers/${id}`, options);
|
|
55
60
|
}
|
|
56
61
|
|
|
57
62
|
/**
|
|
58
63
|
* Updates a memory layer in the workspace
|
|
59
64
|
*/
|
|
60
|
-
update(id: string,
|
|
61
|
-
|
|
65
|
+
update(id: string, params: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
|
|
66
|
+
const { workspaceId, ...body } = params;
|
|
67
|
+
return this._client.patch(path`/v1/workspaces/${workspaceId}/memory_layers/${id}`, { body, ...options });
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
/**
|
|
65
71
|
* Lists all memory layers in the workspace
|
|
66
72
|
*/
|
|
67
73
|
list(
|
|
74
|
+
workspaceID: string,
|
|
68
75
|
query: MemoryLayerListParams | null | undefined = {},
|
|
69
76
|
options?: RequestOptions,
|
|
70
77
|
): PagePromise<MemoryLayersCursorPagination, MemoryLayer> {
|
|
71
|
-
return this._client.getAPIList(
|
|
78
|
+
return this._client.getAPIList(
|
|
79
|
+
path`/v1/workspaces/${workspaceID}/memory_layers`,
|
|
80
|
+
CursorPagination<MemoryLayer>,
|
|
81
|
+
{ query, ...options },
|
|
82
|
+
);
|
|
72
83
|
}
|
|
73
84
|
|
|
74
85
|
/**
|
|
75
86
|
* Deletes a memory layer from the workspace
|
|
76
87
|
*/
|
|
77
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
78
|
-
|
|
88
|
+
delete(id: string, params: MemoryLayerDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
89
|
+
const { workspaceId } = params;
|
|
90
|
+
return this._client.delete(path`/v1/workspaces/${workspaceId}/memory_layers/${id}`, {
|
|
79
91
|
...options,
|
|
80
92
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
81
93
|
});
|
|
@@ -158,16 +170,35 @@ export interface MemoryLayerCreateParams {
|
|
|
158
170
|
spec: MemoryLayerSpec;
|
|
159
171
|
}
|
|
160
172
|
|
|
173
|
+
export interface MemoryLayerRetrieveParams {
|
|
174
|
+
/**
|
|
175
|
+
* Workspace ID (from path).
|
|
176
|
+
*/
|
|
177
|
+
workspaceId: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
161
180
|
export interface MemoryLayerUpdateParams {
|
|
162
181
|
/**
|
|
163
|
-
*
|
|
164
|
-
|
|
165
|
-
|
|
182
|
+
* Path param: Workspace ID (from path).
|
|
183
|
+
*/
|
|
184
|
+
workspaceId: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Body param: UpdateResourceMetadata contains the user-provided fields for
|
|
188
|
+
* updating a workspace-scoped resource. Read-only fields (id, account_id,
|
|
189
|
+
* workspace_id, profile_id, created_at) are excluded since they are set by the
|
|
190
|
+
* server.
|
|
166
191
|
*/
|
|
167
192
|
metadata?: Shared.UpdateResourceMetadata;
|
|
168
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Body param
|
|
196
|
+
*/
|
|
169
197
|
spec?: MemoryLayerSpec;
|
|
170
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Body param
|
|
201
|
+
*/
|
|
171
202
|
updateMask?: string;
|
|
172
203
|
}
|
|
173
204
|
|
|
@@ -203,6 +234,13 @@ export interface MemoryLayerListParams extends CursorPaginationParams {
|
|
|
203
234
|
type?: 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
|
|
204
235
|
}
|
|
205
236
|
|
|
237
|
+
export interface MemoryLayerDeleteParams {
|
|
238
|
+
/**
|
|
239
|
+
* Workspace ID (from path).
|
|
240
|
+
*/
|
|
241
|
+
workspaceId: string;
|
|
242
|
+
}
|
|
243
|
+
|
|
206
244
|
MemoryLayers.Entries = Entries;
|
|
207
245
|
|
|
208
246
|
export declare namespace MemoryLayers {
|
|
@@ -212,8 +250,10 @@ export declare namespace MemoryLayers {
|
|
|
212
250
|
type MemoryLayerSpec as MemoryLayerSpec,
|
|
213
251
|
type MemoryLayersCursorPagination as MemoryLayersCursorPagination,
|
|
214
252
|
type MemoryLayerCreateParams as MemoryLayerCreateParams,
|
|
253
|
+
type MemoryLayerRetrieveParams as MemoryLayerRetrieveParams,
|
|
215
254
|
type MemoryLayerUpdateParams as MemoryLayerUpdateParams,
|
|
216
255
|
type MemoryLayerListParams as MemoryLayerListParams,
|
|
256
|
+
type MemoryLayerDeleteParams as MemoryLayerDeleteParams,
|
|
217
257
|
};
|
|
218
258
|
|
|
219
259
|
export {
|
package/src/resources/models.ts
CHANGED
|
@@ -20,25 +20,31 @@ export class Models extends APIResource {
|
|
|
20
20
|
/**
|
|
21
21
|
* Retrieves a model by ID from the workspace
|
|
22
22
|
*/
|
|
23
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<Model> {
|
|
24
|
-
|
|
23
|
+
retrieve(id: string, params: ModelRetrieveParams, options?: RequestOptions): APIPromise<Model> {
|
|
24
|
+
const { workspaceId } = params;
|
|
25
|
+
return this._client.get(path`/v1/workspaces/${workspaceId}/models/${id}`, options);
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* Lists all models in the workspace
|
|
29
30
|
*/
|
|
30
31
|
list(
|
|
32
|
+
workspaceID: string,
|
|
31
33
|
query: ModelListParams | null | undefined = {},
|
|
32
34
|
options?: RequestOptions,
|
|
33
35
|
): PagePromise<ModelsCursorPagination, Model> {
|
|
34
|
-
return this._client.getAPIList(
|
|
36
|
+
return this._client.getAPIList(path`/v1/workspaces/${workspaceID}/models`, CursorPagination<Model>, {
|
|
37
|
+
query,
|
|
38
|
+
...options,
|
|
39
|
+
});
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
/**
|
|
38
43
|
* Enables or disables a model in the workspace
|
|
39
44
|
*/
|
|
40
|
-
setStatus(id: string,
|
|
41
|
-
|
|
45
|
+
setStatus(id: string, params: ModelSetStatusParams, options?: RequestOptions): APIPromise<Model> {
|
|
46
|
+
const { workspaceId, ...body } = params;
|
|
47
|
+
return this._client.put(path`/v1/workspaces/${workspaceId}/models/${id}/status`, { body, ...options });
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
|
|
@@ -93,6 +99,13 @@ export interface ModelSpec {
|
|
|
93
99
|
status?: 'MODEL_STATUS_UNSPECIFIED' | 'MODEL_STATUS_ENABLED' | 'MODEL_STATUS_DISABLED';
|
|
94
100
|
}
|
|
95
101
|
|
|
102
|
+
export interface ModelRetrieveParams {
|
|
103
|
+
/**
|
|
104
|
+
* Workspace ID (from path).
|
|
105
|
+
*/
|
|
106
|
+
workspaceId: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
96
109
|
export interface ModelListParams extends CursorPaginationParams {
|
|
97
110
|
/**
|
|
98
111
|
* Filter by bundle_key — return only resources owned by this bundle.
|
|
@@ -122,7 +135,12 @@ export interface ModelListParams extends CursorPaginationParams {
|
|
|
122
135
|
|
|
123
136
|
export interface ModelSetStatusParams {
|
|
124
137
|
/**
|
|
125
|
-
*
|
|
138
|
+
* Path param: Workspace ID (from path).
|
|
139
|
+
*/
|
|
140
|
+
workspaceId: string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Body param: The new status for the model
|
|
126
144
|
*/
|
|
127
145
|
status?: 'MODEL_STATUS_UNSPECIFIED' | 'MODEL_STATUS_ENABLED' | 'MODEL_STATUS_DISABLED';
|
|
128
146
|
}
|
|
@@ -132,6 +150,7 @@ export declare namespace Models {
|
|
|
132
150
|
type Model as Model,
|
|
133
151
|
type ModelSpec as ModelSpec,
|
|
134
152
|
type ModelsCursorPagination as ModelsCursorPagination,
|
|
153
|
+
type ModelRetrieveParams as ModelRetrieveParams,
|
|
135
154
|
type ModelListParams as ModelListParams,
|
|
136
155
|
type ModelSetStatusParams as ModelSetStatusParams,
|
|
137
156
|
};
|
|
@@ -15,10 +15,14 @@ export class Feedback extends APIResource {
|
|
|
15
15
|
*/
|
|
16
16
|
create(
|
|
17
17
|
objectiveID: string,
|
|
18
|
-
|
|
18
|
+
params: FeedbackCreateParams,
|
|
19
19
|
options?: RequestOptions,
|
|
20
20
|
): APIPromise<ObjectiveFeedback> {
|
|
21
|
-
|
|
21
|
+
const { workspaceId, ...body } = params;
|
|
22
|
+
return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/feedback`, {
|
|
23
|
+
body,
|
|
24
|
+
...options,
|
|
25
|
+
});
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
/**
|
|
@@ -26,11 +30,12 @@ export class Feedback extends APIResource {
|
|
|
26
30
|
*/
|
|
27
31
|
list(
|
|
28
32
|
objectiveID: string,
|
|
29
|
-
|
|
33
|
+
params: FeedbackListParams,
|
|
30
34
|
options?: RequestOptions,
|
|
31
35
|
): PagePromise<ObjectiveFeedbacksCursorPagination, ObjectiveFeedback> {
|
|
36
|
+
const { workspaceId, ...query } = params;
|
|
32
37
|
return this._client.getAPIList(
|
|
33
|
-
path`/v1/objectives/${objectiveID}/feedback`,
|
|
38
|
+
path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/feedback`,
|
|
34
39
|
CursorPagination<ObjectiveFeedback>,
|
|
35
40
|
{ query, ...options },
|
|
36
41
|
);
|
|
@@ -100,17 +105,30 @@ export interface ObjectiveFeedbackInfo {
|
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
export interface FeedbackCreateParams {
|
|
108
|
+
/**
|
|
109
|
+
* Path param: Workspace ID (from path).
|
|
110
|
+
*/
|
|
111
|
+
workspaceId: string;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Body param
|
|
115
|
+
*/
|
|
103
116
|
data: ObjectiveFeedbackData;
|
|
104
117
|
|
|
105
118
|
/**
|
|
106
|
-
* CreateOperationMetadata contains the user-provided fields for
|
|
107
|
-
* operation. Read-only fields (id, account_id, workspace_id,
|
|
108
|
-
* profile_id) are excluded since they are set by the server.
|
|
119
|
+
* Body param: CreateOperationMetadata contains the user-provided fields for
|
|
120
|
+
* creating an operation. Read-only fields (id, account_id, workspace_id,
|
|
121
|
+
* created_at, profile_id) are excluded since they are set by the server.
|
|
109
122
|
*/
|
|
110
123
|
metadata: Shared.CreateOperationMetadata;
|
|
111
124
|
}
|
|
112
125
|
|
|
113
|
-
export interface FeedbackListParams extends CursorPaginationParams {
|
|
126
|
+
export interface FeedbackListParams extends CursorPaginationParams {
|
|
127
|
+
/**
|
|
128
|
+
* Path param: Workspace ID (from path).
|
|
129
|
+
*/
|
|
130
|
+
workspaceId: string;
|
|
131
|
+
}
|
|
114
132
|
|
|
115
133
|
export declare namespace Feedback {
|
|
116
134
|
export {
|