@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
@@ -34,6 +34,9 @@ import {
34
34
  ObjectiveToolCallResult,
35
35
  ObjectiveToolCallResultAudioBlock,
36
36
  ObjectiveToolCallResultContentBlock,
37
+ ObjectiveToolCallResultContentBlockAudio,
38
+ ObjectiveToolCallResultContentBlockImage,
39
+ ObjectiveToolCallResultContentBlockText,
37
40
  ObjectiveToolCallResultImageBlock,
38
41
  ObjectiveToolCallResultTextBlock,
39
42
  ObjectiveToolCallWithResult,
@@ -41,6 +44,9 @@ import {
41
44
  ResolvedSecret,
42
45
  SetToolCallContentRequestAudioBlock,
43
46
  SetToolCallContentRequestContentBlock,
47
+ SetToolCallContentRequestContentBlockAudio,
48
+ SetToolCallContentRequestContentBlockImage,
49
+ SetToolCallContentRequestContentBlockText,
44
50
  SetToolCallContentRequestImageBlock,
45
51
  SetToolCallContentRequestTextBlock,
46
52
  ToolCallApproveParams,
@@ -68,29 +74,61 @@ export class Objectives extends APIResource {
68
74
 
69
75
  /**
70
76
  * Creates a new objective in the workspace
71
- */
72
- create(workspaceID: string, body: ObjectiveCreateParams, options?: RequestOptions): APIPromise<Objective> {
73
- return this._client.post(path`/v1/workspaces/${workspaceID}/objectives`, { body, ...options });
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const objective = await client.objectives.create({
81
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
82
+ * agentId: 'agent_01HXKD2E5NQM3T9AYWCFMGWT9Y',
83
+ * systemPromptData: { foo: 'bar' },
84
+ * });
85
+ * ```
86
+ */
87
+ create(params: ObjectiveCreateParams, options?: RequestOptions): APIPromise<Objective> {
88
+ const { workspaceId = this._client.workspaceID, ...body } = params;
89
+ return this._client.post(path`/v1/workspaces/${workspaceId}/objectives`, { body, ...options });
74
90
  }
75
91
 
76
92
  /**
77
93
  * Retrieves an objective by ID from the workspace
78
- */
79
- retrieve(id: string, params: ObjectiveRetrieveParams, options?: RequestOptions): APIPromise<Objective> {
80
- const { workspaceId } = params;
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const objective = await client.objectives.retrieve(
98
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
99
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
100
+ * );
101
+ * ```
102
+ */
103
+ retrieve(
104
+ id: string,
105
+ params: ObjectiveRetrieveParams | null | undefined = {},
106
+ options?: RequestOptions,
107
+ ): APIPromise<Objective> {
108
+ const { workspaceId = this._client.workspaceID } = params ?? {};
81
109
  return this._client.get(path`/v1/workspaces/${workspaceId}/objectives/${id}`, options);
82
110
  }
83
111
 
84
112
  /**
85
113
  * Lists all objectives in the workspace
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * // Automatically fetches more pages as needed.
118
+ * for await (const objective of client.objectives.list({
119
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
120
+ * })) {
121
+ * // ...
122
+ * }
123
+ * ```
86
124
  */
87
125
  list(
88
- workspaceID: string,
89
- query: ObjectiveListParams | null | undefined = {},
126
+ params: ObjectiveListParams | null | undefined = {},
90
127
  options?: RequestOptions,
91
128
  ): PagePromise<ObjectivesCursorPagination, Objective> {
129
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
92
130
  return this._client.getAPIList(
93
- path`/v1/workspaces/${workspaceID}/objectives`,
131
+ path`/v1/workspaces/${workspaceId}/objectives`,
94
132
  CursorPagination<Objective>,
95
133
  { query, ...options },
96
134
  );
@@ -99,13 +137,21 @@ export class Objectives extends APIResource {
99
137
  /**
100
138
  * Cancels a running or pending objective. The objective's state will be set to
101
139
  * STATE_CANCELLED.
140
+ *
141
+ * @example
142
+ * ```ts
143
+ * const objective = await client.objectives.cancel(
144
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
145
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
146
+ * );
147
+ * ```
102
148
  */
103
149
  cancel(
104
150
  objectiveID: string,
105
151
  params: ObjectiveCancelParams,
106
152
  options?: RequestOptions,
107
153
  ): APIPromise<Objective> {
108
- const { workspaceId, ...body } = params;
154
+ const { workspaceId = this._client.workspaceID, ...body } = params;
109
155
  return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}:cancel`, {
110
156
  body,
111
157
  ...options,
@@ -115,13 +161,21 @@ export class Objectives extends APIResource {
115
161
  /**
116
162
  * Triggers compaction on a running objective. Optionally override the variation's
117
163
  * compaction config.
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * const response = await client.objectives.compact(
168
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
169
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
170
+ * );
171
+ * ```
118
172
  */
119
173
  compact(
120
174
  objectiveID: string,
121
175
  params: ObjectiveCompactParams,
122
176
  options?: RequestOptions,
123
177
  ): APIPromise<ObjectiveCompactResponse> {
124
- const { workspaceId, ...body } = params;
178
+ const { workspaceId = this._client.workspaceID, ...body } = params;
125
179
  return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}:compact`, {
126
180
  body,
127
181
  ...options,
@@ -130,13 +184,24 @@ export class Objectives extends APIResource {
130
184
 
131
185
  /**
132
186
  * Continues an objective that has completed
187
+ *
188
+ * @example
189
+ * ```ts
190
+ * const objectiveEvent = await client.objectives.continue(
191
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
192
+ * {
193
+ * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
194
+ * message: 'message',
195
+ * },
196
+ * );
197
+ * ```
133
198
  */
134
199
  continue(
135
200
  objectiveID: string,
136
201
  params: ObjectiveContinueParams,
137
202
  options?: RequestOptions,
138
203
  ): APIPromise<ObjectiveEvent> {
139
- const { workspaceId, ...body } = params;
204
+ const { workspaceId = this._client.workspaceID, ...body } = params;
140
205
  return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}:continue`, {
141
206
  body,
142
207
  ...options,
@@ -146,13 +211,24 @@ export class Objectives extends APIResource {
146
211
  /**
147
212
  * Read-only list of the last five windows of execution for this objective, ordered
148
213
  * by most recent first
214
+ *
215
+ * @example
216
+ * ```ts
217
+ * // Automatically fetches more pages as needed.
218
+ * for await (const objectiveContextWindow of client.objectives.listContextWindows(
219
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
220
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
221
+ * )) {
222
+ * // ...
223
+ * }
224
+ * ```
149
225
  */
150
226
  listContextWindows(
151
227
  objectiveID: string,
152
- params: ObjectiveListContextWindowsParams,
228
+ params: ObjectiveListContextWindowsParams | null | undefined = {},
153
229
  options?: RequestOptions,
154
230
  ): PagePromise<ObjectiveContextWindowsCursorPagination, ObjectiveContextWindow> {
155
- const { workspaceId, ...query } = params;
231
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
156
232
  return this._client.getAPIList(
157
233
  path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/context_windows`,
158
234
  CursorPagination<ObjectiveContextWindow>,
@@ -162,13 +238,24 @@ export class Objectives extends APIResource {
162
238
 
163
239
  /**
164
240
  * Lists all events for an objective
241
+ *
242
+ * @example
243
+ * ```ts
244
+ * // Automatically fetches more pages as needed.
245
+ * for await (const objectiveEvent of client.objectives.listEvents(
246
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
247
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
248
+ * )) {
249
+ * // ...
250
+ * }
251
+ * ```
165
252
  */
166
253
  listEvents(
167
254
  objectiveID: string,
168
- params: ObjectiveListEventsParams,
255
+ params: ObjectiveListEventsParams | null | undefined = {},
169
256
  options?: RequestOptions,
170
257
  ): PagePromise<ObjectiveEventsCursorPagination, ObjectiveEvent> {
171
- const { workspaceId, ...query } = params;
258
+ const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
172
259
  return this._client.getAPIList(
173
260
  path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/events`,
174
261
  CursorPagination<ObjectiveEvent>,
@@ -181,13 +268,22 @@ export class Objectives extends APIResource {
181
268
  * iteration: character lengths per context component (system prompt, memory
182
269
  * appendices, tool definitions, messages by role) alongside the iteration's input
183
270
  * token counts.
271
+ *
272
+ * @example
273
+ * ```ts
274
+ * const response =
275
+ * await client.objectives.retrieveDiagnostics(
276
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
277
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
278
+ * );
279
+ * ```
184
280
  */
185
281
  retrieveDiagnostics(
186
282
  objectiveID: string,
187
- params: ObjectiveRetrieveDiagnosticsParams,
283
+ params: ObjectiveRetrieveDiagnosticsParams | null | undefined = {},
188
284
  options?: RequestOptions,
189
285
  ): APIPromise<ObjectiveRetrieveDiagnosticsResponse> {
190
- const { workspaceId } = params;
286
+ const { workspaceId = this._client.workspaceID } = params ?? {};
191
287
  return this._client.get(
192
288
  path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/diagnostics`,
193
289
  options,
@@ -196,13 +292,21 @@ export class Objectives extends APIResource {
196
292
 
197
293
  /**
198
294
  * Streams events for an objective in real-time using server-sent events (SSE)
295
+ *
296
+ * @example
297
+ * ```ts
298
+ * const objectiveEvent = await client.objectives.streamEvents(
299
+ * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
300
+ * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
301
+ * );
302
+ * ```
199
303
  */
200
304
  streamEvents(
201
305
  objectiveID: string,
202
- params: ObjectiveStreamEventsParams,
306
+ params: ObjectiveStreamEventsParams | undefined = {},
203
307
  options?: RequestOptions,
204
308
  ): APIPromise<Stream<ObjectiveEvent>> {
205
- const { workspaceId } = params;
309
+ const { workspaceId = this._client.workspaceID } = params ?? {};
206
310
  return this._client.get(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/events:stream`, {
207
311
  ...options,
208
312
  headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
@@ -243,21 +347,33 @@ export interface AssistantToolCall {
243
347
  * user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context),
244
348
  * or a Cadenya Tool (one Cadenya provides).
245
349
  */
246
- export interface CallableTool {
350
+ export type CallableTool = CallableToolTool | CallableToolAgent | CallableToolCadenyaProvidedTool;
351
+
352
+ export interface CallableToolAgent {
247
353
  /**
248
354
  * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
249
355
  */
250
- agent?: Shared.ResourceMetadata;
356
+ agent: Shared.ResourceMetadata;
251
357
 
358
+ type: 'agent';
359
+ }
360
+
361
+ export interface CallableToolCadenyaProvidedTool {
252
362
  /**
253
363
  * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
254
364
  */
255
- cadenyaProvidedTool?: Shared.ResourceMetadata;
365
+ cadenyaProvidedTool: Shared.ResourceMetadata;
256
366
 
367
+ type: 'cadenyaProvidedTool';
368
+ }
369
+
370
+ export interface CallableToolTool {
257
371
  /**
258
372
  * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
259
373
  */
260
- tool?: Shared.ResourceMetadata;
374
+ tool: Shared.ResourceMetadata;
375
+
376
+ type: 'tool';
261
377
  }
262
378
 
263
379
  /**
@@ -372,6 +488,8 @@ export interface MemoryRead {
372
488
  * form (external_id:my-custom-id). The same applies to memory_entry_id when set.
373
489
  */
374
490
  export interface MemoryReference {
491
+ memoryLayerId: string;
492
+
375
493
  /**
376
494
  * When set, inserts only this entry from memory_layer_id into the cascade —
377
495
  * behaves as a single-entry layer (only this key resolves at this position). The
@@ -379,8 +497,6 @@ export interface MemoryReference {
379
497
  * InvalidArgument.
380
498
  */
381
499
  memoryEntryId?: string;
382
-
383
- memoryLayerId?: string;
384
500
  }
385
501
 
386
502
  /**
@@ -497,7 +613,7 @@ export namespace Objective {
497
613
  * The caller-supplied episodic key. Objectives created with the same key (for the
498
614
  * same agent) share one episodic memory layer.
499
615
  */
500
- key?: string;
616
+ key: string;
501
617
 
502
618
  /**
503
619
  * The episodic memory layer resolved (created or reused) for this objective's key.
@@ -646,75 +762,43 @@ export interface ObjectiveEvent {
646
762
  info?: ObjectiveEventInfo;
647
763
  }
648
764
 
649
- export interface ObjectiveEventData {
650
- assistantMessage?: AssistantMessage;
765
+ export type ObjectiveEventData =
766
+ | ObjectiveEventDataUserMessage
767
+ | ObjectiveEventDataToolApprovalRequested
768
+ | ObjectiveEventDataToolApproved
769
+ | ObjectiveEventDataToolDenied
770
+ | ObjectiveEventDataToolCalled
771
+ | ObjectiveEventDataError
772
+ | ObjectiveEventDataAssistantMessage
773
+ | ObjectiveEventDataToolResult
774
+ | ObjectiveEventDataToolError
775
+ | ObjectiveEventDataContextWindowCompacted
776
+ | ObjectiveEventDataMemoryRead
777
+ | ObjectiveEventDataCancelled
778
+ | ObjectiveEventDataSubAgentSpawned
779
+ | ObjectiveEventDataSubAgentUpdated
780
+ | ObjectiveEventDataFinalized
781
+ | ObjectiveEventDataNotice
782
+ | ObjectiveEventDataTimedOut;
783
+
784
+ export interface ObjectiveEventDataAssistantMessage {
785
+ assistantMessage: AssistantMessage;
786
+
787
+ type: 'assistantMessage';
788
+ }
651
789
 
790
+ export interface ObjectiveEventDataCancelled {
652
791
  /**
653
792
  * ObjectiveCancelled is the terminal event written when an objective is cancelled.
654
793
  * After this event, the objective is super-terminal: no further iterations,
655
794
  * compaction, or continuation are permitted.
656
795
  */
657
- cancelled?: ObjectiveEventData.Cancelled;
658
-
659
- contextWindowCompacted?: ContextWindowCompacted;
660
-
661
- error?: ObjectiveError;
662
-
663
- /**
664
- * ObjectiveFinalized is the terminal event written when an objective is finalized.
665
- * After this event, the objective is super-terminal: no further iterations,
666
- * compaction, or continuation are permitted.
667
- */
668
- finalized?: ObjectiveEventData.Finalized;
796
+ cancelled: ObjectiveEventDataCancelled.Cancelled;
669
797
 
670
- /**
671
- * MemoryRead is emitted each time the agent resolves a key against the memory
672
- * cascade and loads an entry. Lookups that miss (key not found in any layer) do
673
- * not emit this event.
674
- */
675
- memoryRead?: MemoryRead;
676
-
677
- /**
678
- * Notice is a non-terminal diagnostic emitted by the runtime when something
679
- * noteworthy but non-fatal happens during an objective — for example a
680
- * just-in-time tool set failing to load, or a previously loaded tool being dropped
681
- * because it was archived. Notices carry no structured payload; they exist to make
682
- * the objective timeline self-explanatory.
683
- */
684
- notice?: ObjectiveEventData.Notice;
685
-
686
- subAgentSpawned?: SubAgentSpawned;
687
-
688
- subAgentUpdated?: SubAgentUpdated;
689
-
690
- /**
691
- * ObjectiveTimedOut is the terminal event written when an objective is finalized
692
- * by the inactivity sweep because it saw no activity (no user messages, no LLM
693
- * calls) within its variation's inactivity timeout — or the system-wide 24 hour
694
- * maximum when no timeout is configured. The objective produces no output. After
695
- * this event, the objective is super-terminal: no further iterations, compaction,
696
- * or continuation are permitted.
697
- */
698
- timedOut?: ObjectiveEventData.TimedOut;
699
-
700
- toolApprovalRequested?: ToolApprovalRequested;
701
-
702
- toolApproved?: ToolApproved;
703
-
704
- toolCalled?: ToolCalled;
705
-
706
- toolDenied?: ToolDenied;
707
-
708
- toolError?: ToolError;
709
-
710
- toolResult?: ToolResult;
711
-
712
- type?: string;
713
-
714
- userMessage?: UserMessage;
798
+ type: 'cancelled';
715
799
  }
716
800
 
717
- export namespace ObjectiveEventData {
801
+ export namespace ObjectiveEventDataCancelled {
718
802
  /**
719
803
  * ObjectiveCancelled is the terminal event written when an objective is cancelled.
720
804
  * After this event, the objective is super-terminal: no further iterations,
@@ -728,7 +812,32 @@ export namespace ObjectiveEventData {
728
812
  */
729
813
  message?: string;
730
814
  }
815
+ }
816
+
817
+ export interface ObjectiveEventDataContextWindowCompacted {
818
+ contextWindowCompacted: ContextWindowCompacted;
819
+
820
+ type: 'contextWindowCompacted';
821
+ }
731
822
 
823
+ export interface ObjectiveEventDataError {
824
+ error: ObjectiveError;
825
+
826
+ type: 'error';
827
+ }
828
+
829
+ export interface ObjectiveEventDataFinalized {
830
+ /**
831
+ * ObjectiveFinalized is the terminal event written when an objective is finalized.
832
+ * After this event, the objective is super-terminal: no further iterations,
833
+ * compaction, or continuation are permitted.
834
+ */
835
+ finalized: ObjectiveEventDataFinalized.Finalized;
836
+
837
+ type: 'finalized';
838
+ }
839
+
840
+ export namespace ObjectiveEventDataFinalized {
732
841
  /**
733
842
  * ObjectiveFinalized is the terminal event written when an objective is finalized.
734
843
  * After this event, the objective is super-terminal: no further iterations,
@@ -742,7 +851,33 @@ export namespace ObjectiveEventData {
742
851
  */
743
852
  output?: unknown;
744
853
  }
854
+ }
745
855
 
856
+ export interface ObjectiveEventDataMemoryRead {
857
+ /**
858
+ * MemoryRead is emitted each time the agent resolves a key against the memory
859
+ * cascade and loads an entry. Lookups that miss (key not found in any layer) do
860
+ * not emit this event.
861
+ */
862
+ memoryRead: MemoryRead;
863
+
864
+ type: 'memoryRead';
865
+ }
866
+
867
+ export interface ObjectiveEventDataNotice {
868
+ /**
869
+ * Notice is a non-terminal diagnostic emitted by the runtime when something
870
+ * noteworthy but non-fatal happens during an objective — for example a
871
+ * just-in-time tool set failing to load, or a previously loaded tool being dropped
872
+ * because it was archived. Notices carry no structured payload; they exist to make
873
+ * the objective timeline self-explanatory.
874
+ */
875
+ notice: ObjectiveEventDataNotice.Notice;
876
+
877
+ type: 'notice';
878
+ }
879
+
880
+ export namespace ObjectiveEventDataNotice {
746
881
  /**
747
882
  * Notice is a non-terminal diagnostic emitted by the runtime when something
748
883
  * noteworthy but non-fatal happens during an objective — for example a
@@ -765,7 +900,35 @@ export namespace ObjectiveEventData {
765
900
  */
766
901
  message?: string;
767
902
  }
903
+ }
904
+
905
+ export interface ObjectiveEventDataSubAgentSpawned {
906
+ subAgentSpawned: SubAgentSpawned;
907
+
908
+ type: 'subAgentSpawned';
909
+ }
910
+
911
+ export interface ObjectiveEventDataSubAgentUpdated {
912
+ subAgentUpdated: SubAgentUpdated;
913
+
914
+ type: 'subAgentUpdated';
915
+ }
768
916
 
917
+ export interface ObjectiveEventDataTimedOut {
918
+ /**
919
+ * ObjectiveTimedOut is the terminal event written when an objective is finalized
920
+ * by the inactivity sweep because it saw no activity (no user messages, no LLM
921
+ * calls) within its variation's inactivity timeout — or the system-wide 24 hour
922
+ * maximum when no timeout is configured. The objective produces no output. After
923
+ * this event, the objective is super-terminal: no further iterations, compaction,
924
+ * or continuation are permitted.
925
+ */
926
+ timedOut: ObjectiveEventDataTimedOut.TimedOut;
927
+
928
+ type: 'timedOut';
929
+ }
930
+
931
+ export namespace ObjectiveEventDataTimedOut {
769
932
  /**
770
933
  * ObjectiveTimedOut is the terminal event written when an objective is finalized
771
934
  * by the inactivity sweep because it saw no activity (no user messages, no LLM
@@ -783,6 +946,48 @@ export namespace ObjectiveEventData {
783
946
  }
784
947
  }
785
948
 
949
+ export interface ObjectiveEventDataToolApprovalRequested {
950
+ toolApprovalRequested: ToolApprovalRequested;
951
+
952
+ type: 'toolApprovalRequested';
953
+ }
954
+
955
+ export interface ObjectiveEventDataToolApproved {
956
+ toolApproved: ToolApproved;
957
+
958
+ type: 'toolApproved';
959
+ }
960
+
961
+ export interface ObjectiveEventDataToolCalled {
962
+ toolCalled: ToolCalled;
963
+
964
+ type: 'toolCalled';
965
+ }
966
+
967
+ export interface ObjectiveEventDataToolDenied {
968
+ toolDenied: ToolDenied;
969
+
970
+ type: 'toolDenied';
971
+ }
972
+
973
+ export interface ObjectiveEventDataToolError {
974
+ toolError: ToolError;
975
+
976
+ type: 'toolError';
977
+ }
978
+
979
+ export interface ObjectiveEventDataToolResult {
980
+ toolResult: ToolResult;
981
+
982
+ type: 'toolResult';
983
+ }
984
+
985
+ export interface ObjectiveEventDataUserMessage {
986
+ type: 'userMessage';
987
+
988
+ userMessage: UserMessage;
989
+ }
990
+
786
991
  export interface ObjectiveEventInfo {
787
992
  /**
788
993
  * A profile identifies a user or non-human principal (such as an API key) at the
@@ -1067,23 +1272,31 @@ export interface ObjectiveRetrieveDiagnosticsResponse {
1067
1272
  }
1068
1273
 
1069
1274
  export interface ObjectiveCreateParams {
1275
+ /**
1276
+ * Path param
1277
+ */
1278
+ workspaceId?: string;
1279
+
1280
+ /**
1281
+ * Body param
1282
+ */
1070
1283
  agentId: string;
1071
1284
 
1072
1285
  /**
1073
- * Arbitrary data rendered into the selected variation's system_prompt_template
1074
- * (liquid) to produce the objective's system prompt. If the agent has a
1075
- * system_prompt_data_schema, this must satisfy it.
1286
+ * Body param: Arbitrary data rendered into the selected variation's
1287
+ * system_prompt_template (liquid) to produce the objective's system prompt. If the
1288
+ * agent has a system_prompt_data_schema, this must satisfy it.
1076
1289
  */
1077
1290
  systemPromptData: { [key: string]: unknown };
1078
1291
 
1079
1292
  /**
1080
- * Episodic is used to configure the episodic memory for the objective
1293
+ * Body param: Episodic is used to configure the episodic memory for the objective
1081
1294
  */
1082
1295
  episodicMemory?: ObjectiveCreateParams.EpisodicMemory;
1083
1296
 
1084
1297
  /**
1085
- * Optional explicit first user message for the LLM chat history. When not set, the
1086
- * selected variation's first_user_message_template is rendered with
1298
+ * Body param: Optional explicit first user message for the LLM chat history. When
1299
+ * not set, the selected variation's first_user_message_template is rendered with
1087
1300
  * first_user_message_data instead. If neither this field nor a
1088
1301
  * first_user_message_template is present, the request is rejected with
1089
1302
  * InvalidArgument.
@@ -1091,15 +1304,16 @@ export interface ObjectiveCreateParams {
1091
1304
  firstUserMessage?: string;
1092
1305
 
1093
1306
  /**
1094
- * Arbitrary data rendered into the selected variation's
1307
+ * Body param: Arbitrary data rendered into the selected variation's
1095
1308
  * first_user_message_template (liquid) to produce the first user message. Separate
1096
1309
  * from `system_prompt_data`, which renders the system prompt template.
1097
1310
  */
1098
1311
  firstUserMessageData?: { [key: string]: unknown };
1099
1312
 
1100
1313
  /**
1101
- * Memory layers/entries layered over the baseline cascade inherited from the
1102
- * selected variation — element-level rules over inherited styles, in CSS terms.
1314
+ * Body param: Memory layers/entries layered over the baseline cascade inherited
1315
+ * from the selected variation — element-level rules over inherited styles, in CSS
1316
+ * terms.
1103
1317
  *
1104
1318
  * Array order is resolution order: EARLIER elements are more specific and are
1105
1319
  * consulted first. Entries pinned via memory_entry_id behave as single-entry
@@ -1115,20 +1329,20 @@ export interface ObjectiveCreateParams {
1115
1329
  memoryCascade?: Array<MemoryReference>;
1116
1330
 
1117
1331
  /**
1118
- * CreateOperationMetadata contains the user-provided fields for creating an
1119
- * operation. Read-only fields (id, account_id, workspace_id, created_at,
1120
- * profile_id) are excluded since they are set by the server.
1332
+ * Body param: CreateOperationMetadata contains the user-provided fields for
1333
+ * creating an operation. Read-only fields (id, account_id, workspace_id,
1334
+ * created_at, profile_id) are excluded since they are set by the server.
1121
1335
  */
1122
1336
  metadata?: Shared.CreateOperationMetadata;
1123
1337
 
1124
1338
  /**
1125
- * Secrets that can be used in the headers for tool calls using the secret
1126
- * interpolation format.
1339
+ * Body param: Secrets that can be used in the headers for tool calls using the
1340
+ * secret interpolation format.
1127
1341
  */
1128
1342
  secrets?: Array<ObjectiveCreateParams.Secret>;
1129
1343
 
1130
1344
  /**
1131
- * Optional explicit variation selection. Overrides the agent's
1345
+ * Body param: Optional explicit variation selection. Overrides the agent's
1132
1346
  * variation_selection_mode.
1133
1347
  */
1134
1348
  variationId?: string;
@@ -1143,7 +1357,7 @@ export namespace ObjectiveCreateParams {
1143
1357
  * The caller-supplied episodic key. Objectives created with the same key (for the
1144
1358
  * same agent) share one episodic memory layer.
1145
1359
  */
1146
- key?: string;
1360
+ key: string;
1147
1361
  }
1148
1362
 
1149
1363
  export interface Secret {
@@ -1154,47 +1368,55 @@ export namespace ObjectiveCreateParams {
1154
1368
  }
1155
1369
 
1156
1370
  export interface ObjectiveRetrieveParams {
1157
- workspaceId: string;
1371
+ workspaceId?: string;
1158
1372
  }
1159
1373
 
1160
1374
  export interface ObjectiveListParams extends CursorPaginationParams {
1161
1375
  /**
1162
- * Agent ID for filtering
1376
+ * Path param
1377
+ */
1378
+ workspaceId?: string;
1379
+
1380
+ /**
1381
+ * Query param: Agent ID for filtering
1163
1382
  */
1164
1383
  agentId?: string;
1165
1384
 
1166
1385
  /**
1167
- * Filter to objectives produced by a specific AgentSchedule. Accepts canonical
1168
- * as\_… form or external_id:<value> form.
1386
+ * Query param: Filter to objectives produced by a specific AgentSchedule. Accepts
1387
+ * canonical as\_… form or external_id:<value> form.
1169
1388
  */
1170
1389
  agentScheduleId?: string;
1171
1390
 
1172
1391
  /**
1173
- * When set to true you may use more of your alloted API rate-limit
1392
+ * Query param: When set to true you may use more of your alloted API rate-limit
1174
1393
  */
1175
1394
  includeInfo?: boolean;
1176
1395
 
1177
1396
  /**
1178
- * Filters by metadata labels. Comma-separated key=value pairs, e.g.
1397
+ * Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
1179
1398
  * "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
1180
1399
  * semantics).
1181
1400
  */
1182
1401
  labels?: string;
1183
1402
 
1184
1403
  /**
1185
- * Optional filters
1404
+ * Query param: Optional filters
1186
1405
  */
1187
1406
  parentObjectiveId?: string;
1188
1407
 
1408
+ /**
1409
+ * Query param
1410
+ */
1189
1411
  profileId?: string;
1190
1412
 
1191
1413
  /**
1192
- * Sort order for results (asc or desc by creation time)
1414
+ * Query param: Sort order for results (asc or desc by creation time)
1193
1415
  */
1194
1416
  sortOrder?: string;
1195
1417
 
1196
1418
  /**
1197
- * Filter by state
1419
+ * Query param: Filter by state
1198
1420
  */
1199
1421
  state?:
1200
1422
  | 'STATE_UNSPECIFIED'
@@ -1211,7 +1433,7 @@ export interface ObjectiveCancelParams {
1211
1433
  /**
1212
1434
  * Path param
1213
1435
  */
1214
- workspaceId: string;
1436
+ workspaceId?: string;
1215
1437
 
1216
1438
  /**
1217
1439
  * Body param: Optional reason for cancellation
@@ -1223,7 +1445,7 @@ export interface ObjectiveCompactParams {
1223
1445
  /**
1224
1446
  * Path param
1225
1447
  */
1226
- workspaceId: string;
1448
+ workspaceId?: string;
1227
1449
 
1228
1450
  /**
1229
1451
  * Body param: CompactionConfig defines how context window compaction behaves for
@@ -1236,26 +1458,26 @@ export interface ObjectiveContinueParams {
1236
1458
  /**
1237
1459
  * Path param
1238
1460
  */
1239
- workspaceId: string;
1461
+ workspaceId?: string;
1240
1462
 
1241
1463
  /**
1242
- * Body param: When set to true, the message will be enqueued for when the agent
1243
- * loop is available to process it.
1464
+ * Body param: The message to continue an objective that has completed (or you are
1465
+ * enqueing)
1244
1466
  */
1245
- enqueue?: boolean;
1467
+ message: string;
1246
1468
 
1247
1469
  /**
1248
- * Body param: The message to continue an objective that has completed (or you are
1249
- * enqueing)
1470
+ * Body param: When set to true, the message will be enqueued for when the agent
1471
+ * loop is available to process it.
1250
1472
  */
1251
- message?: string;
1473
+ enqueue?: boolean;
1252
1474
  }
1253
1475
 
1254
1476
  export interface ObjectiveListContextWindowsParams extends CursorPaginationParams {
1255
1477
  /**
1256
1478
  * Path param
1257
1479
  */
1258
- workspaceId: string;
1480
+ workspaceId?: string;
1259
1481
 
1260
1482
  /**
1261
1483
  * Query param: When set to true you may use more of your alloted API rate-limit
@@ -1274,7 +1496,7 @@ export interface ObjectiveListEventsParams extends CursorPaginationParams {
1274
1496
  /**
1275
1497
  * Path param
1276
1498
  */
1277
- workspaceId: string;
1499
+ workspaceId?: string;
1278
1500
 
1279
1501
  /**
1280
1502
  * Query param: When set to true you may use more of your alloted API rate-limit
@@ -1305,11 +1527,11 @@ export interface ObjectiveListEventsParams extends CursorPaginationParams {
1305
1527
  }
1306
1528
 
1307
1529
  export interface ObjectiveRetrieveDiagnosticsParams {
1308
- workspaceId: string;
1530
+ workspaceId?: string;
1309
1531
  }
1310
1532
 
1311
1533
  export interface ObjectiveStreamEventsParams {
1312
- workspaceId: string;
1534
+ workspaceId?: string;
1313
1535
  }
1314
1536
 
1315
1537
  Objectives.Tools = Tools;
@@ -1322,6 +1544,9 @@ export declare namespace Objectives {
1322
1544
  type AssistantMessage as AssistantMessage,
1323
1545
  type AssistantToolCall as AssistantToolCall,
1324
1546
  type CallableTool as CallableTool,
1547
+ type CallableToolAgent as CallableToolAgent,
1548
+ type CallableToolCadenyaProvidedTool as CallableToolCadenyaProvidedTool,
1549
+ type CallableToolTool as CallableToolTool,
1325
1550
  type ContextLengths as ContextLengths,
1326
1551
  type ContextWindowCompacted as ContextWindowCompacted,
1327
1552
  type MemoryRead as MemoryRead,
@@ -1334,6 +1559,23 @@ export declare namespace Objectives {
1334
1559
  type ObjectiveError as ObjectiveError,
1335
1560
  type ObjectiveEvent as ObjectiveEvent,
1336
1561
  type ObjectiveEventData as ObjectiveEventData,
1562
+ type ObjectiveEventDataAssistantMessage as ObjectiveEventDataAssistantMessage,
1563
+ type ObjectiveEventDataCancelled as ObjectiveEventDataCancelled,
1564
+ type ObjectiveEventDataContextWindowCompacted as ObjectiveEventDataContextWindowCompacted,
1565
+ type ObjectiveEventDataError as ObjectiveEventDataError,
1566
+ type ObjectiveEventDataFinalized as ObjectiveEventDataFinalized,
1567
+ type ObjectiveEventDataMemoryRead as ObjectiveEventDataMemoryRead,
1568
+ type ObjectiveEventDataNotice as ObjectiveEventDataNotice,
1569
+ type ObjectiveEventDataSubAgentSpawned as ObjectiveEventDataSubAgentSpawned,
1570
+ type ObjectiveEventDataSubAgentUpdated as ObjectiveEventDataSubAgentUpdated,
1571
+ type ObjectiveEventDataTimedOut as ObjectiveEventDataTimedOut,
1572
+ type ObjectiveEventDataToolApprovalRequested as ObjectiveEventDataToolApprovalRequested,
1573
+ type ObjectiveEventDataToolApproved as ObjectiveEventDataToolApproved,
1574
+ type ObjectiveEventDataToolCalled as ObjectiveEventDataToolCalled,
1575
+ type ObjectiveEventDataToolDenied as ObjectiveEventDataToolDenied,
1576
+ type ObjectiveEventDataToolError as ObjectiveEventDataToolError,
1577
+ type ObjectiveEventDataToolResult as ObjectiveEventDataToolResult,
1578
+ type ObjectiveEventDataUserMessage as ObjectiveEventDataUserMessage,
1337
1579
  type ObjectiveEventInfo as ObjectiveEventInfo,
1338
1580
  type ObjectiveEventWebhookData as ObjectiveEventWebhookData,
1339
1581
  type ObjectiveInfo as ObjectiveInfo,
@@ -1379,12 +1621,18 @@ export declare namespace Objectives {
1379
1621
  type ObjectiveToolCallResult as ObjectiveToolCallResult,
1380
1622
  type ObjectiveToolCallResultAudioBlock as ObjectiveToolCallResultAudioBlock,
1381
1623
  type ObjectiveToolCallResultContentBlock as ObjectiveToolCallResultContentBlock,
1624
+ type ObjectiveToolCallResultContentBlockAudio as ObjectiveToolCallResultContentBlockAudio,
1625
+ type ObjectiveToolCallResultContentBlockImage as ObjectiveToolCallResultContentBlockImage,
1626
+ type ObjectiveToolCallResultContentBlockText as ObjectiveToolCallResultContentBlockText,
1382
1627
  type ObjectiveToolCallResultImageBlock as ObjectiveToolCallResultImageBlock,
1383
1628
  type ObjectiveToolCallResultTextBlock as ObjectiveToolCallResultTextBlock,
1384
1629
  type ObjectiveToolCallWithResult as ObjectiveToolCallWithResult,
1385
1630
  type ResolvedSecret as ResolvedSecret,
1386
1631
  type SetToolCallContentRequestAudioBlock as SetToolCallContentRequestAudioBlock,
1387
1632
  type SetToolCallContentRequestContentBlock as SetToolCallContentRequestContentBlock,
1633
+ type SetToolCallContentRequestContentBlockAudio as SetToolCallContentRequestContentBlockAudio,
1634
+ type SetToolCallContentRequestContentBlockImage as SetToolCallContentRequestContentBlockImage,
1635
+ type SetToolCallContentRequestContentBlockText as SetToolCallContentRequestContentBlockText,
1388
1636
  type SetToolCallContentRequestImageBlock as SetToolCallContentRequestImageBlock,
1389
1637
  type SetToolCallContentRequestTextBlock as SetToolCallContentRequestTextBlock,
1390
1638
  type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination,