import { spawn } from "node:child_process"; import { injectExecFollowup } from "../exec/followup.js"; import { readUsableSessionState } from "../hooks/session.js"; import { readQuestionEvents } from "../question/events.js"; import { type InjectQuestionAnswersToPane } from "../question/state.js"; import type { QuestionAnswerEntry, QuestionRecord } from "../question/types.js"; import { resolveOmxCliEntryPath } from "../utils/paths.js"; export type HermesBridgeFailureCode = "artifact_missing" | "artifact_outside_safe_roots" | "command_failed" | "invalid_input" | "mutation_not_allowed" | "no_session" | "prompt_not_accepted" | "question_invalid_answer" | "question_not_open" | "question_unknown"; export interface HermesBridgeResult = Record> { ok: boolean; code?: HermesBridgeFailureCode; error?: string; data?: T; } export interface HermesSessionSummary { session_id: string; cwd?: string; started_at?: string; active: boolean; source: "current" | "session_state_dir"; modes: string[]; } export interface HermesStatusSessionSummary { session_id: string; native_session_id?: string; cwd?: string; started_at?: string; } export interface HermesModeStatusSummary { mode: string; scope: string; active?: boolean; phase?: string; run_outcome?: string; lifecycle_outcome?: string; updated_at?: string; completed_at?: string; error?: string; } export interface HermesQuestionSummary { question_id: string; session_id?: string; created_at: string; updated_at: string; status: QuestionRecord["status"]; source?: string; header?: string; question: string; questions?: QuestionRecord["questions"]; options?: QuestionRecord["options"]; allow_other?: boolean; other_label?: string; type?: QuestionRecord["type"]; multi_select?: boolean; renderer?: QuestionRecord["renderer"]; error?: QuestionRecord["error"]; } export interface HermesBridgeDeps { now?: () => Date; spawnProcess?: typeof spawn; resolveOmxCliEntryPath?: typeof resolveOmxCliEntryPath; readUsableSessionState?: typeof readUsableSessionState; injectExecFollowup?: typeof injectExecFollowup; } export declare function hermesListSessions(args: Record, deps?: HermesBridgeDeps): Promise>; export declare function hermesReadStatus(args: Record, deps?: HermesBridgeDeps): Promise>; export declare function hermesListQuestionEvents(args: Record): Promise>; }>>; export declare function hermesListQuestions(args: Record): Promise>; export declare function hermesSubmitQuestionAnswer(args: Record, deps?: { injectAnswersToPane?: InjectQuestionAnswersToPane; }): Promise>; export declare function hermesSendPrompt(args: Record, deps?: HermesBridgeDeps): Promise>; export declare function hermesStartSession(args: Record, deps?: HermesBridgeDeps): Promise>; export declare function hermesListArtifacts(args: Record): Promise; }>>; export declare function hermesReadArtifact(args: Record): Promise>; export declare function hermesReadTail(args: Record): Promise>; export declare function hermesReportStatus(args: Record, deps?: HermesBridgeDeps): Promise; }>>; //# sourceMappingURL=hermes-bridge.d.ts.map