@vertesia/common 0.24.0-dev.202601221707

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 (388) hide show
  1. package/LICENSE +13 -0
  2. package/README.md +53 -0
  3. package/lib/cjs/Progress.js +61 -0
  4. package/lib/cjs/Progress.js.map +1 -0
  5. package/lib/cjs/access-control.js +56 -0
  6. package/lib/cjs/access-control.js.map +1 -0
  7. package/lib/cjs/analytics.js +3 -0
  8. package/lib/cjs/analytics.js.map +1 -0
  9. package/lib/cjs/apikey.js +16 -0
  10. package/lib/cjs/apikey.js.map +1 -0
  11. package/lib/cjs/apps.js +35 -0
  12. package/lib/cjs/apps.js.map +1 -0
  13. package/lib/cjs/ask-user.js +8 -0
  14. package/lib/cjs/ask-user.js.map +1 -0
  15. package/lib/cjs/channels.js +63 -0
  16. package/lib/cjs/channels.js.map +1 -0
  17. package/lib/cjs/common.js +3 -0
  18. package/lib/cjs/common.js.map +1 -0
  19. package/lib/cjs/data-platform.js +127 -0
  20. package/lib/cjs/data-platform.js.map +1 -0
  21. package/lib/cjs/email.js +20 -0
  22. package/lib/cjs/email.js.map +1 -0
  23. package/lib/cjs/environment.js +44 -0
  24. package/lib/cjs/environment.js.map +1 -0
  25. package/lib/cjs/facets.js +3 -0
  26. package/lib/cjs/facets.js.map +1 -0
  27. package/lib/cjs/group.js +5 -0
  28. package/lib/cjs/group.js.map +1 -0
  29. package/lib/cjs/index.js +55 -0
  30. package/lib/cjs/index.js.map +1 -0
  31. package/lib/cjs/integrations.js +14 -0
  32. package/lib/cjs/integrations.js.map +1 -0
  33. package/lib/cjs/interaction.js +97 -0
  34. package/lib/cjs/interaction.js.map +1 -0
  35. package/lib/cjs/json-schema.js +3 -0
  36. package/lib/cjs/json-schema.js.map +1 -0
  37. package/lib/cjs/json.js +3 -0
  38. package/lib/cjs/json.js.map +1 -0
  39. package/lib/cjs/meters.js +13 -0
  40. package/lib/cjs/meters.js.map +1 -0
  41. package/lib/cjs/model_utility.js +6 -0
  42. package/lib/cjs/model_utility.js.map +1 -0
  43. package/lib/cjs/package.json +3 -0
  44. package/lib/cjs/payload.js +3 -0
  45. package/lib/cjs/payload.js.map +1 -0
  46. package/lib/cjs/pending-asks.js +7 -0
  47. package/lib/cjs/pending-asks.js.map +1 -0
  48. package/lib/cjs/project.js +107 -0
  49. package/lib/cjs/project.js.map +1 -0
  50. package/lib/cjs/prompt.js +21 -0
  51. package/lib/cjs/prompt.js.map +1 -0
  52. package/lib/cjs/query.js +3 -0
  53. package/lib/cjs/query.js.map +1 -0
  54. package/lib/cjs/rate-limiter.js +6 -0
  55. package/lib/cjs/rate-limiter.js.map +1 -0
  56. package/lib/cjs/refs.js +14 -0
  57. package/lib/cjs/refs.js.map +1 -0
  58. package/lib/cjs/runs.js +3 -0
  59. package/lib/cjs/runs.js.map +1 -0
  60. package/lib/cjs/skill.js +14 -0
  61. package/lib/cjs/skill.js.map +1 -0
  62. package/lib/cjs/store/activity-catalog.js +3 -0
  63. package/lib/cjs/store/activity-catalog.js.map +1 -0
  64. package/lib/cjs/store/collections.js +9 -0
  65. package/lib/cjs/store/collections.js.map +1 -0
  66. package/lib/cjs/store/common.js +3 -0
  67. package/lib/cjs/store/common.js.map +1 -0
  68. package/lib/cjs/store/conversation-state.js +3 -0
  69. package/lib/cjs/store/conversation-state.js.map +1 -0
  70. package/lib/cjs/store/doc-analyzer.js +3 -0
  71. package/lib/cjs/store/doc-analyzer.js.map +1 -0
  72. package/lib/cjs/store/dsl-workflow.js +5 -0
  73. package/lib/cjs/store/dsl-workflow.js.map +1 -0
  74. package/lib/cjs/store/index.js +30 -0
  75. package/lib/cjs/store/index.js.map +1 -0
  76. package/lib/cjs/store/object-types.js +98 -0
  77. package/lib/cjs/store/object-types.js.map +1 -0
  78. package/lib/cjs/store/schedule.js +32 -0
  79. package/lib/cjs/store/schedule.js.map +1 -0
  80. package/lib/cjs/store/signals.js +3 -0
  81. package/lib/cjs/store/signals.js.map +1 -0
  82. package/lib/cjs/store/store.js +166 -0
  83. package/lib/cjs/store/store.js.map +1 -0
  84. package/lib/cjs/store/temporalio.js +44 -0
  85. package/lib/cjs/store/temporalio.js.map +1 -0
  86. package/lib/cjs/store/worker.js +3 -0
  87. package/lib/cjs/store/worker.js.map +1 -0
  88. package/lib/cjs/store/workflow.js +241 -0
  89. package/lib/cjs/store/workflow.js.map +1 -0
  90. package/lib/cjs/sts-token-types.js +32 -0
  91. package/lib/cjs/sts-token-types.js.map +1 -0
  92. package/lib/cjs/tenant.js +3 -0
  93. package/lib/cjs/tenant.js.map +1 -0
  94. package/lib/cjs/tool-execution.js +6 -0
  95. package/lib/cjs/tool-execution.js.map +1 -0
  96. package/lib/cjs/training.js +14 -0
  97. package/lib/cjs/training.js.map +1 -0
  98. package/lib/cjs/transient-tokens.js +9 -0
  99. package/lib/cjs/transient-tokens.js.map +1 -0
  100. package/lib/cjs/user.js +25 -0
  101. package/lib/cjs/user.js.map +1 -0
  102. package/lib/cjs/utils/auth.js +15 -0
  103. package/lib/cjs/utils/auth.js.map +1 -0
  104. package/lib/cjs/utils/schemas.js +114 -0
  105. package/lib/cjs/utils/schemas.js.map +1 -0
  106. package/lib/cjs/utils/type-helpers.js +3 -0
  107. package/lib/cjs/utils/type-helpers.js.map +1 -0
  108. package/lib/cjs/versions.js +8 -0
  109. package/lib/cjs/versions.js.map +1 -0
  110. package/lib/cjs/workflow-analytics.js +52 -0
  111. package/lib/cjs/workflow-analytics.js.map +1 -0
  112. package/lib/esm/Progress.js +57 -0
  113. package/lib/esm/Progress.js.map +1 -0
  114. package/lib/esm/access-control.js +53 -0
  115. package/lib/esm/access-control.js.map +1 -0
  116. package/lib/esm/analytics.js +2 -0
  117. package/lib/esm/analytics.js.map +1 -0
  118. package/lib/esm/apikey.js +13 -0
  119. package/lib/esm/apikey.js.map +1 -0
  120. package/lib/esm/apps.js +32 -0
  121. package/lib/esm/apps.js.map +1 -0
  122. package/lib/esm/ask-user.js +7 -0
  123. package/lib/esm/ask-user.js.map +1 -0
  124. package/lib/esm/channels.js +57 -0
  125. package/lib/esm/channels.js.map +1 -0
  126. package/lib/esm/common.js +2 -0
  127. package/lib/esm/common.js.map +1 -0
  128. package/lib/esm/data-platform.js +124 -0
  129. package/lib/esm/data-platform.js.map +1 -0
  130. package/lib/esm/email.js +16 -0
  131. package/lib/esm/email.js.map +1 -0
  132. package/lib/esm/environment.js +41 -0
  133. package/lib/esm/environment.js.map +1 -0
  134. package/lib/esm/facets.js +2 -0
  135. package/lib/esm/facets.js.map +1 -0
  136. package/lib/esm/group.js +2 -0
  137. package/lib/esm/group.js.map +1 -0
  138. package/lib/esm/index.js +39 -0
  139. package/lib/esm/index.js.map +1 -0
  140. package/lib/esm/integrations.js +11 -0
  141. package/lib/esm/integrations.js.map +1 -0
  142. package/lib/esm/interaction.js +92 -0
  143. package/lib/esm/interaction.js.map +1 -0
  144. package/lib/esm/json-schema.js +2 -0
  145. package/lib/esm/json-schema.js.map +1 -0
  146. package/lib/esm/json.js +2 -0
  147. package/lib/esm/json.js.map +1 -0
  148. package/lib/esm/meters.js +10 -0
  149. package/lib/esm/meters.js.map +1 -0
  150. package/lib/esm/model_utility.js +2 -0
  151. package/lib/esm/model_utility.js.map +1 -0
  152. package/lib/esm/payload.js +2 -0
  153. package/lib/esm/payload.js.map +1 -0
  154. package/lib/esm/pending-asks.js +6 -0
  155. package/lib/esm/pending-asks.js.map +1 -0
  156. package/lib/esm/project.js +102 -0
  157. package/lib/esm/project.js.map +1 -0
  158. package/lib/esm/prompt.js +18 -0
  159. package/lib/esm/prompt.js.map +1 -0
  160. package/lib/esm/query.js +2 -0
  161. package/lib/esm/query.js.map +1 -0
  162. package/lib/esm/rate-limiter.js +5 -0
  163. package/lib/esm/rate-limiter.js.map +1 -0
  164. package/lib/esm/refs.js +11 -0
  165. package/lib/esm/refs.js.map +1 -0
  166. package/lib/esm/runs.js +2 -0
  167. package/lib/esm/runs.js.map +1 -0
  168. package/lib/esm/skill.js +13 -0
  169. package/lib/esm/skill.js.map +1 -0
  170. package/lib/esm/store/activity-catalog.js +2 -0
  171. package/lib/esm/store/activity-catalog.js.map +1 -0
  172. package/lib/esm/store/collections.js +6 -0
  173. package/lib/esm/store/collections.js.map +1 -0
  174. package/lib/esm/store/common.js +2 -0
  175. package/lib/esm/store/common.js.map +1 -0
  176. package/lib/esm/store/conversation-state.js +2 -0
  177. package/lib/esm/store/conversation-state.js.map +1 -0
  178. package/lib/esm/store/doc-analyzer.js +2 -0
  179. package/lib/esm/store/doc-analyzer.js.map +1 -0
  180. package/lib/esm/store/dsl-workflow.js +2 -0
  181. package/lib/esm/store/dsl-workflow.js.map +1 -0
  182. package/lib/esm/store/index.js +14 -0
  183. package/lib/esm/store/index.js.map +1 -0
  184. package/lib/esm/store/object-types.js +95 -0
  185. package/lib/esm/store/object-types.js.map +1 -0
  186. package/lib/esm/store/schedule.js +29 -0
  187. package/lib/esm/store/schedule.js.map +1 -0
  188. package/lib/esm/store/signals.js +2 -0
  189. package/lib/esm/store/signals.js.map +1 -0
  190. package/lib/esm/store/store.js +160 -0
  191. package/lib/esm/store/store.js.map +1 -0
  192. package/lib/esm/store/temporalio.js +41 -0
  193. package/lib/esm/store/temporalio.js.map +1 -0
  194. package/lib/esm/store/worker.js +2 -0
  195. package/lib/esm/store/worker.js.map +1 -0
  196. package/lib/esm/store/workflow.js +228 -0
  197. package/lib/esm/store/workflow.js.map +1 -0
  198. package/lib/esm/sts-token-types.js +24 -0
  199. package/lib/esm/sts-token-types.js.map +1 -0
  200. package/lib/esm/tenant.js +2 -0
  201. package/lib/esm/tenant.js.map +1 -0
  202. package/lib/esm/tool-execution.js +5 -0
  203. package/lib/esm/tool-execution.js.map +1 -0
  204. package/lib/esm/training.js +11 -0
  205. package/lib/esm/training.js.map +1 -0
  206. package/lib/esm/transient-tokens.js +6 -0
  207. package/lib/esm/transient-tokens.js.map +1 -0
  208. package/lib/esm/user.js +22 -0
  209. package/lib/esm/user.js.map +1 -0
  210. package/lib/esm/utils/auth.js +11 -0
  211. package/lib/esm/utils/auth.js.map +1 -0
  212. package/lib/esm/utils/schemas.js +107 -0
  213. package/lib/esm/utils/schemas.js.map +1 -0
  214. package/lib/esm/utils/type-helpers.js +2 -0
  215. package/lib/esm/utils/type-helpers.js.map +1 -0
  216. package/lib/esm/versions.js +5 -0
  217. package/lib/esm/versions.js.map +1 -0
  218. package/lib/esm/workflow-analytics.js +49 -0
  219. package/lib/esm/workflow-analytics.js.map +1 -0
  220. package/lib/tsconfig.tsbuildinfo +1 -0
  221. package/lib/types/Progress.d.ts +21 -0
  222. package/lib/types/Progress.d.ts.map +1 -0
  223. package/lib/types/access-control.d.ts +73 -0
  224. package/lib/types/access-control.d.ts.map +1 -0
  225. package/lib/types/analytics.d.ts +87 -0
  226. package/lib/types/analytics.d.ts.map +1 -0
  227. package/lib/types/apikey.d.ts +98 -0
  228. package/lib/types/apikey.d.ts.map +1 -0
  229. package/lib/types/apps.d.ts +236 -0
  230. package/lib/types/apps.d.ts.map +1 -0
  231. package/lib/types/ask-user.d.ts +32 -0
  232. package/lib/types/ask-user.d.ts.map +1 -0
  233. package/lib/types/channels.d.ts +21 -0
  234. package/lib/types/channels.d.ts.map +1 -0
  235. package/lib/types/common.d.ts +31 -0
  236. package/lib/types/common.d.ts.map +1 -0
  237. package/lib/types/data-platform.d.ts +860 -0
  238. package/lib/types/data-platform.d.ts.map +1 -0
  239. package/lib/types/email.d.ts +66 -0
  240. package/lib/types/email.d.ts.map +1 -0
  241. package/lib/types/environment.d.ts +106 -0
  242. package/lib/types/environment.d.ts.map +1 -0
  243. package/lib/types/facets.d.ts +34 -0
  244. package/lib/types/facets.d.ts.map +1 -0
  245. package/lib/types/group.d.ts +21 -0
  246. package/lib/types/group.d.ts.map +1 -0
  247. package/lib/types/index.d.ts +39 -0
  248. package/lib/types/index.d.ts.map +1 -0
  249. package/lib/types/integrations.d.ts +60 -0
  250. package/lib/types/integrations.d.ts.map +1 -0
  251. package/lib/types/interaction.d.ts +958 -0
  252. package/lib/types/interaction.d.ts.map +1 -0
  253. package/lib/types/json-schema.d.ts +1 -0
  254. package/lib/types/json-schema.d.ts.map +1 -0
  255. package/lib/types/json.d.ts +1 -0
  256. package/lib/types/json.d.ts.map +1 -0
  257. package/lib/types/meters.d.ts +23 -0
  258. package/lib/types/meters.d.ts.map +1 -0
  259. package/lib/types/model_utility.d.ts +1 -0
  260. package/lib/types/model_utility.d.ts.map +1 -0
  261. package/lib/types/payload.d.ts +60 -0
  262. package/lib/types/payload.d.ts.map +1 -0
  263. package/lib/types/pending-asks.d.ts +93 -0
  264. package/lib/types/pending-asks.d.ts.map +1 -0
  265. package/lib/types/project.d.ts +179 -0
  266. package/lib/types/project.d.ts.map +1 -0
  267. package/lib/types/prompt.d.ts +78 -0
  268. package/lib/types/prompt.d.ts.map +1 -0
  269. package/lib/types/query.d.ts +118 -0
  270. package/lib/types/query.d.ts.map +1 -0
  271. package/lib/types/rate-limiter.d.ts +28 -0
  272. package/lib/types/rate-limiter.d.ts.map +1 -0
  273. package/lib/types/refs.d.ts +22 -0
  274. package/lib/types/refs.d.ts.map +1 -0
  275. package/lib/types/runs.d.ts +32 -0
  276. package/lib/types/runs.d.ts.map +1 -0
  277. package/lib/types/skill.d.ts +78 -0
  278. package/lib/types/skill.d.ts.map +1 -0
  279. package/lib/types/store/activity-catalog.d.ts +26 -0
  280. package/lib/types/store/activity-catalog.d.ts.map +1 -0
  281. package/lib/types/store/collections.d.ts +78 -0
  282. package/lib/types/store/collections.d.ts.map +1 -0
  283. package/lib/types/store/common.d.ts +22 -0
  284. package/lib/types/store/common.d.ts.map +1 -0
  285. package/lib/types/store/conversation-state.d.ts +120 -0
  286. package/lib/types/store/conversation-state.d.ts.map +1 -0
  287. package/lib/types/store/doc-analyzer.d.ts +140 -0
  288. package/lib/types/store/doc-analyzer.d.ts.map +1 -0
  289. package/lib/types/store/dsl-workflow.d.ts +244 -0
  290. package/lib/types/store/dsl-workflow.d.ts.map +1 -0
  291. package/lib/types/store/index.d.ts +13 -0
  292. package/lib/types/store/index.d.ts.map +1 -0
  293. package/lib/types/store/object-types.d.ts +23 -0
  294. package/lib/types/store/object-types.d.ts.map +1 -0
  295. package/lib/types/store/schedule.d.ts +182 -0
  296. package/lib/types/store/schedule.d.ts.map +1 -0
  297. package/lib/types/store/signals.d.ts +24 -0
  298. package/lib/types/store/signals.d.ts.map +1 -0
  299. package/lib/types/store/store.d.ts +407 -0
  300. package/lib/types/store/store.d.ts.map +1 -0
  301. package/lib/types/store/temporalio.d.ts +16 -0
  302. package/lib/types/store/temporalio.d.ts.map +1 -0
  303. package/lib/types/store/worker.d.ts +18 -0
  304. package/lib/types/store/worker.d.ts.map +1 -0
  305. package/lib/types/store/workflow.d.ts +730 -0
  306. package/lib/types/store/workflow.d.ts.map +1 -0
  307. package/lib/types/sts-token-types.d.ts +72 -0
  308. package/lib/types/sts-token-types.d.ts.map +1 -0
  309. package/lib/types/tenant.d.ts +10 -0
  310. package/lib/types/tenant.d.ts.map +1 -0
  311. package/lib/types/tool-execution.d.ts +45 -0
  312. package/lib/types/tool-execution.d.ts.map +1 -0
  313. package/lib/types/training.d.ts +38 -0
  314. package/lib/types/training.d.ts.map +1 -0
  315. package/lib/types/transient-tokens.d.ts +24 -0
  316. package/lib/types/transient-tokens.d.ts.map +1 -0
  317. package/lib/types/user.d.ts +116 -0
  318. package/lib/types/user.d.ts.map +1 -0
  319. package/lib/types/utils/auth.d.ts +3 -0
  320. package/lib/types/utils/auth.d.ts.map +1 -0
  321. package/lib/types/utils/schemas.d.ts +9 -0
  322. package/lib/types/utils/schemas.d.ts.map +1 -0
  323. package/lib/types/utils/type-helpers.d.ts +3 -0
  324. package/lib/types/utils/type-helpers.d.ts.map +1 -0
  325. package/lib/types/versions.d.ts +3 -0
  326. package/lib/types/versions.d.ts.map +1 -0
  327. package/lib/types/workflow-analytics.d.ts +777 -0
  328. package/lib/types/workflow-analytics.d.ts.map +1 -0
  329. package/lib/vertesia-common.js +2 -0
  330. package/lib/vertesia-common.js.map +1 -0
  331. package/package.json +54 -0
  332. package/src/Progress.ts +57 -0
  333. package/src/access-control.ts +98 -0
  334. package/src/analytics.ts +106 -0
  335. package/src/apikey.ts +116 -0
  336. package/src/apps.ts +296 -0
  337. package/src/ask-user.ts +35 -0
  338. package/src/channels.ts +70 -0
  339. package/src/common.ts +37 -0
  340. package/src/data-platform.ts +976 -0
  341. package/src/email.ts +80 -0
  342. package/src/environment.ts +137 -0
  343. package/src/facets.ts +44 -0
  344. package/src/group.ts +26 -0
  345. package/src/index.ts +40 -0
  346. package/src/integrations.ts +72 -0
  347. package/src/interaction.ts +1182 -0
  348. package/src/json-schema.ts +7 -0
  349. package/src/json.ts +4 -0
  350. package/src/meters.ts +30 -0
  351. package/src/model_utility.ts +1 -0
  352. package/src/payload.ts +83 -0
  353. package/src/pending-asks.ts +106 -0
  354. package/src/project.ts +263 -0
  355. package/src/prompt.ts +103 -0
  356. package/src/query.ts +137 -0
  357. package/src/rate-limiter.ts +34 -0
  358. package/src/refs.ts +30 -0
  359. package/src/runs.ts +36 -0
  360. package/src/skill.ts +90 -0
  361. package/src/store/activity-catalog.ts +44 -0
  362. package/src/store/collections.ts +87 -0
  363. package/src/store/common.ts +30 -0
  364. package/src/store/conversation-state.ts +146 -0
  365. package/src/store/doc-analyzer.ts +161 -0
  366. package/src/store/dsl-workflow.ts +288 -0
  367. package/src/store/index.ts +14 -0
  368. package/src/store/ms.d.ts +11 -0
  369. package/src/store/object-types.ts +127 -0
  370. package/src/store/schedule.ts +238 -0
  371. package/src/store/signals.ts +25 -0
  372. package/src/store/store.ts +579 -0
  373. package/src/store/temporalio.ts +54 -0
  374. package/src/store/worker.ts +19 -0
  375. package/src/store/workflow.test.ts +578 -0
  376. package/src/store/workflow.ts +973 -0
  377. package/src/sts-token-types.ts +117 -0
  378. package/src/tenant.ts +10 -0
  379. package/src/tool-execution.ts +47 -0
  380. package/src/training.ts +44 -0
  381. package/src/transient-tokens.ts +30 -0
  382. package/src/user.ts +153 -0
  383. package/src/utils/auth.ts +12 -0
  384. package/src/utils/schemas.ts +108 -0
  385. package/src/utils/type-helpers.ts +6 -0
  386. package/src/versions.ts +3 -0
  387. package/src/workflow-analytics.ts +925 -0
  388. package/tsconfig.dist.json +20 -0
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Rate Limiter Types
3
+ */
4
+ export interface RateLimiterCapacity {
5
+ current: number;
6
+ base: number;
7
+ max: number;
8
+ }
9
+ export interface RateLimiterBreakerState {
10
+ state: 'open' | 'closed';
11
+ is_open: boolean;
12
+ last_opened_at?: string;
13
+ consecutive_failures?: number;
14
+ }
15
+ export interface RateLimiterModelStatus {
16
+ model_id: string;
17
+ admitted: number;
18
+ delayed: number;
19
+ capacity: RateLimiterCapacity;
20
+ breaker: RateLimiterBreakerState;
21
+ last_updated: string;
22
+ }
23
+ export interface RateLimiterStatus {
24
+ environment_id: string;
25
+ model_id: string;
26
+ status: RateLimiterModelStatus;
27
+ }
28
+ export type RateLimiterStatusResponse = RateLimiterStatus[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limiter.d.ts","sourceRoot":"","sources":["../../src/rate-limiter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,OAAO,EAAE,uBAAuB,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,sBAAsB,CAAC;CAClC;AAGD,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,22 @@
1
+ export declare enum ResolvableRefType {
2
+ project = "Project",
3
+ projects = "Projects",
4
+ environment = "Environment",
5
+ user = "User",
6
+ account = "Account",
7
+ interaction = "Interaction",
8
+ userGroup = "UserGroup"
9
+ }
10
+ export interface ResolvableRef {
11
+ type: ResolvableRefType;
12
+ id: string;
13
+ }
14
+ export interface RefResolutionRequest {
15
+ refs: ResolvableRef[];
16
+ }
17
+ export interface ResourceRef {
18
+ id: string;
19
+ name: string;
20
+ type: string;
21
+ description?: string;
22
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.d.ts","sourceRoot":"","sources":["../../src/refs.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IACzB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,iBAAiB,CAAA;IACvB,EAAE,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,oBAAoB;IAEjC,IAAI,EAAE,aAAa,EAAE,CAAA;CAExB;AAGD,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB"}
@@ -0,0 +1,32 @@
1
+ import { FacetResult } from './facets.js';
2
+ import { NamedInteractionExecutionPayload } from './interaction.js';
3
+ /**
4
+ * The run ref is used to identify a run document in the storage
5
+ */
6
+ export interface ExecutionRunDocRef {
7
+ id: string;
8
+ account: string;
9
+ project: string;
10
+ }
11
+ /**
12
+ * Interaction execution payload for creating a new run
13
+ * It uses interaction field (from NamedInteractionExecutionPayload) to pass the interaction ID to run
14
+ */
15
+ export interface RunCreatePayload extends NamedInteractionExecutionPayload {
16
+ }
17
+ /**
18
+ * To be used as a value for a numeric or date filters
19
+ */
20
+ export interface RangeValue {
21
+ gt?: number | string;
22
+ gte?: number | string;
23
+ lt?: number | string;
24
+ lte?: number | string;
25
+ }
26
+ export interface RunSearchMetaResponse {
27
+ count: {
28
+ lower_bound?: number;
29
+ total?: number;
30
+ };
31
+ facet: Record<string, FacetResult>;
32
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,gCAAgC;CACzE;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;CACrC"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Skill types for interaction-based skills.
3
+ *
4
+ * Skills are interactions with `agent_runner_options.is_skill = true`.
5
+ * They provide contextual instructions to agents without executing code.
6
+ * When a skill is called, its rendered prompt is returned as instructions.
7
+ *
8
+ * Skills can have associated scripts stored at:
9
+ * skills/{skill_name}/*.py, *.js, etc.
10
+ * These are automatically synced to the sandbox when the skill is used.
11
+ */
12
+ /**
13
+ * Context provided when searching for relevant skills
14
+ */
15
+ export interface SkillContext {
16
+ /**
17
+ * The task description or user prompt
18
+ */
19
+ task_description?: string;
20
+ /**
21
+ * Tools currently being used or available
22
+ */
23
+ tool_names?: string[];
24
+ /**
25
+ * Sample of input data for pattern matching
26
+ */
27
+ data_sample?: string;
28
+ /**
29
+ * Additional keywords to consider
30
+ */
31
+ keywords?: string[];
32
+ }
33
+ /**
34
+ * Payload for finding relevant skills
35
+ */
36
+ export interface FindRelevantSkillsPayload {
37
+ context: SkillContext;
38
+ limit?: number;
39
+ }
40
+ /**
41
+ * Result from skill injection into agent context.
42
+ * Contains the rendered prompt/instructions from a skill interaction.
43
+ */
44
+ export interface InjectedSkill {
45
+ /**
46
+ * The skill/interaction name
47
+ */
48
+ name: string;
49
+ /**
50
+ * The skill's rendered instructions (from the interaction prompt)
51
+ */
52
+ instructions: string;
53
+ /**
54
+ * Tools related to this skill
55
+ */
56
+ related_tools?: string[];
57
+ /**
58
+ * UI module for rendering results
59
+ */
60
+ ui_module?: string;
61
+ /**
62
+ * Match score (0-1) indicating relevance
63
+ */
64
+ match_score?: number;
65
+ }
66
+ /**
67
+ * Result from generateTools activity with skills
68
+ */
69
+ export interface ToolsWithSkills {
70
+ /**
71
+ * Array of tool definitions
72
+ */
73
+ tools: unknown[];
74
+ /**
75
+ * Skills injected based on context
76
+ */
77
+ injected_skills: InjectedSkill[];
78
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../../src/skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,KAAK,EAAE,OAAO,EAAE,CAAC;IAEjB;;OAEG;IACH,eAAe,EAAE,aAAa,EAAE,CAAC;CACpC"}
@@ -0,0 +1,26 @@
1
+ export type TsPropType = "string" | "number" | "boolean" | "record" | "object" | "array" | "enum" | "literal" | "union" | "promise" | "any" | "void";
2
+ export interface ActivityTypeDefinition {
3
+ name: TsPropType;
4
+ value: string | boolean | number | null;
5
+ members?: ActivityPropertyDefinition[];
6
+ innerType?: ActivityTypeDefinition;
7
+ enum?: string[] | number[] | undefined;
8
+ union?: ActivityTypeDefinition[];
9
+ }
10
+ export interface ActivityPropertyDefinition {
11
+ name: string;
12
+ type: ActivityTypeDefinition;
13
+ optional: boolean;
14
+ doc?: string;
15
+ }
16
+ export interface ActivityDefinition {
17
+ name: string;
18
+ title: string;
19
+ doc?: string;
20
+ paramsType: string;
21
+ params: ActivityPropertyDefinition[];
22
+ returnType?: ActivityTypeDefinition | undefined;
23
+ }
24
+ export interface ActivityCatalog {
25
+ activities: ActivityDefinition[];
26
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-catalog.d.ts","sourceRoot":"","sources":["../../../src/store/activity-catalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC;AAGrJ,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,UAAU,CAAC;IAOjB,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;IAExC,OAAO,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAEvC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAEnC,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IAEvC,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,sBAAsB,CAAC;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAElB,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,0BAA0B,EAAE,CAAC;IACrC,UAAU,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACnD;AAED,MAAM,WAAW,eAAe;IAC5B,UAAU,EAAE,kBAAkB,EAAE,CAAC;CACpC"}
@@ -0,0 +1,78 @@
1
+ import { BaseObject } from "./common.js";
2
+ import { ColumnLayout, ContentObjectTypeRef } from "./store.js";
3
+ export declare enum CollectionStatus {
4
+ active = "active",
5
+ archived = "archived"
6
+ }
7
+ export interface CreateCollectionPayload {
8
+ name: string;
9
+ dynamic: boolean;
10
+ description?: string;
11
+ skip_head_sync?: boolean;
12
+ tags?: string[];
13
+ type?: string;
14
+ query?: Record<string, any>;
15
+ properties?: Record<string, any>;
16
+ parent?: string | null;
17
+ table_layout?: ColumnLayout[] | null;
18
+ allowed_types?: string[];
19
+ updated_by?: string;
20
+ shared_properties?: string[];
21
+ }
22
+ export interface CollectionItem extends BaseObject {
23
+ /**
24
+ * A flag to indicate if the collection is dynamic or static.
25
+ * If the collection is dynamic, the members are determined by a query using the query field.
26
+ * If the collection is static, the members are explicitly defined using the members array.
27
+ */
28
+ dynamic: boolean;
29
+ status: CollectionStatus;
30
+ type?: ContentObjectTypeRef;
31
+ /**
32
+ * A flag to indicate whether to track and sync member HEAD revisions.
33
+ * The default is to sync HEAD revisions for collection members (skip_head_sync: false)
34
+ */
35
+ skip_head_sync: boolean;
36
+ /**
37
+ * The parent collections if any.
38
+ * A collection can have multiple parents.
39
+ */
40
+ parents?: string[] | null;
41
+ /**
42
+ * The table layout to use for the collection.
43
+ * The layout defined in the type could serve as a fallback if not defined here.
44
+ */
45
+ table_layout?: ColumnLayout[];
46
+ /**
47
+ * The allowed types for the collection.
48
+ */
49
+ allowed_types?: string[];
50
+ }
51
+ export interface Collection extends CollectionItem {
52
+ properties: Record<string, any>;
53
+ query?: Record<string, any>;
54
+ security?: Record<string, string[]>;
55
+ /**
56
+ * List of property names from the collection's properties that should be shared with (injected into) member objects.
57
+ * These properties will be propagated to all members of this collection and merged as arrays.
58
+ */
59
+ shared_properties?: string[];
60
+ }
61
+ export interface StaticCollection extends Collection {
62
+ dynamic: false;
63
+ members: string[];
64
+ query: never;
65
+ }
66
+ export interface DynamicCollection extends Collection {
67
+ dynamic: true;
68
+ }
69
+ export interface CollectionSearchPayload {
70
+ parent?: string | null;
71
+ dynamic?: boolean;
72
+ status?: CollectionStatus;
73
+ limit?: number;
74
+ offset?: number;
75
+ name?: string;
76
+ type?: string;
77
+ types?: string[];
78
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/store/collections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEhE,oBAAY,gBAAgB;IACxB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAC9C;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,gBAAgB,CAAC;IAEzB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B;;;OAGG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAE9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc;IAC9C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACpC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAChD,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACjD,OAAO,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Base interface for all domain objects in the system.
3
+ * Provides common properties shared across all business entities.
4
+ */
5
+ export interface BaseObject {
6
+ /** Unique identifier for the object */
7
+ id: string;
8
+ /** Human-readable name or title */
9
+ name: string;
10
+ /** Optional detailed description of the object */
11
+ description?: string;
12
+ /** Optional array of categorization tags */
13
+ tags?: string[];
14
+ /** Identifier of the user who last modified the object */
15
+ updated_by: string;
16
+ /** Identifier of the user who created the object */
17
+ created_by: string;
18
+ /** ISO timestamp of when the object was created */
19
+ created_at: string;
20
+ /** ISO timestamp of when the object was last updated */
21
+ updated_at: string;
22
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/store/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IAEX,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IAEb,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IAEnB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IAEnB,mDAAmD;IACnD,UAAU,EAAE,MAAM,CAAC;IAEnB,wDAAwD;IACxD,UAAU,EAAE,MAAM,CAAC;CAEtB"}
@@ -0,0 +1,120 @@
1
+ import { CompletionResult, ExecutionTokenUsage, StatelessExecutionOptions, ToolUse } from "@llumiverse/common";
2
+ import { ConversationStripOptions, ResolvedInteractionExecutionInfo, UserChannel } from "../interaction.js";
3
+ import { ExecutionRunDocRef } from "../runs.js";
4
+ import { Plan, WorkflowAncestor } from "./workflow.js";
5
+ /**
6
+ * Lightweight tool reference for activity payloads.
7
+ * References tools stored in GCP instead of embedding full tool definitions.
8
+ */
9
+ export interface ToolReference {
10
+ storage_key: string;
11
+ tool_count: number;
12
+ stored_at: string;
13
+ }
14
+ /**
15
+ * Conversation state passed between workflow activities.
16
+ * Contains all context needed to continue a multi-turn agent conversation.
17
+ */
18
+ export interface ConversationState {
19
+ /**
20
+ * A reference to the run that started the conversation
21
+ */
22
+ run: ExecutionRunDocRef;
23
+ /**
24
+ * The execution environment with provider info for LLM calls.
25
+ */
26
+ environment: string;
27
+ /**
28
+ * The options to use on the next call.
29
+ */
30
+ options: StatelessExecutionOptions;
31
+ /**
32
+ * The tools to call next.
33
+ */
34
+ tool_use?: ToolUse[];
35
+ /**
36
+ * The output of the this conversation step
37
+ */
38
+ output: CompletionResult[];
39
+ /**
40
+ * The token usage of the this conversation step
41
+ */
42
+ token_usage?: ExecutionTokenUsage;
43
+ /** If a sub workflow execution, contains the parent's info */
44
+ parent?: WorkflowAncestor;
45
+ /** Full ancestry chain from root to immediate parent (for hierarchical aggregation) */
46
+ ancestors: WorkflowAncestor[];
47
+ /** If part of a larger agentic workflow, task id of this task */
48
+ task_id?: string;
49
+ /** Stores the most recent plan for reference by plan-related tools */
50
+ plan?: Plan;
51
+ /** Debug mode (more logs and persisted artifacts) */
52
+ debug?: boolean;
53
+ /**
54
+ * Configuration for stripping large data from conversation history.
55
+ * Passed to llumiverse ExecutionOptions.stripImagesAfterTurns.
56
+ */
57
+ strip_options?: ConversationStripOptions;
58
+ /** Conversation artifacts base url */
59
+ conversation_artifacts_base_url?: string;
60
+ /** Reference to tools stored in GCP instead of embedding full tool definitions */
61
+ tool_reference?: ToolReference;
62
+ /** Names of currently active tools (base + unlocked). Tool definitions loaded from tool_reference. */
63
+ active_tool_names?: string[];
64
+ /** Skills that have been used in this conversation (for auto-syncing scripts and package installation) */
65
+ used_skills?: UsedSkill[];
66
+ /** All available skills from registered tool collections (for upfront hydration in sandbox) */
67
+ available_skills?: AvailableSkill[];
68
+ /** Whether to stream LLM responses to Redis (cached from project config) */
69
+ streaming_enabled?: boolean;
70
+ /**
71
+ * Active communication channels with their current state.
72
+ * Channels can be updated as conversation progresses (e.g., email threading info).
73
+ */
74
+ user_channels?: UserChannel[];
75
+ /**
76
+ * The resolved interaction execution info.
77
+ * Contains interaction ID, name, version, and environment details.
78
+ */
79
+ resolvedInteraction?: ResolvedInteractionExecutionInfo;
80
+ /**
81
+ * End conversation metadata set when end_conversation tool is called.
82
+ * Signals the workflow to terminate gracefully.
83
+ */
84
+ end_conversation?: {
85
+ final_result?: string;
86
+ status?: 'success' | 'failure';
87
+ reason?: string;
88
+ };
89
+ /**
90
+ * Tools that have been unlocked by skills during the conversation.
91
+ * These tools were initially hidden (default: false) but became available
92
+ * when a skill with related_tools was called.
93
+ */
94
+ unlocked_tools?: string[];
95
+ /**
96
+ * Mapping of skill names to their related tools.
97
+ * When a skill is called, its related tools are added to unlocked_tools.
98
+ */
99
+ skill_tool_map?: Record<string, string[]>;
100
+ }
101
+ /** Skill metadata collected at workflow start for upfront sandbox hydration */
102
+ export interface AvailableSkill {
103
+ /** Skill name (e.g., "analyze_data") - without the "learn_" prefix */
104
+ name: string;
105
+ /** Source URL of the skill collection (e.g., "https://tools.vertesia.io/api/skills/data-analysis") */
106
+ src: string;
107
+ }
108
+ /** Skill metadata tracked when a skill is used */
109
+ export interface UsedSkill {
110
+ /** Skill name (e.g., "analyze_data") */
111
+ name: string;
112
+ /** Source URL of the skill collection (e.g., "https://tools.vertesia.io/api/skills/data-analysis") */
113
+ src: string;
114
+ /** Programming language (e.g., "python") */
115
+ language?: string;
116
+ /** Required packages (e.g., ["pandas", "numpy"]) */
117
+ packages?: string[];
118
+ /** System-level packages to install via sudo apt-get (e.g., ["poppler-utils"]) */
119
+ system_packages?: string[];
120
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-state.d.ts","sourceRoot":"","sources":["../../../src/store/conversation-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,gCAAgC,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEvD;;;GAGG;AACH,M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ACH,gBAAgB,CAAC,EAAE;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;QAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC7C;AAED,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC3B,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;CACf;AAED,kDAAkD;AAClD,MAAM,WAAW,SAAS;IACtB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B"}
@@ -0,0 +1,140 @@
1
+ import { WorkflowExecutionPayload, WorkflowRunStatus } from "./workflow.js";
2
+ export interface PdfToRichtextOptions {
3
+ features: string[];
4
+ debug?: boolean;
5
+ [key: string]: any;
6
+ }
7
+ export interface PdfToRichTextWorkflowPayload extends Omit<WorkflowExecutionPayload, "vars"> {
8
+ vars: PdfToRichtextOptions;
9
+ }
10
+ /**
11
+ * Represents a image in a document that has been analyzed
12
+ */
13
+ export interface DocImage {
14
+ id?: string;
15
+ page_number?: number;
16
+ description?: string;
17
+ is_meaningful?: boolean;
18
+ width?: number;
19
+ height?: number;
20
+ }
21
+ /**
22
+ * The export type formats for tables.
23
+ */
24
+ export type ExportTableFormats = 'json' | 'csv' | 'xml';
25
+ /**
26
+ * Represents a table in a document that has been analyzed
27
+ */
28
+ export interface DocTable {
29
+ page_number?: number;
30
+ table_number?: number;
31
+ title?: string;
32
+ format: "application/csv" | "application/json";
33
+ }
34
+ /**
35
+ * Represents a table in a document that has been analyzed in CSV format
36
+ */
37
+ export interface DocTableCsv extends DocTable {
38
+ format: "application/csv";
39
+ title?: string;
40
+ data: string;
41
+ }
42
+ /**
43
+ * Represents a table in a document that has been analyzed in JSON format
44
+ */
45
+ export interface DocTableJson extends DocTable {
46
+ format: "application/json";
47
+ title?: string;
48
+ data: Object[];
49
+ }
50
+ /**
51
+ * Output format for document processing workflows
52
+ */
53
+ export type DocProcessorOutputFormat = "xml" | "markdown";
54
+ /**
55
+ * Represents a document analysis run status
56
+ */
57
+ export interface DocAnalyzeRunStatusResponse extends WorkflowRunStatus {
58
+ progress?: DocAnalyzerProgress;
59
+ /** The output format being used for processing (markdown or xml) */
60
+ output_format?: DocProcessorOutputFormat;
61
+ }
62
+ export interface DocAnalyzerResultResponse {
63
+ document?: string;
64
+ tables?: DocTableCsv[] | DocTableJson[];
65
+ images?: DocImage[];
66
+ annotated?: string | null;
67
+ }
68
+ export interface DocAnalyzerProgress {
69
+ pages: DocAnalyzerProgressStatus;
70
+ images: DocAnalyzerProgressStatus;
71
+ tables: DocAnalyzerProgressStatus;
72
+ visuals: DocAnalyzerProgressStatus;
73
+ started_at?: number;
74
+ percent: number;
75
+ /** The output format being used for processing (markdown or xml) */
76
+ output_format?: DocProcessorOutputFormat;
77
+ }
78
+ interface DocAnalyzerProgressStatus {
79
+ total: number;
80
+ processed: number;
81
+ success: number;
82
+ failed: number;
83
+ }
84
+ /**
85
+ * Adapt Tables Parameters, part of the request
86
+ */
87
+ export interface AdaptTablesParams {
88
+ /**
89
+ * JSON Schema to to convert the table into
90
+ */
91
+ target_schema: string;
92
+ /**
93
+ * Natural language description of the type item the table are composed of
94
+ */
95
+ item_name: string;
96
+ /**
97
+ * Natural language description of the type of table or item to convert
98
+ */
99
+ instructions?: string;
100
+ /**
101
+ * Format to return the data in (csv, json)
102
+ */
103
+ format?: "csv" | "json";
104
+ /**
105
+ * Process the table as a whole or by page
106
+ */
107
+ process_as?: "page" | "table";
108
+ /**
109
+ * Process the table as a CSV file
110
+ */
111
+ process_as_csv?: boolean;
112
+ }
113
+ interface DocAnalyzerRequestBase {
114
+ synchronous?: boolean;
115
+ notify_endpoints?: string[];
116
+ /**
117
+ * What environment to use to run the request
118
+ * If none specified the project embedded environment will be used
119
+ */
120
+ environment?: string;
121
+ }
122
+ export interface AdaptTablesRequest extends DocAnalyzerRequestBase, AdaptTablesParams {
123
+ }
124
+ /**
125
+ * Get Adapted Tables Request
126
+ * @param raw If true, the raw data will be returned
127
+ * @param format The format to return the data in (csv, json)
128
+ */
129
+ export interface GetAdaptedTablesRequestQuery {
130
+ raw?: boolean;
131
+ format: "csv" | "json";
132
+ }
133
+ /**
134
+ * The adapted table result format
135
+ */
136
+ export interface AdaptedTable {
137
+ comment?: string;
138
+ data: Record<string, any>[];
139
+ }
140
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-analyzer.d.ts","sourceRoot":"","sources":["../../../src/store/doc-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE5E,MAAM,WAAW,oBAAoB;IACjC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC;IACxF,IAAI,EAAE,oBAAoB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,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