@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
package/CHANGELOG.md CHANGED
@@ -12,6 +12,576 @@ back each entry are listed in `prd/14-conformance.md`.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [0.2.2] - 2026-11-03
16
+
17
+ - Preserve custom state directories during rollback when another user could redirect their parent lookup.
18
+
19
+ - State rollback records successful directory creation and checks observed ownership before removing empty scaffolding, preserving directories another actor created or replaced.
20
+
21
+ - Shutdown permanently stops signaling a leader PID or group once its detached
22
+ sweep confirms the group gone, retaining any earlier unresolved descendant failure.
23
+ An exit during that confirmation waits for its shutdown owner’s final reap, and
24
+ saved sweep failures report the unresolved descendants and retain their unconfirmed
25
+ group IDs through teardown.
26
+
27
+ - Shutdown bounds native process-table scans and daemon-path probes to two concurrent
28
+ subprocesses per parent process, preserving coalescing and existing read deadlines.
29
+
30
+ - Resolve CLI auto-detection and interactive PATH lookup from the effective workspace, including relative and absolute `--cwd` overrides. Missing, non-directory or non-searchable workspaces report the path-specific usage error before auto-detection.
31
+ - Run version, capability and update probes in the launch workspace, with bounded directory-identity caches so sessions cannot reuse another workspace's CLI results. A workspace removed or replaced during preflight reports a startup failure instead of a missing CLI.
32
+
33
+ - Concurrent Elwood processes avoid repeating an automatic agent update that another process has completed.
34
+
35
+ - Preserve native cause, `syscall`, and `path` diagnostics for probe failures surfaced as startup errors, including missing login shells; missing-command diagnostics withhold shell output.
36
+ - Preserve a resolved CLI's diagnostic when it exits with status 127 instead of reporting it missing from PATH. A command lookup must fail before Elwood uses the fixed not-found diagnostic.
37
+ - Clean up eligible empty state scaffolding after setup fails while retaining shared default directories and complete ignores that another setup may already use; report cleanup failures with the original error.
38
+
39
+ - Install the default `.elwood/.gitignore` atomically without overwriting a competing writer or leaving partial contents after a failed write.
40
+
41
+ - A session's final transcript flush, and a Claude subagent's retirement, now read
42
+ the first unread chunk (up to 256 KiB) of each transcript they drain, for up to 16
43
+ transcripts, before their 50 ms time limit can stop them. Before, a host too loaded
44
+ to begin the flush within that limit read nothing: the session's last records never
45
+ arrived as activity, and a `transcript_records_dropped` warning with cause
46
+ `unread_backlog` reported them instead. A record the flush cuts off is now part of
47
+ that `unread_backlog` warning instead of a second warning with cause `unparseable`.
48
+ - The walk that reaps detached hook processes now reads each process's short name,
49
+ which `ps` prints raw, and refuses a table read it cannot trust instead of acting
50
+ on it: one with a line that is not one whole row, such as a line a newline in a
51
+ process's name starts, or with a pid listed twice. A refused read fails as an
52
+ unreadable table does, so while a process on the host has a newline in its name,
53
+ `kill()`, `teardown()`, and a `stop()` that escalates reject with
54
+ `termination_failed` (`teardown_failed` from `teardown()`).
55
+ - A Codex session now removes the `codex-clipboard-*.png` file Codex saves in the
56
+ temp directory for each image Elwood pastes into it, once the session's CLI has
57
+ exited by `stop()`, `kill()`, `teardown()`, or on its own. Before, every Codex image
58
+ attach left one such file behind for good. Only files the session's own transcript
59
+ names directly in Elwood's temp directory are removed; a Codex whose login shell sets
60
+ another `TMPDIR` keeps its copies there.
61
+ - A Codex session that cannot remove one of those copies now emits one
62
+ `image_copy_removal_failed` warning before `terminal:exit`. Its `errorCode` is the
63
+ first failure's errno token, or `UnknownError` when it has none. The copy is left
64
+ for the OS to reap. A copy that was already gone is not a failure.
65
+ - A CLI missing from the login shell's PATH is reported as `claude_not_found` or
66
+ `codex_not_found` even when the user's startup files define a not-found handler
67
+ (zsh's `command_not_found_handler`, bash's `command_not_found_handle`). The probe
68
+ ran the handler, so a handler that returned another status made a missing CLI
69
+ read as `*_start_failed`, and whatever it printed reached that error's
70
+ `details.stderr` or `agent_update_failed`'s `raw`. Probes now remove both
71
+ handlers before running the CLI.
72
+ - A probe whose command dies of a signal now reports the status a shell would,
73
+ 128 plus the signal's number, instead of no status. A login shell that dies
74
+ before starting the command is still a login-shell failure. `elwood interactive`'s
75
+ PATH lookup likewise now fails with "login shell exited with status 143" where it
76
+ said "status null".
77
+ - `*_start_failed` details and the `agent_update_failed` warning now carry a failed
78
+ probe's exit status as `exitStatus`, as the spec already said the warning would.
79
+ - `kill()`, `teardown()`, and a `stop()` that escalates now give the walk that reaps
80
+ detached hook processes ten seconds, up from three, before they reject with
81
+ `termination_failed` (`teardown_failed` from `teardown()`). On a loaded host, one
82
+ process-table read can take over half a second, and a hook that started a detached
83
+ child of its own takes six reads. So these calls rejected, and kept rejecting,
84
+ while the walk was still making progress. The ten seconds bound the walk, not the
85
+ whole call: `kill()` and `teardown()` also wait for the PTY to exit after their
86
+ SIGKILL, and a `stop()` that escalates waits out its graceful window first. On an
87
+ idle host they take as long as before, because the walk ends as soon as it is done.
88
+ - `stop()`, `kill()`, and `teardown()` during an in-flight image attach now remove
89
+ the attach's `elwood-image-*` temp directory before they resolve, even while its
90
+ image is still being written. Before, the attach removed it only after it unwound,
91
+ which could come after shutdown resolved, so a host that exited right away left
92
+ the directory in the OS temp dir. Removal stays best-effort: one that fails at
93
+ shutdown is retried when the attach unwinds.
94
+ - `elwood interactive` hands the agent the login shell's own PATH even when the
95
+ user's startup files define a `printf` function or alias. The PATH lookup ran
96
+ the login shell's `printf`, which such a function or alias replaced, so the
97
+ agent could get another PATH, or Elwood's own when nothing framed was printed.
98
+ - `teardown()`, `kill()`, or a `stop()` that escalates no longer end Codex's shared
99
+ app-server daemon, its updater loop, or what the daemon started, such as plugin
100
+ MCP servers. Codex 0.158+ can start the daemon for its `CODEX_HOME`, for every Codex
101
+ on that home, yours included, as a detached child of the TUI: when the session's
102
+ own TUI had started it, the walk that reaps detached hooks SIGKILLed it.
103
+ - A Claude session resumed under `autotrust` now reaches `ready` after Elwood answers
104
+ a startup trust gate, such as the bypass-permissions dialog when a resume adds
105
+ `highTrust` in a config that never accepted bypass mode. Before, it stayed
106
+ `running` after the gate cleared: the resumed transcript repaints the earlier
107
+ prompts as `❯ <prompt>`, and Elwood did not count the composer below them as
108
+ proof that the gate was gone.
109
+ - A Claude session whose permission dialog is declined with Escape now returns to
110
+ `ready`, as C-ATTN-02 requires, and releases queued input. Before, it stayed
111
+ `blocked` while the prompt that led to the dialog was still on screen: Claude
112
+ echoes each submitted prompt as `❯ <prompt>` in its transcript, and Elwood read
113
+ that caret as a dialog still in the way of the idle composer.
114
+ - Codex sessions now use the `CODEX_HOME` their login shell exports, not
115
+ Elwood's own. The launch script writes the exported `CODEX_HOME` and `HOME`, and
116
+ the directory it starts Codex in, to a private report just before `exec codex`,
117
+ and starts Codex only if that write succeeds. `listModels()` reads `isDefault`
118
+ from that home's `config.toml`, and `setModel` snapshots and restores that file.
119
+ Elwood used to read and restore `$CODEX_HOME` or `~/.codex` from its own
120
+ environment, which, when a profile moved the home, reported the wrong default and
121
+ restored a file Codex never touched while leaving the picker's change in the real
122
+ one. A relative `CODEX_HOME` or `HOME` resolves as Codex resolves it, from a
123
+ symlinked `cwd` too. A model operation that starts before the report is written
124
+ waits for it within its deadline, and a deadline that ends the wait names the
125
+ report in `details.path`. A report that cannot be read rejects with
126
+ `model_automation_failed`, and `setModel` rejects before it opens the picker. A
127
+ start whose report could not be written rejects with `codex_start_failed` and
128
+ `details.phase: "codex_home_report"`. `listCodexModels()` and `elwood models`
129
+ follow the same rule.
130
+ - A Claude session started with `highTrust` or `permissionMode: "bypassPermissions"`
131
+ now answers Claude 2.1.310's bypass-permissions acceptance dialog under
132
+ `autotrust`, as C-CLAUDE-21 requires. Claude 2.1.310 added a sandbox warning and a
133
+ security-guide link to the dialog, and Elwood did not recognize the longer copy,
134
+ so the session stayed `blocked` wherever the dialog renders: a Claude config that
135
+ has never accepted it and whose settings do not set
136
+ `skipDangerousModePermissionPrompt`.
137
+ - A session that ends without `teardown()` no longer leaves an empty
138
+ `elwood-<fingerprint>` directory in the OS temp dir. `stop()`, `kill()`, the
139
+ agent exiting on its own, and a failed start now remove the session's socket
140
+ home once the launch's own socket file is gone, unless another live launch of
141
+ the same session still has its socket there. The next start or resume
142
+ recreates the home. Previously every stopped or failed session kept its empty
143
+ home until it was torn down.
144
+ - A start or resume whose launch fails while its `cwd` is deleted and made again
145
+ now fails with the adapter's `*_start_failed` for that `cwd`, as it does when
146
+ `cwd` is simply gone. It used to find the new directory in its place and report
147
+ the launch's own failure instead.
148
+
149
+ - A resume that fails partway through launching, such as when its PTY can't be
150
+ spawned, no longer leaves its session's expired loops pruned from `loops.json`.
151
+ Resume removes expired loops before it starts the agent and again as it commits,
152
+ and both writes now belong to the launch's startup publication, which a failed
153
+ launch restores, as it already restored the session record. A prune the earlier
154
+ session made meanwhile, through `listLoops()` for instance, stays.
155
+ - Starting a session whose `cwd` was deleted no longer recreates it. The default
156
+ state directory lives under `cwd`, and creating it created every missing parent,
157
+ so a session for a deleted worktree started in a new, empty directory. A state
158
+ directory is now made only while `cwd` exists, and one at or under `cwd`, the
159
+ default `.elwood/` or your own `stateDir`, only below it, so such a start
160
+ rejects before spawning and the worktree stays gone, as does a `stateDir`
161
+ elsewhere. State writes no longer make missing parent directories either, so a
162
+ running session whose state directory was in its removed worktree fails its
163
+ later writes (a new loop rejects with `loop_persistence_failed`), and a resume
164
+ whose state directory is removed fails, instead of recreating either.
165
+ - `elwood run` no longer recreates a workspace removed between its validation
166
+ and the launch when `--state-dir` is inside it. The CLI made its state root
167
+ with every missing parent, the workspace included. It now makes the root only
168
+ while the workspace exists, and the launch fails with `claude_start_failed` or
169
+ `codex_start_failed`, with `details.cwd`, instead. A state root elsewhere, the
170
+ CLI's own or a library `stateDir`, that is made while the workspace is being
171
+ removed is removed again rather than left behind, unless another start has
172
+ put its session in it meanwhile; a directory that can't be removed shows as
173
+ `details.cleanupErrorCode`.
174
+ - Starting or resuming a session whose `cwd` does not exist now rejects with
175
+ `claude_start_failed` or `codex_start_failed`, with `details.cwd` and
176
+ `details.errno`, before any probe, state write, or spawn (resume reads and
177
+ validates its record first), instead of failing on a state write. A `cwd` that
178
+ is a file is rejected the same way, and so is one removed while the start's
179
+ version probes run, and a relative `cwd` that can't be resolved because the
180
+ process's own working directory was deleted. A launch that fails while `cwd`
181
+ is gone, no longer a directory, or can't be checked reports the same error and
182
+ keeps the launch failure's `cause` and cleanup details. A resumed Claude
183
+ session with a relative `cwd` now launches in the directory it checked, even
184
+ if the process working directory changes during the probes.
185
+ rejects before spawning (for now with `ENOENT`) and the worktree stays gone,
186
+ as does a `stateDir` elsewhere. State writes no longer make missing parent
187
+ directories either, so a running session whose state directory was in its
188
+ removed worktree fails its later writes (a new loop rejects with
189
+ `loop_persistence_failed`), and a resume whose state directory is removed
190
+ fails, instead of recreating either.
191
+ - Codex `listModels()` and `setModel` no longer freeze the process when
192
+ `config.toml` is a FIFO. Elwood read the file with a blocking read, so a FIFO
193
+ left in its place, by an agent that can write to its `CODEX_HOME`, blocked the
194
+ event loop and every session in the process until something wrote to it. Elwood
195
+ now opens the file without waiting, reads it only if it is a regular file of at
196
+ most 1 MiB, and rejects anything else with `model_automation_failed`
197
+ (`details.code` `EFTYPE`, `EISDIR`, or `EFBIG`). A `setModel` that cannot read
198
+ the config now rejects with `model_automation_failed` before it opens the picker,
199
+ and one that cannot reread it for the restore rejects the same way; both used to
200
+ reject with the raw file-system error.
201
+ - Elwood now recognizes Codex 0.164's folder-access and `Hooks need review` gates as
202
+ 0.164 draws them when hook trust is not bypassed: the folder gate's decline reads
203
+ `Back to Agent Command Center`, and the two gates end in `enter continue · esc back`
204
+ and `enter confirm · esc skip`. Before, both gates were held but never answered.
205
+ Each of these footers counts only under its own gate, so the same text under any
206
+ other dialog or in conversation text makes no frame a trust gate. Elwood's own
207
+ launches bypass hook trust, so they get the `Quit` / `enter continue · esc quit`
208
+ layout Elwood already handled.
209
+
210
+ - The CLI now refuses a workspace that another user could swap out before the
211
+ agent starts in it. It checked that the workspace was yours, then launched in
212
+ its path, so anyone able to write to a directory on that path, or to a
213
+ directory holding a symlink on it, could replace it with their own in between.
214
+ Every directory the path is looked up through must now be owned by you or root
215
+ and not writable by group or others unless it is sticky (your own private group
216
+ is fine, but not root's group 0), or the run fails with status 2 naming the
217
+ directory to fix. Workspaces under `/tmp` or the macOS temporary directories,
218
+ and home paths, are unaffected. Owners and mode bits only: ACLs are not
219
+ checked.
220
+
221
+ - Elwood now runs at most 8 login-shell probes (`--version`, `--help`, `update`,
222
+ and PATH lookups) at once in a process; more wait their turn, and a probe's time
223
+ bounds start when it runs. Each probe starts an interactive login shell, and with
224
+ a heavy shell profile many at once slowed every one of them.
225
+
226
+ - A `claude --version` or `codex --version` check that fails (it exits nonzero,
227
+ times out, or cannot start) no longer fails every later start of that adapter
228
+ in the process. Elwood kept the failed result and replayed it as the same
229
+ `claude_start_failed` or `codex_start_failed`; a later start now runs the
230
+ check again. Concurrent starts still share one check and its outcome.
231
+
232
+ - `teardown()`'s retry of a failed process-group reap now fails with the typed
233
+ `termination_failed`, as `stop()`'s and `kill()`'s retries already did. Before,
234
+ its raw system error made the retry an untyped step failure, so
235
+ `teardown_failed.details.failures` lost its errno and process-group id and the
236
+ CLI's cleanup diagnostic read only `Cleanup failed.` when no other step was
237
+ typed.
238
+
239
+ - `teardown_failed` now keeps what each failed step reported. Alongside
240
+ `details.causes` (the messages), `details.failures` lists each failed step,
241
+ with its `code` and `details` when it was a typed Elwood error, so a failed
242
+ reap's `termination_failed` errno is no longer lost. The CLI's cleanup
243
+ diagnostic names those typed causes by code, plus their valid errno and reap
244
+ errno tokens when present, for example `Cleanup failed (termination_failed
245
+ EPERM).`, instead of only `Cleanup failed.`; it still never prints their
246
+ messages or paths. In text mode, a cleanup failure behind a timeout,
247
+ interruption, or other primary failure now gets its own stderr line after the
248
+ primary error, in `run`, `models`, and combined `models`; before, text mode
249
+ printed only the primary error.
250
+
251
+ - A `stop()` or `kill()` whose termination fails now still cleans up the
252
+ session's runtime (its hook bridge and terminal renderer, and Codex's transcript
253
+ watcher). Before, a PTY that could not be signaled, did not exit, or could not be
254
+ reaped skipped that cleanup, and so did every retry while the reap kept failing,
255
+ until a `teardown()`. The call still rejects with the same `termination_failed`;
256
+ if cleanup fails as well, its message is in `details.cleanupError`. `close()`
257
+ keeps those messages too, as `cleanupError` and `killCleanupError`.
258
+
259
+ - Raw input a host sends from inside one of Elwood's own writes, such as from an
260
+ `xterm.onData` listener reacting to Elwood's keys, now revokes Elwood's
261
+ automation like any other raw input. Before, it counted as part of Elwood's
262
+ write, so a model-picker operation, composer cleanup, question answer, or
263
+ startup-prompt answer kept writing after the caller's keys.
264
+
265
+ - A Claude session's runtime cleanup now finishes its transcript watcher, as
266
+ Codex's already did. Before, only the Claude process's exit finished it, so
267
+ after a `stop()`, `kill()`, or `teardown()` that could not terminate the PTY,
268
+ the session kept polling the transcript and emitting its activity. Claude's
269
+ `transcript_poll_stopped` warning for a failed final flush now reads
270
+ "Transcript final flush failed after an unexpected error.", without "at exit",
271
+ since runtime cleanup can now run that flush while the PTY lives.
272
+
273
+ - Sessions start again for macOS users whose login shell is `/bin/bash` or
274
+ `/bin/sh`. macOS's bash 3.2, started as an interactive login shell, closes
275
+ every inherited descriptor above stderr, so the probe start line added for
276
+ slow profiles never arrived on descriptor 3. Every `--version`, `--help` and
277
+ `update` probe, and the CLI's agent detection, failed with `login shell
278
+ exited with status 0 before starting the probe command`
279
+ (`phase: "login_shell"`), even though the command had run. A shell that
280
+ closed descriptor 3 now writes the line on stdout, and Elwood removes it from
281
+ the captured output.
282
+ - Codex `setModel` and `listModels` calls on sessions that use different
283
+ `config.toml` files no longer wait on each other. The lock that keeps two switches
284
+ from interleaving their snapshot and restore was shared by every Codex session in
285
+ the process, so a slow switch in one home could use up another home's picker
286
+ deadline and fail it with `model_automation_failed`. Each config file, the one the
287
+ session's launch shell reported, now has its own lock, and paths that name the same
288
+ file through a symlink, another letter case, or another Unicode form share it, even
289
+ before Codex creates the file. On a case-sensitive volume, two configs whose paths
290
+ differ only in case share one lock too. A config path that cannot be resolved, such
291
+ as a symlink loop, rejects with `model_automation_failed`.
292
+ - A Codex `stop()` or `teardown()` that gives up waiting for the ended turn's record
293
+ now says so. When the 2-second wait runs out with Codex still running, the session
294
+ emits one content-free `turn_commit_wait_expired` warning, with its `activity`, before
295
+ signaling Codex, even when `stop()` and `teardown()` overlap. A host can then tell
296
+ that a resume may show that turn as interrupted.
297
+ - Stopping a Codex session as soon as a turn ends no longer cuts off Codex before it
298
+ records the turn. Codex records a turn as complete only after its `Stop` hook
299
+ returns, and Elwood reports `ready` from that hook, so a `stop()` or `teardown()`
300
+ called at that `ready`, or from a `Stop` hook observer, could end Codex before it
301
+ wrote the record. Resuming the conversation then showed "Conversation interrupted".
302
+ Both now give Codex up to 2 seconds to record the turn before signaling it, about
303
+ 100 ms in practice; past that bound they proceed and the turn can still be lost.
304
+ `kill()` still ends Codex at once.
305
+ - `listModels` and `setModel` now read each picker frame they wait for while
306
+ opening and moving through the picker as soon as it renders, rather than at the
307
+ next 100 ms poll. They return sooner and hold the session's
308
+ input queue for less time. The poll remains as a fallback when no render
309
+ notification arrives.
310
+
311
+ - A Codex session whose readiness falls back to the 60-second backstop now emits
312
+ an `initial_ready_backstop` warning, so a host can tell it from ordinary
313
+ readiness. The backstop releases readiness when Elwood never recognizes Codex's
314
+ configured composer (the model footer), for example after a layout change in a
315
+ new Codex release. Before, that readiness looked like any other.
316
+
317
+ - Removing a Codex transcript that Elwood was reading now emits
318
+ `transcript_read_error` with `lastErrorCode: "ENOENT"` on each poll while the
319
+ file is missing, and at the final flush if it is still gone, as a removed Claude
320
+ transcript already does. Elwood used to
321
+ read the missing file as an empty, truncated one and say nothing, so a host lost
322
+ the session's transcript activity without a warning. A transcript that has not
323
+ been created yet still waits silently.
324
+
325
+ - A Codex session no longer reports `ready` before a late directory-trust prompt
326
+ is answered. Codex paints an empty composer while it boots, before its session is
327
+ configured, and under load its trust prompt followed 11 to 31 seconds after the
328
+ first frame. Elwood's 10-second readiness deadline fired on that boot composer,
329
+ so the session reported `ready` before the prompt even appeared (24 of 32
330
+ loaded launches on Codex 0.164). The deadline now waits for the composer with
331
+ Codex's model footer, which appears once the session is configured, so a cold
332
+ start can now take longer than 10 seconds to report `ready`.
333
+ A backstop still releases readiness 60 seconds after the first frame if that
334
+ footer is never recognized; a prompt painted after that would still follow
335
+ `ready`.
336
+
337
+ - `autotrust` no longer sends "1" to Codex as a user message. On a loaded
338
+ machine Codex 0.164 can take the directory-trust answer (`1` + Enter) but
339
+ paint its composer more than 250 ms later, and Elwood's retry typed the answer
340
+ again into that composer, which submitted "1" as a turn to the model. The
341
+ number is now typed once. Codex retries are Enter alone while the gate's
342
+ caret is on the affirmative, which confirms the gate and does nothing on an
343
+ empty composer. Other numbered gates are answered again only after new output
344
+ still shows the gate.
345
+
346
+ - With `autotrust`, keys a caller sends with `sendKeys` (or `terminal.sendInput`,
347
+ `xterm.input`) while a trust prompt is on screen now hand that prompt to the
348
+ caller: Elwood stops answering it. Before, its retry could follow the caller's
349
+ keys. When the CLI had already left the prompt but Elwood's screen had not caught
350
+ up, that retry landed in the composer and submitted the caller's text along with
351
+ the answer. A prompt the caller owns that stays up past five seconds is reported
352
+ `blocked`, as before; a later trust prompt is answered as usual. The same keys
353
+ also stop Elwood retrying its skip choice on a Codex update prompt, which could
354
+ otherwise follow them onto whatever Codex drew next. Elwood then leaves that
355
+ update prompt to the caller until Codex shows its composer.
356
+
357
+ - A successful `listModels` or `setModel` no longer releases queued input on the
358
+ first frame without the picker. It now waits until no part of the picker has
359
+ been the bottom of the screen across five readings at least 40 ms apart. Before,
360
+ a blank or half-painted repaint could end the operation and let a queued
361
+ message's Enter land in the picker when it painted again, applying the
362
+ highlighted model. Picker text quoted above the composer does not hold the
363
+ operation. Each reading first renders all output the terminal has received, and
364
+ one that cannot fails the operation with `model_automation_failed` instead of
365
+ reporting success.
366
+ - A Codex turn the agent rejects, for example one run with an unknown model, now
367
+ fails with `turn_failed`. `CodexSession.send` rejects, `stream` throws after the
368
+ events it already yielded, and `elwood run` exits 1, as Claude rejections already
369
+ do. Codex fires no `Stop` hook for such a turn. On Codex 0.164.0, `send` resolved
370
+ `''` about 20 seconds later, as if the turn had succeeded with an empty reply, or
371
+ stayed pending until the CLI exited, and `elwood run` exited 0 with an empty
372
+ `response`. The evidence is the transcript's failed `task_complete` for the turn's own
373
+ `turn_id`. The error message is Codex's `error.message`, and
374
+ `details.agentError` is its `codex_error_info` kind (for example `other`).
375
+
376
+ - `autotrust` now reports an answered Claude folder-trust prompt. Claude erases
377
+ the dialog as soon as it is answered, then shows a blank or banner-only screen
378
+ until its composer paints. Elwood treated that screen as the answer being
379
+ lost, so the `startup_prompt` activity (`workspace_trust`, for example
380
+ `sent home+down+enter`) never fired: 0 of 30 real launches on Claude Code
381
+ 2.1.310 emitted it. The answer is now reported once, when the composer
382
+ appears. Codex 0.164 lost its directory-trust answers the same way (0 of 16
383
+ fresh git-folder launches reported one); they are now reported too.
384
+
385
+ - `kill()`, `teardown()`, and a `stop()` that has to escalate no longer leave a
386
+ CLI hook running after the session ends. Claude and Codex start every hook
387
+ command in its own session and process group, so killing the CLI's process
388
+ group missed a hook still in flight, such as a slow `SessionEnd` hook; it kept
389
+ running under PID 1. Before Elwood SIGKILLs a live CLI it now freezes it,
390
+ finds those descendants by parent pid, and kills their groups (a process whose
391
+ own parent already exited is under PID 1 and out of reach). That adds two
392
+ process-table reads to those paths, or four when such a hook exists, because
393
+ Elwood acts only on processes two consecutive reads show stopped; deeper
394
+ nesting, or a process forked as the CLI was frozen (Elwood stops its group
395
+ again), takes more reads within a three-second bound. Sessions shutting down
396
+ together share reads. If the walk cannot confirm every group stopped (including
397
+ when the CLI exits on its own first), the call still kills the CLI and then
398
+ rejects: `stop()` and `kill()` with `termination_failed` (with up to
399
+ 16 of the unconfirmed process-group ids in `details.unconfirmedProcessGroupIds`),
400
+ `teardown()` with `teardown_failed`, and later shutdown calls on that session
401
+ keep rejecting. The CLI's cleanup diagnostic names those ids too, for example
402
+ `Cleanup failed (termination_failed EAGAIN process groups 4242).` The walk also
403
+ reaps the shell Codex starts a few seconds after launch to snapshot the user's
404
+ shell environment, which a slow shell profile keeps running. A `stop()` that
405
+ Codex exits on gracefully is not walked, so a snapshot shell still running then
406
+ is left running.
407
+
408
+ - A failed start or resume (`startClaude`, `startCodex`, `resumeClaude`,
409
+ `resumeCodex`) whose cleanup could not confirm that the CLI's process group was
410
+ reaped now says so. The typed startup error keeps its code and
411
+ message and gains `details.cleanupErrorCode` (an allowlisted errno, else
412
+ `UnknownError`) and `details.cleanupProcessGroupId`, which is for diagnosis only and
413
+ must never be signaled. Before, that failure was dropped silently. When a PTY is not
414
+ confirmed terminated and its group reap fails too, `termination_failed` now also
415
+ carries the reap's errno as `details.reapErrno`, next to `details.reapError`.
416
+
417
+ - On Claude Code 2.1.310, `send` no longer returns an empty or truncated reply, and
418
+ `stream` no longer ends early, when a turn takes more than about two seconds to
419
+ produce text. A Claude session also stays `running` for the whole turn instead of
420
+ flipping to `ready` and back about once a second. Claude 2.1.310 alternates its
421
+ working window title between `◐` and `◑`, and Elwood read every `◑` frame as idle.
422
+ An ergonomic turn treated that false `ready` as the start of its 2-second quiet
423
+ window. Both half circles now mean working.
424
+
425
+ - A failed start or resume no longer signals a CLI that already exited during startup,
426
+ and no longer reaps its process group a second time. The leader's pid could already
427
+ belong to another process. Cleanup used to send that pid SIGTERM and then SIGKILL and
428
+ wait about six seconds for an exit that had already happened.
429
+
430
+ - Resuming a Codex 0.164.0 session no longer reports a phantom `running` → `ready`
431
+ turn shortly after readiness, which a host could show as a false unread reply.
432
+ Codex 0.164.0 first paints `Resuming session…` above its composer and then loads the
433
+ conversation under a working title spinner; Elwood counted the placeholder's repaints
434
+ as proof the replay had finished. It now waits for that load to end. When the replayed
435
+ conversation ends in `Conversation interrupted`, the false turn appeared twice.
436
+ - `stop()` and `kill()` reject with `termination_failed` when signaling the PTY itself
437
+ throws. They used to pass the raw system error through, whose own `code` (for example
438
+ `ESRCH`) read like an Elwood error name. The underlying message is kept as
439
+ `details.cause`, with `errno`, `syscall` and `path` when present.
440
+
441
+ - A slow login-shell profile no longer fails startup as `claude_start_failed` /
442
+ `codex_start_failed` ("`--version` failed", `ETIMEDOUT`). Preflight probes run
443
+ through the user's interactive login shell, and the fixed 15-second bound counted
444
+ loading that profile as the CLI's time. Under 16 concurrent headless runs on a
445
+ loaded machine the profile alone took 7–19 seconds, while the CLI answered in
446
+ milliseconds. The shell now has 60 seconds to load the profile, and the CLI still
447
+ has 15 seconds from then. A shell that never starts the probe, by timing out or by
448
+ exiting first, fails with a cause naming the login shell and `details.phase:
449
+ "login_shell"`; for `autoupdate` the `agent_update_failed` warning carries
450
+ `errorCode: "login_shell_failed"`. The profile's own startup output is left out of
451
+ both, since it can contain expanded secrets. A contender waiting on another process's update
452
+ now waits up to 165 seconds instead of 60, so it does not give up and re-read the
453
+ version while the owner's version and update probes are still within their bounds.
454
+
455
+ - `autotrust` no longer reports a Claude folder-trust prompt that it has
456
+ already answered as needing attention. Claude erases the dialog at once but
457
+ can take several seconds to paint its composer, longer under load. Elwood
458
+ counted that wait against the prompt's five-second limit, so the session
459
+ briefly went `blocked` with `claude-workspace_trust-prompt` attention while no
460
+ prompt was on screen. That happened in 17 of the 27 launches that reached
461
+ `ready` (out of 30 started, 10 at a time in fresh folders) on Claude Code
462
+ 2.1.310. Headless `elwood run` killed those sessions
463
+ and failed with `blocked_prompt` (5 of 7 concurrent fresh-folder runs). The
464
+ limit now counts only time the prompt is on screen. Queued input is still
465
+ held until Claude's composer appears.
466
+
467
+ - A fresh Claude session no longer emits `transcript_read_error` (`ENOENT`) while it waits
468
+ for its first turn. Claude names its transcript at startup but writes the file only once
469
+ a turn begins, and Elwood had reported each poll of the missing file as a read error.
470
+ Removing a transcript after it existed still warns, as does any other read failure.
471
+ - A Claude transcript removed between a poll's size check and its read now warns
472
+ `transcript_read_error` (`ENOENT`) on that poll. Before, the read took the missing file
473
+ for a truncation: it skipped the warning and rewound to the start, so a file restored
474
+ before the next poll replayed its earlier records as new activity. The same warning
475
+ now covers a seen transcript that is missing when a stopped subagent's transcript is
476
+ drained, at the final flush, and at a `Stop`-first tail recovery, which each read it
477
+ as empty before. A transcript that was never created still reads as nothing.
478
+ - `listModels` and `setModel` no longer send a picker key into a prompt that has
479
+ reached the terminal but has not rendered yet. Each arrow, selecting key, follow-up
480
+ answer and Escape is now decided after every received byte is rendered, like
481
+ queued input and failure cleanup already were. If the screen cannot be verified,
482
+ the key is withheld and the operation fails with `model_automation_failed`.
483
+ Before, an arrow chosen from the stale picker frame could move a permission or
484
+ question prompt's selection.
485
+
486
+ - A Claude turn that Claude itself rejects, such as one sent with a model that does not
487
+ exist, now fails with the new `turn_failed` error instead of passing as a successful
488
+ reply. `ClaudeSession.send` rejects and `stream` throws after its collected events;
489
+ `error.details.agentError` carries Claude's error name (for example `model_not_found`).
490
+ `elwood run` exits 1 with a `turn_failed` error record where it used to exit 0 and
491
+ print Claude's error text as the response. A late rejection whose `prompt_id` names an
492
+ earlier submission than the current turn's does not fail the current turn. When either
493
+ hook lacks a `prompt_id`, a rejection that arrives during a turn is attributed to that
494
+ turn.
495
+
496
+ - A failed model operation no longer releases queued input on a blank or half-painted
497
+ frame left after its cleanup. Elwood never sends a key, Escape included, to a picker
498
+ that has not finished painting or to a bare `Select model` header, which agent output
499
+ can print; failure cleanup cancels the dialog once it is recognizable. Until the
500
+ composer is positively clear, queued input stays held, because Enter on a repainting
501
+ picker applies its highlighted model.
502
+
503
+ - Claude `listModels`, `listClaudeModels` and `setModel` work on accounts whose model
504
+ list is longer than the picker's ten-row window, and on any row whose effort control
505
+ is Medium, High or Max. Elwood now recognizes the scrolled picker (`↑`/`↓` rows,
506
+ `… +K models`) and every measured effort glyph, and follows the cursor across a
507
+ scrolling window. `listModels` also returns the `↓`-marked last visible row, with the
508
+ marker kept in its `raw`.
509
+ - Claude `listModels()` and `listClaudeModels()` return every model the `/model`
510
+ picker lists, not just its ten-row window: an account with 13 models now gets 13
511
+ rows, in picker order. Elwood reveals the hidden rows with arrow keys and then
512
+ cancels, so the model and effort are unchanged. `setModel` can select any listed
513
+ row, including one outside the window, walking only until that row is on screen,
514
+ and an unknown id's error lists every row. The list's length is the highest
515
+ rendered row plus the `… +K models` count, and `K` falls as the window scrolls
516
+ while that sum stays the same. A frame that marks rows hidden without a count, or
517
+ implies a different length from the first one read, is never acted on: Elwood waits
518
+ for a repaint that matches, and fails with `model_automation_failed` at the timeout
519
+ rather than returning part of the list. A frame with no count line is read as the
520
+ whole list; Claude 2.1.310 paints that line before the dialog's footer, so a complete
521
+ dialog always carries it.
522
+ - `listModels` and `listClaudeModels` no longer return a partial catalog read while
523
+ the picker was still painting. Claude draws it over the slash-command menu, so a
524
+ probe could return only `default`, or fail with "Could not parse any model picker
525
+ rows". The picker is parsed only once the complete dialog is on screen.
526
+
527
+ - Codex `setModel` works on Codex 0.164.0, whose model picker closes with an
528
+ `enter select · esc back` hint and whose reasoning screen closes with
529
+ `enter default · s session · esc back`. It failed on its first key with "The model
530
+ picker was replaced".
531
+
532
+ - Queued input stays held on a model dialog until the composer is positively
533
+ clear. A dialog that survived a failed model operation's cleanup could be
534
+ forgotten after five frames that neither grammar recognized, such as a blank
535
+ or half-painted repaint. Any hold could also be cleared by five readings
536
+ taken in the same instant. Either way, a queued message could be typed into
537
+ the picker, where Enter applies the highlighted model.
538
+
539
+ - `autotrust` no longer makes Claude exit at its folder-trust prompt. Claude
540
+ Code resets that dialog's selection to "No, exit" a moment after it opens, so
541
+ under load Elwood's Enter could land on "No, exit" and the CLI exited with
542
+ code 1 (7 of 60 fresh-folder launches on 2.1.310). Elwood now selects
543
+ Claude's trust options by absolute position (Home, then Down) and sends Enter
544
+ in the same write as that selection, so a reset, a delayed key, or a retried
545
+ key can no longer confirm another option. The `startup_prompt` input text for
546
+ cursor-layout prompts now names the absolute sequence (`home+enter`, or
547
+ `home+` then one `down+` per row above the affirmative, then `enter`) instead
548
+ of a cursor-relative label such as `enter`, `up+enter`, or `down+enter`.
549
+
550
+ - Codex `listModels()` and `listCodexModels()` no longer report the session's
551
+ current model as the configured default. Codex 0.164 marks only the current
552
+ row, so `isDefault` now follows `config.toml`: the `model` of the profile the
553
+ root `profile` key selects, else the root `model`. A session launched or
554
+ switched onto another model keeps the configured row as its default, and a
555
+ config that names no model reports no default. A `config.toml` that exists but
556
+ cannot be read rejects the listing with `model_automation_failed`. Listings and
557
+ `setModel` restores keep using the `config.toml` path captured at session
558
+ launch, even if `CODEX_HOME` changes later.
559
+
560
+ - Claude questions are raised again on Claude Code 2.1.310 and in named
561
+ sessions (`name`). 2.1.310 pads the single-question header chip with a
562
+ trailing space, and a named session draws its label into the border below the
563
+ questionnaire; either one left the native dialog on screen without raising
564
+ the question.
565
+
566
+ - Named Claude sessions (`name`) recognize their composer again. Claude insets
567
+ the name into the composer's top rule, which kept trust clearance and
568
+ empty-input checks from matching: a named session in an untrusted folder
569
+ stayed `blocked` after autotrust answered the trust prompt.
570
+
571
+ - Claude sessions recognize their idle composer in every permission mode after
572
+ the version banner has scrolled away. Elwood accepted only the exact footers
573
+ captured earlier (auto mode and don't ask on 2.1.278, manual mode on 2.1.305).
574
+ On Claude Code 2.1.310 it missed bypass permissions, accept edits and plan mode,
575
+ footers that end in a token count or effort level, and footers that have
576
+ dropped the `← for agents` hint. In a long session, trust clearance, the
577
+ model-picker hold and empty-input checks then never saw the idle composer.
578
+
579
+ ## [0.2.1] - 2026-10-24
580
+
581
+ - Reduce median active Elwood CPU by 11.3% in the measured 50-session workload
582
+ by sharing completed-frame text, preserving fresh public snapshots and direct
583
+ xterm writes.
584
+
15
585
  ## [0.2.0] - 2026-10-22
16
586
 
17
587
  - Codex question turns settle after native completion even when consecutive answer echoes contain caret-like multiline text.
@@ -292,7 +862,7 @@ back each entry are listed in `prd/14-conformance.md`.
292
862
  records those even when its signal did not take. The wait now applies whether the
293
863
  switch succeeded or failed: the question is whether the dying CLI can still write
294
864
  `config.toml`, not whether Elwood's automation worked.
295
- - A Codex `setModel` still waiting for the process-wide `config.toml` lock rejects
865
+ - A Codex `setModel` still waiting for its `config.toml` lock rejects
296
866
  with `session_not_running` as soon as its own session closes, instead of staying
297
867
  pending until the session ahead of it finishes its transaction and exit wait. A
298
868
  cancelled call never runs its switch when the lock frees.
package/CONTRIBUTING.md CHANGED
@@ -21,6 +21,9 @@ The instructions below are for maintainers. This project is spec-first:
21
21
 
22
22
  ## Setup and checks
23
23
 
24
+ For source-checkout Git hooks and repository secret-scanning exceptions, see the
25
+ [maintainer guide](https://github.com/with-logic/elwood/blob/main/.github/secret-scanning.md).
26
+
24
27
  ```sh
25
28
  npm install
26
29
  npm run check
package/README.md CHANGED
@@ -122,8 +122,10 @@ elwood --resume <sessionId> "What is the release color?"
122
122
 
123
123
  When nothing selects an agent, Elwood tries `claude` and then `codex` in your
124
124
  login shell and uses the first that resolves; if neither does, the run fails
125
- with `no_agent_found`. See [docs/cli.md](docs/cli.md) for configuration,
126
- output protocols, head mode, and continuation.
125
+ with `no_agent_found`. Detection runs from the effective workspace, so
126
+ `-C`/`--cwd` changes where the shell looks for those commands. See
127
+ [docs/cli.md](docs/cli.md) for configuration, output protocols, head mode, and
128
+ continuation.
127
129
 
128
130
  ## Core concepts
129
131
 
@@ -549,6 +551,8 @@ immediate; both are safe after the process has already exited.
549
551
  size, and persisting/resuming.
550
552
  - [docs/embedding.md](docs/embedding.md): wiring a session into a host
551
553
  application (Electron and similar).
554
+ - [docs/performance.md](docs/performance.md): fifty-session measurements, headless
555
+ history budgets, and terminal-engine assessment.
552
556
  - [docs/loops.md](docs/loops.md): recurring prompts and `/loop` parsing.
553
557
  - [docs/images.md](docs/images.md): attaching images to a turn.
554
558
  - [docs/login-recovery.md](docs/login-recovery.md): detecting and recovering an
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Releases a launch's socket when its hook bridge stops (PRD §8.1): the bridge unlinks
3
+ * its socket file, and the session's socket home goes too once no other launch's socket
4
+ * is in it. Wraps each adapter's bridge factory seam, so every bridge a launch builds,
5
+ * including a test's, releases its socket on `stop`, `kill`, the agent exiting, and a
6
+ * failed start.
7
+ */
8
+ type Bridge = {
9
+ readonly start: () => Promise<void>;
10
+ readonly stop: () => Promise<void>;
11
+ };
12
+ /** `factory`, with each bridge's successful `stop()` followed by its socket's release. */
13
+ export declare function releasingSocketOnStop<Rest extends readonly unknown[]>(factory: (socketPath: string, ...rest: Rest) => Bridge): (socketPath: string, ...rest: Rest) => Bridge;
14
+ export {};
15
+ //# sourceMappingURL=socket-release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"socket-release.d.ts","sourceRoot":"","sources":["../../src/bridge/socket-release.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,KAAK,MAAM,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC;AAE1F,0FAA0F;AAC1F,wBAAgB,qBAAqB,CAAC,IAAI,SAAS,SAAS,OAAO,EAAE,EACnE,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,GACrD,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,CAW/C"}