@bringg/dashboard-sdk 9.82.0-pre.5 → 9.82.0-pre.7
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/dist/Analyst/Analyst.consts.d.ts +24 -10
- package/dist/Analyst/Analyst.consts.js +28 -14
- package/dist/Analyst/Analyst.consts.js.map +1 -1
- package/dist/Analyst/Entity/AnalystEntity.d.ts +7 -3
- package/dist/Analyst/Entity/AnalystEntity.js +8 -6
- package/dist/Analyst/Entity/AnalystEntity.js.map +1 -1
- package/dist/bringg-dashboard-sdk-cjs2.js +37 -21
- package/dist/bringg-dashboard-sdk-cjs2.js.map +1 -1
- package/dist/bringg-dashboard-sdk.js +3 -3
- package/dist/bringg-dashboard-sdk.min.js +1 -1
- package/dist/bringg-dashboard-sdk.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,29 +9,43 @@
|
|
|
9
9
|
* stripPath: true
|
|
10
10
|
*
|
|
11
11
|
* `stripPath: true` means the gateway strips the prefix before forwarding, so the service receives
|
|
12
|
-
* `/
|
|
12
|
+
* `/api/agent-chat/threads` rather than `/analyst-service/api/agent-chat/threads`.
|
|
13
13
|
*/
|
|
14
|
-
export declare const GATEWAY_PATH = "/analyst-service
|
|
14
|
+
export declare const GATEWAY_PATH = "/analyst-service";
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Where the chat platform is mounted inside the service.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* A chat URL has three parts, and only the last is the platform's to choose:
|
|
19
|
+
*
|
|
20
|
+
* /analyst-service /api/agent-chat /chat
|
|
21
|
+
* service name mount path endpoint
|
|
22
|
+
*
|
|
23
|
+
* The mount path is picked by the service developer and is an arbitrary fixed string - it is not
|
|
24
|
+
* derived from anything, and the graph's name appears nowhere in the URL. So the service name and
|
|
25
|
+
* the mount together are one base that has to be asked for rather than inferred, which is why it is
|
|
26
|
+
* one constant here rather than pieces spread across the routes.
|
|
27
|
+
*
|
|
28
|
+
* The `/api` segment arrives with analyst-service#39, which moves both of its controllers under one
|
|
29
|
+
* namespace. That PR aliases nothing, so the old unprefixed paths stop answering the moment it
|
|
30
|
+
* deploys - this constant and that deploy have to move together.
|
|
20
31
|
*/
|
|
21
|
-
export declare const
|
|
32
|
+
export declare const MOUNT_PATH = "/api/agent-chat";
|
|
33
|
+
/** Service name plus mount. Every route below is relative to this. */
|
|
34
|
+
export declare const BASE_PATH: string;
|
|
22
35
|
/**
|
|
23
|
-
* Routes from the
|
|
36
|
+
* Routes from the agent-chat platform protocol
|
|
37
|
+
* (`service-shared-agent-platform`, `docs/agent_chat/protocol.md`).
|
|
24
38
|
*
|
|
25
39
|
* `CHAT` is declared here for completeness but is **not** called from this package: it is the ag-ui
|
|
26
40
|
* protocol endpoint, opened by the consumer's `HttpAgent` as a streaming POST. It is exposed through
|
|
27
41
|
* {@link AnalystClientConfig.chatUrl} instead, so the URL is still built in one place.
|
|
28
42
|
*
|
|
29
|
-
* Note
|
|
30
|
-
*
|
|
43
|
+
* Note that cancel hangs off the *thread*, not off chat, and takes the thread id in the path rather
|
|
44
|
+
* than in a body. Its earlier shape - `POST /chat/cancel` with `{ threadId }` - does not exist.
|
|
31
45
|
*/
|
|
32
46
|
export declare const Routes: {
|
|
33
47
|
CHAT: string;
|
|
34
|
-
CANCEL_RUN: string;
|
|
35
48
|
THREADS: string;
|
|
36
49
|
THREAD: string;
|
|
50
|
+
CANCEL_RUN: string;
|
|
37
51
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Routes = exports.
|
|
3
|
+
exports.Routes = exports.BASE_PATH = exports.MOUNT_PATH = exports.GATEWAY_PATH = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* api-gateway path prefix the analyst service is registered under.
|
|
6
6
|
*
|
|
@@ -12,30 +12,44 @@ exports.Routes = exports.GRAPH = exports.GATEWAY_PATH = void 0;
|
|
|
12
12
|
* stripPath: true
|
|
13
13
|
*
|
|
14
14
|
* `stripPath: true` means the gateway strips the prefix before forwarding, so the service receives
|
|
15
|
-
* `/
|
|
15
|
+
* `/api/agent-chat/threads` rather than `/analyst-service/api/agent-chat/threads`.
|
|
16
16
|
*/
|
|
17
|
-
exports.GATEWAY_PATH = '/analyst-service
|
|
17
|
+
exports.GATEWAY_PATH = '/analyst-service';
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Where the chat platform is mounted inside the service.
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
21
|
+
* A chat URL has three parts, and only the last is the platform's to choose:
|
|
22
|
+
*
|
|
23
|
+
* /analyst-service /api/agent-chat /chat
|
|
24
|
+
* service name mount path endpoint
|
|
25
|
+
*
|
|
26
|
+
* The mount path is picked by the service developer and is an arbitrary fixed string - it is not
|
|
27
|
+
* derived from anything, and the graph's name appears nowhere in the URL. So the service name and
|
|
28
|
+
* the mount together are one base that has to be asked for rather than inferred, which is why it is
|
|
29
|
+
* one constant here rather than pieces spread across the routes.
|
|
30
|
+
*
|
|
31
|
+
* The `/api` segment arrives with analyst-service#39, which moves both of its controllers under one
|
|
32
|
+
* namespace. That PR aliases nothing, so the old unprefixed paths stop answering the moment it
|
|
33
|
+
* deploys - this constant and that deploy have to move together.
|
|
23
34
|
*/
|
|
24
|
-
exports.
|
|
35
|
+
exports.MOUNT_PATH = '/api/agent-chat';
|
|
36
|
+
/** Service name plus mount. Every route below is relative to this. */
|
|
37
|
+
exports.BASE_PATH = "".concat(exports.GATEWAY_PATH).concat(exports.MOUNT_PATH);
|
|
25
38
|
/**
|
|
26
|
-
* Routes from the
|
|
39
|
+
* Routes from the agent-chat platform protocol
|
|
40
|
+
* (`service-shared-agent-platform`, `docs/agent_chat/protocol.md`).
|
|
27
41
|
*
|
|
28
42
|
* `CHAT` is declared here for completeness but is **not** called from this package: it is the ag-ui
|
|
29
43
|
* protocol endpoint, opened by the consumer's `HttpAgent` as a streaming POST. It is exposed through
|
|
30
44
|
* {@link AnalystClientConfig.chatUrl} instead, so the URL is still built in one place.
|
|
31
45
|
*
|
|
32
|
-
* Note
|
|
33
|
-
*
|
|
46
|
+
* Note that cancel hangs off the *thread*, not off chat, and takes the thread id in the path rather
|
|
47
|
+
* than in a body. Its earlier shape - `POST /chat/cancel` with `{ threadId }` - does not exist.
|
|
34
48
|
*/
|
|
35
49
|
exports.Routes = {
|
|
36
|
-
CHAT: "".concat(exports.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
CHAT: "".concat(exports.BASE_PATH, "/chat"),
|
|
51
|
+
THREADS: "".concat(exports.BASE_PATH, "/threads"),
|
|
52
|
+
THREAD: "".concat(exports.BASE_PATH, "/threads/{:threadId}"),
|
|
53
|
+
CANCEL_RUN: "".concat(exports.BASE_PATH, "/threads/{:threadId}/cancel")
|
|
40
54
|
};
|
|
41
55
|
//# sourceMappingURL=Analyst.consts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Analyst.consts.js","sourceRoot":"","sources":["../../src/Analyst/Analyst.consts.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACU,QAAA,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"Analyst.consts.js","sourceRoot":"","sources":["../../src/Analyst/Analyst.consts.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACU,QAAA,YAAY,GAAG,kBAAkB,CAAC;AAE/C;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,UAAU,GAAG,iBAAiB,CAAC;AAE5C,sEAAsE;AACzD,QAAA,SAAS,GAAG,UAAG,oBAAY,SAAG,kBAAU,CAAE,CAAC;AAExD;;;;;;;;;;GAUG;AACU,QAAA,MAAM,GAAG;IACrB,IAAI,EAAE,UAAG,iBAAS,UAAO;IACzB,OAAO,EAAE,UAAG,iBAAS,aAAU;IAC/B,MAAM,EAAE,UAAG,iBAAS,yBAAsB;IAC1C,UAAU,EAAE,UAAG,iBAAS,gCAA6B;CACrD,CAAC"}
|
|
@@ -30,9 +30,13 @@ export default class AnalystEntity extends Entity<AnalystChat.ThreadSummary> {
|
|
|
30
30
|
/**
|
|
31
31
|
* Cancel the run in flight on a thread.
|
|
32
32
|
*
|
|
33
|
-
* Needed because a run belongs to the server, not to the connection that started it:
|
|
34
|
-
* stream client-side stops the events arriving
|
|
35
|
-
*
|
|
33
|
+
* Needed because a run belongs to the server, not to the connection that started it: closing the
|
|
34
|
+
* stream client-side stops the events arriving and leaves the execution running - which is the
|
|
35
|
+
* right behaviour for a thread switch, and the wrong one for Stop.
|
|
36
|
+
*
|
|
37
|
+
* The thread id goes in the path; there is no request body. `cancelled: false` means the thread
|
|
38
|
+
* was idle **or** that this caller may not touch it - the platform answers both the same way, so
|
|
39
|
+
* that the existence of a thread does not leak.
|
|
36
40
|
*/
|
|
37
41
|
cancelRun(threadId: string): Promise<AnalystChat.CancelRunResponse>;
|
|
38
42
|
}
|
|
@@ -117,18 +117,20 @@ var AnalystEntity = /** @class */ (function (_super) {
|
|
|
117
117
|
/**
|
|
118
118
|
* Cancel the run in flight on a thread.
|
|
119
119
|
*
|
|
120
|
-
* Needed because a run belongs to the server, not to the connection that started it:
|
|
121
|
-
* stream client-side stops the events arriving
|
|
122
|
-
*
|
|
120
|
+
* Needed because a run belongs to the server, not to the connection that started it: closing the
|
|
121
|
+
* stream client-side stops the events arriving and leaves the execution running - which is the
|
|
122
|
+
* right behaviour for a thread switch, and the wrong one for Stop.
|
|
123
|
+
*
|
|
124
|
+
* The thread id goes in the path; there is no request body. `cancelled: false` means the thread
|
|
125
|
+
* was idle **or** that this caller may not touch it - the platform answers both the same way, so
|
|
126
|
+
* that the existence of a thread does not leak.
|
|
123
127
|
*/
|
|
124
128
|
AnalystEntity.prototype.cancelRun = function (threadId) {
|
|
125
129
|
return __awaiter(this, void 0, void 0, function () {
|
|
126
|
-
var payload;
|
|
127
130
|
return __generator(this, function (_a) {
|
|
128
|
-
payload = { threadId: threadId };
|
|
129
131
|
return [2 /*return*/, this.service.routeGenerator
|
|
130
132
|
.post(Analyst_consts_1.Routes.CANCEL_RUN)
|
|
131
|
-
.
|
|
133
|
+
.withRouteParams({ threadId: threadId })
|
|
132
134
|
.setException('Failed to cancel the analyst chat run')
|
|
133
135
|
.invoke()];
|
|
134
136
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalystEntity.js","sourceRoot":"","sources":["../../../src/Analyst/Entity/AnalystEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,6DAAuC;AAEvC,oDAA2C;AAE3C;;;;;;;;;;;;;;GAcG;AACH;IAA2C,iCAAiC;IAC3E,uBAAY,OAAgB;eAC3B,kBAAM;YACL,OAAO,SAAA;YACP,UAAU,EAAE,SAAS;YACrB,WAAW,EAAE,iBAAiB;SAC9B,CAAC;IACH,CAAC;IAED,2FAA2F;IACrF,mCAAW,GAAjB;;;;;4BACiB,qBAAM,IAAI,CAAC,OAAO,CAAC,cAAc;6BAC/C,GAAG,CAAC,uBAAM,CAAC,OAAO,CAAC;6BACnB,YAAY,CAAC,sCAAsC,CAAC;6BACpD,MAAM,EAA4D,EAAA;;wBAH9D,OAAO,GAAG,SAGoD;wBAEpE,sBAAO,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EAAC;;;;KACrB;IAED;;;;;OAKG;IACG,iCAAS,GAAf,UAAgB,QAAgB;;;gBAC/B,sBAAO,IAAI,CAAC,OAAO,CAAC,cAAc;yBAChC,GAAG,CAAC,uBAAM,CAAC,MAAM,CAAC;yBAClB,eAAe,CAAC,EAAE,QAAQ,UAAA,EAAE,CAAC;yBAC7B,YAAY,CAAC,qCAAqC,CAAC;yBACnD,MAAM,EAAsD,EAAC;;;KAC/D;IAED
|
|
1
|
+
{"version":3,"file":"AnalystEntity.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@@ exports["default"] = AlertsEntity;
|
|
|
494
494
|
"use strict";
|
|
495
495
|
|
|
496
496
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
497
|
-
exports.Routes = exports.
|
|
497
|
+
exports.Routes = exports.BASE_PATH = exports.MOUNT_PATH = exports.GATEWAY_PATH = void 0;
|
|
498
498
|
/**
|
|
499
499
|
* api-gateway path prefix the analyst service is registered under.
|
|
500
500
|
*
|
|
@@ -506,31 +506,45 @@ exports.Routes = exports.GRAPH = exports.GATEWAY_PATH = void 0;
|
|
|
506
506
|
* stripPath: true
|
|
507
507
|
*
|
|
508
508
|
* `stripPath: true` means the gateway strips the prefix before forwarding, so the service receives
|
|
509
|
-
* `/
|
|
509
|
+
* `/api/agent-chat/threads` rather than `/analyst-service/api/agent-chat/threads`.
|
|
510
510
|
*/
|
|
511
|
-
exports.GATEWAY_PATH = '/analyst-service
|
|
511
|
+
exports.GATEWAY_PATH = '/analyst-service';
|
|
512
512
|
/**
|
|
513
|
-
*
|
|
513
|
+
* Where the chat platform is mounted inside the service.
|
|
514
514
|
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
515
|
+
* A chat URL has three parts, and only the last is the platform's to choose:
|
|
516
|
+
*
|
|
517
|
+
* /analyst-service /api/agent-chat /chat
|
|
518
|
+
* service name mount path endpoint
|
|
519
|
+
*
|
|
520
|
+
* The mount path is picked by the service developer and is an arbitrary fixed string - it is not
|
|
521
|
+
* derived from anything, and the graph's name appears nowhere in the URL. So the service name and
|
|
522
|
+
* the mount together are one base that has to be asked for rather than inferred, which is why it is
|
|
523
|
+
* one constant here rather than pieces spread across the routes.
|
|
524
|
+
*
|
|
525
|
+
* The `/api` segment arrives with analyst-service#39, which moves both of its controllers under one
|
|
526
|
+
* namespace. That PR aliases nothing, so the old unprefixed paths stop answering the moment it
|
|
527
|
+
* deploys - this constant and that deploy have to move together.
|
|
517
528
|
*/
|
|
518
|
-
exports.
|
|
529
|
+
exports.MOUNT_PATH = '/api/agent-chat';
|
|
530
|
+
/** Service name plus mount. Every route below is relative to this. */
|
|
531
|
+
exports.BASE_PATH = "".concat(exports.GATEWAY_PATH).concat(exports.MOUNT_PATH);
|
|
519
532
|
/**
|
|
520
|
-
* Routes from the
|
|
533
|
+
* Routes from the agent-chat platform protocol
|
|
534
|
+
* (`service-shared-agent-platform`, `docs/agent_chat/protocol.md`).
|
|
521
535
|
*
|
|
522
536
|
* `CHAT` is declared here for completeness but is **not** called from this package: it is the ag-ui
|
|
523
537
|
* protocol endpoint, opened by the consumer's `HttpAgent` as a streaming POST. It is exposed through
|
|
524
538
|
* {@link AnalystClientConfig.chatUrl} instead, so the URL is still built in one place.
|
|
525
539
|
*
|
|
526
|
-
* Note
|
|
527
|
-
*
|
|
540
|
+
* Note that cancel hangs off the *thread*, not off chat, and takes the thread id in the path rather
|
|
541
|
+
* than in a body. Its earlier shape - `POST /chat/cancel` with `{ threadId }` - does not exist.
|
|
528
542
|
*/
|
|
529
543
|
exports.Routes = {
|
|
530
|
-
CHAT: "".concat(exports.
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
544
|
+
CHAT: "".concat(exports.BASE_PATH, "/chat"),
|
|
545
|
+
THREADS: "".concat(exports.BASE_PATH, "/threads"),
|
|
546
|
+
THREAD: "".concat(exports.BASE_PATH, "/threads/{:threadId}"),
|
|
547
|
+
CANCEL_RUN: "".concat(exports.BASE_PATH, "/threads/{:threadId}/cancel")
|
|
534
548
|
};
|
|
535
549
|
//# sourceMappingURL=Analyst.consts.js.map
|
|
536
550
|
|
|
@@ -839,18 +853,20 @@ var AnalystEntity = /** @class */ (function (_super) {
|
|
|
839
853
|
/**
|
|
840
854
|
* Cancel the run in flight on a thread.
|
|
841
855
|
*
|
|
842
|
-
* Needed because a run belongs to the server, not to the connection that started it:
|
|
843
|
-
* stream client-side stops the events arriving
|
|
844
|
-
*
|
|
856
|
+
* Needed because a run belongs to the server, not to the connection that started it: closing the
|
|
857
|
+
* stream client-side stops the events arriving and leaves the execution running - which is the
|
|
858
|
+
* right behaviour for a thread switch, and the wrong one for Stop.
|
|
859
|
+
*
|
|
860
|
+
* The thread id goes in the path; there is no request body. `cancelled: false` means the thread
|
|
861
|
+
* was idle **or** that this caller may not touch it - the platform answers both the same way, so
|
|
862
|
+
* that the existence of a thread does not leak.
|
|
845
863
|
*/
|
|
846
864
|
AnalystEntity.prototype.cancelRun = function (threadId) {
|
|
847
865
|
return __awaiter(this, void 0, void 0, function () {
|
|
848
|
-
var payload;
|
|
849
866
|
return __generator(this, function (_a) {
|
|
850
|
-
payload = { threadId: threadId };
|
|
851
867
|
return [2 /*return*/, this.service.routeGenerator
|
|
852
868
|
.post(Analyst_consts_1.Routes.CANCEL_RUN)
|
|
853
|
-
.
|
|
869
|
+
.withRouteParams({ threadId: threadId })
|
|
854
870
|
.setException('Failed to cancel the analyst chat run')
|
|
855
871
|
.invoke()];
|
|
856
872
|
});
|
|
@@ -24434,7 +24450,7 @@ var lodash_1 = __webpack_require__(96486);
|
|
|
24434
24450
|
var BringgException_1 = __webpack_require__(43605);
|
|
24435
24451
|
var Logger_1 = __importDefault(__webpack_require__(55860));
|
|
24436
24452
|
var abort_1 = __webpack_require__(34179);
|
|
24437
|
-
var version = '9.82.0-pre.
|
|
24453
|
+
var version = '9.82.0-pre.7';
|
|
24438
24454
|
function logErrorResponse(response) {
|
|
24439
24455
|
var data = response.data, status = response.status;
|
|
24440
24456
|
try {
|