1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! `litany invoke` — the front door for one **inner invocation**
//! (`docs/DESIGN_CODE_EXECUTION.md` §2.1, ARCH §3.4).
//!
//! Stdin is one `tool_use` block, `{id, name, input}` — the same object
//! a tool control reads (ARCH §3.3 *Tool control*). The invocation runs
//! through the door's gates and the executor, its **raw** result
//! envelope goes to stdout, and the process exits with the tool's own
//! exit code. Nothing is committed and no transcript entry is written:
//! what the model reads is the output of the tool that composed this
//! invocation, never the invocation itself.
//!
//! Why a verb rather than a pipe between the composing tool and the
//! window: `docs/PRINCIPLES.md` *Everyone uses the front door* — "no
//! in-process sidechannel, no ad-hoc socket". A verb also makes a
//! composing program testable against a fixture door.
//!
//! It takes no arguments. Whose invocation this is arrives in the §3.3
//! stdio contract's environment, as it does for every built-in, so a
//! composing tool need pass nothing but the block itself.
use ;
use cratedoor;
use crateProcessEnv;
/// `litany invoke` — no arguments; the block is stdin.
/// Run one invocation over the binding's injected stdio, driver target,
/// adapter target, stop flag and tool injection ([`Fx`](super::Fx)).
/// The tool's exit code rides back as
/// [`Outcome::Code`](super::Outcome::Code), the same contract
/// `litany tool` ends on (§3.3).