@stack-spot/portal-network 0.188.1 → 0.189.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.
- package/CHANGELOG.md +77 -0
- package/dist/api/account.d.ts +197 -202
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +154 -140
- package/dist/api/account.js.map +1 -1
- package/dist/api/codeShift.d.ts +31 -0
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +13 -0
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/genAiInference.d.ts +22 -2
- package/dist/api/genAiInference.d.ts.map +1 -1
- package/dist/api/genAiInference.js +22 -3
- package/dist/api/genAiInference.js.map +1 -1
- package/dist/client/account.d.ts +29 -29
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +26 -17
- package/dist/client/account.js.map +1 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +93 -13
- package/dist/client/ai.js.map +1 -1
- package/dist/client/code-shift.d.ts +9 -0
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +11 -1
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/types.d.ts +26 -5
- package/dist/client/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/readme.md +2 -1
- package/src/api/account.ts +299 -392
- package/src/api/agent-tools.ts +3 -0
- package/src/api/agent.ts +2 -0
- package/src/api/codeShift.ts +46 -0
- package/src/api/genAiInference.ts +47 -4
- package/src/api/notification.ts +2 -0
- package/src/client/account.ts +25 -28
- package/src/client/ai.ts +95 -12
- package/src/client/code-shift.ts +9 -1
- package/src/client/types.ts +27 -5
package/src/client/types.ts
CHANGED
|
@@ -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
|
|