@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,17 @@
|
|
|
1
|
+
import { IAgent as Agent } from '@sre/types/Agent.types';
|
|
2
|
+
import Joi from 'joi';
|
|
3
|
+
import { Component } from './Component.class';
|
|
4
|
+
export declare class ImageGenerator 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,13 @@
|
|
|
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 JSONFilter extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
Output: {};
|
|
10
|
+
_error: any;
|
|
11
|
+
_debug: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 LLMAssistant extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
Response: any;
|
|
10
|
+
} | {
|
|
11
|
+
Response: any;
|
|
12
|
+
_error: string;
|
|
13
|
+
_debug: string;
|
|
14
|
+
} | {
|
|
15
|
+
_error: any;
|
|
16
|
+
_debug: string;
|
|
17
|
+
Response?: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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 LogicAtLeast extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
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 LogicAtMost extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
9
|
+
}
|
|
@@ -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 MCPClient 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,19 @@
|
|
|
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 PromptGenerator extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<{
|
|
9
|
+
Reply: any;
|
|
10
|
+
} | {
|
|
11
|
+
Reply: any;
|
|
12
|
+
_error: string;
|
|
13
|
+
_debug: string;
|
|
14
|
+
} | {
|
|
15
|
+
_error: any;
|
|
16
|
+
_debug: string;
|
|
17
|
+
Reply?: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 ScrapflyWebScrape extends Component {
|
|
5
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
6
|
+
constructor();
|
|
7
|
+
init(): void;
|
|
8
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
9
|
+
scrapeURL(url: any, data: any, key: any): Promise<{
|
|
10
|
+
content: any;
|
|
11
|
+
success: boolean;
|
|
12
|
+
url: any;
|
|
13
|
+
cost: any;
|
|
14
|
+
error?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
content: any;
|
|
17
|
+
success: boolean;
|
|
18
|
+
error: any;
|
|
19
|
+
url: any;
|
|
20
|
+
cost: number;
|
|
21
|
+
}>;
|
|
22
|
+
extractUrls(input: any): any[];
|
|
23
|
+
isValidUrl(urlString: string): boolean;
|
|
24
|
+
protected reportUsage({ urlsScraped, agentId, teamId, totalCredits, }: {
|
|
25
|
+
urlsScraped: number;
|
|
26
|
+
agentId: string;
|
|
27
|
+
teamId: string;
|
|
28
|
+
totalCredits: number;
|
|
29
|
+
}): void;
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 TavilyWebSearch extends Component {
|
|
5
|
+
protected schema: {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
inputs: {
|
|
9
|
+
SearchQuery: {
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
outputs: {
|
|
16
|
+
Results: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
protected configSchema: Joi.ObjectSchema<any>;
|
|
24
|
+
constructor();
|
|
25
|
+
init(): void;
|
|
26
|
+
process(input: any, config: any, agent: Agent): Promise<any>;
|
|
27
|
+
protected reportUsage({ agentId, teamId }: {
|
|
28
|
+
agentId: string;
|
|
29
|
+
teamId: string;
|
|
30
|
+
}): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Component } from './Component.class';
|
|
2
|
+
import { APIEndpoint } from './APIEndpoint.class';
|
|
3
|
+
import { APIOutput } from './APIOutput.class';
|
|
4
|
+
import { PromptGenerator } from './PromptGenerator.class';
|
|
5
|
+
import { APICall } from './APICall/APICall.class';
|
|
6
|
+
import { FSleep } from './FSleep.class';
|
|
7
|
+
import { FHash } from './FHash.class';
|
|
8
|
+
import { FEncDec } from './FEncDec.class';
|
|
9
|
+
import { FTimestamp } from './FTimestamp.class';
|
|
10
|
+
import { DataSourceLookup } from './DataSourceLookup.class';
|
|
11
|
+
import { DataSourceIndexer } from './DataSourceIndexer.class';
|
|
12
|
+
import { DataSourceCleaner } from './DataSourceCleaner.class';
|
|
13
|
+
import { JSONFilter } from './JSONFilter.class';
|
|
14
|
+
import { LogicAND } from './LogicAND.class';
|
|
15
|
+
import { LogicOR } from './LogicOR.class';
|
|
16
|
+
import { LogicXOR } from './LogicXOR.class';
|
|
17
|
+
import { LogicAtLeast } from './LogicAtLeast.class';
|
|
18
|
+
import { LogicAtMost } from './LogicAtMost.class';
|
|
19
|
+
import { AgentPlugin } from './AgentPlugin.class';
|
|
20
|
+
import { LLMAssistant } from './LLMAssistant.class';
|
|
21
|
+
import { Async } from './Async.class';
|
|
22
|
+
import { Await } from './Await.class';
|
|
23
|
+
import { ForEach } from './ForEach.class';
|
|
24
|
+
import { HuggingFace } from './HuggingFace.class';
|
|
25
|
+
import { GPTPlugin } from './GPTPlugin.class';
|
|
26
|
+
import { Classifier } from './Classifier.class';
|
|
27
|
+
import { FSign } from './FSign.class';
|
|
28
|
+
import { GenAILLM } from './GenAILLM.class';
|
|
29
|
+
import { FileStore } from './FileStore.class';
|
|
30
|
+
import { ScrapflyWebScrape } from './ScrapflyWebScrape.class';
|
|
31
|
+
import { TavilyWebSearch } from './TavilyWebSearch.class';
|
|
32
|
+
import { ComponentHost } from './ComponentHost.class';
|
|
33
|
+
import { ImageGenerator } from './ImageGenerator.class';
|
|
34
|
+
import { MCPClient } from './MCPClient.class';
|
|
35
|
+
export declare const ComponentInstances: {
|
|
36
|
+
Component: Component;
|
|
37
|
+
Note: Component;
|
|
38
|
+
APIEndpoint: APIEndpoint;
|
|
39
|
+
APIOutput: APIOutput;
|
|
40
|
+
PromptGenerator: PromptGenerator;
|
|
41
|
+
LLMPrompt: PromptGenerator;
|
|
42
|
+
APICall: APICall;
|
|
43
|
+
FSleep: FSleep;
|
|
44
|
+
FHash: FHash;
|
|
45
|
+
FEncDec: FEncDec;
|
|
46
|
+
FSign: FSign;
|
|
47
|
+
FTimestamp: FTimestamp;
|
|
48
|
+
DataSourceLookup: DataSourceLookup;
|
|
49
|
+
DataSourceIndexer: DataSourceIndexer;
|
|
50
|
+
DataSourceCleaner: DataSourceCleaner;
|
|
51
|
+
JSONFilter: JSONFilter;
|
|
52
|
+
LogicAND: LogicAND;
|
|
53
|
+
LogicOR: LogicOR;
|
|
54
|
+
LogicXOR: LogicXOR;
|
|
55
|
+
LogicAtLeast: LogicAtLeast;
|
|
56
|
+
LogicAtMost: LogicAtMost;
|
|
57
|
+
AgentPlugin: AgentPlugin;
|
|
58
|
+
LLMAssistant: LLMAssistant;
|
|
59
|
+
Async: Async;
|
|
60
|
+
Await: Await;
|
|
61
|
+
ForEach: ForEach;
|
|
62
|
+
HuggingFace: HuggingFace;
|
|
63
|
+
GPTPlugin: GPTPlugin;
|
|
64
|
+
Classifier: Classifier;
|
|
65
|
+
GenAILLM: GenAILLM;
|
|
66
|
+
FileStore: FileStore;
|
|
67
|
+
WebSearch: TavilyWebSearch;
|
|
68
|
+
WebScrape: ScrapflyWebScrape;
|
|
69
|
+
TavilyWebSearch: TavilyWebSearch;
|
|
70
|
+
ScrapflyWebScrape: ScrapflyWebScrape;
|
|
71
|
+
ComponentHost: ComponentHost;
|
|
72
|
+
ImageGenerator: ImageGenerator;
|
|
73
|
+
MCPClient: MCPClient;
|
|
74
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Agent } from '@sre/AgentManager/Agent.class';
|
|
2
|
+
import { AgentRequest } from '@sre/AgentManager/AgentRequest.class';
|
|
3
|
+
import { TAgentProcessParams } from '@sre/types/Agent.types';
|
|
4
|
+
export declare class AgentProcess {
|
|
5
|
+
private agentData;
|
|
6
|
+
private agentVersion?;
|
|
7
|
+
agent: Agent;
|
|
8
|
+
private _loadPromise;
|
|
9
|
+
private constructor();
|
|
10
|
+
private initAgent;
|
|
11
|
+
ready(): Promise<any>;
|
|
12
|
+
static load(agentData: any, agentVersion?: string): AgentProcess;
|
|
13
|
+
/**
|
|
14
|
+
* Run the agent process
|
|
15
|
+
* @param reqConfig - The request configuration
|
|
16
|
+
* @param callback - The callback function is used if we want to send status data, meta information, or stream response progressively.
|
|
17
|
+
* Note: even if the response is streamed through the callback, the response is still returned as a single object in the response.data field.
|
|
18
|
+
* @returns The result of the agent process
|
|
19
|
+
*/
|
|
20
|
+
run(reqConfig: TAgentProcessParams | Array<string> | AgentRequest, callback?: (data: any) => void): Promise<{
|
|
21
|
+
status?: number;
|
|
22
|
+
data: any;
|
|
23
|
+
}>;
|
|
24
|
+
reset(): void;
|
|
25
|
+
private parseReqConfig;
|
|
26
|
+
private parseCLI;
|
|
27
|
+
post(path: string, input?: any, headers?: any): Promise<{
|
|
28
|
+
status?: number;
|
|
29
|
+
data: any;
|
|
30
|
+
}>;
|
|
31
|
+
get(path: string, query?: any, headers?: any): Promise<{
|
|
32
|
+
status?: number;
|
|
33
|
+
data: any;
|
|
34
|
+
}>;
|
|
35
|
+
readDebugState(stateId: string, reqConfig: TAgentProcessParams | Array<string> | AgentRequest): Promise<any>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AccessCandidate } from '@sre/Security/AccessControl/AccessCandidate.class';
|
|
2
|
+
export declare class Connector<TRequest = any> {
|
|
3
|
+
protected _settings?: any;
|
|
4
|
+
name: string;
|
|
5
|
+
started: boolean;
|
|
6
|
+
private _interactionHandler;
|
|
7
|
+
private _readyPromise;
|
|
8
|
+
private static lCache;
|
|
9
|
+
get settings(): any;
|
|
10
|
+
get interactionHandler(): () => void;
|
|
11
|
+
get valid(): boolean;
|
|
12
|
+
constructor(_settings?: any);
|
|
13
|
+
/**
|
|
14
|
+
* If the connector is interactive, The connector initializer will wait for start() method to complete before loading the next connector
|
|
15
|
+
*/
|
|
16
|
+
protected setInteraction(handler: () => void): void;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new instance of the current class using the provided settings.
|
|
19
|
+
* This method can be called on both Connector instances and its subclasses.
|
|
20
|
+
* This is used when we need to create a connector instance with a specific configuration (for example with user provided keys)
|
|
21
|
+
*
|
|
22
|
+
* @param settings - Configuration settings for the new instance.
|
|
23
|
+
* @returns A new instance of the current class.
|
|
24
|
+
*/
|
|
25
|
+
instance(settings: any): this;
|
|
26
|
+
static isValid(connector: Connector): boolean;
|
|
27
|
+
start(): Promise<void>;
|
|
28
|
+
stop(): Promise<void>;
|
|
29
|
+
ready(): Promise<boolean>;
|
|
30
|
+
requester(candidate: AccessCandidate): TRequest;
|
|
31
|
+
user(candidate: AccessCandidate | string): TRequest;
|
|
32
|
+
team(teamId: string): TRequest;
|
|
33
|
+
agent(agentId: string): TRequest;
|
|
34
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TConnectorService, TServiceRegistry } from '@sre/types/SRE.types';
|
|
2
|
+
import { Connector } from './Connector.class';
|
|
3
|
+
import { StorageConnector } from '@sre/IO/Storage.service/StorageConnector';
|
|
4
|
+
import { CacheConnector } from '@sre/MemoryManager/Cache.service/CacheConnector';
|
|
5
|
+
import { LLMConnector } from '@sre/LLMManager/LLM.service/LLMConnector';
|
|
6
|
+
import { VaultConnector } from '@sre/Security/Vault.service/VaultConnector';
|
|
7
|
+
import { AccountConnector } from '@sre/Security/Account.service/AccountConnector';
|
|
8
|
+
import { AgentDataConnector } from '@sre/AgentManager/AgentData.service/AgentDataConnector';
|
|
9
|
+
import { VectorDBConnector } from '@sre/IO/VectorDB.service/VectorDBConnector';
|
|
10
|
+
import { CLIConnector } from '@sre/IO/CLI.service/CLIConnector';
|
|
11
|
+
import { NKVConnector } from '@sre/IO/NKV.service/NKVConnector';
|
|
12
|
+
import { RouterConnector } from '@sre/IO/Router.service/RouterConnector';
|
|
13
|
+
import { ManagedVaultConnector } from '@sre/Security/ManagedVault.service/ManagedVaultConnector';
|
|
14
|
+
import { LogConnector } from '@sre/IO/Log.service/LogConnector';
|
|
15
|
+
import { ComponentConnector } from '@sre/AgentManager/Component.service/ComponentConnector';
|
|
16
|
+
import { ModelsProviderConnector } from '@sre/LLMManager/ModelsProvider.service/ModelsProviderConnector';
|
|
17
|
+
export declare class ConnectorService {
|
|
18
|
+
static Connectors: {};
|
|
19
|
+
static ConnectorInstances: any;
|
|
20
|
+
static get ready(): boolean;
|
|
21
|
+
static get service(): TServiceRegistry;
|
|
22
|
+
/**
|
|
23
|
+
* Allows SRE services to register their connectors, a registered conector can then be initialized and used by SRE or its services
|
|
24
|
+
* @param connectorType
|
|
25
|
+
* @param connectorName
|
|
26
|
+
* @param connectorConstructor
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
static register(connectorType: TConnectorService, connectorName: string, connectorConstructor: any): void;
|
|
30
|
+
/**
|
|
31
|
+
* The init method instantiates a connector and starts it, a connector cannot be used before it is initialized
|
|
32
|
+
* Usually the initialization phase happens during the SRE startup, but some connectors can be initialized later if they are not mandatory for the SRE to start
|
|
33
|
+
*
|
|
34
|
+
*
|
|
35
|
+
* @param connectorType
|
|
36
|
+
* @param connectorName
|
|
37
|
+
* @param settings
|
|
38
|
+
* @param isDefault
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
static init(connectorType: TConnectorService, connectorName: string, connectorId?: string, settings?: any, isDefault?: boolean): Connector<any>;
|
|
42
|
+
static _stop(): Promise<void>;
|
|
43
|
+
static getInstance<T>(connectorType: TConnectorService, connectorName?: string): T;
|
|
44
|
+
static getStorageConnector(name?: string): StorageConnector;
|
|
45
|
+
static getCacheConnector(name?: string): CacheConnector;
|
|
46
|
+
static getVectorDBConnector(name?: string): VectorDBConnector;
|
|
47
|
+
static getNKVConnector(name?: string): NKVConnector;
|
|
48
|
+
static getLLMConnector(name?: string): LLMConnector;
|
|
49
|
+
static getVaultConnector(name?: string): VaultConnector;
|
|
50
|
+
static getManagedVaultConnector(name?: string): ManagedVaultConnector;
|
|
51
|
+
static getAccountConnector(name?: string): AccountConnector;
|
|
52
|
+
static getAgentDataConnector(name?: string): AgentDataConnector;
|
|
53
|
+
static getCLIConnector(name?: string): CLIConnector;
|
|
54
|
+
static getLogConnector(name?: string): LogConnector;
|
|
55
|
+
static getComponentConnector(name?: string): ComponentConnector;
|
|
56
|
+
static getModelsProviderConnector(name?: string): ModelsProviderConnector;
|
|
57
|
+
static hasInstance(connectorType: TConnectorService, connectorName?: string): any;
|
|
58
|
+
static getRouterConnector(name?: string): RouterConnector;
|
|
59
|
+
}
|
|
60
|
+
export declare abstract class ConnectorServiceProvider {
|
|
61
|
+
abstract register(): any;
|
|
62
|
+
init(): void;
|
|
63
|
+
constructor();
|
|
64
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type HookCallback = (...args: any[]) => void;
|
|
2
|
+
export declare class HookService {
|
|
3
|
+
/**
|
|
4
|
+
* Register a new hook callback for a given hook name
|
|
5
|
+
* @param hookName The name of the hook to register
|
|
6
|
+
* @param callback The callback function to execute when the hook is triggered
|
|
7
|
+
*/
|
|
8
|
+
static register(hookName: string, callback: HookCallback): void;
|
|
9
|
+
static trigger(hookName: string, ...args: any[]): void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Decorator function that executes registered hooks before the decorated method
|
|
13
|
+
* @param hookName The name of the hook to trigger
|
|
14
|
+
*/
|
|
15
|
+
export declare function hook(hookName: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
16
|
+
/**
|
|
17
|
+
* Decorator function that executes registered hooks asynchronously before the decorated method
|
|
18
|
+
* @param hookName The name of the hook to trigger
|
|
19
|
+
*/
|
|
20
|
+
export declare function hookAsync(hookName: string): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
21
|
+
/**
|
|
22
|
+
* Decorator function that executes registered hooks asynchronously before the decorated method
|
|
23
|
+
* @param hookName The name of the hook to trigger
|
|
24
|
+
* @param contextFn Optional function to extract additional context from the class instance
|
|
25
|
+
*/
|
|
26
|
+
export declare function hookAsyncWithContext(hookName: string, contextFn?: (instance: any) => Record<string, any>): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SREConfig } from '@sre/types/SRE.types';
|
|
2
|
+
export declare class SmythRuntime {
|
|
3
|
+
started: boolean;
|
|
4
|
+
private _smythDir;
|
|
5
|
+
get smythDir(): string;
|
|
6
|
+
private _readyPromise;
|
|
7
|
+
private _readyResolve;
|
|
8
|
+
private defaultConfig;
|
|
9
|
+
protected constructor();
|
|
10
|
+
protected static instance?: SmythRuntime;
|
|
11
|
+
static get Instance(): SmythRuntime;
|
|
12
|
+
private _initializing;
|
|
13
|
+
get initializing(): boolean;
|
|
14
|
+
private _initialized;
|
|
15
|
+
init(_config?: SREConfig): SmythRuntime;
|
|
16
|
+
/**
|
|
17
|
+
* This function tries to auto configure, or fixes the provided configuration
|
|
18
|
+
*
|
|
19
|
+
* FIXME: The current version does not actually auto configure SRE, it just fixes the provided configuration for now
|
|
20
|
+
* TODO: Implement auto configuration based on present environment variables and auto-detected configs
|
|
21
|
+
* @param config
|
|
22
|
+
*/
|
|
23
|
+
private autoConf;
|
|
24
|
+
ready(): Promise<boolean>;
|
|
25
|
+
private _stopping;
|
|
26
|
+
_stop(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export declare const SRE: SmythRuntime;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SmythLLMUsage, SmythTaskUsage } from '@sre/types/LLM.types';
|
|
2
|
+
import { TServiceRegistry } from '@sre/types/SRE.types';
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
export type SystemEventMap = {
|
|
5
|
+
'SRE:Booted': [TServiceRegistry];
|
|
6
|
+
'SRE:Initialized': [];
|
|
7
|
+
'USAGE:LLM': [SmythLLMUsage];
|
|
8
|
+
'USAGE:API': any;
|
|
9
|
+
'USAGE:TASK': [SmythTaskUsage];
|
|
10
|
+
};
|
|
11
|
+
declare const SystemEvents: EventEmitter<SystemEventMap>;
|
|
12
|
+
export { SystemEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function boot(): void;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare const REQUEST_METHODS: string[];
|
|
2
|
+
export declare const REQUEST_CONTENT_TYPES: {
|
|
3
|
+
none: string;
|
|
4
|
+
urlEncodedFormData: string;
|
|
5
|
+
multipartFormData: string;
|
|
6
|
+
json: string;
|
|
7
|
+
text: string;
|
|
8
|
+
xml: string;
|
|
9
|
+
binary: string;
|
|
10
|
+
};
|
|
11
|
+
export declare enum EMBODIMENT_TYPES {
|
|
12
|
+
ChatBot = "chatBot",
|
|
13
|
+
ChatGPT = "chatGPT"
|
|
14
|
+
}
|
|
15
|
+
export declare const ERR_MSG_INVALID_IMAGE_SOURCE = "Please provide a valid Image Source. Supported image sources are: HTTP(S) URL, Base64 string, Data URL, Output Image from other component(s).";
|
|
16
|
+
export declare const ERR_MSG_INVALID_BINARY = "Please provide a valid data that is either a Blob, SmythFileObject (Binary Output from any Component), ArrayBuffer, Buffer, Base64 string, Data URL, or HTTP(s) URL";
|
|
17
|
+
export declare const ERR_MSG_MAX_DEPTH = "The maximum depth has been exceeded for the provided array or object.";
|
|
18
|
+
export declare const ERR_MSG_MAX_ARRAY_SIZE = "The maximum array size has been exceeded for the provided array.";
|
|
19
|
+
export declare const ERR_MSG_MAX_OBJECT_SIZE = "The maximum object size has been exceeded for the provided object.";
|
|
20
|
+
export declare const MAX_DEPTH = 10;
|
|
21
|
+
export declare const MAX_OBJECT_SIZE = 1000;
|
|
22
|
+
export declare const MAX_ARRAY_SIZE = 1000;
|
|
23
|
+
export declare const MAX_FILE_SIZE: number;
|
|
24
|
+
export declare const MAX_FILE_COUNT = 10;
|
|
25
|
+
export declare const DEFAULT_MAX_TOKENS_FOR_LLM = 2048;
|
|
26
|
+
export declare const S3_DAILY_PURGE_LIFECYCLE_TAG = "ExpirationPolicy=DeleteDaily";
|
|
27
|
+
export declare const S3_WEEKLY_PURGE_LIFECYCLE_TAG = "ExpirationPolicy=DeleteWeekly";
|
|
28
|
+
export declare const S3_MONTHLY_PURGE_LIFECYCLE_TAG = "ExpirationPolicy=DeleteMonthly";
|
|
29
|
+
export declare const TOOL_USE_DEFAULT_MODEL = "gpt-4o-mini";
|
|
30
|
+
export declare const COMP_NAMES: {
|
|
31
|
+
apiCall: string;
|
|
32
|
+
code: string;
|
|
33
|
+
llmPrompt: string;
|
|
34
|
+
visionLLM: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const JSON_RESPONSE_INSTRUCTION = "\nRespond ONLY with a valid, parsable JSON object. Follow these strict guidelines:\n1. The response must begin with '{' and end with '}'.\n2. Use double quotes for all keys and string values.\n3. Do not include any explanations, markdown, or text outside the JSON object.\n4. Do not use newlines or indentation within the JSON structure.\n5. For single-key responses, use the format: {\"result\": \"your content here\"}\n6. For multiple keys, use: {\"key1\": \"value1\", \"key2\": \"value2\", ...}\n\nExample of a valid response:\n{\"result\": \"This is a valid JSON response without any extra text.\"}\n";
|
|
37
|
+
export declare const SUPPORTED_MIME_TYPES_MAP: {
|
|
38
|
+
OpenAI: {
|
|
39
|
+
image: string[];
|
|
40
|
+
imageGen: string[];
|
|
41
|
+
document: string[];
|
|
42
|
+
};
|
|
43
|
+
TogetherAI: {
|
|
44
|
+
image: string[];
|
|
45
|
+
};
|
|
46
|
+
Anthropic: {
|
|
47
|
+
image: string[];
|
|
48
|
+
};
|
|
49
|
+
GoogleAI: {
|
|
50
|
+
image: string[];
|
|
51
|
+
video: string[];
|
|
52
|
+
audio: string[];
|
|
53
|
+
document: string[];
|
|
54
|
+
};
|
|
55
|
+
Groq: {
|
|
56
|
+
image: string[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export declare const DEFAULT_SMYTHOS_LLM_PROVIDERS_SETTINGS: {
|
|
60
|
+
openai: {
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
};
|
|
63
|
+
anthropic: {
|
|
64
|
+
enabled: boolean;
|
|
65
|
+
};
|
|
66
|
+
googleai: {
|
|
67
|
+
enabled: boolean;
|
|
68
|
+
};
|
|
69
|
+
togetherai: {
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
};
|
|
72
|
+
groq: {
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
};
|
|
75
|
+
xai: {
|
|
76
|
+
enabled: boolean;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare const BUILT_IN_MODEL_PREFIX = "smythos/";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Readable } from 'stream';
|
|
2
|
+
import { IAccessCandidate } from '@sre/types/ACL.types';
|
|
3
|
+
export declare class BinaryInput {
|
|
4
|
+
private _name?;
|
|
5
|
+
mimetype?: string;
|
|
6
|
+
private candidate?;
|
|
7
|
+
private size;
|
|
8
|
+
private url;
|
|
9
|
+
private _ready;
|
|
10
|
+
private _readyPromise;
|
|
11
|
+
private _source;
|
|
12
|
+
private _uploading;
|
|
13
|
+
constructor(data: BinaryInput | Buffer | ArrayBuffer | Blob | string | Record<string, any>, _name?: string, mimetype?: string, candidate?: IAccessCandidate);
|
|
14
|
+
ready(): Promise<any>;
|
|
15
|
+
private load;
|
|
16
|
+
private getUrlInfo;
|
|
17
|
+
static from(data: any, name?: string, mimetype?: string, candidate?: IAccessCandidate): BinaryInput;
|
|
18
|
+
upload(candidate: IAccessCandidate, ttl?: number): Promise<void>;
|
|
19
|
+
getJsonData(candidate: IAccessCandidate, ttl?: number): Promise<{
|
|
20
|
+
mimetype: string;
|
|
21
|
+
size: number;
|
|
22
|
+
url: string;
|
|
23
|
+
name: string;
|
|
24
|
+
}>;
|
|
25
|
+
readData(candidate: IAccessCandidate): Promise<Buffer<ArrayBufferLike>>;
|
|
26
|
+
getName(): Promise<string>;
|
|
27
|
+
getBuffer(): Promise<Buffer<ArrayBufferLike>>;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a read stream from the binary data.
|
|
30
|
+
* Uses temporary files to reduce memory usage for large files.
|
|
31
|
+
*/
|
|
32
|
+
getReadStream(): Promise<Readable>;
|
|
33
|
+
}
|