@fluxo-dev/api-client-base 25.3.2 → 25.3.4
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/index.cjs.js +339 -8
- package/package.json +2 -2
- package/src/index.d.ts +1 -0
- package/src/lib/ai/ai.service.d.ts +148 -0
- package/src/lib/ai/index.d.ts +2 -0
- package/src/lib/ai/models/agent.d.ts +21 -0
- package/src/lib/ai/models/create-agent.d.ts +6 -0
- package/src/lib/ai/models/create-llm-settings.d.ts +17 -0
- package/src/lib/ai/models/create-mcp-server.d.ts +22 -0
- package/src/lib/ai/models/create-orchestration.d.ts +9 -0
- package/src/lib/ai/models/index.d.ts +12 -0
- package/src/lib/ai/models/llm-settings.d.ts +25 -0
- package/src/lib/ai/models/mcp-server.d.ts +38 -0
- package/src/lib/ai/models/orchestration.d.ts +27 -0
- package/src/lib/ai/models/update-agent.d.ts +6 -0
- package/src/lib/ai/models/update-llm-settings.d.ts +10 -0
- package/src/lib/ai/models/update-mcp-server.d.ts +20 -0
- package/src/lib/ai/models/update-orchestration.d.ts +9 -0
- package/src/lib/bi/models/dashboard-category.d.ts +1 -1
- package/src/lib/configuration/configuration.service.d.ts +0 -2
- package/src/lib/fluxo-client-interface.d.ts +2 -0
- package/src/lib/fluxo-client.d.ts +3 -0
- package/src/lib/reporting/models/update-report-command.d.ts +8 -0
- package/src/lib/reporting/reporting.service.d.ts +4 -0
package/index.cjs.js
CHANGED
|
@@ -4322,14 +4322,6 @@ class ConfigurationService {
|
|
|
4322
4322
|
getAllDomainRoleFrontends() {
|
|
4323
4323
|
return HttpClient$1.Instance().client.get(`client/frontend`);
|
|
4324
4324
|
}
|
|
4325
|
-
getMultisessionUserState() {
|
|
4326
|
-
return HttpClient$1.Instance().client.get('client/multisession');
|
|
4327
|
-
}
|
|
4328
|
-
setMultisessionUserState(state) {
|
|
4329
|
-
return HttpClient$1.Instance().client.post('client/multisession', {
|
|
4330
|
-
state
|
|
4331
|
-
});
|
|
4332
|
-
}
|
|
4333
4325
|
}
|
|
4334
4326
|
|
|
4335
4327
|
class UserService {
|
|
@@ -5242,6 +5234,9 @@ class ReportingService {
|
|
|
5242
5234
|
print(command) {
|
|
5243
5235
|
return HttpClient$1.Instance().client.post('reports/print', command);
|
|
5244
5236
|
}
|
|
5237
|
+
updateReport(reportId, command) {
|
|
5238
|
+
return HttpClient$1.Instance().client.put(`reports/${reportId}`, command);
|
|
5239
|
+
}
|
|
5245
5240
|
}
|
|
5246
5241
|
|
|
5247
5242
|
exports.PrinterType = void 0;
|
|
@@ -9822,6 +9817,334 @@ class SessionHubService {
|
|
|
9822
9817
|
}
|
|
9823
9818
|
}
|
|
9824
9819
|
|
|
9820
|
+
class AiService {
|
|
9821
|
+
/**
|
|
9822
|
+
* ========================================
|
|
9823
|
+
* LLM SETTINGS METHODS
|
|
9824
|
+
* ========================================
|
|
9825
|
+
*/
|
|
9826
|
+
/**
|
|
9827
|
+
* Lista tutte le configurazioni LLM
|
|
9828
|
+
*/
|
|
9829
|
+
getAllLLMSettings() {
|
|
9830
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9831
|
+
return HttpClient$1.Instance().client.get('/ai/management/llm');
|
|
9832
|
+
});
|
|
9833
|
+
}
|
|
9834
|
+
/**
|
|
9835
|
+
* Ottieni una configurazione specifica
|
|
9836
|
+
*/
|
|
9837
|
+
getLLMSettingsById(id) {
|
|
9838
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9839
|
+
return HttpClient$1.Instance().client.get(`/ai/management/llm/${id}`);
|
|
9840
|
+
});
|
|
9841
|
+
}
|
|
9842
|
+
/**
|
|
9843
|
+
* Crea una nuova configurazione LLM
|
|
9844
|
+
*/
|
|
9845
|
+
createLLMSettings(command) {
|
|
9846
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9847
|
+
return HttpClient$1.Instance().client.post('/ai/management/llm', command);
|
|
9848
|
+
});
|
|
9849
|
+
}
|
|
9850
|
+
/**
|
|
9851
|
+
* Aggiorna una configurazione esistente
|
|
9852
|
+
*/
|
|
9853
|
+
updateLLMSettings(id, command) {
|
|
9854
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9855
|
+
return HttpClient$1.Instance().client.put(`/ai/management/llm/${id}`, command);
|
|
9856
|
+
});
|
|
9857
|
+
}
|
|
9858
|
+
/**
|
|
9859
|
+
* Attiva una configurazione
|
|
9860
|
+
*/
|
|
9861
|
+
activateLLMSettings(id) {
|
|
9862
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9863
|
+
return HttpClient$1.Instance().client.post(`/ai/management/llm/${id}/activate`, {});
|
|
9864
|
+
});
|
|
9865
|
+
}
|
|
9866
|
+
/**
|
|
9867
|
+
* Disattiva una configurazione
|
|
9868
|
+
*/
|
|
9869
|
+
deactivateLLMSettings(id) {
|
|
9870
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9871
|
+
return HttpClient$1.Instance().client.post(`/ai/management/llm/${id}/deactivate`, {});
|
|
9872
|
+
});
|
|
9873
|
+
}
|
|
9874
|
+
/**
|
|
9875
|
+
* Elimina una configurazione
|
|
9876
|
+
*/
|
|
9877
|
+
deleteLLMSettings(id) {
|
|
9878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9879
|
+
return HttpClient$1.Instance().client.delete(`/ai/management/llm/${id}`);
|
|
9880
|
+
});
|
|
9881
|
+
}
|
|
9882
|
+
/**
|
|
9883
|
+
* ========================================
|
|
9884
|
+
* AGENT METHODS
|
|
9885
|
+
* ========================================
|
|
9886
|
+
*/
|
|
9887
|
+
/**
|
|
9888
|
+
* Lista tutti gli agenti
|
|
9889
|
+
*/
|
|
9890
|
+
getAllAgents() {
|
|
9891
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9892
|
+
return HttpClient$1.Instance().client.get('/ai/management/agent');
|
|
9893
|
+
});
|
|
9894
|
+
}
|
|
9895
|
+
/**
|
|
9896
|
+
* Ottieni un agente specifico
|
|
9897
|
+
*/
|
|
9898
|
+
getAgentById(id) {
|
|
9899
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9900
|
+
return HttpClient$1.Instance().client.get(`/ai/management/agent/${id}`);
|
|
9901
|
+
});
|
|
9902
|
+
}
|
|
9903
|
+
/**
|
|
9904
|
+
* Crea un nuovo agente
|
|
9905
|
+
*/
|
|
9906
|
+
createAgent(command) {
|
|
9907
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9908
|
+
return HttpClient$1.Instance().client.post('/ai/management/agent', command);
|
|
9909
|
+
});
|
|
9910
|
+
}
|
|
9911
|
+
/**
|
|
9912
|
+
* Aggiorna un agente esistente
|
|
9913
|
+
*/
|
|
9914
|
+
updateAgent(id, command) {
|
|
9915
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9916
|
+
return HttpClient$1.Instance().client.put(`/ai/management/agent/${id}`, command);
|
|
9917
|
+
});
|
|
9918
|
+
}
|
|
9919
|
+
/**
|
|
9920
|
+
* Attiva un agente
|
|
9921
|
+
*/
|
|
9922
|
+
activateAgent(id) {
|
|
9923
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9924
|
+
return HttpClient$1.Instance().client.post(`/ai/management/agent/${id}/activate`, {});
|
|
9925
|
+
});
|
|
9926
|
+
}
|
|
9927
|
+
/**
|
|
9928
|
+
* Disattiva un agente
|
|
9929
|
+
*/
|
|
9930
|
+
deactivateAgent(id) {
|
|
9931
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9932
|
+
return HttpClient$1.Instance().client.post(`/ai/management/agent/${id}/deactivate`, {});
|
|
9933
|
+
});
|
|
9934
|
+
}
|
|
9935
|
+
/**
|
|
9936
|
+
* Elimina un agente
|
|
9937
|
+
*/
|
|
9938
|
+
deleteAgent(id) {
|
|
9939
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9940
|
+
return HttpClient$1.Instance().client.delete(`/ai/management/agent/${id}`);
|
|
9941
|
+
});
|
|
9942
|
+
}
|
|
9943
|
+
/**
|
|
9944
|
+
* ========================================
|
|
9945
|
+
* ORCHESTRATION METHODS
|
|
9946
|
+
* ========================================
|
|
9947
|
+
*/
|
|
9948
|
+
/**
|
|
9949
|
+
* Lista tutte le orchestrazioni
|
|
9950
|
+
*/
|
|
9951
|
+
getAllOrchestrations() {
|
|
9952
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9953
|
+
return HttpClient$1.Instance().client.get('/ai/management/orchestration');
|
|
9954
|
+
});
|
|
9955
|
+
}
|
|
9956
|
+
/**
|
|
9957
|
+
* Ottieni un'orchestrazione specifica
|
|
9958
|
+
*/
|
|
9959
|
+
getOrchestrationById(id) {
|
|
9960
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9961
|
+
return HttpClient$1.Instance().client.get(`/ai/management/orchestration/${id}`);
|
|
9962
|
+
});
|
|
9963
|
+
}
|
|
9964
|
+
/**
|
|
9965
|
+
* Crea una nuova orchestrazione
|
|
9966
|
+
*/
|
|
9967
|
+
createOrchestration(command) {
|
|
9968
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9969
|
+
return HttpClient$1.Instance().client.post('/ai/management/orchestration', command);
|
|
9970
|
+
});
|
|
9971
|
+
}
|
|
9972
|
+
/**
|
|
9973
|
+
* Aggiorna un'orchestrazione esistente
|
|
9974
|
+
*/
|
|
9975
|
+
updateOrchestration(id, command) {
|
|
9976
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9977
|
+
return HttpClient$1.Instance().client.put(`/ai/management/orchestration/${id}`, command);
|
|
9978
|
+
});
|
|
9979
|
+
}
|
|
9980
|
+
/**
|
|
9981
|
+
* Attiva un'orchestrazione
|
|
9982
|
+
*/
|
|
9983
|
+
activateOrchestration(id) {
|
|
9984
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9985
|
+
return HttpClient$1.Instance().client.post(`/ai/management/orchestration/${id}/activate`, {});
|
|
9986
|
+
});
|
|
9987
|
+
}
|
|
9988
|
+
/**
|
|
9989
|
+
* Disattiva un'orchestrazione
|
|
9990
|
+
*/
|
|
9991
|
+
deactivateOrchestration(id) {
|
|
9992
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9993
|
+
return HttpClient$1.Instance().client.post(`/ai/management/orchestration/${id}/deactivate`, {});
|
|
9994
|
+
});
|
|
9995
|
+
}
|
|
9996
|
+
/**
|
|
9997
|
+
* Elimina un'orchestrazione
|
|
9998
|
+
*/
|
|
9999
|
+
deleteOrchestration(id) {
|
|
10000
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10001
|
+
return HttpClient$1.Instance().client.delete(`/ai/management/orchestration/${id}`);
|
|
10002
|
+
});
|
|
10003
|
+
}
|
|
10004
|
+
/**
|
|
10005
|
+
* ========================================
|
|
10006
|
+
* MCP SERVER METHODS
|
|
10007
|
+
* ========================================
|
|
10008
|
+
*/
|
|
10009
|
+
/**
|
|
10010
|
+
* Lista tutti i server MCP
|
|
10011
|
+
*/
|
|
10012
|
+
getAllMcpServers() {
|
|
10013
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10014
|
+
return HttpClient$1.Instance().client.get('/ai/management/mcp-server');
|
|
10015
|
+
});
|
|
10016
|
+
}
|
|
10017
|
+
/**
|
|
10018
|
+
* Ottieni un server MCP specifico
|
|
10019
|
+
*/
|
|
10020
|
+
getMcpServerById(id) {
|
|
10021
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10022
|
+
return HttpClient$1.Instance().client.get(`/ai/management/mcp-server/${id}`);
|
|
10023
|
+
});
|
|
10024
|
+
}
|
|
10025
|
+
/**
|
|
10026
|
+
* Crea un nuovo server MCP
|
|
10027
|
+
*/
|
|
10028
|
+
createMcpServer(command) {
|
|
10029
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10030
|
+
return HttpClient$1.Instance().client.post('/ai/management/mcp-server', command);
|
|
10031
|
+
});
|
|
10032
|
+
}
|
|
10033
|
+
/**
|
|
10034
|
+
* Aggiorna un server MCP esistente
|
|
10035
|
+
*/
|
|
10036
|
+
updateMcpServer(id, command) {
|
|
10037
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10038
|
+
return HttpClient$1.Instance().client.put(`/ai/management/mcp-server/${id}`, command);
|
|
10039
|
+
});
|
|
10040
|
+
}
|
|
10041
|
+
/**
|
|
10042
|
+
* Attiva un server MCP
|
|
10043
|
+
*/
|
|
10044
|
+
activateMcpServer(id) {
|
|
10045
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10046
|
+
return HttpClient$1.Instance().client.put(`/ai/management/mcp-server/${id}/activate`, {});
|
|
10047
|
+
});
|
|
10048
|
+
}
|
|
10049
|
+
/**
|
|
10050
|
+
* Disattiva un server MCP
|
|
10051
|
+
*/
|
|
10052
|
+
deactivateMcpServer(id) {
|
|
10053
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10054
|
+
return HttpClient$1.Instance().client.put(`/ai/management/mcp-server/${id}/deactivate`, {});
|
|
10055
|
+
});
|
|
10056
|
+
}
|
|
10057
|
+
/**
|
|
10058
|
+
* Elimina un server MCP
|
|
10059
|
+
*/
|
|
10060
|
+
deleteMcpServer(id) {
|
|
10061
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10062
|
+
return HttpClient$1.Instance().client.delete(`/ai/management/mcp-server/${id}`);
|
|
10063
|
+
});
|
|
10064
|
+
}
|
|
10065
|
+
/**
|
|
10066
|
+
* ========================================
|
|
10067
|
+
* AGENT-MCP ASSOCIATION METHODS
|
|
10068
|
+
* ========================================
|
|
10069
|
+
*/
|
|
10070
|
+
/**
|
|
10071
|
+
* Associa un server MCP ad un agente
|
|
10072
|
+
*/
|
|
10073
|
+
associateMcpServerToAgent(agentId, mcpServerId) {
|
|
10074
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10075
|
+
return HttpClient$1.Instance().client.post(`/ai/management/agent/${agentId}/mcp-server/${mcpServerId}`, {});
|
|
10076
|
+
});
|
|
10077
|
+
}
|
|
10078
|
+
/**
|
|
10079
|
+
* Rimuovi l'associazione tra un server MCP e un agente
|
|
10080
|
+
*/
|
|
10081
|
+
dissociateMcpServerFromAgent(agentId, mcpServerId) {
|
|
10082
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
10083
|
+
return HttpClient$1.Instance().client.delete(`/ai/management/agent/${agentId}/mcp-server/${mcpServerId}`);
|
|
10084
|
+
});
|
|
10085
|
+
}
|
|
10086
|
+
}
|
|
10087
|
+
|
|
10088
|
+
exports.LLMProviderType = void 0;
|
|
10089
|
+
(function (LLMProviderType) {
|
|
10090
|
+
LLMProviderType[LLMProviderType["OpenAI"] = 1] = "OpenAI";
|
|
10091
|
+
LLMProviderType[LLMProviderType["AzureOpenAI"] = 2] = "AzureOpenAI";
|
|
10092
|
+
LLMProviderType[LLMProviderType["Anthropic"] = 3] = "Anthropic";
|
|
10093
|
+
LLMProviderType[LLMProviderType["Ollama"] = 4] = "Ollama";
|
|
10094
|
+
LLMProviderType[LLMProviderType["Gemini"] = 5] = "Gemini";
|
|
10095
|
+
})(exports.LLMProviderType || (exports.LLMProviderType = {}));
|
|
10096
|
+
|
|
10097
|
+
exports.OrchestrationType = void 0;
|
|
10098
|
+
(function (OrchestrationType) {
|
|
10099
|
+
OrchestrationType[OrchestrationType["Sequential"] = 0] = "Sequential";
|
|
10100
|
+
OrchestrationType[OrchestrationType["Concurrent"] = 1] = "Concurrent";
|
|
10101
|
+
OrchestrationType[OrchestrationType["Handoff"] = 2] = "Handoff";
|
|
10102
|
+
OrchestrationType[OrchestrationType["GroupChat"] = 3] = "GroupChat";
|
|
10103
|
+
OrchestrationType[OrchestrationType["Magentic"] = 4] = "Magentic";
|
|
10104
|
+
OrchestrationType[OrchestrationType["Coordinator"] = 5] = "Coordinator";
|
|
10105
|
+
})(exports.OrchestrationType || (exports.OrchestrationType = {}));
|
|
10106
|
+
const orchestrationTypeLabels = {
|
|
10107
|
+
[exports.OrchestrationType.Sequential]: "Sequenziale",
|
|
10108
|
+
[exports.OrchestrationType.Concurrent]: "Concorrente",
|
|
10109
|
+
[exports.OrchestrationType.Handoff]: "Handoff",
|
|
10110
|
+
[exports.OrchestrationType.GroupChat]: "Group Chat",
|
|
10111
|
+
[exports.OrchestrationType.Magentic]: "Magentic One",
|
|
10112
|
+
[exports.OrchestrationType.Coordinator]: "Coordinator"
|
|
10113
|
+
};
|
|
10114
|
+
const orchestrationTypeDescriptions = {
|
|
10115
|
+
[exports.OrchestrationType.Sequential]: "L'output di un agente diventa input del successivo",
|
|
10116
|
+
[exports.OrchestrationType.Concurrent]: "Tutti gli agenti processano in parallelo",
|
|
10117
|
+
[exports.OrchestrationType.Handoff]: "Passaggio dinamico di controllo basato su regole/contesto",
|
|
10118
|
+
[exports.OrchestrationType.GroupChat]: "Conversazione di gruppo con manager coordinator",
|
|
10119
|
+
[exports.OrchestrationType.Magentic]: "Orchestrazione MagenticOne di Microsoft Research",
|
|
10120
|
+
[exports.OrchestrationType.Coordinator]: "Orchestrazione con pianificazione e coordinazione multi-step"
|
|
10121
|
+
};
|
|
10122
|
+
|
|
10123
|
+
/**
|
|
10124
|
+
* Enumerazione dei tipi di server MCP
|
|
10125
|
+
*/
|
|
10126
|
+
exports.McpServerType = void 0;
|
|
10127
|
+
(function (McpServerType) {
|
|
10128
|
+
/** Processo comunicante via stdin/stdout */
|
|
10129
|
+
McpServerType[McpServerType["Stdio"] = 0] = "Stdio";
|
|
10130
|
+
/** Server HTTP con Server-Sent Events */
|
|
10131
|
+
McpServerType[McpServerType["SSE"] = 1] = "SSE";
|
|
10132
|
+
})(exports.McpServerType || (exports.McpServerType = {}));
|
|
10133
|
+
/**
|
|
10134
|
+
* Enumerazione dei tipi di autenticazione MCP
|
|
10135
|
+
*/
|
|
10136
|
+
exports.McpAuthType = void 0;
|
|
10137
|
+
(function (McpAuthType) {
|
|
10138
|
+
/** Nessuna autenticazione */
|
|
10139
|
+
McpAuthType[McpAuthType["None"] = 0] = "None";
|
|
10140
|
+
/** API Key (header X-API-Key) */
|
|
10141
|
+
McpAuthType[McpAuthType["ApiKey"] = 1] = "ApiKey";
|
|
10142
|
+
/** Bearer Token OAuth/JWT */
|
|
10143
|
+
McpAuthType[McpAuthType["BearerToken"] = 2] = "BearerToken";
|
|
10144
|
+
/** Basic Authentication (username:password) */
|
|
10145
|
+
McpAuthType[McpAuthType["BasicAuth"] = 3] = "BasicAuth";
|
|
10146
|
+
})(exports.McpAuthType || (exports.McpAuthType = {}));
|
|
10147
|
+
|
|
9825
10148
|
class FluxoClientBase {
|
|
9826
10149
|
constructor() {
|
|
9827
10150
|
this._authenticationType = null;
|
|
@@ -9837,6 +10160,7 @@ class FluxoClientBase {
|
|
|
9837
10160
|
this._config = null;
|
|
9838
10161
|
this._ravify = null;
|
|
9839
10162
|
this._biFacade = null;
|
|
10163
|
+
this._ai = null;
|
|
9840
10164
|
this._sessionHub = null;
|
|
9841
10165
|
this._modules = [];
|
|
9842
10166
|
this.getBearerToken = () => {
|
|
@@ -9886,6 +10210,7 @@ class FluxoClientBase {
|
|
|
9886
10210
|
this._communicationFacade = new CommunicationFacade();
|
|
9887
10211
|
this._ravify = new RavifyFacade();
|
|
9888
10212
|
this._biFacade = new BiFacade();
|
|
10213
|
+
this._ai = new AiService();
|
|
9889
10214
|
this._sessionHub = new SessionHubService(config.fluxoInstanceBaseUrl, this.getBearerToken);
|
|
9890
10215
|
console.info('7) Sub services initialized');
|
|
9891
10216
|
if (setState) state.store.dispatch(state.setFluxoClientConfiguration(config));
|
|
@@ -9929,6 +10254,9 @@ class FluxoClientBase {
|
|
|
9929
10254
|
get bi() {
|
|
9930
10255
|
return this._biFacade;
|
|
9931
10256
|
}
|
|
10257
|
+
get ai() {
|
|
10258
|
+
return this._ai;
|
|
10259
|
+
}
|
|
9932
10260
|
get sessionHub() {
|
|
9933
10261
|
return this._sessionHub;
|
|
9934
10262
|
}
|
|
@@ -10234,6 +10562,7 @@ exports.RavifyEventStateType = void 0;
|
|
|
10234
10562
|
RavifyEventStateType[RavifyEventStateType["JobDeleted"] = 7] = "JobDeleted";
|
|
10235
10563
|
})(exports.RavifyEventStateType || (exports.RavifyEventStateType = {}));
|
|
10236
10564
|
|
|
10565
|
+
exports.AiService = AiService;
|
|
10237
10566
|
exports.ApiKeyService = ApiKeyService;
|
|
10238
10567
|
exports.AppService = AppService;
|
|
10239
10568
|
exports.AppServiceService = AppServiceService;
|
|
@@ -10262,3 +10591,5 @@ exports.ServerFilterHelper = ServerFilterHelper;
|
|
|
10262
10591
|
exports.SessionHubService = SessionHubService;
|
|
10263
10592
|
exports.UserService = UserService;
|
|
10264
10593
|
exports.WorkflowService = WorkflowService;
|
|
10594
|
+
exports.orchestrationTypeDescriptions = orchestrationTypeDescriptions;
|
|
10595
|
+
exports.orchestrationTypeLabels = orchestrationTypeLabels;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluxo-dev/api-client-base",
|
|
3
|
-
"version": "25.3.
|
|
3
|
+
"version": "25.3.4",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"react": "^18.3.1",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"react-router-dom": "^6.11.2",
|
|
9
9
|
"react-redux": "^8.0.5",
|
|
10
10
|
"@reduxjs/toolkit": "^1.9.1",
|
|
11
|
-
"@fluxo-dev/state": "^25.3.
|
|
11
|
+
"@fluxo-dev/state": "^25.3.4"
|
|
12
12
|
},
|
|
13
13
|
"main": "./index.cjs.js",
|
|
14
14
|
"types": "./index.cjs.d.ts"
|
package/src/index.d.ts
CHANGED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { CreateLLMSettingsCommand, LLMSettingsDto, UpdateLLMSettingsCommand, AgentDto, CreateAgentCommand, UpdateAgentCommand, CreateAgentOrchestrationCommand, AgentOrchestrationDto, UpdateAgentOrchestrationCommand, McpServerConfigurationDto, CreateMcpServerCommand, UpdateMcpServerCommand } from './models';
|
|
2
|
+
export declare class AiService {
|
|
3
|
+
/**
|
|
4
|
+
* ========================================
|
|
5
|
+
* LLM SETTINGS METHODS
|
|
6
|
+
* ========================================
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Lista tutte le configurazioni LLM
|
|
10
|
+
*/
|
|
11
|
+
getAllLLMSettings(): Promise<LLMSettingsDto[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Ottieni una configurazione specifica
|
|
14
|
+
*/
|
|
15
|
+
getLLMSettingsById(id: string): Promise<LLMSettingsDto>;
|
|
16
|
+
/**
|
|
17
|
+
* Crea una nuova configurazione LLM
|
|
18
|
+
*/
|
|
19
|
+
createLLMSettings(command: CreateLLMSettingsCommand): Promise<LLMSettingsDto>;
|
|
20
|
+
/**
|
|
21
|
+
* Aggiorna una configurazione esistente
|
|
22
|
+
*/
|
|
23
|
+
updateLLMSettings(id: string, command: UpdateLLMSettingsCommand): Promise<LLMSettingsDto>;
|
|
24
|
+
/**
|
|
25
|
+
* Attiva una configurazione
|
|
26
|
+
*/
|
|
27
|
+
activateLLMSettings(id: string): Promise<LLMSettingsDto>;
|
|
28
|
+
/**
|
|
29
|
+
* Disattiva una configurazione
|
|
30
|
+
*/
|
|
31
|
+
deactivateLLMSettings(id: string): Promise<LLMSettingsDto>;
|
|
32
|
+
/**
|
|
33
|
+
* Elimina una configurazione
|
|
34
|
+
*/
|
|
35
|
+
deleteLLMSettings(id: string): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* ========================================
|
|
38
|
+
* AGENT METHODS
|
|
39
|
+
* ========================================
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Lista tutti gli agenti
|
|
43
|
+
*/
|
|
44
|
+
getAllAgents(): Promise<AgentDto[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Ottieni un agente specifico
|
|
47
|
+
*/
|
|
48
|
+
getAgentById(id: string): Promise<AgentDto>;
|
|
49
|
+
/**
|
|
50
|
+
* Crea un nuovo agente
|
|
51
|
+
*/
|
|
52
|
+
createAgent(command: CreateAgentCommand): Promise<AgentDto>;
|
|
53
|
+
/**
|
|
54
|
+
* Aggiorna un agente esistente
|
|
55
|
+
*/
|
|
56
|
+
updateAgent(id: string, command: UpdateAgentCommand): Promise<AgentDto>;
|
|
57
|
+
/**
|
|
58
|
+
* Attiva un agente
|
|
59
|
+
*/
|
|
60
|
+
activateAgent(id: string): Promise<AgentDto>;
|
|
61
|
+
/**
|
|
62
|
+
* Disattiva un agente
|
|
63
|
+
*/
|
|
64
|
+
deactivateAgent(id: string): Promise<AgentDto>;
|
|
65
|
+
/**
|
|
66
|
+
* Elimina un agente
|
|
67
|
+
*/
|
|
68
|
+
deleteAgent(id: string): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* ========================================
|
|
71
|
+
* ORCHESTRATION METHODS
|
|
72
|
+
* ========================================
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* Lista tutte le orchestrazioni
|
|
76
|
+
*/
|
|
77
|
+
getAllOrchestrations(): Promise<AgentOrchestrationDto[]>;
|
|
78
|
+
/**
|
|
79
|
+
* Ottieni un'orchestrazione specifica
|
|
80
|
+
*/
|
|
81
|
+
getOrchestrationById(id: string): Promise<AgentOrchestrationDto>;
|
|
82
|
+
/**
|
|
83
|
+
* Crea una nuova orchestrazione
|
|
84
|
+
*/
|
|
85
|
+
createOrchestration(command: CreateAgentOrchestrationCommand): Promise<AgentOrchestrationDto>;
|
|
86
|
+
/**
|
|
87
|
+
* Aggiorna un'orchestrazione esistente
|
|
88
|
+
*/
|
|
89
|
+
updateOrchestration(id: string, command: UpdateAgentOrchestrationCommand): Promise<AgentOrchestrationDto>;
|
|
90
|
+
/**
|
|
91
|
+
* Attiva un'orchestrazione
|
|
92
|
+
*/
|
|
93
|
+
activateOrchestration(id: string): Promise<AgentOrchestrationDto>;
|
|
94
|
+
/**
|
|
95
|
+
* Disattiva un'orchestrazione
|
|
96
|
+
*/
|
|
97
|
+
deactivateOrchestration(id: string): Promise<AgentOrchestrationDto>;
|
|
98
|
+
/**
|
|
99
|
+
* Elimina un'orchestrazione
|
|
100
|
+
*/
|
|
101
|
+
deleteOrchestration(id: string): Promise<void>;
|
|
102
|
+
/**
|
|
103
|
+
* ========================================
|
|
104
|
+
* MCP SERVER METHODS
|
|
105
|
+
* ========================================
|
|
106
|
+
*/
|
|
107
|
+
/**
|
|
108
|
+
* Lista tutti i server MCP
|
|
109
|
+
*/
|
|
110
|
+
getAllMcpServers(): Promise<McpServerConfigurationDto[]>;
|
|
111
|
+
/**
|
|
112
|
+
* Ottieni un server MCP specifico
|
|
113
|
+
*/
|
|
114
|
+
getMcpServerById(id: string): Promise<McpServerConfigurationDto>;
|
|
115
|
+
/**
|
|
116
|
+
* Crea un nuovo server MCP
|
|
117
|
+
*/
|
|
118
|
+
createMcpServer(command: CreateMcpServerCommand): Promise<McpServerConfigurationDto>;
|
|
119
|
+
/**
|
|
120
|
+
* Aggiorna un server MCP esistente
|
|
121
|
+
*/
|
|
122
|
+
updateMcpServer(id: string, command: UpdateMcpServerCommand): Promise<McpServerConfigurationDto>;
|
|
123
|
+
/**
|
|
124
|
+
* Attiva un server MCP
|
|
125
|
+
*/
|
|
126
|
+
activateMcpServer(id: string): Promise<McpServerConfigurationDto>;
|
|
127
|
+
/**
|
|
128
|
+
* Disattiva un server MCP
|
|
129
|
+
*/
|
|
130
|
+
deactivateMcpServer(id: string): Promise<McpServerConfigurationDto>;
|
|
131
|
+
/**
|
|
132
|
+
* Elimina un server MCP
|
|
133
|
+
*/
|
|
134
|
+
deleteMcpServer(id: string): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* ========================================
|
|
137
|
+
* AGENT-MCP ASSOCIATION METHODS
|
|
138
|
+
* ========================================
|
|
139
|
+
*/
|
|
140
|
+
/**
|
|
141
|
+
* Associa un server MCP ad un agente
|
|
142
|
+
*/
|
|
143
|
+
associateMcpServerToAgent(agentId: string, mcpServerId: string): Promise<AgentDto>;
|
|
144
|
+
/**
|
|
145
|
+
* Rimuovi l'associazione tra un server MCP e un agente
|
|
146
|
+
*/
|
|
147
|
+
dissociateMcpServerFromAgent(agentId: string, mcpServerId: string): Promise<AgentDto>;
|
|
148
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface AgentDto {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
systemPrompt: string;
|
|
6
|
+
llmSettingsId: string;
|
|
7
|
+
llmSettings?: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
providerType: number;
|
|
11
|
+
modelId: string;
|
|
12
|
+
hasApiKey: boolean;
|
|
13
|
+
endpoint?: string;
|
|
14
|
+
temperature?: number;
|
|
15
|
+
maxTokens?: number;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
};
|
|
18
|
+
isActive: boolean;
|
|
19
|
+
/** Lista ID server MCP associati */
|
|
20
|
+
mcpServerIds?: string[];
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LLMProviderType } from './llm-settings';
|
|
2
|
+
export interface CreateLLMSettingsCommand {
|
|
3
|
+
name: string;
|
|
4
|
+
providerType: LLMProviderType;
|
|
5
|
+
modelId: string;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
endpoint?: string;
|
|
8
|
+
organizationId?: string;
|
|
9
|
+
deploymentName?: string;
|
|
10
|
+
apiVersion?: string;
|
|
11
|
+
temperature?: number;
|
|
12
|
+
maxTokens?: number;
|
|
13
|
+
topP?: number;
|
|
14
|
+
frequencyPenalty?: number;
|
|
15
|
+
presencePenalty?: number;
|
|
16
|
+
timeoutSeconds?: number;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { McpServerType, McpAuthType } from './mcp-server';
|
|
2
|
+
/**
|
|
3
|
+
* Command per la creazione di un server MCP
|
|
4
|
+
*/
|
|
5
|
+
export interface CreateMcpServerCommand {
|
|
6
|
+
/** Nome del server (obbligatorio) */
|
|
7
|
+
name: string;
|
|
8
|
+
/** Descrizione del server (opzionale) */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Tipo di server: 0 (Stdio) o 1 (SSE) */
|
|
11
|
+
serverType: McpServerType;
|
|
12
|
+
/** Comando di esecuzione (obbligatorio se serverType = Stdio) */
|
|
13
|
+
command?: string;
|
|
14
|
+
/** Argomenti del comando (opzionale, solo per Stdio) */
|
|
15
|
+
arguments?: string;
|
|
16
|
+
/** Endpoint HTTP (obbligatorio se serverType = SSE) */
|
|
17
|
+
endpoint?: string;
|
|
18
|
+
/** Tipo di autenticazione (opzionale) */
|
|
19
|
+
authType?: McpAuthType;
|
|
20
|
+
/** Token/credenziale di autenticazione (opzionale) */
|
|
21
|
+
authToken?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './create-llm-settings';
|
|
2
|
+
export * from './llm-settings';
|
|
3
|
+
export * from './update-llm-settings';
|
|
4
|
+
export * from './agent';
|
|
5
|
+
export * from './create-agent';
|
|
6
|
+
export * from './update-agent';
|
|
7
|
+
export * from './orchestration';
|
|
8
|
+
export * from './create-orchestration';
|
|
9
|
+
export * from './update-orchestration';
|
|
10
|
+
export * from './mcp-server';
|
|
11
|
+
export * from './create-mcp-server';
|
|
12
|
+
export * from './update-mcp-server';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum LLMProviderType {
|
|
2
|
+
OpenAI = 1,
|
|
3
|
+
AzureOpenAI = 2,
|
|
4
|
+
Anthropic = 3,
|
|
5
|
+
Ollama = 4,
|
|
6
|
+
Gemini = 5
|
|
7
|
+
}
|
|
8
|
+
export interface LLMSettingsDto {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
providerType: LLMProviderType;
|
|
12
|
+
modelId: string;
|
|
13
|
+
hasApiKey: boolean;
|
|
14
|
+
endpoint?: string;
|
|
15
|
+
organizationId?: string;
|
|
16
|
+
deploymentName?: string;
|
|
17
|
+
apiVersion?: string;
|
|
18
|
+
temperature?: number;
|
|
19
|
+
maxTokens?: number;
|
|
20
|
+
topP?: number;
|
|
21
|
+
frequencyPenalty?: number;
|
|
22
|
+
presencePenalty?: number;
|
|
23
|
+
timeoutSeconds?: number;
|
|
24
|
+
isActive: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enumerazione dei tipi di server MCP
|
|
3
|
+
*/
|
|
4
|
+
export declare enum McpServerType {
|
|
5
|
+
/** Processo comunicante via stdin/stdout */
|
|
6
|
+
Stdio = 0,
|
|
7
|
+
/** Server HTTP con Server-Sent Events */
|
|
8
|
+
SSE = 1
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Enumerazione dei tipi di autenticazione MCP
|
|
12
|
+
*/
|
|
13
|
+
export declare enum McpAuthType {
|
|
14
|
+
/** Nessuna autenticazione */
|
|
15
|
+
None = 0,
|
|
16
|
+
/** API Key (header X-API-Key) */
|
|
17
|
+
ApiKey = 1,
|
|
18
|
+
/** Bearer Token OAuth/JWT */
|
|
19
|
+
BearerToken = 2,
|
|
20
|
+
/** Basic Authentication (username:password) */
|
|
21
|
+
BasicAuth = 3
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* DTO per la configurazione di un server MCP
|
|
25
|
+
*/
|
|
26
|
+
export interface McpServerConfigurationDto {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string | null;
|
|
30
|
+
serverType: McpServerType;
|
|
31
|
+
command: string | null;
|
|
32
|
+
arguments: string | null;
|
|
33
|
+
endpoint: string | null;
|
|
34
|
+
authType: McpAuthType | null;
|
|
35
|
+
/** Indica se esiste un token (il token NON viene mai esposto) */
|
|
36
|
+
hasAuthToken: boolean;
|
|
37
|
+
isActive: boolean;
|
|
38
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare enum OrchestrationType {
|
|
2
|
+
Sequential = 0,
|
|
3
|
+
Concurrent = 1,
|
|
4
|
+
Handoff = 2,
|
|
5
|
+
GroupChat = 3,
|
|
6
|
+
Magentic = 4,
|
|
7
|
+
Coordinator = 5
|
|
8
|
+
}
|
|
9
|
+
export interface AgentOrchestrationDto {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
type: OrchestrationType;
|
|
14
|
+
agentIds: string[];
|
|
15
|
+
maxIterations: number;
|
|
16
|
+
configuration?: Record<string, any>;
|
|
17
|
+
isActive: boolean;
|
|
18
|
+
agents?: Array<{
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
systemPrompt: string;
|
|
22
|
+
llmSettingsId: string;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
export declare const orchestrationTypeLabels: Record<OrchestrationType, string>;
|
|
27
|
+
export declare const orchestrationTypeDescriptions: Record<OrchestrationType, string>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { McpAuthType } from './mcp-server';
|
|
2
|
+
/**
|
|
3
|
+
* Command per l'aggiornamento di un server MCP
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdateMcpServerCommand {
|
|
6
|
+
/** Nome del server (opzionale) */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Descrizione del server (opzionale) */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Comando di esecuzione (opzionale, solo se serverType = Stdio) */
|
|
11
|
+
command?: string;
|
|
12
|
+
/** Argomenti del comando (opzionale, solo se serverType = Stdio) */
|
|
13
|
+
arguments?: string;
|
|
14
|
+
/** Endpoint HTTP (opzionale, solo se serverType = SSE) */
|
|
15
|
+
endpoint?: string;
|
|
16
|
+
/** Tipo di autenticazione (opzionale) */
|
|
17
|
+
authType?: McpAuthType;
|
|
18
|
+
/** Token/credenziale di autenticazione (opzionale, null per rimuovere) */
|
|
19
|
+
authToken?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrchestrationType } from './orchestration';
|
|
2
|
+
export interface UpdateAgentOrchestrationCommand {
|
|
3
|
+
name?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
type?: OrchestrationType;
|
|
6
|
+
agentIds?: string[];
|
|
7
|
+
maxIterations?: number;
|
|
8
|
+
configuration?: Record<string, any>;
|
|
9
|
+
}
|
|
@@ -11,6 +11,7 @@ import { PrintingService } from "./printing";
|
|
|
11
11
|
import { WorkflowService } from "./workflow";
|
|
12
12
|
import { BiFacade } from "./bi";
|
|
13
13
|
import { SessionHubService } from "./session-hub";
|
|
14
|
+
import { AiService } from "./ai";
|
|
14
15
|
export interface FluxoClientInterface {
|
|
15
16
|
get clientConfig(): FluxoClientConfiguration;
|
|
16
17
|
get security(): SecurityFacade;
|
|
@@ -25,4 +26,5 @@ export interface FluxoClientInterface {
|
|
|
25
26
|
get ravify(): RavifyFacade;
|
|
26
27
|
get bi(): BiFacade;
|
|
27
28
|
get sessionHub(): SessionHubService;
|
|
29
|
+
get ai(): AiService;
|
|
28
30
|
}
|
|
@@ -13,6 +13,7 @@ import { CommunicationFacade } from "./communication";
|
|
|
13
13
|
import { RavifyFacade } from "./ravify/ravify.facade";
|
|
14
14
|
import { BiFacade } from "./bi";
|
|
15
15
|
import { SessionHubService } from "./session-hub";
|
|
16
|
+
import { AiService } from './ai';
|
|
16
17
|
export declare abstract class FluxoClientBase implements FluxoClientInterface {
|
|
17
18
|
get modules(): any[];
|
|
18
19
|
static get HttpClient(): HttpClient;
|
|
@@ -29,6 +30,7 @@ export declare abstract class FluxoClientBase implements FluxoClientInterface {
|
|
|
29
30
|
private _config;
|
|
30
31
|
private _ravify;
|
|
31
32
|
private _biFacade;
|
|
33
|
+
private _ai;
|
|
32
34
|
private _sessionHub;
|
|
33
35
|
private _modules;
|
|
34
36
|
register(module: any): void;
|
|
@@ -49,6 +51,7 @@ export declare abstract class FluxoClientBase implements FluxoClientInterface {
|
|
|
49
51
|
get workflow(): WorkflowService;
|
|
50
52
|
get ravify(): RavifyFacade;
|
|
51
53
|
get bi(): BiFacade;
|
|
54
|
+
get ai(): AiService;
|
|
52
55
|
get sessionHub(): SessionHubService;
|
|
53
56
|
private getBearerToken;
|
|
54
57
|
}
|
|
@@ -10,4 +10,8 @@ export declare class ReportingService {
|
|
|
10
10
|
deleteReport(id: number): Promise<void>;
|
|
11
11
|
getParametersSchema(fullScope: string): Promise<ParametersSchema>;
|
|
12
12
|
print(command: PrintReportCommand): Promise<void>;
|
|
13
|
+
updateReport(reportId: number, command: {
|
|
14
|
+
name: string;
|
|
15
|
+
annotations: string;
|
|
16
|
+
}): Promise<void>;
|
|
13
17
|
}
|