import type { ProbedRecord } from "../../logsViewer/session/registry.js"; import type { SessionReply, SessionRequest } from "../../logsViewer/session/protocol.js"; import { type Trace } from "../../runDirectory/traces.js"; import type { Target } from "./target.js"; export type CommandResult = { text: string; json: unknown; exitCode: number; }; export type CommandDeps = { readLog(logPath: string): Trace[]; request(socketPath: string, req: SessionRequest): Promise; }; export declare const defaultCommandDeps: (request: CommandDeps["request"]) => CommandDeps; /** `list`: every record, with its state. Not a function of a target. */ export declare function list(probed: readonly ProbedRecord[]): CommandResult; /** `get`: the row under the viewer's cursor, expanded. */ export declare function get(target: Target, deps: CommandDeps): CommandResult; /** `show `: one row, expanded, with its comments. */ export declare function show(target: Target, deps: CommandDeps): CommandResult; /** `comments`: every comment on the target's trace (or every trace), each * with its row expanded, or listed by its anchor when the row is gone. */ export declare function comments(target: Target, all: boolean, deps: CommandDeps): CommandResult; /** `comment add `: write through the target's store, then tell * an open viewer to re-read. */ export declare function commentAdd(target: Target, text: string, options: { replyTo?: string; }, deps: CommandDeps): Promise; /** `navigate `: move the open viewer's cursor. The argument may also be * a trace id (or unique prefix) alone, which opens that trace on its first * row. */ export declare function navigate(target: Target, deps: CommandDeps): Promise; /** `pick`: open the viewer's list of traces. */ export declare function pick(target: Target, deps: CommandDeps): Promise;