@cadenya/cadenya 0.91.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 (65) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/package.json +1 -1
  3. package/resources/ai-provider-keys.d.mts +15 -2
  4. package/resources/ai-provider-keys.d.mts.map +1 -1
  5. package/resources/ai-provider-keys.d.ts +15 -2
  6. package/resources/ai-provider-keys.d.ts.map +1 -1
  7. package/resources/models.d.mts +18 -4
  8. package/resources/models.d.mts.map +1 -1
  9. package/resources/models.d.ts +18 -4
  10. package/resources/models.d.ts.map +1 -1
  11. package/resources/models.js.map +1 -1
  12. package/resources/models.mjs.map +1 -1
  13. package/resources/objectives/index.d.mts +1 -1
  14. package/resources/objectives/index.d.mts.map +1 -1
  15. package/resources/objectives/index.d.ts +1 -1
  16. package/resources/objectives/index.d.ts.map +1 -1
  17. package/resources/objectives/index.js.map +1 -1
  18. package/resources/objectives/index.mjs.map +1 -1
  19. package/resources/objectives/objectives.d.mts +2 -2
  20. package/resources/objectives/objectives.d.mts.map +1 -1
  21. package/resources/objectives/objectives.d.ts +2 -2
  22. package/resources/objectives/objectives.d.ts.map +1 -1
  23. package/resources/objectives/objectives.js.map +1 -1
  24. package/resources/objectives/objectives.mjs.map +1 -1
  25. package/resources/objectives/tool-calls.d.mts +39 -1
  26. package/resources/objectives/tool-calls.d.mts.map +1 -1
  27. package/resources/objectives/tool-calls.d.ts +39 -1
  28. package/resources/objectives/tool-calls.d.ts.map +1 -1
  29. package/resources/tool-sets/index.d.mts +1 -0
  30. package/resources/tool-sets/index.d.mts.map +1 -1
  31. package/resources/tool-sets/index.d.ts +1 -0
  32. package/resources/tool-sets/index.d.ts.map +1 -1
  33. package/resources/tool-sets/index.js +3 -1
  34. package/resources/tool-sets/index.js.map +1 -1
  35. package/resources/tool-sets/index.mjs +1 -0
  36. package/resources/tool-sets/index.mjs.map +1 -1
  37. package/resources/tool-sets/secrets.d.mts +154 -0
  38. package/resources/tool-sets/secrets.d.mts.map +1 -0
  39. package/resources/tool-sets/secrets.d.ts +154 -0
  40. package/resources/tool-sets/secrets.d.ts.map +1 -0
  41. package/resources/tool-sets/secrets.js +63 -0
  42. package/resources/tool-sets/secrets.js.map +1 -0
  43. package/resources/tool-sets/secrets.mjs +59 -0
  44. package/resources/tool-sets/secrets.mjs.map +1 -0
  45. package/resources/tool-sets/tool-sets.d.mts +4 -0
  46. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  47. package/resources/tool-sets/tool-sets.d.ts +4 -0
  48. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  49. package/resources/tool-sets/tool-sets.js +4 -0
  50. package/resources/tool-sets/tool-sets.js.map +1 -1
  51. package/resources/tool-sets/tool-sets.mjs +4 -0
  52. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  53. package/src/resources/ai-provider-keys.ts +17 -2
  54. package/src/resources/models.ts +20 -4
  55. package/src/resources/objectives/index.ts +1 -0
  56. package/src/resources/objectives/objectives.ts +2 -0
  57. package/src/resources/objectives/tool-calls.ts +49 -0
  58. package/src/resources/tool-sets/index.ts +12 -0
  59. package/src/resources/tool-sets/secrets.ts +233 -0
  60. package/src/resources/tool-sets/tool-sets.ts +28 -0
  61. package/src/version.ts +1 -1
  62. package/version.d.mts +1 -1
  63. package/version.d.ts +1 -1
  64. package/version.js +1 -1
  65. package/version.mjs +1 -1
@@ -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.91.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.91.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.91.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.91.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.91.0'; // x-release-please-version
1
+ export const VERSION = '0.93.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map