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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
//! **The driver's ask** (REMOTE §3, §5; bl-c907): how a `yog lernie` process
//! puts a question to the engine that spawned it.
//!
//! The injection runs inside the **driver**, a child process yog spawned
//! (`src/multiplex/lernie.rs`). The facts a `clients` op needs are not all on
//! disk — REMOTE §5 makes *presence* connection-scoped RAM in the engine, on
//! purpose — so the driver cannot read the roster itself. It asks, through the
//! door REMOTE §3 already reserves for the world's own residents:
//!
//! > *"The disk inbox survives for in-world callers. Agents drive yog through
//! > the `yog` PATH shim and the `gestures/` deposit inbox — same machine, same
//! > world, disk is the bus."*
//!
//! So this adds **no verb and no transport**. It is `Query::Clients` — the
//! roster bl-4e08 landed — deposited create-only into `<yog-state-root>/
//! gestures/` and read back out of `replies/`, exactly as `yog gesture` does
//! ([`crate::boundary::sugar`]); the reply is decoded with the one reply codec.
//! The driver resolves the same state root the engine writes because the world
//! hands `XDG_STATE_HOME` down to every child (§16.2), so both fold to
//! `<world>/state/yog`.
//!
//! **Every wait is bounded, and the bound is the router's own** (lernie
//! `docs/DESIGN_TOOL_INJECTION.md` §3.3: *"Carry your own deadline … A vanished
//! endpoint is an in-band error result, never a hang … Watch
//! `RoutedCall::stop`"*). A [`Budget`] is a poll count and a tick, and a stop
//! landing mid-wait ends the wait — an engine that never answers is an error
//! string the model reads, never a wedged drive.
use Path;
use ;
use Duration;
use ;
use cratedeposit;
use crate;
use crateClientRow;
/// How long the driver waits on the engine: `waits` looks, `tick` apart. A
/// latency knob and a deadline in one — the product is the wall-clock bound,
/// and both halves are injected so a test never sleeps for real.
/// The gesture-id seed every driver ask is minted from. Legibility only —
/// uniqueness is the filesystem's ([`deposit::mint`], bl-aa9f).
const SEED: &str = "toolhost";
/// Deposit `request` and wait for its reply envelope, or say why there is
/// none. The four failure sentences are all in-band results: a driver that
/// cannot reach its engine renders an error the model steps on.
/// The workspace's client roster (REMOTE §5.1's `Query::Clients`): registered
/// clients, which are live this instant, and what each advertises — joined by
/// the engine at the moment it is asked, so nothing here is cached and a
/// presence flap needs no invalidation.
///
/// A refusal envelope and an envelope of the wrong kind are the same kind of
/// answer — the engine did not give a roster — and both name what came back.