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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
//! The executor seam.
//!
//! An [`Executor`] is *where* a node's dispatch runs. v1 ships [`LocalExecutor`]
//! only — it supports both workspace variants — while the trait and the
//! [rules grammar](crate::rules) are shaped so a dispatch-server executor over a
//! WebSocket, and a Kubernetes one, drop in behind the same interface.
//!
//! Two of the request's fields are a sibling library's types, so this seam is
//! also where the cross-repo wiring is proven at compile time: the agent-graph
//! config comes from `oneagentgraph` and the repository session from `onevcs`.
//! The contract names those types `ResolvedGraphRef` and `SessionSpec`; neither
//! sibling exports a type by that name, and
//! [`docs/contract-divergences.md`](../../../docs/contract-divergences.md)
//! records what is used instead and why.
//!
//! Nothing here dispatches, probes capacity, relays a stream, waits, or cancels.
// llmlint: ignore-file[invalid_states_unrepresentable] every shape in this module is the
// one `docs/contract.md` declares in its own Rust block, character for character, and
// narrowing any of them is the interface drift the interface-only stage forbids (see
// src/AGENTS.md). That covers `Executor::name -> &str` (an `ExecutorName` newtype is a
// public item the contract does not name; the rules file validates the name against the
// declared executors, and that validator does not exist yet), `Capabilities.vcs_sessions:
// bool` (written as `{ vcs_sessions: bool, ... }`, and an executor either accepts
// `WorkspaceSpec::VcsSession` or it does not), and `CapacityReport.load1: f64` (written
// as `{ slots_free, load1, mem_free_bytes }`, where rejecting a negative or NaN load is
// the probe's job and the probe is what this stage does not implement). Revisit each with
// the executor implementation rather than widening this directive.
use PathBuf;
use ConfigRef;
use SessionRequest;
use crate;
use crate;
/// Where a node's dispatch runs.
/// What an [`Executor`] can do.
/// What an [`Executor`] currently has free.
/// One dispatch, as an [`Executor`] is asked for it.
/// The workspace a dispatch runs in.
/// The cooperative cancellation signal a [`DispatchRequest`] carries.
///
/// `docs/contract.md` names the type on the request but specifies no operations
/// for it, so this is the handle and nothing more; raising and observing it
/// lands with the first executor.
;
/// A started dispatch.
/// A dispatch's relayed event stream.
///
/// A boxed iterator rather than a newtype: the contract names `EventStream` as
/// `events`' return type and nothing else about it, and a newtype would need
/// constructors and accessors the contract does not name.
pub type EventStream = ;
/// How a dispatch is stopped.
/// How a dispatch settled.
///
/// `docs/contract.md` names this as `wait`'s success value but specifies no
/// fields for it; what it carries is a gap
/// [recorded for the planner](../../../docs/contract-divergences.md) rather than
/// filled in here.
;
/// The executor that runs a dispatch on this machine.
///
/// The only one v1 ships, and the only one that supports both
/// [`WorkspaceSpec`] variants.
;