Skip to main content

Module formal_ai_runtime

Module formal_ai_runtime 

Source
Expand description

Resolution and identity of the Formal AI runtime used by --use-formal-ai (issue #255). Mirrors js/src/lib/formal-ai-runtime.js.

Formal AI is not published to a registry, so start never installs or guesses a runtime. It uses exactly one of:

  • START_FORMAL_AI_ROOT: a link-assistant/formal-ai checkout whose JavaScript server (js/server/main.mjs --agent-mode) start spawns on a private loopback port with a private memory directory;
  • START_FORMAL_AI_URL: an already running Formal AI server, which reports no version, so it is used only with START_FORMAL_AI_ALLOW_UNVERIFIED=1.

Without either, or with a runtime older than the qualified version, the mode fails; it never falls back to an LLM, the alias table or a shell.

Structs§

Runtime
A resolved runtime; a spawned server is stopped on stop() or drop.
RuntimeIdentity
Exact source identity of the runtime, recorded in logs and evidence.

Constants§

INSTALL_HINT
MIN_FORMAL_AI_VERSION
The Formal AI release this mode was qualified against.
SERVER_ENTRY

Functions§

checkout_identity
Source identity of a Formal AI checkout.
compare_versions
Compare dotted numeric versions; None when either is not one.
describe_identity
One-line rendering of an identity for terminals and logs.
qualify_identity
Check a resolved identity against the qualified version and an optional START_FORMAL_AI_EXPECTED_REVISION pin.
read_cargo_version
version of the [package] table of <root>/rust/Cargo.toml.
start_runtime
Resolve, qualify and (for a checkout) start the runtime.