@vertesia/client 1.1.1-dev.20260505.163000Z → 1.3.0-dev.20260620.061059Z

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 (582) hide show
  1. package/README.md +29 -0
  2. package/lib/{types/AccountApi.d.ts → AccountApi.d.ts} +5 -10
  3. package/lib/AccountApi.d.ts.map +1 -0
  4. package/lib/{esm/AccountApi.js → AccountApi.js} +5 -13
  5. package/lib/AccountApi.js.map +1 -0
  6. package/lib/{types/AccountsApi.d.ts → AccountsApi.d.ts} +3 -2
  7. package/lib/AccountsApi.d.ts.map +1 -0
  8. package/lib/{esm/AccountsApi.js → AccountsApi.js} +2 -2
  9. package/lib/AccountsApi.js.map +1 -0
  10. package/lib/{types/AnalyticsApi.d.ts → AnalyticsApi.d.ts} +3 -2
  11. package/lib/AnalyticsApi.d.ts.map +1 -0
  12. package/lib/{esm/AnalyticsApi.js → AnalyticsApi.js} +5 -5
  13. package/lib/AnalyticsApi.js.map +1 -0
  14. package/lib/{types/ApiKeysApi.d.ts → ApiKeysApi.d.ts} +3 -2
  15. package/lib/ApiKeysApi.d.ts.map +1 -0
  16. package/lib/ApiKeysApi.js.map +1 -0
  17. package/lib/{types/AppsApi.d.ts → AppsApi.d.ts} +40 -2
  18. package/lib/AppsApi.d.ts.map +1 -0
  19. package/lib/{esm/AppsApi.js → AppsApi.js} +87 -14
  20. package/lib/AppsApi.js.map +1 -0
  21. package/lib/{types/AuditTrailApi.d.ts → AuditTrailApi.d.ts} +2 -1
  22. package/lib/AuditTrailApi.d.ts.map +1 -0
  23. package/lib/{esm/AuditTrailApi.js → AuditTrailApi.js} +1 -1
  24. package/lib/AuditTrailApi.js.map +1 -0
  25. package/lib/{types/CommandsApi.d.ts → CommandsApi.d.ts} +3 -2
  26. package/lib/CommandsApi.d.ts.map +1 -0
  27. package/lib/{esm/CommandsApi.js → CommandsApi.js} +3 -3
  28. package/lib/CommandsApi.js.map +1 -0
  29. package/lib/{types/EnvironmentsApi.d.ts → EnvironmentsApi.d.ts} +5 -4
  30. package/lib/EnvironmentsApi.d.ts.map +1 -0
  31. package/lib/{esm/EnvironmentsApi.js → EnvironmentsApi.js} +13 -13
  32. package/lib/EnvironmentsApi.js.map +1 -0
  33. package/lib/{types/GroupsApi.d.ts → GroupsApi.d.ts} +3 -2
  34. package/lib/GroupsApi.d.ts.map +1 -0
  35. package/lib/{esm/GroupsApi.js → GroupsApi.js} +8 -8
  36. package/lib/GroupsApi.js.map +1 -0
  37. package/lib/IamApi.d.ts +58 -0
  38. package/lib/IamApi.d.ts.map +1 -0
  39. package/lib/IamApi.js +76 -0
  40. package/lib/IamApi.js.map +1 -0
  41. package/lib/{types/InteractionBase.d.ts → InteractionBase.d.ts} +6 -5
  42. package/lib/InteractionBase.d.ts.map +1 -0
  43. package/lib/{esm/InteractionBase.js → InteractionBase.js} +4 -4
  44. package/lib/InteractionBase.js.map +1 -0
  45. package/lib/{types/InteractionCatalogApi.d.ts → InteractionCatalogApi.d.ts} +3 -2
  46. package/lib/InteractionCatalogApi.d.ts.map +1 -0
  47. package/lib/{esm/InteractionCatalogApi.js → InteractionCatalogApi.js} +12 -12
  48. package/lib/InteractionCatalogApi.js.map +1 -0
  49. package/lib/{types/InteractionOutput.d.ts → InteractionOutput.d.ts} +13 -12
  50. package/lib/InteractionOutput.d.ts.map +1 -0
  51. package/lib/{esm/InteractionOutput.js → InteractionOutput.js} +22 -25
  52. package/lib/InteractionOutput.js.map +1 -0
  53. package/lib/{types/InteractionResult.example.d.ts → InteractionResult.example.d.ts} +1 -0
  54. package/lib/InteractionResult.example.d.ts.map +1 -0
  55. package/lib/{esm/InteractionResult.example.js → InteractionResult.example.js} +4 -4
  56. package/lib/InteractionResult.example.js.map +1 -0
  57. package/lib/{types/InteractionsApi.d.ts → InteractionsApi.d.ts} +17 -6
  58. package/lib/InteractionsApi.d.ts.map +1 -0
  59. package/lib/{esm/InteractionsApi.js → InteractionsApi.js} +45 -28
  60. package/lib/InteractionsApi.js.map +1 -0
  61. package/lib/{types/OAuthClientsApi.d.ts → OAuthClientsApi.d.ts} +4 -2
  62. package/lib/OAuthClientsApi.d.ts.map +1 -0
  63. package/lib/{esm/OAuthClientsApi.js → OAuthClientsApi.js} +3 -0
  64. package/lib/OAuthClientsApi.js.map +1 -0
  65. package/lib/{types/OAuthGrantsApi.d.ts → OAuthGrantsApi.d.ts} +2 -1
  66. package/lib/OAuthGrantsApi.d.ts.map +1 -0
  67. package/lib/OAuthGrantsApi.js.map +1 -0
  68. package/lib/{types/OAuthProvidersApi.d.ts → OAuthProvidersApi.d.ts} +3 -2
  69. package/lib/OAuthProvidersApi.d.ts.map +1 -0
  70. package/lib/OAuthProvidersApi.js.map +1 -0
  71. package/lib/OAuthServerApi.d.ts +19 -0
  72. package/lib/OAuthServerApi.d.ts.map +1 -0
  73. package/lib/OAuthServerApi.js +48 -0
  74. package/lib/OAuthServerApi.js.map +1 -0
  75. package/lib/{types/ProjectsApi.d.ts → ProjectsApi.d.ts} +8 -5
  76. package/lib/ProjectsApi.d.ts.map +1 -0
  77. package/lib/{esm/ProjectsApi.js → ProjectsApi.js} +21 -12
  78. package/lib/ProjectsApi.js.map +1 -0
  79. package/lib/{types/PromptsApi.d.ts → PromptsApi.d.ts} +17 -9
  80. package/lib/PromptsApi.d.ts.map +1 -0
  81. package/lib/{esm/PromptsApi.js → PromptsApi.js} +16 -18
  82. package/lib/PromptsApi.js.map +1 -0
  83. package/lib/RefsApi.d.ts +7 -0
  84. package/lib/RefsApi.d.ts.map +1 -0
  85. package/lib/{esm/RefsApi.js → RefsApi.js} +2 -2
  86. package/lib/RefsApi.js.map +1 -0
  87. package/lib/{types/RemoteMcpConnectionsApi.d.ts → RemoteMcpConnectionsApi.d.ts} +3 -2
  88. package/lib/RemoteMcpConnectionsApi.d.ts.map +1 -0
  89. package/lib/{esm/RemoteMcpConnectionsApi.js → RemoteMcpConnectionsApi.js} +3 -3
  90. package/lib/RemoteMcpConnectionsApi.js.map +1 -0
  91. package/lib/{types/RunsApi.d.ts → RunsApi.d.ts} +11 -7
  92. package/lib/RunsApi.d.ts.map +1 -0
  93. package/lib/{esm/RunsApi.js → RunsApi.js} +14 -12
  94. package/lib/RunsApi.js.map +1 -0
  95. package/lib/SecretsApi.d.ts +18 -0
  96. package/lib/SecretsApi.d.ts.map +1 -0
  97. package/lib/SecretsApi.js +30 -0
  98. package/lib/SecretsApi.js.map +1 -0
  99. package/lib/{types/SkillsApi.d.ts → SkillsApi.d.ts} +3 -2
  100. package/lib/SkillsApi.d.ts.map +1 -0
  101. package/lib/{esm/SkillsApi.js → SkillsApi.js} +3 -3
  102. package/lib/SkillsApi.js.map +1 -0
  103. package/lib/{types/StreamSource.d.ts → StreamSource.d.ts} +1 -0
  104. package/lib/StreamSource.d.ts.map +1 -0
  105. package/lib/StreamSource.js.map +1 -0
  106. package/lib/ToolsApi.d.ts +36 -0
  107. package/lib/ToolsApi.d.ts.map +1 -0
  108. package/lib/ToolsApi.js +46 -0
  109. package/lib/ToolsApi.js.map +1 -0
  110. package/lib/{types/TrainingApi.d.ts → TrainingApi.d.ts} +7 -6
  111. package/lib/TrainingApi.d.ts.map +1 -0
  112. package/lib/TrainingApi.js +51 -0
  113. package/lib/TrainingApi.js.map +1 -0
  114. package/lib/{types/UsersApi.d.ts → UsersApi.d.ts} +3 -2
  115. package/lib/UsersApi.d.ts.map +1 -0
  116. package/lib/{esm/UsersApi.js → UsersApi.js} +3 -3
  117. package/lib/UsersApi.js.map +1 -0
  118. package/lib/{types/client.d.ts → client.d.ts} +55 -27
  119. package/lib/client.d.ts.map +1 -0
  120. package/lib/{esm/client.js → client.js} +113 -61
  121. package/lib/client.js.map +1 -0
  122. package/lib/{types/execute.d.ts → execute.d.ts} +5 -4
  123. package/lib/execute.d.ts.map +1 -0
  124. package/lib/{esm/execute.js → execute.js} +29 -11
  125. package/lib/execute.js.map +1 -0
  126. package/lib/{types/index.d.ts → index.d.ts} +9 -8
  127. package/lib/index.d.ts.map +1 -0
  128. package/lib/{esm/index.js → index.js} +4 -2
  129. package/lib/index.js.map +1 -0
  130. package/lib/{types/nodejs → nodejs}/NodeStreamSource.d.ts +3 -2
  131. package/lib/nodejs/NodeStreamSource.d.ts.map +1 -0
  132. package/lib/{esm/nodejs → nodejs}/NodeStreamSource.js +3 -3
  133. package/lib/nodejs/NodeStreamSource.js.map +1 -0
  134. package/lib/nodejs/index.d.ts +2 -0
  135. package/lib/nodejs/index.d.ts.map +1 -0
  136. package/lib/nodejs/index.js +2 -0
  137. package/lib/nodejs/index.js.map +1 -0
  138. package/lib/{types/store → store}/AgentsApi.d.ts +60 -9
  139. package/lib/store/AgentsApi.d.ts.map +1 -0
  140. package/lib/{esm/store → store}/AgentsApi.js +174 -53
  141. package/lib/store/AgentsApi.js.map +1 -0
  142. package/lib/{types/store → store}/AnalyzeDocApi.d.ts +3 -2
  143. package/lib/store/AnalyzeDocApi.d.ts.map +1 -0
  144. package/lib/{esm/store → store}/AnalyzeDocApi.js +10 -10
  145. package/lib/store/AnalyzeDocApi.js.map +1 -0
  146. package/lib/{types/store → store}/CollectionsApi.d.ts +6 -5
  147. package/lib/store/CollectionsApi.d.ts.map +1 -0
  148. package/lib/{esm/store → store}/CollectionsApi.js +22 -22
  149. package/lib/store/CollectionsApi.js.map +1 -0
  150. package/lib/{types/store → store}/CostApi.d.ts +3 -2
  151. package/lib/store/CostApi.d.ts.map +1 -0
  152. package/lib/store/CostApi.js.map +1 -0
  153. package/lib/{types/store → store}/DashboardApi.d.ts +3 -2
  154. package/lib/store/DashboardApi.d.ts.map +1 -0
  155. package/lib/{esm/store → store}/DashboardApi.js +7 -4
  156. package/lib/store/DashboardApi.js.map +1 -0
  157. package/lib/{types/store → store}/DataApi.d.ts +4 -3
  158. package/lib/store/DataApi.d.ts.map +1 -0
  159. package/lib/{esm/store → store}/DataApi.js +6 -6
  160. package/lib/store/DataApi.js.map +1 -0
  161. package/lib/{types/store → store}/EmailApi.d.ts +3 -2
  162. package/lib/store/EmailApi.d.ts.map +1 -0
  163. package/lib/{esm/store → store}/EmailApi.js +5 -5
  164. package/lib/store/EmailApi.js.map +1 -0
  165. package/lib/store/EmbeddingsApi.d.ts +13 -0
  166. package/lib/store/EmbeddingsApi.d.ts.map +1 -0
  167. package/lib/store/EmbeddingsApi.js +25 -0
  168. package/lib/store/EmbeddingsApi.js.map +1 -0
  169. package/lib/{types/store → store}/FilesApi.d.ts +22 -7
  170. package/lib/store/FilesApi.d.ts.map +1 -0
  171. package/lib/{esm/store → store}/FilesApi.js +56 -51
  172. package/lib/store/FilesApi.js.map +1 -0
  173. package/lib/{types/store → store}/HiveMemoryApi.d.ts +3 -2
  174. package/lib/store/HiveMemoryApi.d.ts.map +1 -0
  175. package/lib/{esm/store → store}/HiveMemoryApi.js +11 -11
  176. package/lib/{esm/store → store}/HiveMemoryApi.js.map +1 -1
  177. package/lib/{types/store → store}/IndexingApi.d.ts +16 -10
  178. package/lib/store/IndexingApi.d.ts.map +1 -0
  179. package/lib/{esm/store → store}/IndexingApi.js +57 -45
  180. package/lib/store/IndexingApi.js.map +1 -0
  181. package/lib/{types/store → store}/ObjectsApi.d.ts +16 -11
  182. package/lib/store/ObjectsApi.d.ts.map +1 -0
  183. package/lib/{esm/store → store}/ObjectsApi.js +46 -63
  184. package/lib/store/ObjectsApi.js.map +1 -0
  185. package/lib/{types/store → store}/PendingAsksApi.d.ts +5 -2
  186. package/lib/store/PendingAsksApi.d.ts.map +1 -0
  187. package/lib/{esm/store → store}/PendingAsksApi.js +4 -4
  188. package/lib/store/PendingAsksApi.js.map +1 -0
  189. package/lib/store/ProcessApi.d.ts +25 -0
  190. package/lib/store/ProcessApi.d.ts.map +1 -0
  191. package/lib/store/ProcessApi.js +42 -0
  192. package/lib/store/ProcessApi.js.map +1 -0
  193. package/lib/{types/store → store}/QueryApi.d.ts +2 -1
  194. package/lib/store/QueryApi.d.ts.map +1 -0
  195. package/lib/{esm/store → store}/QueryApi.js +3 -3
  196. package/lib/store/QueryApi.js.map +1 -0
  197. package/lib/{types/store → store}/RenderingApi.d.ts +3 -2
  198. package/lib/store/RenderingApi.d.ts.map +1 -0
  199. package/lib/{esm/store → store}/RenderingApi.js +8 -8
  200. package/lib/store/RenderingApi.js.map +1 -0
  201. package/lib/{types/store → store}/SchedulesApi.d.ts +3 -2
  202. package/lib/store/SchedulesApi.d.ts.map +1 -0
  203. package/lib/{esm/store → store}/SchedulesApi.js +4 -4
  204. package/lib/store/SchedulesApi.js.map +1 -0
  205. package/lib/store/TaskApi.d.ts +16 -0
  206. package/lib/store/TaskApi.d.ts.map +1 -0
  207. package/lib/store/TaskApi.js +42 -0
  208. package/lib/store/TaskApi.js.map +1 -0
  209. package/lib/{types/store → store}/ToolsApi.d.ts +3 -2
  210. package/lib/store/ToolsApi.d.ts.map +1 -0
  211. package/lib/{esm/store → store}/ToolsApi.js +2 -2
  212. package/lib/store/ToolsApi.js.map +1 -0
  213. package/lib/{types/store → store}/TypeCatalogApi.d.ts +4 -3
  214. package/lib/store/TypeCatalogApi.d.ts.map +1 -0
  215. package/lib/{esm/store → store}/TypeCatalogApi.js +5 -5
  216. package/lib/store/TypeCatalogApi.js.map +1 -0
  217. package/lib/{types/store → store}/TypesApi.d.ts +5 -4
  218. package/lib/store/TypesApi.d.ts.map +1 -0
  219. package/lib/{esm/store → store}/TypesApi.js +12 -12
  220. package/lib/store/TypesApi.js.map +1 -0
  221. package/lib/{types/store → store}/WorkflowsApi.d.ts +11 -9
  222. package/lib/store/WorkflowsApi.d.ts.map +1 -0
  223. package/lib/{esm/store → store}/WorkflowsApi.js +62 -52
  224. package/lib/store/WorkflowsApi.js.map +1 -0
  225. package/lib/store/client.d.ts +62 -0
  226. package/lib/store/client.d.ts.map +1 -0
  227. package/lib/store/client.js +106 -0
  228. package/lib/store/client.js.map +1 -0
  229. package/lib/{types/store → store}/errors.d.ts +2 -1
  230. package/lib/store/errors.d.ts.map +1 -0
  231. package/lib/store/errors.js +7 -0
  232. package/lib/store/errors.js.map +1 -0
  233. package/lib/store/index.d.ts +21 -0
  234. package/lib/store/index.d.ts.map +1 -0
  235. package/lib/store/index.js +21 -0
  236. package/lib/store/index.js.map +1 -0
  237. package/lib/store/signed-url.d.ts +39 -0
  238. package/lib/store/signed-url.d.ts.map +1 -0
  239. package/lib/store/signed-url.js +153 -0
  240. package/lib/store/signed-url.js.map +1 -0
  241. package/lib/store/stream-termination.d.ts +4 -0
  242. package/lib/store/stream-termination.d.ts.map +1 -0
  243. package/lib/store/stream-termination.js +31 -0
  244. package/lib/store/stream-termination.js.map +1 -0
  245. package/lib/{types/store → store}/version.d.ts +2 -0
  246. package/lib/store/version.d.ts.map +1 -0
  247. package/lib/{esm/store → store}/version.js +1 -0
  248. package/lib/store/version.js.map +1 -0
  249. package/lib/vertesia-client.js +1 -1
  250. package/lib/vertesia-client.js.map +1 -1
  251. package/package.json +26 -38
  252. package/src/AccountApi.ts +10 -22
  253. package/src/AccountsApi.ts +3 -9
  254. package/src/AnalyticsApi.ts +6 -8
  255. package/src/ApiKeysApi.ts +10 -2
  256. package/src/AppsApi.ts +131 -27
  257. package/src/AuditTrailApi.ts +4 -4
  258. package/src/CommandsApi.ts +7 -8
  259. package/src/EnvironmentsApi.ts +27 -23
  260. package/src/GroupsApi.ts +15 -10
  261. package/src/IamApi.ts +56 -22
  262. package/src/InteractionBase.ts +18 -9
  263. package/src/InteractionCatalogApi.ts +15 -20
  264. package/src/InteractionOutput.test.ts +40 -57
  265. package/src/InteractionOutput.ts +55 -47
  266. package/src/InteractionResult.example.ts +30 -18
  267. package/src/InteractionsApi.ts +113 -59
  268. package/src/OAuthClientsApi.ts +6 -1
  269. package/src/OAuthGrantsApi.ts +1 -1
  270. package/src/OAuthProvidersApi.ts +3 -4
  271. package/src/OAuthServerApi.ts +53 -6
  272. package/src/ProjectsApi.ts +70 -31
  273. package/src/PromptsApi.ts +44 -29
  274. package/src/RefsApi.ts +4 -10
  275. package/src/RemoteMcpConnectionsApi.ts +6 -7
  276. package/src/RunsApi.ts +25 -20
  277. package/src/SecretsApi.ts +56 -0
  278. package/src/SkillsApi.ts +5 -12
  279. package/src/StreamSource.ts +6 -1
  280. package/src/ToolsApi.ts +52 -0
  281. package/src/TrainingApi.ts +27 -25
  282. package/src/UsersApi.ts +6 -8
  283. package/src/client.test.ts +68 -2
  284. package/src/client.ts +160 -103
  285. package/src/execute.ts +60 -20
  286. package/src/index.ts +8 -8
  287. package/src/nodejs/NodeStreamSource.ts +4 -5
  288. package/src/nodejs/index.ts +1 -1
  289. package/src/store/AgentsApi.ts +308 -148
  290. package/src/store/AnalyzeDocApi.ts +39 -21
  291. package/src/store/CollectionsApi.ts +40 -38
  292. package/src/store/CostApi.ts +14 -19
  293. package/src/store/DashboardApi.ts +24 -27
  294. package/src/store/DataApi.ts +29 -32
  295. package/src/store/EmailApi.ts +6 -6
  296. package/src/store/EmbeddingsApi.ts +15 -15
  297. package/src/store/FilesApi.ts +80 -85
  298. package/src/store/HiveMemoryApi.ts +17 -28
  299. package/src/store/IndexingApi.ts +113 -76
  300. package/src/store/ObjectsApi.ts +100 -131
  301. package/src/store/PendingAsksApi.ts +7 -5
  302. package/src/store/ProcessApi.ts +61 -0
  303. package/src/store/QueryApi.ts +3 -4
  304. package/src/store/RenderingApi.ts +14 -17
  305. package/src/store/SchedulesApi.ts +6 -6
  306. package/src/store/TaskApi.ts +45 -0
  307. package/src/store/ToolsApi.ts +3 -3
  308. package/src/store/TypeCatalogApi.ts +56 -53
  309. package/src/store/TypesApi.ts +26 -18
  310. package/src/store/WorkflowsApi.ts +158 -152
  311. package/src/store/client.ts +58 -39
  312. package/src/store/errors.ts +3 -3
  313. package/src/store/index.ts +20 -18
  314. package/src/store/signed-url.test.ts +182 -0
  315. package/src/store/signed-url.ts +184 -0
  316. package/src/store/stream-gap.test.ts +230 -0
  317. package/src/store/stream-termination.test.ts +58 -0
  318. package/src/store/stream-termination.ts +40 -0
  319. package/src/store/version.ts +2 -1
  320. package/lib/cjs/AccountApi.js +0 -85
  321. package/lib/cjs/AccountApi.js.map +0 -1
  322. package/lib/cjs/AccountsApi.js +0 -16
  323. package/lib/cjs/AccountsApi.js.map +0 -1
  324. package/lib/cjs/AnalyticsApi.js +0 -43
  325. package/lib/cjs/AnalyticsApi.js.map +0 -1
  326. package/lib/cjs/ApiKeysApi.js +0 -61
  327. package/lib/cjs/ApiKeysApi.js.map +0 -1
  328. package/lib/cjs/AppsApi.js +0 -137
  329. package/lib/cjs/AppsApi.js.map +0 -1
  330. package/lib/cjs/AuditTrailApi.js +0 -39
  331. package/lib/cjs/AuditTrailApi.js.map +0 -1
  332. package/lib/cjs/CommandsApi.js +0 -19
  333. package/lib/cjs/CommandsApi.js.map +0 -1
  334. package/lib/cjs/EnvironmentsApi.js +0 -72
  335. package/lib/cjs/EnvironmentsApi.js.map +0 -1
  336. package/lib/cjs/GroupsApi.js +0 -86
  337. package/lib/cjs/GroupsApi.js.map +0 -1
  338. package/lib/cjs/IamApi.js +0 -53
  339. package/lib/cjs/IamApi.js.map +0 -1
  340. package/lib/cjs/InteractionBase.js +0 -44
  341. package/lib/cjs/InteractionBase.js.map +0 -1
  342. package/lib/cjs/InteractionCatalogApi.js +0 -64
  343. package/lib/cjs/InteractionCatalogApi.js.map +0 -1
  344. package/lib/cjs/InteractionOutput.js +0 -300
  345. package/lib/cjs/InteractionOutput.js.map +0 -1
  346. package/lib/cjs/InteractionResult.example.js +0 -57
  347. package/lib/cjs/InteractionResult.example.js.map +0 -1
  348. package/lib/cjs/InteractionsApi.js +0 -260
  349. package/lib/cjs/InteractionsApi.js.map +0 -1
  350. package/lib/cjs/OAuthClientsApi.js +0 -25
  351. package/lib/cjs/OAuthClientsApi.js.map +0 -1
  352. package/lib/cjs/OAuthGrantsApi.js +0 -30
  353. package/lib/cjs/OAuthGrantsApi.js.map +0 -1
  354. package/lib/cjs/OAuthProvidersApi.js +0 -43
  355. package/lib/cjs/OAuthProvidersApi.js.map +0 -1
  356. package/lib/cjs/OAuthServerApi.js +0 -22
  357. package/lib/cjs/OAuthServerApi.js.map +0 -1
  358. package/lib/cjs/ProjectsApi.js +0 -105
  359. package/lib/cjs/ProjectsApi.js.map +0 -1
  360. package/lib/cjs/PromptsApi.js +0 -135
  361. package/lib/cjs/PromptsApi.js.map +0 -1
  362. package/lib/cjs/RefsApi.js +0 -14
  363. package/lib/cjs/RefsApi.js.map +0 -1
  364. package/lib/cjs/RemoteMcpConnectionsApi.js +0 -38
  365. package/lib/cjs/RemoteMcpConnectionsApi.js.map +0 -1
  366. package/lib/cjs/RunsApi.js +0 -115
  367. package/lib/cjs/RunsApi.js.map +0 -1
  368. package/lib/cjs/SkillsApi.js +0 -39
  369. package/lib/cjs/SkillsApi.js.map +0 -1
  370. package/lib/cjs/StreamSource.js +0 -17
  371. package/lib/cjs/StreamSource.js.map +0 -1
  372. package/lib/cjs/TrainingApi.js +0 -54
  373. package/lib/cjs/TrainingApi.js.map +0 -1
  374. package/lib/cjs/UsersApi.js +0 -19
  375. package/lib/cjs/UsersApi.js.map +0 -1
  376. package/lib/cjs/client.js +0 -375
  377. package/lib/cjs/client.js.map +0 -1
  378. package/lib/cjs/execute.js +0 -160
  379. package/lib/cjs/execute.js.map +0 -1
  380. package/lib/cjs/index.js +0 -36
  381. package/lib/cjs/index.js.map +0 -1
  382. package/lib/cjs/nodejs/NodeStreamSource.js +0 -45
  383. package/lib/cjs/nodejs/NodeStreamSource.js.map +0 -1
  384. package/lib/cjs/nodejs/index.js +0 -18
  385. package/lib/cjs/nodejs/index.js.map +0 -1
  386. package/lib/cjs/package.json +0 -3
  387. package/lib/cjs/store/AgentsApi.js +0 -663
  388. package/lib/cjs/store/AgentsApi.js.map +0 -1
  389. package/lib/cjs/store/AnalyzeDocApi.js +0 -56
  390. package/lib/cjs/store/AnalyzeDocApi.js.map +0 -1
  391. package/lib/cjs/store/CollectionsApi.js +0 -131
  392. package/lib/cjs/store/CollectionsApi.js.map +0 -1
  393. package/lib/cjs/store/CommandsApi.js +0 -17
  394. package/lib/cjs/store/CommandsApi.js.map +0 -1
  395. package/lib/cjs/store/CostApi.js +0 -62
  396. package/lib/cjs/store/CostApi.js.map +0 -1
  397. package/lib/cjs/store/DashboardApi.js +0 -182
  398. package/lib/cjs/store/DashboardApi.js.map +0 -1
  399. package/lib/cjs/store/DataApi.js +0 -436
  400. package/lib/cjs/store/DataApi.js.map +0 -1
  401. package/lib/cjs/store/EmailApi.js +0 -103
  402. package/lib/cjs/store/EmailApi.js.map +0 -1
  403. package/lib/cjs/store/EmbeddingsApi.js +0 -29
  404. package/lib/cjs/store/EmbeddingsApi.js.map +0 -1
  405. package/lib/cjs/store/FilesApi.js +0 -286
  406. package/lib/cjs/store/FilesApi.js.map +0 -1
  407. package/lib/cjs/store/HiveMemoryApi.js +0 -174
  408. package/lib/cjs/store/HiveMemoryApi.js.map +0 -1
  409. package/lib/cjs/store/IndexingApi.js +0 -308
  410. package/lib/cjs/store/IndexingApi.js.map +0 -1
  411. package/lib/cjs/store/ObjectsApi.js +0 -340
  412. package/lib/cjs/store/ObjectsApi.js.map +0 -1
  413. package/lib/cjs/store/PendingAsksApi.js +0 -43
  414. package/lib/cjs/store/PendingAsksApi.js.map +0 -1
  415. package/lib/cjs/store/QueryApi.js +0 -67
  416. package/lib/cjs/store/QueryApi.js.map +0 -1
  417. package/lib/cjs/store/RenderingApi.js +0 -84
  418. package/lib/cjs/store/RenderingApi.js.map +0 -1
  419. package/lib/cjs/store/SchedulesApi.js +0 -103
  420. package/lib/cjs/store/SchedulesApi.js.map +0 -1
  421. package/lib/cjs/store/ToolsApi.js +0 -21
  422. package/lib/cjs/store/ToolsApi.js.map +0 -1
  423. package/lib/cjs/store/TypeCatalogApi.js +0 -50
  424. package/lib/cjs/store/TypeCatalogApi.js.map +0 -1
  425. package/lib/cjs/store/TypesApi.js +0 -60
  426. package/lib/cjs/store/TypesApi.js.map +0 -1
  427. package/lib/cjs/store/WorkersApi.js +0 -16
  428. package/lib/cjs/store/WorkersApi.js.map +0 -1
  429. package/lib/cjs/store/WorkflowsApi.js +0 -621
  430. package/lib/cjs/store/WorkflowsApi.js.map +0 -1
  431. package/lib/cjs/store/client.js +0 -93
  432. package/lib/cjs/store/client.js.map +0 -1
  433. package/lib/cjs/store/errors.js +0 -11
  434. package/lib/cjs/store/errors.js.map +0 -1
  435. package/lib/cjs/store/index.js +0 -34
  436. package/lib/cjs/store/index.js.map +0 -1
  437. package/lib/cjs/store/version.js +0 -6
  438. package/lib/cjs/store/version.js.map +0 -1
  439. package/lib/esm/AccountApi.js.map +0 -1
  440. package/lib/esm/AccountsApi.js.map +0 -1
  441. package/lib/esm/AnalyticsApi.js.map +0 -1
  442. package/lib/esm/ApiKeysApi.js.map +0 -1
  443. package/lib/esm/AppsApi.js.map +0 -1
  444. package/lib/esm/AuditTrailApi.js.map +0 -1
  445. package/lib/esm/CommandsApi.js.map +0 -1
  446. package/lib/esm/EnvironmentsApi.js.map +0 -1
  447. package/lib/esm/GroupsApi.js.map +0 -1
  448. package/lib/esm/IamApi.js +0 -47
  449. package/lib/esm/IamApi.js.map +0 -1
  450. package/lib/esm/InteractionBase.js.map +0 -1
  451. package/lib/esm/InteractionCatalogApi.js.map +0 -1
  452. package/lib/esm/InteractionOutput.js.map +0 -1
  453. package/lib/esm/InteractionResult.example.js.map +0 -1
  454. package/lib/esm/InteractionsApi.js.map +0 -1
  455. package/lib/esm/OAuthClientsApi.js.map +0 -1
  456. package/lib/esm/OAuthGrantsApi.js.map +0 -1
  457. package/lib/esm/OAuthProvidersApi.js.map +0 -1
  458. package/lib/esm/OAuthServerApi.js +0 -19
  459. package/lib/esm/OAuthServerApi.js.map +0 -1
  460. package/lib/esm/ProjectsApi.js.map +0 -1
  461. package/lib/esm/PromptsApi.js.map +0 -1
  462. package/lib/esm/RefsApi.js.map +0 -1
  463. package/lib/esm/RemoteMcpConnectionsApi.js.map +0 -1
  464. package/lib/esm/RunsApi.js.map +0 -1
  465. package/lib/esm/SkillsApi.js.map +0 -1
  466. package/lib/esm/StreamSource.js.map +0 -1
  467. package/lib/esm/TrainingApi.js +0 -51
  468. package/lib/esm/TrainingApi.js.map +0 -1
  469. package/lib/esm/UsersApi.js.map +0 -1
  470. package/lib/esm/client.js.map +0 -1
  471. package/lib/esm/execute.js.map +0 -1
  472. package/lib/esm/index.js.map +0 -1
  473. package/lib/esm/nodejs/NodeStreamSource.js.map +0 -1
  474. package/lib/esm/nodejs/index.js +0 -2
  475. package/lib/esm/nodejs/index.js.map +0 -1
  476. package/lib/esm/store/AgentsApi.js.map +0 -1
  477. package/lib/esm/store/AnalyzeDocApi.js.map +0 -1
  478. package/lib/esm/store/CollectionsApi.js.map +0 -1
  479. package/lib/esm/store/CommandsApi.js +0 -13
  480. package/lib/esm/store/CommandsApi.js.map +0 -1
  481. package/lib/esm/store/CostApi.js.map +0 -1
  482. package/lib/esm/store/DashboardApi.js.map +0 -1
  483. package/lib/esm/store/DataApi.js.map +0 -1
  484. package/lib/esm/store/EmailApi.js.map +0 -1
  485. package/lib/esm/store/EmbeddingsApi.js +0 -25
  486. package/lib/esm/store/EmbeddingsApi.js.map +0 -1
  487. package/lib/esm/store/FilesApi.js.map +0 -1
  488. package/lib/esm/store/IndexingApi.js.map +0 -1
  489. package/lib/esm/store/ObjectsApi.js.map +0 -1
  490. package/lib/esm/store/PendingAsksApi.js.map +0 -1
  491. package/lib/esm/store/QueryApi.js.map +0 -1
  492. package/lib/esm/store/RenderingApi.js.map +0 -1
  493. package/lib/esm/store/SchedulesApi.js.map +0 -1
  494. package/lib/esm/store/ToolsApi.js.map +0 -1
  495. package/lib/esm/store/TypeCatalogApi.js.map +0 -1
  496. package/lib/esm/store/TypesApi.js.map +0 -1
  497. package/lib/esm/store/WorkersApi.js +0 -12
  498. package/lib/esm/store/WorkersApi.js.map +0 -1
  499. package/lib/esm/store/WorkflowsApi.js.map +0 -1
  500. package/lib/esm/store/client.js +0 -89
  501. package/lib/esm/store/client.js.map +0 -1
  502. package/lib/esm/store/errors.js +0 -7
  503. package/lib/esm/store/errors.js.map +0 -1
  504. package/lib/esm/store/index.js +0 -18
  505. package/lib/esm/store/index.js.map +0 -1
  506. package/lib/esm/store/version.js.map +0 -1
  507. package/lib/tsconfig.tsbuildinfo +0 -1
  508. package/lib/types/AccountApi.d.ts.map +0 -1
  509. package/lib/types/AccountsApi.d.ts.map +0 -1
  510. package/lib/types/AnalyticsApi.d.ts.map +0 -1
  511. package/lib/types/ApiKeysApi.d.ts.map +0 -1
  512. package/lib/types/AppsApi.d.ts.map +0 -1
  513. package/lib/types/AuditTrailApi.d.ts.map +0 -1
  514. package/lib/types/CommandsApi.d.ts.map +0 -1
  515. package/lib/types/EnvironmentsApi.d.ts.map +0 -1
  516. package/lib/types/GroupsApi.d.ts.map +0 -1
  517. package/lib/types/IamApi.d.ts +0 -36
  518. package/lib/types/IamApi.d.ts.map +0 -1
  519. package/lib/types/InteractionBase.d.ts.map +0 -1
  520. package/lib/types/InteractionCatalogApi.d.ts.map +0 -1
  521. package/lib/types/InteractionOutput.d.ts.map +0 -1
  522. package/lib/types/InteractionResult.example.d.ts.map +0 -1
  523. package/lib/types/InteractionsApi.d.ts.map +0 -1
  524. package/lib/types/OAuthClientsApi.d.ts.map +0 -1
  525. package/lib/types/OAuthGrantsApi.d.ts.map +0 -1
  526. package/lib/types/OAuthProvidersApi.d.ts.map +0 -1
  527. package/lib/types/OAuthServerApi.d.ts +0 -10
  528. package/lib/types/OAuthServerApi.d.ts.map +0 -1
  529. package/lib/types/ProjectsApi.d.ts.map +0 -1
  530. package/lib/types/PromptsApi.d.ts.map +0 -1
  531. package/lib/types/RefsApi.d.ts +0 -6
  532. package/lib/types/RefsApi.d.ts.map +0 -1
  533. package/lib/types/RemoteMcpConnectionsApi.d.ts.map +0 -1
  534. package/lib/types/RunsApi.d.ts.map +0 -1
  535. package/lib/types/SkillsApi.d.ts.map +0 -1
  536. package/lib/types/StreamSource.d.ts.map +0 -1
  537. package/lib/types/TrainingApi.d.ts.map +0 -1
  538. package/lib/types/UsersApi.d.ts.map +0 -1
  539. package/lib/types/client.d.ts.map +0 -1
  540. package/lib/types/execute.d.ts.map +0 -1
  541. package/lib/types/index.d.ts.map +0 -1
  542. package/lib/types/nodejs/NodeStreamSource.d.ts.map +0 -1
  543. package/lib/types/nodejs/index.d.ts +0 -1
  544. package/lib/types/nodejs/index.d.ts.map +0 -1
  545. package/lib/types/store/AgentsApi.d.ts.map +0 -1
  546. package/lib/types/store/AnalyzeDocApi.d.ts.map +0 -1
  547. package/lib/types/store/CollectionsApi.d.ts.map +0 -1
  548. package/lib/types/store/CommandsApi.d.ts +0 -10
  549. package/lib/types/store/CommandsApi.d.ts.map +0 -1
  550. package/lib/types/store/CostApi.d.ts.map +0 -1
  551. package/lib/types/store/DashboardApi.d.ts.map +0 -1
  552. package/lib/types/store/DataApi.d.ts.map +0 -1
  553. package/lib/types/store/EmailApi.d.ts.map +0 -1
  554. package/lib/types/store/EmbeddingsApi.d.ts +0 -12
  555. package/lib/types/store/EmbeddingsApi.d.ts.map +0 -1
  556. package/lib/types/store/FilesApi.d.ts.map +0 -1
  557. package/lib/types/store/HiveMemoryApi.d.ts.map +0 -1
  558. package/lib/types/store/IndexingApi.d.ts.map +0 -1
  559. package/lib/types/store/ObjectsApi.d.ts.map +0 -1
  560. package/lib/types/store/PendingAsksApi.d.ts.map +0 -1
  561. package/lib/types/store/QueryApi.d.ts.map +0 -1
  562. package/lib/types/store/RenderingApi.d.ts.map +0 -1
  563. package/lib/types/store/SchedulesApi.d.ts.map +0 -1
  564. package/lib/types/store/ToolsApi.d.ts.map +0 -1
  565. package/lib/types/store/TypeCatalogApi.d.ts.map +0 -1
  566. package/lib/types/store/TypesApi.d.ts.map +0 -1
  567. package/lib/types/store/WorkersApi.d.ts +0 -6
  568. package/lib/types/store/WorkersApi.d.ts.map +0 -1
  569. package/lib/types/store/WorkflowsApi.d.ts.map +0 -1
  570. package/lib/types/store/client.d.ts +0 -57
  571. package/lib/types/store/client.d.ts.map +0 -1
  572. package/lib/types/store/errors.d.ts.map +0 -1
  573. package/lib/types/store/index.d.ts +0 -17
  574. package/lib/types/store/index.d.ts.map +0 -1
  575. package/lib/types/store/version.d.ts.map +0 -1
  576. package/src/store/CommandsApi.ts +0 -15
  577. package/src/store/WorkersApi.ts +0 -17
  578. /package/lib/{esm/ApiKeysApi.js → ApiKeysApi.js} +0 -0
  579. /package/lib/{esm/OAuthGrantsApi.js → OAuthGrantsApi.js} +0 -0
  580. /package/lib/{esm/OAuthProvidersApi.js → OAuthProvidersApi.js} +0 -0
  581. /package/lib/{esm/StreamSource.js → StreamSource.js} +0 -0
  582. /package/lib/{esm/store → store}/CostApi.js +0 -0
package/src/GroupsApi.ts CHANGED
@@ -1,5 +1,11 @@
1
- import { CreateUserGroupPayload, DeleteByIdResult, UpdateUserGroupPayload, UserGroup, UserRef } from "@vertesia/common";
2
- import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
1
+ import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
2
+ import type {
3
+ CreateUserGroupPayload,
4
+ DeleteByIdResult,
5
+ UpdateUserGroupPayload,
6
+ UserGroup,
7
+ UserRef,
8
+ } from '@vertesia/common';
3
9
 
4
10
  export interface GroupsQueryOptions {
5
11
  search?: string;
@@ -10,9 +16,8 @@ export interface GroupsQueryOptions {
10
16
  }
11
17
 
12
18
  export class GroupsApi extends ApiTopic {
13
-
14
19
  constructor(parent: ClientBase) {
15
- super(parent, "/groups");
20
+ super(parent, '/groups');
16
21
  }
17
22
 
18
23
  /**
@@ -39,7 +44,7 @@ export class GroupsApi extends ApiTopic {
39
44
  * @returns The UserGroup object
40
45
  */
41
46
  retrieve(groupId: string): Promise<UserGroup> {
42
- return this.get('/' + groupId);
47
+ return this.get(`/${groupId}`);
43
48
  }
44
49
 
45
50
  /**
@@ -49,7 +54,7 @@ export class GroupsApi extends ApiTopic {
49
54
  * @returns The updated UserGroup object
50
55
  */
51
56
  update(groupId: string, payload: UpdateUserGroupPayload): Promise<UserGroup> {
52
- return this.put('/' + groupId, { payload });
57
+ return this.put(`/${groupId}`, { payload });
53
58
  }
54
59
 
55
60
  /**
@@ -58,7 +63,7 @@ export class GroupsApi extends ApiTopic {
58
63
  * @returns Object with the deleted group ID
59
64
  */
60
65
  delete(groupId: string): Promise<DeleteByIdResult> {
61
- return this.del('/' + groupId);
66
+ return this.del(`/${groupId}`);
62
67
  }
63
68
 
64
69
  /**
@@ -67,7 +72,7 @@ export class GroupsApi extends ApiTopic {
67
72
  * @returns Array of UserRef objects representing group members
68
73
  */
69
74
  listMembers(groupId: string): Promise<UserRef[]> {
70
- return this.get('/' + groupId + '/members');
75
+ return this.get(`/${groupId}/members`);
71
76
  }
72
77
 
73
78
  /**
@@ -77,7 +82,7 @@ export class GroupsApi extends ApiTopic {
77
82
  * @returns The updated UserGroup object
78
83
  */
79
84
  addMember(groupId: string, userId: string): Promise<UserGroup> {
80
- return this.post('/' + groupId + '/members/' + userId);
85
+ return this.post(`/${groupId}/members/${userId}`);
81
86
  }
82
87
 
83
88
  /**
@@ -87,7 +92,7 @@ export class GroupsApi extends ApiTopic {
87
92
  * @returns The updated UserGroup object
88
93
  */
89
94
  removeMember(groupId: string, userId: string): Promise<UserGroup> {
90
- return this.del('/' + groupId + '/members/' + userId);
95
+ return this.del(`/${groupId}/members/${userId}`);
91
96
  }
92
97
 
93
98
  /**
package/src/IamApi.ts CHANGED
@@ -1,43 +1,66 @@
1
- import { AccessControlEntry, ACECreatePayload, AcesQueryOptions, DeleteByIdResult, RoleDefinition } from "@vertesia/common";
2
- import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
3
- import { GroupsApi } from "./GroupsApi.js";
4
-
1
+ import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
2
+ import type {
3
+ ACECreatePayload,
4
+ ACEUpdatePayload,
5
+ AccessControlEntry,
6
+ AcesQueryOptions,
7
+ DeleteByIdResult,
8
+ PrincipalIdentity,
9
+ RoleDefinition,
10
+ SystemRoleDefinition,
11
+ } from '@vertesia/common';
12
+ import { GroupsApi } from './GroupsApi.js';
5
13
 
6
14
  export interface FilterOption {
7
- id: string,
8
- name: string,
9
- count: number
15
+ id: string;
16
+ name: string;
17
+ count: number;
10
18
  }
11
19
 
12
-
13
20
  export class IamApi extends ApiTopic {
14
-
15
21
  constructor(parent: ClientBase) {
16
- super(parent, "/api/v1/iam")
22
+ super(parent, '/api/v1/iam');
17
23
  }
18
24
 
19
- aces = new AcesApi(this)
20
- roles = new RolesApi(this)
21
- groups = new GroupsApi(this)
25
+ aces = new AcesApi(this);
26
+ roles = new RolesApi(this);
27
+ groups = new GroupsApi(this);
28
+
29
+ /**
30
+ * Fetch the current user's principal identity — the id plus the merged
31
+ * ABAC principal context (clearance, compartments, email, tags, properties).
32
+ *
33
+ * Rejects with HTTP 400 if the caller is not a user principal
34
+ * (API keys, service accounts, etc. — they have no underlying user context).
35
+ */
36
+ getPrincipalIdentity(): Promise<PrincipalIdentity> {
37
+ return this.get('/users/identity');
38
+ }
22
39
  }
23
40
 
24
41
  export class RolesApi extends ApiTopic {
25
-
26
42
  constructor(parent: ClientBase) {
27
- super(parent, "/roles")
43
+ super(parent, '/roles');
28
44
  }
29
45
 
46
+ /** List every built-in role across all partitions. Permissions are loosely typed (`string[]`). */
30
47
  list(): Promise<RoleDefinition[]> {
31
48
  return this.get('/');
32
49
  }
33
50
 
51
+ /**
52
+ * List system-domain roles only. Permissions are tightly typed as `Permission[]` —
53
+ * suited for client-side permission gating (button visibility, route guards).
54
+ * ABAC roles are excluded and must be consumed via the JWT `content_security` claim.
55
+ */
56
+ listSystem(): Promise<SystemRoleDefinition[]> {
57
+ return this.get('/system');
58
+ }
34
59
  }
35
60
 
36
-
37
61
  export class AcesApi extends ApiTopic {
38
-
39
62
  constructor(parent: ClientBase) {
40
- super(parent, "/aces")
63
+ super(parent, '/aces');
41
64
  }
42
65
 
43
66
  /**
@@ -50,21 +73,32 @@ export class AcesApi extends ApiTopic {
50
73
  return this.get('/', { query: { ...options } });
51
74
  }
52
75
 
76
+ /**
77
+ * List all ACEs scoped to the current project.
78
+ * Returns both regular project ACEs and dynamic (content_set/principal_set) ACEs.
79
+ */
80
+ listProjectAces(): Promise<AccessControlEntry[]> {
81
+ return this.get('/project');
82
+ }
83
+
53
84
  /**
54
85
  * Get an ACE by its Id
55
86
  * @param id
56
87
  * @returns InteractionResult
57
88
  **/
58
89
  retrieve(id: string): Promise<AccessControlEntry> {
59
- return this.get('/' + id);
90
+ return this.get(`/${id}`);
60
91
  }
61
92
 
62
93
  create(payload: ACECreatePayload): Promise<AccessControlEntry> {
63
- return this.post('/', { payload })
94
+ return this.post('/', { payload });
64
95
  }
65
96
 
66
- delete(id: string): Promise<DeleteByIdResult> {
67
- return this.del('/' + id)
97
+ update(id: string, payload: ACEUpdatePayload): Promise<AccessControlEntry> {
98
+ return this.put(`/${id}`, { payload });
68
99
  }
69
100
 
101
+ delete(id: string): Promise<DeleteByIdResult> {
102
+ return this.del(`/${id}`);
103
+ }
70
104
  }
@@ -1,11 +1,18 @@
1
- import { ExecutionRun, InteractionUpdatePayload, InteractionExecutionPayload } from "@vertesia/common";
2
- import { VertesiaClient, VertesiaClientProps } from "./client.js";
3
- import { executeInteraction } from "./execute.js";
1
+ import type {
2
+ InteractionExecutionPayload,
3
+ InteractionExecutionResult,
4
+ InteractionUpdatePayload,
5
+ } from '@vertesia/common';
6
+ import { VertesiaClient, type VertesiaClientProps } from './client.js';
7
+ import { executeInteraction } from './execute.js';
4
8
 
5
- export class InteractionBase<P = any> {
9
+ export class InteractionBase<P = unknown> {
6
10
  client: VertesiaClient;
7
11
 
8
- constructor(public id: string, clientOrOpts: VertesiaClient | VertesiaClientProps) {
12
+ constructor(
13
+ public id: string,
14
+ clientOrOpts: VertesiaClient | VertesiaClientProps,
15
+ ) {
9
16
  if (clientOrOpts instanceof VertesiaClient) {
10
17
  this.client = clientOrOpts;
11
18
  } else {
@@ -23,7 +30,7 @@ export class InteractionBase<P = any> {
23
30
 
24
31
  //TODO - Not implemented
25
32
  render(_data: P) {
26
- throw new Error("Not implemented");
33
+ throw new Error('Not implemented');
27
34
  }
28
35
 
29
36
  /**
@@ -35,10 +42,12 @@ export class InteractionBase<P = any> {
35
42
  * @param id of the interaction to execute
36
43
  * @param payload InteractionExecutionPayload
37
44
  * @param onChunk callback to be called when the next chunk of the response is available
38
- * @returns the resolved execution run as Promise<ExecutionRun>
45
+ * @returns the resolved interaction execution result
39
46
  */
40
- async execute(payload: InteractionExecutionPayload = {},
41
- onChunk?: (chunk: string) => void): Promise<ExecutionRun<P>> {
47
+ async execute(
48
+ payload: InteractionExecutionPayload = {},
49
+ onChunk?: (chunk: string) => void,
50
+ ): Promise<InteractionExecutionResult<P>> {
42
51
  return executeInteraction<P>(this.client, this.id, payload, onChunk);
43
52
  }
44
53
  }
@@ -1,31 +1,26 @@
1
- import { ApiTopic, ClientBase } from "@vertesia/api-fetch-client";
2
- import {
3
- CatalogInteractionRef,
4
- InCodeInteraction,
5
- InteractionStatus
6
- } from "@vertesia/common";
7
-
1
+ import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
2
+ import type { CatalogInteractionRef, InCodeInteraction, InteractionStatus } from '@vertesia/common';
8
3
 
9
4
  export class InteractionCatalogApi extends ApiTopic {
10
5
  constructor(parent: ClientBase) {
11
- super(parent, "/api/v1/interactions/catalog");
6
+ super(parent, '/api/v1/interactions/catalog');
12
7
  }
13
8
 
14
9
  /**
15
10
  * List all project interactions
16
11
  */
17
- list(query: { status?: InteractionStatus, tag?: string } = {}): Promise<CatalogInteractionRef[]> {
18
- return this.get("/", {
19
- query
12
+ list(query: { status?: InteractionStatus; tag?: string } = {}): Promise<CatalogInteractionRef[]> {
13
+ return this.get('/', {
14
+ query,
20
15
  });
21
16
  }
22
17
 
23
18
  /**
24
19
  * List all stored interactions
25
20
  */
26
- listStoredInteractions(query: { status?: InteractionStatus, tag?: string } = {}): Promise<CatalogInteractionRef[]> {
27
- return this.get("/stored", {
28
- query
21
+ listStoredInteractions(query: { status?: InteractionStatus; tag?: string } = {}): Promise<CatalogInteractionRef[]> {
22
+ return this.get('/stored', {
23
+ query,
29
24
  });
30
25
  }
31
26
 
@@ -35,8 +30,8 @@ export class InteractionCatalogApi extends ApiTopic {
35
30
  listSysInteractions(tag?: string): Promise<CatalogInteractionRef[]> {
36
31
  return this.get(`/sys`, {
37
32
  query: {
38
- tag
39
- }
33
+ tag,
34
+ },
40
35
  });
41
36
  }
42
37
 
@@ -46,8 +41,8 @@ export class InteractionCatalogApi extends ApiTopic {
46
41
  listAppInteractions(appName: string, tag?: string): Promise<CatalogInteractionRef[]> {
47
42
  return this.get(`/apps/${appName}`, {
48
43
  query: {
49
- tag
50
- }
44
+ tag,
45
+ },
51
46
  });
52
47
  }
53
48
 
@@ -57,8 +52,8 @@ export class InteractionCatalogApi extends ApiTopic {
57
52
  listAllAppInteractions(tag?: string): Promise<CatalogInteractionRef[]> {
58
53
  return this.get(`/apps`, {
59
54
  query: {
60
- tag
61
- }
55
+ tag,
56
+ },
62
57
  });
63
58
  }
64
59
 
@@ -1,4 +1,4 @@
1
- import { CompletionResult } from '@llumiverse/common';
1
+ import type { CompletionResult } from '@llumiverse/common';
2
2
  import { describe, expect, it } from 'vitest';
3
3
  import { InteractionOutput, IS_INTERACTION_OUTPUT } from './InteractionOutput.js';
4
4
 
@@ -9,7 +9,7 @@ describe('InteractionOutput', () => {
9
9
  { type: 'json', value: { name: 'Alice', age: 30 } },
10
10
  { type: 'json', value: { title: 'Engineer', level: 'Senior' } },
11
11
  { type: 'image', value: 'data:image/png;base64,iVBORw0K...' },
12
- { type: 'image', value: 'https://example.com/image.jpg' }
12
+ { type: 'image', value: 'https://example.com/image.jpg' },
13
13
  ];
14
14
 
15
15
  describe('text accessors', () => {
@@ -19,9 +19,7 @@ describe('InteractionOutput', () => {
19
19
  });
20
20
 
21
21
  it('should return empty string when no text results exist', () => {
22
- const output = InteractionOutput.from([
23
- { type: 'json', value: { foo: 'bar' } }
24
- ]);
22
+ const output = InteractionOutput.from([{ type: 'json', value: { foo: 'bar' } }]);
25
23
  expect(output.text()).toBe('');
26
24
  });
27
25
 
@@ -29,7 +27,6 @@ describe('InteractionOutput', () => {
29
27
  const output = InteractionOutput.from(sampleResults);
30
28
  expect(output.texts()).toEqual(['Hello, ', 'World!']);
31
29
  });
32
-
33
30
  });
34
31
 
35
32
  describe('object accessors', () => {
@@ -44,28 +41,22 @@ describe('InteractionOutput', () => {
44
41
  const objects = output.objects();
45
42
  expect(objects).toEqual([
46
43
  { name: 'Alice', age: 30 },
47
- { title: 'Engineer', level: 'Senior' }
44
+ { title: 'Engineer', level: 'Senior' },
48
45
  ]);
49
46
  });
50
47
 
51
48
  it('should parse text as JSON when no JSON result exists', () => {
52
- const output = InteractionOutput.from([
53
- { type: 'text', value: '{"foo":"bar"}' }
54
- ]);
49
+ const output = InteractionOutput.from([{ type: 'text', value: '{"foo":"bar"}' }]);
55
50
  expect(output.object()).toEqual({ foo: 'bar' });
56
51
  });
57
52
 
58
53
  it('should throw error when no JSON result and text is not valid JSON', () => {
59
- const output = InteractionOutput.from([
60
- { type: 'text', value: 'not json' }
61
- ]);
54
+ const output = InteractionOutput.from([{ type: 'text', value: 'not json' }]);
62
55
  expect(() => output.object()).toThrow();
63
56
  });
64
57
 
65
58
  it('should throw error when no JSON result and no text', () => {
66
- const output = InteractionOutput.from([
67
- { type: 'image', value: 'data:image/png;base64,abc' }
68
- ]);
59
+ const output = InteractionOutput.from([{ type: 'image', value: 'data:image/png;base64,abc' }]);
69
60
  expect(() => output.object()).toThrow('No JSON result found and no text available to parse');
70
61
  });
71
62
  });
@@ -78,19 +69,13 @@ describe('InteractionOutput', () => {
78
69
 
79
70
  it('should return all images', () => {
80
71
  const output = InteractionOutput.from(sampleResults);
81
- expect(output.images()).toEqual([
82
- 'data:image/png;base64,iVBORw0K...',
83
- 'https://example.com/image.jpg'
84
- ]);
72
+ expect(output.images()).toEqual(['data:image/png;base64,iVBORw0K...', 'https://example.com/image.jpg']);
85
73
  });
86
74
 
87
75
  it('should throw error when no image result exists', () => {
88
- const output = InteractionOutput.from([
89
- { type: 'text', value: 'hello' }
90
- ]);
76
+ const output = InteractionOutput.from([{ type: 'text', value: 'hello' }]);
91
77
  expect(() => output.image()).toThrow('No image result found');
92
78
  });
93
-
94
79
  });
95
80
 
96
81
  describe('utility methods', () => {
@@ -106,43 +91,37 @@ describe('InteractionOutput', () => {
106
91
 
107
92
  it('should stringify all parts with default separator and compact JSON', () => {
108
93
  const output = InteractionOutput.from(sampleResults);
109
- const result = output.stringify('\n', 0); // Explicitly request compact JSON
94
+ const result = output.stringify('\n', 0); // Explicitly request compact JSON
110
95
 
111
96
  expect(result).toBe(
112
97
  'Hello, \n' +
113
- 'World!\n' +
114
- '{"name":"Alice","age":30}\n' +
115
- '{"title":"Engineer","level":"Senior"}\n' +
116
- 'data:image/png;base64,iVBORw0K...\n' +
117
- 'https://example.com/image.jpg'
98
+ 'World!\n' +
99
+ '{"name":"Alice","age":30}\n' +
100
+ '{"title":"Engineer","level":"Senior"}\n' +
101
+ 'data:image/png;base64,iVBORw0K...\n' +
102
+ 'https://example.com/image.jpg',
118
103
  );
119
104
  });
120
105
 
121
106
  it('should stringify all parts with formatted JSON', () => {
122
107
  const mixed: CompletionResult[] = [
123
108
  { type: 'text', value: 'Result:' },
124
- { type: 'json', value: { score: 95, status: 'pass' } }
109
+ { type: 'json', value: { score: 95, status: 'pass' } },
125
110
  ];
126
111
  const output = InteractionOutput.from(mixed);
127
112
  const result = output.stringify('\n', 2);
128
113
 
129
- expect(result).toBe(
130
- 'Result:\n' +
131
- '{\n' +
132
- ' "score": 95,\n' +
133
- ' "status": "pass"\n' +
134
- '}'
135
- );
114
+ expect(result).toBe('Result:\n' + '{\n' + ' "score": 95,\n' + ' "status": "pass"\n' + '}');
136
115
  });
137
116
 
138
117
  it('should stringify with custom separator', () => {
139
118
  const mixed: CompletionResult[] = [
140
119
  { type: 'text', value: 'A' },
141
120
  { type: 'json', value: { x: 1 } },
142
- { type: 'text', value: 'B' }
121
+ { type: 'text', value: 'B' },
143
122
  ];
144
123
  const output = InteractionOutput.from(mixed);
145
- const result = output.stringify(' | ', 0); // Explicitly request compact JSON
124
+ const result = output.stringify(' | ', 0); // Explicitly request compact JSON
146
125
 
147
126
  expect(result).toBe('A | {"x":1} | B');
148
127
  });
@@ -150,14 +129,13 @@ describe('InteractionOutput', () => {
150
129
  it('should stringify with empty separator', () => {
151
130
  const mixed: CompletionResult[] = [
152
131
  { type: 'text', value: 'Hello' },
153
- { type: 'text', value: 'World' }
132
+ { type: 'text', value: 'World' },
154
133
  ];
155
134
  const output = InteractionOutput.from(mixed);
156
135
  const result = output.stringify('');
157
136
 
158
137
  expect(result).toBe('HelloWorld');
159
138
  });
160
-
161
139
  });
162
140
 
163
141
  describe('Proxy functionality', () => {
@@ -172,10 +150,10 @@ describe('InteractionOutput', () => {
172
150
  expect(output.length).toBe(6);
173
151
 
174
152
  // Array methods
175
- const types = output.map(r => r.type);
153
+ const types = output.map((r) => r.type);
176
154
  expect(types).toEqual(['text', 'text', 'json', 'json', 'image', 'image']);
177
155
 
178
- const textResults = output.filter(r => r.type === 'text');
156
+ const textResults = output.filter((r) => r.type === 'text');
179
157
  expect(textResults).toHaveLength(2);
180
158
  });
181
159
 
@@ -190,9 +168,10 @@ describe('InteractionOutput', () => {
190
168
 
191
169
  it('should be marked with IS_INTERACTION_OUTPUT symbol', () => {
192
170
  const output = InteractionOutput.from(sampleResults);
171
+ const markedOutput = output as { [IS_INTERACTION_OUTPUT]?: boolean };
193
172
 
194
173
  // Check that the symbol marker is present
195
- expect((output as any)[IS_INTERACTION_OUTPUT]).toBe(true);
174
+ expect(markedOutput[IS_INTERACTION_OUTPUT]).toBe(true);
196
175
  });
197
176
 
198
177
  it('should return the same instance when calling from() on an already wrapped array', () => {
@@ -249,7 +228,7 @@ describe('InteractionOutput', () => {
249
228
  const mixed: CompletionResult[] = [
250
229
  { type: 'text', value: 'Start' },
251
230
  { type: 'json', value: { count: 5 } },
252
- { type: 'text', value: 'End' }
231
+ { type: 'text', value: 'End' },
253
232
  ];
254
233
 
255
234
  const output = InteractionOutput.from(mixed);
@@ -258,9 +237,7 @@ describe('InteractionOutput', () => {
258
237
  });
259
238
 
260
239
  it('should handle results with only one type', () => {
261
- const textOnly: CompletionResult[] = [
262
- { type: 'text', value: 'Only text here' }
263
- ];
240
+ const textOnly: CompletionResult[] = [{ type: 'text', value: 'Only text here' }];
264
241
 
265
242
  const output = InteractionOutput.from(textOnly);
266
243
  expect(output.text()).toBe('Only text here');
@@ -271,11 +248,12 @@ describe('InteractionOutput', () => {
271
248
 
272
249
  describe('Type safety with generics', () => {
273
250
  it('should provide type safety with generic parameter', () => {
274
- interface User { name: string; age: number; }
251
+ interface User {
252
+ name: string;
253
+ age: number;
254
+ }
275
255
 
276
- const results: CompletionResult[] = [
277
- { type: 'json', value: { name: 'Bob', age: 25 } }
278
- ];
256
+ const results: CompletionResult[] = [{ type: 'json', value: { name: 'Bob', age: 25 } }];
279
257
 
280
258
  const output = InteractionOutput.from<User>(results);
281
259
  const user = output.object(); // TypeScript knows this is User
@@ -284,14 +262,19 @@ describe('InteractionOutput', () => {
284
262
  expect(user.age).toBe(25);
285
263
  });
286
264
 
287
-
288
265
  it('should allow type override at method level', () => {
289
- interface Person { name: string; age: number; }
290
- interface Address { street: string; city: string; }
266
+ interface Person {
267
+ name: string;
268
+ age: number;
269
+ }
270
+ interface Address {
271
+ street: string;
272
+ city: string;
273
+ }
291
274
 
292
275
  const results: CompletionResult[] = [
293
276
  { type: 'json', value: { name: 'Alice', age: 30 } },
294
- { type: 'json', value: { street: '123 Main', city: 'NYC' } }
277
+ { type: 'json', value: { street: '123 Main', city: 'NYC' } },
295
278
  ];
296
279
 
297
280
  const output = InteractionOutput.from<Person>(results);