@cadenya/cadenya 0.135.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 -1532
  129. package/src/core/error.ts +50 -109
  130. package/src/core/http.ts +639 -0
  131. package/src/core/pagination.ts +16 -150
  132. package/src/core/sse.ts +338 -0
  133. package/src/core/webhooks.ts +141 -0
  134. package/src/index.ts +35 -20
  135. package/src/resources/accounts.ts +50 -0
  136. package/src/resources/agent-schedules.ts +251 -0
  137. package/src/resources/agent-variations.ts +312 -0
  138. package/src/resources/agents.ts +411 -1
  139. package/src/resources/ai-provider-keys.ts +119 -309
  140. package/src/resources/api-keys.ts +219 -276
  141. package/src/resources/memory-entries.ts +163 -0
  142. package/src/resources/memory-layers.ts +181 -1
  143. package/src/resources/models.ts +125 -372
  144. package/src/resources/objectives.ts +764 -1
  145. package/src/resources/profiles.ts +17 -13
  146. package/src/resources/tenants.ts +168 -1
  147. package/src/resources/tool-search.ts +36 -0
  148. package/src/resources/tool-set-secrets.ts +169 -0
  149. package/src/resources/tool-sets.ts +355 -1
  150. package/src/resources/tools.ts +235 -0
  151. package/src/resources/uploads.ts +42 -127
  152. package/src/resources/widget-sessions.ts +148 -437
  153. package/src/resources/widgets.ts +155 -247
  154. package/src/resources/workspace-admin.ts +281 -1
  155. package/src/resources/workspace-secrets.ts +121 -159
  156. package/src/resources/workspaces.ts +32 -75
  157. package/src/types.ts +5188 -0
  158. package/src/webhooks.ts +107 -0
  159. package/CHANGELOG.md +0 -1542
  160. package/api-promise.d.mts +0 -3
  161. package/api-promise.d.mts.map +0 -1
  162. package/api-promise.d.ts +0 -3
  163. package/api-promise.d.ts.map +0 -1
  164. package/api-promise.js +0 -6
  165. package/api-promise.js.map +0 -1
  166. package/api-promise.mjs +0 -3
  167. package/api-promise.mjs.map +0 -1
  168. package/client.d.mts +0 -335
  169. package/client.d.mts.map +0 -1
  170. package/client.d.ts +0 -335
  171. package/client.d.ts.map +0 -1
  172. package/client.js +0 -630
  173. package/client.js.map +0 -1
  174. package/client.mjs +0 -626
  175. package/client.mjs.map +0 -1
  176. package/core/api-promise.d.mts +0 -46
  177. package/core/api-promise.d.mts.map +0 -1
  178. package/core/api-promise.d.ts +0 -46
  179. package/core/api-promise.d.ts.map +0 -1
  180. package/core/api-promise.js +0 -73
  181. package/core/api-promise.js.map +0 -1
  182. package/core/api-promise.mjs +0 -69
  183. package/core/api-promise.mjs.map +0 -1
  184. package/core/error.d.mts +0 -46
  185. package/core/error.d.mts.map +0 -1
  186. package/core/error.d.ts +0 -46
  187. package/core/error.d.ts.map +0 -1
  188. package/core/error.js +0 -112
  189. package/core/error.js.map +0 -1
  190. package/core/error.mjs +0 -96
  191. package/core/error.mjs.map +0 -1
  192. package/core/pagination.d.mts +0 -59
  193. package/core/pagination.d.mts.map +0 -1
  194. package/core/pagination.d.ts +0 -59
  195. package/core/pagination.d.ts.map +0 -1
  196. package/core/pagination.js +0 -100
  197. package/core/pagination.js.map +0 -1
  198. package/core/pagination.mjs +0 -94
  199. package/core/pagination.mjs.map +0 -1
  200. package/core/resource.d.mts +0 -6
  201. package/core/resource.d.mts.map +0 -1
  202. package/core/resource.d.ts +0 -6
  203. package/core/resource.d.ts.map +0 -1
  204. package/core/resource.js +0 -10
  205. package/core/resource.js.map +0 -1
  206. package/core/resource.mjs +0 -6
  207. package/core/resource.mjs.map +0 -1
  208. package/core/streaming.d.mts +0 -33
  209. package/core/streaming.d.mts.map +0 -1
  210. package/core/streaming.d.ts +0 -33
  211. package/core/streaming.d.ts.map +0 -1
  212. package/core/streaming.js +0 -268
  213. package/core/streaming.js.map +0 -1
  214. package/core/streaming.mjs +0 -263
  215. package/core/streaming.mjs.map +0 -1
  216. package/core/uploads.d.mts +0 -3
  217. package/core/uploads.d.mts.map +0 -1
  218. package/core/uploads.d.ts +0 -3
  219. package/core/uploads.d.ts.map +0 -1
  220. package/core/uploads.js +0 -6
  221. package/core/uploads.js.map +0 -1
  222. package/core/uploads.mjs +0 -2
  223. package/core/uploads.mjs.map +0 -1
  224. package/error.d.mts +0 -3
  225. package/error.d.mts.map +0 -1
  226. package/error.d.ts +0 -3
  227. package/error.d.ts.map +0 -1
  228. package/error.js +0 -6
  229. package/error.js.map +0 -1
  230. package/error.mjs +0 -3
  231. package/error.mjs.map +0 -1
  232. package/index.d.mts +0 -7
  233. package/index.d.mts.map +0 -1
  234. package/index.d.ts +0 -7
  235. package/index.d.ts.map +0 -1
  236. package/index.js +0 -31
  237. package/index.js.map +0 -1
  238. package/index.mjs +0 -7
  239. package/index.mjs.map +0 -1
  240. package/internal/builtin-types.d.mts +0 -73
  241. package/internal/builtin-types.d.mts.map +0 -1
  242. package/internal/builtin-types.d.ts +0 -73
  243. package/internal/builtin-types.d.ts.map +0 -1
  244. package/internal/builtin-types.js +0 -3
  245. package/internal/builtin-types.js.map +0 -1
  246. package/internal/builtin-types.mjs +0 -2
  247. package/internal/builtin-types.mjs.map +0 -1
  248. package/internal/decoders/line.d.mts +0 -17
  249. package/internal/decoders/line.d.mts.map +0 -1
  250. package/internal/decoders/line.d.ts +0 -17
  251. package/internal/decoders/line.d.ts.map +0 -1
  252. package/internal/decoders/line.js +0 -113
  253. package/internal/decoders/line.js.map +0 -1
  254. package/internal/decoders/line.mjs +0 -108
  255. package/internal/decoders/line.mjs.map +0 -1
  256. package/internal/detect-platform.d.mts +0 -15
  257. package/internal/detect-platform.d.mts.map +0 -1
  258. package/internal/detect-platform.d.ts +0 -15
  259. package/internal/detect-platform.d.ts.map +0 -1
  260. package/internal/detect-platform.js +0 -161
  261. package/internal/detect-platform.js.map +0 -1
  262. package/internal/detect-platform.mjs +0 -156
  263. package/internal/detect-platform.mjs.map +0 -1
  264. package/internal/errors.d.mts +0 -3
  265. package/internal/errors.d.mts.map +0 -1
  266. package/internal/errors.d.ts +0 -3
  267. package/internal/errors.d.ts.map +0 -1
  268. package/internal/errors.js +0 -40
  269. package/internal/errors.js.map +0 -1
  270. package/internal/errors.mjs +0 -35
  271. package/internal/errors.mjs.map +0 -1
  272. package/internal/headers.d.mts +0 -20
  273. package/internal/headers.d.mts.map +0 -1
  274. package/internal/headers.d.ts +0 -20
  275. package/internal/headers.d.ts.map +0 -1
  276. package/internal/headers.js +0 -78
  277. package/internal/headers.js.map +0 -1
  278. package/internal/headers.mjs +0 -73
  279. package/internal/headers.mjs.map +0 -1
  280. package/internal/parse.d.mts +0 -12
  281. package/internal/parse.d.mts.map +0 -1
  282. package/internal/parse.d.ts +0 -12
  283. package/internal/parse.d.ts.map +0 -1
  284. package/internal/parse.js +0 -49
  285. package/internal/parse.js.map +0 -1
  286. package/internal/parse.mjs +0 -46
  287. package/internal/parse.mjs.map +0 -1
  288. package/internal/qs/formats.d.mts +0 -7
  289. package/internal/qs/formats.d.mts.map +0 -1
  290. package/internal/qs/formats.d.ts +0 -7
  291. package/internal/qs/formats.d.ts.map +0 -1
  292. package/internal/qs/formats.js +0 -13
  293. package/internal/qs/formats.js.map +0 -1
  294. package/internal/qs/formats.mjs +0 -9
  295. package/internal/qs/formats.mjs.map +0 -1
  296. package/internal/qs/index.d.mts +0 -10
  297. package/internal/qs/index.d.mts.map +0 -1
  298. package/internal/qs/index.d.ts +0 -10
  299. package/internal/qs/index.d.ts.map +0 -1
  300. package/internal/qs/index.js +0 -14
  301. package/internal/qs/index.js.map +0 -1
  302. package/internal/qs/index.mjs +0 -10
  303. package/internal/qs/index.mjs.map +0 -1
  304. package/internal/qs/stringify.d.mts +0 -3
  305. package/internal/qs/stringify.d.mts.map +0 -1
  306. package/internal/qs/stringify.d.ts +0 -3
  307. package/internal/qs/stringify.d.ts.map +0 -1
  308. package/internal/qs/stringify.js +0 -277
  309. package/internal/qs/stringify.js.map +0 -1
  310. package/internal/qs/stringify.mjs +0 -274
  311. package/internal/qs/stringify.mjs.map +0 -1
  312. package/internal/qs/types.d.mts +0 -57
  313. package/internal/qs/types.d.mts.map +0 -1
  314. package/internal/qs/types.d.ts +0 -57
  315. package/internal/qs/types.d.ts.map +0 -1
  316. package/internal/qs/types.js +0 -3
  317. package/internal/qs/types.js.map +0 -1
  318. package/internal/qs/types.mjs +0 -2
  319. package/internal/qs/types.mjs.map +0 -1
  320. package/internal/qs/utils.d.mts +0 -15
  321. package/internal/qs/utils.d.mts.map +0 -1
  322. package/internal/qs/utils.d.ts +0 -15
  323. package/internal/qs/utils.d.ts.map +0 -1
  324. package/internal/qs/utils.js +0 -230
  325. package/internal/qs/utils.js.map +0 -1
  326. package/internal/qs/utils.mjs +0 -217
  327. package/internal/qs/utils.mjs.map +0 -1
  328. package/internal/request-options.d.mts +0 -77
  329. package/internal/request-options.d.mts.map +0 -1
  330. package/internal/request-options.d.ts +0 -77
  331. package/internal/request-options.d.ts.map +0 -1
  332. package/internal/request-options.js +0 -13
  333. package/internal/request-options.js.map +0 -1
  334. package/internal/request-options.mjs +0 -9
  335. package/internal/request-options.mjs.map +0 -1
  336. package/internal/shim-types.d.mts +0 -17
  337. package/internal/shim-types.d.mts.map +0 -1
  338. package/internal/shim-types.d.ts +0 -17
  339. package/internal/shim-types.d.ts.map +0 -1
  340. package/internal/shim-types.js +0 -9
  341. package/internal/shim-types.js.map +0 -1
  342. package/internal/shim-types.mjs +0 -8
  343. package/internal/shim-types.mjs.map +0 -1
  344. package/internal/shims.d.mts +0 -26
  345. package/internal/shims.d.mts.map +0 -1
  346. package/internal/shims.d.ts +0 -26
  347. package/internal/shims.d.ts.map +0 -1
  348. package/internal/shims.js +0 -97
  349. package/internal/shims.js.map +0 -1
  350. package/internal/shims.mjs +0 -90
  351. package/internal/shims.mjs.map +0 -1
  352. package/internal/to-file.d.mts +0 -45
  353. package/internal/to-file.d.mts.map +0 -1
  354. package/internal/to-file.d.ts +0 -45
  355. package/internal/to-file.d.ts.map +0 -1
  356. package/internal/to-file.js +0 -91
  357. package/internal/to-file.js.map +0 -1
  358. package/internal/to-file.mjs +0 -88
  359. package/internal/to-file.mjs.map +0 -1
  360. package/internal/tslib.js +0 -81
  361. package/internal/tslib.mjs +0 -17
  362. package/internal/types.d.mts +0 -69
  363. package/internal/types.d.mts.map +0 -1
  364. package/internal/types.d.ts +0 -69
  365. package/internal/types.d.ts.map +0 -1
  366. package/internal/types.js +0 -3
  367. package/internal/types.js.map +0 -1
  368. package/internal/types.mjs +0 -2
  369. package/internal/types.mjs.map +0 -1
  370. package/internal/uploads.d.mts +0 -42
  371. package/internal/uploads.d.mts.map +0 -1
  372. package/internal/uploads.d.ts +0 -42
  373. package/internal/uploads.d.ts.map +0 -1
  374. package/internal/uploads.js +0 -141
  375. package/internal/uploads.js.map +0 -1
  376. package/internal/uploads.mjs +0 -131
  377. package/internal/uploads.mjs.map +0 -1
  378. package/internal/utils/base64.d.mts +0 -3
  379. package/internal/utils/base64.d.mts.map +0 -1
  380. package/internal/utils/base64.d.ts +0 -3
  381. package/internal/utils/base64.d.ts.map +0 -1
  382. package/internal/utils/base64.js +0 -37
  383. package/internal/utils/base64.js.map +0 -1
  384. package/internal/utils/base64.mjs +0 -32
  385. package/internal/utils/base64.mjs.map +0 -1
  386. package/internal/utils/bytes.d.mts +0 -4
  387. package/internal/utils/bytes.d.mts.map +0 -1
  388. package/internal/utils/bytes.d.ts +0 -4
  389. package/internal/utils/bytes.d.ts.map +0 -1
  390. package/internal/utils/bytes.js +0 -31
  391. package/internal/utils/bytes.js.map +0 -1
  392. package/internal/utils/bytes.mjs +0 -26
  393. package/internal/utils/bytes.mjs.map +0 -1
  394. package/internal/utils/env.d.mts +0 -9
  395. package/internal/utils/env.d.mts.map +0 -1
  396. package/internal/utils/env.d.ts +0 -9
  397. package/internal/utils/env.d.ts.map +0 -1
  398. package/internal/utils/env.js +0 -21
  399. package/internal/utils/env.js.map +0 -1
  400. package/internal/utils/env.mjs +0 -17
  401. package/internal/utils/env.mjs.map +0 -1
  402. package/internal/utils/log.d.mts +0 -37
  403. package/internal/utils/log.d.mts.map +0 -1
  404. package/internal/utils/log.d.ts +0 -37
  405. package/internal/utils/log.d.ts.map +0 -1
  406. package/internal/utils/log.js +0 -86
  407. package/internal/utils/log.js.map +0 -1
  408. package/internal/utils/log.mjs +0 -80
  409. package/internal/utils/log.mjs.map +0 -1
  410. package/internal/utils/path.d.mts +0 -15
  411. package/internal/utils/path.d.mts.map +0 -1
  412. package/internal/utils/path.d.ts +0 -15
  413. package/internal/utils/path.d.ts.map +0 -1
  414. package/internal/utils/path.js +0 -79
  415. package/internal/utils/path.js.map +0 -1
  416. package/internal/utils/path.mjs +0 -74
  417. package/internal/utils/path.mjs.map +0 -1
  418. package/internal/utils/query.d.mts +0 -2
  419. package/internal/utils/query.d.mts.map +0 -1
  420. package/internal/utils/query.d.ts +0 -2
  421. package/internal/utils/query.d.ts.map +0 -1
  422. package/internal/utils/query.js +0 -9
  423. package/internal/utils/query.js.map +0 -1
  424. package/internal/utils/query.mjs +0 -5
  425. package/internal/utils/query.mjs.map +0 -1
  426. package/internal/utils/sleep.d.mts +0 -2
  427. package/internal/utils/sleep.d.mts.map +0 -1
  428. package/internal/utils/sleep.d.ts +0 -2
  429. package/internal/utils/sleep.d.ts.map +0 -1
  430. package/internal/utils/sleep.js +0 -6
  431. package/internal/utils/sleep.js.map +0 -1
  432. package/internal/utils/sleep.mjs +0 -2
  433. package/internal/utils/sleep.mjs.map +0 -1
  434. package/internal/utils/uuid.d.mts +0 -5
  435. package/internal/utils/uuid.d.mts.map +0 -1
  436. package/internal/utils/uuid.d.ts +0 -5
  437. package/internal/utils/uuid.d.ts.map +0 -1
  438. package/internal/utils/uuid.js +0 -18
  439. package/internal/utils/uuid.js.map +0 -1
  440. package/internal/utils/uuid.mjs +0 -14
  441. package/internal/utils/uuid.mjs.map +0 -1
  442. package/internal/utils/values.d.mts +0 -18
  443. package/internal/utils/values.d.mts.map +0 -1
  444. package/internal/utils/values.d.ts +0 -18
  445. package/internal/utils/values.d.ts.map +0 -1
  446. package/internal/utils/values.js +0 -111
  447. package/internal/utils/values.js.map +0 -1
  448. package/internal/utils/values.mjs +0 -93
  449. package/internal/utils/values.mjs.map +0 -1
  450. package/internal/utils.d.mts +0 -8
  451. package/internal/utils.d.mts.map +0 -1
  452. package/internal/utils.d.ts +0 -8
  453. package/internal/utils.d.ts.map +0 -1
  454. package/internal/utils.js +0 -11
  455. package/internal/utils.js.map +0 -1
  456. package/internal/utils.mjs +0 -8
  457. package/internal/utils.mjs.map +0 -1
  458. package/pagination.d.mts +0 -3
  459. package/pagination.d.mts.map +0 -1
  460. package/pagination.d.ts +0 -3
  461. package/pagination.d.ts.map +0 -1
  462. package/pagination.js +0 -6
  463. package/pagination.js.map +0 -1
  464. package/pagination.mjs +0 -3
  465. package/pagination.mjs.map +0 -1
  466. package/resource.d.mts +0 -3
  467. package/resource.d.mts.map +0 -1
  468. package/resource.d.ts +0 -3
  469. package/resource.d.ts.map +0 -1
  470. package/resource.js +0 -6
  471. package/resource.js.map +0 -1
  472. package/resource.mjs +0 -3
  473. package/resource.mjs.map +0 -1
  474. package/resources/account.d.mts +0 -124
  475. package/resources/account.d.mts.map +0 -1
  476. package/resources/account.d.ts +0 -124
  477. package/resources/account.d.ts.map +0 -1
  478. package/resources/account.js +0 -32
  479. package/resources/account.js.map +0 -1
  480. package/resources/account.mjs +0 -28
  481. package/resources/account.mjs.map +0 -1
  482. package/resources/agents/agents.d.mts +0 -379
  483. package/resources/agents/agents.d.mts.map +0 -1
  484. package/resources/agents/agents.d.ts +0 -379
  485. package/resources/agents/agents.d.ts.map +0 -1
  486. package/resources/agents/agents.js +0 -191
  487. package/resources/agents/agents.js.map +0 -1
  488. package/resources/agents/agents.mjs +0 -186
  489. package/resources/agents/agents.mjs.map +0 -1
  490. package/resources/agents/feedback.d.mts +0 -71
  491. package/resources/agents/feedback.d.mts.map +0 -1
  492. package/resources/agents/feedback.d.ts +0 -71
  493. package/resources/agents/feedback.d.ts.map +0 -1
  494. package/resources/agents/feedback.js +0 -33
  495. package/resources/agents/feedback.js.map +0 -1
  496. package/resources/agents/feedback.mjs +0 -29
  497. package/resources/agents/feedback.mjs.map +0 -1
  498. package/resources/agents/index.d.mts +0 -6
  499. package/resources/agents/index.d.mts.map +0 -1
  500. package/resources/agents/index.d.ts +0 -6
  501. package/resources/agents/index.d.ts.map +0 -1
  502. package/resources/agents/index.js +0 -14
  503. package/resources/agents/index.js.map +0 -1
  504. package/resources/agents/index.mjs +0 -6
  505. package/resources/agents/index.mjs.map +0 -1
  506. package/resources/agents/schedules.d.mts +0 -383
  507. package/resources/agents/schedules.d.mts.map +0 -1
  508. package/resources/agents/schedules.d.ts +0 -383
  509. package/resources/agents/schedules.d.ts.map +0 -1
  510. package/resources/agents/schedules.js +0 -171
  511. package/resources/agents/schedules.js.map +0 -1
  512. package/resources/agents/schedules.mjs +0 -167
  513. package/resources/agents/schedules.mjs.map +0 -1
  514. package/resources/agents/variations.d.mts +0 -723
  515. package/resources/agents/variations.d.mts.map +0 -1
  516. package/resources/agents/variations.d.ts +0 -723
  517. package/resources/agents/variations.d.ts.map +0 -1
  518. package/resources/agents/variations.js +0 -208
  519. package/resources/agents/variations.js.map +0 -1
  520. package/resources/agents/variations.mjs +0 -204
  521. package/resources/agents/variations.mjs.map +0 -1
  522. package/resources/agents/webhook-deliveries.d.mts +0 -96
  523. package/resources/agents/webhook-deliveries.d.mts.map +0 -1
  524. package/resources/agents/webhook-deliveries.d.ts +0 -96
  525. package/resources/agents/webhook-deliveries.d.ts.map +0 -1
  526. package/resources/agents/webhook-deliveries.js +0 -31
  527. package/resources/agents/webhook-deliveries.js.map +0 -1
  528. package/resources/agents/webhook-deliveries.mjs +0 -27
  529. package/resources/agents/webhook-deliveries.mjs.map +0 -1
  530. package/resources/agents.d.mts +0 -2
  531. package/resources/agents.d.mts.map +0 -1
  532. package/resources/agents.d.ts +0 -2
  533. package/resources/agents.d.ts.map +0 -1
  534. package/resources/agents.js +0 -5
  535. package/resources/agents.js.map +0 -1
  536. package/resources/agents.mjs +0 -2
  537. package/resources/agents.mjs.map +0 -1
  538. package/resources/ai-provider-keys.d.mts +0 -269
  539. package/resources/ai-provider-keys.d.mts.map +0 -1
  540. package/resources/ai-provider-keys.d.ts +0 -269
  541. package/resources/ai-provider-keys.d.ts.map +0 -1
  542. package/resources/ai-provider-keys.js +0 -52
  543. package/resources/ai-provider-keys.js.map +0 -1
  544. package/resources/ai-provider-keys.mjs +0 -48
  545. package/resources/ai-provider-keys.mjs.map +0 -1
  546. package/resources/api-keys.d.mts +0 -268
  547. package/resources/api-keys.d.mts.map +0 -1
  548. package/resources/api-keys.d.ts +0 -268
  549. package/resources/api-keys.d.ts.map +0 -1
  550. package/resources/api-keys.js +0 -83
  551. package/resources/api-keys.js.map +0 -1
  552. package/resources/api-keys.mjs +0 -79
  553. package/resources/api-keys.mjs.map +0 -1
  554. package/resources/global-api-key.d.mts +0 -33
  555. package/resources/global-api-key.d.mts.map +0 -1
  556. package/resources/global-api-key.d.ts +0 -33
  557. package/resources/global-api-key.d.ts.map +0 -1
  558. package/resources/global-api-key.js +0 -42
  559. package/resources/global-api-key.js.map +0 -1
  560. package/resources/global-api-key.mjs +0 -38
  561. package/resources/global-api-key.mjs.map +0 -1
  562. package/resources/index.d.mts +0 -21
  563. package/resources/index.d.mts.map +0 -1
  564. package/resources/index.d.ts +0 -21
  565. package/resources/index.d.ts.map +0 -1
  566. package/resources/index.js +0 -44
  567. package/resources/index.js.map +0 -1
  568. package/resources/index.mjs +0 -21
  569. package/resources/index.mjs.map +0 -1
  570. package/resources/memory-layers/entries.d.mts +0 -257
  571. package/resources/memory-layers/entries.d.mts.map +0 -1
  572. package/resources/memory-layers/entries.d.ts +0 -257
  573. package/resources/memory-layers/entries.d.ts.map +0 -1
  574. package/resources/memory-layers/entries.js +0 -58
  575. package/resources/memory-layers/entries.js.map +0 -1
  576. package/resources/memory-layers/entries.mjs +0 -54
  577. package/resources/memory-layers/entries.mjs.map +0 -1
  578. package/resources/memory-layers/index.d.mts +0 -3
  579. package/resources/memory-layers/index.d.mts.map +0 -1
  580. package/resources/memory-layers/index.d.ts +0 -3
  581. package/resources/memory-layers/index.d.ts.map +0 -1
  582. package/resources/memory-layers/index.js +0 -8
  583. package/resources/memory-layers/index.js.map +0 -1
  584. package/resources/memory-layers/index.mjs +0 -3
  585. package/resources/memory-layers/index.mjs.map +0 -1
  586. package/resources/memory-layers/memory-layers.d.mts +0 -196
  587. package/resources/memory-layers/memory-layers.d.mts.map +0 -1
  588. package/resources/memory-layers/memory-layers.d.ts +0 -196
  589. package/resources/memory-layers/memory-layers.d.ts.map +0 -1
  590. package/resources/memory-layers/memory-layers.js +0 -63
  591. package/resources/memory-layers/memory-layers.js.map +0 -1
  592. package/resources/memory-layers/memory-layers.mjs +0 -58
  593. package/resources/memory-layers/memory-layers.mjs.map +0 -1
  594. package/resources/memory-layers.d.mts +0 -2
  595. package/resources/memory-layers.d.mts.map +0 -1
  596. package/resources/memory-layers.d.ts +0 -2
  597. package/resources/memory-layers.d.ts.map +0 -1
  598. package/resources/memory-layers.js +0 -5
  599. package/resources/memory-layers.js.map +0 -1
  600. package/resources/memory-layers.mjs +0 -2
  601. package/resources/memory-layers.mjs.map +0 -1
  602. package/resources/models.d.mts +0 -315
  603. package/resources/models.d.mts.map +0 -1
  604. package/resources/models.d.ts +0 -315
  605. package/resources/models.d.ts.map +0 -1
  606. package/resources/models.js +0 -59
  607. package/resources/models.js.map +0 -1
  608. package/resources/models.mjs +0 -55
  609. package/resources/models.mjs.map +0 -1
  610. package/resources/objectives/feedback.d.mts +0 -126
  611. package/resources/objectives/feedback.d.mts.map +0 -1
  612. package/resources/objectives/feedback.d.ts +0 -126
  613. package/resources/objectives/feedback.d.ts.map +0 -1
  614. package/resources/objectives/feedback.js +0 -52
  615. package/resources/objectives/feedback.js.map +0 -1
  616. package/resources/objectives/feedback.mjs +0 -48
  617. package/resources/objectives/feedback.mjs.map +0 -1
  618. package/resources/objectives/index.d.mts +0 -6
  619. package/resources/objectives/index.d.mts.map +0 -1
  620. package/resources/objectives/index.d.ts +0 -6
  621. package/resources/objectives/index.d.ts.map +0 -1
  622. package/resources/objectives/index.js +0 -14
  623. package/resources/objectives/index.js.map +0 -1
  624. package/resources/objectives/index.mjs +0 -6
  625. package/resources/objectives/index.mjs.map +0 -1
  626. package/resources/objectives/objectives.d.mts +0 -1280
  627. package/resources/objectives/objectives.d.mts.map +0 -1
  628. package/resources/objectives/objectives.d.ts +0 -1280
  629. package/resources/objectives/objectives.d.ts.map +0 -1
  630. package/resources/objectives/objectives.js +0 -213
  631. package/resources/objectives/objectives.js.map +0 -1
  632. package/resources/objectives/objectives.mjs +0 -208
  633. package/resources/objectives/objectives.mjs.map +0 -1
  634. package/resources/objectives/tasks.d.mts +0 -88
  635. package/resources/objectives/tasks.d.mts.map +0 -1
  636. package/resources/objectives/tasks.d.ts +0 -88
  637. package/resources/objectives/tasks.d.ts.map +0 -1
  638. package/resources/objectives/tasks.js +0 -45
  639. package/resources/objectives/tasks.js.map +0 -1
  640. package/resources/objectives/tasks.mjs +0 -41
  641. package/resources/objectives/tasks.mjs.map +0 -1
  642. package/resources/objectives/tool-calls.d.mts +0 -379
  643. package/resources/objectives/tool-calls.d.mts.map +0 -1
  644. package/resources/objectives/tool-calls.d.ts +0 -379
  645. package/resources/objectives/tool-calls.d.ts.map +0 -1
  646. package/resources/objectives/tool-calls.js +0 -110
  647. package/resources/objectives/tool-calls.js.map +0 -1
  648. package/resources/objectives/tool-calls.mjs +0 -106
  649. package/resources/objectives/tool-calls.mjs.map +0 -1
  650. package/resources/objectives/tools.d.mts +0 -53
  651. package/resources/objectives/tools.d.mts.map +0 -1
  652. package/resources/objectives/tools.d.ts +0 -53
  653. package/resources/objectives/tools.d.ts.map +0 -1
  654. package/resources/objectives/tools.js +0 -28
  655. package/resources/objectives/tools.js.map +0 -1
  656. package/resources/objectives/tools.mjs +0 -24
  657. package/resources/objectives/tools.mjs.map +0 -1
  658. package/resources/objectives.d.mts +0 -2
  659. package/resources/objectives.d.mts.map +0 -1
  660. package/resources/objectives.d.ts +0 -2
  661. package/resources/objectives.d.ts.map +0 -1
  662. package/resources/objectives.js +0 -5
  663. package/resources/objectives.js.map +0 -1
  664. package/resources/objectives.mjs +0 -2
  665. package/resources/objectives.mjs.map +0 -1
  666. package/resources/profiles.d.mts +0 -16
  667. package/resources/profiles.d.mts.map +0 -1
  668. package/resources/profiles.d.ts +0 -16
  669. package/resources/profiles.d.ts.map +0 -1
  670. package/resources/profiles.js +0 -19
  671. package/resources/profiles.js.map +0 -1
  672. package/resources/profiles.mjs +0 -15
  673. package/resources/profiles.mjs.map +0 -1
  674. package/resources/search.d.mts +0 -33
  675. package/resources/search.d.mts.map +0 -1
  676. package/resources/search.d.ts +0 -33
  677. package/resources/search.d.ts.map +0 -1
  678. package/resources/search.js +0 -19
  679. package/resources/search.js.map +0 -1
  680. package/resources/search.mjs +0 -15
  681. package/resources/search.mjs.map +0 -1
  682. package/resources/shared.d.mts +0 -215
  683. package/resources/shared.d.mts.map +0 -1
  684. package/resources/shared.d.ts +0 -215
  685. package/resources/shared.d.ts.map +0 -1
  686. package/resources/shared.js +0 -3
  687. package/resources/shared.js.map +0 -1
  688. package/resources/shared.mjs +0 -2
  689. package/resources/shared.mjs.map +0 -1
  690. package/resources/tenants/index.d.mts +0 -3
  691. package/resources/tenants/index.d.mts.map +0 -1
  692. package/resources/tenants/index.d.ts +0 -3
  693. package/resources/tenants/index.d.ts.map +0 -1
  694. package/resources/tenants/index.js +0 -8
  695. package/resources/tenants/index.js.map +0 -1
  696. package/resources/tenants/index.mjs +0 -3
  697. package/resources/tenants/index.mjs.map +0 -1
  698. package/resources/tenants/subjects.d.mts +0 -43
  699. package/resources/tenants/subjects.d.mts.map +0 -1
  700. package/resources/tenants/subjects.d.ts +0 -43
  701. package/resources/tenants/subjects.d.ts.map +0 -1
  702. package/resources/tenants/subjects.js +0 -26
  703. package/resources/tenants/subjects.js.map +0 -1
  704. package/resources/tenants/subjects.mjs +0 -22
  705. package/resources/tenants/subjects.mjs.map +0 -1
  706. package/resources/tenants/tenants.d.mts +0 -158
  707. package/resources/tenants/tenants.d.mts.map +0 -1
  708. package/resources/tenants/tenants.d.ts +0 -158
  709. package/resources/tenants/tenants.d.ts.map +0 -1
  710. package/resources/tenants/tenants.js +0 -57
  711. package/resources/tenants/tenants.js.map +0 -1
  712. package/resources/tenants/tenants.mjs +0 -52
  713. package/resources/tenants/tenants.mjs.map +0 -1
  714. package/resources/tenants.d.mts +0 -2
  715. package/resources/tenants.d.mts.map +0 -1
  716. package/resources/tenants.d.ts +0 -2
  717. package/resources/tenants.d.ts.map +0 -1
  718. package/resources/tenants.js +0 -5
  719. package/resources/tenants.js.map +0 -1
  720. package/resources/tenants.mjs +0 -2
  721. package/resources/tenants.mjs.map +0 -1
  722. package/resources/tool-sets/index.d.mts +0 -4
  723. package/resources/tool-sets/index.d.mts.map +0 -1
  724. package/resources/tool-sets/index.d.ts +0 -4
  725. package/resources/tool-sets/index.d.ts.map +0 -1
  726. package/resources/tool-sets/index.js +0 -10
  727. package/resources/tool-sets/index.js.map +0 -1
  728. package/resources/tool-sets/index.mjs +0 -4
  729. package/resources/tool-sets/index.mjs.map +0 -1
  730. package/resources/tool-sets/secrets.d.mts +0 -135
  731. package/resources/tool-sets/secrets.d.mts.map +0 -1
  732. package/resources/tool-sets/secrets.d.ts +0 -135
  733. package/resources/tool-sets/secrets.d.ts.map +0 -1
  734. package/resources/tool-sets/secrets.js +0 -62
  735. package/resources/tool-sets/secrets.js.map +0 -1
  736. package/resources/tool-sets/secrets.mjs +0 -58
  737. package/resources/tool-sets/secrets.mjs.map +0 -1
  738. package/resources/tool-sets/tool-sets.d.mts +0 -595
  739. package/resources/tool-sets/tool-sets.d.mts.map +0 -1
  740. package/resources/tool-sets/tool-sets.d.ts +0 -595
  741. package/resources/tool-sets/tool-sets.d.ts.map +0 -1
  742. package/resources/tool-sets/tool-sets.js +0 -122
  743. package/resources/tool-sets/tool-sets.js.map +0 -1
  744. package/resources/tool-sets/tool-sets.mjs +0 -117
  745. package/resources/tool-sets/tool-sets.mjs.map +0 -1
  746. package/resources/tool-sets/tools.d.mts +0 -305
  747. package/resources/tool-sets/tools.d.mts.map +0 -1
  748. package/resources/tool-sets/tools.d.ts +0 -305
  749. package/resources/tool-sets/tools.d.ts.map +0 -1
  750. package/resources/tool-sets/tools.js +0 -84
  751. package/resources/tool-sets/tools.js.map +0 -1
  752. package/resources/tool-sets/tools.mjs +0 -80
  753. package/resources/tool-sets/tools.mjs.map +0 -1
  754. package/resources/tool-sets.d.mts +0 -2
  755. package/resources/tool-sets.d.mts.map +0 -1
  756. package/resources/tool-sets.d.ts +0 -2
  757. package/resources/tool-sets.d.ts.map +0 -1
  758. package/resources/tool-sets.js +0 -5
  759. package/resources/tool-sets.js.map +0 -1
  760. package/resources/tool-sets.mjs +0 -2
  761. package/resources/tool-sets.mjs.map +0 -1
  762. package/resources/uploads.d.mts +0 -107
  763. package/resources/uploads.d.mts.map +0 -1
  764. package/resources/uploads.d.ts +0 -107
  765. package/resources/uploads.d.ts.map +0 -1
  766. package/resources/uploads.js +0 -30
  767. package/resources/uploads.js.map +0 -1
  768. package/resources/uploads.mjs +0 -26
  769. package/resources/uploads.mjs.map +0 -1
  770. package/resources/webhooks.d.mts +0 -92
  771. package/resources/webhooks.d.mts.map +0 -1
  772. package/resources/webhooks.d.ts +0 -92
  773. package/resources/webhooks.d.ts.map +0 -1
  774. package/resources/webhooks.js +0 -22
  775. package/resources/webhooks.js.map +0 -1
  776. package/resources/webhooks.mjs +0 -18
  777. package/resources/webhooks.mjs.map +0 -1
  778. package/resources/widget-sessions.d.mts +0 -388
  779. package/resources/widget-sessions.d.mts.map +0 -1
  780. package/resources/widget-sessions.d.ts +0 -388
  781. package/resources/widget-sessions.d.ts.map +0 -1
  782. package/resources/widget-sessions.js +0 -78
  783. package/resources/widget-sessions.js.map +0 -1
  784. package/resources/widget-sessions.mjs +0 -74
  785. package/resources/widget-sessions.mjs.map +0 -1
  786. package/resources/widgets.d.mts +0 -225
  787. package/resources/widgets.d.mts.map +0 -1
  788. package/resources/widgets.d.ts +0 -225
  789. package/resources/widgets.d.ts.map +0 -1
  790. package/resources/widgets.js +0 -82
  791. package/resources/widgets.js.map +0 -1
  792. package/resources/widgets.mjs +0 -78
  793. package/resources/widgets.mjs.map +0 -1
  794. package/resources/workspace-admin/index.d.mts +0 -4
  795. package/resources/workspace-admin/index.d.mts.map +0 -1
  796. package/resources/workspace-admin/index.d.ts +0 -4
  797. package/resources/workspace-admin/index.d.ts.map +0 -1
  798. package/resources/workspace-admin/index.js +0 -10
  799. package/resources/workspace-admin/index.js.map +0 -1
  800. package/resources/workspace-admin/index.mjs +0 -4
  801. package/resources/workspace-admin/index.mjs.map +0 -1
  802. package/resources/workspace-admin/members.d.mts +0 -90
  803. package/resources/workspace-admin/members.d.mts.map +0 -1
  804. package/resources/workspace-admin/members.d.ts +0 -90
  805. package/resources/workspace-admin/members.d.ts.map +0 -1
  806. package/resources/workspace-admin/members.js +0 -73
  807. package/resources/workspace-admin/members.js.map +0 -1
  808. package/resources/workspace-admin/members.mjs +0 -69
  809. package/resources/workspace-admin/members.mjs.map +0 -1
  810. package/resources/workspace-admin/profiles.d.mts +0 -46
  811. package/resources/workspace-admin/profiles.d.mts.map +0 -1
  812. package/resources/workspace-admin/profiles.d.ts +0 -46
  813. package/resources/workspace-admin/profiles.d.ts.map +0 -1
  814. package/resources/workspace-admin/profiles.js +0 -35
  815. package/resources/workspace-admin/profiles.js.map +0 -1
  816. package/resources/workspace-admin/profiles.mjs +0 -31
  817. package/resources/workspace-admin/profiles.mjs.map +0 -1
  818. package/resources/workspace-admin/workspace-admin.d.mts +0 -227
  819. package/resources/workspace-admin/workspace-admin.d.mts.map +0 -1
  820. package/resources/workspace-admin/workspace-admin.d.ts +0 -227
  821. package/resources/workspace-admin/workspace-admin.d.ts.map +0 -1
  822. package/resources/workspace-admin/workspace-admin.js +0 -111
  823. package/resources/workspace-admin/workspace-admin.js.map +0 -1
  824. package/resources/workspace-admin/workspace-admin.mjs +0 -106
  825. package/resources/workspace-admin/workspace-admin.mjs.map +0 -1
  826. package/resources/workspace-admin.d.mts +0 -2
  827. package/resources/workspace-admin.d.mts.map +0 -1
  828. package/resources/workspace-admin.d.ts +0 -2
  829. package/resources/workspace-admin.d.ts.map +0 -1
  830. package/resources/workspace-admin.js +0 -5
  831. package/resources/workspace-admin.js.map +0 -1
  832. package/resources/workspace-admin.mjs +0 -2
  833. package/resources/workspace-admin.mjs.map +0 -1
  834. package/resources/workspace-secrets.d.mts +0 -134
  835. package/resources/workspace-secrets.d.mts.map +0 -1
  836. package/resources/workspace-secrets.d.ts +0 -134
  837. package/resources/workspace-secrets.d.ts.map +0 -1
  838. package/resources/workspace-secrets.js +0 -52
  839. package/resources/workspace-secrets.js.map +0 -1
  840. package/resources/workspace-secrets.mjs +0 -48
  841. package/resources/workspace-secrets.mjs.map +0 -1
  842. package/resources/workspaces.d.mts +0 -70
  843. package/resources/workspaces.d.mts.map +0 -1
  844. package/resources/workspaces.d.ts +0 -70
  845. package/resources/workspaces.d.ts.map +0 -1
  846. package/resources/workspaces.js +0 -23
  847. package/resources/workspaces.js.map +0 -1
  848. package/resources/workspaces.mjs +0 -19
  849. package/resources/workspaces.mjs.map +0 -1
  850. package/resources.d.mts +0 -2
  851. package/resources.d.mts.map +0 -1
  852. package/resources.d.ts +0 -2
  853. package/resources.d.ts.map +0 -1
  854. package/resources.js +0 -5
  855. package/resources.js.map +0 -1
  856. package/resources.mjs +0 -2
  857. package/resources.mjs.map +0 -1
  858. package/src/api-promise.ts +0 -2
  859. package/src/core/README.md +0 -3
  860. package/src/core/api-promise.ts +0 -90
  861. package/src/core/resource.ts +0 -9
  862. package/src/core/streaming.ts +0 -319
  863. package/src/core/uploads.ts +0 -2
  864. package/src/error.ts +0 -2
  865. package/src/internal/README.md +0 -3
  866. package/src/internal/builtin-types.ts +0 -91
  867. package/src/internal/decoders/line.ts +0 -135
  868. package/src/internal/detect-platform.ts +0 -194
  869. package/src/internal/errors.ts +0 -31
  870. package/src/internal/headers.ts +0 -95
  871. package/src/internal/parse.ts +0 -68
  872. package/src/internal/qs/LICENSE.md +0 -13
  873. package/src/internal/qs/README.md +0 -3
  874. package/src/internal/qs/formats.ts +0 -10
  875. package/src/internal/qs/index.ts +0 -13
  876. package/src/internal/qs/stringify.ts +0 -385
  877. package/src/internal/qs/types.ts +0 -71
  878. package/src/internal/qs/utils.ts +0 -265
  879. package/src/internal/request-options.ts +0 -91
  880. package/src/internal/shim-types.ts +0 -24
  881. package/src/internal/shims.ts +0 -105
  882. package/src/internal/to-file.ts +0 -154
  883. package/src/internal/types.ts +0 -91
  884. package/src/internal/uploads.ts +0 -187
  885. package/src/internal/utils/base64.ts +0 -38
  886. package/src/internal/utils/bytes.ts +0 -32
  887. package/src/internal/utils/env.ts +0 -16
  888. package/src/internal/utils/log.ts +0 -126
  889. package/src/internal/utils/path.ts +0 -88
  890. package/src/internal/utils/query.ts +0 -5
  891. package/src/internal/utils/sleep.ts +0 -1
  892. package/src/internal/utils/uuid.ts +0 -15
  893. package/src/internal/utils/values.ts +0 -103
  894. package/src/internal/utils.ts +0 -7
  895. package/src/lib/.keep +0 -3
  896. package/src/pagination.ts +0 -2
  897. package/src/resource.ts +0 -2
  898. package/src/resources/account.ts +0 -158
  899. package/src/resources/agents/agents.ts +0 -616
  900. package/src/resources/agents/feedback.ts +0 -96
  901. package/src/resources/agents/index.ts +0 -75
  902. package/src/resources/agents/schedules.ts +0 -541
  903. package/src/resources/agents/variations.ts +0 -981
  904. package/src/resources/agents/webhook-deliveries.ts +0 -176
  905. package/src/resources/global-api-key.ts +0 -44
  906. package/src/resources/index.ts +0 -307
  907. package/src/resources/memory-layers/entries.ts +0 -373
  908. package/src/resources/memory-layers/index.ts +0 -29
  909. package/src/resources/memory-layers/memory-layers.ts +0 -314
  910. package/src/resources/objectives/feedback.ts +0 -171
  911. package/src/resources/objectives/index.ts +0 -115
  912. package/src/resources/objectives/objectives.ts +0 -1787
  913. package/src/resources/objectives/tasks.ts +0 -129
  914. package/src/resources/objectives/tool-calls.ts +0 -572
  915. package/src/resources/objectives/tools.ts +0 -74
  916. package/src/resources/search.ts +0 -52
  917. package/src/resources/shared.ts +0 -234
  918. package/src/resources/tenants/index.ts +0 -13
  919. package/src/resources/tenants/subjects.ts +0 -61
  920. package/src/resources/tenants/tenants.ts +0 -218
  921. package/src/resources/tool-sets/index.ts +0 -87
  922. package/src/resources/tool-sets/secrets.ts +0 -223
  923. package/src/resources/tool-sets/tool-sets.ts +0 -934
  924. package/src/resources/tool-sets/tools.ts +0 -456
  925. package/src/resources/webhooks.ts +0 -122
  926. package/src/resources/workspace-admin/index.ts +0 -12
  927. package/src/resources/workspace-admin/members.ts +0 -131
  928. package/src/resources/workspace-admin/profiles.ts +0 -58
  929. package/src/resources/workspace-admin/workspace-admin.ts +0 -302
  930. package/src/resources.ts +0 -1
  931. package/src/streaming.ts +0 -2
  932. package/src/tsconfig.json +0 -11
  933. package/src/uploads.ts +0 -2
  934. package/src/version.ts +0 -1
  935. package/streaming.d.mts +0 -3
  936. package/streaming.d.mts.map +0 -1
  937. package/streaming.d.ts +0 -3
  938. package/streaming.d.ts.map +0 -1
  939. package/streaming.js +0 -6
  940. package/streaming.js.map +0 -1
  941. package/streaming.mjs +0 -3
  942. package/streaming.mjs.map +0 -1
  943. package/uploads.d.mts +0 -3
  944. package/uploads.d.mts.map +0 -1
  945. package/uploads.d.ts +0 -3
  946. package/uploads.d.ts.map +0 -1
  947. package/uploads.js +0 -6
  948. package/uploads.js.map +0 -1
  949. package/uploads.mjs +0 -3
  950. package/uploads.mjs.map +0 -1
  951. package/version.d.mts +0 -2
  952. package/version.d.mts.map +0 -1
  953. package/version.d.ts +0 -2
  954. package/version.d.ts.map +0 -1
  955. package/version.js +0 -5
  956. package/version.js.map +0 -1
  957. package/version.mjs +0 -2
  958. package/version.mjs.map +0 -1
@@ -0,0 +1,4634 @@
1
+ /**
2
+ * AIProviderConfig holds non-secret, provider-specific settings. The set case
3
+ * must correspond to AIProviderKeySpec.provider. Providers with no settings
4
+ * (Anthropic, Gemini) simply leave this unset. The endpoint of a named provider
5
+ * is fixed and intentionally not overridable here; use the OpenAI-compatible
6
+ * provider to target a custom endpoint.
7
+ */
8
+ export type AIProviderConfig = AIProviderConfig_Openrouter | AIProviderConfig_Openai | AIProviderConfig_OpenaiCompatible;
9
+ /**
10
+ * AIProviderCredential is the secret material used to authenticate with a
11
+ * provider. The set case must correspond to AIProviderKeySpec.provider. The
12
+ * server encrypts the serialized message at rest and never returns it on reads.
13
+ */
14
+ export type AIProviderCredential = AIProviderCredential_ApiKey | AIProviderCredential_Headers;
15
+ /**
16
+ * AIProviderKey is a credential for an AI provider, scoped to a workspace.
17
+ * Most keys are customer-provided (BYOK); Cadenya also provisions promotional
18
+ * keys (see AIProviderKeyInfo.is_promotional), which cannot be modified or
19
+ * deleted by account administrators. The secret value is never returned in
20
+ * responses.
21
+ */
22
+ export interface AIProviderKey {
23
+ metadata: ResourceMetadata;
24
+ spec: AIProviderKeySpec;
25
+ /**
26
+ * Server-populated info (e.g. how many models route through this key).
27
+ * Populated on reads when requested; see ListAIProviderKeysRequest.include_info.
28
+ */
29
+ info?: AIProviderKeyInfo;
30
+ }
31
+ /**
32
+ * AIProviderKeyInfo carries server-derived, read-only details about a key, for
33
+ * AI provider management UIs.
34
+ */
35
+ export interface AIProviderKeyInfo {
36
+ /**
37
+ * Number of enabled models provisioned on this key.
38
+ */
39
+ enabledModelCount: number;
40
+ /**
41
+ * Number of disabled models provisioned on this key.
42
+ */
43
+ disabledModelCount: number;
44
+ /**
45
+ * Cadenya includes promotional keys (one for onboarding, and potentially more in the future).
46
+ * These are not added or maintained by account administrators.
47
+ */
48
+ isPromotional: boolean;
49
+ }
50
+ /**
51
+ * The AI provider this key authenticates against.
52
+ */
53
+ export type AiProviderKeySpecProvider = 'AI_PROVIDER_UNSPECIFIED' | 'AI_PROVIDER_OPENROUTER' | 'AI_PROVIDER_OPENAI' | 'AI_PROVIDER_ANTHROPIC' | 'AI_PROVIDER_GEMINI' | 'AI_PROVIDER_OPENAI_COMPATIBLE';
54
+ export interface AIProviderKeySpec {
55
+ /**
56
+ * The AI provider this key authenticates against.
57
+ */
58
+ provider?: AiProviderKeySpecProvider;
59
+ /**
60
+ * The provider credential. Accepted on create/update; never populated in
61
+ * responses (the server returns an empty value to avoid leaking the secret).
62
+ */
63
+ credentials?: AIProviderCredential;
64
+ /**
65
+ * Non-secret, provider-specific settings (OpenAI org/project, OpenRouter
66
+ * region, OpenAI-compatible base URL). The set case must correspond to
67
+ * `provider`. Returned on reads. Optional: omit to accept provider defaults.
68
+ */
69
+ config?: AIProviderConfig;
70
+ }
71
+ /**
72
+ * The current lifecycle state of the API key. Output only. Keys are
73
+ * created STATE_ENABLED; use the :disable and :enable actions to
74
+ * transition between states.
75
+ */
76
+ export type ApiKeyState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
77
+ /**
78
+ * An API key. Every key belongs to exactly one workspace and is managed via
79
+ * the workspace-scoped API key routes. The only exception is the
80
+ * system-managed global account key, which spans all workspaces and is
81
+ * managed via the account global_api_key routes.
82
+ */
83
+ export interface APIKey {
84
+ metadata: AccountResourceMetadata;
85
+ spec: APIKeySpec;
86
+ info?: APIKeyInfo;
87
+ /**
88
+ * The current lifecycle state of the API key. Output only. Keys are
89
+ * created STATE_ENABLED; use the :disable and :enable actions to
90
+ * transition between states.
91
+ */
92
+ state: ApiKeyState;
93
+ }
94
+ export interface APIKeyInfo {
95
+ /**
96
+ * The profile that created the key.
97
+ */
98
+ createdBy?: Profile;
99
+ }
100
+ /**
101
+ * Configuration for an API key.
102
+ */
103
+ export interface APIKeySpec {
104
+ /**
105
+ * The bearer token used to authenticate as this API key. Returned only on
106
+ * creation and rotation; subsequent reads omit this field.
107
+ */
108
+ token: string;
109
+ /**
110
+ * Free-form description of what this API key is used for.
111
+ */
112
+ description?: string;
113
+ /**
114
+ * Scopes granted to this key. Each entry is a colon-separated
115
+ * resource:verb string (e.g. "objectives:manage").
116
+ *
117
+ * Resources: agents, objectives, tools, memory, api_keys, workspaces,
118
+ * widgets, widget_sessions, secrets, account.
119
+ * Verbs: read and manage, where manage implies read — a stored scope set
120
+ * is normalized to drop "x:read" when "x:manage" is present. The secrets
121
+ * and account resources support only manage. "*" is an explicit
122
+ * full-access grant.
123
+ *
124
+ * Scopes are deny-by-default: a key with an empty list can call only
125
+ * scope-free endpoints. Full access is always an explicit "*" grant.
126
+ */
127
+ permissions?: Array<string>;
128
+ /**
129
+ * True when this key is managed by the system (i.e. the auto-provisioned
130
+ * global account key). System keys cannot be deleted but can be rotated.
131
+ */
132
+ system: boolean;
133
+ }
134
+ /**
135
+ * An account, the top-level organizational unit. Contains workspaces and
136
+ * account-wide settings such as the webhook signing secret.
137
+ */
138
+ export interface Account {
139
+ metadata: AccountResourceMetadata;
140
+ spec: AccountSpec;
141
+ info: AccountInfo;
142
+ }
143
+ /**
144
+ * Server-populated information about the account.
145
+ */
146
+ export interface AccountInfo {
147
+ /**
148
+ * The generated secret that will sign all webhooks that are sent to your configured Webhook URL.
149
+ * Formatted as "wh_asdf1234" per the https://www.standardwebhooks.com/ format.
150
+ */
151
+ webhookEventsHmacSecret: string;
152
+ /**
153
+ * The challenge token Cadenya sends in the X-Cadenya-Challenge-Token header
154
+ * on every MCP tools/list request. Server implementations can accept a valid
155
+ * challenge token in place of per-user auth when listing tools, while still
156
+ * requiring real auth on tools/call. Rotate with RotateChallengeToken; update
157
+ * any servers validating the token before rotating.
158
+ */
159
+ challengeToken: string;
160
+ }
161
+ /**
162
+ * AccountResourceMetadata is used to represent a resource that is associated to an account but not to a workspace.
163
+ */
164
+ export interface AccountResourceMetadata {
165
+ /**
166
+ * Unique identifier for the resource (prefixed ULID, e.g., "apikey_01HXK...")
167
+ */
168
+ id: string;
169
+ /**
170
+ * Account this resource belongs to for multi-tenant isolation (prefixed ULID)
171
+ */
172
+ accountId: string;
173
+ /**
174
+ * Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool")
175
+ * Required for resources that users interact with directly
176
+ */
177
+ name: string;
178
+ /**
179
+ * External ID for the resource (e.g., a workflow ID from an external system)
180
+ */
181
+ externalId: string;
182
+ /**
183
+ * Key-value pairs for categorization and filtering. Values are 0-63
184
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
185
+ * follow the same shape and additionally accept an optional DNS-subdomain
186
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
187
+ * Examples: {"environment": "production", "team": "platform", "version": "v2"}
188
+ */
189
+ labels: Record<string, string>;
190
+ profileId: string;
191
+ createdAt?: string;
192
+ }
193
+ /**
194
+ * Configuration for an account.
195
+ */
196
+ export interface AccountSpec {
197
+ description: string;
198
+ domain: string;
199
+ billingEmail: string;
200
+ workspaces: Array<Workspace>;
201
+ }
202
+ /**
203
+ * Attach a single tool, tool set, or sub-agent to a variation. Exactly one
204
+ * of the target fields must be set; the assignment kind is inferred from the
205
+ * populated field.
206
+ */
207
+ export type AddAgentVariationAssignmentRequest = AddAgentVariationAssignmentRequest_ToolId | AddAgentVariationAssignmentRequest_ToolSetId | AddAgentVariationAssignmentRequest_SubAgentId;
208
+ /**
209
+ * Attach a memory layer to a variation. The request is rejected when:
210
+ * - the layer is system-managed (FailedPrecondition)
211
+ * - the layer is already assigned to this variation (AlreadyExists)
212
+ * - the variation is already at the 10-assignment cap (FailedPrecondition)
213
+ * - the position is already in use on this variation (InvalidArgument)
214
+ */
215
+ export interface AddAgentVariationMemoryLayerRequest {
216
+ /**
217
+ * Workspace ID.
218
+ */
219
+ workspaceId?: string;
220
+ /**
221
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
222
+ */
223
+ agentId?: string;
224
+ /**
225
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
226
+ */
227
+ variationId?: string;
228
+ /**
229
+ * Layer to attach. Accepts the canonical `memlyr_…` form or the `external_id:<value>` form.
230
+ */
231
+ memoryLayerId: string;
232
+ /**
233
+ * Position in the baseline cascade (lower = more specific). If
234
+ * omitted, the server appends at the most general end (max existing
235
+ * position + 1).
236
+ */
237
+ position?: number;
238
+ }
239
+ /**
240
+ * AddWorkspaceMemberRequest grants a profile access to a workspace. Provide
241
+ * exactly one of profile_id (an existing account profile) or email. When email
242
+ * is given, the backend resolves it to an existing account profile or invites a
243
+ * new one before linking it to the workspace via an actor.
244
+ */
245
+ export interface AddWorkspaceMemberRequest {
246
+ /**
247
+ * The workspace to add the member to (path).
248
+ */
249
+ workspaceId?: string;
250
+ /**
251
+ * An existing account profile to add. Mutually exclusive with email.
252
+ */
253
+ profileId?: string;
254
+ /**
255
+ * Email address to add (resolve-or-invite). Mutually exclusive with profile_id.
256
+ */
257
+ email?: string;
258
+ }
259
+ /**
260
+ * The current lifecycle state of the agent. Output only. Agents are created
261
+ * in STATE_DRAFT; use the :publish, :unpublish, :archive, and :unarchive
262
+ * actions to transition between states.
263
+ */
264
+ export type AgentState = 'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED';
265
+ /**
266
+ * Agent resource
267
+ */
268
+ export interface Agent {
269
+ /**
270
+ * Resource metadata
271
+ */
272
+ metadata: ResourceMetadata;
273
+ /**
274
+ * Agent specification
275
+ */
276
+ spec: AgentSpec;
277
+ /**
278
+ * Agent information
279
+ */
280
+ info: AgentInfo;
281
+ /**
282
+ * The current lifecycle state of the agent. Output only. Agents are created
283
+ * in STATE_DRAFT; use the :publish, :unpublish, :archive, and :unarchive
284
+ * actions to transition between states.
285
+ */
286
+ state: AgentState;
287
+ }
288
+ /**
289
+ * AgentInfo contains simple information about an agent for display or quick reference
290
+ */
291
+ export interface AgentInfo {
292
+ variationCount: number;
293
+ createdBy?: Profile;
294
+ }
295
+ /**
296
+ * The current lifecycle state of the schedule. Output only. Schedules are
297
+ * created STATE_ACTIVE; use the :pause, :resume, and :archive actions to
298
+ * transition between states.
299
+ */
300
+ export type AgentScheduleState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_PAUSED' | 'STATE_ARCHIVED';
301
+ /**
302
+ * AgentSchedule resource — a recurring trigger attached to an agent that
303
+ * creates objectives on its cadence.
304
+ */
305
+ export interface AgentSchedule {
306
+ metadata: ResourceMetadata;
307
+ spec: AgentScheduleSpec;
308
+ info: AgentScheduleInfo;
309
+ /**
310
+ * The current lifecycle state of the schedule. Output only. Schedules are
311
+ * created STATE_ACTIVE; use the :pause, :resume, and :archive actions to
312
+ * transition between states.
313
+ */
314
+ state: AgentScheduleState;
315
+ }
316
+ /**
317
+ * AgentScheduleInfo provides read-only runtime data about a schedule.
318
+ */
319
+ export interface AgentScheduleInfo {
320
+ /**
321
+ * When the schedule will next fire. Computed from the spec; absent when
322
+ * the schedule is STATE_PAUSED/STATE_ARCHIVED or has no future fire times.
323
+ */
324
+ nextFireAt?: string;
325
+ /**
326
+ * When the schedule last fired (regardless of objective outcome).
327
+ */
328
+ lastFireAt?: string;
329
+ /**
330
+ * ID of the most recent objective the schedule created.
331
+ */
332
+ lastObjectiveId?: string;
333
+ /**
334
+ * When the schedule most recently skipped a fire (SKIP policy + prior in flight).
335
+ */
336
+ lastSkippedAt?: string;
337
+ /**
338
+ * Reason for the most recent skip (e.g. "previous objective still running").
339
+ */
340
+ lastSkipReason?: string;
341
+ /**
342
+ * Lifetime count of objectives created by this schedule.
343
+ */
344
+ totalFires: number;
345
+ createdBy?: Profile;
346
+ }
347
+ /**
348
+ * What to do when the previous run is still in flight. Defaults to SKIP.
349
+ */
350
+ export type AgentScheduleSpecOverlapPolicy = 'OVERLAP_POLICY_UNSPECIFIED' | 'OVERLAP_POLICY_ALLOW' | 'OVERLAP_POLICY_SKIP';
351
+ /**
352
+ * AgentScheduleSpec is the user-provided configuration for a schedule.
353
+ */
354
+ export interface AgentScheduleSpec {
355
+ /**
356
+ * When to fire. Required.
357
+ */
358
+ schedule: AgentScheduleSpec_Schedule;
359
+ /**
360
+ * What to do when the previous run is still in flight. Defaults to SKIP.
361
+ */
362
+ overlapPolicy?: AgentScheduleSpecOverlapPolicy;
363
+ /**
364
+ * Optional explicit first user message passed to CreateObjective on each fire.
365
+ * Becomes the first user message in the objective's chat history. When unset, the
366
+ * fired objective defers to the selected variation's first_user_message_template.
367
+ */
368
+ firstUserMessage?: string;
369
+ /**
370
+ * Optional explicit variation. When unset, the agent's variation_selection_mode
371
+ * chooses per fire.
372
+ */
373
+ variationId?: string;
374
+ /**
375
+ * Optional data rendered into the variation's system_prompt_template when each
376
+ * fired objective is created. If the agent has a system_prompt_data_schema,
377
+ * this must satisfy it.
378
+ */
379
+ systemPromptData?: Record<string, unknown>;
380
+ /**
381
+ * Optional data rendered into the variation's first_user_message_template when
382
+ * each fired objective is created. Separate from `system_prompt_data`, which
383
+ * renders the system prompt template.
384
+ */
385
+ firstUserMessageData?: Record<string, unknown>;
386
+ }
387
+ /**
388
+ * Schedule defines WHEN the schedule fires. Temporal-style structured form:
389
+ * a list of calendar rules (wall-clock) and/or interval rules (duration),
390
+ * OR'd together. At least one rule is required.
391
+ */
392
+ export interface AgentScheduleSpec_Schedule {
393
+ /**
394
+ * Wall-clock rules. May be empty if `intervals` is non-empty.
395
+ */
396
+ calendars?: Array<Schedule_Calendar>;
397
+ /**
398
+ * Duration-based rules. May be empty if `calendars` is non-empty.
399
+ */
400
+ intervals?: Array<Schedule_Interval>;
401
+ /**
402
+ * IANA tz name (e.g. "America/New_York"). Required. Applies to calendars;
403
+ * intervals fire on wall-clock cadence anchored in this zone.
404
+ */
405
+ timezone?: string;
406
+ }
407
+ /**
408
+ * Controls how variations are automatically selected when creating objectives
409
+ * Defaults to RANDOM when unspecified
410
+ */
411
+ export type AgentSpecVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
412
+ /**
413
+ * Agent specification (user-provided configuration)
414
+ */
415
+ export interface AgentSpec {
416
+ /**
417
+ * Description of the agent's purpose
418
+ */
419
+ description?: string;
420
+ /**
421
+ * The URL that Cadenya will send events for any objective assigned to the agent.
422
+ */
423
+ webhookEventsUrl?: string;
424
+ /**
425
+ * Controls how variations are automatically selected when creating objectives
426
+ * Defaults to RANDOM when unspecified
427
+ */
428
+ variationSelectionMode: AgentSpecVariationSelectionMode;
429
+ /**
430
+ * SystemPromptDataSchema enforces the shape of system_prompt_data when objectives are created. This is valuable when using liquid formatting in agent
431
+ * variation system prompt templates. The schema is also used when the agent is attached as a sub-agent, as it becomes the tool's input parameter schema.
432
+ * If omitted, the sub-agent schema will be loaded with a simple "prompt" free text string as its schema.
433
+ */
434
+ systemPromptDataSchema?: Record<string, unknown>;
435
+ /**
436
+ * Optional output definition for objectives created for this agent.
437
+ * When provided, Cadenya will append a tool to that will be called by the LLM in use by the variant to extract information in the format provided here.
438
+ * Use this option when you want structured data to be created by your objectives.
439
+ */
440
+ outputDefinition?: Record<string, unknown>;
441
+ /**
442
+ * Enable episodic memory for objectives created for this agent.
443
+ * When true, objective creation requires an episodic_memory key and the
444
+ * system finds or creates a memory layer for that (agent, key) pair, letting
445
+ * the agent store and retrieve memories across objectives that share the key.
446
+ * Memory is agent-level so all variations of the agent share the same layers.
447
+ */
448
+ enableEpisodicMemory?: boolean;
449
+ /**
450
+ * How long episodic memories should be retained.
451
+ * Each new objective slides the layer's expiry forward by this duration, and
452
+ * stored entries expire this long after they are written.
453
+ * If not set, episodic memories are retained indefinitely.
454
+ */
455
+ episodicMemoryTtl?: number;
456
+ }
457
+ /**
458
+ * AgentVariation resource
459
+ */
460
+ export interface AgentVariation {
461
+ /**
462
+ * Resource metadata
463
+ */
464
+ metadata: ResourceMetadata;
465
+ /**
466
+ * Variation specification
467
+ */
468
+ spec: AgentVariationSpec;
469
+ /**
470
+ * Read-only summary information
471
+ */
472
+ info: AgentVariationInfo;
473
+ }
474
+ /**
475
+ * AgentVariationInfo provides read-only summary information about a variation
476
+ */
477
+ export interface AgentVariationInfo {
478
+ /**
479
+ * Number of individual tools assigned to this variation
480
+ */
481
+ toolCount: number;
482
+ /**
483
+ * Number of tool sets assigned to this variation
484
+ */
485
+ toolSetCount: number;
486
+ /**
487
+ * Number of sub-agents assigned to this variation
488
+ */
489
+ subAgentCount: number;
490
+ createdBy?: Profile;
491
+ /**
492
+ * Metadata for the model assigned to this variation
493
+ */
494
+ model?: ResourceMetadata;
495
+ /**
496
+ * Thompson Sampling score: posterior mean of Beta(ts_alpha, ts_beta).
497
+ * Range [0, 1] where 0.5 = neutral, >0.5 = positive, <0.5 = negative.
498
+ */
499
+ score: number;
500
+ /**
501
+ * Total number of objective feedbacks received for this variation
502
+ */
503
+ feedbackCount: number;
504
+ /**
505
+ * All tools, tool sets, and sub-agents assigned to this variation.
506
+ * Populated on reads so clients can render a variation's full assignment
507
+ * list without calling the add/remove endpoints just to enumerate.
508
+ */
509
+ assignments: Array<VariationAssignment>;
510
+ /**
511
+ * Read-only list of memory layer assignments for this variation,
512
+ * returned in ascending `position` (most specific first — resolution
513
+ * order). Capped at 10 entries.
514
+ */
515
+ memoryLayerAssignments: Array<VariationMemoryLayerAssignment>;
516
+ /**
517
+ * Count of memory layer assignments.
518
+ */
519
+ memoryLayerCount: number;
520
+ }
521
+ /**
522
+ * AgentVariationSpec defines the operational configuration for a variation
523
+ */
524
+ export interface AgentVariationSpec {
525
+ /**
526
+ * Liquid template for the system prompt of objectives using this variation.
527
+ * Rendered with CreateObjectiveRequest.system_prompt_data into Objective.system_prompt.
528
+ */
529
+ systemPromptTemplate?: string;
530
+ /**
531
+ * ProgressiveDiscovery is an optional config that, when set, will load a Cadenya provided tool that
532
+ * can search for tools in the assigned tool sets or tools.
533
+ *
534
+ * Note: Sub-agents are always loaded as a tool regardless of this value.
535
+ */
536
+ progressiveDiscovery?: AgentVariationSpec_ProgressiveDiscovery;
537
+ /**
538
+ * Execution constraints
539
+ */
540
+ constraints?: AgentVariationSpec_Constraints;
541
+ /**
542
+ * Human-readable description of what this variation does or when it should be used
543
+ */
544
+ description?: string;
545
+ /**
546
+ * Model configuration for this variation
547
+ */
548
+ modelConfig?: AgentVariationSpec_ModelConfig;
549
+ /**
550
+ * Compaction configuration for managing context window limits during long-running objectives.
551
+ * When not set, the system uses a default summarization strategy at 75% context window usage.
552
+ */
553
+ compactionConfig?: AgentVariationSpec_CompactionConfig;
554
+ /**
555
+ * Liquid template for the first user message of objectives using this variation.
556
+ * Rendered with CreateObjectiveRequest.first_user_message_data into
557
+ * Objective.first_user_message, the first user message in the LLM chat history.
558
+ * CreateObjectiveRequest.first_user_message, when set, overrides the rendered
559
+ * result. If neither this template nor first_user_message is present, objective
560
+ * creation is rejected with InvalidArgument.
561
+ */
562
+ firstUserMessageTemplate?: string;
563
+ }
564
+ /**
565
+ * CompactionConfig defines how context window compaction behaves for objectives using this variation.
566
+ */
567
+ export interface AgentVariationSpec_CompactionConfig {
568
+ /**
569
+ * Trigger threshold as a percentage of the model's context window (0.0 to 1.0).
570
+ * When input tokens reach this percentage of the model's limit, compaction triggers.
571
+ * Default: 0.75 (75%)
572
+ */
573
+ triggerThreshold?: number;
574
+ /**
575
+ * Strategies — set one or more. When multiple are set, they execute in order:
576
+ * tool_result_clearing → summarization.
577
+ * When none are set, defaults to summarization with the system default prompt.
578
+ */
579
+ summarization?: CompactionConfig_SummarizationStrategy;
580
+ toolResultClearing?: CompactionConfig_ToolResultClearingStrategy;
581
+ }
582
+ export interface AgentVariationSpec_Constraints {
583
+ /**
584
+ * The maximum number of tool calls that can be made. 0 means no limit.
585
+ */
586
+ maxToolCalls?: number;
587
+ /**
588
+ * The maximum number of sub-objectives that can be created. 0 means no limit.
589
+ */
590
+ maxSubObjectives?: number;
591
+ /**
592
+ * How long an objective may sit with no activity (no user messages, no
593
+ * LLM calls) before it is finalized as timed out. Between 1 minute and
594
+ * 24 hours, expressed as a duration string in seconds (e.g. "7200s").
595
+ * When not set, objectives are still swept at the system-wide 24 hour
596
+ * maximum — every objective eventually reaches a terminal state.
597
+ *
598
+ * Note: no gnostic integer hint here on purpose. The Envoy gRPC-JSON
599
+ * transcoder only accepts the canonical protobuf JSON form for
600
+ * Durations — a "<seconds>s" string — so the SDKs must type this as a
601
+ * string (like AgentScheduleSpec.every), not an integer.
602
+ */
603
+ inactivityTimeout?: string;
604
+ }
605
+ /**
606
+ * Reasoning effort. Requires the model's "reasoning" capability.
607
+ */
608
+ export type AgentVariationSpecModelConfigReasoningEffort = 'REASONING_EFFORT_UNSPECIFIED' | 'REASONING_EFFORT_NONE' | 'REASONING_EFFORT_LOW' | 'REASONING_EFFORT_MEDIUM' | 'REASONING_EFFORT_HIGH';
609
+ /**
610
+ * ModelConfig defines the model configuration for a variation.
611
+ *
612
+ * Every knob besides model_id is honored only when the assigned model's
613
+ * spec.capabilities lists the matching capability.
614
+ */
615
+ export interface AgentVariationSpec_ModelConfig {
616
+ /**
617
+ * The model identifier in family/model format (e.g., "claude/opus-4.6", "claude/sonnet-4.5")
618
+ */
619
+ modelId: string;
620
+ /**
621
+ * Sampling temperature for model inference (0.0 to 1.0)
622
+ * Lower values produce more deterministic outputs, higher values increase randomness.
623
+ * Presence-tracked so a deliberate 0.0 (fully deterministic) is
624
+ * distinguishable from unset.
625
+ */
626
+ temperature?: number;
627
+ /**
628
+ * Nucleus sampling: only tokens comprising the top_p probability mass
629
+ * are considered. Requires the model's "topP" capability.
630
+ */
631
+ topP?: number;
632
+ /**
633
+ * Only sample from the top_k most likely tokens.
634
+ * Requires the model's "topK" capability.
635
+ */
636
+ topK?: number;
637
+ /**
638
+ * Sequences that stop generation when produced. Empty means none.
639
+ * No count cap here — providers impose their own limits (surfaced as
640
+ * the "stopSequences" capability's `limit` on the model spec), and it
641
+ * is the caller's responsibility to stay within the selected model's
642
+ * limit. Requires the model's "stopSequences" capability.
643
+ */
644
+ stopSequences?: Array<string>;
645
+ /**
646
+ * Cap on output tokens per LLM call. Must not exceed the model's
647
+ * spec.max_output_tokens. Requires the model's "maxOutputTokens"
648
+ * capability.
649
+ */
650
+ maxOutputTokens?: number;
651
+ /**
652
+ * Reasoning effort. Requires the model's "reasoning" capability.
653
+ */
654
+ reasoningEffort?: AgentVariationSpecModelConfigReasoningEffort;
655
+ /**
656
+ * Prompt/token caching. Requires the model's "caching" capability.
657
+ * Presence-tracked tri-state: unset means the default — caching is ON
658
+ * whenever the model has the capability; false opts this variation
659
+ * out; true is an explicit opt-in (equivalent to unset).
660
+ */
661
+ cachingEnabled?: boolean;
662
+ }
663
+ /**
664
+ * ProgressiveDiscovery is used to indicate that the agent should automatically discover tools that are not explicitly assigned to it.
665
+ * Max tools is the maximum number of tools that can be discovered per search.
666
+ * Hints are optional hints for tool search. These are used in conjunction with the context-aware tool search and can help select the best tools for the task.
667
+ */
668
+ export interface AgentVariationSpec_ProgressiveDiscovery {
669
+ /**
670
+ * The most tool names tool_search will load in a single call. Requesting more
671
+ * than this returns an error telling the model to retry in smaller batches --
672
+ * it is a per-call batch limit, not a ceiling on how many tools an objective
673
+ * may end up with.
674
+ */
675
+ maxTools?: number;
676
+ /**
677
+ * Free-text guidance appended to the discoverable-tools appendix in the
678
+ * system prompt. Hints steer the model's choice of tool names; they do not
679
+ * filter or rank anything, because tool_search matches names exactly rather
680
+ * than searching.
681
+ */
682
+ hints?: Array<string>;
683
+ }
684
+ export interface ApproveToolCallRequest {
685
+ workspaceId?: string;
686
+ /**
687
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
688
+ */
689
+ objectiveId?: string;
690
+ /**
691
+ * The ID of the tool call to approve
692
+ */
693
+ toolCallId?: string;
694
+ }
695
+ /**
696
+ * Archive agent request
697
+ */
698
+ export interface ArchiveAgentRequest {
699
+ /**
700
+ * Workspace ID.
701
+ */
702
+ workspaceId?: string;
703
+ /**
704
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
705
+ */
706
+ id?: string;
707
+ }
708
+ /**
709
+ * Archive agent schedule request.
710
+ */
711
+ export interface ArchiveAgentScheduleRequest {
712
+ /**
713
+ * Workspace ID.
714
+ */
715
+ workspaceId?: string;
716
+ /**
717
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
718
+ */
719
+ agentId?: string;
720
+ /**
721
+ * Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form.
722
+ */
723
+ id?: string;
724
+ }
725
+ /**
726
+ * Archive tool set request
727
+ */
728
+ export interface ArchiveToolSetRequest {
729
+ /**
730
+ * Workspace ID.
731
+ */
732
+ workspaceId?: string;
733
+ /**
734
+ * Tool set ID. Accepts the canonical ts_… form or the
735
+ * external_id:<value> form.
736
+ */
737
+ id?: string;
738
+ }
739
+ /**
740
+ * Archive widget request.
741
+ */
742
+ export interface ArchiveWidgetRequest {
743
+ /**
744
+ * Workspace ID.
745
+ */
746
+ workspaceId?: string;
747
+ /**
748
+ * Widget ID. Accepts the canonical `wgt_…` form or the `external_id:<value>` form.
749
+ */
750
+ id?: string;
751
+ }
752
+ export interface AssistantMessage {
753
+ content?: string;
754
+ toolCalls: Array<AssistantToolCall>;
755
+ }
756
+ export interface AssistantToolCall {
757
+ tool?: CallableTool;
758
+ arguments: string;
759
+ functionName: string;
760
+ }
761
+ /**
762
+ * BareMetadata contains the minimal metadata for a resource: the ID and an
763
+ * optional human-readable name. These are used for reference fields where the
764
+ * full metadata (account scoping, timestamps, labels, external IDs) is not
765
+ * needed — e.g., the tool references inside an agent variation spec or the
766
+ * tools assigned to an objective. Both fields are server-populated; clients
767
+ * provide IDs through sibling fields rather than by constructing a
768
+ * BareMetadata themselves.
769
+ */
770
+ export interface BareMetadata {
771
+ id: string;
772
+ /**
773
+ * Human-readable name of the referenced resource, populated by the server
774
+ * on reads for convenience. Absent on references to resources that do not
775
+ * have a name (e.g., objective tasks).
776
+ */
777
+ name?: string;
778
+ }
779
+ /**
780
+ * CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective
781
+ * might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).
782
+ */
783
+ export type CallableTool = CallableTool_Tool | CallableTool_Agent | CallableTool_CadenyaProvidedTool;
784
+ export interface CancelObjectiveRequest {
785
+ workspaceId?: string;
786
+ /**
787
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
788
+ */
789
+ objectiveId?: string;
790
+ /**
791
+ * Optional reason for cancellation
792
+ */
793
+ reason?: string;
794
+ }
795
+ /**
796
+ * Prompt/token caching (ModelConfig.caching_enabled). A model that
797
+ * cannot cache prompt prefixes simply omits this capability. When the
798
+ * capability is present, caching defaults to ON — a variation opts out
799
+ * by setting caching_enabled to false.
800
+ */
801
+ export interface Capability_Caching {
802
+ }
803
+ /**
804
+ * Per-request output token cap (ModelConfig.max_output_tokens).
805
+ * The effective ceiling is ModelSpec.max_output_tokens.
806
+ */
807
+ export interface Capability_MaxOutputTokens {
808
+ }
809
+ /**
810
+ * How reasoning is enabled for this model. Catalog data used to decide
811
+ * whether thinking is requested for objective iterations on this model.
812
+ */
813
+ export type CapabilityReasoningMode = 'MODE_UNSPECIFIED' | 'MODE_ADAPTIVE' | 'MODE_BUDGET';
814
+ /**
815
+ * Reasoning / extended thinking (ModelConfig.reasoning_effort). A model
816
+ * that does not reason simply omits this capability.
817
+ */
818
+ export interface Capability_Reasoning {
819
+ /**
820
+ * How reasoning is enabled for this model. Catalog data used to decide
821
+ * whether thinking is requested for objective iterations on this model.
822
+ */
823
+ mode: CapabilityReasoningMode;
824
+ }
825
+ /**
826
+ * Custom stop sequences (ModelConfig.stop_sequences).
827
+ */
828
+ export interface Capability_StopSequences {
829
+ /**
830
+ * Maximum number of stop sequences the model accepts per request.
831
+ * 0 means the provider imposes no meaningful limit.
832
+ */
833
+ limit: number;
834
+ }
835
+ /**
836
+ * Sampling temperature (ModelConfig.temperature).
837
+ */
838
+ export interface Capability_Temperature {
839
+ }
840
+ /**
841
+ * Top-k sampling (ModelConfig.top_k).
842
+ */
843
+ export interface Capability_TopK {
844
+ }
845
+ /**
846
+ * Nucleus sampling (ModelConfig.top_p).
847
+ */
848
+ export interface Capability_TopP {
849
+ }
850
+ /**
851
+ * Compact objective request — triggers compaction on a running objective.
852
+ */
853
+ export interface CompactObjectiveRequest {
854
+ workspaceId?: string;
855
+ /**
856
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
857
+ */
858
+ objectiveId?: string;
859
+ /**
860
+ * Optional compaction config override. When not set, uses the variation's compaction_config.
861
+ */
862
+ compactionConfig?: AgentVariationSpec_CompactionConfig;
863
+ }
864
+ /**
865
+ * Compact objective response
866
+ */
867
+ export interface CompactObjectiveResponse {
868
+ /**
869
+ * The new context window created by the compaction
870
+ */
871
+ contextWindow?: ObjectiveContextWindowData;
872
+ }
873
+ /**
874
+ * SummarizationStrategy configures LLM-powered summarization of older conversation turns.
875
+ */
876
+ export interface CompactionConfig_SummarizationStrategy {
877
+ /**
878
+ * Custom instructions that guide what the summarizer preserves.
879
+ * Replaces the default summarization prompt entirely.
880
+ * Example: "Preserve all code snippets, variable names, and technical decisions."
881
+ */
882
+ instructions?: string;
883
+ }
884
+ /**
885
+ * ToolResultClearingStrategy configures clearing of older tool result content.
886
+ */
887
+ export interface CompactionConfig_ToolResultClearingStrategy {
888
+ /**
889
+ * Number of most recent tool call results to keep intact.
890
+ * Older tool results have their content replaced with "[result cleared]"
891
+ * while preserving the assistant tool call message (function name, arguments).
892
+ * Default: 2
893
+ */
894
+ preserveRecentResults?: number;
895
+ }
896
+ /**
897
+ * Marks the tool as bare: it has no execution adapter of its own and
898
+ * relies on the parent tool set being a Bare tool set. Present so a
899
+ * webhook consumer can tell a tool is bare from the tool data alone,
900
+ * without cross-referencing the tool set.
901
+ */
902
+ export interface Config_Bare {
903
+ /**
904
+ * When set, the tool call's result is recorded immediately as this
905
+ * fixed text instead of parking the call to wait for externally
906
+ * supplied content. The tool_called event is still emitted. Useful for
907
+ * tools whose dispatch is the intent (e.g. a frontend renders a
908
+ * component from the call parameters) but whose LLM turn still needs
909
+ * tool-result content.
910
+ */
911
+ alwaysSetResult?: string;
912
+ }
913
+ export type ConfigHttpRequestMethod = 'HTTP_METHOD_UNSPECIFIED' | 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
914
+ export interface Config_HTTP {
915
+ requestMethod: ConfigHttpRequestMethod;
916
+ path?: string;
917
+ query?: string;
918
+ headers?: Record<string, string>;
919
+ /**
920
+ * These are only used when the request method is a POST, PUT, or PATCH
921
+ */
922
+ requestBodyTemplate?: string;
923
+ requestBodyContentType?: string;
924
+ }
925
+ export interface Config_MCP {
926
+ /**
927
+ * Tool behavior annotations from the MCP server, captured during sync.
928
+ */
929
+ annotations?: MCP_Annotations;
930
+ }
931
+ export interface Config_OpenAPI {
932
+ path?: string;
933
+ method?: string;
934
+ }
935
+ /**
936
+ * ContextLengths is the measured character length of each distinct component
937
+ * of an iteration's assembled context window. Values are raw character
938
+ * lengths of the component as assembled into the request — token estimates
939
+ * are derived by the client against input_tokens (component share =
940
+ * component length / sum of all lengths).
941
+ *
942
+ * New components are added as new fields — wire-compatible; absent
943
+ * components read as 0.
944
+ */
945
+ export interface ContextLengths {
946
+ /**
947
+ * Character length of the objective's base system prompt (rendered variation
948
+ * template). Not tokens -- see the message comment.
949
+ */
950
+ systemPrompt: number;
951
+ /**
952
+ * Character length of the skills memory appendix attached to the system prompt.
953
+ */
954
+ skillsMemory: number;
955
+ /**
956
+ * Character length of the episodic memory appendix attached to the system prompt.
957
+ */
958
+ episodicMemory: number;
959
+ /**
960
+ * Character length of the discoverable/available-tools appendix attached to the
961
+ * system prompt.
962
+ */
963
+ availableTools: number;
964
+ /**
965
+ * Character length of the serialized tool definitions sent with the completion
966
+ * request (names, descriptions, and JSON-schema parameters).
967
+ */
968
+ toolDefinitions: number;
969
+ /**
970
+ * Character length of the chat history messages with the user role.
971
+ */
972
+ userMessages: number;
973
+ /**
974
+ * Character length of the chat history messages with the assistant role.
975
+ */
976
+ assistantMessages: number;
977
+ /**
978
+ * Character length of the tool results present in the chat history.
979
+ */
980
+ toolResults: number;
981
+ }
982
+ export interface ContextWindowCompacted {
983
+ /**
984
+ * The new context window created by this compaction
985
+ */
986
+ newContextWindow: ObjectiveContextWindowData;
987
+ /**
988
+ * The strategies that were applied during this compaction
989
+ */
990
+ strategies: Array<string>;
991
+ /**
992
+ * Number of messages that were compacted
993
+ */
994
+ messagesCompacted: number;
995
+ /**
996
+ * The summary generated by the summarization strategy, if used.
997
+ */
998
+ summary?: string;
999
+ }
1000
+ export interface ContinueObjectiveRequest {
1001
+ workspaceId?: string;
1002
+ /**
1003
+ * The ID of the objective. If you have assigned an external ID to the objective, you can prefix the ID with "external_id:". For example, "external_id:1234567890". Otherwise, the ID assigned by Cadenya should be used.
1004
+ */
1005
+ objectiveId?: string;
1006
+ /**
1007
+ * The message to continue an objective that has completed (or you are enqueing)
1008
+ */
1009
+ message: string;
1010
+ /**
1011
+ * When set to true, the message will be enqueued for when the agent loop is available to process it.
1012
+ */
1013
+ enqueue?: boolean;
1014
+ }
1015
+ export interface CreateAIProviderKeyRequest {
1016
+ /**
1017
+ * The workspace that will own this key.
1018
+ */
1019
+ workspaceId?: string;
1020
+ metadata: CreateResourceMetadata;
1021
+ spec: AIProviderKeySpec;
1022
+ }
1023
+ export interface CreateAPIKeyRequest {
1024
+ metadata: CreateAccountResourceMetadata;
1025
+ spec: APIKeySpec;
1026
+ /**
1027
+ * The workspace this API key belongs to (path).
1028
+ */
1029
+ workspaceId?: string;
1030
+ }
1031
+ /**
1032
+ * CreateAccountResourceMetadata contains the user-provided fields for creating
1033
+ * an account-scoped resource. Read-only fields (id, account_id, profile_id) are excluded
1034
+ * since they are set by the server.
1035
+ */
1036
+ export interface CreateAccountResourceMetadata {
1037
+ /**
1038
+ * Human-readable name for the resource (e.g., "Production API Key", "Staging Workspace")
1039
+ */
1040
+ name: string;
1041
+ /**
1042
+ * External ID for the resource (e.g., a workflow ID from an external system)
1043
+ */
1044
+ externalId?: string;
1045
+ /**
1046
+ * Key-value pairs for categorization and filtering. Values are 0-63
1047
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
1048
+ * follow the same shape and additionally accept an optional DNS-subdomain
1049
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
1050
+ * Examples: {"environment": "production", "team": "platform", "version": "v2"}
1051
+ */
1052
+ labels?: Record<string, string>;
1053
+ }
1054
+ /**
1055
+ * Create agent request
1056
+ */
1057
+ export interface CreateAgentRequest {
1058
+ /**
1059
+ * Workspace ID.
1060
+ */
1061
+ workspaceId?: string;
1062
+ metadata: CreateResourceMetadata;
1063
+ spec: AgentSpec;
1064
+ /**
1065
+ * Optional default variation to add to the agent on create
1066
+ */
1067
+ defaultVariation?: CreateAgentVariationRequest;
1068
+ }
1069
+ /**
1070
+ * Create agent schedule request.
1071
+ */
1072
+ export interface CreateAgentScheduleRequest {
1073
+ /**
1074
+ * Workspace ID.
1075
+ */
1076
+ workspaceId?: string;
1077
+ /**
1078
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
1079
+ */
1080
+ agentId?: string;
1081
+ metadata: CreateResourceMetadata;
1082
+ spec: AgentScheduleSpec;
1083
+ }
1084
+ /**
1085
+ * Create agent variation request
1086
+ */
1087
+ export interface CreateAgentVariationRequest {
1088
+ /**
1089
+ * Workspace ID.
1090
+ */
1091
+ workspaceId?: string;
1092
+ /**
1093
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
1094
+ */
1095
+ agentId?: string;
1096
+ metadata: CreateResourceMetadata;
1097
+ spec: AgentVariationSpec;
1098
+ }
1099
+ export interface CreateMemoryEntryRequest {
1100
+ workspaceId?: string;
1101
+ /**
1102
+ * Memory layer ID. Accepts canonical memlyr_… form or external_id:<value> form.
1103
+ */
1104
+ memoryLayerId?: string;
1105
+ metadata: CreateResourceMetadata;
1106
+ spec: MemoryEntryCreateSpec;
1107
+ }
1108
+ export interface CreateMemoryLayerRequest {
1109
+ workspaceId?: string;
1110
+ metadata: CreateResourceMetadata;
1111
+ spec: MemoryLayerSpec;
1112
+ }
1113
+ /**
1114
+ * Request to submit feedback for an objective
1115
+ */
1116
+ export interface CreateObjectiveFeedbackRequest {
1117
+ workspaceId?: string;
1118
+ /**
1119
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
1120
+ */
1121
+ objectiveId?: string;
1122
+ metadata: CreateOperationMetadata;
1123
+ data: ObjectiveFeedbackData;
1124
+ }
1125
+ export interface CreateObjectiveRequest {
1126
+ workspaceId: string;
1127
+ agentId: string;
1128
+ /**
1129
+ * Optional explicit variation selection. Overrides the agent's variation_selection_mode.
1130
+ */
1131
+ variationId?: string;
1132
+ metadata?: CreateOperationMetadata;
1133
+ /**
1134
+ * Arbitrary data rendered into the selected variation's system_prompt_template
1135
+ * (liquid) to produce the objective's system prompt. If the agent has a
1136
+ * system_prompt_data_schema, this must satisfy it.
1137
+ */
1138
+ systemPromptData: Record<string, unknown>;
1139
+ /**
1140
+ * Optional explicit first user message for the LLM chat history. When not set,
1141
+ * the selected variation's first_user_message_template is rendered with
1142
+ * first_user_message_data instead. If neither this field nor a
1143
+ * first_user_message_template is present, the request is rejected with InvalidArgument.
1144
+ */
1145
+ firstUserMessage?: string;
1146
+ /**
1147
+ * Secrets that can be used in the headers for tool calls using the secret interpolation format.
1148
+ */
1149
+ secrets?: Array<CreateObjectiveRequest_Secret>;
1150
+ /**
1151
+ * Memory layers/entries layered over the baseline cascade inherited
1152
+ * from the selected variation — element-level rules over inherited
1153
+ * styles, in CSS terms.
1154
+ *
1155
+ * Array order is resolution order: EARLIER elements are more specific
1156
+ * and are consulted first. Entries pinned via memory_entry_id behave
1157
+ * as single-entry layers at their position.
1158
+ *
1159
+ * System-managed layers (e.g., episodic) cannot be referenced here;
1160
+ * they attach themselves automatically based on the episodic key.
1161
+ *
1162
+ * Size cap: the TOTAL effective cascade (this field + the variation's
1163
+ * memory layer assignments) must not exceed 10 entries. A request
1164
+ * that would produce a larger cascade is rejected with
1165
+ * InvalidArgument.
1166
+ */
1167
+ memoryCascade?: Array<MemoryReference>;
1168
+ /**
1169
+ * Arbitrary data rendered into the selected variation's first_user_message_template
1170
+ * (liquid) to produce the first user message. Separate from `system_prompt_data`,
1171
+ * which renders the system prompt template.
1172
+ */
1173
+ firstUserMessageData?: Record<string, unknown>;
1174
+ /**
1175
+ * If the agent variation that is selected has episodic memory enabled, then this key is used to create/update a memory layer
1176
+ * specific to the episodic memory. The layer may have a TTL configured by the variation.
1177
+ */
1178
+ episodicMemory?: ObjectiveEpisodicConfig;
1179
+ /**
1180
+ * Optional tenant assertion — the customer's org/company identifier for the
1181
+ * end user this objective serves. Upserts the tenant record in the
1182
+ * workspace and associates the objective with it.
1183
+ */
1184
+ tenant?: TenantAssertion;
1185
+ /**
1186
+ * Optional subject assertion — the person within the tenant this objective
1187
+ * serves. Requires `tenant`; a subject asserted without a tenant is
1188
+ * rejected with InvalidArgument.
1189
+ */
1190
+ subject?: SubjectAssertion;
1191
+ /**
1192
+ * Parameters forced onto this objective's tool calls. A pinned parameter
1193
+ * is an overlay on a tool's JSON schema: the parameter is removed from
1194
+ * what the LLM sees, and its value is always overwritten server-side with
1195
+ * the pinned value — the model cannot choose a different value for it.
1196
+ */
1197
+ pinnedParameters?: Record<string, string>;
1198
+ }
1199
+ export interface CreateObjectiveRequest_Secret {
1200
+ name?: string;
1201
+ value?: string;
1202
+ }
1203
+ /**
1204
+ * CreateOperationMetadata contains the user-provided fields for creating
1205
+ * an operation. Read-only fields (id, account_id, workspace_id, created_at, profile_id)
1206
+ * are excluded since they are set by the server.
1207
+ */
1208
+ export interface CreateOperationMetadata {
1209
+ /**
1210
+ * Key-value pairs for categorization and filtering. Values are 0-63
1211
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
1212
+ * follow the same shape and additionally accept an optional DNS-subdomain
1213
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
1214
+ * Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}
1215
+ */
1216
+ labels?: Record<string, string>;
1217
+ /**
1218
+ * External ID for the operation (e.g., a workflow ID from an external system)
1219
+ */
1220
+ externalId?: string;
1221
+ }
1222
+ /**
1223
+ * CreateResourceMetadata contains the user-provided fields for creating
1224
+ * a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id,
1225
+ * created_at) are excluded since they are set by the server.
1226
+ */
1227
+ export interface CreateResourceMetadata {
1228
+ /**
1229
+ * Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool")
1230
+ */
1231
+ name: string;
1232
+ /**
1233
+ * External ID for the resource (e.g., a workflow ID from an external system)
1234
+ */
1235
+ externalId?: string;
1236
+ /**
1237
+ * Key-value pairs for categorization and filtering. Values are 0-63
1238
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
1239
+ * follow the same shape and additionally accept an optional DNS-subdomain
1240
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
1241
+ * Examples: {"environment": "production", "team": "platform", "version": "v2"}
1242
+ */
1243
+ labels?: Record<string, string>;
1244
+ }
1245
+ export interface CreateToolRequest {
1246
+ /**
1247
+ * Workspace ID.
1248
+ */
1249
+ workspaceId?: string;
1250
+ /**
1251
+ * Tool set ID. Accepts the canonical ts_… form or the
1252
+ * external_id:<value> form.
1253
+ */
1254
+ toolSetId?: string;
1255
+ metadata: CreateResourceMetadata;
1256
+ spec: ToolSpec;
1257
+ }
1258
+ export interface CreateToolSetRequest {
1259
+ /**
1260
+ * Workspace ID.
1261
+ */
1262
+ workspaceId?: string;
1263
+ metadata: CreateResourceMetadata;
1264
+ spec: ToolSetSpec;
1265
+ }
1266
+ export interface CreateToolSetSecretRequest {
1267
+ /**
1268
+ * The workspace that owns the tool set.
1269
+ */
1270
+ workspaceId?: string;
1271
+ /**
1272
+ * The tool set that will own this secret. Accepts the canonical ts_… form
1273
+ * or the external_id:<value> form.
1274
+ */
1275
+ toolSetId?: string;
1276
+ metadata: CreateResourceMetadata;
1277
+ spec: ToolSetSecretSpec;
1278
+ }
1279
+ export interface CreateUploadRequest {
1280
+ /**
1281
+ * Workspace ID.
1282
+ */
1283
+ workspaceId?: string;
1284
+ metadata: CreateResourceMetadata;
1285
+ spec: UploadSpec;
1286
+ }
1287
+ /**
1288
+ * Create widget request.
1289
+ */
1290
+ export interface CreateWidgetRequest {
1291
+ /**
1292
+ * Workspace ID.
1293
+ */
1294
+ workspaceId?: string;
1295
+ metadata: CreateResourceMetadata;
1296
+ spec: WidgetSpec;
1297
+ }
1298
+ /**
1299
+ * Create widget session request.
1300
+ */
1301
+ export interface CreateWidgetSessionRequest {
1302
+ /**
1303
+ * Workspace ID.
1304
+ */
1305
+ workspaceId: string;
1306
+ metadata?: CreateOperationMetadata;
1307
+ spec: WidgetSessionSpec;
1308
+ /**
1309
+ * Secrets to attach to the session.
1310
+ */
1311
+ secrets?: Array<CreateWidgetSessionRequest_Secret>;
1312
+ }
1313
+ /**
1314
+ * Secret is a named credential attached to the session — typically a token
1315
+ * the customer's backend minted for the visitor, so the agent acts against
1316
+ * their API as that subject. Values are captured at the boundary, encrypted
1317
+ * at rest, appended to every conversation the session creates (re-synced on
1318
+ * each turn), and never returned by any API. Session secrets take
1319
+ * precedence over workspace and tool-set secrets of the same name.
1320
+ */
1321
+ export interface CreateWidgetSessionRequest_Secret {
1322
+ name?: string;
1323
+ value?: string;
1324
+ }
1325
+ export interface CreateWorkspaceRequest {
1326
+ metadata: CreateAccountResourceMetadata;
1327
+ spec: WorkspaceSpec;
1328
+ }
1329
+ export interface CreateWorkspaceSecretRequest {
1330
+ /**
1331
+ * The workspace that will own this secret.
1332
+ */
1333
+ workspaceId?: string;
1334
+ metadata: CreateResourceMetadata;
1335
+ spec: WorkspaceSecretSpec;
1336
+ }
1337
+ /**
1338
+ * CredentialAPIKey carries a single bearer/header API key.
1339
+ */
1340
+ export interface CredentialAPIKey {
1341
+ apiKey?: string;
1342
+ }
1343
+ /**
1344
+ * CredentialHeaders carries arbitrary HTTP headers sent with every request to
1345
+ * the provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
1346
+ */
1347
+ export interface CredentialHeaders {
1348
+ headers?: Record<string, string>;
1349
+ }
1350
+ /**
1351
+ * Delete tenant widget sessions response.
1352
+ */
1353
+ export interface DeleteTenantWidgetSessionsResponse {
1354
+ /**
1355
+ * Number of sessions deleted.
1356
+ */
1357
+ sessionsDeleted: number;
1358
+ /**
1359
+ * Number of conversations (objectives) deleted along with the sessions.
1360
+ */
1361
+ objectivesDeleted: number;
1362
+ }
1363
+ export interface DenyToolCallRequest {
1364
+ workspaceId?: string;
1365
+ /**
1366
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
1367
+ */
1368
+ objectiveId?: string;
1369
+ /**
1370
+ * The ID of the tool call to deny
1371
+ */
1372
+ toolCallId?: string;
1373
+ /**
1374
+ * A memo to associate to the tool call denial. Use a memo to steer the LLM to a different decision or usage of the tool.
1375
+ */
1376
+ memo?: string;
1377
+ }
1378
+ export interface DisableAPIKeyRequest {
1379
+ /**
1380
+ * The workspace the API key belongs to (path).
1381
+ */
1382
+ workspaceId?: string;
1383
+ /**
1384
+ * The API key to disable.
1385
+ */
1386
+ id?: string;
1387
+ }
1388
+ /**
1389
+ * Disable model request
1390
+ */
1391
+ export interface DisableModelRequest {
1392
+ /**
1393
+ * Workspace ID.
1394
+ */
1395
+ workspaceId?: string;
1396
+ /**
1397
+ * Model ID
1398
+ */
1399
+ id?: string;
1400
+ }
1401
+ export interface EnableAPIKeyRequest {
1402
+ /**
1403
+ * The workspace the API key belongs to (path).
1404
+ */
1405
+ workspaceId?: string;
1406
+ /**
1407
+ * The API key to enable.
1408
+ */
1409
+ id?: string;
1410
+ }
1411
+ /**
1412
+ * Enable model request
1413
+ */
1414
+ export interface EnableModelRequest {
1415
+ /**
1416
+ * Workspace ID.
1417
+ */
1418
+ workspaceId?: string;
1419
+ /**
1420
+ * Model ID
1421
+ */
1422
+ id?: string;
1423
+ }
1424
+ export interface GetObjectiveDiagnosticsResponse {
1425
+ /**
1426
+ * Diagnostics from the objective's most recent iteration.
1427
+ */
1428
+ diagnostics: ObjectiveDiagnostics;
1429
+ }
1430
+ export interface GetToolSetOpenAPISpecResponse {
1431
+ /**
1432
+ * The consumed OpenAPI specification as a JSON string.
1433
+ */
1434
+ spec: string;
1435
+ }
1436
+ /**
1437
+ * Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
1438
+ */
1439
+ export interface GoogleProtobufAny {
1440
+ /**
1441
+ * The type of the serialized message.
1442
+ */
1443
+ '@type'?: string;
1444
+ }
1445
+ export interface ListAIProviderKeysResponse {
1446
+ items: Array<AIProviderKey>;
1447
+ pagination?: Page;
1448
+ }
1449
+ export interface ListAPIKeysResponse {
1450
+ items: Array<APIKey>;
1451
+ pagination?: Page;
1452
+ }
1453
+ export interface ListAccountWorkspacesResponse {
1454
+ items: Array<Workspace>;
1455
+ pagination?: Page;
1456
+ }
1457
+ /**
1458
+ * Response for listing feedback across an agent.
1459
+ */
1460
+ export interface ListAgentFeedbackResponse {
1461
+ items: Array<ObjectiveFeedback>;
1462
+ pagination?: Page;
1463
+ }
1464
+ /**
1465
+ * List agent schedules response.
1466
+ */
1467
+ export interface ListAgentSchedulesResponse {
1468
+ items: Array<AgentSchedule>;
1469
+ pagination?: Page;
1470
+ }
1471
+ /**
1472
+ * List agent variations response
1473
+ */
1474
+ export interface ListAgentVariationsResponse {
1475
+ items: Array<AgentVariation>;
1476
+ pagination?: Page;
1477
+ }
1478
+ export interface ListAgentWebhookDeliveriesResponse {
1479
+ items: Array<WebhookDelivery>;
1480
+ pagination?: Page;
1481
+ }
1482
+ /**
1483
+ * List agents response
1484
+ */
1485
+ export interface ListAgentsResponse {
1486
+ items: Array<Agent>;
1487
+ pagination?: Page;
1488
+ }
1489
+ export interface ListMemoryEntriesResponse {
1490
+ items: Array<MemoryEntry>;
1491
+ pagination?: Page;
1492
+ }
1493
+ export interface ListMemoryLayersResponse {
1494
+ items: Array<MemoryLayer>;
1495
+ pagination?: Page;
1496
+ }
1497
+ /**
1498
+ * List models response
1499
+ */
1500
+ export interface ListModelsResponse {
1501
+ items: Array<Model>;
1502
+ pagination?: Page;
1503
+ }
1504
+ /**
1505
+ * ListObjectiveContextWindowsResponse is the response to a ListObjectiveContextWindowsRequest
1506
+ */
1507
+ export interface ListObjectiveContextWindowsResponse {
1508
+ items: Array<ObjectiveContextWindow>;
1509
+ pagination?: Page;
1510
+ }
1511
+ export interface ListObjectiveEventsResponse {
1512
+ items: Array<ObjectiveEvent>;
1513
+ pagination?: Page;
1514
+ }
1515
+ /**
1516
+ * Response for listing feedback
1517
+ */
1518
+ export interface ListObjectiveFeedbackResponse {
1519
+ items: Array<ObjectiveFeedback>;
1520
+ pagination?: Page;
1521
+ }
1522
+ export interface ListObjectiveTasksResponse {
1523
+ items: Array<ObjectiveTask>;
1524
+ pagination?: Page;
1525
+ }
1526
+ export interface ListObjectiveToolCallsResponse {
1527
+ items: Array<ObjectiveToolCall>;
1528
+ pagination?: Page;
1529
+ }
1530
+ export interface ListObjectiveToolsResponse {
1531
+ items: Array<ObjectiveTool>;
1532
+ pagination?: Page;
1533
+ }
1534
+ export interface ListObjectivesResponse {
1535
+ items: Array<Objective>;
1536
+ pagination?: Page;
1537
+ }
1538
+ export interface ListProfilesResponse {
1539
+ items: Array<Profile>;
1540
+ pagination?: Page;
1541
+ }
1542
+ /**
1543
+ * List tenant subjects response.
1544
+ */
1545
+ export interface ListTenantSubjectsResponse {
1546
+ items: Array<Subject>;
1547
+ pagination?: Page;
1548
+ }
1549
+ /**
1550
+ * List tenants response.
1551
+ */
1552
+ export interface ListTenantsResponse {
1553
+ items: Array<Tenant>;
1554
+ pagination?: Page;
1555
+ }
1556
+ export interface ListToolSetEventsResponse {
1557
+ items: Array<ToolSetEvent>;
1558
+ pagination?: Page;
1559
+ }
1560
+ export interface ListToolSetSecretsResponse {
1561
+ items: Array<ToolSetSecret>;
1562
+ pagination?: Page;
1563
+ }
1564
+ export interface ListToolSetUsageResponse {
1565
+ items: Array<ToolSetUsage>;
1566
+ pagination?: Page;
1567
+ }
1568
+ export interface ListToolSetsResponse {
1569
+ items: Array<ToolSet>;
1570
+ pagination?: Page;
1571
+ }
1572
+ export interface ListToolsResponse {
1573
+ items: Array<Tool>;
1574
+ pagination?: Page;
1575
+ }
1576
+ /**
1577
+ * List widget sessions response.
1578
+ */
1579
+ export interface ListWidgetSessionsResponse {
1580
+ items: Array<WidgetSession>;
1581
+ pagination?: Page;
1582
+ }
1583
+ /**
1584
+ * List widgets response.
1585
+ */
1586
+ export interface ListWidgetsResponse {
1587
+ items: Array<Widget>;
1588
+ pagination?: Page;
1589
+ }
1590
+ export interface ListWorkspaceMembersResponse {
1591
+ items: Array<WorkspaceMember>;
1592
+ pagination?: Page;
1593
+ }
1594
+ export interface ListWorkspaceSecretsResponse {
1595
+ items: Array<WorkspaceSecret>;
1596
+ pagination?: Page;
1597
+ }
1598
+ export interface ListWorkspacesResponse {
1599
+ items: Array<Workspace>;
1600
+ pagination?: Page;
1601
+ }
1602
+ /**
1603
+ * Behavior hints synced from the MCP server's tool definition
1604
+ * (ToolAnnotations in the MCP specification). All hints are advisory:
1605
+ * servers are not required to send them, and clients should not rely
1606
+ * on them for security decisions. Absent hints keep the MCP spec
1607
+ * defaults (destructiveHint and openWorldHint default to true;
1608
+ * readOnlyHint and idempotentHint default to false).
1609
+ */
1610
+ export interface MCP_Annotations {
1611
+ /**
1612
+ * A human-readable title for the tool.
1613
+ */
1614
+ title?: string;
1615
+ /**
1616
+ * If true, the tool does not modify its environment.
1617
+ */
1618
+ readOnlyHint?: boolean;
1619
+ /**
1620
+ * If true, the tool may perform destructive updates to its environment.
1621
+ * Only meaningful when read_only_hint is false.
1622
+ */
1623
+ destructiveHint?: boolean;
1624
+ /**
1625
+ * If true, calling the tool repeatedly with the same arguments has no
1626
+ * additional effect. Only meaningful when read_only_hint is false.
1627
+ */
1628
+ idempotentHint?: boolean;
1629
+ /**
1630
+ * If true, the tool may interact with an "open world" of external
1631
+ * entities (e.g. web search); if false, its domain is closed.
1632
+ */
1633
+ openWorldHint?: boolean;
1634
+ }
1635
+ /**
1636
+ * MemoryEntry is a single keyed value within a MemoryLayer. Entries are
1637
+ * addressed by their key, which follows the S3 object key safe-character
1638
+ * convention (see MemoryEntrySpec.key for the full rule). Keys are unique
1639
+ * within a single layer; the same key may appear in multiple layers, in which
1640
+ * case the cascade walk determines which one wins for a given objective (most
1641
+ * specific layer first).
1642
+ *
1643
+ * MemoryEntry is the summary shape, returned by ListMemoryEntries. It does
1644
+ * not carry the entry body — callers that need the body must fetch the entry
1645
+ * individually via GetMemoryEntry, which returns a MemoryEntryDetail.
1646
+ */
1647
+ export interface MemoryEntry {
1648
+ metadata: ResourceMetadata;
1649
+ spec: MemoryEntrySpec;
1650
+ info: MemoryEntryInfo;
1651
+ }
1652
+ /**
1653
+ * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
1654
+ * either inline content or a reference to a completed Upload; exactly one of
1655
+ * the two must be set.
1656
+ */
1657
+ export type MemoryEntryCreateSpec = MemoryEntryCreateSpec_Content | MemoryEntryCreateSpec_UploadId;
1658
+ /**
1659
+ * MemoryEntryDetail is the full representation of an entry, including the
1660
+ * resolved content body. Returned by GetMemoryEntry, CreateMemoryEntry, and
1661
+ * UpdateMemoryEntry.
1662
+ */
1663
+ export interface MemoryEntryDetail {
1664
+ metadata: ResourceMetadata;
1665
+ spec: MemoryEntrySpec;
1666
+ info: MemoryEntryInfo;
1667
+ /**
1668
+ * The resolved body of the entry. For entries created or updated via an
1669
+ * upload_id, this is the ingested content, not the original upload handle.
1670
+ * May be empty; an entry with only a key and description is valid
1671
+ * (e.g., a stub skill being drafted, or an entry where the frontmatter
1672
+ * alone is the payload).
1673
+ */
1674
+ content: string;
1675
+ }
1676
+ export interface MemoryEntryInfo {
1677
+ /**
1678
+ * The layer this entry belongs to.
1679
+ */
1680
+ memoryLayer?: ResourceMetadata;
1681
+ createdBy?: Profile;
1682
+ }
1683
+ /**
1684
+ * MemoryEntrySpec is the metadata portion of an entry — the fields that
1685
+ * identify and describe it, without the body. It appears on both the summary
1686
+ * (MemoryEntry) and detail (MemoryEntryDetail) views.
1687
+ */
1688
+ export interface MemoryEntrySpec {
1689
+ /**
1690
+ * The lookup key for this entry within its layer. Must conform to the S3
1691
+ * object key safe-characters spec: ASCII alphanumerics and the special
1692
+ * characters !, -, _, ., *, ', (, ), and /. Forward slashes may be used to
1693
+ * suggest hierarchy (e.g., "skills/postmortem/write"), but lookups are flat
1694
+ * — the key is a single opaque string, not a path.
1695
+ *
1696
+ * Additional rules enforced by the service:
1697
+ * - May not begin or end with /
1698
+ * - May not contain consecutive slashes (//)
1699
+ * - May not begin with reserved prefixes (cadenya/, system/)
1700
+ * - Case-sensitive
1701
+ * - Unique within the parent layer
1702
+ *
1703
+ * For skills entries, this key is what the model passes to get_memory to
1704
+ * load the entry's content.
1705
+ */
1706
+ key: string;
1707
+ /**
1708
+ * One-line "when to use this" hint shown in the frontmatter manifest for
1709
+ * skills entries. The model uses this to decide whether to load the body,
1710
+ * so it should be written for the model as the audience. Ignored for layer
1711
+ * types that do not advertise frontmatter.
1712
+ */
1713
+ description: string;
1714
+ }
1715
+ /**
1716
+ * MemoryEntryUpdateSpec is the input shape for UpdateMemoryEntry. Fields
1717
+ * present in the request's update_mask are applied; unset fields are left
1718
+ * alone. The source oneof is optional for updates — omit it to leave the
1719
+ * body untouched, or set exactly one branch to replace it.
1720
+ */
1721
+ export interface MemoryEntryUpdateSpec {
1722
+ key?: string;
1723
+ description?: string;
1724
+ content?: string;
1725
+ uploadId?: string;
1726
+ }
1727
+ /**
1728
+ * MemoryLayer is a named container of memory entries that can be composed into
1729
+ * an objective's memory cascade. Layers are workspace-scoped resources. The layer
1730
+ * type controls how its entries participate in the agent loop — see
1731
+ * MemoryLayerType for details.
1732
+ *
1733
+ * See "Memory cascade composition" above for how layers compose at lookup time.
1734
+ */
1735
+ export interface MemoryLayer {
1736
+ metadata: ResourceMetadata;
1737
+ spec: MemoryLayerSpec;
1738
+ info: MemoryLayerInfo;
1739
+ }
1740
+ export interface MemoryLayerInfo {
1741
+ /**
1742
+ * Number of entries currently in this layer.
1743
+ */
1744
+ entryCount: number;
1745
+ createdBy?: Profile;
1746
+ /**
1747
+ * Timestamp of the most recent objective that resolved against this layer.
1748
+ * Useful for surfacing unused layers in the dashboard.
1749
+ */
1750
+ lastUsedAt?: string;
1751
+ /**
1752
+ * For episodic layers, the metadata of the agent the layer belongs to
1753
+ * (resolved from MemoryLayerSpec.agent_id). Unset for non-episodic layers.
1754
+ */
1755
+ agent?: ResourceMetadata;
1756
+ }
1757
+ export type MemoryLayerSpecType = 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
1758
+ export interface MemoryLayerSpec {
1759
+ type: MemoryLayerSpecType;
1760
+ /**
1761
+ * Human-readable description of the layer's purpose. Encouraged for
1762
+ * user-created layers; system-managed layers may have a generated description.
1763
+ */
1764
+ description?: string;
1765
+ /**
1766
+ * Server-set. True for layers managed by the system (e.g., episodic layers
1767
+ * created automatically when an objective uses an episodic_key). System-managed
1768
+ * layers cannot be assigned to objective cascades via the API and cannot be
1769
+ * mutated by clients — their lifecycle is controlled entirely by the runtime.
1770
+ */
1771
+ systemManaged: boolean;
1772
+ /**
1773
+ * For layers with a finite lifetime (e.g., episodic), the time at which the
1774
+ * layer becomes eligible for cleanup. Set by the system; unset for
1775
+ * persistent layers.
1776
+ */
1777
+ expiresAt?: string;
1778
+ /**
1779
+ * Server-set on episodic layers: the agent this layer belongs to. Unset for
1780
+ * non-episodic layers.
1781
+ */
1782
+ agentId: string;
1783
+ /**
1784
+ * Server-set on episodic layers: the caller-supplied episodic key the layer
1785
+ * was created for. Unset for non-episodic layers.
1786
+ */
1787
+ episodicKey: string;
1788
+ }
1789
+ /**
1790
+ * MemoryRead is emitted each time the agent resolves a key against the
1791
+ * memory cascade and loads an entry. Lookups that miss (key not found in
1792
+ * any layer) do not emit this event.
1793
+ */
1794
+ export interface MemoryRead {
1795
+ /**
1796
+ * Human-readable description of the read, set by the runtime. For
1797
+ * example: "Loaded skill", "Resolved context key". Not machine-parsed;
1798
+ * intended for UI display alongside the other events in an objective's
1799
+ * timeline.
1800
+ */
1801
+ message: string;
1802
+ /**
1803
+ * The layer the entry resolved to. The top-most layer that contained
1804
+ * the key — other layers beneath it that also contained the key are
1805
+ * shadowed and not referenced here.
1806
+ */
1807
+ memoryLayerId: string;
1808
+ /**
1809
+ * The specific entry that was read.
1810
+ */
1811
+ memoryEntryId: string;
1812
+ }
1813
+ /**
1814
+ * MemoryReference identifies a memory layer or a specific entry within
1815
+ * one, for composition into a memory cascade. Used on objectives (where
1816
+ * entry pinning is permitted).
1817
+ *
1818
+ * memory_layer_id accepts both the canonical form (memlyr_…) and the
1819
+ * external-id form (external_id:my-custom-id). The same applies to
1820
+ * memory_entry_id when set.
1821
+ */
1822
+ export interface MemoryReference {
1823
+ memoryLayerId: string;
1824
+ /**
1825
+ * When set, inserts only this entry from memory_layer_id into the cascade —
1826
+ * behaves as a single-entry layer (only this key resolves at this
1827
+ * position). The entry must belong to memory_layer_id; mismatches are
1828
+ * rejected with InvalidArgument.
1829
+ */
1830
+ memoryEntryId?: string;
1831
+ }
1832
+ /**
1833
+ * Whether the model is usable in this workspace. Output only. Use the
1834
+ * :enable and :disable actions to transition.
1835
+ */
1836
+ export type ModelState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
1837
+ export interface Model {
1838
+ /**
1839
+ * Resource metadata
1840
+ */
1841
+ metadata: ResourceMetadata;
1842
+ /**
1843
+ * Model specification
1844
+ */
1845
+ spec: ModelSpec;
1846
+ /**
1847
+ * Server-populated info (e.g. the AI provider this model routes through).
1848
+ * Populated on reads when requested; see ListModelsRequest.include_info.
1849
+ */
1850
+ info?: ModelInfo;
1851
+ /**
1852
+ * Whether the model is usable in this workspace. Output only. Use the
1853
+ * :enable and :disable actions to transition.
1854
+ */
1855
+ state: ModelState;
1856
+ }
1857
+ /**
1858
+ * ModelInfo carries server-derived, read-only details about a model.
1859
+ */
1860
+ export interface ModelInfo {
1861
+ /**
1862
+ * The AI provider key powering this model, embedded so clients can read the
1863
+ * provider, key name, and promotional status (info.is_promotional) without a
1864
+ * second lookup. The key's model counts are not populated here; use the AI
1865
+ * provider key endpoints for those.
1866
+ */
1867
+ aiProviderKey?: AIProviderKey;
1868
+ /**
1869
+ * Number of agent variations currently provisioned on this model. Useful for
1870
+ * previewing how many variations a swap would affect.
1871
+ */
1872
+ agentVariationCount: number;
1873
+ /**
1874
+ * Represents the last time this model was used in an agent objective
1875
+ */
1876
+ lastUsedAt?: string;
1877
+ }
1878
+ export interface ModelSpec {
1879
+ /**
1880
+ * The model provider (e.g., "anthropic", "openai", "google")
1881
+ */
1882
+ provider: string;
1883
+ /**
1884
+ * The model family (e.g., "claude-sonnet-4.6", "gpt-5.4", "gemini-2.5-flash")
1885
+ */
1886
+ family: string;
1887
+ /**
1888
+ * Maximum number of input tokens the model supports
1889
+ */
1890
+ maxInputTokens: number;
1891
+ /**
1892
+ * Maximum number of output tokens the model can generate
1893
+ */
1894
+ maxOutputTokens: number;
1895
+ /**
1896
+ * Cost per million input tokens in cents (e.g., 300 = $3.00)
1897
+ */
1898
+ inputPricePerMillionTokens: string;
1899
+ /**
1900
+ * Cost per million output tokens in cents (e.g., 1500 = $15.00)
1901
+ */
1902
+ outputPricePerMillionTokens: string;
1903
+ /**
1904
+ * The inference knobs this model supports. Catalog data; drives which
1905
+ * ModelConfig fields a variation on this model may set. Reasoning support
1906
+ * (and its mode) lives here too, as the "reasoning" capability.
1907
+ */
1908
+ capabilities: Array<ModelSpec_Capability>;
1909
+ }
1910
+ /**
1911
+ * Capability describes one inference knob this model supports, with any
1912
+ * model-specific parameters for it. A variation's ModelConfig may only
1913
+ * set a knob whose capability is listed on the model's spec.
1914
+ */
1915
+ export type ModelSpec_Capability = ModelSpec_Capability_Temperature | ModelSpec_Capability_TopP | ModelSpec_Capability_TopK | ModelSpec_Capability_StopSequences | ModelSpec_Capability_MaxOutputTokens | ModelSpec_Capability_Reasoning | ModelSpec_Capability_Caching;
1916
+ export type NoticeLevel = 'LEVEL_UNSPECIFIED' | 'LEVEL_INFO' | 'LEVEL_WARN';
1917
+ /**
1918
+ * Notice is a non-terminal diagnostic emitted by the runtime when something
1919
+ * noteworthy but non-fatal happens during an objective — for example a
1920
+ * just-in-time tool set failing to load, or a previously loaded tool being
1921
+ * dropped because it was archived. Notices carry no structured payload; they
1922
+ * exist to make the objective timeline self-explanatory.
1923
+ */
1924
+ export interface Notice {
1925
+ level: NoticeLevel;
1926
+ /**
1927
+ * Human-readable description of what happened.
1928
+ */
1929
+ message: string;
1930
+ /**
1931
+ * Stable machine-readable identifier for the notice kind (for example
1932
+ * "tool_set_load_failed", "tool_archived"). Clients can switch on it or use
1933
+ * it as an i18n key; the message is the English fallback.
1934
+ */
1935
+ key: string;
1936
+ }
1937
+ /**
1938
+ * The current lifecycle state of the objective.
1939
+ */
1940
+ export type ObjectiveState = 'STATE_UNSPECIFIED' | 'STATE_PENDING' | 'STATE_RUNNING' | 'STATE_WAITING' | 'STATE_FAILED' | 'STATE_CANCELLED' | 'STATE_FINALIZED' | 'STATE_TIMED_OUT';
1941
+ /**
1942
+ * Objective is the data for an objective. It contains the snapshotted fields for the selected agent and variation. Secrets are returned
1943
+ * only with their names, and the output definition is copied from the agent's configuration.
1944
+ */
1945
+ export interface Objective {
1946
+ metadata: OperationMetadata;
1947
+ /**
1948
+ * The snapshot of the agent and the variation selected (either explicitly or by sampling) will be set here. Cadenya stores
1949
+ * the point-in-time snapshot of the configuration used to start an objective and maintains it throughout the entire lifecycle
1950
+ * so that changes to agents and variations in the middle of a cycle don't impact the objective itself
1951
+ */
1952
+ configSnapshot: ObjectiveConfigSnapshot;
1953
+ /**
1954
+ * The current lifecycle state of the objective.
1955
+ */
1956
+ state: ObjectiveState;
1957
+ /**
1958
+ * Optional human-readable detail about the current state (e.g. a failure reason).
1959
+ */
1960
+ stateMessage: string;
1961
+ /**
1962
+ * Read-only aggregated info about this objective's execution
1963
+ */
1964
+ info?: ObjectiveInfo;
1965
+ /**
1966
+ * system_prompt is read-only, derived from the selected variation's prompt
1967
+ */
1968
+ systemPrompt: string;
1969
+ /**
1970
+ * The first user message in the LLM chat history, either provided explicitly at
1971
+ * creation or rendered from the variation's first_user_message_template.
1972
+ */
1973
+ firstUserMessage: string;
1974
+ /**
1975
+ * A parent objective means the objective was spawned off using a separate agent to complete an objective
1976
+ */
1977
+ parentObjectiveId: string;
1978
+ /**
1979
+ * Secrets that can be used in the headers for tool calls using the secret interpolation format.
1980
+ */
1981
+ secrets: Array<Objective_Secret>;
1982
+ /**
1983
+ * Arbitrary data rendered into the variation's system_prompt_template
1984
+ */
1985
+ systemPromptData?: Record<string, unknown>;
1986
+ /**
1987
+ * Memory layers/entries layered over the baseline cascade inherited
1988
+ * from the selected variation — element-level rules over inherited
1989
+ * styles, in CSS terms.
1990
+ *
1991
+ * Array order is resolution order: EARLIER elements are more specific
1992
+ * and are consulted first. Entries pinned via memory_entry_id behave
1993
+ * as single-entry layers at their position.
1994
+ *
1995
+ * System-managed layers (e.g., episodic) cannot be referenced here;
1996
+ * they attach themselves automatically based on the episodic key.
1997
+ *
1998
+ * Size cap: the TOTAL effective cascade (this field + the variation's
1999
+ * memory layer assignments) must not exceed 10 entries. A request
2000
+ * that would produce a larger cascade is rejected with
2001
+ * InvalidArgument.
2002
+ */
2003
+ memoryCascade: Array<MemoryReference>;
2004
+ /**
2005
+ * The output of the objective, populated when the objective completes. Will match the schema of output_json_schema or output_json_inferred.
2006
+ * This will only be set if the state of the objective is set to STATE_FINALIZED
2007
+ */
2008
+ output?: Record<string, unknown>;
2009
+ /**
2010
+ * Arbitrary data rendered into the variation's first_user_message_template
2011
+ */
2012
+ firstUserMessageData?: Record<string, unknown>;
2013
+ /**
2014
+ * If the agent variation that is selected has episodic memory enabled, then this key is used to create/update a memory layer
2015
+ * specific to the episodic memory. The layer may have a TTL configured by the variation.
2016
+ */
2017
+ episodicMemory?: ObjectiveEpisodicConfig;
2018
+ /**
2019
+ * Parameters forced onto this objective's tool calls, as provided at
2020
+ * creation. See CreateObjectiveRequest.pinned_parameters for semantics.
2021
+ */
2022
+ pinnedParameters: Record<string, string>;
2023
+ }
2024
+ /**
2025
+ * ObjectiveCancelled is the terminal event written when an objective is
2026
+ * cancelled. After this event, the objective is super-terminal: no further
2027
+ * iterations, compaction, or continuation are permitted.
2028
+ */
2029
+ export interface ObjectiveCancelled {
2030
+ /**
2031
+ * Optional human-readable note recorded at cancel time. Today the workflow
2032
+ * sets "Cancelled" but this field leaves room for richer reasons (e.g.
2033
+ * "Cancelled by user", "Cancelled by schedule sweep", "Credit balance exhausted").
2034
+ */
2035
+ message: string;
2036
+ }
2037
+ /**
2038
+ * ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation, and
2039
+ * (when applicable) schedule that an objective was started with.
2040
+ */
2041
+ export interface ObjectiveConfigSnapshot {
2042
+ agent: Agent;
2043
+ agentVariation: AgentVariation;
2044
+ agentSchedule?: AgentSchedule;
2045
+ }
2046
+ /**
2047
+ * ObjectiveContextWindow is a window of chat completions that is grouped together to prevent context-window overflows. Context windows also allow
2048
+ * agents to compact their windows and carry on into a new one.
2049
+ */
2050
+ export interface ObjectiveContextWindow {
2051
+ metadata: OperationMetadata;
2052
+ data: ObjectiveContextWindowData;
2053
+ info?: ObjectiveContextWindowInfo;
2054
+ }
2055
+ export interface ObjectiveContextWindowData {
2056
+ /**
2057
+ * The objective's ID that this window belongs to
2058
+ */
2059
+ objectiveId: string;
2060
+ /**
2061
+ * sequence is a numeric representation of which context window this is. Sequences are useful to perform a max(sequence) on in order
2062
+ * to calculate how many context windows an objective has.
2063
+ */
2064
+ sequence: number;
2065
+ /**
2066
+ * A calculated value for how many prompt tokens (input tokens) have been used in this context window
2067
+ */
2068
+ promptTokens: number;
2069
+ /**
2070
+ * A calculated value for how many completion tokens (output tokens) have been used in this context window
2071
+ */
2072
+ completionTokens: number;
2073
+ /**
2074
+ * The instructions for this window to continue from a previous window's chat history.
2075
+ */
2076
+ previousWindowContinueInstructions: string;
2077
+ }
2078
+ export interface ObjectiveContextWindowInfo {
2079
+ objective?: OperationMetadata;
2080
+ createdBy?: Profile;
2081
+ }
2082
+ /**
2083
+ * ObjectiveDiagnostics is the context-usage breakdown measured for a single
2084
+ * iteration at request-assembly time. It reports how much of the context
2085
+ * window each component occupies so tool parameters, memory cascades, and
2086
+ * prompts can be tuned against real token usage.
2087
+ */
2088
+ export interface ObjectiveDiagnostics {
2089
+ /**
2090
+ * Measured character lengths per context component.
2091
+ */
2092
+ contextLengths: ContextLengths;
2093
+ /**
2094
+ * Input tokens reported by the LLM provider for the iteration's completion.
2095
+ */
2096
+ inputTokens: number;
2097
+ /**
2098
+ * The portion of input_tokens served from the provider's prompt cache.
2099
+ * Lets clients distinguish "big but cached" from "big and paid fresh
2100
+ * every iteration".
2101
+ */
2102
+ cachedInputTokens: number;
2103
+ }
2104
+ /**
2105
+ * Episodic is used to configure the episodic memory for the objective
2106
+ */
2107
+ export interface ObjectiveEpisodicConfig {
2108
+ /**
2109
+ * The caller-supplied episodic key. Objectives created with the same key
2110
+ * (for the same agent) share one episodic memory layer.
2111
+ */
2112
+ key: string;
2113
+ /**
2114
+ * The episodic memory layer resolved (created or reused) for this
2115
+ * objective's key. Populated by the system at objective creation.
2116
+ */
2117
+ memoryLayerId: string;
2118
+ }
2119
+ export interface ObjectiveError {
2120
+ type: string;
2121
+ message: string;
2122
+ }
2123
+ export interface ObjectiveEvent {
2124
+ metadata: OperationMetadata;
2125
+ data: ObjectiveEventData;
2126
+ contextWindowId: string;
2127
+ info?: ObjectiveEventInfo;
2128
+ /**
2129
+ * Elapsed time of the work this event records, when it is known at
2130
+ * write time (e.g. assistant message generation, tool execution for
2131
+ * result/error events). Unset means the event is instantaneous or the
2132
+ * duration is not measurable. Serialized as a canonical duration
2133
+ * string (e.g. "4.1s"). Always set together with started_at.
2134
+ */
2135
+ duration?: string;
2136
+ /**
2137
+ * When the work this event records began. Set together with duration,
2138
+ * so the work interval is [started_at, started_at + duration]. The
2139
+ * event's created_at remains the time the event was persisted.
2140
+ */
2141
+ startedAt?: string;
2142
+ }
2143
+ export type ObjectiveEventData = ObjectiveEventData_UserMessage | ObjectiveEventData_ToolApprovalRequested | ObjectiveEventData_ToolApproved | ObjectiveEventData_ToolDenied | ObjectiveEventData_ToolCalled | ObjectiveEventData_Error | ObjectiveEventData_AssistantMessage | ObjectiveEventData_ToolResult | ObjectiveEventData_ToolError | ObjectiveEventData_ContextWindowCompacted | ObjectiveEventData_MemoryRead | ObjectiveEventData_Cancelled | ObjectiveEventData_SubAgentSpawned | ObjectiveEventData_SubAgentUpdated | ObjectiveEventData_Finalized | ObjectiveEventData_Notice | ObjectiveEventData_TimedOut | ObjectiveEventData_Reasoning;
2144
+ export interface ObjectiveEventInfo {
2145
+ objective?: OperationMetadata;
2146
+ createdBy: Profile;
2147
+ }
2148
+ /**
2149
+ * ObjectiveFeedback represents feedback submitted for an objective's execution.
2150
+ * Feedback is used to score agent variations and improve agent performance over time.
2151
+ */
2152
+ export interface ObjectiveFeedback {
2153
+ metadata: OperationMetadata;
2154
+ data: ObjectiveFeedbackData;
2155
+ info: ObjectiveFeedbackInfo;
2156
+ }
2157
+ export interface ObjectiveFeedbackData {
2158
+ /**
2159
+ * A score between -1.0 and 1.0 representing the quality of the objective's execution.
2160
+ * -1.0 is the worst possible score, 0.0 is neutral, and 1.0 is the best.
2161
+ */
2162
+ score?: number;
2163
+ /**
2164
+ * Optional human-readable comment explaining the feedback
2165
+ */
2166
+ comment?: string;
2167
+ }
2168
+ export interface ObjectiveFeedbackInfo {
2169
+ /**
2170
+ * The profile that submitted the feedback
2171
+ */
2172
+ submittedBy: Profile;
2173
+ /**
2174
+ * The objective the feedback was submitted for.
2175
+ */
2176
+ objective?: BareMetadata;
2177
+ /**
2178
+ * The agent variation that executed the objective this feedback is about.
2179
+ */
2180
+ agentVariation?: BareMetadata;
2181
+ }
2182
+ /**
2183
+ * ObjectiveFinalized is the terminal event written when an objective is
2184
+ * finalized. After this event, the objective is super-terminal: no further
2185
+ * iterations, compaction, or continuation are permitted.
2186
+ */
2187
+ export interface ObjectiveFinalized {
2188
+ /**
2189
+ * If the objective was created with an output schema, and the agent
2190
+ * successfully completed the objective, this field will contain the
2191
+ * structured output of the objective.
2192
+ */
2193
+ output?: Record<string, unknown>;
2194
+ }
2195
+ /**
2196
+ * ObjectiveInfo provides read-only aggregated statistics about an objective's execution
2197
+ */
2198
+ export interface ObjectiveInfo {
2199
+ /**
2200
+ * Total number of events generated during this objective's execution
2201
+ */
2202
+ totalEvents: number;
2203
+ /**
2204
+ * Total number of tool calls made during execution
2205
+ */
2206
+ totalToolCalls: number;
2207
+ /**
2208
+ * Total input tokens consumed across all LLM completions across all context windows
2209
+ */
2210
+ totalInputTokens: number;
2211
+ /**
2212
+ * Total output tokens generated across all LLM completions across all context windows
2213
+ */
2214
+ totalOutputTokens: number;
2215
+ /**
2216
+ * Total number of context windows that this objective has generated
2217
+ */
2218
+ totalContextWindows: number;
2219
+ totalIterations: number;
2220
+ createdBy: Profile;
2221
+ /**
2222
+ * The effective memory cascade at objective creation time: the
2223
+ * episodic layer (when present), then Objective.memory_cascade, then
2224
+ * the variation's baseline layers by ascending position. Order is
2225
+ * resolution order — index 0 is the most specific and is consulted
2226
+ * first; the first layer containing a key wins. Returned on reads so
2227
+ * clients can see exactly what the objective resolves against without
2228
+ * re-joining variation state.
2229
+ */
2230
+ effectiveMemoryCascade: Array<MemoryReference>;
2231
+ /**
2232
+ * Agent details (not snapshotted).
2233
+ */
2234
+ agent: ResourceMetadata;
2235
+ /**
2236
+ * Agent variation details (not snapshotted).
2237
+ */
2238
+ agentVariation: ResourceMetadata;
2239
+ /**
2240
+ * ID of the objective's current (most recent) context window. Hydrated on
2241
+ * demand; empty when the objective has not yet produced a context window.
2242
+ */
2243
+ currentContextWindowId: string;
2244
+ /**
2245
+ * The tenant this objective is associated with, when one was asserted at
2246
+ * creation (directly or via a widget session).
2247
+ */
2248
+ tenant?: TenantReference;
2249
+ /**
2250
+ * The subject (person within the tenant) this objective is associated
2251
+ * with, when one was asserted at creation.
2252
+ */
2253
+ subject?: SubjectReference;
2254
+ /**
2255
+ * The widget this objective's conversation ran through, when it was
2256
+ * created via a widget session.
2257
+ */
2258
+ widget?: BareMetadata;
2259
+ }
2260
+ /**
2261
+ * ObjectiveTask represents a task within an objective, typically created and managed by an AI agent
2262
+ * to track progress toward completing the objective.
2263
+ */
2264
+ export interface ObjectiveTask {
2265
+ metadata: BareMetadata;
2266
+ data: ObjectiveTaskData;
2267
+ }
2268
+ export interface ObjectiveTaskData {
2269
+ /**
2270
+ * The sequential number of this task within the objective (auto-assigned, 1-based)
2271
+ */
2272
+ number: number;
2273
+ /**
2274
+ * Description of the task to be completed
2275
+ */
2276
+ task: string;
2277
+ /**
2278
+ * Whether the task has been completed
2279
+ */
2280
+ completed: boolean;
2281
+ /**
2282
+ * Timestamp when the task was marked as completed
2283
+ */
2284
+ completedAt?: string;
2285
+ }
2286
+ /**
2287
+ * ObjectiveTimedOut is the terminal event written when an objective is
2288
+ * finalized by the inactivity sweep because it saw no activity (no user
2289
+ * messages, no LLM calls) within its variation's inactivity timeout — or the
2290
+ * system-wide 24 hour maximum when no timeout is configured. The objective
2291
+ * produces no output. After this event, the objective is super-terminal: no
2292
+ * further iterations, compaction, or continuation are permitted.
2293
+ */
2294
+ export interface ObjectiveTimedOut {
2295
+ /**
2296
+ * Human-readable note recorded at timeout time (e.g. "Timed out after 2h
2297
+ * of inactivity").
2298
+ */
2299
+ message: string;
2300
+ }
2301
+ /**
2302
+ * ObjectiveTool represents a tool that was assigned to an objective.
2303
+ */
2304
+ export interface ObjectiveTool {
2305
+ metadata: BareMetadata;
2306
+ /**
2307
+ * Snapshot of the tool at the time it was assigned to the objective. Because tools can change over time, snapshots
2308
+ * are used to ensure tools don't change unexpectedly during an objective's lifecycle.
2309
+ */
2310
+ snapshot: Tool;
2311
+ }
2312
+ /**
2313
+ * Current status of the tool call
2314
+ */
2315
+ export type ObjectiveToolCallStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
2316
+ export type ObjectiveToolCallExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
2317
+ /**
2318
+ * ObjectiveToolCall is a record of a tool call made during an objective's execution.
2319
+ * Tool calls are mutable — their status changes as they are approved, denied, or executed.
2320
+ */
2321
+ export interface ObjectiveToolCall {
2322
+ metadata: OperationMetadata;
2323
+ data: ObjectiveToolCallData;
2324
+ /**
2325
+ * Current status of the tool call
2326
+ */
2327
+ status: ObjectiveToolCallStatus;
2328
+ info?: ObjectiveToolCallInfo;
2329
+ executionStatus: ObjectiveToolCallExecutionStatus;
2330
+ }
2331
+ export interface ObjectiveToolCallData {
2332
+ /**
2333
+ * The tool that was called
2334
+ */
2335
+ callable: CallableTool;
2336
+ /**
2337
+ * The arguments passed to the tool
2338
+ */
2339
+ arguments: Record<string, unknown>;
2340
+ /**
2341
+ * A memo supplied by the reviewer when denying the tool call
2342
+ */
2343
+ memo?: string;
2344
+ /**
2345
+ * The profile that changed the status of this tool call. Set when the status is changed to APPROVED or DENIED by a user.
2346
+ */
2347
+ statusChangedBy?: Profile;
2348
+ /**
2349
+ * List of resolved secrets used by the tool call
2350
+ */
2351
+ resolvedSecrets: Array<ResolvedSecret>;
2352
+ }
2353
+ export interface ObjectiveToolCallInfo {
2354
+ objective: OperationMetadata;
2355
+ createdBy?: Profile;
2356
+ tool?: BareMetadata;
2357
+ toolSet?: BareMetadata;
2358
+ }
2359
+ /**
2360
+ * ObjectiveToolCallResult is the content a tool returned after execution.
2361
+ * Tools can return multiple content blocks, and blocks can be multi-modal
2362
+ * (text, image, audio). Media blocks are stored by Cadenya and served as
2363
+ * short-lived signed URLs rather than inline bytes.
2364
+ */
2365
+ export interface ObjectiveToolCallResult {
2366
+ content: Array<ObjectiveToolCallResult_ContentBlock>;
2367
+ }
2368
+ export interface ObjectiveToolCallResult_AudioBlock {
2369
+ /**
2370
+ * Short-lived signed URL to download the stored audio.
2371
+ */
2372
+ url: string;
2373
+ /**
2374
+ * IANA media type of the stored audio, e.g. audio/wav.
2375
+ */
2376
+ mimeType: string;
2377
+ /**
2378
+ * Size of the stored audio in bytes.
2379
+ */
2380
+ sizeBytes: string;
2381
+ /**
2382
+ * When the signed URL expires.
2383
+ */
2384
+ expiresAt: string;
2385
+ }
2386
+ /**
2387
+ * ContentBlock is a single block of tool result content. Exactly one of
2388
+ * the variants is set.
2389
+ */
2390
+ export type ObjectiveToolCallResult_ContentBlock = ObjectiveToolCallResult_ContentBlock_Text | ObjectiveToolCallResult_ContentBlock_Image | ObjectiveToolCallResult_ContentBlock_Audio;
2391
+ export interface ObjectiveToolCallResult_ImageBlock {
2392
+ /**
2393
+ * Short-lived signed URL to download the stored image.
2394
+ */
2395
+ url: string;
2396
+ /**
2397
+ * IANA media type of the stored image, e.g. image/png.
2398
+ */
2399
+ mimeType: string;
2400
+ /**
2401
+ * Size of the stored image in bytes.
2402
+ */
2403
+ sizeBytes: string;
2404
+ /**
2405
+ * When the signed URL expires.
2406
+ */
2407
+ expiresAt: string;
2408
+ }
2409
+ export interface ObjectiveToolCallResult_TextBlock {
2410
+ text: string;
2411
+ }
2412
+ /**
2413
+ * Current status of the tool call
2414
+ */
2415
+ export type ObjectiveToolCallWithResultStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
2416
+ export type ObjectiveToolCallWithResultExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
2417
+ /**
2418
+ * ObjectiveToolCallWithResult is an ObjectiveToolCall plus the content the
2419
+ * tool returned. Returned by GetObjectiveToolCall.
2420
+ */
2421
+ export interface ObjectiveToolCallWithResult {
2422
+ metadata: OperationMetadata;
2423
+ data: ObjectiveToolCallData;
2424
+ /**
2425
+ * Current status of the tool call
2426
+ */
2427
+ status: ObjectiveToolCallWithResultStatus;
2428
+ info: ObjectiveToolCallInfo;
2429
+ executionStatus: ObjectiveToolCallWithResultExecutionStatus;
2430
+ /**
2431
+ * The content returned by the tool. Only set once execution_status is
2432
+ * TOOL_CALL_EXECUTION_STATUS_COMPLETED.
2433
+ */
2434
+ result?: ObjectiveToolCallResult;
2435
+ /**
2436
+ * List of resolved secrets used by the tool call
2437
+ */
2438
+ resolvedSecrets: Array<ResolvedSecret>;
2439
+ }
2440
+ export interface Objective_Secret {
2441
+ name: string;
2442
+ }
2443
+ /**
2444
+ * Omit tool request
2445
+ */
2446
+ export interface OmitToolRequest {
2447
+ /**
2448
+ * Workspace ID.
2449
+ */
2450
+ workspaceId?: string;
2451
+ /**
2452
+ * Tool set ID. Accepts the canonical ts_… form or the
2453
+ * external_id:<value> form.
2454
+ */
2455
+ toolSetId?: string;
2456
+ /**
2457
+ * Tool ID. Accepts the canonical tool_… form or the
2458
+ * external_id:<value> form.
2459
+ */
2460
+ id?: string;
2461
+ }
2462
+ /**
2463
+ * OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI
2464
+ * Chat Completions API. The base URL is required and its model catalog is
2465
+ * discovered live via GET {base_url}/models.
2466
+ */
2467
+ export interface OpenAICompatibleConfig {
2468
+ baseUrl: string;
2469
+ }
2470
+ /**
2471
+ * OpenAIConfig holds OpenAI-specific settings.
2472
+ */
2473
+ export interface OpenAIConfig {
2474
+ /**
2475
+ * Sent as the OpenAI-Organization header when set.
2476
+ */
2477
+ organizationId?: string;
2478
+ /**
2479
+ * Sent as the OpenAI-Project header when set.
2480
+ */
2481
+ projectId?: string;
2482
+ }
2483
+ /**
2484
+ * OpenRouterConfig holds OpenRouter-specific settings.
2485
+ */
2486
+ export interface OpenRouterConfig {
2487
+ /**
2488
+ * Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
2489
+ */
2490
+ region?: string;
2491
+ }
2492
+ /**
2493
+ * Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)
2494
+ */
2495
+ export interface OperationMetadata {
2496
+ /**
2497
+ * Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...")
2498
+ */
2499
+ id: string;
2500
+ /**
2501
+ * Account this operation belongs to for multi-tenant isolation (prefixed ULID)
2502
+ */
2503
+ accountId: string;
2504
+ /**
2505
+ * Workspace this operation belongs to for organizational grouping (prefixed ULID)
2506
+ */
2507
+ workspaceId: string;
2508
+ /**
2509
+ * Key-value pairs for categorization and filtering. Values are 0-63
2510
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
2511
+ * follow the same shape and additionally accept an optional DNS-subdomain
2512
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
2513
+ * Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}
2514
+ */
2515
+ labels: Record<string, string>;
2516
+ /**
2517
+ * Timestamp when this operation was created
2518
+ * ULID includes timestamp information, but this explicit field enables easier querying
2519
+ */
2520
+ createdAt: string;
2521
+ /**
2522
+ * External ID for the operation (e.g., a workflow ID from an external system)
2523
+ */
2524
+ externalId: string;
2525
+ /**
2526
+ * ID of the actor (user or service account) that created this operation
2527
+ */
2528
+ profileId: string;
2529
+ }
2530
+ /**
2531
+ * Page carries cursor-based pagination state. There is no total: the cursor
2532
+ * walks the result set without ever counting it, and a count would cost a second
2533
+ * query on every list.
2534
+ */
2535
+ export interface Page {
2536
+ nextCursor: string;
2537
+ }
2538
+ /**
2539
+ * Pause agent schedule request.
2540
+ */
2541
+ export interface PauseAgentScheduleRequest {
2542
+ /**
2543
+ * Workspace ID.
2544
+ */
2545
+ workspaceId?: string;
2546
+ /**
2547
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
2548
+ */
2549
+ agentId?: string;
2550
+ /**
2551
+ * Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form.
2552
+ */
2553
+ id?: string;
2554
+ }
2555
+ /**
2556
+ * A profile identifies a user or non-human principal (such as an API key)
2557
+ * at the account level. Profiles are account-scoped and can be granted access
2558
+ * to multiple workspaces.
2559
+ */
2560
+ export interface Profile {
2561
+ metadata: AccountResourceMetadata;
2562
+ spec: ProfileSpec;
2563
+ }
2564
+ /**
2565
+ * Whether this profile represents a human user, an API key, or a system
2566
+ * principal.
2567
+ */
2568
+ export type ProfileSpecType = 'PROFILE_TYPE_UNSPECIFIED' | 'PROFILE_TYPE_USER' | 'PROFILE_TYPE_API_KEY' | 'PROFILE_TYPE_SYSTEM';
2569
+ /**
2570
+ * Configuration for a profile.
2571
+ */
2572
+ export interface ProfileSpec {
2573
+ /**
2574
+ * Email address of the profile. Required and unique within an account for
2575
+ * user profiles.
2576
+ */
2577
+ email: string;
2578
+ /**
2579
+ * Display name (e.g., "Bobby Tables").
2580
+ */
2581
+ name: string;
2582
+ /**
2583
+ * Whether this profile represents a human user, an API key, or a system
2584
+ * principal.
2585
+ */
2586
+ type: ProfileSpecType;
2587
+ }
2588
+ /**
2589
+ * Publish agent request
2590
+ */
2591
+ export interface PublishAgentRequest {
2592
+ /**
2593
+ * Workspace ID.
2594
+ */
2595
+ workspaceId?: string;
2596
+ /**
2597
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
2598
+ */
2599
+ id?: string;
2600
+ }
2601
+ /**
2602
+ * Reasoning carries the human-readable reasoning text a model produced while
2603
+ * working on an iteration — extended thinking (Anthropic, Gemini) or reasoning
2604
+ * summaries (OpenAI). It is emitted alongside the assistant message from the
2605
+ * same model response and is purely informational: the text shown here is
2606
+ * never sent back to the model.
2607
+ */
2608
+ export interface Reasoning {
2609
+ /**
2610
+ * The reasoning text. May be a verbatim chain of thought or a
2611
+ * provider-generated summary depending on the model.
2612
+ */
2613
+ content: string;
2614
+ }
2615
+ export type ResolvedSecretSource = 'RESOLVED_SECRET_SOURCE_UNSPECIFIED' | 'RESOLVED_SECRET_SOURCE_WORKSPACE' | 'RESOLVED_SECRET_SOURCE_TOOLSET' | 'RESOLVED_SECRET_SOURCE_OBJECTIVE';
2616
+ /**
2617
+ * ResolvedSecret is a resolved secret value from the workspace, toolset, or objective. When a tool is called, it will rely
2618
+ * on secrets in the order of:
2619
+ * - Objective
2620
+ * - Toolset
2621
+ * - Workspace
2622
+ */
2623
+ export interface ResolvedSecret {
2624
+ key: string;
2625
+ source: ResolvedSecretSource;
2626
+ }
2627
+ /**
2628
+ * Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
2629
+ */
2630
+ export interface ResourceMetadata {
2631
+ /**
2632
+ * Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")
2633
+ */
2634
+ id: string;
2635
+ /**
2636
+ * Account this resource belongs to for multi-tenant isolation (prefixed ULID)
2637
+ */
2638
+ accountId: string;
2639
+ /**
2640
+ * Workspace this resource belongs to for organizational grouping (prefixed ULID)
2641
+ */
2642
+ workspaceId: string;
2643
+ /**
2644
+ * Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool")
2645
+ * Required for resources that users interact with directly
2646
+ */
2647
+ name: string;
2648
+ /**
2649
+ * External ID for the resource (e.g., a workflow ID from an external system)
2650
+ */
2651
+ externalId: string;
2652
+ /**
2653
+ * Key-value pairs for categorization and filtering. Values are 0-63
2654
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
2655
+ * follow the same shape and additionally accept an optional DNS-subdomain
2656
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
2657
+ * Examples: {"environment": "production", "team": "platform", "version": "v2"}
2658
+ */
2659
+ labels: Record<string, string>;
2660
+ /**
2661
+ * ID of the actor (user or service account) that created this resource
2662
+ */
2663
+ profileId: string;
2664
+ /**
2665
+ * Timestamp when this resource was created
2666
+ */
2667
+ createdAt: string;
2668
+ /**
2669
+ * Timestamp when this resource was last updated
2670
+ */
2671
+ updatedAt?: string;
2672
+ }
2673
+ /**
2674
+ * Restore tool request
2675
+ */
2676
+ export interface RestoreToolRequest {
2677
+ /**
2678
+ * Workspace ID.
2679
+ */
2680
+ workspaceId?: string;
2681
+ /**
2682
+ * Tool set ID. Accepts the canonical ts_… form or the
2683
+ * external_id:<value> form.
2684
+ */
2685
+ toolSetId?: string;
2686
+ /**
2687
+ * Tool ID. Accepts the canonical tool_… form or the
2688
+ * external_id:<value> form.
2689
+ */
2690
+ id?: string;
2691
+ }
2692
+ /**
2693
+ * Resume agent schedule request.
2694
+ */
2695
+ export interface ResumeAgentScheduleRequest {
2696
+ /**
2697
+ * Workspace ID.
2698
+ */
2699
+ workspaceId?: string;
2700
+ /**
2701
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
2702
+ */
2703
+ agentId?: string;
2704
+ /**
2705
+ * Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form.
2706
+ */
2707
+ id?: string;
2708
+ }
2709
+ /**
2710
+ * Revoke widget session request.
2711
+ */
2712
+ export interface RevokeWidgetSessionRequest {
2713
+ /**
2714
+ * Workspace ID.
2715
+ */
2716
+ workspaceId?: string;
2717
+ /**
2718
+ * Session ID. Accepts the canonical `wsess_…` form or the `external_id:<value>` form.
2719
+ */
2720
+ id?: string;
2721
+ }
2722
+ export interface RotateAPIKeyRequest {
2723
+ /**
2724
+ * The workspace the API key belongs to (path).
2725
+ */
2726
+ workspaceId?: string;
2727
+ /**
2728
+ * The API key to rotate. A new token is issued and any existing token is
2729
+ * invalidated.
2730
+ */
2731
+ id?: string;
2732
+ }
2733
+ /**
2734
+ * Response containing the newly generated challenge token.
2735
+ */
2736
+ export interface RotateChallengeTokenResponse {
2737
+ challengeToken: string;
2738
+ }
2739
+ /**
2740
+ * Response containing the newly generated webhook signing secret.
2741
+ */
2742
+ export interface RotateWebhookEventsHmacSecretResponse {
2743
+ webhookEventsHmacSecret: string;
2744
+ }
2745
+ /**
2746
+ * Calendar is a wall-clock rule. Empty field-list semantics:
2747
+ * - second/minute/hour: empty means [{start: 0}] (top of the unit)
2748
+ * - day_of_month/month/day_of_week: empty means "any value"
2749
+ * Fire times = cartesian product across all fields.
2750
+ */
2751
+ export interface Schedule_Calendar {
2752
+ second?: Array<Schedule_Range>;
2753
+ minute?: Array<Schedule_Range>;
2754
+ hour?: Array<Schedule_Range>;
2755
+ dayOfMonth?: Array<Schedule_Range>;
2756
+ month?: Array<Schedule_Range>;
2757
+ dayOfWeek?: Array<Schedule_Range>;
2758
+ comment?: string;
2759
+ }
2760
+ /**
2761
+ * Interval is a duration-based rule. Fires every `every` from a stable
2762
+ * anchor (workspace epoch), optionally phase-shifted by `offset`.
2763
+ */
2764
+ export interface Schedule_Interval {
2765
+ every?: string;
2766
+ /**
2767
+ * Phase shift within `every`. Must be < `every` (enforced at runtime).
2768
+ */
2769
+ offset?: string;
2770
+ }
2771
+ /**
2772
+ * Inclusive numeric range with optional step.
2773
+ * {start: 9} → 9
2774
+ * {start: 9, end: 17} → 9..17
2775
+ * {start: 0, end: 59, step: 15} → 0,15,30,45
2776
+ * `end` defaults to `start`; `step` defaults to 1.
2777
+ */
2778
+ export interface Schedule_Range {
2779
+ start?: number;
2780
+ end?: number;
2781
+ step?: number;
2782
+ }
2783
+ export interface SearchToolsOrToolSetsResponse {
2784
+ tools: Array<Tool>;
2785
+ toolSets: Array<ToolSet>;
2786
+ agents: Array<Agent>;
2787
+ }
2788
+ /**
2789
+ * SetToolCallContentRequest lets an external API consumer supply the result
2790
+ * of a bare tool call (one whose tool set has no execution adapter). Used
2791
+ * for human-in-the-loop tools and reverse harnesses that execute tools
2792
+ * locally and report results back.
2793
+ */
2794
+ export interface SetToolCallContentRequest {
2795
+ workspaceId?: string;
2796
+ /**
2797
+ * The ID of the objective. Supports "external_id:" prefix for external IDs.
2798
+ */
2799
+ objectiveId?: string;
2800
+ /**
2801
+ * The ID of the tool call to set content for
2802
+ */
2803
+ toolCallId?: string;
2804
+ /**
2805
+ * The content to set on the tool call. Mirrors
2806
+ * ObjectiveToolCallResult.ContentBlock but writable: media blocks carry
2807
+ * raw data on input where the result-side carries a signed url on output.
2808
+ */
2809
+ content: Array<SetToolCallContentRequest_ContentBlock>;
2810
+ }
2811
+ export interface SetToolCallContentRequest_AudioBlock {
2812
+ /**
2813
+ * Base64-encoded audio bytes.
2814
+ */
2815
+ data: string;
2816
+ /**
2817
+ * IANA media type of the audio, e.g. audio/wav.
2818
+ */
2819
+ mimeType: string;
2820
+ }
2821
+ /**
2822
+ * ContentBlock is a single block of tool call content supplied on input.
2823
+ * Exactly one of the variants is set.
2824
+ */
2825
+ export type SetToolCallContentRequest_ContentBlock = SetToolCallContentRequest_ContentBlock_Text | SetToolCallContentRequest_ContentBlock_Image | SetToolCallContentRequest_ContentBlock_Audio;
2826
+ export interface SetToolCallContentRequest_ImageBlock {
2827
+ /**
2828
+ * Base64-encoded image bytes.
2829
+ */
2830
+ data: string;
2831
+ /**
2832
+ * IANA media type of the image, e.g. image/png.
2833
+ */
2834
+ mimeType: string;
2835
+ }
2836
+ export interface SetToolCallContentRequest_TextBlock {
2837
+ text: string;
2838
+ }
2839
+ /**
2840
+ * The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
2841
+ */
2842
+ export interface Status {
2843
+ /**
2844
+ * The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
2845
+ */
2846
+ code?: number;
2847
+ /**
2848
+ * A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
2849
+ */
2850
+ message?: string;
2851
+ /**
2852
+ * A list of messages that carry the error details. There is a common set of message types for APIs to use.
2853
+ */
2854
+ details?: Array<GoogleProtobufAny>;
2855
+ }
2856
+ export interface SubAgentSpawned {
2857
+ agent: ResourceMetadata;
2858
+ objective: OperationMetadata;
2859
+ task: string;
2860
+ }
2861
+ export type SubAgentUpdatedStatus = 'STATUS_UNSPECIFIED' | 'STATUS_PENDING' | 'STATUS_RUNNING' | 'STATUS_COMPLETED' | 'STATUS_FAILED' | 'STATUS_CANCELLED';
2862
+ export interface SubAgentUpdated {
2863
+ agent?: BareMetadata;
2864
+ objective?: BareMetadata;
2865
+ status: SubAgentUpdatedStatus;
2866
+ message?: string;
2867
+ }
2868
+ /**
2869
+ * Subject is a person within a tenant as a readable record. Like Tenant it
2870
+ * carries no spec — `metadata.external_id` is the customer's key for them,
2871
+ * unique within the tenant rather than the workspace.
2872
+ */
2873
+ export interface Subject {
2874
+ metadata: ResourceMetadata;
2875
+ info?: SubjectInfo;
2876
+ }
2877
+ /**
2878
+ * SubjectAssertion identifies a person within a tenant in the customer's own
2879
+ * namespace — typically their user id. Asserting a subject upserts the
2880
+ * subject record under the asserted tenant and associates the created
2881
+ * resource with it. A subject assertion is only valid alongside a tenant
2882
+ * assertion: subject identifiers are scoped to their tenant.
2883
+ */
2884
+ export interface SubjectAssertion {
2885
+ /**
2886
+ * The subject identifier in the customer's namespace (e.g. their user id).
2887
+ * Stored as the subject record's external_id; unique within the tenant.
2888
+ */
2889
+ id: string;
2890
+ /**
2891
+ * Optional human-readable name for the subject. Updates the subject
2892
+ * record's name on every assertion that provides it.
2893
+ */
2894
+ name?: string;
2895
+ }
2896
+ /**
2897
+ * SubjectInfo provides read-only server-derived data about a subject.
2898
+ */
2899
+ export interface SubjectInfo {
2900
+ /**
2901
+ * The tenant this subject belongs to.
2902
+ */
2903
+ tenant: TenantReference;
2904
+ /**
2905
+ * Number of objectives associated with this subject.
2906
+ */
2907
+ objectiveCount: number;
2908
+ }
2909
+ /**
2910
+ * SubjectReference is the read-only echo of a resource's subject association,
2911
+ * carrying both Cadenya's canonical id and the customer's own key.
2912
+ */
2913
+ export interface SubjectReference {
2914
+ /**
2915
+ * Cadenya's canonical subject id.
2916
+ */
2917
+ id: string;
2918
+ /**
2919
+ * The subject identifier in the customer's namespace, as asserted. Unique
2920
+ * within the subject's tenant.
2921
+ */
2922
+ externalId: string;
2923
+ /**
2924
+ * Human-readable name of the subject, when one has been asserted.
2925
+ */
2926
+ name?: string;
2927
+ }
2928
+ /**
2929
+ * Swap model on variations request. Each ModelSwap reassigns every agent
2930
+ * variation on current_model_id to next_model_id. The work runs asynchronously.
2931
+ */
2932
+ export interface SwapModelOnVariationsRequest {
2933
+ /**
2934
+ * Workspace ID.
2935
+ */
2936
+ workspaceId?: string;
2937
+ /**
2938
+ * The swaps to perform.
2939
+ */
2940
+ modelSwaps?: Array<SwapModelOnVariationsRequest_ModelSwap>;
2941
+ }
2942
+ export interface SwapModelOnVariationsRequest_ModelSwap {
2943
+ /**
2944
+ * The model variations are currently on. Accepts an id or "external_id:" slug.
2945
+ */
2946
+ currentModelId?: string;
2947
+ /**
2948
+ * The model to move variations to. Accepts an id or "external_id:" slug.
2949
+ */
2950
+ nextModelId?: string;
2951
+ /**
2952
+ * Whether to disable the current model after the swap.
2953
+ */
2954
+ disableCurrentAfterSwap?: boolean;
2955
+ }
2956
+ /**
2957
+ * Swap model on variations response. Empty: the work runs asynchronously, so no
2958
+ * counts are returned (a large data set would make the call slow).
2959
+ */
2960
+ export interface SwapModelOnVariationsResponse {
2961
+ }
2962
+ /**
2963
+ * Emitted when a tool set sync operation completes successfully.
2964
+ */
2965
+ export interface SyncCompleted {
2966
+ /**
2967
+ * Number of tools synced.
2968
+ */
2969
+ toolsSynced: number;
2970
+ /**
2971
+ * Optional message with additional details.
2972
+ */
2973
+ message: string;
2974
+ }
2975
+ /**
2976
+ * Emitted when a tool set sync operation fails.
2977
+ */
2978
+ export interface SyncFailed {
2979
+ /**
2980
+ * Indicates this is an error event.
2981
+ */
2982
+ error: boolean;
2983
+ /**
2984
+ * Error message describing what went wrong.
2985
+ */
2986
+ message: string;
2987
+ /**
2988
+ * Optional error type/code for programmatic handling.
2989
+ */
2990
+ errorType: string;
2991
+ }
2992
+ /**
2993
+ * Emitted when a tool set sync operation begins.
2994
+ */
2995
+ export interface SyncStarted {
2996
+ /**
2997
+ * Human-readable message describing the start of the sync.
2998
+ */
2999
+ message: string;
3000
+ }
3001
+ /**
3002
+ * The current lifecycle state of the tenant. Output only.
3003
+ */
3004
+ export type TenantState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ERASING';
3005
+ /**
3006
+ * Tenant is the customer's organization as a readable record rather than an
3007
+ * echo. It carries no spec: a tenant is never configured, only asserted, so
3008
+ * everything about it lives in the metadata envelope — `external_id` is the key
3009
+ * the customer asserted it under, `name` is the most recent name they asserted,
3010
+ * and `updated_at` is therefore when the tenant was last asserted.
3011
+ */
3012
+ export interface Tenant {
3013
+ metadata: ResourceMetadata;
3014
+ info?: TenantInfo;
3015
+ /**
3016
+ * The current lifecycle state of the tenant. Output only.
3017
+ */
3018
+ state: TenantState;
3019
+ }
3020
+ /**
3021
+ * TenantAssertion identifies a tenant in the customer's own namespace — their
3022
+ * org, company, or team identifier for an end user. Asserting a tenant
3023
+ * upserts the tenant record in the workspace (keyed on `id` as the tenant's
3024
+ * external_id) and associates the created resource with it.
3025
+ */
3026
+ export interface TenantAssertion {
3027
+ /**
3028
+ * The tenant identifier in the customer's namespace (e.g. "acme-corp").
3029
+ * Stored as the tenant record's external_id; stable across requests.
3030
+ */
3031
+ id: string;
3032
+ /**
3033
+ * Optional human-readable name for the tenant. Updates the tenant record's
3034
+ * name on every assertion that provides it.
3035
+ */
3036
+ name?: string;
3037
+ }
3038
+ /**
3039
+ * TenantInfo provides read-only server-derived data about a tenant.
3040
+ */
3041
+ export interface TenantInfo {
3042
+ /**
3043
+ * Number of subjects asserted under this tenant.
3044
+ */
3045
+ subjectCount: number;
3046
+ /**
3047
+ * Number of objectives associated with this tenant, across every surface —
3048
+ * widget conversations and objectives created directly against the API
3049
+ * alike. This is the footprint a delete would destroy, which is why it is
3050
+ * worth the count query that populating `info` costs.
3051
+ */
3052
+ objectiveCount: number;
3053
+ /**
3054
+ * Number of widget sessions minted for this tenant that still exist.
3055
+ */
3056
+ widgetSessionCount: number;
3057
+ }
3058
+ /**
3059
+ * TenantReference is the read-only echo of a resource's tenant association,
3060
+ * carrying both Cadenya's canonical id and the customer's own key.
3061
+ */
3062
+ export interface TenantReference {
3063
+ /**
3064
+ * Cadenya's canonical tenant id.
3065
+ */
3066
+ id: string;
3067
+ /**
3068
+ * The tenant identifier in the customer's namespace, as asserted.
3069
+ */
3070
+ externalId: string;
3071
+ /**
3072
+ * Human-readable name of the tenant, when one has been asserted.
3073
+ */
3074
+ name?: string;
3075
+ }
3076
+ /**
3077
+ * The current lifecycle state of the tool. Output only. Use the :omit and
3078
+ * :restore actions to transition; tool set syncs may also update it.
3079
+ */
3080
+ export type ToolState = 'STATE_UNSPECIFIED' | 'STATE_AVAILABLE' | 'STATE_OMITTED' | 'STATE_ARCHIVED';
3081
+ export interface Tool {
3082
+ metadata: ResourceMetadata;
3083
+ spec: ToolSpec;
3084
+ info?: ToolInfo;
3085
+ /**
3086
+ * The current lifecycle state of the tool. Output only. Use the :omit and
3087
+ * :restore actions to transition; tool set syncs may also update it.
3088
+ */
3089
+ state: ToolState;
3090
+ }
3091
+ export interface ToolApprovalRequested {
3092
+ /**
3093
+ * The ID of the objective tool call record. Use this ID with the ApproveToolCall or DenyToolCall RPCs to approve or deny the tool call.
3094
+ */
3095
+ toolCallId: string;
3096
+ }
3097
+ export interface ToolApproved {
3098
+ /**
3099
+ * The ID of the objective tool call record that was approved via the ApproveToolCall RPC.
3100
+ */
3101
+ toolCallId: string;
3102
+ }
3103
+ export interface ToolCalled {
3104
+ /**
3105
+ * The ID of the objective tool call record that was executed.
3106
+ */
3107
+ toolCallId: string;
3108
+ /**
3109
+ * The tool that was called.
3110
+ */
3111
+ tool?: CallableTool;
3112
+ /**
3113
+ * The called tool's adapter configuration, including the bare adapter
3114
+ * marker for bare tools. Lets a webhook consumer act on the call (e.g.
3115
+ * detect a bare tool call and prepare to supply its content) without a
3116
+ * round-trip to GetObjectiveToolCall.
3117
+ */
3118
+ config?: ToolSpec_Config;
3119
+ /**
3120
+ * The arguments passed to the tool.
3121
+ */
3122
+ arguments?: Record<string, unknown>;
3123
+ }
3124
+ export interface ToolDenied {
3125
+ /**
3126
+ * The ID of the objective tool call record that was denied via the DenyToolCall RPC.
3127
+ */
3128
+ toolCallId: string;
3129
+ /**
3130
+ * The memo provided by the reviewer when denying the tool call. This is passed to the agent to provide further instructions.
3131
+ */
3132
+ memo: string;
3133
+ }
3134
+ export interface ToolError {
3135
+ /**
3136
+ * The ID of the objective tool call record that encountered an error during execution.
3137
+ */
3138
+ toolCallId: string;
3139
+ message: string;
3140
+ }
3141
+ export interface ToolInfo {
3142
+ toolSet?: ResourceMetadata;
3143
+ createdBy?: Profile;
3144
+ /**
3145
+ * Content signature identifying the tool within its tool set: a hash of the
3146
+ * sanitized llm_tool_name, description, and canonical parameters. Two tools
3147
+ * with the same llm_tool_name but different parameters or description (as
3148
+ * MCP servers may return per user) have distinct signatures.
3149
+ */
3150
+ signature: string;
3151
+ }
3152
+ export interface ToolResult {
3153
+ toolCallId: string;
3154
+ /**
3155
+ * The content returned by the tool.
3156
+ */
3157
+ result: ObjectiveToolCallResult;
3158
+ }
3159
+ /**
3160
+ * The current lifecycle state of the tool set. Output only. Tool sets are
3161
+ * created STATE_ACTIVE; use the :archive and :unarchive actions to
3162
+ * transition between states.
3163
+ */
3164
+ export type ToolSetState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
3165
+ export interface ToolSet {
3166
+ metadata: ResourceMetadata;
3167
+ spec: ToolSetSpec;
3168
+ /**
3169
+ * Tool set information
3170
+ */
3171
+ info?: ToolSetInfo;
3172
+ /**
3173
+ * The current lifecycle state of the tool set. Output only. Tool sets are
3174
+ * created STATE_ACTIVE; use the :archive and :unarchive actions to
3175
+ * transition between states.
3176
+ */
3177
+ state: ToolSetState;
3178
+ }
3179
+ export type ToolSetAdapter = ToolSetAdapter_McpVariant | ToolSetAdapter_HttpVariant | ToolSetAdapter_OpenapiVariant | ToolSetAdapter_BareVariant;
3180
+ /**
3181
+ * Approval filters that will automatically set the approval requirement on tools synced from an external source
3182
+ */
3183
+ export type ToolSetAdapter_ApprovalRequirementFilter = ToolSetAdapter_ApprovalRequirementFilter_Always | ToolSetAdapter_ApprovalRequirementFilter_Only;
3184
+ export type ToolSetAdapterAttributeFilterAttribute = 'ATTRIBUTE_UNSPECIFIED' | 'ATTRIBUTE_NAME' | 'ATTRIBUTE_TITLE' | 'ATTRIBUTE_DESCRIPTION';
3185
+ /**
3186
+ * Single attribute filter
3187
+ */
3188
+ export interface ToolSetAdapter_AttributeFilter {
3189
+ attribute: ToolSetAdapterAttributeFilterAttribute;
3190
+ matcher?: ToolSetAdapter_StringMatcher;
3191
+ }
3192
+ /**
3193
+ * Bare tool sets define tools without an execution adapter. A bare tool
3194
+ * call doesn't fire anything: the objective's workflow pauses and waits
3195
+ * for an external API consumer to set the tool call's content (e.g.
3196
+ * human-in-the-loop tools, or a reverse harness that polls for pending
3197
+ * tool calls, executes locally, and reports results back via
3198
+ * SetToolCallContent).
3199
+ */
3200
+ export interface ToolSetAdapter_Bare {
3201
+ /**
3202
+ * How long to wait for content to be set before the tool call errors.
3203
+ * If unset, the call waits indefinitely.
3204
+ */
3205
+ contentTimeout?: number;
3206
+ }
3207
+ export interface ToolSetAdapter_HTTP {
3208
+ baseUrl?: string;
3209
+ headers?: Record<string, string>;
3210
+ }
3211
+ /**
3212
+ * Defines behavior for just-in-time capable tool set adapters (IE: MCP).
3213
+ */
3214
+ export interface ToolSetAdapter_JustInTime {
3215
+ enabled?: boolean;
3216
+ /**
3217
+ * If set, an objective will automatically be failed if tools cannot be loaded
3218
+ * in the initial stages of an objective being created. Tools are loaded asynchronously,
3219
+ * so this setting is useful for ensuring that an objective continued any further if tools are not available.
3220
+ */
3221
+ failObjectiveOnToolListError?: boolean;
3222
+ }
3223
+ export interface ToolSetAdapter_MCP {
3224
+ url?: string;
3225
+ headers?: Record<string, string>;
3226
+ /**
3227
+ * Include/exclude with flat filters
3228
+ */
3229
+ includeTools?: ToolSetAdapter_ToolFilter;
3230
+ excludeTools?: ToolSetAdapter_ToolFilter;
3231
+ /**
3232
+ * Setting for how to assign tool approval requirements when they are synced from an MCP server
3233
+ */
3234
+ toolApprovals?: ToolSetAdapter_ApprovalRequirementFilter;
3235
+ /**
3236
+ * When enabled, tools are loaded from the MCP server just-in-time at
3237
+ * objective creation using the objective's resolved secrets, instead of
3238
+ * being synced ahead of time. Just-in-time tool sets are excluded from
3239
+ * the background sync system.
3240
+ */
3241
+ justInTime?: ToolSetAdapter_JustInTime;
3242
+ }
3243
+ export type ToolSetAdapter_OpenAPI = ToolSetAdapter_OpenAPI_Url | ToolSetAdapter_OpenAPI_UploadId;
3244
+ /**
3245
+ * String matching operations
3246
+ */
3247
+ export type ToolSetAdapter_StringMatcher = ToolSetAdapter_StringMatcher_Exact | ToolSetAdapter_StringMatcher_StartsWith | ToolSetAdapter_StringMatcher_EndsWith | ToolSetAdapter_StringMatcher_Contains | ToolSetAdapter_StringMatcher_Regex;
3248
+ export type ToolSetAdapterToolFilterOperator = 'OPERATOR_UNSPECIFIED' | 'OPERATOR_AND' | 'OPERATOR_OR';
3249
+ /**
3250
+ * Top-level filter with simple boolean logic (no nesting)
3251
+ */
3252
+ export interface ToolSetAdapter_ToolFilter {
3253
+ filters?: Array<ToolSetAdapter_AttributeFilter>;
3254
+ operator: ToolSetAdapterToolFilterOperator;
3255
+ }
3256
+ /**
3257
+ * A single event in the tool set's operation timeline.
3258
+ */
3259
+ export interface ToolSetEvent {
3260
+ /**
3261
+ * Metadata for this operation event.
3262
+ */
3263
+ metadata: OperationMetadata;
3264
+ /**
3265
+ * The tool set this event is associated with.
3266
+ */
3267
+ toolSetId: string;
3268
+ /**
3269
+ * The event payload.
3270
+ */
3271
+ event: ToolSetEventData;
3272
+ info?: ToolSetEventInfo;
3273
+ }
3274
+ /**
3275
+ * Event payload for a tool set operation.
3276
+ */
3277
+ export type ToolSetEventData = ToolSetEventData_SyncStarted | ToolSetEventData_SyncCompleted | ToolSetEventData_SyncFailed;
3278
+ export interface ToolSetEventInfo {
3279
+ toolSet?: ResourceMetadata;
3280
+ createdBy?: Profile;
3281
+ }
3282
+ export interface ToolSetInfo {
3283
+ toolCount: number;
3284
+ agentCount: number;
3285
+ lastSync?: string;
3286
+ createdBy?: Profile;
3287
+ availableTools: number;
3288
+ omittedTools: number;
3289
+ }
3290
+ export interface ToolSetSecret {
3291
+ metadata: ResourceMetadata;
3292
+ spec: ToolSetSecretSpec;
3293
+ /**
3294
+ * Tool set secret information
3295
+ */
3296
+ info?: ToolSetSecretInfo;
3297
+ }
3298
+ export interface ToolSetSecretInfo {
3299
+ lastUsedAt?: string;
3300
+ createdBy?: Profile;
3301
+ }
3302
+ export interface ToolSetSecretSpec {
3303
+ value?: string;
3304
+ }
3305
+ export interface ToolSetSpec {
3306
+ description?: string;
3307
+ adapter: ToolSetAdapter;
3308
+ }
3309
+ /**
3310
+ * ToolSetUsage describes one agent variation that uses the tool set (or, when
3311
+ * filtering by tool, an individual tool within it).
3312
+ */
3313
+ export interface ToolSetUsage {
3314
+ /**
3315
+ * Metadata for the agent variation the assignment belongs to.
3316
+ */
3317
+ agentVariation: ResourceMetadata;
3318
+ /**
3319
+ * Metadata for the variation's parent agent.
3320
+ */
3321
+ agent: ResourceMetadata;
3322
+ /**
3323
+ * Metadata for the model assigned to the variation.
3324
+ */
3325
+ model: ResourceMetadata;
3326
+ /**
3327
+ * When the assignment was created.
3328
+ */
3329
+ assignedAt: string;
3330
+ }
3331
+ export interface ToolSpec {
3332
+ description: string;
3333
+ requiresApproval: boolean;
3334
+ /**
3335
+ * The tool's JSON Schema, as handed to the LLM. Required, but may be the
3336
+ * empty object `{}` for a tool that takes no arguments. Requiring it rather
3337
+ * than defaulting it means a misspelled field name (`inputSchema`, say) is a
3338
+ * 400 instead of a silently parameterless tool.
3339
+ */
3340
+ parameters: Record<string, unknown>;
3341
+ /**
3342
+ * Configuration for this specific tool. Transport/Protocol are derived from the tool set adapter, while specifics
3343
+ * such as endpoint, method, etc, are stored on the tool itself.
3344
+ *
3345
+ * Required, and exactly one adapter must be set.
3346
+ */
3347
+ config: ToolSpec_Config;
3348
+ /**
3349
+ * The name provided to the LLM, which may differ from the metadata.name on the tool.
3350
+ * LLMs have specific length and format requirements, and tool set sources may not comply
3351
+ * with them, so Cadenya does its best to format names into a usable format.
3352
+ */
3353
+ llmToolName?: string;
3354
+ }
3355
+ /**
3356
+ * Config defines the adapter to use for the tool.
3357
+ * This is used to determine how the tool is called.
3358
+ * For example, if the tool is an HTTP tool, the adapter will be Http.
3359
+ * If the tool is an inline tool, the adapter will be Inline.
3360
+ */
3361
+ export type ToolSpec_Config = ToolSpec_Config_Http | ToolSpec_Config_Mcp | ToolSpec_Config_Openapi | ToolSpec_Config_Bare;
3362
+ /**
3363
+ * Unarchive agent request
3364
+ */
3365
+ export interface UnarchiveAgentRequest {
3366
+ /**
3367
+ * Workspace ID.
3368
+ */
3369
+ workspaceId?: string;
3370
+ /**
3371
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
3372
+ */
3373
+ id?: string;
3374
+ }
3375
+ /**
3376
+ * Unarchive tool set request
3377
+ */
3378
+ export interface UnarchiveToolSetRequest {
3379
+ /**
3380
+ * Workspace ID.
3381
+ */
3382
+ workspaceId?: string;
3383
+ /**
3384
+ * Tool set ID. Accepts the canonical ts_… form or the
3385
+ * external_id:<value> form.
3386
+ */
3387
+ id?: string;
3388
+ }
3389
+ /**
3390
+ * Unarchive widget request.
3391
+ */
3392
+ export interface UnarchiveWidgetRequest {
3393
+ /**
3394
+ * Workspace ID.
3395
+ */
3396
+ workspaceId?: string;
3397
+ /**
3398
+ * Widget ID. Accepts the canonical `wgt_…` form or the `external_id:<value>` form.
3399
+ */
3400
+ id?: string;
3401
+ }
3402
+ /**
3403
+ * Unpublish agent request
3404
+ */
3405
+ export interface UnpublishAgentRequest {
3406
+ /**
3407
+ * Workspace ID.
3408
+ */
3409
+ workspaceId?: string;
3410
+ /**
3411
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
3412
+ */
3413
+ id?: string;
3414
+ }
3415
+ export interface UpdateAIProviderKeyRequest {
3416
+ /**
3417
+ * The workspace the key belongs to.
3418
+ */
3419
+ workspaceId?: string;
3420
+ /**
3421
+ * The key to update.
3422
+ */
3423
+ id?: string;
3424
+ metadata?: UpdateResourceMetadata;
3425
+ spec?: AIProviderKeySpec;
3426
+ /**
3427
+ * Fields to update.
3428
+ */
3429
+ updateMask?: string;
3430
+ }
3431
+ export interface UpdateAPIKeyRequest {
3432
+ /**
3433
+ * The workspace the API key belongs to (path).
3434
+ */
3435
+ workspaceId?: string;
3436
+ /**
3437
+ * The API key to update.
3438
+ */
3439
+ id?: string;
3440
+ metadata?: UpdateAccountResourceMetadata;
3441
+ spec?: APIKeySpec;
3442
+ /**
3443
+ * Fields to update.
3444
+ */
3445
+ updateMask?: string;
3446
+ }
3447
+ /**
3448
+ * UpdateAccountResourceMetadata contains the user-provided fields for updating
3449
+ * an account-scoped resource. Read-only fields (id, account_id, profile_id) are excluded
3450
+ * since they are set by the server.
3451
+ */
3452
+ export interface UpdateAccountResourceMetadata {
3453
+ /**
3454
+ * Human-readable name for the resource (e.g., "Production API Key", "Staging Workspace")
3455
+ */
3456
+ name: string;
3457
+ /**
3458
+ * External ID for the resource (e.g., a workflow ID from an external system)
3459
+ */
3460
+ externalId?: string;
3461
+ /**
3462
+ * Key-value pairs for categorization and filtering. Values are 0-63
3463
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
3464
+ * follow the same shape and additionally accept an optional DNS-subdomain
3465
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
3466
+ * Examples: {"environment": "production", "team": "platform", "version": "v2"}
3467
+ */
3468
+ labels?: Record<string, string>;
3469
+ }
3470
+ /**
3471
+ * Update agent request
3472
+ */
3473
+ export interface UpdateAgentRequest {
3474
+ /**
3475
+ * Workspace ID.
3476
+ */
3477
+ workspaceId?: string;
3478
+ /**
3479
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
3480
+ */
3481
+ id?: string;
3482
+ metadata?: UpdateResourceMetadata;
3483
+ spec?: AgentSpec;
3484
+ /**
3485
+ * Fields to update
3486
+ */
3487
+ updateMask?: string;
3488
+ }
3489
+ /**
3490
+ * Update agent schedule request.
3491
+ */
3492
+ export interface UpdateAgentScheduleRequest {
3493
+ /**
3494
+ * Workspace ID.
3495
+ */
3496
+ workspaceId?: string;
3497
+ /**
3498
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
3499
+ */
3500
+ agentId?: string;
3501
+ /**
3502
+ * Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form.
3503
+ */
3504
+ id?: string;
3505
+ metadata?: UpdateResourceMetadata;
3506
+ spec?: AgentScheduleSpec;
3507
+ /**
3508
+ * Fields to update.
3509
+ */
3510
+ updateMask?: string;
3511
+ }
3512
+ /**
3513
+ * Update an existing memory layer assignment. Only `position` is mutable.
3514
+ * A new position that collides with another assignment on the same variation
3515
+ * is rejected with InvalidArgument.
3516
+ */
3517
+ export interface UpdateAgentVariationMemoryLayerRequest {
3518
+ /**
3519
+ * Workspace ID.
3520
+ */
3521
+ workspaceId?: string;
3522
+ /**
3523
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
3524
+ */
3525
+ agentId?: string;
3526
+ /**
3527
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
3528
+ */
3529
+ variationId?: string;
3530
+ id?: string;
3531
+ /**
3532
+ * New position. Only field currently updatable on an assignment.
3533
+ */
3534
+ position?: number;
3535
+ }
3536
+ /**
3537
+ * Update agent variation request
3538
+ */
3539
+ export interface UpdateAgentVariationRequest {
3540
+ /**
3541
+ * Workspace ID.
3542
+ */
3543
+ workspaceId?: string;
3544
+ /**
3545
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
3546
+ */
3547
+ agentId?: string;
3548
+ /**
3549
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
3550
+ */
3551
+ id?: string;
3552
+ metadata?: UpdateResourceMetadata;
3553
+ spec?: AgentVariationSpec;
3554
+ /**
3555
+ * Fields to update
3556
+ */
3557
+ updateMask?: string;
3558
+ }
3559
+ export interface UpdateMemoryEntryRequest {
3560
+ workspaceId?: string;
3561
+ /**
3562
+ * Memory layer ID. Accepts canonical memlyr_… form or external_id:<value> form.
3563
+ */
3564
+ memoryLayerId?: string;
3565
+ id?: string;
3566
+ metadata?: UpdateResourceMetadata;
3567
+ spec?: MemoryEntryUpdateSpec;
3568
+ updateMask?: string;
3569
+ }
3570
+ export interface UpdateMemoryLayerRequest {
3571
+ workspaceId?: string;
3572
+ /**
3573
+ * Memory layer ID. Accepts canonical memlyr_… form or external_id:<value> form.
3574
+ */
3575
+ id?: string;
3576
+ metadata?: UpdateResourceMetadata;
3577
+ spec?: MemoryLayerSpec;
3578
+ updateMask?: string;
3579
+ }
3580
+ /**
3581
+ * UpdateResourceMetadata contains the user-provided fields for updating
3582
+ * a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id,
3583
+ * created_at) are excluded since they are set by the server.
3584
+ */
3585
+ export interface UpdateResourceMetadata {
3586
+ /**
3587
+ * Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool")
3588
+ */
3589
+ name: string;
3590
+ /**
3591
+ * External ID for the resource (e.g., a workflow ID from an external system)
3592
+ */
3593
+ externalId?: string;
3594
+ /**
3595
+ * Key-value pairs for categorization and filtering. Values are 0-63
3596
+ * alphanumeric characters with "-", "_", or "." allowed between; keys
3597
+ * follow the same shape and additionally accept an optional DNS-subdomain
3598
+ * prefix (e.g. "cadenya.com/") of at most 253 characters.
3599
+ * Examples: {"environment": "production", "team": "platform", "version": "v2"}
3600
+ */
3601
+ labels?: Record<string, string>;
3602
+ }
3603
+ export interface UpdateToolRequest {
3604
+ /**
3605
+ * Workspace ID.
3606
+ */
3607
+ workspaceId?: string;
3608
+ /**
3609
+ * Tool set ID. Accepts the canonical ts_… form or the
3610
+ * external_id:<value> form.
3611
+ */
3612
+ toolSetId?: string;
3613
+ /**
3614
+ * Tool ID. Accepts the canonical tool_… form or the
3615
+ * external_id:<value> form.
3616
+ */
3617
+ id?: string;
3618
+ metadata?: UpdateResourceMetadata;
3619
+ spec?: ToolSpec;
3620
+ updateMask?: string;
3621
+ }
3622
+ export interface UpdateToolSetRequest {
3623
+ /**
3624
+ * Workspace ID.
3625
+ */
3626
+ workspaceId?: string;
3627
+ /**
3628
+ * Tool set ID. Accepts the canonical ts_… form or the
3629
+ * external_id:<value> form.
3630
+ */
3631
+ id?: string;
3632
+ metadata?: UpdateResourceMetadata;
3633
+ spec?: ToolSetSpec;
3634
+ updateMask?: string;
3635
+ }
3636
+ export interface UpdateToolSetSecretRequest {
3637
+ /**
3638
+ * The workspace that owns the tool set.
3639
+ */
3640
+ workspaceId?: string;
3641
+ /**
3642
+ * The tool set the secret belongs to. Accepts the canonical ts_… form
3643
+ * or the external_id:<value> form.
3644
+ */
3645
+ toolSetId?: string;
3646
+ /**
3647
+ * The secret to update.
3648
+ */
3649
+ id?: string;
3650
+ metadata?: UpdateResourceMetadata;
3651
+ spec?: ToolSetSecretSpec;
3652
+ /**
3653
+ * Fields to update.
3654
+ */
3655
+ updateMask?: string;
3656
+ }
3657
+ /**
3658
+ * Update widget request.
3659
+ */
3660
+ export interface UpdateWidgetRequest {
3661
+ /**
3662
+ * Workspace ID.
3663
+ */
3664
+ workspaceId?: string;
3665
+ /**
3666
+ * Widget ID. Accepts the canonical `wgt_…` form or the `external_id:<value>` form.
3667
+ */
3668
+ id?: string;
3669
+ metadata?: UpdateResourceMetadata;
3670
+ spec?: WidgetSpec;
3671
+ /**
3672
+ * Fields to update.
3673
+ */
3674
+ updateMask?: string;
3675
+ }
3676
+ export interface UpdateWorkspaceRequest {
3677
+ /**
3678
+ * Workspace ID to update (path).
3679
+ */
3680
+ workspaceId?: string;
3681
+ metadata?: UpdateAccountResourceMetadata;
3682
+ spec?: WorkspaceSpec;
3683
+ /**
3684
+ * Fields to update.
3685
+ */
3686
+ updateMask?: string;
3687
+ }
3688
+ export interface UpdateWorkspaceSecretRequest {
3689
+ /**
3690
+ * The workspace the secret belongs to.
3691
+ */
3692
+ workspaceId?: string;
3693
+ /**
3694
+ * The secret to update.
3695
+ */
3696
+ id?: string;
3697
+ metadata?: UpdateResourceMetadata;
3698
+ spec?: WorkspaceSecretSpec;
3699
+ /**
3700
+ * Fields to update.
3701
+ */
3702
+ updateMask?: string;
3703
+ }
3704
+ /**
3705
+ * A handle representing a single file upload flow. Clients call CreateUpload
3706
+ * to receive a short-lived presigned URL, PUT the file directly to object
3707
+ * storage, then reference the upload by id when creating or updating
3708
+ * resources that accept binary content.
3709
+ *
3710
+ * Uploads are one-shot: once consumed by a creating or updating resource the
3711
+ * upload transitions to UPLOAD_STATUS_CONSUMED and cannot be reused. Unused
3712
+ * uploads expire and are garbage-collected.
3713
+ */
3714
+ export interface Upload {
3715
+ metadata: ResourceMetadata;
3716
+ spec: UploadSpec;
3717
+ info: UploadInfo;
3718
+ }
3719
+ /**
3720
+ * Lifecycle state. Transitions PENDING → COMPLETE (storage confirms the
3721
+ * object exists) → CONSUMED (a resource referenced this upload), or
3722
+ * → EXPIRED (URL elapsed without a PUT).
3723
+ */
3724
+ export type UploadInfoStatus = 'UPLOAD_STATUS_UNSPECIFIED' | 'UPLOAD_STATUS_PENDING' | 'UPLOAD_STATUS_COMPLETE' | 'UPLOAD_STATUS_CONSUMED' | 'UPLOAD_STATUS_EXPIRED';
3725
+ export interface UploadInfo {
3726
+ /**
3727
+ * Presigned PUT URL. Short-lived. The client must PUT with the exact
3728
+ * Content-Type declared in the spec, and the body length must match
3729
+ * size_bytes.
3730
+ */
3731
+ uploadUrl: string;
3732
+ /**
3733
+ * Absolute time at which upload_url stops working.
3734
+ */
3735
+ uploadUrlExpiresAt?: string;
3736
+ /**
3737
+ * Lifecycle state. Transitions PENDING → COMPLETE (storage confirms the
3738
+ * object exists) → CONSUMED (a resource referenced this upload), or
3739
+ * → EXPIRED (URL elapsed without a PUT).
3740
+ */
3741
+ status: UploadInfoStatus;
3742
+ createdBy?: Profile;
3743
+ }
3744
+ export interface UploadSpec {
3745
+ /**
3746
+ * Client-supplied filename. Used for audit and display only; does not
3747
+ * control the object's storage path.
3748
+ */
3749
+ filename: string;
3750
+ /**
3751
+ * MIME type the client will send. Baked into the presigned URL's signature
3752
+ * — the PUT must match exactly or object storage will reject it.
3753
+ */
3754
+ contentType: string;
3755
+ /**
3756
+ * Expected size of the upload in bytes. Baked into the presigned URL as a
3757
+ * Content-Length constraint.
3758
+ */
3759
+ sizeBytes: string;
3760
+ }
3761
+ export interface UserMessage {
3762
+ content: string;
3763
+ }
3764
+ /**
3765
+ * A read-only reference to a single tool, tool set, or sub-agent attached to
3766
+ * a variation. Read the full set of assignments via `AgentVariationInfo.assignments`;
3767
+ * mutations go through the dedicated add/remove assignment endpoints.
3768
+ *
3769
+ * The `id` identifies the assignment itself (not the referenced resource) and
3770
+ * is the handle used to remove the assignment. It is returned by the add
3771
+ * endpoint and present on every entry in `AgentVariationInfo.assignments`.
3772
+ */
3773
+ export type VariationAssignment = VariationAssignment_Tool | VariationAssignment_ToolSet | VariationAssignment_Agent;
3774
+ /**
3775
+ * VariationMemoryLayerAssignment attaches a single MemoryLayer to a
3776
+ * variation at a given position in the variation's baseline memory
3777
+ * cascade. A variation has at most one assignment per memory_layer_id.
3778
+ *
3779
+ * Variations only support whole-layer attachments — entry pinning is an
3780
+ * objective-level capability.
3781
+ */
3782
+ export interface VariationMemoryLayerAssignment {
3783
+ /**
3784
+ * Assignment row id — handle for removing the assignment. Distinct
3785
+ * from the referenced memory layer's id.
3786
+ */
3787
+ id: string;
3788
+ /**
3789
+ * The attached memory layer.
3790
+ */
3791
+ memoryLayer: BareMetadata;
3792
+ /**
3793
+ * Position in the variation's baseline cascade. Position is
3794
+ * specificity, CSS-style: a LOWER position is more specific and is
3795
+ * consulted first; the highest-position assignment is the most
3796
+ * general fallback. Gaps are fine — only relative position matters.
3797
+ * Positions must be unique within a variation; a request that would
3798
+ * collide with an existing assignment's position is rejected with
3799
+ * InvalidArgument.
3800
+ */
3801
+ position: number;
3802
+ }
3803
+ export interface WebhookDelivery {
3804
+ metadata: OperationMetadata;
3805
+ /**
3806
+ * Webhook delivery details.
3807
+ */
3808
+ data: WebhookDeliveryData;
3809
+ }
3810
+ export type WebhookDeliveryDataStatus = 'WEBHOOK_DELIVERY_STATUS_UNSPECIFIED' | 'WEBHOOK_DELIVERY_STATUS_PENDING' | 'WEBHOOK_DELIVERY_STATUS_COMPLETED' | 'WEBHOOK_DELIVERY_STATUS_FAILED' | 'WEBHOOK_DELIVERY_STATUS_DISABLED';
3811
+ /**
3812
+ * The type of objective event that triggered this webhook delivery
3813
+ */
3814
+ export type WebhookDeliveryDataEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING';
3815
+ export interface WebhookDeliveryData {
3816
+ /**
3817
+ * Related resources
3818
+ */
3819
+ agentId: string;
3820
+ objectiveId: string;
3821
+ objectiveEventId: string;
3822
+ /**
3823
+ * Webhook delivery details
3824
+ */
3825
+ webhookUrl: string;
3826
+ webhookId: string;
3827
+ status: WebhookDeliveryDataStatus;
3828
+ attemptCount: number;
3829
+ lastAttemptAt: string;
3830
+ /**
3831
+ * Response details. The response body is not retained.
3832
+ */
3833
+ httpStatusCode: number;
3834
+ errorMessage: string;
3835
+ latencyMs: number;
3836
+ /**
3837
+ * The type of objective event that triggered this webhook delivery
3838
+ */
3839
+ eventType: WebhookDeliveryDataEventType;
3840
+ /**
3841
+ * Response headers received from the webhook endpoint
3842
+ */
3843
+ responseHeaders: Record<string, string>;
3844
+ /**
3845
+ * Content length of the response body in bytes
3846
+ */
3847
+ responseContentLength: string;
3848
+ }
3849
+ /**
3850
+ * The current lifecycle state of the widget. Output only. Widgets are
3851
+ * created STATE_ACTIVE; use the :archive and :unarchive actions to
3852
+ * transition between states.
3853
+ */
3854
+ export type WidgetState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
3855
+ /**
3856
+ * Widget is an embeddable chat surface bound to a single agent. Each widget
3857
+ * owns a globally unique, immutable DNS label under the widgets domain
3858
+ * (e.g. "k7m2xq9fp4wn.widgets.cadenya.com"): one widget = one hostname = one
3859
+ * origin allowlist = one agent binding. Browsers talk to the widget host with
3860
+ * session bearer tokens minted server-side via WidgetSessionService.
3861
+ */
3862
+ export interface Widget {
3863
+ metadata: ResourceMetadata;
3864
+ spec: WidgetSpec;
3865
+ info?: WidgetInfo;
3866
+ /**
3867
+ * The current lifecycle state of the widget. Output only. Widgets are
3868
+ * created STATE_ACTIVE; use the :archive and :unarchive actions to
3869
+ * transition between states.
3870
+ */
3871
+ state: WidgetState;
3872
+ }
3873
+ /**
3874
+ * WidgetInfo provides read-only server-derived data about a widget.
3875
+ */
3876
+ export interface WidgetInfo {
3877
+ /**
3878
+ * The widget's DNS label — the single hostname label under the widgets
3879
+ * domain. Server-generated at creation, globally unique, immutable, and
3880
+ * deliberately unrelated to the widget's id.
3881
+ */
3882
+ dnsLabel: string;
3883
+ /**
3884
+ * The full hostname browsers talk to. Authoritative — clients must use this
3885
+ * value rather than constructing the hostname themselves.
3886
+ */
3887
+ host: string;
3888
+ /**
3889
+ * The agent this widget is bound to.
3890
+ */
3891
+ agent: BareMetadata;
3892
+ createdBy?: Profile;
3893
+ }
3894
+ /**
3895
+ * The current lifecycle state of the session. Output only. Sessions are
3896
+ * created STATE_ACTIVE; use :revoke to end one early.
3897
+ */
3898
+ export type WidgetSessionState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_EXPIRED' | 'STATE_REVOKED' | 'STATE_EXHAUSTED';
3899
+ /**
3900
+ * WidgetSession is a delegated, narrowed credential for one visitor's use of
3901
+ * a widget, minted server-to-server by the customer's backend. The session
3902
+ * carries all customer-asserted context — tenant, subject, labels, secrets —
3903
+ * and every conversation (objective) created through the widget inherits it.
3904
+ * The bearer token returned at mint is short-lived and refreshed at the
3905
+ * widget host; the session row is what makes revocation possible.
3906
+ */
3907
+ export interface WidgetSession {
3908
+ metadata: OperationMetadata;
3909
+ spec: WidgetSessionSpec;
3910
+ info?: WidgetSessionInfo;
3911
+ /**
3912
+ * The current lifecycle state of the session. Output only. Sessions are
3913
+ * created STATE_ACTIVE; use :revoke to end one early.
3914
+ */
3915
+ state: WidgetSessionState;
3916
+ /**
3917
+ * Names of the secrets attached to the session. Values are write-only:
3918
+ * provided at creation, encrypted at rest, and interpolated into tool-call
3919
+ * headers server-side — never returned by any API.
3920
+ */
3921
+ secrets: Array<WidgetSession_Secret>;
3922
+ }
3923
+ /**
3924
+ * WidgetSessionInfo provides read-only server-derived data about a session.
3925
+ */
3926
+ export interface WidgetSessionInfo {
3927
+ /**
3928
+ * The widget this session belongs to.
3929
+ */
3930
+ widget: BareMetadata;
3931
+ /**
3932
+ * The agent serving this session. Copied from the widget at mint and
3933
+ * immutable for the session's lifetime — re-pointing the widget's agent
3934
+ * affects new sessions only.
3935
+ */
3936
+ agent: BareMetadata;
3937
+ /**
3938
+ * The resolved tenant record, when a tenant was asserted at mint.
3939
+ */
3940
+ tenant?: TenantReference;
3941
+ /**
3942
+ * The resolved subject record, when a subject was asserted at mint.
3943
+ */
3944
+ subject?: SubjectReference;
3945
+ /**
3946
+ * The widget hostname this session's tokens are bound to. Authoritative —
3947
+ * clients must use this value rather than constructing the hostname.
3948
+ */
3949
+ host: string;
3950
+ /**
3951
+ * Number of conversation messages created through this session, counted
3952
+ * against the session's message cap.
3953
+ */
3954
+ messageCount: number;
3955
+ /**
3956
+ * When the session last created a conversation, sent a message, or
3957
+ * refreshed a token.
3958
+ */
3959
+ lastActiveAt?: string;
3960
+ }
3961
+ /**
3962
+ * WidgetSessionSpec is the configuration of a session, fixed at mint.
3963
+ */
3964
+ export interface WidgetSessionSpec {
3965
+ /**
3966
+ * Widget this session is minted against. Accepts the canonical `wgt_…` form
3967
+ * or the `external_id:<value>` form.
3968
+ */
3969
+ widgetId: string;
3970
+ /**
3971
+ * Optional tenant assertion — the customer's org/company identifier for the
3972
+ * visitor. Upserts the tenant record in the workspace and tags the session
3973
+ * and every conversation it creates. Conversation listing at the widget
3974
+ * host is scoped to this tenant.
3975
+ */
3976
+ tenant?: TenantAssertion;
3977
+ /**
3978
+ * Optional subject assertion — the visitor within the tenant (e.g. their
3979
+ * user id in the customer's namespace). Requires `tenant`; a subject
3980
+ * asserted without a tenant is rejected with InvalidArgument.
3981
+ */
3982
+ subject?: SubjectAssertion;
3983
+ /**
3984
+ * Hard session expiry. Tokens never outlive it; after it passes the session
3985
+ * transitions to STATE_EXPIRED. Defaults to a server-chosen horizon when
3986
+ * unset.
3987
+ */
3988
+ expiresAt?: string;
3989
+ /**
3990
+ * The session bearer token. Returned only on creation — subsequent reads
3991
+ * omit it. The token is short-lived; the widget refreshes it at the widget
3992
+ * host without involving the customer's backend.
3993
+ */
3994
+ token: string;
3995
+ /**
3996
+ * Expiry of the token returned in `token`. Distinct from `expires_at`,
3997
+ * which bounds the session itself.
3998
+ */
3999
+ tokenExpiresAt?: string;
4000
+ /**
4001
+ * Parameters forced onto tool calls made by this session's conversations.
4002
+ * A pinned parameter is an overlay on a tool's JSON schema: the parameter
4003
+ * is removed from what the LLM sees, and its value is always overwritten
4004
+ * server-side with the pinned value — so the model cannot be tricked into
4005
+ * calling a tool with a different id than the one the session was minted
4006
+ * for (e.g. pin "workspaceId" for an OpenAPI tool with a
4007
+ * /workspaces/{workspaceId} path). Flows to every objective the session
4008
+ * creates.
4009
+ */
4010
+ pinnedParameters?: Record<string, string>;
4011
+ }
4012
+ /**
4013
+ * Secret is the name-only echo of a secret attached to the session. Values
4014
+ * are never returned.
4015
+ */
4016
+ export interface WidgetSession_Secret {
4017
+ name: string;
4018
+ }
4019
+ /**
4020
+ * WidgetSpec is the user-provided configuration for a widget.
4021
+ */
4022
+ export interface WidgetSpec {
4023
+ /**
4024
+ * Agent this widget is bound to. Accepts the canonical `agent_…` form or the
4025
+ * `external_id:<value>` form. Sessions copy the agent at mint: re-pointing a
4026
+ * widget's agent affects new sessions only.
4027
+ */
4028
+ agentId: string;
4029
+ /**
4030
+ * Optional explicit variation pin. Must belong to the widget's agent. When
4031
+ * set, every objective created through the widget runs this variation —
4032
+ * bypassing the agent's variation_selection_mode (staged rollout: pin in
4033
+ * production, follow in staging, promote by clearing). When unset, the
4034
+ * agent's selection mode chooses per conversation.
4035
+ */
4036
+ variationId?: string;
4037
+ /**
4038
+ * Web origins allowed to embed and use this widget, enforced at the edge on
4039
+ * every browser request. Exact origins only (scheme + host + optional
4040
+ * port), no paths, no wildcard subdomains.
4041
+ */
4042
+ originAllowlist?: Array<string>;
4043
+ }
4044
+ /**
4045
+ * Lifecycle status of the workspace. Archived workspaces reject all
4046
+ * requests scoped to them. Server-populated.
4047
+ */
4048
+ export type WorkspaceStatus = 'STATUS_ENABLED' | 'STATUS_DISABLED' | 'STATUS_ARCHIVED';
4049
+ export interface Workspace {
4050
+ metadata: AccountResourceMetadata;
4051
+ spec: WorkspaceSpec;
4052
+ /**
4053
+ * Lifecycle status of the workspace. Archived workspaces reject all
4054
+ * requests scoped to them. Server-populated.
4055
+ */
4056
+ status: WorkspaceStatus;
4057
+ /**
4058
+ * The workspace information
4059
+ */
4060
+ info?: WorkspaceInfo;
4061
+ }
4062
+ /**
4063
+ * WorkspaceInfo returns counts
4064
+ */
4065
+ export interface WorkspaceInfo {
4066
+ totalAvailableTools: number;
4067
+ totalMemoryEntries: number;
4068
+ totalAgents: number;
4069
+ totalAgentVariations: number;
4070
+ }
4071
+ /**
4072
+ * A member of a workspace: the profile granted access plus the actor row that
4073
+ * links it to the workspace. Returned by member list/add operations.
4074
+ */
4075
+ export interface WorkspaceMember {
4076
+ /**
4077
+ * The account profile that has access to the workspace.
4078
+ */
4079
+ profileId: string;
4080
+ /**
4081
+ * The actor row linking the profile to the workspace (the junction record).
4082
+ */
4083
+ actorId: string;
4084
+ /**
4085
+ * Display name of the member's profile.
4086
+ */
4087
+ name: string;
4088
+ /**
4089
+ * Email address of the member's profile.
4090
+ */
4091
+ email: string;
4092
+ /**
4093
+ * When the member was added to the workspace.
4094
+ */
4095
+ addedAt?: string;
4096
+ }
4097
+ export interface WorkspaceSecret {
4098
+ metadata: ResourceMetadata;
4099
+ spec: WorkspaceSecretSpec;
4100
+ /**
4101
+ * Workspace secret information
4102
+ */
4103
+ info?: WorkspaceSecretInfo;
4104
+ }
4105
+ export interface WorkspaceSecretInfo {
4106
+ lastUsedAt?: string;
4107
+ createdBy?: Profile;
4108
+ }
4109
+ export interface WorkspaceSecretSpec {
4110
+ value?: string;
4111
+ }
4112
+ export interface WorkspaceSpec {
4113
+ description?: string;
4114
+ }
4115
+ /**
4116
+ * The webhook data payload with flat top-level keys for agent, variation, objective, and event.
4117
+ */
4118
+ export interface ObjectiveEventWebhookDataData {
4119
+ agent: ResourceMetadata;
4120
+ agentVariation: ResourceMetadata;
4121
+ objective: OperationMetadata;
4122
+ objectiveEvent: ObjectiveEvent;
4123
+ }
4124
+ /**
4125
+ * The envelope for an objective event webhook delivery. Contains timestamp, event type, and the webhook data payload.
4126
+ */
4127
+ export interface ObjectiveEventWebhookData {
4128
+ /**
4129
+ * The event type, prefixed with objective_event. (e.g., objective_event.tool_result)
4130
+ */
4131
+ type: string;
4132
+ timestamp: string;
4133
+ /**
4134
+ * The webhook data payload with flat top-level keys for agent, variation, objective, and event.
4135
+ */
4136
+ data: ObjectiveEventWebhookDataData;
4137
+ }
4138
+ export interface VariationAssignment_Tool {
4139
+ type: 'tool';
4140
+ tool: BareMetadata;
4141
+ id: string;
4142
+ }
4143
+ export interface VariationAssignment_ToolSet {
4144
+ type: 'toolSet';
4145
+ toolSet: BareMetadata;
4146
+ id: string;
4147
+ }
4148
+ export interface VariationAssignment_Agent {
4149
+ type: 'agent';
4150
+ agent: BareMetadata;
4151
+ id: string;
4152
+ }
4153
+ export interface ObjectiveToolCallResult_ContentBlock_Text {
4154
+ type: 'text';
4155
+ text: ObjectiveToolCallResult_TextBlock;
4156
+ }
4157
+ export interface ObjectiveToolCallResult_ContentBlock_Image {
4158
+ type: 'image';
4159
+ image: ObjectiveToolCallResult_ImageBlock;
4160
+ }
4161
+ export interface ObjectiveToolCallResult_ContentBlock_Audio {
4162
+ type: 'audio';
4163
+ audio: ObjectiveToolCallResult_AudioBlock;
4164
+ }
4165
+ export interface ToolSetEventData_SyncStarted {
4166
+ type: 'syncStarted';
4167
+ syncStarted: SyncStarted;
4168
+ }
4169
+ export interface ToolSetEventData_SyncCompleted {
4170
+ type: 'syncCompleted';
4171
+ syncCompleted: SyncCompleted;
4172
+ }
4173
+ export interface ToolSetEventData_SyncFailed {
4174
+ type: 'syncFailed';
4175
+ syncFailed: SyncFailed;
4176
+ }
4177
+ export interface ToolSetAdapter_McpVariant {
4178
+ type: 'mcp';
4179
+ mcp: ToolSetAdapter_MCP;
4180
+ }
4181
+ export interface ToolSetAdapter_HttpVariant {
4182
+ type: 'http';
4183
+ http: ToolSetAdapter_HTTP;
4184
+ }
4185
+ export interface ToolSetAdapter_OpenapiVariant {
4186
+ type: 'openapi';
4187
+ openapi: ToolSetAdapter_OpenAPI;
4188
+ }
4189
+ export interface ToolSetAdapter_BareVariant {
4190
+ type: 'bare';
4191
+ bare: ToolSetAdapter_Bare;
4192
+ }
4193
+ export interface ToolSetAdapter_StringMatcher_Exact {
4194
+ type: 'exact';
4195
+ exact: string;
4196
+ caseSensitive?: boolean;
4197
+ }
4198
+ export interface ToolSetAdapter_StringMatcher_StartsWith {
4199
+ type: 'startsWith';
4200
+ startsWith: string;
4201
+ caseSensitive?: boolean;
4202
+ }
4203
+ export interface ToolSetAdapter_StringMatcher_EndsWith {
4204
+ type: 'endsWith';
4205
+ endsWith: string;
4206
+ caseSensitive?: boolean;
4207
+ }
4208
+ export interface ToolSetAdapter_StringMatcher_Contains {
4209
+ type: 'contains';
4210
+ contains: string;
4211
+ caseSensitive?: boolean;
4212
+ }
4213
+ export interface ToolSetAdapter_StringMatcher_Regex {
4214
+ type: 'regex';
4215
+ regex: string;
4216
+ caseSensitive?: boolean;
4217
+ }
4218
+ export interface ToolSetAdapter_ApprovalRequirementFilter_Always {
4219
+ type: 'always';
4220
+ always: boolean;
4221
+ }
4222
+ export interface ToolSetAdapter_ApprovalRequirementFilter_Only {
4223
+ type: 'only';
4224
+ only: ToolSetAdapter_ToolFilter;
4225
+ }
4226
+ export interface ToolSetAdapter_OpenAPI_Url {
4227
+ type: 'url';
4228
+ /**
4229
+ * URL to fetch the OpenAPI spec from. Synced automatically every hour.
4230
+ */
4231
+ url: string;
4232
+ /**
4233
+ * Headers sent when fetching the spec from a URL and when dispatching tool calls.
4234
+ */
4235
+ headers?: Record<string, string>;
4236
+ includeTools?: ToolSetAdapter_ToolFilter;
4237
+ excludeTools?: ToolSetAdapter_ToolFilter;
4238
+ toolApprovals?: ToolSetAdapter_ApprovalRequirementFilter;
4239
+ /**
4240
+ * Base URL for dispatching tool calls. If set, overrides the server
4241
+ * resolved from the spec's servers array.
4242
+ */
4243
+ baseUrl?: string;
4244
+ /**
4245
+ * Name of the server entry in the spec's servers array (OpenAPI 3.2
4246
+ * server.name field). Used to select which server URL to dispatch to
4247
+ * when base_url is not set. If unset, the first server is used.
4248
+ * Ignored when base_url is set.
4249
+ */
4250
+ serverName?: string;
4251
+ }
4252
+ export interface ToolSetAdapter_OpenAPI_UploadId {
4253
+ type: 'uploadId';
4254
+ /**
4255
+ * ID of a COMPLETE Upload containing the OpenAPI spec document.
4256
+ */
4257
+ uploadId: string;
4258
+ /**
4259
+ * Headers sent when fetching the spec from a URL and when dispatching tool calls.
4260
+ */
4261
+ headers?: Record<string, string>;
4262
+ includeTools?: ToolSetAdapter_ToolFilter;
4263
+ excludeTools?: ToolSetAdapter_ToolFilter;
4264
+ toolApprovals?: ToolSetAdapter_ApprovalRequirementFilter;
4265
+ /**
4266
+ * Base URL for dispatching tool calls. If set, overrides the server
4267
+ * resolved from the spec's servers array.
4268
+ */
4269
+ baseUrl?: string;
4270
+ /**
4271
+ * Name of the server entry in the spec's servers array (OpenAPI 3.2
4272
+ * server.name field). Used to select which server URL to dispatch to
4273
+ * when base_url is not set. If unset, the first server is used.
4274
+ * Ignored when base_url is set.
4275
+ */
4276
+ serverName?: string;
4277
+ }
4278
+ export interface ToolSpec_Config_Http {
4279
+ type: 'http';
4280
+ http: Config_HTTP;
4281
+ }
4282
+ export interface ToolSpec_Config_Mcp {
4283
+ type: 'mcp';
4284
+ mcp: Config_MCP;
4285
+ }
4286
+ export interface ToolSpec_Config_Openapi {
4287
+ type: 'openapi';
4288
+ openapi: Config_OpenAPI;
4289
+ }
4290
+ export interface ToolSpec_Config_Bare {
4291
+ type: 'bare';
4292
+ bare: Config_Bare;
4293
+ }
4294
+ export interface ObjectiveEventData_UserMessage {
4295
+ type: 'userMessage';
4296
+ userMessage: UserMessage;
4297
+ }
4298
+ export interface ObjectiveEventData_ToolApprovalRequested {
4299
+ type: 'toolApprovalRequested';
4300
+ toolApprovalRequested: ToolApprovalRequested;
4301
+ }
4302
+ export interface ObjectiveEventData_ToolApproved {
4303
+ type: 'toolApproved';
4304
+ toolApproved: ToolApproved;
4305
+ }
4306
+ export interface ObjectiveEventData_ToolDenied {
4307
+ type: 'toolDenied';
4308
+ toolDenied: ToolDenied;
4309
+ }
4310
+ export interface ObjectiveEventData_ToolCalled {
4311
+ type: 'toolCalled';
4312
+ toolCalled: ToolCalled;
4313
+ }
4314
+ export interface ObjectiveEventData_Error {
4315
+ type: 'error';
4316
+ error: ObjectiveError;
4317
+ }
4318
+ export interface ObjectiveEventData_AssistantMessage {
4319
+ type: 'assistantMessage';
4320
+ assistantMessage: AssistantMessage;
4321
+ }
4322
+ export interface ObjectiveEventData_ToolResult {
4323
+ type: 'toolResult';
4324
+ toolResult: ToolResult;
4325
+ }
4326
+ export interface ObjectiveEventData_ToolError {
4327
+ type: 'toolError';
4328
+ toolError: ToolError;
4329
+ }
4330
+ export interface ObjectiveEventData_ContextWindowCompacted {
4331
+ type: 'contextWindowCompacted';
4332
+ contextWindowCompacted: ContextWindowCompacted;
4333
+ }
4334
+ export interface ObjectiveEventData_MemoryRead {
4335
+ type: 'memoryRead';
4336
+ memoryRead: MemoryRead;
4337
+ }
4338
+ export interface ObjectiveEventData_Cancelled {
4339
+ type: 'cancelled';
4340
+ cancelled: ObjectiveCancelled;
4341
+ }
4342
+ export interface ObjectiveEventData_SubAgentSpawned {
4343
+ type: 'subAgentSpawned';
4344
+ subAgentSpawned: SubAgentSpawned;
4345
+ }
4346
+ export interface ObjectiveEventData_SubAgentUpdated {
4347
+ type: 'subAgentUpdated';
4348
+ subAgentUpdated: SubAgentUpdated;
4349
+ }
4350
+ export interface ObjectiveEventData_Finalized {
4351
+ type: 'finalized';
4352
+ finalized: ObjectiveFinalized;
4353
+ }
4354
+ export interface ObjectiveEventData_Notice {
4355
+ type: 'notice';
4356
+ notice: Notice;
4357
+ }
4358
+ export interface ObjectiveEventData_TimedOut {
4359
+ type: 'timedOut';
4360
+ timedOut: ObjectiveTimedOut;
4361
+ }
4362
+ export interface ObjectiveEventData_Reasoning {
4363
+ type: 'reasoning';
4364
+ reasoning: Reasoning;
4365
+ }
4366
+ export interface CallableTool_Tool {
4367
+ type: 'tool';
4368
+ tool: ResourceMetadata;
4369
+ }
4370
+ export interface CallableTool_Agent {
4371
+ type: 'agent';
4372
+ agent: ResourceMetadata;
4373
+ }
4374
+ export interface CallableTool_CadenyaProvidedTool {
4375
+ type: 'cadenyaProvidedTool';
4376
+ cadenyaProvidedTool: ResourceMetadata;
4377
+ }
4378
+ export interface MemoryEntryCreateSpec_Content {
4379
+ type: 'content';
4380
+ /**
4381
+ * Inline content, written directly into the entry.
4382
+ */
4383
+ content: string;
4384
+ /**
4385
+ * See MemoryEntrySpec.key for the full rule set. Same constraints apply
4386
+ * here.
4387
+ */
4388
+ key: string;
4389
+ description?: string;
4390
+ }
4391
+ export interface MemoryEntryCreateSpec_UploadId {
4392
+ type: 'uploadId';
4393
+ /**
4394
+ * ID of a COMPLETE Upload. The server reads the object from storage,
4395
+ * copies its bytes into the entry, and marks the upload consumed.
4396
+ */
4397
+ uploadId: string;
4398
+ /**
4399
+ * See MemoryEntrySpec.key for the full rule set. Same constraints apply
4400
+ * here.
4401
+ */
4402
+ key: string;
4403
+ description?: string;
4404
+ }
4405
+ export interface SetToolCallContentRequest_ContentBlock_Text {
4406
+ type: 'text';
4407
+ text: SetToolCallContentRequest_TextBlock;
4408
+ }
4409
+ export interface SetToolCallContentRequest_ContentBlock_Image {
4410
+ type: 'image';
4411
+ image: SetToolCallContentRequest_ImageBlock;
4412
+ }
4413
+ export interface SetToolCallContentRequest_ContentBlock_Audio {
4414
+ type: 'audio';
4415
+ audio: SetToolCallContentRequest_AudioBlock;
4416
+ }
4417
+ export interface AddAgentVariationAssignmentRequest_ToolId {
4418
+ type: 'toolId';
4419
+ toolId: string;
4420
+ /**
4421
+ * Workspace ID.
4422
+ */
4423
+ workspaceId?: string;
4424
+ /**
4425
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
4426
+ */
4427
+ agentId?: string;
4428
+ /**
4429
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
4430
+ */
4431
+ variationId?: string;
4432
+ }
4433
+ export interface AddAgentVariationAssignmentRequest_ToolSetId {
4434
+ type: 'toolSetId';
4435
+ toolSetId: string;
4436
+ /**
4437
+ * Workspace ID.
4438
+ */
4439
+ workspaceId?: string;
4440
+ /**
4441
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
4442
+ */
4443
+ agentId?: string;
4444
+ /**
4445
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
4446
+ */
4447
+ variationId?: string;
4448
+ }
4449
+ export interface AddAgentVariationAssignmentRequest_SubAgentId {
4450
+ type: 'subAgentId';
4451
+ subAgentId: string;
4452
+ /**
4453
+ * Workspace ID.
4454
+ */
4455
+ workspaceId?: string;
4456
+ /**
4457
+ * Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form.
4458
+ */
4459
+ agentId?: string;
4460
+ /**
4461
+ * Variation ID. Accepts the canonical `agentvar_…` form or the `external_id:<value>` form.
4462
+ */
4463
+ variationId?: string;
4464
+ }
4465
+ export interface AIProviderCredential_ApiKey {
4466
+ type: 'apiKey';
4467
+ /**
4468
+ * Single API key (OpenRouter, OpenAI, Anthropic, Gemini, and most others).
4469
+ */
4470
+ apiKey: CredentialAPIKey;
4471
+ }
4472
+ export interface AIProviderCredential_Headers {
4473
+ type: 'headers';
4474
+ /**
4475
+ * Arbitrary auth headers, for generic endpoints that authenticate with a
4476
+ * custom header rather than a bearer key (pairs with the OpenAI-compatible
4477
+ * provider).
4478
+ */
4479
+ headers: CredentialHeaders;
4480
+ }
4481
+ export interface AIProviderConfig_Openrouter {
4482
+ type: 'openrouter';
4483
+ openrouter: OpenRouterConfig;
4484
+ }
4485
+ export interface AIProviderConfig_Openai {
4486
+ type: 'openai';
4487
+ openai: OpenAIConfig;
4488
+ }
4489
+ export interface AIProviderConfig_OpenaiCompatible {
4490
+ type: 'openaiCompatible';
4491
+ openaiCompatible: OpenAICompatibleConfig;
4492
+ }
4493
+ export interface ModelSpec_Capability_Temperature {
4494
+ type: 'temperature';
4495
+ temperature: Capability_Temperature;
4496
+ }
4497
+ export interface ModelSpec_Capability_TopP {
4498
+ type: 'topP';
4499
+ topP: Capability_TopP;
4500
+ }
4501
+ export interface ModelSpec_Capability_TopK {
4502
+ type: 'topK';
4503
+ topK: Capability_TopK;
4504
+ }
4505
+ export interface ModelSpec_Capability_StopSequences {
4506
+ type: 'stopSequences';
4507
+ stopSequences: Capability_StopSequences;
4508
+ }
4509
+ export interface ModelSpec_Capability_MaxOutputTokens {
4510
+ type: 'maxOutputTokens';
4511
+ maxOutputTokens: Capability_MaxOutputTokens;
4512
+ }
4513
+ export interface ModelSpec_Capability_Reasoning {
4514
+ type: 'reasoning';
4515
+ reasoning: Capability_Reasoning;
4516
+ }
4517
+ export interface ModelSpec_Capability_Caching {
4518
+ type: 'caching';
4519
+ caching: Capability_Caching;
4520
+ }
4521
+ export type AgentServiceListAgentsState = 'STATE_UNSPECIFIED' | 'STATE_DRAFT' | 'STATE_PUBLISHED' | 'STATE_ARCHIVED';
4522
+ export type AgentServiceListAgentsVariationSelectionMode = 'VARIATION_SELECTION_MODE_UNSPECIFIED' | 'VARIATION_SELECTION_MODE_RANDOM' | 'VARIATION_SELECTION_MODE_WEIGHTED';
4523
+ export type AgentServiceListAgentFeedbackSentiment = 'FEEDBACK_SENTIMENT_UNSPECIFIED' | 'FEEDBACK_SENTIMENT_POSITIVE' | 'FEEDBACK_SENTIMENT_NEGATIVE';
4524
+ export type AgentServiceListAgentWebhookDeliveriesEventType = 'OBJECTIVE_EVENT_TYPE_UNSPECIFIED' | 'OBJECTIVE_EVENT_TYPE_USER_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED' | 'OBJECTIVE_EVENT_TYPE_TOOL_APPROVED' | 'OBJECTIVE_EVENT_TYPE_TOOL_DENIED' | 'OBJECTIVE_EVENT_TYPE_TOOL_CALLED' | 'OBJECTIVE_EVENT_TYPE_ERROR' | 'OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE' | 'OBJECTIVE_EVENT_TYPE_TOOL_RESULT' | 'OBJECTIVE_EVENT_TYPE_TOOL_ERROR' | 'OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED' | 'OBJECTIVE_EVENT_TYPE_MEMORY_READ' | 'OBJECTIVE_EVENT_TYPE_CANCELLED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED' | 'OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED' | 'OBJECTIVE_EVENT_TYPE_FINALIZED' | 'OBJECTIVE_EVENT_TYPE_NOTICE' | 'OBJECTIVE_EVENT_TYPE_TIMED_OUT' | 'OBJECTIVE_EVENT_TYPE_REASONING';
4525
+ export type MemoryServiceListMemoryLayersType = 'MEMORY_LAYER_TYPE_UNSPECIFIED' | 'MEMORY_LAYER_TYPE_EPISODIC' | 'MEMORY_LAYER_TYPE_SKILLS';
4526
+ export type ModelServiceListModelsState = 'STATE_UNSPECIFIED' | 'STATE_ENABLED' | 'STATE_DISABLED';
4527
+ export type ObjectiveServiceListObjectivesState = 'STATE_UNSPECIFIED' | 'STATE_PENDING' | 'STATE_RUNNING' | 'STATE_WAITING' | 'STATE_FAILED' | 'STATE_CANCELLED' | 'STATE_FINALIZED' | 'STATE_TIMED_OUT';
4528
+ export type ObjectiveServiceListObjectiveToolCallsStatus = 'TOOL_CALL_STATUS_UNSPECIFIED' | 'TOOL_CALL_STATUS_AUTO_APPROVED' | 'TOOL_CALL_STATUS_WAITING_FOR_APPROVAL' | 'TOOL_CALL_STATUS_APPROVED' | 'TOOL_CALL_STATUS_DENIED';
4529
+ export type ObjectiveServiceListObjectiveToolCallsExecutionStatus = 'TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED' | 'TOOL_CALL_EXECUTION_STATUS_PENDING' | 'TOOL_CALL_EXECUTION_STATUS_RUNNING' | 'TOOL_CALL_EXECUTION_STATUS_COMPLETED' | 'TOOL_CALL_EXECUTION_STATUS_ERRORED' | 'TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT';
4530
+ export type ToolServiceListToolSetsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_ARCHIVED';
4531
+ export type ToolServiceListToolsStates = 'STATE_UNSPECIFIED' | 'STATE_AVAILABLE' | 'STATE_OMITTED' | 'STATE_ARCHIVED';
4532
+ export type WidgetSessionServiceListWidgetSessionsState = 'STATE_UNSPECIFIED' | 'STATE_ACTIVE' | 'STATE_EXPIRED' | 'STATE_REVOKED' | 'STATE_EXHAUSTED';
4533
+ export interface APIKeySpecParam {
4534
+ /**
4535
+ * Free-form description of what this API key is used for.
4536
+ */
4537
+ description?: string;
4538
+ /**
4539
+ * Scopes granted to this key. Each entry is a colon-separated
4540
+ * resource:verb string (e.g. "objectives:manage").
4541
+ *
4542
+ * Resources: agents, objectives, tools, memory, api_keys, workspaces,
4543
+ * widgets, widget_sessions, secrets, account.
4544
+ * Verbs: read and manage, where manage implies read — a stored scope set
4545
+ * is normalized to drop "x:read" when "x:manage" is present. The secrets
4546
+ * and account resources support only manage. "*" is an explicit
4547
+ * full-access grant.
4548
+ *
4549
+ * Scopes are deny-by-default: a key with an empty list can call only
4550
+ * scope-free endpoints. Full access is always an explicit "*" grant.
4551
+ */
4552
+ permissions?: Array<string>;
4553
+ }
4554
+ export type AddAgentVariationAssignmentRequestParam = AddAgentVariationAssignmentRequest_ToolIdParam | AddAgentVariationAssignmentRequest_ToolSetIdParam | AddAgentVariationAssignmentRequest_SubAgentIdParam;
4555
+ export interface CreateAgentVariationRequestParam {
4556
+ metadata: CreateResourceMetadata;
4557
+ spec: AgentVariationSpec;
4558
+ }
4559
+ export interface MemoryLayerSpecParam {
4560
+ type: MemoryLayerSpecType;
4561
+ /**
4562
+ * Human-readable description of the layer's purpose. Encouraged for
4563
+ * user-created layers; system-managed layers may have a generated description.
4564
+ */
4565
+ description?: string;
4566
+ }
4567
+ export interface ObjectiveEpisodicConfigParam {
4568
+ /**
4569
+ * The caller-supplied episodic key. Objectives created with the same key
4570
+ * (for the same agent) share one episodic memory layer.
4571
+ */
4572
+ key: string;
4573
+ }
4574
+ export interface WidgetSessionSpecParam {
4575
+ /**
4576
+ * Widget this session is minted against. Accepts the canonical `wgt_…` form
4577
+ * or the `external_id:<value>` form.
4578
+ */
4579
+ widgetId: string;
4580
+ /**
4581
+ * Optional tenant assertion — the customer's org/company identifier for the
4582
+ * visitor. Upserts the tenant record in the workspace and tags the session
4583
+ * and every conversation it creates. Conversation listing at the widget
4584
+ * host is scoped to this tenant.
4585
+ */
4586
+ tenant?: TenantAssertion;
4587
+ /**
4588
+ * Optional subject assertion — the visitor within the tenant (e.g. their
4589
+ * user id in the customer's namespace). Requires `tenant`; a subject
4590
+ * asserted without a tenant is rejected with InvalidArgument.
4591
+ */
4592
+ subject?: SubjectAssertion;
4593
+ /**
4594
+ * Hard session expiry. Tokens never outlive it; after it passes the session
4595
+ * transitions to STATE_EXPIRED. Defaults to a server-chosen horizon when
4596
+ * unset.
4597
+ */
4598
+ expiresAt?: string;
4599
+ /**
4600
+ * Parameters forced onto tool calls made by this session's conversations.
4601
+ * A pinned parameter is an overlay on a tool's JSON schema: the parameter
4602
+ * is removed from what the LLM sees, and its value is always overwritten
4603
+ * server-side with the pinned value — so the model cannot be tricked into
4604
+ * calling a tool with a different id than the one the session was minted
4605
+ * for (e.g. pin "workspaceId" for an OpenAPI tool with a
4606
+ * /workspaces/{workspaceId} path). Flows to every objective the session
4607
+ * creates.
4608
+ */
4609
+ pinnedParameters?: Record<string, string>;
4610
+ }
4611
+ export interface AddAgentVariationAssignmentRequest_ToolIdParam {
4612
+ type: 'toolId';
4613
+ toolId: string;
4614
+ }
4615
+ export interface AddAgentVariationAssignmentRequest_ToolSetIdParam {
4616
+ type: 'toolSetId';
4617
+ toolSetId: string;
4618
+ }
4619
+ export interface AddAgentVariationAssignmentRequest_SubAgentIdParam {
4620
+ type: 'subAgentId';
4621
+ subAgentId: string;
4622
+ }
4623
+ export declare function wireArray<T>(value: Array<T> | null | undefined, fn: (v: T) => unknown): unknown;
4624
+ export declare function wireMap<T>(value: Record<string, T> | null | undefined, fn: (v: T) => unknown): unknown;
4625
+ export declare function wireAPIKeySpec(value: APIKeySpecParam | null | undefined): unknown;
4626
+ export declare function wireAddAgentVariationAssignmentRequest(value: AddAgentVariationAssignmentRequestParam | null | undefined): unknown;
4627
+ export declare function wireCreateAgentVariationRequest(value: CreateAgentVariationRequestParam | null | undefined): unknown;
4628
+ export declare function wireMemoryLayerSpec(value: MemoryLayerSpecParam | null | undefined): unknown;
4629
+ export declare function wireObjectiveEpisodicConfig(value: ObjectiveEpisodicConfigParam | null | undefined): unknown;
4630
+ export declare function wireWidgetSessionSpec(value: WidgetSessionSpecParam | null | undefined): unknown;
4631
+ export declare function wireAddAgentVariationAssignmentRequest_ToolId(value: AddAgentVariationAssignmentRequest_ToolIdParam | null | undefined): unknown;
4632
+ export declare function wireAddAgentVariationAssignmentRequest_ToolSetId(value: AddAgentVariationAssignmentRequest_ToolSetIdParam | null | undefined): unknown;
4633
+ export declare function wireAddAgentVariationAssignmentRequest_SubAgentId(value: AddAgentVariationAssignmentRequest_SubAgentIdParam | null | undefined): unknown;
4634
+ //# sourceMappingURL=types.d.ts.map