UNPKG

@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.

39 lines (38 loc) 1.45 kB
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"]>; requestKey: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { action: "list" | "view" | "reject"; requestKey?: string | undefined; }, { action: "list" | "view" | "reject"; requestKey?: string | undefined; }>; private hcsClient; private stateManager; private logger; private lastRefreshTime; private refreshIntervalMs; constructor({ hcsClient, stateManager, ...rest }: ManageConnectionRequestsToolParams); protected _call({ action, requestKey, }: z.infer<this['schema']>): Promise<string>; private refreshRequestsIfNeeded; private refreshRequests; private listRequests; private viewRequest; private rejectRequest; }