@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
@@ -10,38 +10,41 @@ import { RequestOptions } from '../../internal/request-options';
10
10
  import { path } from '../../internal/utils/path';
11
11
 
12
12
  /**
13
- * ToolService manages tool sets and tools at the WORKSPACE level.
14
- * Tool sets group related tools, and tools define specific capabilities for agents.
15
- * All operations are implicitly scoped to the workspace determined by the JWT token.
13
+ * Manage tool sets and the tools they contain. Tool sets group related tools,
14
+ * and tools define specific capabilities available to agents.
16
15
  *
17
- * Note: When a ToolSet has managed=true, only API Key actors can modify its tools.
18
- * Profile actors (humans) are restricted from modifying managed tool sets.
19
- *
20
- * Authentication: Bearer token (JWT)
21
- * Scope: Workspace-level operations
16
+ * When a tool set is managed, only API key actors can modify its tools; human
17
+ * (profile) actors cannot.
22
18
  */
23
19
  export class Tools extends APIResource {
24
20
  /**
25
21
  * Creates a new tool in the tool set
26
22
  */
27
- create(toolSetID: string, body: ToolCreateParams, options?: RequestOptions): APIPromise<Tool> {
28
- return this._client.post(path`/v1/tool_sets/${toolSetID}/tools`, { body, ...options });
23
+ create(toolSetID: string, params: ToolCreateParams, options?: RequestOptions): APIPromise<Tool> {
24
+ const { workspaceId, ...body } = params;
25
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`, {
26
+ body,
27
+ ...options,
28
+ });
29
29
  }
30
30
 
31
31
  /**
32
32
  * Retrieves a tool by ID from the workspace
33
33
  */
34
34
  retrieve(id: string, params: ToolRetrieveParams, options?: RequestOptions): APIPromise<Tool> {
35
- const { toolSetId } = params;
36
- return this._client.get(path`/v1/tool_sets/${toolSetId}/tools/${id}`, options);
35
+ const { workspaceId, toolSetId } = params;
36
+ return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, options);
37
37
  }
38
38
 
39
39
  /**
40
40
  * Updates a tool in the tool set
41
41
  */
42
42
  update(id: string, params: ToolUpdateParams, options?: RequestOptions): APIPromise<Tool> {
43
- const { toolSetId, ...body } = params;
44
- return this._client.put(path`/v1/tool_sets/${toolSetId}/tools/${id}`, { body, ...options });
43
+ const { workspaceId, toolSetId, ...body } = params;
44
+ return this._client.put(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
45
+ body,
46
+ ...options,
47
+ });
45
48
  }
46
49
 
47
50
  /**
@@ -49,21 +52,23 @@ export class Tools extends APIResource {
49
52
  */
50
53
  list(
51
54
  toolSetID: string,
52
- query: ToolListParams | null | undefined = {},
55
+ params: ToolListParams,
53
56
  options?: RequestOptions,
54
57
  ): PagePromise<ToolsCursorPagination, Tool> {
55
- return this._client.getAPIList(path`/v1/tool_sets/${toolSetID}/tools`, CursorPagination<Tool>, {
56
- query,
57
- ...options,
58
- });
58
+ const { workspaceId, ...query } = params;
59
+ return this._client.getAPIList(
60
+ path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/tools`,
61
+ CursorPagination<Tool>,
62
+ { query, ...options },
63
+ );
59
64
  }
60
65
 
61
66
  /**
62
67
  * Deletes a tool in the tool set
63
68
  */
64
69
  delete(id: string, params: ToolDeleteParams, options?: RequestOptions): APIPromise<void> {
65
- const { toolSetId } = params;
66
- return this._client.delete(path`/v1/tool_sets/${toolSetId}/tools/${id}`, {
70
+ const { workspaceId, toolSetId } = params;
71
+ return this._client.delete(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
67
72
  ...options,
68
73
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
69
74
  });
@@ -117,9 +122,9 @@ export interface Tool {
117
122
 
118
123
  export interface ToolInfo {
119
124
  /**
120
- * Profile represents a human user at the account level. Profiles are
121
- * account-scoped resources that can be associated with multiple workspaces through
122
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
125
+ * A profile identifies a user or non-human principal (such as an API key) at the
126
+ * account level. Profiles are account-scoped and can be granted access to multiple
127
+ * workspaces.
123
128
  */
124
129
  createdBy?: AccountAPI.Profile;
125
130
 
@@ -163,27 +168,45 @@ export interface ToolSpecConfig {
163
168
 
164
169
  export interface ToolCreateParams {
165
170
  /**
166
- * CreateResourceMetadata contains the user-provided fields for creating a
167
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
168
- * profile_id, created_at) are excluded since they are set by the server.
171
+ * Path param: Workspace ID.
172
+ */
173
+ workspaceId: string;
174
+
175
+ /**
176
+ * Body param: CreateResourceMetadata contains the user-provided fields for
177
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
178
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
179
+ * server.
169
180
  */
170
181
  metadata: Shared.CreateResourceMetadata;
171
182
 
183
+ /**
184
+ * Body param
185
+ */
172
186
  spec: ToolSpec;
173
187
  }
174
188
 
175
189
  export interface ToolRetrieveParams {
176
190
  /**
177
- * Tool set ID (from path). Accepts canonical ts\_… form or external_id:<value>
178
- * form (see common.proto "Path-parameter ID resolution").
191
+ * Workspace ID.
192
+ */
193
+ workspaceId: string;
194
+
195
+ /**
196
+ * Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
179
197
  */
180
198
  toolSetId: string;
181
199
  }
182
200
 
183
201
  export interface ToolUpdateParams {
184
202
  /**
185
- * Path param: Tool set ID (from path). Accepts canonical ts\_… form or
186
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
203
+ * Path param: Workspace ID.
204
+ */
205
+ workspaceId: string;
206
+
207
+ /**
208
+ * Path param: Tool set ID. Accepts the canonical ts\_… form or the
209
+ * external_id:<value> form.
187
210
  */
188
211
  toolSetId: string;
189
212
 
@@ -208,43 +231,49 @@ export interface ToolUpdateParams {
208
231
 
209
232
  export interface ToolListParams extends CursorPaginationParams {
210
233
  /**
211
- * Filter by bundle_key — return only resources owned by this bundle.
234
+ * Path param: Workspace ID.
235
+ */
236
+ workspaceId: string;
237
+
238
+ /**
239
+ * Query param: Filter by bundle_key — return only resources owned by this bundle.
212
240
  */
213
241
  bundleKey?: string;
214
242
 
215
243
  /**
216
- * When set to true you may use more of your alloted API rate-limit
244
+ * Query param: When set to true you may use more of your alloted API rate-limit
217
245
  */
218
246
  includeInfo?: boolean;
219
247
 
220
248
  /**
221
- * Filter by tool name (exact match). Multiple values are OR'd together.
249
+ * Query param: Filter by tool name (exact match). Multiple values are OR'd
250
+ * together.
222
251
  */
223
252
  names?: Array<string>;
224
253
 
225
254
  /**
226
- * Filter expression (query param: prefix)
255
+ * Query param: Filter expression (query param: prefix)
227
256
  */
228
257
  prefix?: string;
229
258
 
230
259
  /**
231
- * Free-form search query
260
+ * Query param: Free-form search query
232
261
  */
233
262
  query?: string;
234
263
 
235
264
  /**
236
- * Filter by approval requirement. Omitted = no filter; true = only tools requiring
237
- * approval; false = only tools not requiring approval.
265
+ * Query param: Filter by approval requirement. Omitted = no filter; true = only
266
+ * tools requiring approval; false = only tools not requiring approval.
238
267
  */
239
268
  requiresApproval?: boolean;
240
269
 
241
270
  /**
242
- * Sort order for results (asc or desc by creation time)
271
+ * Query param: Sort order for results (asc or desc by creation time)
243
272
  */
244
273
  sortOrder?: string;
245
274
 
246
275
  /**
247
- * Filter by tool status. Multiple values are OR'd together.
276
+ * Query param: Filter by tool status. Multiple values are OR'd together.
248
277
  */
249
278
  statuses?: Array<
250
279
  'TOOL_STATUS_UNSPECIFIED' | 'TOOL_STATUS_AVAILABLE' | 'TOOL_STATUS_OMITTED' | 'TOOL_STATUS_ARCHIVED'
@@ -253,8 +282,12 @@ export interface ToolListParams extends CursorPaginationParams {
253
282
 
254
283
  export interface ToolDeleteParams {
255
284
  /**
256
- * Tool set ID (from path). Accepts canonical ts\_… form or external_id:<value>
257
- * form (see common.proto "Path-parameter ID resolution").
285
+ * Workspace ID.
286
+ */
287
+ workspaceId: string;
288
+
289
+ /**
290
+ * Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
258
291
  */
259
292
  toolSetId: string;
260
293
  }
@@ -8,13 +8,9 @@ import { RequestOptions } from '../internal/request-options';
8
8
  import { path } from '../internal/utils/path';
9
9
 
10
10
  /**
11
- * UploadService issues short-lived presigned URLs for direct client-to-object-
12
- * storage uploads at the WORKSPACE level. Created uploads can be referenced by
13
- * id when creating or updating resources that accept binary content (e.g.,
14
- * MemoryEntry).
15
- *
16
- * Authentication: Bearer token (JWT)
17
- * Scope: Workspace-level operations
11
+ * Issue short-lived presigned URLs for direct client-to-object-storage
12
+ * uploads. Created uploads can be referenced by id when creating or updating
13
+ * resources that accept binary content (e.g., MemoryEntry).
18
14
  */
19
15
  export class Uploads extends APIResource {
20
16
  /**
@@ -22,27 +18,28 @@ export class Uploads extends APIResource {
22
18
  * returned id is used to reference the upload from resources that accept binary
23
19
  * content.
24
20
  */
25
- create(body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload> {
26
- return this._client.post('/v1/uploads', { body, ...options });
21
+ create(workspaceID: string, body: UploadCreateParams, options?: RequestOptions): APIPromise<Upload> {
22
+ return this._client.post(path`/v1/workspaces/${workspaceID}/uploads`, { body, ...options });
27
23
  }
28
24
 
29
25
  /**
30
26
  * Retrieves the current state of an upload, including its lifecycle status
31
27
  */
32
- retrieve(id: string, options?: RequestOptions): APIPromise<Upload> {
33
- return this._client.get(path`/v1/uploads/${id}`, options);
28
+ retrieve(id: string, params: UploadRetrieveParams, options?: RequestOptions): APIPromise<Upload> {
29
+ const { workspaceId } = params;
30
+ return this._client.get(path`/v1/workspaces/${workspaceId}/uploads/${id}`, options);
34
31
  }
35
32
  }
36
33
 
37
34
  /**
38
- * Upload is a workspace-scoped handle representing a single file upload flow.
39
- * Clients call CreateUpload to receive a short-lived presigned URL, PUT the file
40
- * directly to object storage, then reference the upload by id when creating or
41
- * updating resources that accept binary content.
35
+ * A handle representing a single file upload flow. Clients call CreateUpload to
36
+ * receive a short-lived presigned URL, PUT the file directly to object storage,
37
+ * then reference the upload by id when creating or updating resources that accept
38
+ * binary content.
42
39
  *
43
- * Uploads are one-shot: once consumed by a creating or updating resource, the
40
+ * Uploads are one-shot: once consumed by a creating or updating resource the
44
41
  * upload transitions to UPLOAD_STATUS_CONSUMED and cannot be reused. Unused
45
- * uploads expire and are garbage-collected by the runtime.
42
+ * uploads expire and are garbage-collected.
46
43
  */
47
44
  export interface Upload {
48
45
  info: UploadInfo;
@@ -57,9 +54,9 @@ export interface Upload {
57
54
 
58
55
  export interface UploadInfo {
59
56
  /**
60
- * Profile represents a human user at the account level. Profiles are
61
- * account-scoped resources that can be associated with multiple workspaces through
62
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
57
+ * A profile identifies a user or non-human principal (such as an API key) at the
58
+ * account level. Profiles are account-scoped and can be granted access to multiple
59
+ * workspaces.
63
60
  */
64
61
  createdBy?: AccountAPI.Profile;
65
62
 
@@ -118,11 +115,19 @@ export interface UploadCreateParams {
118
115
  spec: UploadSpec;
119
116
  }
120
117
 
118
+ export interface UploadRetrieveParams {
119
+ /**
120
+ * Workspace ID.
121
+ */
122
+ workspaceId: string;
123
+ }
124
+
121
125
  export declare namespace Uploads {
122
126
  export {
123
127
  type Upload as Upload,
124
128
  type UploadInfo as UploadInfo,
125
129
  type UploadSpec as UploadSpec,
126
130
  type UploadCreateParams as UploadCreateParams,
131
+ type UploadRetrieveParams as UploadRetrieveParams,
127
132
  };
128
133
  }
@@ -13,15 +13,24 @@ export class WorkspaceSecrets extends APIResource {
13
13
  /**
14
14
  * Creates a new workspace secret in the workspace
15
15
  */
16
- create(body: WorkspaceSecretCreateParams, options?: RequestOptions): APIPromise<WorkspaceSecret> {
17
- return this._client.post('/v1/workspace_secrets', { body, ...options });
16
+ create(
17
+ workspaceID: string,
18
+ body: WorkspaceSecretCreateParams,
19
+ options?: RequestOptions,
20
+ ): APIPromise<WorkspaceSecret> {
21
+ return this._client.post(path`/v1/workspaces/${workspaceID}/workspace_secrets`, { body, ...options });
18
22
  }
19
23
 
20
24
  /**
21
25
  * Retrieves a workspace secret by ID from the workspace
22
26
  */
23
- retrieve(id: string, options?: RequestOptions): APIPromise<WorkspaceSecret> {
24
- return this._client.get(path`/v1/workspace_secrets/${id}`, options);
27
+ retrieve(
28
+ id: string,
29
+ params: WorkspaceSecretRetrieveParams,
30
+ options?: RequestOptions,
31
+ ): APIPromise<WorkspaceSecret> {
32
+ const { workspaceId } = params;
33
+ return this._client.get(path`/v1/workspaces/${workspaceId}/workspace_secrets/${id}`, options);
25
34
  }
26
35
 
27
36
  /**
@@ -29,30 +38,37 @@ export class WorkspaceSecrets extends APIResource {
29
38
  */
30
39
  update(
31
40
  id: string,
32
- body: WorkspaceSecretUpdateParams,
41
+ params: WorkspaceSecretUpdateParams,
33
42
  options?: RequestOptions,
34
43
  ): APIPromise<WorkspaceSecret> {
35
- return this._client.patch(path`/v1/workspace_secrets/${id}`, { body, ...options });
44
+ const { workspaceId, ...body } = params;
45
+ return this._client.patch(path`/v1/workspaces/${workspaceId}/workspace_secrets/${id}`, {
46
+ body,
47
+ ...options,
48
+ });
36
49
  }
37
50
 
38
51
  /**
39
52
  * Lists all workspace secrets in the workspace
40
53
  */
41
54
  list(
55
+ workspaceID: string,
42
56
  query: WorkspaceSecretListParams | null | undefined = {},
43
57
  options?: RequestOptions,
44
58
  ): PagePromise<WorkspaceSecretsCursorPagination, WorkspaceSecret> {
45
- return this._client.getAPIList('/v1/workspace_secrets', CursorPagination<WorkspaceSecret>, {
46
- query,
47
- ...options,
48
- });
59
+ return this._client.getAPIList(
60
+ path`/v1/workspaces/${workspaceID}/workspace_secrets`,
61
+ CursorPagination<WorkspaceSecret>,
62
+ { query, ...options },
63
+ );
49
64
  }
50
65
 
51
66
  /**
52
67
  * Deletes a workspace secret from the workspace
53
68
  */
54
- delete(id: string, options?: RequestOptions): APIPromise<void> {
55
- return this._client.delete(path`/v1/workspace_secrets/${id}`, {
69
+ delete(id: string, params: WorkspaceSecretDeleteParams, options?: RequestOptions): APIPromise<void> {
70
+ const { workspaceId } = params;
71
+ return this._client.delete(path`/v1/workspaces/${workspaceId}/workspace_secrets/${id}`, {
56
72
  ...options,
57
73
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
58
74
  });
@@ -77,9 +93,9 @@ export interface WorkspaceSecret {
77
93
 
78
94
  export interface WorkspaceSecretInfo {
79
95
  /**
80
- * Profile represents a human user at the account level. Profiles are
81
- * account-scoped resources that can be associated with multiple workspaces through
82
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
96
+ * A profile identifies a user or non-human principal (such as an API key) at the
97
+ * account level. Profiles are account-scoped and can be granted access to multiple
98
+ * workspaces.
83
99
  */
84
100
  createdBy?: AccountAPI.Profile;
85
101
 
@@ -101,18 +117,34 @@ export interface WorkspaceSecretCreateParams {
101
117
  spec: WorkspaceSecretSpec;
102
118
  }
103
119
 
120
+ export interface WorkspaceSecretRetrieveParams {
121
+ /**
122
+ * The workspace the secret belongs to.
123
+ */
124
+ workspaceId: string;
125
+ }
126
+
104
127
  export interface WorkspaceSecretUpdateParams {
105
128
  /**
106
- * UpdateResourceMetadata contains the user-provided fields for updating a
107
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
108
- * profile_id, created_at) are excluded since they are set by the server.
129
+ * Path param: The workspace the secret belongs to.
130
+ */
131
+ workspaceId: string;
132
+
133
+ /**
134
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
135
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
136
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
137
+ * server.
109
138
  */
110
139
  metadata?: Shared.UpdateResourceMetadata;
111
140
 
141
+ /**
142
+ * Body param
143
+ */
112
144
  spec?: WorkspaceSecretSpec;
113
145
 
114
146
  /**
115
- * Fields to update
147
+ * Body param: Fields to update.
116
148
  */
117
149
  updateMask?: string;
118
150
  }
@@ -144,6 +176,13 @@ export interface WorkspaceSecretListParams extends CursorPaginationParams {
144
176
  sortOrder?: string;
145
177
  }
146
178
 
179
+ export interface WorkspaceSecretDeleteParams {
180
+ /**
181
+ * The workspace the secret belongs to.
182
+ */
183
+ workspaceId: string;
184
+ }
185
+
147
186
  export declare namespace WorkspaceSecrets {
148
187
  export {
149
188
  type WorkspaceSecret as WorkspaceSecret,
@@ -151,7 +190,9 @@ export declare namespace WorkspaceSecrets {
151
190
  type WorkspaceSecretSpec as WorkspaceSecretSpec,
152
191
  type WorkspaceSecretsCursorPagination as WorkspaceSecretsCursorPagination,
153
192
  type WorkspaceSecretCreateParams as WorkspaceSecretCreateParams,
193
+ type WorkspaceSecretRetrieveParams as WorkspaceSecretRetrieveParams,
154
194
  type WorkspaceSecretUpdateParams as WorkspaceSecretUpdateParams,
155
195
  type WorkspaceSecretListParams as WorkspaceSecretListParams,
196
+ type WorkspaceSecretDeleteParams as WorkspaceSecretDeleteParams,
156
197
  };
157
198
  }
@@ -7,12 +7,8 @@ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../c
7
7
  import { RequestOptions } from '../internal/request-options';
8
8
 
9
9
  /**
10
- * WorkspaceService manages workspaces at the ACCOUNT level.
11
- * This service is responsible for creating and listing workspaces within an account.
12
- * Workspaces provide organizational grouping for resources within an account.
13
- *
14
- * Authentication: Bearer token (JWT)
15
- * Scope: Account-level operations (manages workspaces themselves, not resources within workspaces)
10
+ * Manage workspaces within an account. Workspaces provide organizational
11
+ * grouping and isolation for resources such as agents, tools, and API keys.
16
12
  */
17
13
  export class Workspaces extends APIResource {
18
14
  /**
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.66.0'; // x-release-please-version
1
+ export const VERSION = '0.68.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.66.0";
1
+ export declare const VERSION = "0.68.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.66.0";
1
+ export declare const VERSION = "0.68.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.66.0'; // x-release-please-version
4
+ exports.VERSION = '0.68.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.66.0'; // x-release-please-version
1
+ export const VERSION = '0.68.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map