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
//! The composite "start a conversation" verb (DESIGN §3.4, §8.1, §15 M6 Z3):
//! **a pure planner + a step executor**, the one flow that turns Enter-in-a-box
//! into a running litany loop.
//!
//! §3.4's two orthogonal axes, one composer. *Where* a prompt goes — the target
//! `workspace` path: the focused one, or, in a world with zero workspaces,
//! `<names-root>/home` (§3.1's default name). **The where axis is a path, and
//! only a path** (bl-d942): workspace names are the operator's now, chosen before
//! the flow starts, so there is no name to resolve here and no minted/existing
//! branch to take — bootstrap is the empty case of the general path, an absent
//! directory [`Step::EnsureWorkspace`] founds. *What* it carries — the [`Payload`]
//! rung: **bare** (an empty composer), **path** (a work directory), or **ball**
//! (a picked/created ball).
//!
//! [`plan`] is the pure planner: given the [`StartInputs`] it returns the ordered
//! [`Step`] sequence — the amended
//! §8.1 order **seed → `litany new` → `bl` mutations → prompt**, so every
//! substrate step precedes every `bl` mutation and a failed substrate can never
//! mint an orphaned claim. Every step is idempotent-or-convergent, so re-running
//! `plan` after a partial failure yields the shorter remainder: a bound ball
//! drops [`Step::Claim`], an existing workspace's [`Step::EnsureWorkspace`] is a
//! no-op skip. A **new** ball defers its id to a single [`Step::Create`]; the
//! executor re-plans the freshly-minted (Ready, unclaimed) ball — the
//! new→existing transition *is* the convergence, not a special case.
//!
//! The request the planner reads and the step sequence it returns — [`Payload`]
//! and its [`BallSpec`], [`StartInputs`], [`Step`] — are [`model`]: the inert
//! shapes, split from the planner at §12's pre-split band, so what a start *is*
//! and how it is *derived* are two files.
//!
//! The effectful half — the piped `bl`/`litany` executors and the claim
//! cross-check — lives in [`exec`]; the detached `litany prompt` and the
//! conversation mint it fires with in [`prompt`]; the goal composition in
//! [`goal`]. The **goal reaches the model unmutated**
//! (§3.3, bl-6920): [`prompt::execute_prompt`] mints afresh and
//! passes the name via `--name` as it fires — litany states the stored fact in
//! its assembled context; nothing is prepended to the payload. The name is the
//! *conversation's* (bl-df65); the workspace's rides `YOG_NAME` and never the
//! goal text. **The pre-submit name prediction and the composer view-model are
//! the seat's** (bl-7cc8): `Prepared` carries no predicted name, so `/prepare`
//! answers nothing a seat could preview, and a derivation with no carrier is
//! not this crate's.
use crateJoinState;
/// **The §8.6 birth grant** (bl-0460, bl-d281): the one name yog's own roster
/// tool needs in the worker's `providers.yaml` grant, and the prune of every
/// name the pinned engine no longer ships, converged in the same pass as the
/// control block and the instruction glob.
///
/// `pub` for one reader: `tests/engine_grant.rs` holds the derived shipped set
/// against the grant the real binary authors, which is the one direction a
/// hand copy in this tree cannot answer (bl-d06c's own lesson).
pub use execute_ensure_workspace;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// The pure planner (§8.1): the amended-order step sequence to reach a running
/// loop. Substrate first (seed, `litany new`), then the ball rung's `bl`
/// mutations (create for a new ball — the id defers the rest to a re-plan; else
/// claim when unclaimed), then the deferred prompt. Re-run after any step and it
/// converges to the shorter remainder.
/// Whether the start flow must claim (§3.5, §8.1): a ready, unclaimed ball. A
/// ball already bound to its workspace ([`JoinState::Bound`]) drops the claim —
/// resume, not a second mint; re-claiming would trip bl's benign double-claim.
pub
/// Whether the roster offers a ▶ Start affordance for this join state (§3.5,
/// §11): a ready ball. A [`JoinState::Bound`] ball already has a running
/// workspace (re-prompt is the composer's job, §3.4).
/// Whether the roster offers a ▶ Continue (resume) affordance for this join state
/// (§8.1 resume, addendum): a [`JoinState::Bound`] ball. [`plan`] is total over
/// every join state — it will happily plan for a claimed-elsewhere ball — so this
/// predicate is the **only** guard against resuming a ball this yog does not own;
/// it must stay covered, never a shell-glue check. Routes through the same planner
/// (prompt-only, since [`claim_needed`] is false for a bound ball).