@cadenya/cadenya 0.124.0 → 0.126.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 (278) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +18 -7
  3. package/client.d.mts +17 -11
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +17 -11
  6. package/client.d.ts.map +1 -1
  7. package/client.js +7 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +7 -3
  10. package/client.mjs.map +1 -1
  11. package/internal/request-options.d.mts +1 -1
  12. package/internal/request-options.d.ts +1 -1
  13. package/package.json +1 -1
  14. package/resources/agents/agents.d.mts +115 -28
  15. package/resources/agents/agents.d.mts.map +1 -1
  16. package/resources/agents/agents.d.ts +115 -28
  17. package/resources/agents/agents.d.ts.map +1 -1
  18. package/resources/agents/agents.js +93 -13
  19. package/resources/agents/agents.js.map +1 -1
  20. package/resources/agents/agents.mjs +93 -13
  21. package/resources/agents/agents.mjs.map +1 -1
  22. package/resources/agents/feedback.d.mts +13 -2
  23. package/resources/agents/feedback.d.mts.map +1 -1
  24. package/resources/agents/feedback.d.ts +13 -2
  25. package/resources/agents/feedback.d.ts.map +1 -1
  26. package/resources/agents/feedback.js +13 -2
  27. package/resources/agents/feedback.js.map +1 -1
  28. package/resources/agents/feedback.mjs +13 -2
  29. package/resources/agents/feedback.mjs.map +1 -1
  30. package/resources/agents/index.d.mts +1 -1
  31. package/resources/agents/index.d.mts.map +1 -1
  32. package/resources/agents/index.d.ts +1 -1
  33. package/resources/agents/index.d.ts.map +1 -1
  34. package/resources/agents/index.js.map +1 -1
  35. package/resources/agents/index.mjs.map +1 -1
  36. package/resources/agents/schedules.d.mts +100 -52
  37. package/resources/agents/schedules.d.mts.map +1 -1
  38. package/resources/agents/schedules.d.ts +100 -52
  39. package/resources/agents/schedules.d.ts.map +1 -1
  40. package/resources/agents/schedules.js +99 -21
  41. package/resources/agents/schedules.js.map +1 -1
  42. package/resources/agents/schedules.mjs +99 -21
  43. package/resources/agents/schedules.mjs.map +1 -1
  44. package/resources/agents/variations.d.mts +252 -105
  45. package/resources/agents/variations.d.mts.map +1 -1
  46. package/resources/agents/variations.d.ts +252 -105
  47. package/resources/agents/variations.d.ts.map +1 -1
  48. package/resources/agents/variations.js +138 -27
  49. package/resources/agents/variations.js.map +1 -1
  50. package/resources/agents/variations.mjs +138 -27
  51. package/resources/agents/variations.mjs.map +1 -1
  52. package/resources/agents/webhook-deliveries.d.mts +13 -2
  53. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  54. package/resources/agents/webhook-deliveries.d.ts +13 -2
  55. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  56. package/resources/agents/webhook-deliveries.js +13 -2
  57. package/resources/agents/webhook-deliveries.js.map +1 -1
  58. package/resources/agents/webhook-deliveries.mjs +13 -2
  59. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  60. package/resources/ai-provider-keys.d.mts +125 -110
  61. package/resources/ai-provider-keys.d.mts.map +1 -1
  62. package/resources/ai-provider-keys.d.ts +125 -110
  63. package/resources/ai-provider-keys.d.ts.map +1 -1
  64. package/resources/ai-provider-keys.js +11 -9
  65. package/resources/ai-provider-keys.js.map +1 -1
  66. package/resources/ai-provider-keys.mjs +11 -9
  67. package/resources/ai-provider-keys.mjs.map +1 -1
  68. package/resources/api-keys.d.mts +28 -20
  69. package/resources/api-keys.d.mts.map +1 -1
  70. package/resources/api-keys.d.ts +28 -20
  71. package/resources/api-keys.d.ts.map +1 -1
  72. package/resources/api-keys.js +14 -12
  73. package/resources/api-keys.js.map +1 -1
  74. package/resources/api-keys.mjs +14 -12
  75. package/resources/api-keys.mjs.map +1 -1
  76. package/resources/index.d.mts +4 -4
  77. package/resources/index.d.mts.map +1 -1
  78. package/resources/index.d.ts +4 -4
  79. package/resources/index.d.ts.map +1 -1
  80. package/resources/index.js.map +1 -1
  81. package/resources/index.mjs.map +1 -1
  82. package/resources/memory-layers/entries.d.mts +27 -30
  83. package/resources/memory-layers/entries.d.mts.map +1 -1
  84. package/resources/memory-layers/entries.d.ts +27 -30
  85. package/resources/memory-layers/entries.d.ts.map +1 -1
  86. package/resources/memory-layers/entries.js +12 -12
  87. package/resources/memory-layers/entries.js.map +1 -1
  88. package/resources/memory-layers/entries.mjs +12 -12
  89. package/resources/memory-layers/entries.mjs.map +1 -1
  90. package/resources/memory-layers/index.d.mts +1 -1
  91. package/resources/memory-layers/index.d.mts.map +1 -1
  92. package/resources/memory-layers/index.d.ts +1 -1
  93. package/resources/memory-layers/index.d.ts.map +1 -1
  94. package/resources/memory-layers/index.js.map +1 -1
  95. package/resources/memory-layers/index.mjs.map +1 -1
  96. package/resources/memory-layers/memory-layers.d.mts +34 -22
  97. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  98. package/resources/memory-layers/memory-layers.d.ts +34 -22
  99. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  100. package/resources/memory-layers/memory-layers.js +11 -9
  101. package/resources/memory-layers/memory-layers.js.map +1 -1
  102. package/resources/memory-layers/memory-layers.mjs +11 -9
  103. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  104. package/resources/models.d.mts +32 -24
  105. package/resources/models.d.mts.map +1 -1
  106. package/resources/models.d.ts +32 -24
  107. package/resources/models.d.ts.map +1 -1
  108. package/resources/models.js +10 -8
  109. package/resources/models.js.map +1 -1
  110. package/resources/models.mjs +10 -8
  111. package/resources/models.mjs.map +1 -1
  112. package/resources/objectives/feedback.d.mts +27 -3
  113. package/resources/objectives/feedback.d.mts.map +1 -1
  114. package/resources/objectives/feedback.d.ts +27 -3
  115. package/resources/objectives/feedback.d.ts.map +1 -1
  116. package/resources/objectives/feedback.js +27 -3
  117. package/resources/objectives/feedback.js.map +1 -1
  118. package/resources/objectives/feedback.mjs +27 -3
  119. package/resources/objectives/feedback.mjs.map +1 -1
  120. package/resources/objectives/index.d.mts +2 -2
  121. package/resources/objectives/index.d.mts.map +1 -1
  122. package/resources/objectives/index.d.ts +2 -2
  123. package/resources/objectives/index.d.ts.map +1 -1
  124. package/resources/objectives/index.js.map +1 -1
  125. package/resources/objectives/index.mjs.map +1 -1
  126. package/resources/objectives/objectives.d.mts +273 -102
  127. package/resources/objectives/objectives.d.mts.map +1 -1
  128. package/resources/objectives/objectives.d.ts +273 -102
  129. package/resources/objectives/objectives.d.ts.map +1 -1
  130. package/resources/objectives/objectives.js +112 -17
  131. package/resources/objectives/objectives.js.map +1 -1
  132. package/resources/objectives/objectives.mjs +112 -17
  133. package/resources/objectives/objectives.mjs.map +1 -1
  134. package/resources/objectives/tasks.d.mts +25 -8
  135. package/resources/objectives/tasks.d.mts.map +1 -1
  136. package/resources/objectives/tasks.d.ts +25 -8
  137. package/resources/objectives/tasks.d.ts.map +1 -1
  138. package/resources/objectives/tasks.js +26 -5
  139. package/resources/objectives/tasks.js.map +1 -1
  140. package/resources/objectives/tasks.mjs +26 -5
  141. package/resources/objectives/tasks.mjs.map +1 -1
  142. package/resources/objectives/tool-calls.d.mts +99 -42
  143. package/resources/objectives/tool-calls.d.mts.map +1 -1
  144. package/resources/objectives/tool-calls.d.ts +99 -42
  145. package/resources/objectives/tool-calls.d.ts.map +1 -1
  146. package/resources/objectives/tool-calls.js +73 -14
  147. package/resources/objectives/tool-calls.js.map +1 -1
  148. package/resources/objectives/tool-calls.mjs +73 -14
  149. package/resources/objectives/tool-calls.mjs.map +1 -1
  150. package/resources/objectives/tools.d.mts +13 -2
  151. package/resources/objectives/tools.d.mts.map +1 -1
  152. package/resources/objectives/tools.d.ts +13 -2
  153. package/resources/objectives/tools.d.ts.map +1 -1
  154. package/resources/objectives/tools.js +13 -2
  155. package/resources/objectives/tools.js.map +1 -1
  156. package/resources/objectives/tools.mjs +13 -2
  157. package/resources/objectives/tools.mjs.map +1 -1
  158. package/resources/search.d.mts +11 -2
  159. package/resources/search.d.mts.map +1 -1
  160. package/resources/search.d.ts +11 -2
  161. package/resources/search.d.ts.map +1 -1
  162. package/resources/search.js +3 -2
  163. package/resources/search.js.map +1 -1
  164. package/resources/search.mjs +3 -2
  165. package/resources/search.mjs.map +1 -1
  166. package/resources/tool-sets/index.d.mts +2 -2
  167. package/resources/tool-sets/index.d.mts.map +1 -1
  168. package/resources/tool-sets/index.d.ts +2 -2
  169. package/resources/tool-sets/index.d.ts.map +1 -1
  170. package/resources/tool-sets/index.js.map +1 -1
  171. package/resources/tool-sets/index.mjs.map +1 -1
  172. package/resources/tool-sets/secrets.d.mts +9 -24
  173. package/resources/tool-sets/secrets.d.mts.map +1 -1
  174. package/resources/tool-sets/secrets.d.ts +9 -24
  175. package/resources/tool-sets/secrets.d.ts.map +1 -1
  176. package/resources/tool-sets/secrets.js +12 -12
  177. package/resources/tool-sets/secrets.js.map +1 -1
  178. package/resources/tool-sets/secrets.mjs +12 -12
  179. package/resources/tool-sets/secrets.mjs.map +1 -1
  180. package/resources/tool-sets/tool-sets.d.mts +149 -64
  181. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  182. package/resources/tool-sets/tool-sets.d.ts +149 -64
  183. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  184. package/resources/tool-sets/tool-sets.js +17 -15
  185. package/resources/tool-sets/tool-sets.js.map +1 -1
  186. package/resources/tool-sets/tool-sets.mjs +17 -15
  187. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  188. package/resources/tool-sets/tools.d.mts +33 -43
  189. package/resources/tool-sets/tools.d.mts.map +1 -1
  190. package/resources/tool-sets/tools.d.ts +33 -43
  191. package/resources/tool-sets/tools.d.ts.map +1 -1
  192. package/resources/tool-sets/tools.js +18 -18
  193. package/resources/tool-sets/tools.js.map +1 -1
  194. package/resources/tool-sets/tools.mjs +18 -18
  195. package/resources/tool-sets/tools.mjs.map +1 -1
  196. package/resources/uploads.d.mts +14 -6
  197. package/resources/uploads.d.mts.map +1 -1
  198. package/resources/uploads.d.ts +14 -6
  199. package/resources/uploads.d.ts.map +1 -1
  200. package/resources/uploads.js +5 -4
  201. package/resources/uploads.js.map +1 -1
  202. package/resources/uploads.mjs +5 -4
  203. package/resources/uploads.mjs.map +1 -1
  204. package/resources/workspace-admin/index.d.mts +1 -1
  205. package/resources/workspace-admin/index.d.mts.map +1 -1
  206. package/resources/workspace-admin/index.d.ts +1 -1
  207. package/resources/workspace-admin/index.d.ts.map +1 -1
  208. package/resources/workspace-admin/index.js.map +1 -1
  209. package/resources/workspace-admin/index.mjs.map +1 -1
  210. package/resources/workspace-admin/members.d.mts +41 -6
  211. package/resources/workspace-admin/members.d.mts.map +1 -1
  212. package/resources/workspace-admin/members.d.ts +41 -6
  213. package/resources/workspace-admin/members.d.ts.map +1 -1
  214. package/resources/workspace-admin/members.js +34 -6
  215. package/resources/workspace-admin/members.js.map +1 -1
  216. package/resources/workspace-admin/members.mjs +34 -6
  217. package/resources/workspace-admin/members.mjs.map +1 -1
  218. package/resources/workspace-admin/profiles.d.mts +8 -0
  219. package/resources/workspace-admin/profiles.d.mts.map +1 -1
  220. package/resources/workspace-admin/profiles.d.ts +8 -0
  221. package/resources/workspace-admin/profiles.d.ts.map +1 -1
  222. package/resources/workspace-admin/profiles.js +8 -0
  223. package/resources/workspace-admin/profiles.js.map +1 -1
  224. package/resources/workspace-admin/profiles.mjs +8 -0
  225. package/resources/workspace-admin/profiles.mjs.map +1 -1
  226. package/resources/workspace-admin/workspace-admin.d.mts +65 -9
  227. package/resources/workspace-admin/workspace-admin.d.mts.map +1 -1
  228. package/resources/workspace-admin/workspace-admin.d.ts +65 -9
  229. package/resources/workspace-admin/workspace-admin.d.ts.map +1 -1
  230. package/resources/workspace-admin/workspace-admin.js +46 -6
  231. package/resources/workspace-admin/workspace-admin.js.map +1 -1
  232. package/resources/workspace-admin/workspace-admin.mjs +46 -6
  233. package/resources/workspace-admin/workspace-admin.mjs.map +1 -1
  234. package/resources/workspace-secrets.d.mts +27 -15
  235. package/resources/workspace-secrets.d.mts.map +1 -1
  236. package/resources/workspace-secrets.d.ts +27 -15
  237. package/resources/workspace-secrets.d.ts.map +1 -1
  238. package/resources/workspace-secrets.js +11 -9
  239. package/resources/workspace-secrets.js.map +1 -1
  240. package/resources/workspace-secrets.mjs +11 -9
  241. package/resources/workspace-secrets.mjs.map +1 -1
  242. package/src/client.ts +102 -5
  243. package/src/internal/request-options.ts +1 -1
  244. package/src/resources/agents/agents.ts +147 -37
  245. package/src/resources/agents/feedback.ts +14 -3
  246. package/src/resources/agents/index.ts +6 -0
  247. package/src/resources/agents/schedules.ts +143 -71
  248. package/src/resources/agents/variations.ts +319 -125
  249. package/src/resources/agents/webhook-deliveries.ts +14 -3
  250. package/src/resources/ai-provider-keys.ts +155 -127
  251. package/src/resources/api-keys.ts +48 -29
  252. package/src/resources/index.ts +44 -1
  253. package/src/resources/memory-layers/entries.ts +56 -40
  254. package/src/resources/memory-layers/index.ts +2 -0
  255. package/src/resources/memory-layers/memory-layers.ts +53 -30
  256. package/src/resources/models.ts +46 -31
  257. package/src/resources/objectives/feedback.ts +29 -5
  258. package/src/resources/objectives/index.ts +26 -0
  259. package/src/resources/objectives/objectives.ts +373 -125
  260. package/src/resources/objectives/tasks.ts +33 -12
  261. package/src/resources/objectives/tool-calls.ts +123 -46
  262. package/src/resources/objectives/tools.ts +14 -3
  263. package/src/resources/search.ts +14 -4
  264. package/src/resources/tool-sets/index.ts +23 -3
  265. package/src/resources/tool-sets/secrets.ts +32 -35
  266. package/src/resources/tool-sets/tool-sets.ts +239 -79
  267. package/src/resources/tool-sets/tools.ts +79 -61
  268. package/src/resources/uploads.ts +22 -8
  269. package/src/resources/workspace-admin/index.ts +2 -0
  270. package/src/resources/workspace-admin/members.ts +53 -12
  271. package/src/resources/workspace-admin/profiles.ts +8 -0
  272. package/src/resources/workspace-admin/workspace-admin.ts +80 -11
  273. package/src/resources/workspace-secrets.ts +40 -25
  274. package/src/version.ts +1 -1
  275. package/version.d.mts +1 -1
  276. package/version.d.ts +1 -1
  277. package/version.js +1 -1
  278. package/version.mjs +1 -1
@@ -20,9 +20,9 @@ import * as ToolsAPI from './tools';
20
20
  import {
21
21
  ConfigBare,
22
22
  ConfigHTTP,
23
- ConfigMcp,
23
+ ConfigMCP,
24
24
  ConfigOpenAPI,
25
- McpAnnotations,
25
+ MCPAnnotations,
26
26
  Tool,
27
27
  ToolCreateParams,
28
28
  ToolDeleteParams,
@@ -33,6 +33,10 @@ import {
33
33
  ToolRetrieveParams,
34
34
  ToolSpec,
35
35
  ToolSpecConfig,
36
+ ToolSpecConfigBare,
37
+ ToolSpecConfigHTTP,
38
+ ToolSpecConfigMCP,
39
+ ToolSpecConfigOpenAPI,
36
40
  ToolUpdateParams,
37
41
  Tools,
38
42
  ToolsCursorPagination,
@@ -57,15 +61,20 @@ export class ToolSets extends APIResource {
57
61
  /**
58
62
  * Creates a new tool set in the workspace
59
63
  */
60
- create(workspaceID: string, body: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {
61
- return this._client.post(path`/v1/workspaces/${workspaceID}/tool_sets`, { body, ...options });
64
+ create(params: ToolSetCreateParams, options?: RequestOptions): APIPromise<ToolSet> {
65
+ const { workspaceId = this._client.workspaceID, ...body } = params;
66
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets`, { body, ...options });
62
67
  }
63
68
 
64
69
  /**
65
70
  * Retrieves a tool set by ID from the workspace
66
71
  */
67
- retrieve(id: string, params: ToolSetRetrieveParams, options?: RequestOptions): APIPromise<ToolSet> {
68
- const { workspaceId } = params;
72
+ retrieve(
73
+ id: string,
74
+ params: ToolSetRetrieveParams | null | undefined = {},
75
+ options?: RequestOptions,
76
+ ): APIPromise<ToolSet> {
77
+ const { workspaceId = this._client.workspaceID } = params ?? {};
69
78
  return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, options);
70
79
  }
71
80
 
@@ -73,7 +82,7 @@ export class ToolSets extends APIResource {
73
82
  * Updates a tool set in the workspace
74
83
  */
75
84
  update(id: string, params: ToolSetUpdateParams, options?: RequestOptions): APIPromise<ToolSet> {
76
- const { workspaceId, ...body } = params;
85
+ const { workspaceId = this._client.workspaceID, ...body } = params;
77
86
  return this._client.patch(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, { body, ...options });
78
87
  }
79
88
 
@@ -81,11 +90,11 @@ export class ToolSets extends APIResource {
81
90
  * Lists all tool sets in the workspace
82
91
  */
83
92
  list(
84
- workspaceID: string,
85
- query: ToolSetListParams | null | undefined = {},
93
+ params: ToolSetListParams | null | undefined = {},
86
94
  options?: RequestOptions,
87
95
  ): PagePromise<ToolSetsCursorPagination, ToolSet> {
88
- return this._client.getAPIList(path`/v1/workspaces/${workspaceID}/tool_sets`, CursorPagination<ToolSet>, {
96
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
97
+ return this._client.getAPIList(path`/v1/workspaces/${workspaceId}/tool_sets`, CursorPagination<ToolSet>, {
89
98
  query,
90
99
  ...options,
91
100
  });
@@ -94,8 +103,12 @@ export class ToolSets extends APIResource {
94
103
  /**
95
104
  * Deletes a tool set in the workspace
96
105
  */
97
- delete(id: string, params: ToolSetDeleteParams, options?: RequestOptions): APIPromise<void> {
98
- const { workspaceId } = params;
106
+ delete(
107
+ id: string,
108
+ params: ToolSetDeleteParams | null | undefined = {},
109
+ options?: RequestOptions,
110
+ ): APIPromise<void> {
111
+ const { workspaceId = this._client.workspaceID } = params ?? {};
99
112
  return this._client.delete(path`/v1/workspaces/${workspaceId}/tool_sets/${id}`, {
100
113
  ...options,
101
114
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -110,7 +123,7 @@ export class ToolSets extends APIResource {
110
123
  * still assigned to agent variations.
111
124
  */
112
125
  archive(id: string, params: ToolSetArchiveParams, options?: RequestOptions): APIPromise<ToolSet> {
113
- const { workspaceId, ...body } = params;
126
+ const { workspaceId = this._client.workspaceID, ...body } = params;
114
127
  return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${id}:archive`, {
115
128
  body,
116
129
  ...options,
@@ -123,10 +136,10 @@ export class ToolSets extends APIResource {
123
136
  */
124
137
  getOpenAPISpec(
125
138
  toolSetID: string,
126
- params: ToolSetGetOpenAPISpecParams,
139
+ params: ToolSetGetOpenAPISpecParams | null | undefined = {},
127
140
  options?: RequestOptions,
128
141
  ): APIPromise<ToolSetGetOpenAPISpecResponse> {
129
- const { workspaceId } = params;
142
+ const { workspaceId = this._client.workspaceID } = params ?? {};
130
143
  return this._client.get(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/openapi_spec`, options);
131
144
  }
132
145
 
@@ -135,10 +148,10 @@ export class ToolSets extends APIResource {
135
148
  */
136
149
  listEvents(
137
150
  toolSetID: string,
138
- params: ToolSetListEventsParams,
151
+ params: ToolSetListEventsParams | null | undefined = {},
139
152
  options?: RequestOptions,
140
153
  ): PagePromise<ToolSetEventsCursorPagination, ToolSetEvent> {
141
- const { workspaceId, ...query } = params;
154
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
142
155
  return this._client.getAPIList(
143
156
  path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/events`,
144
157
  CursorPagination<ToolSetEvent>,
@@ -152,7 +165,7 @@ export class ToolSets extends APIResource {
152
165
  * again.
153
166
  */
154
167
  unarchive(id: string, params: ToolSetUnarchiveParams, options?: RequestOptions): APIPromise<ToolSet> {
155
- const { workspaceId, ...body } = params;
168
+ const { workspaceId = this._client.workspaceID, ...body } = params;
156
169
  return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${id}:unarchive`, {
157
170
  body,
158
171
  ...options,
@@ -168,13 +181,21 @@ export type ToolSetEventsCursorPagination = CursorPagination<ToolSetEvent>;
168
181
  * Approval filters that will automatically set the approval requirement on tools
169
182
  * synced from an external source
170
183
  */
171
- export interface ApprovalRequirementFilter {
172
- always?: boolean;
184
+ export type ApprovalRequirementFilter = ApprovalRequirementFilterAlways | ApprovalRequirementFilterOnly;
185
+
186
+ export interface ApprovalRequirementFilterAlways {
187
+ always: boolean;
188
+
189
+ type: 'always';
190
+ }
173
191
 
192
+ export interface ApprovalRequirementFilterOnly {
174
193
  /**
175
194
  * Top-level filter with simple boolean logic (no nesting)
176
195
  */
177
- only?: ToolFilter;
196
+ only: ToolFilter;
197
+
198
+ type: 'only';
178
199
  }
179
200
 
180
201
  /**
@@ -192,18 +213,51 @@ export interface AttributeFilter {
192
213
  /**
193
214
  * String matching operations
194
215
  */
195
- export interface StringMatcher {
216
+ export type StringMatcher =
217
+ | StringMatcherExact
218
+ | StringMatcherStartsWith
219
+ | StringMatcherEndsWith
220
+ | StringMatcherContains
221
+ | StringMatcherRegex;
222
+
223
+ export interface StringMatcherContains {
224
+ contains: string;
225
+
226
+ type: 'contains';
227
+
228
+ caseSensitive?: boolean;
229
+ }
230
+
231
+ export interface StringMatcherEndsWith {
232
+ endsWith: string;
233
+
234
+ type: 'endsWith';
235
+
236
+ caseSensitive?: boolean;
237
+ }
238
+
239
+ export interface StringMatcherExact {
240
+ exact: string;
241
+
242
+ type: 'exact';
243
+
196
244
  caseSensitive?: boolean;
245
+ }
246
+
247
+ export interface StringMatcherRegex {
248
+ regex: string;
197
249
 
198
- contains?: string;
250
+ type: 'regex';
199
251
 
200
- endsWith?: string;
252
+ caseSensitive?: boolean;
253
+ }
201
254
 
202
- exact?: string;
255
+ export interface StringMatcherStartsWith {
256
+ startsWith: string;
203
257
 
204
- regex?: string;
258
+ type: 'startsWith';
205
259
 
206
- startsWith?: string;
260
+ caseSensitive?: boolean;
207
261
  }
208
262
 
209
263
  /**
@@ -281,22 +335,11 @@ export interface ToolSet {
281
335
  info?: ToolSetInfo;
282
336
  }
283
337
 
284
- export interface ToolSetAdapter {
285
- /**
286
- * Bare tool sets define tools without an execution adapter. A bare tool call
287
- * doesn't fire anything: the objective's workflow pauses and waits for an external
288
- * API consumer to set the tool call's content (e.g. human-in-the-loop tools, or a
289
- * reverse harness that polls for pending tool calls, executes locally, and reports
290
- * results back via SetToolCallContent).
291
- */
292
- bare?: ToolSetAdapterBare;
293
-
294
- http?: ToolSetAdapterHTTP;
295
-
296
- mcp?: ToolSetAdapterMcp;
297
-
298
- openapi?: ToolSetAdapterOpenAPI;
299
- }
338
+ export type ToolSetAdapter =
339
+ | ToolSetAdapterMCPVariant
340
+ | ToolSetAdapterHTTPVariant
341
+ | ToolSetAdapterOpenAPIVariant
342
+ | ToolSetAdapterBareVariant;
300
343
 
301
344
  /**
302
345
  * Bare tool sets define tools without an execution adapter. A bare tool call
@@ -313,13 +356,32 @@ export interface ToolSetAdapterBare {
313
356
  contentTimeout?: number;
314
357
  }
315
358
 
359
+ export interface ToolSetAdapterBareVariant {
360
+ /**
361
+ * Bare tool sets define tools without an execution adapter. A bare tool call
362
+ * doesn't fire anything: the objective's workflow pauses and waits for an external
363
+ * API consumer to set the tool call's content (e.g. human-in-the-loop tools, or a
364
+ * reverse harness that polls for pending tool calls, executes locally, and reports
365
+ * results back via SetToolCallContent).
366
+ */
367
+ bare: ToolSetAdapterBare;
368
+
369
+ type: 'bare';
370
+ }
371
+
316
372
  export interface ToolSetAdapterHTTP {
317
373
  baseUrl?: string;
318
374
 
319
375
  headers?: { [key: string]: string };
320
376
  }
321
377
 
322
- export interface ToolSetAdapterMcp {
378
+ export interface ToolSetAdapterHTTPVariant {
379
+ http: ToolSetAdapterHTTP;
380
+
381
+ type: 'http';
382
+ }
383
+
384
+ export interface ToolSetAdapterMCP {
323
385
  /**
324
386
  * Top-level filter with simple boolean logic (no nesting)
325
387
  */
@@ -335,7 +397,7 @@ export interface ToolSetAdapterMcp {
335
397
  /**
336
398
  * Defines behavior for just-in-time capable tool set adapters (IE: MCP).
337
399
  */
338
- justInTime?: ToolSetAdapterMcp.JustInTime;
400
+ justInTime?: ToolSetAdapterMCP.JustInTime;
339
401
 
340
402
  /**
341
403
  * Approval filters that will automatically set the approval requirement on tools
@@ -346,7 +408,7 @@ export interface ToolSetAdapterMcp {
346
408
  url?: string;
347
409
  }
348
410
 
349
- export namespace ToolSetAdapterMcp {
411
+ export namespace ToolSetAdapterMCP {
350
412
  /**
351
413
  * Defines behavior for just-in-time capable tool set adapters (IE: MCP).
352
414
  */
@@ -363,7 +425,22 @@ export namespace ToolSetAdapterMcp {
363
425
  }
364
426
  }
365
427
 
366
- export interface ToolSetAdapterOpenAPI {
428
+ export interface ToolSetAdapterMCPVariant {
429
+ mcp: ToolSetAdapterMCP;
430
+
431
+ type: 'mcp';
432
+ }
433
+
434
+ export type ToolSetAdapterOpenAPI = ToolSetAdapterOpenAPIURL | ToolSetAdapterOpenAPIUploadID;
435
+
436
+ export interface ToolSetAdapterOpenAPIUploadID {
437
+ type: 'uploadId';
438
+
439
+ /**
440
+ * ID of a COMPLETE Upload containing the OpenAPI spec document.
441
+ */
442
+ uploadId: string;
443
+
367
444
  /**
368
445
  * Base URL for dispatching tool calls. If set, overrides the server resolved from
369
446
  * the spec's servers array.
@@ -397,16 +474,55 @@ export interface ToolSetAdapterOpenAPI {
397
474
  * synced from an external source
398
475
  */
399
476
  toolApprovals?: ApprovalRequirementFilter;
477
+ }
478
+
479
+ export interface ToolSetAdapterOpenAPIURL {
480
+ type: 'url';
400
481
 
401
482
  /**
402
- * ID of a COMPLETE Upload containing the OpenAPI spec document.
483
+ * URL to fetch the OpenAPI spec from. Synced automatically every hour.
403
484
  */
404
- uploadId?: string;
485
+ url: string;
405
486
 
406
487
  /**
407
- * URL to fetch the OpenAPI spec from. Synced automatically every hour.
488
+ * Base URL for dispatching tool calls. If set, overrides the server resolved from
489
+ * the spec's servers array.
408
490
  */
409
- url?: string;
491
+ baseUrl?: string;
492
+
493
+ /**
494
+ * Top-level filter with simple boolean logic (no nesting)
495
+ */
496
+ excludeTools?: ToolFilter;
497
+
498
+ /**
499
+ * Headers sent when fetching the spec from a URL and when dispatching tool calls.
500
+ */
501
+ headers?: { [key: string]: string };
502
+
503
+ /**
504
+ * Top-level filter with simple boolean logic (no nesting)
505
+ */
506
+ includeTools?: ToolFilter;
507
+
508
+ /**
509
+ * Name of the server entry in the spec's servers array (OpenAPI 3.2 server.name
510
+ * field). Used to select which server URL to dispatch to when base_url is not set.
511
+ * If unset, the first server is used. Ignored when base_url is set.
512
+ */
513
+ serverName?: string;
514
+
515
+ /**
516
+ * Approval filters that will automatically set the approval requirement on tools
517
+ * synced from an external source
518
+ */
519
+ toolApprovals?: ApprovalRequirementFilter;
520
+ }
521
+
522
+ export interface ToolSetAdapterOpenAPIVariant {
523
+ openapi: ToolSetAdapterOpenAPI;
524
+
525
+ type: 'openapi';
410
526
  }
411
527
 
412
528
  /**
@@ -451,26 +567,36 @@ export namespace ToolSetEvent {
451
567
  /**
452
568
  * Event payload for a tool set operation.
453
569
  */
454
- export interface ToolSetEventData {
570
+ export type ToolSetEventData =
571
+ | ToolSetEventDataSyncStarted
572
+ | ToolSetEventDataSyncCompleted
573
+ | ToolSetEventDataSyncFailed;
574
+
575
+ export interface ToolSetEventDataSyncCompleted {
455
576
  /**
456
577
  * Emitted when a tool set sync operation completes successfully.
457
578
  */
458
- syncCompleted?: SyncCompleted;
579
+ syncCompleted: SyncCompleted;
459
580
 
581
+ type: 'syncCompleted';
582
+ }
583
+
584
+ export interface ToolSetEventDataSyncFailed {
460
585
  /**
461
586
  * Emitted when a tool set sync operation fails.
462
587
  */
463
- syncFailed?: SyncFailed;
588
+ syncFailed: SyncFailed;
589
+
590
+ type: 'syncFailed';
591
+ }
464
592
 
593
+ export interface ToolSetEventDataSyncStarted {
465
594
  /**
466
595
  * Emitted when a tool set sync operation begins.
467
596
  */
468
- syncStarted?: SyncStarted;
597
+ syncStarted: SyncStarted;
469
598
 
470
- /**
471
- * Type of the event (e.g., "sync_started", "sync_completed", "sync_failed").
472
- */
473
- type?: string;
599
+ type: 'syncStarted';
474
600
  }
475
601
 
476
602
  export interface ToolSetInfo {
@@ -507,12 +633,21 @@ export interface ToolSetGetOpenAPISpecResponse {
507
633
 
508
634
  export interface ToolSetCreateParams {
509
635
  /**
510
- * CreateResourceMetadata contains the user-provided fields for creating a
511
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
512
- * profile_id, created_at) are excluded since they are set by the server.
636
+ * Path param: Workspace ID.
637
+ */
638
+ workspaceId?: string;
639
+
640
+ /**
641
+ * Body param: CreateResourceMetadata contains the user-provided fields for
642
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
643
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
644
+ * server.
513
645
  */
514
646
  metadata: Shared.CreateResourceMetadata;
515
647
 
648
+ /**
649
+ * Body param
650
+ */
516
651
  spec: ToolSetSpec;
517
652
  }
518
653
 
@@ -520,14 +655,14 @@ export interface ToolSetRetrieveParams {
520
655
  /**
521
656
  * Workspace ID.
522
657
  */
523
- workspaceId: string;
658
+ workspaceId?: string;
524
659
  }
525
660
 
526
661
  export interface ToolSetUpdateParams {
527
662
  /**
528
663
  * Path param: Workspace ID.
529
664
  */
530
- workspaceId: string;
665
+ workspaceId?: string;
531
666
 
532
667
  /**
533
668
  * Body param: UpdateResourceMetadata contains the user-provided fields for
@@ -550,35 +685,40 @@ export interface ToolSetUpdateParams {
550
685
 
551
686
  export interface ToolSetListParams extends CursorPaginationParams {
552
687
  /**
553
- * When set to true you may use more of your alloted API rate-limit
688
+ * Path param: Workspace ID.
689
+ */
690
+ workspaceId?: string;
691
+
692
+ /**
693
+ * Query param: When set to true you may use more of your alloted API rate-limit
554
694
  */
555
695
  includeInfo?: boolean;
556
696
 
557
697
  /**
558
- * Filters by metadata labels. Comma-separated key=value pairs, e.g.
698
+ * Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
559
699
  * "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
560
700
  * semantics).
561
701
  */
562
702
  labels?: string;
563
703
 
564
704
  /**
565
- * Filter expression (query param: prefix)
705
+ * Query param: Filter expression (query param: prefix)
566
706
  */
567
707
  prefix?: string;
568
708
 
569
709
  /**
570
- * Free-form search query
710
+ * Query param: Free-form search query
571
711
  */
572
712
  query?: string;
573
713
 
574
714
  /**
575
- * Sort order for results (asc or desc by creation time)
715
+ * Query param: Sort order for results (asc or desc by creation time)
576
716
  */
577
717
  sortOrder?: string;
578
718
 
579
719
  /**
580
- * Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when unspecified;
581
- * pass STATE_ARCHIVED to list archived tool sets.
720
+ * Query param: Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when
721
+ * unspecified; pass STATE_ARCHIVED to list archived tool sets.
582
722
  */
583
723
  state?: 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
584
724
  }
@@ -587,28 +727,28 @@ export interface ToolSetDeleteParams {
587
727
  /**
588
728
  * Workspace ID.
589
729
  */
590
- workspaceId: string;
730
+ workspaceId?: string;
591
731
  }
592
732
 
593
733
  export interface ToolSetArchiveParams {
594
734
  /**
595
735
  * Workspace ID.
596
736
  */
597
- workspaceId: string;
737
+ workspaceId?: string;
598
738
  }
599
739
 
600
740
  export interface ToolSetGetOpenAPISpecParams {
601
741
  /**
602
742
  * Workspace ID.
603
743
  */
604
- workspaceId: string;
744
+ workspaceId?: string;
605
745
  }
606
746
 
607
747
  export interface ToolSetListEventsParams extends CursorPaginationParams {
608
748
  /**
609
749
  * Path param: Workspace ID.
610
750
  */
611
- workspaceId: string;
751
+ workspaceId?: string;
612
752
 
613
753
  /**
614
754
  * Query param: When set to true you may use more of your alloted API rate-limit
@@ -632,7 +772,7 @@ export interface ToolSetUnarchiveParams {
632
772
  /**
633
773
  * Workspace ID.
634
774
  */
635
- workspaceId: string;
775
+ workspaceId?: string;
636
776
  }
637
777
 
638
778
  ToolSets.Tools = Tools;
@@ -641,8 +781,15 @@ ToolSets.Secrets = Secrets;
641
781
  export declare namespace ToolSets {
642
782
  export {
643
783
  type ApprovalRequirementFilter as ApprovalRequirementFilter,
784
+ type ApprovalRequirementFilterAlways as ApprovalRequirementFilterAlways,
785
+ type ApprovalRequirementFilterOnly as ApprovalRequirementFilterOnly,
644
786
  type AttributeFilter as AttributeFilter,
645
787
  type StringMatcher as StringMatcher,
788
+ type StringMatcherContains as StringMatcherContains,
789
+ type StringMatcherEndsWith as StringMatcherEndsWith,
790
+ type StringMatcherExact as StringMatcherExact,
791
+ type StringMatcherRegex as StringMatcherRegex,
792
+ type StringMatcherStartsWith as StringMatcherStartsWith,
646
793
  type SyncCompleted as SyncCompleted,
647
794
  type SyncFailed as SyncFailed,
648
795
  type SyncStarted as SyncStarted,
@@ -650,11 +797,20 @@ export declare namespace ToolSets {
650
797
  type ToolSet as ToolSet,
651
798
  type ToolSetAdapter as ToolSetAdapter,
652
799
  type ToolSetAdapterBare as ToolSetAdapterBare,
800
+ type ToolSetAdapterBareVariant as ToolSetAdapterBareVariant,
653
801
  type ToolSetAdapterHTTP as ToolSetAdapterHTTP,
654
- type ToolSetAdapterMcp as ToolSetAdapterMcp,
802
+ type ToolSetAdapterHTTPVariant as ToolSetAdapterHTTPVariant,
803
+ type ToolSetAdapterMCP as ToolSetAdapterMCP,
804
+ type ToolSetAdapterMCPVariant as ToolSetAdapterMCPVariant,
655
805
  type ToolSetAdapterOpenAPI as ToolSetAdapterOpenAPI,
806
+ type ToolSetAdapterOpenAPIUploadID as ToolSetAdapterOpenAPIUploadID,
807
+ type ToolSetAdapterOpenAPIURL as ToolSetAdapterOpenAPIURL,
808
+ type ToolSetAdapterOpenAPIVariant as ToolSetAdapterOpenAPIVariant,
656
809
  type ToolSetEvent as ToolSetEvent,
657
810
  type ToolSetEventData as ToolSetEventData,
811
+ type ToolSetEventDataSyncCompleted as ToolSetEventDataSyncCompleted,
812
+ type ToolSetEventDataSyncFailed as ToolSetEventDataSyncFailed,
813
+ type ToolSetEventDataSyncStarted as ToolSetEventDataSyncStarted,
658
814
  type ToolSetInfo as ToolSetInfo,
659
815
  type ToolSetSpec as ToolSetSpec,
660
816
  type ToolSetGetOpenAPISpecResponse as ToolSetGetOpenAPISpecResponse,
@@ -675,13 +831,17 @@ export declare namespace ToolSets {
675
831
  Tools as Tools,
676
832
  type ConfigBare as ConfigBare,
677
833
  type ConfigHTTP as ConfigHTTP,
678
- type ConfigMcp as ConfigMcp,
834
+ type ConfigMCP as ConfigMCP,
679
835
  type ConfigOpenAPI as ConfigOpenAPI,
680
- type McpAnnotations as McpAnnotations,
836
+ type MCPAnnotations as MCPAnnotations,
681
837
  type Tool as Tool,
682
838
  type ToolInfo as ToolInfo,
683
839
  type ToolSpec as ToolSpec,
684
840
  type ToolSpecConfig as ToolSpecConfig,
841
+ type ToolSpecConfigBare as ToolSpecConfigBare,
842
+ type ToolSpecConfigHTTP as ToolSpecConfigHTTP,
843
+ type ToolSpecConfigMCP as ToolSpecConfigMCP,
844
+ type ToolSpecConfigOpenAPI as ToolSpecConfigOpenAPI,
685
845
  type ToolsCursorPagination as ToolsCursorPagination,
686
846
  type ToolCreateParams as ToolCreateParams,
687
847
  type ToolRetrieveParams as ToolRetrieveParams,