@cadenya/cadenya 0.135.0 → 1.0.1

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 (958) hide show
  1. package/README.md +86 -358
  2. package/api.md +781 -0
  3. package/dist/client.d.ts +69 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +97 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/core/error.d.ts +39 -0
  8. package/dist/core/error.d.ts.map +1 -0
  9. package/dist/core/error.js +56 -0
  10. package/dist/core/error.js.map +1 -0
  11. package/dist/core/http.d.ts +140 -0
  12. package/dist/core/http.d.ts.map +1 -0
  13. package/dist/core/http.js +525 -0
  14. package/dist/core/http.js.map +1 -0
  15. package/dist/core/pagination.d.ts +12 -0
  16. package/dist/core/pagination.d.ts.map +1 -0
  17. package/dist/core/pagination.js +29 -0
  18. package/dist/core/pagination.js.map +1 -0
  19. package/dist/core/sse.d.ts +44 -0
  20. package/dist/core/sse.d.ts.map +1 -0
  21. package/dist/core/sse.js +350 -0
  22. package/dist/core/sse.js.map +1 -0
  23. package/dist/core/webhooks.d.ts +25 -0
  24. package/dist/core/webhooks.d.ts.map +1 -0
  25. package/dist/core/webhooks.js +124 -0
  26. package/dist/core/webhooks.js.map +1 -0
  27. package/dist/index.d.ts +35 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +32 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/resources/accounts.d.ts +34 -0
  32. package/dist/resources/accounts.d.ts.map +1 -0
  33. package/dist/resources/accounts.js +47 -0
  34. package/dist/resources/accounts.js.map +1 -0
  35. package/dist/resources/agent-schedules.d.ts +186 -0
  36. package/dist/resources/agent-schedules.d.ts.map +1 -0
  37. package/dist/resources/agent-schedules.js +141 -0
  38. package/dist/resources/agent-schedules.js.map +1 -0
  39. package/dist/resources/agent-variations.d.ts +230 -0
  40. package/dist/resources/agent-variations.d.ts.map +1 -0
  41. package/dist/resources/agent-variations.js +174 -0
  42. package/dist/resources/agent-variations.js.map +1 -0
  43. package/dist/resources/agents.d.ts +318 -0
  44. package/dist/resources/agents.d.ts.map +1 -0
  45. package/dist/resources/agents.js +202 -0
  46. package/dist/resources/agents.js.map +1 -0
  47. package/dist/resources/ai-provider-keys.d.ts +141 -0
  48. package/dist/resources/ai-provider-keys.d.ts.map +1 -0
  49. package/dist/resources/ai-provider-keys.js +93 -0
  50. package/dist/resources/ai-provider-keys.js.map +1 -0
  51. package/dist/resources/api-keys.d.ts +222 -0
  52. package/dist/resources/api-keys.d.ts.map +1 -0
  53. package/dist/resources/api-keys.js +194 -0
  54. package/dist/resources/api-keys.js.map +1 -0
  55. package/dist/resources/memory-entries.d.ts +122 -0
  56. package/dist/resources/memory-entries.d.ts.map +1 -0
  57. package/dist/resources/memory-entries.js +93 -0
  58. package/dist/resources/memory-entries.js.map +1 -0
  59. package/dist/resources/memory-layers.d.ts +137 -0
  60. package/dist/resources/memory-layers.d.ts.map +1 -0
  61. package/dist/resources/memory-layers.js +97 -0
  62. package/dist/resources/memory-layers.js.map +1 -0
  63. package/dist/resources/models.d.ts +148 -0
  64. package/dist/resources/models.d.ts.map +1 -0
  65. package/dist/resources/models.js +93 -0
  66. package/dist/resources/models.js.map +1 -0
  67. package/dist/resources/objectives.d.ts +602 -0
  68. package/dist/resources/objectives.d.ts.map +1 -0
  69. package/dist/resources/objectives.js +356 -0
  70. package/dist/resources/objectives.js.map +1 -0
  71. package/dist/resources/profiles.d.ts +16 -0
  72. package/dist/resources/profiles.d.ts.map +1 -0
  73. package/dist/resources/profiles.js +21 -0
  74. package/dist/resources/profiles.js.map +1 -0
  75. package/dist/resources/tenants.d.ts +135 -0
  76. package/dist/resources/tenants.d.ts.map +1 -0
  77. package/dist/resources/tenants.js +80 -0
  78. package/dist/resources/tenants.js.map +1 -0
  79. package/dist/resources/tool-search.d.ts +27 -0
  80. package/dist/resources/tool-search.d.ts.map +1 -0
  81. package/dist/resources/tool-search.js +25 -0
  82. package/dist/resources/tool-search.js.map +1 -0
  83. package/dist/resources/tool-set-secrets.d.ts +128 -0
  84. package/dist/resources/tool-set-secrets.d.ts.map +1 -0
  85. package/dist/resources/tool-set-secrets.js +93 -0
  86. package/dist/resources/tool-set-secrets.js.map +1 -0
  87. package/dist/resources/tool-sets.d.ts +271 -0
  88. package/dist/resources/tool-sets.d.ts.map +1 -0
  89. package/dist/resources/tool-sets.js +185 -0
  90. package/dist/resources/tool-sets.js.map +1 -0
  91. package/dist/resources/tools.d.ts +178 -0
  92. package/dist/resources/tools.d.ts.map +1 -0
  93. package/dist/resources/tools.js +125 -0
  94. package/dist/resources/tools.js.map +1 -0
  95. package/dist/resources/uploads.d.ts +43 -0
  96. package/dist/resources/uploads.d.ts.map +1 -0
  97. package/dist/resources/uploads.js +41 -0
  98. package/dist/resources/uploads.js.map +1 -0
  99. package/dist/resources/widget-sessions.d.ts +168 -0
  100. package/dist/resources/widget-sessions.d.ts.map +1 -0
  101. package/dist/resources/widget-sessions.js +110 -0
  102. package/dist/resources/widget-sessions.js.map +1 -0
  103. package/dist/resources/widgets.d.ts +166 -0
  104. package/dist/resources/widgets.d.ts.map +1 -0
  105. package/dist/resources/widgets.js +125 -0
  106. package/dist/resources/widgets.js.map +1 -0
  107. package/dist/resources/workspace-admin.d.ts +214 -0
  108. package/dist/resources/workspace-admin.d.ts.map +1 -0
  109. package/dist/resources/workspace-admin.js +154 -0
  110. package/dist/resources/workspace-admin.js.map +1 -0
  111. package/dist/resources/workspace-secrets.d.ts +134 -0
  112. package/dist/resources/workspace-secrets.d.ts.map +1 -0
  113. package/dist/resources/workspace-secrets.js +93 -0
  114. package/dist/resources/workspace-secrets.js.map +1 -0
  115. package/dist/resources/workspaces.d.ts +44 -0
  116. package/dist/resources/workspaces.d.ts.map +1 -0
  117. package/dist/resources/workspaces.js +26 -0
  118. package/dist/resources/workspaces.js.map +1 -0
  119. package/dist/types.d.ts +4634 -0
  120. package/dist/types.d.ts.map +1 -0
  121. package/dist/types.js +103 -0
  122. package/dist/types.js.map +1 -0
  123. package/dist/webhooks.d.ts +93 -0
  124. package/dist/webhooks.d.ts.map +1 -0
  125. package/dist/webhooks.js +21 -0
  126. package/dist/webhooks.js.map +1 -0
  127. package/package.json +23 -164
  128. package/src/client.ts +124 -1532
  129. package/src/core/error.ts +50 -109
  130. package/src/core/http.ts +639 -0
  131. package/src/core/pagination.ts +16 -150
  132. package/src/core/sse.ts +338 -0
  133. package/src/core/webhooks.ts +141 -0
  134. package/src/index.ts +35 -20
  135. package/src/resources/accounts.ts +50 -0
  136. package/src/resources/agent-schedules.ts +251 -0
  137. package/src/resources/agent-variations.ts +312 -0
  138. package/src/resources/agents.ts +411 -1
  139. package/src/resources/ai-provider-keys.ts +119 -309
  140. package/src/resources/api-keys.ts +219 -276
  141. package/src/resources/memory-entries.ts +163 -0
  142. package/src/resources/memory-layers.ts +181 -1
  143. package/src/resources/models.ts +125 -372
  144. package/src/resources/objectives.ts +764 -1
  145. package/src/resources/profiles.ts +17 -13
  146. package/src/resources/tenants.ts +168 -1
  147. package/src/resources/tool-search.ts +36 -0
  148. package/src/resources/tool-set-secrets.ts +169 -0
  149. package/src/resources/tool-sets.ts +355 -1
  150. package/src/resources/tools.ts +235 -0
  151. package/src/resources/uploads.ts +42 -127
  152. package/src/resources/widget-sessions.ts +148 -437
  153. package/src/resources/widgets.ts +155 -247
  154. package/src/resources/workspace-admin.ts +281 -1
  155. package/src/resources/workspace-secrets.ts +121 -159
  156. package/src/resources/workspaces.ts +32 -75
  157. package/src/types.ts +5188 -0
  158. package/src/webhooks.ts +107 -0
  159. package/CHANGELOG.md +0 -1542
  160. package/api-promise.d.mts +0 -3
  161. package/api-promise.d.mts.map +0 -1
  162. package/api-promise.d.ts +0 -3
  163. package/api-promise.d.ts.map +0 -1
  164. package/api-promise.js +0 -6
  165. package/api-promise.js.map +0 -1
  166. package/api-promise.mjs +0 -3
  167. package/api-promise.mjs.map +0 -1
  168. package/client.d.mts +0 -335
  169. package/client.d.mts.map +0 -1
  170. package/client.d.ts +0 -335
  171. package/client.d.ts.map +0 -1
  172. package/client.js +0 -630
  173. package/client.js.map +0 -1
  174. package/client.mjs +0 -626
  175. package/client.mjs.map +0 -1
  176. package/core/api-promise.d.mts +0 -46
  177. package/core/api-promise.d.mts.map +0 -1
  178. package/core/api-promise.d.ts +0 -46
  179. package/core/api-promise.d.ts.map +0 -1
  180. package/core/api-promise.js +0 -73
  181. package/core/api-promise.js.map +0 -1
  182. package/core/api-promise.mjs +0 -69
  183. package/core/api-promise.mjs.map +0 -1
  184. package/core/error.d.mts +0 -46
  185. package/core/error.d.mts.map +0 -1
  186. package/core/error.d.ts +0 -46
  187. package/core/error.d.ts.map +0 -1
  188. package/core/error.js +0 -112
  189. package/core/error.js.map +0 -1
  190. package/core/error.mjs +0 -96
  191. package/core/error.mjs.map +0 -1
  192. package/core/pagination.d.mts +0 -59
  193. package/core/pagination.d.mts.map +0 -1
  194. package/core/pagination.d.ts +0 -59
  195. package/core/pagination.d.ts.map +0 -1
  196. package/core/pagination.js +0 -100
  197. package/core/pagination.js.map +0 -1
  198. package/core/pagination.mjs +0 -94
  199. package/core/pagination.mjs.map +0 -1
  200. package/core/resource.d.mts +0 -6
  201. package/core/resource.d.mts.map +0 -1
  202. package/core/resource.d.ts +0 -6
  203. package/core/resource.d.ts.map +0 -1
  204. package/core/resource.js +0 -10
  205. package/core/resource.js.map +0 -1
  206. package/core/resource.mjs +0 -6
  207. package/core/resource.mjs.map +0 -1
  208. package/core/streaming.d.mts +0 -33
  209. package/core/streaming.d.mts.map +0 -1
  210. package/core/streaming.d.ts +0 -33
  211. package/core/streaming.d.ts.map +0 -1
  212. package/core/streaming.js +0 -268
  213. package/core/streaming.js.map +0 -1
  214. package/core/streaming.mjs +0 -263
  215. package/core/streaming.mjs.map +0 -1
  216. package/core/uploads.d.mts +0 -3
  217. package/core/uploads.d.mts.map +0 -1
  218. package/core/uploads.d.ts +0 -3
  219. package/core/uploads.d.ts.map +0 -1
  220. package/core/uploads.js +0 -6
  221. package/core/uploads.js.map +0 -1
  222. package/core/uploads.mjs +0 -2
  223. package/core/uploads.mjs.map +0 -1
  224. package/error.d.mts +0 -3
  225. package/error.d.mts.map +0 -1
  226. package/error.d.ts +0 -3
  227. package/error.d.ts.map +0 -1
  228. package/error.js +0 -6
  229. package/error.js.map +0 -1
  230. package/error.mjs +0 -3
  231. package/error.mjs.map +0 -1
  232. package/index.d.mts +0 -7
  233. package/index.d.mts.map +0 -1
  234. package/index.d.ts +0 -7
  235. package/index.d.ts.map +0 -1
  236. package/index.js +0 -31
  237. package/index.js.map +0 -1
  238. package/index.mjs +0 -7
  239. package/index.mjs.map +0 -1
  240. package/internal/builtin-types.d.mts +0 -73
  241. package/internal/builtin-types.d.mts.map +0 -1
  242. package/internal/builtin-types.d.ts +0 -73
  243. package/internal/builtin-types.d.ts.map +0 -1
  244. package/internal/builtin-types.js +0 -3
  245. package/internal/builtin-types.js.map +0 -1
  246. package/internal/builtin-types.mjs +0 -2
  247. package/internal/builtin-types.mjs.map +0 -1
  248. package/internal/decoders/line.d.mts +0 -17
  249. package/internal/decoders/line.d.mts.map +0 -1
  250. package/internal/decoders/line.d.ts +0 -17
  251. package/internal/decoders/line.d.ts.map +0 -1
  252. package/internal/decoders/line.js +0 -113
  253. package/internal/decoders/line.js.map +0 -1
  254. package/internal/decoders/line.mjs +0 -108
  255. package/internal/decoders/line.mjs.map +0 -1
  256. package/internal/detect-platform.d.mts +0 -15
  257. package/internal/detect-platform.d.mts.map +0 -1
  258. package/internal/detect-platform.d.ts +0 -15
  259. package/internal/detect-platform.d.ts.map +0 -1
  260. package/internal/detect-platform.js +0 -161
  261. package/internal/detect-platform.js.map +0 -1
  262. package/internal/detect-platform.mjs +0 -156
  263. package/internal/detect-platform.mjs.map +0 -1
  264. package/internal/errors.d.mts +0 -3
  265. package/internal/errors.d.mts.map +0 -1
  266. package/internal/errors.d.ts +0 -3
  267. package/internal/errors.d.ts.map +0 -1
  268. package/internal/errors.js +0 -40
  269. package/internal/errors.js.map +0 -1
  270. package/internal/errors.mjs +0 -35
  271. package/internal/errors.mjs.map +0 -1
  272. package/internal/headers.d.mts +0 -20
  273. package/internal/headers.d.mts.map +0 -1
  274. package/internal/headers.d.ts +0 -20
  275. package/internal/headers.d.ts.map +0 -1
  276. package/internal/headers.js +0 -78
  277. package/internal/headers.js.map +0 -1
  278. package/internal/headers.mjs +0 -73
  279. package/internal/headers.mjs.map +0 -1
  280. package/internal/parse.d.mts +0 -12
  281. package/internal/parse.d.mts.map +0 -1
  282. package/internal/parse.d.ts +0 -12
  283. package/internal/parse.d.ts.map +0 -1
  284. package/internal/parse.js +0 -49
  285. package/internal/parse.js.map +0 -1
  286. package/internal/parse.mjs +0 -46
  287. package/internal/parse.mjs.map +0 -1
  288. package/internal/qs/formats.d.mts +0 -7
  289. package/internal/qs/formats.d.mts.map +0 -1
  290. package/internal/qs/formats.d.ts +0 -7
  291. package/internal/qs/formats.d.ts.map +0 -1
  292. package/internal/qs/formats.js +0 -13
  293. package/internal/qs/formats.js.map +0 -1
  294. package/internal/qs/formats.mjs +0 -9
  295. package/internal/qs/formats.mjs.map +0 -1
  296. package/internal/qs/index.d.mts +0 -10
  297. package/internal/qs/index.d.mts.map +0 -1
  298. package/internal/qs/index.d.ts +0 -10
  299. package/internal/qs/index.d.ts.map +0 -1
  300. package/internal/qs/index.js +0 -14
  301. package/internal/qs/index.js.map +0 -1
  302. package/internal/qs/index.mjs +0 -10
  303. package/internal/qs/index.mjs.map +0 -1
  304. package/internal/qs/stringify.d.mts +0 -3
  305. package/internal/qs/stringify.d.mts.map +0 -1
  306. package/internal/qs/stringify.d.ts +0 -3
  307. package/internal/qs/stringify.d.ts.map +0 -1
  308. package/internal/qs/stringify.js +0 -277
  309. package/internal/qs/stringify.js.map +0 -1
  310. package/internal/qs/stringify.mjs +0 -274
  311. package/internal/qs/stringify.mjs.map +0 -1
  312. package/internal/qs/types.d.mts +0 -57
  313. package/internal/qs/types.d.mts.map +0 -1
  314. package/internal/qs/types.d.ts +0 -57
  315. package/internal/qs/types.d.ts.map +0 -1
  316. package/internal/qs/types.js +0 -3
  317. package/internal/qs/types.js.map +0 -1
  318. package/internal/qs/types.mjs +0 -2
  319. package/internal/qs/types.mjs.map +0 -1
  320. package/internal/qs/utils.d.mts +0 -15
  321. package/internal/qs/utils.d.mts.map +0 -1
  322. package/internal/qs/utils.d.ts +0 -15
  323. package/internal/qs/utils.d.ts.map +0 -1
  324. package/internal/qs/utils.js +0 -230
  325. package/internal/qs/utils.js.map +0 -1
  326. package/internal/qs/utils.mjs +0 -217
  327. package/internal/qs/utils.mjs.map +0 -1
  328. package/internal/request-options.d.mts +0 -77
  329. package/internal/request-options.d.mts.map +0 -1
  330. package/internal/request-options.d.ts +0 -77
  331. package/internal/request-options.d.ts.map +0 -1
  332. package/internal/request-options.js +0 -13
  333. package/internal/request-options.js.map +0 -1
  334. package/internal/request-options.mjs +0 -9
  335. package/internal/request-options.mjs.map +0 -1
  336. package/internal/shim-types.d.mts +0 -17
  337. package/internal/shim-types.d.mts.map +0 -1
  338. package/internal/shim-types.d.ts +0 -17
  339. package/internal/shim-types.d.ts.map +0 -1
  340. package/internal/shim-types.js +0 -9
  341. package/internal/shim-types.js.map +0 -1
  342. package/internal/shim-types.mjs +0 -8
  343. package/internal/shim-types.mjs.map +0 -1
  344. package/internal/shims.d.mts +0 -26
  345. package/internal/shims.d.mts.map +0 -1
  346. package/internal/shims.d.ts +0 -26
  347. package/internal/shims.d.ts.map +0 -1
  348. package/internal/shims.js +0 -97
  349. package/internal/shims.js.map +0 -1
  350. package/internal/shims.mjs +0 -90
  351. package/internal/shims.mjs.map +0 -1
  352. package/internal/to-file.d.mts +0 -45
  353. package/internal/to-file.d.mts.map +0 -1
  354. package/internal/to-file.d.ts +0 -45
  355. package/internal/to-file.d.ts.map +0 -1
  356. package/internal/to-file.js +0 -91
  357. package/internal/to-file.js.map +0 -1
  358. package/internal/to-file.mjs +0 -88
  359. package/internal/to-file.mjs.map +0 -1
  360. package/internal/tslib.js +0 -81
  361. package/internal/tslib.mjs +0 -17
  362. package/internal/types.d.mts +0 -69
  363. package/internal/types.d.mts.map +0 -1
  364. package/internal/types.d.ts +0 -69
  365. package/internal/types.d.ts.map +0 -1
  366. package/internal/types.js +0 -3
  367. package/internal/types.js.map +0 -1
  368. package/internal/types.mjs +0 -2
  369. package/internal/types.mjs.map +0 -1
  370. package/internal/uploads.d.mts +0 -42
  371. package/internal/uploads.d.mts.map +0 -1
  372. package/internal/uploads.d.ts +0 -42
  373. package/internal/uploads.d.ts.map +0 -1
  374. package/internal/uploads.js +0 -141
  375. package/internal/uploads.js.map +0 -1
  376. package/internal/uploads.mjs +0 -131
  377. package/internal/uploads.mjs.map +0 -1
  378. package/internal/utils/base64.d.mts +0 -3
  379. package/internal/utils/base64.d.mts.map +0 -1
  380. package/internal/utils/base64.d.ts +0 -3
  381. package/internal/utils/base64.d.ts.map +0 -1
  382. package/internal/utils/base64.js +0 -37
  383. package/internal/utils/base64.js.map +0 -1
  384. package/internal/utils/base64.mjs +0 -32
  385. package/internal/utils/base64.mjs.map +0 -1
  386. package/internal/utils/bytes.d.mts +0 -4
  387. package/internal/utils/bytes.d.mts.map +0 -1
  388. package/internal/utils/bytes.d.ts +0 -4
  389. package/internal/utils/bytes.d.ts.map +0 -1
  390. package/internal/utils/bytes.js +0 -31
  391. package/internal/utils/bytes.js.map +0 -1
  392. package/internal/utils/bytes.mjs +0 -26
  393. package/internal/utils/bytes.mjs.map +0 -1
  394. package/internal/utils/env.d.mts +0 -9
  395. package/internal/utils/env.d.mts.map +0 -1
  396. package/internal/utils/env.d.ts +0 -9
  397. package/internal/utils/env.d.ts.map +0 -1
  398. package/internal/utils/env.js +0 -21
  399. package/internal/utils/env.js.map +0 -1
  400. package/internal/utils/env.mjs +0 -17
  401. package/internal/utils/env.mjs.map +0 -1
  402. package/internal/utils/log.d.mts +0 -37
  403. package/internal/utils/log.d.mts.map +0 -1
  404. package/internal/utils/log.d.ts +0 -37
  405. package/internal/utils/log.d.ts.map +0 -1
  406. package/internal/utils/log.js +0 -86
  407. package/internal/utils/log.js.map +0 -1
  408. package/internal/utils/log.mjs +0 -80
  409. package/internal/utils/log.mjs.map +0 -1
  410. package/internal/utils/path.d.mts +0 -15
  411. package/internal/utils/path.d.mts.map +0 -1
  412. package/internal/utils/path.d.ts +0 -15
  413. package/internal/utils/path.d.ts.map +0 -1
  414. package/internal/utils/path.js +0 -79
  415. package/internal/utils/path.js.map +0 -1
  416. package/internal/utils/path.mjs +0 -74
  417. package/internal/utils/path.mjs.map +0 -1
  418. package/internal/utils/query.d.mts +0 -2
  419. package/internal/utils/query.d.mts.map +0 -1
  420. package/internal/utils/query.d.ts +0 -2
  421. package/internal/utils/query.d.ts.map +0 -1
  422. package/internal/utils/query.js +0 -9
  423. package/internal/utils/query.js.map +0 -1
  424. package/internal/utils/query.mjs +0 -5
  425. package/internal/utils/query.mjs.map +0 -1
  426. package/internal/utils/sleep.d.mts +0 -2
  427. package/internal/utils/sleep.d.mts.map +0 -1
  428. package/internal/utils/sleep.d.ts +0 -2
  429. package/internal/utils/sleep.d.ts.map +0 -1
  430. package/internal/utils/sleep.js +0 -6
  431. package/internal/utils/sleep.js.map +0 -1
  432. package/internal/utils/sleep.mjs +0 -2
  433. package/internal/utils/sleep.mjs.map +0 -1
  434. package/internal/utils/uuid.d.mts +0 -5
  435. package/internal/utils/uuid.d.mts.map +0 -1
  436. package/internal/utils/uuid.d.ts +0 -5
  437. package/internal/utils/uuid.d.ts.map +0 -1
  438. package/internal/utils/uuid.js +0 -18
  439. package/internal/utils/uuid.js.map +0 -1
  440. package/internal/utils/uuid.mjs +0 -14
  441. package/internal/utils/uuid.mjs.map +0 -1
  442. package/internal/utils/values.d.mts +0 -18
  443. package/internal/utils/values.d.mts.map +0 -1
  444. package/internal/utils/values.d.ts +0 -18
  445. package/internal/utils/values.d.ts.map +0 -1
  446. package/internal/utils/values.js +0 -111
  447. package/internal/utils/values.js.map +0 -1
  448. package/internal/utils/values.mjs +0 -93
  449. package/internal/utils/values.mjs.map +0 -1
  450. package/internal/utils.d.mts +0 -8
  451. package/internal/utils.d.mts.map +0 -1
  452. package/internal/utils.d.ts +0 -8
  453. package/internal/utils.d.ts.map +0 -1
  454. package/internal/utils.js +0 -11
  455. package/internal/utils.js.map +0 -1
  456. package/internal/utils.mjs +0 -8
  457. package/internal/utils.mjs.map +0 -1
  458. package/pagination.d.mts +0 -3
  459. package/pagination.d.mts.map +0 -1
  460. package/pagination.d.ts +0 -3
  461. package/pagination.d.ts.map +0 -1
  462. package/pagination.js +0 -6
  463. package/pagination.js.map +0 -1
  464. package/pagination.mjs +0 -3
  465. package/pagination.mjs.map +0 -1
  466. package/resource.d.mts +0 -3
  467. package/resource.d.mts.map +0 -1
  468. package/resource.d.ts +0 -3
  469. package/resource.d.ts.map +0 -1
  470. package/resource.js +0 -6
  471. package/resource.js.map +0 -1
  472. package/resource.mjs +0 -3
  473. package/resource.mjs.map +0 -1
  474. package/resources/account.d.mts +0 -124
  475. package/resources/account.d.mts.map +0 -1
  476. package/resources/account.d.ts +0 -124
  477. package/resources/account.d.ts.map +0 -1
  478. package/resources/account.js +0 -32
  479. package/resources/account.js.map +0 -1
  480. package/resources/account.mjs +0 -28
  481. package/resources/account.mjs.map +0 -1
  482. package/resources/agents/agents.d.mts +0 -379
  483. package/resources/agents/agents.d.mts.map +0 -1
  484. package/resources/agents/agents.d.ts +0 -379
  485. package/resources/agents/agents.d.ts.map +0 -1
  486. package/resources/agents/agents.js +0 -191
  487. package/resources/agents/agents.js.map +0 -1
  488. package/resources/agents/agents.mjs +0 -186
  489. package/resources/agents/agents.mjs.map +0 -1
  490. package/resources/agents/feedback.d.mts +0 -71
  491. package/resources/agents/feedback.d.mts.map +0 -1
  492. package/resources/agents/feedback.d.ts +0 -71
  493. package/resources/agents/feedback.d.ts.map +0 -1
  494. package/resources/agents/feedback.js +0 -33
  495. package/resources/agents/feedback.js.map +0 -1
  496. package/resources/agents/feedback.mjs +0 -29
  497. package/resources/agents/feedback.mjs.map +0 -1
  498. package/resources/agents/index.d.mts +0 -6
  499. package/resources/agents/index.d.mts.map +0 -1
  500. package/resources/agents/index.d.ts +0 -6
  501. package/resources/agents/index.d.ts.map +0 -1
  502. package/resources/agents/index.js +0 -14
  503. package/resources/agents/index.js.map +0 -1
  504. package/resources/agents/index.mjs +0 -6
  505. package/resources/agents/index.mjs.map +0 -1
  506. package/resources/agents/schedules.d.mts +0 -383
  507. package/resources/agents/schedules.d.mts.map +0 -1
  508. package/resources/agents/schedules.d.ts +0 -383
  509. package/resources/agents/schedules.d.ts.map +0 -1
  510. package/resources/agents/schedules.js +0 -171
  511. package/resources/agents/schedules.js.map +0 -1
  512. package/resources/agents/schedules.mjs +0 -167
  513. package/resources/agents/schedules.mjs.map +0 -1
  514. package/resources/agents/variations.d.mts +0 -723
  515. package/resources/agents/variations.d.mts.map +0 -1
  516. package/resources/agents/variations.d.ts +0 -723
  517. package/resources/agents/variations.d.ts.map +0 -1
  518. package/resources/agents/variations.js +0 -208
  519. package/resources/agents/variations.js.map +0 -1
  520. package/resources/agents/variations.mjs +0 -204
  521. package/resources/agents/variations.mjs.map +0 -1
  522. package/resources/agents/webhook-deliveries.d.mts +0 -96
  523. package/resources/agents/webhook-deliveries.d.mts.map +0 -1
  524. package/resources/agents/webhook-deliveries.d.ts +0 -96
  525. package/resources/agents/webhook-deliveries.d.ts.map +0 -1
  526. package/resources/agents/webhook-deliveries.js +0 -31
  527. package/resources/agents/webhook-deliveries.js.map +0 -1
  528. package/resources/agents/webhook-deliveries.mjs +0 -27
  529. package/resources/agents/webhook-deliveries.mjs.map +0 -1
  530. package/resources/agents.d.mts +0 -2
  531. package/resources/agents.d.mts.map +0 -1
  532. package/resources/agents.d.ts +0 -2
  533. package/resources/agents.d.ts.map +0 -1
  534. package/resources/agents.js +0 -5
  535. package/resources/agents.js.map +0 -1
  536. package/resources/agents.mjs +0 -2
  537. package/resources/agents.mjs.map +0 -1
  538. package/resources/ai-provider-keys.d.mts +0 -269
  539. package/resources/ai-provider-keys.d.mts.map +0 -1
  540. package/resources/ai-provider-keys.d.ts +0 -269
  541. package/resources/ai-provider-keys.d.ts.map +0 -1
  542. package/resources/ai-provider-keys.js +0 -52
  543. package/resources/ai-provider-keys.js.map +0 -1
  544. package/resources/ai-provider-keys.mjs +0 -48
  545. package/resources/ai-provider-keys.mjs.map +0 -1
  546. package/resources/api-keys.d.mts +0 -268
  547. package/resources/api-keys.d.mts.map +0 -1
  548. package/resources/api-keys.d.ts +0 -268
  549. package/resources/api-keys.d.ts.map +0 -1
  550. package/resources/api-keys.js +0 -83
  551. package/resources/api-keys.js.map +0 -1
  552. package/resources/api-keys.mjs +0 -79
  553. package/resources/api-keys.mjs.map +0 -1
  554. package/resources/global-api-key.d.mts +0 -33
  555. package/resources/global-api-key.d.mts.map +0 -1
  556. package/resources/global-api-key.d.ts +0 -33
  557. package/resources/global-api-key.d.ts.map +0 -1
  558. package/resources/global-api-key.js +0 -42
  559. package/resources/global-api-key.js.map +0 -1
  560. package/resources/global-api-key.mjs +0 -38
  561. package/resources/global-api-key.mjs.map +0 -1
  562. package/resources/index.d.mts +0 -21
  563. package/resources/index.d.mts.map +0 -1
  564. package/resources/index.d.ts +0 -21
  565. package/resources/index.d.ts.map +0 -1
  566. package/resources/index.js +0 -44
  567. package/resources/index.js.map +0 -1
  568. package/resources/index.mjs +0 -21
  569. package/resources/index.mjs.map +0 -1
  570. package/resources/memory-layers/entries.d.mts +0 -257
  571. package/resources/memory-layers/entries.d.mts.map +0 -1
  572. package/resources/memory-layers/entries.d.ts +0 -257
  573. package/resources/memory-layers/entries.d.ts.map +0 -1
  574. package/resources/memory-layers/entries.js +0 -58
  575. package/resources/memory-layers/entries.js.map +0 -1
  576. package/resources/memory-layers/entries.mjs +0 -54
  577. package/resources/memory-layers/entries.mjs.map +0 -1
  578. package/resources/memory-layers/index.d.mts +0 -3
  579. package/resources/memory-layers/index.d.mts.map +0 -1
  580. package/resources/memory-layers/index.d.ts +0 -3
  581. package/resources/memory-layers/index.d.ts.map +0 -1
  582. package/resources/memory-layers/index.js +0 -8
  583. package/resources/memory-layers/index.js.map +0 -1
  584. package/resources/memory-layers/index.mjs +0 -3
  585. package/resources/memory-layers/index.mjs.map +0 -1
  586. package/resources/memory-layers/memory-layers.d.mts +0 -196
  587. package/resources/memory-layers/memory-layers.d.mts.map +0 -1
  588. package/resources/memory-layers/memory-layers.d.ts +0 -196
  589. package/resources/memory-layers/memory-layers.d.ts.map +0 -1
  590. package/resources/memory-layers/memory-layers.js +0 -63
  591. package/resources/memory-layers/memory-layers.js.map +0 -1
  592. package/resources/memory-layers/memory-layers.mjs +0 -58
  593. package/resources/memory-layers/memory-layers.mjs.map +0 -1
  594. package/resources/memory-layers.d.mts +0 -2
  595. package/resources/memory-layers.d.mts.map +0 -1
  596. package/resources/memory-layers.d.ts +0 -2
  597. package/resources/memory-layers.d.ts.map +0 -1
  598. package/resources/memory-layers.js +0 -5
  599. package/resources/memory-layers.js.map +0 -1
  600. package/resources/memory-layers.mjs +0 -2
  601. package/resources/memory-layers.mjs.map +0 -1
  602. package/resources/models.d.mts +0 -315
  603. package/resources/models.d.mts.map +0 -1
  604. package/resources/models.d.ts +0 -315
  605. package/resources/models.d.ts.map +0 -1
  606. package/resources/models.js +0 -59
  607. package/resources/models.js.map +0 -1
  608. package/resources/models.mjs +0 -55
  609. package/resources/models.mjs.map +0 -1
  610. package/resources/objectives/feedback.d.mts +0 -126
  611. package/resources/objectives/feedback.d.mts.map +0 -1
  612. package/resources/objectives/feedback.d.ts +0 -126
  613. package/resources/objectives/feedback.d.ts.map +0 -1
  614. package/resources/objectives/feedback.js +0 -52
  615. package/resources/objectives/feedback.js.map +0 -1
  616. package/resources/objectives/feedback.mjs +0 -48
  617. package/resources/objectives/feedback.mjs.map +0 -1
  618. package/resources/objectives/index.d.mts +0 -6
  619. package/resources/objectives/index.d.mts.map +0 -1
  620. package/resources/objectives/index.d.ts +0 -6
  621. package/resources/objectives/index.d.ts.map +0 -1
  622. package/resources/objectives/index.js +0 -14
  623. package/resources/objectives/index.js.map +0 -1
  624. package/resources/objectives/index.mjs +0 -6
  625. package/resources/objectives/index.mjs.map +0 -1
  626. package/resources/objectives/objectives.d.mts +0 -1280
  627. package/resources/objectives/objectives.d.mts.map +0 -1
  628. package/resources/objectives/objectives.d.ts +0 -1280
  629. package/resources/objectives/objectives.d.ts.map +0 -1
  630. package/resources/objectives/objectives.js +0 -213
  631. package/resources/objectives/objectives.js.map +0 -1
  632. package/resources/objectives/objectives.mjs +0 -208
  633. package/resources/objectives/objectives.mjs.map +0 -1
  634. package/resources/objectives/tasks.d.mts +0 -88
  635. package/resources/objectives/tasks.d.mts.map +0 -1
  636. package/resources/objectives/tasks.d.ts +0 -88
  637. package/resources/objectives/tasks.d.ts.map +0 -1
  638. package/resources/objectives/tasks.js +0 -45
  639. package/resources/objectives/tasks.js.map +0 -1
  640. package/resources/objectives/tasks.mjs +0 -41
  641. package/resources/objectives/tasks.mjs.map +0 -1
  642. package/resources/objectives/tool-calls.d.mts +0 -379
  643. package/resources/objectives/tool-calls.d.mts.map +0 -1
  644. package/resources/objectives/tool-calls.d.ts +0 -379
  645. package/resources/objectives/tool-calls.d.ts.map +0 -1
  646. package/resources/objectives/tool-calls.js +0 -110
  647. package/resources/objectives/tool-calls.js.map +0 -1
  648. package/resources/objectives/tool-calls.mjs +0 -106
  649. package/resources/objectives/tool-calls.mjs.map +0 -1
  650. package/resources/objectives/tools.d.mts +0 -53
  651. package/resources/objectives/tools.d.mts.map +0 -1
  652. package/resources/objectives/tools.d.ts +0 -53
  653. package/resources/objectives/tools.d.ts.map +0 -1
  654. package/resources/objectives/tools.js +0 -28
  655. package/resources/objectives/tools.js.map +0 -1
  656. package/resources/objectives/tools.mjs +0 -24
  657. package/resources/objectives/tools.mjs.map +0 -1
  658. package/resources/objectives.d.mts +0 -2
  659. package/resources/objectives.d.mts.map +0 -1
  660. package/resources/objectives.d.ts +0 -2
  661. package/resources/objectives.d.ts.map +0 -1
  662. package/resources/objectives.js +0 -5
  663. package/resources/objectives.js.map +0 -1
  664. package/resources/objectives.mjs +0 -2
  665. package/resources/objectives.mjs.map +0 -1
  666. package/resources/profiles.d.mts +0 -16
  667. package/resources/profiles.d.mts.map +0 -1
  668. package/resources/profiles.d.ts +0 -16
  669. package/resources/profiles.d.ts.map +0 -1
  670. package/resources/profiles.js +0 -19
  671. package/resources/profiles.js.map +0 -1
  672. package/resources/profiles.mjs +0 -15
  673. package/resources/profiles.mjs.map +0 -1
  674. package/resources/search.d.mts +0 -33
  675. package/resources/search.d.mts.map +0 -1
  676. package/resources/search.d.ts +0 -33
  677. package/resources/search.d.ts.map +0 -1
  678. package/resources/search.js +0 -19
  679. package/resources/search.js.map +0 -1
  680. package/resources/search.mjs +0 -15
  681. package/resources/search.mjs.map +0 -1
  682. package/resources/shared.d.mts +0 -215
  683. package/resources/shared.d.mts.map +0 -1
  684. package/resources/shared.d.ts +0 -215
  685. package/resources/shared.d.ts.map +0 -1
  686. package/resources/shared.js +0 -3
  687. package/resources/shared.js.map +0 -1
  688. package/resources/shared.mjs +0 -2
  689. package/resources/shared.mjs.map +0 -1
  690. package/resources/tenants/index.d.mts +0 -3
  691. package/resources/tenants/index.d.mts.map +0 -1
  692. package/resources/tenants/index.d.ts +0 -3
  693. package/resources/tenants/index.d.ts.map +0 -1
  694. package/resources/tenants/index.js +0 -8
  695. package/resources/tenants/index.js.map +0 -1
  696. package/resources/tenants/index.mjs +0 -3
  697. package/resources/tenants/index.mjs.map +0 -1
  698. package/resources/tenants/subjects.d.mts +0 -43
  699. package/resources/tenants/subjects.d.mts.map +0 -1
  700. package/resources/tenants/subjects.d.ts +0 -43
  701. package/resources/tenants/subjects.d.ts.map +0 -1
  702. package/resources/tenants/subjects.js +0 -26
  703. package/resources/tenants/subjects.js.map +0 -1
  704. package/resources/tenants/subjects.mjs +0 -22
  705. package/resources/tenants/subjects.mjs.map +0 -1
  706. package/resources/tenants/tenants.d.mts +0 -158
  707. package/resources/tenants/tenants.d.mts.map +0 -1
  708. package/resources/tenants/tenants.d.ts +0 -158
  709. package/resources/tenants/tenants.d.ts.map +0 -1
  710. package/resources/tenants/tenants.js +0 -57
  711. package/resources/tenants/tenants.js.map +0 -1
  712. package/resources/tenants/tenants.mjs +0 -52
  713. package/resources/tenants/tenants.mjs.map +0 -1
  714. package/resources/tenants.d.mts +0 -2
  715. package/resources/tenants.d.mts.map +0 -1
  716. package/resources/tenants.d.ts +0 -2
  717. package/resources/tenants.d.ts.map +0 -1
  718. package/resources/tenants.js +0 -5
  719. package/resources/tenants.js.map +0 -1
  720. package/resources/tenants.mjs +0 -2
  721. package/resources/tenants.mjs.map +0 -1
  722. package/resources/tool-sets/index.d.mts +0 -4
  723. package/resources/tool-sets/index.d.mts.map +0 -1
  724. package/resources/tool-sets/index.d.ts +0 -4
  725. package/resources/tool-sets/index.d.ts.map +0 -1
  726. package/resources/tool-sets/index.js +0 -10
  727. package/resources/tool-sets/index.js.map +0 -1
  728. package/resources/tool-sets/index.mjs +0 -4
  729. package/resources/tool-sets/index.mjs.map +0 -1
  730. package/resources/tool-sets/secrets.d.mts +0 -135
  731. package/resources/tool-sets/secrets.d.mts.map +0 -1
  732. package/resources/tool-sets/secrets.d.ts +0 -135
  733. package/resources/tool-sets/secrets.d.ts.map +0 -1
  734. package/resources/tool-sets/secrets.js +0 -62
  735. package/resources/tool-sets/secrets.js.map +0 -1
  736. package/resources/tool-sets/secrets.mjs +0 -58
  737. package/resources/tool-sets/secrets.mjs.map +0 -1
  738. package/resources/tool-sets/tool-sets.d.mts +0 -595
  739. package/resources/tool-sets/tool-sets.d.mts.map +0 -1
  740. package/resources/tool-sets/tool-sets.d.ts +0 -595
  741. package/resources/tool-sets/tool-sets.d.ts.map +0 -1
  742. package/resources/tool-sets/tool-sets.js +0 -122
  743. package/resources/tool-sets/tool-sets.js.map +0 -1
  744. package/resources/tool-sets/tool-sets.mjs +0 -117
  745. package/resources/tool-sets/tool-sets.mjs.map +0 -1
  746. package/resources/tool-sets/tools.d.mts +0 -305
  747. package/resources/tool-sets/tools.d.mts.map +0 -1
  748. package/resources/tool-sets/tools.d.ts +0 -305
  749. package/resources/tool-sets/tools.d.ts.map +0 -1
  750. package/resources/tool-sets/tools.js +0 -84
  751. package/resources/tool-sets/tools.js.map +0 -1
  752. package/resources/tool-sets/tools.mjs +0 -80
  753. package/resources/tool-sets/tools.mjs.map +0 -1
  754. package/resources/tool-sets.d.mts +0 -2
  755. package/resources/tool-sets.d.mts.map +0 -1
  756. package/resources/tool-sets.d.ts +0 -2
  757. package/resources/tool-sets.d.ts.map +0 -1
  758. package/resources/tool-sets.js +0 -5
  759. package/resources/tool-sets.js.map +0 -1
  760. package/resources/tool-sets.mjs +0 -2
  761. package/resources/tool-sets.mjs.map +0 -1
  762. package/resources/uploads.d.mts +0 -107
  763. package/resources/uploads.d.mts.map +0 -1
  764. package/resources/uploads.d.ts +0 -107
  765. package/resources/uploads.d.ts.map +0 -1
  766. package/resources/uploads.js +0 -30
  767. package/resources/uploads.js.map +0 -1
  768. package/resources/uploads.mjs +0 -26
  769. package/resources/uploads.mjs.map +0 -1
  770. package/resources/webhooks.d.mts +0 -92
  771. package/resources/webhooks.d.mts.map +0 -1
  772. package/resources/webhooks.d.ts +0 -92
  773. package/resources/webhooks.d.ts.map +0 -1
  774. package/resources/webhooks.js +0 -22
  775. package/resources/webhooks.js.map +0 -1
  776. package/resources/webhooks.mjs +0 -18
  777. package/resources/webhooks.mjs.map +0 -1
  778. package/resources/widget-sessions.d.mts +0 -388
  779. package/resources/widget-sessions.d.mts.map +0 -1
  780. package/resources/widget-sessions.d.ts +0 -388
  781. package/resources/widget-sessions.d.ts.map +0 -1
  782. package/resources/widget-sessions.js +0 -78
  783. package/resources/widget-sessions.js.map +0 -1
  784. package/resources/widget-sessions.mjs +0 -74
  785. package/resources/widget-sessions.mjs.map +0 -1
  786. package/resources/widgets.d.mts +0 -225
  787. package/resources/widgets.d.mts.map +0 -1
  788. package/resources/widgets.d.ts +0 -225
  789. package/resources/widgets.d.ts.map +0 -1
  790. package/resources/widgets.js +0 -82
  791. package/resources/widgets.js.map +0 -1
  792. package/resources/widgets.mjs +0 -78
  793. package/resources/widgets.mjs.map +0 -1
  794. package/resources/workspace-admin/index.d.mts +0 -4
  795. package/resources/workspace-admin/index.d.mts.map +0 -1
  796. package/resources/workspace-admin/index.d.ts +0 -4
  797. package/resources/workspace-admin/index.d.ts.map +0 -1
  798. package/resources/workspace-admin/index.js +0 -10
  799. package/resources/workspace-admin/index.js.map +0 -1
  800. package/resources/workspace-admin/index.mjs +0 -4
  801. package/resources/workspace-admin/index.mjs.map +0 -1
  802. package/resources/workspace-admin/members.d.mts +0 -90
  803. package/resources/workspace-admin/members.d.mts.map +0 -1
  804. package/resources/workspace-admin/members.d.ts +0 -90
  805. package/resources/workspace-admin/members.d.ts.map +0 -1
  806. package/resources/workspace-admin/members.js +0 -73
  807. package/resources/workspace-admin/members.js.map +0 -1
  808. package/resources/workspace-admin/members.mjs +0 -69
  809. package/resources/workspace-admin/members.mjs.map +0 -1
  810. package/resources/workspace-admin/profiles.d.mts +0 -46
  811. package/resources/workspace-admin/profiles.d.mts.map +0 -1
  812. package/resources/workspace-admin/profiles.d.ts +0 -46
  813. package/resources/workspace-admin/profiles.d.ts.map +0 -1
  814. package/resources/workspace-admin/profiles.js +0 -35
  815. package/resources/workspace-admin/profiles.js.map +0 -1
  816. package/resources/workspace-admin/profiles.mjs +0 -31
  817. package/resources/workspace-admin/profiles.mjs.map +0 -1
  818. package/resources/workspace-admin/workspace-admin.d.mts +0 -227
  819. package/resources/workspace-admin/workspace-admin.d.mts.map +0 -1
  820. package/resources/workspace-admin/workspace-admin.d.ts +0 -227
  821. package/resources/workspace-admin/workspace-admin.d.ts.map +0 -1
  822. package/resources/workspace-admin/workspace-admin.js +0 -111
  823. package/resources/workspace-admin/workspace-admin.js.map +0 -1
  824. package/resources/workspace-admin/workspace-admin.mjs +0 -106
  825. package/resources/workspace-admin/workspace-admin.mjs.map +0 -1
  826. package/resources/workspace-admin.d.mts +0 -2
  827. package/resources/workspace-admin.d.mts.map +0 -1
  828. package/resources/workspace-admin.d.ts +0 -2
  829. package/resources/workspace-admin.d.ts.map +0 -1
  830. package/resources/workspace-admin.js +0 -5
  831. package/resources/workspace-admin.js.map +0 -1
  832. package/resources/workspace-admin.mjs +0 -2
  833. package/resources/workspace-admin.mjs.map +0 -1
  834. package/resources/workspace-secrets.d.mts +0 -134
  835. package/resources/workspace-secrets.d.mts.map +0 -1
  836. package/resources/workspace-secrets.d.ts +0 -134
  837. package/resources/workspace-secrets.d.ts.map +0 -1
  838. package/resources/workspace-secrets.js +0 -52
  839. package/resources/workspace-secrets.js.map +0 -1
  840. package/resources/workspace-secrets.mjs +0 -48
  841. package/resources/workspace-secrets.mjs.map +0 -1
  842. package/resources/workspaces.d.mts +0 -70
  843. package/resources/workspaces.d.mts.map +0 -1
  844. package/resources/workspaces.d.ts +0 -70
  845. package/resources/workspaces.d.ts.map +0 -1
  846. package/resources/workspaces.js +0 -23
  847. package/resources/workspaces.js.map +0 -1
  848. package/resources/workspaces.mjs +0 -19
  849. package/resources/workspaces.mjs.map +0 -1
  850. package/resources.d.mts +0 -2
  851. package/resources.d.mts.map +0 -1
  852. package/resources.d.ts +0 -2
  853. package/resources.d.ts.map +0 -1
  854. package/resources.js +0 -5
  855. package/resources.js.map +0 -1
  856. package/resources.mjs +0 -2
  857. package/resources.mjs.map +0 -1
  858. package/src/api-promise.ts +0 -2
  859. package/src/core/README.md +0 -3
  860. package/src/core/api-promise.ts +0 -90
  861. package/src/core/resource.ts +0 -9
  862. package/src/core/streaming.ts +0 -319
  863. package/src/core/uploads.ts +0 -2
  864. package/src/error.ts +0 -2
  865. package/src/internal/README.md +0 -3
  866. package/src/internal/builtin-types.ts +0 -91
  867. package/src/internal/decoders/line.ts +0 -135
  868. package/src/internal/detect-platform.ts +0 -194
  869. package/src/internal/errors.ts +0 -31
  870. package/src/internal/headers.ts +0 -95
  871. package/src/internal/parse.ts +0 -68
  872. package/src/internal/qs/LICENSE.md +0 -13
  873. package/src/internal/qs/README.md +0 -3
  874. package/src/internal/qs/formats.ts +0 -10
  875. package/src/internal/qs/index.ts +0 -13
  876. package/src/internal/qs/stringify.ts +0 -385
  877. package/src/internal/qs/types.ts +0 -71
  878. package/src/internal/qs/utils.ts +0 -265
  879. package/src/internal/request-options.ts +0 -91
  880. package/src/internal/shim-types.ts +0 -24
  881. package/src/internal/shims.ts +0 -105
  882. package/src/internal/to-file.ts +0 -154
  883. package/src/internal/types.ts +0 -91
  884. package/src/internal/uploads.ts +0 -187
  885. package/src/internal/utils/base64.ts +0 -38
  886. package/src/internal/utils/bytes.ts +0 -32
  887. package/src/internal/utils/env.ts +0 -16
  888. package/src/internal/utils/log.ts +0 -126
  889. package/src/internal/utils/path.ts +0 -88
  890. package/src/internal/utils/query.ts +0 -5
  891. package/src/internal/utils/sleep.ts +0 -1
  892. package/src/internal/utils/uuid.ts +0 -15
  893. package/src/internal/utils/values.ts +0 -103
  894. package/src/internal/utils.ts +0 -7
  895. package/src/lib/.keep +0 -3
  896. package/src/pagination.ts +0 -2
  897. package/src/resource.ts +0 -2
  898. package/src/resources/account.ts +0 -158
  899. package/src/resources/agents/agents.ts +0 -616
  900. package/src/resources/agents/feedback.ts +0 -96
  901. package/src/resources/agents/index.ts +0 -75
  902. package/src/resources/agents/schedules.ts +0 -541
  903. package/src/resources/agents/variations.ts +0 -981
  904. package/src/resources/agents/webhook-deliveries.ts +0 -176
  905. package/src/resources/global-api-key.ts +0 -44
  906. package/src/resources/index.ts +0 -307
  907. package/src/resources/memory-layers/entries.ts +0 -373
  908. package/src/resources/memory-layers/index.ts +0 -29
  909. package/src/resources/memory-layers/memory-layers.ts +0 -314
  910. package/src/resources/objectives/feedback.ts +0 -171
  911. package/src/resources/objectives/index.ts +0 -115
  912. package/src/resources/objectives/objectives.ts +0 -1787
  913. package/src/resources/objectives/tasks.ts +0 -129
  914. package/src/resources/objectives/tool-calls.ts +0 -572
  915. package/src/resources/objectives/tools.ts +0 -74
  916. package/src/resources/search.ts +0 -52
  917. package/src/resources/shared.ts +0 -234
  918. package/src/resources/tenants/index.ts +0 -13
  919. package/src/resources/tenants/subjects.ts +0 -61
  920. package/src/resources/tenants/tenants.ts +0 -218
  921. package/src/resources/tool-sets/index.ts +0 -87
  922. package/src/resources/tool-sets/secrets.ts +0 -223
  923. package/src/resources/tool-sets/tool-sets.ts +0 -934
  924. package/src/resources/tool-sets/tools.ts +0 -456
  925. package/src/resources/webhooks.ts +0 -122
  926. package/src/resources/workspace-admin/index.ts +0 -12
  927. package/src/resources/workspace-admin/members.ts +0 -131
  928. package/src/resources/workspace-admin/profiles.ts +0 -58
  929. package/src/resources/workspace-admin/workspace-admin.ts +0 -302
  930. package/src/resources.ts +0 -1
  931. package/src/streaming.ts +0 -2
  932. package/src/tsconfig.json +0 -11
  933. package/src/uploads.ts +0 -2
  934. package/src/version.ts +0 -1
  935. package/streaming.d.mts +0 -3
  936. package/streaming.d.mts.map +0 -1
  937. package/streaming.d.ts +0 -3
  938. package/streaming.d.ts.map +0 -1
  939. package/streaming.js +0 -6
  940. package/streaming.js.map +0 -1
  941. package/streaming.mjs +0 -3
  942. package/streaming.mjs.map +0 -1
  943. package/uploads.d.mts +0 -3
  944. package/uploads.d.mts.map +0 -1
  945. package/uploads.d.ts +0 -3
  946. package/uploads.d.ts.map +0 -1
  947. package/uploads.js +0 -6
  948. package/uploads.js.map +0 -1
  949. package/uploads.mjs +0 -3
  950. package/uploads.mjs.map +0 -1
  951. package/version.d.mts +0 -2
  952. package/version.d.mts.map +0 -1
  953. package/version.d.ts +0 -2
  954. package/version.d.ts.map +0 -1
  955. package/version.js +0 -5
  956. package/version.js.map +0 -1
  957. package/version.mjs +0 -2
  958. package/version.mjs.map +0 -1
@@ -1,1787 +0,0 @@
1
- import { APIResource } from '../../core/resource';
2
- import * as ObjectivesAPI from './objectives';
3
- import * as AccountAPI from '../account';
4
- import * as Shared from '../shared';
5
- import * as WidgetSessionsAPI from '../widget-sessions';
6
- import * as AgentsAPI from '../agents/agents';
7
- import * as SchedulesAPI from '../agents/schedules';
8
- import * as VariationsAPI from '../agents/variations';
9
- import * as FeedbackAPI from './feedback';
10
- import {
11
- Feedback,
12
- FeedbackCreateParams,
13
- FeedbackListParams,
14
- ObjectiveFeedback,
15
- ObjectiveFeedbackData,
16
- ObjectiveFeedbackInfo,
17
- ObjectiveFeedbacksCursorPagination,
18
- } from './feedback';
19
- import * as TasksAPI from './tasks';
20
- import {
21
- ObjectiveTask,
22
- ObjectiveTaskData,
23
- ObjectiveTasksCursorPagination,
24
- TaskListParams,
25
- TaskRetrieveParams,
26
- Tasks,
27
- } from './tasks';
28
- import * as ToolCallsAPI from './tool-calls';
29
- import {
30
- ObjectiveToolCall,
31
- ObjectiveToolCallData,
32
- ObjectiveToolCallInfo,
33
- ObjectiveToolCallResult,
34
- ObjectiveToolCallResultAudioBlock,
35
- ObjectiveToolCallResultContentBlock,
36
- ObjectiveToolCallResultContentBlockAudio,
37
- ObjectiveToolCallResultContentBlockImage,
38
- ObjectiveToolCallResultContentBlockText,
39
- ObjectiveToolCallResultImageBlock,
40
- ObjectiveToolCallResultTextBlock,
41
- ObjectiveToolCallWithResult,
42
- ObjectiveToolCallsCursorPagination,
43
- ResolvedSecret,
44
- SetToolCallContentRequestAudioBlock,
45
- SetToolCallContentRequestContentBlock,
46
- SetToolCallContentRequestContentBlockAudio,
47
- SetToolCallContentRequestContentBlockImage,
48
- SetToolCallContentRequestContentBlockText,
49
- SetToolCallContentRequestImageBlock,
50
- SetToolCallContentRequestTextBlock,
51
- ToolCallApproveParams,
52
- ToolCallDenyParams,
53
- ToolCallListParams,
54
- ToolCallRetrieveParams,
55
- ToolCallSetContentParams,
56
- ToolCalls,
57
- } from './tool-calls';
58
- import * as ToolsAPI from './tools';
59
- import { ObjectiveTool, ObjectiveToolsCursorPagination, ToolListParams, Tools } from './tools';
60
- import * as ToolSetsToolsAPI from '../tool-sets/tools';
61
- import { APIPromise } from '../../core/api-promise';
62
- import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
63
- import { Stream } from '../../core/streaming';
64
- import { buildHeaders } from '../../internal/headers';
65
- import { RequestOptions } from '../../internal/request-options';
66
- import { path } from '../../internal/utils/path';
67
-
68
- export class Objectives extends APIResource {
69
- tools: ToolsAPI.Tools = new ToolsAPI.Tools(this._client);
70
- toolCalls: ToolCallsAPI.ToolCalls = new ToolCallsAPI.ToolCalls(this._client);
71
- tasks: TasksAPI.Tasks = new TasksAPI.Tasks(this._client);
72
- feedback: FeedbackAPI.Feedback = new FeedbackAPI.Feedback(this._client);
73
-
74
- /**
75
- * Creates a new objective in the workspace
76
- *
77
- * @example
78
- * ```ts
79
- * const objective = await client.objectives.create({
80
- * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
81
- * agentId: 'agent_01HXKD2E5NQM3T9AYWCFMGWT9Y',
82
- * systemPromptData: { foo: 'bar' },
83
- * });
84
- * ```
85
- */
86
- create(params: ObjectiveCreateParams, options?: RequestOptions): APIPromise<Objective> {
87
- const { workspaceId = this._client.workspaceID, ...body } = params;
88
- return this._client.post(path`/v1/workspaces/${workspaceId}/objectives`, { body, ...options });
89
- }
90
-
91
- /**
92
- * Retrieves an objective by ID from the workspace
93
- *
94
- * @example
95
- * ```ts
96
- * const objective = await client.objectives.retrieve(
97
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
98
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
99
- * );
100
- * ```
101
- */
102
- retrieve(
103
- id: string,
104
- params: ObjectiveRetrieveParams | null | undefined = {},
105
- options?: RequestOptions,
106
- ): APIPromise<Objective> {
107
- const { workspaceId = this._client.workspaceID } = params ?? {};
108
- return this._client.get(path`/v1/workspaces/${workspaceId}/objectives/${id}`, options);
109
- }
110
-
111
- /**
112
- * Lists all objectives in the workspace
113
- *
114
- * @example
115
- * ```ts
116
- * // Automatically fetches more pages as needed.
117
- * for await (const objective of client.objectives.list({
118
- * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
119
- * })) {
120
- * // ...
121
- * }
122
- * ```
123
- */
124
- list(
125
- params: ObjectiveListParams | null | undefined = {},
126
- options?: RequestOptions,
127
- ): PagePromise<ObjectivesCursorPagination, Objective> {
128
- const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
129
- return this._client.getAPIList(
130
- path`/v1/workspaces/${workspaceId}/objectives`,
131
- CursorPagination<Objective>,
132
- { query, ...options },
133
- );
134
- }
135
-
136
- /**
137
- * Cancels a running or pending objective. The objective's state will be set to
138
- * STATE_CANCELLED.
139
- *
140
- * @example
141
- * ```ts
142
- * const objective = await client.objectives.cancel(
143
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
144
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
145
- * );
146
- * ```
147
- */
148
- cancel(
149
- objectiveID: string,
150
- params: ObjectiveCancelParams,
151
- options?: RequestOptions,
152
- ): APIPromise<Objective> {
153
- const { workspaceId = this._client.workspaceID, ...body } = params;
154
- return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}:cancel`, {
155
- body,
156
- ...options,
157
- });
158
- }
159
-
160
- /**
161
- * Triggers compaction on a running objective. Optionally override the variation's
162
- * compaction config.
163
- *
164
- * @example
165
- * ```ts
166
- * const response = await client.objectives.compact(
167
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
168
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
169
- * );
170
- * ```
171
- */
172
- compact(
173
- objectiveID: string,
174
- params: ObjectiveCompactParams,
175
- options?: RequestOptions,
176
- ): APIPromise<ObjectiveCompactResponse> {
177
- const { workspaceId = this._client.workspaceID, ...body } = params;
178
- return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}:compact`, {
179
- body,
180
- ...options,
181
- });
182
- }
183
-
184
- /**
185
- * Continues an objective that has completed
186
- *
187
- * @example
188
- * ```ts
189
- * const objectiveEvent = await client.objectives.continue(
190
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
191
- * {
192
- * workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
193
- * message: 'message',
194
- * },
195
- * );
196
- * ```
197
- */
198
- continue(
199
- objectiveID: string,
200
- params: ObjectiveContinueParams,
201
- options?: RequestOptions,
202
- ): APIPromise<ObjectiveEvent> {
203
- const { workspaceId = this._client.workspaceID, ...body } = params;
204
- return this._client.post(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}:continue`, {
205
- body,
206
- ...options,
207
- });
208
- }
209
-
210
- /**
211
- * Read-only list of the last five windows of execution for this objective, ordered
212
- * by most recent first
213
- *
214
- * @example
215
- * ```ts
216
- * // Automatically fetches more pages as needed.
217
- * for await (const objectiveContextWindow of client.objectives.listContextWindows(
218
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
219
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
220
- * )) {
221
- * // ...
222
- * }
223
- * ```
224
- */
225
- listContextWindows(
226
- objectiveID: string,
227
- params: ObjectiveListContextWindowsParams | null | undefined = {},
228
- options?: RequestOptions,
229
- ): PagePromise<ObjectiveContextWindowsCursorPagination, ObjectiveContextWindow> {
230
- const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
231
- return this._client.getAPIList(
232
- path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/context_windows`,
233
- CursorPagination<ObjectiveContextWindow>,
234
- { query, ...options },
235
- );
236
- }
237
-
238
- /**
239
- * Lists all events for an objective
240
- *
241
- * @example
242
- * ```ts
243
- * // Automatically fetches more pages as needed.
244
- * for await (const objectiveEvent of client.objectives.listEvents(
245
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
246
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
247
- * )) {
248
- * // ...
249
- * }
250
- * ```
251
- */
252
- listEvents(
253
- objectiveID: string,
254
- params: ObjectiveListEventsParams | null | undefined = {},
255
- options?: RequestOptions,
256
- ): PagePromise<ObjectiveEventsCursorPagination, ObjectiveEvent> {
257
- const { workspaceId = this._client.workspaceID, ...query } = params ?? {};
258
- return this._client.getAPIList(
259
- path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/events`,
260
- CursorPagination<ObjectiveEvent>,
261
- { query, ...options },
262
- );
263
- }
264
-
265
- /**
266
- * Returns the context-usage breakdown measured for the objective's most recent
267
- * iteration: character lengths per context component (system prompt, memory
268
- * appendices, tool definitions, messages by role) alongside the iteration's input
269
- * token counts.
270
- *
271
- * @example
272
- * ```ts
273
- * const response =
274
- * await client.objectives.retrieveDiagnostics(
275
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
276
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
277
- * );
278
- * ```
279
- */
280
- retrieveDiagnostics(
281
- objectiveID: string,
282
- params: ObjectiveRetrieveDiagnosticsParams | null | undefined = {},
283
- options?: RequestOptions,
284
- ): APIPromise<ObjectiveRetrieveDiagnosticsResponse> {
285
- const { workspaceId = this._client.workspaceID } = params ?? {};
286
- return this._client.get(
287
- path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/diagnostics`,
288
- options,
289
- );
290
- }
291
-
292
- /**
293
- * Streams events for an objective in real-time using server-sent events (SSE)
294
- *
295
- * @example
296
- * ```ts
297
- * const objectiveEvent = await client.objectives.streamEvents(
298
- * 'obj_01HXKD2E5NQM3T9AYWCFQAZGFV',
299
- * { workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q' },
300
- * );
301
- * ```
302
- */
303
- streamEvents(
304
- objectiveID: string,
305
- params: ObjectiveStreamEventsParams | undefined = {},
306
- options?: RequestOptions,
307
- ): APIPromise<Stream<ObjectiveEvent>> {
308
- const { workspaceId = this._client.workspaceID } = params ?? {};
309
- return this._client.get(path`/v1/workspaces/${workspaceId}/objectives/${objectiveID}/events:stream`, {
310
- ...options,
311
- headers: buildHeaders([{ Accept: 'text/event-stream' }, options?.headers]),
312
- stream: true,
313
- }) as APIPromise<Stream<ObjectiveEvent>>;
314
- }
315
- }
316
-
317
- export type ObjectivesCursorPagination = CursorPagination<Objective>;
318
-
319
- export type ObjectiveContextWindowsCursorPagination = CursorPagination<ObjectiveContextWindow>;
320
-
321
- export type ObjectiveEventsCursorPagination = CursorPagination<ObjectiveEvent>;
322
-
323
- export interface AssistantMessage {
324
- content?: string;
325
-
326
- toolCalls?: Array<AssistantToolCall>;
327
- }
328
-
329
- export interface AssistantToolCall {
330
- arguments?: string;
331
-
332
- functionName?: string;
333
-
334
- /**
335
- * CallableTool is a union that represents a tool that can be called by an agent.
336
- * In Cadenya, a tool that is used within an agent objective might be a
337
- * user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context),
338
- * or a Cadenya Tool (one Cadenya provides).
339
- */
340
- tool?: CallableTool;
341
- }
342
-
343
- /**
344
- * CallableTool is a union that represents a tool that can be called by an agent.
345
- * In Cadenya, a tool that is used within an agent objective might be a
346
- * user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context),
347
- * or a Cadenya Tool (one Cadenya provides).
348
- */
349
- export type CallableTool = CallableToolTool | CallableToolAgent | CallableToolCadenyaProvidedTool;
350
-
351
- export interface CallableToolAgent {
352
- /**
353
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
354
- */
355
- agent: Shared.ResourceMetadata;
356
-
357
- type: 'agent';
358
- }
359
-
360
- export interface CallableToolCadenyaProvidedTool {
361
- /**
362
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
363
- */
364
- cadenyaProvidedTool: Shared.ResourceMetadata;
365
-
366
- type: 'cadenyaProvidedTool';
367
- }
368
-
369
- export interface CallableToolTool {
370
- /**
371
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
372
- */
373
- tool: Shared.ResourceMetadata;
374
-
375
- type: 'tool';
376
- }
377
-
378
- /**
379
- * ContextLengths is the measured character length of each distinct component of an
380
- * iteration's assembled context window. Values are raw character lengths of the
381
- * component as assembled into the request — token estimates are derived by the
382
- * client against input_tokens (component share = component length / sum of all
383
- * lengths).
384
- *
385
- * New components are added as new fields — wire-compatible; absent components read
386
- * as 0.
387
- */
388
- export interface ContextLengths {
389
- /**
390
- * Character length of the chat history messages with the assistant role.
391
- */
392
- assistantMessages: number;
393
-
394
- /**
395
- * Character length of the discoverable/available-tools appendix attached to the
396
- * system prompt.
397
- */
398
- availableTools: number;
399
-
400
- /**
401
- * Character length of the episodic memory appendix attached to the system prompt.
402
- */
403
- episodicMemory: number;
404
-
405
- /**
406
- * Character length of the skills memory appendix attached to the system prompt.
407
- */
408
- skillsMemory: number;
409
-
410
- /**
411
- * Character length of the objective's base system prompt (rendered variation
412
- * template). Not tokens -- see the message comment.
413
- */
414
- systemPrompt: number;
415
-
416
- /**
417
- * Character length of the serialized tool definitions sent with the completion
418
- * request (names, descriptions, and JSON-schema parameters).
419
- */
420
- toolDefinitions: number;
421
-
422
- /**
423
- * Character length of the tool results present in the chat history.
424
- */
425
- toolResults: number;
426
-
427
- /**
428
- * Character length of the chat history messages with the user role.
429
- */
430
- userMessages: number;
431
- }
432
-
433
- export interface ContextWindowCompacted {
434
- /**
435
- * Number of messages that were compacted
436
- */
437
- messagesCompacted?: number;
438
-
439
- /**
440
- * The new context window created by this compaction
441
- */
442
- newContextWindow?: ObjectiveContextWindowData;
443
-
444
- /**
445
- * The strategies that were applied during this compaction
446
- */
447
- strategies?: Array<string>;
448
-
449
- /**
450
- * The summary generated by the summarization strategy, if used.
451
- */
452
- summary?: string;
453
- }
454
-
455
- /**
456
- * MemoryRead is emitted each time the agent resolves a key against the memory
457
- * cascade and loads an entry. Lookups that miss (key not found in any layer) do
458
- * not emit this event.
459
- */
460
- export interface MemoryRead {
461
- /**
462
- * The specific entry that was read.
463
- */
464
- memoryEntryId?: string;
465
-
466
- /**
467
- * The layer the entry resolved to. The top-most layer that contained the key —
468
- * other layers beneath it that also contained the key are shadowed and not
469
- * referenced here.
470
- */
471
- memoryLayerId?: string;
472
-
473
- /**
474
- * Human-readable description of the read, set by the runtime. For example: "Loaded
475
- * skill", "Resolved context key". Not machine-parsed; intended for UI display
476
- * alongside the other events in an objective's timeline.
477
- */
478
- message?: string;
479
- }
480
-
481
- /**
482
- * MemoryReference identifies a memory layer or a specific entry within one, for
483
- * composition into a memory cascade. Used on objectives (where entry pinning is
484
- * permitted).
485
- *
486
- * memory*layer_id accepts both the canonical form (memlyr*…) and the external-id
487
- * form (external_id:my-custom-id). The same applies to memory_entry_id when set.
488
- */
489
- export interface MemoryReference {
490
- memoryLayerId: string;
491
-
492
- /**
493
- * When set, inserts only this entry from memory_layer_id into the cascade —
494
- * behaves as a single-entry layer (only this key resolves at this position). The
495
- * entry must belong to memory_layer_id; mismatches are rejected with
496
- * InvalidArgument.
497
- */
498
- memoryEntryId?: string;
499
- }
500
-
501
- /**
502
- * Objective is the data for an objective. It contains the snapshotted fields for
503
- * the selected agent and variation. Secrets are returned only with their names,
504
- * and the output definition is copied from the agent's configuration.
505
- */
506
- export interface Objective {
507
- /**
508
- * ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation,
509
- * and (when applicable) schedule that an objective was started with.
510
- */
511
- configSnapshot: ObjectiveConfigSnapshot;
512
-
513
- /**
514
- * The first user message in the LLM chat history, either provided explicitly at
515
- * creation or rendered from the variation's first_user_message_template.
516
- */
517
- firstUserMessage: string;
518
-
519
- /**
520
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
521
- * runs)
522
- */
523
- metadata: Shared.OperationMetadata;
524
-
525
- /**
526
- * The current lifecycle state of the objective.
527
- */
528
- state:
529
- | 'STATE_UNSPECIFIED'
530
- | 'STATE_PENDING'
531
- | 'STATE_RUNNING'
532
- | 'STATE_WAITING'
533
- | 'STATE_FAILED'
534
- | 'STATE_CANCELLED'
535
- | 'STATE_FINALIZED'
536
- | 'STATE_TIMED_OUT';
537
-
538
- /**
539
- * system_prompt is read-only, derived from the selected variation's prompt
540
- */
541
- systemPrompt: string;
542
-
543
- /**
544
- * Episodic is used to configure the episodic memory for the objective
545
- */
546
- episodicMemory?: Objective.EpisodicMemory;
547
-
548
- /**
549
- * Arbitrary data rendered into the variation's first_user_message_template
550
- */
551
- firstUserMessageData?: { [key: string]: unknown };
552
-
553
- /**
554
- * ObjectiveInfo provides read-only aggregated statistics about an objective's
555
- * execution
556
- */
557
- info?: ObjectiveInfo;
558
-
559
- /**
560
- * Memory layers/entries layered over the baseline cascade inherited from the
561
- * selected variation — element-level rules over inherited styles, in CSS terms.
562
- *
563
- * Array order is resolution order: EARLIER elements are more specific and are
564
- * consulted first. Entries pinned via memory_entry_id behave as single-entry
565
- * layers at their position.
566
- *
567
- * System-managed layers (e.g., episodic) cannot be referenced here; they attach
568
- * themselves automatically based on the episodic key.
569
- *
570
- * Size cap: the TOTAL effective cascade (this field + the variation's memory layer
571
- * assignments) must not exceed 10 entries. A request that would produce a larger
572
- * cascade is rejected with InvalidArgument.
573
- */
574
- memoryCascade?: Array<MemoryReference>;
575
-
576
- /**
577
- * The output of the objective, populated when the objective completes. Will match
578
- * the schema of output_json_schema or output_json_inferred. This will only be set
579
- * if the state of the objective is set to STATE_FINALIZED
580
- */
581
- output?: { [key: string]: unknown };
582
-
583
- /**
584
- * A parent objective means the objective was spawned off using a separate agent to
585
- * complete an objective
586
- */
587
- parentObjectiveId?: string;
588
-
589
- /**
590
- * Parameters forced onto this objective's tool calls, as provided at creation. See
591
- * CreateObjectiveRequest.pinned_parameters for semantics.
592
- */
593
- pinnedParameters?: { [key: string]: string };
594
-
595
- /**
596
- * Secrets that can be used in the headers for tool calls using the secret
597
- * interpolation format.
598
- */
599
- secrets?: Array<ObjectiveSecret>;
600
-
601
- /**
602
- * Optional human-readable detail about the current state (e.g. a failure reason).
603
- */
604
- stateMessage?: string;
605
-
606
- /**
607
- * Arbitrary data rendered into the variation's system_prompt_template
608
- */
609
- systemPromptData?: { [key: string]: unknown };
610
- }
611
-
612
- export namespace Objective {
613
- /**
614
- * Episodic is used to configure the episodic memory for the objective
615
- */
616
- export interface EpisodicMemory {
617
- /**
618
- * The caller-supplied episodic key. Objectives created with the same key (for the
619
- * same agent) share one episodic memory layer.
620
- */
621
- key: string;
622
-
623
- /**
624
- * The episodic memory layer resolved (created or reused) for this objective's key.
625
- * Populated by the system at objective creation.
626
- */
627
- memoryLayerId?: string;
628
- }
629
- }
630
-
631
- /**
632
- * ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation,
633
- * and (when applicable) schedule that an objective was started with.
634
- */
635
- export interface ObjectiveConfigSnapshot {
636
- /**
637
- * Agent resource
638
- */
639
- agent?: AgentsAPI.Agent;
640
-
641
- /**
642
- * AgentSchedule resource — a recurring trigger attached to an agent that creates
643
- * objectives on its cadence.
644
- */
645
- agentSchedule?: SchedulesAPI.AgentSchedule;
646
-
647
- /**
648
- * AgentVariation resource
649
- */
650
- agentVariation?: VariationsAPI.AgentVariation;
651
- }
652
-
653
- /**
654
- * ObjectiveContextWindow is a window of chat completions that is grouped together
655
- * to prevent context-window overflows. Context windows also allow agents to
656
- * compact their windows and carry on into a new one.
657
- */
658
- export interface ObjectiveContextWindow {
659
- data: ObjectiveContextWindowData;
660
-
661
- /**
662
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
663
- * runs)
664
- */
665
- metadata: Shared.OperationMetadata;
666
-
667
- info?: ObjectiveContextWindow.Info;
668
- }
669
-
670
- export namespace ObjectiveContextWindow {
671
- export interface Info {
672
- /**
673
- * A profile identifies a user or non-human principal (such as an API key) at the
674
- * account level. Profiles are account-scoped and can be granted access to multiple
675
- * workspaces.
676
- */
677
- createdBy?: AccountAPI.Profile;
678
-
679
- /**
680
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
681
- * runs)
682
- */
683
- objective?: Shared.OperationMetadata;
684
- }
685
- }
686
-
687
- export interface ObjectiveContextWindowData {
688
- /**
689
- * A calculated value for how many completion tokens (output tokens) have been used
690
- * in this context window
691
- */
692
- completionTokens?: number;
693
-
694
- /**
695
- * The objective's ID that this window belongs to
696
- */
697
- objectiveId?: string;
698
-
699
- /**
700
- * The instructions for this window to continue from a previous window's chat
701
- * history.
702
- */
703
- previousWindowContinueInstructions?: string;
704
-
705
- /**
706
- * A calculated value for how many prompt tokens (input tokens) have been used in
707
- * this context window
708
- */
709
- promptTokens?: number;
710
-
711
- /**
712
- * sequence is a numeric representation of which context window this is. Sequences
713
- * are useful to perform a max(sequence) on in order to calculate how many context
714
- * windows an objective has.
715
- */
716
- sequence?: number;
717
- }
718
-
719
- /**
720
- * ObjectiveDiagnostics is the context-usage breakdown measured for a single
721
- * iteration at request-assembly time. It reports how much of the context window
722
- * each component occupies so tool parameters, memory cascades, and prompts can be
723
- * tuned against real token usage.
724
- */
725
- export interface ObjectiveDiagnostics {
726
- /**
727
- * The portion of input_tokens served from the provider's prompt cache. Lets
728
- * clients distinguish "big but cached" from "big and paid fresh every iteration".
729
- */
730
- cachedInputTokens: number;
731
-
732
- /**
733
- * ContextLengths is the measured character length of each distinct component of an
734
- * iteration's assembled context window. Values are raw character lengths of the
735
- * component as assembled into the request — token estimates are derived by the
736
- * client against input_tokens (component share = component length / sum of all
737
- * lengths).
738
- *
739
- * New components are added as new fields — wire-compatible; absent components read
740
- * as 0.
741
- */
742
- contextLengths: ContextLengths;
743
-
744
- /**
745
- * Input tokens reported by the LLM provider for the iteration's completion.
746
- */
747
- inputTokens: number;
748
- }
749
-
750
- export interface ObjectiveError {
751
- message?: string;
752
-
753
- type?: string;
754
- }
755
-
756
- export interface ObjectiveEvent {
757
- data: ObjectiveEventData;
758
-
759
- /**
760
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
761
- * runs)
762
- */
763
- metadata: Shared.OperationMetadata;
764
-
765
- contextWindowId?: string;
766
-
767
- /**
768
- * Elapsed time of the work this event records, when it is known at write time
769
- * (e.g. assistant message generation, tool execution for result/error events).
770
- * Unset means the event is instantaneous or the duration is not measurable.
771
- * Serialized as a canonical duration string (e.g. "4.1s"). Always set together
772
- * with started_at.
773
- */
774
- duration?: string;
775
-
776
- info?: ObjectiveEventInfo;
777
-
778
- /**
779
- * When the work this event records began. Set together with duration, so the work
780
- * interval is [started_at, started_at + duration]. The event's created_at remains
781
- * the time the event was persisted.
782
- */
783
- startedAt?: string;
784
- }
785
-
786
- export type ObjectiveEventData =
787
- | ObjectiveEventDataUserMessage
788
- | ObjectiveEventDataToolApprovalRequested
789
- | ObjectiveEventDataToolApproved
790
- | ObjectiveEventDataToolDenied
791
- | ObjectiveEventDataToolCalled
792
- | ObjectiveEventDataError
793
- | ObjectiveEventDataAssistantMessage
794
- | ObjectiveEventDataToolResult
795
- | ObjectiveEventDataToolError
796
- | ObjectiveEventDataContextWindowCompacted
797
- | ObjectiveEventDataMemoryRead
798
- | ObjectiveEventDataCancelled
799
- | ObjectiveEventDataSubAgentSpawned
800
- | ObjectiveEventDataSubAgentUpdated
801
- | ObjectiveEventDataFinalized
802
- | ObjectiveEventDataNotice
803
- | ObjectiveEventDataTimedOut
804
- | ObjectiveEventDataReasoning;
805
-
806
- export interface ObjectiveEventDataAssistantMessage {
807
- assistantMessage: AssistantMessage;
808
-
809
- type: 'assistantMessage';
810
- }
811
-
812
- export interface ObjectiveEventDataCancelled {
813
- /**
814
- * ObjectiveCancelled is the terminal event written when an objective is cancelled.
815
- * After this event, the objective is super-terminal: no further iterations,
816
- * compaction, or continuation are permitted.
817
- */
818
- cancelled: ObjectiveEventDataCancelled.Cancelled;
819
-
820
- type: 'cancelled';
821
- }
822
-
823
- export namespace ObjectiveEventDataCancelled {
824
- /**
825
- * ObjectiveCancelled is the terminal event written when an objective is cancelled.
826
- * After this event, the objective is super-terminal: no further iterations,
827
- * compaction, or continuation are permitted.
828
- */
829
- export interface Cancelled {
830
- /**
831
- * Optional human-readable note recorded at cancel time. Today the workflow sets
832
- * "Cancelled" but this field leaves room for richer reasons (e.g. "Cancelled by
833
- * user", "Cancelled by schedule sweep", "Credit balance exhausted").
834
- */
835
- message?: string;
836
- }
837
- }
838
-
839
- export interface ObjectiveEventDataContextWindowCompacted {
840
- contextWindowCompacted: ContextWindowCompacted;
841
-
842
- type: 'contextWindowCompacted';
843
- }
844
-
845
- export interface ObjectiveEventDataError {
846
- error: ObjectiveError;
847
-
848
- type: 'error';
849
- }
850
-
851
- export interface ObjectiveEventDataFinalized {
852
- /**
853
- * ObjectiveFinalized is the terminal event written when an objective is finalized.
854
- * After this event, the objective is super-terminal: no further iterations,
855
- * compaction, or continuation are permitted.
856
- */
857
- finalized: ObjectiveEventDataFinalized.Finalized;
858
-
859
- type: 'finalized';
860
- }
861
-
862
- export namespace ObjectiveEventDataFinalized {
863
- /**
864
- * ObjectiveFinalized is the terminal event written when an objective is finalized.
865
- * After this event, the objective is super-terminal: no further iterations,
866
- * compaction, or continuation are permitted.
867
- */
868
- export interface Finalized {
869
- /**
870
- * If the objective was created with an output schema, and the agent successfully
871
- * completed the objective, this field will contain the structured output of the
872
- * objective.
873
- */
874
- output?: unknown;
875
- }
876
- }
877
-
878
- export interface ObjectiveEventDataMemoryRead {
879
- /**
880
- * MemoryRead is emitted each time the agent resolves a key against the memory
881
- * cascade and loads an entry. Lookups that miss (key not found in any layer) do
882
- * not emit this event.
883
- */
884
- memoryRead: MemoryRead;
885
-
886
- type: 'memoryRead';
887
- }
888
-
889
- export interface ObjectiveEventDataNotice {
890
- /**
891
- * Notice is a non-terminal diagnostic emitted by the runtime when something
892
- * noteworthy but non-fatal happens during an objective — for example a
893
- * just-in-time tool set failing to load, or a previously loaded tool being dropped
894
- * because it was archived. Notices carry no structured payload; they exist to make
895
- * the objective timeline self-explanatory.
896
- */
897
- notice: ObjectiveEventDataNotice.Notice;
898
-
899
- type: 'notice';
900
- }
901
-
902
- export namespace ObjectiveEventDataNotice {
903
- /**
904
- * Notice is a non-terminal diagnostic emitted by the runtime when something
905
- * noteworthy but non-fatal happens during an objective — for example a
906
- * just-in-time tool set failing to load, or a previously loaded tool being dropped
907
- * because it was archived. Notices carry no structured payload; they exist to make
908
- * the objective timeline self-explanatory.
909
- */
910
- export interface Notice {
911
- /**
912
- * Stable machine-readable identifier for the notice kind (for example
913
- * "tool_set_load_failed", "tool_archived"). Clients can switch on it or use it as
914
- * an i18n key; the message is the English fallback.
915
- */
916
- key?: string;
917
-
918
- level?: 'LEVEL_UNSPECIFIED' | 'LEVEL_INFO' | 'LEVEL_WARN';
919
-
920
- /**
921
- * Human-readable description of what happened.
922
- */
923
- message?: string;
924
- }
925
- }
926
-
927
- export interface ObjectiveEventDataReasoning {
928
- /**
929
- * Reasoning carries the human-readable reasoning text a model produced while
930
- * working on an iteration — extended thinking (Anthropic, Gemini) or reasoning
931
- * summaries (OpenAI). It is emitted alongside the assistant message from the same
932
- * model response and is purely informational: the text shown here is never sent
933
- * back to the model.
934
- */
935
- reasoning: Reasoning;
936
-
937
- type: 'reasoning';
938
- }
939
-
940
- export interface ObjectiveEventDataSubAgentSpawned {
941
- subAgentSpawned: SubAgentSpawned;
942
-
943
- type: 'subAgentSpawned';
944
- }
945
-
946
- export interface ObjectiveEventDataSubAgentUpdated {
947
- subAgentUpdated: SubAgentUpdated;
948
-
949
- type: 'subAgentUpdated';
950
- }
951
-
952
- export interface ObjectiveEventDataTimedOut {
953
- /**
954
- * ObjectiveTimedOut is the terminal event written when an objective is finalized
955
- * by the inactivity sweep because it saw no activity (no user messages, no LLM
956
- * calls) within its variation's inactivity timeout — or the system-wide 24 hour
957
- * maximum when no timeout is configured. The objective produces no output. After
958
- * this event, the objective is super-terminal: no further iterations, compaction,
959
- * or continuation are permitted.
960
- */
961
- timedOut: ObjectiveEventDataTimedOut.TimedOut;
962
-
963
- type: 'timedOut';
964
- }
965
-
966
- export namespace ObjectiveEventDataTimedOut {
967
- /**
968
- * ObjectiveTimedOut is the terminal event written when an objective is finalized
969
- * by the inactivity sweep because it saw no activity (no user messages, no LLM
970
- * calls) within its variation's inactivity timeout — or the system-wide 24 hour
971
- * maximum when no timeout is configured. The objective produces no output. After
972
- * this event, the objective is super-terminal: no further iterations, compaction,
973
- * or continuation are permitted.
974
- */
975
- export interface TimedOut {
976
- /**
977
- * Human-readable note recorded at timeout time (e.g. "Timed out after 2h of
978
- * inactivity").
979
- */
980
- message?: string;
981
- }
982
- }
983
-
984
- export interface ObjectiveEventDataToolApprovalRequested {
985
- toolApprovalRequested: ToolApprovalRequested;
986
-
987
- type: 'toolApprovalRequested';
988
- }
989
-
990
- export interface ObjectiveEventDataToolApproved {
991
- toolApproved: ToolApproved;
992
-
993
- type: 'toolApproved';
994
- }
995
-
996
- export interface ObjectiveEventDataToolCalled {
997
- toolCalled: ToolCalled;
998
-
999
- type: 'toolCalled';
1000
- }
1001
-
1002
- export interface ObjectiveEventDataToolDenied {
1003
- toolDenied: ToolDenied;
1004
-
1005
- type: 'toolDenied';
1006
- }
1007
-
1008
- export interface ObjectiveEventDataToolError {
1009
- toolError: ToolError;
1010
-
1011
- type: 'toolError';
1012
- }
1013
-
1014
- export interface ObjectiveEventDataToolResult {
1015
- toolResult: ToolResult;
1016
-
1017
- type: 'toolResult';
1018
- }
1019
-
1020
- export interface ObjectiveEventDataUserMessage {
1021
- type: 'userMessage';
1022
-
1023
- userMessage: UserMessage;
1024
- }
1025
-
1026
- export interface ObjectiveEventInfo {
1027
- /**
1028
- * A profile identifies a user or non-human principal (such as an API key) at the
1029
- * account level. Profiles are account-scoped and can be granted access to multiple
1030
- * workspaces.
1031
- */
1032
- createdBy?: AccountAPI.Profile;
1033
-
1034
- /**
1035
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
1036
- * runs)
1037
- */
1038
- objective?: Shared.OperationMetadata;
1039
- }
1040
-
1041
- /**
1042
- * The envelope for an objective event webhook delivery. Contains timestamp, event
1043
- * type, and the webhook data payload.
1044
- */
1045
- export interface ObjectiveEventWebhookData {
1046
- /**
1047
- * The webhook data payload with flat top-level keys for agent, variation,
1048
- * objective, and event.
1049
- */
1050
- data: ObjectiveEventWebhookData.Data;
1051
-
1052
- timestamp: string;
1053
-
1054
- /**
1055
- * The event type, prefixed with objective_event. (e.g.,
1056
- * objective_event.tool_result)
1057
- */
1058
- type: string;
1059
- }
1060
-
1061
- export namespace ObjectiveEventWebhookData {
1062
- /**
1063
- * The webhook data payload with flat top-level keys for agent, variation,
1064
- * objective, and event.
1065
- */
1066
- export interface Data {
1067
- /**
1068
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
1069
- */
1070
- agent: Shared.ResourceMetadata;
1071
-
1072
- /**
1073
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
1074
- */
1075
- agentVariation: Shared.ResourceMetadata;
1076
-
1077
- /**
1078
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
1079
- * runs)
1080
- */
1081
- objective: Shared.OperationMetadata;
1082
-
1083
- objectiveEvent: ObjectivesAPI.ObjectiveEvent;
1084
- }
1085
- }
1086
-
1087
- /**
1088
- * ObjectiveInfo provides read-only aggregated statistics about an objective's
1089
- * execution
1090
- */
1091
- export interface ObjectiveInfo {
1092
- /**
1093
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
1094
- */
1095
- agent: Shared.ResourceMetadata;
1096
-
1097
- /**
1098
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
1099
- */
1100
- agentVariation: Shared.ResourceMetadata;
1101
-
1102
- /**
1103
- * A profile identifies a user or non-human principal (such as an API key) at the
1104
- * account level. Profiles are account-scoped and can be granted access to multiple
1105
- * workspaces.
1106
- */
1107
- createdBy: AccountAPI.Profile;
1108
-
1109
- /**
1110
- * ID of the objective's current (most recent) context window. Hydrated on demand;
1111
- * empty when the objective has not yet produced a context window.
1112
- */
1113
- currentContextWindowId: string;
1114
-
1115
- /**
1116
- * The effective memory cascade at objective creation time: the episodic layer
1117
- * (when present), then Objective.memory_cascade, then the variation's baseline
1118
- * layers by ascending position. Order is resolution order — index 0 is the most
1119
- * specific and is consulted first; the first layer containing a key wins. Returned
1120
- * on reads so clients can see exactly what the objective resolves against without
1121
- * re-joining variation state.
1122
- */
1123
- effectiveMemoryCascade: Array<MemoryReference>;
1124
-
1125
- /**
1126
- * Total number of context windows that this objective has generated
1127
- */
1128
- totalContextWindows: number;
1129
-
1130
- /**
1131
- * Total number of events generated during this objective's execution
1132
- */
1133
- totalEvents: number;
1134
-
1135
- /**
1136
- * Total input tokens consumed across all LLM completions across all context
1137
- * windows
1138
- */
1139
- totalInputTokens: number;
1140
-
1141
- totalIterations: number;
1142
-
1143
- /**
1144
- * Total output tokens generated across all LLM completions across all context
1145
- * windows
1146
- */
1147
- totalOutputTokens: number;
1148
-
1149
- /**
1150
- * Total number of tool calls made during execution
1151
- */
1152
- totalToolCalls: number;
1153
-
1154
- /**
1155
- * SubjectReference is the read-only echo of a resource's subject association,
1156
- * carrying both Cadenya's canonical id and the customer's own key.
1157
- */
1158
- subject?: WidgetSessionsAPI.SubjectReference;
1159
-
1160
- /**
1161
- * TenantReference is the read-only echo of a resource's tenant association,
1162
- * carrying both Cadenya's canonical id and the customer's own key.
1163
- */
1164
- tenant?: WidgetSessionsAPI.TenantReference;
1165
-
1166
- /**
1167
- * BareMetadata contains the minimal metadata for a resource: the ID and an
1168
- * optional human-readable name. These are used for reference fields where the full
1169
- * metadata (account scoping, timestamps, labels, external IDs) is not needed —
1170
- * e.g., the tool references inside an agent variation spec or the tools assigned
1171
- * to an objective. Both fields are server-populated; clients provide IDs through
1172
- * sibling fields rather than by constructing a BareMetadata themselves.
1173
- */
1174
- widget?: Shared.BareMetadata;
1175
- }
1176
-
1177
- export interface ObjectiveSecret {
1178
- name?: string;
1179
- }
1180
-
1181
- /**
1182
- * Reasoning carries the human-readable reasoning text a model produced while
1183
- * working on an iteration — extended thinking (Anthropic, Gemini) or reasoning
1184
- * summaries (OpenAI). It is emitted alongside the assistant message from the same
1185
- * model response and is purely informational: the text shown here is never sent
1186
- * back to the model.
1187
- */
1188
- export interface Reasoning {
1189
- /**
1190
- * The reasoning text. May be a verbatim chain of thought or a provider-generated
1191
- * summary depending on the model.
1192
- */
1193
- content: string;
1194
- }
1195
-
1196
- export interface SubAgentSpawned {
1197
- /**
1198
- * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
1199
- */
1200
- agent?: Shared.ResourceMetadata;
1201
-
1202
- /**
1203
- * Metadata for ephemeral operations and activities (e.g., objectives, executions,
1204
- * runs)
1205
- */
1206
- objective?: Shared.OperationMetadata;
1207
-
1208
- task?: string;
1209
- }
1210
-
1211
- export interface SubAgentUpdated {
1212
- /**
1213
- * BareMetadata contains the minimal metadata for a resource: the ID and an
1214
- * optional human-readable name. These are used for reference fields where the full
1215
- * metadata (account scoping, timestamps, labels, external IDs) is not needed —
1216
- * e.g., the tool references inside an agent variation spec or the tools assigned
1217
- * to an objective. Both fields are server-populated; clients provide IDs through
1218
- * sibling fields rather than by constructing a BareMetadata themselves.
1219
- */
1220
- agent?: Shared.BareMetadata;
1221
-
1222
- message?: string;
1223
-
1224
- /**
1225
- * BareMetadata contains the minimal metadata for a resource: the ID and an
1226
- * optional human-readable name. These are used for reference fields where the full
1227
- * metadata (account scoping, timestamps, labels, external IDs) is not needed —
1228
- * e.g., the tool references inside an agent variation spec or the tools assigned
1229
- * to an objective. Both fields are server-populated; clients provide IDs through
1230
- * sibling fields rather than by constructing a BareMetadata themselves.
1231
- */
1232
- objective?: Shared.BareMetadata;
1233
-
1234
- status?:
1235
- | 'STATUS_UNSPECIFIED'
1236
- | 'STATUS_PENDING'
1237
- | 'STATUS_RUNNING'
1238
- | 'STATUS_COMPLETED'
1239
- | 'STATUS_FAILED'
1240
- | 'STATUS_CANCELLED';
1241
- }
1242
-
1243
- export interface ToolApprovalRequested {
1244
- /**
1245
- * The ID of the objective tool call record. Use this ID with the ApproveToolCall
1246
- * or DenyToolCall RPCs to approve or deny the tool call.
1247
- */
1248
- toolCallId?: string;
1249
- }
1250
-
1251
- export interface ToolApproved {
1252
- /**
1253
- * The ID of the objective tool call record that was approved via the
1254
- * ApproveToolCall RPC.
1255
- */
1256
- toolCallId?: string;
1257
- }
1258
-
1259
- export interface ToolCalled {
1260
- /**
1261
- * The arguments passed to the tool.
1262
- */
1263
- arguments?: { [key: string]: unknown };
1264
-
1265
- /**
1266
- * Config defines the adapter to use for the tool. This is used to determine how
1267
- * the tool is called. For example, if the tool is an HTTP tool, the adapter will
1268
- * be Http. If the tool is an inline tool, the adapter will be Inline.
1269
- */
1270
- config?: ToolSetsToolsAPI.ToolSpecConfig;
1271
-
1272
- /**
1273
- * CallableTool is a union that represents a tool that can be called by an agent.
1274
- * In Cadenya, a tool that is used within an agent objective might be a
1275
- * user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context),
1276
- * or a Cadenya Tool (one Cadenya provides).
1277
- */
1278
- tool?: CallableTool;
1279
-
1280
- /**
1281
- * The ID of the objective tool call record that was executed.
1282
- */
1283
- toolCallId?: string;
1284
- }
1285
-
1286
- export interface ToolDenied {
1287
- /**
1288
- * The memo provided by the reviewer when denying the tool call. This is passed to
1289
- * the agent to provide further instructions.
1290
- */
1291
- memo?: string;
1292
-
1293
- /**
1294
- * The ID of the objective tool call record that was denied via the DenyToolCall
1295
- * RPC.
1296
- */
1297
- toolCallId?: string;
1298
- }
1299
-
1300
- export interface ToolError {
1301
- message?: string;
1302
-
1303
- /**
1304
- * The ID of the objective tool call record that encountered an error during
1305
- * execution.
1306
- */
1307
- toolCallId?: string;
1308
- }
1309
-
1310
- export interface ToolResult {
1311
- /**
1312
- * ObjectiveToolCallResult is the content a tool returned after execution. Tools
1313
- * can return multiple content blocks, and blocks can be multi-modal (text, image,
1314
- * audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
1315
- * rather than inline bytes.
1316
- */
1317
- result: ToolCallsAPI.ObjectiveToolCallResult;
1318
-
1319
- toolCallId: string;
1320
- }
1321
-
1322
- export interface UserMessage {
1323
- content?: string;
1324
- }
1325
-
1326
- /**
1327
- * Compact objective response
1328
- */
1329
- export interface ObjectiveCompactResponse {
1330
- /**
1331
- * The new context window created by the compaction
1332
- */
1333
- contextWindow?: ObjectiveContextWindowData;
1334
- }
1335
-
1336
- export interface ObjectiveRetrieveDiagnosticsResponse {
1337
- /**
1338
- * ObjectiveDiagnostics is the context-usage breakdown measured for a single
1339
- * iteration at request-assembly time. It reports how much of the context window
1340
- * each component occupies so tool parameters, memory cascades, and prompts can be
1341
- * tuned against real token usage.
1342
- */
1343
- diagnostics: ObjectiveDiagnostics;
1344
- }
1345
-
1346
- export interface ObjectiveCreateParams {
1347
- /**
1348
- * Path param
1349
- */
1350
- workspaceId?: string;
1351
-
1352
- /**
1353
- * Body param
1354
- */
1355
- agentId: string;
1356
-
1357
- /**
1358
- * Body param: Arbitrary data rendered into the selected variation's
1359
- * system_prompt_template (liquid) to produce the objective's system prompt. If the
1360
- * agent has a system_prompt_data_schema, this must satisfy it.
1361
- */
1362
- systemPromptData: { [key: string]: unknown };
1363
-
1364
- /**
1365
- * Body param: Episodic is used to configure the episodic memory for the objective
1366
- */
1367
- episodicMemory?: ObjectiveCreateParams.EpisodicMemory;
1368
-
1369
- /**
1370
- * Body param: Optional explicit first user message for the LLM chat history. When
1371
- * not set, the selected variation's first_user_message_template is rendered with
1372
- * first_user_message_data instead. If neither this field nor a
1373
- * first_user_message_template is present, the request is rejected with
1374
- * InvalidArgument.
1375
- */
1376
- firstUserMessage?: string;
1377
-
1378
- /**
1379
- * Body param: Arbitrary data rendered into the selected variation's
1380
- * first_user_message_template (liquid) to produce the first user message. Separate
1381
- * from `system_prompt_data`, which renders the system prompt template.
1382
- */
1383
- firstUserMessageData?: { [key: string]: unknown };
1384
-
1385
- /**
1386
- * Body param: Memory layers/entries layered over the baseline cascade inherited
1387
- * from the selected variation — element-level rules over inherited styles, in CSS
1388
- * terms.
1389
- *
1390
- * Array order is resolution order: EARLIER elements are more specific and are
1391
- * consulted first. Entries pinned via memory_entry_id behave as single-entry
1392
- * layers at their position.
1393
- *
1394
- * System-managed layers (e.g., episodic) cannot be referenced here; they attach
1395
- * themselves automatically based on the episodic key.
1396
- *
1397
- * Size cap: the TOTAL effective cascade (this field + the variation's memory layer
1398
- * assignments) must not exceed 10 entries. A request that would produce a larger
1399
- * cascade is rejected with InvalidArgument.
1400
- */
1401
- memoryCascade?: Array<MemoryReference>;
1402
-
1403
- /**
1404
- * Body param: CreateOperationMetadata contains the user-provided fields for
1405
- * creating an operation. Read-only fields (id, account_id, workspace_id,
1406
- * created_at, profile_id) are excluded since they are set by the server.
1407
- */
1408
- metadata?: Shared.CreateOperationMetadata;
1409
-
1410
- /**
1411
- * Body param: Parameters forced onto this objective's tool calls. A pinned
1412
- * parameter is an overlay on a tool's JSON schema: the parameter is removed from
1413
- * what the LLM sees, and its value is always overwritten server-side with the
1414
- * pinned value — the model cannot choose a different value for it.
1415
- */
1416
- pinnedParameters?: { [key: string]: string };
1417
-
1418
- /**
1419
- * Body param: Secrets that can be used in the headers for tool calls using the
1420
- * secret interpolation format.
1421
- */
1422
- secrets?: Array<ObjectiveCreateParams.Secret>;
1423
-
1424
- /**
1425
- * Body param: SubjectAssertion identifies a person within a tenant in the
1426
- * customer's own namespace — typically their user id. Asserting a subject upserts
1427
- * the subject record under the asserted tenant and associates the created resource
1428
- * with it. A subject assertion is only valid alongside a tenant assertion: subject
1429
- * identifiers are scoped to their tenant.
1430
- */
1431
- subject?: WidgetSessionsAPI.SubjectAssertion;
1432
-
1433
- /**
1434
- * Body param: TenantAssertion identifies a tenant in the customer's own namespace
1435
- * — their org, company, or team identifier for an end user. Asserting a tenant
1436
- * upserts the tenant record in the workspace (keyed on `id` as the tenant's
1437
- * external_id) and associates the created resource with it.
1438
- */
1439
- tenant?: WidgetSessionsAPI.TenantAssertion;
1440
-
1441
- /**
1442
- * Body param: Optional explicit variation selection. Overrides the agent's
1443
- * variation_selection_mode.
1444
- */
1445
- variationId?: string;
1446
- }
1447
-
1448
- export namespace ObjectiveCreateParams {
1449
- /**
1450
- * Episodic is used to configure the episodic memory for the objective
1451
- */
1452
- export interface EpisodicMemory {
1453
- /**
1454
- * The caller-supplied episodic key. Objectives created with the same key (for the
1455
- * same agent) share one episodic memory layer.
1456
- */
1457
- key: string;
1458
- }
1459
-
1460
- export interface Secret {
1461
- name?: string;
1462
-
1463
- value?: string;
1464
- }
1465
- }
1466
-
1467
- export interface ObjectiveRetrieveParams {
1468
- workspaceId?: string;
1469
- }
1470
-
1471
- export interface ObjectiveListParams extends CursorPaginationParams {
1472
- /**
1473
- * Path param
1474
- */
1475
- workspaceId?: string;
1476
-
1477
- /**
1478
- * Query param: Agent ID for filtering
1479
- */
1480
- agentId?: string;
1481
-
1482
- /**
1483
- * Query param: Filter to objectives produced by a specific AgentSchedule. Accepts
1484
- * canonical as\_… form or external_id:<value> form.
1485
- */
1486
- agentScheduleId?: string;
1487
-
1488
- /**
1489
- * Query param: When set to true you may use more of your alloted API rate-limit
1490
- */
1491
- includeInfo?: boolean;
1492
-
1493
- /**
1494
- * Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
1495
- * "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
1496
- * semantics).
1497
- */
1498
- labels?: string;
1499
-
1500
- /**
1501
- * Query param: Optional filters
1502
- */
1503
- parentObjectiveId?: string;
1504
-
1505
- /**
1506
- * Query param
1507
- */
1508
- profileId?: string;
1509
-
1510
- /**
1511
- * Query param: Sort order for results (asc or desc by creation time)
1512
- */
1513
- sortOrder?: string;
1514
-
1515
- /**
1516
- * Query param: Filter by state
1517
- */
1518
- state?:
1519
- | 'STATE_UNSPECIFIED'
1520
- | 'STATE_PENDING'
1521
- | 'STATE_RUNNING'
1522
- | 'STATE_WAITING'
1523
- | 'STATE_FAILED'
1524
- | 'STATE_CANCELLED'
1525
- | 'STATE_FINALIZED'
1526
- | 'STATE_TIMED_OUT';
1527
-
1528
- /**
1529
- * Query param: Filter to objectives associated with a subject. Accepts the
1530
- * canonical `subj_…` form or the `external_id:<value>` form; the external_id form
1531
- * is scoped within a tenant and requires `tenant_id` to also be set.
1532
- */
1533
- subjectId?: string;
1534
-
1535
- /**
1536
- * Query param: Filter to objectives associated with a tenant. Accepts the
1537
- * canonical `tenant_…` form or the `external_id:<value>` form.
1538
- */
1539
- tenantId?: string;
1540
-
1541
- /**
1542
- * Query param: Filter to objectives whose conversation ran through a widget.
1543
- * Accepts the canonical `wgt_…` form or the `external_id:<value>` form.
1544
- */
1545
- widgetId?: string;
1546
-
1547
- /**
1548
- * Query param: Filter to objectives created by a specific widget session.
1549
- */
1550
- widgetSessionId?: string;
1551
- }
1552
-
1553
- export interface ObjectiveCancelParams {
1554
- /**
1555
- * Path param
1556
- */
1557
- workspaceId?: string;
1558
-
1559
- /**
1560
- * Body param: Optional reason for cancellation
1561
- */
1562
- reason?: string;
1563
- }
1564
-
1565
- export interface ObjectiveCompactParams {
1566
- /**
1567
- * Path param
1568
- */
1569
- workspaceId?: string;
1570
-
1571
- /**
1572
- * Body param: CompactionConfig defines how context window compaction behaves for
1573
- * objectives using this variation.
1574
- */
1575
- compactionConfig?: VariationsAPI.AgentVariationSpecCompactionConfig;
1576
- }
1577
-
1578
- export interface ObjectiveContinueParams {
1579
- /**
1580
- * Path param
1581
- */
1582
- workspaceId?: string;
1583
-
1584
- /**
1585
- * Body param: The message to continue an objective that has completed (or you are
1586
- * enqueing)
1587
- */
1588
- message: string;
1589
-
1590
- /**
1591
- * Body param: When set to true, the message will be enqueued for when the agent
1592
- * loop is available to process it.
1593
- */
1594
- enqueue?: boolean;
1595
- }
1596
-
1597
- export interface ObjectiveListContextWindowsParams extends CursorPaginationParams {
1598
- /**
1599
- * Path param
1600
- */
1601
- workspaceId?: string;
1602
-
1603
- /**
1604
- * Query param: When set to true you may use more of your alloted API rate-limit
1605
- */
1606
- includeInfo?: boolean;
1607
-
1608
- /**
1609
- * Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
1610
- * "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
1611
- * semantics).
1612
- */
1613
- labels?: string;
1614
- }
1615
-
1616
- export interface ObjectiveListEventsParams extends CursorPaginationParams {
1617
- /**
1618
- * Path param
1619
- */
1620
- workspaceId?: string;
1621
-
1622
- /**
1623
- * Query param: When set to true you may use more of your alloted API rate-limit
1624
- */
1625
- includeInfo?: boolean;
1626
-
1627
- /**
1628
- * Query param: Filters by metadata labels. Comma-separated key=value pairs, e.g.
1629
- * "env=prod,team=ai". A resource matches only if every pair matches exactly (AND
1630
- * semantics).
1631
- */
1632
- labels?: string;
1633
-
1634
- /**
1635
- * Query param: Optional string to fetch events since an ID
1636
- */
1637
- sinceEventId?: string;
1638
-
1639
- /**
1640
- * Query param: Sort order for results (asc or desc by creation time)
1641
- */
1642
- sortOrder?: string;
1643
-
1644
- /**
1645
- * Query param: Optional context window ID to filter events by
1646
- */
1647
- windowId?: string;
1648
- }
1649
-
1650
- export interface ObjectiveRetrieveDiagnosticsParams {
1651
- workspaceId?: string;
1652
- }
1653
-
1654
- export interface ObjectiveStreamEventsParams {
1655
- workspaceId?: string;
1656
- }
1657
-
1658
- Objectives.Tools = Tools;
1659
- Objectives.ToolCalls = ToolCalls;
1660
- Objectives.Tasks = Tasks;
1661
- Objectives.Feedback = Feedback;
1662
-
1663
- export declare namespace Objectives {
1664
- export {
1665
- type AssistantMessage as AssistantMessage,
1666
- type AssistantToolCall as AssistantToolCall,
1667
- type CallableTool as CallableTool,
1668
- type CallableToolAgent as CallableToolAgent,
1669
- type CallableToolCadenyaProvidedTool as CallableToolCadenyaProvidedTool,
1670
- type CallableToolTool as CallableToolTool,
1671
- type ContextLengths as ContextLengths,
1672
- type ContextWindowCompacted as ContextWindowCompacted,
1673
- type MemoryRead as MemoryRead,
1674
- type MemoryReference as MemoryReference,
1675
- type Objective as Objective,
1676
- type ObjectiveConfigSnapshot as ObjectiveConfigSnapshot,
1677
- type ObjectiveContextWindow as ObjectiveContextWindow,
1678
- type ObjectiveContextWindowData as ObjectiveContextWindowData,
1679
- type ObjectiveDiagnostics as ObjectiveDiagnostics,
1680
- type ObjectiveError as ObjectiveError,
1681
- type ObjectiveEvent as ObjectiveEvent,
1682
- type ObjectiveEventData as ObjectiveEventData,
1683
- type ObjectiveEventDataAssistantMessage as ObjectiveEventDataAssistantMessage,
1684
- type ObjectiveEventDataCancelled as ObjectiveEventDataCancelled,
1685
- type ObjectiveEventDataContextWindowCompacted as ObjectiveEventDataContextWindowCompacted,
1686
- type ObjectiveEventDataError as ObjectiveEventDataError,
1687
- type ObjectiveEventDataFinalized as ObjectiveEventDataFinalized,
1688
- type ObjectiveEventDataMemoryRead as ObjectiveEventDataMemoryRead,
1689
- type ObjectiveEventDataNotice as ObjectiveEventDataNotice,
1690
- type ObjectiveEventDataReasoning as ObjectiveEventDataReasoning,
1691
- type ObjectiveEventDataSubAgentSpawned as ObjectiveEventDataSubAgentSpawned,
1692
- type ObjectiveEventDataSubAgentUpdated as ObjectiveEventDataSubAgentUpdated,
1693
- type ObjectiveEventDataTimedOut as ObjectiveEventDataTimedOut,
1694
- type ObjectiveEventDataToolApprovalRequested as ObjectiveEventDataToolApprovalRequested,
1695
- type ObjectiveEventDataToolApproved as ObjectiveEventDataToolApproved,
1696
- type ObjectiveEventDataToolCalled as ObjectiveEventDataToolCalled,
1697
- type ObjectiveEventDataToolDenied as ObjectiveEventDataToolDenied,
1698
- type ObjectiveEventDataToolError as ObjectiveEventDataToolError,
1699
- type ObjectiveEventDataToolResult as ObjectiveEventDataToolResult,
1700
- type ObjectiveEventDataUserMessage as ObjectiveEventDataUserMessage,
1701
- type ObjectiveEventInfo as ObjectiveEventInfo,
1702
- type ObjectiveEventWebhookData as ObjectiveEventWebhookData,
1703
- type ObjectiveInfo as ObjectiveInfo,
1704
- type ObjectiveSecret as ObjectiveSecret,
1705
- type Reasoning as Reasoning,
1706
- type SubAgentSpawned as SubAgentSpawned,
1707
- type SubAgentUpdated as SubAgentUpdated,
1708
- type ToolApprovalRequested as ToolApprovalRequested,
1709
- type ToolApproved as ToolApproved,
1710
- type ToolCalled as ToolCalled,
1711
- type ToolDenied as ToolDenied,
1712
- type ToolError as ToolError,
1713
- type ToolResult as ToolResult,
1714
- type UserMessage as UserMessage,
1715
- type ObjectiveCompactResponse as ObjectiveCompactResponse,
1716
- type ObjectiveRetrieveDiagnosticsResponse as ObjectiveRetrieveDiagnosticsResponse,
1717
- type ObjectivesCursorPagination as ObjectivesCursorPagination,
1718
- type ObjectiveContextWindowsCursorPagination as ObjectiveContextWindowsCursorPagination,
1719
- type ObjectiveEventsCursorPagination as ObjectiveEventsCursorPagination,
1720
- type ObjectiveCreateParams as ObjectiveCreateParams,
1721
- type ObjectiveRetrieveParams as ObjectiveRetrieveParams,
1722
- type ObjectiveListParams as ObjectiveListParams,
1723
- type ObjectiveCancelParams as ObjectiveCancelParams,
1724
- type ObjectiveCompactParams as ObjectiveCompactParams,
1725
- type ObjectiveContinueParams as ObjectiveContinueParams,
1726
- type ObjectiveListContextWindowsParams as ObjectiveListContextWindowsParams,
1727
- type ObjectiveListEventsParams as ObjectiveListEventsParams,
1728
- type ObjectiveRetrieveDiagnosticsParams as ObjectiveRetrieveDiagnosticsParams,
1729
- type ObjectiveStreamEventsParams as ObjectiveStreamEventsParams,
1730
- };
1731
-
1732
- export {
1733
- Tools as Tools,
1734
- type ObjectiveTool as ObjectiveTool,
1735
- type ObjectiveToolsCursorPagination as ObjectiveToolsCursorPagination,
1736
- type ToolListParams as ToolListParams,
1737
- };
1738
-
1739
- export {
1740
- ToolCalls as ToolCalls,
1741
- type ObjectiveToolCall as ObjectiveToolCall,
1742
- type ObjectiveToolCallData as ObjectiveToolCallData,
1743
- type ObjectiveToolCallInfo as ObjectiveToolCallInfo,
1744
- type ObjectiveToolCallResult as ObjectiveToolCallResult,
1745
- type ObjectiveToolCallResultAudioBlock as ObjectiveToolCallResultAudioBlock,
1746
- type ObjectiveToolCallResultContentBlock as ObjectiveToolCallResultContentBlock,
1747
- type ObjectiveToolCallResultContentBlockAudio as ObjectiveToolCallResultContentBlockAudio,
1748
- type ObjectiveToolCallResultContentBlockImage as ObjectiveToolCallResultContentBlockImage,
1749
- type ObjectiveToolCallResultContentBlockText as ObjectiveToolCallResultContentBlockText,
1750
- type ObjectiveToolCallResultImageBlock as ObjectiveToolCallResultImageBlock,
1751
- type ObjectiveToolCallResultTextBlock as ObjectiveToolCallResultTextBlock,
1752
- type ObjectiveToolCallWithResult as ObjectiveToolCallWithResult,
1753
- type ResolvedSecret as ResolvedSecret,
1754
- type SetToolCallContentRequestAudioBlock as SetToolCallContentRequestAudioBlock,
1755
- type SetToolCallContentRequestContentBlock as SetToolCallContentRequestContentBlock,
1756
- type SetToolCallContentRequestContentBlockAudio as SetToolCallContentRequestContentBlockAudio,
1757
- type SetToolCallContentRequestContentBlockImage as SetToolCallContentRequestContentBlockImage,
1758
- type SetToolCallContentRequestContentBlockText as SetToolCallContentRequestContentBlockText,
1759
- type SetToolCallContentRequestImageBlock as SetToolCallContentRequestImageBlock,
1760
- type SetToolCallContentRequestTextBlock as SetToolCallContentRequestTextBlock,
1761
- type ObjectiveToolCallsCursorPagination as ObjectiveToolCallsCursorPagination,
1762
- type ToolCallRetrieveParams as ToolCallRetrieveParams,
1763
- type ToolCallListParams as ToolCallListParams,
1764
- type ToolCallApproveParams as ToolCallApproveParams,
1765
- type ToolCallDenyParams as ToolCallDenyParams,
1766
- type ToolCallSetContentParams as ToolCallSetContentParams,
1767
- };
1768
-
1769
- export {
1770
- Tasks as Tasks,
1771
- type ObjectiveTask as ObjectiveTask,
1772
- type ObjectiveTaskData as ObjectiveTaskData,
1773
- type ObjectiveTasksCursorPagination as ObjectiveTasksCursorPagination,
1774
- type TaskRetrieveParams as TaskRetrieveParams,
1775
- type TaskListParams as TaskListParams,
1776
- };
1777
-
1778
- export {
1779
- Feedback as Feedback,
1780
- type ObjectiveFeedback as ObjectiveFeedback,
1781
- type ObjectiveFeedbackData as ObjectiveFeedbackData,
1782
- type ObjectiveFeedbackInfo as ObjectiveFeedbackInfo,
1783
- type ObjectiveFeedbacksCursorPagination as ObjectiveFeedbacksCursorPagination,
1784
- type FeedbackCreateParams as FeedbackCreateParams,
1785
- type FeedbackListParams as FeedbackListParams,
1786
- };
1787
- }