@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
@@ -1,5 +1,5 @@
1
- import { CompletionResult } from '@llumiverse/common';
2
- import { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
1
+ import type { CompletionResult, JSONObject } from '@llumiverse/common';
2
+ import type { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
3
3
 
4
4
  /**
5
5
  * Symbol used to mark InteractionOutputArray instances.
@@ -7,13 +7,17 @@ import { ExecutionRun, InteractionExecutionResult } from '@vertesia/common';
7
7
  */
8
8
  export const IS_INTERACTION_OUTPUT = Symbol('InteractionOutput');
9
9
 
10
- export function enhanceInteractionExecutionResult<ResultT = any, ParamsT = any>(r: InteractionExecutionResult<ParamsT>): EnhancedInteractionExecutionResult<ResultT, ParamsT> {
11
- (r as any).result = InteractionOutput.from<ResultT>(r.result);
10
+ export function enhanceInteractionExecutionResult<ResultT = unknown, ParamsT = unknown>(
11
+ r: InteractionExecutionResult<ParamsT>,
12
+ ): EnhancedInteractionExecutionResult<ResultT, ParamsT> {
13
+ r.result = InteractionOutput.from<ResultT>(r.result);
12
14
  return r as EnhancedInteractionExecutionResult<ResultT, ParamsT>;
13
15
  }
14
16
 
15
- export function enhanceExecutionRun<ResultT = any, ParamsT = any>(r: ExecutionRun<ParamsT>): EnhancedExecutionRun<ResultT, ParamsT> {
16
- (r as any).result = InteractionOutput.from<ResultT>(r.result);
17
+ export function enhanceExecutionRun<ResultT = unknown, ParamsT = unknown>(
18
+ r: ExecutionRun<ParamsT>,
19
+ ): EnhancedExecutionRun<ResultT, ParamsT> {
20
+ r.result = InteractionOutput.from<ResultT>(r.result);
17
21
  return r as EnhancedExecutionRun<ResultT, ParamsT>;
18
22
  }
19
23
 
@@ -44,12 +48,12 @@ export function enhanceExecutionRun<ResultT = any, ParamsT = any>(r: ExecutionRu
44
48
  * interface OtherType { title: string; }
45
49
  * ```
46
50
  */
47
- export class InteractionOutput<T = any> {
51
+ export class InteractionOutput<T = unknown> {
48
52
  /**
49
53
  * The raw completion results array.
50
54
  * Access this when you need to work with the underlying CompletionResult[] directly.
51
55
  */
52
- constructor(public readonly results: CompletionResult[]) { }
56
+ constructor(public readonly results: CompletionResult[]) {}
53
57
 
54
58
  /**
55
59
  * Create an interaction output that acts as both an array and has convenience methods.
@@ -73,12 +77,14 @@ export class InteractionOutput<T = any> {
73
77
  * const text = output.text(); // string
74
78
  * ```
75
79
  */
76
- static from<T = any>(results: CompletionResult[] | InteractionOutputArray<T> | Record<string, any> | string | null | undefined): InteractionOutputArray<T> {
80
+ static from<T = unknown>(
81
+ results: CompletionResult[] | InteractionOutputArray<T> | JSONObject | string | null | undefined,
82
+ ): InteractionOutputArray<T> {
77
83
  if (!results) {
78
84
  return createInteractionOutput<T>([]);
79
85
  }
80
- // Check if already wrapped using the symbol marker
81
- if ((results as any)[IS_INTERACTION_OUTPUT]) {
86
+ // Check if already wrapped using the symbol marker
87
+ if (isInteractionOutputMarker(results)) {
82
88
  return results as InteractionOutputArray<T>;
83
89
  }
84
90
  if (Array.isArray(results)) {
@@ -90,8 +96,8 @@ export class InteractionOutput<T = any> {
90
96
  }
91
97
  }
92
98
 
93
- static isInteractionOutputArray(obj: any): boolean {
94
- return obj && obj[IS_INTERACTION_OUTPUT] === true;
99
+ static isInteractionOutputArray(obj: unknown): boolean {
100
+ return isInteractionOutputMarker(obj);
95
101
  }
96
102
 
97
103
  get isEmpty() {
@@ -99,15 +105,15 @@ export class InteractionOutput<T = any> {
99
105
  }
100
106
 
101
107
  hasObject() {
102
- return this.results.some(r => r.type === 'json');
108
+ return this.results.some((r) => r.type === 'json');
103
109
  }
104
110
 
105
111
  hasText() {
106
- return this.results.some(r => r.type === 'text');
112
+ return this.results.some((r) => r.type === 'text');
107
113
  }
108
114
 
109
115
  hasImage() {
110
- return this.results.some(r => r.type === 'image');
116
+ return this.results.some((r) => r.type === 'image');
111
117
  }
112
118
 
113
119
  /**
@@ -116,8 +122,8 @@ export class InteractionOutput<T = any> {
116
122
  */
117
123
  text(delimiter = '\n'): string {
118
124
  return this.results
119
- .filter(r => r.type === 'text')
120
- .map(r => r.value)
125
+ .filter((r) => r.type === 'text')
126
+ .map((r) => r.value)
121
127
  .join(delimiter);
122
128
  }
123
129
 
@@ -125,9 +131,7 @@ export class InteractionOutput<T = any> {
125
131
  * Get an array of all text values from text results.
126
132
  */
127
133
  texts(): string[] {
128
- return this.results
129
- .filter(r => r.type === 'text')
130
- .map(r => r.value);
134
+ return this.results.filter((r) => r.type === 'text').map((r) => r.value);
131
135
  }
132
136
 
133
137
  /**
@@ -136,14 +140,14 @@ export class InteractionOutput<T = any> {
136
140
  * @returns The first JSON result typed as T (the class generic type)
137
141
  * @throws Error if no JSON result found and text cannot be parsed as JSON
138
142
  */
139
- object(): T {
140
- const jsonResult = this.results.find(r => r.type === 'json');
143
+ object<U = T>(): U {
144
+ const jsonResult = this.results.find((r) => r.type === 'json');
141
145
  if (jsonResult) {
142
- return jsonResult.value as T;
146
+ return jsonResult.value as U;
143
147
  }
144
148
 
145
149
  // Fallback: try to parse the other text parts as JSON
146
- return parseCompletionResultAsJson(this.results);
150
+ return parseCompletionResultAsJson<U>(this.results);
147
151
  }
148
152
 
149
153
  /**
@@ -151,9 +155,7 @@ export class InteractionOutput<T = any> {
151
155
  * @returns An array of all JSON results typed as T[] (the class generic type)
152
156
  */
153
157
  objects(): T[] {
154
- return this.results
155
- .filter(r => r.type === 'json')
156
- .map(r => r.value as T);
158
+ return this.results.filter((r) => r.type === 'json').map((r) => r.value as T);
157
159
  }
158
160
 
159
161
  /**
@@ -181,7 +183,7 @@ export class InteractionOutput<T = any> {
181
183
  * @throws Error if no image result exists
182
184
  */
183
185
  image(): string {
184
- const imageResult = this.results.find(r => r.type === 'image');
186
+ const imageResult = this.results.find((r) => r.type === 'image');
185
187
  if (!imageResult) {
186
188
  throw new Error('No image result found');
187
189
  }
@@ -192,9 +194,7 @@ export class InteractionOutput<T = any> {
192
194
  * Get an array of all image values (base64 data URLs or URLs).
193
195
  */
194
196
  images(): string[] {
195
- return this.results
196
- .filter(r => r.type === 'image')
197
- .map(r => r.value);
197
+ return this.results.filter((r) => r.type === 'image').map((r) => r.value);
198
198
  }
199
199
 
200
200
  /**
@@ -216,7 +216,7 @@ export class InteractionOutput<T = any> {
216
216
  */
217
217
  stringify(separator = '\n', indent = 2): string {
218
218
  return this.results
219
- .map(r => {
219
+ .map((r) => {
220
220
  switch (r.type) {
221
221
  case 'json':
222
222
  return JSON.stringify(r.value, null, indent);
@@ -240,7 +240,7 @@ export class InteractionOutput<T = any> {
240
240
  * Attempts to return the first JSON object, falls back to concatenated text.
241
241
  */
242
242
  toJSON(): CompletionResult[] {
243
- return this.results
243
+ return this.results;
244
244
  }
245
245
  }
246
246
 
@@ -248,13 +248,22 @@ export class InteractionOutput<T = any> {
248
248
  * Type representing a CompletionResult array enhanced with InteractionOutput methods.
249
249
  * This is the return type of InteractionOutput.from() - it acts as both an array and has convenience methods.
250
250
  */
251
- export type InteractionOutputArray<T = any> = CompletionResult[] & InteractionOutput<T>;
251
+ export type InteractionOutputArray<T = unknown> = CompletionResult[] & InteractionOutput<T>;
252
+
253
+ type InteractionOutputMarker = {
254
+ [IS_INTERACTION_OUTPUT]?: boolean;
255
+ };
252
256
 
253
- export interface EnhancedInteractionExecutionResult<ResultT = any, ParamsT = any> extends InteractionExecutionResult<ParamsT> {
257
+ function isInteractionOutputMarker(obj: unknown): obj is InteractionOutputMarker {
258
+ return !!obj && typeof obj === 'object' && (obj as InteractionOutputMarker)[IS_INTERACTION_OUTPUT] === true;
259
+ }
260
+
261
+ export interface EnhancedInteractionExecutionResult<ResultT = unknown, ParamsT = unknown>
262
+ extends InteractionExecutionResult<ParamsT> {
254
263
  result: InteractionOutputArray<ResultT>;
255
264
  }
256
265
 
257
- export interface EnhancedExecutionRun<ResultT = any, ParamsT = any> extends ExecutionRun<ParamsT> {
266
+ export interface EnhancedExecutionRun<ResultT = unknown, ParamsT = unknown> extends ExecutionRun<ParamsT> {
258
267
  result: InteractionOutputArray<ResultT>;
259
268
  }
260
269
 
@@ -282,7 +291,7 @@ export interface EnhancedExecutionRun<ResultT = any, ParamsT = any> extends Exec
282
291
  * const img = output.image(); // string
283
292
  * ```
284
293
  */
285
- export function createInteractionOutput<T = any>(results: CompletionResult[]): InteractionOutputArray<T> {
294
+ export function createInteractionOutput<T = unknown>(results: CompletionResult[]): InteractionOutputArray<T> {
286
295
  const wrapper = new InteractionOutput<T>(results);
287
296
 
288
297
  return new Proxy(results, {
@@ -294,7 +303,7 @@ export function createInteractionOutput<T = any>(results: CompletionResult[]): I
294
303
 
295
304
  // Check if the wrapper has this property/method
296
305
  if (prop in wrapper) {
297
- const value = (wrapper as any)[prop];
306
+ const value = Reflect.get(wrapper, prop, wrapper) as unknown;
298
307
  // If it's a function, bind it to the wrapper so 'this' works correctly
299
308
  if (typeof value === 'function') {
300
309
  return value.bind(wrapper);
@@ -304,25 +313,24 @@ export function createInteractionOutput<T = any>(results: CompletionResult[]): I
304
313
  }
305
314
  // Otherwise delegate to the array
306
315
  return Reflect.get(target, prop, receiver);
307
- }
316
+ },
308
317
  }) as InteractionOutputArray<T>;
309
318
  }
310
319
 
311
-
312
- function parseCompletionResultAsJson(data: CompletionResult[]) {
320
+ function parseCompletionResultAsJson<T>(data: CompletionResult[]): T {
313
321
  let lastError: Error | undefined;
314
322
  for (const part of data) {
315
- if (part.type === "text") {
323
+ if (part.type === 'text') {
316
324
  const text = part.value.trim();
317
325
  try {
318
- return JSON.parse(text);
319
- } catch (error: any) {
320
- lastError = error;
326
+ return JSON.parse(text) as T;
327
+ } catch (error: unknown) {
328
+ lastError = error instanceof Error ? error : new Error(String(error));
321
329
  }
322
330
  }
323
331
  }
324
332
  if (!lastError) {
325
- lastError = new Error("No JSON result found and no text available to parse");
333
+ lastError = new Error('No JSON result found and no text available to parse');
326
334
  }
327
335
  throw lastError;
328
336
  }
@@ -4,7 +4,7 @@
4
4
  * an array and has convenience methods.
5
5
  */
6
6
 
7
- import { CompletionResult } from '@llumiverse/common';
7
+ import type { CompletionResult } from '@llumiverse/common';
8
8
  import { InteractionOutput } from './InteractionOutput.js';
9
9
 
10
10
  // Sample data
@@ -13,27 +13,36 @@ const sampleResults: CompletionResult[] = [
13
13
  { type: 'text', value: 'World!' },
14
14
  { type: 'json', value: { name: 'Alice', age: 30 } },
15
15
  { type: 'json', value: { title: 'Engineer', level: 'Senior' } },
16
- { type: 'image', value: 'data:image/png;base64,iVBORw0K...' }
16
+ { type: 'image', value: 'data:image/png;base64,iVBORw0K...' },
17
17
  ];
18
18
 
19
19
  // Example 1: Using InteractionOutput.from() (Proxy approach - RECOMMENDED)
20
20
  console.log('=== Example 1: Proxy Approach ===');
21
- interface Person { name: string; age: number; }
21
+ interface Person {
22
+ name: string;
23
+ age: number;
24
+ }
22
25
  const output = InteractionOutput.from<Person>(sampleResults);
23
26
 
24
27
  // Works as an array
25
- console.log('Array length:', output.length); // 5
26
- console.log('First item:', output[0]); // { type: 'text', value: 'Hello, ' }
27
- console.log('Types:', output.map(r => r.type)); // ['text', 'text', 'json', 'json', 'image']
28
+ console.log('Array length:', output.length); // 5
29
+ console.log('First item:', output[0]); // { type: 'text', value: 'Hello, ' }
30
+ console.log(
31
+ 'Types:',
32
+ output.map((r) => r.type),
33
+ ); // ['text', 'text', 'json', 'json', 'image']
28
34
 
29
35
  // Has convenience methods
30
- console.log('All text:', output.text); // 'Hello, World!'
31
- console.log('First object:', output.object()); // { name: 'Alice', age: 30 } (typed as Person)
32
- console.log('All objects:', output.objects()); // [{ name: 'Alice', age: 30 }, { title: 'Engineer', level: 'Senior' }]
33
- console.log('First image:', output.image); // 'data:image/png;base64,iVBORw0K...'
36
+ console.log('All text:', output.text); // 'Hello, World!'
37
+ console.log('First object:', output.object()); // { name: 'Alice', age: 30 } (typed as Person)
38
+ console.log('All objects:', output.objects()); // [{ name: 'Alice', age: 30 }, { title: 'Engineer', level: 'Senior' }]
39
+ console.log('First image:', output.image); // 'data:image/png;base64,iVBORw0K...'
34
40
 
35
41
  // Override type for specific objects
36
- interface Job { title: string; level: string; }
42
+ interface Job {
43
+ title: string;
44
+ level: string;
45
+ }
37
46
  console.log('Second object:', output.objectAt<Job>(1)); // { title: 'Engineer', level: 'Senior' } (typed as Job)
38
47
 
39
48
  // Example 2: Using InteractionOutput class directly
@@ -42,15 +51,18 @@ const wrapper = new InteractionOutput<Person>(sampleResults);
42
51
 
43
52
  // Access through wrapper properties (no array access)
44
53
  console.log('All text:', wrapper.text);
45
- console.log('Raw results:', wrapper.results); // Original array
54
+ console.log('Raw results:', wrapper.results); // Original array
46
55
  console.log('First object:', wrapper.object());
47
56
 
48
57
  // Example 3: Type safety demonstration
49
58
  console.log('\n=== Example 3: Type Safety ===');
50
59
 
51
- interface Contract { title: string; parties: string[]; }
60
+ interface Contract {
61
+ title: string;
62
+ parties: string[];
63
+ }
52
64
  const contractResults: CompletionResult[] = [
53
- { type: 'json', value: { title: 'Sales Agreement', parties: ['Alice', 'Bob'] } }
65
+ { type: 'json', value: { title: 'Sales Agreement', parties: ['Alice', 'Bob'] } },
54
66
  ];
55
67
 
56
68
  const contractOutput = InteractionOutput.from<Contract>(contractResults);
@@ -63,10 +75,10 @@ console.log('\n=== Example 4: Mixed Content ===');
63
75
  const mixedResults: CompletionResult[] = [
64
76
  { type: 'text', value: 'Analysis complete. Results: ' },
65
77
  { type: 'json', value: { score: 0.95, confidence: 'high' } },
66
- { type: 'text', value: '\nThank you!' }
78
+ { type: 'text', value: '\nThank you!' },
67
79
  ];
68
80
 
69
81
  const mixed = InteractionOutput.from(mixedResults);
70
- console.log('Full text:', mixed.text); // 'Analysis complete. Results: \nThank you!'
71
- console.log('Analysis:', mixed.object()); // { score: 0.95, confidence: 'high' }
72
- console.log('Text parts:', mixed.texts); // ['Analysis complete. Results: ', '\nThank you!']
82
+ console.log('Full text:', mixed.text); // 'Analysis complete. Results: \nThank you!'
83
+ console.log('Analysis:', mixed.object()); // { score: 0.95, confidence: 'high' }
84
+ console.log('Text parts:', mixed.texts); // ['Analysis complete. Results: ', '\nThank you!']
@@ -1,23 +1,50 @@
1
- import { ApiTopic, ClientBase, ServerError } from "@vertesia/api-fetch-client";
2
- import {
3
- AsyncExecutionPayload, AsyncExecutionResult, ComputeInteractionFacetPayload, ComputedFacetResponse, GenerateInteractionPayload, GenerateTestDataPayload, GeneratedInteractionDefinition, GeneratedTestDataRecord, ImprovePromptPayload,
1
+ import { ApiTopic, type ClientBase, type IRequestParams, ServerError } from '@vertesia/api-fetch-client';
2
+ import type {
3
+ AsyncExecutionPayload,
4
+ AsyncExecutionResult,
5
+ ComputedFacetResponse,
6
+ ComputeInteractionFacetPayload,
7
+ DeleteByIdResult,
8
+ GeneratedInteractionDefinition,
9
+ GeneratedTestDataRecord,
10
+ GenerateInteractionPayload,
11
+ GenerateTestDataPayload,
12
+ ImprovePromptPayload,
4
13
  ImprovePromptPayloadConfig,
5
- Interaction, InteractionCreatePayload, InteractionEndpoint, InteractionEndpointQuery,
6
- InteractionExecutionPayload, InteractionForkPayload,
7
- InteractionPublishPayload, InteractionRef, InteractionRefWithSchema, InteractionSearchPayload, InteractionSearchQuery,
8
- InteractionsExportPayload, InteractionTags, InteractionUpdatePayload, PromptImprovementResponse,
9
- RateLimitRequestPayload, RateLimitRequestResponse, ResolvedInteractionExecutionInfo
10
- } from "@vertesia/common";
11
- import { VertesiaClient } from "./client.js";
12
- import { checkRateLimit, executeInteraction, executeInteractionAsync, executeInteractionByName } from "./execute.js";
13
- import { InteractionCatalogApi } from "./InteractionCatalogApi.js";
14
- import { EnhancedInteractionExecutionResult, enhanceInteractionExecutionResult } from "./InteractionOutput.js";
14
+ Interaction,
15
+ InteractionCreatePayload,
16
+ InteractionDeletePayload,
17
+ InteractionEndpoint,
18
+ InteractionEndpointQuery,
19
+ InteractionExecutionPayload,
20
+ InteractionForkPayload,
21
+ InteractionPublishPayload,
22
+ InteractionRef,
23
+ InteractionRefWithSchema,
24
+ InteractionSearchPayload,
25
+ InteractionSearchQuery,
26
+ InteractionsExportPayload,
27
+ InteractionTags,
28
+ InteractionUpdatePayload,
29
+ PromptImprovementResponse,
30
+ RateLimitRequestPayload,
31
+ RateLimitRequestResponse,
32
+ ResolvedInteractionExecutionInfo,
33
+ } from '@vertesia/common';
34
+ import type { VertesiaClient } from './client.js';
35
+ import { checkRateLimit, executeInteraction, executeInteractionAsync, executeInteractionByName } from './execute.js';
36
+ import { InteractionCatalogApi } from './InteractionCatalogApi.js';
37
+ import { type EnhancedInteractionExecutionResult, enhanceInteractionExecutionResult } from './InteractionOutput.js';
38
+
39
+ function hasIdPayload(payload: unknown): payload is { id: string } {
40
+ return !!payload && typeof payload === 'object' && 'id' in payload && typeof payload.id === 'string';
41
+ }
15
42
 
16
43
  export default class InteractionsApi extends ApiTopic {
17
44
  catalog: InteractionCatalogApi;
18
45
 
19
46
  constructor(parent: ClientBase) {
20
- super(parent, "/api/v1/interactions");
47
+ super(parent, '/api/v1/interactions');
21
48
  this.catalog = new InteractionCatalogApi(parent);
22
49
  }
23
50
 
@@ -26,21 +53,22 @@ export default class InteractionsApi extends ApiTopic {
26
53
  * @returns InteractionRef[]
27
54
  **/
28
55
  list(payload: InteractionSearchPayload = {}): Promise<InteractionRef[]> {
29
- const query = payload.query || {} as InteractionSearchQuery;
56
+ const query = payload.query || ({} as InteractionSearchQuery);
30
57
 
31
- return this.get("/", {
58
+ return this.get('/', {
32
59
  query: {
33
- ...query
34
- }
60
+ ...query,
61
+ },
35
62
  });
36
63
  }
64
+
37
65
  /**
38
66
  * Find interactions given a mongo match query.
39
67
  * You can also specify if prompts schemas are included in the result
40
68
  */
41
69
  listEndpoints(payload: InteractionEndpointQuery): Promise<InteractionEndpoint[]> {
42
- return this.post("/endpoints", {
43
- payload
70
+ return this.post('/endpoints', {
71
+ payload,
44
72
  });
45
73
  }
46
74
 
@@ -59,10 +87,10 @@ export default class InteractionsApi extends ApiTopic {
59
87
  * @returns InteractionTags[]
60
88
  **/
61
89
  listTags(query?: InteractionSearchQuery): Promise<InteractionTags[]> {
62
- return this.get("/tags", {
90
+ return this.get('/tags', {
63
91
  query: {
64
- ...query
65
- }
92
+ ...query,
93
+ },
66
94
  });
67
95
  }
68
96
 
@@ -72,8 +100,8 @@ export default class InteractionsApi extends ApiTopic {
72
100
  * @returns ComputedFacetResponse
73
101
  **/
74
102
  computeFacets(query: ComputeInteractionFacetPayload): Promise<ComputedFacetResponse> {
75
- return this.post("/facets", {
76
- payload: query
103
+ return this.post('/facets', {
104
+ payload: query,
77
105
  });
78
106
  }
79
107
 
@@ -81,7 +109,7 @@ export default class InteractionsApi extends ApiTopic {
81
109
  * List interaction names in the current project
82
110
  * @returns
83
111
  */
84
- listNames(): Promise<{ id: string, name: string }[]> {
112
+ listNames(): Promise<{ id: string; name: string }[]> {
85
113
  return this.get('/names');
86
114
  }
87
115
 
@@ -103,7 +131,7 @@ export default class InteractionsApi extends ApiTopic {
103
131
  **/
104
132
  create(payload: InteractionCreatePayload): Promise<Interaction> {
105
133
  return this.post('/', {
106
- payload
134
+ payload,
107
135
  });
108
136
  }
109
137
 
@@ -128,10 +156,25 @@ export default class InteractionsApi extends ApiTopic {
128
156
  **/
129
157
  update(id: string, payload: InteractionUpdatePayload): Promise<Interaction> {
130
158
  return this.put(`/${id}`, {
131
- payload
159
+ payload,
132
160
  });
133
161
  }
134
162
 
163
+ /**
164
+ * Delete an interaction. Pass `{ cascade: true }` to also delete every interaction in the
165
+ * target's family — see {@link InteractionDeletePayload}.
166
+ *
167
+ * The signature must stay assignment-compatible with the inherited
168
+ * `ApiTopic.delete(path, params)`, so the parameter is `IRequestParams & InteractionDeletePayload`.
169
+ * Callers can keep passing only the payload (`{ cascade: true }`); IRequestParams fields are all
170
+ * optional.
171
+ */
172
+ delete(id: string, payload?: IRequestParams & InteractionDeletePayload): Promise<DeleteByIdResult> {
173
+ const { cascade, query, ...rest } = payload ?? {};
174
+ const mergedQuery = cascade ? { ...(query ?? {}), cascade: 'true' } : (query ?? undefined);
175
+ return super.delete(`/${id}`, { ...rest, query: mergedQuery }) as Promise<DeleteByIdResult>;
176
+ }
177
+
135
178
  /**
136
179
  * Execute an interaction and return a promise which will be resolved with the executed run when
137
180
  * the run completes or fails.
@@ -148,15 +191,20 @@ export default class InteractionsApi extends ApiTopic {
148
191
  * @throws 500 if interaction execution fails
149
192
  * @throws 500 if interaction execution times out
150
193
  **/
151
- async execute<ResultT = any, ParamsT = any>(id: string, payload: InteractionExecutionPayload = {},
152
- onChunk?: (chunk: string) => void): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
153
- const r = await executeInteraction<ParamsT>(this.client as VertesiaClient, id, payload, onChunk).catch(err => {
154
- if (err instanceof ServerError && err.payload?.id) {
155
- throw err.updateDetails({ run_id: err.payload.id });
156
- } else {
157
- throw err;
158
- }
159
- });
194
+ async execute<ResultT = unknown, ParamsT = unknown>(
195
+ id: string,
196
+ payload: InteractionExecutionPayload = {},
197
+ onChunk?: (chunk: string) => void,
198
+ ): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
199
+ const r = await executeInteraction<ParamsT>(this.client as VertesiaClient, id, payload, onChunk).catch(
200
+ (err) => {
201
+ if (err instanceof ServerError && hasIdPayload(err.payload)) {
202
+ throw err.updateDetails({ run_id: err.payload.id });
203
+ } else {
204
+ throw err;
205
+ }
206
+ },
207
+ );
160
208
  return enhanceInteractionExecutionResult<ResultT, ParamsT>(r);
161
209
  }
162
210
 
@@ -175,10 +223,18 @@ export default class InteractionsApi extends ApiTopic {
175
223
  * @param onChunk
176
224
  * @returns
177
225
  */
178
- async executeByName<ResultT = any, ParamsT = any>(nameWithTag: string, payload: InteractionExecutionPayload = {},
179
- onChunk?: (chunk: string) => void): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
180
- const r = await executeInteractionByName<ParamsT>(this.client as VertesiaClient, nameWithTag, payload, onChunk).catch(err => {
181
- if (err instanceof ServerError && err.payload?.id) {
226
+ async executeByName<ResultT = unknown, ParamsT = unknown>(
227
+ nameWithTag: string,
228
+ payload: InteractionExecutionPayload = {},
229
+ onChunk?: (chunk: string) => void,
230
+ ): Promise<EnhancedInteractionExecutionResult<ResultT, ParamsT>> {
231
+ const r = await executeInteractionByName<ParamsT>(
232
+ this.client as VertesiaClient,
233
+ nameWithTag,
234
+ payload,
235
+ onChunk,
236
+ ).catch((err) => {
237
+ if (err instanceof ServerError && hasIdPayload(err.payload)) {
182
238
  throw err.updateDetails({ run_id: err.payload.id });
183
239
  } else {
184
240
  throw err;
@@ -198,13 +254,13 @@ export default class InteractionsApi extends ApiTopic {
198
254
 
199
255
  publish(id: string, payload: InteractionPublishPayload): Promise<Interaction> {
200
256
  return this.post(`/${id}/publish`, {
201
- payload
257
+ payload,
202
258
  });
203
259
  }
204
260
 
205
261
  fork(id: string, payload: InteractionForkPayload): Promise<Interaction> {
206
262
  return this.post(`/${id}/fork`, {
207
- payload
263
+ payload,
208
264
  });
209
265
  }
210
266
 
@@ -212,20 +268,17 @@ export default class InteractionsApi extends ApiTopic {
212
268
  * Generate Composable definition of an interaction
213
269
  **/
214
270
  generateInteraction(id: string, payload: GenerateInteractionPayload): Promise<GeneratedInteractionDefinition[]> {
215
-
216
271
  return this.post(`${id}/generate-interaction`, {
217
- payload
272
+ payload,
218
273
  });
219
-
220
274
  }
221
275
 
222
276
  /**
223
277
  * Generate Test Data for an interaction
224
278
  **/
225
279
  generateTestData(id: string, payload: GenerateTestDataPayload): Promise<GeneratedTestDataRecord[]> {
226
-
227
280
  return this.post(`${id}/generate-test-data`, {
228
- payload
281
+ payload,
229
282
  });
230
283
  }
231
284
 
@@ -235,17 +288,16 @@ export default class InteractionsApi extends ApiTopic {
235
288
  */
236
289
  suggestImprovements(id: string, payload: ImprovePromptPayloadConfig): Promise<PromptImprovementResponse> {
237
290
  return this.post(`${id}/suggest-prompt-improvements`, {
238
- payload
291
+ payload,
239
292
  });
240
293
  }
241
294
 
242
295
  suggestPromptImprovements(payload: ImprovePromptPayload): Promise<PromptImprovementResponse> {
243
296
  return this.post(`/improve`, {
244
- payload
297
+ payload,
245
298
  });
246
299
  }
247
300
 
248
-
249
301
  /**
250
302
  * List the versions of the interaction. Returns an empty array if no versions are found
251
303
  * @param id
@@ -287,15 +339,17 @@ export default class InteractionsApi extends ApiTopic {
287
339
  * @param options Optional environment and/or model to resolve with
288
340
  * @returns ResolvedInteractionExecutionInfo with the resolved environment and model
289
341
  */
290
- resolve(nameOrId: string, options?: {
291
- environment?: string;
292
- model?: string;
293
- hasImage?: boolean;
294
- hasVideo?: boolean;
295
- }): Promise<ResolvedInteractionExecutionInfo> {
342
+ resolve(
343
+ nameOrId: string,
344
+ options?: {
345
+ environment?: string;
346
+ model?: string;
347
+ hasImage?: boolean;
348
+ hasVideo?: boolean;
349
+ },
350
+ ): Promise<ResolvedInteractionExecutionInfo> {
296
351
  return this.get(`/resolve/${encodeURIComponent(nameOrId)}`, {
297
- query: options
352
+ query: options,
298
353
  });
299
354
  }
300
-
301
355
  }
@@ -1,8 +1,9 @@
1
- import { ApiTopic, ClientBase } from '@vertesia/api-fetch-client';
1
+ import { ApiTopic, type ClientBase } from '@vertesia/api-fetch-client';
2
2
  import type {
3
3
  CreateOAuthClientPayload,
4
4
  OAuthClient,
5
5
  OAuthClientCreateResponse,
6
+ OAuthClientScopeMetadata,
6
7
  SuccessResponse,
7
8
  UpdateOAuthClientPayload,
8
9
  } from '@vertesia/common';
@@ -20,6 +21,10 @@ export default class OAuthClientsApi extends ApiTopic {
20
21
  return this.get(`/${clientId}`);
21
22
  }
22
23
 
24
+ scopeMetadata(): Promise<OAuthClientScopeMetadata> {
25
+ return this.get('/scope-metadata');
26
+ }
27
+
23
28
  create(payload: CreateOAuthClientPayload): Promise<OAuthClientCreateResponse> {
24
29
  return this.post('/', { payload });
25
30
  }