@sftech/ng-orchestrator 0.0.14 → 0.0.17

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.
Files changed (78) hide show
  1. package/fesm2022/{sftech-ng-orchestrator-agent.service-BI5zPQT-.mjs → sftech-ng-orchestrator-agent.service-DPJMw8a4.mjs} +3 -3
  2. package/fesm2022/sftech-ng-orchestrator-agent.service-DPJMw8a4.mjs.map +1 -0
  3. package/fesm2022/{sftech-ng-orchestrator-agents.routes-CnV8ngf_.mjs → sftech-ng-orchestrator-agents.routes-B9GSWOIz.mjs} +11 -12
  4. package/fesm2022/sftech-ng-orchestrator-agents.routes-B9GSWOIz.mjs.map +1 -0
  5. package/fesm2022/sftech-ng-orchestrator-chats.routes-BLGhykMM.mjs +556 -0
  6. package/fesm2022/sftech-ng-orchestrator-chats.routes-BLGhykMM.mjs.map +1 -0
  7. package/fesm2022/{sftech-ng-orchestrator-prompt-display.component-Dr3YvhU-.mjs → sftech-ng-orchestrator-prompt-display.component-Cd6Ff3KE.mjs} +59 -11
  8. package/fesm2022/sftech-ng-orchestrator-prompt-display.component-Cd6Ff3KE.mjs.map +1 -0
  9. package/fesm2022/sftech-ng-orchestrator-prompt.model-DhASegzq.mjs +57 -0
  10. package/fesm2022/sftech-ng-orchestrator-prompt.model-DhASegzq.mjs.map +1 -0
  11. package/fesm2022/{sftech-ng-orchestrator-prompts.routes-gyZH5vh-.mjs → sftech-ng-orchestrator-prompts.routes-DQZ_Hmjs.mjs} +2 -3
  12. package/fesm2022/sftech-ng-orchestrator-prompts.routes-DQZ_Hmjs.mjs.map +1 -0
  13. package/fesm2022/{sftech-ng-orchestrator-sftech-ng-orchestrator-CICnJ35v.mjs → sftech-ng-orchestrator-sftech-ng-orchestrator-CJMmRHC-.mjs} +107 -43
  14. package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-CJMmRHC-.mjs.map +1 -0
  15. package/fesm2022/sftech-ng-orchestrator.mjs +1 -1
  16. package/lib/ng-orchestrator/{agents → admin/agents}/components/agent/agent-display/agent-display.component.d.ts +8 -8
  17. package/lib/ng-orchestrator/{agents → admin/agents}/components/agent/agents-list/agents-list.component.d.ts +4 -4
  18. package/lib/ng-orchestrator/{prompts → admin/prompts}/components/prompt/prompt-display/prompt-display.component.d.ts +4 -4
  19. package/lib/ng-orchestrator/{prompts → admin/prompts}/components/prompt/prompts-list/prompts-list.component.d.ts +4 -4
  20. package/lib/ng-orchestrator/{prompts → admin/prompts}/components/prompt-history/prompt-history-display/prompt-history-display.component.d.ts +5 -5
  21. package/lib/ng-orchestrator/{prompts → admin/prompts}/components/prompt-history/prompt-history-list/prompt-history-list.component.d.ts +5 -5
  22. package/lib/ng-orchestrator/chats/agent-chat/agent-chat-message/agent-chat-message.component.d.ts +11 -0
  23. package/lib/ng-orchestrator/chats/agent-chat/agent-chat-message-human-input/agent-chat-message-human-input.component.d.ts +20 -0
  24. package/lib/ng-orchestrator/chats/agent-chat/agent-chat.component.d.ts +44 -0
  25. package/lib/ng-orchestrator/chats/agent-selection/agent-selection.component.d.ts +22 -0
  26. package/lib/ng-orchestrator/chats/chats.component.d.ts +5 -0
  27. package/lib/ng-orchestrator/chats/chats.routes.d.ts +16 -0
  28. package/lib/ng-orchestrator/chats/core/dataprovider/agent-run-icon-text.dataprovider.d.ts +9 -0
  29. package/lib/ng-orchestrator/core/dataprovider/orchestrator-icon.provider.d.ts +13 -0
  30. package/lib/ng-orchestrator/{agents/core → core}/dtos/agent-response.dto.d.ts +1 -1
  31. package/lib/ng-orchestrator/core/dtos/agent-run-create-request.dto.d.ts +3 -0
  32. package/lib/ng-orchestrator/core/dtos/agent-run-response.dto.d.ts +12 -0
  33. package/lib/ng-orchestrator/core/dtos/chat-create-request.dto.d.ts +4 -0
  34. package/lib/ng-orchestrator/core/dtos/chat-message-response.dto.d.ts +6 -0
  35. package/lib/ng-orchestrator/core/dtos/chat-response.dto.d.ts +6 -0
  36. package/lib/ng-orchestrator/core/dtos/chat-update-request.dto.d.ts +3 -0
  37. package/lib/ng-orchestrator/core/enums/agent-run-status.enum.d.ts +9 -0
  38. package/lib/ng-orchestrator/core/models/agent-run.model.d.ts +19 -0
  39. package/lib/ng-orchestrator/{agents/core → core}/models/agent.model.d.ts +2 -2
  40. package/lib/ng-orchestrator/core/models/chat-message.model.d.ts +10 -0
  41. package/lib/ng-orchestrator/core/models/chat.model.d.ts +8 -0
  42. package/lib/ng-orchestrator/core/service/agent-run.service.d.ts +19 -0
  43. package/lib/ng-orchestrator/{agents/core/services → core/service}/agent.service.d.ts +1 -1
  44. package/lib/ng-orchestrator/core/service/chat.service.d.ts +20 -0
  45. package/lib/ng-orchestrator/core/service/orchestrator.service.d.ts +20 -0
  46. package/lib/ng-orchestrator/{prompts/core/services → core/service}/prompt-history.service.d.ts +1 -1
  47. package/lib/ng-orchestrator/{prompts/core/services → core/service}/prompt.service.d.ts +1 -1
  48. package/lib/ng-orchestrator/orchestrator.module.d.ts +2 -1
  49. package/package.json +2 -2
  50. package/fesm2022/sftech-ng-orchestrator-agent.service-BI5zPQT-.mjs.map +0 -1
  51. package/fesm2022/sftech-ng-orchestrator-agents.routes-CnV8ngf_.mjs.map +0 -1
  52. package/fesm2022/sftech-ng-orchestrator-chat.routes-BAF4OU_M.mjs +0 -154
  53. package/fesm2022/sftech-ng-orchestrator-chat.routes-BAF4OU_M.mjs.map +0 -1
  54. package/fesm2022/sftech-ng-orchestrator-prompt-display.component-Dr3YvhU-.mjs.map +0 -1
  55. package/fesm2022/sftech-ng-orchestrator-prompt.service-CkWDxT-Y.mjs +0 -107
  56. package/fesm2022/sftech-ng-orchestrator-prompt.service-CkWDxT-Y.mjs.map +0 -1
  57. package/fesm2022/sftech-ng-orchestrator-prompts.routes-gyZH5vh-.mjs.map +0 -1
  58. package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-CICnJ35v.mjs.map +0 -1
  59. package/lib/ng-orchestrator/chat/chat.component.d.ts +0 -38
  60. package/lib/ng-orchestrator/chat/chat.routes.d.ts +0 -5
  61. package/lib/ng-orchestrator/core/dtos/llm-response.dto.d.ts +0 -10
  62. package/lib/ng-orchestrator/core/models/llm-response.model.d.ts +0 -12
  63. package/lib/ng-orchestrator/core/pipes/bold-input-vars.pipe.d.ts +0 -7
  64. package/lib/ng-orchestrator/core/service/orcherstrator.service.d.ts +0 -17
  65. /package/lib/ng-orchestrator/{agents → admin/agents}/agents.component.d.ts +0 -0
  66. /package/lib/ng-orchestrator/{agents → admin/agents}/agents.routes.d.ts +0 -0
  67. /package/lib/ng-orchestrator/{agents → admin/agents}/components/agent/agent-display/prompt-helper-modal/prompt-helper-modal.component.d.ts +0 -0
  68. /package/lib/ng-orchestrator/{prompts → admin/prompts}/prompts.component.d.ts +0 -0
  69. /package/lib/ng-orchestrator/{prompts → admin/prompts}/prompts.routes.d.ts +0 -0
  70. /package/lib/ng-orchestrator/{agents/core → core}/dtos/agent-create-request.dto.d.ts +0 -0
  71. /package/lib/ng-orchestrator/{agents/core → core}/dtos/agent-update-request.dto.d.ts +0 -0
  72. /package/lib/ng-orchestrator/{prompts/core → core}/dtos/prompt-history-create.dto.d.ts +0 -0
  73. /package/lib/ng-orchestrator/{prompts/core → core}/dtos/prompt-history-response.dto.d.ts +0 -0
  74. /package/lib/ng-orchestrator/{prompts/core → core}/dtos/prompt-history-update.dto.d.ts +0 -0
  75. /package/lib/ng-orchestrator/{prompts/core → core}/dtos/prompt-request.dto.d.ts +0 -0
  76. /package/lib/ng-orchestrator/{prompts/core → core}/dtos/prompt-update.dto.d.ts +0 -0
  77. /package/lib/ng-orchestrator/{prompts/core → core}/models/prompt-history.model.d.ts +0 -0
  78. /package/lib/ng-orchestrator/{prompts/core → core}/models/prompt.model.d.ts +0 -0
@@ -1,9 +1,11 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { InjectionToken, Inject, Injectable, NgModule } from '@angular/core';
4
+ import { MarkdownModule } from 'ngx-markdown';
4
5
  import * as i1 from '@angular/common/http';
5
- import { MappedApiResponseRaw, MappedApiError } from '@sftech/ng-shared';
6
- import { map, catchError, of } from 'rxjs';
6
+ import { BaseDbModel, EFilterTypes, MappedApiError, MappedApiResponseRaw } from '@sftech/ng-shared';
7
+ import { map, catchError, of, Observable } from 'rxjs';
8
+ import { AdminGuard } from '@sftech/ng-auth';
7
9
 
8
10
  // biome-ignore lint/complexity/noStaticOnlyClass: <explanation>
9
11
  class OrchestratorConfigMapper {
@@ -25,25 +27,70 @@ class OrchestratorConfigMapper {
25
27
 
26
28
  const ORCHESTRATOR_CONFIGURATION = new InjectionToken('ORCHESTRATOR_CONFIGURATION');
27
29
 
28
- class LlmResponse {
30
+ class ChatMessage extends BaseDbModel {
29
31
  message;
30
- tokens;
31
- static fromDto(dto) {
32
- const model = new LlmResponse();
33
- model.message = dto.message;
34
- model.tokens = dto.tokens ? LlmTokens.fromDto(dto.tokens) : undefined;
35
- return model;
32
+ messageType;
33
+ chatId;
34
+ chat;
35
+ fromDto(dto) {
36
+ const obj = new ChatMessage();
37
+ obj.id = dto.id;
38
+ obj.createdAt = dto.createdAt;
39
+ obj.message = dto.message;
40
+ obj.messageType = dto.messageType;
41
+ obj.chatId = dto.chatId;
42
+ return obj;
36
43
  }
37
44
  }
38
- class LlmTokens {
39
- input;
40
- output;
41
- total;
42
- static fromDto(dto) {
43
- const model = new LlmTokens();
44
- model.input = dto.input;
45
- model.output = dto.output;
46
- model.total = dto.total;
45
+
46
+ class Chat extends BaseDbModel {
47
+ messages = [];
48
+ agentId;
49
+ fromDto(dto) {
50
+ const obj = new Chat();
51
+ obj.id = dto.id;
52
+ obj.createdAt = dto.createdAt;
53
+ obj.agentId = dto.agentId;
54
+ obj.messages = dto.messages.map((dto) => new ChatMessage().fromDto(dto));
55
+ return obj;
56
+ }
57
+ }
58
+
59
+ class AgentRun extends BaseDbModel {
60
+ status;
61
+ step;
62
+ startedAt;
63
+ endedAt;
64
+ agentId;
65
+ agent;
66
+ chatId;
67
+ chat;
68
+ propertiesToShow = ['status', 'step', 'startedAt', 'endedAt'];
69
+ propertyUINames = new Map([
70
+ ['status', 'Status'],
71
+ ['step', 'Schritt'],
72
+ ['startedAt', 'Start'],
73
+ ['endedAt', 'Ende'],
74
+ ]);
75
+ propertyFilterType = new Map([
76
+ ['status', EFilterTypes.STRING],
77
+ ['step', EFilterTypes.STRING],
78
+ ['startedAt', EFilterTypes.DATE],
79
+ ['endedAt', EFilterTypes.DATE],
80
+ ]);
81
+ fromDto(dto) {
82
+ const model = new AgentRun();
83
+ model.id = dto.id;
84
+ model.createdAt = new Date(dto.createdAt);
85
+ model.agentId = dto.agentId;
86
+ model.chatId = dto.chatId;
87
+ model.status = dto.status;
88
+ model.startedAt = dto.startedAt;
89
+ model.endedAt = dto.endedAt;
90
+ model.step = dto.step;
91
+ if (dto.chat) {
92
+ model.chat = new Chat().fromDto(dto.chat);
93
+ }
47
94
  return model;
48
95
  }
49
96
  }
@@ -61,29 +108,44 @@ class McpTool {
61
108
  }
62
109
  }
63
110
 
64
- class OrcherstratorService {
111
+ class OrchestratorService {
65
112
  http;
113
+ zone;
66
114
  config;
67
- constructor(http, config) {
115
+ constructor(http, zone, config) {
68
116
  this.http = http;
117
+ this.zone = zone;
69
118
  this.config = config;
70
119
  }
71
120
  runAgent(runConfig) {
72
121
  const url = `${this.config.orchestratorUrl}/generic/run`;
73
122
  return this.http.post(url, runConfig).pipe(map((res) => {
74
- console.log(res);
75
- const apiResponse = new MappedApiResponseRaw();
76
- apiResponse.status = res.status;
77
- apiResponse.messages = res.messages ? res.messages : [];
78
- apiResponse.isError = false;
79
- apiResponse.data = LlmResponse.fromDto(res.data);
80
- return apiResponse;
123
+ return res.data;
124
+ }), catchError((err) => {
125
+ const error = new MappedApiError();
126
+ error.messages = err.messages ? err.messages : [];
127
+ return of(new MappedApiError());
81
128
  }));
82
129
  }
130
+ observeAgentRun(agentRunId) {
131
+ return new Observable((observer) => {
132
+ const eventSource = new EventSource(`${this.config.orchestratorUrl}/generic/stream/${agentRunId}`);
133
+ eventSource.onmessage = (event) => {
134
+ this.zone.run(() => {
135
+ const agentRun = new AgentRun();
136
+ observer.next(agentRun.fromDto(JSON.parse(event.data)));
137
+ });
138
+ };
139
+ eventSource.onerror = (error) => {
140
+ this.zone.run(() => observer.error(error));
141
+ };
142
+ // Cleanup, wenn unsubscribed wird
143
+ return () => eventSource.close();
144
+ });
145
+ }
83
146
  getTools() {
84
147
  const url = `${this.config.orchestratorUrl}/tools`;
85
148
  return this.http.get(url).pipe(map((res) => {
86
- console.log(res);
87
149
  const apiResponse = new MappedApiResponseRaw();
88
150
  apiResponse.status = res.status;
89
151
  apiResponse.messages = res.messages ? res.messages : [];
@@ -99,12 +161,12 @@ class OrcherstratorService {
99
161
  return of(error);
100
162
  }));
101
163
  }
102
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrcherstratorService, deps: [{ token: i1.HttpClient }, { token: ORCHESTRATOR_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
103
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrcherstratorService });
164
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorService, deps: [{ token: i1.HttpClient }, { token: i0.NgZone }, { token: ORCHESTRATOR_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
165
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorService });
104
166
  }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrcherstratorService, decorators: [{
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorService, decorators: [{
106
168
  type: Injectable
107
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
169
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i0.NgZone }, { type: undefined, decorators: [{
108
170
  type: Inject,
109
171
  args: [ORCHESTRATOR_CONFIGURATION]
110
172
  }] }] });
@@ -119,34 +181,36 @@ class OrchestratorModule {
119
181
  provide: ORCHESTRATOR_CONFIGURATION,
120
182
  useValue: OrchestratorConfigMapper.map(config),
121
183
  },
122
- OrcherstratorService,
184
+ OrchestratorService,
123
185
  ],
124
186
  };
125
187
  }
126
188
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
127
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
128
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, imports: [CommonModule] });
189
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, imports: [CommonModule, MarkdownModule] });
190
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, imports: [CommonModule, MarkdownModule] });
129
191
  }
130
192
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: OrchestratorModule, decorators: [{
131
193
  type: NgModule,
132
194
  args: [{
133
195
  declarations: [],
134
- imports: [CommonModule],
196
+ imports: [CommonModule, MarkdownModule],
135
197
  }]
136
198
  }] });
137
199
 
138
200
  const orchestratorRoutes = [
139
201
  {
140
202
  path: 'chats',
141
- loadChildren: () => import('./sftech-ng-orchestrator-chat.routes-BAF4OU_M.mjs').then(m => m.chatRoutes)
203
+ loadChildren: () => import('./sftech-ng-orchestrator-chats.routes-BLGhykMM.mjs').then((m) => m.chatsRoutes),
142
204
  },
143
205
  {
144
- path: 'prompts',
145
- loadChildren: () => import('./sftech-ng-orchestrator-prompts.routes-gyZH5vh-.mjs').then(m => m.promptsRoutes)
206
+ path: 'admin/prompts',
207
+ loadChildren: () => import('./sftech-ng-orchestrator-prompts.routes-DQZ_Hmjs.mjs').then((m) => m.promptsRoutes),
208
+ canActivate: [AdminGuard],
146
209
  },
147
210
  {
148
- path: 'agents',
149
- loadChildren: () => import('./sftech-ng-orchestrator-agents.routes-CnV8ngf_.mjs').then(m => m.agentsRoutes)
211
+ path: 'admin/agents',
212
+ loadChildren: () => import('./sftech-ng-orchestrator-agents.routes-B9GSWOIz.mjs').then((m) => m.agentsRoutes),
213
+ canActivate: [AdminGuard],
150
214
  },
151
215
  ];
152
216
 
@@ -154,5 +218,5 @@ const orchestratorRoutes = [
154
218
  * Generated bundle index. Do not edit.
155
219
  */
156
220
 
157
- export { OrcherstratorService as O, ORCHESTRATOR_CONFIGURATION as a, OrchestratorModule as b, orchestratorRoutes as o };
158
- //# sourceMappingURL=sftech-ng-orchestrator-sftech-ng-orchestrator-CICnJ35v.mjs.map
221
+ export { AgentRun as A, Chat as C, ORCHESTRATOR_CONFIGURATION as O, OrchestratorService as a, ChatMessage as b, OrchestratorModule as c, orchestratorRoutes as o };
222
+ //# sourceMappingURL=sftech-ng-orchestrator-sftech-ng-orchestrator-CJMmRHC-.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sftech-ng-orchestrator-sftech-ng-orchestrator-CJMmRHC-.mjs","sources":["../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/configuration/orchestrator-config.mapper.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/configuration/orchestrator-configuration.token.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/chat-message.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/chat.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/agent-run.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/mcp-tool.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/service/orchestrator.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 { IAppConfig } from '@sftech/ng-shared';\r\nimport { IOrchestratorConfig } from './orchestrator-config.interface';\r\n\r\n// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>\r\nexport class OrchestratorConfigMapper {\r\n public static map(config: IAppConfig): IOrchestratorConfig {\r\n return {\r\n orchestratorUrl: (config['ORCHESTRATOR_URL'] as string) ?? `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/orchestrator`,\r\n orchestratorDbUrl: (config['ORCHESTRATOR_DB_URL'] as string) ?? `${window.location.protocol}//${window.location.hostname}:${window.location.port}/api/orchestrator-db`,\r\n defaultConnectorUrl: config['DEFAULT_CONNECTOR_URL'] as string,\r\n defaultAnswerSpecification: config['DEFAULT_ANSWER_SPECIFICATION'] as string,\r\n defaultLlmProvider: config['DEFAULT_LLM_PROVIDER'] as string,\r\n defaultLlmModel: config['DEFAULT_LLM_MODEL'] as string,\r\n defaultLlmTemperature: config['DEFAULT_LLM_TEMPERATURE'] as number,\r\n defaultLlmTimeout: config['DEFAULT_LLM_TIMEOUT'] as number,\r\n defaultLlmRetries: config['DEFAULT_LLM_RETRIES'] as number,\r\n defaultLlmMaxTokens: config['DEFAULT_LLM_MAX_TOKENS'] as number,\r\n };\r\n }\r\n}\r\n","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 { BaseDbModel } from '@sftech/ng-shared';\r\nimport { IChatMessageResponseDto } from '../dtos/chat-message-response.dto';\r\nimport { Chat } from './chat.model';\r\n\r\nexport class ChatMessage extends BaseDbModel {\r\n public message!: string;\r\n\r\n public messageType!: string;\r\n\r\n public chatId!: number;\r\n\r\n public chat?: Chat;\r\n\r\n public override fromDto(dto: IChatMessageResponseDto): ChatMessage {\r\n const obj = new ChatMessage();\r\n obj.id = dto.id!;\r\n obj.createdAt = dto.createdAt!;\r\n\r\n obj.message = dto.message;\r\n obj.messageType = dto.messageType;\r\n obj.chatId = dto.chatId;\r\n return obj;\r\n }\r\n}\r\n","import { BaseDbModel } from '@sftech/ng-shared';\r\nimport { IChatMessageResponseDto } from '../dtos/chat-message-response.dto';\r\nimport { IChatResponseDto } from '../dtos/chat-response.dto';\r\nimport { ChatMessage } from './chat-message.model';\r\n\r\nexport class Chat extends BaseDbModel {\r\n public messages: ChatMessage[] = [];\r\n\r\n public agentId!: number;\r\n\r\n public override fromDto(dto: IChatResponseDto): Chat {\r\n const obj = new Chat();\r\n obj.id = dto.id!;\r\n obj.createdAt = dto.createdAt!;\r\n obj.agentId = dto.agentId;\r\n\r\n obj.messages = dto.messages.map((dto: IChatMessageResponseDto) => new ChatMessage().fromDto(dto));\r\n return obj;\r\n }\r\n}\r\n","import { BaseDbModel, EFilterTypes, IBaseDbResponseDto } from '@sftech/ng-shared';\r\nimport { IAgentResponseDto } from '../dtos/agent-response.dto';\r\nimport { IAgentRunResponseDto } from '../dtos/agent-run-response.dto';\r\nimport { IPromptHistoryResponseDto } from '../dtos/prompt-history-response.dto';\r\nimport { EAgentRunStatus } from '../enums/agent-run-status.enum';\r\nimport { Agent } from './agent.model';\r\nimport { Chat } from './chat.model';\r\nimport { PromptHistory } from './prompt-history.model';\r\nimport { Prompt } from './prompt.model';\r\n\r\nexport class AgentRun extends BaseDbModel {\r\n public status!: EAgentRunStatus;\r\n\r\n public step!: string;\r\n\r\n public startedAt?: Date;\r\n\r\n public endedAt?: Date;\r\n\r\n public agentId?: number;\r\n\r\n public agent?: Agent;\r\n\r\n public chatId?: number;\r\n\r\n public chat?: Chat;\r\n\r\n public override propertiesToShow = ['status', 'step', 'startedAt', 'endedAt'];\r\n\r\n public override propertyUINames = new Map<string, string>([\r\n ['status', 'Status'],\r\n ['step', 'Schritt'],\r\n ['startedAt', 'Start'],\r\n ['endedAt', 'Ende'],\r\n ]);\r\n\r\n public override propertyFilterType = new Map<string, EFilterTypes>([\r\n ['status', EFilterTypes.STRING],\r\n ['step', EFilterTypes.STRING],\r\n ['startedAt', EFilterTypes.DATE],\r\n ['endedAt', EFilterTypes.DATE],\r\n ]);\r\n\r\n public override fromDto(dto: IAgentRunResponseDto): AgentRun {\r\n const model = new AgentRun();\r\n model.id = dto.id;\r\n model.createdAt = new Date(dto.createdAt);\r\n model.agentId = dto.agentId;\r\n model.chatId = dto.chatId;\r\n model.status = dto.status;\r\n model.startedAt = dto.startedAt;\r\n model.endedAt = dto.endedAt;\r\n model.step = dto.step;\r\n\r\n if (dto.chat) {\r\n model.chat = new Chat().fromDto(dto.chat);\r\n }\r\n return model;\r\n }\r\n}\r\n","import {IMcpToolResponseDto} from \"../dtos/mcp-tool-response.dto\";\r\n\r\nexport class McpTool {\r\n name!: string;\r\n identifier!: string;\r\n desceription!: string;\r\n\r\n public static fromDto(dto: IMcpToolResponseDto): McpTool {\r\n const tool = new McpTool();\r\n tool.name = dto.name;\r\n tool.identifier = dto.identifier;\r\n tool.desceription = dto.description;\r\n return tool;\r\n }\r\n}","import { HttpClient } from '@angular/common/http';\r\nimport { Inject, Injectable, NgZone } from '@angular/core';\r\nimport { IApiResponse, MappedApiError, MappedApiResponseRaw } from '@sftech/ng-shared';\r\nimport { Observable, catchError, map, of } from 'rxjs';\r\nimport { IOrchestratorConfig } from '../configuration/orchestrator-config.interface';\r\nimport { ORCHESTRATOR_CONFIGURATION } from '../configuration/orchestrator-configuration.token';\r\nimport { IAgentRunResponseDto } from '../dtos/agent-run-response.dto';\r\nimport { IMcpToolResponseDto } from '../dtos/mcp-tool-response.dto';\r\nimport { IOrchestratorRunDto } from '../dtos/orchestrator-run.dto';\r\nimport { AgentRun } from '../models/agent-run.model';\r\nimport { McpTool } from '../models/mcp-tool.model';\r\n\r\n@Injectable()\r\nexport class OrchestratorService {\r\n public constructor(\r\n private readonly http: HttpClient,\r\n private readonly zone: NgZone,\r\n @Inject(ORCHESTRATOR_CONFIGURATION) private readonly config: IOrchestratorConfig,\r\n ) {}\r\n\r\n public runAgent(runConfig: IOrchestratorRunDto): Observable<MappedApiError | number> {\r\n const url = `${this.config.orchestratorUrl}/generic/run`;\r\n return this.http.post<IApiResponse<number>>(url, runConfig).pipe(\r\n map((res) => {\r\n return res.data as number;\r\n }),\r\n catchError((err) => {\r\n const error = new MappedApiError();\r\n error.messages = err.messages ? err.messages : [];\r\n return of(new MappedApiError());\r\n }),\r\n );\r\n }\r\n\r\n public observeAgentRun(agentRunId: number): Observable<MappedApiError | AgentRun> {\r\n return new Observable<AgentRun>((observer) => {\r\n const eventSource = new EventSource(`${this.config.orchestratorUrl}/generic/stream/${agentRunId}`);\r\n\r\n eventSource.onmessage = (event) => {\r\n this.zone.run(() => {\r\n const agentRun = new AgentRun();\r\n observer.next(agentRun.fromDto(JSON.parse(event.data) as IAgentRunResponseDto));\r\n });\r\n };\r\n\r\n eventSource.onerror = (error) => {\r\n this.zone.run(() => observer.error(error));\r\n };\r\n\r\n // Cleanup, wenn unsubscribed wird\r\n return () => eventSource.close();\r\n });\r\n }\r\n\r\n public getTools(): Observable<MappedApiResponseRaw<McpTool[]>> {\r\n const url = `${this.config.orchestratorUrl}/tools`;\r\n return this.http.get<IApiResponse<IMcpToolResponseDto[]>>(url).pipe(\r\n map((res) => {\r\n const apiResponse = new MappedApiResponseRaw<McpTool[]>();\r\n apiResponse.status = res.status;\r\n apiResponse.messages = res.messages ? res.messages : [];\r\n apiResponse.isError = false;\r\n apiResponse.data = (res.data as IMcpToolResponseDto[]).map((t) => McpTool.fromDto(t));\r\n return apiResponse;\r\n }),\r\n catchError((err) => {\r\n console.error('Error fetching tools:', err);\r\n const error = new MappedApiError();\r\n error.messages = err.messages ? err.messages : [];\r\n error.status = err.status ? err.status : 500;\r\n error.isError = true;\r\n return of(error);\r\n }),\r\n );\r\n }\r\n}\r\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { IAppConfig } from '@sftech/ng-shared';\r\nimport { OrchestratorConfigMapper } from './core/configuration/orchestrator-config.mapper';\r\nimport { ORCHESTRATOR_CONFIGURATION } from './core/configuration/orchestrator-configuration.token';\r\n\r\nimport { MarkdownModule } from 'ngx-markdown';\r\nimport { OrchestratorService } from './core/service/orchestrator.service';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [CommonModule, MarkdownModule],\r\n})\r\n// biome-ignore lint/complexity/noStaticOnlyClass: <explanation>\r\nexport class OrchestratorModule {\r\n public static forRoot(config: IAppConfig): ModuleWithProviders<OrchestratorModule> {\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 OrchestratorService,\r\n ],\r\n };\r\n }\r\n}\r\n","import { Route } from '@angular/router';\r\nimport { AdminGuard } from '@sftech/ng-auth';\r\n\r\nexport const orchestratorRoutes: Route[] = [\r\n {\r\n path: 'chats',\r\n loadChildren: () => import('./chats/chats.routes').then((m) => m.chatsRoutes),\r\n },\r\n {\r\n path: 'admin/prompts',\r\n loadChildren: () => import('./admin/prompts/prompts.routes').then((m) => m.promptsRoutes),\r\n canActivate: [AdminGuard],\r\n },\r\n {\r\n path: 'admin/agents',\r\n loadChildren: () => import('./admin/agents/agents.routes').then((m) => m.agentsRoutes),\r\n canActivate: [AdminGuard],\r\n },\r\n];\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAGA;MACa,wBAAwB,CAAA;IAC1B,OAAO,GAAG,CA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AACN,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;AAC1C,iBAAA;;;ACTY,MAAA,kBAAkB,GAAY;AACvC,IAAA;AACI,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,YAAY,EAAE,MAAM,OAAO,oDAAsB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC;AAChF,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,YAAY,EAAE,MAAM,OAAO,sDAAgC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,aAAa,CAAC;QACzF,WAAW,EAAE,CAAC,UAAU,CAAC;AAC5B,KAAA;AACD,IAAA;AACI,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,YAAY,EAAE,MAAM,OAAO,qDAA8B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC;QACtF,WAAW,EAAE,CAAC,UAAU,CAAC;AAC5B,KAAA;;;ACjBL;;AAEG;;;;"}
@@ -1,2 +1,2 @@
1
- export { b as OrchestratorModule, o as orchestratorRoutes } from './sftech-ng-orchestrator-sftech-ng-orchestrator-CICnJ35v.mjs';
1
+ export { c as OrchestratorModule, o as orchestratorRoutes } from './sftech-ng-orchestrator-sftech-ng-orchestrator-CJMmRHC-.mjs';
2
2
  //# sourceMappingURL=sftech-ng-orchestrator.mjs.map
@@ -2,18 +2,18 @@ import { OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { BaseDisplayComponent } from '@sftech/ng-shared';
4
4
  import { DialogService } from 'primeng/dynamicdialog';
5
- import { McpTool } from '../../../../core/models/mcp-tool.model';
6
- import { OrcherstratorService } from '../../../../core/service/orcherstrator.service';
7
- import { IAgentCreateDto } from '../../../core/dtos/agent-create-request.dto';
8
- import { IAgentResponseDto } from '../../../core/dtos/agent-response.dto';
9
- import { IAgentUpdateDto } from '../../../core/dtos/agent-update-request.dto';
10
- import { Agent } from '../../../core/models/agent.model';
11
- import { AgentService } from '../../../core/services/agent.service';
5
+ import { IAgentCreateDto } from '../../../../../core/dtos/agent-create-request.dto';
6
+ import { IAgentResponseDto } from '../../../../../core/dtos/agent-response.dto';
7
+ import { IAgentUpdateDto } from '../../../../../core/dtos/agent-update-request.dto';
8
+ import { Agent } from '../../../../../core/models/agent.model';
9
+ import { McpTool } from '../../../../../core/models/mcp-tool.model';
10
+ import { AgentService } from '../../../../../core/service/agent.service';
11
+ import { OrchestratorService } from '../../../../../core/service/orchestrator.service';
12
12
  import * as i0 from "@angular/core";
13
13
  export declare class AgentDisplayComponent extends BaseDisplayComponent<Agent, IAgentUpdateDto, IAgentUpdateDto, IAgentResponseDto> implements OnInit {
14
14
  protected _repo: AgentService;
15
15
  protected _route: string;
16
- protected _orchestratorService: OrcherstratorService;
16
+ protected _orchestratorService: OrchestratorService;
17
17
  tools: import("@angular/core").WritableSignal<McpTool[] | undefined>;
18
18
  protected dialog: DialogService;
19
19
  private _options;
@@ -1,8 +1,8 @@
1
1
  import { BaseListComponent, IconProvider } from '@sftech/ng-shared';
2
- import { IAgentResponseDto } from '../../../core/dtos/agent-response.dto';
3
- import { IAgentUpdateDto } from '../../../core/dtos/agent-update-request.dto';
4
- import { Agent } from '../../../core/models/agent.model';
5
- import { AgentService } from '../../../core/services/agent.service';
2
+ import { IAgentResponseDto } from '../../../../../core/dtos/agent-response.dto';
3
+ import { IAgentUpdateDto } from '../../../../../core/dtos/agent-update-request.dto';
4
+ import { Agent } from '../../../../../core/models/agent.model';
5
+ import { AgentService } from '../../../../../core/service/agent.service';
6
6
  import { AgentDisplayComponent } from '../agent-display/agent-display.component';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class AgentsListComponent extends BaseListComponent<Agent, IAgentUpdateDto, IAgentUpdateDto, IAgentResponseDto> {
@@ -1,9 +1,9 @@
1
1
  import { FormGroup } from '@angular/forms';
2
2
  import { BaseDisplayComponent, OData } from '@sftech/ng-shared';
3
- import { IPromptResponseDto } from '../../../core/dtos/prompt-request.dto';
4
- import { IPromptUpdateDto } from '../../../core/dtos/prompt-update.dto';
5
- import { Prompt } from '../../../core/models/prompt.model';
6
- import { PromptService } from '../../../core/services/prompt.service';
3
+ import { IPromptResponseDto } from '../../../../../core/dtos/prompt-request.dto';
4
+ import { IPromptUpdateDto } from '../../../../../core/dtos/prompt-update.dto';
5
+ import { Prompt } from '../../../../../core/models/prompt.model';
6
+ import { PromptService } from '../../../../../core/service/prompt.service';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class PromptDisplayComponent extends BaseDisplayComponent<Prompt, IPromptUpdateDto, IPromptUpdateDto, IPromptResponseDto> {
9
9
  protected _repo: PromptService;
@@ -1,8 +1,8 @@
1
1
  import { BaseListComponent, IconProvider } from '@sftech/ng-shared';
2
- import { IPromptResponseDto } from '../../../core/dtos/prompt-request.dto';
3
- import { IPromptUpdateDto } from '../../../core/dtos/prompt-update.dto';
4
- import { Prompt } from '../../../core/models/prompt.model';
5
- import { PromptService } from '../../../core/services/prompt.service';
2
+ import { IPromptResponseDto } from '../../../../../core/dtos/prompt-request.dto';
3
+ import { IPromptUpdateDto } from '../../../../../core/dtos/prompt-update.dto';
4
+ import { Prompt } from '../../../../../core/models/prompt.model';
5
+ import { PromptService } from '../../../../../core/service/prompt.service';
6
6
  import { PromptDisplayComponent } from '../prompt-display/prompt-display.component';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class PromptsListComponent extends BaseListComponent<Prompt, IPromptUpdateDto, IPromptUpdateDto, IPromptResponseDto> {
@@ -1,11 +1,11 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
3
  import { BaseDisplayComponent } from '@sftech/ng-shared';
4
- import { IPromptHistoryCreateDto } from '../../../core/dtos/prompt-history-create.dto';
5
- import { IPromptHistoryResponseDto } from '../../../core/dtos/prompt-history-response.dto';
6
- import { IPromptHistoryUpdateDto } from '../../../core/dtos/prompt-history-update.dto';
7
- import { PromptHistory } from '../../../core/models/prompt-history.model';
8
- import { PromptHistoryService } from '../../../core/services/prompt-history.service';
4
+ import { IPromptHistoryCreateDto } from '../../../../../core/dtos/prompt-history-create.dto';
5
+ import { IPromptHistoryResponseDto } from '../../../../../core/dtos/prompt-history-response.dto';
6
+ import { IPromptHistoryUpdateDto } from '../../../../../core/dtos/prompt-history-update.dto';
7
+ import { PromptHistory } from '../../../../../core/models/prompt-history.model';
8
+ import { PromptHistoryService } from '../../../../../core/service/prompt-history.service';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class PromptHistoryDisplayComponent extends BaseDisplayComponent<PromptHistory, IPromptHistoryCreateDto, IPromptHistoryUpdateDto, IPromptHistoryResponseDto> implements OnInit {
11
11
  protected _repo: PromptHistoryService;
@@ -1,10 +1,10 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { BaseListComponent } from '@sftech/ng-shared';
3
- import { IPromptHistoryCreateDto } from '../../../core/dtos/prompt-history-create.dto';
4
- import { IPromptHistoryResponseDto } from '../../../core/dtos/prompt-history-response.dto';
5
- import { IPromptHistoryUpdateDto } from '../../../core/dtos/prompt-history-update.dto';
6
- import { PromptHistory } from '../../../core/models/prompt-history.model';
7
- import { PromptHistoryService } from '../../../core/services/prompt-history.service';
3
+ import { IPromptHistoryCreateDto } from '../../../../../core/dtos/prompt-history-create.dto';
4
+ import { IPromptHistoryResponseDto } from '../../../../../core/dtos/prompt-history-response.dto';
5
+ import { IPromptHistoryUpdateDto } from '../../../../../core/dtos/prompt-history-update.dto';
6
+ import { PromptHistory } from '../../../../../core/models/prompt-history.model';
7
+ import { PromptHistoryService } from '../../../../../core/service/prompt-history.service';
8
8
  import { PromptHistoryDisplayComponent } from '../prompt-history-display/prompt-history-display.component';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class PromptHistoryListComponent extends BaseListComponent<PromptHistory, IPromptHistoryCreateDto, IPromptHistoryUpdateDto, IPromptHistoryResponseDto> implements OnInit {
@@ -0,0 +1,11 @@
1
+ import { AgentRunIconTextDataprovider } from '../../core/dataprovider/agent-run-icon-text.dataprovider';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AgentChatMessageComponent {
4
+ message: import("@angular/core").InputSignal<string>;
5
+ type: import("@angular/core").InputSignal<string>;
6
+ iconTextMapper: typeof AgentRunIconTextDataprovider;
7
+ extractJson(message: string): string;
8
+ private _toMarkdownFromJson;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgentChatMessageComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgentChatMessageComponent, "sftech-agent-chat-message", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,20 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { FormGroup } from '@angular/forms';
3
+ import { AgentRunIconTextDataprovider } from 'libs/ng-orchestrator/src/lib/ng-orchestrator/chats/core/dataprovider/agent-run-icon-text.dataprovider';
4
+ import { MessageService } from 'primeng/api';
5
+ import { Agent } from '../../../core/models/agent.model';
6
+ import { OrchestratorService } from '../../../core/service/orchestrator.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class AgentChatMessageHumanInputComponent {
9
+ agent: import("@angular/core").InputSignal<Agent | undefined>;
10
+ agentRunIdReceived: EventEmitter<number>;
11
+ messageService: MessageService;
12
+ orchestratorService: OrchestratorService;
13
+ form: FormGroup<{}>;
14
+ private _agentChanged$;
15
+ protected readonly iconTextMapper: typeof AgentRunIconTextDataprovider;
16
+ run(): void;
17
+ getInputFormControlNames(): string[];
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgentChatMessageHumanInputComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgentChatMessageHumanInputComponent, "sftech-agent-chat-message-human-input", never, { "agent": { "alias": "agent"; "required": false; "isSignal": true; }; }, { "agentRunIdReceived": "agentRunIdReceived"; }, never, never, true, never>;
20
+ }
@@ -0,0 +1,44 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
+ import { IconProvider } from '@sftech/ng-shared';
4
+ import { MessageService } from 'primeng/api';
5
+ import { Subscription } from 'rxjs';
6
+ import { EAgentRunStatus } from '../../core/enums/agent-run-status.enum';
7
+ import { AgentRun } from '../../core/models/agent-run.model';
8
+ import { Agent } from '../../core/models/agent.model';
9
+ import { AgentRunService } from '../../core/service/agent-run.service';
10
+ import { AgentService } from '../../core/service/agent.service';
11
+ import { ChatService } from '../../core/service/chat.service';
12
+ import { OrchestratorService } from '../../core/service/orchestrator.service';
13
+ import { AgentRunIconTextDataprovider } from '../core/dataprovider/agent-run-icon-text.dataprovider';
14
+ import * as i0 from "@angular/core";
15
+ export declare class AgentChatComponent implements OnInit, OnDestroy {
16
+ protected readonly activeRoute: ActivatedRoute;
17
+ protected readonly router: Router;
18
+ protected readonly agentService: AgentService;
19
+ protected readonly agentRunService: AgentRunService;
20
+ protected readonly chatService: ChatService;
21
+ protected readonly orchestratorService: OrchestratorService;
22
+ protected readonly messageService: MessageService;
23
+ protected agent: Agent;
24
+ protected readonly agentRuns: import("@angular/core").WritableSignal<AgentRun[] | undefined>;
25
+ protected selectedAgentRun: import("@angular/core").WritableSignal<AgentRun | undefined>;
26
+ protected selectedAgent: import("@angular/core").WritableSignal<Agent | undefined>;
27
+ iconProvider: typeof IconProvider;
28
+ iconTextMapper: typeof AgentRunIconTextDataprovider;
29
+ agentRunStatus: typeof EAgentRunStatus;
30
+ subscriptions: Subscription[];
31
+ protected selectedAgentRunChanged$: import("@angular/core").EffectRef;
32
+ loading: import("@angular/core").Signal<boolean>;
33
+ ngOnInit(): void;
34
+ ngOnDestroy(): void;
35
+ startNewRun(): void;
36
+ selectAgentRun(agentRun: AgentRun): void;
37
+ startObservingAgentRun(agentRunId: number): void;
38
+ goBack(): void;
39
+ private _loadChat;
40
+ private _setRelativeUrl;
41
+ private _mapUpdateOnAgentRun;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgentChatComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgentChatComponent, "sftech-agent-chat", never, {}, {}, never, never, true, never>;
44
+ }
@@ -0,0 +1,22 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseListComponent, IconProvider } from '@sftech/ng-shared';
3
+ import { MessageService } from 'primeng/api';
4
+ import { IAgentCreateDto } from '../../core/dtos/agent-create-request.dto';
5
+ import { IAgentResponseDto } from '../../core/dtos/agent-response.dto';
6
+ import { Agent } from '../../core/models/agent.model';
7
+ import { McpTool } from '../../core/models/mcp-tool.model';
8
+ import { AgentService } from '../../core/service/agent.service';
9
+ import { OrchestratorService } from '../../core/service/orchestrator.service';
10
+ import * as i0 from "@angular/core";
11
+ export declare class AgentSelectionComponent extends BaseListComponent<Agent, IAgentCreateDto, IAgentCreateDto, IAgentResponseDto> implements OnInit {
12
+ protected _repo: AgentService;
13
+ protected _route: string;
14
+ protected orchestratorService: OrchestratorService;
15
+ protected messageService: MessageService;
16
+ protected iconProvider: typeof IconProvider;
17
+ tools: import("@angular/core").WritableSignal<McpTool[] | undefined>;
18
+ ngOnInit(): void;
19
+ getToolNames(agent: Agent): string;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<AgentSelectionComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<AgentSelectionComponent, "sftech-agent-selection", never, {}, {}, never, never, true, never>;
22
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ChatsComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<ChatsComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChatsComponent, "sftech-chats", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,16 @@
1
+ import { AuthenticationGuard } from '@sftech/ng-auth';
2
+ import { AgentChatComponent } from './agent-chat/agent-chat.component';
3
+ import { AgentSelectionComponent } from './agent-selection/agent-selection.component';
4
+ import { ChatsComponent } from './chats.component';
5
+ export declare const chatsRoutes: {
6
+ path: string;
7
+ component: typeof ChatsComponent;
8
+ children: ({
9
+ path: string;
10
+ component: typeof AgentSelectionComponent;
11
+ } | {
12
+ path: string;
13
+ component: typeof AgentChatComponent;
14
+ })[];
15
+ canActivate: (typeof AuthenticationGuard)[];
16
+ }[];
@@ -0,0 +1,9 @@
1
+ import { IconDefinition } from '@fortawesome/angular-fontawesome';
2
+ import { EAgentRunStatus } from '../../../core/enums/agent-run-status.enum';
3
+ export declare class AgentRunIconTextDataprovider {
4
+ private static readonly UNKNOWN_TEXT;
5
+ static getTextForStatus(status: EAgentRunStatus | undefined): string;
6
+ static getIconForStatus(status: EAgentRunStatus | undefined): IconDefinition;
7
+ static getIconClassesForStatus(status: EAgentRunStatus | undefined): string;
8
+ static getIconForMessageType(messageType: string): IconDefinition;
9
+ }
@@ -0,0 +1,13 @@
1
+ import { IconProvider } from '@sftech/ng-shared';
2
+ export declare class OrchestratorIconProvider extends IconProvider {
3
+ static readonly agentRunStatusInit: import("@fortawesome/fontawesome-common-types").IconDefinition;
4
+ static readonly agentRunStatusRunning: import("@fortawesome/fontawesome-common-types").IconDefinition;
5
+ static readonly agentRunStatusCompleted: import("@fortawesome/fontawesome-common-types").IconDefinition;
6
+ static readonly agentRunStatusFailed: import("@fortawesome/fontawesome-common-types").IconDefinition;
7
+ static readonly agentRunStatusPrerun: import("@fortawesome/fontawesome-common-types").IconDefinition;
8
+ static readonly agentRunStatusPostrun: import("@fortawesome/fontawesome-common-types").IconDefinition;
9
+ static readonly agentRunStatusClarify: import("@fortawesome/fontawesome-common-types").IconDefinition;
10
+ static readonly messageTypeAI: import("@fortawesome/fontawesome-common-types").IconDefinition;
11
+ static readonly messageTypeHuman: import("@fortawesome/fontawesome-common-types").IconDefinition;
12
+ static readonly messageTypeSystem: import("@fortawesome/fontawesome-common-types").IconDefinition;
13
+ }
@@ -1,5 +1,5 @@
1
1
  import { IBaseDbResponseDto } from '@sftech/ng-shared';
2
- import { IPromptHistoryResponseDto } from '../../../prompts/core/dtos/prompt-history-response.dto';
2
+ import { IPromptHistoryResponseDto } from './prompt-history-response.dto';
3
3
  export interface IAgentResponseDto extends IBaseDbResponseDto {
4
4
  identifier: string;
5
5
  description: string;
@@ -0,0 +1,3 @@
1
+ import { IBaseDbCreateDto } from '@sftech/ng-shared';
2
+ export interface IAgentRunCreateRequestDto extends IBaseDbCreateDto {
3
+ }
@@ -0,0 +1,12 @@
1
+ import { IBaseDbResponseDto } from '@sftech/ng-shared';
2
+ import { EAgentRunStatus } from '../enums/agent-run-status.enum';
3
+ import { IChatResponseDto } from './chat-response.dto';
4
+ export interface IAgentRunResponseDto extends IBaseDbResponseDto {
5
+ status: EAgentRunStatus;
6
+ step: string;
7
+ startedAt?: Date;
8
+ endedAt?: Date;
9
+ agentId?: number;
10
+ chatId?: number;
11
+ chat?: IChatResponseDto;
12
+ }
@@ -0,0 +1,4 @@
1
+ import { IBaseDbCreateDto } from '@sftech/ng-shared';
2
+ export interface IChatCreateRequestDto extends IBaseDbCreateDto {
3
+ agentId: number;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { IBaseDbResponseDto } from '@sftech/ng-shared';
2
+ export interface IChatMessageResponseDto extends IBaseDbResponseDto {
3
+ message: string;
4
+ messageType: string;
5
+ chatId: number;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { IBaseDbResponseDto } from '@sftech/ng-shared';
2
+ import { IChatMessageResponseDto } from './chat-message-response.dto';
3
+ export interface IChatResponseDto extends IBaseDbResponseDto {
4
+ messages: IChatMessageResponseDto[];
5
+ agentId: number;
6
+ }
@@ -0,0 +1,3 @@
1
+ import { IBaseDbUpdateDto } from '@sftech/ng-shared';
2
+ export interface IChatUpdateRequestDto extends IBaseDbUpdateDto {
3
+ }
@@ -0,0 +1,9 @@
1
+ export declare enum EAgentRunStatus {
2
+ INIT = "init",
3
+ PRERUNNING = "pre_running",
4
+ RUNNING = "running",
5
+ POSTRUNNING = "post_running",
6
+ CLARIFICATION_NEEDED = "clarification_needed",
7
+ COMPLETED = "completed",
8
+ FAILED = "failed"
9
+ }