@hashgraphonline/standards-agent-kit 0.0.37 → 0.2.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/dist/cjs/builders/hcs10/hcs10-builder.d.ts +262 -0
- package/dist/cjs/builders/index.d.ts +2 -0
- package/dist/cjs/builders/types.d.ts +10 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/init/init.d.ts +21 -22
- package/dist/cjs/plugins/PluginInterface.d.ts +4 -80
- package/dist/cjs/plugins/PluginRegistry.d.ts +1 -47
- package/dist/cjs/plugins/defi/index.d.ts +7 -4
- package/dist/cjs/plugins/hedera/HbarPricePlugin.d.ts +7 -35
- package/dist/cjs/plugins/index.d.ts +0 -5
- package/dist/cjs/plugins/weather/index.d.ts +6 -5
- package/dist/cjs/standards-agent-kit.cjs +1 -1
- package/dist/cjs/standards-agent-kit.cjs.map +1 -1
- package/dist/cjs/state/state-types.d.ts +8 -8
- package/dist/cjs/tools/hcs10/AcceptConnectionRequestTool.d.ts +40 -0
- package/dist/cjs/tools/hcs10/CheckMessagesTool.d.ts +40 -0
- package/dist/cjs/tools/hcs10/ConnectionMonitorTool.d.ts +134 -0
- package/dist/cjs/tools/hcs10/FindRegistrationsTool.d.ts +34 -0
- package/dist/cjs/tools/hcs10/InitiateConnectionTool.d.ts +43 -0
- package/dist/cjs/tools/hcs10/ListConnectionsTool.d.ts +34 -0
- package/dist/cjs/tools/hcs10/ListUnapprovedConnectionRequestsTool.d.ts +15 -0
- package/dist/cjs/tools/hcs10/ManageConnectionRequestsTool.d.ts +34 -0
- package/dist/cjs/tools/hcs10/RegisterAgentTool.d.ts +218 -0
- package/dist/cjs/tools/hcs10/RetrieveProfileTool.d.ts +33 -0
- package/dist/cjs/tools/hcs10/SendMessageToConnectionTool.d.ts +40 -0
- package/dist/cjs/tools/hcs10/base-hcs10-tools.d.ts +28 -0
- package/dist/cjs/tools/hcs10/hcs10-tool-params.d.ts +18 -0
- package/dist/cjs/tools/hcs10/index.d.ts +13 -0
- package/dist/cjs/tools/index.d.ts +1 -13
- package/dist/es/builders/hcs10/hcs10-builder.d.ts +262 -0
- package/dist/es/builders/index.d.ts +2 -0
- package/dist/es/builders/types.d.ts +10 -0
- package/dist/es/index.d.ts +3 -1
- package/dist/es/init/init.d.ts +21 -22
- package/dist/es/plugins/PluginInterface.d.ts +4 -80
- package/dist/es/plugins/PluginRegistry.d.ts +1 -47
- package/dist/es/plugins/defi/index.d.ts +7 -4
- package/dist/es/plugins/hedera/HbarPricePlugin.d.ts +7 -35
- package/dist/es/plugins/index.d.ts +0 -5
- package/dist/es/plugins/weather/index.d.ts +6 -5
- package/dist/es/standards-agent-kit.es.js +10 -18
- package/dist/es/standards-agent-kit.es.js.map +1 -1
- package/dist/es/standards-agent-kit.es10.js +29 -76
- package/dist/es/standards-agent-kit.es10.js.map +1 -1
- package/dist/es/standards-agent-kit.es11.js +61 -384
- package/dist/es/standards-agent-kit.es11.js.map +1 -1
- package/dist/es/standards-agent-kit.es12.js +22 -190
- package/dist/es/standards-agent-kit.es12.js.map +1 -1
- package/dist/es/standards-agent-kit.es13.js +26 -138
- package/dist/es/standards-agent-kit.es13.js.map +1 -1
- package/dist/es/standards-agent-kit.es14.js +35 -59
- package/dist/es/standards-agent-kit.es14.js.map +1 -1
- package/dist/es/standards-agent-kit.es15.js +11 -117
- package/dist/es/standards-agent-kit.es15.js.map +1 -1
- package/dist/es/standards-agent-kit.es16.js +1 -1
- package/dist/es/standards-agent-kit.es16.js.map +1 -1
- package/dist/es/standards-agent-kit.es17.js +63 -46
- package/dist/es/standards-agent-kit.es17.js.map +1 -1
- package/dist/es/standards-agent-kit.es18.js +25 -74
- package/dist/es/standards-agent-kit.es18.js.map +1 -1
- package/dist/es/standards-agent-kit.es19.js +22 -13
- package/dist/es/standards-agent-kit.es19.js.map +1 -1
- package/dist/es/standards-agent-kit.es2.js +1381 -188
- package/dist/es/standards-agent-kit.es2.js.map +1 -1
- package/dist/es/standards-agent-kit.es20.js +3 -67
- package/dist/es/standards-agent-kit.es20.js.map +1 -1
- package/dist/es/standards-agent-kit.es3.js +285 -347
- package/dist/es/standards-agent-kit.es3.js.map +1 -1
- package/dist/es/standards-agent-kit.es4.js +22 -74
- package/dist/es/standards-agent-kit.es4.js.map +1 -1
- package/dist/es/standards-agent-kit.es5.js +127 -154
- package/dist/es/standards-agent-kit.es5.js.map +1 -1
- package/dist/es/standards-agent-kit.es6.js +21 -88
- package/dist/es/standards-agent-kit.es6.js.map +1 -1
- package/dist/es/standards-agent-kit.es7.js +28 -86
- package/dist/es/standards-agent-kit.es7.js.map +1 -1
- package/dist/es/standards-agent-kit.es8.js +27 -100
- package/dist/es/standards-agent-kit.es8.js.map +1 -1
- package/dist/es/standards-agent-kit.es9.js +35 -117
- package/dist/es/standards-agent-kit.es9.js.map +1 -1
- package/dist/es/state/state-types.d.ts +8 -8
- package/dist/es/tools/hcs10/AcceptConnectionRequestTool.d.ts +40 -0
- package/dist/es/tools/hcs10/CheckMessagesTool.d.ts +40 -0
- package/dist/es/tools/hcs10/ConnectionMonitorTool.d.ts +134 -0
- package/dist/es/tools/hcs10/FindRegistrationsTool.d.ts +34 -0
- package/dist/es/tools/hcs10/InitiateConnectionTool.d.ts +43 -0
- package/dist/es/tools/hcs10/ListConnectionsTool.d.ts +34 -0
- package/dist/es/tools/hcs10/ListUnapprovedConnectionRequestsTool.d.ts +15 -0
- package/dist/es/tools/hcs10/ManageConnectionRequestsTool.d.ts +34 -0
- package/dist/es/tools/hcs10/RegisterAgentTool.d.ts +218 -0
- package/dist/es/tools/hcs10/RetrieveProfileTool.d.ts +33 -0
- package/dist/es/tools/hcs10/SendMessageToConnectionTool.d.ts +40 -0
- package/dist/es/tools/hcs10/base-hcs10-tools.d.ts +28 -0
- package/dist/es/tools/hcs10/hcs10-tool-params.d.ts +18 -0
- package/dist/es/tools/hcs10/index.d.ts +13 -0
- package/dist/es/tools/index.d.ts +1 -13
- package/dist/umd/builders/hcs10/hcs10-builder.d.ts +262 -0
- package/dist/umd/builders/index.d.ts +2 -0
- package/dist/umd/builders/types.d.ts +10 -0
- package/dist/umd/index.d.ts +3 -1
- package/dist/umd/init/init.d.ts +21 -22
- package/dist/umd/plugins/PluginInterface.d.ts +4 -80
- package/dist/umd/plugins/PluginRegistry.d.ts +1 -47
- package/dist/umd/plugins/defi/index.d.ts +7 -4
- package/dist/umd/plugins/hedera/HbarPricePlugin.d.ts +7 -35
- package/dist/umd/plugins/index.d.ts +0 -5
- package/dist/umd/plugins/weather/index.d.ts +6 -5
- package/dist/umd/standards-agent-kit.umd.js +1 -164
- package/dist/umd/standards-agent-kit.umd.js.map +1 -1
- package/dist/umd/state/state-types.d.ts +8 -8
- package/dist/umd/tools/hcs10/AcceptConnectionRequestTool.d.ts +40 -0
- package/dist/umd/tools/hcs10/CheckMessagesTool.d.ts +40 -0
- package/dist/umd/tools/hcs10/ConnectionMonitorTool.d.ts +134 -0
- package/dist/umd/tools/hcs10/FindRegistrationsTool.d.ts +34 -0
- package/dist/umd/tools/hcs10/InitiateConnectionTool.d.ts +43 -0
- package/dist/umd/tools/hcs10/ListConnectionsTool.d.ts +34 -0
- package/dist/umd/tools/hcs10/ListUnapprovedConnectionRequestsTool.d.ts +15 -0
- package/dist/umd/tools/hcs10/ManageConnectionRequestsTool.d.ts +34 -0
- package/dist/umd/tools/hcs10/RegisterAgentTool.d.ts +218 -0
- package/dist/umd/tools/hcs10/RetrieveProfileTool.d.ts +33 -0
- package/dist/umd/tools/hcs10/SendMessageToConnectionTool.d.ts +40 -0
- package/dist/umd/tools/hcs10/base-hcs10-tools.d.ts +28 -0
- package/dist/umd/tools/hcs10/hcs10-tool-params.d.ts +18 -0
- package/dist/umd/tools/hcs10/index.d.ts +13 -0
- package/dist/umd/tools/index.d.ts +1 -13
- package/package.json +41 -41
- package/src/builders/hcs10/hcs10-builder.ts +2108 -0
- package/src/builders/index.ts +2 -0
- package/src/builders/types.ts +11 -0
- package/src/hcs10/HCS10Client.ts +3 -2
- package/src/index.ts +4 -2
- package/src/init/init.ts +85 -63
- package/src/plugins/PluginInterface.ts +15 -94
- package/src/plugins/PluginRegistry.ts +2 -98
- package/src/plugins/defi/index.ts +31 -118
- package/src/plugins/hedera/HbarPricePlugin.ts +19 -100
- package/src/plugins/index.ts +0 -5
- package/src/plugins/weather/index.ts +56 -40
- package/src/state/state-types.ts +9 -11
- package/src/tools/hcs10/AcceptConnectionRequestTool.ts +56 -0
- package/src/tools/hcs10/CheckMessagesTool.ts +73 -0
- package/src/tools/hcs10/ConnectionMonitorTool.ts +111 -0
- package/src/tools/hcs10/FindRegistrationsTool.ts +64 -0
- package/src/tools/hcs10/InitiateConnectionTool.ts +66 -0
- package/src/tools/hcs10/ListConnectionsTool.ts +58 -0
- package/src/tools/hcs10/ListUnapprovedConnectionRequestsTool.ts +26 -0
- package/src/tools/hcs10/ManageConnectionRequestsTool.ts +48 -0
- package/src/tools/hcs10/RegisterAgentTool.ts +213 -0
- package/src/tools/hcs10/RetrieveProfileTool.ts +61 -0
- package/src/tools/hcs10/SendMessageToConnectionTool.ts +45 -0
- package/src/tools/hcs10/base-hcs10-tools.ts +65 -0
- package/src/tools/hcs10/hcs10-tool-params.ts +21 -0
- package/src/tools/hcs10/index.ts +13 -0
- package/src/tools/index.ts +2 -13
- package/src/utils/HederaClient.ts +2 -2
- package/src/utils/ensure-agent-has-hbar.ts +3 -4
- package/dist/cjs/agents/index.d.ts +0 -0
- package/dist/cjs/plugins/BasePlugin.d.ts +0 -28
- package/dist/cjs/plugins/GenericPlugin.d.ts +0 -17
- package/dist/cjs/plugins/HCS10Plugin.d.ts +0 -13
- package/dist/cjs/plugins/PluginLoader.d.ts +0 -38
- package/dist/cjs/plugins/openconvai/OpenConvAIPlugin.d.ts +0 -23
- package/dist/cjs/plugins/openconvai/index.d.ts +0 -1
- package/dist/cjs/tools/AcceptConnectionRequestTool.d.ts +0 -33
- package/dist/cjs/tools/CheckMessagesTool.d.ts +0 -34
- package/dist/cjs/tools/ConnectionMonitorTool.d.ts +0 -100
- package/dist/cjs/tools/ConnectionTool.d.ts +0 -40
- package/dist/cjs/tools/FindRegistrationsTool.d.ts +0 -28
- package/dist/cjs/tools/InitiateConnectionTool.d.ts +0 -30
- package/dist/cjs/tools/ListConnectionsTool.d.ts +0 -33
- package/dist/cjs/tools/ListUnapprovedConnectionRequestsTool.d.ts +0 -41
- package/dist/cjs/tools/ManageConnectionRequestsTool.d.ts +0 -38
- package/dist/cjs/tools/RegisterAgentTool.d.ts +0 -188
- package/dist/cjs/tools/RetrieveProfileTool.d.ts +0 -34
- package/dist/cjs/tools/SendMessageToConnectionTool.d.ts +0 -34
- package/dist/cjs/tools/SendMessageTool.d.ts +0 -40
- package/dist/es/agents/index.d.ts +0 -0
- package/dist/es/plugins/BasePlugin.d.ts +0 -28
- package/dist/es/plugins/GenericPlugin.d.ts +0 -17
- package/dist/es/plugins/HCS10Plugin.d.ts +0 -13
- package/dist/es/plugins/PluginLoader.d.ts +0 -38
- package/dist/es/plugins/openconvai/OpenConvAIPlugin.d.ts +0 -23
- package/dist/es/plugins/openconvai/index.d.ts +0 -1
- package/dist/es/standards-agent-kit.es21.js +0 -92
- package/dist/es/standards-agent-kit.es21.js.map +0 -1
- package/dist/es/standards-agent-kit.es22.js +0 -7
- package/dist/es/standards-agent-kit.es22.js.map +0 -1
- package/dist/es/standards-agent-kit.es23.js +0 -106
- package/dist/es/standards-agent-kit.es23.js.map +0 -1
- package/dist/es/standards-agent-kit.es24.js +0 -7
- package/dist/es/standards-agent-kit.es24.js.map +0 -1
- package/dist/es/standards-agent-kit.es25.js +0 -7
- package/dist/es/standards-agent-kit.es25.js.map +0 -1
- package/dist/es/standards-agent-kit.es26.js +0 -85
- package/dist/es/standards-agent-kit.es26.js.map +0 -1
- package/dist/es/standards-agent-kit.es27.js +0 -28
- package/dist/es/standards-agent-kit.es27.js.map +0 -1
- package/dist/es/tools/AcceptConnectionRequestTool.d.ts +0 -33
- package/dist/es/tools/CheckMessagesTool.d.ts +0 -34
- package/dist/es/tools/ConnectionMonitorTool.d.ts +0 -100
- package/dist/es/tools/ConnectionTool.d.ts +0 -40
- package/dist/es/tools/FindRegistrationsTool.d.ts +0 -28
- package/dist/es/tools/InitiateConnectionTool.d.ts +0 -30
- package/dist/es/tools/ListConnectionsTool.d.ts +0 -33
- package/dist/es/tools/ListUnapprovedConnectionRequestsTool.d.ts +0 -41
- package/dist/es/tools/ManageConnectionRequestsTool.d.ts +0 -38
- package/dist/es/tools/RegisterAgentTool.d.ts +0 -188
- package/dist/es/tools/RetrieveProfileTool.d.ts +0 -34
- package/dist/es/tools/SendMessageToConnectionTool.d.ts +0 -34
- package/dist/es/tools/SendMessageTool.d.ts +0 -40
- package/dist/umd/agents/index.d.ts +0 -0
- package/dist/umd/plugins/BasePlugin.d.ts +0 -28
- package/dist/umd/plugins/GenericPlugin.d.ts +0 -17
- package/dist/umd/plugins/HCS10Plugin.d.ts +0 -13
- package/dist/umd/plugins/PluginLoader.d.ts +0 -38
- package/dist/umd/plugins/openconvai/OpenConvAIPlugin.d.ts +0 -23
- package/dist/umd/plugins/openconvai/index.d.ts +0 -1
- package/dist/umd/tools/AcceptConnectionRequestTool.d.ts +0 -33
- package/dist/umd/tools/CheckMessagesTool.d.ts +0 -34
- package/dist/umd/tools/ConnectionMonitorTool.d.ts +0 -100
- package/dist/umd/tools/ConnectionTool.d.ts +0 -40
- package/dist/umd/tools/FindRegistrationsTool.d.ts +0 -28
- package/dist/umd/tools/InitiateConnectionTool.d.ts +0 -30
- package/dist/umd/tools/ListConnectionsTool.d.ts +0 -33
- package/dist/umd/tools/ListUnapprovedConnectionRequestsTool.d.ts +0 -41
- package/dist/umd/tools/ManageConnectionRequestsTool.d.ts +0 -38
- package/dist/umd/tools/RegisterAgentTool.d.ts +0 -188
- package/dist/umd/tools/RetrieveProfileTool.d.ts +0 -34
- package/dist/umd/tools/SendMessageToConnectionTool.d.ts +0 -34
- package/dist/umd/tools/SendMessageTool.d.ts +0 -40
- package/src/agents/index.ts +0 -1
- package/src/plugins/BasePlugin.ts +0 -37
- package/src/plugins/GenericPlugin.ts +0 -19
- package/src/plugins/HCS10Plugin.ts +0 -14
- package/src/plugins/PluginLoader.ts +0 -121
- package/src/plugins/README.md +0 -113
- package/src/plugins/openconvai/OpenConvAIPlugin.ts +0 -124
- package/src/plugins/openconvai/index.ts +0 -1
- package/src/tools/AcceptConnectionRequestTool.ts +0 -196
- package/src/tools/CheckMessagesTool.ts +0 -194
- package/src/tools/ConnectionMonitorTool.ts +0 -550
- package/src/tools/ConnectionTool.ts +0 -231
- package/src/tools/FindRegistrationsTool.ts +0 -114
- package/src/tools/InitiateConnectionTool.ts +0 -137
- package/src/tools/ListConnectionsTool.ts +0 -158
- package/src/tools/ListUnapprovedConnectionRequestsTool.ts +0 -173
- package/src/tools/ManageConnectionRequestsTool.ts +0 -275
- package/src/tools/RegisterAgentTool.ts +0 -590
- package/src/tools/RetrieveProfileTool.ts +0 -94
- package/src/tools/SendMessageToConnectionTool.ts +0 -142
- package/src/tools/SendMessageTool.ts +0 -116
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { IPlugin, BasePluginContext } from './PluginInterface';
|
|
2
|
-
import { StructuredTool } from '@langchain/core/tools';
|
|
3
|
-
/**
|
|
4
|
-
* Base class for plugins to simplify implementation
|
|
5
|
-
*/
|
|
6
|
-
export declare abstract class BasePlugin<T extends BasePluginContext = BasePluginContext> implements IPlugin<T> {
|
|
7
|
-
abstract id: string;
|
|
8
|
-
abstract name: string;
|
|
9
|
-
abstract description: string;
|
|
10
|
-
abstract version: string;
|
|
11
|
-
abstract author: string;
|
|
12
|
-
protected context: T;
|
|
13
|
-
/**
|
|
14
|
-
* Initialize the plugin with the provided context
|
|
15
|
-
* @param context The context containing shared resources
|
|
16
|
-
*/
|
|
17
|
-
initialize(context: T): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Get the tools provided by this plugin
|
|
20
|
-
* @returns Array of tools provided by this plugin
|
|
21
|
-
*/
|
|
22
|
-
abstract getTools(): StructuredTool[];
|
|
23
|
-
/**
|
|
24
|
-
* Clean up resources when the plugin is unloaded
|
|
25
|
-
* Default implementation does nothing
|
|
26
|
-
*/
|
|
27
|
-
cleanup(): Promise<void>;
|
|
28
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BasePlugin } from './BasePlugin';
|
|
2
|
-
import { GenericPluginContext } from './PluginInterface';
|
|
3
|
-
import { StructuredTool } from '@langchain/core/tools';
|
|
4
|
-
/**
|
|
5
|
-
* Base class for platform-agnostic plugins that can be used across different implementations
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class GenericPlugin extends BasePlugin<GenericPluginContext> {
|
|
8
|
-
/**
|
|
9
|
-
* Namespace for the plugin, used for organizing and categorizing plugins
|
|
10
|
-
*/
|
|
11
|
-
abstract namespace: string;
|
|
12
|
-
/**
|
|
13
|
-
* Get the tools provided by this plugin
|
|
14
|
-
* @returns Array of tools provided by this plugin
|
|
15
|
-
*/
|
|
16
|
-
abstract getTools(): StructuredTool[];
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BasePlugin } from './BasePlugin';
|
|
2
|
-
import { PluginContext } from './PluginInterface';
|
|
3
|
-
import { StructuredTool } from '@langchain/core/tools';
|
|
4
|
-
/**
|
|
5
|
-
* Base class for plugins that require HCS10 specific functionality
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class HCS10Plugin extends BasePlugin<PluginContext> {
|
|
8
|
-
/**
|
|
9
|
-
* Get the tools provided by this plugin
|
|
10
|
-
* @returns Array of tools provided by this plugin
|
|
11
|
-
*/
|
|
12
|
-
abstract getTools(): StructuredTool[];
|
|
13
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { PluginContext, IPlugin } from './PluginInterface';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for loading a plugin
|
|
4
|
-
*/
|
|
5
|
-
export interface PluginLoadOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Whether to initialize the plugin after loading
|
|
8
|
-
* @default true
|
|
9
|
-
*/
|
|
10
|
-
initialize?: boolean;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Utility for loading plugins from different sources
|
|
14
|
-
*/
|
|
15
|
-
export declare class PluginLoader {
|
|
16
|
-
/**
|
|
17
|
-
* Load a plugin from a directory
|
|
18
|
-
* @param directory Path to the directory containing the plugin
|
|
19
|
-
* @param context Context to provide to the plugin during initialization
|
|
20
|
-
* @param options Options for loading the plugin
|
|
21
|
-
* @returns The loaded plugin instance
|
|
22
|
-
*/
|
|
23
|
-
static loadFromDirectory(directory: string, context: PluginContext, options?: PluginLoadOptions): Promise<IPlugin>;
|
|
24
|
-
/**
|
|
25
|
-
* Load a plugin from an npm package
|
|
26
|
-
* @param packageName Name of the npm package containing the plugin
|
|
27
|
-
* @param context Context to provide to the plugin during initialization
|
|
28
|
-
* @param options Options for loading the plugin
|
|
29
|
-
* @returns The loaded plugin instance
|
|
30
|
-
*/
|
|
31
|
-
static loadFromPackage(packageName: string, context: PluginContext, options?: PluginLoadOptions): Promise<IPlugin>;
|
|
32
|
-
/**
|
|
33
|
-
* Check if an object implements the IPlugin interface
|
|
34
|
-
* @param obj Object to check
|
|
35
|
-
* @returns true if the object implements IPlugin, false otherwise
|
|
36
|
-
*/
|
|
37
|
-
private static isValidPlugin;
|
|
38
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { GenericPlugin } from '../GenericPlugin';
|
|
2
|
-
import { GenericPluginContext } from '../PluginInterface';
|
|
3
|
-
import { StructuredTool } from '@langchain/core/tools';
|
|
4
|
-
/**
|
|
5
|
-
* OpenConvAI Plugin that provides all the tools from standards-agent-kit
|
|
6
|
-
* This plugin enables full HCS-10 agent functionality including registration,
|
|
7
|
-
* connection management, and messaging capabilities.
|
|
8
|
-
*/
|
|
9
|
-
export declare class OpenConvAIPlugin extends GenericPlugin {
|
|
10
|
-
id: string;
|
|
11
|
-
name: string;
|
|
12
|
-
description: string;
|
|
13
|
-
version: string;
|
|
14
|
-
author: string;
|
|
15
|
-
namespace: string;
|
|
16
|
-
private hcs10Client?;
|
|
17
|
-
private stateManager?;
|
|
18
|
-
private tools;
|
|
19
|
-
initialize(context: GenericPluginContext): Promise<void>;
|
|
20
|
-
private initializeTools;
|
|
21
|
-
getTools(): StructuredTool[];
|
|
22
|
-
cleanup(): Promise<void>;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './OpenConvAIPlugin';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
-
import { IStateManager } from '../state/state-types';
|
|
5
|
-
export interface AcceptConnectionRequestToolParams extends ToolParams {
|
|
6
|
-
hcsClient: HCS10Client;
|
|
7
|
-
stateManager: IStateManager;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A tool specifically for accepting incoming connection requests.
|
|
11
|
-
*/
|
|
12
|
-
export declare class AcceptConnectionRequestTool extends StructuredTool {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
schema: z.ZodObject<{
|
|
16
|
-
requestKey: z.ZodString;
|
|
17
|
-
hbarFee: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
hbarFee?: number;
|
|
21
|
-
exemptAccountIds?: string[];
|
|
22
|
-
requestKey?: string;
|
|
23
|
-
}, {
|
|
24
|
-
hbarFee?: number;
|
|
25
|
-
exemptAccountIds?: string[];
|
|
26
|
-
requestKey?: string;
|
|
27
|
-
}>;
|
|
28
|
-
private hcsClient;
|
|
29
|
-
private stateManager;
|
|
30
|
-
private logger;
|
|
31
|
-
constructor({ hcsClient, stateManager, ...rest }: AcceptConnectionRequestToolParams);
|
|
32
|
-
protected _call({ requestKey, hbarFee, exemptAccountIds, }: z.infer<this['schema']>): Promise<string>;
|
|
33
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
-
import { IStateManager } from '../state/state-types';
|
|
5
|
-
export interface CheckMessagesToolParams extends ToolParams {
|
|
6
|
-
hcsClient: HCS10Client;
|
|
7
|
-
stateManager: IStateManager;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A tool to check for new messages on an active HCS-10 connection topic,
|
|
11
|
-
* or optionally fetch the latest messages regardless of timestamp.
|
|
12
|
-
*/
|
|
13
|
-
export declare class CheckMessagesTool extends StructuredTool {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
schema: z.ZodObject<{
|
|
17
|
-
targetIdentifier: z.ZodString;
|
|
18
|
-
fetchLatest: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19
|
-
lastMessagesCount: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
targetIdentifier?: string;
|
|
22
|
-
fetchLatest?: boolean;
|
|
23
|
-
lastMessagesCount?: number;
|
|
24
|
-
}, {
|
|
25
|
-
targetIdentifier?: string;
|
|
26
|
-
fetchLatest?: boolean;
|
|
27
|
-
lastMessagesCount?: number;
|
|
28
|
-
}>;
|
|
29
|
-
hcsClient: HCS10Client;
|
|
30
|
-
private stateManager;
|
|
31
|
-
private logger;
|
|
32
|
-
constructor({ hcsClient, stateManager, ...rest }: CheckMessagesToolParams);
|
|
33
|
-
protected _call({ targetIdentifier, fetchLatest, lastMessagesCount, }: z.infer<this['schema']>): Promise<string>;
|
|
34
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
-
import { IStateManager } from '../state/state-types';
|
|
5
|
-
export interface FeeDefinition {
|
|
6
|
-
amount: number;
|
|
7
|
-
collectorAccount?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface TokenFeeDefinition extends FeeDefinition {
|
|
10
|
-
tokenId: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ConnectionMonitorToolParams extends ToolParams {
|
|
13
|
-
hcsClient: HCS10Client;
|
|
14
|
-
stateManager: IStateManager;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* A tool for monitoring incoming connection requests and accepting them with optional fee settings.
|
|
18
|
-
*/
|
|
19
|
-
export declare class ConnectionMonitorTool extends StructuredTool {
|
|
20
|
-
name: string;
|
|
21
|
-
description: string;
|
|
22
|
-
schema: z.ZodObject<{
|
|
23
|
-
acceptAll: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
targetAccountId: z.ZodOptional<z.ZodString>;
|
|
25
|
-
hbarFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
|
-
amount: z.ZodNumber;
|
|
27
|
-
collectorAccount: z.ZodOptional<z.ZodString>;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
amount?: number;
|
|
30
|
-
collectorAccount?: string;
|
|
31
|
-
}, {
|
|
32
|
-
amount?: number;
|
|
33
|
-
collectorAccount?: string;
|
|
34
|
-
}>, "many">>;
|
|
35
|
-
tokenFees: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
-
amount: z.ZodNumber;
|
|
37
|
-
tokenId: z.ZodString;
|
|
38
|
-
collectorAccount: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
amount?: number;
|
|
41
|
-
tokenId?: string;
|
|
42
|
-
collectorAccount?: string;
|
|
43
|
-
}, {
|
|
44
|
-
amount?: number;
|
|
45
|
-
tokenId?: string;
|
|
46
|
-
collectorAccount?: string;
|
|
47
|
-
}>, "many">>;
|
|
48
|
-
exemptAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
49
|
-
monitorDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
defaultCollectorAccount: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
hbarFees?: {
|
|
53
|
-
amount?: number;
|
|
54
|
-
collectorAccount?: string;
|
|
55
|
-
}[];
|
|
56
|
-
tokenFees?: {
|
|
57
|
-
amount?: number;
|
|
58
|
-
tokenId?: string;
|
|
59
|
-
collectorAccount?: string;
|
|
60
|
-
}[];
|
|
61
|
-
exemptAccountIds?: string[];
|
|
62
|
-
targetAccountId?: string;
|
|
63
|
-
acceptAll?: boolean;
|
|
64
|
-
monitorDurationSeconds?: number;
|
|
65
|
-
defaultCollectorAccount?: string;
|
|
66
|
-
}, {
|
|
67
|
-
hbarFees?: {
|
|
68
|
-
amount?: number;
|
|
69
|
-
collectorAccount?: string;
|
|
70
|
-
}[];
|
|
71
|
-
tokenFees?: {
|
|
72
|
-
amount?: number;
|
|
73
|
-
tokenId?: string;
|
|
74
|
-
collectorAccount?: string;
|
|
75
|
-
}[];
|
|
76
|
-
exemptAccountIds?: string[];
|
|
77
|
-
targetAccountId?: string;
|
|
78
|
-
acceptAll?: boolean;
|
|
79
|
-
monitorDurationSeconds?: number;
|
|
80
|
-
defaultCollectorAccount?: string;
|
|
81
|
-
}>;
|
|
82
|
-
private hcsClient;
|
|
83
|
-
private stateManager;
|
|
84
|
-
private logger;
|
|
85
|
-
private isMonitoring;
|
|
86
|
-
private listConnectionsTool;
|
|
87
|
-
constructor({ hcsClient, stateManager, ...rest }: ConnectionMonitorToolParams);
|
|
88
|
-
updateClient(newClient: HCS10Client): void;
|
|
89
|
-
protected _call({ acceptAll, targetAccountId, hbarFees, tokenFees, exemptAccountIds, monitorDurationSeconds, defaultCollectorAccount, }: z.infer<this['schema']>): Promise<string>;
|
|
90
|
-
private createFeeConfig;
|
|
91
|
-
private extractAccountId;
|
|
92
|
-
private acceptConnectionRequest;
|
|
93
|
-
private formatFeeString;
|
|
94
|
-
/**
|
|
95
|
-
* Updates the ConnectionsManager with latest connection data
|
|
96
|
-
* This method is meant to be called when changes to connections happen
|
|
97
|
-
* outside this tool's monitoring process
|
|
98
|
-
*/
|
|
99
|
-
update(): void;
|
|
100
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
2
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { Logger } from '@hashgraphonline/standards-sdk';
|
|
5
|
-
import { IStateManager } from '../state/state-types';
|
|
6
|
-
export interface ConnectionToolParams extends ToolParams {
|
|
7
|
-
client: HCS10Client;
|
|
8
|
-
stateManager: IStateManager;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* ConnectionTool monitors the *current* agent's inbound topic for connection requests
|
|
12
|
-
* and automatically handles them using the HCS-10 standard SDK flow.
|
|
13
|
-
* Use this ONLY to passively LISTEN for other agents trying to connect TO YOU.
|
|
14
|
-
* This tool takes NO arguments and does NOT start outgoing connections.
|
|
15
|
-
*/
|
|
16
|
-
export declare class ConnectionTool extends StructuredTool {
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
client: HCS10Client;
|
|
20
|
-
logger: Logger;
|
|
21
|
-
private stateManager;
|
|
22
|
-
private isMonitoring;
|
|
23
|
-
private monitoringTopic;
|
|
24
|
-
schema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
25
|
-
/**
|
|
26
|
-
* @param client - Instance of HCS10Client.
|
|
27
|
-
* @param stateManager - Instance of StateManager for shared state management.
|
|
28
|
-
*/
|
|
29
|
-
constructor({ client, stateManager, ...rest }: ConnectionToolParams);
|
|
30
|
-
/**
|
|
31
|
-
* Initiates the connection request monitoring process in the background.
|
|
32
|
-
* Gets the inbound topic ID from the configured client.
|
|
33
|
-
*/
|
|
34
|
-
_call(): Promise<string>;
|
|
35
|
-
/**
|
|
36
|
-
* The core monitoring loop.
|
|
37
|
-
*/
|
|
38
|
-
private monitorIncomingRequests;
|
|
39
|
-
stopMonitoring(): void;
|
|
40
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
-
import { AIAgentCapability } from '@hashgraphonline/standards-sdk';
|
|
5
|
-
export interface FindRegistrationsToolParams extends ToolParams {
|
|
6
|
-
hcsClient: HCS10Client;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* A tool to search for registered HCS-10 agents using the configured registry.
|
|
10
|
-
*/
|
|
11
|
-
export declare class FindRegistrationsTool extends StructuredTool {
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
schema: z.ZodObject<{
|
|
15
|
-
accountId: z.ZodOptional<z.ZodString>;
|
|
16
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AIAgentCapability>, "many">>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
accountId?: string;
|
|
19
|
-
tags?: AIAgentCapability[];
|
|
20
|
-
}, {
|
|
21
|
-
accountId?: string;
|
|
22
|
-
tags?: AIAgentCapability[];
|
|
23
|
-
}>;
|
|
24
|
-
private hcsClient;
|
|
25
|
-
private logger;
|
|
26
|
-
constructor({ hcsClient, ...rest }: FindRegistrationsToolParams);
|
|
27
|
-
protected _call({ accountId, tags, }: z.infer<this['schema']>): Promise<string>;
|
|
28
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
-
import { IStateManager } from '../state/state-types';
|
|
5
|
-
export interface InitiateConnectionToolParams extends ToolParams {
|
|
6
|
-
hcsClient: HCS10Client;
|
|
7
|
-
stateManager: IStateManager;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A tool to actively START a NEW HCS-10 connection TO a target agent.
|
|
11
|
-
* Requires the target agent's account ID.
|
|
12
|
-
* It retrieves their profile, sends a connection request, waits for confirmation, and stores the connection using the provided stateManager.
|
|
13
|
-
* Use this tool ONLY to actively INITIATE an OUTGOING connection.
|
|
14
|
-
*/
|
|
15
|
-
export declare class InitiateConnectionTool extends StructuredTool {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
schema: z.ZodObject<{
|
|
19
|
-
targetAccountId: z.ZodString;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
targetAccountId?: string;
|
|
22
|
-
}, {
|
|
23
|
-
targetAccountId?: string;
|
|
24
|
-
}>;
|
|
25
|
-
private hcsClient;
|
|
26
|
-
private stateManager;
|
|
27
|
-
private logger;
|
|
28
|
-
constructor({ hcsClient, stateManager, ...rest }: InitiateConnectionToolParams);
|
|
29
|
-
protected _call({ targetAccountId }: z.infer<this['schema']>): Promise<string>;
|
|
30
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { IStateManager } from '../state/state-types';
|
|
4
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
5
|
-
export interface ListConnectionsToolParams extends ToolParams {
|
|
6
|
-
stateManager: IStateManager;
|
|
7
|
-
hcsClient?: HCS10Client;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A tool to list currently active HCS-10 connections stored in the state manager.
|
|
11
|
-
* Enhanced to show more details similar to moonscape's implementation.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ListConnectionsTool extends StructuredTool {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
schema: z.ZodObject<{
|
|
17
|
-
includeDetails: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
showPending: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
includeDetails?: boolean;
|
|
21
|
-
showPending?: boolean;
|
|
22
|
-
}, {
|
|
23
|
-
includeDetails?: boolean;
|
|
24
|
-
showPending?: boolean;
|
|
25
|
-
}>;
|
|
26
|
-
private stateManager;
|
|
27
|
-
private hcsClient?;
|
|
28
|
-
private logger;
|
|
29
|
-
constructor({ stateManager, hcsClient, ...rest }: ListConnectionsToolParams);
|
|
30
|
-
protected _call(args: z.infer<this['schema']>): Promise<string>;
|
|
31
|
-
private formatConnection;
|
|
32
|
-
private getEnhancedConnections;
|
|
33
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { IStateManager } from '../state/state-types';
|
|
4
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
5
|
-
type ListPendingRequestsToolParams = ToolParams & {
|
|
6
|
-
hcsClient: HCS10Client;
|
|
7
|
-
stateManager: IStateManager;
|
|
8
|
-
};
|
|
9
|
-
export declare class ListUnapprovedConnectionRequestsTool extends StructuredTool {
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
schema: z.ZodObject<{
|
|
13
|
-
sortBy: z.ZodOptional<z.ZodEnum<["time_asc", "time_desc", "name_asc", "name_desc"]>>;
|
|
14
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
sortBy?: "time_asc" | "time_desc" | "name_asc" | "name_desc";
|
|
17
|
-
limit?: number;
|
|
18
|
-
}, {
|
|
19
|
-
sortBy?: "time_asc" | "time_desc" | "name_asc" | "name_desc";
|
|
20
|
-
limit?: number;
|
|
21
|
-
}>;
|
|
22
|
-
private hcsClient;
|
|
23
|
-
private stateManager;
|
|
24
|
-
private logger;
|
|
25
|
-
constructor({ hcsClient, stateManager, ...rest }: ListPendingRequestsToolParams);
|
|
26
|
-
protected _call({ sortBy, limit, }: z.infer<this['schema']>): Promise<string>;
|
|
27
|
-
/**
|
|
28
|
-
* Processes the connection connectionMap to find all requests
|
|
29
|
-
* that are not fully established (incoming unapproved and outgoing pending).
|
|
30
|
-
*/
|
|
31
|
-
private findAllPendingRequests;
|
|
32
|
-
/**
|
|
33
|
-
* Formats the list of pending requests for display.
|
|
34
|
-
*/
|
|
35
|
-
private formatRequestsList;
|
|
36
|
-
/**
|
|
37
|
-
* Sorts connection requests based on the specified criteria.
|
|
38
|
-
*/
|
|
39
|
-
private sortRequests;
|
|
40
|
-
}
|
|
41
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { StructuredTool, ToolParams } from '@langchain/core/tools';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { HCS10Client } from '../hcs10/HCS10Client';
|
|
4
|
-
import { IStateManager } from '../state/state-types';
|
|
5
|
-
export interface ManageConnectionRequestsToolParams extends ToolParams {
|
|
6
|
-
hcsClient: HCS10Client;
|
|
7
|
-
stateManager: IStateManager;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A tool for managing incoming connection requests in a LangChain-compatible way.
|
|
11
|
-
* This tool allows an agent to list, view details of, and accept/reject incoming connection requests.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ManageConnectionRequestsTool extends StructuredTool {
|
|
14
|
-
name: string;
|
|
15
|
-
description: string;
|
|
16
|
-
schema: z.ZodObject<{
|
|
17
|
-
action: z.ZodEnum<["list", "view", "reject"]>;
|
|
18
|
-
requestKey: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
action?: "list" | "view" | "reject";
|
|
21
|
-
requestKey?: string;
|
|
22
|
-
}, {
|
|
23
|
-
action?: "list" | "view" | "reject";
|
|
24
|
-
requestKey?: string;
|
|
25
|
-
}>;
|
|
26
|
-
private hcsClient;
|
|
27
|
-
private stateManager;
|
|
28
|
-
private logger;
|
|
29
|
-
private lastRefreshTime;
|
|
30
|
-
private refreshIntervalMs;
|
|
31
|
-
constructor({ hcsClient, stateManager, ...rest }: ManageConnectionRequestsToolParams);
|
|
32
|
-
protected _call({ action, requestKey, }: z.infer<this['schema']>): Promise<string>;
|
|
33
|
-
private refreshRequestsIfNeeded;
|
|
34
|
-
private refreshRequests;
|
|
35
|
-
private listRequests;
|
|
36
|
-
private viewRequest;
|
|
37
|
-
private rejectRequest;
|
|
38
|
-
}
|