@stack-spot/portal-network 0.196.0 → 0.198.0
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 +15 -0
- package/dist/api/discover.d.ts +23 -12
- package/dist/api/discover.d.ts.map +1 -1
- package/dist/api/discover.js +10 -0
- package/dist/api/discover.js.map +1 -1
- package/dist/client/code-shift.d.ts +6 -0
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +10 -1
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/discover.d.ts +7 -1
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +208 -0
- package/dist/client/discover.js.map +1 -1
- package/package.json +1 -1
- package/src/api/discover.ts +35 -12
- package/src/client/code-shift.ts +5 -0
- package/src/client/discover.ts +220 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.198.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.197.0...portal-network@v0.198.0) (2025-11-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add sendChatMessage in discover ([#1785](https://github.com/stack-spot/portal-commons/issues/1785)) ([22a5994](https://github.com/stack-spot/portal-commons/commit/22a5994aff7cb9d2f766b5566dd9d86bdeae7590))
|
|
9
|
+
|
|
10
|
+
## [0.197.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.196.0...portal-network@v0.197.0) (2025-11-10)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add PAT Health Check query to CodeShift client ([b5c1234](https://github.com/stack-spot/portal-commons/commit/b5c12348dea37d000aa88628704b3af4ea080a44))
|
|
16
|
+
* add PAT Health Check query to CodeShift client ([#1780](https://github.com/stack-spot/portal-commons/issues/1780)) ([321ddc0](https://github.com/stack-spot/portal-commons/commit/321ddc0b36dd310d81b2eb81e52fef1d743fae82))
|
|
17
|
+
|
|
3
18
|
## [0.196.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.195.1...portal-network@v0.196.0) (2025-11-07)
|
|
4
19
|
|
|
5
20
|
|
package/dist/api/discover.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type GetOpportunityResponse = {
|
|
|
23
23
|
hypotheses: GetOpportunityResponseHypothesisResponse[];
|
|
24
24
|
updatedBy?: string;
|
|
25
25
|
updatedAt?: string;
|
|
26
|
-
chatId
|
|
26
|
+
chatId: string;
|
|
27
27
|
};
|
|
28
28
|
export type UpdateOpportunityRequest = {
|
|
29
29
|
title?: string;
|
|
@@ -37,7 +37,7 @@ export type UpdateOpportunityResponse = {
|
|
|
37
37
|
createdAt?: string;
|
|
38
38
|
updatedBy?: string;
|
|
39
39
|
updatedAt?: string;
|
|
40
|
-
chatId
|
|
40
|
+
chatId: string;
|
|
41
41
|
};
|
|
42
42
|
export type GetHypothesisResponseDocumentResponse = {
|
|
43
43
|
id: string;
|
|
@@ -54,7 +54,7 @@ export type GetHypothesisResponse = {
|
|
|
54
54
|
createdAt?: string;
|
|
55
55
|
updatedBy?: string;
|
|
56
56
|
updatedAt?: string;
|
|
57
|
-
chatId
|
|
57
|
+
chatId: string;
|
|
58
58
|
};
|
|
59
59
|
export type UpdateHypothesisRequest = {
|
|
60
60
|
title?: string;
|
|
@@ -69,7 +69,7 @@ export type UpdateHypothesisResponse = {
|
|
|
69
69
|
createdAt?: string;
|
|
70
70
|
updatedBy?: string;
|
|
71
71
|
updatedAt?: string;
|
|
72
|
-
chatId
|
|
72
|
+
chatId: string;
|
|
73
73
|
};
|
|
74
74
|
export type GetDocumentResponse = {
|
|
75
75
|
id: string;
|
|
@@ -80,7 +80,7 @@ export type GetDocumentResponse = {
|
|
|
80
80
|
createdAt?: string;
|
|
81
81
|
updatedBy?: string;
|
|
82
82
|
updatedAt?: string;
|
|
83
|
-
chatId
|
|
83
|
+
chatId: string;
|
|
84
84
|
};
|
|
85
85
|
export type UpdateDocumentRequest = {
|
|
86
86
|
title?: string;
|
|
@@ -96,7 +96,7 @@ export type UpdateDocumentResponse = {
|
|
|
96
96
|
createdAt?: string;
|
|
97
97
|
updatedBy?: string;
|
|
98
98
|
updatedAt?: string;
|
|
99
|
-
chatId
|
|
99
|
+
chatId: string;
|
|
100
100
|
};
|
|
101
101
|
export type SortResponse = {
|
|
102
102
|
direction: string;
|
|
@@ -129,7 +129,7 @@ export type PageResponseGetOpportunityResponse = {
|
|
|
129
129
|
export type CreateOpportunityRequest = {
|
|
130
130
|
title?: string;
|
|
131
131
|
description?: string;
|
|
132
|
-
chatId
|
|
132
|
+
chatId: string;
|
|
133
133
|
};
|
|
134
134
|
export type CreateOpportunityResponse = {
|
|
135
135
|
id: string;
|
|
@@ -139,13 +139,13 @@ export type CreateOpportunityResponse = {
|
|
|
139
139
|
createdAt?: string;
|
|
140
140
|
updatedBy?: string;
|
|
141
141
|
updatedAt?: string;
|
|
142
|
-
chatId
|
|
142
|
+
chatId: string;
|
|
143
143
|
};
|
|
144
144
|
export type CreateHypothesisRequest = {
|
|
145
145
|
opportunityId?: string;
|
|
146
146
|
title?: string;
|
|
147
147
|
description?: string;
|
|
148
|
-
chatId
|
|
148
|
+
chatId: string;
|
|
149
149
|
};
|
|
150
150
|
export type CreateHypothesisResponse = {
|
|
151
151
|
id: string;
|
|
@@ -156,14 +156,14 @@ export type CreateHypothesisResponse = {
|
|
|
156
156
|
createdAt?: string;
|
|
157
157
|
updatedBy?: string;
|
|
158
158
|
updatedAt?: string;
|
|
159
|
-
chatId
|
|
159
|
+
chatId: string;
|
|
160
160
|
};
|
|
161
161
|
export type CreateDocumentRequest = {
|
|
162
162
|
hypothesisId?: string;
|
|
163
163
|
title?: string;
|
|
164
164
|
description?: string;
|
|
165
165
|
content?: string;
|
|
166
|
-
chatId
|
|
166
|
+
chatId: string;
|
|
167
167
|
};
|
|
168
168
|
export type CreateDocumentResponse = {
|
|
169
169
|
id: string;
|
|
@@ -174,7 +174,14 @@ export type CreateDocumentResponse = {
|
|
|
174
174
|
createdAt?: string;
|
|
175
175
|
updatedBy?: string;
|
|
176
176
|
updatedAt?: string;
|
|
177
|
-
chatId
|
|
177
|
+
chatId: string;
|
|
178
|
+
};
|
|
179
|
+
export type MessageRequest = {
|
|
180
|
+
prompt: string;
|
|
181
|
+
conversationId: string;
|
|
182
|
+
};
|
|
183
|
+
export type SseEmitter = {
|
|
184
|
+
timeout?: number;
|
|
178
185
|
};
|
|
179
186
|
export type GetArtifactResponse = {
|
|
180
187
|
"type": "OPPORTUNITY" | "HYPOTHESIS" | "DOCUMENT";
|
|
@@ -279,6 +286,10 @@ export declare function getAllByHypothesis({ hypothesisId }: {
|
|
|
279
286
|
export declare function create2({ createDocumentRequest }: {
|
|
280
287
|
createDocumentRequest: CreateDocumentRequest;
|
|
281
288
|
}, opts?: Oazapfts.RequestOpts): Promise<CreateDocumentResponse>;
|
|
289
|
+
export declare function chat({ authorization, messageRequest }: {
|
|
290
|
+
authorization: string;
|
|
291
|
+
messageRequest: MessageRequest;
|
|
292
|
+
}, opts?: Oazapfts.RequestOpts): Promise<SseEmitter>;
|
|
282
293
|
/**
|
|
283
294
|
* Get specific Document content
|
|
284
295
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/api/discover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAG9D,CAAC;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC;AACF,MAAM,MAAM,wCAAwC,GAAG;IACnD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,sBAAs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AI,CAAC,EAAE,QAAQ,CAAC,WAAW,uBAY7B;AACD;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC;CACtB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,mBAO7B;AACD;;GAEG;AACH,wBAAgB,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE;IAChC,MAAM,EAAE,MAAM,CAAC;CAClB,EAAE,IAAI,CAAC,EAAE,QAAQ,CAAC,WAAW,kCAS7B"}
|
package/dist/api/discover.js
CHANGED
|
@@ -159,6 +159,16 @@ export function create2({ createDocumentRequest }, opts) {
|
|
|
159
159
|
body: createDocumentRequest
|
|
160
160
|
})));
|
|
161
161
|
}
|
|
162
|
+
export function chat({ authorization, messageRequest }, opts) {
|
|
163
|
+
return oazapfts.ok(oazapfts.fetchJson("/v2/ai/chat", oazapfts.json({
|
|
164
|
+
...opts,
|
|
165
|
+
method: "POST",
|
|
166
|
+
body: messageRequest,
|
|
167
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
168
|
+
Authorization: authorization
|
|
169
|
+
})
|
|
170
|
+
})));
|
|
171
|
+
}
|
|
162
172
|
/**
|
|
163
173
|
* Get specific Document content
|
|
164
174
|
*/
|
package/dist/api/discover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/api/discover.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAC9C,MAAM,CAAC,MAAM,QAAQ,GAA8C;IAC/D,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,kDAAkD;CAC9D,CAAC;AACF,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,OAAO,G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S,CAGlC,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC;QAC5B,GAAG,IAAI;QACP,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE;YAC1C,aAAa,EAAE,aAAa;SAC/B,CAAC;KACL,CAAC,CAAC,CAAC,CAAC;AACT,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,UAAU,EAE1C,EAAE,IAA2B;IAC1B,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAGlC,iBAAiB,kBAAkB,CAAC,UAAU,CAAC,UAAU,EAAE;QAC1D,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC;AACD;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,MAAM,EAE/B,EAAE,IAA2B;IAC1B,OAAO,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAGlC,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC;QACnC,MAAM;KACT,CAAC,CAAC,EAAE,EAAE;QACH,GAAG,IAAI;KACV,CAAC,CAAC,CAAC;AACR,CAAC"}
|
|
@@ -390,6 +390,12 @@ declare class CodeShift extends ReactQueryNetworkClient {
|
|
|
390
390
|
authorization: string;
|
|
391
391
|
validateScmUrlRequest: import("../api/codeShift.js").ValidateScmUrlRequest;
|
|
392
392
|
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, any>;
|
|
393
|
+
/**
|
|
394
|
+
* PAT Health Check
|
|
395
|
+
*/
|
|
396
|
+
checkScmPatHealth: import("../network/types.js").QueryObject<Omit<{
|
|
397
|
+
authorization: string;
|
|
398
|
+
}, "authorization" | "authorizationHeader" | "jwtToken"> & {}, boolean>;
|
|
393
399
|
/**
|
|
394
400
|
* Get Branches for a Repository
|
|
395
401
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-shift.d.ts","sourceRoot":"","sources":["../../src/client/code-shift.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"code-shift.d.ts","sourceRoot":"","sources":["../../src/client/code-shift.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAyE7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAI5E,cAAM,SAAU,SAAQ,uBAAuB;;IAK7C,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE;;OAEG;IACH,gBAAgB;;;wEAA8E;IAC9F;;OAEG;IACH,uBAAuB;;;;wEAAmF;IAC1G;;OAEG;IACH,YAAY;;;;;;;;;;;;0HAAwE;IACpF;;OAEG;IACH,UAAU;;;sHAAuF;IACjG;;OAEG;IACH,gBAAgB;;;wEAA4F;IAC5G;;OAEG;IACH,gBAAgB;;;;wEAAyF;IACzG;;OAEG;IACH,kBAAkB;;;;;;;;;;wEAAwF;IAC1G;;OAEG;IACH,2BAA2B;;;8GAAmG;IAC9H;;OAEG;IACH,OAAO;;;;;;;;;;;;kHAAuE;IAC9E;;OAEG;IACH,MAAM;;;iHAAsE;IAC5E;;MAEE;IACF,iBAAiB;;;wEAAkG;IACnH;;MAEE;IACF,oBAAoB;;;wEAAuG;IAC3H;;OAEG;IACH,aAAa;;;8HAAkF;IAC/F;;OAEG;IACH,YAAY;;;;wEAA4E;IACxF;;OAEG;IACH,YAAY;;;;;wEAAmF;IAC/F;;OAEG;IACH,cAAc;;;wEAAwF;IACtG;;OAEG;IACH,iBAAiB;;;;;;gIAA0F;IAC3G;;OAEG;IACH,MAAM;;;qHAAsE;IAC5E;;OAEG;IACH,cAAc;;;;wEAAmF;IACjG;;OAEG;IACH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;;gIAAgG;IACxH;;OAEG;IACH,sCAAsC;;;;;;;;;;;;;8IAErC;IACD;;OAEG;IACH,8CAA8C;;;;;;;;;wEAE7C;IACD;;OAEG;IACH,kBAAkB;;;;;;;;;;;0HAAmF;IACrG;;OAEG;IACH,0BAA0B;;;;;;;;;;wEAAmG;IAC7H;;OAEG;IACH,gCAAgC;;;;;;;;;;;;wEAE/B;IACD;;OAEG;IACH,2BAA2B;;;;;;;;;;;;mIAAoG;IAC/H;;OAEG;IACH,mCAAmC;;;;;;;;;;;wEAElC;IACD;;OAEG;IACH,eAAe;;gHAEd;IACD;;OAEG;IACH,6BAA6B;;;;;;;;;;;;;;qIAE5B;IACD;;OAEG;IACH,qCAAqC;;;;;;;;;;;;;wEAEpC;IACD;;OAEG;IACH,0BAA0B;;;;;;;;;;;;;;yIAEzB;IACD;;MAEE;IACF,kCAAkC;;;;;;;;;;;;;yIAEjC;IACD;;OAEG;IACH,mCAAmC;;;;;;;;;;;;;;2IAElC;IACD;;OAEG;IACH,2CAA2C;;;;;;;;;;;;;wEAE1C;IACD;;OAEG;IACH,gCAAgC;;;;;;;;;;;;;;wIAE/B;IACD;;OAEG;IACH,wCAAwC;;;;;;;;;;;;;wEAEvC;CACF;AAED,eAAO,MAAM,eAAe,WAAkB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { analyticsRepositoryLastReportStatusDownloadV1AnalyticsRepositoriesLastReportStatusDownloadGet, analyticsRepositoryLastReportStatusV1AnalyticsRepositoriesLastReportStatusGet, analyticsRepositoryUsageDownloadV1AnalyticsRepositoriesUsageDownloadGet, analyticsRepositoryUsageV1AnalyticsRepositoriesUsageGet, analyticsProgramGroupsLastReportStatusDownloadV1AnalyticsProgramGroupsLastReportStatusDownloadGet, analyticsProgramGroupsLastReportStatusV1AnalyticsProgramGroupsLastReportStatusGet, analyticsProgramGroupsUsageDownloadV1AnalyticsProgramGroupsUsageDownloadGet, analyticsProgramGroupsUsageV1AnalyticsProgramGroupsUsageGet, analyticsUserUsageDownloadV1AnalyticsUsersUsageDownloadGet, analyticsUserUsageV1AnalyticsUsersUsageGet, checkRoleRouteV1RolesRoleGet, createAccountSettingsV1SettingsPut, createIntegrationServiceV1IntegrationsPost, createModuleServiceV1ModulesPost, createProgramGroupServiceV1ProgramGroupsPost, createReposBatchServiceV1ReposBatchPost, createRepositoryServiceV1ReposPost, defaults, deleteIntegrationServiceV1IntegrationsIntegrationIdDelete, deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete, deleteRepositoryServiceV1ReposRepositoryIdDelete, dispatchModuleServiceV1ModulesDispatchesPost, downloadReportV1ReportsReportIdDownloadGet, downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet, generalReportSuccessAndErrorsV1AnalyticsReportsGeneralSuccessAndErrorsGet, getAccountSettingsV1SettingsGet, getIntegrationByIdServiceV1IntegrationsIntegrationIdGet, getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet, getReportPullRequestContentV1ReportsReportIdPullRequestGet, getReportV1ReportsReportIdGet, getRepositoryByIdServiceV1ReposRepositoryIdGet, getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet, listBranchesServiceV1ReposBranchesGet, listIntegrationServiceV1IntegrationsGet, listModulesServiceV1ModulesGet, listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet, listProgramGroupServiceV1ProgramGroupsGet, listRepositoryReportV1ReposRepositoryIdReportsGet, listRepositoryServiceV1ReposGet, listTagsServiceV1TagsGet, searchReposScmServiceV1ReposSearchScmGet, updateIntegrationServiceV1IntegrationsIntegrationIdPut, updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut, updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut, updateRepositoryServiceV1ReposRepositoryIdPut, validateScmUrlServiceV1ReposValidateScmUrlPost, listUserServiceV1UsersGet, analyticsProgramGroupsDetailsV1AnalyticsProgramGroupsDetailsGet, analyticsProgramGroupsDetailsDownloadV1AnalyticsProgramGroupsDetailsDownloadGet, getModuleInputsV1ModulesModuleIdInputsGet, analyticsRepositoryDetailedReportDownloadV1AnalyticsRepositoriesDetailsDownloadGet, analyticsRepositoryDetailedReportV1AnalyticsRepositoriesDetailsGet, listRepositoryDownloadServiceV1ReposDownloadGet, listProgramGroupDownloadServiceV1ProgramGroupsDownloadGet, getModuleV1ModulesModuleIdGet, analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet, analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet, searchReposScmServiceV2ReposSearchScmPost, importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost, searchReposScmV2V2ReposSearchScmSearchIdGet, analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet, analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet, putCustomerRatingReportV1ReportsReportIdCustomerRatingPut, updateModuleServiceV1ModulesModuleIdPut, downloadSearchReposScmV2V2ReposSearchScmSearchIdDownloadGet, moduleFavoriteServiceAddV1ModulesModuleIdFavoritesPost, moduleFavoriteServiceDeleteV1ModulesModuleIdFavoritesDelete, } from '../api/codeShift.js';
|
|
1
|
+
import { analyticsRepositoryLastReportStatusDownloadV1AnalyticsRepositoriesLastReportStatusDownloadGet, analyticsRepositoryLastReportStatusV1AnalyticsRepositoriesLastReportStatusGet, analyticsRepositoryUsageDownloadV1AnalyticsRepositoriesUsageDownloadGet, analyticsRepositoryUsageV1AnalyticsRepositoriesUsageGet, analyticsProgramGroupsLastReportStatusDownloadV1AnalyticsProgramGroupsLastReportStatusDownloadGet, analyticsProgramGroupsLastReportStatusV1AnalyticsProgramGroupsLastReportStatusGet, analyticsProgramGroupsUsageDownloadV1AnalyticsProgramGroupsUsageDownloadGet, analyticsProgramGroupsUsageV1AnalyticsProgramGroupsUsageGet, analyticsUserUsageDownloadV1AnalyticsUsersUsageDownloadGet, analyticsUserUsageV1AnalyticsUsersUsageGet, checkRoleRouteV1RolesRoleGet, createAccountSettingsV1SettingsPut, createIntegrationServiceV1IntegrationsPost, createModuleServiceV1ModulesPost, createProgramGroupServiceV1ProgramGroupsPost, createReposBatchServiceV1ReposBatchPost, createRepositoryServiceV1ReposPost, defaults, deleteIntegrationServiceV1IntegrationsIntegrationIdDelete, deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete, deleteRepositoryServiceV1ReposRepositoryIdDelete, dispatchModuleServiceV1ModulesDispatchesPost, downloadReportV1ReportsReportIdDownloadGet, downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet, generalReportSuccessAndErrorsV1AnalyticsReportsGeneralSuccessAndErrorsGet, getAccountSettingsV1SettingsGet, getIntegrationByIdServiceV1IntegrationsIntegrationIdGet, getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet, getReportPullRequestContentV1ReportsReportIdPullRequestGet, getReportV1ReportsReportIdGet, getRepositoryByIdServiceV1ReposRepositoryIdGet, getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet, listBranchesServiceV1ReposBranchesGet, listIntegrationServiceV1IntegrationsGet, listModulesServiceV1ModulesGet, listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet, listProgramGroupServiceV1ProgramGroupsGet, listRepositoryReportV1ReposRepositoryIdReportsGet, listRepositoryServiceV1ReposGet, listTagsServiceV1TagsGet, searchReposScmServiceV1ReposSearchScmGet, updateIntegrationServiceV1IntegrationsIntegrationIdPut, updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut, updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut, updateRepositoryServiceV1ReposRepositoryIdPut, validateScmUrlServiceV1ReposValidateScmUrlPost, listUserServiceV1UsersGet, analyticsProgramGroupsDetailsV1AnalyticsProgramGroupsDetailsGet, analyticsProgramGroupsDetailsDownloadV1AnalyticsProgramGroupsDetailsDownloadGet, getModuleInputsV1ModulesModuleIdInputsGet, analyticsRepositoryDetailedReportDownloadV1AnalyticsRepositoriesDetailsDownloadGet, analyticsRepositoryDetailedReportV1AnalyticsRepositoriesDetailsGet, listRepositoryDownloadServiceV1ReposDownloadGet, listProgramGroupDownloadServiceV1ProgramGroupsDownloadGet, getModuleV1ModulesModuleIdGet, analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet, analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet, searchReposScmServiceV2ReposSearchScmPost, importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost, searchReposScmV2V2ReposSearchScmSearchIdGet, analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet, analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet, putCustomerRatingReportV1ReportsReportIdCustomerRatingPut, updateModuleServiceV1ModulesModuleIdPut, downloadSearchReposScmV2V2ReposSearchScmSearchIdDownloadGet, moduleFavoriteServiceAddV1ModulesModuleIdFavoritesPost, moduleFavoriteServiceDeleteV1ModulesModuleIdFavoritesDelete, patHealthCheckV1ScmPatHealthCheckGet, } from '../api/codeShift.js';
|
|
2
2
|
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
3
3
|
import { codeShiftDictionary } from '../error/dictionary/code-shift.js';
|
|
4
4
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
@@ -414,6 +414,15 @@ class CodeShift extends ReactQueryNetworkClient {
|
|
|
414
414
|
writable: true,
|
|
415
415
|
value: this.mutation(removeAuthorizationParam(validateScmUrlServiceV1ReposValidateScmUrlPost))
|
|
416
416
|
});
|
|
417
|
+
/**
|
|
418
|
+
* PAT Health Check
|
|
419
|
+
*/
|
|
420
|
+
Object.defineProperty(this, "checkScmPatHealth", {
|
|
421
|
+
enumerable: true,
|
|
422
|
+
configurable: true,
|
|
423
|
+
writable: true,
|
|
424
|
+
value: this.query(removeAuthorizationParam(patHealthCheckV1ScmPatHealthCheckGet))
|
|
425
|
+
});
|
|
417
426
|
/**
|
|
418
427
|
* Get Branches for a Repository
|
|
419
428
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-shift.js","sourceRoot":"","sources":["../../src/client/code-shift.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,6FAA6F,EAC7F,6EAA6E,EAC7E,uEAAuE,EACvE,uDAAuD,EACvD,iGAAiG,EACjG,iFAAiF,EACjF,2EAA2E,EAC3E,2DAA2D,EAC3D,0DAA0D,EAC1D,0CAA0C,EAC1C,4BAA4B,EAC5B,kCAAkC,EAClC,0CAA0C,EAC1C,gCAAgC,EAChC,4CAA4C,EAC5C,uCAAuC,EACvC,kCAAkC,EAClC,QAAQ,EACR,yDAAyD,EACzD,4DAA4D,EAC5D,gDAAgD,EAChD,4CAA4C,EAC5C,0CAA0C,EAC1C,oEAAoE,EACpE,yEAAyE,EACzE,+BAA+B,EAC/B,uDAAuD,EACvD,0DAA0D,EAC1D,0DAA0D,EAC1D,6BAA6B,EAC7B,8CAA8C,EAC9C,mEAAmE,EACnE,qCAAqC,EACrC,uCAAuC,EACvC,8BAA8B,EAC9B,oEAAoE,EACpE,yCAAyC,EACzC,iDAAiD,EACjD,+BAA+B,EAC/B,wBAAwB,EACxB,wCAAwC,EACxC,sDAAsD,EACtD,6EAA6E,EAC7E,yDAAyD,EACzD,6CAA6C,EAC7C,8CAA8C,EAC9C,yBAAyB,EACzB,+DAA+D,EAC/D,+EAA+E,EAC/E,yCAAyC,EACzC,kFAAkF,EAClF,kEAAkE,EAClE,+CAA+C,EAC/C,yDAAyD,EACzD,6BAA6B,EAC7B,2EAA2E,EAC3E,2FAA2F,EAC3F,yCAAyC,EACzC,yDAAyD,EACzD,2CAA2C,EAC3C,uEAAuE,EACvE,uFAAuF,EACvF,yDAAyD,EACzD,uCAAuC,EACvC,2DAA2D,EAC3D,sDAAsD,EACtD,2DAA2D,
|
|
1
|
+
{"version":3,"file":"code-shift.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,kEAAkE,CAAC,CAC7F;WAAA;QACD;;UAEE;QACF;;;;mBAAqC,IAAI,CAAC,KAAK,CAC7C,wBAAwB,CAAC,kFAAkF,CAAC,CAC7G;WAAA;QACD;;WAEG;QACH;;;;mBAAsC,IAAI,CAAC,KAAK,CAC9C,wBAAwB,CAAC,2EAA2E,CAAC,CACtG;WAAA;QACD;;WAEG;QACH;;;;mBAA8C,IAAI,CAAC,KAAK,CACtD,wBAAwB,CAAC,2FAA2F,CAAC,CACtH;WAAA;QACD;;WAEG;QACH;;;;mBAAmC,IAAI,CAAC,KAAK,CAC3C,wBAAwB,CAAC,uEAAuE,CAAC,CAClG;WAAA;QACD;;WAEG;QACH;;;;mBAA2C,IAAI,CAAC,KAAK,CACnD,wBAAwB,CAAC,uFAAuF,CAAC,CAClH;WAAA;IAzTD,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAC1F,CAAC;CAsTF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,SAAS,EAAE,CAAA"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime';
|
|
2
2
|
import { ConversationResponse } from '../api/ai.js';
|
|
3
|
-
import { GetOpportunityResponse } from '../api/discover.js';
|
|
3
|
+
import { GetOpportunityResponse, MessageRequest } from '../api/discover.js';
|
|
4
4
|
import { StackspotAPIError } from '../error/StackspotAPIError.js';
|
|
5
|
+
import { StreamedJson } from '../utils/StreamedJson.js';
|
|
5
6
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
7
|
+
import { ChatResponseWithSteps } from './types.js';
|
|
6
8
|
export interface ChatConversionDetails extends ConversationResponse {
|
|
7
9
|
opportunityName?: string;
|
|
8
10
|
hypothesisCount?: number;
|
|
@@ -58,6 +60,10 @@ declare class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
58
60
|
page?: number | undefined;
|
|
59
61
|
size?: number | undefined;
|
|
60
62
|
}, ChatConversionDetails[]>, "isAllowed" | "useAllowed" | "getPermissionKey">;
|
|
63
|
+
private static toolsOfAgent;
|
|
64
|
+
sendChatMessage(request: MessageRequest & {
|
|
65
|
+
agentId: string;
|
|
66
|
+
}, minChangeIntervalMS?: number): StreamedJson<ChatResponseWithSteps>;
|
|
61
67
|
}
|
|
62
68
|
export declare const discoverClient: DiscoverClient;
|
|
63
69
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/client/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/client/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAG7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAuJ,sBAAsB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAE7N,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAE5E,OAAO,EAAiB,qBAAqB,EAAmC,MAAM,SAAS,CAAA;AAG/F,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,cAAM,cAAe,SAAQ,uBAAuB;;IAKlD,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,SAAS,GAAG,iBAAiB;IAIlE,aAAa;;;;;;qEAAqB;IAElC,WAAW;;+BAAsB;IAEjC,UAAU;;0DAAsB;IAEhC,cAAc;;wDAAuB;IAErC,SAAS;;wDAAiC;IAE1C,QAAQ;;sDAAuB;IAE/B,SAAS;;wDAAsB;IAE/B,iBAAiB;;4DAAwB;IAEzC,gBAAgB;;2DAAyB;IAEzC,cAAc;;yDAAyB;IAEvC,iBAAiB;;cAA4B;IAE7C,gBAAgB;;cAA6B;IAE7C,cAAc;;cAA6B;IAE3C,KAAK;;;;kFAmCH;mBAEmB,YAAY;IAkBjC,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,qBAAqB,CAAC;CAiMlI;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAA"}
|
package/dist/client/discover.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { findLast, last } from 'lodash';
|
|
1
2
|
import { getApiAddresses } from '../api-addresses.js';
|
|
2
3
|
import { create, create1, create2, defaults, deleteById, deleteById1, deleteById2, getAll, getAll1, getAll2, getAllByHypothesis, getById, getById1, getById2 } from '../api/discover.js';
|
|
3
4
|
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
5
|
+
import { StreamedJson } from '../utils/StreamedJson.js';
|
|
4
6
|
import { baseDictionary } from '../error/dictionary/base.js';
|
|
7
|
+
import { formatJson } from '../utils/string.js';
|
|
5
8
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
6
9
|
import { aiClient } from './ai.js';
|
|
10
|
+
import { agentToolsClient } from './agent-tools.js';
|
|
7
11
|
class DiscoverClient extends ReactQueryNetworkClient {
|
|
8
12
|
constructor() {
|
|
9
13
|
super(getApiAddresses().discover.url, defaults);
|
|
@@ -119,6 +123,210 @@ class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
119
123
|
buildStackSpotError(error) {
|
|
120
124
|
return new DefaultAPIError(error.data, error.status, baseDictionary, error.headers);
|
|
121
125
|
}
|
|
126
|
+
static async toolsOfAgent(agentId) {
|
|
127
|
+
try {
|
|
128
|
+
const agent = agentId ? await agentToolsClient.agent.query({ agentId }) : undefined;
|
|
129
|
+
if (!agent)
|
|
130
|
+
return [];
|
|
131
|
+
const tools = [];
|
|
132
|
+
agent.toolkits?.builtin_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
|
|
133
|
+
if (id)
|
|
134
|
+
tools.push({ image: kit.image_url, id, name: name || id, description });
|
|
135
|
+
}));
|
|
136
|
+
agent.toolkits?.custom_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
|
|
137
|
+
if (id)
|
|
138
|
+
tools.push({ image: kit.avatar ?? undefined, id, name: name || id, description });
|
|
139
|
+
}));
|
|
140
|
+
return tools;
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
sendChatMessage(request, minChangeIntervalMS) {
|
|
147
|
+
const abortController = new AbortController();
|
|
148
|
+
const headers = {
|
|
149
|
+
'Content-Type': 'application/json',
|
|
150
|
+
'Accept': 'text/event-stream',
|
|
151
|
+
};
|
|
152
|
+
const events = this.stream(this.resolveURL('/v2/ai/chat'), { method: 'post', body: JSON.stringify(request), headers, signal: abortController.signal });
|
|
153
|
+
/**
|
|
154
|
+
* This function treats events in the streaming that deals with the execution of tools. Since these events are not concatenated like
|
|
155
|
+
* normal streamings of data, we need this separate function to deal with them. It transforms the internal data model of the
|
|
156
|
+
* StreamedJson object whenever an event is triggered.
|
|
157
|
+
*/
|
|
158
|
+
async function transform(event, data) {
|
|
159
|
+
const info = event.agent_info;
|
|
160
|
+
if (!info)
|
|
161
|
+
return;
|
|
162
|
+
const tools = await DiscoverClient.toolsOfAgent(request.agentId);
|
|
163
|
+
data.steps = data.steps ? [...data.steps] : [];
|
|
164
|
+
if (info.type === 'planning' && info.action === 'end') {
|
|
165
|
+
data.steps.push({
|
|
166
|
+
id: 'planning',
|
|
167
|
+
type: 'planning',
|
|
168
|
+
status: 'success',
|
|
169
|
+
duration: info.duration || 0,
|
|
170
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
171
|
+
goal: info.data?.plan_goal ?? '',
|
|
172
|
+
});
|
|
173
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
174
|
+
id: s.id,
|
|
175
|
+
type: 'step',
|
|
176
|
+
status: 'pending',
|
|
177
|
+
input: s.goal,
|
|
178
|
+
attempts: [{
|
|
179
|
+
tools: s.tools?.map(t => ({
|
|
180
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
181
|
+
executionId: t.tool_execution_id,
|
|
182
|
+
goal: t.goal,
|
|
183
|
+
})),
|
|
184
|
+
}],
|
|
185
|
+
}));
|
|
186
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' });
|
|
187
|
+
}
|
|
188
|
+
if (info.type === 'planning' && info.action === 'awaiting_approval') {
|
|
189
|
+
data.steps.push({
|
|
190
|
+
id: 'planning',
|
|
191
|
+
type: 'planning',
|
|
192
|
+
status: 'awaiting_approval',
|
|
193
|
+
user_question: info.data?.user_question,
|
|
194
|
+
duration: info.duration || 0,
|
|
195
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
196
|
+
goal: info.data?.plan_goal ?? '',
|
|
197
|
+
});
|
|
198
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
199
|
+
id: s.id,
|
|
200
|
+
type: 'step',
|
|
201
|
+
status: 'pending',
|
|
202
|
+
input: s.goal,
|
|
203
|
+
attempts: [{
|
|
204
|
+
tools: s.tools?.map(t => ({
|
|
205
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
206
|
+
executionId: t.tool_execution_id,
|
|
207
|
+
goal: t.goal,
|
|
208
|
+
})),
|
|
209
|
+
}],
|
|
210
|
+
}));
|
|
211
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' });
|
|
212
|
+
}
|
|
213
|
+
if (info.type === 'step' && info.action === 'start') {
|
|
214
|
+
const step = data.steps.find(s => s.id === info.id);
|
|
215
|
+
if (step)
|
|
216
|
+
step.status = 'running';
|
|
217
|
+
}
|
|
218
|
+
if (info.type === 'step' && info.action === 'end') {
|
|
219
|
+
const step = data.steps.find(s => s.id === info.id);
|
|
220
|
+
if (step) {
|
|
221
|
+
step.status = 'success';
|
|
222
|
+
step.duration = info.duration;
|
|
223
|
+
const lastToolId = last(step.attempts[0].tools)?.id;
|
|
224
|
+
const lastAttemptOfLastTool = findLast(step.attempts.map(a => a.tools).flat(), t => t?.id === lastToolId);
|
|
225
|
+
step.output = lastAttemptOfLastTool?.output;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (info.type === 'tool' && info.action === 'awaiting_approval') {
|
|
229
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id);
|
|
230
|
+
data.steps.push({
|
|
231
|
+
id: info.id,
|
|
232
|
+
type: 'tool',
|
|
233
|
+
status: 'awaiting_approval',
|
|
234
|
+
duration: info.duration || 0,
|
|
235
|
+
input: info.data?.input,
|
|
236
|
+
user_question: info.data?.user_question,
|
|
237
|
+
attempts: [{
|
|
238
|
+
tools: [{
|
|
239
|
+
executionId: info.id,
|
|
240
|
+
id: info.data?.tool_id ?? '',
|
|
241
|
+
name: tool?.name ?? '',
|
|
242
|
+
goal: tool?.goal,
|
|
243
|
+
...tool,
|
|
244
|
+
}],
|
|
245
|
+
}],
|
|
246
|
+
});
|
|
247
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' });
|
|
248
|
+
}
|
|
249
|
+
if (info.type === 'tool' && info.action === 'start') {
|
|
250
|
+
const currentStep = data.steps.find(s => s.status === 'running');
|
|
251
|
+
if (!info.data)
|
|
252
|
+
return;
|
|
253
|
+
//There might be a tool with status awaiting_approval, so we want to inform tool has already started
|
|
254
|
+
if (!currentStep || !currentStep.attempts[0].tools) {
|
|
255
|
+
const input = formatJson(info.data.input);
|
|
256
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id };
|
|
257
|
+
data.steps.push({
|
|
258
|
+
id: info.id,
|
|
259
|
+
type: 'tool',
|
|
260
|
+
status: 'running',
|
|
261
|
+
duration: info.duration || 0,
|
|
262
|
+
input: info.data?.input,
|
|
263
|
+
user_question: info.data?.user_question,
|
|
264
|
+
attempts: [{
|
|
265
|
+
tools: [{ ...tool, executionId: info.id, input }],
|
|
266
|
+
}],
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
const toolInFirstAttempt = currentStep.attempts[0].tools?.find(t => t.executionId === info.id);
|
|
271
|
+
//One step might have multiple tools. When in an approval mode, we might not have all the tools in the array yet.
|
|
272
|
+
//So we make sure to add any tools that are not in there.
|
|
273
|
+
if (!toolInFirstAttempt) {
|
|
274
|
+
const input = formatJson(info.data.input);
|
|
275
|
+
const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id };
|
|
276
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
277
|
+
...tool,
|
|
278
|
+
executionId: info.id,
|
|
279
|
+
input,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
const input = formatJson(info.data.input);
|
|
284
|
+
if (info.data.attempt === 1) {
|
|
285
|
+
toolInFirstAttempt.input = input;
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id };
|
|
289
|
+
currentStep.attempts[info.data.attempt - 1] ??= { tools: [] };
|
|
290
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
291
|
+
...tool,
|
|
292
|
+
executionId: info.id,
|
|
293
|
+
input,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
if (info.type === 'tool' && info.action === 'end') {
|
|
300
|
+
const currentStep = data.steps.find(s => s.status === 'running');
|
|
301
|
+
if (!currentStep || !info.data)
|
|
302
|
+
return;
|
|
303
|
+
const tool = currentStep.attempts[info.data.attempt - 1]?.tools?.find(t => t.executionId === info.id);
|
|
304
|
+
if (tool) {
|
|
305
|
+
tool.output = formatJson(info.data.output);
|
|
306
|
+
tool.duration = info.duration;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (info.type === 'final_answer' && info.action === 'start') {
|
|
310
|
+
const answerStep = last(data.steps);
|
|
311
|
+
if (answerStep)
|
|
312
|
+
answerStep.status = 'running';
|
|
313
|
+
}
|
|
314
|
+
if (info.type === 'chat' && info.action === 'end') {
|
|
315
|
+
const answerStep = last(data.steps);
|
|
316
|
+
if (answerStep) {
|
|
317
|
+
answerStep.status = 'success';
|
|
318
|
+
answerStep.duration = info.duration;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return new StreamedJson({
|
|
323
|
+
eventsPromise: events,
|
|
324
|
+
abortController,
|
|
325
|
+
minChangeIntervalMS,
|
|
326
|
+
ignoreKeys: ['agent_info'],
|
|
327
|
+
transform,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
122
330
|
}
|
|
123
331
|
export const discoverClient = new DiscoverClient();
|
|
124
332
|
//# sourceMappingURL=discover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/client/discover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,E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AG,IAAI,CAAC,QAAQ,CAAA;gBAC/B,CAAC;YACH,CAAC;YAED,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;gBAC5D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACnC,IAAI,UAAU;oBAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAA;YAC/C,CAAC;YAED,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;gBAClD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACnC,IAAI,UAAU,EAAE,CAAC;oBACf,UAAU,CAAC,MAAM,GAAG,SAAS,CAAA;oBAC7B,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;gBACrC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,YAAY,CAAC;YACtB,aAAa,EAAE,MAAM;YACrB,eAAe;YACf,mBAAmB;YACnB,UAAU,EAAE,CAAC,YAAY,CAAC;YAC1B,SAAS;SACV,CAAC,CAAA;IACJ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAA"}
|
package/package.json
CHANGED
package/src/api/discover.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type GetOpportunityResponse = {
|
|
|
28
28
|
hypotheses: GetOpportunityResponseHypothesisResponse[];
|
|
29
29
|
updatedBy?: string;
|
|
30
30
|
updatedAt?: string;
|
|
31
|
-
chatId
|
|
31
|
+
chatId: string;
|
|
32
32
|
};
|
|
33
33
|
export type UpdateOpportunityRequest = {
|
|
34
34
|
title?: string;
|
|
@@ -42,7 +42,7 @@ export type UpdateOpportunityResponse = {
|
|
|
42
42
|
createdAt?: string;
|
|
43
43
|
updatedBy?: string;
|
|
44
44
|
updatedAt?: string;
|
|
45
|
-
chatId
|
|
45
|
+
chatId: string;
|
|
46
46
|
};
|
|
47
47
|
export type GetHypothesisResponseDocumentResponse = {
|
|
48
48
|
id: string;
|
|
@@ -59,7 +59,7 @@ export type GetHypothesisResponse = {
|
|
|
59
59
|
createdAt?: string;
|
|
60
60
|
updatedBy?: string;
|
|
61
61
|
updatedAt?: string;
|
|
62
|
-
chatId
|
|
62
|
+
chatId: string;
|
|
63
63
|
};
|
|
64
64
|
export type UpdateHypothesisRequest = {
|
|
65
65
|
title?: string;
|
|
@@ -74,7 +74,7 @@ export type UpdateHypothesisResponse = {
|
|
|
74
74
|
createdAt?: string;
|
|
75
75
|
updatedBy?: string;
|
|
76
76
|
updatedAt?: string;
|
|
77
|
-
chatId
|
|
77
|
+
chatId: string;
|
|
78
78
|
};
|
|
79
79
|
export type GetDocumentResponse = {
|
|
80
80
|
id: string;
|
|
@@ -85,7 +85,7 @@ export type GetDocumentResponse = {
|
|
|
85
85
|
createdAt?: string;
|
|
86
86
|
updatedBy?: string;
|
|
87
87
|
updatedAt?: string;
|
|
88
|
-
chatId
|
|
88
|
+
chatId: string;
|
|
89
89
|
};
|
|
90
90
|
export type UpdateDocumentRequest = {
|
|
91
91
|
title?: string;
|
|
@@ -101,7 +101,7 @@ export type UpdateDocumentResponse = {
|
|
|
101
101
|
createdAt?: string;
|
|
102
102
|
updatedBy?: string;
|
|
103
103
|
updatedAt?: string;
|
|
104
|
-
chatId
|
|
104
|
+
chatId: string;
|
|
105
105
|
};
|
|
106
106
|
export type SortResponse = {
|
|
107
107
|
direction: string;
|
|
@@ -134,7 +134,7 @@ export type PageResponseGetOpportunityResponse = {
|
|
|
134
134
|
export type CreateOpportunityRequest = {
|
|
135
135
|
title?: string;
|
|
136
136
|
description?: string;
|
|
137
|
-
chatId
|
|
137
|
+
chatId: string;
|
|
138
138
|
};
|
|
139
139
|
export type CreateOpportunityResponse = {
|
|
140
140
|
id: string;
|
|
@@ -144,13 +144,13 @@ export type CreateOpportunityResponse = {
|
|
|
144
144
|
createdAt?: string;
|
|
145
145
|
updatedBy?: string;
|
|
146
146
|
updatedAt?: string;
|
|
147
|
-
chatId
|
|
147
|
+
chatId: string;
|
|
148
148
|
};
|
|
149
149
|
export type CreateHypothesisRequest = {
|
|
150
150
|
opportunityId?: string;
|
|
151
151
|
title?: string;
|
|
152
152
|
description?: string;
|
|
153
|
-
chatId
|
|
153
|
+
chatId: string;
|
|
154
154
|
};
|
|
155
155
|
export type CreateHypothesisResponse = {
|
|
156
156
|
id: string;
|
|
@@ -161,14 +161,14 @@ export type CreateHypothesisResponse = {
|
|
|
161
161
|
createdAt?: string;
|
|
162
162
|
updatedBy?: string;
|
|
163
163
|
updatedAt?: string;
|
|
164
|
-
chatId
|
|
164
|
+
chatId: string;
|
|
165
165
|
};
|
|
166
166
|
export type CreateDocumentRequest = {
|
|
167
167
|
hypothesisId?: string;
|
|
168
168
|
title?: string;
|
|
169
169
|
description?: string;
|
|
170
170
|
content?: string;
|
|
171
|
-
chatId
|
|
171
|
+
chatId: string;
|
|
172
172
|
};
|
|
173
173
|
export type CreateDocumentResponse = {
|
|
174
174
|
id: string;
|
|
@@ -179,7 +179,14 @@ export type CreateDocumentResponse = {
|
|
|
179
179
|
createdAt?: string;
|
|
180
180
|
updatedBy?: string;
|
|
181
181
|
updatedAt?: string;
|
|
182
|
-
chatId
|
|
182
|
+
chatId: string;
|
|
183
|
+
};
|
|
184
|
+
export type MessageRequest = {
|
|
185
|
+
prompt: string;
|
|
186
|
+
conversationId: string;
|
|
187
|
+
};
|
|
188
|
+
export type SseEmitter = {
|
|
189
|
+
timeout?: number;
|
|
183
190
|
};
|
|
184
191
|
export type GetArtifactResponse = {
|
|
185
192
|
"type": "OPPORTUNITY" | "HYPOTHESIS" | "DOCUMENT";
|
|
@@ -405,6 +412,22 @@ export function create2({ createDocumentRequest }: {
|
|
|
405
412
|
body: createDocumentRequest
|
|
406
413
|
})));
|
|
407
414
|
}
|
|
415
|
+
export function chat({ authorization, messageRequest }: {
|
|
416
|
+
authorization: string;
|
|
417
|
+
messageRequest: MessageRequest;
|
|
418
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
419
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
420
|
+
status: 200;
|
|
421
|
+
data: SseEmitter;
|
|
422
|
+
}>("/v2/ai/chat", oazapfts.json({
|
|
423
|
+
...opts,
|
|
424
|
+
method: "POST",
|
|
425
|
+
body: messageRequest,
|
|
426
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
427
|
+
Authorization: authorization
|
|
428
|
+
})
|
|
429
|
+
})));
|
|
430
|
+
}
|
|
408
431
|
/**
|
|
409
432
|
* Get specific Document content
|
|
410
433
|
*/
|
package/src/client/code-shift.ts
CHANGED
|
@@ -68,6 +68,7 @@ import {
|
|
|
68
68
|
downloadSearchReposScmV2V2ReposSearchScmSearchIdDownloadGet,
|
|
69
69
|
moduleFavoriteServiceAddV1ModulesModuleIdFavoritesPost,
|
|
70
70
|
moduleFavoriteServiceDeleteV1ModulesModuleIdFavoritesDelete,
|
|
71
|
+
patHealthCheckV1ScmPatHealthCheckGet,
|
|
71
72
|
} from '../api/codeShift'
|
|
72
73
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
73
74
|
import { codeShiftDictionary } from '../error/dictionary/code-shift'
|
|
@@ -273,6 +274,10 @@ class CodeShift extends ReactQueryNetworkClient {
|
|
|
273
274
|
* Validates a SCM URL.
|
|
274
275
|
*/
|
|
275
276
|
validateSCMUrl = this.mutation(removeAuthorizationParam(validateScmUrlServiceV1ReposValidateScmUrlPost))
|
|
277
|
+
/**
|
|
278
|
+
* PAT Health Check
|
|
279
|
+
*/
|
|
280
|
+
checkScmPatHealth = this.query(removeAuthorizationParam(patHealthCheckV1ScmPatHealthCheckGet))
|
|
276
281
|
/**
|
|
277
282
|
* Get Branches for a Repository
|
|
278
283
|
*/
|
package/src/client/discover.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { findLast, last } from 'lodash'
|
|
2
3
|
import { getApiAddresses } from '../api-addresses'
|
|
3
4
|
import { ConversationResponse } from '../api/ai'
|
|
4
|
-
import { create, create1, create2, defaults, deleteById, deleteById1, deleteById2, getAll, getAll1, getAll2, getAllByHypothesis, getById, getById1, getById2, GetOpportunityResponse } from '../api/discover'
|
|
5
|
+
import { create, create1, create2, defaults, deleteById, deleteById1, deleteById2, getAll, getAll1, getAll2, getAllByHypothesis, getById, getById1, getById2, GetOpportunityResponse, MessageRequest } from '../api/discover'
|
|
5
6
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
6
7
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
8
|
+
import { StreamedJson } from '../utils/StreamedJson'
|
|
7
9
|
import { baseDictionary } from '../error/dictionary/base'
|
|
10
|
+
import { formatJson } from '../utils/string'
|
|
8
11
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
9
12
|
import { aiClient } from './ai'
|
|
13
|
+
import { ChatAgentTool, ChatResponseWithSteps, FixedChatResponse, StepChatStep } from './types'
|
|
14
|
+
import { agentToolsClient } from './agent-tools'
|
|
10
15
|
|
|
11
16
|
export interface ChatConversionDetails extends ConversationResponse {
|
|
12
17
|
opportunityName?: string,
|
|
@@ -67,8 +72,8 @@ class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
67
72
|
{ ...variables, page: variables.page, size: variables.size ?? 40 },
|
|
68
73
|
)
|
|
69
74
|
|
|
70
|
-
const filteredItems = variables.filter
|
|
71
|
-
? chatsHistory.filter((chat) => chat.title.toLowerCase().includes(variables.filter!.toLowerCase()))
|
|
75
|
+
const filteredItems = variables.filter
|
|
76
|
+
? chatsHistory.filter((chat) => chat.title.toLowerCase().includes(variables.filter!.toLowerCase()))
|
|
72
77
|
: chatsHistory
|
|
73
78
|
|
|
74
79
|
const enrichedChats = filteredItems?.map(chat => {
|
|
@@ -84,6 +89,218 @@ class DiscoverClient extends ReactQueryNetworkClient {
|
|
|
84
89
|
return enrichedChats as ChatConversionDetails[]
|
|
85
90
|
},
|
|
86
91
|
})
|
|
92
|
+
|
|
93
|
+
private static async toolsOfAgent(agentId?: string) {
|
|
94
|
+
try {
|
|
95
|
+
const agent = agentId ? await agentToolsClient.agent.query({ agentId }) : undefined
|
|
96
|
+
if (!agent) return []
|
|
97
|
+
const tools: (Omit<ChatAgentTool, 'duration' | 'prompt' | 'output'>)[] = []
|
|
98
|
+
agent.toolkits?.builtin_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
|
|
99
|
+
if (id) tools.push({ image: kit.image_url, id, name: name || id, description })
|
|
100
|
+
}))
|
|
101
|
+
agent.toolkits?.custom_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
|
|
102
|
+
if (id) tools.push({ image: kit.avatar ?? undefined, id, name: name || id, description })
|
|
103
|
+
}))
|
|
104
|
+
return tools
|
|
105
|
+
} catch {
|
|
106
|
+
return []
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
sendChatMessage(request: MessageRequest & { agentId: string }, minChangeIntervalMS?: number): StreamedJson<ChatResponseWithSteps> {
|
|
112
|
+
const abortController = new AbortController()
|
|
113
|
+
const headers = {
|
|
114
|
+
'Content-Type': 'application/json',
|
|
115
|
+
'Accept': 'text/event-stream',
|
|
116
|
+
}
|
|
117
|
+
const events = this.stream(
|
|
118
|
+
this.resolveURL('/v2/ai/chat'),
|
|
119
|
+
{ method: 'post', body: JSON.stringify(request), headers, signal: abortController.signal },
|
|
120
|
+
)
|
|
121
|
+
/**
|
|
122
|
+
* This function treats events in the streaming that deals with the execution of tools. Since these events are not concatenated like
|
|
123
|
+
* normal streamings of data, we need this separate function to deal with them. It transforms the internal data model of the
|
|
124
|
+
* StreamedJson object whenever an event is triggered.
|
|
125
|
+
*/
|
|
126
|
+
async function transform(event: Partial<FixedChatResponse>, data: Partial<ChatResponseWithSteps>) {
|
|
127
|
+
const info = event.agent_info
|
|
128
|
+
|
|
129
|
+
if (!info) return
|
|
130
|
+
|
|
131
|
+
const tools = await DiscoverClient.toolsOfAgent(request.agentId)
|
|
132
|
+
data.steps = data.steps ? [...data.steps] : []
|
|
133
|
+
|
|
134
|
+
if (info.type === 'planning' && info.action === 'end') {
|
|
135
|
+
data.steps.push({
|
|
136
|
+
id: 'planning',
|
|
137
|
+
type: 'planning',
|
|
138
|
+
status: 'success',
|
|
139
|
+
duration: info.duration || 0,
|
|
140
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
141
|
+
goal: info.data?.plan_goal ?? '',
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
145
|
+
id: s.id,
|
|
146
|
+
type: 'step',
|
|
147
|
+
status: 'pending',
|
|
148
|
+
input: s.goal,
|
|
149
|
+
attempts: [{
|
|
150
|
+
tools: s.tools?.map(t => ({
|
|
151
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
152
|
+
executionId: t.tool_execution_id,
|
|
153
|
+
goal: t.goal,
|
|
154
|
+
})),
|
|
155
|
+
}],
|
|
156
|
+
}))
|
|
157
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (info.type === 'planning' && info.action === 'awaiting_approval') {
|
|
161
|
+
data.steps.push({
|
|
162
|
+
id: 'planning',
|
|
163
|
+
type: 'planning',
|
|
164
|
+
status: 'awaiting_approval',
|
|
165
|
+
user_question: info.data?.user_question,
|
|
166
|
+
duration: info.duration || 0,
|
|
167
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
168
|
+
goal: info.data?.plan_goal ?? '',
|
|
169
|
+
})
|
|
170
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
171
|
+
id: s.id,
|
|
172
|
+
type: 'step',
|
|
173
|
+
status: 'pending',
|
|
174
|
+
input: s.goal,
|
|
175
|
+
attempts: [{
|
|
176
|
+
tools: s.tools?.map(t => ({
|
|
177
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
178
|
+
executionId: t.tool_execution_id,
|
|
179
|
+
goal: t.goal,
|
|
180
|
+
})),
|
|
181
|
+
}],
|
|
182
|
+
}))
|
|
183
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (info.type === 'step' && info.action === 'start') {
|
|
187
|
+
const step = data.steps.find(s => s.id === info.id)
|
|
188
|
+
if (step) step.status = 'running'
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (info.type === 'step' && info.action === 'end') {
|
|
192
|
+
const step = data.steps.find(s => s.id === info.id) as StepChatStep
|
|
193
|
+
if (step) {
|
|
194
|
+
step.status = 'success'
|
|
195
|
+
step.duration = info.duration
|
|
196
|
+
const lastToolId = last(step.attempts[0].tools)?.id
|
|
197
|
+
const lastAttemptOfLastTool = findLast(step.attempts.map(a => a.tools).flat(), t => t?.id === lastToolId)
|
|
198
|
+
step.output = lastAttemptOfLastTool?.output
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (info.type === 'tool' && info.action === 'awaiting_approval') {
|
|
203
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id)
|
|
204
|
+
data.steps.push({
|
|
205
|
+
id: info.id,
|
|
206
|
+
type: 'tool',
|
|
207
|
+
status: 'awaiting_approval',
|
|
208
|
+
duration: info.duration || 0,
|
|
209
|
+
input: info.data?.input,
|
|
210
|
+
user_question: info.data?.user_question,
|
|
211
|
+
attempts: [{
|
|
212
|
+
tools: [{
|
|
213
|
+
executionId: info.id,
|
|
214
|
+
id: info.data?.tool_id ?? '',
|
|
215
|
+
name: tool?.name ?? '',
|
|
216
|
+
goal: tool?.goal,
|
|
217
|
+
...tool,
|
|
218
|
+
}],
|
|
219
|
+
}],
|
|
220
|
+
})
|
|
221
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (info.type === 'tool' && info.action === 'start') {
|
|
225
|
+
const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
|
|
226
|
+
if (!info.data) return
|
|
227
|
+
|
|
228
|
+
//There might be a tool with status awaiting_approval, so we want to inform tool has already started
|
|
229
|
+
if (!currentStep || !currentStep.attempts[0].tools) {
|
|
230
|
+
const input = formatJson(info.data.input)
|
|
231
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
|
|
232
|
+
data.steps.push({
|
|
233
|
+
id: info.id,
|
|
234
|
+
type: 'tool',
|
|
235
|
+
status: 'running',
|
|
236
|
+
duration: info.duration || 0,
|
|
237
|
+
input: info.data?.input,
|
|
238
|
+
user_question: info.data?.user_question,
|
|
239
|
+
attempts: [{
|
|
240
|
+
tools: [{ ...tool, executionId: info.id, input }],
|
|
241
|
+
}],
|
|
242
|
+
})
|
|
243
|
+
} else {
|
|
244
|
+
const toolInFirstAttempt = currentStep.attempts[0].tools?.find(t => t.executionId === info.id)
|
|
245
|
+
//One step might have multiple tools. When in an approval mode, we might not have all the tools in the array yet.
|
|
246
|
+
//So we make sure to add any tools that are not in there.
|
|
247
|
+
if (!toolInFirstAttempt) {
|
|
248
|
+
const input = formatJson(info.data.input)
|
|
249
|
+
const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
|
|
250
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
251
|
+
...tool,
|
|
252
|
+
executionId: info.id,
|
|
253
|
+
input,
|
|
254
|
+
})
|
|
255
|
+
} else {
|
|
256
|
+
const input = formatJson(info.data.input)
|
|
257
|
+
if (info.data.attempt === 1) {
|
|
258
|
+
toolInFirstAttempt.input = input
|
|
259
|
+
} else {
|
|
260
|
+
const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
|
|
261
|
+
currentStep.attempts[info.data.attempt - 1] ??= { tools: [] }
|
|
262
|
+
currentStep.attempts[info.data.attempt - 1].tools?.push({
|
|
263
|
+
...tool,
|
|
264
|
+
executionId: info.id,
|
|
265
|
+
input,
|
|
266
|
+
})
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (info.type === 'tool' && info.action === 'end') {
|
|
273
|
+
const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
|
|
274
|
+
if (!currentStep || !info.data) return
|
|
275
|
+
const tool = currentStep.attempts[info.data.attempt - 1]?.tools?.find(t => t.executionId === info.id)
|
|
276
|
+
if (tool) {
|
|
277
|
+
tool.output = formatJson(info.data.output)
|
|
278
|
+
tool.duration = info.duration
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
if (info.type === 'final_answer' && info.action === 'start') {
|
|
283
|
+
const answerStep = last(data.steps)
|
|
284
|
+
if (answerStep) answerStep.status = 'running'
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (info.type === 'chat' && info.action === 'end') {
|
|
288
|
+
const answerStep = last(data.steps)
|
|
289
|
+
if (answerStep) {
|
|
290
|
+
answerStep.status = 'success'
|
|
291
|
+
answerStep.duration = info.duration
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return new StreamedJson({
|
|
297
|
+
eventsPromise: events,
|
|
298
|
+
abortController,
|
|
299
|
+
minChangeIntervalMS,
|
|
300
|
+
ignoreKeys: ['agent_info'],
|
|
301
|
+
transform,
|
|
302
|
+
})
|
|
303
|
+
}
|
|
87
304
|
}
|
|
88
305
|
|
|
89
306
|
export const discoverClient = new DiscoverClient()
|