@cadenya/cadenya 0.76.0 → 0.78.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 (52) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  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/agents/agents.d.mts +6 -2
  10. package/resources/agents/agents.d.mts.map +1 -1
  11. package/resources/agents/agents.d.ts +6 -2
  12. package/resources/agents/agents.d.ts.map +1 -1
  13. package/resources/index.d.mts +1 -1
  14. package/resources/index.d.mts.map +1 -1
  15. package/resources/index.d.ts +1 -1
  16. package/resources/index.d.ts.map +1 -1
  17. package/resources/index.js.map +1 -1
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/objectives/objectives.d.mts +6 -2
  20. package/resources/objectives/objectives.d.mts.map +1 -1
  21. package/resources/objectives/objectives.d.ts +6 -2
  22. package/resources/objectives/objectives.d.ts.map +1 -1
  23. package/resources/tool-sets/index.d.mts +2 -2
  24. package/resources/tool-sets/index.d.mts.map +1 -1
  25. package/resources/tool-sets/index.d.ts +2 -2
  26. package/resources/tool-sets/index.d.ts.map +1 -1
  27. package/resources/tool-sets/index.js.map +1 -1
  28. package/resources/tool-sets/index.mjs.map +1 -1
  29. package/resources/tool-sets/tool-sets.d.mts +96 -45
  30. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  31. package/resources/tool-sets/tool-sets.d.ts +96 -45
  32. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  33. package/resources/tool-sets/tool-sets.js +8 -0
  34. package/resources/tool-sets/tool-sets.js.map +1 -1
  35. package/resources/tool-sets/tool-sets.mjs +8 -0
  36. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  37. package/resources/tool-sets/tools.d.mts +7 -1
  38. package/resources/tool-sets/tools.d.mts.map +1 -1
  39. package/resources/tool-sets/tools.d.ts +7 -1
  40. package/resources/tool-sets/tools.d.ts.map +1 -1
  41. package/src/client.ts +14 -2
  42. package/src/resources/agents/agents.ts +2 -2
  43. package/src/resources/index.ts +7 -1
  44. package/src/resources/objectives/objectives.ts +2 -2
  45. package/src/resources/tool-sets/index.ts +8 -1
  46. package/src/resources/tool-sets/tool-sets.ts +120 -44
  47. package/src/resources/tool-sets/tools.ts +11 -0
  48. package/src/version.ts +1 -1
  49. package/version.d.mts +1 -1
  50. package/version.d.ts +1 -1
  51. package/version.js +1 -1
  52. package/version.mjs +1 -1
@@ -1,13 +1,13 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as ToolSetsAPI from './tool-sets';
5
4
  import * as AccountAPI from '../account';
6
5
  import * as Shared from '../shared';
7
6
  import * as ToolsAPI from './tools';
8
7
  import {
9
8
  ConfigHTTP,
10
9
  ConfigMcp,
10
+ ConfigOpenAPI,
11
11
  Tool,
12
12
  ToolCreateParams,
13
13
  ToolDeleteParams,
@@ -84,6 +84,19 @@ export class ToolSets extends APIResource {
84
84
  });
85
85
  }
86
86
 
87
+ /**
88
+ * Retrieves the current OpenAPI specification JSON that has been consumed by the
89
+ * tool set. Only applicable to tool sets using the OpenAPI adapter.
90
+ */
91
+ getOpenAPISpec(
92
+ toolSetID: string,
93
+ params: ToolSetGetOpenAPISpecParams,
94
+ options?: RequestOptions,
95
+ ): APIPromise<ToolSetGetOpenAPISpecResponse> {
96
+ const { workspaceId } = params;
97
+ return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/openapi_spec`, options);
98
+ }
99
+
87
100
  /**
88
101
  * Lists all events (including sync status) for a tool set
89
102
  */
@@ -106,45 +119,45 @@ export type ToolSetsCursorPagination = CursorPagination<ToolSet>;
106
119
  export type ToolSetEventsCursorPagination = CursorPagination<ToolSetEvent>;
107
120
 
108
121
  /**
109
- * Top-level filter with simple boolean logic (no nesting)
122
+ * Approval filters that will automatically set the approval requirement on tools
123
+ * synced from an external source
110
124
  */
111
- export interface McpToolFilter {
112
- operator: 'OPERATOR_UNSPECIFIED' | 'OPERATOR_AND' | 'OPERATOR_OR';
125
+ export interface ApprovalRequirementFilter {
126
+ always?: boolean;
113
127
 
114
- filters?: Array<McpToolFilter.Filter>;
128
+ /**
129
+ * Top-level filter with simple boolean logic (no nesting)
130
+ */
131
+ only?: ToolFilter;
115
132
  }
116
133
 
117
- export namespace McpToolFilter {
134
+ /**
135
+ * Single attribute filter
136
+ */
137
+ export interface AttributeFilter {
138
+ attribute: 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION';
139
+
118
140
  /**
119
- * Single attribute filter
141
+ * String matching operations
120
142
  */
121
- export interface Filter {
122
- attribute: 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION';
123
-
124
- /**
125
- * String matching operations
126
- */
127
- matcher?: Filter.Matcher;
128
- }
143
+ matcher?: StringMatcher;
144
+ }
129
145
 
130
- export namespace Filter {
131
- /**
132
- * String matching operations
133
- */
134
- export interface Matcher {
135
- caseSensitive?: boolean;
146
+ /**
147
+ * String matching operations
148
+ */
149
+ export interface StringMatcher {
150
+ caseSensitive?: boolean;
136
151
 
137
- contains?: string;
152
+ contains?: string;
138
153
 
139
- endsWith?: string;
154
+ endsWith?: string;
140
155
 
141
- exact?: string;
156
+ exact?: string;
142
157
 
143
- regex?: string;
158
+ regex?: string;
144
159
 
145
- startsWith?: string;
146
- }
147
- }
160
+ startsWith?: string;
148
161
  }
149
162
 
150
163
  /**
@@ -192,6 +205,15 @@ export interface SyncStarted {
192
205
  message?: string;
193
206
  }
194
207
 
208
+ /**
209
+ * Top-level filter with simple boolean logic (no nesting)
210
+ */
211
+ export interface ToolFilter {
212
+ operator: 'OPERATOR_UNSPECIFIED' | 'OPERATOR_AND' | 'OPERATOR_OR';
213
+
214
+ filters?: Array<AttributeFilter>;
215
+ }
216
+
195
217
  export interface ToolSet {
196
218
  /**
197
219
  * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
@@ -210,6 +232,8 @@ export interface ToolSetAdapter {
210
232
  http?: ToolSetAdapterHTTP;
211
233
 
212
234
  mcp?: ToolSetAdapterMcp;
235
+
236
+ openapi?: ToolSetAdapterOpenAPI;
213
237
  }
214
238
 
215
239
  export interface ToolSetAdapterHTTP {
@@ -222,37 +246,68 @@ export interface ToolSetAdapterMcp {
222
246
  /**
223
247
  * Top-level filter with simple boolean logic (no nesting)
224
248
  */
225
- excludeTools?: McpToolFilter;
249
+ excludeTools?: ToolFilter;
226
250
 
227
251
  headers?: { [key: string]: string };
228
252
 
229
253
  /**
230
254
  * Top-level filter with simple boolean logic (no nesting)
231
255
  */
232
- includeTools?: McpToolFilter;
256
+ includeTools?: ToolFilter;
233
257
 
234
258
  /**
235
- * Approval filters that will automatically set the approval requirement on the
236
- * tools synced from the MCP server
259
+ * Approval filters that will automatically set the approval requirement on tools
260
+ * synced from an external source
237
261
  */
238
- toolApprovals?: ToolSetAdapterMcp.ToolApprovals;
262
+ toolApprovals?: ApprovalRequirementFilter;
239
263
 
240
264
  url?: string;
241
265
  }
242
266
 
243
- export namespace ToolSetAdapterMcp {
267
+ export interface ToolSetAdapterOpenAPI {
244
268
  /**
245
- * Approval filters that will automatically set the approval requirement on the
246
- * tools synced from the MCP server
269
+ * Base URL for dispatching tool calls. If set, overrides the server resolved from
270
+ * the spec's servers array.
247
271
  */
248
- export interface ToolApprovals {
249
- always?: boolean;
272
+ baseUrl?: string;
250
273
 
251
- /**
252
- * Top-level filter with simple boolean logic (no nesting)
253
- */
254
- only?: ToolSetsAPI.McpToolFilter;
255
- }
274
+ /**
275
+ * Top-level filter with simple boolean logic (no nesting)
276
+ */
277
+ excludeTools?: ToolFilter;
278
+
279
+ /**
280
+ * Headers sent when fetching the spec from a URL and when dispatching tool calls.
281
+ */
282
+ headers?: { [key: string]: string };
283
+
284
+ /**
285
+ * Top-level filter with simple boolean logic (no nesting)
286
+ */
287
+ includeTools?: ToolFilter;
288
+
289
+ /**
290
+ * Name of the server entry in the spec's servers array (OpenAPI 3.2 server.name
291
+ * field). Used to select which server URL to dispatch to when base_url is not set.
292
+ * If unset, the first server is used. Ignored when base_url is set.
293
+ */
294
+ serverName?: string;
295
+
296
+ /**
297
+ * Approval filters that will automatically set the approval requirement on tools
298
+ * synced from an external source
299
+ */
300
+ toolApprovals?: ApprovalRequirementFilter;
301
+
302
+ /**
303
+ * ID of a COMPLETE Upload containing the OpenAPI spec document.
304
+ */
305
+ uploadId?: string;
306
+
307
+ /**
308
+ * URL to fetch the OpenAPI spec from. Synced automatically every hour.
309
+ */
310
+ url?: string;
256
311
  }
257
312
 
258
313
  /**
@@ -340,6 +395,13 @@ export interface ToolSetSpec {
340
395
  description?: string;
341
396
  }
342
397
 
398
+ export interface ToolSetGetOpenAPISpecResponse {
399
+ /**
400
+ * The consumed OpenAPI specification as a JSON string.
401
+ */
402
+ spec?: string;
403
+ }
404
+
343
405
  export interface ToolSetCreateParams {
344
406
  /**
345
407
  * CreateResourceMetadata contains the user-provided fields for creating a
@@ -417,6 +479,13 @@ export interface ToolSetDeleteParams {
417
479
  workspaceId: string;
418
480
  }
419
481
 
482
+ export interface ToolSetGetOpenAPISpecParams {
483
+ /**
484
+ * Workspace ID.
485
+ */
486
+ workspaceId: string;
487
+ }
488
+
420
489
  export interface ToolSetListEventsParams extends CursorPaginationParams {
421
490
  /**
422
491
  * Path param: Workspace ID.
@@ -438,18 +507,23 @@ ToolSets.Tools = Tools;
438
507
 
439
508
  export declare namespace ToolSets {
440
509
  export {
441
- type McpToolFilter as McpToolFilter,
510
+ type ApprovalRequirementFilter as ApprovalRequirementFilter,
511
+ type AttributeFilter as AttributeFilter,
512
+ type StringMatcher as StringMatcher,
442
513
  type SyncCompleted as SyncCompleted,
443
514
  type SyncFailed as SyncFailed,
444
515
  type SyncStarted as SyncStarted,
516
+ type ToolFilter as ToolFilter,
445
517
  type ToolSet as ToolSet,
446
518
  type ToolSetAdapter as ToolSetAdapter,
447
519
  type ToolSetAdapterHTTP as ToolSetAdapterHTTP,
448
520
  type ToolSetAdapterMcp as ToolSetAdapterMcp,
521
+ type ToolSetAdapterOpenAPI as ToolSetAdapterOpenAPI,
449
522
  type ToolSetEvent as ToolSetEvent,
450
523
  type ToolSetEventData as ToolSetEventData,
451
524
  type ToolSetInfo as ToolSetInfo,
452
525
  type ToolSetSpec as ToolSetSpec,
526
+ type ToolSetGetOpenAPISpecResponse as ToolSetGetOpenAPISpecResponse,
453
527
  type ToolSetsCursorPagination as ToolSetsCursorPagination,
454
528
  type ToolSetEventsCursorPagination as ToolSetEventsCursorPagination,
455
529
  type ToolSetCreateParams as ToolSetCreateParams,
@@ -457,6 +531,7 @@ export declare namespace ToolSets {
457
531
  type ToolSetUpdateParams as ToolSetUpdateParams,
458
532
  type ToolSetListParams as ToolSetListParams,
459
533
  type ToolSetDeleteParams as ToolSetDeleteParams,
534
+ type ToolSetGetOpenAPISpecParams as ToolSetGetOpenAPISpecParams,
460
535
  type ToolSetListEventsParams as ToolSetListEventsParams,
461
536
  };
462
537
 
@@ -464,6 +539,7 @@ export declare namespace ToolSets {
464
539
  Tools as Tools,
465
540
  type ConfigHTTP as ConfigHTTP,
466
541
  type ConfigMcp as ConfigMcp,
542
+ type ConfigOpenAPI as ConfigOpenAPI,
467
543
  type Tool as Tool,
468
544
  type ToolInfo as ToolInfo,
469
545
  type ToolSpec as ToolSpec,
@@ -109,6 +109,14 @@ export interface ConfigMcp {
109
109
  toolTitle?: string;
110
110
  }
111
111
 
112
+ export interface ConfigOpenAPI {
113
+ method?: string;
114
+
115
+ operationId?: string;
116
+
117
+ path?: string;
118
+ }
119
+
112
120
  export interface Tool {
113
121
  /**
114
122
  * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
@@ -164,6 +172,8 @@ export interface ToolSpecConfig {
164
172
  http?: ConfigHTTP;
165
173
 
166
174
  mcp?: ConfigMcp;
175
+
176
+ openapi?: ConfigOpenAPI;
167
177
  }
168
178
 
169
179
  export interface ToolCreateParams {
@@ -296,6 +306,7 @@ export declare namespace Tools {
296
306
  export {
297
307
  type ConfigHTTP as ConfigHTTP,
298
308
  type ConfigMcp as ConfigMcp,
309
+ type ConfigOpenAPI as ConfigOpenAPI,
299
310
  type Tool as Tool,
300
311
  type ToolInfo as ToolInfo,
301
312
  type ToolSpec as ToolSpec,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.76.0'; // x-release-please-version
1
+ export const VERSION = '0.78.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.76.0";
1
+ export declare const VERSION = "0.78.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.76.0";
1
+ export declare const VERSION = "0.78.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.76.0'; // x-release-please-version
4
+ exports.VERSION = '0.78.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.76.0'; // x-release-please-version
1
+ export const VERSION = '0.78.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map