@hashgraphonline/standards-agent-kit
Version:
A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication.
40 lines (39 loc) • 1.48 kB
TypeScript
import { StructuredTool, ToolParams } from '@langchain/core/tools';
import { z } from 'zod';
import { HCS10Client } from '../hcs10/HCS10Client';
import { IStateManager } from '../state/state-types';
export interface ManageConnectionRequestsToolParams extends ToolParams {
hcsClient: HCS10Client;
stateManager: IStateManager;
}
/**
* A tool for managing incoming connection requests in a LangChain-compatible way.
* This tool allows an agent to list, view details of, and accept/reject incoming connection requests.
*/
export declare class ManageConnectionRequestsTool extends StructuredTool {
name: string;
description: string;
schema: z.ZodObject<{
action: z.ZodEnum<["list", "view", "reject"]>;
requestId: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
action: "list" | "view" | "reject";
requestId?: number | undefined;
}, {
action: "list" | "view" | "reject";
requestId?: number | undefined;
}>;
private hcsClient;
private stateManager;
private logger;
private lastRefreshTime;
private refreshIntervalMs;
constructor({ hcsClient, stateManager, ...rest }: ManageConnectionRequestsToolParams);
protected _call({ action, requestId, }: z.infer<this['schema']>): Promise<string>;
private refreshRequestsIfNeeded;
refreshRequests(): Promise<void>;
private listRequests;
private viewRequest;
private rejectRequest;
private extractAccountId;
}