Skip to main content

Module formal_ai

Module formal_ai 

Source
Expand description

The task loop of the experimental --use-formal-ai mode (issue #255). Mirrors js/src/lib/formal-ai.js.

The natural-language request goes to Formal AI verbatim. Formal AI decides what to observe and which tool calls to make; start checks every call against the effect policy, runs approved calls, reports each receipt back and keeps evidence of what actually happened. The run ends when Formal AI gives its final answer, says it did not understand, or a bound, refusal, protocol error or cancellation stops it, and the exit status says which.

Structs§

Outcome
The final state of a run.
TaskOptions
What one task run needs besides the Formal AI client.

Functions§

describe_effects
Observed working-directory changes, in words.
run_formal_ai_task
Run one request to completion. Fills evidence (a JSON object) as it goes, sets evidence.outcome and returns the outcome.
signal_exit
Exit status of a cancellation by signal name (128 + signal number).