@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,98 @@
1
+ import { UserGroupRef } from "./group.js";
2
+ import { ProjectRef, ProjectRoles } from "./project.js";
3
+ import { AccountRef } from "./user.js";
4
+ export declare enum ApiKeyTypes {
5
+ secret = "sk"
6
+ }
7
+ export interface ApiKey {
8
+ id: string;
9
+ name: string;
10
+ type: ApiKeyTypes;
11
+ role: ProjectRoles;
12
+ maskedValue?: string;
13
+ account: string;
14
+ project: ProjectRef;
15
+ enabled: boolean;
16
+ created_by: string;
17
+ updated_by: string;
18
+ created_at: Date;
19
+ updated_at: Date;
20
+ expires_at?: Date;
21
+ }
22
+ export interface CreateOrUpdateApiKeyPayload extends Partial<ApiKey> {
23
+ }
24
+ export interface ApiKeyWithValue extends Omit<ApiKey, "maskedValue"> {
25
+ value: string;
26
+ }
27
+ export interface CreatePublicKeyPayload {
28
+ name?: string;
29
+ projectId?: string;
30
+ ttl?: number;
31
+ }
32
+ export interface AuthTokenResponse {
33
+ token: string;
34
+ }
35
+ export interface AuthTokenPayload {
36
+ sub: string;
37
+ name: string;
38
+ email?: string;
39
+ picture?: string;
40
+ type: PrincipalType;
41
+ account: AccountRef;
42
+ account_roles: ProjectRoles[];
43
+ accounts: AccountRef[];
44
+ project?: ProjectRef;
45
+ project_roles?: ProjectRoles[];
46
+ /**
47
+ * The app names enabled for this token. Defaults to an empty array if no apps are enabled.
48
+ */
49
+ apps: string[];
50
+ /**
51
+ * The user ID (if any) attached to the token.
52
+ * This is set when the token is a user token or an agent token running as a user.
53
+ * Not set for impersonating tokens like project tokens.
54
+ */
55
+ user_id?: string;
56
+ /** groups */
57
+ groups?: UserGroupRef[];
58
+ /**
59
+ * API endpoints information to be used with this token.
60
+ * Either a n API domain like 'api.vertesia.io' | 'api-preview.vertesia.io' | 'api-staging.vertesia.io' | 'local'
61
+ * or explicit studio, store, and token URLs.
62
+ */
63
+ endpoints?: string | {
64
+ studio: string;
65
+ store: string;
66
+ token?: string;
67
+ };
68
+ iss: string;
69
+ aud: string;
70
+ exp: number;
71
+ tags?: string[];
72
+ permissions?: string[];
73
+ scopes?: string[];
74
+ /**
75
+ * Service caller information for agent and service account tokens.
76
+ * Contains audit information about who/what initiated the token request.
77
+ * For agent tokens, includes `onBehalfOf` with the original user's token payload.
78
+ */
79
+ service_caller?: {
80
+ /** The principal that requested the token (e.g., service account identity) */
81
+ id?: string;
82
+ name?: string;
83
+ email?: string;
84
+ /**
85
+ * For agent tokens: the verified token payload of the user/apikey the agent acts on behalf of.
86
+ * Contains the original user's name, email, picture, user_id, etc.
87
+ */
88
+ onBehalfOf?: AuthTokenPayload;
89
+ [key: string]: unknown;
90
+ };
91
+ }
92
+ export declare enum PrincipalType {
93
+ User = "user",
94
+ Group = "group",
95
+ ApiKey = "apikey",
96
+ ServiceAccount = "service_account",
97
+ Agent = "agent"
98
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apikey.d.ts","sourceRoot":"","sources":["../../src/apikey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,oBAAY,WAAW;IACnB,MAAM,OAAO;CAChB;AACD,MAAM,WAAW,MAAM;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,OAAO,CAA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MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;;OAIG;IACH,cAAc,CAAC,EAAE;QACb,8EAA8E;QAC9E,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;WAGG;QACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;QAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KAC1B,CAAC;CACL;AAED,oBAAY,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,cAAc,oBAAoB;IAClC,KAAK,UAAU;CAClB"}
@@ -0,0 +1,236 @@
1
+ import { JSONSchema } from "@llumiverse/common";
2
+ export interface AppUIConfig {
3
+ /**
4
+ * The source URL of the app. The src can be a template which contain
5
+ * a variable named `buildId` which will be replaced with the current build id.
6
+ * For example: `/plugins/vertesia-review-center-${buildId}`
7
+ */
8
+ src: string;
9
+ /**
10
+ * The isolation strategy. If not specified it defaults to shadow
11
+ * - shadow - use Shadow DOM to fully isolate the plugin from the host.
12
+ * - css - use CSS processing (like prefixing or other isolation techniques). Ligther but plugins may conflict with the host
13
+ */
14
+ isolation?: "shadow" | "css";
15
+ }
16
+ /**
17
+ * Authentication type for tool collections
18
+ */
19
+ export type ToolCollectionAuthType = "oauth" | "other";
20
+ /**
21
+ * Tool collection type
22
+ */
23
+ export type ToolCollectionType = "mcp" | "vertesia_sdk";
24
+ /**
25
+ * Base tool collection configuration
26
+ */
27
+ interface BaseToolCollectionObject {
28
+ /**
29
+ * The URL endpoint for the tool collection
30
+ */
31
+ url: string;
32
+ /**
33
+ * Optional authentication type required for this tool collection
34
+ */
35
+ auth?: ToolCollectionAuthType;
36
+ }
37
+ /**
38
+ * MCP tool collection configuration (requires name, description, and namespace)
39
+ */
40
+ export interface MCPToolCollectionObject extends BaseToolCollectionObject {
41
+ type: "mcp";
42
+ /**
43
+ * Name for the tool collection.
44
+ * Used as an identifier for the collection (e.g., for OAuth authentication).
45
+ */
46
+ name: string;
47
+ /**
48
+ * Description for the tool collection.
49
+ * Helps users understand what tools this collection provides.
50
+ */
51
+ description: string;
52
+ /**
53
+ * Prefix to use for tool names from this collection.
54
+ * Provides clean, readable tool names (e.g., "jira" instead of "https://mcp.atlassian.com/v1/mcp")
55
+ */
56
+ namespace: string;
57
+ }
58
+ /**
59
+ * Vertesia SDK tool collection configuration
60
+ */
61
+ export interface VertesiaSDKToolCollectionObject extends BaseToolCollectionObject {
62
+ type: "vertesia_sdk";
63
+ /**
64
+ * Optional namespace to use for tool names from this collection.
65
+ * If not provided, the tool server default will be used.
66
+ */
67
+ namespace?: string;
68
+ /**
69
+ * Optional name for the tool collection.
70
+ * If not provided, the tool server default will be used.
71
+ */
72
+ name?: string;
73
+ /**
74
+ * Optional description for the tool collection.
75
+ * If not provided, the tool server default will be used.
76
+ */
77
+ description?: string;
78
+ }
79
+ /**
80
+ * Tool collection configuration (object format)
81
+ */
82
+ export type ToolCollectionObject = MCPToolCollectionObject | VertesiaSDKToolCollectionObject;
83
+ /**
84
+ * Tool collection can be either:
85
+ * - A string URL (legacy format, with "mcp:" prefix for MCP servers)
86
+ * - An object with url, type, and optional auth (new format)
87
+ */
88
+ export type ToolCollection = string | ToolCollectionObject;
89
+ /**
90
+ * Normalizes a tool collection to the object format.
91
+ * Handles backward compatibility with string URLs.
92
+ *
93
+ * @param collection - String URL or ToolCollectionObject
94
+ * @returns Normalized ToolCollectionObject
95
+ */
96
+ export declare function normalizeToolCollection(collection: ToolCollection): ToolCollectionObject;
97
+ export interface AppManifestData {
98
+ /**
99
+ * The name of the app, used as the id in the system.
100
+ * Must be in kebab case (e.g. my-app).
101
+ */
102
+ name: string;
103
+ /**
104
+ * Visibility level of the app:
105
+ * - "public": visible to all accounts
106
+ * - "private": visible only to the owning account
107
+ * - "vertesia": visible only to Vertesia team members (any project)
108
+ */
109
+ visibility: "public" | "private" | "vertesia";
110
+ title: string;
111
+ description: string;
112
+ publisher: string;
113
+ /**
114
+ * A svg icon for the app.
115
+ */
116
+ icon?: string;
117
+ /**
118
+ * A color name to be used as the color of the app card (e.g. blue, red, green, etc.)
119
+ * If not specified a random color will be picked.
120
+ */
121
+ color?: string;
122
+ status: "beta" | "stable" | "deprecated";
123
+ ui?: AppUIConfig;
124
+ /**
125
+ * A list of tool collections endpoints to be used by this app.
126
+ * A tools collection endpoint is an URL which may end with a `?import` query string.
127
+ * If the `?import` query string is used the tool will be imported as a javascript module and not executed through a POST on the collections endpoint.
128
+ */
129
+ tool_collections?: ToolCollection[];
130
+ /**
131
+ * An URL providing interactions definitions in JSON format.
132
+ * The URL must provide 2 endpoints:
133
+ * 1. GET URL - must return a JSON array with the list of interactions (as AppInteractionRef[])
134
+ * 2. GET URL/{interaction_name} - must return the full interaction definition for the specified interaction.
135
+ */
136
+ interactions?: string;
137
+ /**
138
+ * A JSON chema for the app installation settings.
139
+ */
140
+ settings_schema?: JSONSchema;
141
+ }
142
+ export interface AppManifest extends AppManifestData {
143
+ id: string;
144
+ account: string;
145
+ created_at: string;
146
+ updated_at: string;
147
+ }
148
+ export interface AppInstallation {
149
+ id: string;
150
+ project: string;
151
+ manifest: string;
152
+ settings?: Record<string, any>;
153
+ created_at: string;
154
+ updated_at: string;
155
+ }
156
+ export interface AppInstallationWithManifest extends Omit<AppInstallation, 'manifest'> {
157
+ manifest: AppManifest;
158
+ }
159
+ export interface AppInstallationPayload {
160
+ app_id: string;
161
+ settings?: Record<string, any>;
162
+ }
163
+ export type AppInstallationKind = 'ui' | 'tools' | 'all';
164
+ /**
165
+ * A description of the tools provided by an app
166
+ */
167
+ export interface AppToolCollection {
168
+ /**
169
+ * The collection name
170
+ */
171
+ name: string;
172
+ /**
173
+ * Optional collection description
174
+ */
175
+ description?: string;
176
+ /**
177
+ * the tools provided by this collection
178
+ */
179
+ tools: {
180
+ name: string;
181
+ description?: string;
182
+ }[];
183
+ }
184
+ /**
185
+ * Information about a tool and its associated app installation.
186
+ * Used to look up which app provides a specific tool.
187
+ */
188
+ export interface ProjectToolInfo {
189
+ /**
190
+ * The tool name
191
+ */
192
+ tool_name: string;
193
+ /**
194
+ * Optional tool description
195
+ */
196
+ tool_description?: string;
197
+ /**
198
+ * The app name that provides this tool
199
+ */
200
+ app_name: string;
201
+ /**
202
+ * The app installation ID
203
+ */
204
+ app_install_id: string;
205
+ /**
206
+ * The app installation settings.
207
+ * Only included for agent tokens, not user tokens (security: may contain API keys).
208
+ */
209
+ settings?: Record<string, any>;
210
+ }
211
+ /**
212
+ * OAuth authentication status for an MCP tool collection
213
+ */
214
+ export interface OAuthAuthStatus {
215
+ collection_name: string;
216
+ authenticated: boolean;
217
+ mcp_server_url: string;
218
+ expires_at?: string;
219
+ scope?: string;
220
+ }
221
+ /**
222
+ * Response from OAuth authorization endpoint
223
+ */
224
+ export interface OAuthAuthorizeResponse {
225
+ authorization_url: string;
226
+ state: string;
227
+ }
228
+ /**
229
+ * Response from OAuth metadata endpoint
230
+ */
231
+ export interface OAuthMetadataResponse {
232
+ collection_name: string;
233
+ mcp_server_url: string;
234
+ metadata: any;
235
+ }
236
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,WAAW,WAAW;IACxB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEv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WAAW,eAAe;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,GAAG,CAAC;CACjB"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Types for ask_user tool UX configuration.
3
+ * These types enable the model to transmit structured UX parameters
4
+ * that render as interactive widgets instead of plain text.
5
+ */
6
+ /** Option for user selection in ask_user widget */
7
+ export interface AskUserOption {
8
+ /** Unique identifier returned when this option is selected */
9
+ id: string;
10
+ /** Display text for the option */
11
+ label: string;
12
+ /** Optional tooltip/description shown on hover */
13
+ description?: string;
14
+ }
15
+ /** UX configuration for ask_user messages */
16
+ export interface AskUserUxConfig {
17
+ /** Predefined options for the user to select from */
18
+ options?: AskUserOption[];
19
+ /** Visual style variant */
20
+ variant?: 'default' | 'warning' | 'info' | 'success';
21
+ /** Allow selecting multiple options (renders checkboxes instead of buttons) */
22
+ multiSelect?: boolean;
23
+ /** Show text input for free-form response */
24
+ allowFreeResponse?: boolean;
25
+ /** Placeholder text for free-form input */
26
+ placeholder?: string;
27
+ }
28
+ /** Message details structure for REQUEST_INPUT messages with UX config */
29
+ export interface AskUserMessageDetails {
30
+ /** UX configuration for rendering the ask_user widget */
31
+ ux?: AskUserUxConfig;
32
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ask-user.d.ts","sourceRoot":"","sources":["../../src/ask-user.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC1B,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,6CAA6C;AAC7C,MAAM,WAAW,eAAe;IAC5B,qDAAqD;IACrD,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;IAC1B,2BAA2B;IAC3B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IACrD,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,0EAA0E;AAC1E,MAAM,WAAW,qBAAqB;IAClC,yDAAyD;IACzD,EAAE,CAAC,EAAE,eAAe,CAAC;CACxB"}
@@ -0,0 +1,21 @@
1
+ import { EmailChannel, UserChannel } from "./interaction.js";
2
+ /**
3
+ * Find the email channel from a list of channels.
4
+ * @returns The email channel if found, undefined otherwise
5
+ */
6
+ export declare function findEmailChannel(channels?: UserChannel[]): EmailChannel | undefined;
7
+ /**
8
+ * Check if email channel is enabled in the channels list.
9
+ */
10
+ export declare function hasEmailChannel(channels?: UserChannel[]): boolean;
11
+ /**
12
+ * Update the email channel in a channels array (immutable).
13
+ * Returns a new array with the updated channel.
14
+ * If no email channel exists and to_email is provided, creates one.
15
+ */
16
+ export declare function updateEmailChannel(channels: UserChannel[] | undefined, updates: Partial<Omit<EmailChannel, "type">>): UserChannel[];
17
+ /**
18
+ * Update email threading info after sending or receiving an email.
19
+ * Adds the new messageId to references and updates in_reply_to.
20
+ */
21
+ export declare function updateEmailThreading(channels: UserChannel[] | undefined, messageId: string, subject?: string): UserChannel[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE7E;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,YAAY,GAAG,SAAS,CAEnF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,GAAG,OAAO,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAC9B,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EACnC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,GAC7C,WAAW,EAAE,CAoBf;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EACnC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACjB,WAAW,EAAE,CAcf"}
@@ -0,0 +1,31 @@
1
+ export interface FindPayload {
2
+ query: Record<string, any>;
3
+ offset?: number;
4
+ limit?: number;
5
+ select?: string;
6
+ all_revisions?: boolean;
7
+ from_root?: string;
8
+ }
9
+ export interface GenericCommandResponse {
10
+ status: string;
11
+ message: string;
12
+ err?: any;
13
+ details?: any;
14
+ }
15
+ export interface BulkOperationPayload {
16
+ /**
17
+ * The operation name
18
+ */
19
+ name: "change_type" | "delete" | "start_workflow" | "update";
20
+ /**
21
+ * The IDs of the objects to operate on
22
+ */
23
+ ids: string[];
24
+ /**
25
+ * The operation parameters.
26
+ */
27
+ params: Record<string, any>;
28
+ }
29
+ export interface BulkOperationResult {
30
+ status: "in_progress" | "completed" | "failed";
31
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,IAAI,EAAE,aAAa,GAAG,QAAQ,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IAE7D;;OAEG;IACH,GAAG,EAAE,MAAM,EAAE,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,EAAE,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;CAClD"}