@cadenya/cadenya 0.66.0 → 0.68.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 (267) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +42 -81
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +42 -81
  6. package/client.d.ts.map +1 -1
  7. package/client.js +24 -63
  8. package/client.js.map +1 -1
  9. package/client.mjs +24 -63
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/account.d.mts +18 -22
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +18 -22
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/account.js +2 -6
  17. package/resources/account.js.map +1 -1
  18. package/resources/account.mjs +2 -6
  19. package/resources/account.mjs.map +1 -1
  20. package/resources/agents/agents.d.mts +34 -21
  21. package/resources/agents/agents.d.mts.map +1 -1
  22. package/resources/agents/agents.d.ts +34 -21
  23. package/resources/agents/agents.d.ts.map +1 -1
  24. package/resources/agents/agents.js +17 -16
  25. package/resources/agents/agents.js.map +1 -1
  26. package/resources/agents/agents.mjs +17 -16
  27. package/resources/agents/agents.mjs.map +1 -1
  28. package/resources/agents/feedback.d.mts +15 -15
  29. package/resources/agents/feedback.d.mts.map +1 -1
  30. package/resources/agents/feedback.d.ts +15 -15
  31. package/resources/agents/feedback.d.ts.map +1 -1
  32. package/resources/agents/feedback.js +4 -8
  33. package/resources/agents/feedback.js.map +1 -1
  34. package/resources/agents/feedback.mjs +4 -8
  35. package/resources/agents/feedback.mjs.map +1 -1
  36. package/resources/agents/index.d.mts +1 -1
  37. package/resources/agents/index.d.mts.map +1 -1
  38. package/resources/agents/index.d.ts +1 -1
  39. package/resources/agents/index.d.ts.map +1 -1
  40. package/resources/agents/index.js.map +1 -1
  41. package/resources/agents/index.mjs.map +1 -1
  42. package/resources/agents/schedules.d.mts +44 -26
  43. package/resources/agents/schedules.d.mts.map +1 -1
  44. package/resources/agents/schedules.d.ts +44 -26
  45. package/resources/agents/schedules.d.ts.map +1 -1
  46. package/resources/agents/schedules.js +20 -19
  47. package/resources/agents/schedules.js.map +1 -1
  48. package/resources/agents/schedules.mjs +20 -19
  49. package/resources/agents/schedules.mjs.map +1 -1
  50. package/resources/agents/variations.d.mts +88 -43
  51. package/resources/agents/variations.d.mts.map +1 -1
  52. package/resources/agents/variations.d.ts +88 -43
  53. package/resources/agents/variations.d.ts.map +1 -1
  54. package/resources/agents/variations.js +31 -32
  55. package/resources/agents/variations.js.map +1 -1
  56. package/resources/agents/variations.mjs +31 -32
  57. package/resources/agents/variations.mjs.map +1 -1
  58. package/resources/agents/webhook-deliveries.d.mts +10 -11
  59. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  60. package/resources/agents/webhook-deliveries.d.ts +10 -11
  61. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  62. package/resources/agents/webhook-deliveries.js +4 -8
  63. package/resources/agents/webhook-deliveries.js.map +1 -1
  64. package/resources/agents/webhook-deliveries.mjs +4 -8
  65. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  66. package/resources/api-keys.d.mts +48 -28
  67. package/resources/api-keys.d.mts.map +1 -1
  68. package/resources/api-keys.d.ts +48 -28
  69. package/resources/api-keys.d.ts.map +1 -1
  70. package/resources/api-keys.js +21 -17
  71. package/resources/api-keys.js.map +1 -1
  72. package/resources/api-keys.mjs +21 -17
  73. package/resources/api-keys.mjs.map +1 -1
  74. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
  75. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
  76. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
  77. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  78. package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
  79. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  80. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
  81. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  82. package/resources/bulk-workspace-resources/index.d.mts +1 -1
  83. package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
  84. package/resources/bulk-workspace-resources/index.d.ts +1 -1
  85. package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
  86. package/resources/bulk-workspace-resources/index.js.map +1 -1
  87. package/resources/bulk-workspace-resources/index.mjs.map +1 -1
  88. package/resources/bulk-workspace-resources/results.d.mts +30 -35
  89. package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
  90. package/resources/bulk-workspace-resources/results.d.ts +30 -35
  91. package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
  92. package/resources/bulk-workspace-resources/results.js +6 -10
  93. package/resources/bulk-workspace-resources/results.js.map +1 -1
  94. package/resources/bulk-workspace-resources/results.mjs +6 -10
  95. package/resources/bulk-workspace-resources/results.mjs.map +1 -1
  96. package/resources/index.d.mts +9 -9
  97. package/resources/index.d.mts.map +1 -1
  98. package/resources/index.d.ts +9 -9
  99. package/resources/index.d.ts.map +1 -1
  100. package/resources/index.js.map +1 -1
  101. package/resources/index.mjs +1 -1
  102. package/resources/index.mjs.map +1 -1
  103. package/resources/memory-layers/entries.d.mts +40 -33
  104. package/resources/memory-layers/entries.d.mts.map +1 -1
  105. package/resources/memory-layers/entries.d.ts +40 -33
  106. package/resources/memory-layers/entries.d.ts.map +1 -1
  107. package/resources/memory-layers/entries.js +19 -23
  108. package/resources/memory-layers/entries.js.map +1 -1
  109. package/resources/memory-layers/entries.mjs +19 -23
  110. package/resources/memory-layers/entries.mjs.map +1 -1
  111. package/resources/memory-layers/index.d.mts +1 -1
  112. package/resources/memory-layers/index.d.mts.map +1 -1
  113. package/resources/memory-layers/index.d.ts +1 -1
  114. package/resources/memory-layers/index.d.ts.map +1 -1
  115. package/resources/memory-layers/index.js.map +1 -1
  116. package/resources/memory-layers/index.mjs.map +1 -1
  117. package/resources/memory-layers/memory-layers.d.mts +33 -22
  118. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  119. package/resources/memory-layers/memory-layers.d.ts +33 -22
  120. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  121. package/resources/memory-layers/memory-layers.js +17 -20
  122. package/resources/memory-layers/memory-layers.js.map +1 -1
  123. package/resources/memory-layers/memory-layers.mjs +17 -20
  124. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  125. package/resources/models.d.mts +18 -12
  126. package/resources/models.d.mts.map +1 -1
  127. package/resources/models.d.ts +18 -12
  128. package/resources/models.d.ts.map +1 -1
  129. package/resources/models.js +14 -13
  130. package/resources/models.js.map +1 -1
  131. package/resources/models.mjs +14 -13
  132. package/resources/models.mjs.map +1 -1
  133. package/resources/objectives/feedback.d.mts +19 -8
  134. package/resources/objectives/feedback.d.mts.map +1 -1
  135. package/resources/objectives/feedback.d.ts +19 -8
  136. package/resources/objectives/feedback.d.ts.map +1 -1
  137. package/resources/objectives/feedback.js +9 -4
  138. package/resources/objectives/feedback.js.map +1 -1
  139. package/resources/objectives/feedback.mjs +9 -4
  140. package/resources/objectives/feedback.mjs.map +1 -1
  141. package/resources/objectives/index.d.mts +1 -1
  142. package/resources/objectives/index.d.mts.map +1 -1
  143. package/resources/objectives/index.d.ts +1 -1
  144. package/resources/objectives/index.d.ts.map +1 -1
  145. package/resources/objectives/index.js.map +1 -1
  146. package/resources/objectives/index.mjs.map +1 -1
  147. package/resources/objectives/objectives.d.mts +63 -44
  148. package/resources/objectives/objectives.d.mts.map +1 -1
  149. package/resources/objectives/objectives.d.ts +63 -44
  150. package/resources/objectives/objectives.d.ts.map +1 -1
  151. package/resources/objectives/objectives.js +31 -16
  152. package/resources/objectives/objectives.js.map +1 -1
  153. package/resources/objectives/objectives.mjs +31 -16
  154. package/resources/objectives/objectives.mjs.map +1 -1
  155. package/resources/objectives/tasks.d.mts +7 -2
  156. package/resources/objectives/tasks.d.mts.map +1 -1
  157. package/resources/objectives/tasks.d.ts +7 -2
  158. package/resources/objectives/tasks.d.ts.map +1 -1
  159. package/resources/objectives/tasks.js +5 -4
  160. package/resources/objectives/tasks.js.map +1 -1
  161. package/resources/objectives/tasks.mjs +5 -4
  162. package/resources/objectives/tasks.mjs.map +1 -1
  163. package/resources/objectives/tool-calls.d.mts +18 -9
  164. package/resources/objectives/tool-calls.d.mts.map +1 -1
  165. package/resources/objectives/tool-calls.d.ts +18 -9
  166. package/resources/objectives/tool-calls.d.ts.map +1 -1
  167. package/resources/objectives/tool-calls.js +7 -12
  168. package/resources/objectives/tool-calls.js.map +1 -1
  169. package/resources/objectives/tool-calls.mjs +7 -12
  170. package/resources/objectives/tool-calls.mjs.map +1 -1
  171. package/resources/objectives/tools.d.mts +5 -1
  172. package/resources/objectives/tools.d.mts.map +1 -1
  173. package/resources/objectives/tools.d.ts +5 -1
  174. package/resources/objectives/tools.d.ts.map +1 -1
  175. package/resources/objectives/tools.js +3 -2
  176. package/resources/objectives/tools.js.map +1 -1
  177. package/resources/objectives/tools.mjs +3 -2
  178. package/resources/objectives/tools.mjs.map +1 -1
  179. package/resources/search.d.mts +1 -1
  180. package/resources/search.d.mts.map +1 -1
  181. package/resources/search.d.ts +1 -1
  182. package/resources/search.d.ts.map +1 -1
  183. package/resources/search.js +6 -2
  184. package/resources/search.js.map +1 -1
  185. package/resources/search.mjs +6 -2
  186. package/resources/search.mjs.map +1 -1
  187. package/resources/tool-sets/index.d.mts +1 -1
  188. package/resources/tool-sets/index.d.mts.map +1 -1
  189. package/resources/tool-sets/index.d.ts +1 -1
  190. package/resources/tool-sets/index.d.ts.map +1 -1
  191. package/resources/tool-sets/index.js.map +1 -1
  192. package/resources/tool-sets/index.mjs.map +1 -1
  193. package/resources/tool-sets/tool-sets.d.mts +66 -43
  194. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  195. package/resources/tool-sets/tool-sets.d.ts +66 -43
  196. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  197. package/resources/tool-sets/tool-sets.js +23 -23
  198. package/resources/tool-sets/tool-sets.js.map +1 -1
  199. package/resources/tool-sets/tool-sets.mjs +23 -23
  200. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  201. package/resources/tool-sets/tools.d.mts +50 -31
  202. package/resources/tool-sets/tools.d.mts.map +1 -1
  203. package/resources/tool-sets/tools.d.ts +50 -31
  204. package/resources/tool-sets/tools.d.ts.map +1 -1
  205. package/resources/tool-sets/tools.js +22 -21
  206. package/resources/tool-sets/tools.js.map +1 -1
  207. package/resources/tool-sets/tools.mjs +22 -21
  208. package/resources/tool-sets/tools.mjs.map +1 -1
  209. package/resources/uploads.d.mts +21 -19
  210. package/resources/uploads.d.mts.map +1 -1
  211. package/resources/uploads.d.ts +21 -19
  212. package/resources/uploads.d.ts.map +1 -1
  213. package/resources/uploads.js +8 -11
  214. package/resources/uploads.js.map +1 -1
  215. package/resources/uploads.mjs +8 -11
  216. package/resources/uploads.mjs.map +1 -1
  217. package/resources/workspace-secrets.d.mts +33 -13
  218. package/resources/workspace-secrets.d.mts.map +1 -1
  219. package/resources/workspace-secrets.d.ts +33 -13
  220. package/resources/workspace-secrets.d.ts.map +1 -1
  221. package/resources/workspace-secrets.js +16 -13
  222. package/resources/workspace-secrets.js.map +1 -1
  223. package/resources/workspace-secrets.mjs +16 -13
  224. package/resources/workspace-secrets.mjs.map +1 -1
  225. package/resources/workspaces.d.mts +2 -6
  226. package/resources/workspaces.d.mts.map +1 -1
  227. package/resources/workspaces.d.ts +2 -6
  228. package/resources/workspaces.d.ts.map +1 -1
  229. package/resources/workspaces.js +2 -6
  230. package/resources/workspaces.js.map +1 -1
  231. package/resources/workspaces.mjs +2 -6
  232. package/resources/workspaces.mjs.map +1 -1
  233. package/src/client.ts +54 -63
  234. package/src/resources/account.ts +18 -22
  235. package/src/resources/agents/agents.ts +49 -24
  236. package/src/resources/agents/feedback.ts +18 -16
  237. package/src/resources/agents/index.ts +2 -0
  238. package/src/resources/agents/schedules.ts +69 -37
  239. package/src/resources/agents/variations.ts +141 -73
  240. package/src/resources/agents/webhook-deliveries.ts +13 -12
  241. package/src/resources/api-keys.ts +67 -32
  242. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
  243. package/src/resources/bulk-workspace-resources/index.ts +1 -0
  244. package/src/resources/bulk-workspace-resources/results.ts +33 -36
  245. package/src/resources/index.ts +22 -1
  246. package/src/resources/memory-layers/entries.ts +67 -44
  247. package/src/resources/memory-layers/index.ts +2 -0
  248. package/src/resources/memory-layers/memory-layers.ts +53 -25
  249. package/src/resources/models.ts +28 -13
  250. package/src/resources/objectives/feedback.ts +29 -11
  251. package/src/resources/objectives/index.ts +1 -0
  252. package/src/resources/objectives/objectives.ts +100 -50
  253. package/src/resources/objectives/tasks.ts +16 -5
  254. package/src/resources/objectives/tool-calls.ts +33 -20
  255. package/src/resources/objectives/tools.ts +9 -3
  256. package/src/resources/search.ts +6 -1
  257. package/src/resources/tool-sets/index.ts +2 -0
  258. package/src/resources/tool-sets/tool-sets.ts +88 -50
  259. package/src/resources/tool-sets/tools.ts +75 -42
  260. package/src/resources/uploads.ts +25 -20
  261. package/src/resources/workspace-secrets.ts +60 -19
  262. package/src/resources/workspaces.ts +2 -6
  263. package/src/version.ts +1 -1
  264. package/version.d.mts +1 -1
  265. package/version.d.ts +1 -1
  266. package/version.js +1 -1
  267. package/version.mjs +1 -1
@@ -26,16 +26,10 @@ import { RequestOptions } from '../../internal/request-options';
26
26
  import { path } from '../../internal/utils/path';
27
27
 
28
28
  /**
29
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
30
- * Layers are named containers that can be composed into an objective's memory
31
- * stack; entries are the keyed values within a layer.
32
- *
33
- * All operations are implicitly scoped to the workspace determined by the JWT
34
- * token. System-managed layers (e.g., episodic layers created by the runtime)
35
- * cannot be mutated through this API.
36
- *
37
- * Authentication: Bearer token (JWT)
38
- * Scope: Workspace-level operations
29
+ * Manage memory layers and their entries. Layers are named containers that can
30
+ * be composed into an objective's memory stack; entries are the keyed values
31
+ * within a layer. System-managed layers (e.g., episodic layers created by the
32
+ * runtime) cannot be mutated through this API.
39
33
  */
40
34
  export class MemoryLayers extends APIResource {
41
35
  entries: EntriesAPI.Entries = new EntriesAPI.Entries(this._client);
@@ -43,39 +37,51 @@ export class MemoryLayers extends APIResource {
43
37
  /**
44
38
  * Creates a new memory layer in the workspace
45
39
  */
46
- create(body: MemoryLayerCreateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
47
- return this._client.post('/v1/memory_layers', { body, ...options });
40
+ create(
41
+ workspaceID: string,
42
+ body: MemoryLayerCreateParams,
43
+ options?: RequestOptions,
44
+ ): APIPromise<MemoryLayer> {
45
+ return this._client.post(path`/v1/workspaces/${workspaceID}/memory_layers`, { body, ...options });
48
46
  }
49
47
 
50
48
  /**
51
49
  * Retrieves a memory layer by ID from the workspace
52
50
  */
53
- retrieve(id: string, options?: RequestOptions): APIPromise<MemoryLayer> {
54
- return this._client.get(path`/v1/memory_layers/${id}`, options);
51
+ retrieve(id: string, params: MemoryLayerRetrieveParams, options?: RequestOptions): APIPromise<MemoryLayer> {
52
+ const { workspaceId } = params;
53
+ return this._client.get(path`/v1/workspaces/${workspaceId}/memory_layers/${id}`, options);
55
54
  }
56
55
 
57
56
  /**
58
57
  * Updates a memory layer in the workspace
59
58
  */
60
- update(id: string, body: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
61
- return this._client.patch(path`/v1/memory_layers/${id}`, { body, ...options });
59
+ update(id: string, params: MemoryLayerUpdateParams, options?: RequestOptions): APIPromise<MemoryLayer> {
60
+ const { workspaceId, ...body } = params;
61
+ return this._client.patch(path`/v1/workspaces/${workspaceId}/memory_layers/${id}`, { body, ...options });
62
62
  }
63
63
 
64
64
  /**
65
65
  * Lists all memory layers in the workspace
66
66
  */
67
67
  list(
68
+ workspaceID: string,
68
69
  query: MemoryLayerListParams | null | undefined = {},
69
70
  options?: RequestOptions,
70
71
  ): PagePromise<MemoryLayersCursorPagination, MemoryLayer> {
71
- return this._client.getAPIList('/v1/memory_layers', CursorPagination<MemoryLayer>, { query, ...options });
72
+ return this._client.getAPIList(
73
+ path`/v1/workspaces/${workspaceID}/memory_layers`,
74
+ CursorPagination<MemoryLayer>,
75
+ { query, ...options },
76
+ );
72
77
  }
73
78
 
74
79
  /**
75
80
  * Deletes a memory layer from the workspace
76
81
  */
77
- delete(id: string, options?: RequestOptions): APIPromise<void> {
78
- return this._client.delete(path`/v1/memory_layers/${id}`, {
82
+ delete(id: string, params: MemoryLayerDeleteParams, options?: RequestOptions): APIPromise<void> {
83
+ const { workspaceId } = params;
84
+ return this._client.delete(path`/v1/workspaces/${workspaceId}/memory_layers/${id}`, {
79
85
  ...options,
80
86
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
81
87
  });
@@ -105,9 +111,9 @@ export interface MemoryLayer {
105
111
 
106
112
  export interface MemoryLayerInfo {
107
113
  /**
108
- * Profile represents a human user at the account level. Profiles are
109
- * account-scoped resources that can be associated with multiple workspaces through
110
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
114
+ * A profile identifies a user or non-human principal (such as an API key) at the
115
+ * account level. Profiles are account-scoped and can be granted access to multiple
116
+ * workspaces.
111
117
  */
112
118
  createdBy?: AccountAPI.Profile;
113
119
 
@@ -158,16 +164,32 @@ export interface MemoryLayerCreateParams {
158
164
  spec: MemoryLayerSpec;
159
165
  }
160
166
 
167
+ export interface MemoryLayerRetrieveParams {
168
+ workspaceId: string;
169
+ }
170
+
161
171
  export interface MemoryLayerUpdateParams {
162
172
  /**
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.
173
+ * Path param
174
+ */
175
+ workspaceId: string;
176
+
177
+ /**
178
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
179
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
180
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
181
+ * server.
166
182
  */
167
183
  metadata?: Shared.UpdateResourceMetadata;
168
184
 
185
+ /**
186
+ * Body param
187
+ */
169
188
  spec?: MemoryLayerSpec;
170
189
 
190
+ /**
191
+ * Body param
192
+ */
171
193
  updateMask?: string;
172
194
  }
173
195
 
@@ -203,6 +225,10 @@ export interface MemoryLayerListParams extends CursorPaginationParams {
203
225
  type?: 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
204
226
  }
205
227
 
228
+ export interface MemoryLayerDeleteParams {
229
+ workspaceId: string;
230
+ }
231
+
206
232
  MemoryLayers.Entries = Entries;
207
233
 
208
234
  export declare namespace MemoryLayers {
@@ -212,8 +238,10 @@ export declare namespace MemoryLayers {
212
238
  type MemoryLayerSpec as MemoryLayerSpec,
213
239
  type MemoryLayersCursorPagination as MemoryLayersCursorPagination,
214
240
  type MemoryLayerCreateParams as MemoryLayerCreateParams,
241
+ type MemoryLayerRetrieveParams as MemoryLayerRetrieveParams,
215
242
  type MemoryLayerUpdateParams as MemoryLayerUpdateParams,
216
243
  type MemoryLayerListParams as MemoryLayerListParams,
244
+ type MemoryLayerDeleteParams as MemoryLayerDeleteParams,
217
245
  };
218
246
 
219
247
  export {
@@ -8,37 +8,39 @@ import { RequestOptions } from '../internal/request-options';
8
8
  import { path } from '../internal/utils/path';
9
9
 
10
10
  /**
11
- * ModelService manages LLM models at the WORKSPACE level.
12
- * Models represent available LLM providers and families (e.g., "anthropic/claude-sonnet-4.6").
13
- * Models are seeded into workspaces and can be enabled or disabled.
14
- * All operations are implicitly scoped to the workspace determined by the JWT token.
15
- *
16
- * Authentication: Bearer token (JWT)
17
- * Scope: Workspace-level operations
11
+ * Manage LLM models available to a workspace. Models represent provider and
12
+ * family pairs (e.g., "anthropic/claude-sonnet-4.6"). Workspaces are seeded
13
+ * with the supported models and you can enable or disable each one.
18
14
  */
19
15
  export class Models extends APIResource {
20
16
  /**
21
17
  * Retrieves a model by ID from the workspace
22
18
  */
23
- retrieve(id: string, options?: RequestOptions): APIPromise<Model> {
24
- return this._client.get(path`/v1/models/${id}`, options);
19
+ retrieve(id: string, params: ModelRetrieveParams, options?: RequestOptions): APIPromise<Model> {
20
+ const { workspaceId } = params;
21
+ return this._client.get(path`/v1/workspaces/${workspaceId}/models/${id}`, options);
25
22
  }
26
23
 
27
24
  /**
28
25
  * Lists all models in the workspace
29
26
  */
30
27
  list(
28
+ workspaceID: string,
31
29
  query: ModelListParams | null | undefined = {},
32
30
  options?: RequestOptions,
33
31
  ): PagePromise<ModelsCursorPagination, Model> {
34
- return this._client.getAPIList('/v1/models', CursorPagination<Model>, { query, ...options });
32
+ return this._client.getAPIList(path`/v1/workspaces/${workspaceID}/models`, CursorPagination<Model>, {
33
+ query,
34
+ ...options,
35
+ });
35
36
  }
36
37
 
37
38
  /**
38
39
  * Enables or disables a model in the workspace
39
40
  */
40
- setStatus(id: string, body: ModelSetStatusParams, options?: RequestOptions): APIPromise<Model> {
41
- return this._client.put(path`/v1/models/${id}/status`, { body, ...options });
41
+ setStatus(id: string, params: ModelSetStatusParams, options?: RequestOptions): APIPromise<Model> {
42
+ const { workspaceId, ...body } = params;
43
+ return this._client.put(path`/v1/workspaces/${workspaceId}/models/${id}/status`, { body, ...options });
42
44
  }
43
45
  }
44
46
 
@@ -93,6 +95,13 @@ export interface ModelSpec {
93
95
  status?: 'MODEL_STATUS_UNSPECIFIED' | 'MODEL_STATUS_ENABLED' | 'MODEL_STATUS_DISABLED';
94
96
  }
95
97
 
98
+ export interface ModelRetrieveParams {
99
+ /**
100
+ * Workspace ID.
101
+ */
102
+ workspaceId: string;
103
+ }
104
+
96
105
  export interface ModelListParams extends CursorPaginationParams {
97
106
  /**
98
107
  * Filter by bundle_key — return only resources owned by this bundle.
@@ -122,7 +131,12 @@ export interface ModelListParams extends CursorPaginationParams {
122
131
 
123
132
  export interface ModelSetStatusParams {
124
133
  /**
125
- * The new status for the model
134
+ * Path param: Workspace ID.
135
+ */
136
+ workspaceId: string;
137
+
138
+ /**
139
+ * Body param: The new status for the model
126
140
  */
127
141
  status?: 'MODEL_STATUS_UNSPECIFIED' | 'MODEL_STATUS_ENABLED' | 'MODEL_STATUS_DISABLED';
128
142
  }
@@ -132,6 +146,7 @@ export declare namespace Models {
132
146
  type Model as Model,
133
147
  type ModelSpec as ModelSpec,
134
148
  type ModelsCursorPagination as ModelsCursorPagination,
149
+ type ModelRetrieveParams as ModelRetrieveParams,
135
150
  type ModelListParams as ModelListParams,
136
151
  type ModelSetStatusParams as ModelSetStatusParams,
137
152
  };
@@ -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
  );
@@ -92,25 +97,38 @@ export interface ObjectiveFeedbackInfo {
92
97
  objective?: Shared.BareMetadata;
93
98
 
94
99
  /**
95
- * Profile represents a human user at the account level. Profiles are
96
- * account-scoped resources that can be associated with multiple workspaces through
97
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
100
+ * A profile identifies a user or non-human principal (such as an API key) at the
101
+ * account level. Profiles are account-scoped and can be granted access to multiple
102
+ * workspaces.
98
103
  */
99
104
  submittedBy?: AccountAPI.Profile;
100
105
  }
101
106
 
102
107
  export interface FeedbackCreateParams {
108
+ /**
109
+ * Path param
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
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,
@@ -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('/v1/objectives', { body, ...options });
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
- return this._client.get(path`/v1/objectives/${id}`, options);
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('/v1/objectives', CursorPagination<Objective>, { query, ...options });
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(objectiveID: string, body: ObjectiveCancelParams, options?: RequestOptions): APIPromise<Objective> {
81
- return this._client.post(path`/v1/objectives/${objectiveID}/cancel`, { body, ...options });
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
- body: ObjectiveCompactParams,
104
+ params: ObjectiveCompactParams,
91
105
  options?: RequestOptions,
92
106
  ): APIPromise<ObjectiveCompactResponse> {
93
- return this._client.post(path`/v1/objectives/${objectiveID}/compact`, { body, ...options });
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
- body: ObjectiveContinueParams,
119
+ params: ObjectiveContinueParams,
102
120
  options?: RequestOptions,
103
121
  ): APIPromise<ObjectiveContinueResponse> {
104
- return this._client.post(path`/v1/objectives/${objectiveID}/continue`, { body, ...options });
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
- query: ObjectiveListContextWindowsParams | null | undefined = {},
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
- query: ObjectiveListEventsParams | null | undefined = {},
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
  );
@@ -239,7 +263,7 @@ export interface MemoryRead {
239
263
  * permitted).
240
264
  *
241
265
  * memory*layer_id accepts both the canonical form (memlyr*…) and the external-id
242
- * form (external_id:my-custom-id). The same applies to memory_entry_id.
266
+ * form (external_id:my-custom-id). The same applies to memory_entry_id when set.
243
267
  */
244
268
  export interface MemoryReference {
245
269
  /**
@@ -297,9 +321,9 @@ export interface ObjectiveContextWindow {
297
321
  export namespace ObjectiveContextWindow {
298
322
  export interface Info {
299
323
  /**
300
- * Profile represents a human user at the account level. Profiles are
301
- * account-scoped resources that can be associated with multiple workspaces through
302
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
324
+ * A profile identifies a user or non-human principal (such as an API key) at the
325
+ * account level. Profiles are account-scoped and can be granted access to multiple
326
+ * workspaces.
303
327
  */
304
328
  createdBy?: AccountAPI.Profile;
305
329
 
@@ -365,22 +389,18 @@ export interface ObjectiveData {
365
389
  * Memory layers/entries to push onto this objective's memory stack on top of the
366
390
  * baseline stack inherited from the selected variation.
367
391
  *
368
- * See "Memory stack composition" in memory.proto for lookup semantics.
369
- *
370
392
  * Array order is push order: the first element sits lower in the objective's
371
393
  * contribution to the stack; the LAST element ends up on top of the effective
372
394
  * stack. Entries pinned via memory_entry_id behave as single-entry layers at their
373
395
  * position.
374
396
  *
375
397
  * System-managed layers (e.g., episodic) cannot be referenced here; they attach
376
- * themselves automatically via the runtime based on episodic_key.
398
+ * themselves automatically based on episodic_key.
377
399
  *
378
400
  * Stack size cap: the TOTAL effective stack (variation's memory layers
379
401
  *
380
402
  * - this field) must not exceed 10 entries. A request that would produce an
381
- * effective stack larger than 10 is rejected with InvalidArgument. Variations
382
- * themselves are capped at 10 memory layer assignments, so a variation that is
383
- * already "full" leaves no room for objective-level references.
403
+ * effective stack larger than 10 is rejected with InvalidArgument.
384
404
  */
385
405
  memoryStack?: Array<MemoryReference>;
386
406
 
@@ -397,10 +417,9 @@ export interface ObjectiveData {
397
417
  secrets?: Array<ObjectiveDataSecret>;
398
418
 
399
419
  /**
400
- * ID of the AgentSchedule that produced this objective, when applicable.
401
- * Read-only; populated by the runtime when the objective is created from a
402
- * schedule fire. Empty when the objective was created via CreateObjective
403
- * directly.
420
+ * ID of the AgentSchedule that produced this objective, when applicable. Populated
421
+ * when the objective is created from a schedule fire; empty when the objective was
422
+ * created via CreateObjective directly.
404
423
  */
405
424
  sourceScheduleId?: string;
406
425
 
@@ -485,9 +504,9 @@ export namespace ObjectiveEventData {
485
504
 
486
505
  export interface ObjectiveEventInfo {
487
506
  /**
488
- * Profile represents a human user at the account level. Profiles are
489
- * account-scoped resources that can be associated with multiple workspaces through
490
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
507
+ * A profile identifies a user or non-human principal (such as an API key) at the
508
+ * account level. Profiles are account-scoped and can be granted access to multiple
509
+ * workspaces.
491
510
  */
492
511
  createdBy?: AccountAPI.Profile;
493
512
 
@@ -576,9 +595,9 @@ export interface ObjectiveInfo {
576
595
  agentVariation?: Shared.ResourceMetadata;
577
596
 
578
597
  /**
579
- * Profile represents a human user at the account level. Profiles are
580
- * account-scoped resources that can be associated with multiple workspaces through
581
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
598
+ * A profile identifies a user or non-human principal (such as an API key) at the
599
+ * account level. Profiles are account-scoped and can be granted access to multiple
600
+ * workspaces.
582
601
  */
583
602
  createdBy?: AccountAPI.Profile;
584
603
 
@@ -752,6 +771,10 @@ export interface ObjectiveCreateParams {
752
771
  variationId?: string;
753
772
  }
754
773
 
774
+ export interface ObjectiveRetrieveParams {
775
+ workspaceId: string;
776
+ }
777
+
755
778
  export interface ObjectiveListParams extends CursorPaginationParams {
756
779
  /**
757
780
  * Agent ID for filtering
@@ -759,9 +782,8 @@ export interface ObjectiveListParams extends CursorPaginationParams {
759
782
  agentId?: string;
760
783
 
761
784
  /**
762
- * Filter to objectives produced by a specific AgentSchedule. Matches
763
- * ObjectiveData.source*schedule_id. Accepts canonical as*… form or
764
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
785
+ * Filter to objectives produced by a specific AgentSchedule. Accepts canonical
786
+ * as\_… form or external_id:<value> form.
765
787
  */
766
788
  agentScheduleId?: string;
767
789
 
@@ -796,34 +818,51 @@ export interface ObjectiveListParams extends CursorPaginationParams {
796
818
 
797
819
  export interface ObjectiveCancelParams {
798
820
  /**
799
- * Optional reason for cancellation
821
+ * Path param
822
+ */
823
+ workspaceId: string;
824
+
825
+ /**
826
+ * Body param: Optional reason for cancellation
800
827
  */
801
828
  reason?: string;
802
829
  }
803
830
 
804
831
  export interface ObjectiveCompactParams {
805
832
  /**
806
- * CompactionConfig defines how context window compaction behaves for objectives
807
- * using this variation.
833
+ * Path param
834
+ */
835
+ workspaceId: string;
836
+
837
+ /**
838
+ * Body param: CompactionConfig defines how context window compaction behaves for
839
+ * objectives using this variation.
808
840
  */
809
841
  compactionConfig?: VariationsAPI.AgentVariationSpecCompactionConfig;
810
842
  }
811
843
 
812
844
  export interface ObjectiveContinueParams {
813
845
  /**
814
- * When set to true, the message will be enqueued for when the agent loop is
815
- * available to process it.
846
+ * Path param
847
+ */
848
+ workspaceId: string;
849
+
850
+ /**
851
+ * Body param: When set to true, the message will be enqueued for when the agent
852
+ * loop is available to process it.
816
853
  */
817
854
  enqueue?: boolean;
818
855
 
819
856
  /**
820
- * The message to continue an objective that has completed (or you are enqueing)
857
+ * Body param: The message to continue an objective that has completed (or you are
858
+ * enqueing)
821
859
  */
822
860
  message?: string;
823
861
 
824
862
  /**
825
- * Secrets that should be included with the message. Helpful for when you need to
826
- * update secrets on the objective (IE: A secret expires and needs to be refreshed)
863
+ * Body param: Secrets that should be included with the message. Helpful for when
864
+ * you need to update secrets on the objective (IE: A secret expires and needs to
865
+ * be refreshed)
827
866
  */
828
867
  secrets?: Array<ObjectiveContinueParams.Secret>;
829
868
  }
@@ -838,24 +877,34 @@ export namespace ObjectiveContinueParams {
838
877
 
839
878
  export interface ObjectiveListContextWindowsParams extends CursorPaginationParams {
840
879
  /**
841
- * When set to true you may use more of your alloted API rate-limit
880
+ * Path param
881
+ */
882
+ workspaceId: string;
883
+
884
+ /**
885
+ * Query param: When set to true you may use more of your alloted API rate-limit
842
886
  */
843
887
  includeInfo?: boolean;
844
888
  }
845
889
 
846
890
  export interface ObjectiveListEventsParams extends CursorPaginationParams {
847
891
  /**
848
- * When set to true you may use more of your alloted API rate-limit
892
+ * Path param
893
+ */
894
+ workspaceId: string;
895
+
896
+ /**
897
+ * Query param: When set to true you may use more of your alloted API rate-limit
849
898
  */
850
899
  includeInfo?: boolean;
851
900
 
852
901
  /**
853
- * Sort order for results (asc or desc by creation time)
902
+ * Query param: Sort order for results (asc or desc by creation time)
854
903
  */
855
904
  sortOrder?: string;
856
905
 
857
906
  /**
858
- * Optional context window ID to filter events by
907
+ * Query param: Optional context window ID to filter events by
859
908
  */
860
909
  windowId?: string;
861
910
  }
@@ -899,6 +948,7 @@ export declare namespace Objectives {
899
948
  type ObjectiveContextWindowsCursorPagination as ObjectiveContextWindowsCursorPagination,
900
949
  type ObjectiveListEventsResponsesCursorPagination as ObjectiveListEventsResponsesCursorPagination,
901
950
  type ObjectiveCreateParams as ObjectiveCreateParams,
951
+ type ObjectiveRetrieveParams as ObjectiveRetrieveParams,
902
952
  type ObjectiveListParams as ObjectiveListParams,
903
953
  type ObjectiveCancelParams as ObjectiveCancelParams,
904
954
  type ObjectiveCompactParams as ObjectiveCompactParams,