@sftech/ng-orchestrator 0.0.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/README.md +3 -0
- package/fesm2022/sftech-ng-orchestrator-agents.routes-B6AJfgEl.mjs +4 -0
- package/fesm2022/sftech-ng-orchestrator-agents.routes-B6AJfgEl.mjs.map +1 -0
- package/fesm2022/sftech-ng-orchestrator-chat.routes-6WiLaurE.mjs +71 -0
- package/fesm2022/sftech-ng-orchestrator-chat.routes-6WiLaurE.mjs.map +1 -0
- package/fesm2022/sftech-ng-orchestrator-prompts.routes-B2XVGKZw.mjs +4 -0
- package/fesm2022/sftech-ng-orchestrator-prompts.routes-B2XVGKZw.mjs.map +1 -0
- package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-Dk76dBVe.mjs +86 -0
- package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-Dk76dBVe.mjs.map +1 -0
- package/fesm2022/sftech-ng-orchestrator.mjs +2 -0
- package/fesm2022/sftech-ng-orchestrator.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/lib/ng-orchestrator/agents/agents.routes.d.ts +1 -0
- package/lib/ng-orchestrator/chat/chat.component.d.ts +22 -0
- package/lib/ng-orchestrator/chat/chat.routes.d.ts +5 -0
- package/lib/ng-orchestrator/configuration/orchestrator-config.interface.d.ts +5 -0
- package/lib/ng-orchestrator/configuration/orchestrator-config.mapper.d.ts +4 -0
- package/lib/ng-orchestrator/configuration/orchestrator-configuration.token.d.ts +3 -0
- package/lib/ng-orchestrator/core/dtos/orchestrator-run.dto.d.ts +7 -0
- package/lib/ng-orchestrator/core/service/orcherstrator.service.d.ts +13 -0
- package/lib/ng-orchestrator/orchestrator.module.d.ts +10 -0
- package/lib/ng-orchestrator/orchestrator.routes.d.ts +2 -0
- package/lib/ng-orchestrator/prompts/prompts.routes.d.ts +1 -0
- package/package.json +24 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sftech-ng-orchestrator-agents.routes-B6AJfgEl.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/agents/agents.routes.ts"],"sourcesContent":["export const agentsRoutes = [];"],"names":[],"mappings":"AAAO,MAAM,YAAY,GAAG;;;;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, Component } from '@angular/core';
|
|
3
|
+
import { O as OrcherstratorService } from './sftech-ng-orchestrator-sftech-ng-orchestrator-Dk76dBVe.mjs';
|
|
4
|
+
import * as i2 from '@angular/forms';
|
|
5
|
+
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import { FloatLabel } from 'primeng/floatlabel';
|
|
7
|
+
import { InputText } from 'primeng/inputtext';
|
|
8
|
+
import { Button } from 'primeng/button';
|
|
9
|
+
import { map, catchError, of } from 'rxjs';
|
|
10
|
+
import { Panel } from 'primeng/panel';
|
|
11
|
+
import { ProgressSpinner } from 'primeng/progressspinner';
|
|
12
|
+
|
|
13
|
+
class ChatComponent {
|
|
14
|
+
orchestratorService;
|
|
15
|
+
answer = signal(undefined);
|
|
16
|
+
status = signal(EOrchestratorStatus.IDLE);
|
|
17
|
+
statuses = EOrchestratorStatus;
|
|
18
|
+
form = new FormGroup({
|
|
19
|
+
prompt: new FormControl('')
|
|
20
|
+
});
|
|
21
|
+
constructor(orchestratorService) {
|
|
22
|
+
this.orchestratorService = orchestratorService;
|
|
23
|
+
}
|
|
24
|
+
run() {
|
|
25
|
+
console.log('send');
|
|
26
|
+
if (this.form.valid) {
|
|
27
|
+
this.status.set(EOrchestratorStatus.REQUESTING);
|
|
28
|
+
this.orchestratorService.runAgent({ agentIdentifier: 'agent_k9x7d2h3', userInput: { input: this.form.get('prompt')?.value } }).pipe(map((res) => {
|
|
29
|
+
this.answer.set(res.llmResult.message);
|
|
30
|
+
this.status.set(EOrchestratorStatus.ANSWERED);
|
|
31
|
+
}), catchError((err) => {
|
|
32
|
+
console.error(err);
|
|
33
|
+
this.status.set(EOrchestratorStatus.ERROR);
|
|
34
|
+
return of();
|
|
35
|
+
})).subscribe();
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.error('Form is invalid');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ChatComponent, deps: [{ token: OrcherstratorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: ChatComponent, isStandalone: true, selector: "sftech-chat", ngImport: i0, template: "\r\n<div class=\"flex flex-col items-center justify-center mb-10 mt-5\">\r\n @if(status() === statuses.ANSWERED) {\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <p>Ingolf sagt:</p>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n {{ answer() }}\r\n </p>\r\n } @else if (status() === statuses.ERROR) {\r\n <div class=\"flex items-center\">\r\n <p-panel [toggleable]=\"false\">\r\n <ng-template #header>\r\n <div class=\"flex items-center gap-2\">\r\n <span>Ups... Ein Fehler ist aufgetreten</span>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n Beim Senden deiner Nachricht an unseren Server ist ein Fehler aufgetreten. Bitte versuche es sp\u00E4ter noch einmal.\r\n </p>\r\n </p-panel>\r\n </div>\r\n } @else if (status() === statuses.REQUESTING) {\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <p>Deine Anfrage wird verarbeitet</p>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n <p-progress-spinner ariaLabel=\"loading\" />\r\n </p>\r\n } @else if (status() === statuses.IDLE) {\r\n <p-panel [toggleable]=\"false\">\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <span>Jetzt Anfrage senden</span>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n Schicke uns jetzt deine Frage. Wir verfeinern diese um die bestm\u00F6gliche Antwort zu erhalten.\r\n </p>\r\n </p-panel>\r\n }\r\n</div>\r\n\r\n<form [formGroup]=\"form\" class=\"pt-2\">\r\n <div>\r\n <p-floatlabel variant=\"in\">\r\n <textarea id=\"prompt\" pInputText [formControlName]=\"'prompt'\" rows=\"5\" class=\"w-full\"></textarea>\r\n <label for=\"prompt\">Prompt</label>\r\n </p-floatlabel>\r\n </div>\r\n <div class=\"mt-2\">\r\n <p-button type=\"submit\" label=\"Senden\" (onClick)=\"run()\"/>\r\n </div>\r\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["variant", "fluid", "pSize"] }, { kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "fluid", "buttonProps"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "component", type: ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ChatComponent, decorators: [{
|
|
45
|
+
type: Component,
|
|
46
|
+
args: [{ selector: 'sftech-chat', imports: [
|
|
47
|
+
ReactiveFormsModule,
|
|
48
|
+
FloatLabel,
|
|
49
|
+
InputText,
|
|
50
|
+
Button,
|
|
51
|
+
Panel,
|
|
52
|
+
ProgressSpinner
|
|
53
|
+
], template: "\r\n<div class=\"flex flex-col items-center justify-center mb-10 mt-5\">\r\n @if(status() === statuses.ANSWERED) {\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <p>Ingolf sagt:</p>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n {{ answer() }}\r\n </p>\r\n } @else if (status() === statuses.ERROR) {\r\n <div class=\"flex items-center\">\r\n <p-panel [toggleable]=\"false\">\r\n <ng-template #header>\r\n <div class=\"flex items-center gap-2\">\r\n <span>Ups... Ein Fehler ist aufgetreten</span>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n Beim Senden deiner Nachricht an unseren Server ist ein Fehler aufgetreten. Bitte versuche es sp\u00E4ter noch einmal.\r\n </p>\r\n </p-panel>\r\n </div>\r\n } @else if (status() === statuses.REQUESTING) {\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <p>Deine Anfrage wird verarbeitet</p>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n <p-progress-spinner ariaLabel=\"loading\" />\r\n </p>\r\n } @else if (status() === statuses.IDLE) {\r\n <p-panel [toggleable]=\"false\">\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <span>Jetzt Anfrage senden</span>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n Schicke uns jetzt deine Frage. Wir verfeinern diese um die bestm\u00F6gliche Antwort zu erhalten.\r\n </p>\r\n </p-panel>\r\n }\r\n</div>\r\n\r\n<form [formGroup]=\"form\" class=\"pt-2\">\r\n <div>\r\n <p-floatlabel variant=\"in\">\r\n <textarea id=\"prompt\" pInputText [formControlName]=\"'prompt'\" rows=\"5\" class=\"w-full\"></textarea>\r\n <label for=\"prompt\">Prompt</label>\r\n </p-floatlabel>\r\n </div>\r\n <div class=\"mt-2\">\r\n <p-button type=\"submit\" label=\"Senden\" (onClick)=\"run()\"/>\r\n </div>\r\n</form>" }]
|
|
54
|
+
}], ctorParameters: () => [{ type: OrcherstratorService }] });
|
|
55
|
+
var EOrchestratorStatus;
|
|
56
|
+
(function (EOrchestratorStatus) {
|
|
57
|
+
EOrchestratorStatus["IDLE"] = "IDLE";
|
|
58
|
+
EOrchestratorStatus["REQUESTING"] = "REQUESTING";
|
|
59
|
+
EOrchestratorStatus["ANSWERED"] = "ANSWERED";
|
|
60
|
+
EOrchestratorStatus["ERROR"] = "ERROR";
|
|
61
|
+
})(EOrchestratorStatus || (EOrchestratorStatus = {}));
|
|
62
|
+
|
|
63
|
+
const chatRoutes = [
|
|
64
|
+
{
|
|
65
|
+
path: '',
|
|
66
|
+
component: ChatComponent
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
export { chatRoutes };
|
|
71
|
+
//# sourceMappingURL=sftech-ng-orchestrator-chat.routes-6WiLaurE.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sftech-ng-orchestrator-chat.routes-6WiLaurE.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/chat/chat.component.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/chat/chat.component.html","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/chat/chat.routes.ts"],"sourcesContent":["import {Component, signal, Signal} from '@angular/core';\r\nimport {OrcherstratorService} from \"../core/service/orcherstrator.service\";\r\nimport {FormControl, FormGroup, ReactiveFormsModule} from \"@angular/forms\";\r\nimport {FloatLabel} from \"primeng/floatlabel\";\r\nimport {InputText} from \"primeng/inputtext\";\r\nimport {Button} from \"primeng/button\";\r\nimport {catchError, map, of} from \"rxjs\";\r\nimport {Panel} from \"primeng/panel\";\r\nimport {ProgressSpinner} from \"primeng/progressspinner\";\r\n\r\n@Component({\r\n selector: 'sftech-chat',\r\n imports: [\r\n ReactiveFormsModule,\r\n FloatLabel,\r\n InputText,\r\n Button,\r\n Panel,\r\n ProgressSpinner\r\n ],\r\n templateUrl: './chat.component.html',\r\n styleUrl: './chat.component.css'\r\n})\r\nexport class ChatComponent {\r\n\r\n public answer= signal<string | undefined>(undefined);\r\n public status = signal<EOrchestratorStatus>(EOrchestratorStatus.IDLE);\r\n\r\n public statuses = EOrchestratorStatus;\r\n\r\n public form = new FormGroup({\r\n prompt: new FormControl('')\r\n })\r\n\r\n public constructor(private readonly orchestratorService: OrcherstratorService) {\r\n }\r\n\r\n public run(): void {\r\n console.log('send')\r\n\r\n if (this.form.valid) {\r\n this.status.set(EOrchestratorStatus.REQUESTING);\r\n this.orchestratorService.runAgent({ agentIdentifier: 'agent_k9x7d2h3', userInput: {input : this.form.get('prompt')?.value!} }).pipe(\r\n map((res) => {\r\n this.answer.set(res.llmResult.message)\r\n this.status.set(EOrchestratorStatus.ANSWERED);\r\n }),\r\n catchError((err: unknown) => {\r\n console.error(err);\r\n this.status.set(EOrchestratorStatus.ERROR);\r\n return of()\r\n })).subscribe();\r\n } else {\r\n console.error('Form is invalid');\r\n }\r\n }\r\n}\r\n\r\nexport enum EOrchestratorStatus {\r\n IDLE = 'IDLE',\r\n REQUESTING = 'REQUESTING',\r\n ANSWERED = 'ANSWERED',\r\n ERROR = 'ERROR'\r\n}","\r\n<div class=\"flex flex-col items-center justify-center mb-10 mt-5\">\r\n @if(status() === statuses.ANSWERED) {\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <p>Ingolf sagt:</p>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n {{ answer() }}\r\n </p>\r\n } @else if (status() === statuses.ERROR) {\r\n <div class=\"flex items-center\">\r\n <p-panel [toggleable]=\"false\">\r\n <ng-template #header>\r\n <div class=\"flex items-center gap-2\">\r\n <span>Ups... Ein Fehler ist aufgetreten</span>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n Beim Senden deiner Nachricht an unseren Server ist ein Fehler aufgetreten. Bitte versuche es später noch einmal.\r\n </p>\r\n </p-panel>\r\n </div>\r\n } @else if (status() === statuses.REQUESTING) {\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <p>Deine Anfrage wird verarbeitet</p>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n <p-progress-spinner ariaLabel=\"loading\" />\r\n </p>\r\n } @else if (status() === statuses.IDLE) {\r\n <p-panel [toggleable]=\"false\">\r\n <ng-template #header>\r\n <div class=\"flex items-center font-bold\">\r\n <span>Jetzt Anfrage senden</span>\r\n </div>\r\n </ng-template>\r\n <p class=\"m-0\">\r\n Schicke uns jetzt deine Frage. Wir verfeinern diese um die bestmögliche Antwort zu erhalten.\r\n </p>\r\n </p-panel>\r\n }\r\n</div>\r\n\r\n<form [formGroup]=\"form\" class=\"pt-2\">\r\n <div>\r\n <p-floatlabel variant=\"in\">\r\n <textarea id=\"prompt\" pInputText [formControlName]=\"'prompt'\" rows=\"5\" class=\"w-full\"></textarea>\r\n <label for=\"prompt\">Prompt</label>\r\n </p-floatlabel>\r\n </div>\r\n <div class=\"mt-2\">\r\n <p-button type=\"submit\" label=\"Senden\" (onClick)=\"run()\"/>\r\n </div>\r\n</form>","import {ChatComponent} from \"./chat.component\";\r\n\r\nexport const chatRoutes = [\r\n {\r\n path: '',\r\n component: ChatComponent\r\n }\r\n];"],"names":["i1.OrcherstratorService"],"mappings":";;;;;;;;;;;;MAuBa,aAAa,CAAA;AAWc,IAAA,mBAAA;AAT7B,IAAA,MAAM,GAAE,MAAM,CAAqB,SAAS,CAAC;AAC7C,IAAA,MAAM,GAAG,MAAM,CAAsB,mBAAmB,CAAC,IAAI,CAAC;IAE9D,QAAQ,GAAG,mBAAmB;IAE9B,IAAI,GAAG,IAAI,SAAS,CAAC;AACxB,QAAA,MAAM,EAAE,IAAI,WAAW,CAAC,EAAE;AAC7B,KAAA,CAAC;AAEF,IAAA,WAAA,CAAoC,mBAAyC,EAAA;QAAzC,IAAmB,CAAA,mBAAA,GAAnB,mBAAmB;;IAGhD,GAAG,GAAA;AACN,QAAA,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;AAEnB,QAAA,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,UAAU,CAAC;AAC/C,YAAA,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAC,KAAK,EAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,KAAM,EAAC,EAAE,CAAC,CAAC,IAAI,CAC/H,GAAG,CAAC,CAAC,GAAG,KAAI;gBACR,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC;gBACtC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,QAAQ,CAAC;AACjD,aAAC,CAAC,EACF,UAAU,CAAC,CAAC,GAAY,KAAI;AACxB,g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AA,CAAA;;2FAKV,aAAa,EAAA,UAAA,EAAA,CAAA;kBAbzB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EACZ,OAAA,EAAA;wBACL,mBAAmB;wBACnB,UAAU;wBACV,SAAS;wBACT,MAAM;wBACN,KAAK;wBACL;AACH,qBAAA,EAAA,QAAA,EAAA,qxEAAA,EAAA;;AAuCL,IAAY,mBAKX;AALD,CAAA,UAAY,mBAAmB,EAAA;AAC3B,IAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,mBAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,mBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,mBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACnB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,GAK9B,EAAA,CAAA,CAAA;;AE7DY,MAAA,UAAU,GAAG;AACtB,IAAA;AACI,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE;AACd;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sftech-ng-orchestrator-prompts.routes-B2XVGKZw.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/prompts/prompts.routes.ts"],"sourcesContent":["export const promptsRoutes = [];"],"names":[],"mappings":"AAAO,MAAM,aAAa,GAAG;;;;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import * as i1 from '@angular/common/http';
|
|
5
|
+
|
|
6
|
+
const ORCHESTRATOR_CONFIGURATION = new InjectionToken('ORCHESTRATOR_CONFIGURATION');
|
|
7
|
+
|
|
8
|
+
class OrchestratorConfigMapper {
|
|
9
|
+
static map(config) {
|
|
10
|
+
return {
|
|
11
|
+
orchestratorUrl: config['ORCHESTRATOR_URL'],
|
|
12
|
+
orchestratorDbUrl: config['ORCHESTRATOR_DB_URL'],
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class OrcherstratorService {
|
|
18
|
+
http;
|
|
19
|
+
config;
|
|
20
|
+
constructor(http, config) {
|
|
21
|
+
this.http = http;
|
|
22
|
+
this.config = config;
|
|
23
|
+
}
|
|
24
|
+
runAgent(runConfig) {
|
|
25
|
+
const url = `${this.config.orchestratorUrl}/api/generic/run`;
|
|
26
|
+
return this.http.post(url, runConfig);
|
|
27
|
+
}
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: OrcherstratorService, deps: [{ token: i1.HttpClient }, { token: ORCHESTRATOR_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: OrcherstratorService });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: OrcherstratorService, decorators: [{
|
|
32
|
+
type: Injectable
|
|
33
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
34
|
+
type: Inject,
|
|
35
|
+
args: [ORCHESTRATOR_CONFIGURATION]
|
|
36
|
+
}] }] });
|
|
37
|
+
|
|
38
|
+
class OrchestratorModule {
|
|
39
|
+
static forRoot(config) {
|
|
40
|
+
console.log(config);
|
|
41
|
+
return {
|
|
42
|
+
ngModule: OrchestratorModule,
|
|
43
|
+
providers: [
|
|
44
|
+
{
|
|
45
|
+
provide: ORCHESTRATOR_CONFIGURATION,
|
|
46
|
+
useValue: OrchestratorConfigMapper.map(config),
|
|
47
|
+
},
|
|
48
|
+
OrcherstratorService
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: OrchestratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
53
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.9", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
|
|
54
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
|
|
55
|
+
}
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: OrchestratorModule, decorators: [{
|
|
57
|
+
type: NgModule,
|
|
58
|
+
args: [{
|
|
59
|
+
declarations: [],
|
|
60
|
+
imports: [
|
|
61
|
+
CommonModule,
|
|
62
|
+
]
|
|
63
|
+
}]
|
|
64
|
+
}] });
|
|
65
|
+
|
|
66
|
+
const orchestratorRoutes = [
|
|
67
|
+
{
|
|
68
|
+
path: 'chats',
|
|
69
|
+
loadChildren: () => import('./sftech-ng-orchestrator-chat.routes-6WiLaurE.mjs').then(m => m.chatRoutes)
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
path: 'prompts',
|
|
73
|
+
loadChildren: () => import('./sftech-ng-orchestrator-prompts.routes-B2XVGKZw.mjs').then(m => m.promptsRoutes)
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
path: 'agents',
|
|
77
|
+
loadChildren: () => import('./sftech-ng-orchestrator-agents.routes-B6AJfgEl.mjs').then(m => m.agentsRoutes)
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Generated bundle index. Do not edit.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
export { OrcherstratorService as O, OrchestratorModule as a, orchestratorRoutes as o };
|
|
86
|
+
//# sourceMappingURL=sftech-ng-orchestrator-sftech-ng-orchestrator-Dk76dBVe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sftech-ng-orchestrator-sftech-ng-orchestrator-Dk76dBVe.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/configuration/orchestrator-configuration.token.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/configuration/orchestrator-config.mapper.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/service/orcherstrator.service.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/orchestrator.module.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/orchestrator.routes.ts","../../../../libs/ng-orchestrator/src/sftech-ng-orchestrator.ts"],"sourcesContent":["import {InjectionToken} from \"@angular/core\";\r\nimport {IOrchestratorConfig} from \"./orchestrator-config.interface\";\r\n\r\nexport const ORCHESTRATOR_CONFIGURATION = new InjectionToken<IOrchestratorConfig>('ORCHESTRATOR_CONFIGURATION');","// import {IAppConfig} from \"@sftech/ng-shared\";\r\nimport {IOrchestratorConfig} from \"./orchestrator-config.interface\";\r\n\r\nexport class OrchestratorConfigMapper {\r\n public static map(config: any): IOrchestratorConfig {\r\n return {\r\n orchestratorUrl: config['ORCHESTRATOR_URL'] as string,\r\n orchestratorDbUrl: config['ORCHESTRATOR_DB_URL'] as string,\r\n }\r\n }\r\n}","import {Inject, Injectable} from \"@angular/core\";\r\nimport {ORCHESTRATOR_CONFIGURATION} from \"../../configuration/orchestrator-configuration.token\";\r\nimport {IOrchestratorConfig} from \"../../configuration/orchestrator-config.interface\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\nimport {IOrchestratorRunDto} from \"../dtos/orchestrator-run.dto\";\r\nimport {Observable} from \"rxjs\";\r\n\r\n@Injectable()\r\nexport class OrcherstratorService {\r\n public constructor(private readonly http: HttpClient, @Inject(ORCHESTRATOR_CONFIGURATION) private readonly config: IOrchestratorConfig) {\r\n }\r\n\r\n public runAgent(runConfig: IOrchestratorRunDto): Observable<any> {\r\n const url = `${this.config.orchestratorUrl}/api/generic/run`\r\n return this.http.post(url, runConfig);\r\n }\r\n}","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {IAppConfig} from \"@sftech/ng-shared\";\r\nimport {ORCHESTRATOR_CONFIGURATION} from \"./configuration/orchestrator-configuration.token\";\r\nimport {OrchestratorConfigMapper} from \"./configuration/orchestrator-config.mapper\";\r\nimport {OrcherstratorService} from \"./core/service/orcherstrator.service\";\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n ]\r\n})\r\nexport class OrchestratorModule {\r\n public static forRoot(config: IAppConfig): ModuleWithProviders<OrchestratorModule> {\r\n console.log(config)\r\n return {\r\n ngModule: OrchestratorModule,\r\n providers: [\r\n {\r\n provide: ORCHESTRATOR_CONFIGURATION,\r\n useValue: OrchestratorConfigMapper.map(config),\r\n },\r\n OrcherstratorService\r\n ],\r\n };\r\n }\r\n}\r\n","import {Route} from '@angular/router';\r\n\r\nexport const orchestratorRoutes: Route[] = [\r\n {\r\n path: 'chats',\r\n loadChildren: () => import('./chat/chat.routes').then(m => m.chatRoutes)\r\n },\r\n {\r\n path: 'prompts',\r\n loadChildren: () => import('./prompts/prompts.routes').then(m => m.promptsRoutes)\r\n },\r\n {\r\n path: 'agents',\r\n loadChildren: () => import('./agents/agents.routes').then(m => m.agentsRoutes)\r\n },\r\n];\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,0BAA0B,GAAG,IAAI,cAAc,CAAsB,4BAA4B,CAAC;;MCAlG,wBAAwB,CAAA;IAC1B,OAAO,GAAG,CAAC,MAAW,EAAA;QACzB,OAAO;AACH,YAAA,eAAe,EAAE,MAAM,CAAC,kBAAkB,CAAW;AACrD,YAAA,iBAAiB,EAAE,MAAM,CAAC,qBAAqB,CAAW;SAC7D;;AAER;;MC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QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHvB,YAAY,CAAA,EAAA,CAAA;AAGP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAHvB,YAAY,CAAA,EAAA,CAAA;;2FAGP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAN9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACL,YAAY;AACf;AACJ,iBAAA;;;ACZY,MAAA,kBAAkB,GAAY;AACvC,IAAA;AACI,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,YAAY,EAAE,MAAM,OAAO,mDAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU;AAC1E,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,YAAY,EAAE,MAAM,OAAO,sDAA0B,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa;AACnF,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,YAAY,EAAE,MAAM,OAAO,qDAAwB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY;AAChF,KAAA;;;ACdL;;AAEG;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sftech-ng-orchestrator.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const agentsRoutes: never[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OrcherstratorService } from "../core/service/orcherstrator.service";
|
|
2
|
+
import { FormControl, FormGroup } from "@angular/forms";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ChatComponent {
|
|
5
|
+
private readonly orchestratorService;
|
|
6
|
+
answer: import("@angular/core").WritableSignal<string | undefined>;
|
|
7
|
+
status: import("@angular/core").WritableSignal<EOrchestratorStatus>;
|
|
8
|
+
statuses: typeof EOrchestratorStatus;
|
|
9
|
+
form: FormGroup<{
|
|
10
|
+
prompt: FormControl<string | null>;
|
|
11
|
+
}>;
|
|
12
|
+
constructor(orchestratorService: OrcherstratorService);
|
|
13
|
+
run(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChatComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatComponent, "sftech-chat", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
export declare enum EOrchestratorStatus {
|
|
18
|
+
IDLE = "IDLE",
|
|
19
|
+
REQUESTING = "REQUESTING",
|
|
20
|
+
ANSWERED = "ANSWERED",
|
|
21
|
+
ERROR = "ERROR"
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IOrchestratorConfig } from "../../configuration/orchestrator-config.interface";
|
|
2
|
+
import { HttpClient } from "@angular/common/http";
|
|
3
|
+
import { IOrchestratorRunDto } from "../dtos/orchestrator-run.dto";
|
|
4
|
+
import { Observable } from "rxjs";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class OrcherstratorService {
|
|
7
|
+
private readonly http;
|
|
8
|
+
private readonly config;
|
|
9
|
+
constructor(http: HttpClient, config: IOrchestratorConfig);
|
|
10
|
+
runAgent(runConfig: IOrchestratorRunDto): Observable<any>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrcherstratorService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrcherstratorService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { IAppConfig } from "@sftech/ng-shared";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export declare class OrchestratorModule {
|
|
6
|
+
static forRoot(config: IAppConfig): ModuleWithProviders<OrchestratorModule>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrchestratorModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<OrchestratorModule, never, [typeof i1.CommonModule], never>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<OrchestratorModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const promptsRoutes: never[];
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sftech/ng-orchestrator",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^19.2.0",
|
|
6
|
+
"@angular/core": "^19.2.0",
|
|
7
|
+
"@sftech/ng-shared": "^0.0.1"
|
|
8
|
+
},
|
|
9
|
+
"sideEffects": false,
|
|
10
|
+
"module": "fesm2022/sftech-ng-orchestrator.mjs",
|
|
11
|
+
"typings": "index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
"./package.json": {
|
|
14
|
+
"default": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"default": "./fesm2022/sftech-ng-orchestrator.mjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"tslib": "^2.3.0"
|
|
23
|
+
}
|
|
24
|
+
}
|