@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,85 @@
|
|
|
1
|
+
import { LLMContext } from '@sre/MemoryManager/LLMContext';
|
|
2
|
+
import { ILLMContextStore, TLLMModel } from '@sre/types/LLM.types';
|
|
3
|
+
import EventEmitter from 'events';
|
|
4
|
+
export declare class Conversation extends EventEmitter {
|
|
5
|
+
private _model;
|
|
6
|
+
private _specSource?;
|
|
7
|
+
private _settings?;
|
|
8
|
+
private _agentId;
|
|
9
|
+
private _systemPrompt;
|
|
10
|
+
private userDefinedSystemPrompt;
|
|
11
|
+
toolChoice: string;
|
|
12
|
+
get systemPrompt(): any;
|
|
13
|
+
set systemPrompt(systemPrompt: any);
|
|
14
|
+
assistantName: any;
|
|
15
|
+
private _reqMethods;
|
|
16
|
+
private _toolsConfig;
|
|
17
|
+
private _endpoints;
|
|
18
|
+
private _baseUrl;
|
|
19
|
+
private _status;
|
|
20
|
+
private _currentWaitPromise;
|
|
21
|
+
private _llmContextStore;
|
|
22
|
+
private _context;
|
|
23
|
+
private _maxContextSize;
|
|
24
|
+
private _maxOutputTokens;
|
|
25
|
+
private _teamId;
|
|
26
|
+
private _agentVersion;
|
|
27
|
+
agentData: any;
|
|
28
|
+
get context(): LLMContext;
|
|
29
|
+
private _lastError;
|
|
30
|
+
private _spec;
|
|
31
|
+
private _customToolsDeclarations;
|
|
32
|
+
private _customToolsHandlers;
|
|
33
|
+
stop: boolean;
|
|
34
|
+
set spec(specSource: any);
|
|
35
|
+
set model(model: string | TLLMModel);
|
|
36
|
+
get model(): string | TLLMModel;
|
|
37
|
+
constructor(_model: string | TLLMModel, _specSource?: string | Record<string, any>, _settings?: {
|
|
38
|
+
maxContextSize?: number;
|
|
39
|
+
maxOutputTokens?: number;
|
|
40
|
+
systemPrompt?: string;
|
|
41
|
+
toolChoice?: string;
|
|
42
|
+
store?: ILLMContextStore;
|
|
43
|
+
experimentalCache?: boolean;
|
|
44
|
+
toolsStrategy?: (toolsConfig: any) => any;
|
|
45
|
+
agentId?: string;
|
|
46
|
+
agentVersion?: string;
|
|
47
|
+
});
|
|
48
|
+
get ready(): any;
|
|
49
|
+
prompt(message?: string, toolHeaders?: {}, concurrentToolCalls?: number, abortSignal?: AbortSignal): Promise<any>;
|
|
50
|
+
streamPrompt(message?: string, toolHeaders?: {}, concurrentToolCalls?: number, abortSignal?: AbortSignal): Promise<any>;
|
|
51
|
+
private resolveToolEndpoint;
|
|
52
|
+
private useTool;
|
|
53
|
+
addTool(tool: {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
arguments?: Record<string, any> | string[];
|
|
57
|
+
handler: (args: Record<string, any>) => Promise<any>;
|
|
58
|
+
inputs?: any[];
|
|
59
|
+
}): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* updates LLM model, if spec is available, it will update the tools config
|
|
62
|
+
* @param model
|
|
63
|
+
*/
|
|
64
|
+
private updateModel;
|
|
65
|
+
/**
|
|
66
|
+
* this function is used to patch the spec with missing fields that are required for the tool to work
|
|
67
|
+
* @param spec
|
|
68
|
+
*/
|
|
69
|
+
private patchSpec;
|
|
70
|
+
/**
|
|
71
|
+
* Loads OpenAPI specification from source
|
|
72
|
+
* @param specSource
|
|
73
|
+
* @returns
|
|
74
|
+
*/
|
|
75
|
+
private loadSpecFromSource;
|
|
76
|
+
private loadSpecFromAgent;
|
|
77
|
+
/**
|
|
78
|
+
* Extracts function declarations from OpenAPI specification
|
|
79
|
+
* @param spec
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
private getFunctionDeclarations;
|
|
83
|
+
private assignTeamIdFromAgentId;
|
|
84
|
+
private extractArgsAsOpenAPI;
|
|
85
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class JSONContentHelper {
|
|
2
|
+
private dataString;
|
|
3
|
+
private _current;
|
|
4
|
+
get result(): string;
|
|
5
|
+
private constructor();
|
|
6
|
+
static create(dataString: string): JSONContentHelper;
|
|
7
|
+
/**
|
|
8
|
+
* This a permissive json parsing function : It tries to extract and parse a JSON object from a string. If it fails, it returns the original string.
|
|
9
|
+
* if the string is not a JSON representation, but contains a JSON object, it will extract and parse it.
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
tryParse(): any;
|
|
13
|
+
tryFullParse(): any;
|
|
14
|
+
private extractJsonFromString;
|
|
15
|
+
}
|
|
16
|
+
export declare function JSONContent(dataString: string): JSONContentHelper;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class LocalCache<K, V> {
|
|
2
|
+
private cache;
|
|
3
|
+
private expiryMap;
|
|
4
|
+
private timeouts;
|
|
5
|
+
private defaultTTL;
|
|
6
|
+
constructor(defaultTTL?: number);
|
|
7
|
+
set(key: K, value: V, ttlMs?: number): void;
|
|
8
|
+
updateTTL(key: K, ttlMs?: number): void;
|
|
9
|
+
get(key: K, ttlMs?: number): V | undefined;
|
|
10
|
+
has(key: K): boolean;
|
|
11
|
+
delete(key: K): boolean;
|
|
12
|
+
clear(): void;
|
|
13
|
+
private clearTimeout;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import 'dotenv/config';
|
|
2
|
+
import winston from 'winston';
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
export declare class LogHelper extends EventEmitter {
|
|
5
|
+
private _logger;
|
|
6
|
+
data: any;
|
|
7
|
+
private labels;
|
|
8
|
+
startTime: number;
|
|
9
|
+
get output(): string;
|
|
10
|
+
get elapsedTime(): number;
|
|
11
|
+
constructor(_logger: winston.Logger, data: any, labels: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
});
|
|
14
|
+
log(...args: any[]): void;
|
|
15
|
+
warn(...args: any[]): void;
|
|
16
|
+
debug(...args: any[]): void;
|
|
17
|
+
info(...args: any[]): void;
|
|
18
|
+
verbose(...args: any[]): void;
|
|
19
|
+
error(...args: any[]): void;
|
|
20
|
+
close(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function Logger(module: string, withMemoryStore?: boolean): LogHelper;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type JSONSchema = Record<string, any>;
|
|
2
|
+
export declare class OpenAPIParser {
|
|
3
|
+
static mapReqMethods(paths: Array<Record<string, any>>): Map<string, any>;
|
|
4
|
+
static mapEndpoints(paths: Array<Record<string, any>>): Map<string, any>;
|
|
5
|
+
static yamlToJson(yamlData: string): Promise<JSONSchema>;
|
|
6
|
+
static getJson(data: string | Record<string, any>): Promise<Record<string, any>>;
|
|
7
|
+
static getJsonFromUrl(url: string): Promise<Record<string, any>>;
|
|
8
|
+
static isValidOpenAPI(data: Record<string, any>): boolean;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { S3Client } from '@aws-sdk/client-s3';
|
|
2
|
+
export declare function generateLifecycleRules(): any[];
|
|
3
|
+
export declare function generateExpiryMetadata(expiryDays: any): {
|
|
4
|
+
Key: string;
|
|
5
|
+
Value: any;
|
|
6
|
+
};
|
|
7
|
+
export declare function getNonExistingRules(existingRules: any[], newRules: any[]): any[];
|
|
8
|
+
export declare function ttlToExpiryDays(ttl: number): number;
|
|
9
|
+
export declare function checkAndInstallLifecycleRules(bucketName: string, s3Client: S3Client): Promise<void>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export type TemplateStringMatch = RegExp;
|
|
2
|
+
export declare const Match: {
|
|
3
|
+
default: RegExp;
|
|
4
|
+
doubleCurly: RegExp;
|
|
5
|
+
singleCurly: RegExp;
|
|
6
|
+
doubleCurlyForSingleMatch: RegExp;
|
|
7
|
+
templateVariables: RegExp;
|
|
8
|
+
prefix(prefix: string): RegExp;
|
|
9
|
+
suffix(suffix: string): RegExp;
|
|
10
|
+
prefSuf(prefix: string, suffix: string): RegExp;
|
|
11
|
+
fn(name: string): RegExp;
|
|
12
|
+
};
|
|
13
|
+
export declare const TPLProcessor: {
|
|
14
|
+
vaultTeam(teamId: string): (token: any) => Promise<string>;
|
|
15
|
+
componentTemplateVar(templateSettings: Record<string, any>): (token: any, matches: any) => Promise<string>;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Provides a chainable to manipulate template strings
|
|
19
|
+
*
|
|
20
|
+
* Template strings are strings that can contain placeholders, which are expressions that get evaluated to produce a resulting string.
|
|
21
|
+
* The placeholders are defined by double curly braces `{{` and `}}`.
|
|
22
|
+
*/
|
|
23
|
+
export declare class TemplateStringHelper {
|
|
24
|
+
private templateString;
|
|
25
|
+
private _current;
|
|
26
|
+
private _promiseQueue;
|
|
27
|
+
get result(): string;
|
|
28
|
+
get asyncResult(): Promise<string>;
|
|
29
|
+
private constructor();
|
|
30
|
+
static create(templateString: string): TemplateStringHelper;
|
|
31
|
+
/**
|
|
32
|
+
* Parses a template string by replacing the placeholders with the values from the provided data object
|
|
33
|
+
* unmatched placeholders will be left as is
|
|
34
|
+
*/
|
|
35
|
+
parse(data: Record<string, string>, regex?: TemplateStringMatch): this;
|
|
36
|
+
/**
|
|
37
|
+
* Parses a template string by replacing placeholders with values from the provided data object, keeping the original raw values intact. This is particularly important for BinaryInput instances, as they include buffer data.
|
|
38
|
+
* unmatched placeholders will be left as is
|
|
39
|
+
*/
|
|
40
|
+
parseRaw(data: Record<string, string>, regex?: TemplateStringMatch): this;
|
|
41
|
+
/**
|
|
42
|
+
* This is a shortcut function that parses vault key values and replace them with corresponding values from team vault
|
|
43
|
+
* @param teamId
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
parseTeamKeysAsync(teamId: string): this;
|
|
47
|
+
/**
|
|
48
|
+
* This is a shortcut function that parses component template variables and replace them with their corresponding values
|
|
49
|
+
* @param templateSettings the component template settings to be used for parsing
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
parseComponentTemplateVarsAsync(templateSettings: Record<string, any>): this;
|
|
53
|
+
/**
|
|
54
|
+
* Processes a template string by replacing the placeholders with the result of the provided processor function
|
|
55
|
+
* The processor function receives the token as an argument and should return the value to replace the token with
|
|
56
|
+
* If the processor function returns undefined, the token will be left as is
|
|
57
|
+
*/
|
|
58
|
+
process(processor: (token: any, matches?: any) => Promise<string> | string, regex?: TemplateStringMatch): this;
|
|
59
|
+
/**
|
|
60
|
+
* Removes all placeholders from the template string, leaving only the plain text
|
|
61
|
+
* This is useful when you want to clean up a template string that has placeholders that were not parsed
|
|
62
|
+
*/
|
|
63
|
+
clean(regex?: TemplateStringMatch, replaceWith?: string): this;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* a helper function that takes a string and escape it
|
|
67
|
+
* This is useful when you have a stringified json and want to replace one of its values while making sure it won't break the json structure (e.g new lines, double quotes ...etc)
|
|
68
|
+
*/
|
|
69
|
+
export declare function escapeString(str?: string): string;
|
|
70
|
+
export declare function escapeJsonField(str?: string): string;
|
|
71
|
+
export declare function TemplateString(templateString: string): TemplateStringHelper;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
export declare const inputErrMsg: (type: any, name: any) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Performs type inference on the inputs based on the input config
|
|
5
|
+
* @param inputs - The inputs to perform type inference on
|
|
6
|
+
* @param inputConfig - The input config to perform type inference on
|
|
7
|
+
* @param agent - The agent to perform type inference on
|
|
8
|
+
* @returns The inputs with the inferred types
|
|
9
|
+
*/
|
|
10
|
+
export declare function performTypeInference(inputs: Record<string, any>, inputConfig: Record<string, any>[], agent: Agent): Promise<Record<string, any>>;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export { version } from '../package.json';
|
|
2
|
+
export * from './config';
|
|
3
|
+
export * from './constants';
|
|
4
|
+
export * from './Components/AgentPlugin.class';
|
|
5
|
+
export * from './Components/APIEndpoint.class';
|
|
6
|
+
export * from './Components/APIOutput.class';
|
|
7
|
+
export * from './Components/Async.class';
|
|
8
|
+
export * from './Components/Await.class';
|
|
9
|
+
export * from './Components/Classifier.class';
|
|
10
|
+
export * from './Components/Component.class';
|
|
11
|
+
export * from './Components/ComponentHost.class';
|
|
12
|
+
export * from './Components/DataSourceCleaner.class';
|
|
13
|
+
export * from './Components/DataSourceIndexer.class';
|
|
14
|
+
export * from './Components/DataSourceLookup.class';
|
|
15
|
+
export * from './Components/FEncDec.class';
|
|
16
|
+
export * from './Components/FHash.class';
|
|
17
|
+
export * from './Components/FileStore.class';
|
|
18
|
+
export * from './Components/ForEach.class';
|
|
19
|
+
export * from './Components/FSign.class';
|
|
20
|
+
export * from './Components/FSleep.class';
|
|
21
|
+
export * from './Components/FTimestamp.class';
|
|
22
|
+
export * from './Components/GenAILLM.class';
|
|
23
|
+
export * from './Components/GPTPlugin.class';
|
|
24
|
+
export * from './Components/HuggingFace.class';
|
|
25
|
+
export * from './Components/ImageGenerator.class';
|
|
26
|
+
export * from './Components/index';
|
|
27
|
+
export * from './Components/JSONFilter.class';
|
|
28
|
+
export * from './Components/LLMAssistant.class';
|
|
29
|
+
export * from './Components/LogicAND.class';
|
|
30
|
+
export * from './Components/LogicAtLeast.class';
|
|
31
|
+
export * from './Components/LogicAtMost.class';
|
|
32
|
+
export * from './Components/LogicOR.class';
|
|
33
|
+
export * from './Components/LogicXOR.class';
|
|
34
|
+
export * from './Components/MCPClient.class';
|
|
35
|
+
export * from './Components/PromptGenerator.class';
|
|
36
|
+
export * from './Components/ScrapflyWebScrape.class';
|
|
37
|
+
export * from './Components/TavilyWebSearch.class';
|
|
38
|
+
export * from './Core/AgentProcess.helper';
|
|
39
|
+
export * from './Core/boot';
|
|
40
|
+
export * from './Core/Connector.class';
|
|
41
|
+
export * from './Core/ConnectorsService';
|
|
42
|
+
export * from './Core/DummyConnector';
|
|
43
|
+
export * from './Core/HookService';
|
|
44
|
+
export * from './Core/SmythRuntime.class';
|
|
45
|
+
export * from './Core/SystemEvents';
|
|
46
|
+
export * from './helpers/BinaryInput.helper';
|
|
47
|
+
export * from './helpers/Conversation.helper';
|
|
48
|
+
export * from './helpers/JsonContent.helper';
|
|
49
|
+
export * from './helpers/LocalCache.helper';
|
|
50
|
+
export * from './helpers/Log.helper';
|
|
51
|
+
export * from './helpers/OpenApiParser.helper';
|
|
52
|
+
export * from './helpers/S3Cache.helper';
|
|
53
|
+
export * from './helpers/SmythURI.helper';
|
|
54
|
+
export * from './helpers/TemplateString.helper';
|
|
55
|
+
export * from './helpers/TypeChecker.helper';
|
|
56
|
+
export * from './types/ACL.types';
|
|
57
|
+
export * from './types/Agent.types';
|
|
58
|
+
export * from './types/AgentLogger.types';
|
|
59
|
+
export * from './types/AWS.types';
|
|
60
|
+
export * from './types/Cache.types';
|
|
61
|
+
export * from './types/Common.types';
|
|
62
|
+
export * from './types/LLM.types';
|
|
63
|
+
export * from './types/Redis.types';
|
|
64
|
+
export * from './types/Security.types';
|
|
65
|
+
export * from './types/SRE.types';
|
|
66
|
+
export * from './types/Storage.types';
|
|
67
|
+
export * from './types/VectorDB.types';
|
|
68
|
+
export * from './Components/APICall/AccessTokenManager';
|
|
69
|
+
export * from './Components/APICall/APICall.class';
|
|
70
|
+
export * from './Components/APICall/ArrayBufferResponse.helper';
|
|
71
|
+
export * from './Components/APICall/mimeTypeCategories';
|
|
72
|
+
export * from './Components/APICall/OAuth.helper';
|
|
73
|
+
export * from './Components/APICall/parseData';
|
|
74
|
+
export * from './Components/APICall/parseHeaders';
|
|
75
|
+
export * from './Components/APICall/parseProxy';
|
|
76
|
+
export * from './Components/APICall/parseUrl';
|
|
77
|
+
export * from './Components/Image/imageSettings.config';
|
|
78
|
+
export * from './subsystems/AgentManager/Agent.class';
|
|
79
|
+
export * from './subsystems/AgentManager/Agent.helper';
|
|
80
|
+
export * from './subsystems/AgentManager/AgentLogger.class';
|
|
81
|
+
export * from './subsystems/AgentManager/AgentRequest.class';
|
|
82
|
+
export * from './subsystems/AgentManager/AgentRuntime.class';
|
|
83
|
+
export * from './subsystems/AgentManager/AgentSettings.class';
|
|
84
|
+
export * from './subsystems/AgentManager/AgentSSE.class';
|
|
85
|
+
export * from './subsystems/AgentManager/EmbodimentSettings.class';
|
|
86
|
+
export * from './subsystems/AgentManager/ForkedAgent.class';
|
|
87
|
+
export * from './subsystems/AgentManager/OSResourceMonitor';
|
|
88
|
+
export * from './subsystems/LLMManager/custom-models';
|
|
89
|
+
export * from './subsystems/LLMManager/LLM.helper';
|
|
90
|
+
export * from './subsystems/LLMManager/LLM.inference';
|
|
91
|
+
export * from './subsystems/LLMManager/models';
|
|
92
|
+
export * from './subsystems/LLMManager/paramMappings';
|
|
93
|
+
export * from './subsystems/MemoryManager/LLMCache';
|
|
94
|
+
export * from './subsystems/MemoryManager/LLMContext';
|
|
95
|
+
export * from './subsystems/MemoryManager/RuntimeContext';
|
|
96
|
+
export * from './subsystems/Security/Credentials.helper';
|
|
97
|
+
export * from './subsystems/Security/SecureConnector.class';
|
|
98
|
+
export * from './subsystems/AgentManager/AgentData.service/AgentDataConnector';
|
|
99
|
+
export * from './subsystems/AgentManager/AgentData.service/index';
|
|
100
|
+
export * from './subsystems/AgentManager/Component.service/ComponentConnector';
|
|
101
|
+
export * from './subsystems/AgentManager/Component.service/index';
|
|
102
|
+
export * from './subsystems/ComputeManager/Code.service/CodeConnector';
|
|
103
|
+
export * from './subsystems/ComputeManager/Code.service/index';
|
|
104
|
+
export * from './subsystems/IO/CLI.service/CLIConnector';
|
|
105
|
+
export * from './subsystems/IO/CLI.service/index';
|
|
106
|
+
export * from './subsystems/IO/Log.service/index';
|
|
107
|
+
export * from './subsystems/IO/Log.service/LogConnector';
|
|
108
|
+
export * from './subsystems/IO/NKV.service/index';
|
|
109
|
+
export * from './subsystems/IO/NKV.service/NKVConnector';
|
|
110
|
+
export * from './subsystems/IO/Router.service/index';
|
|
111
|
+
export * from './subsystems/IO/Router.service/RouterConnector';
|
|
112
|
+
export * from './subsystems/IO/Storage.service/index';
|
|
113
|
+
export * from './subsystems/IO/Storage.service/SmythFS.class';
|
|
114
|
+
export * from './subsystems/IO/Storage.service/StorageConnector';
|
|
115
|
+
export * from './subsystems/IO/VectorDB.service/index';
|
|
116
|
+
export * from './subsystems/IO/VectorDB.service/VectorDBConnector';
|
|
117
|
+
export * from './subsystems/LLMManager/LLM.service/index';
|
|
118
|
+
export * from './subsystems/LLMManager/LLM.service/LLMConnector';
|
|
119
|
+
export * from './subsystems/LLMManager/LLM.service/LLMCredentials.helper';
|
|
120
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/index';
|
|
121
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/ModelsProviderConnector';
|
|
122
|
+
export * from './subsystems/MemoryManager/Cache.service/CacheConnector';
|
|
123
|
+
export * from './subsystems/MemoryManager/Cache.service/index';
|
|
124
|
+
export * from './subsystems/Security/AccessControl/AccessCandidate.class';
|
|
125
|
+
export * from './subsystems/Security/AccessControl/AccessRequest.class';
|
|
126
|
+
export * from './subsystems/Security/AccessControl/ACL.class';
|
|
127
|
+
export * from './subsystems/Security/Account.service/AccountConnector';
|
|
128
|
+
export * from './subsystems/Security/Account.service/index';
|
|
129
|
+
export * from './subsystems/Security/ManagedVault.service/index';
|
|
130
|
+
export * from './subsystems/Security/ManagedVault.service/ManagedVaultConnector';
|
|
131
|
+
export * from './subsystems/Security/Vault.service/index';
|
|
132
|
+
export * from './subsystems/Security/Vault.service/Vault.helper';
|
|
133
|
+
export * from './subsystems/Security/Vault.service/VaultConnector';
|
|
134
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/CLIAgentDataConnector.class';
|
|
135
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/LocalAgentDataConnector.class';
|
|
136
|
+
export * from './subsystems/AgentManager/AgentData.service/connectors/NullAgentData.class';
|
|
137
|
+
export * from './subsystems/AgentManager/Component.service/connectors/LocalComponentConnector.class';
|
|
138
|
+
export * from './subsystems/ComputeManager/Code.service/connectors/AWSLambdaCode.class';
|
|
139
|
+
export * from './subsystems/IO/Log.service/connectors/ConsoleLog.class';
|
|
140
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVRAM.class';
|
|
141
|
+
export * from './subsystems/IO/NKV.service/connectors/NKVRedis.class';
|
|
142
|
+
export * from './subsystems/IO/Router.service/connectors/ExpressRouter.class';
|
|
143
|
+
export * from './subsystems/IO/Router.service/connectors/NullRouter.class';
|
|
144
|
+
export * from './subsystems/IO/Storage.service/connectors/LocalStorage.class';
|
|
145
|
+
export * from './subsystems/IO/Storage.service/connectors/S3Storage.class';
|
|
146
|
+
export * from './subsystems/IO/VectorDB.service/connectors/MilvusVectorDB.class';
|
|
147
|
+
export * from './subsystems/IO/VectorDB.service/connectors/PineconeVectorDB.class';
|
|
148
|
+
export * from './subsystems/IO/VectorDB.service/connectors/RAMVecrtorDB.class';
|
|
149
|
+
export * from './subsystems/IO/VectorDB.service/embed/BaseEmbedding';
|
|
150
|
+
export * from './subsystems/IO/VectorDB.service/embed/index';
|
|
151
|
+
export * from './subsystems/IO/VectorDB.service/embed/OpenAIEmbedding';
|
|
152
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Anthropic.class';
|
|
153
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Bedrock.class';
|
|
154
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Echo.class';
|
|
155
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/GoogleAI.class';
|
|
156
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Groq.class';
|
|
157
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/OpenAI.class';
|
|
158
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/Perplexity.class';
|
|
159
|
+
export * from './subsystems/LLMManager/LLM.service/connectors/VertexAI.class';
|
|
160
|
+
export * from './subsystems/LLMManager/ModelsProvider.service/connectors/SmythModelsProvider.class';
|
|
161
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/LocalStorageCache.class';
|
|
162
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/RAMCache.class';
|
|
163
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/RedisCache.class';
|
|
164
|
+
export * from './subsystems/MemoryManager/Cache.service/connectors/S3Cache.class';
|
|
165
|
+
export * from './subsystems/Security/Account.service/connectors/AWSAccount.class';
|
|
166
|
+
export * from './subsystems/Security/Account.service/connectors/DummyAccount.class';
|
|
167
|
+
export * from './subsystems/Security/Account.service/connectors/JSONFileAccount.class';
|
|
168
|
+
export * from './subsystems/Security/ManagedVault.service/connectors/NullManagedVault.class';
|
|
169
|
+
export * from './subsystems/Security/ManagedVault.service/connectors/SecretManagerManagedVault';
|
|
170
|
+
export * from './subsystems/Security/Vault.service/connectors/HashicorpVault.class';
|
|
171
|
+
export * from './subsystems/Security/Vault.service/connectors/JSONFileVault.class';
|
|
172
|
+
export * from './subsystems/Security/Vault.service/connectors/NullVault.class';
|
|
173
|
+
export * from './subsystems/Security/Vault.service/connectors/SecretsManager.class';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { AgentRequest } from './AgentRequest.class';
|
|
2
|
+
import { AgentRuntime } from './AgentRuntime.class';
|
|
3
|
+
import { AgentSettings } from './AgentSettings.class';
|
|
4
|
+
import { AgentSSE } from './AgentSSE.class';
|
|
5
|
+
import { IAgent } from '@sre/types/Agent.types';
|
|
6
|
+
import { IModelsProviderRequest } from '@sre/LLMManager/ModelsProvider.service/ModelsProviderConnector';
|
|
7
|
+
export declare class Agent implements IAgent {
|
|
8
|
+
id: any;
|
|
9
|
+
agentSettings: AgentSettings;
|
|
10
|
+
name: any;
|
|
11
|
+
data: any;
|
|
12
|
+
teamId: any;
|
|
13
|
+
components: any;
|
|
14
|
+
connections: any;
|
|
15
|
+
endpoints: any;
|
|
16
|
+
sessionId: any;
|
|
17
|
+
sessionTag: string;
|
|
18
|
+
callerSessionId: any;
|
|
19
|
+
apiBasePath: string;
|
|
20
|
+
agentRuntime: AgentRuntime | any;
|
|
21
|
+
usingTestDomain: boolean;
|
|
22
|
+
domain: string;
|
|
23
|
+
debugSessionEnabled: boolean;
|
|
24
|
+
circularLimit: number;
|
|
25
|
+
version: string;
|
|
26
|
+
agentVariables: any;
|
|
27
|
+
private _kill;
|
|
28
|
+
async: boolean;
|
|
29
|
+
jobID: string;
|
|
30
|
+
planInfo: any;
|
|
31
|
+
callback: (data: any) => void;
|
|
32
|
+
agentRequest: AgentRequest;
|
|
33
|
+
sse: AgentSSE;
|
|
34
|
+
modelsProvider: IModelsProviderRequest;
|
|
35
|
+
private _componentInstance;
|
|
36
|
+
get ComponentInstances(): {};
|
|
37
|
+
private _componentInstancesLoader;
|
|
38
|
+
constructor(id: any, agentData: any, agentSettings: AgentSettings, agentRequest?: AgentRequest | any);
|
|
39
|
+
/**
|
|
40
|
+
* Add a SSE connection to the agent
|
|
41
|
+
* @param sseSource - The SSE source to add
|
|
42
|
+
* @param monitorId - The monitor ID to add
|
|
43
|
+
*/
|
|
44
|
+
addSSE(sseSource: Response | AgentSSE, monitorId?: string): void;
|
|
45
|
+
setRequest(agentRequest: AgentRequest | any): void;
|
|
46
|
+
setCallback(callback: (data: any) => void): void;
|
|
47
|
+
kill(): void;
|
|
48
|
+
isKilled(): boolean;
|
|
49
|
+
private parseVariables;
|
|
50
|
+
process(endpointPath: any, input: any): Promise<any>;
|
|
51
|
+
private updateTasksCount;
|
|
52
|
+
postProcess(result: any): Promise<any>;
|
|
53
|
+
private hasLoopAncestor;
|
|
54
|
+
private clearChildLoopRuntimeComponentData;
|
|
55
|
+
private getComponentMissingInputs;
|
|
56
|
+
findReadablePredecessors(componentId: any): any;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param sourceId
|
|
60
|
+
* @param componentId
|
|
61
|
+
*/
|
|
62
|
+
private updateStep;
|
|
63
|
+
callComponent(sourceId: any, componentId: any, input?: any): Promise<any[] | {
|
|
64
|
+
id: any;
|
|
65
|
+
name: any;
|
|
66
|
+
result: any;
|
|
67
|
+
error: string;
|
|
68
|
+
} | {
|
|
69
|
+
error: string;
|
|
70
|
+
}>;
|
|
71
|
+
JSONExpression(obj: any, propertyString: any): any;
|
|
72
|
+
callNextComponents(componentId: any, output: any): Promise<any>;
|
|
73
|
+
private prepareComponentInput;
|
|
74
|
+
getConnectionSource(connection: any): any;
|
|
75
|
+
getConnectionTarget(connection: any): any;
|
|
76
|
+
private recursiveTagAsyncComponents;
|
|
77
|
+
private tagAsyncComponents;
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isAgent(agent: any): boolean;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Connector } from '@sre/Core/Connector.class';
|
|
2
|
+
export interface IAgentDataConnector {
|
|
3
|
+
getAgentData(agentId: string, version?: string): Promise<any>;
|
|
4
|
+
getAgentIdByDomain(domain: string): Promise<string>;
|
|
5
|
+
getAgentSettings(agentId: string, version?: string): Promise<any>;
|
|
6
|
+
listTeamAgents(teamId: string, deployedOnly?: boolean, includeData?: boolean): Promise<any[]>;
|
|
7
|
+
getAgentConfig(agentId: string): {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class AgentDataConnector extends Connector implements IAgentDataConnector {
|
|
12
|
+
name: string;
|
|
13
|
+
abstract getAgentData(agentId: string, version?: string): Promise<any>;
|
|
14
|
+
abstract getAgentIdByDomain(domain: string): Promise<string>;
|
|
15
|
+
abstract getAgentSettings(agentId: string, version?: string): Promise<{
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>;
|
|
18
|
+
abstract getAgentEmbodiments(agentId: string): Promise<any>;
|
|
19
|
+
abstract isDeployed(agentId: string): Promise<boolean>;
|
|
20
|
+
abstract listTeamAgents(teamId: string, deployedOnly?: boolean, includeData?: boolean): Promise<any[]>;
|
|
21
|
+
abstract getAgentConfig(agentId: string): {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Loads openAPI JSON for the agent
|
|
26
|
+
* @param source this represents either the agentId or the agent data
|
|
27
|
+
* @param domain
|
|
28
|
+
* @param version
|
|
29
|
+
* @param aiOnly
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
getOpenAPIJSON(source: string | Record<string, any>, server_url: any, version: any, aiOnly?: boolean): Promise<any>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AgentDataConnector } from '../AgentDataConnector';
|
|
2
|
+
type TArgs = {
|
|
3
|
+
args: Record<string, any>;
|
|
4
|
+
};
|
|
5
|
+
export declare class CLIAgentDataConnector extends AgentDataConnector {
|
|
6
|
+
name: string;
|
|
7
|
+
private argv;
|
|
8
|
+
constructor(settings: TArgs);
|
|
9
|
+
getAgentConfig(agentId: string): Partial<TArgs>;
|
|
10
|
+
getAgentData(agentId: string, version?: string): Promise<{
|
|
11
|
+
data: any;
|
|
12
|
+
version: string;
|
|
13
|
+
}>;
|
|
14
|
+
getAgentIdByDomain(domain: string): Promise<string>;
|
|
15
|
+
getAgentSettings(agentId: string, version?: string): Promise<any>;
|
|
16
|
+
getAgentEmbodiments(agentId: string): Promise<any>;
|
|
17
|
+
listTeamAgents(teamId: string, deployedOnly?: boolean): Promise<any[]>;
|
|
18
|
+
isDeployed(agentId: string): Promise<boolean>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AgentDataConnector } from '../AgentDataConnector';
|
|
2
|
+
export type LocalAgentDataSettings = {
|
|
3
|
+
devDir: string;
|
|
4
|
+
prodDir: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* This connector loads Agent data and settings from a provided directory, it then indexes the loaded agents and settings by agent IDs.
|
|
8
|
+
* Agent data files should be in JSON format and contain an 'id' field with the agent ID and at least a 'components' field.
|
|
9
|
+
* Settings files should be in JSON format and contain an 'id' field with the agent ID and the settings in a 'settings' field.
|
|
10
|
+
* 'settings' field is a key-value object with the Agent settings.
|
|
11
|
+
*/
|
|
12
|
+
export declare class LocalAgentDataConnector extends AgentDataConnector {
|
|
13
|
+
name: string;
|
|
14
|
+
private devDir;
|
|
15
|
+
private prodDir;
|
|
16
|
+
private agentsData;
|
|
17
|
+
private agentSettings;
|
|
18
|
+
constructor(settings: LocalAgentDataSettings);
|
|
19
|
+
getAgentConfig(agentId: string): Partial<LocalAgentDataSettings>;
|
|
20
|
+
private indexDir;
|
|
21
|
+
private indexAgentsData;
|
|
22
|
+
start(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* returns the agent data for the provided agent ID
|
|
25
|
+
* if the version is not provided, it defaults to the dev version
|
|
26
|
+
* otherwise it loads the corresponding prod version
|
|
27
|
+
* @param agentId
|
|
28
|
+
* @param version
|
|
29
|
+
* @returns
|
|
30
|
+
*/
|
|
31
|
+
getAgentData(agentId: string, version?: string): Promise<{
|
|
32
|
+
data: any;
|
|
33
|
+
version: string;
|
|
34
|
+
}>;
|
|
35
|
+
getAgentIdByDomain(domain: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* returns the agent settings for the provided agent ID
|
|
38
|
+
* if the version is not provided, it defaults to the dev version
|
|
39
|
+
* otherwise it loads the corresponding prod version
|
|
40
|
+
* @param agentId
|
|
41
|
+
* @param version
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
getAgentSettings(agentId: string, version?: string): Promise<any>;
|
|
45
|
+
getAgentEmbodiments(agentId: string): Promise<any>;
|
|
46
|
+
listTeamAgents(teamId: string, deployedOnly?: boolean): Promise<any[]>;
|
|
47
|
+
isDeployed(agentId: string): Promise<boolean>;
|
|
48
|
+
}
|
package/dist/types/subsystems/AgentManager/AgentData.service/connectors/NullAgentData.class.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AgentDataConnector } from '../AgentDataConnector';
|
|
2
|
+
type TArgs = {
|
|
3
|
+
args: Record<string, any>;
|
|
4
|
+
};
|
|
5
|
+
export declare class NullAgentData extends AgentDataConnector {
|
|
6
|
+
name: string;
|
|
7
|
+
constructor(settings: TArgs);
|
|
8
|
+
getAgentConfig(agentId: string): Partial<TArgs>;
|
|
9
|
+
getAgentData(agentId: string, version?: string): Promise<{
|
|
10
|
+
data: {};
|
|
11
|
+
version: string;
|
|
12
|
+
}>;
|
|
13
|
+
getAgentIdByDomain(domain: string): Promise<string>;
|
|
14
|
+
getAgentSettings(agentId: string, version?: string): Promise<{}>;
|
|
15
|
+
getAgentEmbodiments(agentId: string): Promise<any>;
|
|
16
|
+
listTeamAgents(teamId: string, deployedOnly?: boolean): Promise<any[]>;
|
|
17
|
+
isDeployed(agentId: string): Promise<boolean>;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Agent } from './Agent.class';
|
|
2
|
+
import { AgentCallLog } from '@sre/types/AgentLogger.types';
|
|
3
|
+
export declare class AgentLogger {
|
|
4
|
+
private agent;
|
|
5
|
+
private static transactions;
|
|
6
|
+
private static cleanupInterval;
|
|
7
|
+
constructor(agent: Agent);
|
|
8
|
+
static cleanup(): Promise<void>;
|
|
9
|
+
static log(agent: any, trId: any, logData: AgentCallLog): any;
|
|
10
|
+
static logTask(agent: Agent, tasks: any): Promise<void>;
|
|
11
|
+
}
|