@sftech/ng-orchestrator 0.0.13 → 0.0.14

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 (23) hide show
  1. package/fesm2022/{sftech-ng-orchestrator-agent.service-B1eDDbBp.mjs → sftech-ng-orchestrator-agent.service-BI5zPQT-.mjs} +3 -6
  2. package/fesm2022/sftech-ng-orchestrator-agent.service-BI5zPQT-.mjs.map +1 -0
  3. package/fesm2022/{sftech-ng-orchestrator-agents.routes-DMY81ODI.mjs → sftech-ng-orchestrator-agents.routes-CnV8ngf_.mjs} +6 -10
  4. package/fesm2022/sftech-ng-orchestrator-agents.routes-CnV8ngf_.mjs.map +1 -0
  5. package/fesm2022/{sftech-ng-orchestrator-chat.routes-VZLqUmet.mjs → sftech-ng-orchestrator-chat.routes-BAF4OU_M.mjs} +4 -4
  6. package/fesm2022/{sftech-ng-orchestrator-chat.routes-VZLqUmet.mjs.map → sftech-ng-orchestrator-chat.routes-BAF4OU_M.mjs.map} +1 -1
  7. package/fesm2022/{sftech-ng-orchestrator-prompt-display.component-Cs98Is_J.mjs → sftech-ng-orchestrator-prompt-display.component-Dr3YvhU-.mjs} +2 -2
  8. package/fesm2022/{sftech-ng-orchestrator-prompt-display.component-Cs98Is_J.mjs.map → sftech-ng-orchestrator-prompt-display.component-Dr3YvhU-.mjs.map} +1 -1
  9. package/fesm2022/{sftech-ng-orchestrator-prompt.service-5pF5b4ys.mjs → sftech-ng-orchestrator-prompt.service-CkWDxT-Y.mjs} +2 -2
  10. package/fesm2022/{sftech-ng-orchestrator-prompt.service-5pF5b4ys.mjs.map → sftech-ng-orchestrator-prompt.service-CkWDxT-Y.mjs.map} +1 -1
  11. package/fesm2022/{sftech-ng-orchestrator-prompts.routes-C_K_TNaw.mjs → sftech-ng-orchestrator-prompts.routes-gyZH5vh-.mjs} +3 -3
  12. package/fesm2022/{sftech-ng-orchestrator-prompts.routes-C_K_TNaw.mjs.map → sftech-ng-orchestrator-prompts.routes-gyZH5vh-.mjs.map} +1 -1
  13. package/fesm2022/{sftech-ng-orchestrator-sftech-ng-orchestrator-BVqY_Vj9.mjs → sftech-ng-orchestrator-sftech-ng-orchestrator-CICnJ35v.mjs} +6 -6
  14. package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-CICnJ35v.mjs.map +1 -0
  15. package/fesm2022/sftech-ng-orchestrator.mjs +1 -1
  16. package/lib/ng-orchestrator/agents/core/dtos/agent-create-request.dto.d.ts +0 -1
  17. package/lib/ng-orchestrator/agents/core/dtos/agent-response.dto.d.ts +1 -2
  18. package/lib/ng-orchestrator/agents/core/dtos/agent-update-request.dto.d.ts +0 -1
  19. package/lib/ng-orchestrator/agents/core/models/agent.model.d.ts +2 -3
  20. package/package.json +1 -1
  21. package/fesm2022/sftech-ng-orchestrator-agent.service-B1eDDbBp.mjs.map +0 -1
  22. package/fesm2022/sftech-ng-orchestrator-agents.routes-DMY81ODI.mjs.map +0 -1
  23. package/fesm2022/sftech-ng-orchestrator-sftech-ng-orchestrator-BVqY_Vj9.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"sftech-ng-orchestrator-sftech-ng-orchestrator-BVqY_Vj9.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/llm-response.model.ts","../../../../libs/ng-orchestrator/src/lib/ng-orchestrator/core/models/mcp-tool.model.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 { 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,\r\n orchestratorDbUrl: config['ORCHESTRATOR_DB_URL'] as string,\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 {ILlmResponseDto, ILlmTokensDto} from \"../dtos/llm-response.dto\";\r\n\r\nexport class LlmResponse {\r\n message!: string;\r\n tokens?: LlmTokens\r\n\r\n public static fromDto(dto: ILlmResponseDto): LlmResponse {\r\n const model = new LlmResponse();\r\n model.message = dto.message;\r\n model.tokens = dto.tokens ? LlmTokens.fromDto(dto.tokens) : undefined;\r\n return model;\r\n }\r\n}\r\n\r\nexport class LlmTokens {\r\n public input!: number;\r\n public output!: number;\r\n public total!: number;\r\n\r\n public static fromDto(dto: ILlmTokensDto): LlmTokens {\r\n const model = new LlmTokens();\r\n model.input = dto.input;\r\n model.output = dto.output;\r\n model.total = dto.total;\r\n return model;\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 } from '@angular/core';\r\nimport {IApiResponse, MappedApiError, MappedApiResponse, 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 { ILlmResponseDto } from '../dtos/llm-response.dto';\r\nimport { IMcpToolResponseDto } from '../dtos/mcp-tool-response.dto';\r\nimport { IOrchestratorRunDto } from '../dtos/orchestrator-run.dto';\r\nimport { LlmResponse } from '../models/llm-response.model';\r\nimport {McpTool} from \"../models/mcp-tool.model\";\r\n\r\n@Injectable()\r\nexport class OrcherstratorService {\r\n public constructor(\r\n private readonly http: HttpClient,\r\n @Inject(ORCHESTRATOR_CONFIGURATION) private readonly config: IOrchestratorConfig,\r\n ) {}\r\n\r\n public runAgent(runConfig: IOrchestratorRunDto): Observable<MappedApiResponseRaw<LlmResponse>> {\r\n const url = `${this.config.orchestratorUrl}/generic/run`;\r\n return this.http.post<IApiResponse<ILlmResponseDto>>(url, runConfig).pipe(\r\n map((res) => {\r\n console.log(res);\r\n const apiResponse = new MappedApiResponseRaw<LlmResponse>();\r\n apiResponse.status = res.status;\r\n apiResponse.messages = res.messages ? res.messages : [];\r\n apiResponse.isError = false;\r\n apiResponse.data = LlmResponse.fromDto(res.data as ILlmResponseDto);\r\n return apiResponse;\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 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 console.log(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\nimport { OrcherstratorService } from './core/service/orcherstrator.service';\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [CommonModule],\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 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":";;;;;;;AAGA;MACa,wBAAwB,CAAA;IAC1B,OAAO,GAAG,CAAC,MAAkB,EAAA;QAChC,OAAO;AACH,YAAA,eAAe,EAAE,MAAM,CAAC,kBAAkB,CAAW;AACrD,YAAA,iBAAiB,EAAE,MAAM,CAAC,qBAAqB,CAAW;AAC1D,YAAA,mBAAmB,EAAE,MAAM,CAAC,uBAAuB,CAAW;AAC9D,YAAA,0BAA0B,EAAE,MAAM,CAAC,8BAA8B,CAAW;AAC5E,YAAA,kBAAkB,EAAE,MAAM,CAAC,sBAAsB,CAAW;AAC5D,YAAA,eAAe,EAAE,MAAM,CAAC,mBAAmB,CAAW;AACtD,YAAA,qBAAqB,EAAE,MAAM,CAAC,yBAAyB,CAAW;AAClE,YAAA,iBAAiB,EAAE,MAAM,CAAC,qBAAqB,CAAW;AAC1D,YAAA,iBAAiB,EAAE,MAAM,CAAC,qBAAqB,CAAW;AAC1D,YAAA,mBAAmB,EAAE,MAAM,CAAC,wBAAwB,CAAW;SAClE;;AAER;;MChBY,0BAA0B,GAAG,IAAI,cAAc,CAAsB,4BAA4B;;MCDjG,WAAW,CAAA;AACpB,IAAA,OAAO;AACP,IAAA,MAAM;IAEC,OAAO,OAAO,CAAC,GAAoB,EAAA;AACtC,QAAA,MAAM,KAAK,GAAG,IAAI,WAAW,EAAE;AAC/B,QAAA,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO;QAC3B,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS;AACrE,QAAA,OAAO,KAAK;;AAEnB;MAEY,SAAS,CAAA;AACX,IAAA,KAAK;AACL,IAAA,MAAM;A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