@with-logic/elwood 0.1.0 → 0.1.1

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 (673) hide show
  1. package/CHANGELOG.md +166 -1
  2. package/LICENSE +1 -1
  3. package/README.md +276 -13
  4. package/dist/claude/command.d.ts +9 -2
  5. package/dist/claude/command.d.ts.map +1 -1
  6. package/dist/claude/command.js +23 -16
  7. package/dist/claude/command.js.map +1 -1
  8. package/dist/claude/session/index.d.ts.map +1 -1
  9. package/dist/claude/session/index.js +5 -2
  10. package/dist/claude/session/index.js.map +1 -1
  11. package/dist/claude/session/resume.d.ts +1 -1
  12. package/dist/claude/session/resume.d.ts.map +1 -1
  13. package/dist/claude/session/resume.js +5 -1
  14. package/dist/claude/session/resume.js.map +1 -1
  15. package/dist/claude/simple.d.ts.map +1 -1
  16. package/dist/claude/simple.js +4 -0
  17. package/dist/claude/simple.js.map +1 -1
  18. package/dist/cli/args/index.d.ts +3 -1
  19. package/dist/cli/args/index.d.ts.map +1 -1
  20. package/dist/cli/args/index.js +10 -2
  21. package/dist/cli/args/index.js.map +1 -1
  22. package/dist/cli/args/options.d.ts.map +1 -1
  23. package/dist/cli/args/options.js +2 -0
  24. package/dist/cli/args/options.js.map +1 -1
  25. package/dist/cli/args-commands.d.ts +10 -0
  26. package/dist/cli/args-commands.d.ts.map +1 -0
  27. package/dist/cli/args-commands.js +113 -0
  28. package/dist/cli/args-commands.js.map +1 -0
  29. package/dist/cli/command-types.d.ts +26 -0
  30. package/dist/cli/command-types.d.ts.map +1 -0
  31. package/dist/cli/command-types.js +9 -0
  32. package/dist/cli/command-types.js.map +1 -0
  33. package/dist/cli/config/codec-primitives.d.ts +20 -0
  34. package/dist/cli/config/codec-primitives.d.ts.map +1 -0
  35. package/dist/cli/config/codec-primitives.js +51 -0
  36. package/dist/cli/config/codec-primitives.js.map +1 -0
  37. package/dist/cli/config/codec.d.ts.map +1 -1
  38. package/dist/cli/config/codec.js +4 -46
  39. package/dist/cli/config/codec.js.map +1 -1
  40. package/dist/cli/config/effective.d.ts.map +1 -1
  41. package/dist/cli/config/effective.js +1 -0
  42. package/dist/cli/config/effective.js.map +1 -1
  43. package/dist/cli/config/keys.d.ts +1 -1
  44. package/dist/cli/config/keys.d.ts.map +1 -1
  45. package/dist/cli/config/keys.js +1 -0
  46. package/dist/cli/config/keys.js.map +1 -1
  47. package/dist/cli/entry.d.ts +4 -2
  48. package/dist/cli/entry.d.ts.map +1 -1
  49. package/dist/cli/entry.js +2 -1
  50. package/dist/cli/entry.js.map +1 -1
  51. package/dist/cli/help.d.ts +2 -2
  52. package/dist/cli/help.d.ts.map +1 -1
  53. package/dist/cli/help.js +40 -1
  54. package/dist/cli/help.js.map +1 -1
  55. package/dist/cli/interactive/index.d.ts +26 -0
  56. package/dist/cli/interactive/index.d.ts.map +1 -0
  57. package/dist/cli/interactive/index.js +33 -0
  58. package/dist/cli/interactive/index.js.map +1 -0
  59. package/dist/cli/interactive/launch.d.ts +14 -0
  60. package/dist/cli/interactive/launch.d.ts.map +1 -0
  61. package/dist/cli/interactive/launch.js +66 -0
  62. package/dist/cli/interactive/launch.js.map +1 -0
  63. package/dist/cli/interactive/spawn.d.ts +18 -0
  64. package/dist/cli/interactive/spawn.d.ts.map +1 -0
  65. package/dist/cli/interactive/spawn.js +32 -0
  66. package/dist/cli/interactive/spawn.js.map +1 -0
  67. package/dist/cli/main-failure.d.ts +28 -0
  68. package/dist/cli/main-failure.d.ts.map +1 -0
  69. package/dist/cli/main-failure.js +78 -0
  70. package/dist/cli/main-failure.js.map +1 -0
  71. package/dist/cli/main.d.ts +12 -4
  72. package/dist/cli/main.d.ts.map +1 -1
  73. package/dist/cli/main.js +27 -73
  74. package/dist/cli/main.js.map +1 -1
  75. package/dist/cli/models/index.d.ts +20 -0
  76. package/dist/cli/models/index.d.ts.map +1 -0
  77. package/dist/cli/models/index.js +60 -0
  78. package/dist/cli/models/index.js.map +1 -0
  79. package/dist/cli/models/render.d.ts +9 -0
  80. package/dist/cli/models/render.d.ts.map +1 -0
  81. package/dist/cli/models/render.js +33 -0
  82. package/dist/cli/models/render.js.map +1 -0
  83. package/dist/cli/request/index.d.ts.map +1 -1
  84. package/dist/cli/request/index.js +8 -2
  85. package/dist/cli/request/index.js.map +1 -1
  86. package/dist/cli/request/posture.d.ts +28 -0
  87. package/dist/cli/request/posture.d.ts.map +1 -0
  88. package/dist/cli/request/posture.js +70 -0
  89. package/dist/cli/request/posture.js.map +1 -0
  90. package/dist/cli/request/resolution-types.d.ts +1 -0
  91. package/dist/cli/request/resolution-types.d.ts.map +1 -1
  92. package/dist/cli/request/settings.d.ts +2 -12
  93. package/dist/cli/request/settings.d.ts.map +1 -1
  94. package/dist/cli/request/settings.js +2 -25
  95. package/dist/cli/request/settings.js.map +1 -1
  96. package/dist/cli/request/validation.d.ts +12 -0
  97. package/dist/cli/request/validation.d.ts.map +1 -1
  98. package/dist/cli/request/validation.js +30 -10
  99. package/dist/cli/request/validation.js.map +1 -1
  100. package/dist/cli/request/values.d.ts +1 -0
  101. package/dist/cli/request/values.d.ts.map +1 -1
  102. package/dist/cli/request/values.js +1 -0
  103. package/dist/cli/request/values.js.map +1 -1
  104. package/dist/cli/run/index.d.ts.map +1 -1
  105. package/dist/cli/run/index.js +5 -41
  106. package/dist/cli/run/index.js.map +1 -1
  107. package/dist/cli/run/subscribe.d.ts +19 -0
  108. package/dist/cli/run/subscribe.d.ts.map +1 -0
  109. package/dist/cli/run/subscribe.js +47 -0
  110. package/dist/cli/run/subscribe.js.map +1 -0
  111. package/dist/cli/session/launch.d.ts +3 -0
  112. package/dist/cli/session/launch.d.ts.map +1 -1
  113. package/dist/cli/session/launch.js +11 -0
  114. package/dist/cli/session/launch.js.map +1 -1
  115. package/dist/cli/sessions/index.d.ts +23 -0
  116. package/dist/cli/sessions/index.d.ts.map +1 -0
  117. package/dist/cli/sessions/index.js +65 -0
  118. package/dist/cli/sessions/index.js.map +1 -0
  119. package/dist/cli/sessions/list.d.ts +28 -0
  120. package/dist/cli/sessions/list.d.ts.map +1 -0
  121. package/dist/cli/sessions/list.js +63 -0
  122. package/dist/cli/sessions/list.js.map +1 -0
  123. package/dist/cli/table.d.ts +7 -0
  124. package/dist/cli/table.d.ts.map +1 -0
  125. package/dist/cli/table.js +14 -0
  126. package/dist/cli/table.js.map +1 -0
  127. package/dist/cli/types.d.ts +5 -1
  128. package/dist/cli/types.d.ts.map +1 -1
  129. package/dist/cli/types.js.map +1 -1
  130. package/dist/codex/command.d.ts +18 -2
  131. package/dist/codex/command.d.ts.map +1 -1
  132. package/dist/codex/command.js +39 -24
  133. package/dist/codex/command.js.map +1 -1
  134. package/dist/codex/session/index.d.ts.map +1 -1
  135. package/dist/codex/session/index.js +5 -2
  136. package/dist/codex/session/index.js.map +1 -1
  137. package/dist/codex/session/resume.d.ts +1 -1
  138. package/dist/codex/session/resume.d.ts.map +1 -1
  139. package/dist/codex/session/resume.js +5 -1
  140. package/dist/codex/session/resume.js.map +1 -1
  141. package/dist/codex/session/types.d.ts +3 -0
  142. package/dist/codex/session/types.d.ts.map +1 -1
  143. package/dist/codex/simple.d.ts.map +1 -1
  144. package/dist/codex/simple.js +4 -0
  145. package/dist/codex/simple.js.map +1 -1
  146. package/dist/core/errors.d.ts +1 -1
  147. package/dist/core/errors.d.ts.map +1 -1
  148. package/dist/core/errors.js.map +1 -1
  149. package/dist/core/high-trust.d.ts +41 -0
  150. package/dist/core/high-trust.d.ts.map +1 -0
  151. package/dist/core/high-trust.js +50 -0
  152. package/dist/core/high-trust.js.map +1 -0
  153. package/dist/core/trust/allowlist.d.ts +56 -0
  154. package/dist/core/trust/allowlist.d.ts.map +1 -0
  155. package/dist/core/{trust-prompts.js → trust/allowlist.js} +21 -38
  156. package/dist/core/trust/allowlist.js.map +1 -0
  157. package/dist/core/trust/prompts.d.ts +4 -46
  158. package/dist/core/trust/prompts.d.ts.map +1 -1
  159. package/dist/core/trust/prompts.js +2 -73
  160. package/dist/core/trust/prompts.js.map +1 -1
  161. package/dist/core/trust/responder.d.ts +2 -0
  162. package/dist/core/trust/responder.d.ts.map +1 -1
  163. package/dist/core/trust/responder.js +4 -0
  164. package/dist/core/trust/responder.js.map +1 -1
  165. package/dist/core/types.d.ts +3 -0
  166. package/dist/core/types.d.ts.map +1 -1
  167. package/dist/runtime/launch-arguments.d.ts +12 -0
  168. package/dist/runtime/launch-arguments.d.ts.map +1 -0
  169. package/dist/runtime/launch-arguments.js +15 -0
  170. package/dist/runtime/launch-arguments.js.map +1 -0
  171. package/docs/cli-behavior.md +88 -0
  172. package/docs/cli-output.md +60 -0
  173. package/docs/cli.md +10 -2
  174. package/package.json +8 -6
  175. package/dist/claude/hook-dispatch.d.ts +0 -9
  176. package/dist/claude/hook-dispatch.d.ts.map +0 -1
  177. package/dist/claude/hook-dispatch.js +0 -12
  178. package/dist/claude/hook-dispatch.js.map +0 -1
  179. package/dist/claude/hook-events-extra.d.ts +0 -81
  180. package/dist/claude/hook-events-extra.d.ts.map +0 -1
  181. package/dist/claude/hook-events-extra.js +0 -6
  182. package/dist/claude/hook-events-extra.js.map +0 -1
  183. package/dist/claude/hook-events.d.ts +0 -101
  184. package/dist/claude/hook-events.d.ts.map +0 -1
  185. package/dist/claude/hook-events.js +0 -6
  186. package/dist/claude/hook-events.js.map +0 -1
  187. package/dist/claude/hook-names.d.ts +0 -24
  188. package/dist/claude/hook-names.d.ts.map +0 -1
  189. package/dist/claude/hook-names.js +0 -45
  190. package/dist/claude/hook-names.js.map +0 -1
  191. package/dist/claude/hooks.d.ts +0 -78
  192. package/dist/claude/hooks.d.ts.map +0 -1
  193. package/dist/claude/hooks.js +0 -6
  194. package/dist/claude/hooks.js.map +0 -1
  195. package/dist/claude/session-bridge.d.ts +0 -11
  196. package/dist/claude/session-bridge.d.ts.map +0 -1
  197. package/dist/claude/session-bridge.js +0 -18
  198. package/dist/claude/session-bridge.js.map +0 -1
  199. package/dist/claude/session-build.d.ts +0 -15
  200. package/dist/claude/session-build.d.ts.map +0 -1
  201. package/dist/claude/session-build.js +0 -147
  202. package/dist/claude/session-build.js.map +0 -1
  203. package/dist/claude/session-hook-handler.d.ts +0 -34
  204. package/dist/claude/session-hook-handler.d.ts.map +0 -1
  205. package/dist/claude/session-hook-handler.js +0 -42
  206. package/dist/claude/session-hook-handler.js.map +0 -1
  207. package/dist/claude/session-instance.d.ts +0 -42
  208. package/dist/claude/session-instance.d.ts.map +0 -1
  209. package/dist/claude/session-instance.js +0 -146
  210. package/dist/claude/session-instance.js.map +0 -1
  211. package/dist/claude/session-interface.d.ts +0 -49
  212. package/dist/claude/session-interface.d.ts.map +0 -1
  213. package/dist/claude/session-interface.js +0 -10
  214. package/dist/claude/session-interface.js.map +0 -1
  215. package/dist/claude/session-resume.d.ts +0 -8
  216. package/dist/claude/session-resume.d.ts.map +0 -1
  217. package/dist/claude/session-resume.js +0 -47
  218. package/dist/claude/session-resume.js.map +0 -1
  219. package/dist/claude/session-runtime.d.ts +0 -43
  220. package/dist/claude/session-runtime.d.ts.map +0 -1
  221. package/dist/claude/session-runtime.js +0 -105
  222. package/dist/claude/session-runtime.js.map +0 -1
  223. package/dist/claude/session-transcript.d.ts +0 -62
  224. package/dist/claude/session-transcript.d.ts.map +0 -1
  225. package/dist/claude/session-transcript.js +0 -88
  226. package/dist/claude/session-transcript.js.map +0 -1
  227. package/dist/claude/session.d.ts +0 -18
  228. package/dist/claude/session.d.ts.map +0 -1
  229. package/dist/claude/session.js +0 -58
  230. package/dist/claude/session.js.map +0 -1
  231. package/dist/claude/start-or-resume.d.ts +0 -12
  232. package/dist/claude/start-or-resume.d.ts.map +0 -1
  233. package/dist/claude/start-or-resume.js +0 -32
  234. package/dist/claude/start-or-resume.js.map +0 -1
  235. package/dist/claude/tool-hook-events.d.ts +0 -10
  236. package/dist/claude/tool-hook-events.d.ts.map +0 -1
  237. package/dist/claude/tool-hook-events.js +0 -18
  238. package/dist/claude/tool-hook-events.js.map +0 -1
  239. package/dist/claude/tool-types.d.ts +0 -158
  240. package/dist/claude/tool-types.d.ts.map +0 -1
  241. package/dist/claude/tool-types.js +0 -6
  242. package/dist/claude/tool-types.js.map +0 -1
  243. package/dist/claude/validate-input.d.ts +0 -8
  244. package/dist/claude/validate-input.d.ts.map +0 -1
  245. package/dist/claude/validate-input.js +0 -137
  246. package/dist/claude/validate-input.js.map +0 -1
  247. package/dist/claude/validate-permission-update.d.ts +0 -10
  248. package/dist/claude/validate-permission-update.d.ts.map +0 -1
  249. package/dist/claude/validate-permission-update.js +0 -72
  250. package/dist/claude/validate-permission-update.js.map +0 -1
  251. package/dist/claude/validate-result.d.ts +0 -7
  252. package/dist/claude/validate-result.d.ts.map +0 -1
  253. package/dist/claude/validate-result.js +0 -118
  254. package/dist/claude/validate-result.js.map +0 -1
  255. package/dist/claude/validate-shapes.d.ts +0 -22
  256. package/dist/claude/validate-shapes.d.ts.map +0 -1
  257. package/dist/claude/validate-shapes.js +0 -15
  258. package/dist/claude/validate-shapes.js.map +0 -1
  259. package/dist/claude/validate-tool-update.d.ts +0 -15
  260. package/dist/claude/validate-tool-update.d.ts.map +0 -1
  261. package/dist/claude/validate-tool-update.js +0 -122
  262. package/dist/claude/validate-tool-update.js.map +0 -1
  263. package/dist/cli/agent-detect.d.ts +0 -44
  264. package/dist/cli/agent-detect.d.ts.map +0 -1
  265. package/dist/cli/agent-detect.js +0 -66
  266. package/dist/cli/agent-detect.js.map +0 -1
  267. package/dist/cli/arg-errors.d.ts +0 -6
  268. package/dist/cli/arg-errors.d.ts.map +0 -1
  269. package/dist/cli/arg-errors.js +0 -44
  270. package/dist/cli/arg-errors.js.map +0 -1
  271. package/dist/cli/arg-options.d.ts +0 -26
  272. package/dist/cli/arg-options.d.ts.map +0 -1
  273. package/dist/cli/arg-options.js +0 -50
  274. package/dist/cli/arg-options.js.map +0 -1
  275. package/dist/cli/args.d.ts +0 -7
  276. package/dist/cli/args.d.ts.map +0 -1
  277. package/dist/cli/args.js +0 -70
  278. package/dist/cli/args.js.map +0 -1
  279. package/dist/cli/lifecycle-outcome.d.ts +0 -13
  280. package/dist/cli/lifecycle-outcome.d.ts.map +0 -1
  281. package/dist/cli/lifecycle-outcome.js +0 -20
  282. package/dist/cli/lifecycle-outcome.js.map +0 -1
  283. package/dist/cli/lifecycle.d.ts +0 -61
  284. package/dist/cli/lifecycle.d.ts.map +0 -1
  285. package/dist/cli/lifecycle.js +0 -152
  286. package/dist/cli/lifecycle.js.map +0 -1
  287. package/dist/cli/request-finalize.d.ts +0 -10
  288. package/dist/cli/request-finalize.d.ts.map +0 -1
  289. package/dist/cli/request-finalize.js +0 -135
  290. package/dist/cli/request-finalize.js.map +0 -1
  291. package/dist/cli/request-layers.d.ts +0 -30
  292. package/dist/cli/request-layers.d.ts.map +0 -1
  293. package/dist/cli/request-layers.js +0 -44
  294. package/dist/cli/request-layers.js.map +0 -1
  295. package/dist/cli/request-settings.d.ts +0 -34
  296. package/dist/cli/request-settings.d.ts.map +0 -1
  297. package/dist/cli/request-settings.js +0 -66
  298. package/dist/cli/request-settings.js.map +0 -1
  299. package/dist/cli/request-sources.d.ts +0 -13
  300. package/dist/cli/request-sources.d.ts.map +0 -1
  301. package/dist/cli/request-sources.js +0 -23
  302. package/dist/cli/request-sources.js.map +0 -1
  303. package/dist/cli/request-validation.d.ts +0 -18
  304. package/dist/cli/request-validation.d.ts.map +0 -1
  305. package/dist/cli/request-validation.js +0 -84
  306. package/dist/cli/request-validation.js.map +0 -1
  307. package/dist/cli/request-values.d.ts +0 -33
  308. package/dist/cli/request-values.d.ts.map +0 -1
  309. package/dist/cli/request-values.js +0 -73
  310. package/dist/cli/request-values.js.map +0 -1
  311. package/dist/cli/request.d.ts +0 -12
  312. package/dist/cli/request.d.ts.map +0 -1
  313. package/dist/cli/request.js +0 -103
  314. package/dist/cli/request.js.map +0 -1
  315. package/dist/cli/resolution-types.d.ts +0 -35
  316. package/dist/cli/resolution-types.d.ts.map +0 -1
  317. package/dist/cli/resolution-types.js +0 -6
  318. package/dist/cli/resolution-types.js.map +0 -1
  319. package/dist/cli/run-output-lines.d.ts +0 -14
  320. package/dist/cli/run-output-lines.d.ts.map +0 -1
  321. package/dist/cli/run-output-lines.js +0 -42
  322. package/dist/cli/run-output-lines.js.map +0 -1
  323. package/dist/cli/run-output.d.ts +0 -48
  324. package/dist/cli/run-output.d.ts.map +0 -1
  325. package/dist/cli/run-output.js +0 -150
  326. package/dist/cli/run-output.js.map +0 -1
  327. package/dist/cli/run.d.ts +0 -20
  328. package/dist/cli/run.d.ts.map +0 -1
  329. package/dist/cli/run.js +0 -126
  330. package/dist/cli/run.js.map +0 -1
  331. package/dist/cli/session-launch.d.ts +0 -23
  332. package/dist/cli/session-launch.d.ts.map +0 -1
  333. package/dist/cli/session-launch.js +0 -57
  334. package/dist/cli/session-launch.js.map +0 -1
  335. package/dist/cli/session.d.ts +0 -68
  336. package/dist/cli/session.d.ts.map +0 -1
  337. package/dist/cli/session.js +0 -124
  338. package/dist/cli/session.js.map +0 -1
  339. package/dist/codex/attach-images.d.ts +0 -20
  340. package/dist/codex/attach-images.d.ts.map +0 -1
  341. package/dist/codex/attach-images.js +0 -66
  342. package/dist/codex/attach-images.js.map +0 -1
  343. package/dist/codex/clipboard-lock.d.ts +0 -15
  344. package/dist/codex/clipboard-lock.d.ts.map +0 -1
  345. package/dist/codex/clipboard-lock.js +0 -16
  346. package/dist/codex/clipboard-lock.js.map +0 -1
  347. package/dist/codex/clipboard.d.ts +0 -32
  348. package/dist/codex/clipboard.d.ts.map +0 -1
  349. package/dist/codex/clipboard.js +0 -92
  350. package/dist/codex/clipboard.js.map +0 -1
  351. package/dist/codex/config-lock.d.ts +0 -21
  352. package/dist/codex/config-lock.d.ts.map +0 -1
  353. package/dist/codex/config-lock.js +0 -22
  354. package/dist/codex/config-lock.js.map +0 -1
  355. package/dist/codex/config-restore.d.ts +0 -33
  356. package/dist/codex/config-restore.d.ts.map +0 -1
  357. package/dist/codex/config-restore.js +0 -90
  358. package/dist/codex/config-restore.js.map +0 -1
  359. package/dist/codex/config-transaction.d.ts +0 -26
  360. package/dist/codex/config-transaction.d.ts.map +0 -1
  361. package/dist/codex/config-transaction.js +0 -47
  362. package/dist/codex/config-transaction.js.map +0 -1
  363. package/dist/codex/hook-dispatch.d.ts +0 -9
  364. package/dist/codex/hook-dispatch.d.ts.map +0 -1
  365. package/dist/codex/hook-dispatch.js +0 -14
  366. package/dist/codex/hook-dispatch.js.map +0 -1
  367. package/dist/codex/hook-names.d.ts +0 -19
  368. package/dist/codex/hook-names.d.ts.map +0 -1
  369. package/dist/codex/hook-names.js +0 -17
  370. package/dist/codex/hook-names.js.map +0 -1
  371. package/dist/codex/hooks.d.ts +0 -99
  372. package/dist/codex/hooks.d.ts.map +0 -1
  373. package/dist/codex/hooks.js +0 -6
  374. package/dist/codex/hooks.js.map +0 -1
  375. package/dist/codex/initial-ready.d.ts +0 -19
  376. package/dist/codex/initial-ready.d.ts.map +0 -1
  377. package/dist/codex/initial-ready.js +0 -19
  378. package/dist/codex/initial-ready.js.map +0 -1
  379. package/dist/codex/serialize.d.ts +0 -8
  380. package/dist/codex/serialize.d.ts.map +0 -1
  381. package/dist/codex/serialize.js +0 -48
  382. package/dist/codex/serialize.js.map +0 -1
  383. package/dist/codex/session-bridge.d.ts +0 -14
  384. package/dist/codex/session-bridge.d.ts.map +0 -1
  385. package/dist/codex/session-bridge.js +0 -20
  386. package/dist/codex/session-bridge.js.map +0 -1
  387. package/dist/codex/session-build.d.ts +0 -15
  388. package/dist/codex/session-build.d.ts.map +0 -1
  389. package/dist/codex/session-build.js +0 -144
  390. package/dist/codex/session-build.js.map +0 -1
  391. package/dist/codex/session-cleanup.d.ts +0 -12
  392. package/dist/codex/session-cleanup.d.ts.map +0 -1
  393. package/dist/codex/session-cleanup.js +0 -15
  394. package/dist/codex/session-cleanup.js.map +0 -1
  395. package/dist/codex/session-hooks.d.ts +0 -13
  396. package/dist/codex/session-hooks.d.ts.map +0 -1
  397. package/dist/codex/session-hooks.js +0 -54
  398. package/dist/codex/session-hooks.js.map +0 -1
  399. package/dist/codex/session-instance.d.ts +0 -50
  400. package/dist/codex/session-instance.d.ts.map +0 -1
  401. package/dist/codex/session-instance.js +0 -117
  402. package/dist/codex/session-instance.js.map +0 -1
  403. package/dist/codex/session-resume.d.ts +0 -7
  404. package/dist/codex/session-resume.d.ts.map +0 -1
  405. package/dist/codex/session-resume.js +0 -44
  406. package/dist/codex/session-resume.js.map +0 -1
  407. package/dist/codex/session-runtime.d.ts +0 -7
  408. package/dist/codex/session-runtime.d.ts.map +0 -1
  409. package/dist/codex/session-runtime.js +0 -10
  410. package/dist/codex/session-runtime.js.map +0 -1
  411. package/dist/codex/session-transcript.d.ts +0 -30
  412. package/dist/codex/session-transcript.d.ts.map +0 -1
  413. package/dist/codex/session-transcript.js +0 -53
  414. package/dist/codex/session-transcript.js.map +0 -1
  415. package/dist/codex/session-types.d.ts +0 -87
  416. package/dist/codex/session-types.d.ts.map +0 -1
  417. package/dist/codex/session-types.js +0 -6
  418. package/dist/codex/session-types.js.map +0 -1
  419. package/dist/codex/session-warnings.d.ts +0 -27
  420. package/dist/codex/session-warnings.d.ts.map +0 -1
  421. package/dist/codex/session-warnings.js +0 -54
  422. package/dist/codex/session-warnings.js.map +0 -1
  423. package/dist/codex/session.d.ts +0 -16
  424. package/dist/codex/session.d.ts.map +0 -1
  425. package/dist/codex/session.js +0 -61
  426. package/dist/codex/session.js.map +0 -1
  427. package/dist/codex/start-or-resume.d.ts +0 -12
  428. package/dist/codex/start-or-resume.d.ts.map +0 -1
  429. package/dist/codex/start-or-resume.js +0 -31
  430. package/dist/codex/start-or-resume.js.map +0 -1
  431. package/dist/codex/transcript/cursor-io.d.ts +0 -7
  432. package/dist/codex/transcript/cursor-io.d.ts.map +0 -1
  433. package/dist/codex/transcript/cursor-io.js +0 -7
  434. package/dist/codex/transcript/cursor-io.js.map +0 -1
  435. package/dist/codex/transcript/cursor.d.ts +0 -8
  436. package/dist/codex/transcript/cursor.d.ts.map +0 -1
  437. package/dist/codex/transcript/cursor.js +0 -8
  438. package/dist/codex/transcript/cursor.js.map +0 -1
  439. package/dist/codex/transcript/drops.d.ts +0 -9
  440. package/dist/codex/transcript/drops.d.ts.map +0 -1
  441. package/dist/codex/transcript/drops.js +0 -9
  442. package/dist/codex/transcript/drops.js.map +0 -1
  443. package/dist/codex/transcript.d.ts +0 -12
  444. package/dist/codex/transcript.d.ts.map +0 -1
  445. package/dist/codex/transcript.js +0 -10
  446. package/dist/codex/transcript.js.map +0 -1
  447. package/dist/codex/validate-result.d.ts +0 -7
  448. package/dist/codex/validate-result.d.ts.map +0 -1
  449. package/dist/codex/validate-result.js +0 -84
  450. package/dist/codex/validate-result.js.map +0 -1
  451. package/dist/codex/validate.d.ts +0 -11
  452. package/dist/codex/validate.d.ts.map +0 -1
  453. package/dist/codex/validate.js +0 -88
  454. package/dist/codex/validate.js.map +0 -1
  455. package/dist/core/activity-lifecycle.d.ts +0 -21
  456. package/dist/core/activity-lifecycle.d.ts.map +0 -1
  457. package/dist/core/activity-lifecycle.js +0 -45
  458. package/dist/core/activity-lifecycle.js.map +0 -1
  459. package/dist/core/activity-meta.d.ts +0 -13
  460. package/dist/core/activity-meta.d.ts.map +0 -1
  461. package/dist/core/activity-meta.js +0 -67
  462. package/dist/core/activity-meta.js.map +0 -1
  463. package/dist/core/activity-transcript.d.ts +0 -19
  464. package/dist/core/activity-transcript.d.ts.map +0 -1
  465. package/dist/core/activity-transcript.js +0 -60
  466. package/dist/core/activity-transcript.js.map +0 -1
  467. package/dist/core/activity.d.ts +0 -51
  468. package/dist/core/activity.d.ts.map +0 -1
  469. package/dist/core/activity.js +0 -81
  470. package/dist/core/activity.js.map +0 -1
  471. package/dist/core/control-queue-state.d.ts +0 -29
  472. package/dist/core/control-queue-state.d.ts.map +0 -1
  473. package/dist/core/control-queue-state.js +0 -95
  474. package/dist/core/control-queue-state.js.map +0 -1
  475. package/dist/core/control-queue-traits.d.ts +0 -54
  476. package/dist/core/control-queue-traits.d.ts.map +0 -1
  477. package/dist/core/control-queue-traits.js +0 -118
  478. package/dist/core/control-queue-traits.js.map +0 -1
  479. package/dist/core/control-queue-types.d.ts +0 -45
  480. package/dist/core/control-queue-types.d.ts.map +0 -1
  481. package/dist/core/control-queue-types.js +0 -7
  482. package/dist/core/control-queue-types.js.map +0 -1
  483. package/dist/core/control-queue.d.ts +0 -21
  484. package/dist/core/control-queue.d.ts.map +0 -1
  485. package/dist/core/control-queue.js +0 -98
  486. package/dist/core/control-queue.js.map +0 -1
  487. package/dist/core/list-models.d.ts +0 -44
  488. package/dist/core/list-models.d.ts.map +0 -1
  489. package/dist/core/list-models.js +0 -73
  490. package/dist/core/list-models.js.map +0 -1
  491. package/dist/core/model-picker.d.ts +0 -22
  492. package/dist/core/model-picker.d.ts.map +0 -1
  493. package/dist/core/model-picker.js +0 -58
  494. package/dist/core/model-picker.js.map +0 -1
  495. package/dist/core/model-rows.d.ts +0 -21
  496. package/dist/core/model-rows.d.ts.map +0 -1
  497. package/dist/core/model-rows.js +0 -57
  498. package/dist/core/model-rows.js.map +0 -1
  499. package/dist/core/probe-state.d.ts +0 -21
  500. package/dist/core/probe-state.d.ts.map +0 -1
  501. package/dist/core/probe-state.js +0 -39
  502. package/dist/core/probe-state.js.map +0 -1
  503. package/dist/core/session-input-abort.d.ts +0 -10
  504. package/dist/core/session-input-abort.d.ts.map +0 -1
  505. package/dist/core/session-input-abort.js +0 -44
  506. package/dist/core/session-input-abort.js.map +0 -1
  507. package/dist/core/session-input.d.ts +0 -37
  508. package/dist/core/session-input.d.ts.map +0 -1
  509. package/dist/core/session-input.js +0 -154
  510. package/dist/core/session-input.js.map +0 -1
  511. package/dist/core/session-warnings.d.ts +0 -20
  512. package/dist/core/session-warnings.d.ts.map +0 -1
  513. package/dist/core/session-warnings.js +0 -32
  514. package/dist/core/session-warnings.js.map +0 -1
  515. package/dist/core/simple/loop-controls.d.ts +0 -7
  516. package/dist/core/simple/loop-controls.d.ts.map +0 -1
  517. package/dist/core/simple/loop-controls.js +0 -7
  518. package/dist/core/simple/loop-controls.js.map +0 -1
  519. package/dist/core/startup-automation.d.ts +0 -54
  520. package/dist/core/startup-automation.d.ts.map +0 -1
  521. package/dist/core/startup-automation.js +0 -40
  522. package/dist/core/startup-automation.js.map +0 -1
  523. package/dist/core/startup-frame.d.ts +0 -39
  524. package/dist/core/startup-frame.d.ts.map +0 -1
  525. package/dist/core/startup-frame.js +0 -60
  526. package/dist/core/startup-frame.js.map +0 -1
  527. package/dist/core/startup-write.d.ts +0 -47
  528. package/dist/core/startup-write.d.ts.map +0 -1
  529. package/dist/core/startup-write.js +0 -73
  530. package/dist/core/startup-write.js.map +0 -1
  531. package/dist/core/trust-blocking.d.ts +0 -22
  532. package/dist/core/trust-blocking.d.ts.map +0 -1
  533. package/dist/core/trust-blocking.js +0 -38
  534. package/dist/core/trust-blocking.js.map +0 -1
  535. package/dist/core/trust-prompts.d.ts +0 -135
  536. package/dist/core/trust-prompts.d.ts.map +0 -1
  537. package/dist/core/trust-prompts.js.map +0 -1
  538. package/dist/core/trust-responder.d.ts +0 -48
  539. package/dist/core/trust-responder.d.ts.map +0 -1
  540. package/dist/core/trust-responder.js +0 -119
  541. package/dist/core/trust-responder.js.map +0 -1
  542. package/dist/core/tui-screen.d.ts +0 -21
  543. package/dist/core/tui-screen.d.ts.map +0 -1
  544. package/dist/core/tui-screen.js +0 -56
  545. package/dist/core/tui-screen.js.map +0 -1
  546. package/dist/core/update-warning.d.ts +0 -25
  547. package/dist/core/update-warning.d.ts.map +0 -1
  548. package/dist/core/update-warning.js +0 -33
  549. package/dist/core/update-warning.js.map +0 -1
  550. package/dist/core/warning-lifecycle.d.ts +0 -23
  551. package/dist/core/warning-lifecycle.d.ts.map +0 -1
  552. package/dist/core/warning-lifecycle.js +0 -6
  553. package/dist/core/warning-lifecycle.js.map +0 -1
  554. package/dist/core/warning-reasons.d.ts +0 -62
  555. package/dist/core/warning-reasons.d.ts.map +0 -1
  556. package/dist/core/warning-reasons.js +0 -121
  557. package/dist/core/warning-reasons.js.map +0 -1
  558. package/dist/core/warnings.d.ts +0 -145
  559. package/dist/core/warnings.d.ts.map +0 -1
  560. package/dist/core/warnings.js +0 -12
  561. package/dist/core/warnings.js.map +0 -1
  562. package/dist/runtime/cleanup-latch.d.ts +0 -27
  563. package/dist/runtime/cleanup-latch.d.ts.map +0 -1
  564. package/dist/runtime/cleanup-latch.js +0 -43
  565. package/dist/runtime/cleanup-latch.js.map +0 -1
  566. package/dist/runtime/initial-ready-advance.d.ts +0 -22
  567. package/dist/runtime/initial-ready-advance.d.ts.map +0 -1
  568. package/dist/runtime/initial-ready-advance.js +0 -39
  569. package/dist/runtime/initial-ready-advance.js.map +0 -1
  570. package/dist/runtime/initial-ready-fallback.d.ts +0 -12
  571. package/dist/runtime/initial-ready-fallback.d.ts.map +0 -1
  572. package/dist/runtime/initial-ready-fallback.js +0 -20
  573. package/dist/runtime/initial-ready-fallback.js.map +0 -1
  574. package/dist/runtime/initial-ready.d.ts +0 -49
  575. package/dist/runtime/initial-ready.d.ts.map +0 -1
  576. package/dist/runtime/initial-ready.js +0 -81
  577. package/dist/runtime/initial-ready.js.map +0 -1
  578. package/dist/runtime/reap-tree.d.ts +0 -62
  579. package/dist/runtime/reap-tree.d.ts.map +0 -1
  580. package/dist/runtime/reap-tree.js +0 -108
  581. package/dist/runtime/reap-tree.js.map +0 -1
  582. package/dist/runtime/session-base-types.d.ts +0 -36
  583. package/dist/runtime/session-base-types.d.ts.map +0 -1
  584. package/dist/runtime/session-base-types.js +0 -14
  585. package/dist/runtime/session-base-types.js.map +0 -1
  586. package/dist/runtime/session-base.d.ts +0 -48
  587. package/dist/runtime/session-base.d.ts.map +0 -1
  588. package/dist/runtime/session-base.js +0 -76
  589. package/dist/runtime/session-base.js.map +0 -1
  590. package/dist/runtime/session-commands.d.ts +0 -43
  591. package/dist/runtime/session-commands.d.ts.map +0 -1
  592. package/dist/runtime/session-commands.js +0 -52
  593. package/dist/runtime/session-commands.js.map +0 -1
  594. package/dist/runtime/session-exit.d.ts +0 -16
  595. package/dist/runtime/session-exit.d.ts.map +0 -1
  596. package/dist/runtime/session-exit.js +0 -32
  597. package/dist/runtime/session-exit.js.map +0 -1
  598. package/dist/runtime/session-image-attach.d.ts +0 -45
  599. package/dist/runtime/session-image-attach.d.ts.map +0 -1
  600. package/dist/runtime/session-image-attach.js +0 -82
  601. package/dist/runtime/session-image-attach.js.map +0 -1
  602. package/dist/runtime/session-lifecycle.d.ts +0 -61
  603. package/dist/runtime/session-lifecycle.d.ts.map +0 -1
  604. package/dist/runtime/session-lifecycle.js +0 -164
  605. package/dist/runtime/session-lifecycle.js.map +0 -1
  606. package/dist/runtime/session-loops.d.ts +0 -32
  607. package/dist/runtime/session-loops.d.ts.map +0 -1
  608. package/dist/runtime/session-loops.js +0 -62
  609. package/dist/runtime/session-loops.js.map +0 -1
  610. package/dist/runtime/session-readiness.d.ts +0 -18
  611. package/dist/runtime/session-readiness.d.ts.map +0 -1
  612. package/dist/runtime/session-readiness.js +0 -22
  613. package/dist/runtime/session-readiness.js.map +0 -1
  614. package/dist/runtime/session-reap.d.ts +0 -28
  615. package/dist/runtime/session-reap.d.ts.map +0 -1
  616. package/dist/runtime/session-reap.js +0 -51
  617. package/dist/runtime/session-reap.js.map +0 -1
  618. package/dist/runtime/session-resize.d.ts +0 -20
  619. package/dist/runtime/session-resize.d.ts.map +0 -1
  620. package/dist/runtime/session-resize.js +0 -26
  621. package/dist/runtime/session-resize.js.map +0 -1
  622. package/dist/runtime/session-shutdown-binding.d.ts +0 -30
  623. package/dist/runtime/session-shutdown-binding.d.ts.map +0 -1
  624. package/dist/runtime/session-shutdown-binding.js +0 -37
  625. package/dist/runtime/session-shutdown-binding.js.map +0 -1
  626. package/dist/runtime/session-shutdown.d.ts +0 -60
  627. package/dist/runtime/session-shutdown.d.ts.map +0 -1
  628. package/dist/runtime/session-shutdown.js +0 -140
  629. package/dist/runtime/session-shutdown.js.map +0 -1
  630. package/dist/runtime/session-status-wiring.d.ts +0 -38
  631. package/dist/runtime/session-status-wiring.d.ts.map +0 -1
  632. package/dist/runtime/session-status-wiring.js +0 -41
  633. package/dist/runtime/session-status-wiring.js.map +0 -1
  634. package/dist/runtime/session-status.d.ts +0 -7
  635. package/dist/runtime/session-status.d.ts.map +0 -1
  636. package/dist/runtime/session-status.js +0 -22
  637. package/dist/runtime/session-status.js.map +0 -1
  638. package/dist/runtime/shutdown-coordinator.d.ts +0 -57
  639. package/dist/runtime/shutdown-coordinator.d.ts.map +0 -1
  640. package/dist/runtime/shutdown-coordinator.js +0 -77
  641. package/dist/runtime/shutdown-coordinator.js.map +0 -1
  642. package/dist/runtime/startup-buffer.d.ts +0 -33
  643. package/dist/runtime/startup-buffer.d.ts.map +0 -1
  644. package/dist/runtime/startup-buffer.js +0 -53
  645. package/dist/runtime/startup-buffer.js.map +0 -1
  646. package/dist/runtime/startup-cleanup.d.ts +0 -43
  647. package/dist/runtime/startup-cleanup.d.ts.map +0 -1
  648. package/dist/runtime/startup-cleanup.js +0 -89
  649. package/dist/runtime/startup-cleanup.js.map +0 -1
  650. package/dist/runtime/startup.d.ts +0 -17
  651. package/dist/runtime/startup.d.ts.map +0 -1
  652. package/dist/runtime/startup.js +0 -47
  653. package/dist/runtime/startup.js.map +0 -1
  654. package/dist/runtime/status-emit.d.ts +0 -14
  655. package/dist/runtime/status-emit.d.ts.map +0 -1
  656. package/dist/runtime/status-emit.js +0 -15
  657. package/dist/runtime/status-emit.js.map +0 -1
  658. package/dist/runtime/teardown.d.ts +0 -15
  659. package/dist/runtime/teardown.d.ts.map +0 -1
  660. package/dist/runtime/teardown.js +0 -40
  661. package/dist/runtime/teardown.js.map +0 -1
  662. package/dist/runtime/terminate.d.ts +0 -22
  663. package/dist/runtime/terminate.d.ts.map +0 -1
  664. package/dist/runtime/terminate.js +0 -129
  665. package/dist/runtime/terminate.js.map +0 -1
  666. package/dist/runtime/update-lock.d.ts +0 -19
  667. package/dist/runtime/update-lock.d.ts.map +0 -1
  668. package/dist/runtime/update-lock.js +0 -183
  669. package/dist/runtime/update-lock.js.map +0 -1
  670. package/dist/runtime/update-once.d.ts +0 -40
  671. package/dist/runtime/update-once.d.ts.map +0 -1
  672. package/dist/runtime/update-once.js +0 -88
  673. package/dist/runtime/update-once.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -12,10 +12,57 @@ back each entry are listed in PRD.md §14.
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
- First public release.
15
+ ## [0.1.1]
16
+
17
+ First usable public release.
18
+
19
+ 0.1.0 was published from a checkout that sat 18 commits behind `main`. It
20
+ shipped without the `resume`, `sessions`, `interactive` and `models`
21
+ subcommands, without `--high-trust`, without agent auto-detection, and with a
22
+ stale README. Nothing was wrong with 0.1.0's own code; it was simply built from
23
+ the wrong commit. 0.1.1 is the same work published from `main`, and is the
24
+ version to install.
16
25
 
17
26
  ### Added
18
27
 
28
+ - **The `elwood` CLI now explains and cleanly overrides its effective behavior.**
29
+ `--no-stream` and `--no-verbose` reverse inherited boolean defaults,
30
+ `--no-defaults` bypasses saved config and `ELWOOD_*` run settings, and
31
+ `elwood config effective` reports validated launch/output values with their
32
+ provenance without starting an agent. Routine warnings now reach stderr for
33
+ text and JSON runs, `--verbose` is a concise elapsed progress view, and
34
+ `--debug` retains full sanitized event detail. JSONL records include elapsed
35
+ timing plus tool-call correlation IDs when available. Help, validation errors,
36
+ resume/persona/ephemeral wording, and the new scripting guide now make defaults,
37
+ recovery actions, and lifecycle effects explicit. (§5.8/§12A,
38
+ C-API-48/C-CLI-02/03/08/10/11/14/19/20)
39
+ - **The `elwood` CLI can now mirror the live agent TUI in the current terminal.**
40
+ `--head` sends the agent's ordered raw VT/ANSI stream to terminal stderr while
41
+ preserving the final text or JSON result on stdout, including cursor-addressed
42
+ redraws, alternate screens, colors, spinners, and OSC title changes. It follows
43
+ terminal resizes, restores terminal modes on every handled outcome, and treats
44
+ Ctrl-C like the existing interrupt lifecycle. The display is intentionally
45
+ view-only and cannot be combined with `--stream`, `--verbose`, or JSONL.
46
+ Pending terminal writes are bounded by bytes and frame count, so a stalled
47
+ terminal becomes a clean run failure instead of an unbounded memory queue.
48
+ An argument-free `elwood` invocation now prints help instead of waiting for a
49
+ prompt. (§12A.1/§12A.6, C-CLI-02/C-CLI-18)
50
+ - **The `elwood` CLI gained `sessions`, `resume`, `interactive`, and `models`
51
+ commands.** `elwood sessions` lists Elwood-owned session records (id, agent,
52
+ workspace, `createdAt`/`lastUsedAt`, `resumable`, socket-presence `live`) as an
53
+ aligned table or one `{"type":"sessions"}` JSON document without starting an
54
+ agent. `elwood resume <id> [prompt...]` is a parse-time rewrite of
55
+ `run --resume <id>`. `elwood interactive [id]` runs the real `claude`/`codex`
56
+ TUI in the foreground with Elwood's resolved agent, model, effort, workspace,
57
+ and posture passed as the agent's own flags — no PTY, automation, observation,
58
+ or state — resuming a stored session's own conversation when given an id.
59
+ `elwood models` starts the agent briefly, reads its model picker through the
60
+ public `listModels` operation, tears the session down, and prints a table or a
61
+ `{"type":"models"}` document of `AgentModelOption` rows. The adapters' launch
62
+ flag mapping now lives in shared `claudeLaunchArguments`/`codexLaunchArguments`
63
+ builders so interactive and headless launches cannot drift. (§12A.7–§12A.10,
64
+ C-CLI-21 through C-CLI-24)
65
+
19
66
  - Claude Code and Codex CLI adapters that run the real interactive CLI in a
20
67
  PTY, launched through the user's login shell, and observe it through a
21
68
  headless xterm.js model. macOS only; Claude Code 2.1.144+ and Codex CLI
@@ -86,10 +133,27 @@ First public release.
86
133
  `agent`, a new run tries `claude` then `codex` in the login shell and fails
87
134
  with `no_agent_found` (status 2) when neither resolves. Error records
88
135
  emitted before an agent was selected report `agent: null`.
136
+ - An agent-neutral "never ask for permissions" switch: `--high-trust` /
137
+ `--no-high-trust`, `ELWOOD_HIGH_TRUST`, the `highTrust` config key, and
138
+ `highTrust?: boolean` on both session classes and both resume functions. It
139
+ expands to Claude `permissionMode: "bypassPermissions"` or Codex
140
+ `sandbox: "danger-full-access"` with `approvalPolicy: "never"` before the
141
+ posture is persisted and the process spawned. Combining it with an explicit
142
+ per-agent posture is rejected: the CLI names both sources as a usage error and
143
+ the library throws `claude_high_trust_conflict` / `codex_high_trust_conflict`.
144
+ `config effective` reports `highTrust` and attributes the posture it decided
145
+ to the high-trust source. Claude's one-time "running in Bypass Permissions
146
+ mode" acceptance dialog is an allowlisted trust prompt answered under
147
+ `autotrust` (`startup_prompt` label `bypass_permissions`).
89
148
 
90
149
  ### Changed
91
150
 
92
151
  - Published as `@with-logic/elwood` under the MIT license.
152
+ - The published package runs no install scripts. `dist/` is built before publish
153
+ (`prepublishOnly`) and shipped in the tarball, so `npm install -g
154
+ @with-logic/elwood` needs no build step and raises no npm allow-scripts
155
+ prompt for Elwood itself. Working from a checkout now requires an explicit
156
+ `npm run build` before `npm link`.
93
157
  - Warnings are live-only events. Nothing is persisted, replayed, or counted;
94
158
  there is no `session.warnings` property.
95
159
  - The persisted session record holds only schema version, `elwoodSessionId`,
@@ -109,6 +173,107 @@ First public release.
109
173
 
110
174
  ### Fixed
111
175
 
176
+ - **Headed runs no longer suspend themselves or leave the invoking terminal unusable.**
177
+ Interactive version and capability probes now run in an isolated process session,
178
+ preventing their shell-managed commands from stealing the real terminal's foreground
179
+ process group. `--head` can therefore restore cooked input and display modes before
180
+ returning to an interactive shell, without a cleanup-time `SIGTTOU` stop or leaked
181
+ terminal-protocol replies. Its defensive restore now also pops the Kitty keyboard
182
+ enhancement mode used by current agent TUIs, so subsequent shell keystrokes remain
183
+ ordinary text instead of encoded key-event sequences. (§12A.6, C-CLI-18)
184
+ - **Codex's startup update dialog no longer wedges headed or headless runs.**
185
+ Codex 0.153.x can paint its numbered update menu before its input loop accepts
186
+ the first safe Skip hotkey. Elwood now retries that hotkey for a bounded interval
187
+ only after revalidating the complete current update dialog, and the CLI no longer
188
+ mistakes the responder-owned dialog's replayed blocking edge for a human prompt.
189
+ A persistent or unanswerable update dialog now fails and cleans up boundedly even
190
+ without `--timeout`; no retry can escape into the composer or another dialog.
191
+ (§5.5/§12A.2, C-CODEX-12/C-CLI-05)
192
+ - **Headless turns now survive real-CLI startup, resume, and teardown races.**
193
+ Codex 0.153.3 can accept the 10-second fallback paste into its cold-start
194
+ placeholder, swallow it during a later boot repaint, and appear to finish an
195
+ empty turn; ergonomic turns now require positive submission evidence, replay
196
+ an unaccepted prompt at most twice, and fail explicitly instead of reporting
197
+ false success. A resumed Claude turn no longer treats its stale composer as
198
+ an immediate end before real work paints. The headless owner also ignores
199
+ transient attention from trust prompts it is already authorized to answer,
200
+ and macOS teardown retries the short-lived post-exit `EPERM` process-group
201
+ window instead of surfacing `cleanup_failed`. (§5.3/§5.8/§12A, C-API-48,
202
+ C-TURN-03, C-CLI-05/09)
203
+ - **Claude model switches now complete through model/effort cache warnings.**
204
+ Claude 2.1.258 may interpose `Switch model?` or `Change effort level?` after
205
+ Elwood applies a session-only picker choice; Elwood previously treated that
206
+ dialog as successful picker closure and returned while the session was still
207
+ waiting. Elwood now recognizes numbered and unnumbered variants, navigates
208
+ from the rendered cursor to the affirmative action, confirms the built-in
209
+ cache warning, and waits for the idle composer before resolving `setModel`.
210
+ Recognition is scoped to the bottom-most live dialog and revalidated before
211
+ Enter, so transcript text cannot spoof a cache warning or composer. Hook-requested
212
+ `PreModelSwitch` confirmations remain blocking and human-controlled. (§5.3,
213
+ C-API-24/C-ATTN-04)
214
+ - **Concurrent Codex starts no longer race global npm updates.** Codex's live
215
+ update dialog is now input-blocking until its rendered frame clears, so queued
216
+ persona/caller input cannot press Enter on the default "Update now" action when
217
+ a prompt layout is partial or drifts. Elwood still skips every recognized safe
218
+ option automatically. Separately, `autoupdate` now holds an atomic per-user,
219
+ per-adapter cross-process lease around the global updater; another Elwood host
220
+ waits asynchronously, skips its duplicate install, and validates the resulting
221
+ binary. The lease uses a stable account cache across differing `TMPDIR` values,
222
+ records its owner/generation so live or successor updates cannot be evicted,
223
+ and recovers dead owners safely. Failed partial installs also invalidate version
224
+ and capability caches before validation. Coal Harbor and other consumers need
225
+ no API or configuration changes. (§5.5/§9.2, C-CODEX-12/C-PERF-04/C-LIFE-09)
226
+ - **Claude's current cursor-style workspace trust prompt is auto-approved again.**
227
+ Claude 2.1.252 replaced the older numbered, affirmative-first layout with an
228
+ unnumbered menu that defaults to `No, exit`; the responder recognized its header
229
+ but found no numbered affirmative, wrote nothing, and the readiness fallback
230
+ could report `ready` over the still-visible gate. Elwood now supports both
231
+ layouts, navigates cursor menus to the affirmative before Enter, keeps their
232
+ entire option region out of header recognition, and verifies the real trust
233
+ screen clears before readiness. The gate remains independent of Claude's
234
+ `bypassPermissions` / `--dangerously-skip-permissions` policy. (§5.1/§5.3,
235
+ C-CLAUDE-10/C-CLAUDE-14/C-E2E-09)
236
+ - **Modern Codex final replies now carry their text on `assistant_message`
237
+ activity.** Codex 0.149.1 writes replies as assistant `message` response items
238
+ with `phase: "final_answer"` and `content[].output_text`; Elwood previously
239
+ expected a plain string (or a legacy `agent_message` duplicate), so consumers
240
+ received a textless event and could silently discard the reply. Elwood now
241
+ extracts the full final-answer text—including `@mentions`—while keeping
242
+ commentary and user/developer transcript records out of assistant activity.
243
+ (§5.4/§7A.4, C-API-12/C-CODEX-16)
244
+ - **Claude's `Not logged in · Run /login` sign-out is now detected mid-session.**
245
+ A ready Claude session that gets logged out mid-run renders `Not logged in`
246
+ (paired with a `run /login` hint) — a different wording than the `Login expired`
247
+ / `Session expired` / `OAuth token revoked` banners Elwood already recognized.
248
+ That form previously went undetected mid-session, so no `login_expired` warning
249
+ fired. It now surfaces the same content-free `login_expired` warning (+ `warning`
250
+ activity), leaving the session alive to recover via `session.login()`. (§5.3/§5.7,
251
+ C-CLAUDE-17/18)
252
+ - **Codex's in-TUI update prompt is now re-skipped on the restart loop.** Elwood
253
+ always skips Codex's interactive "update available" prompt (it never selects
254
+ "Update now"; the real update is the `autoupdate` preflight). The skip was latched
255
+ once per session, so if Codex restarted and the SAME update screen reappeared — the
256
+ update did not take — the session got stuck looping on it. The skip is now
257
+ edge-triggered: it re-arms when the update screen leaves the frame and re-skips the
258
+ reappearance. (§5.5, C-CODEX-12)
259
+ - **Autoupdate is now best-effort and never fails a start on its own.** When
260
+ `autoupdate: true` and `claude update` / `codex update` fails (a flaky network,
261
+ a partial native-installer download, contention during a fleet launch), Elwood no
262
+ longer rejects `startClaude`/`startCodex` with `claude_update_failed` /
263
+ `codex_update_failed`. If the INSTALLED CLI still meets the minimum version, the
264
+ session starts from it and Elwood emits a live `agent_update_failed` warning (safe
265
+ diagnostics only: installed version, an allowlisted error code, bounded stderr).
266
+ Startup fails only when the installed version is actually below the minimum. The
267
+ warning is zero-burden — a consumer that does not subscribe to `warning` is
268
+ unaffected and the session still reaches `ready`. (§9.2, C-LIFE-11)
269
+ - **A failed shared update no longer poisons the process.** A once-per-process
270
+ update/probe cache that rejected was retained and replayed, so one failed
271
+ `claude update` could reject every concurrent roster start AND every later start
272
+ until the process restarted. Cached probes (autoupdate, version read, capability
273
+ detection) now never retain a rejected result: concurrent callers share one attempt
274
+ and a later caller re-attempts rather than inheriting the failure. (§9.2,
275
+ C-LIFE-09/11)
276
+
112
277
  - Trust, update, and model-switch dialogs on current Claude and Codex releases
113
278
  are recognized and answered; unrecognized dialogs block instead of guessing.
114
279
  - Hook payloads are measured identically on both sides of the bridge, and
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Logic, Inc.
3
+ Copyright (c) 2026 Logic App, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,14 +1,52 @@
1
- # Elwood
2
-
3
- Elwood is a TypeScript library and command-line tool for driving interactive
4
- agentic coding CLIs through real terminal sessions. It starts tools like Claude
5
- Code and Codex the way they are designed to run, inside an interactive PTY, and
6
- lets a host application send prompts and key presses, render the live terminal,
7
- and observe a typed event stream for hooks, tool calls, transcript activity,
8
- warnings, and lifecycle state. The governing constraint is that the agent should
9
- not know it is wrapped: the process stays interactive, runs in the user's normal
10
- shell environment, and is controlled through the hooks and transcripts the CLI
11
- already provides. The first supported adapters are Claude Code and Codex CLI.
1
+ <div align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="site/assets/landing/robot-mark-dark.webp" />
4
+ <img src="site/assets/landing/robot-mark-light.webp" alt="" width="96" height="96" />
5
+ </picture>
6
+ <h1>Elwood</h1>
7
+ <p><a href="https://elwood.bot">elwood.bot</a></p>
8
+ </div>
9
+
10
+ **Automate real Claude Code and Codex sessions in headless PTYs.**
11
+
12
+ Write scripts that control normal interactive Claude Code and Codex sessions,
13
+ which use your regular subscription rather than metered API billing. Elwood
14
+ starts the actual agent CLI in a hidden terminal and types into it the way you
15
+ would. The agent keeps its tools, hooks, configuration, and login.
16
+
17
+ ```sh
18
+ npm install -g @with-logic/elwood
19
+ elwood "Explain this project's architecture."
20
+ ```
21
+
22
+ ```ts
23
+ import { ClaudeSession } from "@with-logic/elwood";
24
+
25
+ const session = new ClaudeSession({ cwd: "/path/to/project" });
26
+ console.log(await session.send("Explain this project."));
27
+ await session.close();
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Why Elwood
33
+
34
+ > **The agent should not know it is wrapped.**
35
+
36
+ Headless agent APIs give you a different product than the CLI your team
37
+ actually uses: different tools, different hooks, different billing. Elwood
38
+ drives the real interactive CLI instead. The process stays interactive, runs in
39
+ your normal shell environment, and is controlled through the hooks and
40
+ transcripts the CLI already provides.
41
+
42
+ - **Your subscription, not an API key.** It is the same interactive session you
43
+ run by hand, so it bills the way that session already bills.
44
+ - **A small API over a real terminal.** `send()` returns a string. `stream()`
45
+ yields typed events. The CLI keeps its own tools and history.
46
+ - **Typed activity, not screen scraping.** Assistant text, reasoning, tool
47
+ calls and results, hooks, warnings, and lifecycle arrive as one event stream.
48
+ - **Two ways in.** A TypeScript library for applications, and an `elwood`
49
+ command for shell scripts and pipelines.
12
50
 
13
51
  `PRD.md` is the source of truth for observable behavior. If this README, the
14
52
  tests, or the implementation disagree with the PRD, the PRD wins.
@@ -30,8 +68,11 @@ continues. Pass `strictVersionCheck: true` to fail closed instead.
30
68
  npm install @with-logic/elwood
31
69
  ```
32
70
 
33
- The package installs an `elwood` executable for the headless CLI. To work from a
34
- checkout instead, run `npm install && npm run build && npm link`.
71
+ The package installs an `elwood` executable for the headless CLI. It ships a
72
+ prebuilt `dist/`, so a global install runs no build step and no install scripts
73
+ of its own. To work from a checkout instead, run
74
+ `npm install && npm run build && npm link`; the build is explicit because
75
+ `dist/` is not committed.
35
76
 
36
77
  ## Quickstart: library
37
78
 
@@ -105,6 +146,194 @@ and `blocked` (a dialog needs a human) and ends in `stopped`, `exited`,
105
146
  `<cwd>/.elwood` by default, or under an explicit `stateDir`. It holds what
106
147
  resume needs and nothing else.
107
148
 
149
+ ## Headless CLI
150
+
151
+ ### Live terminal view
152
+
153
+ Add `--head` when you want to watch the real agent interface while retaining a
154
+ pipeline-friendly final result:
155
+
156
+ ```sh
157
+ elwood --head "Run the test suite and fix the failure"
158
+ elwood --head --output json "Review this repository" >result.json
159
+ elwood --head --agent claude "Explain the architecture"
160
+ ```
161
+
162
+ The display stays in the current terminal and receives the raw PTY byte stream on
163
+ stderr. It is a real VT/ANSI mirror, so full-screen layouts, cursor-addressed
164
+ updates, alternate-screen buffers, colors, spinners, and title changes render as
165
+ they do in the underlying Claude or Codex client. Stdout remains only the final
166
+ text or JSON protocol and can be redirected independently. Pending display work
167
+ is capped at 4 MiB or 1,024 frames; a terminal that remains backpressured fails
168
+ the run cleanly after draining accepted bytes instead of growing memory without
169
+ bound.
170
+
171
+ Head mode is deliberately view-only: while attached, ordinary keyboard, mouse,
172
+ paste, and terminal-response bytes are discarded; Ctrl-C still interrupts using
173
+ Elwood's normal first-interrupt/repeated-force-kill lifecycle. Terminal resizes
174
+ propagate to the agent. Elwood restores raw/cooked input state, mouse and paste
175
+ modes, attributes, cursor visibility, and the main screen before printing the
176
+ final result. Both stdin and stderr must be terminals, and `--head` cannot be
177
+ combined with `--stream`, `--verbose`, `--debug`, or `--output jsonl`.
178
+
179
+ ### Continuation and cleanup
180
+
181
+ New runs are ephemeral unless `--keep` is supplied. A kept text run reports its
182
+ session ID on stderr; JSON and JSONL include it in the terminal record:
183
+
184
+ ```sh
185
+ first=$(elwood --keep --output json "Remember that the release color is teal")
186
+ id=$(printf '%s' "$first" | jq -r .sessionId)
187
+ elwood --resume "$id" "What is the release color?"
188
+ elwood --resume "$id" --ephemeral "Finish this conversation"
189
+ ```
190
+
191
+ Resume uses the exact stored agent and workspace; conflicting `--agent` and any
192
+ `--cwd` are rejected. Resumed sessions stay preserved after success or failure unless
193
+ `--ephemeral` requests teardown. Ephemeral teardown removes Elwood's session
194
+ record and loop definitions; it does not undo workspace changes or delete
195
+ conversation history owned by Claude or Codex. CLI state defaults to absolute
196
+ `$XDG_STATE_HOME/elwood` or `~/.local/state/elwood`; its private records contain
197
+ resume metadata, not ordinary prompts or output.
198
+
199
+ Before launching, `elwood config effective [run options]` prints the resolved
200
+ settings and where each came from. The JSON includes `head` and, for Claude,
201
+ the effective `permissionMode`, `allowedTools`, `disallowedTools`, and `tools`;
202
+ resume inspection reports persisted tool rules with stored-session provenance.
203
+
204
+ Exit status is `0` for success or a closed consumer, `1` for agent/runtime or
205
+ cleanup failure, `2` for usage/configuration failure, `124` for timeout, and
206
+ `130` for interruption. The first Ctrl-C requests a clean interrupt; a repeated
207
+ Ctrl-C force-kills before cleanup.
208
+
209
+ `--persona` runs an actual extra agent turn before the requested turn. Elwood
210
+ discards that setup turn's answer, but any tools it invokes or files it changes
211
+ remain. It is therefore supported only for new sessions, never `--resume`.
212
+
213
+ ### Sessions, resume, and interactive mode
214
+
215
+ `elwood sessions` lists the Elwood-owned session records in the effective state
216
+ directory without starting an agent, and `elwood resume <id>` is the subcommand
217
+ form of `--resume <id>`:
218
+
219
+ ```sh
220
+ elwood sessions
221
+ elwood sessions --state-dir ./state --output json | jq -r '.sessions[] | .id'
222
+ elwood resume "$id" "What is the release color?"
223
+ git diff | elwood resume "$id" --ephemeral "Does this diff match what we agreed?"
224
+ ```
225
+
226
+ The table (or the `sessions` array in JSON) reports each session's id, agent,
227
+ workspace, `createdAt`/`lastUsedAt` timestamps, whether it is `resumable`
228
+ (the agent's own conversation id is stored), and `live` — whether a launch's
229
+ bridge socket file is currently present. `live` is a cheap file-presence
230
+ signal: a socket left behind by a force-killed owner reads as live until that
231
+ session is next started or torn down. Unreadable records are skipped with a
232
+ stderr warning, and an empty state directory is a normal empty result.
233
+ `resume <id>` follows every `--resume` rule: stored agent and workspace, no
234
+ `--cwd`, no `--keep`, no persona, and piped stdin composes the same way.
235
+
236
+ `elwood interactive [id]` opens the real `claude` or `codex` TUI in the current
237
+ terminal — no hidden PTY, no automation, no observation, no Elwood state — with
238
+ Elwood's resolved agent, model, reasoning effort, workspace, and posture passed
239
+ as the agent's own flags. It exits with the agent's exit status and needs a
240
+ terminal on stdin and stdout:
241
+
242
+ ```sh
243
+ elwood interactive # the configured agent, its own defaults
244
+ elwood interactive --agent claude --model opus --claude-permission-mode plan
245
+ elwood interactive "$id" # the stored conversation, workspace, and posture
246
+ ```
247
+
248
+ Built-in headless posture defaults (Claude `dontAsk`, Codex `workspace-write`
249
+ and `never`) are not applied unless a flag, environment variable, config key,
250
+ or stored record selected them, so an unconfigured launch is the agent's own
251
+ default experience. A session kept by a headless run does store its headless
252
+ posture; pass `--claude-permission-mode default` (or the Codex flags) to get the
253
+ agent's prompts back when resuming one interactively. Because the agent owns
254
+ the resumed conversation, a later `elwood resume <id>` sees what you said. The
255
+ command rejects `--output json|jsonl`, `--stream`, `--verbose`, `--debug`,
256
+ `--head`, `--timeout`, `--persona`, `--image`, `--keep`, `--ephemeral`, and
257
+ `--resume`.
258
+
259
+ ### Listing models
260
+
261
+ `elwood models` starts the selected agent briefly, opens and cancels its own
262
+ model picker, tears the session down, and prints the rows. Text marks the
263
+ current model with `*` and the default with `(default)`; JSON is one
264
+ `{"schemaVersion":1,"type":"models",...}` document of `AgentModelOption` rows:
265
+
266
+ ```sh
267
+ elwood models
268
+ elwood models --agent claude --output json | jq -r '.models[] | select(.isCurrent) | .id'
269
+ ```
270
+
271
+ Starting the agent is unavoidable because the picker is the only source of the
272
+ list. The command honors `--agent`, `--cwd`, `--model`, `--reasoning-effort`,
273
+ `--timeout`, `--state-dir`, trust, and posture flags, leaves no Elwood state
274
+ behind, and maps failures (timeout, interruption, blocked prompts) to the usual
275
+ statuses and error documents.
276
+
277
+ ### Trust and security
278
+
279
+ Headless mode is non-interactive. With the default `--trust`, Elwood answers only
280
+ its allowlisted workspace-directory and extension trust dialogs (plus the
281
+ Elwood-owned Codex hook trust needed for operation). `--no-trust` disables the
282
+ workspace/extension approvals. Any other recognized dialog fails safely as
283
+ `blocked_prompt` instead of hanging or guessing.
284
+
285
+ Piped text and image paths are prompt input with the same authority as text typed
286
+ by the caller. Do not combine untrusted input with broad filesystem permissions.
287
+ Global config is never loaded from the repository being opened.
288
+
289
+ Head mode renders agent-controlled terminal escape sequences verbatim, just as
290
+ running the selected interactive CLI directly would. Use it only with agents and
291
+ workspaces you trust to control the current terminal display.
292
+
293
+ ## Try It Locally
294
+
295
+ Elwood includes two local test apps.
296
+
297
+ ```sh
298
+ # Terminal smoke app, Claude by default.
299
+ npm run dev:app -- --cwd /path/to/project
300
+
301
+ # Terminal smoke app with Codex.
302
+ npm run dev:app -- --agent codex --cwd /path/to/project
303
+
304
+ # Resume from Elwood metadata.
305
+ npm run dev:app -- --cwd /path/to/project --resume <elwoodSessionId>
306
+
307
+ # Browser debugger with xterm.js terminal mirror and structured event inspector.
308
+ npm run dev:web
309
+ ```
310
+
311
+ `dev:web` serves `http://localhost:4317`. It shows the live terminal on the left
312
+ and a structured event timeline on the right. Use it to inspect hooks,
313
+ activities, warnings, startup automation, status changes, and raw event payloads.
314
+
315
+ The script is still invoked through npm, but the browser dev server process runs
316
+ under Node so `node-pty` can own a real interactive PTY reliably.
317
+
318
+ ## Runnable Examples
319
+
320
+ For the smallest real usage sample, run the minimal example. It constructs a
321
+ `CodexSession`, which starts Codex lazily on the first `send`, then makes two
322
+ ergonomic `send` calls — an initial prompt and a follow-up that refers back to it —
323
+ printing each assistant response, and closes the session:
324
+
325
+ ```sh
326
+ npm run example:minimal
327
+ ```
328
+
329
+ For a fuller sample with Claude/Codex selection, custom prompts, richer logging,
330
+ timeouts, and cleanup options, run `examples/full.ts`:
331
+
332
+ ```sh
333
+ npm run example:full
334
+ npm run example:full -- --agent codex --cwd . --prompt "Summarize this repo in one paragraph."
335
+ ```
336
+
108
337
  ## Hooks and policy
109
338
 
110
339
  Handlers return `undefined` for "no decision". Claude:
@@ -228,6 +457,11 @@ immediate; both are safe after the process has already exited.
228
457
  `autotrust`), Codex hook-trust and update dialogs, and Claude's browser-tools
229
458
  onboarding. Any other dialog leaves the session `blocked` for a human; the
230
459
  CLI fails such runs as `blocked_prompt`.
460
+ - `--high-trust` (library `highTrust: true`) is the agent-neutral "never ask"
461
+ switch: Claude `bypassPermissions`, or Codex `danger-full-access` with
462
+ approval policy `never`. It removes the agent's own guardrails, so point it
463
+ only at work you would let run unattended. Combining it with an explicit
464
+ per-agent posture is a usage error rather than a silent override.
231
465
  - `autotrust` changes the security posture of the launched agent. Point it only
232
466
  at directories you already trust. The standalone `listClaudeModels` /
233
467
  `listCodexModels` probes always start with `autotrust: true`.
@@ -292,6 +526,28 @@ immediate; both are safe after the process has already exited.
292
526
  low-level examples.
293
527
  - [PRD.md](PRD.md): the behavior specification and conformance criteria.
294
528
  - [CHANGELOG.md](CHANGELOG.md): consumer-facing changes.
529
+ - [site/](site/): the landing page and the generated documentation site.
530
+
531
+ ## The website
532
+
533
+ [`site/`](site/) is the landing page and the generated documentation site,
534
+ deployed to Vercel from this repository and served at [elwood.bot](https://elwood.bot). It is a static site with no framework
535
+ and no build step: HTML, CSS, ES modules, and the robot's sprite sheets.
536
+
537
+ ```sh
538
+ cd site && python3 -m http.server 8766 --bind 127.0.0.1
539
+ ```
540
+
541
+ The documentation page is generated from Markdown sources in
542
+ [`site/docs/guide/`](site/docs/guide/) and reads the CLI's help text out of
543
+ `src/cli/help.ts`, so the published flag reference cannot drift from the code:
544
+
545
+ ```sh
546
+ cd site
547
+ uv run scripts/build_docs.py # regenerate guide/, llms.txt, llms-full.txt
548
+ python3 scripts/check_doc_examples.py # typecheck every documented example
549
+ node --test tests/*.test.mjs # the landing page's own tests
550
+ ```
295
551
 
296
552
  ## License
297
553
 
@@ -302,3 +558,10 @@ MIT. See [LICENSE](LICENSE).
302
558
  Setup, the merge gate, the e2e suite, the dev apps, and the repository map are
303
559
  in [CONTRIBUTING.md](CONTRIBUTING.md). Report vulnerabilities privately as
304
560
  described in [SECURITY.md](SECURITY.md).
561
+
562
+ ---
563
+
564
+ <div align="center">
565
+ Prompted with ❤️ by <a href="https://logic.inc">Logic, Inc</a> in Seattle, WA
566
+ <img src="site/assets/landing/space-needle.svg" alt="" width="13" height="13" />
567
+ </div>
@@ -1,8 +1,15 @@
1
1
  /**
2
- * Builds the shell command used to launch interactive Claude.
3
- * Implements PRD §4.2 and §9.1.
2
+ * Builds the launch arguments and shell command used to start interactive Claude.
3
+ * The argument list is shared by the headless PTY launch and `elwood interactive`
4
+ * (§12A.9), so the Elwood-to-Claude flag mapping cannot drift between them.
5
+ * Implements PRD §4.2, §9.1, and §12A.9.
4
6
  */
5
7
  import type { StartClaudeOptions } from "../core/types.ts";
8
+ import { type LaunchArgument } from "../runtime/launch-arguments.ts";
9
+ /** The subset of start options that become Claude's own command-line flags. */
10
+ export type ClaudeLaunchArgumentOptions = Pick<StartClaudeOptions, "model" | "reasoningEffort" | "permissionMode" | "allowedTools" | "disallowedTools" | "tools" | "name">;
11
+ /** Claude's native flags for a launch, in stable order (no `--settings`). */
12
+ export declare function claudeLaunchArguments(options: ClaudeLaunchArgumentOptions, resumeId?: string): readonly LaunchArgument[];
6
13
  export declare function buildClaudeShellCommand(settingsPath: string, options: StartClaudeOptions, resumeId?: string): string;
7
14
  export declare function shellLaunch(shell: string, command: string): {
8
15
  readonly command: string;
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/claude/command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG3D,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAoBR;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAEhE"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/claude/command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,KAAK,cAAc,EAAoB,MAAM,gCAAgC,CAAC;AAGvF,+EAA+E;AAC/E,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,kBAAkB,EAChB,OAAO,GACP,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,GACjB,OAAO,GACP,MAAM,CACT,CAAC;AAEF,6EAA6E;AAC7E,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,2BAA2B,EACpC,QAAQ,CAAC,EAAE,MAAM,GAChB,SAAS,cAAc,EAAE,CAgB3B;AAED,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAIR;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAEhE"}
@@ -1,31 +1,38 @@
1
1
  /**
2
- * Builds the shell command used to launch interactive Claude.
3
- * Implements PRD §4.2 and §9.1.
2
+ * Builds the launch arguments and shell command used to start interactive Claude.
3
+ * The argument list is shared by the headless PTY launch and `elwood interactive`
4
+ * (§12A.9), so the Elwood-to-Claude flag mapping cannot drift between them.
5
+ * Implements PRD §4.2, §9.1, and §12A.9.
4
6
  */
7
+ import { launchShellWords } from "../runtime/launch-arguments.js";
5
8
  import { loginShellCommand, shellQuote } from "../runtime/shell.js";
6
- export function buildClaudeShellCommand(settingsPath, options, resumeId) {
7
- const parts = ["exec", "claude", "--settings", shellQuote(settingsPath)];
9
+ /** Claude's native flags for a launch, in stable order (no `--settings`). */
10
+ export function claudeLaunchArguments(options, resumeId) {
11
+ const parts = [];
8
12
  if (resumeId)
9
- parts.push("--resume", shellQuote(resumeId));
13
+ parts.push(["--resume", resumeId]);
10
14
  if (options.model)
11
- parts.push("--model", shellQuote(options.model));
15
+ parts.push(["--model", options.model]);
12
16
  // Validated before spawn in the preflight (C-CLAUDE-20); forwarded verbatim here.
13
17
  if (options.reasoningEffort)
14
- parts.push("--effort", shellQuote(options.reasoningEffort));
15
- if (options.permissionMode) {
16
- parts.push("--permission-mode", shellQuote(options.permissionMode));
17
- }
18
+ parts.push(["--effort", options.reasoningEffort]);
19
+ if (options.permissionMode)
20
+ parts.push(["--permission-mode", options.permissionMode]);
18
21
  if (options.allowedTools && options.allowedTools.length > 0) {
19
- parts.push("--allowedTools", shellQuote(options.allowedTools.join(",")));
22
+ parts.push(["--allowedTools", options.allowedTools.join(",")]);
20
23
  }
21
24
  if (options.disallowedTools && options.disallowedTools.length > 0)
22
- parts.push("--disallowedTools", shellQuote(options.disallowedTools.join(",")));
25
+ parts.push(["--disallowedTools", options.disallowedTools.join(",")]);
23
26
  // --tools is a true allowlist; an empty list ("") disables all tools.
24
27
  if (options.tools !== undefined)
25
- parts.push("--tools", shellQuote(options.tools.join(",")));
26
- if (options.name) {
27
- parts.push("--name", shellQuote(options.name));
28
- }
28
+ parts.push(["--tools", options.tools.join(",")]);
29
+ if (options.name)
30
+ parts.push(["--name", options.name]);
31
+ return parts;
32
+ }
33
+ export function buildClaudeShellCommand(settingsPath, options, resumeId) {
34
+ const parts = ["exec", "claude", "--settings", shellQuote(settingsPath)];
35
+ parts.push(...launchShellWords(claudeLaunchArguments(options, resumeId)));
29
36
  return parts.join(" ");
30
37
  }
31
38
  export function shellLaunch(shell, command) {
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/claude/command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEpE,MAAM,UAAU,uBAAuB,CACrC,YAAoB,EACpB,OAA2B,EAC3B,QAAiB;IAEjB,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IACzE,IAAI,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D,IAAI,OAAO,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,kFAAkF;IAClF,IAAI,OAAO,CAAC,eAAe;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IACzF,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;QAC/D,KAAK,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACjF,sEAAsE;IACtE,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5F,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,KAAa,EACb,OAAe;IAEf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/claude/command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAuB,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAcpE,6EAA6E;AAC7E,MAAM,UAAU,qBAAqB,CACnC,OAAoC,EACpC,QAAiB;IAEjB,MAAM,KAAK,GAAqB,EAAE,CAAC;IACnC,IAAI,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjD,IAAI,OAAO,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1D,kFAAkF;IAClF,IAAI,OAAO,CAAC,eAAe;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC/E,IAAI,OAAO,CAAC,cAAc;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC;IACtF,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC;QAC/D,KAAK,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACvE,sEAAsE;IACtE,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClF,IAAI,OAAO,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,YAAoB,EACpB,OAA2B,EAC3B,QAAiB;IAEjB,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IACzE,KAAK,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,KAAa,EACb,OAAe;IAEf,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC;AAC9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/claude/session/index.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAM/H,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAK9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,oCAAoC,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAEjG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EACL,oCAAoC,IAAI,+BAA+B,EACvE,4BAA4B,GAC7B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAErF;AAED,gGAAgG;AAChG,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,kBAAkB,EAC9B,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAe3B;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,sBAAsB,GAAG,SAAS,sDAwBrD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/claude/session/index.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAO/H,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAK9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EAAE,oCAAoC,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAEjG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EACL,oCAAoC,IAAI,+BAA+B,EACvE,4BAA4B,GAC7B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAErF;AAED,gGAAgG;AAChG,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,kBAAkB,EAC9B,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAiB3B;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,sBAAsB,GAAG,SAAS,sDAwBrD"}
@@ -1,6 +1,7 @@
1
1
  /** ClaudeSessionApi entry points: preflight, record creation, and socket-home-guarded start. Implements PRD §5, §6, §8, §9. */
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { resolve } from "node:path";
4
+ import { applyClaudeHighTrust } from "../../core/high-trust.js";
4
5
  import { queuePersonaMessage } from "../../core/persona.js";
5
6
  import { claudeReasoningEfforts, validateReasoningEffort } from "../../core/reasoning-effort.js";
6
7
  import { withSocketHomeCleanup } from "../../runtime/startup/cleanup.js";
@@ -27,8 +28,10 @@ export async function startClaudeWithId(rawOptions, elwoodSessionId) {
27
28
  // path resolved after the await could point elsewhere if the caller's (or preflight's)
28
29
  // process.cwd() changed during it, splitting where state is written from where the CLI
29
30
  // launches (§8.1, §8.2). Thread the resolved cwd everywhere so the record, launch, and
30
- // PTY spawn all agree.
31
- const options = { ...rawOptions, cwd: resolve(rawOptions.cwd) };
31
+ // PTY spawn all agree. `highTrust` expands to its concrete posture (or rejects a
32
+ // conflicting explicit one) HERE, before preflight, so the persisted record and the
33
+ // launch command both carry the expanded posture (C-API-54).
34
+ const options = applyClaudeHighTrust({ ...rawOptions, cwd: resolve(rawOptions.cwd) });
32
35
  const stateDir = resolve(options.stateDir ?? defaultStateDir(options.cwd));
33
36
  const strict = options.strictVersionCheck ?? false;
34
37
  const warning = await preflightClaude(strict, options.autoupdate ?? false);