@onecx/integration-interface 8.10.0 → 8.12.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/dist/index.cjs +27 -1
- package/dist/index.mjs +27 -1
- package/package.json +2 -2
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/lib/gatherers/ai-completion/v1/ai-completion.gatherer.d.ts +28 -0
- package/src/lib/gatherers/ai-completion/v1/ai-completion.gatherer.js +30 -0
- package/src/lib/gatherers/ai-completion/v1/ai-completion.gatherer.js.map +1 -0
- package/src/lib/gatherers/ai-completion/v1/ai-completion.model.d.ts +12 -0
- package/src/lib/gatherers/ai-completion/v1/ai-completion.model.js +1 -0
- package/src/lib/gatherers/ai-completion/v1/ai-completion.model.js.map +1 -0
- package/src/version.d.ts +1 -1
- package/src/version.js +1 -1
package/dist/index.cjs
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// libs/integration-interface/src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
AiCompletionGatherer: () => AiCompletionGatherer,
|
|
33
34
|
AiContextGatherer: () => AiContextGatherer,
|
|
34
35
|
ConfigurationTopic: () => ConfigurationTopic,
|
|
35
36
|
CurrentLocationTopic: () => CurrentLocationTopic,
|
|
@@ -593,7 +594,25 @@ var DEFAULT_FULL_PACKAGE_BLACKLIST = [
|
|
|
593
594
|
"primeng/resources/",
|
|
594
595
|
"primeng/editor",
|
|
595
596
|
"@onecx/angular-accelerator/testing",
|
|
596
|
-
"@onecx/angular-accelerator/migrations.json"
|
|
597
|
+
"@onecx/angular-accelerator/migrations.json",
|
|
598
|
+
"react/jsx-dev-runtime",
|
|
599
|
+
"react/compiler-runtime",
|
|
600
|
+
"react-dom/server",
|
|
601
|
+
"react-dom/server.browser",
|
|
602
|
+
"react-dom/server.bun",
|
|
603
|
+
"react-dom/server.edge",
|
|
604
|
+
"react-dom/server.node",
|
|
605
|
+
"react-dom/static",
|
|
606
|
+
"react-dom/static.browser",
|
|
607
|
+
"react-dom/static.edge",
|
|
608
|
+
"react-dom/static.node",
|
|
609
|
+
"react-dom/profiling",
|
|
610
|
+
"react-dom/test-utils",
|
|
611
|
+
"react-router/internal",
|
|
612
|
+
"react-router/internal/react-server-client",
|
|
613
|
+
"@onecx/react-utils/prime-base-theme",
|
|
614
|
+
"@onecx/react-utils/prime-base-theme.css",
|
|
615
|
+
"@onecx/react-integration-interface/mocks"
|
|
597
616
|
];
|
|
598
617
|
function removeExportPrefix(str) {
|
|
599
618
|
return str.replace("./", "");
|
|
@@ -1591,3 +1610,10 @@ var AiContextGatherer = class extends Gatherer {
|
|
|
1591
1610
|
super("aiContext", 1, callback);
|
|
1592
1611
|
}
|
|
1593
1612
|
};
|
|
1613
|
+
|
|
1614
|
+
// libs/integration-interface/src/lib/gatherers/ai-completion/v1/ai-completion.gatherer.ts
|
|
1615
|
+
var AiCompletionGatherer = class extends Gatherer {
|
|
1616
|
+
constructor(callback) {
|
|
1617
|
+
super("aiCompletion", 1, callback);
|
|
1618
|
+
}
|
|
1619
|
+
};
|
package/dist/index.mjs
CHANGED
|
@@ -501,7 +501,25 @@ var DEFAULT_FULL_PACKAGE_BLACKLIST = [
|
|
|
501
501
|
"primeng/resources/",
|
|
502
502
|
"primeng/editor",
|
|
503
503
|
"@onecx/angular-accelerator/testing",
|
|
504
|
-
"@onecx/angular-accelerator/migrations.json"
|
|
504
|
+
"@onecx/angular-accelerator/migrations.json",
|
|
505
|
+
"react/jsx-dev-runtime",
|
|
506
|
+
"react/compiler-runtime",
|
|
507
|
+
"react-dom/server",
|
|
508
|
+
"react-dom/server.browser",
|
|
509
|
+
"react-dom/server.bun",
|
|
510
|
+
"react-dom/server.edge",
|
|
511
|
+
"react-dom/server.node",
|
|
512
|
+
"react-dom/static",
|
|
513
|
+
"react-dom/static.browser",
|
|
514
|
+
"react-dom/static.edge",
|
|
515
|
+
"react-dom/static.node",
|
|
516
|
+
"react-dom/profiling",
|
|
517
|
+
"react-dom/test-utils",
|
|
518
|
+
"react-router/internal",
|
|
519
|
+
"react-router/internal/react-server-client",
|
|
520
|
+
"@onecx/react-utils/prime-base-theme",
|
|
521
|
+
"@onecx/react-utils/prime-base-theme.css",
|
|
522
|
+
"@onecx/react-integration-interface/mocks"
|
|
505
523
|
];
|
|
506
524
|
function removeExportPrefix(str) {
|
|
507
525
|
return str.replace("./", "");
|
|
@@ -1499,7 +1517,15 @@ var AiContextGatherer = class extends Gatherer {
|
|
|
1499
1517
|
super("aiContext", 1, callback);
|
|
1500
1518
|
}
|
|
1501
1519
|
};
|
|
1520
|
+
|
|
1521
|
+
// libs/integration-interface/src/lib/gatherers/ai-completion/v1/ai-completion.gatherer.ts
|
|
1522
|
+
var AiCompletionGatherer = class extends Gatherer {
|
|
1523
|
+
constructor(callback) {
|
|
1524
|
+
super("aiCompletion", 1, callback);
|
|
1525
|
+
}
|
|
1526
|
+
};
|
|
1502
1527
|
export {
|
|
1528
|
+
AiCompletionGatherer,
|
|
1503
1529
|
AiContextGatherer,
|
|
1504
1530
|
ConfigurationTopic,
|
|
1505
1531
|
CurrentLocationTopic,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onecx/integration-interface",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.12.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"rxjs": "^7.8.1",
|
|
11
|
-
"@onecx/accelerator": "
|
|
11
|
+
"@onecx/accelerator": "8.12.0"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
14
14
|
"dependencies": {
|
package/src/index.d.ts
CHANGED
|
@@ -61,3 +61,5 @@ export * from './lib/topics/notification/v1/notification.topic';
|
|
|
61
61
|
export * from './lib/services/notification.service';
|
|
62
62
|
export * from './lib/gatherers/ai-context/v1/ai-context.model';
|
|
63
63
|
export * from './lib/gatherers/ai-context/v1/ai-context.gatherer';
|
|
64
|
+
export * from './lib/gatherers/ai-completion/v1/ai-completion.model';
|
|
65
|
+
export * from './lib/gatherers/ai-completion/v1/ai-completion.gatherer';
|
package/src/index.js
CHANGED
|
@@ -61,4 +61,6 @@ export * from './lib/topics/notification/v1/notification.topic';
|
|
|
61
61
|
export * from './lib/services/notification.service';
|
|
62
62
|
export * from './lib/gatherers/ai-context/v1/ai-context.model';
|
|
63
63
|
export * from './lib/gatherers/ai-context/v1/ai-context.gatherer';
|
|
64
|
+
export * from './lib/gatherers/ai-completion/v1/ai-completion.model';
|
|
65
|
+
export * from './lib/gatherers/ai-completion/v1/ai-completion.gatherer';
|
|
64
66
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/integration-interface/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAA;AAC7D,cAAc,4CAA4C,CAAA;AAC1D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,8CAA8C,CAAA;AAE5D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,qDAAqD,CAAA;AAEnE,cAAc,mDAAmD,CAAA;AACjE,cAAc,2CAA2C,CAAA;AACzD,cAAc,oDAAoD,CAAA;AAElE,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,mDAAmD,CAAA;AAEjE,cAAc,2DAA2D,CAAA;AACzE,cAAc,iEAAiE,CAAA;AAC/E,cAAc,mDAAmD,CAAA;AACjE,cAAc,+CAA+C,CAAA;AAC7D,cAAc,kDAAkD,CAAA;AAEhE,cAAc,wDAAwD,CAAA;AAEtE,cAAc,uCAAuC,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,sDAAsD,CAAA;AACpE,cAAc,yCAAyC,CAAA;AAEvD,cAAc,kCAAkC,CAAA;AAChD,cAAc,kCAAkC,CAAA;AAChD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iEAAiE,CAAA;AAC/E,cAAc,iEAAiE,CAAA;AAE/E,cAAc,4CAA4C,CAAA;AAE1D,cAAc,qCAAqC,CAAA;AACnD,cAAc,oCAAoC,CAAA;AAClD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,kCAAkC,CAAA;AAEhD,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,qCAAqC,CAAA;AAEnD,cAAc,gDAAgD,CAAA;AAC9D,cAAc,mDAAmD,CAAA;AACjE,cAAc,sDAAsD,CAAA;AACpE,cAAc,yDAAyD,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Gatherer } from "@onecx/accelerator";
|
|
2
|
+
import type { AiCompletionRequest, AiCompletionResponse } from "./ai-completion.model";
|
|
3
|
+
/**
|
|
4
|
+
* This class acts as a thin communication layer for AI completions between consumers inside
|
|
5
|
+
* onecx-portal-ui-libs and the AI Provider Remote Component. It publishes AI completion requests,
|
|
6
|
+
* collects responses from the registered provider instance and returns them to the caller.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
*
|
|
11
|
+
* // create the gatherer in the provider (remote component) so it can answer completion requests
|
|
12
|
+
* // in ngOnDestroy, call the gatherer.destroy() method to clean up resources
|
|
13
|
+
*
|
|
14
|
+
* const aiCompletionGatherer = new AiCompletionGatherer(async (request) => {
|
|
15
|
+
* // request the AI provider BFF with request.agent / request.message / ...
|
|
16
|
+
* // and return the response: { message: string }
|
|
17
|
+
* // return null if you do not want to contribute to this request
|
|
18
|
+
* return { message: "..." }
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // on the consumer side, publish the request and get the responses back:
|
|
22
|
+
* const responses = await aiCompletionGatherer.gather(request)
|
|
23
|
+
* // responses is an array of (AiCompletionResponse | null)
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class AiCompletionGatherer extends Gatherer<AiCompletionRequest, AiCompletionResponse | null> {
|
|
27
|
+
constructor(callback: (request: AiCompletionRequest) => Promise<AiCompletionResponse | null>);
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Gatherer } from "@onecx/accelerator";
|
|
2
|
+
/**
|
|
3
|
+
* This class acts as a thin communication layer for AI completions between consumers inside
|
|
4
|
+
* onecx-portal-ui-libs and the AI Provider Remote Component. It publishes AI completion requests,
|
|
5
|
+
* collects responses from the registered provider instance and returns them to the caller.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
*
|
|
10
|
+
* // create the gatherer in the provider (remote component) so it can answer completion requests
|
|
11
|
+
* // in ngOnDestroy, call the gatherer.destroy() method to clean up resources
|
|
12
|
+
*
|
|
13
|
+
* const aiCompletionGatherer = new AiCompletionGatherer(async (request) => {
|
|
14
|
+
* // request the AI provider BFF with request.agent / request.message / ...
|
|
15
|
+
* // and return the response: { message: string }
|
|
16
|
+
* // return null if you do not want to contribute to this request
|
|
17
|
+
* return { message: "..." }
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // on the consumer side, publish the request and get the responses back:
|
|
21
|
+
* const responses = await aiCompletionGatherer.gather(request)
|
|
22
|
+
* // responses is an array of (AiCompletionResponse | null)
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export class AiCompletionGatherer extends Gatherer {
|
|
26
|
+
constructor(callback) {
|
|
27
|
+
super("aiCompletion", 1, callback);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=ai-completion.gatherer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-completion.gatherer.js","sourceRoot":"","sources":["../../../../../../../../libs/integration-interface/src/lib/gatherers/ai-completion/v1/ai-completion.gatherer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAI7C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,oBAAqB,SAAQ,QAA0D;IAChG,YAAY,QAAgF;QACxF,KAAK,CAAC,cAAc,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAA;IACtC,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=ai-completion.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-completion.model.js","sourceRoot":"","sources":["../../../../../../../../libs/integration-interface/src/lib/gatherers/ai-completion/v1/ai-completion.model.ts"],"names":[],"mappings":""}
|
package/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const LIB_NAME = "@onecx/integration-interface";
|
|
2
|
-
export declare const LIB_VERSION = "8.
|
|
2
|
+
export declare const LIB_VERSION = "8.12.0";
|
package/src/version.js
CHANGED