Expand description
Client-side helpers for talking to the shared-world daemon: building a spawn
request from local inputs and exchanging it over the control socket. Shared by
lev run (and reusable by other clients). The socket-path resolution + connect
live in the binary; these cores are unit-testable against a fake socket server.
Structs§
- Agent
Source - Everything a spawn request needs from the agent’s own files.
- Launch
Request - What
lev runwas asked for, before any of it is resolved. - Spawned
Run - What
lev run --jsonprints on a successful spawn.
Functions§
- batch_
report - Render a batch spawn outcome: a JSON array when
json, else onespawned <id>sentence per line. The single-run report keeps its own object/sentence shape viaspawn_report, so existing--jsoncallers parse exactly what they always did. - load_
agent_ source - Find the agent’s manifest and parse it, once.
- never_
interactive - The stdin probe for callers that build a spawn request from inside the daemon: fan-out workers and sub-agents. There is no terminal there, and an editor launched from a background process would block it forever with nobody to close the window.
- resolve_
spawn_ args - Resolve the local inputs of a spawn request: find and parse the manifest,
resolve the
--<region>flags, resolve the task, and mint a run id from the agent’s directory name. - send_
spawn - Send a resolved spawn request to the daemon and report the outcome, printing the new run id on success.
- send_
spawn_ batch - Send
countcopies of a resolved spawn request - the same agent, task, and flags, each under its own fresh run id - and print one combined report. - spawn_
report - Render a spawn outcome for printing: JSON when
json, else the sentence.