@with-logic/elwood 0.1.0 → 0.1.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 (777) hide show
  1. package/CHANGELOG.md +182 -3
  2. package/CONTRIBUTING.md +104 -0
  3. package/LICENSE +1 -1
  4. package/README.md +295 -26
  5. package/SECURITY.md +42 -0
  6. package/dist/claude/command.d.ts +9 -2
  7. package/dist/claude/command.d.ts.map +1 -1
  8. package/dist/claude/command.js +23 -16
  9. package/dist/claude/command.js.map +1 -1
  10. package/dist/claude/model-picker.d.ts.map +1 -1
  11. package/dist/claude/model-picker.js +4 -3
  12. package/dist/claude/model-picker.js.map +1 -1
  13. package/dist/claude/model-switch-confirmation.js +9 -1
  14. package/dist/claude/model-switch-confirmation.js.map +1 -1
  15. package/dist/claude/screen-table.js +1 -1
  16. package/dist/claude/screen-table.js.map +1 -1
  17. package/dist/claude/session/build.d.ts.map +1 -1
  18. package/dist/claude/session/build.js +3 -0
  19. package/dist/claude/session/build.js.map +1 -1
  20. package/dist/claude/session/index.d.ts.map +1 -1
  21. package/dist/claude/session/index.js +5 -2
  22. package/dist/claude/session/index.js.map +1 -1
  23. package/dist/claude/session/resume.d.ts +1 -1
  24. package/dist/claude/session/resume.d.ts.map +1 -1
  25. package/dist/claude/session/resume.js +5 -1
  26. package/dist/claude/session/resume.js.map +1 -1
  27. package/dist/claude/session/start-or-resume.js +1 -0
  28. package/dist/claude/session/start-or-resume.js.map +1 -1
  29. package/dist/claude/simple.d.ts.map +1 -1
  30. package/dist/claude/simple.js +4 -0
  31. package/dist/claude/simple.js.map +1 -1
  32. package/dist/cli/args/index.d.ts +3 -1
  33. package/dist/cli/args/index.d.ts.map +1 -1
  34. package/dist/cli/args/index.js +10 -2
  35. package/dist/cli/args/index.js.map +1 -1
  36. package/dist/cli/args/options.d.ts.map +1 -1
  37. package/dist/cli/args/options.js +2 -0
  38. package/dist/cli/args/options.js.map +1 -1
  39. package/dist/cli/args-commands.d.ts +10 -0
  40. package/dist/cli/args-commands.d.ts.map +1 -0
  41. package/dist/cli/args-commands.js +113 -0
  42. package/dist/cli/args-commands.js.map +1 -0
  43. package/dist/cli/command-types.d.ts +26 -0
  44. package/dist/cli/command-types.d.ts.map +1 -0
  45. package/dist/cli/command-types.js +9 -0
  46. package/dist/cli/command-types.js.map +1 -0
  47. package/dist/cli/config/codec-primitives.d.ts +20 -0
  48. package/dist/cli/config/codec-primitives.d.ts.map +1 -0
  49. package/dist/cli/config/codec-primitives.js +51 -0
  50. package/dist/cli/config/codec-primitives.js.map +1 -0
  51. package/dist/cli/config/codec.d.ts.map +1 -1
  52. package/dist/cli/config/codec.js +4 -46
  53. package/dist/cli/config/codec.js.map +1 -1
  54. package/dist/cli/config/effective.d.ts.map +1 -1
  55. package/dist/cli/config/effective.js +1 -0
  56. package/dist/cli/config/effective.js.map +1 -1
  57. package/dist/cli/config/keys.d.ts +1 -1
  58. package/dist/cli/config/keys.d.ts.map +1 -1
  59. package/dist/cli/config/keys.js +1 -0
  60. package/dist/cli/config/keys.js.map +1 -1
  61. package/dist/cli/entry.d.ts +4 -2
  62. package/dist/cli/entry.d.ts.map +1 -1
  63. package/dist/cli/entry.js +2 -1
  64. package/dist/cli/entry.js.map +1 -1
  65. package/dist/cli/help.d.ts +2 -2
  66. package/dist/cli/help.d.ts.map +1 -1
  67. package/dist/cli/help.js +40 -1
  68. package/dist/cli/help.js.map +1 -1
  69. package/dist/cli/interactive/index.d.ts +26 -0
  70. package/dist/cli/interactive/index.d.ts.map +1 -0
  71. package/dist/cli/interactive/index.js +33 -0
  72. package/dist/cli/interactive/index.js.map +1 -0
  73. package/dist/cli/interactive/launch.d.ts +14 -0
  74. package/dist/cli/interactive/launch.d.ts.map +1 -0
  75. package/dist/cli/interactive/launch.js +66 -0
  76. package/dist/cli/interactive/launch.js.map +1 -0
  77. package/dist/cli/interactive/spawn.d.ts +18 -0
  78. package/dist/cli/interactive/spawn.d.ts.map +1 -0
  79. package/dist/cli/interactive/spawn.js +53 -0
  80. package/dist/cli/interactive/spawn.js.map +1 -0
  81. package/dist/cli/main-failure.d.ts +28 -0
  82. package/dist/cli/main-failure.d.ts.map +1 -0
  83. package/dist/cli/main-failure.js +78 -0
  84. package/dist/cli/main-failure.js.map +1 -0
  85. package/dist/cli/main.d.ts +12 -4
  86. package/dist/cli/main.d.ts.map +1 -1
  87. package/dist/cli/main.js +27 -73
  88. package/dist/cli/main.js.map +1 -1
  89. package/dist/cli/models/index.d.ts +20 -0
  90. package/dist/cli/models/index.d.ts.map +1 -0
  91. package/dist/cli/models/index.js +63 -0
  92. package/dist/cli/models/index.js.map +1 -0
  93. package/dist/cli/models/render.d.ts +9 -0
  94. package/dist/cli/models/render.d.ts.map +1 -0
  95. package/dist/cli/models/render.js +33 -0
  96. package/dist/cli/models/render.js.map +1 -0
  97. package/dist/cli/request/index.d.ts.map +1 -1
  98. package/dist/cli/request/index.js +8 -2
  99. package/dist/cli/request/index.js.map +1 -1
  100. package/dist/cli/request/layers.d.ts +2 -0
  101. package/dist/cli/request/layers.d.ts.map +1 -1
  102. package/dist/cli/request/layers.js +9 -5
  103. package/dist/cli/request/layers.js.map +1 -1
  104. package/dist/cli/request/posture.d.ts +28 -0
  105. package/dist/cli/request/posture.d.ts.map +1 -0
  106. package/dist/cli/request/posture.js +70 -0
  107. package/dist/cli/request/posture.js.map +1 -0
  108. package/dist/cli/request/resolution-types.d.ts +1 -0
  109. package/dist/cli/request/resolution-types.d.ts.map +1 -1
  110. package/dist/cli/request/settings.d.ts +2 -12
  111. package/dist/cli/request/settings.d.ts.map +1 -1
  112. package/dist/cli/request/settings.js +2 -25
  113. package/dist/cli/request/settings.js.map +1 -1
  114. package/dist/cli/request/validation.d.ts +12 -0
  115. package/dist/cli/request/validation.d.ts.map +1 -1
  116. package/dist/cli/request/validation.js +30 -10
  117. package/dist/cli/request/validation.js.map +1 -1
  118. package/dist/cli/request/values.d.ts +1 -0
  119. package/dist/cli/request/values.d.ts.map +1 -1
  120. package/dist/cli/request/values.js +1 -0
  121. package/dist/cli/request/values.js.map +1 -1
  122. package/dist/cli/run/index.d.ts.map +1 -1
  123. package/dist/cli/run/index.js +5 -41
  124. package/dist/cli/run/index.js.map +1 -1
  125. package/dist/cli/run/subscribe.d.ts +19 -0
  126. package/dist/cli/run/subscribe.d.ts.map +1 -0
  127. package/dist/cli/run/subscribe.js +47 -0
  128. package/dist/cli/run/subscribe.js.map +1 -0
  129. package/dist/cli/session/launch.d.ts +3 -0
  130. package/dist/cli/session/launch.d.ts.map +1 -1
  131. package/dist/cli/session/launch.js +11 -0
  132. package/dist/cli/session/launch.js.map +1 -1
  133. package/dist/cli/sessions/index.d.ts +30 -0
  134. package/dist/cli/sessions/index.d.ts.map +1 -0
  135. package/dist/cli/sessions/index.js +61 -0
  136. package/dist/cli/sessions/index.js.map +1 -0
  137. package/dist/cli/sessions/list.d.ts +28 -0
  138. package/dist/cli/sessions/list.d.ts.map +1 -0
  139. package/dist/cli/sessions/list.js +63 -0
  140. package/dist/cli/sessions/list.js.map +1 -0
  141. package/dist/cli/sessions/settings.d.ts +11 -0
  142. package/dist/cli/sessions/settings.d.ts.map +1 -0
  143. package/dist/cli/sessions/settings.js +26 -0
  144. package/dist/cli/sessions/settings.js.map +1 -0
  145. package/dist/cli/table.d.ts +7 -0
  146. package/dist/cli/table.d.ts.map +1 -0
  147. package/dist/cli/table.js +14 -0
  148. package/dist/cli/table.js.map +1 -0
  149. package/dist/cli/types.d.ts +5 -1
  150. package/dist/cli/types.d.ts.map +1 -1
  151. package/dist/cli/types.js.map +1 -1
  152. package/dist/codex/command.d.ts +18 -2
  153. package/dist/codex/command.d.ts.map +1 -1
  154. package/dist/codex/command.js +39 -24
  155. package/dist/codex/command.js.map +1 -1
  156. package/dist/codex/model-picker.d.ts.map +1 -1
  157. package/dist/codex/model-picker.js +3 -2
  158. package/dist/codex/model-picker.js.map +1 -1
  159. package/dist/codex/session/build.d.ts.map +1 -1
  160. package/dist/codex/session/build.js +5 -7
  161. package/dist/codex/session/build.js.map +1 -1
  162. package/dist/codex/session/index.d.ts.map +1 -1
  163. package/dist/codex/session/index.js +5 -2
  164. package/dist/codex/session/index.js.map +1 -1
  165. package/dist/codex/session/resume.d.ts +1 -1
  166. package/dist/codex/session/resume.d.ts.map +1 -1
  167. package/dist/codex/session/resume.js +5 -1
  168. package/dist/codex/session/resume.js.map +1 -1
  169. package/dist/codex/session/start-or-resume.js +1 -0
  170. package/dist/codex/session/start-or-resume.js.map +1 -1
  171. package/dist/codex/session/types.d.ts +3 -0
  172. package/dist/codex/session/types.d.ts.map +1 -1
  173. package/dist/codex/simple.d.ts.map +1 -1
  174. package/dist/codex/simple.js +4 -0
  175. package/dist/codex/simple.js.map +1 -1
  176. package/dist/core/errors.d.ts +1 -1
  177. package/dist/core/errors.d.ts.map +1 -1
  178. package/dist/core/errors.js.map +1 -1
  179. package/dist/core/high-trust.d.ts +41 -0
  180. package/dist/core/high-trust.d.ts.map +1 -0
  181. package/dist/core/high-trust.js +50 -0
  182. package/dist/core/high-trust.js.map +1 -0
  183. package/dist/core/input/index.d.ts.map +1 -1
  184. package/dist/core/input/index.js +15 -3
  185. package/dist/core/input/index.js.map +1 -1
  186. package/dist/core/models/input.d.ts +3 -0
  187. package/dist/core/models/input.d.ts.map +1 -0
  188. package/dist/core/models/input.js +9 -0
  189. package/dist/core/models/input.js.map +1 -0
  190. package/dist/core/models/picker.d.ts +2 -1
  191. package/dist/core/models/picker.d.ts.map +1 -1
  192. package/dist/core/models/picker.js +6 -5
  193. package/dist/core/models/picker.js.map +1 -1
  194. package/dist/core/models/tui-screen.d.ts +1 -1
  195. package/dist/core/models/tui-screen.d.ts.map +1 -1
  196. package/dist/core/models/tui-screen.js +26 -3
  197. package/dist/core/models/tui-screen.js.map +1 -1
  198. package/dist/core/trust/allowlist.d.ts +56 -0
  199. package/dist/core/trust/allowlist.d.ts.map +1 -0
  200. package/dist/core/{trust-prompts.js → trust/allowlist.js} +21 -38
  201. package/dist/core/trust/allowlist.js.map +1 -0
  202. package/dist/core/trust/prompts.d.ts +4 -46
  203. package/dist/core/trust/prompts.d.ts.map +1 -1
  204. package/dist/core/trust/prompts.js +2 -73
  205. package/dist/core/trust/prompts.js.map +1 -1
  206. package/dist/core/trust/responder.d.ts +2 -0
  207. package/dist/core/trust/responder.d.ts.map +1 -1
  208. package/dist/core/trust/responder.js +4 -0
  209. package/dist/core/trust/responder.js.map +1 -1
  210. package/dist/core/types.d.ts +3 -0
  211. package/dist/core/types.d.ts.map +1 -1
  212. package/dist/runtime/launch-arguments.d.ts +12 -0
  213. package/dist/runtime/launch-arguments.d.ts.map +1 -0
  214. package/dist/runtime/launch-arguments.js +15 -0
  215. package/dist/runtime/launch-arguments.js.map +1 -0
  216. package/dist/runtime/session/base.d.ts.map +1 -1
  217. package/dist/runtime/session/base.js +4 -1
  218. package/dist/runtime/session/base.js.map +1 -1
  219. package/dist/runtime/session/commands.d.ts +2 -1
  220. package/dist/runtime/session/commands.d.ts.map +1 -1
  221. package/dist/runtime/session/commands.js +10 -4
  222. package/dist/runtime/session/commands.js.map +1 -1
  223. package/dist/runtime/session/lifecycle.d.ts +3 -4
  224. package/dist/runtime/session/lifecycle.d.ts.map +1 -1
  225. package/dist/runtime/session/lifecycle.js +6 -5
  226. package/dist/runtime/session/lifecycle.js.map +1 -1
  227. package/dist/state/directories.d.ts +4 -0
  228. package/dist/state/directories.d.ts.map +1 -0
  229. package/dist/state/directories.js +41 -0
  230. package/dist/state/directories.js.map +1 -0
  231. package/dist/state/files.d.ts.map +1 -1
  232. package/dist/state/files.js +25 -11
  233. package/dist/state/files.js.map +1 -1
  234. package/dist/state/private-session.d.ts.map +1 -1
  235. package/dist/state/private-session.js +2 -0
  236. package/dist/state/private-session.js.map +1 -1
  237. package/dist/state/store.d.ts.map +1 -1
  238. package/dist/state/store.js +7 -1
  239. package/dist/state/store.js.map +1 -1
  240. package/docs/cli-behavior.md +89 -1
  241. package/docs/cli-output.md +60 -0
  242. package/docs/cli.md +10 -2
  243. package/docs/codex/cli.md +57 -0
  244. package/docs/codex/config.md +47 -0
  245. package/docs/codex/hooks.md +70 -0
  246. package/examples/README.md +56 -0
  247. package/examples/full.ts +113 -0
  248. package/examples/minimal.ts +15 -0
  249. package/examples/stream.ts +39 -0
  250. package/examples/support.ts +71 -0
  251. package/package.json +17 -10
  252. package/prd/01-overview.md +21 -0
  253. package/prd/02-goals.md +47 -0
  254. package/prd/03-terminology.md +32 -0
  255. package/prd/04-architecture.md +121 -0
  256. package/prd/05-api/5.1-starting-claude.md +108 -0
  257. package/prd/05-api/5.2-resuming-claude.md +86 -0
  258. package/prd/05-api/5.3-claude-session-api.md +658 -0
  259. package/prd/05-api/5.4-events.md +145 -0
  260. package/prd/05-api/5.5-starting-codex.md +106 -0
  261. package/prd/05-api/5.6-resuming-codex.md +48 -0
  262. package/prd/05-api/5.7-codex-session-api.md +425 -0
  263. package/prd/05-api/5.8-session-api.md +122 -0
  264. package/prd/05-api/5.9-loops.md +170 -0
  265. package/prd/05-api/README.md +19 -0
  266. package/prd/06-claude-hook-bridge.md +164 -0
  267. package/prd/07-claude-policy.md +15 -0
  268. package/prd/07a-codex-hook-bridge.md +76 -0
  269. package/prd/08-state.md +127 -0
  270. package/prd/09-lifecycle.md +222 -0
  271. package/prd/10-errors.md +55 -0
  272. package/prd/11-test-app.md +53 -0
  273. package/prd/12-e2e.md +23 -0
  274. package/prd/12a-cli.md +375 -0
  275. package/prd/13-latitude.md +12 -0
  276. package/prd/14-conformance.md +333 -0
  277. package/prd/15-open-notes.md +8 -0
  278. package/prd/README.md +45 -0
  279. package/dist/claude/hook-dispatch.d.ts +0 -9
  280. package/dist/claude/hook-dispatch.d.ts.map +0 -1
  281. package/dist/claude/hook-dispatch.js +0 -12
  282. package/dist/claude/hook-dispatch.js.map +0 -1
  283. package/dist/claude/hook-events-extra.d.ts +0 -81
  284. package/dist/claude/hook-events-extra.d.ts.map +0 -1
  285. package/dist/claude/hook-events-extra.js +0 -6
  286. package/dist/claude/hook-events-extra.js.map +0 -1
  287. package/dist/claude/hook-events.d.ts +0 -101
  288. package/dist/claude/hook-events.d.ts.map +0 -1
  289. package/dist/claude/hook-events.js +0 -6
  290. package/dist/claude/hook-events.js.map +0 -1
  291. package/dist/claude/hook-names.d.ts +0 -24
  292. package/dist/claude/hook-names.d.ts.map +0 -1
  293. package/dist/claude/hook-names.js +0 -45
  294. package/dist/claude/hook-names.js.map +0 -1
  295. package/dist/claude/hooks.d.ts +0 -78
  296. package/dist/claude/hooks.d.ts.map +0 -1
  297. package/dist/claude/hooks.js +0 -6
  298. package/dist/claude/hooks.js.map +0 -1
  299. package/dist/claude/session-bridge.d.ts +0 -11
  300. package/dist/claude/session-bridge.d.ts.map +0 -1
  301. package/dist/claude/session-bridge.js +0 -18
  302. package/dist/claude/session-bridge.js.map +0 -1
  303. package/dist/claude/session-build.d.ts +0 -15
  304. package/dist/claude/session-build.d.ts.map +0 -1
  305. package/dist/claude/session-build.js +0 -147
  306. package/dist/claude/session-build.js.map +0 -1
  307. package/dist/claude/session-hook-handler.d.ts +0 -34
  308. package/dist/claude/session-hook-handler.d.ts.map +0 -1
  309. package/dist/claude/session-hook-handler.js +0 -42
  310. package/dist/claude/session-hook-handler.js.map +0 -1
  311. package/dist/claude/session-instance.d.ts +0 -42
  312. package/dist/claude/session-instance.d.ts.map +0 -1
  313. package/dist/claude/session-instance.js +0 -146
  314. package/dist/claude/session-instance.js.map +0 -1
  315. package/dist/claude/session-interface.d.ts +0 -49
  316. package/dist/claude/session-interface.d.ts.map +0 -1
  317. package/dist/claude/session-interface.js +0 -10
  318. package/dist/claude/session-interface.js.map +0 -1
  319. package/dist/claude/session-resume.d.ts +0 -8
  320. package/dist/claude/session-resume.d.ts.map +0 -1
  321. package/dist/claude/session-resume.js +0 -47
  322. package/dist/claude/session-resume.js.map +0 -1
  323. package/dist/claude/session-runtime.d.ts +0 -43
  324. package/dist/claude/session-runtime.d.ts.map +0 -1
  325. package/dist/claude/session-runtime.js +0 -105
  326. package/dist/claude/session-runtime.js.map +0 -1
  327. package/dist/claude/session-transcript.d.ts +0 -62
  328. package/dist/claude/session-transcript.d.ts.map +0 -1
  329. package/dist/claude/session-transcript.js +0 -88
  330. package/dist/claude/session-transcript.js.map +0 -1
  331. package/dist/claude/session.d.ts +0 -18
  332. package/dist/claude/session.d.ts.map +0 -1
  333. package/dist/claude/session.js +0 -58
  334. package/dist/claude/session.js.map +0 -1
  335. package/dist/claude/start-or-resume.d.ts +0 -12
  336. package/dist/claude/start-or-resume.d.ts.map +0 -1
  337. package/dist/claude/start-or-resume.js +0 -32
  338. package/dist/claude/start-or-resume.js.map +0 -1
  339. package/dist/claude/tool-hook-events.d.ts +0 -10
  340. package/dist/claude/tool-hook-events.d.ts.map +0 -1
  341. package/dist/claude/tool-hook-events.js +0 -18
  342. package/dist/claude/tool-hook-events.js.map +0 -1
  343. package/dist/claude/tool-types.d.ts +0 -158
  344. package/dist/claude/tool-types.d.ts.map +0 -1
  345. package/dist/claude/tool-types.js +0 -6
  346. package/dist/claude/tool-types.js.map +0 -1
  347. package/dist/claude/validate-input.d.ts +0 -8
  348. package/dist/claude/validate-input.d.ts.map +0 -1
  349. package/dist/claude/validate-input.js +0 -137
  350. package/dist/claude/validate-input.js.map +0 -1
  351. package/dist/claude/validate-permission-update.d.ts +0 -10
  352. package/dist/claude/validate-permission-update.d.ts.map +0 -1
  353. package/dist/claude/validate-permission-update.js +0 -72
  354. package/dist/claude/validate-permission-update.js.map +0 -1
  355. package/dist/claude/validate-result.d.ts +0 -7
  356. package/dist/claude/validate-result.d.ts.map +0 -1
  357. package/dist/claude/validate-result.js +0 -118
  358. package/dist/claude/validate-result.js.map +0 -1
  359. package/dist/claude/validate-shapes.d.ts +0 -22
  360. package/dist/claude/validate-shapes.d.ts.map +0 -1
  361. package/dist/claude/validate-shapes.js +0 -15
  362. package/dist/claude/validate-shapes.js.map +0 -1
  363. package/dist/claude/validate-tool-update.d.ts +0 -15
  364. package/dist/claude/validate-tool-update.d.ts.map +0 -1
  365. package/dist/claude/validate-tool-update.js +0 -122
  366. package/dist/claude/validate-tool-update.js.map +0 -1
  367. package/dist/cli/agent-detect.d.ts +0 -44
  368. package/dist/cli/agent-detect.d.ts.map +0 -1
  369. package/dist/cli/agent-detect.js +0 -66
  370. package/dist/cli/agent-detect.js.map +0 -1
  371. package/dist/cli/arg-errors.d.ts +0 -6
  372. package/dist/cli/arg-errors.d.ts.map +0 -1
  373. package/dist/cli/arg-errors.js +0 -44
  374. package/dist/cli/arg-errors.js.map +0 -1
  375. package/dist/cli/arg-options.d.ts +0 -26
  376. package/dist/cli/arg-options.d.ts.map +0 -1
  377. package/dist/cli/arg-options.js +0 -50
  378. package/dist/cli/arg-options.js.map +0 -1
  379. package/dist/cli/args.d.ts +0 -7
  380. package/dist/cli/args.d.ts.map +0 -1
  381. package/dist/cli/args.js +0 -70
  382. package/dist/cli/args.js.map +0 -1
  383. package/dist/cli/lifecycle-outcome.d.ts +0 -13
  384. package/dist/cli/lifecycle-outcome.d.ts.map +0 -1
  385. package/dist/cli/lifecycle-outcome.js +0 -20
  386. package/dist/cli/lifecycle-outcome.js.map +0 -1
  387. package/dist/cli/lifecycle.d.ts +0 -61
  388. package/dist/cli/lifecycle.d.ts.map +0 -1
  389. package/dist/cli/lifecycle.js +0 -152
  390. package/dist/cli/lifecycle.js.map +0 -1
  391. package/dist/cli/request-finalize.d.ts +0 -10
  392. package/dist/cli/request-finalize.d.ts.map +0 -1
  393. package/dist/cli/request-finalize.js +0 -135
  394. package/dist/cli/request-finalize.js.map +0 -1
  395. package/dist/cli/request-layers.d.ts +0 -30
  396. package/dist/cli/request-layers.d.ts.map +0 -1
  397. package/dist/cli/request-layers.js +0 -44
  398. package/dist/cli/request-layers.js.map +0 -1
  399. package/dist/cli/request-settings.d.ts +0 -34
  400. package/dist/cli/request-settings.d.ts.map +0 -1
  401. package/dist/cli/request-settings.js +0 -66
  402. package/dist/cli/request-settings.js.map +0 -1
  403. package/dist/cli/request-sources.d.ts +0 -13
  404. package/dist/cli/request-sources.d.ts.map +0 -1
  405. package/dist/cli/request-sources.js +0 -23
  406. package/dist/cli/request-sources.js.map +0 -1
  407. package/dist/cli/request-validation.d.ts +0 -18
  408. package/dist/cli/request-validation.d.ts.map +0 -1
  409. package/dist/cli/request-validation.js +0 -84
  410. package/dist/cli/request-validation.js.map +0 -1
  411. package/dist/cli/request-values.d.ts +0 -33
  412. package/dist/cli/request-values.d.ts.map +0 -1
  413. package/dist/cli/request-values.js +0 -73
  414. package/dist/cli/request-values.js.map +0 -1
  415. package/dist/cli/request.d.ts +0 -12
  416. package/dist/cli/request.d.ts.map +0 -1
  417. package/dist/cli/request.js +0 -103
  418. package/dist/cli/request.js.map +0 -1
  419. package/dist/cli/resolution-types.d.ts +0 -35
  420. package/dist/cli/resolution-types.d.ts.map +0 -1
  421. package/dist/cli/resolution-types.js +0 -6
  422. package/dist/cli/resolution-types.js.map +0 -1
  423. package/dist/cli/run-output-lines.d.ts +0 -14
  424. package/dist/cli/run-output-lines.d.ts.map +0 -1
  425. package/dist/cli/run-output-lines.js +0 -42
  426. package/dist/cli/run-output-lines.js.map +0 -1
  427. package/dist/cli/run-output.d.ts +0 -48
  428. package/dist/cli/run-output.d.ts.map +0 -1
  429. package/dist/cli/run-output.js +0 -150
  430. package/dist/cli/run-output.js.map +0 -1
  431. package/dist/cli/run.d.ts +0 -20
  432. package/dist/cli/run.d.ts.map +0 -1
  433. package/dist/cli/run.js +0 -126
  434. package/dist/cli/run.js.map +0 -1
  435. package/dist/cli/session-launch.d.ts +0 -23
  436. package/dist/cli/session-launch.d.ts.map +0 -1
  437. package/dist/cli/session-launch.js +0 -57
  438. package/dist/cli/session-launch.js.map +0 -1
  439. package/dist/cli/session.d.ts +0 -68
  440. package/dist/cli/session.d.ts.map +0 -1
  441. package/dist/cli/session.js +0 -124
  442. package/dist/cli/session.js.map +0 -1
  443. package/dist/codex/attach-images.d.ts +0 -20
  444. package/dist/codex/attach-images.d.ts.map +0 -1
  445. package/dist/codex/attach-images.js +0 -66
  446. package/dist/codex/attach-images.js.map +0 -1
  447. package/dist/codex/clipboard-lock.d.ts +0 -15
  448. package/dist/codex/clipboard-lock.d.ts.map +0 -1
  449. package/dist/codex/clipboard-lock.js +0 -16
  450. package/dist/codex/clipboard-lock.js.map +0 -1
  451. package/dist/codex/clipboard.d.ts +0 -32
  452. package/dist/codex/clipboard.d.ts.map +0 -1
  453. package/dist/codex/clipboard.js +0 -92
  454. package/dist/codex/clipboard.js.map +0 -1
  455. package/dist/codex/config-lock.d.ts +0 -21
  456. package/dist/codex/config-lock.d.ts.map +0 -1
  457. package/dist/codex/config-lock.js +0 -22
  458. package/dist/codex/config-lock.js.map +0 -1
  459. package/dist/codex/config-restore.d.ts +0 -33
  460. package/dist/codex/config-restore.d.ts.map +0 -1
  461. package/dist/codex/config-restore.js +0 -90
  462. package/dist/codex/config-restore.js.map +0 -1
  463. package/dist/codex/config-transaction.d.ts +0 -26
  464. package/dist/codex/config-transaction.d.ts.map +0 -1
  465. package/dist/codex/config-transaction.js +0 -47
  466. package/dist/codex/config-transaction.js.map +0 -1
  467. package/dist/codex/hook-dispatch.d.ts +0 -9
  468. package/dist/codex/hook-dispatch.d.ts.map +0 -1
  469. package/dist/codex/hook-dispatch.js +0 -14
  470. package/dist/codex/hook-dispatch.js.map +0 -1
  471. package/dist/codex/hook-names.d.ts +0 -19
  472. package/dist/codex/hook-names.d.ts.map +0 -1
  473. package/dist/codex/hook-names.js +0 -17
  474. package/dist/codex/hook-names.js.map +0 -1
  475. package/dist/codex/hooks.d.ts +0 -99
  476. package/dist/codex/hooks.d.ts.map +0 -1
  477. package/dist/codex/hooks.js +0 -6
  478. package/dist/codex/hooks.js.map +0 -1
  479. package/dist/codex/initial-ready.d.ts +0 -19
  480. package/dist/codex/initial-ready.d.ts.map +0 -1
  481. package/dist/codex/initial-ready.js +0 -19
  482. package/dist/codex/initial-ready.js.map +0 -1
  483. package/dist/codex/serialize.d.ts +0 -8
  484. package/dist/codex/serialize.d.ts.map +0 -1
  485. package/dist/codex/serialize.js +0 -48
  486. package/dist/codex/serialize.js.map +0 -1
  487. package/dist/codex/session-bridge.d.ts +0 -14
  488. package/dist/codex/session-bridge.d.ts.map +0 -1
  489. package/dist/codex/session-bridge.js +0 -20
  490. package/dist/codex/session-bridge.js.map +0 -1
  491. package/dist/codex/session-build.d.ts +0 -15
  492. package/dist/codex/session-build.d.ts.map +0 -1
  493. package/dist/codex/session-build.js +0 -144
  494. package/dist/codex/session-build.js.map +0 -1
  495. package/dist/codex/session-cleanup.d.ts +0 -12
  496. package/dist/codex/session-cleanup.d.ts.map +0 -1
  497. package/dist/codex/session-cleanup.js +0 -15
  498. package/dist/codex/session-cleanup.js.map +0 -1
  499. package/dist/codex/session-hooks.d.ts +0 -13
  500. package/dist/codex/session-hooks.d.ts.map +0 -1
  501. package/dist/codex/session-hooks.js +0 -54
  502. package/dist/codex/session-hooks.js.map +0 -1
  503. package/dist/codex/session-instance.d.ts +0 -50
  504. package/dist/codex/session-instance.d.ts.map +0 -1
  505. package/dist/codex/session-instance.js +0 -117
  506. package/dist/codex/session-instance.js.map +0 -1
  507. package/dist/codex/session-resume.d.ts +0 -7
  508. package/dist/codex/session-resume.d.ts.map +0 -1
  509. package/dist/codex/session-resume.js +0 -44
  510. package/dist/codex/session-resume.js.map +0 -1
  511. package/dist/codex/session-runtime.d.ts +0 -7
  512. package/dist/codex/session-runtime.d.ts.map +0 -1
  513. package/dist/codex/session-runtime.js +0 -10
  514. package/dist/codex/session-runtime.js.map +0 -1
  515. package/dist/codex/session-transcript.d.ts +0 -30
  516. package/dist/codex/session-transcript.d.ts.map +0 -1
  517. package/dist/codex/session-transcript.js +0 -53
  518. package/dist/codex/session-transcript.js.map +0 -1
  519. package/dist/codex/session-types.d.ts +0 -87
  520. package/dist/codex/session-types.d.ts.map +0 -1
  521. package/dist/codex/session-types.js +0 -6
  522. package/dist/codex/session-types.js.map +0 -1
  523. package/dist/codex/session-warnings.d.ts +0 -27
  524. package/dist/codex/session-warnings.d.ts.map +0 -1
  525. package/dist/codex/session-warnings.js +0 -54
  526. package/dist/codex/session-warnings.js.map +0 -1
  527. package/dist/codex/session.d.ts +0 -16
  528. package/dist/codex/session.d.ts.map +0 -1
  529. package/dist/codex/session.js +0 -61
  530. package/dist/codex/session.js.map +0 -1
  531. package/dist/codex/start-or-resume.d.ts +0 -12
  532. package/dist/codex/start-or-resume.d.ts.map +0 -1
  533. package/dist/codex/start-or-resume.js +0 -31
  534. package/dist/codex/start-or-resume.js.map +0 -1
  535. package/dist/codex/transcript/cursor-io.d.ts +0 -7
  536. package/dist/codex/transcript/cursor-io.d.ts.map +0 -1
  537. package/dist/codex/transcript/cursor-io.js +0 -7
  538. package/dist/codex/transcript/cursor-io.js.map +0 -1
  539. package/dist/codex/transcript/cursor.d.ts +0 -8
  540. package/dist/codex/transcript/cursor.d.ts.map +0 -1
  541. package/dist/codex/transcript/cursor.js +0 -8
  542. package/dist/codex/transcript/cursor.js.map +0 -1
  543. package/dist/codex/transcript/drops.d.ts +0 -9
  544. package/dist/codex/transcript/drops.d.ts.map +0 -1
  545. package/dist/codex/transcript/drops.js +0 -9
  546. package/dist/codex/transcript/drops.js.map +0 -1
  547. package/dist/codex/transcript.d.ts +0 -12
  548. package/dist/codex/transcript.d.ts.map +0 -1
  549. package/dist/codex/transcript.js +0 -10
  550. package/dist/codex/transcript.js.map +0 -1
  551. package/dist/codex/validate-result.d.ts +0 -7
  552. package/dist/codex/validate-result.d.ts.map +0 -1
  553. package/dist/codex/validate-result.js +0 -84
  554. package/dist/codex/validate-result.js.map +0 -1
  555. package/dist/codex/validate.d.ts +0 -11
  556. package/dist/codex/validate.d.ts.map +0 -1
  557. package/dist/codex/validate.js +0 -88
  558. package/dist/codex/validate.js.map +0 -1
  559. package/dist/core/activity-lifecycle.d.ts +0 -21
  560. package/dist/core/activity-lifecycle.d.ts.map +0 -1
  561. package/dist/core/activity-lifecycle.js +0 -45
  562. package/dist/core/activity-lifecycle.js.map +0 -1
  563. package/dist/core/activity-meta.d.ts +0 -13
  564. package/dist/core/activity-meta.d.ts.map +0 -1
  565. package/dist/core/activity-meta.js +0 -67
  566. package/dist/core/activity-meta.js.map +0 -1
  567. package/dist/core/activity-transcript.d.ts +0 -19
  568. package/dist/core/activity-transcript.d.ts.map +0 -1
  569. package/dist/core/activity-transcript.js +0 -60
  570. package/dist/core/activity-transcript.js.map +0 -1
  571. package/dist/core/activity.d.ts +0 -51
  572. package/dist/core/activity.d.ts.map +0 -1
  573. package/dist/core/activity.js +0 -81
  574. package/dist/core/activity.js.map +0 -1
  575. package/dist/core/control-queue-state.d.ts +0 -29
  576. package/dist/core/control-queue-state.d.ts.map +0 -1
  577. package/dist/core/control-queue-state.js +0 -95
  578. package/dist/core/control-queue-state.js.map +0 -1
  579. package/dist/core/control-queue-traits.d.ts +0 -54
  580. package/dist/core/control-queue-traits.d.ts.map +0 -1
  581. package/dist/core/control-queue-traits.js +0 -118
  582. package/dist/core/control-queue-traits.js.map +0 -1
  583. package/dist/core/control-queue-types.d.ts +0 -45
  584. package/dist/core/control-queue-types.d.ts.map +0 -1
  585. package/dist/core/control-queue-types.js +0 -7
  586. package/dist/core/control-queue-types.js.map +0 -1
  587. package/dist/core/control-queue.d.ts +0 -21
  588. package/dist/core/control-queue.d.ts.map +0 -1
  589. package/dist/core/control-queue.js +0 -98
  590. package/dist/core/control-queue.js.map +0 -1
  591. package/dist/core/list-models.d.ts +0 -44
  592. package/dist/core/list-models.d.ts.map +0 -1
  593. package/dist/core/list-models.js +0 -73
  594. package/dist/core/list-models.js.map +0 -1
  595. package/dist/core/model-picker.d.ts +0 -22
  596. package/dist/core/model-picker.d.ts.map +0 -1
  597. package/dist/core/model-picker.js +0 -58
  598. package/dist/core/model-picker.js.map +0 -1
  599. package/dist/core/model-rows.d.ts +0 -21
  600. package/dist/core/model-rows.d.ts.map +0 -1
  601. package/dist/core/model-rows.js +0 -57
  602. package/dist/core/model-rows.js.map +0 -1
  603. package/dist/core/probe-state.d.ts +0 -21
  604. package/dist/core/probe-state.d.ts.map +0 -1
  605. package/dist/core/probe-state.js +0 -39
  606. package/dist/core/probe-state.js.map +0 -1
  607. package/dist/core/session-input-abort.d.ts +0 -10
  608. package/dist/core/session-input-abort.d.ts.map +0 -1
  609. package/dist/core/session-input-abort.js +0 -44
  610. package/dist/core/session-input-abort.js.map +0 -1
  611. package/dist/core/session-input.d.ts +0 -37
  612. package/dist/core/session-input.d.ts.map +0 -1
  613. package/dist/core/session-input.js +0 -154
  614. package/dist/core/session-input.js.map +0 -1
  615. package/dist/core/session-warnings.d.ts +0 -20
  616. package/dist/core/session-warnings.d.ts.map +0 -1
  617. package/dist/core/session-warnings.js +0 -32
  618. package/dist/core/session-warnings.js.map +0 -1
  619. package/dist/core/simple/loop-controls.d.ts +0 -7
  620. package/dist/core/simple/loop-controls.d.ts.map +0 -1
  621. package/dist/core/simple/loop-controls.js +0 -7
  622. package/dist/core/simple/loop-controls.js.map +0 -1
  623. package/dist/core/startup-automation.d.ts +0 -54
  624. package/dist/core/startup-automation.d.ts.map +0 -1
  625. package/dist/core/startup-automation.js +0 -40
  626. package/dist/core/startup-automation.js.map +0 -1
  627. package/dist/core/startup-frame.d.ts +0 -39
  628. package/dist/core/startup-frame.d.ts.map +0 -1
  629. package/dist/core/startup-frame.js +0 -60
  630. package/dist/core/startup-frame.js.map +0 -1
  631. package/dist/core/startup-write.d.ts +0 -47
  632. package/dist/core/startup-write.d.ts.map +0 -1
  633. package/dist/core/startup-write.js +0 -73
  634. package/dist/core/startup-write.js.map +0 -1
  635. package/dist/core/trust-blocking.d.ts +0 -22
  636. package/dist/core/trust-blocking.d.ts.map +0 -1
  637. package/dist/core/trust-blocking.js +0 -38
  638. package/dist/core/trust-blocking.js.map +0 -1
  639. package/dist/core/trust-prompts.d.ts +0 -135
  640. package/dist/core/trust-prompts.d.ts.map +0 -1
  641. package/dist/core/trust-prompts.js.map +0 -1
  642. package/dist/core/trust-responder.d.ts +0 -48
  643. package/dist/core/trust-responder.d.ts.map +0 -1
  644. package/dist/core/trust-responder.js +0 -119
  645. package/dist/core/trust-responder.js.map +0 -1
  646. package/dist/core/tui-screen.d.ts +0 -21
  647. package/dist/core/tui-screen.d.ts.map +0 -1
  648. package/dist/core/tui-screen.js +0 -56
  649. package/dist/core/tui-screen.js.map +0 -1
  650. package/dist/core/update-warning.d.ts +0 -25
  651. package/dist/core/update-warning.d.ts.map +0 -1
  652. package/dist/core/update-warning.js +0 -33
  653. package/dist/core/update-warning.js.map +0 -1
  654. package/dist/core/warning-lifecycle.d.ts +0 -23
  655. package/dist/core/warning-lifecycle.d.ts.map +0 -1
  656. package/dist/core/warning-lifecycle.js +0 -6
  657. package/dist/core/warning-lifecycle.js.map +0 -1
  658. package/dist/core/warning-reasons.d.ts +0 -62
  659. package/dist/core/warning-reasons.d.ts.map +0 -1
  660. package/dist/core/warning-reasons.js +0 -121
  661. package/dist/core/warning-reasons.js.map +0 -1
  662. package/dist/core/warnings.d.ts +0 -145
  663. package/dist/core/warnings.d.ts.map +0 -1
  664. package/dist/core/warnings.js +0 -12
  665. package/dist/core/warnings.js.map +0 -1
  666. package/dist/runtime/cleanup-latch.d.ts +0 -27
  667. package/dist/runtime/cleanup-latch.d.ts.map +0 -1
  668. package/dist/runtime/cleanup-latch.js +0 -43
  669. package/dist/runtime/cleanup-latch.js.map +0 -1
  670. package/dist/runtime/initial-ready-advance.d.ts +0 -22
  671. package/dist/runtime/initial-ready-advance.d.ts.map +0 -1
  672. package/dist/runtime/initial-ready-advance.js +0 -39
  673. package/dist/runtime/initial-ready-advance.js.map +0 -1
  674. package/dist/runtime/initial-ready-fallback.d.ts +0 -12
  675. package/dist/runtime/initial-ready-fallback.d.ts.map +0 -1
  676. package/dist/runtime/initial-ready-fallback.js +0 -20
  677. package/dist/runtime/initial-ready-fallback.js.map +0 -1
  678. package/dist/runtime/initial-ready.d.ts +0 -49
  679. package/dist/runtime/initial-ready.d.ts.map +0 -1
  680. package/dist/runtime/initial-ready.js +0 -81
  681. package/dist/runtime/initial-ready.js.map +0 -1
  682. package/dist/runtime/reap-tree.d.ts +0 -62
  683. package/dist/runtime/reap-tree.d.ts.map +0 -1
  684. package/dist/runtime/reap-tree.js +0 -108
  685. package/dist/runtime/reap-tree.js.map +0 -1
  686. package/dist/runtime/session-base-types.d.ts +0 -36
  687. package/dist/runtime/session-base-types.d.ts.map +0 -1
  688. package/dist/runtime/session-base-types.js +0 -14
  689. package/dist/runtime/session-base-types.js.map +0 -1
  690. package/dist/runtime/session-base.d.ts +0 -48
  691. package/dist/runtime/session-base.d.ts.map +0 -1
  692. package/dist/runtime/session-base.js +0 -76
  693. package/dist/runtime/session-base.js.map +0 -1
  694. package/dist/runtime/session-commands.d.ts +0 -43
  695. package/dist/runtime/session-commands.d.ts.map +0 -1
  696. package/dist/runtime/session-commands.js +0 -52
  697. package/dist/runtime/session-commands.js.map +0 -1
  698. package/dist/runtime/session-exit.d.ts +0 -16
  699. package/dist/runtime/session-exit.d.ts.map +0 -1
  700. package/dist/runtime/session-exit.js +0 -32
  701. package/dist/runtime/session-exit.js.map +0 -1
  702. package/dist/runtime/session-image-attach.d.ts +0 -45
  703. package/dist/runtime/session-image-attach.d.ts.map +0 -1
  704. package/dist/runtime/session-image-attach.js +0 -82
  705. package/dist/runtime/session-image-attach.js.map +0 -1
  706. package/dist/runtime/session-lifecycle.d.ts +0 -61
  707. package/dist/runtime/session-lifecycle.d.ts.map +0 -1
  708. package/dist/runtime/session-lifecycle.js +0 -164
  709. package/dist/runtime/session-lifecycle.js.map +0 -1
  710. package/dist/runtime/session-loops.d.ts +0 -32
  711. package/dist/runtime/session-loops.d.ts.map +0 -1
  712. package/dist/runtime/session-loops.js +0 -62
  713. package/dist/runtime/session-loops.js.map +0 -1
  714. package/dist/runtime/session-readiness.d.ts +0 -18
  715. package/dist/runtime/session-readiness.d.ts.map +0 -1
  716. package/dist/runtime/session-readiness.js +0 -22
  717. package/dist/runtime/session-readiness.js.map +0 -1
  718. package/dist/runtime/session-reap.d.ts +0 -28
  719. package/dist/runtime/session-reap.d.ts.map +0 -1
  720. package/dist/runtime/session-reap.js +0 -51
  721. package/dist/runtime/session-reap.js.map +0 -1
  722. package/dist/runtime/session-resize.d.ts +0 -20
  723. package/dist/runtime/session-resize.d.ts.map +0 -1
  724. package/dist/runtime/session-resize.js +0 -26
  725. package/dist/runtime/session-resize.js.map +0 -1
  726. package/dist/runtime/session-shutdown-binding.d.ts +0 -30
  727. package/dist/runtime/session-shutdown-binding.d.ts.map +0 -1
  728. package/dist/runtime/session-shutdown-binding.js +0 -37
  729. package/dist/runtime/session-shutdown-binding.js.map +0 -1
  730. package/dist/runtime/session-shutdown.d.ts +0 -60
  731. package/dist/runtime/session-shutdown.d.ts.map +0 -1
  732. package/dist/runtime/session-shutdown.js +0 -140
  733. package/dist/runtime/session-shutdown.js.map +0 -1
  734. package/dist/runtime/session-status-wiring.d.ts +0 -38
  735. package/dist/runtime/session-status-wiring.d.ts.map +0 -1
  736. package/dist/runtime/session-status-wiring.js +0 -41
  737. package/dist/runtime/session-status-wiring.js.map +0 -1
  738. package/dist/runtime/session-status.d.ts +0 -7
  739. package/dist/runtime/session-status.d.ts.map +0 -1
  740. package/dist/runtime/session-status.js +0 -22
  741. package/dist/runtime/session-status.js.map +0 -1
  742. package/dist/runtime/shutdown-coordinator.d.ts +0 -57
  743. package/dist/runtime/shutdown-coordinator.d.ts.map +0 -1
  744. package/dist/runtime/shutdown-coordinator.js +0 -77
  745. package/dist/runtime/shutdown-coordinator.js.map +0 -1
  746. package/dist/runtime/startup-buffer.d.ts +0 -33
  747. package/dist/runtime/startup-buffer.d.ts.map +0 -1
  748. package/dist/runtime/startup-buffer.js +0 -53
  749. package/dist/runtime/startup-buffer.js.map +0 -1
  750. package/dist/runtime/startup-cleanup.d.ts +0 -43
  751. package/dist/runtime/startup-cleanup.d.ts.map +0 -1
  752. package/dist/runtime/startup-cleanup.js +0 -89
  753. package/dist/runtime/startup-cleanup.js.map +0 -1
  754. package/dist/runtime/startup.d.ts +0 -17
  755. package/dist/runtime/startup.d.ts.map +0 -1
  756. package/dist/runtime/startup.js +0 -47
  757. package/dist/runtime/startup.js.map +0 -1
  758. package/dist/runtime/status-emit.d.ts +0 -14
  759. package/dist/runtime/status-emit.d.ts.map +0 -1
  760. package/dist/runtime/status-emit.js +0 -15
  761. package/dist/runtime/status-emit.js.map +0 -1
  762. package/dist/runtime/teardown.d.ts +0 -15
  763. package/dist/runtime/teardown.d.ts.map +0 -1
  764. package/dist/runtime/teardown.js +0 -40
  765. package/dist/runtime/teardown.js.map +0 -1
  766. package/dist/runtime/terminate.d.ts +0 -22
  767. package/dist/runtime/terminate.d.ts.map +0 -1
  768. package/dist/runtime/terminate.js +0 -129
  769. package/dist/runtime/terminate.js.map +0 -1
  770. package/dist/runtime/update-lock.d.ts +0 -19
  771. package/dist/runtime/update-lock.d.ts.map +0 -1
  772. package/dist/runtime/update-lock.js +0 -183
  773. package/dist/runtime/update-lock.js.map +0 -1
  774. package/dist/runtime/update-once.d.ts +0 -40
  775. package/dist/runtime/update-once.d.ts.map +0 -1
  776. package/dist/runtime/update-once.js +0 -88
  777. package/dist/runtime/update-once.js.map +0 -1
package/prd/12a-cli.md ADDED
@@ -0,0 +1,375 @@
1
+ ## 12A. Headless Command-Line Interface
2
+
3
+ Elwood ships a compiled JavaScript executable named `elwood` for macOS and
4
+ Node.js 24 or newer. Local, git, and packed-tarball installs MUST run emitted
5
+ JavaScript from `dist`; an installed package MUST NOT depend on Node's native
6
+ TypeScript loading. The package's root import MUST likewise resolve to emitted
7
+ JavaScript and declarations.
8
+
9
+ ### 12A.1 Commands and input
10
+
11
+ The primary form is `elwood [options] [prompt...]`. `elwood run [options]
12
+ [prompt...]` is an exact explicit equivalent. `help`, `run`, and `config` are
13
+ commands only when they are the first argument before `--`; prompt words are
14
+ otherwise joined with spaces. `elwood help`, `elwood --help`, and `elwood
15
+ --version` MUST complete without reading user configuration or launching an
16
+ agent. `elwood config --help` and `elwood config help` MUST likewise print
17
+ config-specific help without reading configuration. An invocation with no
18
+ arguments is another exact top-level help form and MUST NOT read piped or terminal
19
+ stdin. `elwood run` remains an explicit run and therefore requires prompt input,
20
+ including when that input comes only from piped stdin.
21
+
22
+ `resume`, `interactive`, `sessions`, and `models` are further first-argument
23
+ commands with the same reservation rule; they are specified in §12A.7 through
24
+ §12A.10. Each accepts `-h`/`--help` and prints the top-level help without
25
+ reading configuration or launching an agent.
26
+
27
+ A new session defaults to the invocation directory; `-C`/`--cwd` overrides it.
28
+ When no flag, environment variable, or configuration key selects an agent, a
29
+ new session auto-detects one: Elwood tries `claude` first, then `codex`, and
30
+ uses the first whose command resolves in the user's login shell — the same
31
+ resolution the agent launch itself uses (§4.2) — without running either agent.
32
+ Both probes run concurrently; the order only decides the winner. The resolved
33
+ agent reports the source `auto-detected`. When neither command resolves, the
34
+ invocation fails before any launch with the stable code `no_agent_found` and
35
+ status 2; the message names both agents, how to install one, and that
36
+ `--agent`, `ELWOOD_AGENT`, or the config `agent` key selects one explicitly.
37
+ When the probe itself cannot run — the login shell is missing or broken, or the
38
+ probe times out — the invocation fails with the same code and status but the
39
+ message names the shell and the underlying error and says the probe failed,
40
+ because nothing is then known about which agents are installed. Adapter-specific
41
+ options that conflict with an auto-detected agent are reported as conflicting
42
+ with the auto-detected agent, and the recovery additionally offers selecting the
43
+ other adapter with `--agent`. Resume never auto-detects; it uses the stored
44
+ adapter. Elwood MUST fail when the selected adapter is unavailable and MUST NOT
45
+ silently fall back to another adapter.
46
+
47
+ Non-empty piped stdin is appended to positional prompt text after one blank
48
+ line; terminal stdin is never read. Whitespace-only input is a usage error.
49
+ Combined input has an 8 MiB UTF-8 limit that is enforced incrementally before
50
+ session creation. Repeatable `--image <path>` flags attach readable files, in
51
+ flag order, to the same user turn; paths resolve from the effective workspace.
52
+
53
+ ### 12A.2 Execution and lifecycle
54
+
55
+ CLI turns use the public normalized turn boundary and preserve normal login
56
+ shell, workspace, instruction, settings, skill, MCP, and hook behavior. By
57
+ default Elwood answers only the folder/directory and extension trust classes
58
+ documented in §5.1. `--no-trust` disables that authorization but does not
59
+ disable Codex's session-wide hook-trust bypass, which also covers non-Elwood hooks. Any other recognized blocking
60
+ prompt fails as `blocked_prompt` and reports only its stable rule label.
61
+
62
+ The built-in non-interactive launch posture is Claude `dontAsk`, and Codex
63
+ `workspace-write` with approval policy `never`. Flags and global configuration
64
+ may select the adapter, model, reasoning effort, persona, state directory,
65
+ Claude permission mode, Codex sandbox, and Codex approval policy. An
66
+ adapter-specific option is a usage error for an incompatible adapter.
67
+
68
+ `--high-trust` is the agent-neutral "never ask for permissions" switch (§5.1,
69
+ §5.5): for whichever adapter runs, it expands to Claude `bypassPermissions` or
70
+ Codex `danger-full-access` with approval policy `never`. It layers like every
71
+ other setting (`--high-trust` / `--no-high-trust`, `ELWOOD_HIGH_TRUST`, the
72
+ `highTrust` config key, built-in `false`), and `--no-high-trust` reverses an
73
+ inherited `true`. An effective `true` from a flag or environment variable
74
+ combined with an explicit per-agent posture flag or variable
75
+ (`--claude-permission-mode`, `--codex-sandbox`, `--codex-approval-policy`, or
76
+ their `ELWOOD_*` forms) in the same invocation is a usage error naming both
77
+ sources, whether the run is new or resumed. Saved `claude.permissionMode`,
78
+ `codex.sandbox`, and `codex.approvalPolicy` config keys are simply overridden by
79
+ high trust; a saved `highTrust: true` is itself overridden field by field by an
80
+ explicit per-agent flag or variable. On resume, `--high-trust` behaves like the
81
+ other posture flags: it overrides the stored posture for the resumed adapter.
82
+
83
+ Turns have no whole-invocation timeout by default. `--timeout` accepts a
84
+ positive safe integer followed by `ms`, `s`, `m`, or `h`; its deadline spans
85
+ launch, persona setup, and the user turn. Signal handlers are active before
86
+ launch. The first `SIGINT` requests interruption and cleanup, a repeated
87
+ `SIGINT` force-kills the process tree, and an interrupted invocation exits 130.
88
+
89
+ A new invocation tears down its Elwood-owned state after every outcome; teardown
90
+ does not undo workspace changes or remove history owned by the underlying agent.
91
+ `--keep` instead preserves it after stop-or-kill cleanup and reports its session
92
+ ID on stderr in text mode. A resume uses `--resume <id>` to load exactly the
93
+ stored adapter and cwd; it never falls back to a new conversation, and `--cwd`
94
+ is therefore rejected with `--resume` rather than overriding the stored
95
+ workspace. Explicit adapter conflicts are usage errors. Before launch, resumed state and its cwd MUST satisfy the private,
96
+ owner-matched, regular-file and directory constraints in §12A.5. Resume
97
+ preserves state after every outcome unless `--ephemeral` requests teardown.
98
+
99
+ A persona applies only to a new session. Elwood runs it as a separate completed
100
+ setup turn and discards that turn's response before observing the user turn. It
101
+ is a real agent turn: tools and other side effects performed during persona setup
102
+ remain even though its assistant response is omitted from CLI output. Explicit
103
+ persona plus resume is a usage error. An agent process exit before
104
+ CLI-requested cleanup is `agent_exited`, including a zero-status exit. Response
105
+ data already collected remains available on later failure.
106
+
107
+ Cleanup runs exactly once. A cleanup failure never masks a primary usage,
108
+ agent, timeout, or interruption outcome, and it changes an otherwise successful
109
+ invocation to failure.
110
+
111
+ ### 12A.3 Output protocols
112
+
113
+ Stdout is a protocol channel. Human diagnostics, warnings, progress, cleanup
114
+ failures, and text-mode preserved-session notices go only to stderr. Production
115
+ output MUST exclude raw PTY frames, raw hook payloads, terminal screen contents,
116
+ stacks, bridge credentials, and terminal escape sequences.
117
+
118
+ Text is the default output. It writes the combined assistant response — every
119
+ observed assistant text message in order, separated by one blank line — with one
120
+ trailing newline when non-empty and zero bytes for an empty response. Concise,
121
+ sanitized warnings are written to stderr by default for text and JSON runs;
122
+ JSONL represents them only as ordered warning records to avoid duplicate
123
+ diagnostics. `--verbose` adds concise elapsed-time phase, tool-name, and cleanup
124
+ progress to stderr without replaying assistant or thinking text. `--debug` emits
125
+ full sanitized normalized event details to stderr and is intended for diagnosis
126
+ rather than routine progress. `--stream` is text-only, emits assistant chunks once with one
127
+ blank line between distinct messages, preserves partial output on failure, and
128
+ adds one trailing newline when non-empty.
129
+
130
+ `--output json` emits one version-1 terminal result or error document containing
131
+ the record type, adapter, combined response, nullable session ID, integer
132
+ duration in milliseconds, and cleanup outcome. A result record's `agent` is
133
+ always the adapter that ran. An error record's `agent` is the adapter that ran
134
+ or was selected; it is `null` when the failure happened before anything selected
135
+ an adapter — for example `no_agent_found`, or an argument or configuration
136
+ failure in an invocation with neither `--agent` nor an honored `ELWOOD_AGENT`. `--output jsonl` emits
137
+ monotonically sequenced version-1 normalized text, thinking, tool, status, and
138
+ warning records, followed by exactly one terminal result or error record with
139
+ the combined response. Every JSONL record includes a non-negative integer
140
+ `elapsedMs`; tool records include a sanitized `toolCallId` when the adapter
141
+ provides one so calls and results can be paired. A parseable, explicit structured-output selection
142
+ also represents argument, configuration, and runtime failures in that protocol.
143
+
144
+ All writes MUST honor stream backpressure. Downstream `EPIPE` stops output and
145
+ cleans up without an uncaught diagnostic. Consumer closure exits 0 unless an
146
+ earlier primary outcome already established a nonzero status.
147
+
148
+ ### 12A.4 Configuration
149
+
150
+ The user config path is a non-empty `$ELWOOD_CONFIG`, otherwise
151
+ `$XDG_CONFIG_HOME/elwood/config.json` when the XDG base is absolute and
152
+ non-empty, otherwise `~/.config/elwood/config.json`. V1 does not read
153
+ project-local configuration.
154
+
155
+ Configuration is a strict version-1 JSON object. Documented keys are
156
+ `schemaVersion`, `agent`, `output`, `timeout`, `trust`, `highTrust`, `stateDir`,
157
+ `verbose`, `stream`, `persona`, `claude.model`, `claude.reasoningEffort`,
158
+ `claude.permissionMode`, `codex.model`, `codex.reasoningEffort`,
159
+ `codex.sandbox`, and `codex.approvalPolicy`. Config MUST NOT set prompt, cwd,
160
+ keep, ephemeral, resume ID, or images.
161
+
162
+ Supported environment variables are `ELWOOD_AGENT`, `ELWOOD_OUTPUT`,
163
+ `ELWOOD_TIMEOUT`, `ELWOOD_TRUST`, `ELWOOD_HIGH_TRUST`, `ELWOOD_STATE_DIR`,
164
+ `ELWOOD_VERBOSE`, `ELWOOD_STREAM`, `ELWOOD_PERSONA`, `ELWOOD_MODEL`,
165
+ `ELWOOD_REASONING_EFFORT`, `ELWOOD_CLAUDE_PERMISSION_MODE`,
166
+ `ELWOOD_CODEX_SANDBOX`, and `ELWOOD_CODEX_APPROVAL_POLICY`. Boolean variables
167
+ accept only `true` or `false`. Precedence is command-line flags, environment,
168
+ user configuration, then built-in defaults. The `agent` setting has no fixed
169
+ built-in default: when nothing selects it, a new session auto-detects the first
170
+ available of `claude` then `codex` as described in §12A.1.
171
+
172
+ Boolean settings inherited from environment or configuration remain reversible
173
+ per invocation: `--no-stream`, `--no-verbose`, and `--no-high-trust` explicitly
174
+ select false with normal flag precedence. `--no-defaults` ignores the user configuration document
175
+ and every `ELWOOD_*` run-setting variable for that invocation, while retaining
176
+ command-line flags, built-in defaults, the normal home/XDG state-location rules,
177
+ and the selected agent's inherited process environment.
178
+
179
+ `elwood config path`, `show`, `get`, `set`, and `unset` manage documented dotted
180
+ keys without launching an agent; `show` prints only the saved document.
181
+ `elwood config effective [run options]` resolves and validates launch/output
182
+ settings without reading prompt input or starting an agent, then prints one
183
+ version-1 JSON document containing the config path and whether it was loaded,
184
+ plus the effective agent, model, workspace, timeout, output controls (including
185
+ `head`), state directory, `highTrust`, and adapter permission posture. When high
186
+ trust decides a posture value, that value's source is the high-trust source
187
+ (`--high-trust`, `ELWOOD_HIGH_TRUST`, or the config path and `highTrust` key),
188
+ so the document explains WHY the posture is what it is. Claude posture includes
189
+ `permissionMode`, `allowedTools`, `disallowedTools`, and `tools`; exact resume
190
+ inspection merges persisted posture by the same field-by-field rules as launch so
191
+ the document reports the tool policy the resumed process will receive. Every
192
+ reported setting includes its source (`--flag`, `ELWOOD_*`, the saved config path
193
+ and key, stored session, invocation context, auto-detected, built-in, unset, or
194
+ not applicable). When nothing selects the agent, `config effective` reports the
195
+ auto-detected agent with source `auto-detected`, resolved by the same
196
+ login-shell command probe a run would use (§12A.1), so the document shows the
197
+ agent that invocation would actually launch; the probe only asks the shell
198
+ whether the command resolves and never starts an agent, and a missing agent is
199
+ the same `no_agent_found` failure a run would report.
200
+ Mutations are atomic and silent on success;
201
+ config parsing and writes reject unknown keys, unknown schema versions,
202
+ symlinks, non-regular files, wrong ownership, and non-private permissions.
203
+
204
+ ### 12A.5 State, failures, and compatibility
205
+
206
+ CLI-owned state defaults to `$XDG_STATE_HOME/elwood` when that base is absolute,
207
+ otherwise `~/.local/state/elwood`. It never defaults to the invocation
208
+ workspace. CLI state directories and records MUST be private, owner-matched,
209
+ regular where applicable, symlink-safe, and atomically written. One session
210
+ identity supports at most one live owner; concurrent exact resumes may fail on
211
+ the adapter's underlying startup conflict in v1.
212
+
213
+ Exit status is 0 for success or consumer closure, 1 for agent or cleanup
214
+ failure, 2 for usage or configuration failure, 124 for timeout, and 130 for
215
+ interruption. A primary nonzero status survives cleanup failure. Text errors are
216
+ concise and go to stderr while structured protocols retain stable error codes.
217
+ Unknown long options identify the token and suggest the nearest documented
218
+ option when the match is unambiguous. Validation messages identify relevant
219
+ paths and name the inherited environment/config source when it explains a
220
+ conflict, together with a concrete recovery flag when one exists. Debug mode may
221
+ include sanitized event detail but never weakens §12A.3. Static arguments, environment, config, cwd, image, and option
222
+ compatibility MUST be validated before session creation whenever validation
223
+ does not require a stored resume record.
224
+
225
+ ### 12A.6 Same-terminal head mode
226
+
227
+ `--head` is an opt-in, view-only terminal mirror for a run. It requires both a
228
+ terminal stdin and terminal stderr; the latter is the dedicated display channel,
229
+ so stdout retains the selected text or JSON protocol and may still be redirected.
230
+ The flag is invocation-only: it has no environment or configuration equivalent.
231
+ An unavailable controlling terminal is a usage failure detected before session
232
+ creation. Because the headed display exclusively owns the terminal while the
233
+ turn runs, `--head` is incompatible with `--stream`, `--verbose`, `--debug`, and JSONL's
234
+ live record protocol. It remains compatible with final text and JSON output.
235
+
236
+ Head mode MUST render the raw `terminal:data` stream verbatim to terminal stderr
237
+ after Elwood's required headless xterm render. It is a VT/ANSI terminal mirror,
238
+ not a line-oriented log: cursor-addressed repainting, alternate-screen buffers,
239
+ colors, cursor visibility, and other full-screen TUI control sequences MUST
240
+ remain intact. Raw frames remain excluded from stdout and from redirected
241
+ stderr because head mode requires that display channel to be a terminal.
242
+
243
+ Before launch, Elwood MUST size the agent PTY and headless terminal from the
244
+ headed terminal's positive integer columns and rows, falling back to the normal
245
+ Elwood terminal size for missing or invalid dimensions. During the run,
246
+ terminal resize events MUST resize both models through the public session
247
+ operation. Display writes MUST preserve order and honor backpressure. Because the
248
+ PTY producer cannot be paused at this boundary, Elwood MUST cap outstanding display
249
+ work at 4 MiB of UTF-8 data or 1,024 frames, whichever comes first. Crossing either
250
+ limit fails the run, stops accepting display frames, drains every already-accepted
251
+ byte in order, and performs the normal terminal restoration and cleanup before the
252
+ final nonzero result.
253
+
254
+ While attached, Elwood temporarily puts terminal stdin into raw mode and
255
+ discards ordinary keyboard, mouse, paste, and terminal-response bytes: v1 head
256
+ mode is observational, not interactive. Every Ctrl-C byte follows the same
257
+ first-interrupt/repeated-force-kill lifecycle as SIGINT. On every normal,
258
+ failure, timeout, or interruption outcome, Elwood MUST remove its input and
259
+ resize listeners, restore terminal stdin's prior raw/cooked mode, flush pending
260
+ display writes, reset attributes, disable mouse and bracketed-paste modes, show
261
+ the cursor, and leave the alternate screen before emitting the final stdout
262
+ protocol. `SIGKILL` cannot provide process-level terminal restoration. If the
263
+ host has already closed the terminal input handle, Elwood contains that handle's
264
+ terminal-gone error; the parent shell or terminal owner is then the only remaining
265
+ authority able to restore its modes, and that lost handle does not replace a
266
+ completed agent result with a runtime failure.
267
+
268
+ ### 12A.7 Resume subcommand
269
+
270
+ `elwood resume <id> [options] [prompt...]` is an exact parse-time rewrite of
271
+ `elwood run --resume <id> [options] [prompt...]`. Both forms share one
272
+ resolution and execution path, so stored adapter and workspace loading, the
273
+ `--cwd` rejection, explicit-adapter conflicts, `--keep`, persona, `--ephemeral`,
274
+ and prompt composition from positional words plus piped stdin behave identically.
275
+ The first positional word is the session id and the remaining words are the
276
+ prompt. A missing id is a usage error, and supplying `--resume` together with
277
+ the subcommand is a usage error rather than a silent override.
278
+
279
+ ### 12A.8 Session listing
280
+
281
+ `elwood sessions [--state-dir <path>] [--output <text|json>] [--no-defaults]`
282
+ lists the Elwood-owned session records under the effective CLI state directory,
283
+ resolved with the same flag, environment, config, and built-in precedence as a
284
+ run. It reads no prompt input and never launches an agent. Each listed record
285
+ reports the session id, adapter, stored workspace, `createdAt` (the session
286
+ directory's creation time) and `lastUsedAt` (the record's last write time) as
287
+ ISO-8601 UTC timestamps, `resumable` (whether the adapter's own conversation id
288
+ is stored), and `live` — whether a launch's bridge socket file is currently
289
+ present in the session's socket home. `live` is a cheap file-presence signal
290
+ with no side effects on a running owner: a socket left behind by a force-killed
291
+ process reads as live until that identity is next started or torn down. Records
292
+ are ordered by most recent use, then id. A record that is missing, unreadable,
293
+ or invalid under §12A.5 is skipped with one concise stderr warning and never
294
+ fails the listing; a state directory that does not exist yet is an empty listing.
295
+
296
+ Text output is an aligned table with a header row. An empty listing writes
297
+ nothing to stdout, one concise notice naming the state directory to stderr, and
298
+ exits 0. JSON output is exactly one version-1 document
299
+ `{ "schemaVersion": 1, "type": "sessions", "stateDir": "...", "sessions": [...] }`
300
+ whose array may be empty. JSONL is not a listing protocol; selecting it from any
301
+ source is a usage error that names the source. Any other run option or a
302
+ positional word is a usage error.
303
+
304
+ ### 12A.9 Interactive mode
305
+
306
+ `elwood interactive [id] [options]` starts the selected agent's own interactive
307
+ CLI in the foreground of the caller's terminal with Elwood's resolved settings
308
+ passed as that CLI's native flags, then exits with the agent's exit status (128
309
+ plus the signal number when the agent is terminated by a signal). There is no
310
+ hidden PTY, headless terminal, hook bridge, readiness or turn detection, trust
311
+ automation, or stdout protocol: the agent inherits stdin, stdout, and stderr,
312
+ Elwood neither observes nor records the conversation, and no Elwood session
313
+ record is created, updated, or removed. Both stdin and stdout MUST be terminals;
314
+ otherwise the command fails before spawning with status 2. While the agent runs,
315
+ Elwood ignores `SIGINT` so Ctrl-C reaches the agent exactly as in a direct launch.
316
+
317
+ Agent selection, model, reasoning effort, workspace (`-C`), Claude permission
318
+ mode, and Codex sandbox and approval policy resolve with normal precedence,
319
+ validate against the effective adapter before spawning, and map through the same
320
+ launch-argument builder the adapters use (`claude --model`, `--effort`,
321
+ `--permission-mode`, `--allowedTools`, `--disallowedTools`, `--tools`; `codex
322
+ --model`, `--sandbox`, `--ask-for-approval`, `--cd`, and
323
+ `-c model_reasoning_effort=...`). The built-in non-interactive posture defaults
324
+ of §12A.2 are NOT applied: a posture flag reaches the agent only when a flag,
325
+ environment variable, config key, or stored record selected it, so an
326
+ unconfigured `elwood interactive` is the agent's own default experience. Trust
327
+ flags have no effect because the user answers the agent's dialogs directly.
328
+
329
+ With `[id]`, Elwood loads the stored record exactly as `--resume` does — the
330
+ stored adapter and workspace are used, `--cwd` is rejected, a conflicting
331
+ explicit adapter is a usage error, and the private-state constraints of §12A.5
332
+ apply — merges the stored launch posture with explicit posture options field by
333
+ field (the same rule as library resume), and hands the agent its own conversation
334
+ id (`claude --resume <conversation id>` or `codex resume <conversation id>`). A
335
+ record without a stored conversation id fails as `resume_unavailable`. Because
336
+ the agent owns the resumed conversation, later `elwood resume <id>` runs see
337
+ whatever the user said interactively.
338
+
339
+ `--output json`, `--output jsonl`, `--stream`, `--verbose`, `--debug`, `--head`,
340
+ `--timeout`, `--persona`, `--image`, `--keep`, `--ephemeral`, and `--resume`
341
+ are usage errors with `interactive`, and more than one positional word is a usage
342
+ error. A launch that cannot spawn fails with the adapter's not-found error code
343
+ and status 1.
344
+
345
+ ### 12A.10 Model listing
346
+
347
+ `elwood models [options] [--output <text|json>]` briefly starts a headless
348
+ session for the selected agent — honoring agent, workspace, model, reasoning
349
+ effort, timeout, trust, state directory, and adapter posture with normal
350
+ precedence — waits for readiness, drives the agent's own model picker through
351
+ the public `listModels` operation (which opens and cancels the picker and leaves
352
+ the model unchanged), tears the session down, and exits 0. It sends no prompt,
353
+ runs no persona turn, uses a fresh session identity under the effective state
354
+ directory, and always tears that identity down, so no Elwood state remains
355
+ afterward. Starting the agent is unavoidable and the help text says so.
356
+
357
+ Text output is an aligned table with a header row: `*` in the first column marks
358
+ the current model, followed by the id, label, `(default)` when the row is the
359
+ adapter's default, and the description. JSON output is exactly one version-1
360
+ document `{ "schemaVersion": 1, "type": "models", "agent": "...", "models": [...] }`
361
+ whose rows are the `AgentModelOption` objects. Every string is sanitized under
362
+ §12A.3. Failures — timeout (124), interruption (130), blocked prompts, agent
363
+ exit, and picker automation failures — use the existing stderr, error-document,
364
+ and status conventions, and cleanup still runs exactly once. `--stream`,
365
+ `--head`, `--persona`, `--image`, `--keep`, `--resume`, `--ephemeral`,
366
+ positional words, and JSONL output are usage errors.
367
+
368
+ Listing sessions resolves only state-directory and output settings. Adapter,
369
+ model, permission, trust, and turn-lifecycle environment defaults are irrelevant
370
+ and MUST NOT prevent listing. Config files still undergo strict schema decoding.
371
+ Interactive foreground launches MUST resolve the executable in the same
372
+ interactive login-shell environment used by auto-detection. If the shell exits
373
+ successfully without returning a complete PATH probe frame, the foreground
374
+ launch MUST preserve the inherited PATH. A complete frame containing an empty
375
+ PATH remains authoritative. C-CLI-24/25.
@@ -0,0 +1,12 @@
1
+ ## 13. Implementation Latitude
2
+
3
+ The following are implementation choices unless they affect the public behavior
4
+ above:
5
+
6
+ - PTY library or native binding choice.
7
+ - IPC transport details, provided it is local-only and session-scoped.
8
+ - Exact generated settings file layout.
9
+ - Exact event-emitter implementation.
10
+ - Whether the package runs on Node.js or another compatible JavaScript runtime, as long as the TypeScript API
11
+ contract is met by supported hosts.
12
+ - Internal storage filenames under `.elwood/`.