@stack-spot/portal-network 0.189.0 → 0.190.0-beta.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 (51) hide show
  1. package/CHANGELOG.md +146 -0
  2. package/dist/api/account.d.ts +85 -202
  3. package/dist/api/account.d.ts.map +1 -1
  4. package/dist/api/account.js +68 -140
  5. package/dist/api/account.js.map +1 -1
  6. package/dist/api/ai.d.ts +189 -86
  7. package/dist/api/ai.d.ts.map +1 -1
  8. package/dist/api/ai.js +238 -142
  9. package/dist/api/ai.js.map +1 -1
  10. package/dist/api/cloudPlatform.d.ts +363 -188
  11. package/dist/api/cloudPlatform.d.ts.map +1 -1
  12. package/dist/api/cloudPlatform.js +253 -80
  13. package/dist/api/cloudPlatform.js.map +1 -1
  14. package/dist/api/codeShift.d.ts +5 -3
  15. package/dist/api/codeShift.d.ts.map +1 -1
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/genAiInference.d.ts +22 -2
  18. package/dist/api/genAiInference.d.ts.map +1 -1
  19. package/dist/api/genAiInference.js +22 -3
  20. package/dist/api/genAiInference.js.map +1 -1
  21. package/dist/client/account.d.ts +18 -4
  22. package/dist/client/account.d.ts.map +1 -1
  23. package/dist/client/account.js +58 -31
  24. package/dist/client/account.js.map +1 -1
  25. package/dist/client/ai.d.ts +29 -0
  26. package/dist/client/ai.d.ts.map +1 -1
  27. package/dist/client/ai.js +121 -14
  28. package/dist/client/ai.js.map +1 -1
  29. package/dist/client/cloud-platform.d.ts +128 -1
  30. package/dist/client/cloud-platform.d.ts.map +1 -1
  31. package/dist/client/cloud-platform.js +92 -2
  32. package/dist/client/cloud-platform.js.map +1 -1
  33. package/dist/client/code-shift.js +1 -1
  34. package/dist/client/code-shift.js.map +1 -1
  35. package/dist/client/types.d.ts +26 -5
  36. package/dist/client/types.d.ts.map +1 -1
  37. package/package.json +3 -3
  38. package/readme.md +2 -1
  39. package/src/api/account.ts +127 -392
  40. package/src/api/agent-tools.ts +3 -0
  41. package/src/api/agent.ts +2 -0
  42. package/src/api/ai.ts +364 -157
  43. package/src/api/cloudPlatform.ts +638 -264
  44. package/src/api/codeShift.ts +5 -3
  45. package/src/api/genAiInference.ts +47 -4
  46. package/src/api/notification.ts +2 -0
  47. package/src/client/account.ts +54 -38
  48. package/src/client/ai.ts +126 -13
  49. package/src/client/cloud-platform.ts +52 -2
  50. package/src/client/code-shift.ts +1 -1
  51. package/src/client/types.ts +27 -5
@@ -11,14 +11,16 @@ import {
11
11
  createNetwork,
12
12
  createNetworkConnection,
13
13
  createProject,
14
+ createRuntime,
14
15
  createTenant,
15
16
  createVpn,
16
17
  defaults,
17
18
  getCertificate,
18
19
  getFolder,
20
+ getFolderTags,
19
21
  getFoundation,
20
22
  getNetwork,
21
- getProject1,
23
+ getProject,
22
24
  getVpnConfiguration,
23
25
  listCertificates,
24
26
  listCidr,
@@ -28,9 +30,17 @@ import {
28
30
  listInbound,
29
31
  listNetwork,
30
32
  listNetworkConnection,
33
+ listRuntime,
31
34
  listTenant,
32
35
  listVpns,
33
36
  providers,
37
+ putCertificateTags,
38
+ putCidrTags,
39
+ putDnsZoneTags,
40
+ putFolderTags,
41
+ putNetworkTags,
42
+ putProjectTags,
43
+ putVpnTags,
34
44
  } from '../api/cloudPlatform'
35
45
  import { DefaultAPIError } from '../error/DefaultAPIError'
36
46
  import { StackspotAPIError } from '../error/StackspotAPIError'
@@ -106,7 +116,7 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
106
116
  /**
107
117
  * Get a project by id
108
118
  */
109
- getProjectById = this.query(removeAuthorizationParam(getProject1))
119
+ getProjectById = this.query(removeAuthorizationParam(getProject))
110
120
  /**
111
121
  * Get a list of dns records
112
122
  */
@@ -167,6 +177,46 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
167
177
  * Create a tenant
168
178
  */
169
179
  createTenant = this.mutation(removeAuthorizationParam(createTenant))
180
+ /**
181
+ * Get a list of runtimes
182
+ */
183
+ listRuntimes = this.query(removeAuthorizationParam(listRuntime))
184
+ /**
185
+ * Create a runtime
186
+ */
187
+ createRuntime = this.mutation(removeAuthorizationParam(createRuntime))
188
+ /**
189
+ * Get a list of tags in folder
190
+ */
191
+ getFolderTags = this.query(removeAuthorizationParam(getFolderTags))
192
+ /**
193
+ * Update folder tags
194
+ */
195
+ updateFolderTags = this.mutation(removeAuthorizationParam(putFolderTags))
196
+ /**
197
+ * Update project tags
198
+ */
199
+ updateProjectTags = this.mutation(removeAuthorizationParam(putProjectTags))
200
+ /**
201
+ * Update network tags
202
+ */
203
+ updateNetworkTags = this.mutation(removeAuthorizationParam(putNetworkTags))
204
+ /**
205
+ * Update cidr tags
206
+ */
207
+ updateCidrTags = this.mutation(removeAuthorizationParam(putCidrTags))
208
+ /**
209
+ * Update dns zone tags
210
+ */
211
+ updateDnsZoneTags = this.mutation(removeAuthorizationParam(putDnsZoneTags))
212
+ /**
213
+ * Update certificate tags
214
+ */
215
+ updateCertificateTags = this.mutation(removeAuthorizationParam(putCertificateTags))
216
+ /**
217
+ * Update vpn tags
218
+ */
219
+ updateVpnTags = this.mutation(removeAuthorizationParam(putVpnTags))
170
220
  }
171
221
 
172
222
  export const cloudPlatformClient = new CloudPlatformClient()
@@ -58,12 +58,12 @@ import {
58
58
  getModuleV1ModulesModuleIdGet,
59
59
  analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet,
60
60
  analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet,
61
+ putCustomerRatingReportV1ReportsReportIdCustomerRatingPut,
61
62
  searchReposScmServiceV2ReposSearchScmPost,
62
63
  importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost,
63
64
  searchReposScmV2V2ReposSearchScmSearchIdGet,
64
65
  analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet,
65
66
  analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet,
66
- putCustomerRatingReportV1ReportsReportIdCustomerRatingPut,
67
67
  updateModuleServiceV1ModulesModuleIdPut,
68
68
  downloadSearchReposScmV2V2ReposSearchScmSearchIdDownloadGet,
69
69
  } from '../api/codeShift'
@@ -185,6 +185,7 @@ export interface FixedChatRequest extends ChatRequest {
185
185
  stackspot_ai_version?: string,
186
186
  os?: string,
187
187
  upload_ids?: string[],
188
+ selected_model_id?: string,
188
189
  },
189
190
  }
190
191
 
@@ -245,6 +246,7 @@ export interface ChatAgentTool {
245
246
  image?: string,
246
247
  input?: string,
247
248
  output?: string,
249
+ goal?: string,
248
250
  }
249
251
 
250
252
  export interface ChatStepAttempt {
@@ -256,8 +258,8 @@ export interface ChatStepAttempt {
256
258
 
257
259
  export interface BaseChatStep {
258
260
  id: string,
259
- type: 'planning' | 'step' | 'answer',
260
- status: 'pending' | 'running' | 'success' | 'error',
261
+ type: 'planning' | 'step' | 'answer' | 'tool',
262
+ status: 'pending' | 'running' | 'success' | 'error' | 'awaiting_approval',
261
263
  /**
262
264
  * Duration in seconds.
263
265
  */
@@ -266,9 +268,24 @@ export interface BaseChatStep {
266
268
 
267
269
  export interface PlanningChatStep extends BaseChatStep {
268
270
  type: 'planning',
269
- status: 'success',
271
+ status: 'success' | 'awaiting_approval',
270
272
  steps: string[],
271
273
  goal: string,
274
+ user_question?: string,
275
+ }
276
+
277
+ export interface ToolChatStep extends BaseChatStep {
278
+ type: 'tool',
279
+ status: 'running' | 'success' | 'error' | 'awaiting_approval',
280
+ /**
281
+ * Each step might attempt to run for multiple times, with different inputs and outputs. If first attempt succeeds, this array will have
282
+ * only one element.
283
+ *
284
+ * This array never has less than one element, despite the step's status.
285
+ */
286
+ attempts: ChatStepAttempt[],
287
+ input?: Record<string, any>,
288
+ user_question?: string,
272
289
  }
273
290
 
274
291
  export interface StepChatStep extends BaseChatStep {
@@ -288,17 +305,19 @@ export interface AnswerChatStep extends BaseChatStep {
288
305
  type: 'answer',
289
306
  }
290
307
 
291
- export type ChatStep = PlanningChatStep | StepChatStep | AnswerChatStep
308
+ export type ChatStep = PlanningChatStep | StepChatStep | AnswerChatStep | ToolChatStep
292
309
 
293
310
  export interface BaseAgentInfo {
294
311
  type: 'chat' | 'planning' | 'step' | 'tool' | 'final_answer',
295
- action: 'start' | 'end',
312
+ action: 'start' | 'end' | 'awaiting_approval',
296
313
  duration?: number,
314
+ id: string,
297
315
  }
298
316
 
299
317
  export interface AgentTool {
300
318
  tool_id: string,
301
319
  tool_execution_id: string,
320
+ goal: string,
302
321
  }
303
322
 
304
323
  export interface PlanningAgentInfo extends BaseAgentInfo {
@@ -311,6 +330,7 @@ export interface PlanningAgentInfo extends BaseAgentInfo {
311
330
  goal: string,
312
331
  tools?: AgentTool[],
313
332
  }[],
333
+ user_question?: string,
314
334
  },
315
335
  }
316
336
 
@@ -326,6 +346,8 @@ export interface ToolAgentInfo extends BaseAgentInfo {
326
346
  input?: any,
327
347
  attempt: number,
328
348
  output?: string,
349
+ user_question?: string,
350
+ tool_id: string,
329
351
  },
330
352
  }
331
353