@cadenya/cadenya 0.84.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 (113) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +8 -8
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +8 -8
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/account.js +1 -1
  10. package/resources/account.js.map +1 -1
  11. package/resources/account.mjs +1 -1
  12. package/resources/account.mjs.map +1 -1
  13. package/resources/agents/agents.d.mts +55 -9
  14. package/resources/agents/agents.d.mts.map +1 -1
  15. package/resources/agents/agents.d.ts +55 -9
  16. package/resources/agents/agents.d.ts.map +1 -1
  17. package/resources/agents/agents.js +38 -0
  18. package/resources/agents/agents.js.map +1 -1
  19. package/resources/agents/agents.mjs +38 -0
  20. package/resources/agents/agents.mjs.map +1 -1
  21. package/resources/agents/index.d.mts +2 -2
  22. package/resources/agents/index.d.mts.map +1 -1
  23. package/resources/agents/index.d.ts +2 -2
  24. package/resources/agents/index.d.ts.map +1 -1
  25. package/resources/agents/index.js.map +1 -1
  26. package/resources/agents/index.mjs.map +1 -1
  27. package/resources/agents/schedules.d.mts +57 -6
  28. package/resources/agents/schedules.d.mts.map +1 -1
  29. package/resources/agents/schedules.d.ts +57 -6
  30. package/resources/agents/schedules.d.ts.map +1 -1
  31. package/resources/agents/schedules.js +34 -0
  32. package/resources/agents/schedules.js.map +1 -1
  33. package/resources/agents/schedules.mjs +34 -0
  34. package/resources/agents/schedules.mjs.map +1 -1
  35. package/resources/api-keys/api-keys.d.mts +4 -2
  36. package/resources/api-keys/api-keys.d.mts.map +1 -1
  37. package/resources/api-keys/api-keys.d.ts +4 -2
  38. package/resources/api-keys/api-keys.d.ts.map +1 -1
  39. package/resources/api-keys/api-keys.js +2 -2
  40. package/resources/api-keys/api-keys.js.map +1 -1
  41. package/resources/api-keys/api-keys.mjs +2 -2
  42. package/resources/api-keys/api-keys.mjs.map +1 -1
  43. package/resources/api-keys/index.d.mts +1 -1
  44. package/resources/api-keys/index.d.mts.map +1 -1
  45. package/resources/api-keys/index.d.ts +1 -1
  46. package/resources/api-keys/index.d.ts.map +1 -1
  47. package/resources/api-keys/index.js.map +1 -1
  48. package/resources/api-keys/index.mjs.map +1 -1
  49. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +23 -7
  50. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
  51. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +23 -7
  52. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  53. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  54. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  55. package/resources/index.d.mts +4 -4
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +4 -4
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js.map +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/models.d.mts +22 -13
  62. package/resources/models.d.mts.map +1 -1
  63. package/resources/models.d.ts +22 -13
  64. package/resources/models.d.ts.map +1 -1
  65. package/resources/models.js +12 -3
  66. package/resources/models.js.map +1 -1
  67. package/resources/models.mjs +12 -3
  68. package/resources/models.mjs.map +1 -1
  69. package/resources/shared.d.mts +4 -0
  70. package/resources/shared.d.mts.map +1 -1
  71. package/resources/shared.d.ts +4 -0
  72. package/resources/shared.d.ts.map +1 -1
  73. package/resources/tool-sets/index.d.mts +2 -2
  74. package/resources/tool-sets/index.d.mts.map +1 -1
  75. package/resources/tool-sets/index.d.ts +2 -2
  76. package/resources/tool-sets/index.d.ts.map +1 -1
  77. package/resources/tool-sets/index.js.map +1 -1
  78. package/resources/tool-sets/index.mjs.map +1 -1
  79. package/resources/tool-sets/tool-sets.d.mts +40 -3
  80. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  81. package/resources/tool-sets/tool-sets.d.ts +40 -3
  82. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  83. package/resources/tool-sets/tool-sets.js +27 -1
  84. package/resources/tool-sets/tool-sets.js.map +1 -1
  85. package/resources/tool-sets/tool-sets.mjs +27 -1
  86. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  87. package/resources/tool-sets/tools.d.mts +39 -5
  88. package/resources/tool-sets/tools.d.mts.map +1 -1
  89. package/resources/tool-sets/tools.d.ts +39 -5
  90. package/resources/tool-sets/tools.d.ts.map +1 -1
  91. package/resources/tool-sets/tools.js +23 -1
  92. package/resources/tool-sets/tools.js.map +1 -1
  93. package/resources/tool-sets/tools.mjs +23 -1
  94. package/resources/tool-sets/tools.mjs.map +1 -1
  95. package/src/client.ts +18 -2
  96. package/src/resources/account.ts +1 -1
  97. package/src/resources/agents/agents.ts +89 -15
  98. package/src/resources/agents/index.ts +7 -0
  99. package/src/resources/agents/schedules.ts +87 -10
  100. package/src/resources/api-keys/api-keys.ts +5 -2
  101. package/src/resources/api-keys/index.ts +1 -0
  102. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +26 -7
  103. package/src/resources/index.ts +9 -1
  104. package/src/resources/models.ts +29 -15
  105. package/src/resources/shared.ts +5 -0
  106. package/src/resources/tool-sets/index.ts +4 -0
  107. package/src/resources/tool-sets/tool-sets.ts +62 -1
  108. package/src/resources/tool-sets/tools.ts +60 -12
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
@@ -13,6 +13,8 @@ import {
13
13
  ToolDeleteParams,
14
14
  ToolInfo,
15
15
  ToolListParams,
16
+ ToolOmitParams,
17
+ ToolRestoreParams,
16
18
  ToolRetrieveParams,
17
19
  ToolSpec,
18
20
  ToolSpecConfig,
@@ -56,7 +58,7 @@ export class ToolSets extends APIResource {
56
58
  */
57
59
  update(id: string, params: ToolSetUpdateParams, options?: RequestOptions): APIPromise<ToolSet> {
58
60
  const { workspaceId, ...body } = params;
59
- return this._client.put(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, { body, ...options });
61
+ return this._client.patch(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, { body, ...options });
60
62
  }
61
63
 
62
64
  /**
@@ -84,6 +86,21 @@ export class ToolSets extends APIResource {
84
86
  });
85
87
  }
86
88
 
89
+ /**
90
+ * Transitions a tool set to STATE_ARCHIVED. Syncing stops, the tool set is hidden
91
+ * from list results, its tools are no longer offered to objectives, and new
92
+ * variation assignments are rejected. Existing assignments are retained, and
93
+ * history is preserved — unlike delete, archiving works while the tool set is
94
+ * still assigned to agent variations.
95
+ */
96
+ archive(id: string, params: ToolSetArchiveParams, options?: RequestOptions): APIPromise<ToolSet> {
97
+ const { workspaceId, ...body } = params;
98
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${id}:archive`, {
99
+ body,
100
+ ...options,
101
+ });
102
+ }
103
+
87
104
  /**
88
105
  * Retrieves the current OpenAPI specification JSON that has been consumed by the
89
106
  * tool set. Only applicable to tool sets using the OpenAPI adapter.
@@ -112,6 +129,19 @@ export class ToolSets extends APIResource {
112
129
  { query, ...options },
113
130
  );
114
131
  }
132
+
133
+ /**
134
+ * Transitions an archived tool set back to STATE_ACTIVE. Managed tool sets resume
135
+ * syncing on their next cycle and their tools become available to objectives
136
+ * again.
137
+ */
138
+ unarchive(id: string, params: ToolSetUnarchiveParams, options?: RequestOptions): APIPromise<ToolSet> {
139
+ const { workspaceId, ...body } = params;
140
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${id}:unarchive`, {
141
+ body,
142
+ ...options,
143
+ });
144
+ }
115
145
  }
116
146
 
117
147
  export type ToolSetsCursorPagination = CursorPagination<ToolSet>;
@@ -222,6 +252,13 @@ export interface ToolSet {
222
252
 
223
253
  spec: ToolSetSpec;
224
254
 
255
+ /**
256
+ * The current lifecycle state of the tool set. Output only. Tool sets are created
257
+ * STATE_ACTIVE; use the :archive and :unarchive actions to transition between
258
+ * states.
259
+ */
260
+ state: 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
261
+
225
262
  /**
226
263
  * Tool set information
227
264
  */
@@ -470,6 +507,12 @@ export interface ToolSetListParams extends CursorPaginationParams {
470
507
  * Sort order for results (asc or desc by creation time)
471
508
  */
472
509
  sortOrder?: string;
510
+
511
+ /**
512
+ * Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when unspecified;
513
+ * pass STATE_ARCHIVED to list archived tool sets.
514
+ */
515
+ state?: 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
473
516
  }
474
517
 
475
518
  export interface ToolSetDeleteParams {
@@ -479,6 +522,13 @@ export interface ToolSetDeleteParams {
479
522
  workspaceId: string;
480
523
  }
481
524
 
525
+ export interface ToolSetArchiveParams {
526
+ /**
527
+ * Workspace ID.
528
+ */
529
+ workspaceId: string;
530
+ }
531
+
482
532
  export interface ToolSetGetOpenAPISpecParams {
483
533
  /**
484
534
  * Workspace ID.
@@ -503,6 +553,13 @@ export interface ToolSetListEventsParams extends CursorPaginationParams {
503
553
  sortOrder?: string;
504
554
  }
505
555
 
556
+ export interface ToolSetUnarchiveParams {
557
+ /**
558
+ * Workspace ID.
559
+ */
560
+ workspaceId: string;
561
+ }
562
+
506
563
  ToolSets.Tools = Tools;
507
564
 
508
565
  export declare namespace ToolSets {
@@ -531,8 +588,10 @@ export declare namespace ToolSets {
531
588
  type ToolSetUpdateParams as ToolSetUpdateParams,
532
589
  type ToolSetListParams as ToolSetListParams,
533
590
  type ToolSetDeleteParams as ToolSetDeleteParams,
591
+ type ToolSetArchiveParams as ToolSetArchiveParams,
534
592
  type ToolSetGetOpenAPISpecParams as ToolSetGetOpenAPISpecParams,
535
593
  type ToolSetListEventsParams as ToolSetListEventsParams,
594
+ type ToolSetUnarchiveParams as ToolSetUnarchiveParams,
536
595
  };
537
596
 
538
597
  export {
@@ -550,5 +609,7 @@ export declare namespace ToolSets {
550
609
  type ToolUpdateParams as ToolUpdateParams,
551
610
  type ToolListParams as ToolListParams,
552
611
  type ToolDeleteParams as ToolDeleteParams,
612
+ type ToolOmitParams as ToolOmitParams,
613
+ type ToolRestoreParams as ToolRestoreParams,
553
614
  };
554
615
  }
@@ -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
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.84.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.84.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.84.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.84.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.84.0'; // x-release-please-version
1
+ export const VERSION = '0.85.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map