@smythos/sre 1.5.26 → 1.5.31
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/CHANGELOG +28 -0
- package/dist/index.js +61 -46
- package/dist/index.js.map +1 -1
- package/dist/types/Components/GenAILLM.class.d.ts +126 -0
- package/dist/types/helpers/AWSLambdaCode.helper.d.ts +9 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/xAI.d.ts +121 -0
- package/dist/types/subsystems/LLMManager/models.d.ts +1 -0
- package/dist/types/types/LLM.types.d.ts +16 -0
- package/package.json +1 -1
- package/src/Components/GenAILLM.class.ts +166 -7
- package/src/Components/ServerlessCode.class.ts +7 -3
- package/src/helpers/AWSLambdaCode.helper.ts +184 -44
- package/src/helpers/Conversation.helper.ts +2 -2
- package/src/index.ts +185 -184
- package/src/index.ts.bak +185 -184
- package/src/subsystems/ComputeManager/Code.service/connectors/AWSLambdaCode.class.ts +15 -11
- package/src/subsystems/LLMManager/LLM.service/LLMConnector.ts +21 -5
- package/src/subsystems/LLMManager/LLM.service/connectors/xAI.ts +476 -0
- package/src/subsystems/LLMManager/LLM.service/index.ts +2 -1
- package/src/subsystems/LLMManager/ModelsProvider.service/ModelsProviderConnector.ts +17 -11
- package/src/subsystems/LLMManager/models.ts +1 -0
- package/src/types/LLM.types.ts +18 -0
package/src/index.ts.bak
CHANGED
|
@@ -1,187 +1,188 @@
|
|
|
1
|
-
//!!! This is a generated file, do not edit it directly !!!//
|
|
2
|
-
|
|
3
|
-
export { version } from '../package.json';
|
|
4
|
-
|
|
1
|
+
//!!! This is a generated file, do not edit it directly !!!//
|
|
5
2
|
|
|
3
|
+
export { version } from '../package.json';
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './Components/
|
|
13
|
-
export * from './Components/
|
|
14
|
-
export * from './Components/
|
|
15
|
-
export * from './Components/
|
|
16
|
-
export * from './Components/
|
|
17
|
-
export * from './Components/
|
|
18
|
-
export * from './Components/
|
|
19
|
-
export * from './Components/
|
|
20
|
-
export * from './Components/
|
|
21
|
-
export * from './Components/
|
|
22
|
-
export * from './Components/
|
|
23
|
-
export * from './Components/
|
|
24
|
-
export * from './Components/
|
|
25
|
-
export * from './Components/
|
|
26
|
-
export * from './Components/
|
|
27
|
-
export * from './Components/
|
|
28
|
-
export * from './Components/
|
|
29
|
-
export * from './Components/
|
|
30
|
-
export * from './Components/
|
|
31
|
-
export * from './Components/
|
|
32
|
-
export * from './Components/
|
|
33
|
-
export * from './Components/
|
|
34
|
-
export * from './Components/
|
|
35
|
-
export * from './Components/
|
|
36
|
-
export * from './Components/
|
|
37
|
-
export * from './Components/
|
|
38
|
-
export * from './Components/
|
|
39
|
-
export * from './Components/
|
|
40
|
-
export * from './Components/
|
|
41
|
-
export * from './Components/
|
|
42
|
-
export * from './Components/
|
|
43
|
-
export * from './Components/
|
|
44
|
-
export * from './Components/
|
|
45
|
-
export * from './Components/
|
|
46
|
-
export * from './Components/
|
|
47
|
-
export * from './Components/
|
|
48
|
-
export * from './
|
|
49
|
-
export * from './
|
|
50
|
-
export * from './Core/
|
|
51
|
-
export * from './Core/
|
|
52
|
-
export * from './Core/
|
|
53
|
-
export * from './Core/
|
|
54
|
-
export * from './Core/
|
|
55
|
-
export * from './Core/
|
|
56
|
-
export * from './
|
|
57
|
-
export * from './
|
|
58
|
-
export * from './helpers/
|
|
59
|
-
export * from './helpers/
|
|
60
|
-
export * from './helpers/
|
|
61
|
-
export * from './helpers/
|
|
62
|
-
export * from './helpers/
|
|
63
|
-
export * from './helpers/
|
|
64
|
-
export * from './helpers/
|
|
65
|
-
export * from './helpers/
|
|
66
|
-
export * from './helpers/
|
|
67
|
-
export * from './helpers/
|
|
68
|
-
export * from './
|
|
69
|
-
export * from './
|
|
70
|
-
export * from './types/
|
|
71
|
-
export * from './types/
|
|
72
|
-
export * from './types/
|
|
73
|
-
export * from './types/
|
|
74
|
-
export * from './types/
|
|
75
|
-
export * from './types/
|
|
76
|
-
export * from './types/
|
|
77
|
-
export * from './types/
|
|
78
|
-
export * from './types/
|
|
79
|
-
export * from './types/
|
|
80
|
-
export * from './
|
|
81
|
-
export * from './
|
|
82
|
-
export * from './Components/APICall/
|
|
83
|
-
export * from './Components/APICall/
|
|
84
|
-
export * from './Components/APICall/
|
|
85
|
-
export * from './Components/APICall/
|
|
86
|
-
export * from './Components/APICall/
|
|
87
|
-
export * from './Components/APICall/
|
|
88
|
-
export * from './Components/APICall/
|
|
89
|
-
export * from './Components/
|
|
90
|
-
export * from './
|
|
91
|
-
export * from './
|
|
92
|
-
export * from './subsystems/AgentManager/
|
|
93
|
-
export * from './subsystems/AgentManager/
|
|
94
|
-
export * from './subsystems/AgentManager/
|
|
95
|
-
export * from './subsystems/AgentManager/
|
|
96
|
-
export * from './subsystems/AgentManager/
|
|
97
|
-
export * from './subsystems/AgentManager/
|
|
98
|
-
export * from './subsystems/AgentManager/
|
|
99
|
-
export * from './subsystems/AgentManager/
|
|
100
|
-
export * from './subsystems/
|
|
101
|
-
export * from './subsystems/
|
|
102
|
-
export * from './subsystems/LLMManager/
|
|
103
|
-
export * from './subsystems/LLMManager/
|
|
104
|
-
export * from './subsystems/LLMManager/
|
|
105
|
-
export * from './subsystems/
|
|
106
|
-
export * from './subsystems/
|
|
107
|
-
export * from './subsystems/MemoryManager/
|
|
108
|
-
export * from './subsystems/
|
|
109
|
-
export * from './subsystems/
|
|
110
|
-
export * from './subsystems/
|
|
111
|
-
export * from './subsystems/
|
|
112
|
-
export * from './subsystems/AgentManager/
|
|
113
|
-
export * from './subsystems/AgentManager/
|
|
114
|
-
export * from './subsystems/
|
|
115
|
-
export * from './subsystems/
|
|
116
|
-
export * from './subsystems/
|
|
117
|
-
export * from './subsystems/
|
|
118
|
-
export * from './subsystems/IO/
|
|
119
|
-
export * from './subsystems/IO/
|
|
120
|
-
export * from './subsystems/IO/
|
|
121
|
-
export * from './subsystems/IO/
|
|
122
|
-
export * from './subsystems/IO/
|
|
123
|
-
export * from './subsystems/IO/
|
|
124
|
-
export * from './subsystems/IO/
|
|
125
|
-
export * from './subsystems/IO/
|
|
126
|
-
export * from './subsystems/IO/Storage.service/
|
|
127
|
-
export * from './subsystems/IO/
|
|
128
|
-
export * from './subsystems/IO/
|
|
129
|
-
export * from './subsystems/
|
|
130
|
-
export * from './subsystems/
|
|
131
|
-
export * from './subsystems/LLMManager/LLM.service/
|
|
132
|
-
export * from './subsystems/LLMManager/
|
|
133
|
-
export * from './subsystems/LLMManager/
|
|
134
|
-
export * from './subsystems/
|
|
135
|
-
export * from './subsystems/
|
|
136
|
-
export * from './subsystems/MemoryManager/
|
|
137
|
-
export * from './subsystems/
|
|
138
|
-
export * from './subsystems/
|
|
139
|
-
export * from './subsystems/Security/AccessControl/
|
|
140
|
-
export * from './subsystems/Security/
|
|
141
|
-
export * from './subsystems/Security/
|
|
142
|
-
export * from './subsystems/Security/
|
|
143
|
-
export * from './subsystems/Security/
|
|
144
|
-
export * from './subsystems/Security/
|
|
145
|
-
export * from './subsystems/Security/
|
|
146
|
-
export * from './subsystems/Security/Vault.service/
|
|
147
|
-
export * from './subsystems/
|
|
148
|
-
export * from './subsystems/
|
|
149
|
-
export * from './subsystems/AgentManager/AgentData.service/connectors/
|
|
150
|
-
export * from './subsystems/AgentManager/
|
|
151
|
-
export * from './subsystems/
|
|
152
|
-
export * from './subsystems/
|
|
153
|
-
export * from './subsystems/
|
|
154
|
-
export * from './subsystems/IO/
|
|
155
|
-
export * from './subsystems/IO/NKV.service/connectors/
|
|
156
|
-
export * from './subsystems/IO/
|
|
157
|
-
export * from './subsystems/IO/
|
|
158
|
-
export * from './subsystems/IO/
|
|
159
|
-
export * from './subsystems/IO/
|
|
160
|
-
export * from './subsystems/IO/
|
|
161
|
-
export * from './subsystems/IO/
|
|
162
|
-
export * from './subsystems/IO/VectorDB.service/connectors/
|
|
163
|
-
export * from './subsystems/IO/VectorDB.service/
|
|
164
|
-
export * from './subsystems/IO/VectorDB.service/
|
|
165
|
-
export * from './subsystems/IO/VectorDB.service/embed/
|
|
166
|
-
export * from './subsystems/
|
|
167
|
-
export * from './subsystems/
|
|
168
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
169
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
170
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
171
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
172
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
173
|
-
export * from './subsystems/LLMManager/LLM.service/connectors/
|
|
174
|
-
export * from './subsystems/LLMManager/
|
|
175
|
-
export * from './subsystems/
|
|
176
|
-
export * from './subsystems/
|
|
177
|
-
export * from './subsystems/
|
|
178
|
-
export * from './subsystems/MemoryManager/Cache.service/connectors/
|
|
179
|
-
export * from './subsystems/
|
|
180
|
-
export * from './subsystems/
|
|
181
|
-
export * from './subsystems/
|
|
182
|
-
export * from './subsystems/Security/
|
|
183
|
-
export * from './subsystems/Security/
|
|
184
|
-
export * from './subsystems/Security/
|
|
185
|
-
export * from './subsystems/Security/
|
|
186
|
-
export * from './subsystems/Security/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export * from './config';
|
|
9
|
+
export * from './constants';
|
|
10
|
+
export * from './Components/AgentPlugin.class';
|
|
11
|
+
export * from './Components/APIEndpoint.class';
|
|
12
|
+
export * from './Components/APIOutput.class';
|
|
13
|
+
export * from './Components/Async.class';
|
|
14
|
+
export * from './Components/Await.class';
|
|
15
|
+
export * from './Components/Classifier.class';
|
|
16
|
+
export * from './Components/Component.class';
|
|
17
|
+
export * from './Components/ComponentHost.class';
|
|
18
|
+
export * from './Components/DataSourceCleaner.class';
|
|
19
|
+
export * from './Components/DataSourceIndexer.class';
|
|
20
|
+
export * from './Components/DataSourceLookup.class';
|
|
21
|
+
export * from './Components/FEncDec.class';
|
|
22
|
+
export * from './Components/FHash.class';
|
|
23
|
+
export * from './Components/FileStore.class';
|
|
24
|
+
export * from './Components/ForEach.class';
|
|
25
|
+
export * from './Components/FSign.class';
|
|
26
|
+
export * from './Components/FSleep.class';
|
|
27
|
+
export * from './Components/FTimestamp.class';
|
|
28
|
+
export * from './Components/GenAILLM.class';
|
|
29
|
+
export * from './Components/GPTPlugin.class';
|
|
30
|
+
export * from './Components/HuggingFace.class';
|
|
31
|
+
export * from './Components/ImageGenerator.class';
|
|
32
|
+
export * from './Components/index';
|
|
33
|
+
export * from './Components/JSONFilter.class';
|
|
34
|
+
export * from './Components/LLMAssistant.class';
|
|
35
|
+
export * from './Components/LogicAND.class';
|
|
36
|
+
export * from './Components/LogicAtLeast.class';
|
|
37
|
+
export * from './Components/LogicAtMost.class';
|
|
38
|
+
export * from './Components/LogicOR.class';
|
|
39
|
+
export * from './Components/LogicXOR.class';
|
|
40
|
+
export * from './Components/MCPClient.class';
|
|
41
|
+
export * from './Components/MultimodalLLM.class';
|
|
42
|
+
export * from './Components/PromptGenerator.class';
|
|
43
|
+
export * from './Components/ScrapflyWebScrape.class';
|
|
44
|
+
export * from './Components/ServerlessCode.class';
|
|
45
|
+
export * from './Components/TavilyWebSearch.class';
|
|
46
|
+
export * from './Components/VisionLLM.class';
|
|
47
|
+
export * from './Components/ZapierAction.class';
|
|
48
|
+
export * from './Core/AgentProcess.helper';
|
|
49
|
+
export * from './Core/boot';
|
|
50
|
+
export * from './Core/Connector.class';
|
|
51
|
+
export * from './Core/ConnectorsService';
|
|
52
|
+
export * from './Core/DummyConnector';
|
|
53
|
+
export * from './Core/HookService';
|
|
54
|
+
export * from './Core/SmythRuntime.class';
|
|
55
|
+
export * from './Core/SystemEvents';
|
|
56
|
+
export * from './helpers/AWSLambdaCode.helper';
|
|
57
|
+
export * from './helpers/BinaryInput.helper';
|
|
58
|
+
export * from './helpers/Conversation.helper';
|
|
59
|
+
export * from './helpers/JsonContent.helper';
|
|
60
|
+
export * from './helpers/LocalCache.helper';
|
|
61
|
+
export * from './helpers/Log.helper';
|
|
62
|
+
export * from './helpers/OpenApiParser.helper';
|
|
63
|
+
export * from './helpers/S3Cache.helper';
|
|
64
|
+
export * from './helpers/SmythURI.helper';
|
|
65
|
+
export * from './helpers/Sysconfig.helper';
|
|
66
|
+
export * from './helpers/TemplateString.helper';
|
|
67
|
+
export * from './helpers/TypeChecker.helper';
|
|
68
|
+
export * from './types/ACL.types';
|
|
69
|
+
export * from './types/Agent.types';
|
|
70
|
+
export * from './types/AgentLogger.types';
|
|
71
|
+
export * from './types/AWS.types';
|
|
72
|
+
export * from './types/Cache.types';
|
|
73
|
+
export * from './types/Common.types';
|
|
74
|
+
export * from './types/LLM.types';
|
|
75
|
+
export * from './types/Redis.types';
|
|
76
|
+
export * from './types/Security.types';
|
|
77
|
+
export * from './types/SRE.types';
|
|
78
|
+
export * from './types/Storage.types';
|
|
79
|
+
export * from './types/VectorDB.types';
|
|
80
|
+
export * from './Components/APICall/AccessTokenManager';
|
|
81
|
+
export * from './Components/APICall/APICall.class';
|
|
82
|
+
export * from './Components/APICall/ArrayBufferResponse.helper';
|
|
83
|
+
export * from './Components/APICall/mimeTypeCategories';
|
|
84
|
+
export * from './Components/APICall/OAuth.helper';
|
|
85
|
+
export * from './Components/APICall/parseData';
|
|
86
|
+
export * from './Components/APICall/parseHeaders';
|
|
87
|
+
export * from './Components/APICall/parseProxy';
|
|
88
|
+
export * from './Components/APICall/parseUrl';
|
|
89
|
+
export * from './Components/Image/imageSettings.config';
|
|
90
|
+
export * from './subsystems/AgentManager/Agent.class';
|
|
91
|
+
export * from './subsystems/AgentManager/Agent.helper';
|
|
92
|
+
export * from './subsystems/AgentManager/AgentLogger.class';
|
|
93
|
+
export * from './subsystems/AgentManager/AgentRequest.class';
|
|
94
|
+
export * from './subsystems/AgentManager/AgentRuntime.class';
|
|
95
|
+
export * from './subsystems/AgentManager/AgentSettings.class';
|
|
96
|
+
export * from './subsystems/AgentManager/AgentSSE.class';
|
|
97
|
+
export * from './subsystems/AgentManager/EmbodimentSettings.class';
|
|
98
|
+
export * from './subsystems/AgentManager/ForkedAgent.class';
|
|
99
|
+
export * from './subsystems/AgentManager/OSResourceMonitor';
|
|
100
|
+
export * from './subsystems/LLMManager/custom-models';
|
|
101
|
+
export * from './subsystems/LLMManager/LLM.helper';
|
|
102
|
+
export * from './subsystems/LLMManager/LLM.inference';
|
|
103
|
+
export * from './subsystems/LLMManager/models';
|
|
104
|
+
export * from './subsystems/LLMManager/paramMappings';
|
|
105
|
+
export * from './subsystems/MemoryManager/LLMCache';
|
|
106
|
+
export * from './subsystems/MemoryManager/LLMContext';
|
|
107
|
+
export * from './subsystems/MemoryManager/RuntimeContext';
|
|
108
|
+
export * from './subsystems/Security/Credentials.helper';
|
|
109
|
+
export * from './subsystems/Security/SecureConnector.class';
|
|
110
|
+
export * from './subsystems/AgentManager/AgentData.service/AgentDataConnector';
|
|
111
|
+
export * from './subsystems/AgentManager/AgentData.service/index';
|
|
112
|
+
export * from './subsystems/AgentManager/Component.service/ComponentConnector';
|
|
113
|
+
export * from './subsystems/AgentManager/Component.service/index';
|
|
114
|
+
export * from './subsystems/ComputeManager/Code.service/CodeConnector';
|
|
115
|
+
export * from './subsystems/ComputeManager/Code.service/index';
|
|
116
|
+
export * from './subsystems/IO/CLI.service/CLIConnector';
|
|
117
|
+
export * from './subsystems/IO/CLI.service/index';
|
|
118
|
+
export * from './subsystems/IO/Log.service/index';
|
|
119
|
+
export * from './subsystems/IO/Log.service/LogConnector';
|
|
120
|
+
export * from './subsystems/IO/NKV.service/index';
|
|
121
|
+
export * from './subsystems/IO/NKV.service/NKVConnector';
|
|
122
|
+
export * from './subsystems/IO/Router.service/index';
|
|
123
|
+
export * from './subsystems/IO/Router.service/RouterConnector';
|
|
124
|
+
export * from './subsystems/IO/Storage.service/index';
|
|
125
|
+
export * from './subsystems/IO/Storage.service/SmythFS.class';
|
|
126
|
+
export * from './subsystems/IO/Storage.service/StorageConnector';
|
|
127
|
+
export * from './subsystems/IO/VectorDB.service/index';
|
|
128
|
+
export * from './subsystems/IO/VectorDB.service/VectorDBConnector';
|
|
129
|
+
export * from './subsystems/LLMManager/LLM.service/index';
|
|
130
|
+
export * from './subsystems/LLMManager/LLM.service/LLMConnector';
|
|
131
|
+
export * from './subsystems/LLMManager/LLM.service/LLMCredentials.helper';
|
|
132
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/index';
|
|
133
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/ModelsProviderConnector';
|
|
134
|
+
export * from './subsystems/MemoryManager/Cache.service/CacheConnector';
|
|
135
|
+
export * from './subsystems/MemoryManager/Cache.service/index';
|
|
136
|
+
export * from './subsystems/MemoryManager/LLMMemory.service/LLMMemoryConnector';
|
|
137
|
+
export * from './subsystems/Security/AccessControl/AccessCandidate.class';
|
|
138
|
+
export * from './subsystems/Security/AccessControl/AccessRequest.class';
|
|
139
|
+
export * from './subsystems/Security/AccessControl/ACL.class';
|
|
140
|
+
export * from './subsystems/Security/Account.service/AccountConnector';
|
|
141
|
+
export * from './subsystems/Security/Account.service/index';
|
|
142
|
+
export * from './subsystems/Security/ManagedVault.service/index';
|
|
143
|
+
export * from './subsystems/Security/ManagedVault.service/ManagedVaultConnector';
|
|
144
|
+
export * from './subsystems/Security/Vault.service/index';
|
|
145
|
+
export * from './subsystems/Security/Vault.service/Vault.helper';
|
|
146
|
+
export * from './subsystems/Security/Vault.service/VaultConnector';
|
|
147
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/CLIAgentDataConnector.class';
|
|
148
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/LocalAgentDataConnector.class';
|
|
149
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/NullAgentData.class';
|
|
150
|
+
export * from './subsystems/AgentManager/Component.service/connectors/LocalComponentConnector.class';
|
|
151
|
+
export * from './subsystems/ComputeManager/Code.service/connectors/AWSLambdaCode.class';
|
|
152
|
+
export * from './subsystems/IO/Log.service/connectors/ConsoleLog.class';
|
|
153
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVLocalStorage.class';
|
|
154
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVRAM.class';
|
|
155
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVRedis.class';
|
|
156
|
+
export * from './subsystems/IO/Router.service/connectors/ExpressRouter.class';
|
|
157
|
+
export * from './subsystems/IO/Router.service/connectors/NullRouter.class';
|
|
158
|
+
export * from './subsystems/IO/Storage.service/connectors/LocalStorage.class';
|
|
159
|
+
export * from './subsystems/IO/Storage.service/connectors/S3Storage.class';
|
|
160
|
+
export * from './subsystems/IO/VectorDB.service/connectors/MilvusVectorDB.class';
|
|
161
|
+
export * from './subsystems/IO/VectorDB.service/connectors/PineconeVectorDB.class';
|
|
162
|
+
export * from './subsystems/IO/VectorDB.service/connectors/RAMVecrtorDB.class';
|
|
163
|
+
export * from './subsystems/IO/VectorDB.service/embed/BaseEmbedding';
|
|
164
|
+
export * from './subsystems/IO/VectorDB.service/embed/index';
|
|
165
|
+
export * from './subsystems/IO/VectorDB.service/embed/OpenAIEmbedding';
|
|
166
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Anthropic.class';
|
|
167
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Bedrock.class';
|
|
168
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Echo.class';
|
|
169
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/GoogleAI.class';
|
|
170
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Groq.class';
|
|
171
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/OpenAI.class';
|
|
172
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Perplexity.class';
|
|
173
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/VertexAI.class';
|
|
174
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/xAI';
|
|
175
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/JSONModelsProvider.class';
|
|
176
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/LocalStorageCache.class';
|
|
177
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/RAMCache.class';
|
|
178
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/RedisCache.class';
|
|
179
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/S3Cache.class';
|
|
180
|
+
export * from './subsystems/Security/Account.service/connectors/AWSAccount.class';
|
|
181
|
+
export * from './subsystems/Security/Account.service/connectors/DummyAccount.class';
|
|
182
|
+
export * from './subsystems/Security/Account.service/connectors/JSONFileAccount.class';
|
|
183
|
+
export * from './subsystems/Security/ManagedVault.service/connectors/NullManagedVault.class';
|
|
184
|
+
export * from './subsystems/Security/ManagedVault.service/connectors/SecretManagerManagedVault';
|
|
185
|
+
export * from './subsystems/Security/Vault.service/connectors/HashicorpVault.class';
|
|
186
|
+
export * from './subsystems/Security/Vault.service/connectors/JSONFileVault.class';
|
|
187
|
+
export * from './subsystems/Security/Vault.service/connectors/NullVault.class';
|
|
187
188
|
export * from './subsystems/Security/Vault.service/connectors/SecretsManager.class';
|
|
@@ -5,7 +5,7 @@ import { AccessRequest } from '@sre/Security/AccessControl/AccessRequest.class';
|
|
|
5
5
|
import fs from 'fs';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { execSync } from 'child_process';
|
|
8
|
-
import { cacheTTL, createOrUpdateLambdaFunction,
|
|
8
|
+
import { cacheTTL, createOrUpdateLambdaFunction, generateCodeHash, generateLambdaCode, getDeployedCodeHash, getDeployedFunction, getLambdaFunctionName, invokeLambdaFunction, setDeployedCodeHash, updateDeployedCodeTTL, validateAsyncMainFunction, zipCode } from '@sre/helpers/AWSLambdaCode.helper';
|
|
9
9
|
import { AWSCredentials, AWSRegionConfig } from '@sre/types/AWS.types';
|
|
10
10
|
import { Logger } from '@sre/helpers/Log.helper';
|
|
11
11
|
|
|
@@ -38,7 +38,7 @@ export class AWSLambdaCode extends CodeConnector {
|
|
|
38
38
|
getDeployedCodeHash(agentId, codeUID),
|
|
39
39
|
]);
|
|
40
40
|
|
|
41
|
-
const codeHash = generateCodeHash(input.code,
|
|
41
|
+
const codeHash = generateCodeHash(input.code, Object.keys(input.inputs));
|
|
42
42
|
if (isLambdaExists && exisitingCodeHash === codeHash) {
|
|
43
43
|
return {
|
|
44
44
|
id: functionName,
|
|
@@ -53,9 +53,11 @@ export class AWSLambdaCode extends CodeConnector {
|
|
|
53
53
|
}
|
|
54
54
|
const directory = `${baseFolder}/${functionName}__${Date.now()}`;
|
|
55
55
|
try {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
const { isValid, parameters, error, dependencies } = validateAsyncMainFunction(input.code);
|
|
57
|
+
if (!isValid) {
|
|
58
|
+
throw new Error(error || 'Invalid Code')
|
|
59
|
+
}
|
|
60
|
+
const lambdaCode = generateLambdaCode(input.code, parameters);
|
|
59
61
|
// create folder
|
|
60
62
|
fs.mkdirSync(directory);
|
|
61
63
|
// create index.js file
|
|
@@ -63,12 +65,12 @@ export class AWSLambdaCode extends CodeConnector {
|
|
|
63
65
|
// run command npm init
|
|
64
66
|
execSync('npm init -y', { cwd: directory });
|
|
65
67
|
// run command npm install
|
|
66
|
-
execSync(`npm install ${
|
|
68
|
+
execSync(`npm install ${dependencies.join(' ')}`, { cwd: directory });
|
|
67
69
|
|
|
68
70
|
const zipFilePath = await zipCode(directory);
|
|
69
71
|
await createOrUpdateLambdaFunction(functionName, zipFilePath, this.awsConfigs);
|
|
70
72
|
await setDeployedCodeHash(agentId, codeUID, codeHash);
|
|
71
|
-
console.
|
|
73
|
+
console.debug('Lambda function updated successfully!');
|
|
72
74
|
return {
|
|
73
75
|
id: functionName,
|
|
74
76
|
runtime: config.runtime,
|
|
@@ -78,8 +80,10 @@ export class AWSLambdaCode extends CodeConnector {
|
|
|
78
80
|
} catch (error) {
|
|
79
81
|
throw error;
|
|
80
82
|
} finally {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
+
try {
|
|
84
|
+
fs.rmSync(`${directory}`, { recursive: true, force: true });
|
|
85
|
+
fs.unlinkSync(`${directory}.zip`);
|
|
86
|
+
} catch (error) {}
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
}
|
|
@@ -93,8 +97,8 @@ export class AWSLambdaCode extends CodeConnector {
|
|
|
93
97
|
const executionTime = lambdaResponse.executionTime;
|
|
94
98
|
await updateDeployedCodeTTL(agentId, codeUID, cacheTTL);
|
|
95
99
|
console.debug(
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
`Code result:\n ${typeof lambdaResponse.result === 'object' ? JSON.stringify(lambdaResponse.result, null, 2) : lambdaResponse.result
|
|
101
|
+
}\n`,
|
|
98
102
|
);
|
|
99
103
|
console.debug(`Execution time: ${executionTime}ms\n`);
|
|
100
104
|
|
|
@@ -146,7 +146,12 @@ export abstract class LLMConnector extends Connector {
|
|
|
146
146
|
|
|
147
147
|
let response;
|
|
148
148
|
|
|
149
|
-
if (
|
|
149
|
+
if (
|
|
150
|
+
preparedParams.capabilities?.search === true &&
|
|
151
|
+
preparedParams.useWebSearch === true &&
|
|
152
|
+
preparedParams.modelInfo.provider === 'OpenAI'
|
|
153
|
+
) {
|
|
154
|
+
// ! webSearchRequest will be removed in next update
|
|
150
155
|
response = await this.webSearchRequest(requestParams);
|
|
151
156
|
} else {
|
|
152
157
|
response = await this.streamRequest(requestParams);
|
|
@@ -333,10 +338,21 @@ export abstract class LLMConnector extends Connector {
|
|
|
333
338
|
for (const [key, value] of Object.entries(params)) {
|
|
334
339
|
let _value: any = value;
|
|
335
340
|
|
|
336
|
-
//
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
341
|
+
// Array parameters that can be separated by comma or newline
|
|
342
|
+
const arrayParams = ['stopSequences', 'excludedWebsites', 'allowedWebsites', 'includedXHandles', 'excludedXHandles', 'rssLinks'];
|
|
343
|
+
|
|
344
|
+
if (arrayParams.includes(key)) {
|
|
345
|
+
if (_value && typeof _value === 'string') {
|
|
346
|
+
// Split by comma or newline, then filter out empty strings
|
|
347
|
+
_value = _value
|
|
348
|
+
.split(/[,\n]/)
|
|
349
|
+
.map((item) => item.trim())
|
|
350
|
+
.filter((item) => item.length > 0);
|
|
351
|
+
} else if (Array.isArray(_value)) {
|
|
352
|
+
_value = _value;
|
|
353
|
+
} else {
|
|
354
|
+
_value = _value ? [_value] : null;
|
|
355
|
+
}
|
|
340
356
|
}
|
|
341
357
|
|
|
342
358
|
// When we have a string that is a number, we need to convert it to a number
|