package miaou-runner

  1. Overview
  2. Docs

Module Miaou_runner_tui.Headless_json_runnerSource

Headless JSON-over-stdio runner. Activated when MIAOU_DRIVER=headless. Reads newline-delimited JSON commands from stdin and writes JSON responses to stdout. The app binary becomes a subprocess that an AI agent or CI script can drive without a real terminal.

Sourcemodule Tui_page = Miaou_core.Tui_page
Sourceval ansi_strip : string -> string

Remove ANSI/VT escape sequences from s, returning plain text.

Sourceval on_frame_fn : (rows:int -> cols:int -> string -> unit) option ref

Optional callback invoked with the raw ANSI frame on every frame emit. Set by run ~on_frame before the command loop starts. The callback receives the terminal dimensions (rows, cols) followed by the raw ANSI data so that a viewer can resize its terminal to match.

Sourceval current_frame : unit -> [> `Assoc of (string * [> `Int of int | `String of string ]) list ]
Sourceval nav_response : string -> [> `Assoc of (string * [> `String of string ]) list ]
Sourceval error_response : string -> [> `Assoc of (string * [> `String of string ]) list ]
Sourceval emit : Yojson.Safe.t -> unit
Sourceval handle_cmd : (string * Yojson.Safe.t) list -> bool

Process one parsed command. Returns true to keep running, false to stop the loop.

Sourceval run : ?on_frame:??? -> (module Tui_page.PAGE_SIG) -> 'a