/** * Hivemind tmux-state-query — read-only session metadata tool for the * observability layer. * * Exposes the current tmux session tracking state (sessions, panes, * counts) without mutating any state. Permission-gated: only * orchestrator-tier agents may invoke. * * Phase 52 design (REQ-04, REQ-05): * - 3 actions: list-sessions, get-session, get-summary * - No mutation — strictly read-only * - Same permission gate pattern as tmux-copilot.ts * - Graceful unavailable: when the in-tree integration is not wired, * returns {available: false, reason: "tmux-not-wired"} instead of * throwing. */ import { tool } from "@opencode-ai/plugin/tool"; import { z } from "zod"; /** * Summary of one tracked session. Exposed as part of the query result * so observability consumers can inspect what the tmux subsystem is * currently tracking. */ export interface SessionSummary { sessionId: string; agent: string; delegationId: string; paneId: string; directory: string; spawnTime: number; } export type TmuxStateQueryResult = { available: false; reason: "tmux-not-wired"; } | { error: { kind: "invalid-input"; issues: z.ZodIssue[]; }; } | { error: { kind: "permission-denied"; agent: string; }; } | { sessions: SessionSummary[]; } | { session: SessionSummary | null; } | { summary: { total: number; active: number; spawning: number; }; }; export declare const tmuxStateQueryToolName = "tmux-state-query"; export declare const tmuxStateQueryTool: ReturnType; //# sourceMappingURL=tmux-state-query.d.ts.map