Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatAgentMessage ¶
FormatAgentMessage parses a JSON line from the agent's stdout and returns a human-readable message to send to the channel. Returns empty string for messages that should not be forwarded (status messages, tool results, etc.).
Types ¶
type ExecFunc ¶
ExecFunc matches exec.CommandContext. It is a type alias (not a defined type) so callers' own named exec-override types stay assignable without conversion.
type Options ¶
type Options struct {
BinaryPath string
Exec ExecFunc
SessionID string
Prompt string
Model string
Files []string
Heartbeat bool
ResultFile string
ExtraEnv []string
Stdin *os.File
KeepAlive bool
OnLine func(line []byte)
}
Options configures a single `infer headless` subprocess run.
type Result ¶
Result is the outcome of a subprocess run.
func Run ¶
Run spawns `infer headless ...`, streams stdout line-by-line and returns the harvested final assistant message. The run logs JSON to stderr, collected into this process's log as it runs. The returned error is the subprocess setup/exit error. Callers format their own user-facing messages from it.