@cadenya/cadenya 0.66.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.
Files changed (247) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +18 -18
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +18 -18
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/agents/agents.d.mts +28 -11
  11. package/resources/agents/agents.d.mts.map +1 -1
  12. package/resources/agents/agents.d.ts +28 -11
  13. package/resources/agents/agents.d.ts.map +1 -1
  14. package/resources/agents/agents.js +16 -10
  15. package/resources/agents/agents.js.map +1 -1
  16. package/resources/agents/agents.mjs +16 -10
  17. package/resources/agents/agents.mjs.map +1 -1
  18. package/resources/agents/feedback.d.mts +14 -9
  19. package/resources/agents/feedback.d.mts.map +1 -1
  20. package/resources/agents/feedback.d.ts +14 -9
  21. package/resources/agents/feedback.d.ts.map +1 -1
  22. package/resources/agents/feedback.js +3 -2
  23. package/resources/agents/feedback.js.map +1 -1
  24. package/resources/agents/feedback.mjs +3 -2
  25. package/resources/agents/feedback.mjs.map +1 -1
  26. package/resources/agents/index.d.mts +1 -1
  27. package/resources/agents/index.d.mts.map +1 -1
  28. package/resources/agents/index.d.ts +1 -1
  29. package/resources/agents/index.d.ts.map +1 -1
  30. package/resources/agents/index.js.map +1 -1
  31. package/resources/agents/index.mjs.map +1 -1
  32. package/resources/agents/schedules.d.mts +32 -11
  33. package/resources/agents/schedules.d.mts.map +1 -1
  34. package/resources/agents/schedules.d.ts +32 -11
  35. package/resources/agents/schedules.d.ts.map +1 -1
  36. package/resources/agents/schedules.js +18 -13
  37. package/resources/agents/schedules.js.map +1 -1
  38. package/resources/agents/schedules.mjs +18 -13
  39. package/resources/agents/schedules.mjs.map +1 -1
  40. package/resources/agents/variations.d.mts +51 -9
  41. package/resources/agents/variations.d.mts.map +1 -1
  42. package/resources/agents/variations.d.ts +51 -9
  43. package/resources/agents/variations.d.ts.map +1 -1
  44. package/resources/agents/variations.js +28 -32
  45. package/resources/agents/variations.js.map +1 -1
  46. package/resources/agents/variations.mjs +28 -32
  47. package/resources/agents/variations.mjs.map +1 -1
  48. package/resources/agents/webhook-deliveries.d.mts +7 -3
  49. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  50. package/resources/agents/webhook-deliveries.d.ts +7 -3
  51. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  52. package/resources/agents/webhook-deliveries.js +3 -2
  53. package/resources/agents/webhook-deliveries.js.map +1 -1
  54. package/resources/agents/webhook-deliveries.mjs +3 -2
  55. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  56. package/resources/api-keys.d.mts +35 -12
  57. package/resources/api-keys.d.mts.map +1 -1
  58. package/resources/api-keys.d.ts +35 -12
  59. package/resources/api-keys.d.ts.map +1 -1
  60. package/resources/api-keys.js +19 -12
  61. package/resources/api-keys.js.map +1 -1
  62. package/resources/api-keys.mjs +19 -12
  63. package/resources/api-keys.mjs.map +1 -1
  64. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +10 -4
  65. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
  66. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +10 -4
  67. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  68. package/resources/bulk-workspace-resources/bulk-workspace-resources.js +10 -9
  69. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  70. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +10 -9
  71. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  72. package/resources/bulk-workspace-resources/index.d.mts +1 -1
  73. package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
  74. package/resources/bulk-workspace-resources/index.d.ts +1 -1
  75. package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
  76. package/resources/bulk-workspace-resources/index.js.map +1 -1
  77. package/resources/bulk-workspace-resources/index.mjs.map +1 -1
  78. package/resources/bulk-workspace-resources/results.d.mts +8 -4
  79. package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
  80. package/resources/bulk-workspace-resources/results.d.ts +8 -4
  81. package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
  82. package/resources/bulk-workspace-resources/results.js +3 -2
  83. package/resources/bulk-workspace-resources/results.js.map +1 -1
  84. package/resources/bulk-workspace-resources/results.mjs +3 -2
  85. package/resources/bulk-workspace-resources/results.mjs.map +1 -1
  86. package/resources/index.d.mts +9 -9
  87. package/resources/index.d.mts.map +1 -1
  88. package/resources/index.d.ts +9 -9
  89. package/resources/index.d.ts.map +1 -1
  90. package/resources/index.js.map +1 -1
  91. package/resources/index.mjs +1 -1
  92. package/resources/index.mjs.map +1 -1
  93. package/resources/memory-layers/entries.d.mts +35 -14
  94. package/resources/memory-layers/entries.d.mts.map +1 -1
  95. package/resources/memory-layers/entries.d.ts +35 -14
  96. package/resources/memory-layers/entries.d.ts.map +1 -1
  97. package/resources/memory-layers/entries.js +15 -13
  98. package/resources/memory-layers/entries.js.map +1 -1
  99. package/resources/memory-layers/entries.mjs +15 -13
  100. package/resources/memory-layers/entries.mjs.map +1 -1
  101. package/resources/memory-layers/index.d.mts +1 -1
  102. package/resources/memory-layers/index.d.mts.map +1 -1
  103. package/resources/memory-layers/index.d.ts +1 -1
  104. package/resources/memory-layers/index.d.ts.map +1 -1
  105. package/resources/memory-layers/index.js.map +1 -1
  106. package/resources/memory-layers/index.mjs.map +1 -1
  107. package/resources/memory-layers/memory-layers.d.mts +32 -9
  108. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  109. package/resources/memory-layers/memory-layers.d.ts +32 -9
  110. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  111. package/resources/memory-layers/memory-layers.js +13 -10
  112. package/resources/memory-layers/memory-layers.js.map +1 -1
  113. package/resources/memory-layers/memory-layers.mjs +13 -10
  114. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  115. package/resources/models.d.mts +15 -5
  116. package/resources/models.d.mts.map +1 -1
  117. package/resources/models.d.ts +15 -5
  118. package/resources/models.d.ts.map +1 -1
  119. package/resources/models.js +11 -6
  120. package/resources/models.js.map +1 -1
  121. package/resources/models.mjs +11 -6
  122. package/resources/models.mjs.map +1 -1
  123. package/resources/objectives/feedback.d.mts +16 -5
  124. package/resources/objectives/feedback.d.mts.map +1 -1
  125. package/resources/objectives/feedback.d.ts +16 -5
  126. package/resources/objectives/feedback.d.ts.map +1 -1
  127. package/resources/objectives/feedback.js +9 -4
  128. package/resources/objectives/feedback.js.map +1 -1
  129. package/resources/objectives/feedback.mjs +9 -4
  130. package/resources/objectives/feedback.mjs.map +1 -1
  131. package/resources/objectives/index.d.mts +1 -1
  132. package/resources/objectives/index.d.mts.map +1 -1
  133. package/resources/objectives/index.d.ts +1 -1
  134. package/resources/objectives/index.d.ts.map +1 -1
  135. package/resources/objectives/index.js.map +1 -1
  136. package/resources/objectives/index.mjs.map +1 -1
  137. package/resources/objectives/objectives.d.mts +49 -21
  138. package/resources/objectives/objectives.d.mts.map +1 -1
  139. package/resources/objectives/objectives.d.ts +49 -21
  140. package/resources/objectives/objectives.d.ts.map +1 -1
  141. package/resources/objectives/objectives.js +31 -16
  142. package/resources/objectives/objectives.js.map +1 -1
  143. package/resources/objectives/objectives.mjs +31 -16
  144. package/resources/objectives/objectives.mjs.map +1 -1
  145. package/resources/objectives/tasks.d.mts +10 -2
  146. package/resources/objectives/tasks.d.mts.map +1 -1
  147. package/resources/objectives/tasks.d.ts +10 -2
  148. package/resources/objectives/tasks.d.ts.map +1 -1
  149. package/resources/objectives/tasks.js +5 -4
  150. package/resources/objectives/tasks.js.map +1 -1
  151. package/resources/objectives/tasks.mjs +5 -4
  152. package/resources/objectives/tasks.mjs.map +1 -1
  153. package/resources/objectives/tool-calls.d.mts +15 -3
  154. package/resources/objectives/tool-calls.d.mts.map +1 -1
  155. package/resources/objectives/tool-calls.d.ts +15 -3
  156. package/resources/objectives/tool-calls.d.ts.map +1 -1
  157. package/resources/objectives/tool-calls.js +7 -12
  158. package/resources/objectives/tool-calls.js.map +1 -1
  159. package/resources/objectives/tool-calls.mjs +7 -12
  160. package/resources/objectives/tool-calls.mjs.map +1 -1
  161. package/resources/objectives/tools.d.mts +5 -1
  162. package/resources/objectives/tools.d.mts.map +1 -1
  163. package/resources/objectives/tools.d.ts +5 -1
  164. package/resources/objectives/tools.d.ts.map +1 -1
  165. package/resources/objectives/tools.js +3 -2
  166. package/resources/objectives/tools.js.map +1 -1
  167. package/resources/objectives/tools.mjs +3 -2
  168. package/resources/objectives/tools.mjs.map +1 -1
  169. package/resources/search.d.mts +1 -1
  170. package/resources/search.d.mts.map +1 -1
  171. package/resources/search.d.ts +1 -1
  172. package/resources/search.d.ts.map +1 -1
  173. package/resources/search.js +6 -2
  174. package/resources/search.js.map +1 -1
  175. package/resources/search.mjs +6 -2
  176. package/resources/search.mjs.map +1 -1
  177. package/resources/tool-sets/index.d.mts +1 -1
  178. package/resources/tool-sets/index.d.mts.map +1 -1
  179. package/resources/tool-sets/index.d.ts +1 -1
  180. package/resources/tool-sets/index.d.ts.map +1 -1
  181. package/resources/tool-sets/index.js.map +1 -1
  182. package/resources/tool-sets/index.mjs.map +1 -1
  183. package/resources/tool-sets/tool-sets.d.mts +39 -12
  184. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  185. package/resources/tool-sets/tool-sets.d.ts +39 -12
  186. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  187. package/resources/tool-sets/tool-sets.js +19 -15
  188. package/resources/tool-sets/tool-sets.js.map +1 -1
  189. package/resources/tool-sets/tool-sets.mjs +19 -15
  190. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  191. package/resources/tool-sets/tools.d.mts +39 -14
  192. package/resources/tool-sets/tools.d.mts.map +1 -1
  193. package/resources/tool-sets/tools.d.ts +39 -14
  194. package/resources/tool-sets/tools.d.ts.map +1 -1
  195. package/resources/tool-sets/tools.js +18 -13
  196. package/resources/tool-sets/tools.js.map +1 -1
  197. package/resources/tool-sets/tools.mjs +18 -13
  198. package/resources/tool-sets/tools.mjs.map +1 -1
  199. package/resources/uploads.d.mts +9 -3
  200. package/resources/uploads.d.mts.map +1 -1
  201. package/resources/uploads.d.ts +9 -3
  202. package/resources/uploads.d.ts.map +1 -1
  203. package/resources/uploads.js +5 -4
  204. package/resources/uploads.js.map +1 -1
  205. package/resources/uploads.mjs +5 -4
  206. package/resources/uploads.mjs.map +1 -1
  207. package/resources/workspace-secrets.d.mts +30 -10
  208. package/resources/workspace-secrets.d.mts.map +1 -1
  209. package/resources/workspace-secrets.d.ts +30 -10
  210. package/resources/workspace-secrets.d.ts.map +1 -1
  211. package/resources/workspace-secrets.js +16 -13
  212. package/resources/workspace-secrets.js.map +1 -1
  213. package/resources/workspace-secrets.mjs +16 -13
  214. package/resources/workspace-secrets.mjs.map +1 -1
  215. package/src/client.ts +30 -0
  216. package/src/resources/agents/agents.ts +43 -14
  217. package/src/resources/agents/feedback.ts +17 -10
  218. package/src/resources/agents/index.ts +2 -0
  219. package/src/resources/agents/schedules.ts +57 -22
  220. package/src/resources/agents/variations.ts +104 -39
  221. package/src/resources/agents/webhook-deliveries.ts +10 -4
  222. package/src/resources/api-keys.ts +54 -16
  223. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +30 -8
  224. package/src/resources/bulk-workspace-resources/index.ts +1 -0
  225. package/src/resources/bulk-workspace-resources/results.ts +11 -5
  226. package/src/resources/index.ts +22 -1
  227. package/src/resources/memory-layers/entries.ts +62 -25
  228. package/src/resources/memory-layers/index.ts +2 -0
  229. package/src/resources/memory-layers/memory-layers.ts +52 -12
  230. package/src/resources/models.ts +25 -6
  231. package/src/resources/objectives/feedback.ts +26 -8
  232. package/src/resources/objectives/index.ts +1 -0
  233. package/src/resources/objectives/objectives.ts +86 -27
  234. package/src/resources/objectives/tasks.ts +19 -5
  235. package/src/resources/objectives/tool-calls.ts +30 -14
  236. package/src/resources/objectives/tools.ts +9 -3
  237. package/src/resources/search.ts +6 -1
  238. package/src/resources/tool-sets/index.ts +2 -0
  239. package/src/resources/tool-sets/tool-sets.ts +61 -19
  240. package/src/resources/tool-sets/tools.ts +64 -25
  241. package/src/resources/uploads.ts +13 -4
  242. package/src/resources/workspace-secrets.ts +57 -16
  243. package/src/version.ts +1 -1
  244. package/version.d.mts +1 -1
  245. package/version.d.ts +1 -1
  246. package/version.js +1 -1
  247. package/version.mjs +1 -1
@@ -28,10 +28,14 @@ export class Entries extends APIResource {
28
28
  */
29
29
  create(
30
30
  memoryLayerID: string,
31
- body: EntryCreateParams,
31
+ params: EntryCreateParams,
32
32
  options?: RequestOptions,
33
33
  ): APIPromise<MemoryEntryDetail> {
34
- return this._client.post(path`/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
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(path`/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
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(path`/v1/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
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
- query: EntryListParams | null | undefined = {},
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(path`/v1/memory_layers/${memoryLayerId}/entries/${id}`, {
76
- ...options,
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
- * CreateResourceMetadata contains the user-provided fields for creating a
233
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
234
- * profile_id, created_at) are excluded since they are set by the server.
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 accepts
240
- * either inline content or a reference to a completed Upload; exactly one of the
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
- * Filter by bundle_key return only resources owned by this bundle.
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 entries under that
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(body: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
47
- return this._client.post('/v1/memory_layers', { body, ...options });
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
- return this._client.get(path`/v1/memory_layers/${id}`, options);
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, body: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
61
- return this._client.patch(path`/v1/memory_layers/${id}`, { body, ...options });
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('/v1/memory_layers', CursorPagination<MemoryLayer>, { query, ...options });
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
- return this._client.delete(path`/v1/memory_layers/${id}`, {
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
- * UpdateResourceMetadata contains the user-provided fields for updating a
164
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
165
- * profile_id, created_at) are excluded since they are set by the server.
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 {
@@ -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
- return this._client.get(path`/v1/models/${id}`, options);
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('/v1/models', CursorPagination<Model>, { query, ...options });
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, body: ModelSetStatusParams, options?: RequestOptions): APIPromise<Model> {
41
- return this._client.put(path`/v1/models/${id}/status`, { body, ...options });
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
- * The new status for the model
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
- body: FeedbackCreateParams,
18
+ params: FeedbackCreateParams,
19
19
  options?: RequestOptions,
20
20
  ): APIPromise<ObjectiveFeedback> {
21
- return this._client.post(path`/v1/objectives/${objectiveID}/feedback`, { body, ...options });
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
- query: FeedbackListParams | null | undefined = {},
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 creating an
107
- * operation. Read-only fields (id, account_id, workspace_id, created_at,
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 {
@@ -40,6 +40,7 @@ export {
40
40
  type ObjectiveContinueResponse,
41
41
  type ObjectiveListEventsResponse,
42
42
  type ObjectiveCreateParams,
43
+ type ObjectiveRetrieveParams,
43
44
  type ObjectiveListParams,
44
45
  type ObjectiveCancelParams,
45
46
  type ObjectiveCompactParams,