Repository navigation
Commit 9ee0c40
committed
🐛 Give each prompt session its own directory and a reachable exhaustion (#260)
Four corrections to the prompt profile and the command document it runs.
One directory per logical session, at
`~/.xmd/prompt/sessions/<sha256(logical-session-name)>`, replaces the single
`~/.xmd/prompt` every invocation shared. A shared directory was one ambient
location two conversations could both stand in; a fresh one each time would have
left `--session` unable to name anything, since a session's key includes the
directory it lives in. The digest gives both: a generated name reaches a
location nothing else does, and the same explicit name reaches the same one, so
the provider continues the session it established rather than placing a second.
The leaf is the digest and never the name — a caller's string that becomes a
path is a caller's string that can escape one.
Emptiness is now proven rather than assumed. The directory is created empty and
required to be empty before the provider is constructed or a session is
materialized, and anything already in there is a terminal refusal naming the
path. Nothing is deleted: what is in a directory this host did not authorize
anything to write to is not this command's to clean up.
Stopping on the tenth draft says two different things, and now the document says
both. When that draft still has problems, `abort` is the only choice offered and
there was never a Plan to approve, so it routes to the authored exhaustion
message. Every other abort — including one on a tenth draft that could have been
approved — stays the ordinary ending. The branch after the Session remains an
exhaustive fallback.
Final admission is now shown to be independently effective. A scripted draft
uses a repository component that exists while the command document runs and is
removed as its scope tears down; the unchanged approved bytes then fail the
host's second validation, in that order, with no save, journal or execution.
Both validations run the production path — leaving the component in place makes
the case pass and execute, which is what makes it evidence.
Claude-Session: https://claude.ai/code/session_015HcqB9kJM9KFnMNToAuZF61 parent e06e783 commit 9ee0c40
8 files changed
Lines changed: 373 additions & 75 deletions
File tree
- packages/cli
- src
- documents
- tests
- support
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
3545 | 3545 | | |
3546 | 3546 | | |
3547 | 3547 | | |
3548 | | - | |
| 3548 | + | |
3549 | 3549 | | |
3550 | 3550 | | |
3551 | 3551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
143 | 152 | | |
| 153 | + | |
| 154 | + | |
144 | 155 | | |
145 | 156 | | |
146 | 157 | | |
| |||
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
160 | | - | |
161 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
| |||
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
125 | 137 | | |
126 | | - | |
127 | 138 | | |
128 | 139 | | |
129 | 140 | | |
| |||
215 | 226 | | |
216 | 227 | | |
217 | 228 | | |
218 | | - | |
219 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| |||
258 | 270 | | |
259 | 271 | | |
260 | 272 | | |
261 | | - | |
262 | | - | |
| 273 | + | |
263 | 274 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
268 | 283 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
273 | 295 | | |
274 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
275 | 299 | | |
276 | | - | |
277 | | - | |
278 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
279 | 331 | | |
280 | 332 | | |
281 | 333 | | |
| |||
0 commit comments