@orion-agents/orion-code 0.3.66 → 0.4.4

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 (384) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +78 -361
  3. package/README.zh-CN.md +71 -262
  4. package/bin/orion +4 -1
  5. package/dist/acp/session-updates.d.ts +35 -0
  6. package/dist/acp/session-updates.js +183 -0
  7. package/dist/acp/sessions.d.ts +32 -0
  8. package/dist/acp/sessions.js +328 -0
  9. package/dist/acp/stdio.d.ts +3 -0
  10. package/dist/acp/stdio.js +59 -0
  11. package/dist/cli.js +136 -185
  12. package/dist/commands/context-tool-command-handlers.d.ts +1 -1
  13. package/dist/commands/context-tool-command-handlers.js +24 -3
  14. package/dist/commands/core-command-handlers.js +10 -18
  15. package/dist/commands/diagnostic-command-handlers.js +58 -48
  16. package/dist/commands/diagnostic-commands.js +0 -12
  17. package/dist/commands/init-command.d.ts +3 -0
  18. package/dist/commands/init-command.js +131 -0
  19. package/dist/commands/model-command-handlers.d.ts +1 -2
  20. package/dist/commands/model-command-handlers.js +15 -100
  21. package/dist/commands/model-commands.js +0 -11
  22. package/dist/commands/registry.js +1 -19
  23. package/dist/commands/rsi-command.d.ts +2 -0
  24. package/dist/commands/rsi-command.js +180 -0
  25. package/dist/commands/session-command-handlers.js +28 -19
  26. package/dist/commands/system-commands.js +0 -1
  27. package/dist/commands/target-command.js +49 -6
  28. package/dist/commands/tool-commands.js +1 -1
  29. package/dist/commands/types.d.ts +4 -10
  30. package/dist/commands/types.js +1 -21
  31. package/dist/commands/workflow-command-handlers.js +13 -4
  32. package/dist/commands/workflow-commands.js +2 -2
  33. package/dist/framework/loop-budget-contract.d.ts +2 -8
  34. package/dist/framework/loop-budget-contract.js +0 -3
  35. package/dist/framework/loop-progress.d.ts +18 -0
  36. package/dist/framework/loop-progress.js +63 -0
  37. package/dist/framework/prompt.d.ts +0 -2
  38. package/dist/framework/prompt.js +9 -27
  39. package/dist/framework/query.d.ts +26 -31
  40. package/dist/framework/query.js +451 -292
  41. package/dist/framework/store.d.ts +6 -10
  42. package/dist/framework/store.js +2 -21
  43. package/dist/framework/tool-call-orchestrator.d.ts +7 -0
  44. package/dist/framework/tool-call-orchestrator.js +8 -3
  45. package/dist/framework/tool-state.d.ts +2 -0
  46. package/dist/framework/tool.d.ts +0 -23
  47. package/dist/framework/verification-command.d.ts +15 -0
  48. package/dist/framework/verification-command.js +32 -0
  49. package/dist/harness/assembler.d.ts +1 -0
  50. package/dist/harness/assembler.js +24 -0
  51. package/dist/harness/capsule.d.ts +1 -1
  52. package/dist/harness/capsule.js +33 -14
  53. package/dist/harness/context-harness.d.ts +37 -12
  54. package/dist/harness/context-harness.js +545 -35
  55. package/dist/harness/contract.js +1 -1
  56. package/dist/harness/drift-guard.d.ts +4 -0
  57. package/dist/harness/drift-guard.js +68 -16
  58. package/dist/harness/index.d.ts +1 -1
  59. package/dist/harness/intent.js +21 -0
  60. package/dist/harness/ledger.d.ts +7 -11
  61. package/dist/harness/ledger.js +50 -9
  62. package/dist/harness/progress-controller.d.ts +12 -7
  63. package/dist/harness/progress-controller.js +96 -29
  64. package/dist/harness/state.js +10 -1
  65. package/dist/harness/stop-controller.d.ts +0 -5
  66. package/dist/harness/stop-controller.js +11 -31
  67. package/dist/harness/task-checklist.d.ts +16 -0
  68. package/dist/harness/task-checklist.js +92 -0
  69. package/dist/harness/types.d.ts +78 -1
  70. package/dist/harness/verification.d.ts +19 -1
  71. package/dist/harness/verification.js +116 -29
  72. package/dist/index.d.ts +1 -1
  73. package/dist/index.js +1 -3
  74. package/dist/print-ui/event-stream.d.ts +43 -0
  75. package/dist/print-ui/event-stream.js +204 -0
  76. package/dist/print-ui/launch.d.ts +12 -1
  77. package/dist/print-ui/launch.js +173 -11
  78. package/dist/product/environment.d.ts +1 -1
  79. package/dist/product/environment.js +1 -1
  80. package/dist/product/identity.d.ts +1 -1
  81. package/dist/product/identity.js +1 -1
  82. package/dist/product/paths.d.ts +3 -2
  83. package/dist/product/paths.js +6 -2
  84. package/dist/runtime/agent-loop.d.ts +12 -2
  85. package/dist/runtime/agent-loop.js +172 -29
  86. package/dist/runtime/agent-runtime-controller.d.ts +14 -4
  87. package/dist/runtime/agent-runtime-controller.js +366 -192
  88. package/dist/runtime/agent-runtime-protocol.d.ts +10 -18
  89. package/dist/runtime/agent-runtime-runner.d.ts +10 -0
  90. package/dist/runtime/builtin-tool-provider.js +5 -1
  91. package/dist/runtime/capability-receipt-journal.js +1 -0
  92. package/dist/runtime/durable-tool-receipt-reader.js +2 -1
  93. package/dist/runtime/first-party-tool-services.d.ts +1 -0
  94. package/dist/runtime/first-party-tool-services.js +2 -12
  95. package/dist/runtime/first-party-tool-universe.d.ts +1 -0
  96. package/dist/runtime/first-party-tool-universe.js +1 -1
  97. package/dist/runtime/followup-queue-store.d.ts +16 -0
  98. package/dist/runtime/followup-queue-store.js +75 -0
  99. package/dist/runtime/goal-lifecycle-v2.d.ts +16 -4
  100. package/dist/runtime/goal-lifecycle-v2.js +217 -39
  101. package/dist/runtime/goal-runtime-coordinator.d.ts +14 -2
  102. package/dist/runtime/goal-runtime-coordinator.js +147 -36
  103. package/dist/runtime/goals/presentation.js +3 -1
  104. package/dist/runtime/goals/types.d.ts +1 -3
  105. package/dist/runtime/goals/types.js +0 -3
  106. package/dist/runtime/loop-budget.d.ts +0 -7
  107. package/dist/runtime/loop-budget.js +8 -52
  108. package/dist/runtime/mcp/first-party-mcp-adapter.d.ts +2 -0
  109. package/dist/runtime/mcp/first-party-mcp-adapter.js +23 -19
  110. package/dist/runtime/model-coordinator.js +2 -5
  111. package/dist/runtime/orion-runtime-v1.d.ts +18 -2
  112. package/dist/runtime/orion-runtime-v1.js +183 -46
  113. package/dist/runtime/orion-session-runner.d.ts +7 -0
  114. package/dist/runtime/orion-session-runner.js +82 -0
  115. package/dist/runtime/plan-review.d.ts +1 -0
  116. package/dist/runtime/plan-review.js +8 -4
  117. package/dist/runtime/product-bootstrap.d.ts +6 -0
  118. package/dist/runtime/product-bootstrap.js +41 -51
  119. package/dist/runtime/product-orion-runtime.js +129 -58
  120. package/dist/runtime/release-receipts.d.ts +24 -133
  121. package/dist/runtime/release-receipts.js +129 -693
  122. package/dist/runtime/rich-text/layout.js +108 -65
  123. package/dist/runtime/rsi/contracts.d.ts +50 -0
  124. package/dist/runtime/rsi/contracts.js +17 -0
  125. package/dist/runtime/rsi/diagnosis.d.ts +46 -0
  126. package/dist/runtime/rsi/diagnosis.js +98 -0
  127. package/dist/runtime/rsi/evaluation-suite.d.ts +25 -0
  128. package/dist/runtime/rsi/evaluation-suite.js +141 -0
  129. package/dist/runtime/rsi/evaluation-worker.d.ts +19 -0
  130. package/dist/runtime/rsi/evaluation-worker.js +64 -0
  131. package/dist/runtime/rsi/evaluation.d.ts +49 -0
  132. package/dist/runtime/rsi/evaluation.js +345 -0
  133. package/dist/runtime/rsi/lifecycle.d.ts +54 -0
  134. package/dist/runtime/rsi/lifecycle.js +279 -0
  135. package/dist/runtime/rsi/proposal.d.ts +39 -0
  136. package/dist/runtime/rsi/proposal.js +312 -0
  137. package/dist/runtime/rsi/receipt.d.ts +28 -0
  138. package/dist/runtime/rsi/receipt.js +138 -0
  139. package/dist/runtime/rsi/skill-state.d.ts +7 -0
  140. package/dist/runtime/rsi/skill-state.js +50 -0
  141. package/dist/runtime/rsi/trajectory.d.ts +19 -0
  142. package/dist/runtime/rsi/trajectory.js +314 -0
  143. package/dist/runtime/rsi/triage.d.ts +274 -0
  144. package/dist/runtime/rsi/triage.js +58 -0
  145. package/dist/runtime/session-composer-control.d.ts +5 -24
  146. package/dist/runtime/session-composer-control.js +27 -189
  147. package/dist/runtime/step-snapshot.d.ts +4 -1
  148. package/dist/runtime/step-snapshot.js +11 -1
  149. package/dist/runtime/subagent-thread-runtime.js +27 -5
  150. package/dist/runtime/subagents/policy.js +0 -1
  151. package/dist/runtime/subagents/production.js +1 -5
  152. package/dist/runtime/subagents/runtime-integration.js +2 -4
  153. package/dist/runtime/subagents/types.d.ts +0 -5
  154. package/dist/runtime/subagents/types.js +0 -2
  155. package/dist/runtime/task-context-recovery.d.ts +55 -0
  156. package/dist/runtime/task-context-recovery.js +349 -0
  157. package/dist/runtime/task-context-service.d.ts +20 -10
  158. package/dist/runtime/task-context-service.js +69 -9
  159. package/dist/runtime/thread-admission.d.ts +3 -1
  160. package/dist/runtime/thread-admission.js +21 -7
  161. package/dist/runtime/thread-event-store.d.ts +2 -2
  162. package/dist/runtime/thread-event-store.js +7 -2
  163. package/dist/runtime/thread-projection.js +4 -2
  164. package/dist/runtime/thread-runtime.d.ts +10 -0
  165. package/dist/runtime/thread-runtime.js +85 -3
  166. package/dist/runtime/thread-session-index.d.ts +8 -0
  167. package/dist/runtime/thread-session-index.js +50 -1
  168. package/dist/runtime/thread-session-view.d.ts +2 -1
  169. package/dist/runtime/thread-session-view.js +4 -0
  170. package/dist/runtime/thread-tool-journal.d.ts +1 -0
  171. package/dist/runtime/thread-tool-journal.js +6 -2
  172. package/dist/runtime/thread-ui-adapter.d.ts +1 -0
  173. package/dist/runtime/thread-ui-adapter.js +89 -22
  174. package/dist/runtime/tool-gateway.d.ts +9 -0
  175. package/dist/runtime/tool-gateway.js +24 -0
  176. package/dist/runtime/tool-receipt-validator.js +4 -0
  177. package/dist/runtime/tool-transcript-entry.d.ts +16 -0
  178. package/dist/runtime/tool-transcript-entry.js +73 -0
  179. package/dist/runtime/turn-commit.d.ts +4 -1
  180. package/dist/runtime/turn-commit.js +19 -15
  181. package/dist/runtime/ui-events.d.ts +15 -1
  182. package/dist/runtime/ui-view-model.d.ts +6 -5
  183. package/dist/runtime/ui-view-model.js +78 -61
  184. package/dist/runtime/workspace-runtime-kernel.js +0 -1
  185. package/dist/runtime/workspace-verification.d.ts +7 -0
  186. package/dist/runtime/workspace-verification.js +83 -0
  187. package/dist/services/atomic-write.d.ts +2 -0
  188. package/dist/services/atomic-write.js +12 -1
  189. package/dist/services/code-review/format.d.ts +4 -1
  190. package/dist/services/code-review/format.js +5 -1
  191. package/dist/services/code-review/runner.d.ts +2 -2
  192. package/dist/services/code-review/runner.js +86 -64
  193. package/dist/services/code-review/snapshot.d.ts +9 -9
  194. package/dist/services/code-review/snapshot.js +182 -166
  195. package/dist/services/compact/auto-compact.d.ts +21 -6
  196. package/dist/services/compact/auto-compact.js +148 -22
  197. package/dist/services/compact/background-candidate.d.ts +33 -0
  198. package/dist/services/compact/background-candidate.js +184 -0
  199. package/dist/services/compact/compact.d.ts +4 -1
  200. package/dist/services/compact/compact.js +30 -3
  201. package/dist/services/compact/coordinator.d.ts +10 -4
  202. package/dist/services/compact/coordinator.js +17 -7
  203. package/dist/services/compact/summary-generator.d.ts +4 -2
  204. package/dist/services/compact/summary-generator.js +17 -3
  205. package/dist/services/config.d.ts +5 -5
  206. package/dist/services/config.js +29 -48
  207. package/dist/services/doctor.js +85 -13
  208. package/dist/services/effort.d.ts +5 -5
  209. package/dist/services/effort.js +5 -11
  210. package/dist/services/file-lock.d.ts +9 -3
  211. package/dist/services/file-lock.js +92 -26
  212. package/dist/services/global-config.d.ts +26 -64
  213. package/dist/services/global-config.js +233 -193
  214. package/dist/services/llm.d.ts +42 -4
  215. package/dist/services/llm.js +177 -45
  216. package/dist/services/model-client-pool.d.ts +15 -9
  217. package/dist/services/model-client-pool.js +62 -33
  218. package/dist/services/model-context.d.ts +2 -1
  219. package/dist/services/model-context.js +15 -9
  220. package/dist/services/model-registry.d.ts +4 -15
  221. package/dist/services/model-registry.js +32 -101
  222. package/dist/services/provider-diagnostics.d.ts +8 -0
  223. package/dist/services/provider-diagnostics.js +17 -12
  224. package/dist/services/provider-resilience/coordinator.d.ts +1 -1
  225. package/dist/services/provider-resilience/coordinator.js +10 -6
  226. package/dist/services/provider-resilience/request-gate.d.ts +3 -0
  227. package/dist/services/provider-resilience/request-gate.js +29 -18
  228. package/dist/services/provider-resilience/types.d.ts +2 -0
  229. package/dist/services/session-storage.d.ts +7 -10
  230. package/dist/services/session-storage.js +57 -30
  231. package/dist/services/settings-coordinator.d.ts +0 -6
  232. package/dist/services/settings-coordinator.js +19 -56
  233. package/dist/services/settings-document-repository.d.ts +3 -10
  234. package/dist/services/settings-document-repository.js +7 -85
  235. package/dist/services/usage-state.d.ts +3 -3
  236. package/dist/services/usage-state.js +11 -42
  237. package/dist/terminal-ui/answer-format.d.ts +14 -0
  238. package/dist/terminal-ui/answer-format.js +119 -0
  239. package/dist/terminal-ui/launch.d.ts +7 -6
  240. package/dist/terminal-ui/launch.js +160 -70
  241. package/dist/terminal-ui/output-queue.d.ts +2 -1
  242. package/dist/terminal-ui/output-queue.js +1 -1
  243. package/dist/terminal-ui/raw-editor.d.ts +2 -1
  244. package/dist/terminal-ui/raw-editor.js +56 -15
  245. package/dist/tools/core/edit-file.js +6 -2
  246. package/dist/tools/core/write-file.js +9 -2
  247. package/dist/tools/lsp.d.ts +16 -1
  248. package/dist/tools/lsp.js +60 -19
  249. package/dist/tools/sandbox.d.ts +1 -1
  250. package/dist/tools/sandbox.js +3 -16
  251. package/dist/tools/todo.d.ts +4 -2
  252. package/dist/tools/todo.js +91 -30
  253. package/dist/tui-core/input-parser.d.ts +1 -0
  254. package/dist/tui-core/input-parser.js +6 -0
  255. package/dist/tui-core/style.d.ts +1 -8
  256. package/dist/tui-core/style.js +3 -110
  257. package/dist/tui-ui/chrome-view-model.d.ts +1 -1
  258. package/dist/tui-ui/chrome-view-model.js +36 -32
  259. package/dist/tui-ui/launch.js +14 -14
  260. package/dist/tui-ui/layout.d.ts +5 -7
  261. package/dist/tui-ui/layout.js +129 -124
  262. package/dist/tui-ui/runner.d.ts +11 -12
  263. package/dist/tui-ui/runner.js +88 -67
  264. package/dist/tui-ui/state.d.ts +0 -11
  265. package/dist/tui-ui/state.js +22 -33
  266. package/dist/tui-ui/terminal-image.js +22 -4
  267. package/dist/tui-ui/transcript-inspector-layout.js +6 -3
  268. package/dist/tui-ui/transcript-inspector.d.ts +1 -0
  269. package/dist/tui-ui/transcript-inspector.js +7 -1
  270. package/dist/tui-ui/transcript-layout.js +42 -6
  271. package/dist/utils/terminal-text.d.ts +11 -0
  272. package/dist/utils/terminal-text.js +114 -0
  273. package/docs/cli-guide.md +575 -0
  274. package/docs/orion.example.yaml +43 -0
  275. package/docs/readme.md +12 -57
  276. package/npm-shrinkwrap.json +484 -1855
  277. package/package.json +13 -63
  278. package/dist/migration/command.d.ts +0 -9
  279. package/dist/migration/command.js +0 -100
  280. package/dist/migration/index.d.ts +0 -7
  281. package/dist/migration/index.js +0 -14
  282. package/dist/migration/migrate.d.ts +0 -19
  283. package/dist/migration/migrate.js +0 -406
  284. package/dist/migration/types.d.ts +0 -55
  285. package/dist/migration/types.js +0 -6
  286. package/dist/services/tool-allowlist.d.ts +0 -110
  287. package/dist/services/tool-allowlist.js +0 -299
  288. package/dist/services/yaml-config.d.ts +0 -57
  289. package/dist/services/yaml-config.js +0 -178
  290. package/dist/web/cli-options.d.ts +0 -17
  291. package/dist/web/cli-options.js +0 -51
  292. package/dist/web/code-review-run-service.d.ts +0 -68
  293. package/dist/web/code-review-run-service.js +0 -228
  294. package/dist/web/context-text.d.ts +0 -17
  295. package/dist/web/context-text.js +0 -40
  296. package/dist/web/errors.d.ts +0 -6
  297. package/dist/web/errors.js +0 -13
  298. package/dist/web/event-hub.d.ts +0 -45
  299. package/dist/web/event-hub.js +0 -370
  300. package/dist/web/file-read-service.d.ts +0 -101
  301. package/dist/web/file-read-service.js +0 -593
  302. package/dist/web/file-write-service.d.ts +0 -16
  303. package/dist/web/file-write-service.js +0 -103
  304. package/dist/web/git-compare-service.d.ts +0 -45
  305. package/dist/web/git-compare-service.js +0 -160
  306. package/dist/web/git-diff-document.d.ts +0 -102
  307. package/dist/web/git-diff-document.js +0 -258
  308. package/dist/web/git-file-source.d.ts +0 -25
  309. package/dist/web/git-file-source.js +0 -21
  310. package/dist/web/git-history-service.d.ts +0 -151
  311. package/dist/web/git-history-service.js +0 -619
  312. package/dist/web/git-index-transaction.d.ts +0 -45
  313. package/dist/web/git-index-transaction.js +0 -174
  314. package/dist/web/git-patch-builder.d.ts +0 -30
  315. package/dist/web/git-patch-builder.js +0 -138
  316. package/dist/web/git-read-model-service.d.ts +0 -452
  317. package/dist/web/git-read-model-service.js +0 -1833
  318. package/dist/web/git-version-service.d.ts +0 -79
  319. package/dist/web/git-version-service.js +0 -279
  320. package/dist/web/host-daemon.d.ts +0 -70
  321. package/dist/web/host-daemon.js +0 -237
  322. package/dist/web/index.d.ts +0 -6
  323. package/dist/web/index.js +0 -28
  324. package/dist/web/launch.d.ts +0 -12
  325. package/dist/web/launch.js +0 -89
  326. package/dist/web/native-directory-picker.d.ts +0 -63
  327. package/dist/web/native-directory-picker.js +0 -169
  328. package/dist/web/protocol.d.ts +0 -705
  329. package/dist/web/protocol.js +0 -639
  330. package/dist/web/review-service.d.ts +0 -22
  331. package/dist/web/review-service.js +0 -68
  332. package/dist/web/server.d.ts +0 -20
  333. package/dist/web/server.js +0 -1453
  334. package/dist/web/session-runtime-registry.d.ts +0 -138
  335. package/dist/web/session-runtime-registry.js +0 -471
  336. package/dist/web/terminal-manager.d.ts +0 -156
  337. package/dist/web/terminal-manager.js +0 -779
  338. package/dist/web/terminal-server.d.ts +0 -8
  339. package/dist/web/terminal-server.js +0 -304
  340. package/dist/web/workbench-controller.d.ts +0 -395
  341. package/dist/web/workbench-controller.js +0 -3077
  342. package/dist/web/workspace-discovery.d.ts +0 -92
  343. package/dist/web/workspace-discovery.js +0 -324
  344. package/dist/web/workspace-mutation-arbiter.d.ts +0 -54
  345. package/dist/web/workspace-mutation-arbiter.js +0 -267
  346. package/dist/web/workspace-open-telemetry.d.ts +0 -55
  347. package/dist/web/workspace-open-telemetry.js +0 -73
  348. package/dist/web-client/assets/FilesPanel-CPDovK_K.js +0 -1
  349. package/dist/web-client/assets/GitPanel-DtU_TD61.js +0 -4
  350. package/dist/web-client/assets/ReviewPanel-vMO7BEA3.js +0 -6
  351. package/dist/web-client/assets/TerminalPanel-C9vDTAlS.js +0 -23
  352. package/dist/web-client/assets/TerminalPanel-DLuoa74B.css +0 -1
  353. package/dist/web-client/assets/index-CABdwh4l.css +0 -1
  354. package/dist/web-client/assets/index-KvshfEbl.js +0 -20
  355. package/dist/web-client/assets/useAutoNotice-IE1g2wcb.js +0 -1
  356. package/dist/web-client/favicon.svg +0 -9
  357. package/dist/web-client/index.html +0 -17
  358. package/docs/architecture/agent-mode-permission-contract.md +0 -87
  359. package/docs/architecture/v0.3.0-web-api.yaml +0 -1340
  360. package/docs/architecture/v0.3.1-web-api.yaml +0 -2338
  361. package/docs/architecture/v0.3.2-web-api.yaml +0 -3029
  362. package/docs/architecture/v0.3.3-web-api.yaml +0 -3205
  363. package/docs/architecture/v0.3.4-stabilization-contract.md +0 -32
  364. package/docs/migration/v0.1.9-to-v0.2.0.md +0 -98
  365. package/docs/migration/v0.2.2-to-v0.3.0-settings.md +0 -114
  366. package/docs/migration/v0.2.2-to-v0.3.0.md +0 -55
  367. package/docs/migration/v0.3.0-to-v0.3.1.md +0 -88
  368. package/docs/migration/v0.3.1-to-v0.3.2.md +0 -94
  369. package/docs/migration/v0.3.2-to-v0.3.3.md +0 -62
  370. package/docs/migration/v0.3.3-to-v0.3.4.md +0 -36
  371. package/docs/orion.example.json +0 -86
  372. package/docs/plan/v0.2.0-dsh-harness-redesign-plan.md +0 -1234
  373. package/docs/plan/v0.2.0-release-checklist.md +0 -91
  374. package/docs/plan/v0.3.0-node-runtime-compatibility-plan.md +0 -57
  375. package/docs/plan/v0.3.0-settings-integration-plan.md +0 -740
  376. package/docs/plan/v0.3.0-web-workbench-plan.md +0 -376
  377. package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +0 -848
  378. package/docs/plan/v0.3.2-web-workbench-layout-and-composer-plan.md +0 -869
  379. package/docs/plan/v0.3.3-plan.md +0 -1113
  380. package/docs/plan/v0.3.4-stabilization-plan.md +0 -89
  381. package/docs/test/v0.3.1-web-workbench-e2e-plan.md +0 -140
  382. package/docs/test/v0.3.2-web-workbench-e2e-plan.md +0 -100
  383. package/docs/test/v0.3.3-web-workbench-e2e-plan.md +0 -79
  384. package/docs/test/v0.3.4-stabilization-e2e-plan.md +0 -54
package/CHANGELOG.md CHANGED
@@ -22,6 +22,93 @@ which is **not** a pass.
22
22
 
23
23
  ## [Unreleased]
24
24
 
25
+ ## [0.4.4] — UNRELEASED
26
+
27
+ - Invalidate verification after shell or external edits. A matching fresh check is required to complete the task (#372).
28
+ - Show separate durable counts for workspace changes, verification, task state, read-only findings, and model output in `/usage` (#373).
29
+ - Restore a Goal in place after a token, active-time, or provider quota stop. New Goals only use explicitly configured or specified totals. Queued user turns run before automatic continuation (#385).
30
+
31
+ ## [0.4.3] — UNRELEASED
32
+
33
+ - Serve ACP v1 over stdio with `orion acp`, using the shared Runtime for coding tasks.
34
+ - Stream answers and tool states, cancel active prompts, and restore ACP sessions across process restarts.
35
+ - Accept session-scoped stdio MCP servers from ACP clients.
36
+
37
+ ## [0.4.1] — UNRELEASED
38
+
39
+ - Improve TUI Markdown spacing, compact table layout, and narrow-terminal code wrapping.
40
+ - Show readable tool commands and bounded results in the transcript and after session restore.
41
+ - Clean up duplicate Terminal input, assistant formatting, and the turn completion display.
42
+ - Keep requests for runnable examples from creating unintended verification requirements.
43
+
44
+ ## [0.4.0] — CANDIDATE (local deployment)
45
+
46
+ Status: candidate. Source on `plan/v0.4.0-cli`; not tagged, not published to npm, no GitHub Release.
47
+
48
+ - Strategic pivot: CLI/TUI is the sole product surface. Desktop (Swift, Electron) and the
49
+ Web Workbench product chain are frozen and removed from the build (`web/`, `src/web/`,
50
+ `orion web`, browser E2E, React/xterm/node-pty/ws/Vite/Playwright dependencies).
51
+ - Global configuration moved to a single `orion.yaml` with strict YAML validation
52
+ (duplicate keys at every depth, non-map roots and scalars rejected; redacted field-level diagnostics;
53
+ locked/CAS/atomic `0600` writes). `docs/orion.example.yaml` added; legacy JSON config
54
+ and old-format local data are not migrated (fresh-install contract).
55
+ - Tool access is enabled by default in TUI and non-interactive runs. YAML permission presets,
56
+ project tool lists, and session permission overrides are retired. Tool validation, workspace
57
+ containment, and configured sandbox checks continue to apply.
58
+ - Git diff and commit planning run independently of model configuration. CLI startup no longer
59
+ writes first-start metadata into YAML. The retired migration and renderer entries were removed.
60
+ - TUI shows a compact thinking line. Tool results contribute one status row per invocation to
61
+ the transcript, including restored sessions and JSON output (#331, #332).
62
+ - TUI restores the current session's tool inspector and preserves the draft when exiting it
63
+ in narrow terminals.
64
+ - The technical terminal keeps streamed text on the same line until a real line break or
65
+ wrap. It separates thinking from answers and shows numbered tool lifecycle records,
66
+ including results in restored history.
67
+ - Invalid YAML reports the config path, location, and a safe parser reason. A bad edit pauses
68
+ new model turns until the file is repaired (#333).
69
+ - Session model switching commits compacted history through the Runtime maintenance
70
+ transaction; restore, restart and the next request consume the same durable candidate (#282).
71
+ - Tool results retain bounded recovery previews after the shared compression allowance is
72
+ exhausted, with authoritative budget metadata and full original output events (#328).
73
+ - Goal per-turn budgets now use the configured task profile. Verified progress and unfinished
74
+ work allow durable checkpoint continuation; total token/time limits, manual continuation,
75
+ interrupt and replay protection remain enforced (#329).
76
+ - LSP queries synchronize on-disk edits with document versions, encode file URIs, and decode
77
+ UTF-8 byte frames correctly; real TypeScript server coverage includes edited hover (#281).
78
+ - File locks reject file-level symlinks, retain directory alias exclusion and token-owned
79
+ release, and recover dead owners without waiting for a stale timeout.
80
+ - Release validation and CI now attest CLI-only artifacts, exact Node 22.12.0 / 24.0.0 /
81
+ 26.0.0 installed runtime probes, and source-bound test/Harness receipts.
82
+ - Doctor: new `proxy-environment` check (warn + redacted remediation for injected
83
+ HTTP(S)_PROXY) and registry-aware provider diagnostics for custom models.
84
+ - Startup to first editable prompt measured at ~0.4s (M0's ~3s reading was a harness bug).
85
+ - Real PTY E2E: TUI main flow, Goal lifecycle, agent modes, research, print mode smokes
86
+ and compact/restart/completion audit pass. Latest local Jest run passed all 298 suites
87
+ with 3,778 tests passed, 6 skipped, and 70.54% branch coverage. Candidate package and remote CI
88
+ verification are recorded separately from these source results.
89
+
90
+ ## [0.3.67] — UNRELEASED
91
+
92
+ > **Status: candidate.** Open. Three user-reported bug fixes verified against the
93
+ > current main: a mode change no longer hides a real text hunk in the Git viewer
94
+ > (#279), Git history message search is now literal substring matching (#280),
95
+ > and TypeScript hover synchronises the document with the language server before
96
+ > querying it (#281). #282 (v2 compact restore) is deliberately out of scope: it
97
+ > requires a dedicated change to the authoritative restore chain. Not merged,
98
+ > tagged or published.
99
+
100
+ ### Fixed
101
+
102
+ - #279: classify a diff with both `old mode`/`new mode` and a real `@@` hunk as
103
+ `text`; the production viewer renders both mode metadata and text changes.
104
+ Pure mode changes remain metadata-only.
105
+ - #280: Git history message filtering now passes `--fixed-strings` to Git, so
106
+ punctuation such as `[` and `[ui]` is matched literally instead of as a
107
+ regex (or an unbalanced-bracket error).
108
+ - #281: `lsp_get_hover` sends `textDocument/didOpen` once per URI with the
109
+ target file content before querying, eliminating `success: true` with empty
110
+ output on a freshly started language server.
111
+
25
112
  ## [0.3.66] — 2026-11-18
26
113
 
27
114
  > **Status: candidate.** Product-fix slice for the Web project navigator
package/README.md CHANGED
@@ -1,410 +1,127 @@
1
1
  # Orion Code
2
2
 
3
- Local-first, goal-driven coding agent for the terminal and browser.
3
+ Local-first, goal-driven coding agent for the terminal (CLI/TUI).
4
4
 
5
- > v0.3.66 candidate — open. Product-fix slice: every non-active project row in
6
- > the Web project navigator now carries a workspace removal entry (unavailable
7
- > projects remove immediately; available ones go through a confirmation dialog
8
- > that preserves disk-side sessions; the active row stays disabled per the
9
- > Host `workspace_active` contract). Previously workspaces added through the
10
- > dialog had no delete or archive entry. The previous release 0.3.65 is on npm
11
- > (registry `latest`), tagged `v0.3.65`; the `WEB32-P0-08` root cause remains
12
- > open (`docs/plan/evidence/v0.3.53/investigation-and-audit.md`).
5
+ > v0.4.4 is a candidate for Goal recovery and Harness evidence fixes.
6
+ > Web Workbench and desktop product surfaces are retired. Configuration is `orion.yaml`;
7
+ > old-version data compatibility and migration are not part of this release.
8
+ > A version number or local installation is not proof of release qualification or npm publication.
13
9
 
14
- [中文说明](README.zh-CN.md) ·
15
- [v0.3.24 plan](docs/plan/v0.3.24-plan.md) ·
16
- [v0.3.7 plan](docs/plan/v0.3.7-left-rail-improvement-plan.md) ·
17
- [v0.3.6 plan](docs/plan/v0.3.6-plan.md) ·
18
- [v0.3.5 plan](docs/plan/v0.3.5-plan.md) ·
19
- [v0.3.4 stabilization plan](docs/plan/v0.3.4-stabilization-plan.md) ·
20
- [v0.3.4 contract](docs/architecture/v0.3.4-stabilization-contract.md) ·
21
- [v0.3.4 E2E plan](docs/test/v0.3.4-stabilization-e2e-plan.md) ·
22
- [v0.3.4 migration](docs/migration/v0.3.3-to-v0.3.4.md) ·
23
- [v0.3.3 plan](docs/plan/v0.3.3-plan.md) ·
24
- [v0.3.3 Web API](docs/architecture/v0.3.3-web-api.yaml) ·
25
- [mode/permission contract](docs/architecture/agent-mode-permission-contract.md) ·
26
- [v0.3.3 E2E plan](docs/test/v0.3.3-web-workbench-e2e-plan.md) ·
27
- [v0.3.3 migration](docs/migration/v0.3.2-to-v0.3.3.md) ·
28
- [v0.3.0 Web plan](docs/plan/v0.3.0-web-workbench-plan.md) ·
29
- [Settings plan](docs/plan/v0.3.0-settings-integration-plan.md) ·
30
- [Node compatibility](docs/plan/v0.3.0-node-runtime-compatibility-plan.md) ·
31
- [Web API](docs/architecture/v0.3.0-web-api.yaml) ·
32
- [Migration guide](docs/migration/v0.2.2-to-v0.3.0.md) ·
33
- [Settings migration](docs/migration/v0.2.2-to-v0.3.0-settings.md) ·
34
- [real-state gallery](docs/assets/screenshots/v0.3.0-web/README.md)
10
+ [中文说明](README.zh-CN.md) · [CLI guide](docs/cli-guide.md) ·
11
+ [YAML example](docs/orion.example.yaml) · [Changelog](CHANGELOG.md)
35
12
 
36
- ## What v0.3.7 changes
13
+ ## Capabilities
37
14
 
38
- - **Left rail status copy** is shortened (已连接 / 离线 / …) with full sentences on hover.
39
- - **Per-Session overflow menu** replaces the rename icon — 重命名… / 管理标签… / 归档 /
40
- 删除…, fully keyboard navigable, deleting requires an explicit confirmation dialog.
41
- - **Session tags**: up to 8 persisted tags per Session, edited as chips and shown as
42
- badges on rows; archive hides a Session (all files kept) into a rail 已归档 section
43
- with one-click restore.
44
- - **Workspace dialog** rework: "打开或新增项目" with suggested workspaces, a collapsible
45
- "其他工作区" list and busy/validation feedback.
15
+ - Explore and change local repositories through a shared Agent Runtime and ToolGateway.
16
+ - Use the default TUI for input, streaming activity, approvals and review.
17
+ - Drive Orion from an [ACP v1 client](docs/cli-guide.md#acp-接入) with `orion acp`.
18
+ - Save sessions, plans and Goals; recover data created by this version after restart.
19
+ - Load Model, Skills and MCP capabilities on demand; inspect configuration with `orion doctor`.
20
+ - Distinguish execution stopping from evidence-backed completion.
46
21
 
47
- ## What v0.3.6 changes
48
-
49
- - **A component-rendering contract layer.** Six `.test.tsx` suites (89 cases) assert the web
50
- workbench UI through `renderToStaticMarkup` — no jsdom needed — pinning Markdown tables and
51
- headings, status dots, the shortcut help dialog, the diff viewer, the permission card and the
52
- resize separator keyboard contract.
53
- - **Keyboard-reachable resize separators.** Project navigation and work-panel splitters expose
54
- full separator semantics (`aria-valuenow`/`aria-valuetext`) and answer ←/→ (±2%, Shift ±10%),
55
- Home/End and Enter/Space from the keyboard.
56
- - **Status without colour alone.** A shared `StateDot` adds a shape channel (`data-tone`) and a
57
- screen-reader label to every status dot — reasoning, research sources, review evidence and the
58
- work-panel rail.
59
- - **Single-source shortcut help.** `⌘/` opens a help dialog rendered from the same binding table
60
- the live handlers match against.
61
- - **Theme cycle in the header.** One click walks system → light → dark and persists through the
62
- settings document; light tokens stay consolidated in the blocksmith token sheet.
63
- - **Stacked notifications.** Toasts queue instead of overwriting, auto-dismiss after 5s unless
64
- error/recovery, and grade `aria-live` by severity.
65
-
66
- ## What v0.3.5 changes
67
-
68
- - **Session snapshot state is its own machine.** A failed HTTP snapshot marks only the foreground
69
- Session `failed` and never flips the live SSE into `replay-required`; Composer and command gates
70
- require both a live transport and a ready foreground Session snapshot.
71
- - **Instant Session switching.** A cached projection renders synchronously, a bounded tail snapshot
72
- refreshes it in the background, the most recent Sessions are prefetched after a baseline, and stale
73
- responses can never overwrite the browser-local foreground.
74
- - **Runtime ownership across Workspaces.** The Host-level Session actor registry is created once per
75
- Host. A Workspace Context switch swaps only the active control plane; Session actors of other
76
- Workspaces keep running on the Workspace kernel they were created with, and only Host shutdown
77
- closes every actor and kernel. Failed switches roll back without rebuilding the registry.
78
- - **Provable runtime ownership.** Host and browser diagnostics count Session snapshot requests,
79
- latency and failures, Session switches and cache hits, and actor allocation/eviction/closure — so a
80
- pure selection provably allocates zero Session Runtimes.
81
- - **Release hygiene.** Version identity moves to 0.3.5; `release:check` understands `codex/vX.Y.Z`
82
- and `GITHUB_HEAD_REF`; the Web rail no longer hardcodes a fallback version.
83
-
84
- This branch also carries the merged [v0.3.4 stabilization](#what-v034-stabilizes) below.
85
-
86
- ## What v0.3.4 stabilizes
87
-
88
- - **Context-bound writes.** Settings mutations now carry the active Workspace and Context revision;
89
- stale tabs fail with no write or Runtime apply. Blank Session renames and busy slash commands also
90
- fail without corrupting durable or active-turn state.
91
- - **One sensitive-data boundary.** Structured credentials, URL userinfo, canonical file targets,
92
- Git diff paths, tool artifacts and concurrent command output are checked and redacted before they
93
- reach browser or evidence surfaces.
94
- - **Deterministic Terminal transport.** Split surrogate pairs, browser write backpressure and
95
- reconnect races preserve complete Unicode and the required replay, live-tail, exit and close
96
- order.
97
- - **Honest durable/read projections.** Tool receipt and journal facts must validate as a pair;
98
- symbolic links expose an effective target kind without losing lexical identity, and Review
99
- distinguishes total changed files from its bounded visible page.
100
- - **Fail-closed release proof.** Failed live canaries, duplicate runtime evidence and lifecycle
101
- scripts hidden inside a supposedly safe package-install stage are release blockers.
102
-
103
- ## What v0.3.3 includes
104
-
105
- - **One execution spine, bounded Web Session actors.** Web Sessions use the same product bootstrap,
106
- AgentRuntimeController, Session/Thread stores, ToolGateway, approvals, Goals, Plans, Skills and MCP
107
- boundaries as the terminal product. Up to three Session turns may run concurrently with four
108
- resident actors; the TUI and terminal surfaces keep their single-active-Session contract.
109
- - **Orion Blocksmith.** A bundled pixel-workshop style combines with system/light/dark themes without
110
- remote assets, dynamic theme code or a second settings source. Classic remains available as an
111
- explicit built-in style.
112
- - **Recoverable Web workbench.** The React workbench includes workspace/session navigation,
113
- transcript and tool activity, BUILD/PLAN/AUTO, follow-ups, interrupt, approvals, Goal/Plan,
114
- model/effort settings, Skills/MCP and diagnostics. Snapshots plus cursor replay repair refreshes
115
- and SSE reconnects.
116
- - **Professional project shell.** The left navigator shows registered projects with lazy Session
117
- pages, resizes from 240–480px and collapses to a 48px rail while the center remains the only Agent
118
- conversation. A resizable right dock provides Agent, Review, Terminal, Files and Git surfaces;
119
- narrow screens use mutually exclusive drawers without overwriting desktop preferences.
120
- - **Composer Control Center.** Mode, Session permission, model, Effort and Context are accessible
121
- menus beside the textarea. Runtime current/last-good/pending/error state is explicit; active-turn
122
- model changes defer safely and smaller-context switches run verified Compact first.
123
- - **Reviewable plans and bounded context.** PLAN commits a durable review state and never starts
124
- implementation before exact-digest approval. Structured file/folder/review/session/Skill refs,
125
- revisioned queue editing and Session-scoped drafts keep prompt intent visible and recoverable.
126
- - **Local security boundary.** The host binds only `127.0.0.1`; writes require an exact Origin,
127
- process nonce, JSON body and idempotency key. Responses use a restrictive CSP, browser payloads
128
- are redacted, and large tool results are byte-paged instead of placed on the event stream.
129
- - **Host-owned Settings.** Appearance, the default model, workspace effort and the global tool
130
- confirmation policy use one strict, revisioned `orion.json` coordinator. Atomic batches, file-lock
131
- CAS, external-edit invalidation, last-good recovery and explicit source/scope/apply metadata keep
132
- the browser, slash commands, TUI and Runtime on the same persisted truth.
133
- - **Deliberate DSH adaptation.** The design was source-audited against a fixed DeepSeek Harness
134
- revision. DSH's browser uses POST plus two downlink WebSockets; Orion intentionally uses JSON
135
- HTTP plus one replayable SSE downlink while retaining Orion's Model/Skills/MCP boundaries.
136
-
137
- ## What changed in v0.2.0
138
-
139
- Orion now has one product execution spine:
140
-
141
- ```text
142
- Thread → Turn → Step → Item
143
- │
144
- ├─ frozen prompt/model/capability snapshot
145
- └─ Capability → Policy → Approval → Sandbox → Execute → durable receipt
146
- ```
147
-
148
- - **Lean by default.** Ordinary coding starts with seven exact core tools instead of sending every
149
- built-in schema. Long-tail Git, LSP, web, Skill, MCP, batch, and subagent capabilities are selected
150
- only when the task needs them.
151
- - **One trustworthy loop.** Root turns and child agents use the same Agent Loop and ToolGateway;
152
- schema and dispatch are bound by the same Step Snapshot.
153
- - **Lazy extensions.** Skill catalogs contain bounded descriptors; definition bodies and resources
154
- load only after selection. Configured MCP servers stay disconnected until an exact server/tool is
155
- selected and release their lease when idle.
156
- - **Durable completion.** History, TaskContext evidence, Goal state, StopDecision, capability
157
- receipts, and Plan receipts commit together. A productive Goal may continue beyond 20 turns and
158
- exits automatically only after its completion audit passes.
159
- - **Crash-safe recovery.** Append-only runtime facts are authoritative. UI projection, Compact,
160
- legacy-session cutover, and resume are digest-checked and fail closed on partial or conflicting
161
- state.
162
- - **Stable interaction.** TUI, terminal, print, Plan, Goal, Compact, and subagents consume the same
163
- versioned runtime protocol.
164
-
165
- The design borrows scoped resource lifecycle ideas from DeepSeek Harness and immutable execution
166
- contracts from Codex while keeping Orion's Goal/Evidence model at the center. Orion is **not** a
167
- plugin marketplace or arbitrary JavaScript plugin host; Model, Skills, and MCP remain the supported
168
- user extension boundaries.
22
+ This is a coding agent, not a general-purpose IDE or plugin marketplace. Supporting a provider
23
+ does not prove that a particular model or coding task passed quality evaluation.
169
24
 
170
25
  ## Install
171
26
 
172
- Node.js 22.12+, 24, and 26 are supported. Use Node 24 LTS for production or Node 26 Current for
173
- current development environments. Node 20 is upstream EOL and is no longer a v0.3 runtime.
27
+ Supported Node.js: **22.x (22.12+), 24.x or 26.x**.
28
+ The exact package qualification floors are 22.12.0 / 24.0.0 / 26.0.0.
174
29
 
175
- To install the pinned v0.3.33 package when it is available on npm:
30
+ Install a local candidate from the exact tested tarball, substituting its actual path:
176
31
 
177
32
  ```bash
178
- npm install -g @orion-agents/orion-code@0.3.66
33
+ npm install -g /absolute/path/orion-agents-orion-code-0.4.4.tgz
179
34
  orion --version
180
35
  orion doctor
181
36
  ```
182
37
 
183
- To run from source:
38
+ Only after npm publication has been separately verified, use the pinned registry install:
184
39
 
185
40
  ```bash
186
- git clone https://github.com/orion-agents/orion-code.git
187
- cd orion-code
188
- npm install
189
- npm run build
190
- npm run start
191
- ```
192
-
193
- ## Configure a model
194
-
195
- Orion reads `~/.orion-code/orion.json`. Start from
196
- [`docs/orion.example.json`](docs/orion.example.json). Provider keys may be literal local values or
197
- environment references such as `$HUOSHAN_API_KEY`; never commit credentials.
198
-
199
- Minimal OpenAI-compatible example:
200
-
201
- ```json
202
- {
203
- "schemaVersion": 1,
204
- "providers": [
205
- {
206
- "id": "my-provider",
207
- "displayName": "My Provider",
208
- "baseUrl": "https://example.invalid/v1",
209
- "apiKey": "$MY_PROVIDER_API_KEY",
210
- "protocol": "openai-completions"
211
- }
212
- ],
213
- "models": [
214
- {
215
- "id": "my-model",
216
- "displayName": "My Model",
217
- "provider": "my-provider",
218
- "model": "model-name",
219
- "contextWindow": 200000,
220
- "maxOutputTokens": 8192
221
- }
222
- ],
223
- "defaultModel": "my-model",
224
- "toolConfirmation": "allow"
225
- }
41
+ npm install -g @orion-agents/orion-code@0.4.4
226
42
  ```
227
43
 
228
- Run `orion doctor` after configuration. Diagnostics never need to print the secret itself.
229
-
230
- ## Use Orion
44
+ From a checkout of the candidate branch:
231
45
 
232
46
  ```bash
233
- orion # default product TUI
234
- orion --ui terminal # technical terminal fallback
235
- orion web # local Web Workbench; opens a browser
236
- orion web --no-open --port 0 # choose an ephemeral loopback port
237
- orion web --cwd /path/to/repo # start against another existing workspace
238
- orion -p "explain this repo" # experimental non-interactive mode
239
- orion -p --output-format json "run the focused tests"
240
- orion diff
241
- orion commit
47
+ npm ci
48
+ npm run build
49
+ npm run start
242
50
  ```
243
51
 
244
- Experimental non-interactive print mode is available through `orion -p`; keep it out of
245
- interactive workflows that require confirmations or live steering.
246
-
247
- ### Local Web Workbench
248
-
249
- `orion web` serves the packaged client and `/api/v1/*` from one loopback origin. It does not expose
250
- a LAN bind. Configure provider credentials with the normal Orion config/environment flow, then use
251
- the browser to select a workspace and session, run or steer work, answer approvals, and inspect
252
- runtime state. Closing or refreshing a tab leaves pending approvals owned by the runtime; stopping
253
- the host aborts them fail-closed.
254
-
255
- The browser exposes Plan receipts exactly as committed and enters a durable `awaiting_review`
256
- state. Approve starts a separate BUILD logical request, Continue Planning starts a separate PLAN
257
- request with feedback, and Cancel performs no execution. Each operation binds the exact plan digest
258
- and survives refresh or Host restart; stale review actions fail with no side effects.
259
-
260
- The Host runs a bounded pool of Session actors (3 running / 4 resident by default) instead of one
261
- global runtime; the project navigator never applies one Session's writes to another. Cross-project
262
- Session selection is one atomic, revision-guarded Context transition. The left dock is 240–480px or
263
- a 48px rail; the right is 320–720px. Both use IDE-style mouse drag where applicable and there is no
264
- keyboard fine resize. Narrow layouts use drawers without overwriting desktop widths. Files offers
265
- CAS-guarded text editing (512 KiB cap); Git offers staging, hunk/line feedback, local commits and
266
- history reading; Review can start the shared bounded review runner and shows digest-verifiable
267
- findings. Remote or destructive Git operations (push, reset, discard, amend, force push) are not
268
- exposed and remain separate capability designs; terminal creation requires an explicit gesture and
269
- its ticket/output never enter Workbench SSE.
270
-
271
- #### Background host & lifecycle (v0.3.10)
272
-
273
- The Web Workbench binds **127.0.0.1 only**; the default port is **4242** (M42, the
274
- Orion Nebula) so it never collides with common dev-tool ports.
275
-
276
- ```bash
277
- orion web # foreground; open http://127.0.0.1:4242
278
- orion web --background # detached host (pidfile + logs, survives terminal exit)
279
- orion web start [--port N] # idempotent background start
280
- orion web status [--port N] # running pid/URL/workspace or stale report
281
- orion web restart [--port N] # stop + start
282
- orion web stop [--port N] # graceful SIGTERM stop
52
+ ## Configuration
53
+
54
+ Create `~/.orion-code/orion.yaml` using [the YAML example](docs/orion.example.yaml).
55
+ `ORION_CODE_CONFIG_DIR` selects an independent configuration/data root. New profiles do not import
56
+ older installations. Do not delete a working repository to reset an Orion profile.
57
+
58
+ ```yaml
59
+ schemaVersion: 1
60
+ providers:
61
+ - id: example
62
+ baseUrl: https://api.example.com/v1
63
+ apiKey: $ORION_CODE_API_KEY
64
+ protocol: openai-completions
65
+ models:
66
+ - id: example-model
67
+ provider: example
68
+ model: example-model
69
+ defaultModel: example-model
283
70
  ```
284
71
 
285
- The pidfile lives at `~/.orion-code/web-host.<port>.pid` and logs append to
286
- `~/.orion-code/logs/web-<port>.log`. Backgrounding is a process-lifecycle feature
287
- only: approval, context-revision and sandbox rules stay fail-closed, and the host
288
- never binds beyond loopback.
289
-
290
- For crash-restart and login autostart on macOS, register the **foreground** command
291
- (`orion web --no-open --port 4242 --cwd <dir>`) in a launchd LaunchAgent
292
- (`RunAtLoad` + `KeepAlive`) — do not combine it with `--background`, because
293
- launchd must supervise the host process itself.
294
-
295
- #### Host-managed Settings
296
-
297
- The Settings dialog reads from the active Host rather than treating browser storage as a second
298
- configuration source. Theme and reduced-motion preferences persist across refreshes, ports and Host
299
- restarts. The default model applies to newly created sessions; changing the current session remains
300
- an explicit `/model` or session-control action. Effort is the active workspace's project default,
301
- with a session override taking precedence. Tool confirmation is global, may be changed only while
302
- the Runtime is idle and applies at the next logical request; `allow` never bypasses hard policy,
303
- sandbox or workspace containment.
304
-
305
- Every save is one atomic compare-and-swap batch. A concurrent tab or external `orion.json` edit is
306
- shown as a conflict without discarding the draft. Invalid external JSON preserves the last-good
307
- Runtime configuration and is never overwritten by the Web UI. Provider credentials remain outside
308
- the Web API: Settings exposes readiness only and its local configuration action accepts no path.
309
- See the [Settings migration guide](docs/migration/v0.2.2-to-v0.3.0-settings.md) for precedence,
310
- legacy appearance import and rollback details.
72
+ Replace the endpoint and model with your provider's actual values. Credentials support `$ENV_VAR`
73
+ references; never commit real keys. Invalid YAML, duplicate keys, unknown or retired fields are
74
+ errors, not silent defaults. Writes are atomic and revision-checked; YAML comments are not retained.
75
+ Writable state files cannot themselves be symlinks; a symlink to the profile directory is supported.
311
76
 
312
- ### BUILD, PLAN, AUTO
313
-
314
- Use the Composer mode menu to select `BUILD`, `PLAN` or `AUTO`; the adjacent permission menu selects
315
- Project default, Ask, Allow or Deny. Mode controls workflow behavior while Authority, approval,
316
- containment and sandbox policy remain independent. Allow and AUTO require explicit risk handling and
317
- never override hard policy or explicit Deny.
318
-
319
- - **BUILD** is normal collaborative implementation.
320
- - **PLAN** explores with the same available tool universe, commits a decision-complete PlanReceipt,
321
- and waits for durable approve / continue-planning / cancel review.
322
- - **AUTO** removes interactive approval prompts within the configured Authority; hard policy and
323
- sandbox boundaries still fail closed.
324
-
325
- Start a task-scoped plan with:
326
-
327
- ```text
328
- /plan refactor the storage boundary and verify crash recovery
329
- ```
330
-
331
- There is no `exit_plan_mode` tool. Web users select mode from the Composer; terminal surfaces retain
332
- their existing mode controls.
77
+ ## Use Orion
333
78
 
334
- ### Durable Goal mode
79
+ Start in the repository you want Orion to work on:
335
80
 
336
- ```text
337
- /goal fix the open issues, run the release gates, and stop only when evidence is complete
338
- /goal status
339
- /goal pause
340
- /goal resume
341
- /goal clear
81
+ ```bash
82
+ orion # default interactive TUI
83
+ orion --ui terminal # technical terminal diagnostics
84
+ orion diff # read-only workspace diff summary
85
+ orion commit # read-only commit plan, not git commit
86
+ orion -p "explain this repo" # non-interactive task
87
+ orion -p --output-format json "inspect the failing test"
342
88
  ```
343
89
 
344
- `/goal <objective>` creates the Goal. Progressing Goals continue without a fixed turn-count stop;
345
- resource budgets, no-progress, blockers, provider failures, persistence failures, and user
346
- interrupts remain explicit stop decisions. A passed evidence audit commits completion and exits
347
- Goal automatically.
348
-
349
- `/target`, `/goal exit`, `edit`, `replace`, `confirm`, `budget`, and `clear --yes` were removed in the
350
- v0.2.0 breaking cut.
351
-
352
- ### Useful commands
353
-
354
- - `/help`, `/status`, `/doctor`, `/harness explain`
355
- - `/tools`, `/skills`, `/skill <name>`, `/mcp`
356
- - `/context`, `/memory`, `/usage`, `/trace`, `/last-tool`
357
- - `/model`, `/effort`, `/permissions`, `/config`
358
- - `/compact`, `/resume`, `/session`
359
- - `/diff`, `/commit-plan`, `/review`, `/research`, `/security`, `/test-gen`
360
-
361
- Use `/help` in the installed build as the authoritative command inventory.
90
+ Experimental non-interactive print mode is available through `orion -p`. Tasks needing interactive
91
+ approval or live steering should use TUI. This version has no Web server or browser workbench.
362
92
 
363
- ## Runtime guarantees
93
+ Inside TUI, `/help` is the authoritative inventory. Common commands: `/model`,
94
+ `/context`, `/compact`, `/resume`, `/diff`, `/review`, `/skills` and `/mcp`.
95
+ Use `/plan <task>` for a durable plan and `/goal <objective>` for explicitly requested persistent work.
96
+ Built-in tools are enabled by default. Commands still run within tool checks, workspace boundaries,
97
+ and any configured sandbox.
364
98
 
365
- - At most one active turn per Thread; steer, follow-up, interrupt, overload, and maintenance have
366
- typed admission outcomes.
367
- - Every started tool Item reaches exactly one durable terminal outcome. Nested batch calls retain
368
- parent/child invocation lineage and re-enter ToolGateway.
369
- - A slow renderer may coalesce ephemeral deltas, but durable events are replayable and never silently
370
- dropped.
371
- - Compact commits only after source-history, TaskContext, projection, and pointer CAS checks.
372
- - Legacy v0.1.9 sessions are materialized side by side; the active index switches only after event
373
- replay and projection digests verify.
374
- - Public exports expose the product runtime/protocol and Model/Skill/MCP configuration boundaries,
375
- not internal service locators or a plugin SDK.
99
+ Esc interrupts active work; Ctrl+C follows the exit-confirmation path. Test terminal-specific IME
100
+ and shortcuts in your actual terminal. `/resume` opens sessions created by this version after
101
+ restart; it must not silently replay completed side effects.
376
102
 
377
- ## Develop and verify
103
+ ## Develop and qualify
378
104
 
379
105
  ```bash
380
106
  npm run lint
107
+ npm run format:check
381
108
  npm run build
382
- npm test -- --runInBand
383
109
  npm run test:coverage -- --runInBand
384
110
  npm run test:harness-confluence
385
- npm run bench:harness:baseline
386
- npm run bench:harness
387
- npm run bench:harness:compare -- <baseline.json> <candidate.json>
388
- npm run prepublishOnly
389
- npm run test:web-e2e -- --grep @settings
111
+ npm run release:check -- --expected-version 0.4.4
390
112
  ```
391
113
 
392
- Release qualification additionally builds one exact tarball and installs that unchanged hash on
393
- Node 22/24/26 for package identity, native SQLite, TUI, terminal, print, Web, Goal, subagent, Skill,
394
- MCP, Compact, and resume journeys. WEB33-P0-01..12 qualify the built-in appearance contract, while
395
- WEB33-P0-16..24 qualify parallel Session actors, foreground-local switching, bounded queues, the
396
- right rail and the single Settings entry. See the [`v0.3.3 plan`](docs/plan/v0.3.3-plan.md) and
397
- [`v0.3.3 E2E qualification plan`](docs/test/v0.3.3-web-workbench-e2e-plan.md). The security and
398
- stabilization delta is defined by the
399
- [`v0.3.4 test plan`](docs/test/v0.3.4-stabilization-e2e-plan.md), which does not treat source gates
400
- as release evidence.
114
+ Qualification binds one exact tarball's SHA-256 and source identity to installed CLI, TUI, terminal,
115
+ print, Goal, subagent, SQLite, Skill, MCP and compact/resume probes on all three Node floors.
116
+ Source tests are not installed-package evidence. Missing probes, wrong hashes, failed gates or
117
+ dirty release source remain NO-GO; actual terminal/IME checks are recorded separately.
118
+ See [the CLI guide](docs/cli-guide.md) for verification boundaries.
401
119
 
402
120
  ## Security
403
121
 
404
- Do not commit `.env`, `~/.orion-code`, local databases, or credentials. File access is contained to
405
- the project boundary, symlink/non-regular path escapes fail closed, and all side effects pass the
406
- same Authority/Policy/Approval/Sandbox chain. Report vulnerabilities privately when disclosure
407
- could put users at risk.
122
+ Keep `.env`, Orion profiles, databases and credentials out of Git. Review high-impact operations
123
+ and their targets. Shell sandbox support depends on the selected backend and platform. Report
124
+ sensitive vulnerabilities privately.
408
125
 
409
126
  ## License
410
127