@vertesia/client 0.80.0 → 0.80.1

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 (250) hide show
  1. package/package.json +3 -3
  2. package/src/client.test.ts +3 -0
  3. package/src/client.ts +6 -1
  4. package/src/store/WorkersApi.ts +17 -0
  5. package/src/store/client.ts +2 -2
  6. package/lib/cjs/AccountApi.js +0 -85
  7. package/lib/cjs/AccountApi.js.map +0 -1
  8. package/lib/cjs/AccountsApi.js +0 -16
  9. package/lib/cjs/AccountsApi.js.map +0 -1
  10. package/lib/cjs/AnalyticsApi.js +0 -13
  11. package/lib/cjs/AnalyticsApi.js.map +0 -1
  12. package/lib/cjs/ApiKeysApi.js +0 -63
  13. package/lib/cjs/ApiKeysApi.js.map +0 -1
  14. package/lib/cjs/AppsApi.js +0 -119
  15. package/lib/cjs/AppsApi.js.map +0 -1
  16. package/lib/cjs/CommandsApi.js +0 -19
  17. package/lib/cjs/CommandsApi.js.map +0 -1
  18. package/lib/cjs/EnvironmentsApi.js +0 -58
  19. package/lib/cjs/EnvironmentsApi.js.map +0 -1
  20. package/lib/cjs/GroupsApi.js +0 -78
  21. package/lib/cjs/GroupsApi.js.map +0 -1
  22. package/lib/cjs/IamApi.js +0 -53
  23. package/lib/cjs/IamApi.js.map +0 -1
  24. package/lib/cjs/InteractionBase.js +0 -44
  25. package/lib/cjs/InteractionBase.js.map +0 -1
  26. package/lib/cjs/InteractionCatalogApi.js +0 -64
  27. package/lib/cjs/InteractionCatalogApi.js.map +0 -1
  28. package/lib/cjs/InteractionOutput.js +0 -300
  29. package/lib/cjs/InteractionOutput.js.map +0 -1
  30. package/lib/cjs/InteractionResult.example.js +0 -57
  31. package/lib/cjs/InteractionResult.example.js.map +0 -1
  32. package/lib/cjs/InteractionsApi.js +0 -243
  33. package/lib/cjs/InteractionsApi.js.map +0 -1
  34. package/lib/cjs/ProjectsApi.js +0 -53
  35. package/lib/cjs/ProjectsApi.js.map +0 -1
  36. package/lib/cjs/PromptsApi.js +0 -133
  37. package/lib/cjs/PromptsApi.js.map +0 -1
  38. package/lib/cjs/RefsApi.js +0 -14
  39. package/lib/cjs/RefsApi.js.map +0 -1
  40. package/lib/cjs/RunsApi.js +0 -113
  41. package/lib/cjs/RunsApi.js.map +0 -1
  42. package/lib/cjs/SkillsApi.js +0 -39
  43. package/lib/cjs/SkillsApi.js.map +0 -1
  44. package/lib/cjs/StreamSource.js +0 -17
  45. package/lib/cjs/StreamSource.js.map +0 -1
  46. package/lib/cjs/TrainingApi.js +0 -54
  47. package/lib/cjs/TrainingApi.js.map +0 -1
  48. package/lib/cjs/UsersApi.js +0 -13
  49. package/lib/cjs/UsersApi.js.map +0 -1
  50. package/lib/cjs/client.js +0 -345
  51. package/lib/cjs/client.js.map +0 -1
  52. package/lib/cjs/execute.js +0 -158
  53. package/lib/cjs/execute.js.map +0 -1
  54. package/lib/cjs/index.js +0 -22
  55. package/lib/cjs/index.js.map +0 -1
  56. package/lib/cjs/nodejs/NodeStreamSource.js +0 -45
  57. package/lib/cjs/nodejs/NodeStreamSource.js.map +0 -1
  58. package/lib/cjs/nodejs/index.js +0 -18
  59. package/lib/cjs/nodejs/index.js.map +0 -1
  60. package/lib/cjs/package.json +0 -3
  61. package/lib/cjs/store/AgentsApi.js +0 -16
  62. package/lib/cjs/store/AgentsApi.js.map +0 -1
  63. package/lib/cjs/store/AnalyzeDocApi.js +0 -56
  64. package/lib/cjs/store/AnalyzeDocApi.js.map +0 -1
  65. package/lib/cjs/store/CollectionsApi.js +0 -131
  66. package/lib/cjs/store/CollectionsApi.js.map +0 -1
  67. package/lib/cjs/store/CommandsApi.js +0 -17
  68. package/lib/cjs/store/CommandsApi.js.map +0 -1
  69. package/lib/cjs/store/EmbeddingsApi.js +0 -29
  70. package/lib/cjs/store/EmbeddingsApi.js.map +0 -1
  71. package/lib/cjs/store/FilesApi.js +0 -225
  72. package/lib/cjs/store/FilesApi.js.map +0 -1
  73. package/lib/cjs/store/ObjectsApi.js +0 -283
  74. package/lib/cjs/store/ObjectsApi.js.map +0 -1
  75. package/lib/cjs/store/TypesApi.js +0 -57
  76. package/lib/cjs/store/TypesApi.js.map +0 -1
  77. package/lib/cjs/store/WorkflowsApi.js +0 -414
  78. package/lib/cjs/store/WorkflowsApi.js.map +0 -1
  79. package/lib/cjs/store/client.js +0 -71
  80. package/lib/cjs/store/client.js.map +0 -1
  81. package/lib/cjs/store/errors.js +0 -11
  82. package/lib/cjs/store/errors.js.map +0 -1
  83. package/lib/cjs/store/index.js +0 -23
  84. package/lib/cjs/store/index.js.map +0 -1
  85. package/lib/cjs/store/version.js +0 -6
  86. package/lib/cjs/store/version.js.map +0 -1
  87. package/lib/esm/AccountApi.js +0 -82
  88. package/lib/esm/AccountApi.js.map +0 -1
  89. package/lib/esm/AccountsApi.js +0 -13
  90. package/lib/esm/AccountsApi.js.map +0 -1
  91. package/lib/esm/AnalyticsApi.js +0 -10
  92. package/lib/esm/AnalyticsApi.js.map +0 -1
  93. package/lib/esm/ApiKeysApi.js +0 -59
  94. package/lib/esm/ApiKeysApi.js.map +0 -1
  95. package/lib/esm/AppsApi.js +0 -116
  96. package/lib/esm/AppsApi.js.map +0 -1
  97. package/lib/esm/CommandsApi.js +0 -16
  98. package/lib/esm/CommandsApi.js.map +0 -1
  99. package/lib/esm/EnvironmentsApi.js +0 -55
  100. package/lib/esm/EnvironmentsApi.js.map +0 -1
  101. package/lib/esm/GroupsApi.js +0 -74
  102. package/lib/esm/GroupsApi.js.map +0 -1
  103. package/lib/esm/IamApi.js +0 -47
  104. package/lib/esm/IamApi.js.map +0 -1
  105. package/lib/esm/InteractionBase.js +0 -40
  106. package/lib/esm/InteractionBase.js.map +0 -1
  107. package/lib/esm/InteractionCatalogApi.js +0 -60
  108. package/lib/esm/InteractionCatalogApi.js.map +0 -1
  109. package/lib/esm/InteractionOutput.js +0 -293
  110. package/lib/esm/InteractionOutput.js.map +0 -1
  111. package/lib/esm/InteractionResult.example.js +0 -55
  112. package/lib/esm/InteractionResult.example.js.map +0 -1
  113. package/lib/esm/InteractionsApi.js +0 -240
  114. package/lib/esm/InteractionsApi.js.map +0 -1
  115. package/lib/esm/ProjectsApi.js +0 -50
  116. package/lib/esm/ProjectsApi.js.map +0 -1
  117. package/lib/esm/PromptsApi.js +0 -130
  118. package/lib/esm/PromptsApi.js.map +0 -1
  119. package/lib/esm/RefsApi.js +0 -10
  120. package/lib/esm/RefsApi.js.map +0 -1
  121. package/lib/esm/RunsApi.js +0 -109
  122. package/lib/esm/RunsApi.js.map +0 -1
  123. package/lib/esm/SkillsApi.js +0 -36
  124. package/lib/esm/SkillsApi.js.map +0 -1
  125. package/lib/esm/StreamSource.js +0 -13
  126. package/lib/esm/StreamSource.js.map +0 -1
  127. package/lib/esm/TrainingApi.js +0 -51
  128. package/lib/esm/TrainingApi.js.map +0 -1
  129. package/lib/esm/UsersApi.js +0 -10
  130. package/lib/esm/UsersApi.js.map +0 -1
  131. package/lib/esm/client.js +0 -336
  132. package/lib/esm/client.js.map +0 -1
  133. package/lib/esm/execute.js +0 -118
  134. package/lib/esm/execute.js.map +0 -1
  135. package/lib/esm/index.js +0 -6
  136. package/lib/esm/index.js.map +0 -1
  137. package/lib/esm/nodejs/NodeStreamSource.js +0 -41
  138. package/lib/esm/nodejs/NodeStreamSource.js.map +0 -1
  139. package/lib/esm/nodejs/index.js +0 -2
  140. package/lib/esm/nodejs/index.js.map +0 -1
  141. package/lib/esm/store/AgentsApi.js +0 -12
  142. package/lib/esm/store/AgentsApi.js.map +0 -1
  143. package/lib/esm/store/AnalyzeDocApi.js +0 -52
  144. package/lib/esm/store/AnalyzeDocApi.js.map +0 -1
  145. package/lib/esm/store/CollectionsApi.js +0 -127
  146. package/lib/esm/store/CollectionsApi.js.map +0 -1
  147. package/lib/esm/store/CommandsApi.js +0 -13
  148. package/lib/esm/store/CommandsApi.js.map +0 -1
  149. package/lib/esm/store/EmbeddingsApi.js +0 -25
  150. package/lib/esm/store/EmbeddingsApi.js.map +0 -1
  151. package/lib/esm/store/FilesApi.js +0 -219
  152. package/lib/esm/store/FilesApi.js.map +0 -1
  153. package/lib/esm/store/ObjectsApi.js +0 -279
  154. package/lib/esm/store/ObjectsApi.js.map +0 -1
  155. package/lib/esm/store/TypesApi.js +0 -53
  156. package/lib/esm/store/TypesApi.js.map +0 -1
  157. package/lib/esm/store/WorkflowsApi.js +0 -408
  158. package/lib/esm/store/WorkflowsApi.js.map +0 -1
  159. package/lib/esm/store/client.js +0 -67
  160. package/lib/esm/store/client.js.map +0 -1
  161. package/lib/esm/store/errors.js +0 -7
  162. package/lib/esm/store/errors.js.map +0 -1
  163. package/lib/esm/store/index.js +0 -7
  164. package/lib/esm/store/index.js.map +0 -1
  165. package/lib/esm/store/version.js +0 -3
  166. package/lib/esm/store/version.js.map +0 -1
  167. package/lib/tsconfig.tsbuildinfo +0 -1
  168. package/lib/types/AccountApi.d.ts +0 -59
  169. package/lib/types/AccountApi.d.ts.map +0 -1
  170. package/lib/types/AccountsApi.d.ts +0 -7
  171. package/lib/types/AccountsApi.d.ts.map +0 -1
  172. package/lib/types/AnalyticsApi.d.ts +0 -6
  173. package/lib/types/AnalyticsApi.d.ts.map +0 -1
  174. package/lib/types/ApiKeysApi.d.ts +0 -42
  175. package/lib/types/ApiKeysApi.d.ts.map +0 -1
  176. package/lib/types/AppsApi.d.ts +0 -65
  177. package/lib/types/AppsApi.d.ts.map +0 -1
  178. package/lib/types/CommandsApi.d.ts +0 -10
  179. package/lib/types/CommandsApi.d.ts.map +0 -1
  180. package/lib/types/EnvironmentsApi.d.ts +0 -30
  181. package/lib/types/EnvironmentsApi.d.ts.map +0 -1
  182. package/lib/types/GroupsApi.d.ts +0 -65
  183. package/lib/types/GroupsApi.d.ts.map +0 -1
  184. package/lib/types/IamApi.d.ts +0 -41
  185. package/lib/types/IamApi.d.ts.map +0 -1
  186. package/lib/types/InteractionBase.d.ts +0 -22
  187. package/lib/types/InteractionBase.d.ts.map +0 -1
  188. package/lib/types/InteractionCatalogApi.d.ts +0 -36
  189. package/lib/types/InteractionCatalogApi.d.ts.map +0 -1
  190. package/lib/types/InteractionOutput.d.ts +0 -174
  191. package/lib/types/InteractionOutput.d.ts.map +0 -1
  192. package/lib/types/InteractionResult.example.d.ts +0 -6
  193. package/lib/types/InteractionResult.example.d.ts.map +0 -1
  194. package/lib/types/InteractionsApi.d.ts +0 -165
  195. package/lib/types/InteractionsApi.d.ts.map +0 -1
  196. package/lib/types/ProjectsApi.d.ts +0 -18
  197. package/lib/types/ProjectsApi.d.ts.map +0 -1
  198. package/lib/types/PromptsApi.d.ts +0 -106
  199. package/lib/types/PromptsApi.d.ts.map +0 -1
  200. package/lib/types/RefsApi.d.ts +0 -6
  201. package/lib/types/RefsApi.d.ts.map +0 -1
  202. package/lib/types/RunsApi.d.ts +0 -79
  203. package/lib/types/RunsApi.d.ts.map +0 -1
  204. package/lib/types/SkillsApi.d.ts +0 -26
  205. package/lib/types/SkillsApi.d.ts.map +0 -1
  206. package/lib/types/StreamSource.d.ts +0 -7
  207. package/lib/types/StreamSource.d.ts.map +0 -1
  208. package/lib/types/TrainingApi.d.ts +0 -27
  209. package/lib/types/TrainingApi.d.ts.map +0 -1
  210. package/lib/types/UsersApi.d.ts +0 -6
  211. package/lib/types/UsersApi.d.ts.map +0 -1
  212. package/lib/types/client.d.ts +0 -125
  213. package/lib/types/client.d.ts.map +0 -1
  214. package/lib/types/execute.d.ts +0 -37
  215. package/lib/types/execute.d.ts.map +0 -1
  216. package/lib/types/index.d.ts +0 -10
  217. package/lib/types/index.d.ts.map +0 -1
  218. package/lib/types/nodejs/NodeStreamSource.d.ts +0 -9
  219. package/lib/types/nodejs/NodeStreamSource.d.ts.map +0 -1
  220. package/lib/types/nodejs/index.d.ts +0 -1
  221. package/lib/types/nodejs/index.d.ts.map +0 -1
  222. package/lib/types/store/AgentsApi.d.ts +0 -6
  223. package/lib/types/store/AgentsApi.d.ts.map +0 -1
  224. package/lib/types/store/AnalyzeDocApi.d.ts +0 -17
  225. package/lib/types/store/AnalyzeDocApi.d.ts.map +0 -1
  226. package/lib/types/store/CollectionsApi.d.ts +0 -82
  227. package/lib/types/store/CollectionsApi.d.ts.map +0 -1
  228. package/lib/types/store/CommandsApi.d.ts +0 -10
  229. package/lib/types/store/CommandsApi.d.ts.map +0 -1
  230. package/lib/types/store/EmbeddingsApi.d.ts +0 -12
  231. package/lib/types/store/EmbeddingsApi.d.ts.map +0 -1
  232. package/lib/types/store/FilesApi.d.ts +0 -103
  233. package/lib/types/store/FilesApi.d.ts.map +0 -1
  234. package/lib/types/store/ObjectsApi.d.ts +0 -117
  235. package/lib/types/store/ObjectsApi.d.ts.map +0 -1
  236. package/lib/types/store/TypesApi.d.ts +0 -23
  237. package/lib/types/store/TypesApi.d.ts.map +0 -1
  238. package/lib/types/store/WorkflowsApi.d.ts +0 -62
  239. package/lib/types/store/WorkflowsApi.d.ts.map +0 -1
  240. package/lib/types/store/client.d.ts +0 -35
  241. package/lib/types/store/client.d.ts.map +0 -1
  242. package/lib/types/store/errors.d.ts +0 -4
  243. package/lib/types/store/errors.d.ts.map +0 -1
  244. package/lib/types/store/index.d.ts +0 -6
  245. package/lib/types/store/index.d.ts.map +0 -1
  246. package/lib/types/store/version.d.ts +0 -2
  247. package/lib/types/store/version.d.ts.map +0 -1
  248. package/lib/vertesia-client.js +0 -2
  249. package/lib/vertesia-client.js.map +0 -1
  250. package/src/store/AgentsApi.ts +0 -17
@@ -1,243 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const api_fetch_client_1 = require("@vertesia/api-fetch-client");
4
- const execute_js_1 = require("./execute.js");
5
- const InteractionCatalogApi_js_1 = require("./InteractionCatalogApi.js");
6
- const InteractionOutput_js_1 = require("./InteractionOutput.js");
7
- class InteractionsApi extends api_fetch_client_1.ApiTopic {
8
- catalog;
9
- constructor(parent) {
10
- super(parent, "/api/v1/interactions");
11
- this.catalog = new InteractionCatalogApi_js_1.InteractionCatalogApi(parent);
12
- }
13
- /**
14
- * Get the list of all interactions in the current project
15
- * @returns InteractionRef[]
16
- **/
17
- list(payload = {}) {
18
- const query = payload.query || {};
19
- return this.get("/", {
20
- query: {
21
- ...query
22
- }
23
- });
24
- }
25
- /**
26
- * Find interactions given a mongo match query.
27
- * You can also specify if prompts schemas are included in the result
28
- */
29
- listEndpoints(payload) {
30
- return this.post("/endpoints", {
31
- payload
32
- });
33
- }
34
- /**
35
- * List all interaction versions in the project having the given endpoint name.
36
- * This is useful to list orphaned versions
37
- * @param name
38
- */
39
- listVersionsByName(name) {
40
- return this.get(`/versions/${name}`);
41
- }
42
- /**
43
- * Get the list of all interaction tags in the current project
44
- * @param query optional query parameters to filter the tags
45
- * @returns InteractionTags[]
46
- **/
47
- listTags(query) {
48
- return this.get("/tags", {
49
- query: {
50
- ...query
51
- }
52
- });
53
- }
54
- /**
55
- * Get the list of all interactions facets
56
- * @param payload query payload to filter facet search
57
- * @returns ComputeInteractionFacetsResponse[]
58
- **/
59
- computeFacets(query) {
60
- return this.post("/facets", {
61
- payload: query
62
- });
63
- }
64
- /**
65
- * List interaction names in the current project
66
- * @returns
67
- */
68
- listNames() {
69
- return this.get('/names');
70
- }
71
- /**
72
- * Get the list of all interactions in the current project. Schemas will be returned too.
73
- * @returns InteractionRefWithSchema[]
74
- **/
75
- export(payload) {
76
- return this.post('/export', { payload });
77
- }
78
- /**
79
- * Create a new interaction
80
- * @param payload InteractionCreatePayload
81
- * @returns Interaction
82
- * @throws ApiError
83
- * @throws 400 if payload is invalid
84
- * @throws 500 if interaction creation fails
85
- **/
86
- create(payload) {
87
- return this.post('/', {
88
- payload
89
- });
90
- }
91
- /**
92
- * Retrieve an existing interaction definition
93
- * @param id of the interaction to retrieve
94
- * @returns Interaction
95
- **/
96
- retrieve(id) {
97
- return this.get(`/${id}`);
98
- }
99
- /**
100
- * Update an existing interaction definition
101
- * @param id of the interaction to update
102
- * @param payload InteractionUpdatePayload
103
- * @returns Interaction
104
- * @throws ApiError
105
- * @throws 400 if payload is invalid
106
- * @throws 500 if interaction update fails
107
- * @throws 404 if interaction not found
108
- **/
109
- update(id, payload) {
110
- return this.put(`/${id}`, {
111
- payload
112
- });
113
- }
114
- /**
115
- * Execute an interaction and return a promise which will be resolved with the executed run when
116
- * the run completes or fails.
117
- * If the onChunk callback is passed then the streaming of the result is enabled.
118
- * The onChunk callback with be called with the next chunk of the result as soon as it is available.
119
- * When all chunks are received the function will return the resolved promise
120
- * @param id of the interaction to execute
121
- * @param payload InteractionExecutionPayload
122
- * @param onChunk callback to be called when the next chunk of the response is available
123
- * @returns Promise<ExecutionRun>
124
- * @throws ApiError
125
- * @throws 404 if interaction not found
126
- * @throws 400 if payload is invalid
127
- * @throws 500 if interaction execution fails
128
- * @throws 500 if interaction execution times out
129
- **/
130
- async execute(id, payload = {}, onChunk) {
131
- const r = await (0, execute_js_1.executeInteraction)(this.client, id, payload, onChunk).catch(err => {
132
- if (err instanceof api_fetch_client_1.ServerError && err.payload?.id) {
133
- throw err.updateDetails({ run_id: err.payload.id });
134
- }
135
- else {
136
- throw err;
137
- }
138
- });
139
- return (0, InteractionOutput_js_1.enhanceInteractionExecutionResult)(r);
140
- }
141
- /**
142
- * Same as execute but uses the interaction name selector instead of the id.
143
- *
144
- * A name selector is the interaction endpoint name suffixed with an optional tag or version which is starting with a `@` character.
145
- * The special `draft` tag is used to select the draft version of the interaction. If no tag or version is specified then the latest version is selected.
146
- * Examples of selectors:
147
- * - `ReviewContract` - select the latest version of the ReviewContract interaction
148
- * - `ReviewContract@1` - select the version 1 of the ReviewContract interaction
149
- * - `ReviewContract@draft` - select the draft version of the ReviewContract interaction
150
- * - `ReviewContract@fixed` - select the ReviewContract interaction which is tagged with 'fixed' tag.
151
- * @param nameWithTag
152
- * @param payload
153
- * @param onChunk
154
- * @returns
155
- */
156
- async executeByName(nameWithTag, payload = {}, onChunk) {
157
- const r = await (0, execute_js_1.executeInteractionByName)(this.client, nameWithTag, payload, onChunk).catch(err => {
158
- if (err instanceof api_fetch_client_1.ServerError && err.payload?.id) {
159
- throw err.updateDetails({ run_id: err.payload.id });
160
- }
161
- else {
162
- throw err;
163
- }
164
- });
165
- return (0, InteractionOutput_js_1.enhanceInteractionExecutionResult)(r);
166
- }
167
- /**
168
- * Execute an interaction in an workflow
169
- * @param payload
170
- * @returns
171
- */
172
- executeAsync(payload) {
173
- return (0, execute_js_1.executeInteractionAsync)(this.client, payload);
174
- }
175
- publish(id, payload) {
176
- return this.post(`/${id}/publish`, {
177
- payload
178
- });
179
- }
180
- fork(id, payload) {
181
- return this.post(`/${id}/fork`, {
182
- payload
183
- });
184
- }
185
- /**
186
- * Generate Composable definition of an interaction
187
- **/
188
- generateInteraction(id, payload) {
189
- return this.post(`${id}/generate-interaction`, {
190
- payload
191
- });
192
- }
193
- /**
194
- * Generate Test Data for an interaction
195
- **/
196
- generateTestData(id, payload) {
197
- return this.post(`${id}/generate-test-data`, {
198
- payload
199
- });
200
- }
201
- /**
202
- * Suggest Improvement for a prompt
203
- * @deprecated use suggestPromptImprovements instead
204
- */
205
- async suggestImprovements(id, payload) {
206
- const r = await this.post(`${id}/suggest-prompt-improvements`, {
207
- payload
208
- });
209
- return (0, InteractionOutput_js_1.enhanceExecutionRun)(r);
210
- }
211
- async suggestPromptImprovements(payload) {
212
- const r = await this.post(`/improve`, {
213
- payload
214
- });
215
- return (0, InteractionOutput_js_1.enhanceInteractionExecutionResult)(r);
216
- }
217
- /**
218
- * List the versions of the interaction. Returns an empty array if no versions are found
219
- * @param id
220
- * @returns the versions list or an empty array if no versions are found
221
- */
222
- listVersions(id) {
223
- return this.get(`/${id}/versions`);
224
- }
225
- /**
226
- * List the forks of the interaction. Returns an empty array if no forks are found
227
- * @param id
228
- * @returns the versions list or an empty array if no forks are found
229
- */
230
- listForks(id) {
231
- return this.get(`/${id}/forks`);
232
- }
233
- /**
234
- * Request a time slot to execute an interaction with a given environment / model
235
- * @param payload RateLimitRequestPayload
236
- * @returns RateLimitRequestResponse with delay_ms
237
- */
238
- requestSlot(payload) {
239
- return (0, execute_js_1.checkRateLimit)(this.client, payload);
240
- }
241
- }
242
- exports.default = InteractionsApi;
243
- //# sourceMappingURL=InteractionsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InteractionsApi.js","sourceRoot":"","sources":["../../src/InteractionsApi.ts"],"names":[],"mappings":";;AAAA,iEAA+E;AAW/E,6CAAqH;AACrH,yEAAmE;AACnE,iEAA0J;AAY1J,MAAqB,eAAgB,SAAQ,2BAAQ;IACjD,OAAO,CAAwB;IAE/B,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,IAAI,gDAAqB,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;IAED;;;QAGI;IACJ,IAAI,CAAC,UAAoC,EAAE;QACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAA4B,CAAC;QAE5D,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;YACjB,KAAK,EAAE;gBACH,GAAG,KAAK;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IACD;;;OAGG;IACH,aAAa,CAAC,OAAiC;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YAC3B,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACH,kBAAkB,CAAC,IAAY;QAC3B,OAAO,IAAI,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;IAED;;;;QAII;IACJ,QAAQ,CAAC,KAA8B;QACnC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YACrB,KAAK,EAAE;gBACH,GAAG,KAAK;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;QAII;IACJ,aAAa,CAAC,KAAqC;QAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACxB,OAAO,EAAE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AAG,EAAE,qBAAqB,EAAE;YACzC,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,mBAAmB,CAA+B,EAAU,EAAE,OAAmC;QACnG,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,8BAA8B,EAAE;YAC3D,OAAO;SACV,CAAC,CAAC;QACH,OAAO,IAAA,0CAAmB,EAAmB,CAAC,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,yBAAyB,CAA+B,OAA6B;QACvF,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAClC,OAAO;SACV,CAAC,CAAC;QACH,OAAO,IAAA,wDAAiC,EAAmB,CAAC,CAAC,CAAC;IAClE,CAAC;IAGD;;;;OAIG;IACH,YAAY,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,OAAgC;QACxC,OAAO,IAAA,2BAAc,EAAC,IAAI,CAAC,MAAwB,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CAEJ;AAtQD,kCAsQC"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const api_fetch_client_1 = require("@vertesia/api-fetch-client");
4
- class ProjectsApi extends api_fetch_client_1.ApiTopic {
5
- constructor(parent) {
6
- super(parent, "/api/v1/projects");
7
- }
8
- list(account) {
9
- return this.get('/', { query: { account } });
10
- }
11
- retrieve(projectId) {
12
- return this.get(`/${projectId}`);
13
- }
14
- create(payload) {
15
- return this.post('/', {
16
- payload
17
- });
18
- }
19
- update(projectId, payload) {
20
- return this.put(`/${projectId}`, {
21
- payload
22
- });
23
- }
24
- updateConfiguration(projectId, payload) {
25
- return this.put(`/${projectId}/configuration`, {
26
- payload
27
- });
28
- }
29
- integrations = new IntegrationsConfigurationApi(this);
30
- }
31
- exports.default = ProjectsApi;
32
- class IntegrationsConfigurationApi extends api_fetch_client_1.ApiTopic {
33
- constructor(parent) {
34
- super(parent, "/");
35
- }
36
- list(projectId) {
37
- return this.get(`/${projectId}/integrations`).then(res => res.integrations);
38
- }
39
- retrieve(projectId, integrationId) {
40
- return this.get(`/${projectId}/integrations/${integrationId}`).catch(err => {
41
- if (err.status === 404) {
42
- return undefined;
43
- }
44
- throw err;
45
- });
46
- }
47
- update(projectId, integrationId, payload) {
48
- return this.put(`/${projectId}/integrations/${integrationId}`, {
49
- payload
50
- });
51
- }
52
- }
53
- //# sourceMappingURL=ProjectsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProjectsApi.js","sourceRoot":"","sources":["../../src/ProjectsApi.ts"],"names":[],"mappings":";;AAAA,iEAAkE;AAGlE,MAAqB,WAAY,SAAQ,2BAAQ;IAC7C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,CAAC,OAAkB;QACnB,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,QAAQ,CAAC,SAAiB;QACtB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,OAA8B;QACjC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YAClB,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,SAAiB,EAAE,OAAyB;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,EAAE,EAAE;YAC7B,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED,mBAAmB,CAAC,SAAiB,EAAE,OAAsC;QACzE,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,gBAAgB,EAAE;YAC3C,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED,YAAY,GAAiC,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;CAEvF;AAjCD,8BAiCC;AAED,MAAM,4BAA6B,SAAQ,2BAAQ;IAE/C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,SAAiB;QAClB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAChF,CAAC;IAED,QAAQ,CAAC,SAAiB,EAAE,aAAoC;QAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,iBAAiB,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACvE,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrB,OAAO,SAAS,CAAC;YACrB,CAAC;YACD,MAAM,GAAG,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,SAAiB,EAAE,aAAqB,EAAE,OAAY;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,iBAAiB,aAAa,EAAE,EAAE;YAC3D,OAAO;SACV,CAAC,CAAC;IACP,CAAC;CAEJ"}
@@ -1,133 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const api_fetch_client_1 = require("@vertesia/api-fetch-client");
4
- class PromptsApi extends api_fetch_client_1.ApiTopic {
5
- constructor(parent) {
6
- super(parent, "/api/v1/prompts");
7
- }
8
- /**
9
- * Get the list of all prompt templates
10
- * @param payload query payload to filter search
11
- * @returns PromptTemplateRef[]
12
- **/
13
- list(payload = {}) {
14
- const query = payload.query || {};
15
- return this.get("/", {
16
- query: {
17
- ...query
18
- }
19
- });
20
- }
21
- /**
22
- * Get the list of all prompt facets
23
- * @param payload query payload to filter facet search
24
- * @returns ComputePromptFacetsResponse[]
25
- **/
26
- computeFacets(query) {
27
- return this.post("/facets", {
28
- payload: query
29
- });
30
- }
31
- /**
32
- * Create a new prompt template
33
- * @param payload PromptTemplateCreatePayload
34
- * @returns PromptTemplate
35
- * @throws ApiError
36
- * @throws 400 if payload is invalid
37
- * @throws 500 if creation fails
38
- **/
39
- create(payload) {
40
- return this.post('/', {
41
- payload
42
- });
43
- }
44
- /**
45
- * Retrieve an existing prompt template
46
- * @param id of the prompt template to retrieve
47
- * @returns PromptTemplate
48
- **/
49
- retrieve(id) {
50
- return this.get(`/${id}`);
51
- }
52
- /**
53
- * Update an existing prompt template
54
- * @param id of the prompt template to update
55
- * @param payload PromptTemplateCreatePayload
56
- * @returns PromptTemplate
57
- * @throws ApiError
58
- * @throws 400 if payload is invalid
59
- * @throws 500 if update fails
60
- * @throws 404 if not found
61
- **/
62
- update(id, payload) {
63
- return this.put(`/${id}`, {
64
- payload
65
- });
66
- }
67
- /**
68
- * Delete an existing prompt template
69
- * @param id of the prompt template to delete
70
- * @returns void
71
- */
72
- delete(id) {
73
- return this.del(`/${id}`);
74
- }
75
- /**
76
- * Fork an existing prompt template
77
- * @param id of the prompt template to fork
78
- * @param payload PromptTemplateForkPayload
79
- * @returns Forked PromptTemplate
80
- */
81
- fork(id, payload) {
82
- return this.post(`/${id}/fork`, {
83
- payload
84
- });
85
- }
86
- /**
87
- * Render a prompt template
88
- * @param id of the prompt template to render
89
- * @param payload that will be passed to the prompt template to generate the prompts
90
- * @returns PromptTemplate
91
- * @throws ApiError
92
- * @throws 404 if not found
93
- * @throws 400 if payload is invalid
94
- * @throws 500 if render fails
95
- **/
96
- render(id, payload) {
97
- return this.post(`/${id}/render`, {
98
- payload
99
- });
100
- }
101
- /**
102
- * Get options for a field
103
- * @param field name to get options for
104
- * @returns string[]
105
- */
106
- options(field) {
107
- return this.get(`/options/${field}`);
108
- }
109
- /**
110
- * List the versions of the prompt template. Returns an empty array if no versions are found
111
- * @param id
112
- * @returns the versions list or an empty array if no versions are found
113
- */
114
- listVersions(id) {
115
- return this.get(`/${id}/versions`);
116
- }
117
- /**
118
- * Retrieve list of interactions that use the prompt template
119
- */
120
- listInteractions(id) {
121
- return this.get(`/${id}/interactions`);
122
- }
123
- /**
124
- * List the forks of the prompt. Returns an empty array if no forks are found
125
- * @param id of the prompt to search forks
126
- * @returns the versions list or an empty array if no forks are found
127
- */
128
- listForks(id) {
129
- return this.get(`/${id}/forks`);
130
- }
131
- }
132
- exports.default = PromptsApi;
133
- //# sourceMappingURL=PromptsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PromptsApi.js","sourceRoot":"","sources":["../../src/PromptsApi.ts"],"names":[],"mappings":";;AACA,iEAAkE;AAOlE,MAAqB,UAAW,SAAQ,2BAAQ;IAC5C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IACpC,CAAC;IAED;;;;QAII;IACJ,IAAI,CAAC,UAA+B,EAAE;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAuB,CAAC;QAEvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;YACjB,KAAK,EAAE;gBACH,GAAG,KAAK;aACX;SACJ,CAAC,CAAC;IACP,CAAC;IAED;;;;QAII;IACJ,aAAa,CAAC,KAAgC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACxB,OAAO,EAAE,KAAK;SACjB,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;QAOI;IACJ,MAAM,CAAC,OAAoC;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YAClB,OAAO;SACV,CAAC,CAAC;IACP,CAAC;IAED;;;;Q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esModule", { value: true });
3
- exports.RefsApi = void 0;
4
- const api_fetch_client_1 = require("@vertesia/api-fetch-client");
5
- class RefsApi extends api_fetch_client_1.ApiTopic {
6
- constructor(parent) {
7
- super(parent, "/api/v1/refs");
8
- }
9
- resolve(refs) {
10
- return this.post('/resolve', { payload: { refs } });
11
- }
12
- }
13
- exports.RefsApi = RefsApi;
14
- //# sourceMappingURL=RefsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RefsApi.js","sourceRoot":"","sources":["../../src/RefsApi.ts"],"names":[],"mappings":";;;AACA,iEAAiE;AAGjE,MAAa,OAAQ,SAAQ,2BAAQ;IAEjC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACjC,CAAC;IAGD,OAAO,CAAC,IAAqB;QAEzB,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;IAEvD,CAAC;CAEJ;AAbD,0BAaC"}
@@ -1,113 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RunsApi = void 0;
4
- const api_fetch_client_1 = require("@vertesia/api-fetch-client");
5
- const InteractionOutput_js_1 = require("./InteractionOutput.js");
6
- class RunsApi extends api_fetch_client_1.ApiTopic {
7
- constructor(parent) {
8
- super(parent, "/api/v1/runs");
9
- }
10
- /**
11
- * Get the list of all runs
12
- * @param project optional project id to filter by
13
- * @param interaction optional interaction id to filter by
14
- * @returns InteractionResult[]
15
- **/
16
- list({ limit, offset, filters }) {
17
- const query = {
18
- limit,
19
- offset,
20
- ...filters,
21
- };
22
- return this.get("/", { query: query });
23
- }
24
- find(payload) {
25
- return this.post("/find", {
26
- payload,
27
- });
28
- }
29
- /**
30
- * Get a run by id
31
- *
32
- * @param id
33
- * @returns InteractionResult
34
- **/
35
- async retrieve(id) {
36
- const r = await this.get("/" + id);
37
- return (0, InteractionOutput_js_1.enhanceExecutionRun)(r);
38
- }
39
- retrievePopulated(id) {
40
- return this.get("/" + id, {
41
- query: { populate: "true" },
42
- });
43
- }
44
- /**
45
- * Get filter options for a field
46
- * return FilterOption[]
47
- */
48
- filterOptions(field, filters) {
49
- const query = {
50
- ...filters,
51
- };
52
- return this.get(`/filter-options/${field}`, { query });
53
- }
54
- async create(payload) {
55
- const sessionTags = this.client.sessionTags;
56
- if (sessionTags) {
57
- let tags = Array.isArray(sessionTags) ? sessionTags : [sessionTags];
58
- if (Array.isArray(payload.tags)) {
59
- tags = tags.concat(payload.tags);
60
- }
61
- else if (payload.tags) {
62
- tags = tags.concat([payload.tags]);
63
- }
64
- payload = { ...payload, tags };
65
- }
66
- const r = await this.post("/", {
67
- payload,
68
- });
69
- return (0, InteractionOutput_js_1.enhanceExecutionRun)(r);
70
- }
71
- /**
72
- * Send tool results and continues the conversation
73
- * @param payload
74
- * @returns
75
- */
76
- sendToolResults(payload) {
77
- return this.post(`/tool-results`, {
78
- payload,
79
- });
80
- }
81
- /**
82
- *
83
- * @param payload
84
- * @returns
85
- */
86
- sendUserMessage(payload) {
87
- return this.post(`/user-message`, {
88
- payload,
89
- });
90
- }
91
- createCheckpoint(payload) {
92
- return this.post(`/checkpoint`, {
93
- payload,
94
- });
95
- }
96
- /**
97
- * Get the list of all runs facets
98
- * @param payload query payload to filter facet search
99
- * @returns ComputeRunFacetsResponse[]
100
- **/
101
- computeFacets(query) {
102
- return this.post("/facets", {
103
- payload: query,
104
- });
105
- }
106
- search(payload) {
107
- return this.post("/search", {
108
- payload,
109
- });
110
- }
111
- }
112
- exports.RunsApi = RunsApi;
113
- //# sourceMappingURL=RunsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RunsApi.js","sourceRoot":"","sources":["../../src/RunsApi.ts"],"names":[],"mappings":";;;AACA,iEAAkE;AAgBlE,iEAAmF;AAiBnF,MAAa,OAAQ,SAAQ,2BAAQ;IACjC,YAAY,MAAkB;QAC1B,KAAK,CAAC,MA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: true });
3
- const api_fetch_client_1 = require("@vertesia/api-fetch-client");
4
- /**
5
- * API client for skill operations.
6
- * Skills are interactions with agent_runner_options.is_skill = true.
7
- * They provide contextual instructions to agents by executing/rendering
8
- * the interaction and returning the result.
9
- */
10
- class SkillsApi extends api_fetch_client_1.ApiTopic {
11
- constructor(parent) {
12
- super(parent, "/api/v1/skills");
13
- }
14
- /**
15
- * Find skills relevant to a given context.
16
- * This is the core skill matching API for auto-injection.
17
- * @param context The context to match against
18
- * @param limit Maximum number of skills to return (default: 5)
19
- * @returns Array of injected skills with match scores
20
- */
21
- findRelevant(context, limit) {
22
- const payload = { context, limit };
23
- return this.post("/find-relevant", { payload });
24
- }
25
- /**
26
- * Convenience method to find relevant skills by task description
27
- * @param taskDescription The task or prompt to match
28
- * @param toolNames Optional list of tools being used
29
- * @returns Array of injected skills
30
- */
31
- findRelevantForTask(taskDescription, toolNames) {
32
- return this.findRelevant({
33
- task_description: taskDescription,
34
- tool_names: toolNames,
35
- });
36
- }
37
- }
38
- exports.default = SkillsApi;
39
- //# sourceMappingURL=SkillsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SkillsApi.js","sourceRoot":"","sources":["../../src/SkillsApi.ts"],"names":[],"mappings":";;AAAA,iEAAkE;AAOlE;;;;;GAKG;AACH,MAAqB,SAAU,SAAQ,2BAAQ;IAC3C,YAAY,MAAkB;QAC1B,KAAK,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,OAAqB,EAAE,KAAc;QAC9C,MAAM,OAAO,GAA8B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACpD,CAAC;IAED;;;;;OAKG;IACH,mBAAmB,CACf,eAAuB,EACvB,SAAoB;QAEpB,OAAO,IAAI,CAAC,YAAY,CAAC;YACrB,gBAAgB,EAAE,eAAe;YACjC,UAAU,EAAE,SAAS;SACxB,CAAC,CAAC;IACP,CAAC;CACJ;AAhCD,4BAgCC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StreamSource = void 0;
4
- class StreamSource {
5
- stream;
6
- name;
7
- type;
8
- id;
9
- constructor(stream, name, type, id) {
10
- this.stream = stream;
11
- this.name = name;
12
- this.type = type;
13
- this.id = id;
14
- }
15
- }
16
- exports.StreamSource = StreamSource;
17
- //# sourceMappingURL=StreamSource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StreamSource.js","sourceRoot":"","sources":["../../src/StreamSource.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAY;IACF;IAA+B;IAAqB;IAAsB;IAA7F,YAAmB,MAAsB,EAAS,IAAY,EAAS,IAAa,EAAS,EAAW;QAArF,WAAM,GAAN,MAAM,CAAgB;QAAS,SAAI,GAAJ,IAAI,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAS;QAAS,OAAE,GAAF,EAAE,CAAS;IAAI,CAAC;CAChH;AAFD,oCAEC"}