@onecx/integration-interface 8.11.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 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,
@@ -1609,3 +1610,10 @@ var AiContextGatherer = class extends Gatherer {
1609
1610
  super("aiContext", 1, callback);
1610
1611
  }
1611
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
@@ -1517,7 +1517,15 @@ var AiContextGatherer = class extends Gatherer {
1517
1517
  super("aiContext", 1, callback);
1518
1518
  }
1519
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
+ };
1520
1527
  export {
1528
+ AiCompletionGatherer,
1521
1529
  AiContextGatherer,
1522
1530
  ConfigurationTopic,
1523
1531
  CurrentLocationTopic,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onecx/integration-interface",
3
- "version": "8.11.0",
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": "8.11.0"
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;AAEt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ACpE,cAAc,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,12 @@
1
+ export interface AiCompletionRequest {
2
+ agent: {
3
+ id: string;
4
+ name: string;
5
+ };
6
+ aiContext: string[];
7
+ message: string;
8
+ systemPrompt: string;
9
+ }
10
+ export interface AiCompletionResponse {
11
+ message: string;
12
+ }
@@ -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.11.0";
2
+ export declare const LIB_VERSION = "8.12.0";
package/src/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export const LIB_NAME = '@onecx/integration-interface';
2
- export const LIB_VERSION = '8.11.0';
2
+ export const LIB_VERSION = '8.12.0';
3
3
  //# sourceMappingURL=version.js.map