@cadenya/cadenya 0.82.0 → 0.85.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 (177) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +8 -17
  3. package/client.d.mts +15 -12
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +15 -12
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/account.d.mts +1 -1
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +1 -1
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/account.js +1 -1
  17. package/resources/account.js.map +1 -1
  18. package/resources/account.mjs +1 -1
  19. package/resources/account.mjs.map +1 -1
  20. package/resources/agents/agents.d.mts +55 -9
  21. package/resources/agents/agents.d.mts.map +1 -1
  22. package/resources/agents/agents.d.ts +55 -9
  23. package/resources/agents/agents.d.ts.map +1 -1
  24. package/resources/agents/agents.js +38 -0
  25. package/resources/agents/agents.js.map +1 -1
  26. package/resources/agents/agents.mjs +38 -0
  27. package/resources/agents/agents.mjs.map +1 -1
  28. package/resources/agents/index.d.mts +2 -2
  29. package/resources/agents/index.d.mts.map +1 -1
  30. package/resources/agents/index.d.ts +2 -2
  31. package/resources/agents/index.d.ts.map +1 -1
  32. package/resources/agents/index.js.map +1 -1
  33. package/resources/agents/index.mjs.map +1 -1
  34. package/resources/agents/schedules.d.mts +57 -6
  35. package/resources/agents/schedules.d.mts.map +1 -1
  36. package/resources/agents/schedules.d.ts +57 -6
  37. package/resources/agents/schedules.d.ts.map +1 -1
  38. package/resources/agents/schedules.js +34 -0
  39. package/resources/agents/schedules.js.map +1 -1
  40. package/resources/agents/schedules.mjs +34 -0
  41. package/resources/agents/schedules.mjs.map +1 -1
  42. package/resources/ai-provider-keys.d.mts +142 -0
  43. package/resources/ai-provider-keys.d.mts.map +1 -0
  44. package/resources/ai-provider-keys.d.ts +142 -0
  45. package/resources/ai-provider-keys.d.ts.map +1 -0
  46. package/resources/ai-provider-keys.js +51 -0
  47. package/resources/ai-provider-keys.js.map +1 -0
  48. package/resources/ai-provider-keys.mjs +47 -0
  49. package/resources/ai-provider-keys.mjs.map +1 -0
  50. package/resources/api-keys/api-keys.d.mts +4 -2
  51. package/resources/api-keys/api-keys.d.mts.map +1 -1
  52. package/resources/api-keys/api-keys.d.ts +4 -2
  53. package/resources/api-keys/api-keys.d.ts.map +1 -1
  54. package/resources/api-keys/api-keys.js +2 -2
  55. package/resources/api-keys/api-keys.js.map +1 -1
  56. package/resources/api-keys/api-keys.mjs +2 -2
  57. package/resources/api-keys/api-keys.mjs.map +1 -1
  58. package/resources/api-keys/index.d.mts +1 -1
  59. package/resources/api-keys/index.d.mts.map +1 -1
  60. package/resources/api-keys/index.d.ts +1 -1
  61. package/resources/api-keys/index.d.ts.map +1 -1
  62. package/resources/api-keys/index.js.map +1 -1
  63. package/resources/api-keys/index.mjs.map +1 -1
  64. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +23 -7
  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 +23 -7
  67. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  68. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  69. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  70. package/resources/index.d.mts +7 -6
  71. package/resources/index.d.mts.map +1 -1
  72. package/resources/index.d.ts +7 -6
  73. package/resources/index.d.ts.map +1 -1
  74. package/resources/index.js +3 -1
  75. package/resources/index.js.map +1 -1
  76. package/resources/index.mjs +1 -0
  77. package/resources/index.mjs.map +1 -1
  78. package/resources/models.d.mts +84 -13
  79. package/resources/models.d.mts.map +1 -1
  80. package/resources/models.d.ts +84 -13
  81. package/resources/models.d.ts.map +1 -1
  82. package/resources/models.js +22 -3
  83. package/resources/models.js.map +1 -1
  84. package/resources/models.mjs +22 -3
  85. package/resources/models.mjs.map +1 -1
  86. package/resources/objectives/index.d.mts +1 -1
  87. package/resources/objectives/index.d.mts.map +1 -1
  88. package/resources/objectives/index.d.ts +1 -1
  89. package/resources/objectives/index.d.ts.map +1 -1
  90. package/resources/objectives/index.js.map +1 -1
  91. package/resources/objectives/index.mjs.map +1 -1
  92. package/resources/objectives/objectives.d.mts +149 -98
  93. package/resources/objectives/objectives.d.mts.map +1 -1
  94. package/resources/objectives/objectives.d.ts +149 -98
  95. package/resources/objectives/objectives.d.ts.map +1 -1
  96. package/resources/objectives/objectives.js +3 -3
  97. package/resources/objectives/objectives.js.map +1 -1
  98. package/resources/objectives/objectives.mjs +3 -3
  99. package/resources/objectives/objectives.mjs.map +1 -1
  100. package/resources/objectives/tool-calls.d.mts +1 -1
  101. package/resources/objectives/tool-calls.d.mts.map +1 -1
  102. package/resources/objectives/tool-calls.d.ts +1 -1
  103. package/resources/objectives/tool-calls.d.ts.map +1 -1
  104. package/resources/objectives/tool-calls.js +2 -2
  105. package/resources/objectives/tool-calls.js.map +1 -1
  106. package/resources/objectives/tool-calls.mjs +2 -2
  107. package/resources/objectives/tool-calls.mjs.map +1 -1
  108. package/resources/shared.d.mts +4 -0
  109. package/resources/shared.d.mts.map +1 -1
  110. package/resources/shared.d.ts +4 -0
  111. package/resources/shared.d.ts.map +1 -1
  112. package/resources/tool-sets/index.d.mts +2 -2
  113. package/resources/tool-sets/index.d.mts.map +1 -1
  114. package/resources/tool-sets/index.d.ts +2 -2
  115. package/resources/tool-sets/index.d.ts.map +1 -1
  116. package/resources/tool-sets/index.js.map +1 -1
  117. package/resources/tool-sets/index.mjs.map +1 -1
  118. package/resources/tool-sets/tool-sets.d.mts +40 -3
  119. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  120. package/resources/tool-sets/tool-sets.d.ts +40 -3
  121. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  122. package/resources/tool-sets/tool-sets.js +27 -1
  123. package/resources/tool-sets/tool-sets.js.map +1 -1
  124. package/resources/tool-sets/tool-sets.mjs +27 -1
  125. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  126. package/resources/tool-sets/tools.d.mts +39 -5
  127. package/resources/tool-sets/tools.d.mts.map +1 -1
  128. package/resources/tool-sets/tools.d.ts +39 -5
  129. package/resources/tool-sets/tools.d.ts.map +1 -1
  130. package/resources/tool-sets/tools.js +23 -1
  131. package/resources/tool-sets/tools.js.map +1 -1
  132. package/resources/tool-sets/tools.mjs +23 -1
  133. package/resources/tool-sets/tools.mjs.map +1 -1
  134. package/resources/workspace-admin/index.d.mts +1 -1
  135. package/resources/workspace-admin/index.d.mts.map +1 -1
  136. package/resources/workspace-admin/index.d.ts +1 -1
  137. package/resources/workspace-admin/index.d.ts.map +1 -1
  138. package/resources/workspace-admin/index.js.map +1 -1
  139. package/resources/workspace-admin/index.mjs.map +1 -1
  140. package/resources/workspace-admin/profiles.d.mts +1 -6
  141. package/resources/workspace-admin/profiles.d.mts.map +1 -1
  142. package/resources/workspace-admin/profiles.d.ts +1 -6
  143. package/resources/workspace-admin/profiles.d.ts.map +1 -1
  144. package/resources/workspace-admin/workspace-admin.d.mts +43 -1
  145. package/resources/workspace-admin/workspace-admin.d.mts.map +1 -1
  146. package/resources/workspace-admin/workspace-admin.d.ts +43 -1
  147. package/resources/workspace-admin/workspace-admin.d.ts.map +1 -1
  148. package/resources/workspace-admin/workspace-admin.js +6 -0
  149. package/resources/workspace-admin/workspace-admin.js.map +1 -1
  150. package/resources/workspace-admin/workspace-admin.mjs +6 -0
  151. package/resources/workspace-admin/workspace-admin.mjs.map +1 -1
  152. package/src/client.ts +53 -8
  153. package/src/resources/account.ts +2 -2
  154. package/src/resources/agents/agents.ts +89 -15
  155. package/src/resources/agents/index.ts +7 -0
  156. package/src/resources/agents/schedules.ts +87 -10
  157. package/src/resources/ai-provider-keys.ts +216 -0
  158. package/src/resources/api-keys/api-keys.ts +5 -2
  159. package/src/resources/api-keys/index.ts +1 -0
  160. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +26 -7
  161. package/src/resources/index.ts +25 -4
  162. package/src/resources/models.ts +109 -15
  163. package/src/resources/objectives/index.ts +2 -3
  164. package/src/resources/objectives/objectives.ts +171 -120
  165. package/src/resources/objectives/tool-calls.ts +11 -11
  166. package/src/resources/shared.ts +5 -0
  167. package/src/resources/tool-sets/index.ts +4 -0
  168. package/src/resources/tool-sets/tool-sets.ts +62 -1
  169. package/src/resources/tool-sets/tools.ts +60 -12
  170. package/src/resources/workspace-admin/index.ts +1 -0
  171. package/src/resources/workspace-admin/profiles.ts +1 -7
  172. package/src/resources/workspace-admin/workspace-admin.ts +54 -0
  173. package/src/version.ts +1 -1
  174. package/version.d.mts +1 -1
  175. package/version.d.ts +1 -1
  176. package/version.js +1 -1
  177. package/version.mjs +1 -1
@@ -41,7 +41,7 @@ export class Tools extends APIResource {
41
41
  */
42
42
  update(id: string, params: ToolUpdateParams, options?: RequestOptions): APIPromise<Tool> {
43
43
  const { workspaceId, toolSetId, ...body } = params;
44
- return this._client.put(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
44
+ return this._client.patch(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}`, {
45
45
  body,
46
46
  ...options,
47
47
  });
@@ -73,6 +73,30 @@ export class Tools extends APIResource {
73
73
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
74
74
  });
75
75
  }
76
+
77
+ /**
78
+ * Transitions a tool to STATE_OMITTED, excluding it from agent use. Fails if the
79
+ * tool is currently assigned to agent variations.
80
+ */
81
+ omit(id: string, params: ToolOmitParams, options?: RequestOptions): APIPromise<Tool> {
82
+ const { workspaceId, toolSetId, ...body } = params;
83
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}:omit`, {
84
+ body,
85
+ ...options,
86
+ });
87
+ }
88
+
89
+ /**
90
+ * Transitions an omitted tool back to STATE_AVAILABLE. For managed tool sets, the
91
+ * next sync may omit the tool again if its filters still exclude it.
92
+ */
93
+ restore(id: string, params: ToolRestoreParams, options?: RequestOptions): APIPromise<Tool> {
94
+ const { workspaceId, toolSetId, ...body } = params;
95
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/tools/${id}:restore`, {
96
+ body,
97
+ ...options,
98
+ });
99
+ }
76
100
  }
77
101
 
78
102
  export type ToolsCursorPagination = CursorPagination<Tool>;
@@ -125,6 +149,12 @@ export interface Tool {
125
149
 
126
150
  spec: ToolSpec;
127
151
 
152
+ /**
153
+ * The current lifecycle state of the tool. Output only. Use the :omit and :restore
154
+ * actions to transition; tool set syncs may also update it.
155
+ */
156
+ state: 'STATE_UNSPECIFIED' | 'STATE_AVAILABLE' | 'STATE_OMITTED' | 'STATE_ARCHIVED';
157
+
128
158
  info?: ToolInfo;
129
159
  }
130
160
 
@@ -154,13 +184,7 @@ export interface ToolSpec {
154
184
 
155
185
  parameters: { [key: string]: unknown };
156
186
 
157
- status:
158
- | 'TOOL_STATUS_UNSPECIFIED'
159
- | 'TOOL_STATUS_AVAILABLE'
160
- | 'TOOL_STATUS_OMITTED'
161
- | 'TOOL_STATUS_ARCHIVED';
162
-
163
- requiresApproval?: boolean;
187
+ requiresApproval: boolean;
164
188
  }
165
189
 
166
190
  /**
@@ -283,11 +307,9 @@ export interface ToolListParams extends CursorPaginationParams {
283
307
  sortOrder?: string;
284
308
 
285
309
  /**
286
- * Query param: Filter by tool status. Multiple values are OR'd together.
310
+ * Query param: Filter by tool state. Multiple values are OR'd together.
287
311
  */
288
- statuses?: Array<
289
- 'TOOL_STATUS_UNSPECIFIED' | 'TOOL_STATUS_AVAILABLE' | 'TOOL_STATUS_OMITTED' | 'TOOL_STATUS_ARCHIVED'
290
- >;
312
+ states?: Array<'STATE_UNSPECIFIED' | 'STATE_AVAILABLE' | 'STATE_OMITTED' | 'STATE_ARCHIVED'>;
291
313
  }
292
314
 
293
315
  export interface ToolDeleteParams {
@@ -302,6 +324,30 @@ export interface ToolDeleteParams {
302
324
  toolSetId: string;
303
325
  }
304
326
 
327
+ export interface ToolOmitParams {
328
+ /**
329
+ * Workspace ID.
330
+ */
331
+ workspaceId: string;
332
+
333
+ /**
334
+ * Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
335
+ */
336
+ toolSetId: string;
337
+ }
338
+
339
+ export interface ToolRestoreParams {
340
+ /**
341
+ * Workspace ID.
342
+ */
343
+ workspaceId: string;
344
+
345
+ /**
346
+ * Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
347
+ */
348
+ toolSetId: string;
349
+ }
350
+
305
351
  export declare namespace Tools {
306
352
  export {
307
353
  type ConfigHTTP as ConfigHTTP,
@@ -317,5 +363,7 @@ export declare namespace Tools {
317
363
  type ToolUpdateParams as ToolUpdateParams,
318
364
  type ToolListParams as ToolListParams,
319
365
  type ToolDeleteParams as ToolDeleteParams,
366
+ type ToolOmitParams as ToolOmitParams,
367
+ type ToolRestoreParams as ToolRestoreParams,
320
368
  };
321
369
  }
@@ -6,6 +6,7 @@ export {
6
6
  WorkspaceAdmin,
7
7
  type WorkspaceMember,
8
8
  type WorkspaceAdminCreateParams,
9
+ type WorkspaceAdminUpdateParams,
9
10
  type WorkspaceAdminListParams,
10
11
  type WorkspaceMembersCursorPagination,
11
12
  } from './workspace-admin';
@@ -33,15 +33,9 @@ export class Profiles extends APIResource {
33
33
  export interface ProfileListParams extends CursorPaginationParams {
34
34
  /**
35
35
  * Free-form search over profile name and email. Case-insensitive substring match;
36
- * empty returns all profiles (subject to the type filter).
36
+ * empty returns all profiles.
37
37
  */
38
38
  query?: string;
39
-
40
- /**
41
- * Filter by profile type. Defaults to all types when unset; pass PROFILE_TYPE_USER
42
- * to list only human users (the common case for a member picker).
43
- */
44
- type?: 'PROFILE_TYPE_USER' | 'PROFILE_TYPE_API_KEY' | 'PROFILE_TYPE_SYSTEM';
45
39
  }
46
40
 
47
41
  export declare namespace Profiles {
@@ -39,6 +39,17 @@ export class WorkspaceAdmin extends APIResource {
39
39
  return this._client.get(path`/v1/account/workspaces/${workspaceID}`, options);
40
40
  }
41
41
 
42
+ /**
43
+ * Updates a workspace's metadata (e.g. name) and spec. Admin only.
44
+ */
45
+ update(
46
+ workspaceID: string,
47
+ body: WorkspaceAdminUpdateParams,
48
+ options?: RequestOptions,
49
+ ): APIPromise<WorkspacesAPI.Workspace> {
50
+ return this._client.patch(path`/v1/account/workspaces/${workspaceID}`, { body, ...options });
51
+ }
52
+
42
53
  /**
43
54
  * Lists every workspace in the account, optionally including archived ones. Admin
44
55
  * only.
@@ -137,6 +148,48 @@ export namespace WorkspaceAdminCreateParams {
137
148
  }
138
149
  }
139
150
 
151
+ export interface WorkspaceAdminUpdateParams {
152
+ /**
153
+ * UpdateAccountResourceMetadata contains the user-provided fields for updating an
154
+ * account-scoped resource. Read-only fields (id, account_id, profile_id) are
155
+ * excluded since they are set by the server.
156
+ */
157
+ metadata?: WorkspaceAdminUpdateParams.Metadata;
158
+
159
+ spec?: WorkspacesAPI.WorkspaceSpec;
160
+
161
+ /**
162
+ * Fields to update.
163
+ */
164
+ updateMask?: string;
165
+ }
166
+
167
+ export namespace WorkspaceAdminUpdateParams {
168
+ /**
169
+ * UpdateAccountResourceMetadata contains the user-provided fields for updating an
170
+ * account-scoped resource. Read-only fields (id, account_id, profile_id) are
171
+ * excluded since they are set by the server.
172
+ */
173
+ export interface Metadata {
174
+ /**
175
+ * Human-readable name for the resource (e.g., "Production API Key", "Staging
176
+ * Workspace")
177
+ */
178
+ name: string;
179
+
180
+ /**
181
+ * External ID for the resource (e.g., a workflow ID from an external system)
182
+ */
183
+ externalId?: string;
184
+
185
+ /**
186
+ * Arbitrary key-value pairs for categorization and filtering Examples:
187
+ * {"environment": "production", "team": "platform", "version": "v2"}
188
+ */
189
+ labels?: { [key: string]: string };
190
+ }
191
+ }
192
+
140
193
  export interface WorkspaceAdminListParams extends CursorPaginationParams {
141
194
  /**
142
195
  * When true, archived workspaces are included in the results. Defaults to false
@@ -152,6 +205,7 @@ export declare namespace WorkspaceAdmin {
152
205
  export {
153
206
  type WorkspaceMember as WorkspaceMember,
154
207
  type WorkspaceAdminCreateParams as WorkspaceAdminCreateParams,
208
+ type WorkspaceAdminUpdateParams as WorkspaceAdminUpdateParams,
155
209
  type WorkspaceAdminListParams as WorkspaceAdminListParams,
156
210
  };
157
211
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.82.0'; // x-release-please-version
1
+ export const VERSION = '0.85.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.82.0";
1
+ export declare const VERSION = "0.85.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.82.0";
1
+ export declare const VERSION = "0.85.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.82.0'; // x-release-please-version
4
+ exports.VERSION = '0.85.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.82.0'; // x-release-please-version
1
+ export const VERSION = '0.85.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map