@cadenya/cadenya 0.134.0 → 1.0.0

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