@vertesia/common 1.3.0 → 1.4.0-dev.20260615.042033Z

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 (632) hide show
  1. package/LICENSE +198 -10
  2. package/lib/{types/Progress.d.ts → Progress.d.ts} +1 -0
  3. package/lib/Progress.d.ts.map +1 -0
  4. package/lib/{esm/Progress.js → Progress.js} +2 -2
  5. package/lib/Progress.js.map +1 -0
  6. package/lib/{types/access-control.d.ts → access-control.d.ts} +15 -5
  7. package/lib/access-control.d.ts.map +1 -0
  8. package/lib/{esm/access-control.js → access-control.js} +10 -7
  9. package/lib/access-control.js.map +1 -0
  10. package/lib/agent-request-template.d.ts +4 -0
  11. package/lib/agent-request-template.d.ts.map +1 -0
  12. package/lib/agent-request-template.js +46 -0
  13. package/lib/agent-request-template.js.map +1 -0
  14. package/lib/{types/analytics.d.ts → analytics.d.ts} +3 -2
  15. package/lib/analytics.d.ts.map +1 -0
  16. package/lib/{cjs/analytics.js.map → analytics.js.map} +1 -1
  17. package/lib/{types/apikey.d.ts → apikey.d.ts} +21 -5
  18. package/lib/apikey.d.ts.map +1 -0
  19. package/lib/{esm/apikey.js → apikey.js} +1 -0
  20. package/lib/apikey.js.map +1 -0
  21. package/lib/{types/apps.d.ts → apps.d.ts} +430 -35
  22. package/lib/apps.d.ts.map +1 -0
  23. package/lib/apps.js +158 -0
  24. package/lib/apps.js.map +1 -0
  25. package/lib/{types/ask-user.d.ts → ask-user.d.ts} +1 -0
  26. package/lib/ask-user.d.ts.map +1 -0
  27. package/lib/{esm/ask-user.js.map → ask-user.js.map} +1 -1
  28. package/lib/{types/audit-trail.d.ts → audit-trail.d.ts} +2 -1
  29. package/lib/audit-trail.d.ts.map +1 -0
  30. package/lib/audit-trail.js +3 -0
  31. package/lib/audit-trail.js.map +1 -0
  32. package/lib/browser-credentials.d.ts +123 -0
  33. package/lib/browser-credentials.d.ts.map +1 -0
  34. package/lib/browser-credentials.js +2 -0
  35. package/lib/browser-credentials.js.map +1 -0
  36. package/lib/{types/channels.d.ts → channels.d.ts} +3 -2
  37. package/lib/channels.d.ts.map +1 -0
  38. package/lib/{esm/channels.js → channels.js} +3 -3
  39. package/lib/channels.js.map +1 -0
  40. package/lib/{types/common.d.ts → common.d.ts} +18 -10
  41. package/lib/common.d.ts.map +1 -0
  42. package/lib/common.js.map +1 -0
  43. package/lib/{types/cost-analytics.d.ts → cost-analytics.d.ts} +2 -3
  44. package/lib/cost-analytics.d.ts.map +1 -0
  45. package/lib/cost-analytics.js.map +1 -0
  46. package/lib/{types/data-platform.d.ts → data-platform.d.ts} +134 -7
  47. package/lib/data-platform.d.ts.map +1 -0
  48. package/lib/data-platform.js.map +1 -0
  49. package/lib/{types/email.d.ts → email.d.ts} +6 -2
  50. package/lib/email.d.ts.map +1 -0
  51. package/lib/{esm/email.js → email.js} +2 -2
  52. package/lib/email.js.map +1 -0
  53. package/lib/embeddings.d.ts +65 -0
  54. package/lib/embeddings.d.ts.map +1 -0
  55. package/lib/embeddings.js +2 -0
  56. package/lib/embeddings.js.map +1 -0
  57. package/lib/{types/environment.d.ts → environment.d.ts} +18 -5
  58. package/lib/environment.d.ts.map +1 -0
  59. package/lib/{esm/environment.js → environment.js} +17 -7
  60. package/lib/environment.js.map +1 -0
  61. package/lib/{types/facets.d.ts → facets.d.ts} +6 -5
  62. package/lib/facets.d.ts.map +1 -0
  63. package/lib/facets.js.map +1 -0
  64. package/lib/{types/group.d.ts → group.d.ts} +5 -4
  65. package/lib/group.d.ts.map +1 -0
  66. package/lib/group.js.map +1 -0
  67. package/lib/host-utils.d.ts +8 -0
  68. package/lib/host-utils.d.ts.map +1 -0
  69. package/lib/host-utils.js +84 -0
  70. package/lib/host-utils.js.map +1 -0
  71. package/lib/{types/index.d.ts → index.d.ts} +19 -10
  72. package/lib/index.d.ts.map +1 -0
  73. package/lib/{esm/index.js → index.js} +18 -10
  74. package/lib/index.js.map +1 -0
  75. package/lib/integrations.d.ts +151 -0
  76. package/lib/integrations.d.ts.map +1 -0
  77. package/lib/{esm/integrations.js → integrations.js} +6 -0
  78. package/lib/integrations.js.map +1 -0
  79. package/lib/{types/interaction.d.ts → interaction.d.ts} +99 -56
  80. package/lib/interaction.d.ts.map +1 -0
  81. package/lib/{esm/interaction.js → interaction.js} +3 -3
  82. package/lib/interaction.js.map +1 -0
  83. package/lib/json-schema.d.ts +2 -0
  84. package/lib/json-schema.d.ts.map +1 -0
  85. package/lib/{cjs/json-schema.js.map → json-schema.js.map} +1 -1
  86. package/lib/json.d.ts +2 -0
  87. package/lib/json.d.ts.map +1 -0
  88. package/lib/json.js.map +1 -0
  89. package/lib/{types/meters.d.ts → meters.d.ts} +2 -1
  90. package/lib/meters.d.ts.map +1 -0
  91. package/lib/meters.js.map +1 -0
  92. package/lib/model_utility.d.ts +2 -0
  93. package/lib/model_utility.d.ts.map +1 -0
  94. package/lib/model_utility.js +2 -0
  95. package/lib/model_utility.js.map +1 -0
  96. package/lib/oauth-scopes.d.ts +18 -0
  97. package/lib/oauth-scopes.d.ts.map +1 -0
  98. package/lib/oauth-scopes.js +57 -0
  99. package/lib/oauth-scopes.js.map +1 -0
  100. package/lib/{types/oauth-server.d.ts → oauth-server.d.ts} +50 -7
  101. package/lib/oauth-server.d.ts.map +1 -0
  102. package/lib/{cjs/oauth-server.js.map → oauth-server.js.map} +1 -1
  103. package/lib/{types/oauth.d.ts → oauth.d.ts} +1 -0
  104. package/lib/oauth.d.ts.map +1 -0
  105. package/lib/oauth.js.map +1 -0
  106. package/lib/{types/payload.d.ts → payload.d.ts} +5 -4
  107. package/lib/payload.d.ts.map +1 -0
  108. package/lib/{cjs/payload.js.map → payload.js.map} +1 -1
  109. package/lib/{types/pending-asks.d.ts → pending-asks.d.ts} +8 -1
  110. package/lib/pending-asks.d.ts.map +1 -0
  111. package/lib/pending-asks.js.map +1 -0
  112. package/lib/principal-context.d.ts +27 -0
  113. package/lib/principal-context.d.ts.map +1 -0
  114. package/lib/principal-context.js +2 -0
  115. package/lib/principal-context.js.map +1 -0
  116. package/lib/{types/project.d.ts → project.d.ts} +253 -22
  117. package/lib/project.d.ts.map +1 -0
  118. package/lib/project.js +230 -0
  119. package/lib/project.js.map +1 -0
  120. package/lib/{types/prompt.d.ts → prompt.d.ts} +16 -9
  121. package/lib/prompt.d.ts.map +1 -0
  122. package/lib/prompt.js.map +1 -0
  123. package/lib/{types/query.d.ts → query.d.ts} +11 -8
  124. package/lib/query.d.ts.map +1 -0
  125. package/lib/query.js.map +1 -0
  126. package/lib/{types/rate-limiter.d.ts → rate-limiter.d.ts} +1 -0
  127. package/lib/rate-limiter.d.ts.map +1 -0
  128. package/lib/rate-limiter.js.map +1 -0
  129. package/lib/{types/refs.d.ts → refs.d.ts} +1 -0
  130. package/lib/refs.d.ts.map +1 -0
  131. package/lib/refs.js.map +1 -0
  132. package/lib/roles.d.ts +19 -0
  133. package/lib/roles.d.ts.map +1 -0
  134. package/lib/roles.js +228 -0
  135. package/lib/roles.js.map +1 -0
  136. package/lib/{types/runs.d.ts → runs.d.ts} +3 -2
  137. package/lib/runs.d.ts.map +1 -0
  138. package/lib/runs.js.map +1 -0
  139. package/lib/secrets.d.ts +47 -0
  140. package/lib/secrets.d.ts.map +1 -0
  141. package/lib/secrets.js +2 -0
  142. package/lib/secrets.js.map +1 -0
  143. package/lib/{types/skill.d.ts → skill.d.ts} +2 -1
  144. package/lib/skill.d.ts.map +1 -0
  145. package/lib/skill.js.map +1 -0
  146. package/lib/{types/store → store}/activity-catalog.d.ts +2 -1
  147. package/lib/store/activity-catalog.d.ts.map +1 -0
  148. package/lib/store/activity-catalog.js.map +1 -0
  149. package/lib/{types/store → store}/agent-run.d.ts +206 -35
  150. package/lib/store/agent-run.d.ts.map +1 -0
  151. package/lib/store/agent-run.js.map +1 -0
  152. package/lib/{types/store → store}/collections.d.ts +10 -9
  153. package/lib/store/collections.d.ts.map +1 -0
  154. package/lib/store/collections.js.map +1 -0
  155. package/lib/{types/store → store}/common.d.ts +1 -0
  156. package/lib/store/common.d.ts.map +1 -0
  157. package/lib/{cjs → store}/common.js.map +1 -1
  158. package/lib/{types/store → store}/conversation-state.d.ts +36 -5
  159. package/lib/store/conversation-state.d.ts.map +1 -0
  160. package/lib/{esm/store → store}/conversation-state.js +3 -0
  161. package/lib/store/conversation-state.js.map +1 -0
  162. package/lib/{types/store → store}/doc-analyzer.d.ts +20 -14
  163. package/lib/store/doc-analyzer.d.ts.map +1 -0
  164. package/lib/{cjs/store → store}/doc-analyzer.js.map +1 -1
  165. package/lib/{types/store → store}/dsl-workflow.d.ts +42 -24
  166. package/lib/store/dsl-workflow.d.ts.map +1 -0
  167. package/lib/store/dsl-workflow.js +8 -0
  168. package/lib/store/dsl-workflow.js.map +1 -0
  169. package/lib/{types/store → store}/hive-memory.d.ts +2 -1
  170. package/lib/store/hive-memory.d.ts.map +1 -0
  171. package/lib/{cjs/store → store}/hive-memory.js.map +1 -1
  172. package/lib/store/index.d.ts +20 -0
  173. package/lib/store/index.d.ts.map +1 -0
  174. package/lib/store/index.js +20 -0
  175. package/lib/store/index.js.map +1 -0
  176. package/lib/{types/store → store}/object-types.d.ts +2 -1
  177. package/lib/store/object-types.d.ts.map +1 -0
  178. package/lib/store/object-types.js +95 -0
  179. package/lib/store/object-types.js.map +1 -0
  180. package/lib/store/process-schema.d.ts +481 -0
  181. package/lib/store/process-schema.d.ts.map +1 -0
  182. package/lib/store/process-schema.js +482 -0
  183. package/lib/store/process-schema.js.map +1 -0
  184. package/lib/store/process-validation.d.ts +17 -0
  185. package/lib/store/process-validation.d.ts.map +1 -0
  186. package/lib/store/process-validation.js +428 -0
  187. package/lib/store/process-validation.js.map +1 -0
  188. package/lib/store/process.d.ts +261 -0
  189. package/lib/store/process.d.ts.map +1 -0
  190. package/lib/store/process.js +2 -0
  191. package/lib/store/process.js.map +1 -0
  192. package/lib/{types/store → store}/rendering.d.ts +5 -4
  193. package/lib/store/rendering.d.ts.map +1 -0
  194. package/lib/{esm/store → store}/rendering.js +6 -6
  195. package/lib/store/rendering.js.map +1 -0
  196. package/lib/{types/store → store}/schedule.d.ts +4 -3
  197. package/lib/store/schedule.d.ts.map +1 -0
  198. package/lib/store/schedule.js.map +1 -0
  199. package/lib/{types/store → store}/signals.d.ts +2 -1
  200. package/lib/store/signals.d.ts.map +1 -0
  201. package/lib/{cjs/store → store}/signals.js.map +1 -1
  202. package/lib/{types/store → store}/store.d.ts +63 -38
  203. package/lib/store/store.d.ts.map +1 -0
  204. package/lib/{esm/store → store}/store.js +17 -8
  205. package/lib/store/store.js.map +1 -0
  206. package/lib/store/task.d.ts +63 -0
  207. package/lib/store/task.d.ts.map +1 -0
  208. package/lib/store/task.js +5 -0
  209. package/lib/store/task.js.map +1 -0
  210. package/lib/store/temporalio.d.ts +17 -0
  211. package/lib/store/temporalio.d.ts.map +1 -0
  212. package/lib/{esm/store → store}/temporalio.js +6 -6
  213. package/lib/store/temporalio.js.map +1 -0
  214. package/lib/{types/store → store}/workflow.d.ts +87 -33
  215. package/lib/store/workflow.d.ts.map +1 -0
  216. package/lib/{esm/store → store}/workflow.js +36 -37
  217. package/lib/store/workflow.js.map +1 -0
  218. package/lib/{types/sts-token-types.d.ts → sts-token-types.d.ts} +29 -2
  219. package/lib/sts-token-types.d.ts.map +1 -0
  220. package/lib/{esm/sts-token-types.js → sts-token-types.js} +0 -4
  221. package/lib/sts-token-types.js.map +1 -0
  222. package/lib/{types/tenant.d.ts → tenant.d.ts} +1 -0
  223. package/lib/tenant.d.ts.map +1 -0
  224. package/lib/tenant.js.map +1 -0
  225. package/lib/{types/tool-execution.d.ts → tool-execution.d.ts} +3 -2
  226. package/lib/tool-execution.d.ts.map +1 -0
  227. package/lib/tool-execution.js.map +1 -0
  228. package/lib/tools.d.ts +101 -0
  229. package/lib/tools.d.ts.map +1 -0
  230. package/lib/tools.js +2 -0
  231. package/lib/tools.js.map +1 -0
  232. package/lib/{types/training.d.ts → training.d.ts} +10 -9
  233. package/lib/training.d.ts.map +1 -0
  234. package/lib/training.js.map +1 -0
  235. package/lib/{types/transient-tokens.d.ts → transient-tokens.d.ts} +3 -2
  236. package/lib/transient-tokens.d.ts.map +1 -0
  237. package/lib/transient-tokens.js.map +1 -0
  238. package/lib/{types/user.d.ts → user.d.ts} +6 -9
  239. package/lib/user.d.ts.map +1 -0
  240. package/lib/{esm/user.js → user.js} +2 -2
  241. package/lib/user.js.map +1 -0
  242. package/lib/{types/utils → utils}/auth.d.ts +2 -1
  243. package/lib/utils/auth.d.ts.map +1 -0
  244. package/lib/{esm/utils → utils}/auth.js +1 -1
  245. package/lib/utils/auth.js.map +1 -0
  246. package/lib/{types/utils → utils}/schemas.d.ts +5 -4
  247. package/lib/utils/schemas.d.ts.map +1 -0
  248. package/lib/{esm/utils → utils}/schemas.js +24 -22
  249. package/lib/utils/schemas.js.map +1 -0
  250. package/lib/{types/utils → utils}/type-helpers.d.ts +1 -0
  251. package/lib/utils/type-helpers.d.ts.map +1 -0
  252. package/lib/{cjs/utils → utils}/type-helpers.js.map +1 -1
  253. package/lib/{types/versions.d.ts → versions.d.ts} +1 -0
  254. package/lib/versions.d.ts.map +1 -0
  255. package/lib/versions.js.map +1 -0
  256. package/lib/vertesia-common.js +1 -1
  257. package/lib/vertesia-common.js.map +1 -1
  258. package/lib/{types/workflow-analytics.d.ts → workflow-analytics.d.ts} +10 -3
  259. package/lib/workflow-analytics.d.ts.map +1 -0
  260. package/lib/workflow-analytics.js.map +1 -0
  261. package/package.json +19 -19
  262. package/src/Progress.ts +9 -7
  263. package/src/access-control.ts +66 -70
  264. package/src/agent-request-template.test.ts +40 -0
  265. package/src/agent-request-template.ts +45 -0
  266. package/src/analytics.ts +11 -16
  267. package/src/apikey.ts +28 -12
  268. package/src/apps.test.ts +37 -0
  269. package/src/apps.ts +562 -78
  270. package/src/audit-trail.ts +3 -5
  271. package/src/browser-credentials.ts +133 -0
  272. package/src/channels.ts +5 -5
  273. package/src/common.ts +17 -11
  274. package/src/cost-analytics.ts +10 -4
  275. package/src/data-platform.ts +142 -7
  276. package/src/email.ts +7 -4
  277. package/src/embeddings.ts +76 -0
  278. package/src/environment.ts +44 -25
  279. package/src/facets.ts +19 -21
  280. package/src/group.ts +4 -5
  281. package/src/host-utils.test.ts +61 -0
  282. package/src/host-utils.ts +93 -0
  283. package/src/index.ts +18 -10
  284. package/src/integrations.ts +134 -26
  285. package/src/interaction.ts +185 -141
  286. package/src/json-schema.ts +1 -1
  287. package/src/json.ts +6 -3
  288. package/src/meters.ts +6 -9
  289. package/src/model_utility.ts +1 -1
  290. package/src/oauth-scopes.ts +72 -0
  291. package/src/oauth-server.ts +65 -8
  292. package/src/payload.ts +6 -6
  293. package/src/pending-asks.ts +8 -1
  294. package/src/principal-context.ts +27 -0
  295. package/src/project.ts +383 -75
  296. package/src/prompt.ts +30 -27
  297. package/src/query.ts +19 -17
  298. package/src/rate-limiter.ts +1 -1
  299. package/src/refs.ts +19 -24
  300. package/src/roles.test.ts +30 -0
  301. package/src/roles.ts +251 -0
  302. package/src/runs.ts +14 -15
  303. package/src/secrets.ts +60 -0
  304. package/src/skill.ts +1 -2
  305. package/src/store/activity-catalog.ts +13 -1
  306. package/src/store/agent-run.ts +269 -42
  307. package/src/store/collections.ts +13 -13
  308. package/src/store/common.ts +1 -2
  309. package/src/store/conversation-state.ts +42 -5
  310. package/src/store/doc-analyzer.ts +22 -14
  311. package/src/store/dsl-workflow.ts +54 -29
  312. package/src/store/hive-memory.ts +10 -10
  313. package/src/store/index.ts +19 -17
  314. package/src/store/ms.d.ts +34 -3
  315. package/src/store/object-types.ts +75 -79
  316. package/src/store/process-schema.test.ts +106 -0
  317. package/src/store/process-schema.ts +485 -0
  318. package/src/store/process-validation.test.ts +432 -0
  319. package/src/store/process-validation.ts +548 -0
  320. package/src/store/process.ts +305 -0
  321. package/src/store/rendering.ts +12 -12
  322. package/src/store/schedule.ts +3 -3
  323. package/src/store/signals.ts +1 -1
  324. package/src/store/store.ts +115 -89
  325. package/src/store/task.ts +71 -0
  326. package/src/store/temporalio.ts +14 -14
  327. package/src/store/workflow.test.ts +16 -14
  328. package/src/store/workflow.ts +177 -119
  329. package/src/sts-token-types.ts +30 -4
  330. package/src/tool-execution.ts +2 -2
  331. package/src/tools.ts +103 -0
  332. package/src/training.ts +25 -27
  333. package/src/transient-tokens.ts +4 -7
  334. package/src/user.ts +18 -37
  335. package/src/utils/auth.ts +2 -2
  336. package/src/utils/schemas.ts +36 -31
  337. package/src/utils/type-helpers.ts +2 -4
  338. package/src/workflow-analytics.ts +15 -18
  339. package/lib/cjs/Progress.js +0 -61
  340. package/lib/cjs/Progress.js.map +0 -1
  341. package/lib/cjs/access-control.js +0 -91
  342. package/lib/cjs/access-control.js.map +0 -1
  343. package/lib/cjs/analytics.js +0 -3
  344. package/lib/cjs/apikey.js +0 -17
  345. package/lib/cjs/apikey.js.map +0 -1
  346. package/lib/cjs/apps.js +0 -89
  347. package/lib/cjs/apps.js.map +0 -1
  348. package/lib/cjs/ask-user.js +0 -8
  349. package/lib/cjs/ask-user.js.map +0 -1
  350. package/lib/cjs/audit-trail.js +0 -10
  351. package/lib/cjs/audit-trail.js.map +0 -1
  352. package/lib/cjs/channels.js +0 -63
  353. package/lib/cjs/channels.js.map +0 -1
  354. package/lib/cjs/common.js +0 -3
  355. package/lib/cjs/cost-analytics.js +0 -13
  356. package/lib/cjs/cost-analytics.js.map +0 -1
  357. package/lib/cjs/data-platform.js +0 -127
  358. package/lib/cjs/data-platform.js.map +0 -1
  359. package/lib/cjs/email.js +0 -20
  360. package/lib/cjs/email.js.map +0 -1
  361. package/lib/cjs/environment.js +0 -44
  362. package/lib/cjs/environment.js.map +0 -1
  363. package/lib/cjs/facets.js +0 -3
  364. package/lib/cjs/facets.js.map +0 -1
  365. package/lib/cjs/group.js +0 -6
  366. package/lib/cjs/group.js.map +0 -1
  367. package/lib/cjs/index.js +0 -60
  368. package/lib/cjs/index.js.map +0 -1
  369. package/lib/cjs/integrations.js +0 -16
  370. package/lib/cjs/integrations.js.map +0 -1
  371. package/lib/cjs/interaction.js +0 -101
  372. package/lib/cjs/interaction.js.map +0 -1
  373. package/lib/cjs/json-schema.js +0 -3
  374. package/lib/cjs/json.js +0 -3
  375. package/lib/cjs/json.js.map +0 -1
  376. package/lib/cjs/meters.js +0 -13
  377. package/lib/cjs/meters.js.map +0 -1
  378. package/lib/cjs/model_utility.js +0 -6
  379. package/lib/cjs/model_utility.js.map +0 -1
  380. package/lib/cjs/oauth-server.js +0 -3
  381. package/lib/cjs/oauth.js +0 -7
  382. package/lib/cjs/oauth.js.map +0 -1
  383. package/lib/cjs/openapi.js +0 -3
  384. package/lib/cjs/openapi.js.map +0 -1
  385. package/lib/cjs/package.json +0 -3
  386. package/lib/cjs/payload.js +0 -3
  387. package/lib/cjs/pending-asks.js +0 -7
  388. package/lib/cjs/pending-asks.js.map +0 -1
  389. package/lib/cjs/project.js +0 -143
  390. package/lib/cjs/project.js.map +0 -1
  391. package/lib/cjs/prompt.js +0 -21
  392. package/lib/cjs/prompt.js.map +0 -1
  393. package/lib/cjs/query.js +0 -3
  394. package/lib/cjs/query.js.map +0 -1
  395. package/lib/cjs/rate-limiter.js +0 -6
  396. package/lib/cjs/rate-limiter.js.map +0 -1
  397. package/lib/cjs/refs.js +0 -14
  398. package/lib/cjs/refs.js.map +0 -1
  399. package/lib/cjs/runs.js +0 -3
  400. package/lib/cjs/runs.js.map +0 -1
  401. package/lib/cjs/skill.js +0 -14
  402. package/lib/cjs/skill.js.map +0 -1
  403. package/lib/cjs/store/activity-catalog.js +0 -3
  404. package/lib/cjs/store/activity-catalog.js.map +0 -1
  405. package/lib/cjs/store/agent-run.js +0 -16
  406. package/lib/cjs/store/agent-run.js.map +0 -1
  407. package/lib/cjs/store/collections.js +0 -9
  408. package/lib/cjs/store/collections.js.map +0 -1
  409. package/lib/cjs/store/common.js +0 -3
  410. package/lib/cjs/store/common.js.map +0 -1
  411. package/lib/cjs/store/conversation-state.js +0 -19
  412. package/lib/cjs/store/conversation-state.js.map +0 -1
  413. package/lib/cjs/store/doc-analyzer.js +0 -3
  414. package/lib/cjs/store/dsl-workflow.js +0 -5
  415. package/lib/cjs/store/dsl-workflow.js.map +0 -1
  416. package/lib/cjs/store/hive-memory.js +0 -3
  417. package/lib/cjs/store/index.js +0 -33
  418. package/lib/cjs/store/index.js.map +0 -1
  419. package/lib/cjs/store/object-types.js +0 -98
  420. package/lib/cjs/store/object-types.js.map +0 -1
  421. package/lib/cjs/store/rendering.js +0 -26
  422. package/lib/cjs/store/rendering.js.map +0 -1
  423. package/lib/cjs/store/schedule.js +0 -32
  424. package/lib/cjs/store/schedule.js.map +0 -1
  425. package/lib/cjs/store/signals.js +0 -3
  426. package/lib/cjs/store/store.js +0 -182
  427. package/lib/cjs/store/store.js.map +0 -1
  428. package/lib/cjs/store/temporalio.js +0 -44
  429. package/lib/cjs/store/temporalio.js.map +0 -1
  430. package/lib/cjs/store/worker.js +0 -3
  431. package/lib/cjs/store/worker.js.map +0 -1
  432. package/lib/cjs/store/workflow.js +0 -306
  433. package/lib/cjs/store/workflow.js.map +0 -1
  434. package/lib/cjs/sts-token-types.js +0 -32
  435. package/lib/cjs/sts-token-types.js.map +0 -1
  436. package/lib/cjs/tenant.js +0 -3
  437. package/lib/cjs/tenant.js.map +0 -1
  438. package/lib/cjs/tool-execution.js +0 -6
  439. package/lib/cjs/tool-execution.js.map +0 -1
  440. package/lib/cjs/training.js +0 -14
  441. package/lib/cjs/training.js.map +0 -1
  442. package/lib/cjs/transient-tokens.js +0 -9
  443. package/lib/cjs/transient-tokens.js.map +0 -1
  444. package/lib/cjs/user.js +0 -26
  445. package/lib/cjs/user.js.map +0 -1
  446. package/lib/cjs/utils/auth.js +0 -15
  447. package/lib/cjs/utils/auth.js.map +0 -1
  448. package/lib/cjs/utils/schemas.js +0 -182
  449. package/lib/cjs/utils/schemas.js.map +0 -1
  450. package/lib/cjs/utils/type-helpers.js +0 -3
  451. package/lib/cjs/versions.js +0 -10
  452. package/lib/cjs/versions.js.map +0 -1
  453. package/lib/cjs/workflow-analytics.js +0 -52
  454. package/lib/cjs/workflow-analytics.js.map +0 -1
  455. package/lib/esm/Progress.js.map +0 -1
  456. package/lib/esm/access-control.js.map +0 -1
  457. package/lib/esm/analytics.js.map +0 -1
  458. package/lib/esm/apikey.js.map +0 -1
  459. package/lib/esm/apps.js +0 -79
  460. package/lib/esm/apps.js.map +0 -1
  461. package/lib/esm/audit-trail.js +0 -7
  462. package/lib/esm/audit-trail.js.map +0 -1
  463. package/lib/esm/channels.js.map +0 -1
  464. package/lib/esm/common.js.map +0 -1
  465. package/lib/esm/cost-analytics.js.map +0 -1
  466. package/lib/esm/data-platform.js.map +0 -1
  467. package/lib/esm/email.js.map +0 -1
  468. package/lib/esm/environment.js.map +0 -1
  469. package/lib/esm/facets.js.map +0 -1
  470. package/lib/esm/group.js.map +0 -1
  471. package/lib/esm/index.js.map +0 -1
  472. package/lib/esm/integrations.js.map +0 -1
  473. package/lib/esm/interaction.js.map +0 -1
  474. package/lib/esm/json-schema.js.map +0 -1
  475. package/lib/esm/json.js.map +0 -1
  476. package/lib/esm/meters.js.map +0 -1
  477. package/lib/esm/model_utility.js +0 -2
  478. package/lib/esm/model_utility.js.map +0 -1
  479. package/lib/esm/oauth-server.js.map +0 -1
  480. package/lib/esm/oauth.js.map +0 -1
  481. package/lib/esm/openapi.js +0 -2
  482. package/lib/esm/openapi.js.map +0 -1
  483. package/lib/esm/payload.js.map +0 -1
  484. package/lib/esm/pending-asks.js.map +0 -1
  485. package/lib/esm/project.js +0 -138
  486. package/lib/esm/project.js.map +0 -1
  487. package/lib/esm/prompt.js.map +0 -1
  488. package/lib/esm/query.js.map +0 -1
  489. package/lib/esm/rate-limiter.js.map +0 -1
  490. package/lib/esm/refs.js.map +0 -1
  491. package/lib/esm/runs.js.map +0 -1
  492. package/lib/esm/skill.js.map +0 -1
  493. package/lib/esm/store/activity-catalog.js.map +0 -1
  494. package/lib/esm/store/agent-run.js.map +0 -1
  495. package/lib/esm/store/collections.js.map +0 -1
  496. package/lib/esm/store/common.js.map +0 -1
  497. package/lib/esm/store/conversation-state.js.map +0 -1
  498. package/lib/esm/store/doc-analyzer.js.map +0 -1
  499. package/lib/esm/store/dsl-workflow.js +0 -2
  500. package/lib/esm/store/dsl-workflow.js.map +0 -1
  501. package/lib/esm/store/hive-memory.js.map +0 -1
  502. package/lib/esm/store/index.js +0 -17
  503. package/lib/esm/store/index.js.map +0 -1
  504. package/lib/esm/store/object-types.js +0 -95
  505. package/lib/esm/store/object-types.js.map +0 -1
  506. package/lib/esm/store/rendering.js.map +0 -1
  507. package/lib/esm/store/schedule.js.map +0 -1
  508. package/lib/esm/store/signals.js.map +0 -1
  509. package/lib/esm/store/store.js.map +0 -1
  510. package/lib/esm/store/temporalio.js.map +0 -1
  511. package/lib/esm/store/worker.js +0 -2
  512. package/lib/esm/store/worker.js.map +0 -1
  513. package/lib/esm/store/workflow.js.map +0 -1
  514. package/lib/esm/sts-token-types.js.map +0 -1
  515. package/lib/esm/tenant.js.map +0 -1
  516. package/lib/esm/tool-execution.js.map +0 -1
  517. package/lib/esm/training.js.map +0 -1
  518. package/lib/esm/transient-tokens.js.map +0 -1
  519. package/lib/esm/user.js.map +0 -1
  520. package/lib/esm/utils/auth.js.map +0 -1
  521. package/lib/esm/utils/schemas.js.map +0 -1
  522. package/lib/esm/utils/type-helpers.js.map +0 -1
  523. package/lib/esm/versions.js.map +0 -1
  524. package/lib/esm/workflow-analytics.js.map +0 -1
  525. package/lib/tsconfig.tsbuildinfo +0 -1
  526. package/lib/types/Progress.d.ts.map +0 -1
  527. package/lib/types/access-control.d.ts.map +0 -1
  528. package/lib/types/analytics.d.ts.map +0 -1
  529. package/lib/types/apikey.d.ts.map +0 -1
  530. package/lib/types/apps.d.ts.map +0 -1
  531. package/lib/types/ask-user.d.ts.map +0 -1
  532. package/lib/types/audit-trail.d.ts.map +0 -1
  533. package/lib/types/channels.d.ts.map +0 -1
  534. package/lib/types/common.d.ts.map +0 -1
  535. package/lib/types/cost-analytics.d.ts.map +0 -1
  536. package/lib/types/data-platform.d.ts.map +0 -1
  537. package/lib/types/email.d.ts.map +0 -1
  538. package/lib/types/environment.d.ts.map +0 -1
  539. package/lib/types/facets.d.ts.map +0 -1
  540. package/lib/types/group.d.ts.map +0 -1
  541. package/lib/types/index.d.ts.map +0 -1
  542. package/lib/types/integrations.d.ts +0 -83
  543. package/lib/types/integrations.d.ts.map +0 -1
  544. package/lib/types/interaction.d.ts.map +0 -1
  545. package/lib/types/json-schema.d.ts +0 -1
  546. package/lib/types/json-schema.d.ts.map +0 -1
  547. package/lib/types/json.d.ts +0 -1
  548. package/lib/types/json.d.ts.map +0 -1
  549. package/lib/types/meters.d.ts.map +0 -1
  550. package/lib/types/model_utility.d.ts +0 -1
  551. package/lib/types/model_utility.d.ts.map +0 -1
  552. package/lib/types/oauth-server.d.ts.map +0 -1
  553. package/lib/types/oauth.d.ts.map +0 -1
  554. package/lib/types/openapi.d.ts +0 -90
  555. package/lib/types/openapi.d.ts.map +0 -1
  556. package/lib/types/payload.d.ts.map +0 -1
  557. package/lib/types/pending-asks.d.ts.map +0 -1
  558. package/lib/types/project.d.ts.map +0 -1
  559. package/lib/types/prompt.d.ts.map +0 -1
  560. package/lib/types/query.d.ts.map +0 -1
  561. package/lib/types/rate-limiter.d.ts.map +0 -1
  562. package/lib/types/refs.d.ts.map +0 -1
  563. package/lib/types/runs.d.ts.map +0 -1
  564. package/lib/types/skill.d.ts.map +0 -1
  565. package/lib/types/store/activity-catalog.d.ts.map +0 -1
  566. package/lib/types/store/agent-run.d.ts.map +0 -1
  567. package/lib/types/store/collections.d.ts.map +0 -1
  568. package/lib/types/store/common.d.ts.map +0 -1
  569. package/lib/types/store/conversation-state.d.ts.map +0 -1
  570. package/lib/types/store/doc-analyzer.d.ts.map +0 -1
  571. package/lib/types/store/dsl-workflow.d.ts.map +0 -1
  572. package/lib/types/store/hive-memory.d.ts.map +0 -1
  573. package/lib/types/store/index.d.ts +0 -16
  574. package/lib/types/store/index.d.ts.map +0 -1
  575. package/lib/types/store/object-types.d.ts.map +0 -1
  576. package/lib/types/store/rendering.d.ts.map +0 -1
  577. package/lib/types/store/schedule.d.ts.map +0 -1
  578. package/lib/types/store/signals.d.ts.map +0 -1
  579. package/lib/types/store/store.d.ts.map +0 -1
  580. package/lib/types/store/temporalio.d.ts +0 -16
  581. package/lib/types/store/temporalio.d.ts.map +0 -1
  582. package/lib/types/store/worker.d.ts +0 -18
  583. package/lib/types/store/worker.d.ts.map +0 -1
  584. package/lib/types/store/workflow.d.ts.map +0 -1
  585. package/lib/types/sts-token-types.d.ts.map +0 -1
  586. package/lib/types/tenant.d.ts.map +0 -1
  587. package/lib/types/tool-execution.d.ts.map +0 -1
  588. package/lib/types/training.d.ts.map +0 -1
  589. package/lib/types/transient-tokens.d.ts.map +0 -1
  590. package/lib/types/user.d.ts.map +0 -1
  591. package/lib/types/utils/auth.d.ts.map +0 -1
  592. package/lib/types/utils/schemas.d.ts.map +0 -1
  593. package/lib/types/utils/type-helpers.d.ts.map +0 -1
  594. package/lib/types/versions.d.ts.map +0 -1
  595. package/lib/types/workflow-analytics.d.ts.map +0 -1
  596. package/src/openapi.ts +0 -102
  597. package/src/store/worker.ts +0 -19
  598. /package/lib/{esm/analytics.js → analytics.js} +0 -0
  599. /package/lib/{esm/ask-user.js → ask-user.js} +0 -0
  600. /package/lib/{esm/common.js → common.js} +0 -0
  601. /package/lib/{esm/cost-analytics.js → cost-analytics.js} +0 -0
  602. /package/lib/{esm/data-platform.js → data-platform.js} +0 -0
  603. /package/lib/{esm/facets.js → facets.js} +0 -0
  604. /package/lib/{esm/group.js → group.js} +0 -0
  605. /package/lib/{esm/json-schema.js → json-schema.js} +0 -0
  606. /package/lib/{esm/json.js → json.js} +0 -0
  607. /package/lib/{esm/meters.js → meters.js} +0 -0
  608. /package/lib/{esm/oauth-server.js → oauth-server.js} +0 -0
  609. /package/lib/{esm/oauth.js → oauth.js} +0 -0
  610. /package/lib/{esm/payload.js → payload.js} +0 -0
  611. /package/lib/{esm/pending-asks.js → pending-asks.js} +0 -0
  612. /package/lib/{esm/prompt.js → prompt.js} +0 -0
  613. /package/lib/{esm/query.js → query.js} +0 -0
  614. /package/lib/{esm/rate-limiter.js → rate-limiter.js} +0 -0
  615. /package/lib/{esm/refs.js → refs.js} +0 -0
  616. /package/lib/{esm/runs.js → runs.js} +0 -0
  617. /package/lib/{esm/skill.js → skill.js} +0 -0
  618. /package/lib/{esm/store → store}/activity-catalog.js +0 -0
  619. /package/lib/{esm/store → store}/agent-run.js +0 -0
  620. /package/lib/{esm/store → store}/collections.js +0 -0
  621. /package/lib/{esm/store → store}/common.js +0 -0
  622. /package/lib/{esm/store → store}/doc-analyzer.js +0 -0
  623. /package/lib/{esm/store → store}/hive-memory.js +0 -0
  624. /package/lib/{esm/store → store}/schedule.js +0 -0
  625. /package/lib/{esm/store → store}/signals.js +0 -0
  626. /package/lib/{esm/tenant.js → tenant.js} +0 -0
  627. /package/lib/{esm/tool-execution.js → tool-execution.js} +0 -0
  628. /package/lib/{esm/training.js → training.js} +0 -0
  629. /package/lib/{esm/transient-tokens.js → transient-tokens.js} +0 -0
  630. /package/lib/{esm/utils → utils}/type-helpers.js +0 -0
  631. /package/lib/{esm/versions.js → versions.js} +0 -0
  632. /package/lib/{esm/workflow-analytics.js → workflow-analytics.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"vertesia-common.js","sources":["../src/access-control.ts","../src/audit-trail.ts","../src/apikey.ts","../src/apps.ts","../src/email.ts","../src/interaction.ts","../src/data-platform.ts","../src/channels.ts","../../../llumiverse/common/lib/esm/capability/anthropic.js","../../../llumiverse/common/lib/esm/capability/azure_foundry.js","../../../llumiverse/common/lib/esm/capability/bedrock.js","../../../llumiverse/common/lib/esm/capability/openai.js","../../../llumiverse/common/lib/esm/capability/vertexai.js","../../../llumiverse/common/lib/esm/types.js","../../../llumiverse/common/lib/esm/capability.js","../../../llumiverse/common/lib/esm/options/vertexai.js","../src/environment.ts","../../../llumiverse/common/lib/esm/options/fallback.js","../src/group.ts","../src/integrations.ts","../src/meters.ts","../src/project.ts","../src/Progress.ts","../src/prompt.ts","../src/refs.ts","../src/store/collections.ts","../src/store/conversation-state.ts","../src/store/dsl-workflow.ts","../src/store/object-types.ts","../src/store/schedule.ts","../src/store/store.ts","../src/store/workflow.ts","../src/store/rendering.ts","../src/store/temporalio.ts","../src/sts-token-types.ts","../src/training.ts","../src/transient-tokens.ts","../src/user.ts","../src/utils/auth.ts","../src/utils/schemas.ts","../src/versions.ts","../src/workflow-analytics.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,"// Explicit model exceptions\nconst RECORD_MODEL_CAPABILITIES = {\n // claude-3-5-haiku: no image input\n \"claude-3-5-haiku-20241022\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n};\n// Family-level capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n \"claude-3-5-haiku\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-3-haiku\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-3-sonnet\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-3-opus\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-3-5\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-3-7\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-3\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-4\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"claude-\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n};\nconst DEFAULT_CLAUDE_CAPABILITIES = {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n};\nexport function getModelCapabilitiesAnthropic(model) {\n const lower = model.toLowerCase();\n // Exact match first\n if (lower in RECORD_MODEL_CAPABILITIES) {\n return RECORD_MODEL_CAPABILITIES[lower];\n }\n // Longest prefix family match\n let bestKey;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (lower.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n if (bestKey) {\n return RECORD_FAMILY_CAPABILITIES[bestKey];\n }\n return DEFAULT_CLAUDE_CAPABILITIES;\n}\n//# sourceMappingURL=anthropic.js.map","// Global feature flags - temporarily disable tool support for non-OpenAI models\nconst ENABLE_TOOL_SUPPORT_NON_OPENAI = false;\n// Record of Azure Foundry model capabilities keyed by model ID (lowercased) \n// Only include models with specific exceptions that differ from their family patterns\nconst RECORD_MODEL_CAPABILITIES = {\n // OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models\n \"o1-mini\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n // OpenAI o3 is text-only unlike other o-series models\n \"o3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n // Models with special properties not covered by family patterns\n \"deepseek-r1-0528\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"deepseek-v3-0324\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"mistral-medium-2505\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"mistral-nemo\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"llama-4-scout-17b-16e-instruct\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n // OpenAI GPT families\n \"gpt-3.5-turbo\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"gpt-35-turbo\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"gpt-35\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"gpt-4\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"gpt-4.1\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"gpt-4.5\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"gpt-4o\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"gpt\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n // OpenAI O-series families\n \"o1\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"o1-preview\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"o1-pro\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"o3-mini\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"o4-mini\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"o4\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"o\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n // Llama families\n \"llama-3.1\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"llama-3.2\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"llama-3.3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"llama-3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"llama-4\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"llama\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n // Mistral families\n \"mistral-large\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"mistral-small\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"mistral\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n // Microsoft Phi families\n \"phi-4\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"phi\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n // DeepSeek families\n \"deepseek-r1\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"deepseek-v3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"deepseek\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n // AI21 families\n \"ai21-jamba\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"ai21\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"jamba\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n // Cohere families\n \"cohere-command\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"cohere\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"command\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n // xAI families\n \"grok-3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"grok\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true }\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = [\"image\", \"vision\"];\nconst VIDEO_INPUT_MODELS = [\"video\"];\nconst AUDIO_INPUT_MODELS = [\"audio\"];\nconst TEXT_INPUT_MODELS = [\"text\"];\nconst IMAGE_OUTPUT_MODELS = [\"image\"];\nconst VIDEO_OUTPUT_MODELS = [\"video\"];\nconst AUDIO_OUTPUT_MODELS = [\"audio\"];\nconst TEXT_OUTPUT_MODELS = [\"text\"];\nconst EMBEDDING_OUTPUT_MODELS = [\"embed\"];\nconst TOOL_SUPPORT_MODELS = [\"tool\", \"gpt-4\", \"gpt-4o\", \"o1\", \"o3\", \"o4\", \"llama-3\", \"mistral-large\", \"mistral-small\", \"jamba\", \"cohere\", \"command\", \"grok\"];\nfunction modelMatches(modelName, patterns) {\n return patterns.some(pattern => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for an Azure Foundry model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.\n */\nexport function getModelCapabilitiesAzureFoundry(model) {\n // Extract base model from composite ID (deployment::baseModel)\n const { baseModel } = parseAzureFoundryModelId(model);\n const normalized = baseModel.toLowerCase();\n // 1. Exact match in record\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n return applyGlobalToolSupportDisable(record, normalized);\n }\n // 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES\n let bestFamilyKey = undefined;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);\n }\n // 3. Fallback: infer from normalized name using patterns\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n const tool_support_streaming = tool_support || undefined;\n const inferredCapabilities = { input, output, tool_support, tool_support_streaming };\n return applyGlobalToolSupportDisable(inferredCapabilities, normalized);\n}\n/**\n * Apply global tool support disable for non-OpenAI models.\n * Preserves model-specific information for future use while temporarily disabling tool support.\n */\nfunction applyGlobalToolSupportDisable(capabilities, modelName) {\n // Check if this is an OpenAI model\n const isOpenAIModel = modelName.startsWith('gpt-') || modelName.startsWith('o1') || modelName.startsWith('o3') || modelName.startsWith('o4');\n if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {\n // Disable tool support for non-OpenAI models while preserving other capabilities\n return {\n ...capabilities,\n tool_support: false,\n tool_support_streaming: false\n };\n }\n return capabilities;\n}\n// Helper function to parse composite model IDs\nfunction parseAzureFoundryModelId(compositeId) {\n const parts = compositeId.split('::');\n if (parts.length === 2) {\n return {\n deploymentName: parts[0],\n baseModel: parts[1]\n };\n }\n // Backwards compatibility: if no delimiter found, treat as deployment name\n return {\n deploymentName: compositeId,\n baseModel: compositeId\n };\n}\n//# sourceMappingURL=azure_foundry.js.map","// Explicit exception lists keyed by the model identifier (last segment after the prefix)\nconst RECORD_FOUNDATION_EXCEPTIONS = {};\nconst RECORD_PROFILE_EXCEPTIONS = {\n \"meta.llama3-1-70b-instruct-v1:0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"meta.llama3-1-8b-instruct-v1:0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n};\n// Record of Bedrock model capabilities keyed by model identifier.\n// Only include models that differ from their family defaults\nconst RECORD_MODEL_CAPABILITIES = {\n // Models with specific exceptions that differ from family\n \"ai21.jamba-instruct-v1:0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"amazon.nova-canvas-v1:0\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { image: true, text: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"amazon.nova-micro-v1:0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"anthropic.claude-3-5-haiku-20241022-v1:0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"meta.llama3-2-11b-instruct-v1:0\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"meta.llama3-2-90b-instruct-v1:0\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n};\n// Family capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n \"ai21.jamba\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"amazon.nova\": { input: { text: true, image: true, video: true, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"amazon.titan\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"anthropic.claude-3-5-haiku\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"anthropic.claude\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"cohere.command-r\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: true },\n \"cohere.command\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"deepseek.r1\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"meta.llama3-1\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"meta.llama3-2\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"meta.llama3-3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"meta.llama3\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"meta.llama4\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"mistral.mistral-large\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"mistral.mistral\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"mistral.mixtral\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"mistral.pixtral\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"openai.gpt-oss\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"qwen.\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false, tool_support_streaming: false },\n \"twelvelabs.\": { input: { text: true, image: false, video: true, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n \"writer.palmyra\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true, tool_support_streaming: false },\n};\nfunction extractModelLookupKey(modelName) {\n const lower = modelName.toLowerCase();\n const lastSlashIdx = lower.lastIndexOf(\"/\");\n let key = lastSlashIdx === -1 ? lower : lower.slice(lastSlashIdx + 1);\n if (lower.includes(\"inference-profile/\")) {\n key = key.replace(/^[^.]+\\./, \"\");\n }\n return key;\n}\nfunction findFamilyCapability(lookupKey, families) {\n let bestKey;\n for (const key of Object.keys(families)) {\n if (lookupKey.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n return bestKey ? families[bestKey] : undefined;\n}\n/**\n * Extract the model identifier from an ARN or inference profile\n * @param modelName The full model ARN or name\n * @returns The normalized model identifier\n */\nfunction normalizeModelName(modelName) {\n const modelLower = modelName.toLowerCase();\n if (modelLower.includes(\"inference-profile\")) {\n const parts = modelLower.split(\"/\");\n if (parts.length > 1) {\n const providerModel = parts[parts.length - 1];\n const modelParts = providerModel.split(\".\");\n if (modelParts.length > 1 && modelParts[1] === \"deepseek\") {\n return `deepseek-${modelParts.slice(2).join(\".\")}`;\n }\n return modelParts.length > 2 ? modelParts.slice(2).join(\".\") : providerModel;\n }\n }\n return modelLower;\n}\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = [\"image\"]; // fallback: if model id contains 'image', supports image input\nconst VIDEO_INPUT_MODELS = [\"video\"];\nconst AUDIO_INPUT_MODELS = [\"audio\"];\nconst TEXT_INPUT_MODELS = [\"text\"];\nconst IMAGE_OUTPUT_MODELS = [\"image\"];\nconst VIDEO_OUTPUT_MODELS = [\"video\"];\nconst AUDIO_OUTPUT_MODELS = [\"audio\"];\nconst TEXT_OUTPUT_MODELS = [\"text\"];\nconst EMBEDDING_OUTPUT_MODELS = [\"embed\"];\nconst TOOL_SUPPORT_MODELS = [\"tool\", \"sonnet\", \"opus\", \"nova\", \"palmyra\", \"command-r\", \"mistral-large\", \"pixtral\"];\nfunction modelMatches(modelName, patterns) {\n return patterns.some(pattern => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for a Bedrock model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesBedrock(model) {\n // Normalize ARN or inference-profile to model ID\n const modelLower = model.toLowerCase();\n let normalized = modelLower;\n const arnPattern = /^arn:aws:bedrock:[^:]+:[^:]*:(inference-profile|foundation-model)\\/.+/i;\n if (arnPattern.test(modelLower)) {\n // Extract after last occurrence of 'foundation-model/' or 'inference-profile/'\n const foundationIdx = modelLower.lastIndexOf('foundation-model/');\n const inferenceIdx = modelLower.lastIndexOf('inference-profile/');\n if (foundationIdx !== -1) {\n normalized = modelLower.substring(foundationIdx);\n }\n else if (inferenceIdx !== -1) {\n normalized = modelLower.substring(inferenceIdx);\n }\n }\n const isInferenceProfile = normalized.startsWith(\"inference-profile/\");\n const isFoundationModel = normalized.startsWith(\"foundation-model/\");\n const lookupKey = extractModelLookupKey(normalized);\n // 1. Check exceptions\n if (isFoundationModel) {\n const exception = RECORD_FOUNDATION_EXCEPTIONS[lookupKey];\n if (exception)\n return exception;\n }\n else if (isInferenceProfile) {\n const exception = RECORD_PROFILE_EXCEPTIONS[lookupKey];\n if (exception)\n return exception;\n }\n // 2. Check recorded capabilities by model\n const modelCapability = RECORD_MODEL_CAPABILITIES[lookupKey];\n if (modelCapability)\n return modelCapability;\n // 3. Check recorded capabilities by family\n const familyCapability = findFamilyCapability(lookupKey, RECORD_FAMILY_CAPABILITIES);\n if (familyCapability)\n return familyCapability;\n // 4. Fallback: infer from normalized name\n const inferredName = normalizeModelName(lookupKey);\n const input = {\n text: modelMatches(inferredName, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(inferredName, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(inferredName, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(inferredName, AUDIO_INPUT_MODELS) || undefined,\n embed: false\n };\n const output = {\n text: modelMatches(inferredName, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(inferredName, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(inferredName, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(inferredName, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(inferredName, EMBEDDING_OUTPUT_MODELS) || undefined\n };\n const tool_support = modelMatches(inferredName, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=bedrock.js.map","// Record of OpenAI model capabilities keyed by model ID (lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n \"chatgpt-4o-latest\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true }\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\n// For OpenAI, tool_support_streaming matches tool_support since the API supports tools while streaming\nconst RECORD_FAMILY_CAPABILITIES = {\n \"gpt\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-3.5\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"gpt-4\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-4-turbo\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-4o\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-4.1\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-4.5\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-5\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gpt-image\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"chatgpt-image\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"dall-e\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"gpt-oss\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"o\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"o1-mini\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"o1-preview\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"omni-moderation\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"sora\": { input: { text: true, image: true, video: true, audio: false, embed: false }, output: { text: false, image: false, video: true, audio: true, embed: false }, tool_support: false },\n \"text-embedding\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: false, image: false, video: false, audio: false, embed: true }, tool_support: false },\n \"text-moderation\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"whisper\": { input: { text: false, image: false, video: false, audio: true, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false }\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = [\"image\"];\nconst VIDEO_INPUT_MODELS = [\"video\"];\nconst AUDIO_INPUT_MODELS = [\"audio\"];\nconst TEXT_INPUT_MODELS = [\"text\"];\nconst IMAGE_OUTPUT_MODELS = [\"image\"];\nconst VIDEO_OUTPUT_MODELS = [\"video\"];\nconst AUDIO_OUTPUT_MODELS = [\"audio\"];\nconst TEXT_OUTPUT_MODELS = [\"text\"];\nconst EMBEDDING_OUTPUT_MODELS = [\"embed\"];\nconst TOOL_SUPPORT_MODELS = [\"tool\", \"gpt\", \"gpt-5\", \"o1\", \"o3\", \"o4\"];\nfunction modelMatches(modelName, patterns) {\n return patterns.some(pattern => modelName.includes(pattern));\n}\nfunction normalizeOpenAIModelName(modelName) {\n return modelName.toLowerCase();\n}\n/**\n * Get the full ModelCapabilities for an OpenAI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n * For OpenAI models, tool_support_streaming defaults to tool_support since the API supports tools while streaming.\n */\nexport function getModelCapabilitiesOpenAI(model) {\n const normalized = normalizeOpenAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...record,\n tool_support_streaming: record.tool_support_streaming ?? record.tool_support\n };\n }\n let bestFamilyKey = undefined;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n const family = RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...family,\n tool_support_streaming: family.tool_support_streaming ?? family.tool_support\n };\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n // Default tool_support_streaming to tool_support for OpenAI models\n return { input, output, tool_support, tool_support_streaming: tool_support };\n}\n//# sourceMappingURL=openai.js.map","// Record of Vertex AI model capabilities keyed by model ID (last path segment, lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n \"gemini-2.0-flash-lite-001\": { input: { text: true, image: true, video: true, audio: true, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n \"gemini\": { input: { text: true, image: true, video: true, audio: true, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"gemini-2.5-flash-image\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"gemini-3.0-pro-image\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"gemini-3.0-flash-image\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: true, video: false, audio: false, embed: false }, tool_support: false },\n 'imagen': { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"imagen-3.0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"imagen-3.0-capability\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"imagen-4.0\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"imagen-4.0-capability\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: false, image: true, video: false, audio: false, embed: false }, tool_support: false },\n \"claude\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"llama\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"llama-2\": { input: { text: true, image: false, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: false },\n \"llama-3.2\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n \"llama-4\": { input: { text: true, image: true, video: false, audio: false, embed: false }, output: { text: true, image: false, video: false, audio: false, embed: false }, tool_support: true },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = [\"image\"];\nconst VIDEO_INPUT_MODELS = [\"video\"];\nconst AUDIO_INPUT_MODELS = [\"audio\"];\nconst TEXT_INPUT_MODELS = [\"text\"];\nconst IMAGE_OUTPUT_MODELS = [\"image\"];\nconst VIDEO_OUTPUT_MODELS = [\"video\"];\nconst AUDIO_OUTPUT_MODELS = [\"audio\"];\nconst TEXT_OUTPUT_MODELS = [\"text\"];\nconst EMBEDDING_OUTPUT_MODELS = [\"embed\"];\nconst TOOL_SUPPORT_MODELS = [\"tool\", \"sonnet\", \"opus\", \"gemini\", \"claude\"];\nfunction modelMatches(modelName, patterns) {\n return patterns.some(pattern => modelName.includes(pattern));\n}\nfunction normalizeVertexAIModelName(modelName) {\n const segments = modelName.toLowerCase().split(\"/\");\n return segments[segments.length - 1];\n}\n/**\n * Get the full ModelCapabilities for a Vertex AI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesVertexAI(model) {\n const normalized = normalizeVertexAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record)\n return record;\n let bestFamilyKey = undefined;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=vertexai.js.map","// ============== Provider details ===============\nexport var Providers;\n(function (Providers) {\n Providers[\"openai\"] = \"openai\";\n Providers[\"openai_compatible\"] = \"openai_compatible\";\n Providers[\"azure_openai\"] = \"azure_openai\";\n Providers[\"azure_foundry\"] = \"azure_foundry\";\n Providers[\"huggingface_ie\"] = \"huggingface_ie\";\n Providers[\"replicate\"] = \"replicate\";\n Providers[\"bedrock\"] = \"bedrock\";\n Providers[\"vertexai\"] = \"vertexai\";\n Providers[\"togetherai\"] = \"togetherai\";\n Providers[\"mistralai\"] = \"mistralai\";\n Providers[\"groq\"] = \"groq\";\n Providers[\"watsonx\"] = \"watsonx\";\n Providers[\"xai\"] = \"xai\";\n Providers[\"anthropic\"] = \"anthropic\";\n})(Providers || (Providers = {}));\nexport const ProviderList = {\n openai: {\n id: Providers.openai,\n name: \"OpenAI\",\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n azure_openai: {\n id: Providers.azure_openai,\n name: \"Azure OpenAI\",\n requiresApiKey: false,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n azure_foundry: {\n id: Providers.azure_foundry,\n name: \"Azure Foundry\",\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n huggingface_ie: {\n id: Providers.huggingface_ie,\n name: \"HuggingFace Inference Endpoint\",\n requiresApiKey: true,\n requiresEndpointUrl: true,\n },\n replicate: {\n id: Providers.replicate,\n name: \"Replicate\",\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: true,\n },\n bedrock: {\n id: Providers.bedrock,\n name: \"AWS Bedrock\",\n requiresApiKey: false,\n requiresEndpointUrl: false,\n endpointPlaceholder: \"region name (eg. us-east-1)\",\n supportSearch: false,\n },\n vertexai: {\n id: Providers.vertexai,\n name: \"Google Agent Platform (Vertex AI)\",\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n togetherai: {\n id: Providers.togetherai,\n name: \"Together AI\",\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n mistralai: {\n id: Providers.mistralai,\n name: \"Mistral AI\",\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n groq: {\n id: Providers.groq,\n name: \"Groq Cloud\",\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n watsonx: {\n id: Providers.watsonx,\n name: \"IBM WatsonX\",\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false\n },\n xai: {\n id: Providers.xai,\n name: \"xAI (Grok)\",\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false\n },\n openai_compatible: {\n id: Providers.openai_compatible,\n name: \"OpenAI Compatible\",\n requiresApiKey: true,\n requiresEndpointUrl: true,\n endpointPlaceholder: \"https://api.example.com/v1\",\n supportSearch: false\n },\n anthropic: {\n id: Providers.anthropic,\n name: \"Anthropic\",\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\n/**\n * Standardized error class for Llumiverse driver errors.\n *\n * Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)\n * into a consistent format. The primary value is the `retryable` flag, which enables upstream\n * consumers to implement smart retry logic.\n *\n * @example\n * ```typescript\n * try {\n * const result = await driver.execute(segments, options);\n * } catch (error) {\n * if (LlumiverseError.isLlumiverseError(error)) {\n * console.log(`Provider: ${error.context.provider}`);\n * console.log(`Model: ${error.context.model}`);\n * console.log(`Retryable: ${error.retryable}`);\n *\n * if (error.retryable) {\n * // Implement retry logic with exponential backoff\n * await retryWithBackoff(() => driver.execute(segments, options));\n * } else {\n * // Handle non-retryable error (e.g., invalid API key, malformed request)\n * logError(error);\n * }\n * }\n * throw error;\n * }\n * ```\n */\nexport class LlumiverseError extends Error {\n /**\n * HTTP status code (e.g., 429, 500) if available.\n * Undefined if the error doesn't have a numeric status code.\n */\n code;\n /**\n * Provider-specific error name/type (e.g., \"ThrottlingException\", \"ValidationException\").\n * Optional - used to preserve the semantic error type from the provider SDK.\n */\n name;\n /**\n * Whether this error is retryable.\n * - True: Definitely retryable (rate limits, timeouts, server errors)\n * - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)\n * - Undefined: Unknown retryability - allows consumers to decide default behavior\n *\n * When undefined, consumers can choose their retry strategy:\n * - Conservative: Don't retry unknown errors (avoid spam)\n * - Resilient: Retry unknown errors (prioritize success)\n */\n retryable;\n /**\n * Context about where and how the error occurred.\n * Includes provider, model, operation type.\n */\n context;\n /**\n * The original error from the provider SDK.\n * Preserved for debugging and detailed error inspection.\n */\n originalError;\n constructor(message, retryable, context, originalError, code, name) {\n super(message);\n this.name = name || 'LlumiverseError';\n this.code = code;\n this.retryable = retryable;\n this.context = context;\n this.originalError = originalError;\n // Preserve stack trace from original error if available\n if (originalError instanceof Error && originalError.stack) {\n this.stack = originalError.stack;\n }\n }\n /**\n * Serialize the error to JSON for logging or transmission.\n * Includes all error properties except the original error object itself.\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n retryable: this.retryable,\n context: this.context,\n stack: this.stack,\n // Include original error message if available\n originalErrorMessage: this.originalError instanceof Error\n ? this.originalError.message\n : String(this.originalError),\n };\n }\n /**\n * Type guard to check if an error is a LlumiverseError.\n * Useful for conditional error handling.\n *\n * @param error - The error to check\n * @returns True if the error is a LlumiverseError\n */\n static isLlumiverseError(error) {\n return error instanceof LlumiverseError;\n }\n}\n//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n SharedOptions[\"effort\"] = \"effort\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\n/**\n * @deprecated This is deprecated. Use CompletionResult.type information instead.\n */\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { getModelCapabilitiesAnthropic } from \"./capability/anthropic.js\";\nimport { getModelCapabilitiesAzureFoundry } from \"./capability/azure_foundry.js\";\nimport { getModelCapabilitiesBedrock } from \"./capability/bedrock.js\";\nimport { getModelCapabilitiesOpenAI } from \"./capability/openai.js\";\nimport { getModelCapabilitiesVertexAI } from \"./capability/vertexai.js\";\nimport { Providers } from \"./types.js\";\nexport function getModelCapabilities(model, provider) {\n //Check for locations/<location>/ prefix and remove it\n if (model.startsWith(\"locations/\")) {\n const parts = model.split(\"/\");\n if (parts.length >= 3) {\n model = parts.slice(2).join(\"/\");\n }\n }\n const capabilities = _getModelCapabilities(model, provider);\n // Globally disable audio and video for all models, as we don't support them yet\n // TODO: Remove this when we add support.\n capabilities.input.audio = false;\n capabilities.output.audio = false;\n capabilities.output.video = false;\n // Preserve tool_support_streaming from provider-specific capabilities if set,\n // otherwise default to false for providers that haven't been verified\n return capabilities;\n}\nfunction _getModelCapabilities(model, provider) {\n switch (provider?.toLowerCase()) {\n case Providers.anthropic:\n return getModelCapabilitiesAnthropic(model);\n case Providers.vertexai:\n return getModelCapabilitiesVertexAI(model);\n case Providers.openai:\n return getModelCapabilitiesOpenAI(model);\n case Providers.openai_compatible:\n return getModelCapabilitiesOpenAICompatible(model);\n case Providers.bedrock:\n return getModelCapabilitiesBedrock(model);\n case Providers.azure_foundry:\n // Azure Foundry uses OpenAI capabilities\n return getModelCapabilitiesAzureFoundry(model);\n case Providers.groq:\n case Providers.togetherai:\n case Providers.mistralai:\n // These providers host text models that generally support tool use\n return getModelCapabilitiesOpenAICompatible(model);\n case Providers.xai:\n // xAI (Grok) models support tool use and are text-based\n return {\n input: { text: true, image: model.includes(\"vision\") },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: false, // Conservative - may work but not tested\n };\n default:\n // Guess the provider based on the model name\n if (model.startsWith(\"gpt\")) {\n return getModelCapabilitiesOpenAI(model);\n }\n else if (model.startsWith(\"claude\")) {\n return getModelCapabilitiesAnthropic(model);\n }\n else if (model.startsWith(\"grok\")) {\n // xAI Grok models\n return {\n input: { text: true, image: model.includes(\"vision\") },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: false,\n };\n }\n else if (model.startsWith(\"publishers/\")) {\n return getModelCapabilitiesVertexAI(model);\n }\n else if (model.startsWith(\"arn:aws\")) {\n return getModelCapabilitiesBedrock(model);\n }\n // Fallback to a generic model with no capabilities\n return { input: {}, output: {} };\n }\n}\n// Patterns for models known NOT to support tool use on OpenAI-compatible endpoints\nconst NO_TOOL_SUPPORT_PATTERNS = ['image', 'embed', 'moderation', 'whisper', 'sora', 'dall-e', 'tts'];\n/**\n * For OpenAI-compatible endpoints (e.g., OpenRouter), try OpenAI capability lookup first.\n * If no explicit match is found, default to tool_support: true since most models\n * on these platforms support tool use. Blacklist known non-tool-supporting patterns.\n */\nfunction getModelCapabilitiesOpenAICompatible(model) {\n const caps = getModelCapabilitiesOpenAI(model);\n if (caps.tool_support !== undefined) {\n return caps;\n }\n const normalized = model.toLowerCase();\n const isNonToolModel = NO_TOOL_SUPPORT_PATTERNS.some(p => normalized.includes(p));\n return {\n input: { text: true },\n output: { text: true },\n tool_support: !isNonToolModel,\n tool_support_streaming: !isNonToolModel,\n };\n}\nexport function supportsToolUse(model, provider, streaming = false) {\n const capabilities = getModelCapabilities(model, provider);\n return streaming ? !!capabilities.tool_support_streaming : !!capabilities.tool_support;\n}\nexport function modelModalitiesToArray(modalities) {\n return Object.entries(modalities)\n .filter(([_, isSupported]) => isSupported)\n .map(([modality]) => modality);\n}\n//# sourceMappingURL=capability.js.map","import { OptionType, SharedOptions } from \"../types.js\";\nimport { textOptionsFallback } from \"./fallback.js\";\nimport { buildClaudeCacheOptions, buildClaudeCacheTtlOptions, buildClaudeEffortOptions, buildClaudeIncludeThoughtsOption, buildClaudeThinkingBudgetOption, getClaudeMaxTokensLimit, } from \"./shared-parsing.js\";\nimport { hasSamplingParameterRestriction, isGeminiModelVersionGte, } from \"./version-parsing.js\";\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport var ThinkingLevel;\n(function (ThinkingLevel) {\n ThinkingLevel[\"HIGH\"] = \"HIGH\";\n ThinkingLevel[\"MEDIUM\"] = \"MEDIUM\";\n ThinkingLevel[\"LOW\"] = \"LOW\";\n ThinkingLevel[\"MINIMAL\"] = \"MINIMAL\";\n ThinkingLevel[\"THINKING_LEVEL_UNSPECIFIED\"] = \"THINKING_LEVEL_UNSPECIFIED\";\n})(ThinkingLevel || (ThinkingLevel = {}));\n/** Models that support Flex processing (shared, cost-efficient tier). */\nconst FLEX_SUPPORTED_GEMINI_MODELS = [\n \"gemini-3.1-flash-lite-preview\",\n \"gemini-3.1-flash-image-preview\",\n \"gemini-3.1-pro-preview\",\n \"gemini-3-flash-preview\",\n \"gemini-3-pro-image-preview\",\n];\nexport function isFlexSupportedGeminiModel(model) {\n const modelName = model.split('/').pop() ?? model;\n return FLEX_SUPPORTED_GEMINI_MODELS.some(m => modelName.includes(m));\n}\nexport function getVertexAiOptions(model, option) {\n if (model.includes(\"imagen-\")) {\n return getImagenOptions(model, option);\n }\n else if (model.includes(\"gemini\")) {\n return getGeminiOptions(model, option);\n }\n else if (model.includes(\"claude\")) {\n return getClaudeOptions(model, option);\n }\n else if (model.includes(\"llama\")) {\n return getLlamaOptions(model);\n }\n return textOptionsFallback;\n}\nfunction getImagenOptions(model, option) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images, type: OptionType.numeric, min: 1, max: 4, default: 1,\n integer: true, description: \"Number of Images to generate\",\n },\n {\n name: SharedOptions.seed, type: OptionType.numeric, min: 0, max: 4294967295, default: 12,\n integer: true, description: \"The seed of the generated image\"\n },\n {\n name: \"person_generation\", type: OptionType.enum, enum: { \"Disallow the inclusion of people or faces in images\": \"dont_allow\", \"Allow generation of adults only\": \"allow_adult\", \"Allow generation of people of all ages\": \"allow_all\" },\n default: \"allow_adult\", description: \"The safety setting for allowing the generation of people in the image\"\n },\n {\n name: \"safety_setting\", type: OptionType.enum, enum: { \"Block very few problematic prompts and responses\": \"block_none\", \"Block only few problematic prompts and responses\": \"block_only_high\", \"Block some problematic prompts and responses\": \"block_medium_and_above\", \"Strictest filtering\": \"block_low_and_above\" },\n default: \"block_medium_and_above\", description: \"The overall safety setting\"\n },\n ];\n const outputOptions = [\n {\n name: \"image_file_type\", type: OptionType.enum, enum: { \"JPEG\": \"image/jpeg\", \"PNG\": \"image/png\" },\n default: \"image/png\", description: \"The file type of the generated image\",\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: \"jpeg_compression_quality\", type: OptionType.numeric, min: 0, max: 100, default: 75,\n integer: true, description: \"The compression quality of the JPEG image\",\n };\n if (option?.image_file_type === \"image/jpeg\") {\n outputOptions.push(jpegQuality);\n }\n if (model.includes(\"generate\")) {\n // Generate models\n const modeOptions = [\n {\n name: \"aspect_ratio\", type: OptionType.enum, enum: { \"1:1\": \"1:1\", \"4:3\": \"4:3\", \"3:4\": \"3:4\", \"16:9\": \"16:9\", \"9:16\": \"9:16\" },\n default: \"1:1\", description: \"The aspect ratio of the generated image\"\n },\n {\n name: \"add_watermark\", type: OptionType.boolean, default: false, description: \"Add an invisible watermark to the generated image, useful for detection of AI images\"\n },\n ];\n const enhanceOptions = !model.includes(\"generate-001\") ? [\n {\n name: \"enhance_prompt\", type: OptionType.boolean, default: true, description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\"\n },\n ] : [];\n return {\n _option_id: \"vertexai-imagen\",\n options: [\n ...commonOptions,\n ...modeOptions,\n ...outputOptions,\n ...enhanceOptions,\n ]\n };\n }\n if (model.includes(\"capability\")) {\n // Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: \"edit_mode\", type: OptionType.enum,\n enum: {\n \"EDIT_MODE_INPAINT_REMOVAL\": \"EDIT_MODE_INPAINT_REMOVAL\",\n \"EDIT_MODE_INPAINT_INSERTION\": \"EDIT_MODE_INPAINT_INSERTION\",\n \"EDIT_MODE_BGSWAP\": \"EDIT_MODE_BGSWAP\",\n \"EDIT_MODE_OUTPAINT\": \"EDIT_MODE_OUTPAINT\",\n \"CUSTOMIZATION_SUBJECT\": \"CUSTOMIZATION_SUBJECT\",\n \"CUSTOMIZATION_STYLE\": \"CUSTOMIZATION_STYLE\",\n \"CUSTOMIZATION_CONTROLLED\": \"CUSTOMIZATION_CONTROLLED\",\n \"CUSTOMIZATION_INSTRUCT\": \"CUSTOMIZATION_INSTRUCT\",\n },\n description: \"The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.\"\n },\n {\n name: \"guidance_scale\", type: OptionType.numeric, min: 0, max: 500, default: guidanceScaleDefault,\n integer: true, description: \"How closely the generation follows the prompt\"\n }\n ];\n const maskOptions = (option?.edit_mode?.includes(\"EDIT\")) ? [\n {\n name: \"mask_mode\", type: OptionType.enum,\n enum: {\n \"MASK_MODE_USER_PROVIDED\": \"MASK_MODE_USER_PROVIDED\",\n \"MASK_MODE_BACKGROUND\": \"MASK_MODE_BACKGROUND\",\n \"MASK_MODE_FOREGROUND\": \"MASK_MODE_FOREGROUND\",\n \"MASK_MODE_SEMANTIC\": \"MASK_MODE_SEMANTIC\",\n },\n default: \"MASK_MODE_USER_PROVIDED\",\n description: \"How should the mask for the generation be provided\"\n },\n {\n name: \"mask_dilation\", type: OptionType.numeric, min: 0, max: 1,\n integer: true, description: \"The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.\"\n },\n ] : [];\n const maskClassOptions = (option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC) ? [\n {\n name: \"mask_class\", type: OptionType.string_list, default: [],\n description: \"Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids\"\n }\n ] : [];\n const editOptions = option?.edit_mode?.includes(\"EDIT\") ? [\n {\n name: \"edit_steps\", type: OptionType.numeric, default: 75,\n integer: true, description: \"The number of steps for the base image generation, more steps means more time and better quality\"\n },\n ] : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED\n || option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT ? [\n {\n name: \"controlType\", type: OptionType.enum, enum: { \"Face Mesh\": \"CONTROL_TYPE_FACE_MESH\", \"Canny\": \"CONTROL_TYPE_CANNY\", \"Scribble\": \"CONTROL_TYPE_SCRIBBLE\" },\n default: \"CONTROL_TYPE_CANNY\", description: \"Method used to generate the control image\"\n },\n {\n name: \"controlImageComputation\", type: OptionType.boolean, default: true, description: \"Should the control image be computed from the input image, or is it provided\"\n }\n ] : [];\n return {\n _option_id: \"vertexai-imagen\",\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ]\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiEffortOptions(model) {\n if (model.includes(\"gemini-3-pro-image\")) {\n return { \"High\": \"high\" };\n }\n if (model.includes(\"gemini-3.1-flash-image\")) {\n return { \"Low\": \"low\", \"High\": \"high\" };\n }\n return { \"Low\": \"low\", \"Medium\": \"medium\", \"High\": \"high\" };\n}\nfunction getGeminiThinkingOptionItems(model) {\n return [\n {\n name: \"include_thoughts\",\n type: OptionType.boolean,\n default: false,\n description: \"Include the model's reasoning process in the response\"\n },\n {\n name: SharedOptions.effort,\n type: OptionType.enum,\n enum: getGeminiEffortOptions(model),\n description: \"Higher thinking levels may improve quality, but increase response times and token costs\"\n }\n ];\n}\nfunction getGeminiOptions(model, option) {\n // Special handling for gemini image / nano banana models\n if (model.includes(\"image\")) {\n const isGemini25OrLater = isGeminiModelVersionGte(model, \"2.5\");\n const isGemini3OrLater = isGeminiModelVersionGte(model, \"3.0\");\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\", \"frequency_penalty\", \"seed\", \"top_k\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Set max temperature to 2.0\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature &&\n option.type === OptionType.numeric) {\n return {\n ...option,\n max: 2.0,\n };\n }\n return option;\n });\n const max_tokens = [{\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: \"Maximum output tokens\"\n }];\n const imageOptions = [];\n // Aspect ratio, person generation, prominent people: 2.5+\n if (isGemini25OrLater) {\n imageOptions.push({\n name: \"image_aspect_ratio\",\n type: OptionType.enum,\n enum: {\n \"1:1\": \"1:1\",\n \"2:3\": \"2:3\",\n \"3:2\": \"3:2\",\n \"3:4\": \"3:4\",\n \"4:3\": \"4:3\",\n \"9:16\": \"9:16\",\n \"16:9\": \"16:9\",\n \"21:9\": \"21:9\"\n },\n default: \"1:1\",\n description: \"Aspect ratio of the generated images\"\n }, {\n name: \"person_generation\",\n type: OptionType.enum,\n enum: {\n \"Allow all people\": \"ALLOW_ALL\",\n \"Allow adults only\": \"ALLOW_ADULT\",\n \"Do not generate people\": \"ALLOW_NONE\"\n },\n default: \"ALLOW_ALL\",\n description: \"Controls the generation of people in images\"\n }, {\n name: \"prominent_people\",\n type: OptionType.enum,\n enum: {\n \"Allow prominent people\": \"ALLOW_PROMINENT_PEOPLE\",\n \"Block prominent people\": \"BLOCK_PROMINENT_PEOPLE\"\n },\n description: \"Controls whether prominent people (celebrities) can be generated\"\n });\n }\n // Resolution settings: 3.0+\n if (isGemini3OrLater) {\n imageOptions.push({\n name: \"image_size\",\n type: OptionType.enum,\n enum: {\n \"1K\": \"1K\",\n \"2K\": \"2K\",\n \"4K\": \"4K\"\n },\n default: \"1K\",\n description: \"Size of generated images\"\n });\n }\n // Output format: all image models\n imageOptions.push({\n name: \"output_mime_type\",\n type: OptionType.enum,\n enum: {\n \"PNG\": \"image/png\",\n \"JPEG\": \"image/jpeg\",\n },\n default: \"image/png\",\n description: \"MIME type of the generated image\",\n refresh: true,\n });\n if (option?.output_mime_type === \"image/jpeg\") {\n imageOptions.push({\n name: \"output_compression_quality\",\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 90,\n integer: true,\n description: \"Compression quality for JPEG images (0-100)\"\n });\n }\n // Thinking options: 3.0+ (same as non-image counterparts)\n const thinkingOptions = isGemini3OrLater ? getGeminiThinkingOptionItems(model) : [];\n return {\n _option_id: \"vertexai-gemini\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ...imageOptions,\n ...thinkingOptions,\n ]\n };\n }\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\"];\n const commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n const seedOption = {\n name: SharedOptions.seed, type: OptionType.numeric, integer: true, description: \"The seed for the generation, useful for reproducibility\"\n };\n if (isGeminiModelVersionGte(model, \"3.0\")) {\n const flexOptions = isFlexSupportedGeminiModel(model) ? [{\n name: \"flex\",\n type: OptionType.boolean,\n default: false,\n description: \"Use Flex processing tier for cost-efficient, batch-style execution with relaxed latency.\",\n }] : [];\n return {\n _option_id: \"vertexai-gemini\",\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...getGeminiThinkingOptionItems(model),\n ...flexOptions,\n ]\n };\n }\n if (model.includes(\"-2.5-\")) {\n // Gemini 2.5 thinking models\n // Set budget token ranges based on model variant\n let budgetMin = -1;\n let budgetMax = 24576;\n let budgetDescription = \"\";\n if (model.includes(\"flash-lite\")) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription = \"The target number of tokens to use for reasoning. \" +\n \"Flash Lite default: Model does not think. \" +\n \"Range: 512-24576 tokens. \" +\n \"Set to 0 to disable thinking, -1 for dynamic thinking.\";\n }\n else if (model.includes(\"flash\")) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription = \"The target number of tokens to use for reasoning. \" +\n \"Flash default: Dynamic thinking (model decides when and how much to think). \" +\n \"Range: 0-24576 tokens. \" +\n \"Set to 0 to disable thinking, -1 for dynamic thinking.\";\n }\n else if (model.includes(\"pro\")) {\n budgetMin = -1;\n budgetMax = 32768;\n budgetDescription = \"The target number of tokens to use for reasoning. \" +\n \"Pro default: Dynamic thinking (model decides when and how much to think). \" +\n \"Range: 128-32768 tokens. \" +\n \"Cannot disable thinking - minimum 128 tokens. Set to -1 for dynamic thinking.\";\n }\n const geminiThinkingOptions = [\n {\n name: \"include_thoughts\",\n type: OptionType.boolean,\n default: false,\n description: \"Include the model's reasoning process in the response\"\n },\n {\n name: \"thinking_budget_tokens\",\n type: OptionType.numeric,\n min: budgetMin,\n max: budgetMax,\n default: undefined,\n integer: true,\n step: 100,\n description: budgetDescription,\n }\n ];\n return {\n _option_id: \"vertexai-gemini\",\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...geminiThinkingOptions,\n ]\n };\n }\n return {\n _option_id: \"vertexai-gemini\",\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ]\n };\n}\nfunction getClaudeOptions(model, option) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\", \"frequency_penalty\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Opus 4.7+ models no longer support temperature, top_p, top_k (returns 400 error)\n // Opus 4.6 and Sonnet 4.6 still support these parameters\n const hasSamplingRestriction = hasSamplingParameterRestriction(model);\n if (hasSamplingRestriction) {\n commonOptions = commonOptions.filter((option) => option.name !== SharedOptions.temperature &&\n option.name !== SharedOptions.top_p &&\n option.name !== \"top_k\");\n }\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n return {\n _option_id: \"vertexai-claude\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ...buildClaudeEffortOptions(model),\n ...buildClaudeThinkingBudgetOption(model),\n ...buildClaudeIncludeThoughtsOption(model),\n ...buildClaudeCacheOptions(),\n ...buildClaudeCacheTtlOptions(option?.cache_enabled),\n ],\n };\n}\nfunction getLlamaOptions(model) {\n const max_tokens_limit = getLlamaMaxTokensLimit(model);\n const excludeOptions = [\"max_tokens\", \"presence_penalty\", \"frequency_penalty\", \"stop_sequence\"];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [{\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1, max: max_tokens_limit,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n }];\n // Set max temperature to 1.0 for Llama models\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature &&\n option.type === OptionType.numeric) {\n return {\n ...option,\n max: 1.0,\n };\n }\n return option;\n });\n return {\n _option_id: \"text-fallback\",\n options: [\n ...max_tokens,\n ...commonOptions,\n ]\n };\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes(\"image\")) {\n return isGeminiModelVersionGte(model, \"2.5\") ? 32768 : 8192;\n }\n if (model.includes(\"thinking\") || isGeminiModelVersionGte(model, \"2.5\")) {\n return 65535; // API upper bound is exclusive\n }\n if (model.includes(\"ultra\") || model.includes(\"vision\")) {\n return 2048;\n }\n return 8192;\n}\nfunction getLlamaMaxTokensLimit(_model) {\n return 8192;\n}\nexport function getMaxTokensLimitVertexAi(model) {\n if (model.includes(\"imagen-\")) {\n return 0; // Imagen models do not have a max tokens limit in the same way as text models\n }\n else if (model.includes(\"claude\")) {\n return getClaudeMaxTokensLimit(model);\n }\n else if (model.includes(\"gemini\")) {\n return getGeminiMaxTokensLimit(model);\n }\n else if (model.includes(\"llama\")) {\n return getLlamaMaxTokensLimit(model);\n }\n return 8192; // Default fallback limit\n}\n//# sourceMappingURL=vertexai.js.map",null,"import { OptionType, SharedOptions } from \"../types.js\";\nexport const textOptionsFallback = {\n _option_id: \"text-fallback\",\n options: [\n {\n name: SharedOptions.max_tokens, type: OptionType.numeric, min: 1,\n integer: true, step: 200, description: \"The maximum number of tokens to generate\"\n },\n {\n name: SharedOptions.temperature, type: OptionType.numeric, min: 0.0, default: 0.7,\n integer: false, step: 0.1, description: \"A higher temperature biases toward less likely tokens, making the model more creative\"\n },\n {\n name: SharedOptions.top_p, type: OptionType.numeric, min: 0, max: 1,\n integer: false, step: 0.1, description: \"Limits token sampling to the cumulative probability of the top p tokens\"\n },\n {\n name: SharedOptions.top_k, type: OptionType.numeric, min: 1,\n integer: true, step: 1, description: \"Limits token sampling to the top k tokens\"\n },\n {\n name: SharedOptions.presence_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,\n integer: false, step: 0.1, description: \"Penalise tokens if they appear at least once in the text\"\n },\n {\n name: SharedOptions.frequency_penalty, type: OptionType.numeric, min: -2.0, max: 2.0,\n integer: false, step: 0.1, description: \"Penalise tokens based on their frequency in the text\"\n },\n { name: SharedOptions.stop_sequence, type: OptionType.string_list, value: [], description: \"The generation will halt if one of the stop sequences is output\" },\n ]\n};\n//# sourceMappingURL=fallback.js.map",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["Permission","AccessControlResourceType","AccessControlPrincipalType","SecurityLevel","SecurityLevelLabels","getSecurityLevelLabel","level","BILLABLE_AUDIT_ACTIONS","ApiKeyTypes","PrincipalType","PREFERRED_SECTIONS","MCP_COLLECTION_ID_PATTERN","MCP_COLLECTION_NAMESPACE_PATTERN","isValidMCPCollectionId","id","test","isValidMCPCollectionNamespace","namespace","deriveMCPCollectionId","input","trim","toLowerCase","replace","getDefaultOAuthAppNameForCollectionId","collectionId","normalizeToolCollection","collection","startsWith","url","substring","urlObj","URL","name","hostname","type","description","fallbackId","isValidEndpointOverrideEnv","envName","resolveAppEndpoint","manifest","endpoint_overrides","endpoint","isEmailChannel","channel","isInteractiveChannel","InteractionRefPopulate","InteractionRefWithSchemaPopulate","InteractionStatus","ExecutionRunStatus","RunDataStorageLevel","RunDataStorageDescription","RunDataStorageOptions","STANDARD","RESTRICTED","DEBUG","AgentSearchScope","RunSourceTypes","ExecutionRunRefSelect","ConfigModes","ConfigModesDescription","ConfigModesOptions","RUN_AND_INTERACTION_CONFIG","RUN_CONFIG_ONLY","INTERACTION_CONFIG_ONLY","ModelSource","DataColumnType","SemanticColumnType","findEmailChannel","channels","find","hasEmailChannel","updateEmailChannel","updates","existing","emailIndex","findIndex","to_email","updated","updateEmailThreading","messageId","subject","emailChannel","newReferences","references","includes","push","in_reply_to","thread_subject","DATA_COLUMN_TYPE_TO_DUCKDB","STRING","INTEGER","BIGINT","FLOAT","DOUBLE","DECIMAL","BOOLEAN","DATE","TIMESTAMP","JSON","DataStoreStatus","ImportStatus","DEFAULT_RETENTION_CONFIG","retention_days","snapshots_exempt","DashboardStatus","DEFAULT_DASHBOARD_LAYOUT","columns","cellWidth","cellHeight","padding","RECORD_MODEL_CAPABILITIES","text","image","video","audio","embed","output","tool_support","tool_support_streaming","RECORD_FAMILY_CAPABILITIES","DEFAULT_CLAUDE_CAPABILITIES","getModelCapabilitiesAnthropic","model","lower","bestKey","key","Object","keys","length","o3","gpt","o1","o4","o","llama","mistral","phi","deepseek","ai21","jamba","cohere","command","grok","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","modelName","patterns","some","pattern","applyGlobalToolSupportDisable","capabilities","RECORD_FOUNDATION_EXCEPTIONS","RECORD_PROFILE_EXCEPTIONS","getModelCapabilitiesBedrock","modelLower","normalized","foundationIdx","lastIndexOf","inferenceIdx","isInferenceProfile","isFoundationModel","lookupKey","lastSlashIdx","slice","extractModelLookupKey","exception","modelCapability","familyCapability","families","undefined","findFamilyCapability","inferredName","parts","split","providerModel","modelParts","join","normalizeModelName","sora","whisper","getModelCapabilitiesOpenAI","record","bestFamilyKey","bestFamilyLength","family","gemini","imagen","claude","getModelCapabilitiesVertexAI","segments","normalizeVertexAIModelName","Providers","ProviderList","openai","requiresApiKey","requiresEndpointUrl","supportSearch","azure_openai","azure_foundry","huggingface_ie","replicate","bedrock","endpointPlaceholder","vertexai","togetherai","mistralai","groq","watsonx","xai","openai_compatible","anthropic","SharedOptions","OptionType","PromptRole","Modalities","AIModelStatus","ModelType","TrainingJobStatus","getModelCapabilities","provider","getModelCapabilitiesOpenAICompatible","baseModel","compositeId","deploymentName","parseAzureFoundryModelId","getModelCapabilitiesAzureFoundry","_getModelCapabilities","NO_TOOL_SUPPORT_PATTERNS","caps","isNonToolModel","p","supportsToolUse","streaming","ImagenTaskType","ImagenMaskMode","ThinkingLevel","CustomProviders","max_tokens","numeric","temperature","top_p","top_k","presence_penalty","frequency_penalty","stop_sequence","string_list","SupportedProviders","CustomProvidersList","virtual_lb","virtual_mediator","SupportedProvidersList","ExecutionEnvironmentRefPopulate","UserGroupRefPopulate","MEMBERS_GROUP_NAME","SupportedIntegrations","MeterNames","ProjectRoles","ResourceVisibility","SystemInteractionCategory","ProgressSpan","parent","parentUnits","spanUnits","unitsDone","constructor","this","done","units","remaining","parentUnitsDone","Math","round","isDone","Progress","total","fraction","percent","span","isRoleIncludedIn","role","includingRole","owner","admin","billing","developer","SYSTEM_INTERACTION_CATEGORIES","ExtractInformation","intake","SelectDocumentType","GenerateMetadataModel","content_type","ChunkDocument","IdentifyTextSections","AnalyzeDocument","analysis","ReduceTextSections","GenericAgent","non_applicable","AdhocTaskAgent","Mediator","AnalyzeConversation","GetAgentConversationTopic","getSystemInteractionCategory","category","SupportedEmbeddingTypes","FullTextType","SearchTypes","ProjectRefPopulate","SUPPORTED_SEARCH_LANGUAGES","en","zh","es","hi","ar","pt","bn","ru","ja","de","fr","ko","it","tr","vi","pl","uk","nl","th","el","cs","sv","ro","hu","da","fi","no","he","fa","PromptStatus","PromptSegmentDefType","TemplateType","ResolvableRefType","CollectionStatus","getConversationStorageId","state","fallbackRunId","baseId","agent_run_id","launch_id","WorkflowDefinitionRefPopulate","RenditionSchema","properties","mime_type","source_etag","nullable","height","width","multipart","default","total_parts","required","DocumentPartSchema","part_number","title","source_line_start","source_line_end","enum","page_number","CRON_PRESETS","EVERY_HOUR","EVERY_DAY_MIDNIGHT","EVERY_DAY_9AM","EVERY_MONDAY_MIDNIGHT","EVERY_WEEKDAY_9AM","FIRST_OF_MONTH","CRON_PRESET_LABELS","ContentObjectApiHeaders","DataStoreApiHeaders","ContentObjectStatus","ContentNature","POSTER_RENDITION_NAME","AUDIO_RENDITION_NAME","WEB_VIDEO_RENDITION_NAME","PDF_RENDITION_NAME","TextExtractionStatus","success","getContentTypeRefId","code","isInCodeType","typeId","WorkflowRuleInputType","ImageRenditionFormat","MarkdownRenditionFormat","RENDITION_COMPATIBILITY","jpeg","png","webp","pdf","docx","canGenerateRendition","contentType","format","formatStr","exactMatch","f","wildcardMatch","getSupportedRenditionFormats","supportsVisualRendition","ContentObjectProcessingPriority","ContentEventName","TaskStatus","TaskType","WorkflowExecutionStatus","AgentMessageType","getDocumentIds","payload","inputType","objectIds","isToolCallMessage","msg","THOUGHT","details","tool","isDocumentEventMessage","UPDATE","event_class","document_id","isFileProcessingMessage","SYSTEM","system_type","Array","isArray","files","isPlanMessage","PLAN","plan","isRequestInputMessage","REQUEST_INPUT","isCompactMessage","isLegacyMessage","STRING_TO_TYPE_MAP","system","thought","update","complete","COMPLETE","warning","WARNING","error","ERROR","answer","ANSWER","question","QUESTION","request_input","idle","IDLE","terminated","TERMINATED","streaming_chunk","STREAMING_CHUNK","batch_progress","BATCH_PROGRESS","INT_TO_TYPE_MAP","normalizeMessageType","toCompactMessage","legacy","compact","t","message","m","workstream_id","w","timestamp","ts","is_final","d","parseMessage","data","parsed","parse","Error","createCompactMessage","options","workstreamId","isFinal","toAgentMessage","workflowRunId","Date","now","workflow_run_id","streaming_id","activity_id","i","FileProcessingStatus","getWorkflowChannel","getWorkflowUpdatesKey","LOW_PRIORITY_TASK_QUEUE","getRenditionsPath","contentEtag","params","max_hw","isMarkdownRenditionVars","vars","isWorkflowTerminalStatus","status","COMPLETED","FAILED","CANCELED","TIMED_OUT","ParentClosePolicy","TERMINATE","ABANDON","REQUEST_CANCEL","PARENT_CLOSE_POLICY_UNSPECIFIED","PARENT_CLOSE_POLICY_TERMINATE","PARENT_CLOSE_POLICY_ABANDON","PARENT_CLOSE_POLICY_REQUEST_CANCEL","isApiKeyRequest","req","isUserRequest","isProjectRequest","isEnvironmentRequest","isAgentRequest","isServiceAccountRequest","TrainingSessionStatus","TransientTokenType","UserRefPopulate","Datacenters","BillingMethod","AccountType","AccountRefPopulate","getTenantId","accountId","projectId","getTenantIdFromProject","project","account","sanitizeToolDefinition","input_schema","sanitizeToolDefinitions","tools","map","removeExtraProperties","schema","item","obj","editor","isDocumentProperty","DOCUMENT_STORE_HINT","enrichDocumentProperty","value","entries","mergeJSONSchemas","schemas","props","prop","assign","_mergePromptsSchema","prompts","Set","prompt","template","inputSchema","add","chat","items","assistant","user","content","from","mergePromptsSchema","interaction","mergeInCodePromptSchemas","ApiVersions","AgentEventType","LlmCallType","TelemetryToolType"],"mappings":"IAQYA,EA8CAC,EAUAC,EAkFAC,GA1IZ,SAAYH,GACRA,EAAA,SAAA,mBACAA,EAAA,UAAA,oBACAA,EAAA,WAAA,qBAEAA,EAAA,YAAA,sBACAA,EAAA,SAAA,WACAA,EAAA,UAAA,YAEAA,EAAA,UAAA,oBAEAA,EAAA,cAAA,gBACAA,EAAA,yBAAA,2BACAA,EAAA,uBAAA,yBAEAA,EAAA,eAAA,iBACAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,eAAA,iBAEAA,EAAA,aAAA,eACAA,EAAA,cAAA,gBACAA,EAAA,cAAA,gBACAA,EAAA,eAAA,kBAEAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBAGAA,EAAA,aAAA,eACAA,EAAA,cAAA,gBACAA,EAAA,eAAA,iBACAA,EAAA,cAAA,gBACAA,EAAA,mBAAA,qBAGAA,EAAA,aAAA,eACAA,EAAA,eAAA,iBACAA,EAAA,oBAAA,sBAEAA,EAAA,gBAAA,kBAGAA,EAAA,cAAA,eACH,CA5CD,CAAYA,IAAAA,EAAU,CAAA,IA8CtB,SAAYC,GAC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UmN,GAAmBC,GAC/B,OAAKA,EAAYb,QACVD,GAAoBc,EAAYb,SADN,IAErC,CAEM,SAAUc,GAAyBd,GACrC,MAAMJ,EAAoC,CAAA,EAC1C,IAAInM,EAAW,IAAIwM,IACnB,IAAK,MAAMC,KAAUF,EACjB,GAAIE,EAAOjB,QAAQjM,WAAY,CAC3B,MAAMiM,EAASiB,EAAOjB,OACtB,GAAIA,EAAOxL,SACP,IAAK,MAAMoM,KAAQZ,EAAOxL,SACtBA,EAAS4M,IAAIR,GAGrBvb,OAAOwb,OAAOF,EAAOX,EAAOjM,WAChC,CAMJ,OAJkC1O,OAAOC,KAAKqb,GAAOpb,OAAS,EAAI,CAC9DwO,WAAY4M,EACZnM,SAAUsE,MAAM4I,KAAKlN,IACrB,IAER,KCjLYsN,GCaAC,GAUAC,GAiBAC,IDxCZ,SAAYH,GACRA,EAAAA,EAAA,qBAAA,UAAA,uBACAA,EAAAA,EAAA,6BAAA,UAAA,+BACAA,EAAAA,EAAA,sBAAA,UAAA,uBACH,CAJD,CAAYA,KAAAA,GAAW,CAAA,ICavB,SAAYC,GACRA,EAAA,gBAAA,oBACAA,EAAA,kBAAA,sBACAA,EAAA,QAAA,WACAA,EAAA,SAAA,WACH,CALD,CAAYA,KAAAA,GAAc,CAAA,IAU1B,SAAYC,GAERA,EAAA,MAAA,QAEAA,EAAA,YAAA,eAEAA,EAAA,WAAA,cAEAA,EAAA,WAAA,aAEAA,EAAA,kBAAA,oBAEH,CAZD,CAAYA,KAAAA,GAAW,CAAA,IAiBvB,SAAYC,GAERA,EAAA,QAAA,UAEAA,EAAA,YAAA,cAEAA,EAAA,OAAA,SAEAA,EAAA,MAAA,OACH,CATD,CAAYA,KAAAA,GAAiB,CAAA"}
1
+ {"version":3,"file":"vertesia-common.js","sources":["access-control.js","agent-request-template.js","apikey.js","apps.js","audit-trail.js","email.js","interaction.js","data-platform.js","channels.js","../../../llumiverse/common/lib/capability/anthropic.js","../../../llumiverse/common/lib/capability/azure_foundry.js","../../../llumiverse/common/lib/capability/bedrock.js","../../../llumiverse/common/lib/capability/openai.js","../../../llumiverse/common/lib/capability/vertexai.js","../../../llumiverse/common/lib/types.js","../../../llumiverse/common/lib/capability.js","../../../llumiverse/common/lib/options/vertexai.js","environment.js","../../../llumiverse/common/lib/options/fallback.js","group.js","host-utils.js","integrations.js","meters.js","oauth-scopes.js","Progress.js","project.js","prompt.js","refs.js","roles.js","store/collections.js","store/conversation-state.js","store/dsl-workflow.js","store/object-types.js","store/process.js","store/process-schema.js","store/process-validation.js","store/workflow.js","store/rendering.js","store/schedule.js","store/store.js","store/temporalio.js","sts-token-types.js","training.js","transient-tokens.js","user.js","utils/auth.js","utils/schemas.js","versions.js","workflow-analytics.js"],"sourcesContent":["/**\n * @module access-control\n * @description\n * Access control interfaces\n */\nexport var Permission;\n(function (Permission) {\n Permission[\"int_read\"] = \"interaction:read\";\n Permission[\"int_write\"] = \"interaction:write\";\n Permission[\"int_delete\"] = \"interaction:delete\";\n Permission[\"int_execute\"] = \"interaction:execute\";\n Permission[\"run_read\"] = \"run:read\";\n Permission[\"run_write\"] = \"run:write\";\n Permission[\"env_admin\"] = \"environment:admin\";\n Permission[\"app_manage\"] = \"app:manage\";\n Permission[\"project_admin\"] = \"project:admin\";\n Permission[\"project_integration_read\"] = \"project:integration_read\";\n Permission[\"project_settings_write\"] = \"project:settings_write\";\n Permission[\"api_key_create\"] = \"api_key:create\";\n Permission[\"api_key_read\"] = \"api_key:read\";\n Permission[\"api_key_secret_read\"] = \"api_key:secret_read\";\n Permission[\"api_key_update\"] = \"api_key:update\";\n Permission[\"api_key_delete\"] = \"api_key:delete\";\n Permission[\"account_read\"] = \"account:read\";\n Permission[\"account_write\"] = \"account:write\";\n Permission[\"account_admin\"] = \"account:admin\";\n Permission[\"manage_billing\"] = \"account:billing\";\n /** View cost and usage analytics */\n Permission[\"billing_read\"] = \"billing:read\";\n /** View account and project audit events. */\n Permission[\"audit_read\"] = \"audit:read\";\n Permission[\"account_member\"] = \"account:member\";\n Permission[\"content_read\"] = \"content:read\";\n Permission[\"content_read_all\"] = \"content:read_all\";\n Permission[\"content_write\"] = \"content:write\";\n Permission[\"content_delete\"] = \"content:delete\";\n Permission[\"content_admin\"] = \"content:admin\";\n Permission[\"content_superadmin\"] = \"content:superadmin\";\n Permission[\"workflow_read\"] = \"workflow:read\";\n Permission[\"workflow_run\"] = \"workflow:run\";\n Permission[\"workflow_admin\"] = \"workflow:admin\";\n Permission[\"workflow_superadmin\"] = \"workflow:superadmin\";\n Permission[\"agent_run_read\"] = \"agent_run:read\";\n Permission[\"task_read\"] = \"task:read\";\n Permission[\"task_manage\"] = \"task:manage\";\n Permission[\"iam_impersonate\"] = \"iam:impersonate\";\n /** whether the user has access to Sutdio App. */\n Permission[\"studio_access\"] = \"studio:access\";\n})(Permission || (Permission = {}));\nexport var AccessControlResourceType;\n(function (AccessControlResourceType) {\n AccessControlResourceType[\"project\"] = \"project\";\n AccessControlResourceType[\"environment\"] = \"environment\";\n AccessControlResourceType[\"account\"] = \"account\";\n AccessControlResourceType[\"interaction\"] = \"interaction\";\n AccessControlResourceType[\"app\"] = \"application\";\n /** Dynamic resource matching by content properties at query time. */\n AccessControlResourceType[\"content_set\"] = \"content_set\";\n})(AccessControlResourceType || (AccessControlResourceType = {}));\nexport var AccessControlPrincipalType;\n(function (AccessControlPrincipalType) {\n AccessControlPrincipalType[\"user\"] = \"user\";\n AccessControlPrincipalType[\"group\"] = \"group\";\n AccessControlPrincipalType[\"apikey\"] = \"apikey\";\n /** Dynamic principal matching by user/group properties at token time. */\n AccessControlPrincipalType[\"principal_set\"] = \"principal_set\";\n})(AccessControlPrincipalType || (AccessControlPrincipalType = {}));\n// ============================================================================\n// BLP Security Levels\n// ============================================================================\n/**\n * Default sensitivity/clearance levels for the Bell-LaPadula security model.\n * The numeric value is the index in the array (0 = lowest, 4 = highest).\n * Projects can override these labels via project settings.\n */\nexport var SecurityLevel;\n(function (SecurityLevel) {\n SecurityLevel[SecurityLevel[\"public\"] = 0] = \"public\";\n SecurityLevel[SecurityLevel[\"internal\"] = 1] = \"internal\";\n SecurityLevel[SecurityLevel[\"confidential\"] = 2] = \"confidential\";\n SecurityLevel[SecurityLevel[\"restricted\"] = 3] = \"restricted\";\n SecurityLevel[SecurityLevel[\"secret\"] = 4] = \"secret\";\n})(SecurityLevel || (SecurityLevel = {}));\n/** Human-readable labels for each security level, indexed by numeric value. */\nexport const SecurityLevelLabels = ['Public', 'Internal', 'Confidential', 'Restricted', 'Secret'];\n/** Get the label for a security level value. Returns \"Unknown\" for out-of-range values. */\nexport function getSecurityLevelLabel(level) {\n return SecurityLevelLabels[level] ?? 'Unknown';\n}\n//# sourceMappingURL=access-control.js.map","function isRecordValue(value) {\n return !!value && typeof value === 'object' && !Array.isArray(value);\n}\nfunction getTemplatePathValue(data, path) {\n if (path === '.' || path === 'json')\n return data;\n return path.split('.').reduce((current, part) => {\n if (Array.isArray(current) && /^\\d+$/.test(part))\n return current[Number(part)];\n if (!isRecordValue(current))\n return undefined;\n return current[part];\n }, data);\n}\nfunction stringifyTemplateValue(value) {\n if (value === null || value === undefined)\n return '';\n if (typeof value === 'string')\n return value;\n if (typeof value === 'number' || typeof value === 'boolean')\n return String(value);\n try {\n return JSON.stringify(value, null, 2);\n }\n catch {\n return String(value);\n }\n}\nexport function renderAgentRequestTemplate(template, data) {\n return template.replace(/\\{\\{\\s*([\\w.-]+|\\.)\\s*\\}\\}/g, (_match, path) => stringifyTemplateValue(getTemplatePathValue(data, path)));\n}\nexport function renderAgentRequestFallback(data) {\n if (typeof data === 'string')\n return data;\n if (data === null || data === undefined)\n return '';\n return stringifyTemplateValue(data);\n}\nexport function renderAgentRequestMessage(template, data) {\n const trimmedTemplate = template?.trim();\n if (!trimmedTemplate)\n return renderAgentRequestFallback(data);\n const rendered = renderAgentRequestTemplate(trimmedTemplate, data).trim();\n return rendered;\n}\n//# sourceMappingURL=agent-request-template.js.map","export var ApiKeyTypes;\n(function (ApiKeyTypes) {\n ApiKeyTypes[\"secret\"] = \"sk\";\n})(ApiKeyTypes || (ApiKeyTypes = {}));\nexport var PrincipalType;\n(function (PrincipalType) {\n PrincipalType[\"User\"] = \"user\";\n PrincipalType[\"OAuthAccess\"] = \"oauth_access\";\n PrincipalType[\"Group\"] = \"group\";\n PrincipalType[\"ApiKey\"] = \"apikey\";\n PrincipalType[\"ServiceAccount\"] = \"service_account\";\n PrincipalType[\"Agent\"] = \"agent\";\n PrincipalType[\"Schedule\"] = \"schedule\";\n})(PrincipalType || (PrincipalType = {}));\n//# sourceMappingURL=apikey.js.map","/** Allowed values for AppUINavItem.preferredSection */\nexport const PREFERRED_SECTIONS = ['default', 'footer', 'settings'];\nexport const MCP_COLLECTION_ID_PATTERN = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;\nexport const MCP_COLLECTION_NAMESPACE_PATTERN = /^[a-z0-9]+(?:_[a-z0-9]+)*$/;\nexport function isValidMCPCollectionId(id) {\n return MCP_COLLECTION_ID_PATTERN.test(id);\n}\nexport function isValidMCPCollectionNamespace(namespace) {\n return MCP_COLLECTION_NAMESPACE_PATTERN.test(namespace);\n}\nexport function deriveMCPCollectionId(input) {\n return input\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, '_')\n .replace(/^_+|_+$/g, '')\n .replace(/_+/g, '_');\n}\nexport function getDefaultOAuthAppNameForCollectionId(collectionId) {\n return collectionId.replace(/_/g, '-');\n}\n/**\n * Normalizes a tool collection to the object format.\n * Applies optional `{{var}}` substitution to the URL so manifests can reference\n * deployment-time variables like `{{studio_ui}}`.\n *\n * @param collection - ToolCollectionObject\n * @param vars - Optional endpoint variables to substitute in URLs\n * @returns Normalized ToolCollectionObject\n */\nexport function normalizeToolCollection(collection, vars) {\n if (!collection || typeof collection !== 'object') {\n throw new TypeError('Tool collection must be an object');\n }\n const substitutedUrl = vars && collection.url ? substituteEndpoints(collection.url, vars) : collection.url;\n const urlChanged = substitutedUrl !== collection.url;\n if (collection.type === 'mcp') {\n const fallbackId = deriveMCPCollectionId(collection.id || collection.name || collection.url);\n if (urlChanged || !collection.id) {\n return {\n ...collection,\n url: substitutedUrl,\n id: collection.id || fallbackId,\n };\n }\n }\n else if (urlChanged) {\n return { ...collection, url: substitutedUrl };\n }\n return collection;\n}\n/**\n * Resolve the effective access_control policy for an installed app:\n * installation override wins, then manifest default, then `'all'`.\n *\n * Shared by the STS (JWT generation), the studio-server (validation), and the UI (badge display)\n * so the resolution rule lives in exactly one place. Named `effectiveAppAccessControl` (not just\n * `effectiveAccessControl`) because exports from `@vertesia/common` are flattened — the broader\n * name would risk colliding with other access-control families added later.\n */\nexport function effectiveAppAccessControl(installation, manifest) {\n return installation?.access_control ?? manifest?.access_control ?? 'all';\n}\n/**\n * Reserved deployment environment names that may never be used as endpoint\n * override keys. Reserving them prevents a manifest from hijacking auto-resolution\n * on a shared production studio-server (whose `Env.environment` is one of these).\n */\nconst RESERVED_ENDPOINT_OVERRIDE_ENVS = new Set(['production', 'preview', 'staging']);\n/**\n * Returns true if the given environment name is allowed as an endpoint override key.\n * Any non-empty name is accepted except the reserved shared-deployment names.\n */\nexport function isValidEndpointOverrideEnv(envName) {\n if (!envName)\n return false;\n return !RESERVED_ENDPOINT_OVERRIDE_ENVS.has(envName.toLowerCase());\n}\n/**\n * Substitutes `{{key}}` placeholders in a URL with the matching endpoint.\n * Unknown placeholders are left untouched (so failures surface as fetch errors\n * with the unresolved placeholder visible, rather than silently pointing nowhere).\n * Trailing slashes on replacement values are stripped to avoid `//api/...` joins.\n */\nexport function substituteEndpoints(url, endpoints) {\n if (!url || !endpoints)\n return url;\n return url.replace(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (match, key) => {\n const value = endpoints[key];\n if (typeof value !== 'string' || !value)\n return match;\n return trimTrailingSlashes(value);\n });\n}\nfunction trimTrailingSlashes(value) {\n let end = value.length;\n while (end > 0 && value[end - 1] === '/') {\n end--;\n }\n return end === value.length ? value : value.slice(0, end);\n}\n/**\n * Resolves the effective endpoint for an app.\n *\n * Order of resolution:\n * 1. If `requestedOverride` matches an `endpoint_overrides` key, use that URL\n * (caller must verify the user is allowed to use the override).\n * 2. Else if `envName` matches an `endpoint_overrides` key, use that URL\n * (auto-resolution from the studio-server's deployment env).\n * 3. Otherwise use the main `endpoint`.\n * 4. Apply `{{var}}` substitution using `vars`.\n */\nexport function resolveAppEndpoint(manifest, envName, vars, requestedOverride) {\n let raw;\n if (requestedOverride &&\n manifest.endpoint_overrides?.[requestedOverride] &&\n isValidEndpointOverrideEnv(requestedOverride)) {\n raw = manifest.endpoint_overrides[requestedOverride];\n }\n else if (envName && manifest.endpoint_overrides?.[envName] && isValidEndpointOverrideEnv(envName)) {\n raw = manifest.endpoint_overrides[envName];\n }\n else {\n raw = manifest.endpoint;\n }\n return raw ? substituteEndpoints(raw, vars) : raw;\n}\n/**\n * Resolves all URL placeholders in a manifest in place (both `endpoint` and\n * `tool_collections[].url`). Intended for server-side serialization — clients and\n * downstream workers receive already-substituted URLs so they don't need to know\n * about deployment-time vars.\n *\n * Mutates the manifest rather than returning a copy so it works cleanly with\n * Mongoose populated subdocs.\n */\nexport function resolveManifestUrls(manifest, envName, vars, requestedOverride) {\n if (!manifest)\n return;\n if (manifest.endpoint) {\n const resolved = resolveAppEndpoint(manifest, envName, vars, requestedOverride);\n if (resolved && resolved !== manifest.endpoint) {\n manifest.endpoint = resolved;\n }\n }\n const toolCollections = manifest.tool_collections;\n if (toolCollections && Array.isArray(toolCollections)) {\n for (let i = 0; i < toolCollections.length; i++) {\n const item = toolCollections[i];\n if (item && typeof item === 'object' && item.url) {\n const sub = substituteEndpoints(item.url, vars);\n if (sub !== item.url)\n item.url = sub;\n }\n }\n }\n}\n//# sourceMappingURL=apps.js.map","/** Billable audit actions for cost analytics queries */\nexport const BILLABLE_AUDIT_ACTIONS = ['inference', 'embedding', 'image_generation'];\n//# sourceMappingURL=audit-trail.js.map","/**\n * Email-related types for agent communication and routing.\n */\n/**\n * Type guard for email channels\n */\nexport function isEmailChannel(channel) {\n return channel.type === 'email';\n}\n/**\n * Type guard for interactive channels\n */\nexport function isInteractiveChannel(channel) {\n return channel.type === 'interactive';\n}\n//# sourceMappingURL=email.js.map","export const InteractionRefPopulate = 'id name endpoint parent description status version visibility tags agent_runner_options updated_at prompts';\nexport const InteractionRefWithSchemaPopulate = `${InteractionRefPopulate} result_schema`;\nexport var InteractionStatus;\n(function (InteractionStatus) {\n InteractionStatus[\"draft\"] = \"draft\";\n InteractionStatus[\"published\"] = \"published\";\n InteractionStatus[\"archived\"] = \"archived\";\n InteractionStatus[\"code\"] = \"code\";\n InteractionStatus[\"unknown\"] = \"unknown\";\n})(InteractionStatus || (InteractionStatus = {}));\nexport var ExecutionRunStatus;\n(function (ExecutionRunStatus) {\n ExecutionRunStatus[\"created\"] = \"created\";\n ExecutionRunStatus[\"processing\"] = \"processing\";\n ExecutionRunStatus[\"completed\"] = \"completed\";\n ExecutionRunStatus[\"failed\"] = \"failed\";\n})(ExecutionRunStatus || (ExecutionRunStatus = {}));\nexport var RunDataStorageLevel;\n(function (RunDataStorageLevel) {\n RunDataStorageLevel[\"STANDARD\"] = \"STANDARD\";\n RunDataStorageLevel[\"RESTRICTED\"] = \"RESTRICTED\";\n RunDataStorageLevel[\"DEBUG\"] = \"DEBUG\";\n})(RunDataStorageLevel || (RunDataStorageLevel = {}));\nexport var RunDataStorageDescription;\n(function (RunDataStorageDescription) {\n RunDataStorageDescription[\"STANDARD\"] = \"Run data is stored for both the model inputs and output.\";\n RunDataStorageDescription[\"RESTRICTED\"] = \"No run data is stored for the model inputs \\u2014 only the model output.\";\n RunDataStorageDescription[\"DEBUG\"] = \"Run data is stored for the model inputs and output, schema, and final prompt.\";\n})(RunDataStorageDescription || (RunDataStorageDescription = {}));\nexport const RunDataStorageOptions = {\n [RunDataStorageLevel.STANDARD]: RunDataStorageDescription.STANDARD,\n [RunDataStorageLevel.RESTRICTED]: RunDataStorageDescription.RESTRICTED,\n [RunDataStorageLevel.DEBUG]: RunDataStorageDescription.DEBUG,\n};\n/**\n * Defines the scope for agent search operations.\n */\nexport var AgentSearchScope;\n(function (AgentSearchScope) {\n /**\n * Search is scoped to a specific collection.\n */\n AgentSearchScope[\"Collection\"] = \"collection\";\n})(AgentSearchScope || (AgentSearchScope = {}));\n// Re-exported from email.ts for backwards compatibility\nexport { isEmailChannel, isInteractiveChannel, } from './email.js';\n// ================= end async execution payloads ====================\nexport var RunSourceTypes;\n(function (RunSourceTypes) {\n RunSourceTypes[\"api\"] = \"api\";\n RunSourceTypes[\"cli\"] = \"cli\";\n RunSourceTypes[\"ui\"] = \"ui\";\n RunSourceTypes[\"webhook\"] = \"webhook\";\n RunSourceTypes[\"test\"] = \"test-data\";\n RunSourceTypes[\"system\"] = \"system\";\n RunSourceTypes[\"schedule\"] = \"schedule\";\n})(RunSourceTypes || (RunSourceTypes = {}));\nexport const ExecutionRunRefSelect = '-result -parameters -result_schema -prompt';\nexport var ConfigModes;\n(function (ConfigModes) {\n ConfigModes[\"RUN_AND_INTERACTION_CONFIG\"] = \"RUN_AND_INTERACTION_CONFIG\";\n ConfigModes[\"RUN_CONFIG_ONLY\"] = \"RUN_CONFIG_ONLY\";\n ConfigModes[\"INTERACTION_CONFIG_ONLY\"] = \"INTERACTION_CONFIG_ONLY\";\n})(ConfigModes || (ConfigModes = {}));\nexport var ConfigModesDescription;\n(function (ConfigModesDescription) {\n ConfigModesDescription[\"RUN_AND_INTERACTION_CONFIG\"] = \"This run configuration is used. Undefined options are filled with interaction configuration.\";\n ConfigModesDescription[\"RUN_CONFIG_ONLY\"] = \"Only this run configuration is used. Undefined options remain undefined.\";\n ConfigModesDescription[\"INTERACTION_CONFIG_ONLY\"] = \"Only interaction configuration is used.\";\n})(ConfigModesDescription || (ConfigModesDescription = {}));\nexport const ConfigModesOptions = {\n [ConfigModes.RUN_AND_INTERACTION_CONFIG]: ConfigModesDescription.RUN_AND_INTERACTION_CONFIG,\n [ConfigModes.RUN_CONFIG_ONLY]: ConfigModesDescription.RUN_CONFIG_ONLY,\n [ConfigModes.INTERACTION_CONFIG_ONLY]: ConfigModesDescription.INTERACTION_CONFIG_ONLY,\n};\n/**\n * Source of the resolved model configuration\n */\nexport var ModelSource;\n(function (ModelSource) {\n /** Model was explicitly provided in the execution config */\n ModelSource[\"config\"] = \"config\";\n /** Model comes from the interaction definition */\n ModelSource[\"interaction\"] = \"interaction\";\n /** Model comes from environment's default_model */\n ModelSource[\"environmentDefault\"] = \"environmentDefault\";\n /** Model comes from project system interaction defaults */\n ModelSource[\"projectSystemDefault\"] = \"projectSystemDefault\";\n /** Model comes from project base defaults */\n ModelSource[\"projectBaseDefault\"] = \"projectBaseDefault\";\n /** Model comes from project modality-specific defaults */\n ModelSource[\"projectModalityDefault\"] = \"projectModalityDefault\";\n /** Model comes from legacy project defaults */\n ModelSource[\"projectLegacyDefault\"] = \"projectLegacyDefault\";\n})(ModelSource || (ModelSource = {}));\n//# sourceMappingURL=interaction.js.map","/**\n * Data Platform Types\n *\n * Types for managing versioned analytical data stores with DuckDB + GCS storage.\n * Supports AI-manageable schemas and multi-table atomic operations.\n */\n// ============================================================================\n// Column Types\n// ============================================================================\n/**\n * Supported column data types for DuckDB tables.\n */\nexport var DataColumnType;\n(function (DataColumnType) {\n DataColumnType[\"STRING\"] = \"STRING\";\n DataColumnType[\"INTEGER\"] = \"INTEGER\";\n DataColumnType[\"BIGINT\"] = \"BIGINT\";\n DataColumnType[\"FLOAT\"] = \"FLOAT\";\n DataColumnType[\"DOUBLE\"] = \"DOUBLE\";\n DataColumnType[\"DECIMAL\"] = \"DECIMAL\";\n DataColumnType[\"BOOLEAN\"] = \"BOOLEAN\";\n DataColumnType[\"DATE\"] = \"DATE\";\n DataColumnType[\"TIMESTAMP\"] = \"TIMESTAMP\";\n DataColumnType[\"JSON\"] = \"JSON\";\n})(DataColumnType || (DataColumnType = {}));\n/**\n * Semantic types that provide AI agents with context about column meaning.\n */\nexport var SemanticColumnType;\n(function (SemanticColumnType) {\n SemanticColumnType[\"EMAIL\"] = \"email\";\n SemanticColumnType[\"PHONE\"] = \"phone\";\n SemanticColumnType[\"URL\"] = \"url\";\n SemanticColumnType[\"CURRENCY\"] = \"currency\";\n SemanticColumnType[\"PERCENTAGE\"] = \"percentage\";\n SemanticColumnType[\"PERSON_NAME\"] = \"person_name\";\n SemanticColumnType[\"ADDRESS\"] = \"address\";\n SemanticColumnType[\"COUNTRY\"] = \"country\";\n SemanticColumnType[\"DATE_ISO\"] = \"date_iso\";\n SemanticColumnType[\"IDENTIFIER\"] = \"identifier\";\n})(SemanticColumnType || (SemanticColumnType = {}));\n/**\n * Mapping from DataColumnType to DuckDB SQL types.\n */\nexport const DATA_COLUMN_TYPE_TO_DUCKDB = {\n [DataColumnType.STRING]: 'VARCHAR',\n [DataColumnType.INTEGER]: 'INTEGER',\n [DataColumnType.BIGINT]: 'BIGINT',\n [DataColumnType.FLOAT]: 'FLOAT',\n [DataColumnType.DOUBLE]: 'DOUBLE',\n [DataColumnType.DECIMAL]: 'DECIMAL(18,4)',\n [DataColumnType.BOOLEAN]: 'BOOLEAN',\n [DataColumnType.DATE]: 'DATE',\n [DataColumnType.TIMESTAMP]: 'TIMESTAMP',\n [DataColumnType.JSON]: 'JSON',\n};\n// ============================================================================\n// Data Store Types\n// ============================================================================\n/**\n * Data store lifecycle status.\n */\nexport var DataStoreStatus;\n(function (DataStoreStatus) {\n /** Store is being created */\n DataStoreStatus[\"CREATING\"] = \"creating\";\n /** Store is active and usable */\n DataStoreStatus[\"ACTIVE\"] = \"active\";\n /** Store encountered an error */\n DataStoreStatus[\"ERROR\"] = \"error\";\n /** Store has been archived (soft deleted) */\n DataStoreStatus[\"ARCHIVED\"] = \"archived\";\n})(DataStoreStatus || (DataStoreStatus = {}));\n// ============================================================================\n// Import Types\n// ============================================================================\n/**\n * Import job status.\n */\nexport var ImportStatus;\n(function (ImportStatus) {\n /** Job is queued */\n ImportStatus[\"PENDING\"] = \"pending\";\n /** Job is running */\n ImportStatus[\"PROCESSING\"] = \"processing\";\n /** Job completed successfully */\n ImportStatus[\"COMPLETED\"] = \"completed\";\n /** Job failed */\n ImportStatus[\"FAILED\"] = \"failed\";\n /** Job was rolled back */\n ImportStatus[\"ROLLED_BACK\"] = \"rolled_back\";\n})(ImportStatus || (ImportStatus = {}));\n/**\n * Default retention configuration: 30 days, snapshots exempt.\n */\nexport const DEFAULT_RETENTION_CONFIG = {\n retention_days: 30,\n snapshots_exempt: true,\n};\n// ============================================================================\n// Dashboard Types\n// ============================================================================\n/**\n * Dashboard lifecycle status.\n */\nexport var DashboardStatus;\n(function (DashboardStatus) {\n /** Dashboard is active and usable */\n DashboardStatus[\"ACTIVE\"] = \"active\";\n /** Dashboard has been archived (soft deleted) */\n DashboardStatus[\"ARCHIVED\"] = \"archived\";\n})(DashboardStatus || (DashboardStatus = {}));\n/**\n * Default layout configuration for dashboards.\n *\n * @deprecated Use combined Vega-Lite spec with vconcat/hconcat instead.\n */\nexport const DEFAULT_DASHBOARD_LAYOUT = {\n columns: 2,\n cellWidth: 600,\n cellHeight: 400,\n padding: 20,\n};\n//# sourceMappingURL=data-platform.js.map","import { isEmailChannel } from './interaction.js';\n/**\n * Find the email channel from a list of channels.\n * @returns The email channel if found, undefined otherwise\n */\nexport function findEmailChannel(channels) {\n return channels?.find(isEmailChannel);\n}\n/**\n * Check if email channel is enabled in the channels list.\n */\nexport function hasEmailChannel(channels) {\n return !!findEmailChannel(channels);\n}\n/**\n * Update the email channel in a channels array (immutable).\n * Returns a new array with the updated channel.\n * If no email channel exists and to_email is provided, creates one.\n */\nexport function updateEmailChannel(channels, updates) {\n const existing = channels || [];\n const emailIndex = existing.findIndex(isEmailChannel);\n if (emailIndex === -1) {\n // No email channel exists, create one if we have required fields\n if (updates.to_email) {\n return [...existing, { type: 'email', ...updates }];\n }\n return existing;\n }\n // Update existing email channel\n const updated = [...existing];\n updated[emailIndex] = {\n ...updated[emailIndex],\n ...updates,\n type: 'email',\n };\n return updated;\n}\n/**\n * Update email threading info after sending or receiving an email.\n * Adds the new messageId to references and updates in_reply_to.\n */\nexport function updateEmailThreading(channels, messageId, subject) {\n const emailChannel = findEmailChannel(channels);\n if (!emailChannel)\n return channels || [];\n const newReferences = emailChannel.references ? [...emailChannel.references] : [];\n if (!newReferences.includes(messageId)) {\n newReferences.push(messageId);\n }\n return updateEmailChannel(channels, {\n in_reply_to: messageId,\n references: newReferences,\n thread_subject: subject || emailChannel.thread_subject,\n });\n}\n//# sourceMappingURL=channels.js.map","// Explicit model exceptions\nconst RECORD_MODEL_CAPABILITIES = {\n // claude-3-5-haiku: no image input\n 'claude-3-5-haiku-20241022': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Family-level capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n 'claude-3-5-haiku': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-haiku': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-sonnet': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-opus': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3-7': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-3': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'claude-': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\nconst DEFAULT_CLAUDE_CAPABILITIES = {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n};\nexport function getModelCapabilitiesAnthropic(model) {\n const lower = model.toLowerCase();\n // Exact match first\n if (lower in RECORD_MODEL_CAPABILITIES) {\n return RECORD_MODEL_CAPABILITIES[lower];\n }\n // Longest prefix family match\n let bestKey;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (lower.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n if (bestKey) {\n return RECORD_FAMILY_CAPABILITIES[bestKey];\n }\n return DEFAULT_CLAUDE_CAPABILITIES;\n}\n//# sourceMappingURL=anthropic.js.map","// Global feature flags - temporarily disable tool support for non-OpenAI models\nconst ENABLE_TOOL_SUPPORT_NON_OPENAI = false;\n// Record of Azure Foundry model capabilities keyed by model ID (lowercased)\n// Only include models with specific exceptions that differ from their family patterns\nconst RECORD_MODEL_CAPABILITIES = {\n // OpenAI O-series exceptions - o1-mini doesn't have tool support like other o1 models\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // OpenAI o3 is text-only unlike other o-series models\n o3: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Models with special properties not covered by family patterns\n 'deepseek-r1-0528': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3-0324': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-medium-2505': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral-nemo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-4-scout-17b-16e-instruct': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n // OpenAI GPT families\n 'gpt-3.5-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35-turbo': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-35': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'gpt-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // OpenAI O-series families\n o1: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-preview': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o1-pro': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o3-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'o4-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o4: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n // Llama families\n 'llama-3.1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'llama-3.3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Mistral families\n 'mistral-large': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'mistral-small': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n mistral: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // Microsoft Phi families\n 'phi-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n phi: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // DeepSeek families\n 'deepseek-r1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek-v3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n deepseek: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n // AI21 families\n 'ai21-jamba': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n ai21: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n jamba: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // Cohere families\n 'cohere-command': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n cohere: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n command: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n // xAI families\n 'grok-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n grok: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image', 'vision'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = [\n 'tool',\n 'gpt-4',\n 'gpt-4o',\n 'o1',\n 'o3',\n 'o4',\n 'llama-3',\n 'mistral-large',\n 'mistral-small',\n 'jamba',\n 'cohere',\n 'command',\n 'grok',\n];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for an Azure Foundry model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to family pattern matching.\n */\nexport function getModelCapabilitiesAzureFoundry(model) {\n // Extract base model from composite ID (deployment::baseModel)\n const { baseModel } = parseAzureFoundryModelId(model);\n const normalized = baseModel.toLowerCase();\n // 1. Exact match in record\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n return applyGlobalToolSupportDisable(record, normalized);\n }\n // 2. Fallback: find the longest matching family prefix in RECORD_FAMILY_CAPABILITIES\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return applyGlobalToolSupportDisable(RECORD_FAMILY_CAPABILITIES[bestFamilyKey], normalized);\n }\n // 3. Fallback: infer from normalized name using patterns\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || true, // Default to text input\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || true, // Default to text output\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n const tool_support_streaming = tool_support || undefined;\n const inferredCapabilities = { input, output, tool_support, tool_support_streaming };\n return applyGlobalToolSupportDisable(inferredCapabilities, normalized);\n}\n/**\n * Apply global tool support disable for non-OpenAI models.\n * Preserves model-specific information for future use while temporarily disabling tool support.\n */\nfunction applyGlobalToolSupportDisable(capabilities, modelName) {\n // Check if this is an OpenAI model\n const isOpenAIModel = modelName.startsWith('gpt-') ||\n modelName.startsWith('o1') ||\n modelName.startsWith('o3') ||\n modelName.startsWith('o4');\n if (!ENABLE_TOOL_SUPPORT_NON_OPENAI && !isOpenAIModel) {\n // Disable tool support for non-OpenAI models while preserving other capabilities\n return {\n ...capabilities,\n tool_support: false,\n tool_support_streaming: false,\n };\n }\n return capabilities;\n}\n// Helper function to parse composite model IDs\nfunction parseAzureFoundryModelId(compositeId) {\n const parts = compositeId.split('::');\n if (parts.length === 2) {\n return {\n deploymentName: parts[0],\n baseModel: parts[1],\n };\n }\n // Backwards compatibility: if no delimiter found, treat as deployment name\n return {\n deploymentName: compositeId,\n baseModel: compositeId,\n };\n}\n//# sourceMappingURL=azure_foundry.js.map","// Explicit exception lists keyed by the model identifier (last segment after the prefix)\nconst RECORD_FOUNDATION_EXCEPTIONS = {};\nconst RECORD_PROFILE_EXCEPTIONS = {\n 'meta.llama3-1-70b-instruct-v1:0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'meta.llama3-1-8b-instruct-v1:0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n};\n// Record of Bedrock model capabilities keyed by model identifier.\n// Only include models that differ from their family defaults\nconst RECORD_MODEL_CAPABILITIES = {\n // Models with specific exceptions that differ from family\n 'ai21.jamba-instruct-v1:0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'amazon.nova-canvas-v1:0': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { image: true, text: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'amazon.nova-micro-v1:0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'anthropic.claude-3-5-haiku-20241022-v1:0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'meta.llama3-2-11b-instruct-v1:0': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'meta.llama3-2-90b-instruct-v1:0': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n};\n// Family capabilities (longest prefix match)\nconst RECORD_FAMILY_CAPABILITIES = {\n 'ai21.jamba': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'amazon.nova': {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'amazon.titan': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'anthropic.claude-3-5-haiku': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'anthropic.claude': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'cohere.command-r': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: true,\n },\n 'cohere.command': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'deepseek.r1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'meta.llama3-1': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'meta.llama3-2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'meta.llama3-3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'meta.llama3': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'meta.llama4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral.mistral-large': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'mistral.mistral': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral.mixtral': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'mistral.pixtral': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'openai.gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'qwen.': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n tool_support_streaming: false,\n },\n 'twelvelabs.': {\n input: { text: true, image: false, video: true, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n 'writer.palmyra': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n tool_support_streaming: false,\n },\n};\nfunction extractModelLookupKey(modelName) {\n const lower = modelName.toLowerCase();\n const lastSlashIdx = lower.lastIndexOf('/');\n let key = lastSlashIdx === -1 ? lower : lower.slice(lastSlashIdx + 1);\n if (lower.includes('inference-profile/')) {\n key = key.replace(/^[^.]+\\./, '');\n }\n return key;\n}\nfunction findFamilyCapability(lookupKey, families) {\n let bestKey;\n for (const key of Object.keys(families)) {\n if (lookupKey.startsWith(key) && (!bestKey || key.length > bestKey.length)) {\n bestKey = key;\n }\n }\n return bestKey ? families[bestKey] : undefined;\n}\n/**\n * Extract the model identifier from an ARN or inference profile\n * @param modelName The full model ARN or name\n * @returns The normalized model identifier\n */\nfunction normalizeModelName(modelName) {\n const modelLower = modelName.toLowerCase();\n if (modelLower.includes('inference-profile')) {\n const parts = modelLower.split('/');\n if (parts.length > 1) {\n const providerModel = parts[parts.length - 1];\n const modelParts = providerModel.split('.');\n if (modelParts.length > 1 && modelParts[1] === 'deepseek') {\n return `deepseek-${modelParts.slice(2).join('.')}`;\n }\n return modelParts.length > 2 ? modelParts.slice(2).join('.') : providerModel;\n }\n }\n return modelLower;\n}\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image']; // fallback: if model id contains 'image', supports image input\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'sonnet', 'opus', 'nova', 'palmyra', 'command-r', 'mistral-large', 'pixtral'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\n/**\n * Get the full ModelCapabilities for a Bedrock model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesBedrock(model) {\n // Normalize ARN or inference-profile to model ID\n const modelLower = model.toLowerCase();\n let normalized = modelLower;\n const arnPattern = /^arn:aws:bedrock:[^:]+:[^:]*:(inference-profile|foundation-model)\\/.+/i;\n if (arnPattern.test(modelLower)) {\n // Extract after last occurrence of 'foundation-model/' or 'inference-profile/'\n const foundationIdx = modelLower.lastIndexOf('foundation-model/');\n const inferenceIdx = modelLower.lastIndexOf('inference-profile/');\n if (foundationIdx !== -1) {\n normalized = modelLower.substring(foundationIdx);\n }\n else if (inferenceIdx !== -1) {\n normalized = modelLower.substring(inferenceIdx);\n }\n }\n const isInferenceProfile = normalized.startsWith('inference-profile/');\n const isFoundationModel = normalized.startsWith('foundation-model/');\n const lookupKey = extractModelLookupKey(normalized);\n // 1. Check exceptions\n if (isFoundationModel) {\n const exception = RECORD_FOUNDATION_EXCEPTIONS[lookupKey];\n if (exception)\n return exception;\n }\n else if (isInferenceProfile) {\n const exception = RECORD_PROFILE_EXCEPTIONS[lookupKey];\n if (exception)\n return exception;\n }\n // 2. Check recorded capabilities by model\n const modelCapability = RECORD_MODEL_CAPABILITIES[lookupKey];\n if (modelCapability)\n return modelCapability;\n // 3. Check recorded capabilities by family\n const familyCapability = findFamilyCapability(lookupKey, RECORD_FAMILY_CAPABILITIES);\n if (familyCapability)\n return familyCapability;\n // 4. Fallback: infer from normalized name\n const inferredName = normalizeModelName(lookupKey);\n const input = {\n text: modelMatches(inferredName, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(inferredName, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(inferredName, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(inferredName, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(inferredName, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(inferredName, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(inferredName, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(inferredName, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(inferredName, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(inferredName, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=bedrock.js.map","// Record of OpenAI model capabilities keyed by model ID (lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'chatgpt-4o-latest': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\n// For OpenAI, tool_support_streaming matches tool_support since the API supports tools while streaming\nconst RECORD_FAMILY_CAPABILITIES = {\n gpt: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-3.5': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-4': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4-turbo': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4o': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.1': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-4.5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-5': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'chatgpt-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'dall-e': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gpt-oss': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n o: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'o1-mini': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'o1-preview': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'omni-moderation': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n sora: {\n input: { text: true, image: true, video: true, audio: false, embed: false },\n output: { text: false, image: false, video: true, audio: true, embed: false },\n tool_support: false,\n },\n 'text-embedding': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: false, video: false, audio: false, embed: true },\n tool_support: false,\n },\n 'text-moderation': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n whisper: {\n input: { text: false, image: false, video: false, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'gpt', 'gpt-5', 'o1', 'o3', 'o4'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeOpenAIModelName(modelName) {\n return modelName.toLowerCase();\n}\n/**\n * Get the full ModelCapabilities for an OpenAI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n * For OpenAI models, tool_support_streaming defaults to tool_support since the API supports tools while streaming.\n */\nexport function getModelCapabilitiesOpenAI(model) {\n const normalized = normalizeOpenAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record) {\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...record,\n tool_support_streaming: record.tool_support_streaming ?? record.tool_support,\n };\n }\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n const family = RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n // Default tool_support_streaming to tool_support for OpenAI models\n return {\n ...family,\n tool_support_streaming: family.tool_support_streaming ?? family.tool_support,\n };\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n // Default tool_support_streaming to tool_support for OpenAI models\n return { input, output, tool_support, tool_support_streaming: tool_support };\n}\n//# sourceMappingURL=openai.js.map","// Record of Vertex AI model capabilities keyed by model ID (last path segment, lowercased)\nconst RECORD_MODEL_CAPABILITIES = {\n 'gemini-2.0-flash-lite-001': {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n};\n// Populate RECORD_FAMILY_CAPABILITIES as a const record (lowest common denominator for each family)\nconst RECORD_FAMILY_CAPABILITIES = {\n gemini: {\n input: { text: true, image: true, video: true, audio: true, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'gemini-2.5-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-pro-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'gemini-3.0-flash-image': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n imagen: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-3.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'imagen-4.0-capability': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: false, image: true, video: false, audio: false, embed: false },\n tool_support: false,\n },\n claude: {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n llama: {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-2': {\n input: { text: true, image: false, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: false,\n },\n 'llama-3.2': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n 'llama-4': {\n input: { text: true, image: true, video: false, audio: false, embed: false },\n output: { text: true, image: false, video: false, audio: false, embed: false },\n tool_support: true,\n },\n};\n// Fallback pattern lists for inferring modalities and tool support\nconst IMAGE_INPUT_MODELS = ['image'];\nconst VIDEO_INPUT_MODELS = ['video'];\nconst AUDIO_INPUT_MODELS = ['audio'];\nconst TEXT_INPUT_MODELS = ['text'];\nconst IMAGE_OUTPUT_MODELS = ['image'];\nconst VIDEO_OUTPUT_MODELS = ['video'];\nconst AUDIO_OUTPUT_MODELS = ['audio'];\nconst TEXT_OUTPUT_MODELS = ['text'];\nconst EMBEDDING_OUTPUT_MODELS = ['embed'];\nconst TOOL_SUPPORT_MODELS = ['tool', 'sonnet', 'opus', 'gemini', 'claude'];\nfunction modelMatches(modelName, patterns) {\n return patterns.some((pattern) => modelName.includes(pattern));\n}\nfunction normalizeVertexAIModelName(modelName) {\n const segments = modelName.toLowerCase().split('/');\n return segments[segments.length - 1];\n}\n/**\n * Get the full ModelCapabilities for a Vertex AI model.\n * Checks RECORD_MODEL_CAPABILITIES first, then falls back to pattern-based inference.\n */\nexport function getModelCapabilitiesVertexAI(model) {\n const normalized = normalizeVertexAIModelName(model);\n const record = RECORD_MODEL_CAPABILITIES[normalized];\n if (record)\n return record;\n let bestFamilyKey;\n let bestFamilyLength = 0;\n for (const key of Object.keys(RECORD_FAMILY_CAPABILITIES)) {\n if (normalized.startsWith(key) && key.length > bestFamilyLength) {\n bestFamilyKey = key;\n bestFamilyLength = key.length;\n }\n }\n if (bestFamilyKey) {\n return RECORD_FAMILY_CAPABILITIES[bestFamilyKey];\n }\n const input = {\n text: modelMatches(normalized, TEXT_INPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_INPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_INPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_INPUT_MODELS) || undefined,\n embed: false,\n };\n const output = {\n text: modelMatches(normalized, TEXT_OUTPUT_MODELS) || undefined,\n image: modelMatches(normalized, IMAGE_OUTPUT_MODELS) || undefined,\n video: modelMatches(normalized, VIDEO_OUTPUT_MODELS) || undefined,\n audio: modelMatches(normalized, AUDIO_OUTPUT_MODELS) || undefined,\n embed: modelMatches(normalized, EMBEDDING_OUTPUT_MODELS) || undefined,\n };\n const tool_support = modelMatches(normalized, TOOL_SUPPORT_MODELS) || undefined;\n return { input, output, tool_support };\n}\n//# sourceMappingURL=vertexai.js.map","// ============== Provider details ===============\nexport var Providers;\n(function (Providers) {\n Providers[\"openai\"] = \"openai\";\n Providers[\"openai_compatible\"] = \"openai_compatible\";\n Providers[\"azure_openai\"] = \"azure_openai\";\n Providers[\"azure_foundry\"] = \"azure_foundry\";\n Providers[\"huggingface_ie\"] = \"huggingface_ie\";\n Providers[\"replicate\"] = \"replicate\";\n Providers[\"bedrock\"] = \"bedrock\";\n Providers[\"vertexai\"] = \"vertexai\";\n Providers[\"togetherai\"] = \"togetherai\";\n Providers[\"mistralai\"] = \"mistralai\";\n Providers[\"groq\"] = \"groq\";\n Providers[\"watsonx\"] = \"watsonx\";\n Providers[\"xai\"] = \"xai\";\n Providers[\"anthropic\"] = \"anthropic\";\n})(Providers || (Providers = {}));\nexport const ProviderList = {\n openai: {\n id: Providers.openai,\n name: 'OpenAI',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n azure_openai: {\n id: Providers.azure_openai,\n name: 'Azure OpenAI',\n requiresApiKey: false,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n azure_foundry: {\n id: Providers.azure_foundry,\n name: 'Microsoft Foundry',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n huggingface_ie: {\n id: Providers.huggingface_ie,\n name: 'HuggingFace Inference Endpoint',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n },\n replicate: {\n id: Providers.replicate,\n name: 'Replicate',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: true,\n },\n bedrock: {\n id: Providers.bedrock,\n name: 'Amazon Bedrock',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n endpointPlaceholder: 'region name (eg. us-east-1)',\n supportSearch: false,\n },\n vertexai: {\n id: Providers.vertexai,\n name: 'Google Agent Platform (Vertex AI)',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n togetherai: {\n id: Providers.togetherai,\n name: 'Together AI',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n mistralai: {\n id: Providers.mistralai,\n name: 'Mistral AI',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n groq: {\n id: Providers.groq,\n name: 'Groq Cloud',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n watsonx: {\n id: Providers.watsonx,\n name: 'IBM WatsonX',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n supportSearch: false,\n },\n xai: {\n id: Providers.xai,\n name: 'xAI (Grok)',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n openai_compatible: {\n id: Providers.openai_compatible,\n name: 'OpenAI Compatible',\n requiresApiKey: true,\n requiresEndpointUrl: true,\n endpointPlaceholder: 'https://api.example.com/v1',\n supportSearch: false,\n },\n anthropic: {\n id: Providers.anthropic,\n name: 'Anthropic',\n requiresApiKey: true,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\n/**\n * Standardized error class for Llumiverse driver errors.\n *\n * Normalizes errors from different LLM providers (OpenAI, Anthropic, Bedrock, VertexAI, etc.)\n * into a consistent format. The primary value is the `retryable` flag, which enables upstream\n * consumers to implement smart retry logic.\n *\n * @example\n * ```typescript\n * try {\n * const result = await driver.execute(segments, options);\n * } catch (error) {\n * if (LlumiverseError.isLlumiverseError(error)) {\n * console.log(`Provider: ${error.context.provider}`);\n * console.log(`Model: ${error.context.model}`);\n * console.log(`Retryable: ${error.retryable}`);\n *\n * if (error.retryable) {\n * // Implement retry logic with exponential backoff\n * await retryWithBackoff(() => driver.execute(segments, options));\n * } else {\n * // Handle non-retryable error (e.g., invalid API key, malformed request)\n * logError(error);\n * }\n * }\n * throw error;\n * }\n * ```\n */\nexport class LlumiverseError extends Error {\n /**\n * HTTP status code (e.g., 429, 500) if available.\n * Undefined if the error doesn't have a numeric status code.\n */\n code;\n /**\n * Provider-specific error name/type (e.g., \"ThrottlingException\", \"ValidationException\").\n * Optional - used to preserve the semantic error type from the provider SDK.\n */\n name;\n /**\n * Whether this error is retryable.\n * - True: Definitely retryable (rate limits, timeouts, server errors)\n * - False: Definitely not retryable (auth failures, invalid requests, malformed schemas)\n * - Undefined: Unknown retryability - allows consumers to decide default behavior\n *\n * When undefined, consumers can choose their retry strategy:\n * - Conservative: Don't retry unknown errors (avoid spam)\n * - Resilient: Retry unknown errors (prioritize success)\n */\n retryable;\n /**\n * Context about where and how the error occurred.\n * Includes provider, model, operation type.\n */\n context;\n /**\n * The original error from the provider SDK.\n * Preserved for debugging and detailed error inspection.\n */\n originalError;\n constructor(message, retryable, context, originalError, code, name) {\n super(message);\n this.name = name || 'LlumiverseError';\n this.code = code;\n this.retryable = retryable;\n this.context = context;\n this.originalError = originalError;\n // Preserve stack trace from original error if available\n if (originalError instanceof Error && originalError.stack) {\n this.stack = originalError.stack;\n }\n }\n /**\n * Serialize the error to JSON for logging or transmission.\n * Includes all error properties except the original error object itself.\n */\n toJSON() {\n return {\n name: this.name,\n message: this.message,\n code: this.code,\n retryable: this.retryable,\n context: this.context,\n stack: this.stack,\n // Include original error message if available\n originalErrorMessage: this.originalError instanceof Error ? this.originalError.message : String(this.originalError),\n };\n }\n /**\n * Type guard to check if an error is a LlumiverseError.\n * Useful for conditional error handling.\n *\n * @param error - The error to check\n * @returns True if the error is a LlumiverseError\n */\n static isLlumiverseError(error) {\n return error instanceof LlumiverseError;\n }\n}\n//Common names to share between different models\nexport var SharedOptions;\n(function (SharedOptions) {\n //Text\n SharedOptions[\"max_tokens\"] = \"max_tokens\";\n SharedOptions[\"temperature\"] = \"temperature\";\n SharedOptions[\"top_p\"] = \"top_p\";\n SharedOptions[\"top_k\"] = \"top_k\";\n SharedOptions[\"presence_penalty\"] = \"presence_penalty\";\n SharedOptions[\"frequency_penalty\"] = \"frequency_penalty\";\n SharedOptions[\"stop_sequence\"] = \"stop_sequence\";\n SharedOptions[\"effort\"] = \"effort\";\n //Image\n SharedOptions[\"seed\"] = \"seed\";\n SharedOptions[\"number_of_images\"] = \"number_of_images\";\n})(SharedOptions || (SharedOptions = {}));\nexport var OptionType;\n(function (OptionType) {\n OptionType[\"numeric\"] = \"numeric\";\n OptionType[\"enum\"] = \"enum\";\n OptionType[\"boolean\"] = \"boolean\";\n OptionType[\"string_list\"] = \"string_list\";\n})(OptionType || (OptionType = {}));\n// ============== Prompts ===============\nexport var PromptRole;\n(function (PromptRole) {\n PromptRole[\"safety\"] = \"safety\";\n PromptRole[\"system\"] = \"system\";\n PromptRole[\"user\"] = \"user\";\n PromptRole[\"assistant\"] = \"assistant\";\n PromptRole[\"negative\"] = \"negative\";\n PromptRole[\"mask\"] = \"mask\";\n /**\n * Used to send the response of a tool\n */\n PromptRole[\"tool\"] = \"tool\";\n})(PromptRole || (PromptRole = {}));\n/**\n * @deprecated This is deprecated. Use CompletionResult.type information instead.\n */\nexport var Modalities;\n(function (Modalities) {\n Modalities[\"text\"] = \"text\";\n Modalities[\"image\"] = \"image\";\n})(Modalities || (Modalities = {}));\nexport var AIModelStatus;\n(function (AIModelStatus) {\n AIModelStatus[\"Available\"] = \"available\";\n AIModelStatus[\"Pending\"] = \"pending\";\n AIModelStatus[\"Stopped\"] = \"stopped\";\n AIModelStatus[\"Unavailable\"] = \"unavailable\";\n AIModelStatus[\"Unknown\"] = \"unknown\";\n AIModelStatus[\"Legacy\"] = \"legacy\";\n})(AIModelStatus || (AIModelStatus = {}));\nexport var ModelType;\n(function (ModelType) {\n ModelType[\"Classifier\"] = \"classifier\";\n ModelType[\"Regressor\"] = \"regressor\";\n ModelType[\"Clustering\"] = \"clustering\";\n ModelType[\"AnomalyDetection\"] = \"anomaly-detection\";\n ModelType[\"TimeSeries\"] = \"time-series\";\n ModelType[\"Text\"] = \"text\";\n ModelType[\"Image\"] = \"image\";\n ModelType[\"Audio\"] = \"audio\";\n ModelType[\"Video\"] = \"video\";\n ModelType[\"Embedding\"] = \"embedding\";\n ModelType[\"Chat\"] = \"chat\";\n ModelType[\"Code\"] = \"code\";\n ModelType[\"NLP\"] = \"nlp\";\n ModelType[\"MultiModal\"] = \"multi-modal\";\n ModelType[\"Test\"] = \"test\";\n ModelType[\"Other\"] = \"other\";\n ModelType[\"Unknown\"] = \"unknown\";\n})(ModelType || (ModelType = {}));\nexport var TrainingJobStatus;\n(function (TrainingJobStatus) {\n TrainingJobStatus[\"running\"] = \"running\";\n TrainingJobStatus[\"succeeded\"] = \"succeeded\";\n TrainingJobStatus[\"failed\"] = \"failed\";\n TrainingJobStatus[\"cancelled\"] = \"cancelled\";\n})(TrainingJobStatus || (TrainingJobStatus = {}));\n//# sourceMappingURL=types.js.map","import { getModelCapabilitiesAnthropic } from './capability/anthropic.js';\nimport { getModelCapabilitiesAzureFoundry } from './capability/azure_foundry.js';\nimport { getModelCapabilitiesBedrock } from './capability/bedrock.js';\nimport { getModelCapabilitiesOpenAI } from './capability/openai.js';\nimport { getModelCapabilitiesVertexAI } from './capability/vertexai.js';\nimport { Providers } from './types.js';\nexport function getModelCapabilities(model, provider) {\n //Check for locations/<location>/ prefix and remove it\n if (model.startsWith('locations/')) {\n const parts = model.split('/');\n if (parts.length >= 3) {\n model = parts.slice(2).join('/');\n }\n }\n const capabilities = _getModelCapabilities(model, provider);\n // Globally disable audio and video for all models, as we don't support them yet\n // TODO: Remove this when we add support.\n capabilities.input.audio = false;\n capabilities.output.audio = false;\n capabilities.output.video = false;\n // Preserve tool_support_streaming from provider-specific capabilities if set,\n // otherwise default to false for providers that haven't been verified\n return capabilities;\n}\nfunction _getModelCapabilities(model, provider) {\n switch (provider?.toLowerCase()) {\n case Providers.anthropic:\n return getModelCapabilitiesAnthropic(model);\n case Providers.vertexai:\n return getModelCapabilitiesVertexAI(model);\n case Providers.openai:\n return getModelCapabilitiesOpenAI(model);\n case Providers.openai_compatible:\n return getModelCapabilitiesOpenAICompatible(model);\n case Providers.bedrock:\n return getModelCapabilitiesBedrock(model);\n case Providers.azure_foundry:\n // Azure Foundry uses OpenAI capabilities\n return getModelCapabilitiesAzureFoundry(model);\n case Providers.groq:\n case Providers.togetherai:\n case Providers.mistralai:\n // These providers host text models that generally support tool use\n return getModelCapabilitiesOpenAICompatible(model);\n case Providers.xai:\n // xAI (Grok) models support tool use and are text-based\n return {\n input: { text: true, image: model.includes('vision') },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: false, // Conservative - may work but not tested\n };\n default:\n // Guess the provider based on the model name\n if (model.startsWith('gpt')) {\n return getModelCapabilitiesOpenAI(model);\n }\n else if (model.startsWith('claude')) {\n return getModelCapabilitiesAnthropic(model);\n }\n else if (model.startsWith('grok')) {\n // xAI Grok models\n return {\n input: { text: true, image: model.includes('vision') },\n output: { text: true },\n tool_support: true,\n tool_support_streaming: false,\n };\n }\n else if (model.startsWith('publishers/')) {\n return getModelCapabilitiesVertexAI(model);\n }\n else if (model.startsWith('arn:aws')) {\n return getModelCapabilitiesBedrock(model);\n }\n // Fallback to a generic model with no capabilities\n return { input: {}, output: {} };\n }\n}\n// Patterns for models known NOT to support tool use on OpenAI-compatible endpoints\nconst NO_TOOL_SUPPORT_PATTERNS = ['image', 'embed', 'moderation', 'whisper', 'sora', 'dall-e', 'tts'];\n/**\n * For OpenAI-compatible endpoints (e.g., OpenRouter), try OpenAI capability lookup first.\n * If no explicit match is found, default to tool_support: true since most models\n * on these platforms support tool use. Blacklist known non-tool-supporting patterns.\n */\nfunction getModelCapabilitiesOpenAICompatible(model) {\n const caps = getModelCapabilitiesOpenAI(model);\n if (caps.tool_support !== undefined) {\n return caps;\n }\n const normalized = model.toLowerCase();\n const isNonToolModel = NO_TOOL_SUPPORT_PATTERNS.some((p) => normalized.includes(p));\n return {\n input: { text: true },\n output: { text: true },\n tool_support: !isNonToolModel,\n tool_support_streaming: !isNonToolModel,\n };\n}\nexport function supportsToolUse(model, provider, streaming = false) {\n const capabilities = getModelCapabilities(model, provider);\n return streaming ? !!capabilities.tool_support_streaming : !!capabilities.tool_support;\n}\nexport function modelModalitiesToArray(modalities) {\n return Object.entries(modalities)\n .filter(([_, isSupported]) => isSupported)\n .map(([modality]) => modality);\n}\n//# sourceMappingURL=capability.js.map","import { OptionType, SharedOptions, } from '../types.js';\nimport { textOptionsFallback } from './fallback.js';\nimport { buildClaudeCacheOptions, buildClaudeCacheTtlOptions, buildClaudeEffortOptions, buildClaudeIncludeThoughtsOption, buildClaudeThinkingBudgetOption, getClaudeMaxTokensLimit, } from './shared-parsing.js';\nimport { hasSamplingParameterRestriction, isGeminiModelVersionGte } from './version-parsing.js';\nexport var ImagenTaskType;\n(function (ImagenTaskType) {\n ImagenTaskType[\"TEXT_IMAGE\"] = \"TEXT_IMAGE\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_REMOVAL\"] = \"EDIT_MODE_INPAINT_REMOVAL\";\n ImagenTaskType[\"EDIT_MODE_INPAINT_INSERTION\"] = \"EDIT_MODE_INPAINT_INSERTION\";\n ImagenTaskType[\"EDIT_MODE_BGSWAP\"] = \"EDIT_MODE_BGSWAP\";\n ImagenTaskType[\"EDIT_MODE_OUTPAINT\"] = \"EDIT_MODE_OUTPAINT\";\n ImagenTaskType[\"CUSTOMIZATION_SUBJECT\"] = \"CUSTOMIZATION_SUBJECT\";\n ImagenTaskType[\"CUSTOMIZATION_STYLE\"] = \"CUSTOMIZATION_STYLE\";\n ImagenTaskType[\"CUSTOMIZATION_CONTROLLED\"] = \"CUSTOMIZATION_CONTROLLED\";\n ImagenTaskType[\"CUSTOMIZATION_INSTRUCT\"] = \"CUSTOMIZATION_INSTRUCT\";\n})(ImagenTaskType || (ImagenTaskType = {}));\nexport var ImagenMaskMode;\n(function (ImagenMaskMode) {\n ImagenMaskMode[\"MASK_MODE_USER_PROVIDED\"] = \"MASK_MODE_USER_PROVIDED\";\n ImagenMaskMode[\"MASK_MODE_BACKGROUND\"] = \"MASK_MODE_BACKGROUND\";\n ImagenMaskMode[\"MASK_MODE_FOREGROUND\"] = \"MASK_MODE_FOREGROUND\";\n ImagenMaskMode[\"MASK_MODE_SEMANTIC\"] = \"MASK_MODE_SEMANTIC\";\n})(ImagenMaskMode || (ImagenMaskMode = {}));\nexport var ThinkingLevel;\n(function (ThinkingLevel) {\n ThinkingLevel[\"HIGH\"] = \"HIGH\";\n ThinkingLevel[\"MEDIUM\"] = \"MEDIUM\";\n ThinkingLevel[\"LOW\"] = \"LOW\";\n ThinkingLevel[\"MINIMAL\"] = \"MINIMAL\";\n ThinkingLevel[\"THINKING_LEVEL_UNSPECIFIED\"] = \"THINKING_LEVEL_UNSPECIFIED\";\n})(ThinkingLevel || (ThinkingLevel = {}));\n/** Models that support Flex processing (shared, cost-efficient tier). */\nconst FLEX_SUPPORTED_GEMINI_MODELS = [\n 'gemini-3.1-flash-lite-preview',\n 'gemini-3.1-flash-image-preview',\n 'gemini-3.1-pro-preview',\n 'gemini-3-flash-preview',\n 'gemini-3-pro-image-preview',\n];\nexport function isFlexSupportedGeminiModel(model) {\n const modelName = model.split('/').pop() ?? model;\n return FLEX_SUPPORTED_GEMINI_MODELS.some((m) => modelName.includes(m));\n}\nexport function getVertexAiOptions(model, option) {\n if (model.includes('imagen-')) {\n return getImagenOptions(model, option);\n }\n else if (model.includes('gemini')) {\n return getGeminiOptions(model, option);\n }\n else if (model.includes('claude')) {\n return getClaudeOptions(model, option);\n }\n else if (model.includes('llama')) {\n return getLlamaOptions(model);\n }\n return textOptionsFallback;\n}\nfunction getImagenOptions(model, option) {\n const commonOptions = [\n {\n name: SharedOptions.number_of_images,\n type: OptionType.numeric,\n min: 1,\n max: 4,\n default: 1,\n integer: true,\n description: 'Number of Images to generate',\n },\n {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n min: 0,\n max: 4294967295,\n default: 12,\n integer: true,\n description: 'The seed of the generated image',\n },\n {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Disallow the inclusion of people or faces in images': 'dont_allow',\n 'Allow generation of adults only': 'allow_adult',\n 'Allow generation of people of all ages': 'allow_all',\n },\n default: 'allow_adult',\n description: 'The safety setting for allowing the generation of people in the image',\n },\n {\n name: 'safety_setting',\n type: OptionType.enum,\n enum: {\n 'Block very few problematic prompts and responses': 'block_none',\n 'Block only few problematic prompts and responses': 'block_only_high',\n 'Block some problematic prompts and responses': 'block_medium_and_above',\n 'Strictest filtering': 'block_low_and_above',\n },\n default: 'block_medium_and_above',\n description: 'The overall safety setting',\n },\n ];\n const outputOptions = [\n {\n name: 'image_file_type',\n type: OptionType.enum,\n enum: { JPEG: 'image/jpeg', PNG: 'image/png' },\n default: 'image/png',\n description: 'The file type of the generated image',\n refresh: true,\n },\n ];\n const jpegQuality = {\n name: 'jpeg_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 75,\n integer: true,\n description: 'The compression quality of the JPEG image',\n };\n if (option?.image_file_type === 'image/jpeg') {\n outputOptions.push(jpegQuality);\n }\n if (model.includes('generate')) {\n // Generate models\n const modeOptions = [\n {\n name: 'aspect_ratio',\n type: OptionType.enum,\n enum: { '1:1': '1:1', '4:3': '4:3', '3:4': '3:4', '16:9': '16:9', '9:16': '9:16' },\n default: '1:1',\n description: 'The aspect ratio of the generated image',\n },\n {\n name: 'add_watermark',\n type: OptionType.boolean,\n default: false,\n description: 'Add an invisible watermark to the generated image, useful for detection of AI images',\n },\n ];\n const enhanceOptions = !model.includes('generate-001')\n ? [\n {\n name: 'enhance_prompt',\n type: OptionType.boolean,\n default: true,\n description: \"VertexAI automatically rewrites the prompt to better reflect the prompt's intent.\",\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [...commonOptions, ...modeOptions, ...outputOptions, ...enhanceOptions],\n };\n }\n if (model.includes('capability')) {\n // Edit models\n let guidanceScaleDefault = 75;\n if (option?.edit_mode === ImagenTaskType.EDIT_MODE_INPAINT_INSERTION) {\n guidanceScaleDefault = 60;\n }\n const modeOptions = [\n {\n name: 'edit_mode',\n type: OptionType.enum,\n enum: {\n EDIT_MODE_INPAINT_REMOVAL: 'EDIT_MODE_INPAINT_REMOVAL',\n EDIT_MODE_INPAINT_INSERTION: 'EDIT_MODE_INPAINT_INSERTION',\n EDIT_MODE_BGSWAP: 'EDIT_MODE_BGSWAP',\n EDIT_MODE_OUTPAINT: 'EDIT_MODE_OUTPAINT',\n CUSTOMIZATION_SUBJECT: 'CUSTOMIZATION_SUBJECT',\n CUSTOMIZATION_STYLE: 'CUSTOMIZATION_STYLE',\n CUSTOMIZATION_CONTROLLED: 'CUSTOMIZATION_CONTROLLED',\n CUSTOMIZATION_INSTRUCT: 'CUSTOMIZATION_INSTRUCT',\n },\n description: 'The editing mode. CUSTOMIZATION options use few-shot learning to generate images based on a few examples.',\n },\n {\n name: 'guidance_scale',\n type: OptionType.numeric,\n min: 0,\n max: 500,\n default: guidanceScaleDefault,\n integer: true,\n description: 'How closely the generation follows the prompt',\n },\n ];\n const maskOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'mask_mode',\n type: OptionType.enum,\n enum: {\n MASK_MODE_USER_PROVIDED: 'MASK_MODE_USER_PROVIDED',\n MASK_MODE_BACKGROUND: 'MASK_MODE_BACKGROUND',\n MASK_MODE_FOREGROUND: 'MASK_MODE_FOREGROUND',\n MASK_MODE_SEMANTIC: 'MASK_MODE_SEMANTIC',\n },\n default: 'MASK_MODE_USER_PROVIDED',\n description: 'How should the mask for the generation be provided',\n },\n {\n name: 'mask_dilation',\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: true,\n description: 'The mask dilation, grows the mask by a percentage of image width to compensate for imprecise masks.',\n },\n ]\n : [];\n const maskClassOptions = option?.mask_mode === ImagenMaskMode.MASK_MODE_SEMANTIC\n ? [\n {\n name: 'mask_class',\n type: OptionType.string_list,\n default: [],\n description: 'Input Class IDs. Create a mask based on image class, based on https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api-customization#segment-ids',\n },\n ]\n : [];\n const editOptions = option?.edit_mode?.includes('EDIT')\n ? [\n {\n name: 'edit_steps',\n type: OptionType.numeric,\n default: 75,\n integer: true,\n description: 'The number of steps for the base image generation, more steps means more time and better quality',\n },\n ]\n : [];\n const customizationOptions = option?.edit_mode === ImagenTaskType.CUSTOMIZATION_CONTROLLED ||\n option?.edit_mode === ImagenTaskType.CUSTOMIZATION_SUBJECT\n ? [\n {\n name: 'controlType',\n type: OptionType.enum,\n enum: {\n 'Face Mesh': 'CONTROL_TYPE_FACE_MESH',\n Canny: 'CONTROL_TYPE_CANNY',\n Scribble: 'CONTROL_TYPE_SCRIBBLE',\n },\n default: 'CONTROL_TYPE_CANNY',\n description: 'Method used to generate the control image',\n },\n {\n name: 'controlImageComputation',\n type: OptionType.boolean,\n default: true,\n description: 'Should the control image be computed from the input image, or is it provided',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-imagen',\n options: [\n ...modeOptions,\n ...commonOptions,\n ...maskOptions,\n ...maskClassOptions,\n ...editOptions,\n ...customizationOptions,\n ...outputOptions,\n ],\n };\n }\n return textOptionsFallback;\n}\nfunction getGeminiEffortOptions(model) {\n if (model.includes('gemini-3-pro-image')) {\n return { High: 'high' };\n }\n if (model.includes('gemini-3.1-flash-image')) {\n return { Low: 'low', High: 'high' };\n }\n return { Low: 'low', Medium: 'medium', High: 'high' };\n}\nfunction getGeminiThinkingOptionItems(model) {\n return [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: false,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: SharedOptions.effort,\n type: OptionType.enum,\n enum: getGeminiEffortOptions(model),\n description: 'Higher thinking levels may improve quality, but increase response times and token costs',\n },\n ];\n}\nfunction getGeminiOptions(model, option) {\n // Special handling for gemini image / nano banana models\n if (model.includes('image')) {\n const isGemini25OrLater = isGeminiModelVersionGte(model, '2.5');\n const isGemini3OrLater = isGeminiModelVersionGte(model, '3.0');\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty', 'seed', 'top_k'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Set max temperature to 2.0\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature && option.type === OptionType.numeric) {\n return {\n ...option,\n max: 2.0,\n };\n }\n return option;\n });\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'Maximum output tokens',\n },\n ];\n const imageOptions = [];\n // Aspect ratio, person generation, prominent people: 2.5+\n if (isGemini25OrLater) {\n imageOptions.push({\n name: 'image_aspect_ratio',\n type: OptionType.enum,\n enum: {\n '1:1': '1:1',\n '2:3': '2:3',\n '3:2': '3:2',\n '3:4': '3:4',\n '4:3': '4:3',\n '9:16': '9:16',\n '16:9': '16:9',\n '21:9': '21:9',\n },\n default: '1:1',\n description: 'Aspect ratio of the generated images',\n }, {\n name: 'person_generation',\n type: OptionType.enum,\n enum: {\n 'Allow all people': 'ALLOW_ALL',\n 'Allow adults only': 'ALLOW_ADULT',\n 'Do not generate people': 'ALLOW_NONE',\n },\n default: 'ALLOW_ALL',\n description: 'Controls the generation of people in images',\n }, {\n name: 'prominent_people',\n type: OptionType.enum,\n enum: {\n 'Allow prominent people': 'ALLOW_PROMINENT_PEOPLE',\n 'Block prominent people': 'BLOCK_PROMINENT_PEOPLE',\n },\n description: 'Controls whether prominent people (celebrities) can be generated',\n });\n }\n // Resolution settings: 3.0+\n if (isGemini3OrLater) {\n imageOptions.push({\n name: 'image_size',\n type: OptionType.enum,\n enum: {\n '1K': '1K',\n '2K': '2K',\n '4K': '4K',\n },\n default: '1K',\n description: 'Size of generated images',\n });\n }\n // Output format: all image models\n imageOptions.push({\n name: 'output_mime_type',\n type: OptionType.enum,\n enum: {\n PNG: 'image/png',\n JPEG: 'image/jpeg',\n },\n default: 'image/png',\n description: 'MIME type of the generated image',\n refresh: true,\n });\n if (option?.output_mime_type === 'image/jpeg') {\n imageOptions.push({\n name: 'output_compression_quality',\n type: OptionType.numeric,\n min: 0,\n max: 100,\n default: 90,\n integer: true,\n description: 'Compression quality for JPEG images (0-100)',\n });\n }\n // Thinking options: 3.0+ (same as non-image counterparts)\n const thinkingOptions = isGemini3OrLater ? getGeminiThinkingOptionItems(model) : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, ...imageOptions, ...thinkingOptions],\n };\n }\n const max_tokens_limit = getGeminiMaxTokensLimit(model);\n const excludeOptions = ['max_tokens'];\n const commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n const seedOption = {\n name: SharedOptions.seed,\n type: OptionType.numeric,\n integer: true,\n description: 'The seed for the generation, useful for reproducibility',\n };\n if (isGeminiModelVersionGte(model, '3.0')) {\n const flexOptions = isFlexSupportedGeminiModel(model)\n ? [\n {\n name: 'flex',\n type: OptionType.boolean,\n default: false,\n description: 'Use Flex processing tier for cost-efficient, batch-style execution with relaxed latency.',\n },\n ]\n : [];\n return {\n _option_id: 'vertexai-gemini',\n options: [\n ...max_tokens,\n ...commonOptions,\n seedOption,\n ...getGeminiThinkingOptionItems(model),\n ...flexOptions,\n ],\n };\n }\n if (model.includes('-2.5-')) {\n // Gemini 2.5 thinking models\n // Set budget token ranges based on model variant\n let budgetMin = -1;\n let budgetMax = 24576;\n let budgetDescription = '';\n if (model.includes('flash-lite')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash Lite default: Model does not think. ' +\n 'Range: 512-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('flash')) {\n budgetMin = -1;\n budgetMax = 24576;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Flash default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 0-24576 tokens. ' +\n 'Set to 0 to disable thinking, -1 for dynamic thinking.';\n }\n else if (model.includes('pro')) {\n budgetMin = -1;\n budgetMax = 32768;\n budgetDescription =\n 'The target number of tokens to use for reasoning. ' +\n 'Pro default: Dynamic thinking (model decides when and how much to think). ' +\n 'Range: 128-32768 tokens. ' +\n 'Cannot disable thinking - minimum 128 tokens. Set to -1 for dynamic thinking.';\n }\n const geminiThinkingOptions = [\n {\n name: 'include_thoughts',\n type: OptionType.boolean,\n default: false,\n description: \"Include the model's reasoning process in the response\",\n },\n {\n name: 'thinking_budget_tokens',\n type: OptionType.numeric,\n min: budgetMin,\n max: budgetMax,\n default: undefined,\n integer: true,\n step: 100,\n description: budgetDescription,\n },\n ];\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption, ...geminiThinkingOptions],\n };\n }\n return {\n _option_id: 'vertexai-gemini',\n options: [...max_tokens, ...commonOptions, seedOption],\n };\n}\nfunction getClaudeOptions(model, option) {\n const max_tokens_limit = getClaudeMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n // Opus 4.7+ models no longer support temperature, top_p, top_k (returns 400 error)\n // Opus 4.6 and Sonnet 4.6 still support these parameters\n const hasSamplingRestriction = hasSamplingParameterRestriction(model);\n if (hasSamplingRestriction) {\n commonOptions = commonOptions.filter((option) => option.name !== SharedOptions.temperature &&\n option.name !== SharedOptions.top_p &&\n option.name !== 'top_k');\n }\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n return {\n _option_id: 'vertexai-claude',\n options: [\n ...max_tokens,\n ...commonOptions,\n ...buildClaudeEffortOptions(model),\n ...buildClaudeThinkingBudgetOption(model),\n ...buildClaudeIncludeThoughtsOption(model),\n ...buildClaudeCacheOptions(),\n ...buildClaudeCacheTtlOptions(option?.cache_enabled),\n ],\n };\n}\nfunction getLlamaOptions(model) {\n const max_tokens_limit = getLlamaMaxTokensLimit(model);\n const excludeOptions = ['max_tokens', 'presence_penalty', 'frequency_penalty', 'stop_sequence'];\n let commonOptions = textOptionsFallback.options.filter((option) => !excludeOptions.includes(option.name));\n const max_tokens = [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n max: max_tokens_limit,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n ];\n // Set max temperature to 1.0 for Llama models\n commonOptions = commonOptions.map((option) => {\n if (option.name === SharedOptions.temperature && option.type === OptionType.numeric) {\n return {\n ...option,\n max: 1.0,\n };\n }\n return option;\n });\n return {\n _option_id: 'text-fallback',\n options: [...max_tokens, ...commonOptions],\n };\n}\nfunction getGeminiMaxTokensLimit(model) {\n if (model.includes('image')) {\n return isGeminiModelVersionGte(model, '2.5') ? 32768 : 8192;\n }\n if (model.includes('thinking') || isGeminiModelVersionGte(model, '2.5')) {\n return 65535; // API upper bound is exclusive\n }\n if (model.includes('ultra') || model.includes('vision')) {\n return 2048;\n }\n return 8192;\n}\nfunction getLlamaMaxTokensLimit(_model) {\n return 8192;\n}\nexport function getMaxTokensLimitVertexAi(model) {\n if (model.includes('imagen-')) {\n return 0; // Imagen models do not have a max tokens limit in the same way as text models\n }\n else if (model.includes('claude')) {\n return getClaudeMaxTokensLimit(model);\n }\n else if (model.includes('gemini')) {\n return getGeminiMaxTokensLimit(model);\n }\n else if (model.includes('llama')) {\n return getLlamaMaxTokensLimit(model);\n }\n return 8192; // Default fallback limit\n}\n//# sourceMappingURL=vertexai.js.map","import { ProviderList, Providers } from '@llumiverse/common';\n// Virtual providers from studio\nexport var CustomProviders;\n(function (CustomProviders) {\n CustomProviders[\"virtual_lb\"] = \"virtual_lb\";\n CustomProviders[\"virtual_mediator\"] = \"virtual_mediator\";\n CustomProviders[\"test\"] = \"test\";\n})(CustomProviders || (CustomProviders = {}));\nexport const SupportedProviders = {\n ...Providers,\n ...CustomProviders,\n};\nexport const CustomProvidersList = {\n virtual_lb: {\n id: CustomProviders.virtual_lb,\n name: 'Virtual - Load Balancer',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n virtual_mediator: {\n id: CustomProviders.virtual_mediator,\n name: 'Virtual - Mediator',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n test: {\n id: CustomProviders.test,\n name: 'Test LLM',\n requiresApiKey: false,\n requiresEndpointUrl: false,\n supportSearch: false,\n },\n};\nexport const SupportedProvidersList = {\n ...ProviderList,\n ...CustomProvidersList,\n};\n/**\n * Returns the configured Vertex AI bucket access principal for an environment, or undefined.\n * Only Vertex AI environments expose this setting; the value is trimmed and empty strings\n * are treated as unset so callers get a single, normalized representation.\n */\nexport function getVertexBucketAccessPrincipal(env) {\n if (!env || env.provider !== SupportedProviders.vertexai)\n return undefined;\n const principal = env.settings?.bucket_access_principal;\n return typeof principal === 'string' && principal.trim().length > 0 ? principal.trim() : undefined;\n}\n//# sourceMappingURL=environment.js.map","import { OptionType, SharedOptions } from '../types.js';\nexport const textOptionsFallback = {\n _option_id: 'text-fallback',\n options: [\n {\n name: SharedOptions.max_tokens,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 200,\n description: 'The maximum number of tokens to generate',\n },\n {\n name: SharedOptions.temperature,\n type: OptionType.numeric,\n min: 0.0,\n default: 0.7,\n integer: false,\n step: 0.1,\n description: 'A higher temperature biases toward less likely tokens, making the model more creative',\n },\n {\n name: SharedOptions.top_p,\n type: OptionType.numeric,\n min: 0,\n max: 1,\n integer: false,\n step: 0.1,\n description: 'Limits token sampling to the cumulative probability of the top p tokens',\n },\n {\n name: SharedOptions.top_k,\n type: OptionType.numeric,\n min: 1,\n integer: true,\n step: 1,\n description: 'Limits token sampling to the top k tokens',\n },\n {\n name: SharedOptions.presence_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens if they appear at least once in the text',\n },\n {\n name: SharedOptions.frequency_penalty,\n type: OptionType.numeric,\n min: -2.0,\n max: 2.0,\n integer: false,\n step: 0.1,\n description: 'Penalise tokens based on their frequency in the text',\n },\n {\n name: SharedOptions.stop_sequence,\n type: OptionType.string_list,\n value: [],\n description: 'The generation will halt if one of the stop sequences is output',\n },\n ],\n};\n//# sourceMappingURL=fallback.js.map","export const UserGroupRefPopulate = 'id name tags description properties clearance compartments';\nexport const MEMBERS_GROUP_NAME = 'members';\n//# sourceMappingURL=group.js.map","function stripLeadingWildcard(host) {\n return host.startsWith('*.') ? host.slice(2) : host;\n}\nfunction stripIPv6Brackets(host) {\n return host.startsWith('[') && host.endsWith(']') ? host.slice(1, -1) : host;\n}\nfunction looksLikeBareIpv6(host) {\n const firstColon = host.indexOf(':');\n return firstColon >= 0 && host.indexOf(':', firstColon + 1) >= 0 && !host.startsWith('[');\n}\nfunction hasWhitespace(host) {\n return (host.includes(' ') ||\n host.includes('\\t') ||\n host.includes('\\n') ||\n host.includes('\\r') ||\n host.includes('\\f') ||\n host.includes('\\v'));\n}\nexport function normalizeHost(value) {\n if (typeof value !== 'string')\n return undefined;\n let input = value.trim().toLowerCase();\n if (!input)\n return undefined;\n input = stripLeadingWildcard(input);\n input = input.endsWith('.') ? input.slice(0, -1) : input;\n if (!input.includes('://')) {\n input = looksLikeBareIpv6(input) ? `https://[${input}]` : `https://${input}`;\n }\n try {\n const url = new URL(input);\n let host = stripLeadingWildcard(stripIPv6Brackets(url.hostname.toLowerCase()));\n host = host.endsWith('.') ? host.slice(0, -1) : host;\n return host && !hasWhitespace(host) ? host : undefined;\n }\n catch {\n return undefined;\n }\n}\nexport function hostFromUrl(value, baseUrl) {\n try {\n const url = baseUrl ? new URL(value, baseUrl) : new URL(value);\n return normalizeHost(url.hostname);\n }\n catch {\n return undefined;\n }\n}\nexport function normalizeHostList(value) {\n if (!Array.isArray(value))\n return [];\n return Array.from(new Set(value.map((entry) => normalizeHost(entry)).filter((entry) => !!entry)));\n}\nexport function hostMatchesAny(host, allowlist) {\n if (!allowlist || allowlist.length === 0)\n return true;\n const normalizedHost = normalizeHost(host);\n if (!normalizedHost)\n return false;\n return allowlist.some((entry) => {\n const normalizedEntry = normalizeHost(entry);\n return (!!normalizedEntry && (normalizedHost === normalizedEntry || normalizedHost.endsWith(`.${normalizedEntry}`)));\n });\n}\nexport function urlMatchesAnyHost(url, allowlist, baseUrl) {\n if (!allowlist || allowlist.length === 0)\n return true;\n const host = hostFromUrl(url, baseUrl);\n return !!host && hostMatchesAny(host, allowlist);\n}\nexport function isLocalhostOrVertesiaHost(value) {\n const host = normalizeHost(value);\n return (!!host &&\n (host === 'localhost' ||\n host === '127.0.0.1' ||\n host === '::1' ||\n host === 'vertesia.io' ||\n host.endsWith('.vertesia.io')));\n}\nexport function isLocalhostOrVertesiaUrl(value) {\n const host = hostFromUrl(value);\n return isLocalhostOrVertesiaHost(host);\n}\n//# sourceMappingURL=host-utils.js.map","export var SupportedIntegrations;\n(function (SupportedIntegrations) {\n SupportedIntegrations[\"gladia\"] = \"gladia\";\n SupportedIntegrations[\"github\"] = \"github\";\n SupportedIntegrations[\"aws\"] = \"aws\";\n SupportedIntegrations[\"magic_pdf\"] = \"magic_pdf\";\n SupportedIntegrations[\"serper\"] = \"serper\";\n SupportedIntegrations[\"exa\"] = \"exa\";\n SupportedIntegrations[\"linkup\"] = \"linkup\";\n SupportedIntegrations[\"resend\"] = \"resend\";\n SupportedIntegrations[\"ask_user_webhook\"] = \"ask_user_webhook\";\n})(SupportedIntegrations || (SupportedIntegrations = {}));\nexport function withProjectIntegrationDiscriminator(integration, config) {\n return {\n ...config,\n integration,\n };\n}\n//# sourceMappingURL=integrations.js.map","export var MeterNames;\n(function (MeterNames) {\n MeterNames[\"analyzed_pages\"] = \"analyzed_pages\";\n MeterNames[\"extracted_tables\"] = \"extracted_tables\";\n MeterNames[\"analyzed_images\"] = \"analyzed_images\";\n MeterNames[\"input_token_used\"] = \"input_token_used\";\n MeterNames[\"output_token_used\"] = \"output_token_used\";\n MeterNames[\"task_run\"] = \"task_run\";\n})(MeterNames || (MeterNames = {}));\n//# sourceMappingURL=meters.js.map","import { Permission } from './access-control.js';\nexport const OAUTH_SCOPE_OPENID = 'openid';\nexport const OAUTH_SCOPE_PROFILE = 'profile';\nexport const OAUTH_SCOPE_OFFLINE_ACCESS = 'offline_access';\nexport const OAUTH_STANDARD_SCOPES = [OAUTH_SCOPE_OPENID, OAUTH_SCOPE_PROFILE, OAUTH_SCOPE_OFFLINE_ACCESS];\nconst NON_OAUTH_PERMISSION_SCOPES = new Set([\n Permission.api_key_secret_read,\n Permission.manage_billing,\n Permission.billing_read,\n Permission.iam_impersonate,\n Permission.studio_access,\n]);\nconst OAUTH_PERMISSION_SCOPES = Object.values(Permission).filter((scope) => !NON_OAUTH_PERMISSION_SCOPES.has(scope));\nconst OAUTH_STANDARD_SCOPE_SET = new Set(OAUTH_STANDARD_SCOPES);\nconst OAUTH_PERMISSION_SCOPE_SET = new Set(OAUTH_PERMISSION_SCOPES);\nconst OBJECT_ID_PATTERN = /^[0-9a-f]{24}$/i;\nconst OAUTH_PROJECT_BINDING_SCOPE_PREFIX = 'project:';\nexport function getOAuthPermissionScopes() {\n return [...OAUTH_PERMISSION_SCOPES];\n}\nexport function isOAuthStandardScope(scope) {\n return OAUTH_STANDARD_SCOPE_SET.has(scope);\n}\nexport function isOAuthPermissionScope(scope) {\n return OAUTH_PERMISSION_SCOPE_SET.has(scope);\n}\nexport function isOAuthSupportedScope(scope) {\n return isOAuthStandardScope(scope) || isOAuthPermissionScope(scope);\n}\nexport function isOAuthProjectBindingScope(scope) {\n if (!scope.startsWith(OAUTH_PROJECT_BINDING_SCOPE_PREFIX)) {\n return false;\n }\n return OBJECT_ID_PATTERN.test(scope.slice(OAUTH_PROJECT_BINDING_SCOPE_PREFIX.length));\n}\nexport function createOAuthProjectBindingScope(projectId) {\n return `${OAUTH_PROJECT_BINDING_SCOPE_PREFIX}${projectId}`;\n}\nexport function hasOAuthOpenIdScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_OPENID);\n}\nexport function hasOAuthProfileScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_PROFILE);\n}\nexport function hasOAuthOfflineAccessScope(scopes) {\n return scopes.includes(OAUTH_SCOPE_OFFLINE_ACCESS);\n}\nexport function getOAuthScopesWithProfileDependency(scopes) {\n if (!hasOAuthOpenIdScope(scopes)) {\n return scopes.filter((scope) => scope !== OAUTH_SCOPE_PROFILE);\n }\n return [...scopes];\n}\nexport function extractOAuthPermissionScopes(scopes) {\n return scopes.filter(isOAuthPermissionScope);\n}\n//# sourceMappingURL=oauth-scopes.js.map","class ProgressSpan {\n parent;\n parentUnits;\n spanUnits;\n unitsDone;\n constructor(parent, parentUnits, spanUnits) {\n this.parent = parent;\n this.parentUnits = parentUnits;\n this.spanUnits = spanUnits;\n this.unitsDone = 0;\n }\n done(units) {\n const remaining = this.spanUnits - this.unitsDone;\n if (!remaining)\n return; // ignore if already done\n if (!units || units > remaining) {\n units = remaining;\n }\n this.unitsDone += units;\n this.parent.done((units * this.parentUnits) / this.spanUnits);\n }\n get parentUnitsDone() {\n return Math.round((this.unitsDone * this.parentUnits) / this.spanUnits);\n }\n get isDone() {\n return this.unitsDone >= this.spanUnits;\n }\n}\nexport class Progress {\n total;\n unitsDone = 0;\n constructor(total) {\n this.total = total;\n }\n get fraction() {\n return this.unitsDone / this.total;\n }\n get percent() {\n return Math.round(this.fraction * 100);\n }\n get isDone() {\n return this.unitsDone >= this.total;\n }\n done(units) {\n const remaining = this.total - this.unitsDone;\n if (!remaining)\n return; // ignore if already done\n if (!units || units > remaining) {\n units = remaining;\n }\n this.unitsDone += units;\n }\n span(units, spanUnits) {\n return new ProgressSpan(this, units, spanUnits || units);\n }\n}\n//# sourceMappingURL=Progress.js.map","export var ProjectRoles;\n(function (ProjectRoles) {\n ProjectRoles[\"owner\"] = \"owner\";\n ProjectRoles[\"admin\"] = \"admin\";\n ProjectRoles[\"manager\"] = \"manager\";\n ProjectRoles[\"developer\"] = \"developer\";\n ProjectRoles[\"application\"] = \"application\";\n ProjectRoles[\"automation\"] = \"automation\";\n ProjectRoles[\"content_processor\"] = \"content_processor\";\n ProjectRoles[\"consumer\"] = \"consumer\";\n ProjectRoles[\"executor\"] = \"executor\";\n ProjectRoles[\"reader\"] = \"reader\";\n ProjectRoles[\"auditor\"] = \"auditor\";\n ProjectRoles[\"support\"] = \"support\";\n ProjectRoles[\"billing\"] = \"billing\";\n ProjectRoles[\"member\"] = \"member\";\n ProjectRoles[\"app_member\"] = \"app_member\";\n ProjectRoles[\"content_superadmin\"] = \"content_superadmin\";\n})(ProjectRoles || (ProjectRoles = {}));\nexport function isRoleIncludedIn(role, includingRole) {\n switch (includingRole) {\n case ProjectRoles.owner:\n return true; // includes billing to?\n case ProjectRoles.admin:\n return role !== ProjectRoles.billing && role !== ProjectRoles.owner;\n case ProjectRoles.developer:\n return role === ProjectRoles.developer;\n case ProjectRoles.billing:\n return role === ProjectRoles.billing;\n default:\n return false;\n }\n}\nexport var ResourceVisibility;\n(function (ResourceVisibility) {\n ResourceVisibility[\"public\"] = \"public\";\n ResourceVisibility[\"account\"] = \"account\";\n ResourceVisibility[\"project\"] = \"project\";\n})(ResourceVisibility || (ResourceVisibility = {}));\n/**\n * System interaction category enum.\n * Categories group one or more system interactions for default model assignment.\n */\nexport var SystemInteractionCategory;\n(function (SystemInteractionCategory) {\n SystemInteractionCategory[\"content_type\"] = \"content_type\";\n SystemInteractionCategory[\"intake\"] = \"intake\";\n SystemInteractionCategory[\"analysis\"] = \"analysis\";\n SystemInteractionCategory[\"agent\"] = \"agent\";\n SystemInteractionCategory[\"non_applicable\"] = \"non_applicable\";\n})(SystemInteractionCategory || (SystemInteractionCategory = {}));\n/**\n * Map system interaction endpoints to categories.\n */\nexport const SYSTEM_INTERACTION_CATEGORIES = {\n ExtractInformation: SystemInteractionCategory.intake,\n SelectDocumentType: SystemInteractionCategory.intake,\n GenerateMetadataModel: SystemInteractionCategory.content_type,\n ChunkDocument: SystemInteractionCategory.intake,\n IdentifyTextSections: SystemInteractionCategory.intake,\n AnalyzeDocument: SystemInteractionCategory.analysis,\n ReduceTextSections: SystemInteractionCategory.analysis,\n GenericAgent: SystemInteractionCategory.non_applicable,\n AdhocTaskAgent: SystemInteractionCategory.non_applicable,\n Mediator: SystemInteractionCategory.non_applicable,\n AnalyzeConversation: SystemInteractionCategory.analysis,\n GetAgentConversationTopic: SystemInteractionCategory.analysis,\n StudioAssistant: SystemInteractionCategory.agent,\n};\n/**\n * Get category for a system interaction endpoint.\n * Returns undefined if category is non-applicable or endpoint is not recognized.\n * Note: Caller is responsible for determining if the interaction is a system interaction.\n * @param endpoint - The interaction endpoint name\n */\nexport function getSystemInteractionCategory(endpoint) {\n if (endpoint.startsWith('sys:')) {\n // Strip sys: prefix\n endpoint = endpoint.substring(4);\n }\n const category = SYSTEM_INTERACTION_CATEGORIES[endpoint];\n if (category === SystemInteractionCategory.non_applicable) {\n return undefined;\n }\n return category || undefined;\n}\nexport const BrowserUseProjectConfigurationSchema = {\n type: 'object',\n properties: {\n enabled: {\n type: 'boolean',\n nullable: true,\n description: 'Enable the browser_use workflow-level tool for this project. Defaults to true.',\n },\n default_policy: {\n type: 'string',\n nullable: true,\n enum: ['read_only', 'low_write', 'requires_approval', 'unrestricted'],\n description: 'Risk policy used when a browser_use call does not specify one. Defaults to low_write.',\n },\n max_policy: {\n type: 'string',\n nullable: true,\n enum: ['read_only', 'low_write', 'requires_approval', 'unrestricted'],\n description: 'Maximum risk policy a browser_use call may request. Defaults to unrestricted.',\n },\n allowed_hosts: {\n type: 'array',\n nullable: true,\n items: { type: 'string' },\n description: 'Optional project-wide host allowlist. When present, browser_use calls can only request hosts contained by this list.',\n },\n allow_file_uploads: {\n type: 'boolean',\n nullable: true,\n description: 'Allow replay scripts to hydrate artifacts/documents as files in the browser sandbox. Defaults to true.',\n },\n allow_playwright_scripts: {\n type: 'boolean',\n nullable: true,\n description: 'Allow browser_playwright_script in browser workstreams. Defaults to true.',\n },\n capture_screenshots: {\n type: 'string',\n nullable: true,\n enum: ['off', 'on_action', 'each_turn'],\n description: 'Persist browser screenshots for UI progress. Defaults to on_action.',\n },\n prefer_raw_screenshots: {\n type: 'boolean',\n nullable: true,\n description: 'Prefer unannotated screenshots in the browser-use UI widget. Defaults to true.',\n },\n },\n required: [],\n additionalProperties: false,\n};\n// export interface ProjectConfigurationEmbeddings {\n// environment: string;\n// max_tokens: number;\n// dimensions: number;\n// model?: string;\n// }\nexport var SupportedEmbeddingTypes;\n(function (SupportedEmbeddingTypes) {\n SupportedEmbeddingTypes[\"text\"] = \"text\";\n SupportedEmbeddingTypes[\"image\"] = \"image\";\n SupportedEmbeddingTypes[\"properties\"] = \"properties\";\n})(SupportedEmbeddingTypes || (SupportedEmbeddingTypes = {}));\nexport var FullTextType;\n(function (FullTextType) {\n FullTextType[\"full_text\"] = \"full_text\";\n})(FullTextType || (FullTextType = {}));\nexport const SearchTypes = {\n ...SupportedEmbeddingTypes,\n ...FullTextType,\n};\nexport const ProjectRefPopulate = 'id name account';\n/**\n * Auto-tunes shard sizing based on project doc count.\n *\n * Returns:\n * - shard_size: target docs per shard (workflow path uses this; zeno-bulk\n * computes shard count from total/shard_size).\n * - parallel_shard_count: max in-flight shard activities (workflow path only).\n * - max_shards: hard cap on shard count for the direct path. Direct path\n * passes this as `shards` to zeno-bulk so all shards run as cursors in\n * ONE process; without this cap, an under-estimated shard_size (e.g.\n * from stale estimatedDocumentCount) can spawn 10+ in-flight cursors\n * and exceed Cloud Run memory.\n *\n * Explicit overrides should bypass this function and use user-provided values.\n */\nexport function autoTuneReindexParams(docCount) {\n if (docCount < 50_000) {\n // Tiny/small project: aim for ~4 shards, with a 5k floor.\n return {\n shard_size: Math.max(Math.ceil(docCount / 4), 5_000),\n parallel_shard_count: Math.min(4, Math.max(1, Math.ceil(docCount / 5_000))),\n max_shards: 4,\n };\n }\n if (docCount < 500_000) {\n // Medium project: 50k shards → 1-10 shards\n return { shard_size: 50_000, parallel_shard_count: 8, max_shards: 10 };\n }\n if (docCount < 2_000_000) {\n // Large project: 100k shards → 5-20 shards\n return { shard_size: 100_000, parallel_shard_count: 8, max_shards: 20 };\n }\n // Huge project: stick to 250k shards to keep coordination overhead bounded.\n return { shard_size: 250_000, parallel_shard_count: 8, max_shards: 40 };\n}\n/**\n * Supported languages for full-text search with their display names.\n * Maps ISO 639-1 codes to human-readable language names.\n */\nexport const SUPPORTED_SEARCH_LANGUAGES = {\n en: 'English',\n zh: 'Chinese',\n es: 'Spanish',\n hi: 'Hindi',\n ar: 'Arabic',\n pt: 'Portuguese',\n bn: 'Bengali',\n ru: 'Russian',\n ja: 'Japanese',\n de: 'German',\n fr: 'French',\n ko: 'Korean',\n it: 'Italian',\n tr: 'Turkish',\n vi: 'Vietnamese',\n pl: 'Polish',\n uk: 'Ukrainian',\n nl: 'Dutch',\n th: 'Thai',\n el: 'Greek',\n cs: 'Czech',\n sv: 'Swedish',\n ro: 'Romanian',\n hu: 'Hungarian',\n da: 'Danish',\n fi: 'Finnish',\n no: 'Norwegian',\n he: 'Hebrew',\n id: 'Indonesian',\n fa: 'Persian',\n};\n//# sourceMappingURL=project.js.map","export var PromptStatus;\n(function (PromptStatus) {\n PromptStatus[\"draft\"] = \"draft\";\n PromptStatus[\"published\"] = \"published\";\n PromptStatus[\"archived\"] = \"archived\";\n})(PromptStatus || (PromptStatus = {}));\nexport var PromptSegmentDefType;\n(function (PromptSegmentDefType) {\n PromptSegmentDefType[\"chat\"] = \"chat\";\n PromptSegmentDefType[\"template\"] = \"template\";\n})(PromptSegmentDefType || (PromptSegmentDefType = {}));\nexport var TemplateType;\n(function (TemplateType) {\n TemplateType[\"jst\"] = \"jst\";\n TemplateType[\"handlebars\"] = \"handlebars\";\n TemplateType[\"text\"] = \"text\";\n})(TemplateType || (TemplateType = {}));\n//# sourceMappingURL=prompt.js.map","export var ResolvableRefType;\n(function (ResolvableRefType) {\n ResolvableRefType[\"project\"] = \"Project\";\n ResolvableRefType[\"projects\"] = \"Projects\";\n ResolvableRefType[\"environment\"] = \"Environment\";\n ResolvableRefType[\"user\"] = \"User\";\n ResolvableRefType[\"account\"] = \"Account\";\n ResolvableRefType[\"interaction\"] = \"Interaction\";\n ResolvableRefType[\"userGroup\"] = \"UserGroup\";\n})(ResolvableRefType || (ResolvableRefType = {}));\n//# sourceMappingURL=refs.js.map","import { Permission } from './access-control.js';\nimport { ProjectRoles } from './project.js';\nexport class Role {\n name;\n permissions;\n constructor(name, permissions) {\n this.name = name;\n this.permissions = new Set(permissions);\n }\n hasPermission(permission) {\n return this.permissions.has(permission);\n }\n}\nexport class RoleList {\n roles;\n constructor(roles) {\n this.roles = roles;\n }\n static fromRoleNames(roleNames) {\n const roles = roleNames.map((r) => getRoleByName(r));\n return new RoleList(roles);\n }\n static fromRoleName(roleName) {\n const roles = [getRoleByName(roleName)];\n return new RoleList(roles);\n }\n hasPermission(perm) {\n return this.roles.some((role) => role.hasPermission(perm));\n }\n}\nclass OrgMemberRole extends Role {\n name;\n constructor(name, permissions) {\n super(name, [Permission.account_member, ...permissions]);\n this.name = name;\n }\n}\nclass OwnerRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.owner, Object.values(Permission));\n }\n}\nclass AdminRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.admin, Object.values(Permission));\n }\n}\nclass ManagerRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.manager, Object.values(Permission));\n this.permissions.delete(Permission.account_admin);\n this.permissions.delete(Permission.manage_billing);\n this.permissions.delete(Permission.audit_read);\n this.permissions.delete(Permission.agent_run_read);\n this.permissions.delete(Permission.content_read_all);\n this.permissions.delete(Permission.content_superadmin);\n this.permissions.delete(Permission.workflow_superadmin);\n }\n}\nclass DeveloperRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.developer, Object.values(Permission));\n this.permissions.delete(Permission.account_admin);\n this.permissions.delete(Permission.project_admin);\n this.permissions.delete(Permission.project_settings_write);\n this.permissions.delete(Permission.env_admin);\n this.permissions.delete(Permission.manage_billing);\n this.permissions.delete(Permission.audit_read);\n this.permissions.delete(Permission.agent_run_read);\n this.permissions.delete(Permission.content_read_all);\n this.permissions.delete(Permission.content_superadmin);\n this.permissions.delete(Permission.workflow_superadmin);\n }\n}\nclass ApplicationRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.application, [\n Permission.int_read,\n Permission.int_execute,\n Permission.int_write,\n Permission.run_read,\n Permission.content_write,\n Permission.content_read,\n Permission.content_write,\n Permission.content_admin, // required for now as we need to create types\n Permission.project_admin,\n Permission.workflow_run,\n Permission.project_settings_write,\n Permission.account_write,\n ]);\n }\n}\nclass AutomationRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.automation, [\n Permission.content_read,\n Permission.content_write,\n Permission.content_admin,\n Permission.int_read,\n Permission.int_execute,\n Permission.run_read,\n Permission.workflow_run,\n Permission.project_integration_read,\n ]);\n }\n}\nclass ContentProcessorRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.content_processor, [\n Permission.content_read,\n Permission.content_write,\n Permission.content_admin,\n Permission.content_superadmin,\n Permission.int_execute,\n Permission.workflow_read,\n Permission.workflow_run,\n Permission.run_read,\n ]);\n }\n}\nclass ConsumerRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.consumer, [\n Permission.content_admin, // Temporary permission; micro apps will need to create types instead via user roles\n Permission.content_read,\n Permission.content_write,\n Permission.content_delete,\n Permission.int_read,\n Permission.int_execute,\n Permission.run_read,\n Permission.workflow_run,\n ]);\n }\n}\nclass ExecutorRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.executor, [Permission.int_execute, Permission.run_read, Permission.workflow_run]);\n }\n}\nclass ReaderRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.reader, [Permission.int_read, Permission.run_read, Permission.content_read]);\n }\n}\nconst READ_ONLY_AUDIT_PERMISSIONS = [\n Permission.studio_access,\n Permission.account_read,\n Permission.project_integration_read,\n Permission.api_key_read,\n Permission.billing_read,\n Permission.audit_read,\n Permission.int_read,\n Permission.run_read,\n Permission.content_read,\n Permission.content_read_all,\n Permission.task_read,\n Permission.workflow_read,\n Permission.agent_run_read,\n];\nclass ReadOnlyAuditRole extends OrgMemberRole {\n constructor(name) {\n super(name, READ_ONLY_AUDIT_PERMISSIONS);\n }\n}\nclass BillingRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.billing, [Permission.manage_billing]);\n }\n}\nclass AppMemberRole extends OrgMemberRole {\n constructor() {\n super(ProjectRoles.app_member, [\n Permission.int_read,\n Permission.int_execute,\n Permission.int_write,\n Permission.run_read,\n Permission.content_write,\n Permission.content_read,\n Permission.content_delete,\n Permission.workflow_run,\n ]);\n }\n}\nclass ContentSuperAdmin extends DeveloperRole {\n constructor() {\n super();\n this.name = ProjectRoles.content_superadmin;\n this.permissions.add(Permission.content_superadmin);\n }\n}\nconst roles = {\n [ProjectRoles.owner]: new OwnerRole(),\n [ProjectRoles.admin]: new AdminRole(),\n [ProjectRoles.manager]: new ManagerRole(),\n [ProjectRoles.developer]: new DeveloperRole(),\n [ProjectRoles.application]: new ApplicationRole(),\n [ProjectRoles.automation]: new AutomationRole(),\n [ProjectRoles.content_processor]: new ContentProcessorRole(),\n [ProjectRoles.consumer]: new ConsumerRole(),\n [ProjectRoles.executor]: new ExecutorRole(),\n [ProjectRoles.reader]: new ReaderRole(),\n [ProjectRoles.auditor]: new ReadOnlyAuditRole(ProjectRoles.auditor),\n [ProjectRoles.support]: new ReadOnlyAuditRole(ProjectRoles.support),\n [ProjectRoles.billing]: new BillingRole(),\n [ProjectRoles.app_member]: new AppMemberRole(),\n [ProjectRoles.member]: new OrgMemberRole(ProjectRoles.member, []),\n [ProjectRoles.content_superadmin]: new ContentSuperAdmin(),\n};\nexport function getRoleByName(name) {\n const role = roles[name];\n if (!role)\n throw new Error(`Role ${name} not found`);\n return role;\n}\nexport function listRoles() {\n return Object.values(roles);\n}\nexport function getPermissionsForRoles(roleNames) {\n const permissions = new Set();\n for (const roleName of roleNames) {\n const role = getRoleByName(roleName);\n for (const permission of role.permissions) {\n permissions.add(permission);\n }\n }\n return Array.from(permissions);\n}\n//# sourceMappingURL=roles.js.map","export var CollectionStatus;\n(function (CollectionStatus) {\n CollectionStatus[\"active\"] = \"active\";\n CollectionStatus[\"archived\"] = \"archived\";\n})(CollectionStatus || (CollectionStatus = {}));\n//# sourceMappingURL=collections.js.map","export function toolInputRefsArtifactPath(storageId) {\n return `agents/${storageId}/tool-input-refs.json`;\n}\n/**\n * Compute the storage ID for a conversation's artifacts.\n * - Root workflows: `{agent_run_id}` (or fallbackRunId if no agent_run_id)\n * - Workstreams: `{agent_run_id}/workstreams/{launch_id}`\n *\n * Both studio-server and workflow activities must use the same logic so\n * parent and child conversations don't overwrite each other.\n */\nexport function getConversationStorageId(state, fallbackRunId) {\n const baseId = state?.agent_run_id || fallbackRunId;\n if (state?.launch_id && state?.agent_run_id) {\n return `${baseId}/workstreams/${state.launch_id}`;\n }\n return baseId;\n}\n//# sourceMappingURL=conversation-state.js.map","export function withDSLWorkflowSpecDiscriminator(spec) {\n if ('steps' in spec && spec.steps) {\n return { ...spec, spec_format: 'steps' };\n }\n return { ...spec, spec_format: 'activities' };\n}\nexport const WorkflowDefinitionRefPopulate = 'id name description tags created_at updated_at';\n//# sourceMappingURL=dsl-workflow.js.map","export const RenditionSchema = {\n type: 'object',\n description: 'Represent a rendition of a file stored in an object. It will be stored as a separate object in the database.',\n properties: {\n mime_type: {\n type: 'string',\n description: 'The format of the rendition. This is a MIME type.',\n },\n source_etag: {\n type: 'string',\n description: 'The ETag of the file used for the rendition.',\n nullable: true,\n },\n height: {\n type: 'integer',\n description: 'The height of the rendition',\n nullable: true,\n },\n width: {\n type: 'integer',\n description: 'The width of the rendition',\n nullable: true,\n },\n multipart: {\n type: 'boolean',\n description: 'If the rendition is a multi-part rendition',\n nullable: true,\n default: false,\n },\n total_parts: {\n type: 'integer',\n description: 'The total number of parts in the rendition',\n nullable: true,\n },\n },\n required: ['mime_type'],\n};\nexport const DocumentPartSchema = {\n type: 'object',\n description: 'Represent a semantic chunk of a document',\n properties: {\n source_etag: {\n type: 'string',\n description: 'The ETag of the file used for the rendition.',\n nullable: true,\n },\n part_number: {\n type: 'integer',\n description: 'The part number of the chunk',\n },\n title: {\n type: 'string',\n description: 'The title of the chunk',\n nullable: true,\n },\n source_line_start: {\n type: 'integer',\n description: 'The line number where the chunk starts',\n nullable: true,\n },\n source_line_end: {\n type: 'integer',\n description: 'The line number where the chunk ends',\n nullable: true,\n },\n type: {\n type: 'string',\n description: 'The type of the chunk',\n enum: ['text', 'image', 'table', 'chart', 'diagram', 'code', 'other'],\n nullable: true,\n },\n page_number: {\n type: 'integer',\n description: 'The page number of the document part',\n nullable: true,\n },\n description: {\n type: 'string',\n description: \"The description of the document part, if it's an image, the exhaustive description of the image\",\n nullable: true,\n },\n height: {\n type: 'integer',\n description: 'The height of the rendition',\n nullable: true,\n },\n width: {\n type: 'integer',\n description: 'The width of the rendition',\n nullable: true,\n },\n },\n required: ['part_number'],\n};\n//# sourceMappingURL=object-types.js.map","export const PROCESS_DEFINITION_FORMAT_VERSION = 1;\n//# sourceMappingURL=process.js.map","export const PROCESS_DEFINITION_JSON_SCHEMA_ID = 'https://schemas.vertesia.com/process-definition.v1.schema.json';\nexport const ProcessDefinitionBodyJsonSchema = {\n $id: PROCESS_DEFINITION_JSON_SCHEMA_ID,\n type: 'object',\n description: 'A process definition describes a state-machine workflow executed by the Process Engine.',\n properties: {\n format_version: {\n type: 'integer',\n const: 1,\n description: 'Native process definition format version.',\n },\n process: {\n type: 'string',\n minLength: 1,\n description: 'Stable process code, for example invoice_approval.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Optional human-readable process description.',\n },\n initial: {\n type: 'string',\n minLength: 1,\n description: 'Initial node id. Semantic validation verifies this exists in nodes.',\n },\n model: {\n type: 'string',\n nullable: true,\n description: 'Optional default model for agent and interaction nodes.',\n },\n context: {\n $ref: '#/$defs/processContextDefinition',\n },\n nodes: {\n type: 'object',\n description: 'Map of node id to node definition.',\n minProperties: 1,\n required: [],\n additionalProperties: {\n $ref: '#/$defs/nodeDefinition',\n },\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['format_version', 'process', 'initial', 'context', 'nodes'],\n additionalProperties: false,\n $defs: {\n metadataDefinition: {\n type: 'object',\n nullable: true,\n description: 'Execution-irrelevant metadata such as editor layout, provenance, and audit hints.',\n required: [],\n additionalProperties: true,\n },\n processContextDefinition: {\n type: 'object',\n properties: {\n schema: {\n description: 'JSON Schema for the process context.',\n anyOf: [\n { type: 'boolean' },\n {\n type: 'object',\n additionalProperties: true,\n },\n ],\n },\n initial: {\n type: 'object',\n description: 'Initial context values.',\n required: [],\n additionalProperties: true,\n },\n },\n required: ['schema', 'initial'],\n additionalProperties: false,\n },\n nodeDefinition: {\n type: 'object',\n description: 'A state-machine node executed by the Process Engine.',\n properties: {\n type: {\n type: 'string',\n enum: [\n 'tool',\n 'interaction',\n 'agent',\n 'process',\n 'human_task',\n 'foreach',\n 'branch',\n 'condition',\n 'final',\n ],\n description: 'Node executor type.',\n },\n tool: {\n type: 'string',\n nullable: true,\n description: 'Builtin or remote tool name for tool nodes.',\n },\n interaction: {\n type: 'string',\n nullable: true,\n description: 'Interaction id or sys: interaction for interaction and agent nodes.',\n },\n process: {\n type: 'string',\n nullable: true,\n description: 'Stored child process id or process code for process nodes.',\n },\n process_definition: {\n $ref: '#',\n description: 'Inline child process definition for process nodes.',\n },\n process_version: {\n type: 'number',\n nullable: true,\n description: 'Stored child process version.',\n },\n run_type: {\n type: 'string',\n enum: ['supervised', 'programmatic'],\n nullable: true,\n description: 'Run type for child process nodes.',\n },\n returns: {\n $ref: '#/$defs/processNodeReturnsDefinition',\n },\n result_schema: {\n $ref: '#/$defs/jsonSchemaDefinition',\n description: 'Optional JSON Schema for structured output from interaction and agent nodes.',\n },\n prompt: {\n type: 'string',\n nullable: true,\n description: 'Prompt or instructions for agent and interaction nodes.',\n },\n input: {\n type: 'object',\n nullable: true,\n description: 'Node input template. Values may contain {{context_path}} placeholders.',\n required: [],\n additionalProperties: true,\n },\n config: {\n type: 'object',\n nullable: true,\n description: 'Executor-specific configuration.',\n required: [],\n additionalProperties: true,\n },\n title: {\n type: 'string',\n nullable: true,\n description: 'Short display title.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Developer-facing node description.',\n },\n human_description: {\n type: 'string',\n nullable: true,\n description: 'End-user-facing explanation of what this node does.',\n },\n writes: {\n type: 'array',\n nullable: true,\n description: 'Context paths this node may write.',\n items: { type: 'string' },\n },\n skippable: {\n type: 'boolean',\n nullable: true,\n description: 'Whether a supervisor may skip this node.',\n },\n max_retries: {\n type: 'number',\n nullable: true,\n description: 'Maximum node retry attempts.',\n },\n transitions: {\n type: 'array',\n nullable: true,\n description: 'Outgoing transitions. Semantic validation verifies targets exist.',\n items: { $ref: '#/$defs/transitionDefinition' },\n },\n tools: {\n type: 'array',\n nullable: true,\n description: 'Additional tool names available to an agent node.',\n items: { type: 'string' },\n },\n model: {\n type: 'string',\n nullable: true,\n description: 'Model override for this node.',\n },\n task: {\n $ref: '#/$defs/humanTaskDefinition',\n },\n foreach: {\n type: 'string',\n nullable: true,\n description: 'Context path to an array for foreach nodes.',\n },\n as: {\n type: 'string',\n nullable: true,\n description: 'Variable name for the current foreach item. Defaults to item.',\n },\n item_id: {\n type: 'string',\n nullable: true,\n description: 'Template for a stable item id in foreach collection output.',\n },\n node: {\n $ref: '#/$defs/nodeDefinition',\n description: 'Child node executed for each foreach item or branch child definition.',\n },\n max_concurrency: {\n type: 'integer',\n minimum: 1,\n nullable: true,\n description: 'Maximum concurrent child executions for foreach nodes.',\n },\n collect: {\n description: 'Where and how to collect foreach or branch results.',\n oneOf: [{ type: 'string', minLength: 1 }, { $ref: '#/$defs/parallelCollectDefinition' }],\n },\n failure_policy: {\n type: 'string',\n enum: ['fail_fast', 'collect_errors'],\n nullable: true,\n description: 'Foreach or branch failure policy.',\n },\n join: {\n type: 'string',\n enum: ['all'],\n nullable: true,\n description: 'Branch join policy.',\n },\n branches: {\n type: 'array',\n nullable: true,\n description: 'Condition or branch-node branches. Semantic validation verifies the type-specific shape.',\n items: {\n oneOf: [{ $ref: '#/$defs/branchDefinition' }, { $ref: '#/$defs/branchNodeBranchDefinition' }],\n },\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['type'],\n additionalProperties: false,\n },\n transitionDefinition: {\n type: 'object',\n properties: {\n to: {\n type: 'string',\n minLength: 1,\n description: 'Target node id.',\n },\n guard: {\n $ref: '#/$defs/jsonLogicRule',\n description: 'JSON Logic guard evaluated before transition.',\n },\n trigger: {\n type: 'string',\n enum: ['auto', 'agent', 'user'],\n nullable: true,\n description: 'Transition trigger. Omitted means auto.',\n },\n label: {\n type: 'string',\n nullable: true,\n description: 'Display label.',\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['to'],\n additionalProperties: false,\n },\n branchDefinition: {\n type: 'object',\n properties: {\n to: {\n type: 'string',\n minLength: 1,\n description: 'Target node id.',\n },\n when: {\n $ref: '#/$defs/jsonLogicRule',\n description: 'JSON Logic condition for this branch.',\n },\n default: {\n type: 'boolean',\n nullable: true,\n description: 'Fallback branch used when no condition matches.',\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['to'],\n additionalProperties: false,\n },\n branchNodeBranchDefinition: {\n type: 'object',\n properties: {\n id: {\n type: 'string',\n minLength: 1,\n description: 'Stable branch id.',\n },\n title: {\n type: 'string',\n nullable: true,\n description: 'Optional branch title.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Optional branch description.',\n },\n node: {\n $ref: '#/$defs/nodeDefinition',\n description: 'Child node executed for this branch.',\n },\n metadata: {\n $ref: '#/$defs/metadataDefinition',\n },\n },\n required: ['id', 'node'],\n additionalProperties: false,\n },\n humanTaskDefinition: {\n type: 'object',\n properties: {\n title: {\n type: 'string',\n minLength: 1,\n description: 'Task title shown in the inbox.',\n },\n description: {\n type: 'string',\n nullable: true,\n description: 'Task instructions shown to the assignee.',\n },\n assignee: {\n type: 'string',\n nullable: true,\n description: 'User id or group:<name> assignee reference.',\n },\n fields: {\n type: 'array',\n description: 'Fields required to complete the task.',\n items: { $ref: '#/$defs/taskField' },\n },\n },\n required: ['title', 'fields'],\n additionalProperties: false,\n },\n taskField: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n minLength: 1,\n description: 'Context/result field name.',\n },\n type: {\n type: 'string',\n enum: ['string', 'number', 'boolean', 'select', 'text'],\n description: 'Input field type.',\n },\n required: {\n type: 'boolean',\n nullable: true,\n description: 'Whether the field must be answered.',\n },\n label: {\n type: 'string',\n nullable: true,\n description: 'Display label.',\n },\n options: {\n type: 'array',\n nullable: true,\n description: 'Allowed options for select fields.',\n items: { type: 'string' },\n },\n default: {\n description: 'Default field value.',\n },\n },\n required: ['name', 'type'],\n additionalProperties: false,\n },\n processNodeReturnsDefinition: {\n type: 'object',\n properties: {\n from: {\n type: 'string',\n nullable: true,\n description: 'Path to read from child state or context.',\n },\n context: {\n type: 'array',\n nullable: true,\n description: 'Child context paths to return.',\n items: { type: 'string' },\n },\n },\n required: [],\n additionalProperties: false,\n },\n parallelCollectDefinition: {\n type: 'object',\n properties: {\n into: {\n type: 'string',\n minLength: 1,\n description: 'Context key receiving collected results.',\n },\n mode: {\n type: 'string',\n enum: ['array'],\n nullable: true,\n description: 'Collection mode.',\n },\n include: {\n type: 'array',\n nullable: true,\n description: 'Fields included in each collected item.',\n items: {\n type: 'string',\n enum: [\n 'status',\n 'index',\n 'item',\n 'item_id',\n 'branch_id',\n 'branch_title',\n 'output',\n 'context_update',\n 'error',\n 'child_run_id',\n 'child_workflow_id',\n 'child_workflow_run_id',\n ],\n },\n },\n },\n required: ['into'],\n additionalProperties: false,\n },\n jsonLogicRule: {\n type: 'object',\n description: 'JSON Logic expression.',\n required: [],\n additionalProperties: true,\n },\n jsonSchemaDefinition: {\n type: 'object',\n nullable: true,\n description: 'JSON Schema object.',\n required: [],\n additionalProperties: true,\n },\n },\n};\n//# sourceMappingURL=process-schema.js.map","import { PROCESS_DEFINITION_FORMAT_VERSION, } from './process.js';\nexport function getProcessInteractionValidationSelectors(interactions) {\n const selectors = new Set();\n for (const interaction of interactions) {\n selectors.add(interaction.id);\n selectors.add(interaction.name);\n if (interaction.type === 'sys') {\n selectors.add(`sys:${interaction.name}`);\n }\n if (interaction.type === 'app' && !interaction.id.startsWith('app:')) {\n selectors.add(`app:${interaction.id}`);\n }\n if (interaction.type === 'stored' || interaction.type === 'draft') {\n selectors.add(`${interaction.name}@draft`);\n selectors.add(`${interaction.id}@draft`);\n if (typeof interaction.version === 'number') {\n selectors.add(`${interaction.name}@${interaction.version}`);\n selectors.add(`${interaction.id}@${interaction.version}`);\n }\n }\n }\n return [...selectors];\n}\nexport const MAX_PROCESS_DEFINITION_BYTES = 1024 * 1024;\nexport const MAX_PROCESS_GUARD_DEPTH = 64;\nexport const MAX_PROCESS_GUARD_NODES = 4096;\nexport function validateProcessDefinitionBody(definition, options = {}) {\n const result = getProcessDefinitionValidationResult(definition, options);\n if (!result.valid) {\n throw new Error(result.errors.join('; '));\n }\n}\nexport function getProcessDefinitionValidationResult(definition, options = {}) {\n const errors = [];\n const context = createValidationContext(options);\n const size = new TextEncoder().encode(JSON.stringify(definition)).length;\n if (size > MAX_PROCESS_DEFINITION_BYTES) {\n errors.push(`process definition exceeds ${MAX_PROCESS_DEFINITION_BYTES} bytes`);\n }\n if (!definition.process) {\n errors.push('process is missing');\n }\n if (definition.format_version !== PROCESS_DEFINITION_FORMAT_VERSION) {\n errors.push(`format_version must be ${PROCESS_DEFINITION_FORMAT_VERSION}`);\n }\n if (!definition.initial) {\n errors.push('initial node is missing');\n }\n if (!definition.nodes || Object.keys(definition.nodes).length === 0) {\n errors.push('nodes are missing');\n }\n else if (definition.initial && !definition.nodes[definition.initial]) {\n errors.push(`initial node \"${definition.initial}\" does not exist`);\n }\n if (!definition.context?.schema) {\n errors.push('context.schema is missing');\n }\n if (!definition.context?.initial) {\n errors.push('context.initial is missing');\n }\n for (const [nodeId, node] of Object.entries(definition.nodes ?? {})) {\n validateNodeDefinition(definition, nodeId, node, errors, context);\n }\n return {\n valid: errors.length === 0,\n errors,\n };\n}\nfunction validateNodeDefinition(definition, nodeId, node, errors, context) {\n if (!isProcessNodeType(node.type)) {\n errors.push(`node \"${nodeId}\" has invalid type \"${String(node.type)}\"`);\n }\n if (node.type === 'human_task') {\n if (!node.task) {\n errors.push(`human_task node \"${nodeId}\" is missing task`);\n }\n else if (!node.task.title) {\n errors.push(`human_task node \"${nodeId}\" task title is missing`);\n }\n else if (!Array.isArray(node.task.fields)) {\n errors.push(`human_task node \"${nodeId}\" task fields must be an array`);\n }\n }\n if (node.type === 'tool') {\n validateToolNodeDefinition(nodeId, node, errors, context);\n }\n if ((node.type === 'interaction' || node.type === 'agent') && node.interaction && context.knownInteractions) {\n if (!isKnownSelector(node.interaction, context.knownInteractions)) {\n errors.push(`${node.type} node \"${nodeId}\" references unknown interaction \"${node.interaction}\"`);\n }\n }\n if ((node.type === 'interaction' || node.type === 'agent') &&\n node.result_schema !== undefined &&\n !isRecord(node.result_schema)) {\n errors.push(`${node.type} node \"${nodeId}\" result_schema must be a JSON Schema object`);\n }\n if (node.type === 'process') {\n if (!node.process && !node.process_definition) {\n errors.push(`process node \"${nodeId}\" is missing process or process_definition`);\n }\n if (node.run_type && !isProcessNodeRunType(node.run_type)) {\n errors.push(`process node \"${nodeId}\" has invalid run_type \"${String(node.run_type)}\"`);\n }\n if (node.returns?.from !== undefined && typeof node.returns.from !== 'string') {\n errors.push(`process node \"${nodeId}\" returns.from must be a string`);\n }\n if (node.returns?.context !== undefined && !isStringArray(node.returns.context)) {\n errors.push(`process node \"${nodeId}\" returns.context must be an array of strings`);\n }\n if (node.process_definition) {\n const childResult = getProcessDefinitionValidationResult(node.process_definition, context.options);\n for (const error of childResult.errors) {\n errors.push(`process node \"${nodeId}\" process_definition: ${error}`);\n }\n }\n }\n if (node.type === 'foreach') {\n if (!node.foreach) {\n errors.push(`foreach node \"${nodeId}\" is missing foreach`);\n }\n if (!node.node) {\n errors.push(`foreach node \"${nodeId}\" is missing node`);\n }\n if (node.max_concurrency !== undefined &&\n (!Number.isInteger(node.max_concurrency) || node.max_concurrency < 1)) {\n errors.push(`foreach node \"${nodeId}\" max_concurrency must be a positive integer`);\n }\n if (node.item_id !== undefined && typeof node.item_id !== 'string') {\n errors.push(`foreach node \"${nodeId}\" item_id must be a string`);\n }\n validateCollectDefinition('foreach', nodeId, node.collect, errors);\n if (node.node) {\n validateFanoutChildNodeDefinition(definition, {\n ownerLabel: `foreach node \"${nodeId}\"`,\n childPath: `${nodeId}.node`,\n childLabel: `foreach node \"${nodeId}\" child node`,\n child: node.node,\n }, errors, context);\n }\n }\n if (node.type === 'branch') {\n if (!Array.isArray(node.branches) || node.branches.length === 0) {\n errors.push(`branch node \"${nodeId}\" must define at least one branch`);\n }\n if (node.join !== undefined && node.join !== 'all') {\n errors.push(`branch node \"${nodeId}\" join must be \"all\"`);\n }\n validateCollectDefinition('branch', nodeId, node.collect, errors);\n const branches = getBranchNodeBranches(node);\n const seenIds = new Set();\n for (const [index, branch] of branches.entries()) {\n if (!branch.id) {\n errors.push(`branch node \"${nodeId}\" branch at index ${index} is missing id`);\n }\n else if (seenIds.has(branch.id)) {\n errors.push(`branch node \"${nodeId}\" has duplicate branch id \"${branch.id}\"`);\n }\n else {\n seenIds.add(branch.id);\n }\n if (!branch.node) {\n errors.push(`branch node \"${nodeId}\" branch \"${branch.id || index}\" is missing node`);\n continue;\n }\n validateFanoutChildNodeDefinition(definition, {\n ownerLabel: `branch node \"${nodeId}\" branch \"${branch.id || index}\"`,\n childPath: `${nodeId}.branches.${index}.node`,\n childLabel: `branch node \"${nodeId}\" branch \"${branch.id || index}\" child node`,\n child: branch.node,\n }, errors, context);\n }\n }\n if (node.failure_policy && !isParallelFailurePolicy(node.failure_policy)) {\n errors.push(`node \"${nodeId}\" has invalid failure_policy \"${String(node.failure_policy)}\"`);\n }\n for (const transition of node.transitions ?? []) {\n if (!definition.nodes[transition.to]) {\n errors.push(`node \"${nodeId}\" has transition to \"${transition.to}\" which does not exist`);\n }\n if (transition.trigger && !isTransitionTrigger(transition.trigger)) {\n errors.push(`node \"${nodeId}\" has invalid transition trigger \"${transition.trigger}\"`);\n }\n if (typeof transition.guard === 'string') {\n errors.push(`node \"${nodeId}\" transition to \"${transition.to}\" guard must be a JSON Logic object`);\n }\n else if (transition.guard) {\n validateGuardRule(`node \"${nodeId}\" transition to \"${transition.to}\" guard`, transition.guard, errors);\n }\n }\n for (const [index, branch] of getConditionBranches(node).entries()) {\n if (hasStringConditionProperty(branch, 'condition')) {\n errors.push(`node \"${nodeId}\" branch at index ${index} uses string condition; use JSON Logic in \"when\" instead`);\n }\n if (hasStringConditionProperty(branch, 'guard')) {\n errors.push(`node \"${nodeId}\" branch at index ${index} uses string guard; use JSON Logic in \"when\" instead`);\n }\n if (!definition.nodes[branch.to]) {\n errors.push(`node \"${nodeId}\" has branch to \"${branch.to}\" which does not exist`);\n }\n if (typeof branch.when === 'string') {\n errors.push(`node \"${nodeId}\" branch to \"${branch.to}\" when must be a JSON Logic object`);\n }\n else if (branch.when) {\n validateGuardRule(`node \"${nodeId}\" branch to \"${branch.to}\" guard`, branch.when, errors);\n }\n }\n}\nfunction createValidationContext(options) {\n return {\n options,\n knownTools: options.knownTools ? new Set(options.knownTools) : undefined,\n knownInteractions: options.knownInteractions ? new Set(options.knownInteractions) : undefined,\n };\n}\nfunction validateToolNodeDefinition(nodeId, node, errors, context) {\n if (!node.tool) {\n errors.push(`tool node \"${nodeId}\" is missing tool`);\n return;\n }\n if (context.knownTools && !context.knownTools.has(node.tool)) {\n errors.push(`tool node \"${nodeId}\" references unknown tool \"${node.tool}\"`);\n }\n if (node.tool === 'set_context') {\n validateSetContextNode(nodeId, node, errors);\n }\n}\nfunction validateSetContextNode(nodeId, node, errors) {\n const input = node.input;\n if (!isRecord(input)) {\n errors.push(`tool node \"${nodeId}\" set_context input must be an object`);\n return;\n }\n for (const key of Object.keys(input)) {\n if (key !== 'updates' && key !== 'reason' && key !== 'event_id') {\n errors.push(`tool node \"${nodeId}\" set_context input has unsupported property \"${key}\"`);\n }\n }\n if (!isRecord(input.updates)) {\n errors.push(`tool node \"${nodeId}\" set_context input.updates must be an object`);\n return;\n }\n if (input.reason !== undefined && typeof input.reason !== 'string') {\n errors.push(`tool node \"${nodeId}\" set_context input.reason must be a string`);\n }\n if (input.event_id !== undefined && typeof input.event_id !== 'string') {\n errors.push(`tool node \"${nodeId}\" set_context input.event_id must be a string`);\n }\n validateSetContextWrites(nodeId, node, input.updates, errors);\n}\nfunction validateSetContextWrites(nodeId, node, updates, errors) {\n const updateKeys = Object.keys(updates);\n if (updateKeys.length === 0) {\n return;\n }\n if (!Array.isArray(node.writes) || node.writes.length === 0) {\n errors.push(`tool node \"${nodeId}\" set_context updates require declared writes`);\n return;\n }\n for (const key of updateKeys) {\n if (key.startsWith('_')) {\n errors.push(`tool node \"${nodeId}\" set_context cannot write reserved context field \"${key}\"`);\n }\n if (!isWriteAllowed(key, node.writes)) {\n errors.push(`tool node \"${nodeId}\" set_context updates \"${key}\" but writes does not allow it`);\n }\n }\n}\nfunction isWriteAllowed(key, writes) {\n return writes.some((write) => key === write || key.startsWith(`${write}.`));\n}\nfunction isKnownSelector(selector, knownSelectors) {\n if (knownSelectors.has(selector)) {\n return true;\n }\n if (!selector.includes('@')) {\n return false;\n }\n return knownSelectors.has(selector.slice(0, selector.lastIndexOf('@')));\n}\nfunction hasStringConditionProperty(value, key) {\n return isRecord(value) && typeof value[key] === 'string';\n}\nfunction isProcessNodeType(value) {\n return (value === 'tool' ||\n value === 'interaction' ||\n value === 'agent' ||\n value === 'process' ||\n value === 'human_task' ||\n value === 'foreach' ||\n value === 'branch' ||\n value === 'condition' ||\n value === 'final');\n}\nfunction isProcessNodeRunType(value) {\n return value === 'supervised' || value === 'programmatic';\n}\nfunction isTransitionTrigger(value) {\n return value === 'auto' || value === 'agent' || value === 'user';\n}\nfunction isParallelFailurePolicy(value) {\n return value === 'fail_fast' || value === 'collect_errors';\n}\nfunction isFanoutChildNodeType(value) {\n return value === 'tool' || value === 'interaction' || value === 'agent' || value === 'process';\n}\nfunction validateFanoutChildNodeDefinition(definition, input, errors, context) {\n const { ownerLabel, childPath, childLabel, child } = input;\n if (!isFanoutChildNodeType(child.type)) {\n errors.push(`${ownerLabel} has unsupported child node type \"${String(child.type)}\"`);\n return;\n }\n if ((child.transitions ?? []).length > 0) {\n errors.push(`${childLabel} must not define transitions`);\n }\n if ((child.branches ?? []).length > 0) {\n errors.push(`${childLabel} must not define branches`);\n }\n validateNodeDefinition(definition, childPath, {\n ...child,\n transitions: undefined,\n branches: undefined,\n }, errors, context);\n}\nfunction validateCollectDefinition(nodeKind, nodeId, collect, errors) {\n if (collect === undefined) {\n return;\n }\n if (typeof collect === 'string') {\n if (!collect) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect must not be empty`);\n }\n return;\n }\n if (!isRecord(collect)) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect must be a string or object`);\n return;\n }\n if (typeof collect.into !== 'string' || !collect.into) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.into is required`);\n }\n if (collect.mode !== undefined && collect.mode !== 'array') {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.mode must be \"array\"`);\n }\n if (collect.include !== undefined) {\n if (!Array.isArray(collect.include)) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.include must be an array`);\n return;\n }\n for (const field of collect.include) {\n if (typeof field !== 'string' || !isParallelCollectField(field)) {\n errors.push(`${nodeKind} node \"${nodeId}\" collect.include has invalid field \"${String(field)}\"`);\n }\n }\n }\n}\nfunction isParallelCollectField(value) {\n return (value === 'status' ||\n value === 'index' ||\n value === 'item' ||\n value === 'item_id' ||\n value === 'branch_id' ||\n value === 'branch_title' ||\n value === 'output' ||\n value === 'context_update' ||\n value === 'error' ||\n value === 'child_run_id' ||\n value === 'child_workflow_id' ||\n value === 'child_workflow_run_id');\n}\nfunction isStringArray(value) {\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n}\nfunction validateGuardRule(label, rule, errors) {\n const result = inspectGuardRule(rule);\n if (result.depth > MAX_PROCESS_GUARD_DEPTH) {\n errors.push(`${label} exceeds maximum depth ${MAX_PROCESS_GUARD_DEPTH}`);\n }\n if (result.nodes > MAX_PROCESS_GUARD_NODES) {\n errors.push(`${label} exceeds maximum node count ${MAX_PROCESS_GUARD_NODES}`);\n }\n}\nfunction inspectGuardRule(rule) {\n let maxDepth = 0;\n let nodes = 0;\n const stack = [{ value: rule, depth: 1 }];\n while (stack.length > 0) {\n const next = stack.pop();\n if (!next) {\n continue;\n }\n nodes += 1;\n maxDepth = Math.max(maxDepth, next.depth);\n if (nodes > MAX_PROCESS_GUARD_NODES || maxDepth > MAX_PROCESS_GUARD_DEPTH) {\n break;\n }\n if (Array.isArray(next.value)) {\n for (const item of next.value) {\n stack.push({ value: item, depth: next.depth + 1 });\n }\n }\n else if (isRecord(next.value)) {\n for (const value of Object.values(next.value)) {\n stack.push({ value, depth: next.depth + 1 });\n }\n }\n }\n return { depth: maxDepth, nodes };\n}\nfunction isRecord(value) {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value);\n}\nfunction getConditionBranches(node) {\n return node.type === 'condition' && Array.isArray(node.branches)\n ? node.branches.filter(isConditionBranchDefinition)\n : [];\n}\nfunction getBranchNodeBranches(node) {\n return node.type === 'branch' && Array.isArray(node.branches)\n ? node.branches.filter(isBranchNodeBranchDefinition)\n : [];\n}\nfunction isConditionBranchDefinition(branch) {\n return 'to' in branch;\n}\nfunction isBranchNodeBranchDefinition(branch) {\n return 'node' in branch;\n}\n//# sourceMappingURL=process-validation.js.map","export var ContentEventName;\n(function (ContentEventName) {\n ContentEventName[\"create\"] = \"create\";\n ContentEventName[\"change_type\"] = \"change_type\";\n ContentEventName[\"update\"] = \"update\";\n ContentEventName[\"revision_created\"] = \"revision_created\";\n ContentEventName[\"delete\"] = \"delete\";\n ContentEventName[\"workflow_finished\"] = \"workflow_finished\";\n ContentEventName[\"workflow_execution_request\"] = \"workflow_execution_request\";\n ContentEventName[\"api_request\"] = \"api_request\";\n})(ContentEventName || (ContentEventName = {}));\nexport function getDocumentIds(payload) {\n // Check new input format first\n if (payload.input?.inputType === 'objectIds') {\n return payload.input.objectIds;\n }\n // Fall back to legacy objectIds field\n if (payload.objectIds) {\n return payload.objectIds;\n }\n return [];\n}\n// Task status enum for processed history\nexport var TaskStatus;\n(function (TaskStatus) {\n TaskStatus[\"SCHEDULED\"] = \"scheduled\";\n TaskStatus[\"RUNNING\"] = \"running\";\n TaskStatus[\"COMPLETED\"] = \"completed\";\n TaskStatus[\"FAILED\"] = \"failed\";\n TaskStatus[\"CANCELED\"] = \"canceled\";\n TaskStatus[\"TIMED_OUT\"] = \"timed_out\";\n TaskStatus[\"TERMINATED\"] = \"terminated\";\n TaskStatus[\"SENT\"] = \"sent\";\n TaskStatus[\"RECEIVED\"] = \"received\";\n})(TaskStatus || (TaskStatus = {}));\n// Task type enum\nexport var TaskType;\n(function (TaskType) {\n TaskType[\"ACTIVITY\"] = \"activity\";\n TaskType[\"CHILD_WORKFLOW\"] = \"childWorkflow\";\n TaskType[\"SIGNAL\"] = \"signal\";\n TaskType[\"TIMER\"] = \"timer\";\n})(TaskType || (TaskType = {}));\nexport var WorkflowExecutionStatus;\n(function (WorkflowExecutionStatus) {\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"RUNNING\"] = 1] = \"RUNNING\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"COMPLETED\"] = 2] = \"COMPLETED\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"FAILED\"] = 3] = \"FAILED\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"CANCELED\"] = 4] = \"CANCELED\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"TERMINATED\"] = 5] = \"TERMINATED\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"CONTINUED_AS_NEW\"] = 6] = \"CONTINUED_AS_NEW\";\n WorkflowExecutionStatus[WorkflowExecutionStatus[\"TIMED_OUT\"] = 7] = \"TIMED_OUT\";\n})(WorkflowExecutionStatus || (WorkflowExecutionStatus = {}));\nexport var AgentMessageType;\n(function (AgentMessageType) {\n AgentMessageType[AgentMessageType[\"SYSTEM\"] = 0] = \"SYSTEM\";\n AgentMessageType[AgentMessageType[\"THOUGHT\"] = 1] = \"THOUGHT\";\n AgentMessageType[AgentMessageType[\"PLAN\"] = 2] = \"PLAN\";\n AgentMessageType[AgentMessageType[\"UPDATE\"] = 3] = \"UPDATE\";\n AgentMessageType[AgentMessageType[\"COMPLETE\"] = 4] = \"COMPLETE\";\n AgentMessageType[AgentMessageType[\"WARNING\"] = 5] = \"WARNING\";\n AgentMessageType[AgentMessageType[\"ERROR\"] = 6] = \"ERROR\";\n AgentMessageType[AgentMessageType[\"ANSWER\"] = 7] = \"ANSWER\";\n AgentMessageType[AgentMessageType[\"QUESTION\"] = 8] = \"QUESTION\";\n AgentMessageType[AgentMessageType[\"REQUEST_INPUT\"] = 9] = \"REQUEST_INPUT\";\n AgentMessageType[AgentMessageType[\"IDLE\"] = 10] = \"IDLE\";\n AgentMessageType[AgentMessageType[\"TERMINATED\"] = 11] = \"TERMINATED\";\n AgentMessageType[AgentMessageType[\"STREAMING_CHUNK\"] = 12] = \"STREAMING_CHUNK\";\n AgentMessageType[AgentMessageType[\"BATCH_PROGRESS\"] = 13] = \"BATCH_PROGRESS\";\n AgentMessageType[AgentMessageType[\"RESTARTING\"] = 14] = \"RESTARTING\";\n})(AgentMessageType || (AgentMessageType = {}));\n// Type guards — check both message type and details shape for safety\nexport function isToolCallMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.THOUGHT &&\n !!details &&\n typeof details === 'object' &&\n typeof details.tool === 'string');\n}\nexport function isDocumentEventMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.UPDATE &&\n !!details &&\n typeof details === 'object' &&\n (details.event_class === 'document_created' || details.event_class === 'document_updated') &&\n typeof details.document_id === 'string');\n}\nexport function isFileProcessingMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.SYSTEM &&\n !!details &&\n typeof details === 'object' &&\n details.system_type === 'file_processing' &&\n Array.isArray(details.files));\n}\nexport function isPlanMessage(msg) {\n const details = msg.details;\n return (msg.type === AgentMessageType.PLAN && !!details && typeof details === 'object' && Array.isArray(details.plan));\n}\nexport function isRequestInputMessage(msg) {\n return msg.type === AgentMessageType.REQUEST_INPUT && !!msg.details && typeof msg.details === 'object';\n}\n// ============================================\n// TYPE GUARDS\n// ============================================\n/**\n * Check if a message is in compact format\n */\nexport function isCompactMessage(msg) {\n return typeof msg === 'object' && msg !== null && 't' in msg;\n}\n/**\n * Check if a message is in legacy format\n */\nexport function isLegacyMessage(msg) {\n return typeof msg === 'object' && msg !== null && 'type' in msg && !('t' in msg);\n}\n// ============================================\n// CONVERTERS\n// ============================================\n/**\n * Map old string enum values to AgentMessageType\n */\nconst STRING_TO_TYPE_MAP = {\n system: AgentMessageType.SYSTEM,\n thought: AgentMessageType.THOUGHT,\n plan: AgentMessageType.PLAN,\n update: AgentMessageType.UPDATE,\n complete: AgentMessageType.COMPLETE,\n warning: AgentMessageType.WARNING,\n error: AgentMessageType.ERROR,\n answer: AgentMessageType.ANSWER,\n question: AgentMessageType.QUESTION,\n request_input: AgentMessageType.REQUEST_INPUT,\n idle: AgentMessageType.IDLE,\n terminated: AgentMessageType.TERMINATED,\n streaming_chunk: AgentMessageType.STREAMING_CHUNK,\n batch_progress: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Map integer values to AgentMessageType (primary format)\n */\nconst INT_TO_TYPE_MAP = {\n 0: AgentMessageType.SYSTEM,\n 1: AgentMessageType.THOUGHT,\n 2: AgentMessageType.PLAN,\n 3: AgentMessageType.UPDATE,\n 4: AgentMessageType.COMPLETE,\n 5: AgentMessageType.WARNING,\n 6: AgentMessageType.ERROR,\n 7: AgentMessageType.ANSWER,\n 8: AgentMessageType.QUESTION,\n 9: AgentMessageType.REQUEST_INPUT,\n 10: AgentMessageType.IDLE,\n 11: AgentMessageType.TERMINATED,\n 12: AgentMessageType.STREAMING_CHUNK,\n 13: AgentMessageType.BATCH_PROGRESS,\n};\n/**\n * Normalize message type from string or number to AgentMessageType\n */\nexport function normalizeMessageType(type) {\n // Handle integer type (current format and AgentMessageType enum values)\n if (typeof type === 'number') {\n return INT_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n // Handle string type (legacy messages from Redis with 90-day TTL)\n if (typeof type === 'string') {\n return STRING_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;\n }\n return AgentMessageType.UPDATE;\n}\n/**\n * Convert legacy AgentMessage to CompactMessage\n */\nexport function toCompactMessage(legacy) {\n const compact = {\n t: normalizeMessageType(legacy.type),\n };\n if (legacy.message)\n compact.m = legacy.message;\n if (legacy.workstream_id && legacy.workstream_id !== 'main')\n compact.w = legacy.workstream_id;\n if (legacy.timestamp)\n compact.ts = legacy.timestamp;\n // Handle legacy streaming chunk details\n if (compact.t === AgentMessageType.STREAMING_CHUNK && legacy.details) {\n const d = legacy.details;\n if (d.is_final)\n compact.f = 1;\n // streaming_id and chunk_index are no longer needed\n }\n else if (legacy.details) {\n compact.d = legacy.details;\n }\n return compact;\n}\n/**\n * Parse any message format (compact or legacy) into CompactMessage.\n * Use this as the entry point for all received messages.\n */\nexport function parseMessage(data) {\n const parsed = typeof data === 'string' ? JSON.parse(data) : data;\n if (isCompactMessage(parsed))\n return parsed;\n if (isLegacyMessage(parsed))\n return toCompactMessage(parsed);\n throw new Error('Unknown message format');\n}\n/**\n * Create a compact message (convenience function for server-side)\n */\nexport function createCompactMessage(type, options = {}) {\n const compact = { t: type };\n if (options.message)\n compact.m = options.message;\n if (options.workstreamId && options.workstreamId !== 'main')\n compact.w = options.workstreamId;\n if (options.details)\n compact.d = options.details;\n if (options.isFinal)\n compact.f = 1;\n if (options.timestamp)\n compact.ts = options.timestamp;\n return compact;\n}\n/**\n * Convert CompactMessage back to AgentMessage (for UI components).\n * This allows UI to continue using familiar field names while wire format is compact.\n * @param compact The compact message to convert\n * @param workflowRunId Optional workflow_run_id (known from SSE context, not in compact format)\n */\nexport function toAgentMessage(compact, workflowRunId = '') {\n const message = {\n type: compact.t,\n timestamp: compact.ts || Date.now(),\n workflow_run_id: workflowRunId,\n message: compact.m || '',\n workstream_id: compact.w || 'main',\n };\n if (compact.d !== undefined && compact.d !== null)\n message.details = compact.d;\n // For streaming chunks, restore is_final and streaming_id in details\n // (streaming_id removed from wire format, use workstream_id as grouping key)\n if (compact.t === AgentMessageType.STREAMING_CHUNK) {\n message.details = {\n ...(typeof compact.d === 'object' ? compact.d : {}),\n streaming_id: compact.w || 'main', // Use workstream_id as streaming_id\n is_final: compact.f === 1,\n activity_id: compact.i, // For deduplication with final THOUGHT/ANSWER\n };\n }\n return message;\n}\n/**\n * Status of a file being processed for conversation use.\n */\nexport var FileProcessingStatus;\n(function (FileProcessingStatus) {\n /** File is being uploaded to artifact storage */\n FileProcessingStatus[\"UPLOADING\"] = \"uploading\";\n /** File uploaded, text extraction in progress */\n FileProcessingStatus[\"PROCESSING\"] = \"processing\";\n /** File is ready for use in conversation */\n FileProcessingStatus[\"READY\"] = \"ready\";\n /** File processing failed */\n FileProcessingStatus[\"ERROR\"] = \"error\";\n})(FileProcessingStatus || (FileProcessingStatus = {}));\n/**\n * Get the Redis pub/sub channel name for workflow messages.\n * Used by both publishers (workflow activities, studio-server) and subscribers (zeno-server, clients).\n * @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)\n */\nexport function getWorkflowChannel(workflowRunId) {\n return `workflow:${workflowRunId}:channel`;\n}\n/**\n * Get the Redis list key for storing workflow message history.\n * Messages are stored here for retrieval by reconnecting clients.\n * @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)\n */\nexport function getWorkflowUpdatesKey(workflowRunId) {\n return `workflow:${workflowRunId}:updates`;\n}\nexport const LOW_PRIORITY_TASK_QUEUE = 'low_priority';\n//# sourceMappingURL=workflow.js.map","/**\n * Rendering API types\n *\n * Types for rendering content to various formats (PDF, DOCX, images)\n */\nimport { WorkflowExecutionStatus } from './workflow.js';\nexport function getRenditionsPath(contentEtag, params) {\n return `renditions/${contentEtag}/${params.max_hw}`;\n}\n/** Type guard for markdown rendition vars */\nexport function isMarkdownRenditionVars(vars) {\n return vars.format === 'pdf' || vars.format === 'docx';\n}\nexport function isWorkflowTerminalStatus(status) {\n return (status === WorkflowExecutionStatus.COMPLETED ||\n status === WorkflowExecutionStatus.FAILED ||\n status === WorkflowExecutionStatus.CANCELED ||\n status === WorkflowExecutionStatus.TERMINATED ||\n status === WorkflowExecutionStatus.TIMED_OUT);\n}\n//# sourceMappingURL=rendering.js.map","/**\n * Agent Schedule Types\n *\n * Defines types for scheduling agents to run on a recurring basis using cron expressions.\n * Schedules are stored in MongoDB with execution handled by Temporal.\n */\n/**\n * Common cron expression presets for UI convenience.\n */\nexport const CRON_PRESETS = {\n EVERY_HOUR: '0 * * * *',\n EVERY_DAY_MIDNIGHT: '0 0 * * *',\n EVERY_DAY_9AM: '0 9 * * *',\n EVERY_MONDAY_MIDNIGHT: '0 0 * * MON',\n EVERY_WEEKDAY_9AM: '0 9 * * MON-FRI',\n FIRST_OF_MONTH: '0 0 1 * *',\n};\n/**\n * Human-readable descriptions for cron presets.\n */\nexport const CRON_PRESET_LABELS = {\n EVERY_HOUR: 'Every hour',\n EVERY_DAY_MIDNIGHT: 'Daily at midnight',\n EVERY_DAY_9AM: 'Daily at 9:00 AM',\n EVERY_MONDAY_MIDNIGHT: 'Every Monday at midnight',\n EVERY_WEEKDAY_9AM: 'Weekdays at 9:00 AM',\n FIRST_OF_MONTH: 'First day of month at midnight',\n};\n//# sourceMappingURL=schedule.js.map","export var ContentObjectApiHeaders;\n(function (ContentObjectApiHeaders) {\n ContentObjectApiHeaders[\"COLLECTION_ID\"] = \"x-collection-id\";\n ContentObjectApiHeaders[\"PROCESSING_PRIORITY\"] = \"x-processing-priority\";\n ContentObjectApiHeaders[\"CREATE_REVISION\"] = \"x-create-revision\";\n ContentObjectApiHeaders[\"REVISION_LABEL\"] = \"x-revision-label\";\n /** When set to 'true', prevents this update from triggering workflow rules */\n ContentObjectApiHeaders[\"SUPPRESS_WORKFLOWS\"] = \"x-suppress-workflows\";\n})(ContentObjectApiHeaders || (ContentObjectApiHeaders = {}));\n/**\n * Headers for Data Store API calls.\n * Used for Cloud Run session affinity to route requests to the same instance.\n */\nexport var DataStoreApiHeaders;\n(function (DataStoreApiHeaders) {\n /** Data store ID for session affinity - routes requests for same store to same instance */\n DataStoreApiHeaders[\"DATA_STORE_ID\"] = \"x-data-store-id\";\n})(DataStoreApiHeaders || (DataStoreApiHeaders = {}));\nexport var ContentObjectStatus;\n(function (ContentObjectStatus) {\n ContentObjectStatus[\"created\"] = \"created\";\n ContentObjectStatus[\"processing\"] = \"processing\";\n ContentObjectStatus[\"ready\"] = \"ready\";\n ContentObjectStatus[\"completed\"] = \"completed\";\n ContentObjectStatus[\"failed\"] = \"failed\";\n ContentObjectStatus[\"archived\"] = \"archived\";\n})(ContentObjectStatus || (ContentObjectStatus = {}));\nexport var ContentNature;\n(function (ContentNature) {\n ContentNature[\"Video\"] = \"video\";\n ContentNature[\"Image\"] = \"image\";\n ContentNature[\"Audio\"] = \"audio\";\n ContentNature[\"Document\"] = \"document\";\n ContentNature[\"Code\"] = \"code\";\n ContentNature[\"Other\"] = \"other\";\n})(ContentNature || (ContentNature = {}));\nexport const POSTER_RENDITION_NAME = 'Poster';\nexport const AUDIO_RENDITION_NAME = 'Audio';\nexport const WEB_VIDEO_RENDITION_NAME = 'Web';\nexport const PDF_RENDITION_NAME = 'PDF';\nexport const TextExtractionStatus = {\n success: 'success',\n};\nexport function getContentTypeRefId(type) {\n return type.id;\n}\nexport function withContentObjectTypeRefDiscriminator(type) {\n const legacyCode = 'code' in type ? type.code : undefined;\n const id = type.id || legacyCode || '';\n const name = type.name || '';\n if (type.ref_type === 'incode' || isInCodeType(id)) {\n return { ref_type: 'incode', id, name };\n }\n return { ref_type: 'stored', id, name };\n}\n/**\n * Returns true if the type id represents an in-code type (system or app-contributed).\n * In-code types use colon-separated ids like \"sys:Invoice\" or \"app:myapp:Article\".\n * These types are read-only and cannot be edited through the UI.\n */\nexport function isInCodeType(typeId) {\n return typeId.includes(':');\n}\nexport var WorkflowRuleInputType;\n(function (WorkflowRuleInputType) {\n WorkflowRuleInputType[\"single\"] = \"single\";\n WorkflowRuleInputType[\"multiple\"] = \"multiple\";\n WorkflowRuleInputType[\"none\"] = \"none\";\n})(WorkflowRuleInputType || (WorkflowRuleInputType = {}));\nexport var ImageRenditionFormat;\n(function (ImageRenditionFormat) {\n ImageRenditionFormat[\"jpeg\"] = \"jpeg\";\n ImageRenditionFormat[\"png\"] = \"png\";\n ImageRenditionFormat[\"webp\"] = \"webp\";\n})(ImageRenditionFormat || (ImageRenditionFormat = {}));\nexport var MarkdownRenditionFormat;\n(function (MarkdownRenditionFormat) {\n MarkdownRenditionFormat[\"docx\"] = \"docx\";\n MarkdownRenditionFormat[\"pdf\"] = \"pdf\";\n})(MarkdownRenditionFormat || (MarkdownRenditionFormat = {}));\n/**\n * Matrix of supported content type → format conversions.\n * This is the authoritative source of truth for what renditions can be generated.\n *\n * Key patterns:\n * - Exact MIME types (e.g., 'application/pdf')\n * - Wildcard patterns (e.g., 'image/*', 'video/*')\n */\nconst RENDITION_COMPATIBILITY = {\n // Image formats can generate: jpeg, png, webp\n 'image/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Video formats can generate: jpeg, png (thumbnails)\n 'video/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png],\n // PDF can generate: jpeg, png, webp (page images)\n 'application/pdf': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],\n // Markdown can generate: pdf, docx (NOT jpeg/png)\n 'text/markdown': [MarkdownRenditionFormat.pdf, MarkdownRenditionFormat.docx],\n // Any text/* can generate: docx (editable export)\n 'text/*': [MarkdownRenditionFormat.docx],\n // Office documents can generate: pdf\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [MarkdownRenditionFormat.pdf],\n 'application/msword': [MarkdownRenditionFormat.pdf],\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation': [MarkdownRenditionFormat.pdf],\n 'application/vnd.ms-powerpoint': [MarkdownRenditionFormat.pdf],\n};\n/**\n * Check if a specific rendition format can be generated from a content type.\n *\n * @param contentType - The MIME type of the source content (e.g., 'image/png', 'text/markdown')\n * @param format - The desired rendition format (e.g., ImageRenditionFormat.jpeg)\n * @returns true if the format can be generated from the content type\n *\n * @example\n * canGenerateRendition('image/png', ImageRenditionFormat.jpeg) // true\n * canGenerateRendition('text/markdown', ImageRenditionFormat.jpeg) // false\n * canGenerateRendition('text/markdown', MarkdownRenditionFormat.pdf) // true\n */\nexport function canGenerateRendition(contentType, format) {\n if (!contentType)\n return false;\n const formatStr = typeof format === 'string' ? format : format;\n // Check exact match first\n const exactMatch = RENDITION_COMPATIBILITY[contentType];\n if (exactMatch?.some((f) => f === formatStr)) {\n return true;\n }\n // Check wildcard patterns (e.g., 'image/*', 'video/*')\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch?.some((f) => f === formatStr)) {\n return true;\n }\n return false;\n}\n/**\n * Get the list of rendition formats supported for a given content type.\n *\n * @param contentType - The MIME type of the source content\n * @returns Array of supported rendition formats, or empty array if none\n *\n * @example\n * getSupportedRenditionFormats('image/png') // [jpeg, png, webp]\n * getSupportedRenditionFormats('text/markdown') // [pdf, docx]\n * getSupportedRenditionFormats('text/html') // []\n */\nexport function getSupportedRenditionFormats(contentType) {\n if (!contentType)\n return [];\n // Check exact match first\n if (RENDITION_COMPATIBILITY[contentType]) {\n return [...RENDITION_COMPATIBILITY[contentType]];\n }\n // Check wildcard patterns\n const [category] = contentType.split('/');\n const wildcardKey = `${category}/*`;\n const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];\n if (wildcardMatch) {\n return [...wildcardMatch];\n }\n return [];\n}\n/**\n * Check if a content type supports visual (image) renditions.\n * This is useful for determining if a document can have thumbnails/previews.\n *\n * @param contentType - The MIME type of the source content\n * @returns true if the content type can generate JPEG renditions\n *\n * @example\n * supportsVisualRendition('image/png') // true\n * supportsVisualRendition('application/pdf') // true\n * supportsVisualRendition('text/markdown') // false\n */\nexport function supportsVisualRendition(contentType) {\n return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);\n}\nexport var ContentObjectProcessingPriority;\n(function (ContentObjectProcessingPriority) {\n ContentObjectProcessingPriority[\"normal\"] = \"normal\";\n ContentObjectProcessingPriority[\"low\"] = \"low\";\n})(ContentObjectProcessingPriority || (ContentObjectProcessingPriority = {}));\n//# sourceMappingURL=store.js.map","export const ParentClosePolicy = {\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @default\n */\n TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n */\n ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n */\n REQUEST_CANCEL: 'REQUEST_CANCEL',\n /**\n * If a `ParentClosePolicy` is set to this, or is not set at all, the server default value will be used.\n *\n * @deprecated Either leave property `undefined`, or set an explicit policy instead.\n */\n PARENT_CLOSE_POLICY_UNSPECIFIED: undefined,\n /**\n * When the Parent is Closed, the Child is Terminated.\n *\n * @deprecated Use {@link ParentClosePolicy.TERMINATE} instead.\n */\n PARENT_CLOSE_POLICY_TERMINATE: 'TERMINATE',\n /**\n * When the Parent is Closed, nothing is done to the Child.\n *\n * @deprecated Use {@link ParentClosePolicy.ABANDON} instead.\n */\n PARENT_CLOSE_POLICY_ABANDON: 'ABANDON',\n /**\n * When the Parent is Closed, the Child is Cancelled.\n *\n * @deprecated Use {@link ParentClosePolicy.REQUEST_CANCEL} instead.\n */\n PARENT_CLOSE_POLICY_REQUEST_CANCEL: 'REQUEST_CANCEL',\n};\n//# sourceMappingURL=temporalio.js.map","// Helper type guards for type narrowing\nexport function isApiKeyRequest(req) {\n return req.type === 'apikey';\n}\nexport function isUserRequest(req) {\n return req.type === 'user';\n}\nexport function isProjectRequest(req) {\n return req.type === 'project';\n}\nexport function isEnvironmentRequest(req) {\n return req.type === 'environment';\n}\nexport function isAgentRequest(req) {\n return req.type === 'agent';\n}\nexport function isServiceAccountRequest(req) {\n return req.type === 'service_account';\n}\n//# sourceMappingURL=sts-token-types.js.map","export var TrainingSessionStatus;\n(function (TrainingSessionStatus) {\n TrainingSessionStatus[\"created\"] = \"created\";\n TrainingSessionStatus[\"building\"] = \"building\";\n TrainingSessionStatus[\"prepared\"] = \"prepared\";\n TrainingSessionStatus[\"processing\"] = \"processing\";\n TrainingSessionStatus[\"completed\"] = \"completed\";\n TrainingSessionStatus[\"cancelled\"] = \"cancelled\";\n TrainingSessionStatus[\"failed\"] = \"failed\";\n})(TrainingSessionStatus || (TrainingSessionStatus = {}));\n//# sourceMappingURL=training.js.map","export var TransientTokenType;\n(function (TransientTokenType) {\n TransientTokenType[\"userInvite\"] = \"user-invite\";\n TransientTokenType[\"migration\"] = \"migration\";\n})(TransientTokenType || (TransientTokenType = {}));\n//# sourceMappingURL=transient-tokens.js.map","export const UserRefPopulate = 'id name email picture';\nexport var Datacenters;\n(function (Datacenters) {\n Datacenters[\"aws\"] = \"aws\";\n Datacenters[\"gcp\"] = \"gcp\";\n Datacenters[\"azure\"] = \"azure\";\n})(Datacenters || (Datacenters = {}));\nexport var BillingMethod;\n(function (BillingMethod) {\n BillingMethod[\"stripe\"] = \"stripe\";\n BillingMethod[\"invoice\"] = \"invoice\";\n})(BillingMethod || (BillingMethod = {}));\nexport var AccountType;\n(function (AccountType) {\n AccountType[\"vertesia\"] = \"vertesia\";\n AccountType[\"partner\"] = \"partner\";\n AccountType[\"free\"] = \"free\";\n AccountType[\"customer\"] = \"customer\";\n AccountType[\"prospect\"] = \"prospect\";\n AccountType[\"unknown\"] = \"unknown\";\n})(AccountType || (AccountType = {}));\nexport const AccountRefPopulate = 'id name';\n//# sourceMappingURL=user.js.map","export function getTenantId(accountId, projectId) {\n //use the last 6 characters of the accountId as the db name\n //as in mongo the last 6 char are an incrementing counter\n const accountLast6 = accountId.slice(-6);\n const projectLast6 = projectId.slice(-6);\n return `${accountLast6}_${projectLast6}`;\n}\nexport function getTenantIdFromProject(project) {\n return getTenantId(project.account, project.id);\n}\n//# sourceMappingURL=auth.js.map","import { PromptRole } from '@llumiverse/common';\nimport { PromptSegmentDefType } from '../prompt.js';\n/**\n * Sanitize a tool definition to only include fields expected by LLM APIs.\n * Removes extra fields like 'category', 'default', 'tools' that are\n * used internally but should not be sent to the LLM.\n */\nexport function sanitizeToolDefinition(tool) {\n return {\n name: tool.name,\n description: tool.description,\n input_schema: tool.input_schema,\n };\n}\n/**\n * Sanitize an array of tool definitions.\n */\nexport function sanitizeToolDefinitions(tools) {\n if (!tools)\n return tools;\n return tools.map(sanitizeToolDefinition);\n}\n// Remove custom properties from the JSON before sending further down execution pipeline.\n// Before stripping UI-only fields (editor, format), translate them into LLM-friendly\n// schema hints so the model knows the expected value format.\nexport function removeExtraProperties(schema) {\n if (!schema)\n return schema;\n if (Array.isArray(schema)) {\n for (const item of schema) {\n removeExtraProperties(item);\n }\n }\n else if (typeof schema === 'object') {\n const obj = schema;\n // If this looks like a property definition (has editor/format for document/media),\n // enrich it with type and description hints before stripping.\n if (isDocumentProperty(obj)) {\n enrichDocumentProperty(obj);\n }\n for (const [key, value] of Object.entries(obj)) {\n if (key === 'editor' && (value === 'textarea' || value === 'document' || value === 'media')) {\n delete obj[key];\n }\n else if (key === 'format' && (value === 'textarea' || value === 'document' || value === 'media')) {\n delete obj[key];\n }\n else if (typeof value === 'object') {\n removeExtraProperties(value);\n }\n }\n }\n return schema;\n}\n/**\n * Returns true if the schema property represents a document reference\n * (identified by editor: \"document\" or format: \"document\" / \"media\").\n */\nfunction isDocumentProperty(obj) {\n return obj.editor === 'document' || obj.format === 'document' || obj.format === 'media';\n}\n/**\n * Canonical hint string appended to document property descriptions.\n * Used by ensureDocumentStorePrefix (in @dglabs/workflows) to detect document\n * properties after serialization, when editor/format fields have been stripped.\n * Exported so both packages use the exact same string — do NOT duplicate.\n */\nexport const DOCUMENT_STORE_HINT = \"Use 'store:<document_id>' format to reference a document from the content store.\";\n/**\n * Enriches a document property schema with LLM-friendly hints:\n * - Sets type to \"string\" if not already set\n * - Appends a store: prefix hint to the description\n */\nfunction enrichDocumentProperty(obj) {\n // Set type to string if missing (document references are string IDs)\n if (!obj.type) {\n obj.type = 'string';\n }\n // Always ensure the canonical hint is present in the description.\n // Check for the exact hint string (not just 'store:') to avoid missing detection\n // after serialization when only the description survives.\n if (!obj.description) {\n obj.description = DOCUMENT_STORE_HINT;\n }\n else if (typeof obj.description === 'string' && !obj.description.includes(DOCUMENT_STORE_HINT)) {\n obj.description = `${obj.description} ${DOCUMENT_STORE_HINT}`;\n }\n}\nexport function mergeJSONSchemas(schemas) {\n const props = {};\n const required = [];\n for (const schema of schemas) {\n if (schema.properties) {\n if (schema.required) {\n for (const prop of schema.required) {\n if (!required.includes(prop))\n required.push(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0 ? { properties: props, required, type: 'object' } : null;\n return schema;\n}\nexport function _mergePromptsSchema(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.template?.inputSchema?.properties) {\n const schema = prompt.template?.inputSchema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n else if (prompt.type === PromptSegmentDefType.chat) {\n Object.assign(props, {\n chat: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n role: {\n type: 'string',\n enum: [PromptRole.assistant, PromptRole.user],\n },\n content: { type: 'string' },\n },\n required: ['role', 'content'],\n },\n },\n });\n required.add('chat');\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\nexport function mergePromptsSchema(interaction) {\n if (!interaction.prompts)\n return null;\n return _mergePromptsSchema(interaction.prompts);\n}\nexport function mergeInCodePromptSchemas(prompts) {\n const props = {};\n const required = new Set();\n for (const prompt of prompts) {\n if (prompt.schema?.properties) {\n const schema = prompt.schema;\n if (schema.required) {\n for (const prop of schema.required) {\n required.add(prop);\n }\n }\n Object.assign(props, schema.properties);\n }\n }\n const schema = Object.keys(props).length > 0\n ? {\n properties: props,\n required: Array.from(required),\n }\n : null;\n return schema;\n}\n//# sourceMappingURL=schemas.js.map","export var ApiVersions;\n(function (ApiVersions) {\n ApiVersions[ApiVersions[\"COMPLETION_RESULT_V1\"] = 20250925] = \"COMPLETION_RESULT_V1\";\n ApiVersions[ApiVersions[\"DOWNLOAD_URL_NO_MIME_TYPE_V1\"] = 20260210] = \"DOWNLOAD_URL_NO_MIME_TYPE_V1\";\n ApiVersions[ApiVersions[\"MEDIA_BLOB_STORAGE_V1\"] = 20260319] = \"MEDIA_BLOB_STORAGE_V1\";\n})(ApiVersions || (ApiVersions = {}));\n//# sourceMappingURL=versions.js.map","/**\n * Agent Observability Telemetry Types\n *\n * These types define the event-based model for agent observability.\n */\n// ============================================================================\n// Enums\n// ============================================================================\n/**\n * Types of telemetry events\n */\nexport var AgentEventType;\n(function (AgentEventType) {\n AgentEventType[\"AgentRunStarted\"] = \"agent_run_started\";\n AgentEventType[\"AgentRunCompleted\"] = \"agent_run_completed\";\n AgentEventType[\"LlmCall\"] = \"llm_call\";\n AgentEventType[\"ToolCall\"] = \"tool_call\";\n})(AgentEventType || (AgentEventType = {}));\n/**\n * Types of LLM calls in a conversation\n */\nexport var LlmCallType;\n(function (LlmCallType) {\n /** Initial conversation start */\n LlmCallType[\"Start\"] = \"start\";\n /** Resuming with tool results */\n LlmCallType[\"ResumeTools\"] = \"resume_tools\";\n /** Resuming with user message */\n LlmCallType[\"ResumeUser\"] = \"resume_user\";\n /** Checkpoint resume (after conversation summarization) */\n LlmCallType[\"Checkpoint\"] = \"checkpoint\";\n /** Nested interaction call from within tools */\n LlmCallType[\"NestedInteraction\"] = \"nested_interaction\";\n})(LlmCallType || (LlmCallType = {}));\n/**\n * Types of tools that can be called\n */\nexport var TelemetryToolType;\n(function (TelemetryToolType) {\n /** Built-in tools (e.g., plan, search) */\n TelemetryToolType[\"Builtin\"] = \"builtin\";\n /** Interaction-based tools */\n TelemetryToolType[\"Interaction\"] = \"interaction\";\n /** Remote/MCP tools */\n TelemetryToolType[\"Remote\"] = \"remote\";\n /** Skill tools */\n TelemetryToolType[\"Skill\"] = \"skill\";\n})(TelemetryToolType || (TelemetryToolType = {}));\n//# sourceMappingURL=workflow-analytics.js.map"],"names":["Permission","AccessControlResourceType","AccessControlPrincipalType","SecurityLevel","SecurityLevelLabels","getSecurityLevelLabel","level","getTemplatePathValue","data","path","split","reduce","current","part","Array","isArray","test","Number","value","stringifyTemplateValue","String","JSON","stringify","renderAgentRequestTemplate","template","replace","_match","renderAgentRequestFallback","renderAgentRequestMessage","trimmedTemplate","trim","ApiKeyTypes","PrincipalType","PREFERRED_SECTIONS","MCP_COLLECTION_ID_PATTERN","MCP_COLLECTION_NAMESPACE_PATTERN","isValidMCPCollectionId","id","isValidMCPCollectionNamespace","namespace","deriveMCPCollectionId","input","toLowerCase","getDefaultOAuthAppNameForCollectionId","collectionId","normalizeToolCollection","collection","vars","TypeError","substitutedUrl","url","substituteEndpoints","urlChanged","type","fallbackId","name","effectiveAppAccessControl","installation","manifest","access_control","RESERVED_ENDPOINT_OVERRIDE_ENVS","Set","isValidEndpointOverrideEnv","envName","has","endpoints","match","key","end","length","slice","trimTrailingSlashes","resolveAppEndpoint","requestedOverride","raw","endpoint_overrides","endpoint","resolveManifestUrls","resolved","toolCollections","tool_collections","i","item","sub","BILLABLE_AUDIT_ACTIONS","isEmailChannel","channel","isInteractiveChannel","InteractionRefPopulate","InteractionRefWithSchemaPopulate","InteractionStatus","ExecutionRunStatus","RunDataStorageLevel","RunDataStorageDescription","RunDataStorageOptions","STANDARD","RESTRICTED","DEBUG","AgentSearchScope","RunSourceTypes","ExecutionRunRefSelect","ConfigModes","ConfigModesDescription","ConfigModesOptions","RUN_AND_INTERACTION_CONFIG","RUN_CONFIG_ONLY","INTERACTION_CONFIG_ONLY","ModelSource","DataColumnType","SemanticColumnType","findEmailChannel","channels","find","hasEmailChannel","updateEmailChannel","updates","existing","emailIndex","findIndex","to_email","updated","updateEmailThreading","messageId","subject","emailChannel","newReferences","references","includes","push","in_reply_to","thread_subject","DATA_COLUMN_TYPE_TO_DUCKDB","STRING","INTEGER","BIGINT","FLOAT","DOUBLE","DECIMAL","BOOLEAN","DATE","TIMESTAMP","DataStoreStatus","ImportStatus","DEFAULT_RETENTION_CONFIG","retention_days","snapshots_exempt","DashboardStatus","DEFAULT_DASHBOARD_LAYOUT","columns","cellWidth","cellHeight","padding","RECORD_MODEL_CAPABILITIES","text","image","video","audio","embed","output","tool_support","tool_support_streaming","RECORD_FAMILY_CAPABILITIES","DEFAULT_CLAUDE_CAPABILITIES","getModelCapabilitiesAnthropic","model","lower","bestKey","Object","keys","startsWith","o3","gpt","o1","o4","o","llama","mistral","phi","deepseek","ai21","jamba","cohere","command","grok","IMAGE_INPUT_MODELS","VIDEO_INPUT_MODELS","AUDIO_INPUT_MODELS","TEXT_INPUT_MODELS","IMAGE_OUTPUT_MODELS","VIDEO_OUTPUT_MODELS","AUDIO_OUTPUT_MODELS","TEXT_OUTPUT_MODELS","EMBEDDING_OUTPUT_MODELS","TOOL_SUPPORT_MODELS","modelMatches","modelName","patterns","some","pattern","applyGlobalToolSupportDisable","capabilities","RECORD_FOUNDATION_EXCEPTIONS","RECORD_PROFILE_EXCEPTIONS","getModelCapabilitiesBedrock","modelLower","normalized","foundationIdx","lastIndexOf","inferenceIdx","substring","isInferenceProfile","isFoundationModel","lookupKey","lastSlashIdx","extractModelLookupKey","exception","modelCapability","familyCapability","families","undefined","findFamilyCapability","inferredName","parts","providerModel","modelParts","join","normalizeModelName","sora","whisper","getModelCapabilitiesOpenAI","record","bestFamilyKey","bestFamilyLength","family","gemini","imagen","claude","getModelCapabilitiesVertexAI","segments","normalizeVertexAIModelName","Providers","ProviderList","openai","requiresApiKey","requiresEndpointUrl","supportSearch","azure_openai","azure_foundry","huggingface_ie","replicate","bedrock","endpointPlaceholder","vertexai","togetherai","mistralai","groq","watsonx","xai","openai_compatible","anthropic","SharedOptions","OptionType","PromptRole","Modalities","AIModelStatus","ModelType","TrainingJobStatus","getModelCapabilities","provider","getModelCapabilitiesOpenAICompatible","baseModel","compositeId","deploymentName","parseAzureFoundryModelId","getModelCapabilitiesAzureFoundry","_getModelCapabilities","NO_TOOL_SUPPORT_PATTERNS","caps","isNonToolModel","p","supportsToolUse","streaming","ImagenTaskType","ImagenMaskMode","ThinkingLevel","CustomProviders","max_tokens","numeric","temperature","top_p","top_k","presence_penalty","frequency_penalty","stop_sequence","string_list","SupportedProviders","CustomProvidersList","virtual_lb","virtual_mediator","SupportedProvidersList","getVertexBucketAccessPrincipal","env","principal","settings","bucket_access_principal","UserGroupRefPopulate","MEMBERS_GROUP_NAME","stripLeadingWildcard","host","normalizeHost","endsWith","firstColon","indexOf","looksLikeBareIpv6","stripIPv6Brackets","URL","hostname","hasWhitespace","hostFromUrl","baseUrl","normalizeHostList","from","map","entry","filter","hostMatchesAny","allowlist","normalizedHost","normalizedEntry","urlMatchesAnyHost","isLocalhostOrVertesiaHost","isLocalhostOrVertesiaUrl","SupportedIntegrations","MeterNames","withProjectIntegrationDiscriminator","integration","config","OAUTH_SCOPE_OPENID","OAUTH_SCOPE_PROFILE","OAUTH_SCOPE_OFFLINE_ACCESS","OAUTH_STANDARD_SCOPES","NON_OAUTH_PERMISSION_SCOPES","api_key_secret_read","manage_billing","billing_read","iam_impersonate","studio_access","OAUTH_PERMISSION_SCOPES","values","scope","OAUTH_STANDARD_SCOPE_SET","OAUTH_PERMISSION_SCOPE_SET","OBJECT_ID_PATTERN","OAUTH_PROJECT_BINDING_SCOPE_PREFIX","getOAuthPermissionScopes","isOAuthStandardScope","isOAuthPermissionScope","isOAuthSupportedScope","isOAuthProjectBindingScope","createOAuthProjectBindingScope","projectId","hasOAuthOpenIdScope","scopes","hasOAuthProfileScope","hasOAuthOfflineAccessScope","getOAuthScopesWithProfileDependency","extractOAuthPermissionScopes","ProgressSpan","parent","parentUnits","spanUnits","unitsDone","constructor","this","done","units","remaining","parentUnitsDone","Math","round","isDone","Progress","total","fraction","percent","span","ProjectRoles","ResourceVisibility","SystemInteractionCategory","isRoleIncludedIn","role","includingRole","owner","admin","billing","developer","SYSTEM_INTERACTION_CATEGORIES","ExtractInformation","intake","SelectDocumentType","GenerateMetadataModel","content_type","ChunkDocument","IdentifyTextSections","AnalyzeDocument","analysis","ReduceTextSections","GenericAgent","non_applicable","AdhocTaskAgent","Mediator","AnalyzeConversation","GetAgentConversationTopic","StudioAssistant","agent","getSystemInteractionCategory","category","BrowserUseProjectConfigurationSchema","properties","enabled","nullable","description","default_policy","enum","max_policy","allowed_hosts","items","allow_file_uploads","allow_playwright_scripts","capture_screenshots","prefer_raw_screenshots","required","additionalProperties","SupportedEmbeddingTypes","FullTextType","SearchTypes","ProjectRefPopulate","autoTuneReindexParams","docCount","shard_size","max","ceil","parallel_shard_count","min","max_shards","SUPPORTED_SEARCH_LANGUAGES","en","zh","es","hi","ar","pt","bn","ru","ja","de","fr","ko","it","tr","vi","pl","uk","nl","th","el","cs","sv","ro","hu","da","fi","no","he","fa","PromptStatus","PromptSegmentDefType","TemplateType","ResolvableRefType","Role","permissions","hasPermission","permission","RoleList","roles","fromRoleNames","roleNames","r","getRoleByName","fromRoleName","roleName","perm","OrgMemberRole","super","account_member","DeveloperRole","delete","account_admin","project_admin","project_settings_write","env_admin","audit_read","agent_run_read","content_read_all","content_superadmin","workflow_superadmin","READ_ONLY_AUDIT_PERMISSIONS","account_read","project_integration_read","api_key_read","int_read","run_read","content_read","task_read","workflow_read","ReadOnlyAuditRole","manager","application","int_execute","int_write","content_write","content_admin","workflow_run","account_write","automation","content_processor","consumer","content_delete","executor","reader","auditor","support","app_member","member","add","Error","listRoles","getPermissionsForRoles","CollectionStatus","toolInputRefsArtifactPath","storageId","getConversationStorageId","state","fallbackRunId","baseId","agent_run_id","launch_id","withDSLWorkflowSpecDiscriminator","spec","steps","spec_format","WorkflowDefinitionRefPopulate","RenditionSchema","mime_type","source_etag","height","width","multipart","default","total_parts","DocumentPartSchema","part_number","title","source_line_start","source_line_end","page_number","PROCESS_DEFINITION_FORMAT_VERSION","PROCESS_DEFINITION_JSON_SCHEMA_ID","ProcessDefinitionBodyJsonSchema","$id","format_version","const","process","minLength","initial","context","$ref","nodes","minProperties","metadata","$defs","metadataDefinition","processContextDefinition","schema","anyOf","nodeDefinition","tool","interaction","process_definition","process_version","run_type","returns","result_schema","prompt","human_description","writes","skippable","max_retries","transitions","tools","task","foreach","as","item_id","node","max_concurrency","minimum","collect","oneOf","failure_policy","branches","transitionDefinition","to","guard","trigger","label","branchDefinition","when","branchNodeBranchDefinition","humanTaskDefinition","assignee","fields","taskField","options","processNodeReturnsDefinition","parallelCollectDefinition","into","mode","include","jsonLogicRule","jsonSchemaDefinition","getProcessInteractionValidationSelectors","interactions","selectors","version","MAX_PROCESS_DEFINITION_BYTES","MAX_PROCESS_GUARD_DEPTH","MAX_PROCESS_GUARD_NODES","validateProcessDefinitionBody","definition","result","getProcessDefinitionValidationResult","valid","errors","knownTools","knownInteractions","createValidationContext","TextEncoder","encode","nodeId","entries","validateNodeDefinition","isRecord","reason","event_id","updateKeys","isWriteAllowed","validateSetContextWrites","validateSetContextNode","validateToolNodeDefinition","selector","knownSelectors","isKnownSelector","isProcessNodeRunType","every","isStringArray","childResult","error","isInteger","validateCollectDefinition","validateFanoutChildNodeDefinition","ownerLabel","childPath","childLabel","child","isBranchNodeBranchDefinition","getBranchNodeBranches","seenIds","index","branch","isParallelFailurePolicy","transition","isTransitionTrigger","validateGuardRule","isConditionBranchDefinition","getConditionBranches","hasStringConditionProperty","write","nodeKind","field","isParallelCollectField","rule","maxDepth","stack","depth","next","pop","inspectGuardRule","Boolean","ContentEventName","TaskStatus","TaskType","WorkflowExecutionStatus","AgentMessageType","getDocumentIds","payload","inputType","objectIds","isToolCallMessage","msg","details","THOUGHT","isDocumentEventMessage","UPDATE","event_class","document_id","isFileProcessingMessage","SYSTEM","system_type","files","isPlanMessage","PLAN","plan","isRequestInputMessage","REQUEST_INPUT","isCompactMessage","isLegacyMessage","STRING_TO_TYPE_MAP","system","thought","update","complete","COMPLETE","warning","WARNING","ERROR","answer","ANSWER","question","QUESTION","request_input","idle","IDLE","terminated","TERMINATED","streaming_chunk","STREAMING_CHUNK","batch_progress","BATCH_PROGRESS","INT_TO_TYPE_MAP","normalizeMessageType","toCompactMessage","legacy","compact","t","message","m","workstream_id","w","timestamp","ts","is_final","f","d","parseMessage","parsed","parse","createCompactMessage","workstreamId","isFinal","toAgentMessage","workflowRunId","Date","now","workflow_run_id","streaming_id","activity_id","FileProcessingStatus","getWorkflowChannel","getWorkflowUpdatesKey","LOW_PRIORITY_TASK_QUEUE","getRenditionsPath","contentEtag","params","max_hw","isMarkdownRenditionVars","format","isWorkflowTerminalStatus","status","COMPLETED","FAILED","CANCELED","TIMED_OUT","CRON_PRESETS","EVERY_HOUR","EVERY_DAY_MIDNIGHT","EVERY_DAY_9AM","EVERY_MONDAY_MIDNIGHT","EVERY_WEEKDAY_9AM","FIRST_OF_MONTH","CRON_PRESET_LABELS","ContentObjectApiHeaders","DataStoreApiHeaders","ContentObjectStatus","ContentNature","POSTER_RENDITION_NAME","AUDIO_RENDITION_NAME","WEB_VIDEO_RENDITION_NAME","PDF_RENDITION_NAME","TextExtractionStatus","success","getContentTypeRefId","withContentObjectTypeRefDiscriminator","legacyCode","code","ref_type","isInCodeType","typeId","WorkflowRuleInputType","ImageRenditionFormat","MarkdownRenditionFormat","RENDITION_COMPATIBILITY","jpeg","png","webp","pdf","docx","canGenerateRendition","contentType","formatStr","exactMatch","wildcardMatch","getSupportedRenditionFormats","supportsVisualRendition","ContentObjectProcessingPriority","ParentClosePolicy","TERMINATE","ABANDON","REQUEST_CANCEL","PARENT_CLOSE_POLICY_UNSPECIFIED","PARENT_CLOSE_POLICY_TERMINATE","PARENT_CLOSE_POLICY_ABANDON","PARENT_CLOSE_POLICY_REQUEST_CANCEL","isApiKeyRequest","req","isUserRequest","isProjectRequest","isEnvironmentRequest","isAgentRequest","isServiceAccountRequest","TrainingSessionStatus","TransientTokenType","UserRefPopulate","Datacenters","BillingMethod","AccountType","AccountRefPopulate","getTenantId","accountId","getTenantIdFromProject","project","account","sanitizeToolDefinition","input_schema","sanitizeToolDefinitions","removeExtraProperties","obj","editor","isDocumentProperty","DOCUMENT_STORE_HINT","enrichDocumentProperty","mergeJSONSchemas","schemas","props","prop","assign","_mergePromptsSchema","prompts","inputSchema","chat","assistant","user","content","mergePromptsSchema","mergeInCodePromptSchemas","ApiVersions","AgentEventType","LlmCallType","TelemetryToolType"],"mappings":"AAKU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