@cadenya/cadenya 0.92.0 → 0.93.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 (53) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/resources/objectives/index.d.mts +1 -1
  4. package/resources/objectives/index.d.mts.map +1 -1
  5. package/resources/objectives/index.d.ts +1 -1
  6. package/resources/objectives/index.d.ts.map +1 -1
  7. package/resources/objectives/index.js.map +1 -1
  8. package/resources/objectives/index.mjs.map +1 -1
  9. package/resources/objectives/objectives.d.mts +2 -2
  10. package/resources/objectives/objectives.d.mts.map +1 -1
  11. package/resources/objectives/objectives.d.ts +2 -2
  12. package/resources/objectives/objectives.d.ts.map +1 -1
  13. package/resources/objectives/objectives.js.map +1 -1
  14. package/resources/objectives/objectives.mjs.map +1 -1
  15. package/resources/objectives/tool-calls.d.mts +39 -1
  16. package/resources/objectives/tool-calls.d.mts.map +1 -1
  17. package/resources/objectives/tool-calls.d.ts +39 -1
  18. package/resources/objectives/tool-calls.d.ts.map +1 -1
  19. package/resources/tool-sets/index.d.mts +1 -0
  20. package/resources/tool-sets/index.d.mts.map +1 -1
  21. package/resources/tool-sets/index.d.ts +1 -0
  22. package/resources/tool-sets/index.d.ts.map +1 -1
  23. package/resources/tool-sets/index.js +3 -1
  24. package/resources/tool-sets/index.js.map +1 -1
  25. package/resources/tool-sets/index.mjs +1 -0
  26. package/resources/tool-sets/index.mjs.map +1 -1
  27. package/resources/tool-sets/secrets.d.mts +154 -0
  28. package/resources/tool-sets/secrets.d.mts.map +1 -0
  29. package/resources/tool-sets/secrets.d.ts +154 -0
  30. package/resources/tool-sets/secrets.d.ts.map +1 -0
  31. package/resources/tool-sets/secrets.js +63 -0
  32. package/resources/tool-sets/secrets.js.map +1 -0
  33. package/resources/tool-sets/secrets.mjs +59 -0
  34. package/resources/tool-sets/secrets.mjs.map +1 -0
  35. package/resources/tool-sets/tool-sets.d.mts +4 -0
  36. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  37. package/resources/tool-sets/tool-sets.d.ts +4 -0
  38. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  39. package/resources/tool-sets/tool-sets.js +4 -0
  40. package/resources/tool-sets/tool-sets.js.map +1 -1
  41. package/resources/tool-sets/tool-sets.mjs +4 -0
  42. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  43. package/src/resources/objectives/index.ts +1 -0
  44. package/src/resources/objectives/objectives.ts +2 -0
  45. package/src/resources/objectives/tool-calls.ts +49 -0
  46. package/src/resources/tool-sets/index.ts +12 -0
  47. package/src/resources/tool-sets/secrets.ts +233 -0
  48. package/src/resources/tool-sets/tool-sets.ts +28 -0
  49. package/src/version.ts +1 -1
  50. package/version.d.mts +1 -1
  51. package/version.d.ts +1 -1
  52. package/version.js +1 -1
  53. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tool-sets.mjs","sourceRoot":"","sources":["../../src/resources/tool-sets/tool-sets.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,KAAK,QAAQ,oBAAgB;AACpC,OAAO,EAeL,KAAK,GAEN,oBAAgB;AAEjB,OAAO,EAAE,gBAAgB,EAA4C,kCAA8B;AACnG,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;GAMG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0G3D,CAAC;IAxGC;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,IAAyB,EAAE,OAAwB;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,WAAW,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAA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M,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,kBAAkB,WAAW,cAAc,SAAS,SAAS,EACjE,CAAA,gBAA8B,CAAA,EAC9B,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,EAAU,EAAE,MAA8B,EAAE,OAAwB;QAC5E,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,WAAW,cAAc,EAAE,YAAY,EAAE;YACtF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAkaD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAC;AACvB,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC"}
@@ -70,6 +70,7 @@ export {
70
70
  type ObjectiveToolCallResultImageBlock,
71
71
  type ObjectiveToolCallResultTextBlock,
72
72
  type ObjectiveToolCallWithResult,
73
+ type ResolvedSecret,
73
74
  type ToolCallRetrieveParams,
74
75
  type ToolCallListParams,
75
76
  type ToolCallApproveParams,
@@ -38,6 +38,7 @@ import {
38
38
  ObjectiveToolCallResultTextBlock,
39
39
  ObjectiveToolCallWithResult,
40
40
  ObjectiveToolCallsCursorPagination,
41
+ ResolvedSecret,
41
42
  ToolCallApproveParams,
42
43
  ToolCallDenyParams,
43
44
  ToolCallListParams,
@@ -1174,6 +1175,7 @@ export declare namespace Objectives {
1174
1175
  type ObjectiveToolCallResultImageBlock as ObjectiveToolCallResultImageBlock,
1175
1176
  type ObjectiveToolCallResultTextBlock as ObjectiveToolCallResultTextBlock,
1176
1177
  type ObjectiveToolCallWithResult as ObjectiveToolCallWithResult,
1178
+ type ResolvedSecret as ResolvedSecret,
1177
1179
  type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination,
1178
1180
  type ToolCallRetrieveParams as ToolCallRetrieveParams,
1179
1181
  type ToolCallListParams as ToolCallListParams,
@@ -131,6 +131,11 @@ export interface ObjectiveToolCallData {
131
131
  */
132
132
  memo?: string;
133
133
 
134
+ /**
135
+ * List of resolved secrets used by the tool call
136
+ */
137
+ resolvedSecrets?: Array<ResolvedSecret>;
138
+
134
139
  /**
135
140
  * A profile identifies a user or non-human principal (such as an API key) at the
136
141
  * account level. Profiles are account-scoped and can be granted access to multiple
@@ -152,6 +157,26 @@ export interface ObjectiveToolCallInfo {
152
157
  * runs)
153
158
  */
154
159
  objective?: Shared.OperationMetadata;
160
+
161
+ /**
162
+ * BareMetadata contains the minimal metadata for a resource: the ID and an
163
+ * optional human-readable name. These are used for reference fields where the full
164
+ * metadata (account scoping, timestamps, labels, external IDs) is not needed —
165
+ * e.g., the tool references inside an agent variation spec or the tools assigned
166
+ * to an objective. Both fields are server-populated; clients provide IDs through
167
+ * sibling fields rather than by constructing a BareMetadata themselves.
168
+ */
169
+ tool?: Shared.BareMetadata;
170
+
171
+ /**
172
+ * BareMetadata contains the minimal metadata for a resource: the ID and an
173
+ * optional human-readable name. These are used for reference fields where the full
174
+ * metadata (account scoping, timestamps, labels, external IDs) is not needed —
175
+ * e.g., the tool references inside an agent variation spec or the tools assigned
176
+ * to an objective. Both fields are server-populated; clients provide IDs through
177
+ * sibling fields rather than by constructing a BareMetadata themselves.
178
+ */
179
+ toolSet?: Shared.BareMetadata;
155
180
  }
156
181
 
157
182
  /**
@@ -256,6 +281,11 @@ export interface ObjectiveToolCallWithResult {
256
281
  | 'TOOL_CALL_STATUS_APPROVED'
257
282
  | 'TOOL_CALL_STATUS_DENIED';
258
283
 
284
+ /**
285
+ * List of resolved secrets used by the tool call
286
+ */
287
+ resolvedSecrets?: Array<ResolvedSecret>;
288
+
259
289
  /**
260
290
  * ObjectiveToolCallResult is the content a tool returned after execution. Tools
261
291
  * can return multiple content blocks, and blocks can be multi-modal (text, image,
@@ -265,6 +295,24 @@ export interface ObjectiveToolCallWithResult {
265
295
  result?: ObjectiveToolCallResult;
266
296
  }
267
297
 
298
+ /**
299
+ * ResolvedSecret is a resolved secret value from the workspace, toolset, or
300
+ * objective. When a tool is called, it will rely on secrets in the order of:
301
+ *
302
+ * - Objective
303
+ * - Toolset
304
+ * - Workspace
305
+ */
306
+ export interface ResolvedSecret {
307
+ key?: string;
308
+
309
+ source?:
310
+ | 'RESOLVED_SECRET_SOURCE_UNSPECIFIED'
311
+ | 'RESOLVED_SECRET_SOURCE_WORKSPACE'
312
+ | 'RESOLVED_SECRET_SOURCE_TOOLSET'
313
+ | 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
314
+ }
315
+
268
316
  export interface ToolCallRetrieveParams {
269
317
  workspaceId: string;
270
318
 
@@ -335,6 +383,7 @@ export declare namespace ToolCalls {
335
383
  type ObjectiveToolCallResultImageBlock as ObjectiveToolCallResultImageBlock,
336
384
  type ObjectiveToolCallResultTextBlock as ObjectiveToolCallResultTextBlock,
337
385
  type ObjectiveToolCallWithResult as ObjectiveToolCallWithResult,
386
+ type ResolvedSecret as ResolvedSecret,
338
387
  type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination,
339
388
  type ToolCallRetrieveParams as ToolCallRetrieveParams,
340
389
  type ToolCallListParams as ToolCallListParams,
@@ -1,5 +1,17 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export {
4
+ Secrets,
5
+ type ToolSetSecret,
6
+ type ToolSetSecretInfo,
7
+ type ToolSetSecretSpec,
8
+ type SecretCreateParams,
9
+ type SecretRetrieveParams,
10
+ type SecretUpdateParams,
11
+ type SecretListParams,
12
+ type SecretDeleteParams,
13
+ type ToolSetSecretsCursorPagination,
14
+ } from './secrets';
3
15
  export {
4
16
  ToolSets,
5
17
  type ApprovalRequirementFilter,
@@ -0,0 +1,233 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as AccountAPI from '../account';
5
+ import * as Shared from '../shared';
6
+ import { APIPromise } from '../../core/api-promise';
7
+ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
8
+ import { buildHeaders } from '../../internal/headers';
9
+ import { RequestOptions } from '../../internal/request-options';
10
+ import { path } from '../../internal/utils/path';
11
+
12
+ /**
13
+ * Manage tool sets and the tools they contain. Tool sets group related tools,
14
+ * and tools define specific capabilities available to agents.
15
+ *
16
+ * When a tool set is managed, only API key actors can modify its tools; human
17
+ * (profile) actors cannot.
18
+ */
19
+ export class Secrets extends APIResource {
20
+ /**
21
+ * Creates a new secret scoped to the tool set
22
+ */
23
+ create(toolSetID: string, params: SecretCreateParams, options?: RequestOptions): APIPromise<ToolSetSecret> {
24
+ const { workspaceId, ...body } = params;
25
+ return this._client.post(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/secrets`, {
26
+ body,
27
+ ...options,
28
+ });
29
+ }
30
+
31
+ /**
32
+ * Retrieves a tool set secret by ID from the tool set
33
+ */
34
+ retrieve(id: string, params: SecretRetrieveParams, options?: RequestOptions): APIPromise<ToolSetSecret> {
35
+ const { workspaceId, toolSetId } = params;
36
+ return this._client.get(
37
+ path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/secrets/${id}`,
38
+ options,
39
+ );
40
+ }
41
+
42
+ /**
43
+ * Updates a secret scoped to the tool set
44
+ */
45
+ update(id: string, params: SecretUpdateParams, options?: RequestOptions): APIPromise<ToolSetSecret> {
46
+ const { workspaceId, toolSetId, ...body } = params;
47
+ return this._client.patch(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/secrets/${id}`, {
48
+ body,
49
+ ...options,
50
+ });
51
+ }
52
+
53
+ /**
54
+ * Lists all secrets scoped to the tool set
55
+ */
56
+ list(
57
+ toolSetID: string,
58
+ params: SecretListParams,
59
+ options?: RequestOptions,
60
+ ): PagePromise<ToolSetSecretsCursorPagination, ToolSetSecret> {
61
+ const { workspaceId, ...query } = params;
62
+ return this._client.getAPIList(
63
+ path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetID}/secrets`,
64
+ CursorPagination<ToolSetSecret>,
65
+ { query, ...options },
66
+ );
67
+ }
68
+
69
+ /**
70
+ * Deletes a secret scoped to the tool set
71
+ */
72
+ delete(id: string, params: SecretDeleteParams, options?: RequestOptions): APIPromise<void> {
73
+ const { workspaceId, toolSetId } = params;
74
+ return this._client.delete(path`/v1/workspaces/${workspaceId}/tool_sets/${toolSetId}/secrets/${id}`, {
75
+ ...options,
76
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
77
+ });
78
+ }
79
+ }
80
+
81
+ export type ToolSetSecretsCursorPagination = CursorPagination<ToolSetSecret>;
82
+
83
+ export interface ToolSetSecret {
84
+ /**
85
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
86
+ */
87
+ metadata: Shared.ResourceMetadata;
88
+
89
+ spec: ToolSetSecretSpec;
90
+
91
+ /**
92
+ * Tool set secret information
93
+ */
94
+ info?: ToolSetSecretInfo;
95
+ }
96
+
97
+ export interface ToolSetSecretInfo {
98
+ /**
99
+ * A profile identifies a user or non-human principal (such as an API key) at the
100
+ * account level. Profiles are account-scoped and can be granted access to multiple
101
+ * workspaces.
102
+ */
103
+ createdBy?: AccountAPI.Profile;
104
+
105
+ lastUsedAt?: string;
106
+ }
107
+
108
+ export interface ToolSetSecretSpec {
109
+ value?: string;
110
+ }
111
+
112
+ export interface SecretCreateParams {
113
+ /**
114
+ * Path param: The workspace that owns the tool set.
115
+ */
116
+ workspaceId: string;
117
+
118
+ /**
119
+ * Body param: CreateResourceMetadata contains the user-provided fields for
120
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
121
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
122
+ * server.
123
+ */
124
+ metadata: Shared.CreateResourceMetadata;
125
+
126
+ /**
127
+ * Body param
128
+ */
129
+ spec: ToolSetSecretSpec;
130
+ }
131
+
132
+ export interface SecretRetrieveParams {
133
+ /**
134
+ * The workspace that owns the tool set.
135
+ */
136
+ workspaceId: string;
137
+
138
+ /**
139
+ * The tool set the secret belongs to. Accepts the canonical ts\_… form or the
140
+ * external_id:<value> form.
141
+ */
142
+ toolSetId: string;
143
+ }
144
+
145
+ export interface SecretUpdateParams {
146
+ /**
147
+ * Path param: The workspace that owns the tool set.
148
+ */
149
+ workspaceId: string;
150
+
151
+ /**
152
+ * Path param: The tool set the secret belongs to. Accepts the canonical ts\_… form
153
+ * or the external_id:<value> form.
154
+ */
155
+ toolSetId: string;
156
+
157
+ /**
158
+ * Body param: UpdateResourceMetadata contains the user-provided fields for
159
+ * updating a workspace-scoped resource. Read-only fields (id, account_id,
160
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
161
+ * server.
162
+ */
163
+ metadata?: Shared.UpdateResourceMetadata;
164
+
165
+ /**
166
+ * Body param
167
+ */
168
+ spec?: ToolSetSecretSpec;
169
+
170
+ /**
171
+ * Body param: Fields to update.
172
+ */
173
+ updateMask?: string;
174
+ }
175
+
176
+ export interface SecretListParams extends CursorPaginationParams {
177
+ /**
178
+ * Path param: The workspace that owns the tool set.
179
+ */
180
+ workspaceId: string;
181
+
182
+ /**
183
+ * Query param: Filter by bundle_key — return only resources owned by this bundle.
184
+ */
185
+ bundleKey?: string;
186
+
187
+ /**
188
+ * Query param: When set to true you may use more of your alloted API rate-limit
189
+ */
190
+ includeInfo?: boolean;
191
+
192
+ /**
193
+ * Query param: Filter expression (query param: prefix)
194
+ */
195
+ prefix?: string;
196
+
197
+ /**
198
+ * Query param: Free-form search query
199
+ */
200
+ query?: string;
201
+
202
+ /**
203
+ * Query param: Sort order for results (asc or desc by creation time)
204
+ */
205
+ sortOrder?: string;
206
+ }
207
+
208
+ export interface SecretDeleteParams {
209
+ /**
210
+ * The workspace that owns the tool set.
211
+ */
212
+ workspaceId: string;
213
+
214
+ /**
215
+ * The tool set the secret belongs to. Accepts the canonical ts\_… form or the
216
+ * external_id:<value> form.
217
+ */
218
+ toolSetId: string;
219
+ }
220
+
221
+ export declare namespace Secrets {
222
+ export {
223
+ type ToolSetSecret as ToolSetSecret,
224
+ type ToolSetSecretInfo as ToolSetSecretInfo,
225
+ type ToolSetSecretSpec as ToolSetSecretSpec,
226
+ type ToolSetSecretsCursorPagination as ToolSetSecretsCursorPagination,
227
+ type SecretCreateParams as SecretCreateParams,
228
+ type SecretRetrieveParams as SecretRetrieveParams,
229
+ type SecretUpdateParams as SecretUpdateParams,
230
+ type SecretListParams as SecretListParams,
231
+ type SecretDeleteParams as SecretDeleteParams,
232
+ };
233
+ }
@@ -3,6 +3,19 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as AccountAPI from '../account';
5
5
  import * as Shared from '../shared';
6
+ import * as SecretsAPI from './secrets';
7
+ import {
8
+ SecretCreateParams,
9
+ SecretDeleteParams,
10
+ SecretListParams,
11
+ SecretRetrieveParams,
12
+ SecretUpdateParams,
13
+ Secrets,
14
+ ToolSetSecret,
15
+ ToolSetSecretInfo,
16
+ ToolSetSecretSpec,
17
+ ToolSetSecretsCursorPagination,
18
+ } from './secrets';
6
19
  import * as ToolsAPI from './tools';
7
20
  import {
8
21
  ConfigHTTP,
@@ -37,6 +50,7 @@ import { path } from '../../internal/utils/path';
37
50
  */
38
51
  export class ToolSets extends APIResource {
39
52
  tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
53
+ secrets: SecretsAPI.Secrets = new SecretsAPI.Secrets(this._client);
40
54
 
41
55
  /**
42
56
  * Creates a new tool set in the workspace
@@ -561,6 +575,7 @@ export interface ToolSetUnarchiveParams {
561
575
  }
562
576
 
563
577
  ToolSets.Tools = Tools;
578
+ ToolSets.Secrets = Secrets;
564
579
 
565
580
  export declare namespace ToolSets {
566
581
  export {
@@ -612,4 +627,17 @@ export declare namespace ToolSets {
612
627
  type ToolOmitParams as ToolOmitParams,
613
628
  type ToolRestoreParams as ToolRestoreParams,
614
629
  };
630
+
631
+ export {
632
+ Secrets as Secrets,
633
+ type ToolSetSecret as ToolSetSecret,
634
+ type ToolSetSecretInfo as ToolSetSecretInfo,
635
+ type ToolSetSecretSpec as ToolSetSecretSpec,
636
+ type ToolSetSecretsCursorPagination as ToolSetSecretsCursorPagination,
637
+ type SecretCreateParams as SecretCreateParams,
638
+ type SecretRetrieveParams as SecretRetrieveParams,
639
+ type SecretUpdateParams as SecretUpdateParams,
640
+ type SecretListParams as SecretListParams,
641
+ type SecretDeleteParams as SecretDeleteParams,
642
+ };
615
643
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.92.0'; // x-release-please-version
1
+ export const VERSION = '0.93.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.92.0";
1
+ export declare const VERSION = "0.93.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.92.0";
1
+ export declare const VERSION = "0.93.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.92.0'; // x-release-please-version
4
+ exports.VERSION = '0.93.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.92.0'; // x-release-please-version
1
+ export const VERSION = '0.93.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map