import type { SessionStore } from './store.js'; export interface ToolDefinition { name: string; description: string; inputSchema: { type: 'object'; properties: Record; required?: string[]; }; } export declare const TOOL_DEFINITIONS: ToolDefinition[]; export interface ToolResult { text: string; isError?: boolean; } export interface ToolContext { store: SessionStore; /** 허브 연결 상태 — "세션 0개"가 연결 실패인지 정말 없는 건지 구분해 준다 */ hubConnected: () => boolean; /** * 첫 연결 시도가 끝날 때까지 기다린다 (성공이든 실패든). * * 클라이언트는 서버를 띄운 직후 곧바로 툴을 부른다. 그 시점엔 WS 핸드셰이크가 * 아직 진행 중이라 이 대기가 없으면 "허브 미연결"이라고 거짓 보고한다 (실측). * 재접속 중에는 기다리지 않는다 — 끊긴 사실을 즉시 알리는 게 맞다. */ waitForHub: () => Promise; hubUrl: string; } export declare function callTool(name: string, rawArgs: unknown, ctx: ToolContext): ToolResult;