@smythos/sre 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/types/Components/APICall/APICall.class.d.ts +34 -0
- package/dist/types/Components/APICall/AccessTokenManager.d.ts +17 -0
- package/dist/types/Components/APICall/ArrayBufferResponse.helper.d.ts +3 -0
- package/dist/types/Components/APICall/OAuth.helper.d.ts +10 -0
- package/dist/types/Components/APICall/mimeTypeCategories.d.ts +6 -0
- package/dist/types/Components/APICall/parseData.d.ts +5 -0
- package/dist/types/Components/APICall/parseHeaders.d.ts +3 -0
- package/dist/types/Components/APICall/parseProxy.d.ts +4 -0
- package/dist/types/Components/APICall/parseUrl.d.ts +7 -0
- package/dist/types/Components/APIEndpoint.class.d.ts +16 -0
- package/dist/types/Components/APIOutput.class.d.ts +15 -0
- package/dist/types/Components/AgentPlugin.class.d.ts +16 -0
- package/dist/types/Components/Async.class.d.ts +17 -0
- package/dist/types/Components/Await.class.d.ts +22 -0
- package/dist/types/Components/Classifier.class.d.ts +33 -0
- package/dist/types/Components/Component.class.d.ts +35 -0
- package/dist/types/Components/ComponentHost.class.d.ts +12 -0
- package/dist/types/Components/DataSourceCleaner.class.d.ts +19 -0
- package/dist/types/Components/DataSourceIndexer.class.d.ts +25 -0
- package/dist/types/Components/DataSourceLookup.class.d.ts +17 -0
- package/dist/types/Components/FEncDec.class.d.ts +17 -0
- package/dist/types/Components/FHash.class.d.ts +17 -0
- package/dist/types/Components/FSign.class.d.ts +18 -0
- package/dist/types/Components/FSleep.class.d.ts +19 -0
- package/dist/types/Components/FTimestamp.class.d.ts +19 -0
- package/dist/types/Components/FileStore.class.d.ts +11 -0
- package/dist/types/Components/ForEach.class.d.ts +16 -0
- package/dist/types/Components/GPTPlugin.class.d.ts +17 -0
- package/dist/types/Components/GenAILLM.class.d.ts +130 -0
- package/dist/types/Components/HuggingFace.class.d.ts +17 -0
- package/dist/types/Components/Image/imageSettings.config.d.ts +21 -0
- package/dist/types/Components/ImageGenerator.class.d.ts +17 -0
- package/dist/types/Components/JSONFilter.class.d.ts +13 -0
- package/dist/types/Components/LLMAssistant.class.d.ts +19 -0
- package/dist/types/Components/LogicAND.class.d.ts +7 -0
- package/dist/types/Components/LogicAtLeast.class.d.ts +9 -0
- package/dist/types/Components/LogicAtMost.class.d.ts +9 -0
- package/dist/types/Components/LogicOR.class.d.ts +7 -0
- package/dist/types/Components/LogicXOR.class.d.ts +7 -0
- package/dist/types/Components/MCPClient.class.d.ts +17 -0
- package/dist/types/Components/PromptGenerator.class.d.ts +19 -0
- package/dist/types/Components/ScrapflyWebScrape.class.d.ts +30 -0
- package/dist/types/Components/TavilyWebSearch.class.d.ts +31 -0
- package/dist/types/Components/index.d.ts +74 -0
- package/dist/types/Core/AgentProcess.helper.d.ts +36 -0
- package/dist/types/Core/Connector.class.d.ts +34 -0
- package/dist/types/Core/ConnectorsService.d.ts +64 -0
- package/dist/types/Core/DummyConnector.d.ts +4 -0
- package/dist/types/Core/HookService.d.ts +27 -0
- package/dist/types/Core/SmythRuntime.class.d.ts +28 -0
- package/dist/types/Core/SystemEvents.d.ts +12 -0
- package/dist/types/Core/boot.d.ts +1 -0
- package/dist/types/config.d.ts +11 -0
- package/dist/types/constants.d.ts +79 -0
- package/dist/types/helpers/BinaryInput.helper.d.ts +33 -0
- package/dist/types/helpers/Conversation.helper.d.ts +85 -0
- package/dist/types/helpers/JsonContent.helper.d.ts +16 -0
- package/dist/types/helpers/LocalCache.helper.d.ts +14 -0
- package/dist/types/helpers/Log.helper.d.ts +22 -0
- package/dist/types/helpers/OpenApiParser.helper.d.ts +10 -0
- package/dist/types/helpers/S3Cache.helper.d.ts +9 -0
- package/dist/types/helpers/SmythURI.helper.d.ts +3 -0
- package/dist/types/helpers/TemplateString.helper.d.ts +71 -0
- package/dist/types/helpers/TypeChecker.helper.d.ts +10 -0
- package/dist/types/index.d.ts +173 -0
- package/dist/types/subsystems/AgentManager/Agent.class.d.ts +78 -0
- package/dist/types/subsystems/AgentManager/Agent.helper.d.ts +1 -0
- package/dist/types/subsystems/AgentManager/AgentData.service/AgentDataConnector.d.ts +33 -0
- package/dist/types/subsystems/AgentManager/AgentData.service/connectors/CLIAgentDataConnector.class.d.ts +20 -0
- package/dist/types/subsystems/AgentManager/AgentData.service/connectors/LocalAgentDataConnector.class.d.ts +48 -0
- package/dist/types/subsystems/AgentManager/AgentData.service/connectors/NullAgentData.class.d.ts +19 -0
- package/dist/types/subsystems/AgentManager/AgentData.service/index.d.ts +4 -0
- package/dist/types/subsystems/AgentManager/AgentLogger.class.d.ts +11 -0
- package/dist/types/subsystems/AgentManager/AgentRequest.class.d.ts +15 -0
- package/dist/types/subsystems/AgentManager/AgentRuntime.class.d.ts +91 -0
- package/dist/types/subsystems/AgentManager/AgentSSE.class.d.ts +40 -0
- package/dist/types/subsystems/AgentManager/AgentSettings.class.d.ts +12 -0
- package/dist/types/subsystems/AgentManager/Component.service/ComponentConnector.d.ts +17 -0
- package/dist/types/subsystems/AgentManager/Component.service/connectors/LocalComponentConnector.class.d.ts +14 -0
- package/dist/types/subsystems/AgentManager/Component.service/index.d.ts +4 -0
- package/dist/types/subsystems/AgentManager/EmbodimentSettings.class.d.ts +8 -0
- package/dist/types/subsystems/AgentManager/ForkedAgent.class.d.ts +15 -0
- package/dist/types/subsystems/AgentManager/OSResourceMonitor.d.ts +2 -0
- package/dist/types/subsystems/ComputeManager/Code.service/CodeConnector.d.ts +58 -0
- package/dist/types/subsystems/ComputeManager/Code.service/connectors/AWSLambdaCode.class.d.ts +15 -0
- package/dist/types/subsystems/ComputeManager/Code.service/index.d.ts +4 -0
- package/dist/types/subsystems/IO/CLI.service/CLIConnector.d.ts +21 -0
- package/dist/types/subsystems/IO/CLI.service/index.d.ts +4 -0
- package/dist/types/subsystems/IO/Log.service/LogConnector.d.ts +17 -0
- package/dist/types/subsystems/IO/Log.service/connectors/ConsoleLog.class.d.ts +12 -0
- package/dist/types/subsystems/IO/Log.service/index.d.ts +4 -0
- package/dist/types/subsystems/IO/NKV.service/NKVConnector.d.ts +33 -0
- package/dist/types/subsystems/IO/NKV.service/connectors/NKVRAM.class.d.ts +43 -0
- package/dist/types/subsystems/IO/NKV.service/connectors/NKVRedis.class.d.ts +27 -0
- package/dist/types/subsystems/IO/NKV.service/index.d.ts +4 -0
- package/dist/types/subsystems/IO/Router.service/RouterConnector.d.ts +11 -0
- package/dist/types/subsystems/IO/Router.service/connectors/ExpressRouter.class.d.ts +21 -0
- package/dist/types/subsystems/IO/Router.service/connectors/NullRouter.class.d.ts +12 -0
- package/dist/types/subsystems/IO/Router.service/index.d.ts +4 -0
- package/dist/types/subsystems/IO/Storage.service/SmythFS.class.d.ts +49 -0
- package/dist/types/subsystems/IO/Storage.service/StorageConnector.d.ts +30 -0
- package/dist/types/subsystems/IO/Storage.service/connectors/LocalStorage.class.d.ts +58 -0
- package/dist/types/subsystems/IO/Storage.service/connectors/S3Storage.class.d.ts +53 -0
- package/dist/types/subsystems/IO/Storage.service/index.d.ts +4 -0
- package/dist/types/subsystems/IO/VectorDB.service/VectorDBConnector.d.ts +41 -0
- package/dist/types/subsystems/IO/VectorDB.service/connectors/MilvusVectorDB.class.d.ts +49 -0
- package/dist/types/subsystems/IO/VectorDB.service/connectors/PineconeVectorDB.class.d.ts +50 -0
- package/dist/types/subsystems/IO/VectorDB.service/connectors/RAMVecrtorDB.class.d.ts +52 -0
- package/dist/types/subsystems/IO/VectorDB.service/embed/BaseEmbedding.d.ts +53 -0
- package/dist/types/subsystems/IO/VectorDB.service/embed/OpenAIEmbedding.d.ts +16 -0
- package/dist/types/subsystems/IO/VectorDB.service/embed/index.d.ts +16 -0
- package/dist/types/subsystems/IO/VectorDB.service/index.d.ts +4 -0
- package/dist/types/subsystems/LLMManager/LLM.helper.d.ts +125 -0
- package/dist/types/subsystems/LLMManager/LLM.inference.d.ts +36 -0
- package/dist/types/subsystems/LLMManager/LLM.service/LLMConnector.d.ts +62 -0
- package/dist/types/subsystems/LLMManager/LLM.service/LLMCredentials.helper.d.ts +3 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/Anthropic.class.d.ts +68 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/Bedrock.class.d.ts +46 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/Echo.class.d.ts +18 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/GoogleAI.class.d.ts +57 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/Groq.class.d.ts +55 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/OpenAI.class.d.ts +92 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/Perplexity.class.d.ts +86 -0
- package/dist/types/subsystems/LLMManager/LLM.service/connectors/VertexAI.class.d.ts +38 -0
- package/dist/types/subsystems/LLMManager/LLM.service/index.d.ts +5 -0
- package/dist/types/subsystems/LLMManager/ModelsProvider.service/ModelsProviderConnector.d.ts +36 -0
- package/dist/types/subsystems/LLMManager/ModelsProvider.service/connectors/SmythModelsProvider.class.d.ts +39 -0
- package/dist/types/subsystems/LLMManager/ModelsProvider.service/index.d.ts +4 -0
- package/dist/types/subsystems/LLMManager/custom-models.d.ts +785 -0
- package/dist/types/subsystems/LLMManager/models.d.ts +2629 -0
- package/dist/types/subsystems/LLMManager/paramMappings.d.ts +69 -0
- package/dist/types/subsystems/MemoryManager/Cache.service/CacheConnector.d.ts +41 -0
- package/dist/types/subsystems/MemoryManager/Cache.service/connectors/LocalStorageCache.class.d.ts +33 -0
- package/dist/types/subsystems/MemoryManager/Cache.service/connectors/RAMCache.class.d.ts +31 -0
- package/dist/types/subsystems/MemoryManager/Cache.service/connectors/RedisCache.class.d.ts +33 -0
- package/dist/types/subsystems/MemoryManager/Cache.service/connectors/S3Cache.class.d.ts +38 -0
- package/dist/types/subsystems/MemoryManager/Cache.service/index.d.ts +4 -0
- package/dist/types/subsystems/MemoryManager/LLMCache.d.ts +27 -0
- package/dist/types/subsystems/MemoryManager/LLMContext.d.ts +25 -0
- package/dist/types/subsystems/MemoryManager/RuntimeContext.d.ts +50 -0
- package/dist/types/subsystems/Security/AccessControl/ACL.class.d.ts +29 -0
- package/dist/types/subsystems/Security/AccessControl/AccessCandidate.class.d.ts +21 -0
- package/dist/types/subsystems/Security/AccessControl/AccessRequest.class.d.ts +13 -0
- package/dist/types/subsystems/Security/Account.service/AccountConnector.d.ts +27 -0
- package/dist/types/subsystems/Security/Account.service/connectors/AWSAccount.class.d.ts +19 -0
- package/dist/types/subsystems/Security/Account.service/connectors/DummyAccount.class.d.ts +19 -0
- package/dist/types/subsystems/Security/Account.service/connectors/JSONFileAccount.class.d.ts +25 -0
- package/dist/types/subsystems/Security/Account.service/index.d.ts +4 -0
- package/dist/types/subsystems/Security/Credentials.helper.d.ts +16 -0
- package/dist/types/subsystems/Security/ManagedVault.service/ManagedVaultConnector.d.ts +23 -0
- package/dist/types/subsystems/Security/ManagedVault.service/connectors/NullManagedVault.class.d.ts +14 -0
- package/dist/types/subsystems/Security/ManagedVault.service/connectors/SecretManagerManagedVault.d.ts +22 -0
- package/dist/types/subsystems/Security/ManagedVault.service/index.d.ts +4 -0
- package/dist/types/subsystems/Security/SecureConnector.class.d.ts +13 -0
- package/dist/types/subsystems/Security/Vault.service/Vault.helper.d.ts +5 -0
- package/dist/types/subsystems/Security/Vault.service/VaultConnector.d.ts +17 -0
- package/dist/types/subsystems/Security/Vault.service/connectors/HashicorpVault.class.d.ts +13 -0
- package/dist/types/subsystems/Security/Vault.service/connectors/JSONFileVault.class.d.ts +23 -0
- package/dist/types/subsystems/Security/Vault.service/connectors/NullVault.class.d.ts +16 -0
- package/dist/types/subsystems/Security/Vault.service/connectors/SecretsManager.class.d.ts +20 -0
- package/dist/types/subsystems/Security/Vault.service/index.d.ts +4 -0
- package/dist/types/types/ACL.types.d.ts +83 -0
- package/dist/types/types/AWS.types.d.ts +7 -0
- package/dist/types/types/Agent.types.d.ts +52 -0
- package/dist/types/types/AgentLogger.types.d.ts +16 -0
- package/dist/types/types/Cache.types.d.ts +1 -0
- package/dist/types/types/Common.types.d.ts +3 -0
- package/dist/types/types/LLM.types.d.ts +365 -0
- package/dist/types/types/Redis.types.d.ts +6 -0
- package/dist/types/types/SRE.types.d.ts +60 -0
- package/dist/types/types/Security.types.d.ts +16 -0
- package/dist/types/types/Storage.types.d.ts +3 -0
- package/dist/types/types/VectorDB.types.d.ts +66 -0
- package/dist/types/utils/base64.utils.d.ts +86 -0
- package/dist/types/utils/cli.utils.d.ts +20 -0
- package/dist/types/utils/data.utils.d.ts +17 -0
- package/dist/types/utils/date-time.utils.d.ts +3 -0
- package/dist/types/utils/general.utils.d.ts +75 -0
- package/dist/types/utils/index.d.ts +9 -0
- package/dist/types/utils/numbers.utils.d.ts +2 -0
- package/dist/types/utils/oauth.utils.d.ts +7 -0
- package/dist/types/utils/string.utils.d.ts +28 -0
- package/dist/types/utils/url.utils.d.ts +1 -0
- package/dist/types/utils/validation.utils.d.ts +25 -0
- package/package.json +117 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { Agent } from '@sre/AgentManager/Agent.class';
|
|
3
|
+
import { Component } from '../Component.class';
|
|
4
|
+
export declare class APICall extends Component {
|
|
5
|
+
protected schema: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
inputs: {};
|
|
9
|
+
outputs: {
|
|
10
|
+
Headers: {
|
|
11
|
+
description: string;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
Response: {
|
|
15
|
+
description: string;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
21
|
+
constructor();
|
|
22
|
+
init(): void;
|
|
23
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
24
|
+
Response: any;
|
|
25
|
+
Headers: any;
|
|
26
|
+
_error: any;
|
|
27
|
+
_debug: string;
|
|
28
|
+
} | {
|
|
29
|
+
_error: any;
|
|
30
|
+
_debug: string;
|
|
31
|
+
Response?: undefined;
|
|
32
|
+
Headers?: undefined;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Agent } from '@sre/AgentManager/Agent.class';
|
|
2
|
+
declare class AccessTokenManager {
|
|
3
|
+
private clientId;
|
|
4
|
+
private clientSecret;
|
|
5
|
+
private primaryToken;
|
|
6
|
+
private secondaryToken;
|
|
7
|
+
private tokenUrl;
|
|
8
|
+
private expires_in;
|
|
9
|
+
private data;
|
|
10
|
+
private keyId;
|
|
11
|
+
private logger;
|
|
12
|
+
private agent;
|
|
13
|
+
constructor(clientId: string, clientSecret: string, secondaryToken: string, tokenUrl: string, expires_in: any, primaryToken: string, data: any, keyId: any, logger: any, agent: Agent);
|
|
14
|
+
getAccessToken(): Promise<string>;
|
|
15
|
+
refreshAccessToken(): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
export default AccessTokenManager;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import OAuth from 'oauth-1.0a';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
export declare function extractAdditionalParamsForOAuth1(reqConfig?: AxiosRequestConfig): {};
|
|
4
|
+
export declare const buildOAuth1Header: (url: any, method: any, oauth1Credentials: any, additionalParams?: {}) => OAuth.Header;
|
|
5
|
+
export declare const retrieveOAuthTokens: (agent: any, config: any) => Promise<{
|
|
6
|
+
responseData: any;
|
|
7
|
+
data: any;
|
|
8
|
+
keyId: any;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const handleOAuthHeaders: (agent: any, config: any, reqConfig: any, logger: any, additionalParams: {}, rootUrl: any) => Promise<{}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AxiosProxyConfig } from 'axios';
|
|
2
|
+
import { SocksProxyAgent } from 'socks-proxy-agent';
|
|
3
|
+
import { Agent } from '@sre/AgentManager/Agent.class';
|
|
4
|
+
export declare function parseProxy(input: any, config: any, agent: Agent): Promise<AxiosProxyConfig | SocksProxyAgent | false>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Agent } from '@sre/AgentManager/Agent.class';
|
|
2
|
+
export declare function parseUrl(input: any, config: any, agent: Agent): Promise<string>;
|
|
3
|
+
export declare function parseSmythFsUrl(url: string, agent: Agent): Promise<{
|
|
4
|
+
url: string;
|
|
5
|
+
publicUrls: string[];
|
|
6
|
+
}>;
|
|
7
|
+
export declare function destroyPublicUrls(publicUrls: string[]): Promise<boolean>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
import { Component } from './Component.class';
|
|
4
|
+
export declare class APIEndpoint extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
headers: any;
|
|
10
|
+
body: any;
|
|
11
|
+
query: any;
|
|
12
|
+
params: any;
|
|
13
|
+
_authInfo: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
import Joi from 'joi';
|
|
4
|
+
export declare class APIOutput extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
hasPostProcess: boolean;
|
|
7
|
+
constructor();
|
|
8
|
+
init(): void;
|
|
9
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
10
|
+
Output: {};
|
|
11
|
+
_error: any;
|
|
12
|
+
_debug: string;
|
|
13
|
+
}>;
|
|
14
|
+
postProcess(output: any, config: any, agent: Agent): Promise<any>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
import { Component } from './Component.class';
|
|
4
|
+
export declare class AgentPlugin extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
8
|
+
_error: string;
|
|
9
|
+
_debug: string;
|
|
10
|
+
Response?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
Response: any;
|
|
13
|
+
_debug: string;
|
|
14
|
+
_error?: undefined;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
export declare class Async extends Component {
|
|
4
|
+
static JOBS: {};
|
|
5
|
+
protected configSchema: any;
|
|
6
|
+
static ForkedAgent: any;
|
|
7
|
+
constructor();
|
|
8
|
+
init(): void;
|
|
9
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
10
|
+
JobID: any;
|
|
11
|
+
} | {
|
|
12
|
+
JobID?: undefined;
|
|
13
|
+
}>;
|
|
14
|
+
private cleanJobIDBranch;
|
|
15
|
+
private removeOrphanedBranches;
|
|
16
|
+
private removeComponent;
|
|
17
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
import Joi from 'joi';
|
|
4
|
+
export declare class Await extends Component {
|
|
5
|
+
static WAITS: {};
|
|
6
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
7
|
+
constructor();
|
|
8
|
+
init(): void;
|
|
9
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
10
|
+
Results: any;
|
|
11
|
+
_error: any;
|
|
12
|
+
_debug: string;
|
|
13
|
+
_debug_time: number;
|
|
14
|
+
Output?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
Output: any;
|
|
17
|
+
_error: any;
|
|
18
|
+
_debug: string;
|
|
19
|
+
_debug_time: number;
|
|
20
|
+
Results?: undefined;
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
4
|
+
export declare class Classifier extends Component {
|
|
5
|
+
protected schema: {
|
|
6
|
+
name: string;
|
|
7
|
+
settings: {
|
|
8
|
+
model: {
|
|
9
|
+
type: string;
|
|
10
|
+
max: number;
|
|
11
|
+
required: boolean;
|
|
12
|
+
};
|
|
13
|
+
prompt: {
|
|
14
|
+
type: string;
|
|
15
|
+
max: number;
|
|
16
|
+
allow: string;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
inputs: {
|
|
21
|
+
Input: {
|
|
22
|
+
type: string;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
28
|
+
constructor();
|
|
29
|
+
init(): void;
|
|
30
|
+
escapeJSONString(str: string): string;
|
|
31
|
+
unescapeJSONString(str: string): string;
|
|
32
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
export type ComponentSchema = {
|
|
3
|
+
name: string;
|
|
4
|
+
settings?: Record<string, any>;
|
|
5
|
+
inputs?: Record<string, any>;
|
|
6
|
+
outputs?: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
export declare class Component {
|
|
9
|
+
hasReadOutput: boolean;
|
|
10
|
+
hasPostProcess: boolean;
|
|
11
|
+
alwaysActive: boolean;
|
|
12
|
+
exclusive: boolean;
|
|
13
|
+
protected schema: ComponentSchema;
|
|
14
|
+
protected configSchema: any;
|
|
15
|
+
constructor();
|
|
16
|
+
init(): void;
|
|
17
|
+
createComponentLogger(agent: Agent, configuration: any): import("@sre/helpers/Log.helper").LogHelper;
|
|
18
|
+
validateConfig(config: any): Promise<{
|
|
19
|
+
id?: undefined;
|
|
20
|
+
name?: undefined;
|
|
21
|
+
_error?: undefined;
|
|
22
|
+
_debug?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
id: any;
|
|
25
|
+
name: any;
|
|
26
|
+
_error: string;
|
|
27
|
+
_debug: string;
|
|
28
|
+
}>;
|
|
29
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
30
|
+
postProcess(output: any, config: any, agent: Agent): Promise<any>;
|
|
31
|
+
enable(config: any, agent: Agent): Promise<any>;
|
|
32
|
+
disable(config: any, agent: Agent): Promise<any>;
|
|
33
|
+
readOutput(id: any, config: any, agent: Agent): any;
|
|
34
|
+
hasOutput(id: any, config: any, agent: Agent): any;
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
/**
|
|
4
|
+
* This component allows running components that are not natively shiped with SRE
|
|
5
|
+
* it can be used to extend SRE components by registering custom component using ComponentService
|
|
6
|
+
*/
|
|
7
|
+
export declare class ComponentHost extends Component {
|
|
8
|
+
protected configSchema: any;
|
|
9
|
+
constructor();
|
|
10
|
+
init(): void;
|
|
11
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
import Joi from 'joi';
|
|
4
|
+
export declare class DataSourceCleaner extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
_debug: string;
|
|
10
|
+
Success: boolean;
|
|
11
|
+
_error?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
_debug: string;
|
|
14
|
+
_error: any;
|
|
15
|
+
Success?: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
validateInput(input: any): Joi.ValidationResult<any>;
|
|
18
|
+
validateConfigData(data: any): Joi.ValidationResult<any>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
import Joi from 'joi';
|
|
4
|
+
export declare class DataSourceIndexer extends Component {
|
|
5
|
+
private MAX_ALLOWED_URLS_PER_INPUT;
|
|
6
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
7
|
+
constructor();
|
|
8
|
+
init(): void;
|
|
9
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
10
|
+
_debug: string;
|
|
11
|
+
Success: {
|
|
12
|
+
result: any;
|
|
13
|
+
id: any;
|
|
14
|
+
};
|
|
15
|
+
_error?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
_debug: string;
|
|
18
|
+
_error: any;
|
|
19
|
+
Success?: undefined;
|
|
20
|
+
}>;
|
|
21
|
+
validateInput(input: any): Joi.ValidationResult<any>;
|
|
22
|
+
private addDSFromText;
|
|
23
|
+
static genDsId(providedId: string, teamId: string, namespaceId: string): string;
|
|
24
|
+
private addDSFromUrl;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
import { Component } from './Component.class';
|
|
4
|
+
export declare class DataSourceLookup extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
Results: string[] | {
|
|
10
|
+
content: string;
|
|
11
|
+
metadata: any;
|
|
12
|
+
}[];
|
|
13
|
+
_error: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
}>;
|
|
16
|
+
private parseMetadata;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
export declare class FEncDec extends Component {
|
|
4
|
+
constructor();
|
|
5
|
+
init(): void;
|
|
6
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
7
|
+
Output: string;
|
|
8
|
+
_error: any;
|
|
9
|
+
_debug: string;
|
|
10
|
+
hash?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
hash: any;
|
|
13
|
+
_error: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
Output?: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
export declare class FHash extends Component {
|
|
4
|
+
constructor();
|
|
5
|
+
init(): void;
|
|
6
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
7
|
+
Hash: string;
|
|
8
|
+
_error: any;
|
|
9
|
+
_debug: string;
|
|
10
|
+
hash?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
hash: any;
|
|
13
|
+
_error: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
Hash?: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
export declare class FSign extends Component {
|
|
4
|
+
constructor();
|
|
5
|
+
init(): void;
|
|
6
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
7
|
+
Signature: string;
|
|
8
|
+
_error: any;
|
|
9
|
+
_debug: string;
|
|
10
|
+
hash?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
hash: any;
|
|
13
|
+
_error: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
Signature?: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
private signData;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
export declare class FSleep extends Component {
|
|
4
|
+
constructor();
|
|
5
|
+
init(): void;
|
|
6
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
7
|
+
Output: any;
|
|
8
|
+
_error: any;
|
|
9
|
+
_debug: string;
|
|
10
|
+
_debug_time: number;
|
|
11
|
+
hash?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
hash: any;
|
|
14
|
+
_error: any;
|
|
15
|
+
_debug: string;
|
|
16
|
+
_debug_time: number;
|
|
17
|
+
Output?: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
export declare class FTimestamp extends Component {
|
|
4
|
+
constructor();
|
|
5
|
+
init(): void;
|
|
6
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
7
|
+
Timestamp: number;
|
|
8
|
+
_error: any;
|
|
9
|
+
_debug: string;
|
|
10
|
+
_debug_time: number;
|
|
11
|
+
hash?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
hash: any;
|
|
14
|
+
_error: any;
|
|
15
|
+
_debug: string;
|
|
16
|
+
_debug_time: number;
|
|
17
|
+
Timestamp?: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
import Joi from 'joi';
|
|
4
|
+
export declare class FileStore extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
9
|
+
getExtension(mimeType: string): string;
|
|
10
|
+
getFileName(customName: string, extension: string): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import { Component } from './Component.class';
|
|
3
|
+
export declare class ForEach extends Component {
|
|
4
|
+
protected configSchema: any;
|
|
5
|
+
constructor();
|
|
6
|
+
init(): void;
|
|
7
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
8
|
+
Loop: {};
|
|
9
|
+
Result: any;
|
|
10
|
+
_temp_result: any;
|
|
11
|
+
_error: any;
|
|
12
|
+
_in_progress: boolean;
|
|
13
|
+
_debug: string;
|
|
14
|
+
}>;
|
|
15
|
+
postProcess(output: any, config: any, agent: Agent): Promise<any>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { Agent } from '@sre/AgentManager/Agent.class';
|
|
3
|
+
import { Component } from './Component.class';
|
|
4
|
+
export declare class GPTPlugin extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
_error: string;
|
|
10
|
+
_debug: string;
|
|
11
|
+
Output?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
Output: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
_error?: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
import { Component } from './Component.class';
|
|
4
|
+
export declare class GenAILLM extends Component {
|
|
5
|
+
protected schema: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
settings: {
|
|
9
|
+
model: {
|
|
10
|
+
type: string;
|
|
11
|
+
max: number;
|
|
12
|
+
required: boolean;
|
|
13
|
+
};
|
|
14
|
+
prompt: {
|
|
15
|
+
type: string;
|
|
16
|
+
max: number;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
temperature: {
|
|
20
|
+
type: string;
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
label: string;
|
|
24
|
+
};
|
|
25
|
+
maxTokens: {
|
|
26
|
+
type: string;
|
|
27
|
+
min: number;
|
|
28
|
+
label: string;
|
|
29
|
+
};
|
|
30
|
+
maxThinkingTokens: {
|
|
31
|
+
type: string;
|
|
32
|
+
min: number;
|
|
33
|
+
label: string;
|
|
34
|
+
};
|
|
35
|
+
stopSequences: {
|
|
36
|
+
type: string;
|
|
37
|
+
max: number;
|
|
38
|
+
label: string;
|
|
39
|
+
allowEmpty: boolean;
|
|
40
|
+
};
|
|
41
|
+
topP: {
|
|
42
|
+
type: string;
|
|
43
|
+
min: number;
|
|
44
|
+
max: number;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
topK: {
|
|
48
|
+
type: string;
|
|
49
|
+
min: number;
|
|
50
|
+
max: number;
|
|
51
|
+
label: string;
|
|
52
|
+
};
|
|
53
|
+
frequencyPenalty: {
|
|
54
|
+
type: string;
|
|
55
|
+
min: number;
|
|
56
|
+
max: number;
|
|
57
|
+
label: string;
|
|
58
|
+
};
|
|
59
|
+
presencePenalty: {
|
|
60
|
+
type: string;
|
|
61
|
+
min: number;
|
|
62
|
+
max: number;
|
|
63
|
+
label: string;
|
|
64
|
+
};
|
|
65
|
+
responseFormat: {
|
|
66
|
+
type: string;
|
|
67
|
+
valid: string[];
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
passthrough: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
label: string;
|
|
74
|
+
};
|
|
75
|
+
useSystemPrompt: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
label: string;
|
|
79
|
+
};
|
|
80
|
+
useContextWindow: {
|
|
81
|
+
type: string;
|
|
82
|
+
description: string;
|
|
83
|
+
label: string;
|
|
84
|
+
};
|
|
85
|
+
maxContextWindowLength: {
|
|
86
|
+
type: string;
|
|
87
|
+
min: number;
|
|
88
|
+
description: string;
|
|
89
|
+
label: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
inputs: {
|
|
93
|
+
Input: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
Attachment: {
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
optional: boolean;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
outputs: {
|
|
104
|
+
Reply: {
|
|
105
|
+
default: boolean;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
110
|
+
constructor();
|
|
111
|
+
init(): void;
|
|
112
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
113
|
+
Reply: any;
|
|
114
|
+
} | {
|
|
115
|
+
Reply: any;
|
|
116
|
+
_error: string;
|
|
117
|
+
_debug: string;
|
|
118
|
+
Output?: undefined;
|
|
119
|
+
} | {
|
|
120
|
+
Output: any;
|
|
121
|
+
_error: string;
|
|
122
|
+
_debug: string;
|
|
123
|
+
Reply?: undefined;
|
|
124
|
+
} | {
|
|
125
|
+
_error: any;
|
|
126
|
+
_debug: string;
|
|
127
|
+
Reply?: undefined;
|
|
128
|
+
Output?: undefined;
|
|
129
|
+
}>;
|
|
130
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
3
|
+
import Joi from 'joi';
|
|
4
|
+
export declare class HuggingFace extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
_error: any;
|
|
10
|
+
_debug: string;
|
|
11
|
+
Output?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
Output: any;
|
|
14
|
+
_debug: string;
|
|
15
|
+
_error?: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Joi from 'joi';
|
|
2
|
+
export declare const ImageSettingsConfig: {
|
|
3
|
+
model: Joi.StringSchema<string>;
|
|
4
|
+
positivePrompt: Joi.StringSchema<string>;
|
|
5
|
+
negativePrompt: Joi.StringSchema<string>;
|
|
6
|
+
width: Joi.NumberSchema<number>;
|
|
7
|
+
height: Joi.NumberSchema<number>;
|
|
8
|
+
outputFormat: Joi.StringSchema<string>;
|
|
9
|
+
outputQuality: Joi.NumberSchema<number>;
|
|
10
|
+
numberResults: Joi.NumberSchema<number>;
|
|
11
|
+
steps: Joi.NumberSchema<number>;
|
|
12
|
+
backgroundColor: Joi.ArraySchema<any[]>;
|
|
13
|
+
strength: Joi.NumberSchema<number>;
|
|
14
|
+
upscaleFactor: Joi.NumberSchema<number>;
|
|
15
|
+
confidence: Joi.NumberSchema<number>;
|
|
16
|
+
maxDetections: Joi.NumberSchema<number>;
|
|
17
|
+
maskPadding: Joi.NumberSchema<number>;
|
|
18
|
+
maskBlur: Joi.NumberSchema<number>;
|
|
19
|
+
preProcessorType: Joi.StringSchema<string>;
|
|
20
|
+
ipAdapters: Joi.ArraySchema<any[]>;
|
|
21
|
+
};
|