@with-logic/elwood 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (878) hide show
  1. package/CHANGELOG.md +571 -1
  2. package/CONTRIBUTING.md +3 -0
  3. package/README.md +6 -2
  4. package/dist/bridge/socket-release.d.ts +15 -0
  5. package/dist/bridge/socket-release.d.ts.map +1 -0
  6. package/dist/bridge/socket-release.js +22 -0
  7. package/dist/bridge/socket-release.js.map +1 -0
  8. package/dist/claude/composer/border.d.ts +12 -0
  9. package/dist/claude/composer/border.d.ts.map +1 -0
  10. package/dist/claude/composer/border.js +12 -0
  11. package/dist/claude/composer/border.js.map +1 -0
  12. package/dist/claude/composer/empty-input.d.ts +15 -0
  13. package/dist/claude/composer/empty-input.d.ts.map +1 -1
  14. package/dist/claude/composer/empty-input.js +30 -11
  15. package/dist/claude/composer/empty-input.js.map +1 -1
  16. package/dist/claude/composer/footer.d.ts +26 -2
  17. package/dist/claude/composer/footer.d.ts.map +1 -1
  18. package/dist/claude/composer/footer.js +29 -2
  19. package/dist/claude/composer/footer.js.map +1 -1
  20. package/dist/claude/composer/idle.d.ts +14 -0
  21. package/dist/claude/composer/idle.d.ts.map +1 -0
  22. package/dist/claude/composer/idle.js +17 -0
  23. package/dist/claude/composer/idle.js.map +1 -0
  24. package/dist/claude/composer/last.d.ts +2 -0
  25. package/dist/claude/composer/last.d.ts.map +1 -0
  26. package/dist/claude/composer/last.js +15 -0
  27. package/dist/claude/composer/last.js.map +1 -0
  28. package/dist/claude/composer/staged-input.d.ts.map +1 -1
  29. package/dist/claude/composer/staged-input.js +2 -1
  30. package/dist/claude/composer/staged-input.js.map +1 -1
  31. package/dist/claude/hooks/stop-failure.d.ts +15 -2
  32. package/dist/claude/hooks/stop-failure.d.ts.map +1 -1
  33. package/dist/claude/hooks/stop-failure.js +32 -9
  34. package/dist/claude/hooks/stop-failure.js.map +1 -1
  35. package/dist/claude/login/stages.d.ts.map +1 -1
  36. package/dist/claude/login/stages.js +2 -2
  37. package/dist/claude/login/stages.js.map +1 -1
  38. package/dist/claude/model-picker.d.ts +1 -1
  39. package/dist/claude/model-picker.d.ts.map +1 -1
  40. package/dist/claude/model-picker.js +27 -10
  41. package/dist/claude/model-picker.js.map +1 -1
  42. package/dist/claude/preflight.d.ts +1 -1
  43. package/dist/claude/preflight.d.ts.map +1 -1
  44. package/dist/claude/preflight.js +18 -12
  45. package/dist/claude/preflight.js.map +1 -1
  46. package/dist/claude/questions/navigation.d.ts.map +1 -1
  47. package/dist/claude/questions/navigation.js +1 -2
  48. package/dist/claude/questions/navigation.js.map +1 -1
  49. package/dist/claude/questions/screen.d.ts.map +1 -1
  50. package/dist/claude/questions/screen.js +10 -2
  51. package/dist/claude/questions/screen.js.map +1 -1
  52. package/dist/claude/screen-table.d.ts +8 -5
  53. package/dist/claude/screen-table.d.ts.map +1 -1
  54. package/dist/claude/screen-table.js +20 -12
  55. package/dist/claude/screen-table.js.map +1 -1
  56. package/dist/claude/session/bridge.d.ts +2 -1
  57. package/dist/claude/session/bridge.d.ts.map +1 -1
  58. package/dist/claude/session/bridge.js +3 -1
  59. package/dist/claude/session/bridge.js.map +1 -1
  60. package/dist/claude/session/build.d.ts.map +1 -1
  61. package/dist/claude/session/build.js +13 -11
  62. package/dist/claude/session/build.js.map +1 -1
  63. package/dist/claude/session/cleanup.d.ts +18 -0
  64. package/dist/claude/session/cleanup.d.ts.map +1 -0
  65. package/dist/claude/session/cleanup.js +10 -0
  66. package/dist/claude/session/cleanup.js.map +1 -0
  67. package/dist/claude/session/index.d.ts.map +1 -1
  68. package/dist/claude/session/index.js +27 -13
  69. package/dist/claude/session/index.js.map +1 -1
  70. package/dist/claude/session/instance.d.ts +7 -8
  71. package/dist/claude/session/instance.d.ts.map +1 -1
  72. package/dist/claude/session/instance.js +9 -13
  73. package/dist/claude/session/instance.js.map +1 -1
  74. package/dist/claude/session/resume.d.ts.map +1 -1
  75. package/dist/claude/session/resume.js +14 -5
  76. package/dist/claude/session/resume.js.map +1 -1
  77. package/dist/claude/session/transcript.js +2 -2
  78. package/dist/claude/session/transcript.js.map +1 -1
  79. package/dist/claude/simple.d.ts +1 -1
  80. package/dist/claude/simple.d.ts.map +1 -1
  81. package/dist/claude/simple.js +3 -3
  82. package/dist/claude/simple.js.map +1 -1
  83. package/dist/claude/startup-prompts.d.ts +2 -0
  84. package/dist/claude/startup-prompts.d.ts.map +1 -1
  85. package/dist/claude/startup-prompts.js +5 -1
  86. package/dist/claude/startup-prompts.js.map +1 -1
  87. package/dist/claude/transcript/cursor-io.d.ts +1 -1
  88. package/dist/claude/transcript/cursor-io.d.ts.map +1 -1
  89. package/dist/claude/transcript/cursor-io.js +1 -1
  90. package/dist/claude/transcript/cursor-io.js.map +1 -1
  91. package/dist/claude/transcript/cursor.d.ts +5 -3
  92. package/dist/claude/transcript/cursor.d.ts.map +1 -1
  93. package/dist/claude/transcript/cursor.js +18 -8
  94. package/dist/claude/transcript/cursor.js.map +1 -1
  95. package/dist/claude/transcript/drain-context.d.ts +4 -3
  96. package/dist/claude/transcript/drain-context.d.ts.map +1 -1
  97. package/dist/claude/transcript/drain-context.js.map +1 -1
  98. package/dist/claude/transcript/emit.d.ts +2 -1
  99. package/dist/claude/transcript/emit.d.ts.map +1 -1
  100. package/dist/claude/transcript/emit.js +1 -0
  101. package/dist/claude/transcript/emit.js.map +1 -1
  102. package/dist/claude/transcript/index.d.ts.map +1 -1
  103. package/dist/claude/transcript/index.js +2 -2
  104. package/dist/claude/transcript/index.js.map +1 -1
  105. package/dist/claude/transcript/warnings.d.ts +2 -1
  106. package/dist/claude/transcript/warnings.d.ts.map +1 -1
  107. package/dist/claude/transcript/warnings.js +3 -2
  108. package/dist/claude/transcript/warnings.js.map +1 -1
  109. package/dist/cli/config/effective.d.ts +2 -2
  110. package/dist/cli/config/effective.d.ts.map +1 -1
  111. package/dist/cli/config/effective.js +0 -2
  112. package/dist/cli/config/effective.js.map +1 -1
  113. package/dist/cli/interactive/spawn.d.ts +0 -2
  114. package/dist/cli/interactive/spawn.d.ts.map +1 -1
  115. package/dist/cli/interactive/spawn.js +27 -24
  116. package/dist/cli/interactive/spawn.js.map +1 -1
  117. package/dist/cli/lifecycle/index.d.ts.map +1 -1
  118. package/dist/cli/lifecycle/index.js +5 -3
  119. package/dist/cli/lifecycle/index.js.map +1 -1
  120. package/dist/cli/main-failure.d.ts.map +1 -1
  121. package/dist/cli/main-failure.js +5 -2
  122. package/dist/cli/main-failure.js.map +1 -1
  123. package/dist/cli/models/combined.d.ts.map +1 -1
  124. package/dist/cli/models/combined.js +3 -2
  125. package/dist/cli/models/combined.js.map +1 -1
  126. package/dist/cli/models/render.d.ts.map +1 -1
  127. package/dist/cli/models/render.js +2 -1
  128. package/dist/cli/models/render.js.map +1 -1
  129. package/dist/cli/output/cleanup-error.d.ts +22 -0
  130. package/dist/cli/output/cleanup-error.d.ts.map +1 -0
  131. package/dist/cli/output/cleanup-error.js +67 -0
  132. package/dist/cli/output/cleanup-error.js.map +1 -0
  133. package/dist/cli/output/types.d.ts +6 -2
  134. package/dist/cli/output/types.d.ts.map +1 -1
  135. package/dist/cli/request/agent-detect.d.ts +6 -2
  136. package/dist/cli/request/agent-detect.d.ts.map +1 -1
  137. package/dist/cli/request/agent-detect.js +14 -6
  138. package/dist/cli/request/agent-detect.js.map +1 -1
  139. package/dist/cli/request/finalize.d.ts +1 -1
  140. package/dist/cli/request/finalize.d.ts.map +1 -1
  141. package/dist/cli/request/finalize.js +4 -25
  142. package/dist/cli/request/finalize.js.map +1 -1
  143. package/dist/cli/request/index.d.ts.map +1 -1
  144. package/dist/cli/request/index.js +11 -5
  145. package/dist/cli/request/index.js.map +1 -1
  146. package/dist/cli/request/path-replacement.d.ts +27 -0
  147. package/dist/cli/request/path-replacement.d.ts.map +1 -0
  148. package/dist/cli/request/path-replacement.js +79 -0
  149. package/dist/cli/request/path-replacement.js.map +1 -0
  150. package/dist/cli/request/workspace.d.ts +8 -0
  151. package/dist/cli/request/workspace.d.ts.map +1 -0
  152. package/dist/cli/request/workspace.js +50 -0
  153. package/dist/cli/request/workspace.js.map +1 -0
  154. package/dist/cli/run/output.d.ts.map +1 -1
  155. package/dist/cli/run/output.js +2 -1
  156. package/dist/cli/run/output.js.map +1 -1
  157. package/dist/cli/run/subscribe.d.ts.map +1 -1
  158. package/dist/cli/run/subscribe.js +1 -1
  159. package/dist/cli/run/subscribe.js.map +1 -1
  160. package/dist/cli/session/index.d.ts +4 -4
  161. package/dist/cli/session/index.d.ts.map +1 -1
  162. package/dist/cli/session/index.js +5 -5
  163. package/dist/cli/session/index.js.map +1 -1
  164. package/dist/cli/session/launch.d.ts +2 -2
  165. package/dist/cli/session/launch.d.ts.map +1 -1
  166. package/dist/cli/session/launch.js +12 -3
  167. package/dist/cli/session/launch.js.map +1 -1
  168. package/dist/cli/session/turn-readers.d.ts +14 -0
  169. package/dist/cli/session/turn-readers.d.ts.map +1 -0
  170. package/dist/cli/session/turn-readers.js +13 -0
  171. package/dist/cli/session/turn-readers.js.map +1 -0
  172. package/dist/codex/config/default-model.d.ts +24 -0
  173. package/dist/codex/config/default-model.d.ts.map +1 -0
  174. package/dist/codex/config/default-model.js +133 -0
  175. package/dist/codex/config/default-model.js.map +1 -0
  176. package/dist/codex/config/home.d.ts +35 -0
  177. package/dist/codex/config/home.d.ts.map +1 -0
  178. package/dist/codex/config/home.js +122 -0
  179. package/dist/codex/config/home.js.map +1 -0
  180. package/dist/codex/config/lock.d.ts +17 -11
  181. package/dist/codex/config/lock.d.ts.map +1 -1
  182. package/dist/codex/config/lock.js +102 -11
  183. package/dist/codex/config/lock.js.map +1 -1
  184. package/dist/codex/config/read.d.ts +16 -0
  185. package/dist/codex/config/read.d.ts.map +1 -0
  186. package/dist/codex/config/read.js +75 -0
  187. package/dist/codex/config/read.js.map +1 -0
  188. package/dist/codex/config/restore.d.ts +17 -7
  189. package/dist/codex/config/restore.d.ts.map +1 -1
  190. package/dist/codex/config/restore.js +33 -20
  191. package/dist/codex/config/restore.js.map +1 -1
  192. package/dist/codex/config/transaction.d.ts +6 -4
  193. package/dist/codex/config/transaction.d.ts.map +1 -1
  194. package/dist/codex/config/transaction.js +4 -3
  195. package/dist/codex/config/transaction.js.map +1 -1
  196. package/dist/codex/images/clipboard-copies.d.ts +39 -0
  197. package/dist/codex/images/clipboard-copies.d.ts.map +1 -0
  198. package/dist/codex/images/clipboard-copies.js +91 -0
  199. package/dist/codex/images/clipboard-copies.js.map +1 -0
  200. package/dist/codex/model-picker.d.ts +1 -1
  201. package/dist/codex/model-picker.d.ts.map +1 -1
  202. package/dist/codex/model-picker.js +16 -6
  203. package/dist/codex/model-picker.js.map +1 -1
  204. package/dist/codex/preflight.d.ts +2 -2
  205. package/dist/codex/preflight.d.ts.map +1 -1
  206. package/dist/codex/preflight.js +28 -21
  207. package/dist/codex/preflight.js.map +1 -1
  208. package/dist/codex/pty.d.ts +25 -3
  209. package/dist/codex/pty.d.ts.map +1 -1
  210. package/dist/codex/pty.js +53 -7
  211. package/dist/codex/pty.js.map +1 -1
  212. package/dist/codex/questions/candidates.d.ts.map +1 -1
  213. package/dist/codex/questions/candidates.js +4 -5
  214. package/dist/codex/questions/candidates.js.map +1 -1
  215. package/dist/codex/questions/driver.js +2 -2
  216. package/dist/codex/questions/driver.js.map +1 -1
  217. package/dist/codex/questions/records.d.ts +1 -1
  218. package/dist/codex/questions/records.d.ts.map +1 -1
  219. package/dist/codex/questions/records.js +1 -3
  220. package/dist/codex/questions/records.js.map +1 -1
  221. package/dist/codex/screen/clearance.d.ts +6 -0
  222. package/dist/codex/screen/clearance.d.ts.map +1 -1
  223. package/dist/codex/screen/clearance.js +10 -0
  224. package/dist/codex/screen/clearance.js.map +1 -1
  225. package/dist/codex/screen-table.d.ts.map +1 -1
  226. package/dist/codex/screen-table.js +6 -2
  227. package/dist/codex/screen-table.js.map +1 -1
  228. package/dist/codex/session/bridge.d.ts +1 -0
  229. package/dist/codex/session/bridge.d.ts.map +1 -1
  230. package/dist/codex/session/bridge.js +3 -1
  231. package/dist/codex/session/bridge.js.map +1 -1
  232. package/dist/codex/session/build.d.ts.map +1 -1
  233. package/dist/codex/session/build.js +14 -12
  234. package/dist/codex/session/build.js.map +1 -1
  235. package/dist/codex/session/cleanup.d.ts +2 -2
  236. package/dist/codex/session/cleanup.d.ts.map +1 -1
  237. package/dist/codex/session/cleanup.js +8 -11
  238. package/dist/codex/session/cleanup.js.map +1 -1
  239. package/dist/codex/session/config-switch.d.ts +20 -0
  240. package/dist/codex/session/config-switch.d.ts.map +1 -0
  241. package/dist/codex/session/config-switch.js +42 -0
  242. package/dist/codex/session/config-switch.js.map +1 -0
  243. package/dist/codex/session/hooks.d.ts.map +1 -1
  244. package/dist/codex/session/hooks.js +7 -0
  245. package/dist/codex/session/hooks.js.map +1 -1
  246. package/dist/codex/session/index.d.ts.map +1 -1
  247. package/dist/codex/session/index.js +34 -16
  248. package/dist/codex/session/index.js.map +1 -1
  249. package/dist/codex/session/instance.d.ts +10 -12
  250. package/dist/codex/session/instance.d.ts.map +1 -1
  251. package/dist/codex/session/instance.js +42 -37
  252. package/dist/codex/session/instance.js.map +1 -1
  253. package/dist/codex/session/readiness.d.ts +11 -0
  254. package/dist/codex/session/readiness.d.ts.map +1 -0
  255. package/dist/codex/session/readiness.js +22 -0
  256. package/dist/codex/session/readiness.js.map +1 -0
  257. package/dist/codex/session/resume.d.ts.map +1 -1
  258. package/dist/codex/session/resume.js +9 -4
  259. package/dist/codex/session/resume.js.map +1 -1
  260. package/dist/codex/session/transcript.d.ts.map +1 -1
  261. package/dist/codex/session/transcript.js +12 -1
  262. package/dist/codex/session/transcript.js.map +1 -1
  263. package/dist/codex/session/turn-commit.d.ts +58 -0
  264. package/dist/codex/session/turn-commit.d.ts.map +1 -0
  265. package/dist/codex/session/turn-commit.js +97 -0
  266. package/dist/codex/session/turn-commit.js.map +1 -0
  267. package/dist/codex/session/warnings.d.ts +13 -6
  268. package/dist/codex/session/warnings.d.ts.map +1 -1
  269. package/dist/codex/session/warnings.js +36 -9
  270. package/dist/codex/session/warnings.js.map +1 -1
  271. package/dist/codex/startup-prompts.d.ts +3 -0
  272. package/dist/codex/startup-prompts.d.ts.map +1 -1
  273. package/dist/codex/startup-prompts.js +20 -13
  274. package/dist/codex/startup-prompts.js.map +1 -1
  275. package/dist/codex/startup-warnings.d.ts +2 -0
  276. package/dist/codex/startup-warnings.d.ts.map +1 -1
  277. package/dist/codex/startup-warnings.js +6 -0
  278. package/dist/codex/startup-warnings.js.map +1 -1
  279. package/dist/codex/transcript/payload.d.ts +8 -0
  280. package/dist/codex/transcript/payload.d.ts.map +1 -0
  281. package/dist/codex/transcript/payload.js +11 -0
  282. package/dist/codex/transcript/payload.js.map +1 -0
  283. package/dist/codex/transcript/rejection.d.ts +15 -0
  284. package/dist/codex/transcript/rejection.d.ts.map +1 -0
  285. package/dist/codex/transcript/rejection.js +44 -0
  286. package/dist/codex/transcript/rejection.js.map +1 -0
  287. package/dist/codex/transcript/turn-end.d.ts +8 -0
  288. package/dist/codex/transcript/turn-end.d.ts.map +1 -0
  289. package/dist/codex/transcript/turn-end.js +17 -0
  290. package/dist/codex/transcript/turn-end.js.map +1 -0
  291. package/dist/codex/transcript/watcher.d.ts +5 -2
  292. package/dist/codex/transcript/watcher.d.ts.map +1 -1
  293. package/dist/codex/transcript/watcher.js +11 -6
  294. package/dist/codex/transcript/watcher.js.map +1 -1
  295. package/dist/codex/trust-retry.d.ts +12 -0
  296. package/dist/codex/trust-retry.d.ts.map +1 -0
  297. package/dist/codex/trust-retry.js +12 -0
  298. package/dist/codex/trust-retry.js.map +1 -0
  299. package/dist/codex/update/skip-attempt.d.ts +2 -0
  300. package/dist/codex/update/skip-attempt.d.ts.map +1 -1
  301. package/dist/codex/update/skip-attempt.js +4 -0
  302. package/dist/codex/update/skip-attempt.js.map +1 -1
  303. package/dist/codex/update/tracker.d.ts +2 -0
  304. package/dist/codex/update/tracker.d.ts.map +1 -1
  305. package/dist/codex/update/tracker.js +4 -0
  306. package/dist/codex/update/tracker.js.map +1 -1
  307. package/dist/core/delay.d.ts +3 -2
  308. package/dist/core/delay.d.ts.map +1 -1
  309. package/dist/core/delay.js +3 -2
  310. package/dist/core/delay.js.map +1 -1
  311. package/dist/core/errors.d.ts +33 -4
  312. package/dist/core/errors.d.ts.map +1 -1
  313. package/dist/core/errors.js +51 -7
  314. package/dist/core/errors.js.map +1 -1
  315. package/dist/core/images/materialize.d.ts +13 -4
  316. package/dist/core/images/materialize.d.ts.map +1 -1
  317. package/dist/core/images/materialize.js +48 -11
  318. package/dist/core/images/materialize.js.map +1 -1
  319. package/dist/core/input/abort.d.ts +15 -0
  320. package/dist/core/input/abort.d.ts.map +1 -1
  321. package/dist/core/input/abort.js +18 -2
  322. package/dist/core/input/abort.js.map +1 -1
  323. package/dist/core/input/constants.d.ts +4 -1
  324. package/dist/core/input/constants.d.ts.map +1 -1
  325. package/dist/core/input/constants.js +4 -1
  326. package/dist/core/input/constants.js.map +1 -1
  327. package/dist/core/input/index.d.ts +1 -1
  328. package/dist/core/input/index.d.ts.map +1 -1
  329. package/dist/core/input/index.js +1 -1
  330. package/dist/core/input/index.js.map +1 -1
  331. package/dist/core/models/clearance.d.ts +38 -0
  332. package/dist/core/models/clearance.d.ts.map +1 -0
  333. package/dist/core/models/clearance.js +38 -0
  334. package/dist/core/models/clearance.js.map +1 -0
  335. package/dist/core/models/close-wait.d.ts +17 -0
  336. package/dist/core/models/close-wait.d.ts.map +1 -0
  337. package/dist/core/models/close-wait.js +44 -0
  338. package/dist/core/models/close-wait.js.map +1 -0
  339. package/dist/core/models/dialog-region.d.ts +18 -3
  340. package/dist/core/models/dialog-region.d.ts.map +1 -1
  341. package/dist/core/models/dialog-region.js +29 -40
  342. package/dist/core/models/dialog-region.js.map +1 -1
  343. package/dist/core/models/input.d.ts +10 -1
  344. package/dist/core/models/input.d.ts.map +1 -1
  345. package/dist/core/models/input.js +15 -2
  346. package/dist/core/models/input.js.map +1 -1
  347. package/dist/core/models/intervention.d.ts +2 -2
  348. package/dist/core/models/intervention.d.ts.map +1 -1
  349. package/dist/core/models/intervention.js +6 -3
  350. package/dist/core/models/intervention.js.map +1 -1
  351. package/dist/core/models/own-picker.d.ts +21 -0
  352. package/dist/core/models/own-picker.d.ts.map +1 -0
  353. package/dist/core/models/own-picker.js +21 -0
  354. package/dist/core/models/own-picker.js.map +1 -0
  355. package/dist/core/models/picker.d.ts +34 -4
  356. package/dist/core/models/picker.d.ts.map +1 -1
  357. package/dist/core/models/picker.js +50 -44
  358. package/dist/core/models/picker.js.map +1 -1
  359. package/dist/core/models/row-block.d.ts +66 -0
  360. package/dist/core/models/row-block.d.ts.map +1 -0
  361. package/dist/core/models/row-block.js +87 -0
  362. package/dist/core/models/row-block.js.map +1 -0
  363. package/dist/core/models/rows.d.ts +32 -3
  364. package/dist/core/models/rows.d.ts.map +1 -1
  365. package/dist/core/models/rows.js +48 -20
  366. package/dist/core/models/rows.js.map +1 -1
  367. package/dist/core/models/tui-screen.d.ts +6 -1
  368. package/dist/core/models/tui-screen.d.ts.map +1 -1
  369. package/dist/core/models/tui-screen.js +25 -10
  370. package/dist/core/models/tui-screen.js.map +1 -1
  371. package/dist/core/models/window.d.ts +49 -0
  372. package/dist/core/models/window.d.ts.map +1 -0
  373. package/dist/core/models/window.js +105 -0
  374. package/dist/core/models/window.js.map +1 -0
  375. package/dist/core/path-trust.d.ts +11 -0
  376. package/dist/core/path-trust.d.ts.map +1 -0
  377. package/dist/core/path-trust.js +21 -0
  378. package/dist/core/path-trust.js.map +1 -0
  379. package/dist/core/screen-facts.d.ts +3 -1
  380. package/dist/core/screen-facts.d.ts.map +1 -1
  381. package/dist/core/screen-facts.js +1 -0
  382. package/dist/core/screen-facts.js.map +1 -1
  383. package/dist/core/simple/boundary-signal.d.ts +41 -6
  384. package/dist/core/simple/boundary-signal.d.ts.map +1 -1
  385. package/dist/core/simple/boundary-signal.js +43 -3
  386. package/dist/core/simple/boundary-signal.js.map +1 -1
  387. package/dist/core/simple/close.d.ts +2 -1
  388. package/dist/core/simple/close.d.ts.map +1 -1
  389. package/dist/core/simple/close.js +10 -2
  390. package/dist/core/simple/close.js.map +1 -1
  391. package/dist/core/simple/turn-boundary.d.ts +2 -0
  392. package/dist/core/simple/turn-boundary.d.ts.map +1 -1
  393. package/dist/core/simple/turn-boundary.js +1 -1
  394. package/dist/core/simple/turn-boundary.js.map +1 -1
  395. package/dist/core/simple/turn-types.d.ts +9 -3
  396. package/dist/core/simple/turn-types.d.ts.map +1 -1
  397. package/dist/core/simple/turn-types.js +10 -2
  398. package/dist/core/simple/turn-types.js.map +1 -1
  399. package/dist/core/simple/turn.d.ts +2 -0
  400. package/dist/core/simple/turn.d.ts.map +1 -1
  401. package/dist/core/simple/turn.js +11 -5
  402. package/dist/core/simple/turn.js.map +1 -1
  403. package/dist/core/terminal-options.d.ts +17 -1
  404. package/dist/core/terminal-options.d.ts.map +1 -1
  405. package/dist/core/terminal-options.js +20 -8
  406. package/dist/core/terminal-options.js.map +1 -1
  407. package/dist/core/transcript/cursor-io.d.ts +8 -0
  408. package/dist/core/transcript/cursor-io.d.ts.map +1 -1
  409. package/dist/core/transcript/cursor-io.js +11 -5
  410. package/dist/core/transcript/cursor-io.js.map +1 -1
  411. package/dist/core/transcript/cursor.d.ts +28 -4
  412. package/dist/core/transcript/cursor.d.ts.map +1 -1
  413. package/dist/core/transcript/cursor.js +53 -7
  414. package/dist/core/transcript/cursor.js.map +1 -1
  415. package/dist/core/transcript/drain.d.ts +43 -0
  416. package/dist/core/transcript/drain.d.ts.map +1 -0
  417. package/dist/core/transcript/drain.js +67 -0
  418. package/dist/core/transcript/drain.js.map +1 -0
  419. package/dist/core/trust/abortable.d.ts +12 -0
  420. package/dist/core/trust/abortable.d.ts.map +1 -0
  421. package/dist/core/trust/abortable.js +48 -0
  422. package/dist/core/trust/abortable.js.map +1 -0
  423. package/dist/core/trust/allowlist.d.ts +2 -0
  424. package/dist/core/trust/allowlist.d.ts.map +1 -1
  425. package/dist/core/trust/allowlist.js +4 -1
  426. package/dist/core/trust/allowlist.js.map +1 -1
  427. package/dist/core/trust/blocking.d.ts +11 -0
  428. package/dist/core/trust/blocking.d.ts.map +1 -1
  429. package/dist/core/trust/blocking.js +5 -4
  430. package/dist/core/trust/blocking.js.map +1 -1
  431. package/dist/core/trust/copy.d.ts.map +1 -1
  432. package/dist/core/trust/copy.js +7 -1
  433. package/dist/core/trust/copy.js.map +1 -1
  434. package/dist/core/trust/deadline.d.ts +24 -0
  435. package/dist/core/trust/deadline.d.ts.map +1 -0
  436. package/dist/core/trust/deadline.js +56 -0
  437. package/dist/core/trust/deadline.js.map +1 -0
  438. package/dist/core/trust/dialog.d.ts +11 -2
  439. package/dist/core/trust/dialog.d.ts.map +1 -1
  440. package/dist/core/trust/dialog.js +12 -3
  441. package/dist/core/trust/dialog.js.map +1 -1
  442. package/dist/core/trust/options.d.ts +5 -1
  443. package/dist/core/trust/options.d.ts.map +1 -1
  444. package/dist/core/trust/options.js +8 -2
  445. package/dist/core/trust/options.js.map +1 -1
  446. package/dist/core/trust/prompts.d.ts +3 -0
  447. package/dist/core/trust/prompts.d.ts.map +1 -1
  448. package/dist/core/trust/prompts.js +2 -1
  449. package/dist/core/trust/prompts.js.map +1 -1
  450. package/dist/core/trust/responder.d.ts +10 -5
  451. package/dist/core/trust/responder.d.ts.map +1 -1
  452. package/dist/core/trust/responder.js +37 -33
  453. package/dist/core/trust/responder.js.map +1 -1
  454. package/dist/core/trust/step.d.ts +67 -0
  455. package/dist/core/trust/step.d.ts.map +1 -0
  456. package/dist/core/trust/step.js +45 -0
  457. package/dist/core/trust/step.js.map +1 -0
  458. package/dist/core/trust/types.d.ts +21 -1
  459. package/dist/core/trust/types.d.ts.map +1 -1
  460. package/dist/core/trust/types.js +25 -1
  461. package/dist/core/trust/types.js.map +1 -1
  462. package/dist/core/trust/view.d.ts +2 -0
  463. package/dist/core/trust/view.d.ts.map +1 -1
  464. package/dist/core/trust/view.js +3 -0
  465. package/dist/core/trust/view.js.map +1 -1
  466. package/dist/core/trust/write.d.ts +31 -6
  467. package/dist/core/trust/write.d.ts.map +1 -1
  468. package/dist/core/trust/write.js +95 -80
  469. package/dist/core/trust/write.js.map +1 -1
  470. package/dist/core/turn-state.d.ts +18 -4
  471. package/dist/core/turn-state.d.ts.map +1 -1
  472. package/dist/core/turn-state.js +47 -25
  473. package/dist/core/turn-state.js.map +1 -1
  474. package/dist/core/warnings/images.d.ts +22 -0
  475. package/dist/core/warnings/images.d.ts.map +1 -0
  476. package/dist/core/warnings/images.js +3 -0
  477. package/dist/core/warnings/images.js.map +1 -0
  478. package/dist/core/warnings/index.d.ts +3 -2
  479. package/dist/core/warnings/index.d.ts.map +1 -1
  480. package/dist/core/warnings/lifecycle.d.ts +35 -4
  481. package/dist/core/warnings/lifecycle.d.ts.map +1 -1
  482. package/dist/core/warnings/lifecycle.js +1 -1
  483. package/dist/core/warnings/update.d.ts +8 -4
  484. package/dist/core/warnings/update.d.ts.map +1 -1
  485. package/dist/core/warnings/update.js +21 -6
  486. package/dist/core/warnings/update.js.map +1 -1
  487. package/dist/pty/exit-latch.d.ts +28 -0
  488. package/dist/pty/exit-latch.d.ts.map +1 -0
  489. package/dist/pty/exit-latch.js +50 -0
  490. package/dist/pty/exit-latch.js.map +1 -0
  491. package/dist/runtime/exit-status.d.ts +7 -0
  492. package/dist/runtime/exit-status.d.ts.map +1 -0
  493. package/dist/runtime/exit-status.js +13 -0
  494. package/dist/runtime/exit-status.js.map +1 -0
  495. package/dist/runtime/home-guard/index.d.ts +45 -0
  496. package/dist/runtime/home-guard/index.d.ts.map +1 -0
  497. package/dist/runtime/home-guard/index.js +69 -0
  498. package/dist/runtime/home-guard/index.js.map +1 -0
  499. package/dist/runtime/loop-restore.d.ts +9 -9
  500. package/dist/runtime/loop-restore.d.ts.map +1 -1
  501. package/dist/runtime/loop-restore.js +10 -10
  502. package/dist/runtime/loop-restore.js.map +1 -1
  503. package/dist/runtime/probe/capped-buffer.d.ts +16 -0
  504. package/dist/runtime/probe/capped-buffer.d.ts.map +1 -0
  505. package/dist/runtime/probe/capped-buffer.js +38 -0
  506. package/dist/runtime/probe/capped-buffer.js.map +1 -0
  507. package/dist/runtime/probe/capture.d.ts +55 -0
  508. package/dist/runtime/probe/capture.d.ts.map +1 -0
  509. package/dist/runtime/probe/capture.js +71 -0
  510. package/dist/runtime/probe/capture.js.map +1 -0
  511. package/dist/runtime/{probe-cleanup.d.ts → probe/cleanup.d.ts} +2 -2
  512. package/dist/runtime/probe/cleanup.d.ts.map +1 -0
  513. package/dist/runtime/{probe-cleanup.js → probe/cleanup.js} +3 -3
  514. package/dist/runtime/probe/cleanup.js.map +1 -0
  515. package/dist/runtime/probe/directory-key.d.ts +26 -0
  516. package/dist/runtime/probe/directory-key.d.ts.map +1 -0
  517. package/dist/runtime/probe/directory-key.js +46 -0
  518. package/dist/runtime/probe/directory-key.js.map +1 -0
  519. package/dist/runtime/probe/index.d.ts +25 -0
  520. package/dist/runtime/probe/index.d.ts.map +1 -0
  521. package/dist/runtime/probe/index.js +153 -0
  522. package/dist/runtime/probe/index.js.map +1 -0
  523. package/dist/runtime/probe/lookup.d.ts +12 -0
  524. package/dist/runtime/probe/lookup.d.ts.map +1 -0
  525. package/dist/runtime/probe/lookup.js +29 -0
  526. package/dist/runtime/probe/lookup.js.map +1 -0
  527. package/dist/runtime/probe/named-pipes.d.ts +35 -0
  528. package/dist/runtime/probe/named-pipes.d.ts.map +1 -0
  529. package/dist/runtime/probe/named-pipes.js +167 -0
  530. package/dist/runtime/probe/named-pipes.js.map +1 -0
  531. package/dist/runtime/probe/private-directory.d.ts +14 -0
  532. package/dist/runtime/probe/private-directory.d.ts.map +1 -0
  533. package/dist/runtime/probe/private-directory.js +50 -0
  534. package/dist/runtime/probe/private-directory.js.map +1 -0
  535. package/dist/runtime/probe/results.d.ts +14 -0
  536. package/dist/runtime/probe/results.d.ts.map +1 -0
  537. package/dist/runtime/probe/results.js +38 -0
  538. package/dist/runtime/probe/results.js.map +1 -0
  539. package/dist/runtime/probe/slots.d.ts +17 -0
  540. package/dist/runtime/probe/slots.d.ts.map +1 -0
  541. package/dist/runtime/probe/slots.js +35 -0
  542. package/dist/runtime/probe/slots.js.map +1 -0
  543. package/dist/runtime/probe/start.d.ts +64 -0
  544. package/dist/runtime/probe/start.d.ts.map +1 -0
  545. package/dist/runtime/probe/start.js +80 -0
  546. package/dist/runtime/probe/start.js.map +1 -0
  547. package/dist/runtime/probe-cache.d.ts +19 -0
  548. package/dist/runtime/probe-cache.d.ts.map +1 -0
  549. package/dist/runtime/probe-cache.js +56 -0
  550. package/dist/runtime/probe-cache.js.map +1 -0
  551. package/dist/runtime/readiness/initial-ready.d.ts +31 -5
  552. package/dist/runtime/readiness/initial-ready.d.ts.map +1 -1
  553. package/dist/runtime/readiness/initial-ready.js +64 -18
  554. package/dist/runtime/readiness/initial-ready.js.map +1 -1
  555. package/dist/runtime/seams.d.ts +14 -2
  556. package/dist/runtime/seams.d.ts.map +1 -1
  557. package/dist/runtime/seams.js +2 -2
  558. package/dist/runtime/seams.js.map +1 -1
  559. package/dist/runtime/session/base.d.ts.map +1 -1
  560. package/dist/runtime/session/base.js +9 -6
  561. package/dist/runtime/session/base.js.map +1 -1
  562. package/dist/runtime/session/commands.d.ts +6 -4
  563. package/dist/runtime/session/commands.d.ts.map +1 -1
  564. package/dist/runtime/session/commands.js +5 -2
  565. package/dist/runtime/session/commands.js.map +1 -1
  566. package/dist/runtime/session/frames.d.ts +12 -2
  567. package/dist/runtime/session/frames.d.ts.map +1 -1
  568. package/dist/runtime/session/frames.js +10 -3
  569. package/dist/runtime/session/frames.js.map +1 -1
  570. package/dist/runtime/session/image-attach.js +7 -2
  571. package/dist/runtime/session/image-attach.js.map +1 -1
  572. package/dist/runtime/session/launch-directory.d.ts +33 -0
  573. package/dist/runtime/session/launch-directory.d.ts.map +1 -0
  574. package/dist/runtime/session/launch-directory.js +84 -0
  575. package/dist/runtime/session/launch-directory.js.map +1 -0
  576. package/dist/runtime/session/lifecycle.d.ts +3 -3
  577. package/dist/runtime/session/lifecycle.d.ts.map +1 -1
  578. package/dist/runtime/session/lifecycle.js +1 -5
  579. package/dist/runtime/session/lifecycle.js.map +1 -1
  580. package/dist/runtime/session/loops.d.ts +1 -1
  581. package/dist/runtime/session/loops.d.ts.map +1 -1
  582. package/dist/runtime/session/loops.js +6 -3
  583. package/dist/runtime/session/loops.js.map +1 -1
  584. package/dist/runtime/session/picker-cleanup.d.ts +6 -21
  585. package/dist/runtime/session/picker-cleanup.d.ts.map +1 -1
  586. package/dist/runtime/session/picker-cleanup.js +19 -31
  587. package/dist/runtime/session/picker-cleanup.js.map +1 -1
  588. package/dist/runtime/session/picker-hold.d.ts +24 -0
  589. package/dist/runtime/session/picker-hold.d.ts.map +1 -0
  590. package/dist/runtime/session/picker-hold.js +42 -0
  591. package/dist/runtime/session/picker-hold.js.map +1 -0
  592. package/dist/runtime/session/picker.d.ts +15 -13
  593. package/dist/runtime/session/picker.d.ts.map +1 -1
  594. package/dist/runtime/session/picker.js +49 -27
  595. package/dist/runtime/session/picker.js.map +1 -1
  596. package/dist/runtime/session/prepare-state.d.ts +6 -0
  597. package/dist/runtime/session/prepare-state.d.ts.map +1 -0
  598. package/dist/runtime/session/prepare-state.js +14 -0
  599. package/dist/runtime/session/prepare-state.js.map +1 -0
  600. package/dist/runtime/session/questions.d.ts +2 -2
  601. package/dist/runtime/session/questions.d.ts.map +1 -1
  602. package/dist/runtime/session/questions.js.map +1 -1
  603. package/dist/runtime/session/readiness.d.ts +14 -5
  604. package/dist/runtime/session/readiness.d.ts.map +1 -1
  605. package/dist/runtime/session/readiness.js +22 -6
  606. package/dist/runtime/session/readiness.js.map +1 -1
  607. package/dist/runtime/session/reap.d.ts +11 -7
  608. package/dist/runtime/session/reap.d.ts.map +1 -1
  609. package/dist/runtime/session/reap.js +16 -10
  610. package/dist/runtime/session/reap.js.map +1 -1
  611. package/dist/runtime/session/runtime-cleanup.d.ts +18 -0
  612. package/dist/runtime/session/runtime-cleanup.d.ts.map +1 -0
  613. package/dist/runtime/session/runtime-cleanup.js +18 -0
  614. package/dist/runtime/session/runtime-cleanup.js.map +1 -0
  615. package/dist/runtime/session/session-input.d.ts +32 -0
  616. package/dist/runtime/session/session-input.d.ts.map +1 -0
  617. package/dist/runtime/session/{picker-input.js → session-input.js} +35 -7
  618. package/dist/runtime/session/session-input.js.map +1 -0
  619. package/dist/runtime/session/shutdown-binding.d.ts +12 -1
  620. package/dist/runtime/session/shutdown-binding.d.ts.map +1 -1
  621. package/dist/runtime/session/shutdown-binding.js +33 -1
  622. package/dist/runtime/session/shutdown-binding.js.map +1 -1
  623. package/dist/runtime/session/shutdown-cleanup.d.ts +17 -0
  624. package/dist/runtime/session/shutdown-cleanup.d.ts.map +1 -0
  625. package/dist/runtime/session/shutdown-cleanup.js +49 -0
  626. package/dist/runtime/session/shutdown-cleanup.js.map +1 -0
  627. package/dist/runtime/session/shutdown.d.ts +3 -2
  628. package/dist/runtime/session/shutdown.d.ts.map +1 -1
  629. package/dist/runtime/session/shutdown.js +13 -24
  630. package/dist/runtime/session/shutdown.js.map +1 -1
  631. package/dist/runtime/shell-quote.d.ts +8 -0
  632. package/dist/runtime/shell-quote.d.ts.map +1 -0
  633. package/dist/runtime/shell-quote.js +10 -0
  634. package/dist/runtime/shell-quote.js.map +1 -0
  635. package/dist/runtime/shell.d.ts +36 -12
  636. package/dist/runtime/shell.d.ts.map +1 -1
  637. package/dist/runtime/shell.js +90 -14
  638. package/dist/runtime/shell.js.map +1 -1
  639. package/dist/runtime/shutdown/coalesce.d.ts +15 -0
  640. package/dist/runtime/shutdown/coalesce.d.ts.map +1 -0
  641. package/dist/runtime/shutdown/coalesce.js +42 -0
  642. package/dist/runtime/shutdown/coalesce.js.map +1 -0
  643. package/dist/runtime/shutdown/detached-sweep/failures.d.ts +24 -0
  644. package/dist/runtime/shutdown/detached-sweep/failures.d.ts.map +1 -0
  645. package/dist/runtime/shutdown/detached-sweep/failures.js +32 -0
  646. package/dist/runtime/shutdown/detached-sweep/failures.js.map +1 -0
  647. package/dist/runtime/shutdown/detached-sweep/index.d.ts +55 -0
  648. package/dist/runtime/shutdown/detached-sweep/index.d.ts.map +1 -0
  649. package/dist/runtime/shutdown/detached-sweep/index.js +129 -0
  650. package/dist/runtime/shutdown/detached-sweep/index.js.map +1 -0
  651. package/dist/runtime/shutdown/detached-sweep/kill.d.ts +37 -0
  652. package/dist/runtime/shutdown/detached-sweep/kill.d.ts.map +1 -0
  653. package/dist/runtime/shutdown/detached-sweep/kill.js +87 -0
  654. package/dist/runtime/shutdown/detached-sweep/kill.js.map +1 -0
  655. package/dist/runtime/shutdown/detached-sweep/record.d.ts +67 -0
  656. package/dist/runtime/shutdown/detached-sweep/record.d.ts.map +1 -0
  657. package/dist/runtime/shutdown/detached-sweep/record.js +111 -0
  658. package/dist/runtime/shutdown/detached-sweep/record.js.map +1 -0
  659. package/dist/runtime/shutdown/detached-sweep/rounds.d.ts +78 -0
  660. package/dist/runtime/shutdown/detached-sweep/rounds.d.ts.map +1 -0
  661. package/dist/runtime/shutdown/detached-sweep/rounds.js +116 -0
  662. package/dist/runtime/shutdown/detached-sweep/rounds.js.map +1 -0
  663. package/dist/runtime/shutdown/detached-sweep/survivors.d.ts +40 -0
  664. package/dist/runtime/shutdown/detached-sweep/survivors.d.ts.map +1 -0
  665. package/dist/runtime/shutdown/detached-sweep/survivors.js +112 -0
  666. package/dist/runtime/shutdown/detached-sweep/survivors.js.map +1 -0
  667. package/dist/runtime/shutdown/leader-group.d.ts +29 -0
  668. package/dist/runtime/shutdown/leader-group.d.ts.map +1 -0
  669. package/dist/runtime/shutdown/leader-group.js +35 -0
  670. package/dist/runtime/shutdown/leader-group.js.map +1 -0
  671. package/dist/runtime/shutdown/native-read-admission.d.ts +13 -0
  672. package/dist/runtime/shutdown/native-read-admission.d.ts.map +1 -0
  673. package/dist/runtime/shutdown/native-read-admission.js +64 -0
  674. package/dist/runtime/shutdown/native-read-admission.js.map +1 -0
  675. package/dist/runtime/shutdown/process-table.d.ts +80 -0
  676. package/dist/runtime/shutdown/process-table.d.ts.map +1 -0
  677. package/dist/runtime/shutdown/process-table.js +147 -0
  678. package/dist/runtime/shutdown/process-table.js.map +1 -0
  679. package/dist/runtime/shutdown/process-tree-ops.d.ts +39 -0
  680. package/dist/runtime/shutdown/process-tree-ops.d.ts.map +1 -0
  681. package/dist/runtime/shutdown/process-tree-ops.js +73 -0
  682. package/dist/runtime/shutdown/process-tree-ops.js.map +1 -0
  683. package/dist/runtime/shutdown/read-timeout.d.ts +4 -0
  684. package/dist/runtime/shutdown/read-timeout.d.ts.map +1 -0
  685. package/dist/runtime/shutdown/read-timeout.js +6 -0
  686. package/dist/runtime/shutdown/read-timeout.js.map +1 -0
  687. package/dist/runtime/shutdown/reap-queue.d.ts +10 -0
  688. package/dist/runtime/shutdown/reap-queue.d.ts.map +1 -0
  689. package/dist/runtime/shutdown/reap-queue.js +29 -0
  690. package/dist/runtime/shutdown/reap-queue.js.map +1 -0
  691. package/dist/runtime/shutdown/reap-tree.d.ts +42 -32
  692. package/dist/runtime/shutdown/reap-tree.d.ts.map +1 -1
  693. package/dist/runtime/shutdown/reap-tree.js +78 -71
  694. package/dist/runtime/shutdown/reap-tree.js.map +1 -1
  695. package/dist/runtime/shutdown/shared-daemon.d.ts +59 -0
  696. package/dist/runtime/shutdown/shared-daemon.d.ts.map +1 -0
  697. package/dist/runtime/shutdown/shared-daemon.js +139 -0
  698. package/dist/runtime/shutdown/shared-daemon.js.map +1 -0
  699. package/dist/runtime/shutdown/teardown.d.ts +15 -0
  700. package/dist/runtime/shutdown/teardown.d.ts.map +1 -1
  701. package/dist/runtime/shutdown/teardown.js +19 -6
  702. package/dist/runtime/shutdown/teardown.js.map +1 -1
  703. package/dist/runtime/shutdown/terminate.d.ts +21 -1
  704. package/dist/runtime/shutdown/terminate.d.ts.map +1 -1
  705. package/dist/runtime/shutdown/terminate.js +83 -56
  706. package/dist/runtime/shutdown/terminate.js.map +1 -1
  707. package/dist/runtime/startup/buffer.d.ts +26 -7
  708. package/dist/runtime/startup/buffer.d.ts.map +1 -1
  709. package/dist/runtime/startup/buffer.js +42 -19
  710. package/dist/runtime/startup/buffer.js.map +1 -1
  711. package/dist/runtime/startup/cleanup.d.ts +37 -11
  712. package/dist/runtime/startup/cleanup.d.ts.map +1 -1
  713. package/dist/runtime/startup/cleanup.js +55 -25
  714. package/dist/runtime/startup/cleanup.js.map +1 -1
  715. package/dist/runtime/startup/index.d.ts +13 -1
  716. package/dist/runtime/startup/index.d.ts.map +1 -1
  717. package/dist/runtime/startup/index.js +38 -6
  718. package/dist/runtime/startup/index.js.map +1 -1
  719. package/dist/runtime/stream-marker.d.ts +17 -0
  720. package/dist/runtime/stream-marker.d.ts.map +1 -0
  721. package/dist/runtime/stream-marker.js +35 -0
  722. package/dist/runtime/stream-marker.js.map +1 -0
  723. package/dist/runtime/update/acquire.d.ts +16 -0
  724. package/dist/runtime/update/acquire.d.ts.map +1 -0
  725. package/dist/runtime/update/acquire.js +62 -0
  726. package/dist/runtime/update/acquire.js.map +1 -0
  727. package/dist/runtime/update/completion.d.ts +12 -0
  728. package/dist/runtime/update/completion.d.ts.map +1 -0
  729. package/dist/runtime/update/completion.js +50 -0
  730. package/dist/runtime/update/completion.js.map +1 -0
  731. package/dist/runtime/update/lock.d.ts +1 -1
  732. package/dist/runtime/update/lock.d.ts.map +1 -1
  733. package/dist/runtime/update/lock.js +21 -38
  734. package/dist/runtime/update/lock.js.map +1 -1
  735. package/dist/runtime/update/once.d.ts +16 -13
  736. package/dist/runtime/update/once.d.ts.map +1 -1
  737. package/dist/runtime/update/once.js +41 -31
  738. package/dist/runtime/update/once.js.map +1 -1
  739. package/dist/runtime/update/owner.js +1 -1
  740. package/dist/runtime/update/retained-lease.js +1 -1
  741. package/dist/runtime/update/waiting.d.ts +14 -1
  742. package/dist/runtime/update/waiting.d.ts.map +1 -1
  743. package/dist/runtime/update/waiting.js +20 -12
  744. package/dist/runtime/update/waiting.js.map +1 -1
  745. package/dist/state/canonical-path.d.ts +5 -0
  746. package/dist/state/canonical-path.d.ts.map +1 -1
  747. package/dist/state/canonical-path.js +11 -5
  748. package/dist/state/canonical-path.js.map +1 -1
  749. package/dist/state/directories.d.ts +31 -1
  750. package/dist/state/directories.d.ts.map +1 -1
  751. package/dist/state/directories.js +75 -13
  752. package/dist/state/directories.js.map +1 -1
  753. package/dist/state/files.d.ts +3 -3
  754. package/dist/state/files.d.ts.map +1 -1
  755. package/dist/state/files.js +4 -10
  756. package/dist/state/files.js.map +1 -1
  757. package/dist/state/launch-ownership.d.ts +4 -2
  758. package/dist/state/launch-ownership.d.ts.map +1 -1
  759. package/dist/state/launch-ownership.js +18 -10
  760. package/dist/state/launch-ownership.js.map +1 -1
  761. package/dist/state/launch-publication.d.ts +7 -1
  762. package/dist/state/launch-publication.d.ts.map +1 -1
  763. package/dist/state/launch-publication.js +14 -2
  764. package/dist/state/launch-publication.js.map +1 -1
  765. package/dist/state/loop-store.d.ts +15 -4
  766. package/dist/state/loop-store.d.ts.map +1 -1
  767. package/dist/state/loop-store.js +13 -7
  768. package/dist/state/loop-store.js.map +1 -1
  769. package/dist/state/preparation/created-directories.d.ts +13 -0
  770. package/dist/state/preparation/created-directories.d.ts.map +1 -0
  771. package/dist/state/preparation/created-directories.js +45 -0
  772. package/dist/state/preparation/created-directories.js.map +1 -0
  773. package/dist/state/preparation/ignore-sync.d.ts +9 -0
  774. package/dist/state/preparation/ignore-sync.d.ts.map +1 -0
  775. package/dist/state/preparation/ignore-sync.js +47 -0
  776. package/dist/state/preparation/ignore-sync.js.map +1 -0
  777. package/dist/state/preparation/index.d.ts +25 -0
  778. package/dist/state/preparation/index.d.ts.map +1 -0
  779. package/dist/state/preparation/index.js +31 -0
  780. package/dist/state/preparation/index.js.map +1 -0
  781. package/dist/state/preparation/install-ignore.d.ts +6 -0
  782. package/dist/state/preparation/install-ignore.d.ts.map +1 -0
  783. package/dist/state/preparation/install-ignore.js +87 -0
  784. package/dist/state/preparation/install-ignore.js.map +1 -0
  785. package/dist/state/preparation/rollback-parent.d.ts +3 -0
  786. package/dist/state/preparation/rollback-parent.d.ts.map +1 -0
  787. package/dist/state/preparation/rollback-parent.js +18 -0
  788. package/dist/state/preparation/rollback-parent.js.map +1 -0
  789. package/dist/state/preparation/root-trust.d.ts +3 -0
  790. package/dist/state/preparation/root-trust.d.ts.map +1 -0
  791. package/dist/state/preparation/root-trust.js +70 -0
  792. package/dist/state/preparation/root-trust.js.map +1 -0
  793. package/dist/state/private-session.d.ts +5 -2
  794. package/dist/state/private-session.d.ts.map +1 -1
  795. package/dist/state/private-session.js +21 -9
  796. package/dist/state/private-session.js.map +1 -1
  797. package/dist/state/root.d.ts +25 -0
  798. package/dist/state/root.d.ts.map +1 -0
  799. package/dist/state/root.js +84 -0
  800. package/dist/state/root.js.map +1 -0
  801. package/dist/state/runtime-paths.d.ts +5 -4
  802. package/dist/state/runtime-paths.d.ts.map +1 -1
  803. package/dist/state/runtime-paths.js +5 -4
  804. package/dist/state/runtime-paths.js.map +1 -1
  805. package/dist/state/setup-failure.d.ts +3 -0
  806. package/dist/state/setup-failure.d.ts.map +1 -0
  807. package/dist/state/setup-failure.js +13 -0
  808. package/dist/state/setup-failure.js.map +1 -0
  809. package/dist/state/socket-home.d.ts +17 -12
  810. package/dist/state/socket-home.d.ts.map +1 -1
  811. package/dist/state/socket-home.js +31 -14
  812. package/dist/state/socket-home.js.map +1 -1
  813. package/dist/state/store.d.ts +1 -3
  814. package/dist/state/store.d.ts.map +1 -1
  815. package/dist/state/store.js +3 -18
  816. package/dist/state/store.js.map +1 -1
  817. package/dist/terminal/cursor.d.ts +1 -1
  818. package/dist/terminal/cursor.d.ts.map +1 -1
  819. package/dist/terminal/cursor.js +36 -1
  820. package/dist/terminal/cursor.js.map +1 -1
  821. package/dist/terminal/headless.d.ts +1 -1
  822. package/dist/terminal/headless.d.ts.map +1 -1
  823. package/dist/terminal/headless.js +1 -3
  824. package/dist/terminal/headless.js.map +1 -1
  825. package/docs/cli-behavior.md +1218 -28
  826. package/docs/cli.md +2 -0
  827. package/docs/codex/cli.md +4 -2
  828. package/docs/embedding.md +7 -0
  829. package/docs/performance/terminal-engines.md +88 -0
  830. package/docs/performance.md +120 -0
  831. package/package.json +4 -4
  832. package/prd/04-architecture.md +32 -0
  833. package/prd/05-api/5.1-starting-claude.md +17 -1
  834. package/prd/05-api/5.2-resuming-claude.md +5 -0
  835. package/prd/05-api/5.3-claude-session-api.md +267 -40
  836. package/prd/05-api/5.4-events.md +77 -10
  837. package/prd/05-api/5.5-starting-codex.md +3 -1
  838. package/prd/05-api/5.6-resuming-codex.md +4 -1
  839. package/prd/05-api/5.7-codex-session-api.md +87 -5
  840. package/prd/05-api/5.8-session-api.md +32 -1
  841. package/prd/06-claude-hook-bridge.md +2 -0
  842. package/prd/07a-codex-hook-bridge.md +5 -0
  843. package/prd/08-state.md +63 -7
  844. package/prd/09-lifecycle.md +126 -35
  845. package/prd/10-errors.md +11 -4
  846. package/prd/12-e2e.md +81 -0
  847. package/prd/12a-cli.md +63 -9
  848. package/prd/14-conformance.md +52 -35
  849. package/prd/16-maintainer-review.md +11 -0
  850. package/dist/claude/model-composer.d.ts +0 -2
  851. package/dist/claude/model-composer.d.ts.map +0 -1
  852. package/dist/claude/model-composer.js +0 -12
  853. package/dist/claude/model-composer.js.map +0 -1
  854. package/dist/claude/transcript/drain.d.ts +0 -33
  855. package/dist/claude/transcript/drain.d.ts.map +0 -1
  856. package/dist/claude/transcript/drain.js +0 -56
  857. package/dist/claude/transcript/drain.js.map +0 -1
  858. package/dist/codex/session/cli-exit.d.ts +0 -24
  859. package/dist/codex/session/cli-exit.d.ts.map +0 -1
  860. package/dist/codex/session/cli-exit.js +0 -43
  861. package/dist/codex/session/cli-exit.js.map +0 -1
  862. package/dist/codex/transcript/drain.d.ts +0 -30
  863. package/dist/codex/transcript/drain.d.ts.map +0 -1
  864. package/dist/codex/transcript/drain.js +0 -48
  865. package/dist/codex/transcript/drain.js.map +0 -1
  866. package/dist/runtime/probe-cleanup.d.ts.map +0 -1
  867. package/dist/runtime/probe-cleanup.js.map +0 -1
  868. package/dist/runtime/probe.d.ts +0 -11
  869. package/dist/runtime/probe.d.ts.map +0 -1
  870. package/dist/runtime/probe.js +0 -113
  871. package/dist/runtime/probe.js.map +0 -1
  872. package/dist/runtime/session/foreign-picker.d.ts +0 -8
  873. package/dist/runtime/session/foreign-picker.d.ts.map +0 -1
  874. package/dist/runtime/session/foreign-picker.js +0 -18
  875. package/dist/runtime/session/foreign-picker.js.map +0 -1
  876. package/dist/runtime/session/picker-input.d.ts +0 -17
  877. package/dist/runtime/session/picker-input.d.ts.map +0 -1
  878. package/dist/runtime/session/picker-input.js.map +0 -1
@@ -53,7 +53,7 @@ interface SendOptions {
53
53
  // with an explicit format (never both — the alternatives are mutually exclusive).
54
54
  // Bytes are written to a short-lived temp file so the adapter attach paths (which
55
55
  // are file- or clipboard-based) have something to read; the temp file is removed
56
- // (best-effort) after the submission is attached.
56
+ // (best-effort) after the submission is attached, or at once when the attach is aborted.
57
57
  type ImageInput =
58
58
  | { readonly path: string }
59
59
  | { readonly data: Uint8Array; readonly format: "png" | "jpeg" | "gif" | "webp" };
@@ -144,6 +144,24 @@ failing MCP server's retry spinner) or a session whose readiness hook never
144
144
  arrives (a missing or failed hook bridge) must not starve readiness forever, so
145
145
  initial readiness fires no later than a fixed deadline after the first rendered
146
146
  frame even when neither a hook nor (on cold start) any composer signal arrives.
147
+ Codex's deadline releases readiness only onto a frame showing a configured
148
+ session's composer outside any blocking dialog. Codex 0.164 paints a boot
149
+ composer before its session is configured and adds the model footer beneath the
150
+ composer once it is; under load its directory-trust gate followed 11 to 31
151
+ seconds after its first frame, so a deadline releasing the boot composer reported
152
+ `ready` before trust was answered and drained the queue toward that gate. A Codex
153
+ deadline that expires before the configured composer paints fires on the first
154
+ frame that shows it (after any blocking dialog clears, as below); work on screen
155
+ does not delay it. A backstop 60 seconds after the first rendered frame, twice
156
+ the longest gate delay measured, releases readiness without that composer, so a
157
+ footer Elwood does not recognize delays readiness but never starves it. Codex's
158
+ deadline is therefore two-stage, and 10 seconds is not its maximum: a gate that
159
+ paints after the backstop can still follow `ready`. When the backstop releases
160
+ readiness while the latest frame shows no configured composer, Codex emits one
161
+ live-only, content-free `initial_ready_backstop` warning (§5.7), so a host can
162
+ tell that readiness from readiness on configured-composer evidence. A backstop
163
+ mark that a blocking dialog deferred until the configured composer painted does
164
+ not warn.
147
165
  Subsequent turn readiness comes from
148
166
  completion signals such as an unblocked `Stop` hook. A Stop captures the current
149
167
  queue-backed caller submission before notifying observers or invoking handlers. If a newer
@@ -352,7 +370,10 @@ submits the text, BEFORE the text's submitting Enter, so a single call produces
352
370
  a single agent turn carrying both. An image given as bytes is written to a
353
371
  short-lived temp file (the adapter attach paths are file- or clipboard-based);
354
372
  Elwood attempts to remove every such temp file after the submission is attached,
355
- on success or failure (best-effort — see the residual limitations below).
373
+ on success or failure (best-effort — see the residual limitations below). When the
374
+ attach is aborted, as when its session closes, Elwood removes the temp files at once,
375
+ so `stop`, `kill`, and `teardown` resolve with an in-flight attach's temp files gone
376
+ unless that removal fails; the attach then retries it once it unwinds.
356
377
 
357
378
  Inputs are validated and bounded BEFORE any temp file is written or any input
358
379
  reaches the composer, and a validation failure rejects the whole call so nothing
@@ -405,21 +426,38 @@ CLIs (Claude 2.1.215, codex-cli 0.144.6):
405
426
  is the clipboard contents is accepted by design. When the restore itself fails,
406
427
  the attach result is unchanged (still success) but Elwood surfaces a content-free
407
428
  `clipboard_restore_failed` warning (no clipboard contents) so the possible loss
408
- of the user's prior clipboard is diagnosable rather than silent.
429
+ of the user's prior clipboard is diagnosable rather than silent. Codex saves
430
+ each pasted image as a `codex-clipboard-*.png` file directly in its temp
431
+ directory and never removes it. Once a Codex session's CLI has exited, by
432
+ `stop`, `kill`, `teardown`, or on its own, Elwood removes (best-effort) every
433
+ such file the session's transcript recorded as a `local_image` of a user
434
+ message while Elwood watched it, one file at a time, before the session emits
435
+ `terminal:exit` and before that `stop`, `kill`, or `teardown` resolves. It
436
+ removes no other file: not an image the caller named by its own path, not a
437
+ copy the transcript never named, and not a path with a `..` segment, which a
438
+ link could lead out of the temp directory. A copy already gone is not a
439
+ failure. A removal that fails leaves that copy for the OS to reap and does not
440
+ stop the removals after it; when any fails, the session emits one content-free
441
+ `image_copy_removal_failed` warning (§5.7), before `terminal:exit`, carrying the
442
+ first failure's errno token, or `UnknownError` when it has none. When every copy
443
+ was removed or was already gone, there is no warning.
409
444
 
410
445
  Image attachment carries several accepted residual limitations. First, temp-file
411
- removal after an attach is best-effort: the primary attach/materialize error is
412
- always preserved (a cleanup failure never masks it), but a failed removal is not
413
- retried and leaves the file in the OS temp directory for the OS to reap rather
414
- than surfacing a distinct error. Second, the
446
+ removal is best-effort: the primary attach/materialize error is always preserved
447
+ (a cleanup failure never masks it), and a failed removal surfaces no distinct error.
448
+ A removal that fails when the attach is aborted is retried once, when the attach
449
+ unwinds, which `stop`, `kill`, and `teardown` do not wait for; a removal that fails
450
+ as the attach unwinds is not retried. Either leaves the file in the OS temp directory
451
+ for the OS to reap. Second, the
415
452
  Codex clipboard lock serializes attachments within a SINGLE Elwood process only;
416
453
  two Elwood processes sharing one OS clipboard are not coordinated, so a
417
454
  cross-process cross-attach remains possible (callers running concurrent
418
455
  Elwood processes that attach Codex images should serialize that themselves).
419
- Third, session close during an in-flight attach rejects the operation and blocks
420
- the text write, but does not join the attach's temp-cleanup and clipboard-restore
421
- finalizers; on an abrupt teardown those may not complete before process exit
422
- (clipboard restore is already best-effort, and temp files fall to OS reaping).
456
+ Third, session close during an in-flight attach rejects the operation, blocks
457
+ the text write, and removes the attach's temp files at once (best-effort, per the
458
+ first limitation), but does not join the attach's clipboard-restore finalizer or its
459
+ retry of a failed removal; on an abrupt teardown those may not complete before
460
+ process exit (clipboard restore is already best-effort).
423
461
  Fourth, failed-attach cleanup follows the owned, deferred cleanup rule above.
424
462
  The clear uses kill-to-line-start plus kill-to-line-end, but does not run an
425
463
  adapter-specific transactional confirm-and-restore
@@ -431,6 +469,11 @@ metadata: this defeats stray transcript/assistant `[Image #N]` text on
431
469
  non-composer lines, but a running-turn render that puts a prompt-glyph line
432
470
  on-screen at the confirmation moment, or a chip on a wrapped composer
433
471
  continuation row, is a known edge the glyph heuristic does not perfectly resolve.
472
+ Sixth, Codex's copy of a pasted image is removed only once a transcript names it,
473
+ which happens when the message is submitted: an image whose attach fails or is
474
+ aborted after its Ctrl+V leaves its copy for the OS to reap. Copies are also
475
+ removed only from Elwood's own temp directory, so a login shell that points Codex
476
+ at another `TMPDIR` leaves them.
434
477
 
435
478
  Turn boundaries MUST be observable even when no completion hook fires. Claude
436
479
  does not fire a `Stop` hook when a running turn is interrupted (Escape), so
@@ -452,8 +495,10 @@ fires the turn-end transition even when the working token was never visible.
452
495
  Together the sources cover every width. Turn start is a rendered-state signal:
453
496
  the on-screen working token where it fits, plus the OSC window-title working
454
497
  spinner (C-TURN-05): the braille range on both adapters and Claude's observed
455
- `◐ ` prefix. This signal is width-independent and reveals a running turn even
456
- when the footer token is elided; a caller `sendMessage`/`sendPrompt` also moves
498
+ half-circle prefixes, `◐ ` and `◑ `, which Claude 2.1.310 alternates between for the
499
+ whole turn. Every frame of that animation reads as working. This signal is
500
+ width-independent and reveals a running turn even when the footer token is elided; a
501
+ caller `sendMessage`/`sendPrompt` also moves
457
502
  the session to `running`. Normal completion comes from the `Stop` hook, and
458
503
  interrupts from the working-token edge on wide screens or the end banner
459
504
  anywhere. Hook-driven readiness (`Stop`) remains a redundant turn-end source;
@@ -466,8 +511,13 @@ are suppressed until the composer has stayed quiet and non-blocking (composer
466
511
  visible, no working token, no blocking dialog) for a SUSTAINED run of consecutive
467
512
  frames, not merely one. The replay repaints those footers in bursts separated by
468
513
  brief quiet gaps, so a single quiet frame does not prove the replay finished; any
469
- working or blocking frame during suppression resets the run. Once the quiet run is
470
- reached, detection behaves exactly as it does post-readiness on a cold start.
514
+ working or blocking frame during suppression resets the run. A frame showing the
515
+ CLI's own resume-loading placeholder is not quiet either: Codex 0.164 paints
516
+ `Resuming session…` above a live composer, repaints it, and only then loads the
517
+ conversation under a working title. Once that placeholder has painted and the load's
518
+ working indicator has been seen, the first quiet composer ends suppression, because
519
+ an idle CLI may not repaint again. Once the quiet run is reached, detection behaves
520
+ exactly as it does post-readiness on a cold start.
471
521
  Explicit running evidence (a caller submission,
472
522
  a hook) releases that suppression IMMEDIATELY — a real turn has begun, so the replay
473
523
  is over by definition — and synchronizes the watcher into the running state without
@@ -547,11 +597,43 @@ type AgentModelOption = {
547
597
 
548
598
  `id` is a stable lowercase selector (the Claude option label, such as `haiku`,
549
599
  or the Codex model slug, such as `gpt-5.4`). `isCurrent` reflects the model the
550
- session is using now; `isDefault` reflects the CLI's configured default. When
551
- Codex renders only a `(current)` marker, that row is also the default.
600
+ session is using now; `isDefault` reflects the CLI's configured default. Codex
601
+ draws a `(default)` marker only on some versions (0.164 marks just the
602
+ `(current)` row), so when none renders, its default is the model a plain `codex`
603
+ launch would run with the `CODEX_HOME` the session's own Codex process runs
604
+ with, as its launch script reports it (§4.2, C-CODEX-24): the `model` of the
605
+ profile that `config.toml`'s root `profile` key selects, else its root `model`
606
+ key. Elwood reads it once per listing, after the picker closes, under the lock
607
+ for that `config.toml` that `setModel` holds through its restore, so an
608
+ in-flight switch on the same file by another session in the same process is
609
+ never reported as the default (the lock is process-local, like the restore it
610
+ guards). A `config.toml` that exists but cannot be read rejects the listing
611
+ with `model_automation_failed`, with `details.path` and `details.code`. Elwood
612
+ reads `config.toml` only as a regular file of at most 1 MiB (1,048,576 bytes), opened without waiting for a writer
613
+ (C-CODEX-25): the file may sit where the agent can replace it, and a FIFO in its
614
+ place would otherwise block the whole process until something wrote to it. A
615
+ directory (`EISDIR`), a FIFO, socket, or device (`EFTYPE`, including a socket
616
+ macOS refuses to open), or a larger file (`EFBIG`) cannot be read. The
617
+ session's own `model`, `profile`, and `configOverrides` launch options are not
618
+ the default. When the config names no model (Codex then runs a built-in default
619
+ it does not identify) or names one the picker does not list, no Codex row is the
620
+ default.
552
621
 
553
622
  Model operations hold an exclusive session-input queue slot for the entire
554
623
  open/navigate/apply-or-cancel flow, including waiting for the dialog to clear.
624
+ A dialog has cleared only once no stage of it, complete or partly painted, has
625
+ been the bottom-most region across five readings at least 40 ms apart; any
626
+ reading that shows one restarts the count. Dialog text above a conversation or
627
+ composer row, such as a transcript quoting the picker's title, is not the dialog.
628
+ One frame without the picker is not enough: a blank or half-painted repaint lacks
629
+ it too, and the picker can paint again after it, where a released Enter would
630
+ apply the highlighted model. Absence is counted rather than positive composer
631
+ clearance because model operations also run during a turn, when the composer is
632
+ never clear. A dialog that does not stay gone by the deadline fails the operation
633
+ with `model_automation_failed`. Each reading first renders everything the terminal
634
+ has received, as before a picker key, so a repaint still queued for rendering is
635
+ counted; a reading whose received output cannot be rendered fails the operation
636
+ the same way, since the last frame proves nothing.
555
637
  Concurrent model operations and normal submissions cannot interleave writes:
556
638
  they are dispatched only after the operation settles. The queue wait and picker
557
639
  operation share the supplied `timeoutMs` budget, so an operation still queued at
@@ -583,9 +665,17 @@ change that may never happen.
583
665
  Every picker wait and write MUST be gated on the operation's own dialog, not on a
584
666
  bare header match: a header alone is untrusted candidate evidence that transcript
585
667
  or agent output can satisfy, so navigating or cancelling on it could send keys into
586
- a running turn, the real composer, or another prompt. Cleanup's Escape is decided
587
- on everything RECEIVED, not the last rendered frame, and is withheld when the
588
- screen cannot be vouched for. A single clear frame does not end cleanup once a
668
+ a running turn, the real composer, or another prompt. Every picker key — a
669
+ navigation arrow, the selecting key, a follow-up's answer, listing's Escape, and
670
+ cleanup's Escape — is decided on everything RECEIVED, not the last rendered
671
+ frame: Elwood renders and observes all received PTY output, re-checks the
672
+ operation's own dialog on that frame, and writes before further output is
673
+ delivered, so a prompt already in the PTY buffer never receives a key aimed at
674
+ the picker (C-API-56). When the screen cannot be vouched for, an operation's key
675
+ is withheld and the operation rejects with `model_automation_failed`, and
676
+ cleanup's Escape is withheld; an operation cancelled meanwhile (its deadline, the
677
+ session closing, or caller input) rejects with that cancellation's own error, as
678
+ it does at any other step. A single clear frame does not end cleanup once a
589
679
  dialog has been seen, because a repainting picker is briefly unrecognizable.
590
680
  When session termination races a Codex `setModel`, the call rejects at once rather
591
681
  than waiting out the exit bound, and the exit barrier is consulted on every outcome,
@@ -605,11 +695,15 @@ the active picker operation: it rejects with `model_automation_failed` and sends
605
695
  no further navigation or cleanup keys into the human-owned generation. A foreign
606
696
  picker hold survives partial repaints and clears only after five consecutive
607
697
  positive native-composer observations, never from an empty or unrecognized frame.
698
+ A dialog that survived Elwood's own cleanup clears the same way. Observations
699
+ count at least 40 ms apart, so readings bunched into one instant, or a burst of
700
+ repaints, count once. An idle CLI does not repaint, so the evidence is the same
701
+ completed frame read over time, not a run of new frames.
608
702
  Only the bottom-most region of the viewport is a model dialog: dialog text with a
609
703
  conversation or composer row below it is transcript content (a reply quoting a
610
704
  picker), which Elwood neither cancels nor holds on. Unrelated dialogs, including a
611
705
  `PreModelSwitch` hook confirmation, are left for the caller.
612
- Codex retains its process-wide configuration transaction lock, but acquires it INSIDE
706
+ Codex retains its configuration transaction lock, but acquires it INSIDE
613
707
  the session queue slot: claiming the lock first would let a following submission
614
708
  dispatch while the switch waited on another session's transaction, sending under the
615
709
  old model. When the
@@ -629,8 +723,29 @@ configuration lock when its session closes MUST reject promptly with
629
723
  NOT then apply its switch when the lock frees.
630
724
 
631
725
  `listModels` opens the picker, parses the rendered rows, cancels the picker
632
- with Escape, and MUST leave the session's model unchanged. `setModel` selects
633
- the requested row through cursor navigation. Elwood itself MUST NOT persist a
726
+ with Escape, and MUST leave the session's model unchanged. It returns EVERY row
727
+ the picker lists, in picker order, including rows outside a scrolling window:
728
+ Claude shows at most ten rows of a longer list, numbering rows by their absolute
729
+ position, marking a window that starts past row 1 with `↑` and one that ends
730
+ before the last row with `↓`, and counting the rows below it with `… +K models`.
731
+ Elwood reveals the hidden rows by moving the cursor one row at a time with the
732
+ arrow keys, never past either end of the list, each key gated on the operation's
733
+ own live picker and each move confirmed on screen, and merges the windows by row
734
+ number. Arrow keys only move the highlight; the Escape that follows keeps both
735
+ the model and its effort level. A list that fits its window is read without any
736
+ arrow key. While a walk still needs rows (a listing, or `setModel` before its
737
+ target is rendered), the rendered count and row numbers are validated rather
738
+ than trusted: the walk never acts on a frame that marks rows hidden below
739
+ without a positive count, has a row number or list length that is not an exact
740
+ integer, or states a list length other than the first one it read. Claude
741
+ repaints a scrolled window across more than one render, so such a frame is
742
+ waited out; if no frame that adds up renders, or the cursor does not move, the
743
+ walk rejects with `model_automation_failed`, because one timeout bounds the
744
+ whole walk however many rows the picker claims.
745
+ `setModel` selects the requested row through cursor navigation, walking the
746
+ window the same way only until the requested row is rendered, so every id
747
+ `listModels` returns is selectable; an unknown id walks the whole list and the
748
+ rejection lists every row. Elwood itself MUST NOT persist a
634
749
  new default model into the user's configuration (§4.5): for Claude it applies
635
750
  with the session-only key rather than Enter, and it never selects rows via
636
751
  number keys because Claude's number shortcut immediately saves the choice as
@@ -648,8 +763,14 @@ MUST leave that decision to the human and keep it classified as a blocking
648
763
  prompt. For Codex, the Codex CLI itself persists the confirmed
649
764
  picker selection (model and reasoning effort) into the user's `config.toml` —
650
765
  there is no session-only affordance — so Elwood compensates: it snapshots
651
- `config.toml` before opening the picker and, after the switch is confirmed,
652
- restores the prior contents if and only if the file differs solely in the
766
+ the session's `config.toml` (the one in the `CODEX_HOME` its Codex process runs
767
+ with, §4.2) before opening the picker (a `config.toml` that cannot be read, by
768
+ the rule above, fails `setModel` with `model_automation_failed` before the picker
769
+ opens, because Codex would persist its selection into a file Elwood could not
770
+ restore) and, after the switch is confirmed, rereads it the same way (one that
771
+ cannot be read then rejects the call with `model_automation_failed`,
772
+ `details.path`, and `details.code`, or, once the call has settled, puts that
773
+ code in the warning's `raw`) and restores the prior contents if and only if the file differs solely in the
653
774
  root-level `model` and `model_reasoning_effort` keys the picker writes
654
775
  (compare-and-swap on the untouched remainder). The restore never affects the
655
776
  live session, which keeps the switched model because Codex reads its config
@@ -661,9 +782,19 @@ revokes restoration authority: Elwood leaves any resulting config change in plac
661
782
  and emits that same warning with a content-free takeover explanation. It must
662
783
  not restore its snapshot over a model choice the human may have just made. Elwood confirms the CLI's own default
663
784
  reasoning level for the chosen Codex model. The whole snapshot/apply/restore
664
- transaction holds a process-wide lock so two concurrent `setModel` switches in
665
- the SAME Elwood process cannot interleave and leave the wrong default. This lock
666
- is process-local: two SEPARATE Elwood processes sharing one `config.toml` can
785
+ transaction holds a lock for that `config.toml` so two concurrent `setModel`
786
+ switches on one file in the SAME Elwood process cannot interleave and leave the
787
+ wrong default. The lock is per file, the one the session's launch reported
788
+ (C-CODEX-24): every path that names the same file (a symlinked home or config,
789
+ another letter case, or another Unicode form) shares one lock, even before Codex
790
+ creates the file: a dangling symlink shares its target's lock. Lock keys ignore
791
+ Unicode normalization and fold letter case fully, as APFS does (`ß` and `ss` are
792
+ one name), for every path, existing or not, so a key never changes when its file
793
+ appears. Sessions whose config paths have different keys never wait on each
794
+ other; paths that differ only in case share a key on every volume, so on a
795
+ case-sensitive volume two such files share a lock, which only serializes them. A config
796
+ path that cannot be resolved (a symlink loop, say) rejects the operation with
797
+ `model_automation_failed`, `details.path`, and `details.errno`. This lock is process-local: two SEPARATE Elwood processes sharing one `config.toml` can
667
798
  still interleave their transactions. That cross-process race is an accepted
668
799
  current limitation (the compare-and-swap still refuses to clobber an unrelated
669
800
  edit; the residual risk is a transiently-persisted picker model surviving as the
@@ -880,7 +1011,8 @@ terminal object between Node and the browser.
880
1011
  `stop` attempts graceful process termination while preserving Elwood metadata and
881
1012
  loop definitions for resume. It should wait for process exit for a bounded grace period, then escalate
882
1013
  to force termination so callers do not get a terminal status while the process is
883
- still indefinitely alive. `kill` force-terminates the process and permanently
1014
+ still indefinitely alive. A Codex `stop` or `teardown` called during or right after a
1015
+ `Stop` hook first gives Codex up to 2 seconds to record that turn (§5.7). `kill` force-terminates the process and permanently
884
1016
  clears its loop definitions. `teardown` removes
885
1017
  Elwood-owned state for the session and must not remove Claude-owned transcripts,
886
1018
  auth, or project/user settings that Elwood did not create.
@@ -894,19 +1026,114 @@ signaling the exited PTY or waiting for another exit notification. Terminal exit
894
1026
  terminal status, and natural-exit reaping occur once even if PTY callbacks reenter.
895
1027
 
896
1028
  `stop`, `kill`, and `teardown` MUST reap the full PTY process tree, not only the
897
- PTY leader. The adapter CLI spawns helper subprocesses that are descendants of
1029
+ PTY leader, except Codex's shared app-server daemon, its updater, and what they
1030
+ started, which every Codex on the same `CODEX_HOME` shares (the walk below spares them). The adapter CLI spawns helper subprocesses that are descendants of
898
1031
  the PTY leader — notably the per-session hook bridge (`node hook-bridge.mjs`) the
899
1032
  CLI runs on each hook — and signaling only the leader can orphan them, leaking a
900
- process tree that accumulates across launch/quit cycles. Elwood MUST reap these
901
- by SIGKILLing the leader's process group: node-pty starts the leader as its own
902
- session leader, so every descendant inherits its process group, and a group
903
- SIGKILL reaches them even after a descendant has been reparented to PID 1 by the
904
- leader's exit — which a parent-pid walk cannot. The reap MUST run for `stop()`,
905
- `kill()`, and `teardown()`, including when the leader has already exited on its
906
- own (an already-terminal session still reaps the group). A dead or empty group
907
- is a no-op. A `teardown()` that rejects in-flight control-queue operations MUST
908
- still complete: rejecting a pending `sendMessage`/`compact`/model operation does
909
- not skip the group reap or the rest of teardown.
1033
+ process tree that accumulates across launch/quit cycles. Elwood reaps them in two
1034
+ parts. A descendant that stays in the leader's process group MUST be reaped by
1035
+ SIGKILLing that group: node-pty starts the leader as its own session leader, so such
1036
+ a descendant is reached by a group SIGKILL even after it has been reparented to PID 1
1037
+ by the leader's exit — which a parent-pid walk cannot. A descendant that moved into
1038
+ a process group of its own, as each hook command does, is outside that kill and is
1039
+ reaped by the detached-descendant walk below. The group reap MUST run for `stop()`,
1040
+ `kill()`, and `teardown()`, including when the leader has already exited on its own
1041
+ (an already-terminal session still reaps the group). A dead or empty group is a
1042
+ no-op. If the detached sweep confirms the entire leader group gone (SIGSTOP
1043
+ returns ESRCH, or a bounded fresh read after EPERM shows no live group member),
1044
+ that fact is terminal for this session: no later PTY or group signal may reuse its
1045
+ numeric id, including the final reap and subsequent shutdown attempts. This never
1046
+ clears an earlier unresolved descendant-sweep failure. An exit callback arriving
1047
+ during a detached sweep leaves the group reap to that sweep’s shutdown owner,
1048
+ after its pending confirmation settles. A live or failed confirming read still
1049
+ permits the normal final reap and preserves any unresolved sweep failure. A `teardown()` that rejects in-flight control-queue operations MUST still
1050
+ complete: rejecting a pending `sendMessage`/`compact`/model operation does not
1051
+ skip the group reap or the rest of teardown.
1052
+
1053
+ Native process-table scans and daemon-path probes share a process-wide limit of
1054
+ two in-flight subprocesses. Admission is FIFO and its wait consumes the read’s
1055
+ existing timeout; an expired queued read starts no subprocess and reports ETIMEDOUT.
1056
+ A native slot is retained until that subprocess runner settles, including failure.
1057
+ Per-session observation requests still coalesce before admission; a short consumer’s
1058
+ timeout cannot cancel the shared read needed by another consumer.
1059
+
1060
+ Not every descendant stays in that group. Both CLIs start each hook command with
1061
+ `setsid()`, in its own session and process group, and Codex starts MCP servers in
1062
+ their own process group. While the leader is alive its parent-pid link is the only
1063
+ thing that ties such a descendant to the session. So whenever Elwood SIGKILLs a
1064
+ live leader — `kill()`, `teardown()`, and the escalation after a `stop()` or
1065
+ startup-cleanup SIGTERM the leader did not exit on — it MUST first reap the
1066
+ leader's detached descendants: SIGSTOP the leader's process group so it cannot
1067
+ start another hook, walk the host process table by parent pid from the leader,
1068
+ SIGSTOP each process group outside the leader's that holds a live descendant,
1069
+ repeat the walk until a read converges (below), then SIGKILL each group it
1070
+ stopped, deepest first, but one it resumes as holding Codex's daemon (below).
1071
+
1072
+ Only descendants of the leader are signaled: every member of such a group descends
1073
+ from the leader, and the host's own group is never signaled. One descendant is never
1074
+ killed: Codex's managed app-server daemon. The walk may stop its group, but then resumes
1075
+ it. Codex 0.158 and later can start, for its
1076
+ `CODEX_HOME`, an app-server daemon and its updater loop from the copy of the CLI it
1077
+ installs under `$CODEX_HOME/packages/app-server-daemon/`, each in a session of its own
1078
+ and a child of the TUI that started it until that TUI exits. The daemon belongs to the
1079
+ `CODEX_HOME`, shared by every Codex using it, the user's own included, so the walk MUST
1080
+ NOT descend into such a process: one whose binary is named `codex`, that leads its own
1081
+ process group, whose parent is a process named `codex` or PID 1, and whose path as `ps`
1082
+ shows it (`comm`, its `argv[0]`, which Codex sets to the full path) has a
1083
+ `/packages/app-server-daemon/` directory in it. Neither it nor anything it started is
1084
+ killed: the TUI forks the daemon as a `codex` group leader and then `exec`s it, so a group
1085
+ the walk stopped is resumed (SIGCONT), not killed, when the latest read shows it holding
1086
+ the daemon, or a process not shown stopped that could still become it; a SIGCONT
1087
+ refused for any reason but the group being gone fails the walk. These tests read what
1088
+ `ps` reports, which a process can set for itself, so a descendant that imitates the
1089
+ daemon is spared like it: the walk reaps a tree that stays in reach, as a descendant
1090
+ whose own parent exits before the walk already does not (below). Each read also lists
1091
+ every process's short name, which `ps` prints raw, so a name with a newline in it could
1092
+ forge a row: a read with any line that is not one whole row, or one process twice, is
1093
+ not used. A group id read from the table can be reused once that group is gone, a
1094
+ SIGSTOP takes effect only once it is delivered, and a table read sees each process at
1095
+ its own moment, so Elwood
1096
+ relies only on processes it holds: ones that read stopped, inside a group Elwood
1097
+ stopped, in a read and in the read before it. A group is stopped only once a held
1098
+ process is a parent of one of its members: a stopped parent cannot reap its exited
1099
+ child, so the group keeps its id until the signal. The walk succeeds only on a
1100
+ read that converges: it shows the leader itself live, leaves no live group
1101
+ unreached, and shows every live process in every group Elwood stopped, the
1102
+ leader's included, as held, so none of them can have started a process the read
1103
+ missed.
1104
+ A process forked while a group's SIGSTOP is being sent can miss it, so whenever a
1105
+ read shows a live process in a group Elwood stopped that is not stopped, Elwood
1106
+ MUST send that group SIGSTOP again. With no hook in flight that takes two reads,
1107
+ and each level of nesting, or a process that missed its group's SIGSTOP, adds two
1108
+ more. If the leader's group cannot be stopped, no other group is signaled and the
1109
+ walk fails, unless the leader had already exited: its group is gone, or holds only
1110
+ unreaped zombies, which a fresh read must show. The walk
1111
+ reaches only descendants still linked to the leader by parent pid: a process whose
1112
+ own parent exited earlier has been reparented to PID 1 and is not traced. The
1113
+ walk's process-table reads share one ten-second deadline, and the walk runs
1114
+ before the leader's existing SIGKILL wait, which keeps its own bound. Once the
1115
+ leader's exit has been observed, its pid may belong to another process: Elwood
1116
+ then sends the leader no further SIGSTOP or SIGKILL and stops no further group. A
1117
+ group it has already stopped is still killed, or resumed as holding the daemon,
1118
+ because a stopped process cannot exit and so keeps its id. (The process-group reap above still runs.) If the walk
1119
+ cannot complete — the table cannot be read, no read converges by the deadline,
1120
+ the leader's group cannot be stopped, a live group cannot be stopped or killed, a
1121
+ group held as the daemon's cannot be resumed, or the leader's exit is observed before
1122
+ a read converges —
1123
+ Elwood still SIGKILLs the leader (unless it has exited) and reaps its group, then
1124
+ rejects because the tree could not be confirmed reaped: `stop()` and `kill()` with
1125
+ `termination_failed`, `teardown()` with `teardown_failed`, either naming the
1126
+ reason. Once the leader is gone that cannot be retried, so every later `stop()`,
1127
+ `kill()`, or `teardown()` of the session rejects the same way instead of reporting
1128
+ success. A leader that exits on SIGTERM within the graceful window is not walked,
1129
+ so the `stop()` leaves running any detached descendant the CLI's own shutdown does
1130
+ not end. Claude ends an in-flight hook itself. Codex 0.164 does not end the shell it
1131
+ starts in a session of its own a few seconds after launch to snapshot the user's
1132
+ shell environment: a `stop()` while that shell sources a slow profile leaves the
1133
+ shell, and whatever the profile started, running under PID 1. (A human's `/quit`
1134
+ then leaves the profile's processes running too.) Nor is a leader that exits on its
1135
+ own before Elwood signals it walked: nothing links its detached descendants to the
1136
+ session any more.
910
1137
 
911
1138
  ### Automated input and pending decisions
912
1139
 
@@ -131,14 +131,44 @@ session-owned coordinator gives each observed dialog generation its own
131
131
  reservation and bounded five-second deadline, beginning at first candidate
132
132
  observation. Partial first paints receive that interval without an immediate
133
133
  `blocked` transition. Numbered and cursor layouts share the same safety checks:
134
- before every number, arrow, Enter, and retry, the session must still be live and
135
- the same generation, native header, and exact affirmative choice must remain
136
- valid. Cursor selection movement and completion of native option rows do not
134
+ before every number, selection, confirmation, and retry, the session must still
135
+ be live and the same generation, native header, and exact affirmative choice must
136
+ remain valid. Cursor selection movement and completion of native option rows do not
137
137
  alone replace a generation. Clearing and reappearance do. An older completion
138
138
  cannot release or settle a newer generation's reservation.
139
139
 
140
- Numbered confirmations retry at bounded intervals when the native input loop
141
- has not consumed them; cursor navigation likewise waits for verified progress.
140
+ A numbered answer's first write types its number. A frame that still shows the
141
+ gate does not prove the CLI ignored that write: under load a CLI can take it and
142
+ paint its next screen after the retry interval, and the number typed again would
143
+ be submitted from its composer as a user message. Retries therefore never type
144
+ the number on that evidence alone. Codex's answer retries, at bounded intervals,
145
+ as Enter alone while the rendered caret is on the affirmative: on the gate Enter confirms that option, and
146
+ on Codex's empty composer it submits nothing. Otherwise (any Claude layout, or a
147
+ caret on another option) the number is typed again only after a frame rendered
148
+ from output received after the last write still shows the gate. Once Elwood has
149
+ started writing a gate's number, every later attempt at that gate retries the
150
+ same way, even when that write or a retry was rejected (a rejected write may
151
+ still have reached the CLI), until another complete dialog replaces the gate and
152
+ the CLI draws it afresh. A cursor layout never receives a relative arrow or a bare
153
+ Enter: Elwood selects the affirmative by its absolute row (Home, then one Down
154
+ per option above it), repeats that selection while the rendered cursor is
155
+ elsewhere, and sends Enter only in the same write as the selection, once the
156
+ rendered cursor is on the affirmative. A delayed, duplicated, or lost key, or a
157
+ CLI that resets its own selection after Elwood read the frame, therefore cannot
158
+ confirm another option.
159
+ Raw input through `sendKeys`, `terminal.sendInput`, or `xterm.input` while a
160
+ trust dialog generation is on screen hands that generation to the caller. Its
161
+ attempt is cancelled before the caller's keys are written, and Elwood writes
162
+ nothing more to it, even if it repaints or outlives its five-second deadline
163
+ (it then falls back to `blocked` as below). The frame Elwood reads can trail
164
+ the CLI, so a retry typed after the caller's keys could land in the composer
165
+ and submit them. A later dialog generation is answered as usual. The same raw
166
+ input ends a running Codex update-skip attempt before the caller's keys are
167
+ written, so none of its retries follow them. A Codex update prompt that is on
168
+ screen, or that left the screen without positive native composer clearance,
169
+ then belongs to the caller: Elwood writes no skip to it, even when its frame
170
+ loses and regains the prompt, until positive native composer clearance. An
171
+ update prompt appearing after that clearance is handled as usual.
142
172
  An unambiguous changed versioned Codex update banner, a bannered replacement with
143
173
  changed or removed safe-option bindings and a valid safe choice, or a fresh unambiguous
144
174
  banner with a valid current safe choice after update eligibility was revoked,
@@ -153,8 +183,16 @@ that a key was written or that the prompt was answered.
153
183
 
154
184
  With a live frame reader, `startup_prompt` is emitted only after a fulfilled
155
185
  confirmation and a verified native composer or distinct native successor gate.
156
- An unknown replacement is not successful clearance. Lost revalidation cancels
157
- that attempt quietly, retaining input ownership while clearance is unverified.
186
+ An unknown replacement is not successful clearance. Nor does a frame without the
187
+ gate end a fulfilled confirmation: once the confirming write fulfills, blank,
188
+ banner-only, or other dialog-free frames (the CLI erased the answered dialog and
189
+ is painting its next screen) neither settle nor cancel the attempt, which writes
190
+ nothing while the gate is absent. Later verified clearance reports it exactly
191
+ once; the same gate's return resumes answering within its remaining budget; a
192
+ changed gate, a complete off-allowlist gate (C-ATTN-03), expiry, and closing
193
+ cancel it without a report.
194
+ Lost revalidation before the confirmation fulfills cancels that attempt quietly,
195
+ retaining input ownership while clearance is unverified.
158
196
  Stop, kill, teardown, startup cleanup, and PTY exit cancel all trust attempts and
159
197
  timers before disposal; late completions emit neither success nor warnings.
160
198
  Only an actual rejected PTY write in a still-live matching attempt produces the
@@ -162,9 +200,19 @@ content-free `startup_prompt_write_failed` warning.
162
200
 
163
201
  If automation cannot safely clear the gate within five seconds, the live session
164
202
  MUST enter recoverable `blocked` status and emit the existing human `attention`
165
- activity, even without another terminal frame. Unsupported layouts and exhausted
166
- attempts use this same fallback; they never cause blind input or false write
167
- warnings. An unchanged redraw cannot restart an expired attempt indefinitely.
203
+ activity, even without another terminal frame. Those five seconds count only time
204
+ the gate is on the current rendered frame. A frame without it — the CLI erased an
205
+ answered dialog and is still painting its next screen — pauses the deadline, and
206
+ the same gate's return resumes the remainder rather than a fresh interval, so the
207
+ budget is five seconds of cumulative visible time. A gate that leaves the frame
208
+ before those five seconds are spent and stays absent until verified clearance
209
+ therefore never produces `blocked` or `attention`, however long the CLI then
210
+ takes to paint its composer: no prompt is left for a human to answer. A gate that
211
+ returns spends only what remains and falls back once its visible time reaches
212
+ five seconds. Its input hold is unchanged and lasts until verified clearance. Unsupported
213
+ layouts and exhausted attempts use this same fallback; they never cause blind
214
+ input or false write warnings. An unchanged redraw cannot restart an expired
215
+ attempt indefinitely.
168
216
  A newly valid layout or a new dialog generation re-arms bounded safe automation;
169
217
  once fallback has occurred, the public block remains until verified clearance.
170
218
  Raw `sendKeys` remains available for human recovery, while queued persona,
@@ -201,6 +249,18 @@ An exact-shaped native working row remains ambiguous even with a visible input
201
249
  cursor: Codex permits typing while running, and its title spinner is configurable.
202
250
  Such a row conservatively retains the hold, including an identical transcript quotation.
203
251
 
252
+ Claude's verified composer is the empty `❯` row between its two rules, plus native
253
+ chrome: the permission-mode footer as the very next row, or the `Claude Code v…`
254
+ version banner. The footer proves the composer in every permission mode the CLI
255
+ offers (manual, plan, accept edits, auto, don't ask, bypass permissions), with or
256
+ without vim's `-- INSERT --` prefix, the transient `← for agents` and `? for
257
+ shortcuts` hints, and the right-aligned token count or effort level. The banner
258
+ MUST NOT be required, because it scrolls out of the viewport in a long session.
259
+ Trust clearance, foreign model-picker release (C-API-55) and empty-input
260
+ observation (C-API-56) share this evidence. A footer quoted anywhere other than
261
+ directly under the composer's bottom rule is transcript, not chrome, and a footer
262
+ truncated on a narrow terminal does not prove the composer.
263
+
204
264
  An unrecognized gate behind a recognized native header prefix is hold-only
205
265
  under every `autotrust` value. The recognized prefixes are exactly the
206
266
  line-leading `Do you`, `Quick safety`, `Is this`, `Load this`, `Trust the`, `Trust this`,
@@ -224,6 +284,13 @@ NOT a general guarantee: a gate whose header starts with any other words, whose
224
284
  footer is not yet painted or not one of those rows, or that carries other rows
225
285
  below its options is outside this grammar and is not held.
226
286
 
287
+ Codex 0.164 draws two more footers when hook trust is not bypassed:
288
+ `enter continue · esc back` on its folder-access gate, whose decline then reads
289
+ `Back to Agent Command Center`, and `enter confirm · esc skip` on `Hooks need review`.
290
+ Neither is one of the rows above. Each ends a dialog only under the allowlisted gate
291
+ that draws it, with that gate's header, explanation, and options, so under any other
292
+ header or options, including conversation text, it makes no frame a trust gate.
293
+
227
294
  Two prompts are exceptions to the `autotrust` gate. Codex hook trust
228
295
  (`hook_trust`) is always enabled because the session requires its hook bridge.
229
296
  Codex's hook-trust bypass is session-wide: it trusts ALL configured hooks,
@@ -33,7 +33,9 @@ declare function startCodex(options: StartCodexOptions): Promise<CodexSessionApi
33
33
  ```
34
34
 
35
35
  Elwood sets the PTY working directory and also passes Codex `--cd <cwd>` so
36
- Codex's own session state and the shell's current directory agree.
36
+ Codex's own session state and the shell's current directory agree. `cwd` MUST
37
+ already be a directory, with the same `codex_start_failed` rejection, the same
38
+ check after preflight, and the same guarantees as `startClaude` (§5.1, C-API-61).
37
39
 
38
40
  `reasoningEffort`, when set, is forwarded as the Codex `-c
39
41
  model_reasoning_effort=<value>` config override so the session starts at the
@@ -26,7 +26,10 @@ Because the default state store is project-local, callers that resume from a
26
26
  different process working directory must pass the original `cwd` or the explicit
27
27
  `stateDir` used at start time. Calling `resumeCodex({ elwoodSessionId })`
28
28
  without `cwd` or `stateDir` uses the current process working directory to
29
- discover the project-local state store.
29
+ discover the project-local state store. Codex relaunches in the record's `cwd`
30
+ even when a `cwd` is given, since a given `cwd` only locates the state store.
31
+ The record's `cwd` must still be a directory, checked before and after
32
+ preflight as on start, and `details.cwd` names it (§5.1, C-API-61).
30
33
 
31
34
  `resumeCodex` must verify that the persisted Elwood session record belongs to
32
35
  the Codex adapter before launching. Passing a Claude session ID to `resumeCodex`