@orion-agents/orion-code 0.1.7 → 0.1.9

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 (431) hide show
  1. package/CHANGELOG.md +445 -0
  2. package/README.md +60 -41
  3. package/README.zh-CN.md +34 -8
  4. package/dist/agents/coordinator.d.ts.map +1 -1
  5. package/dist/agents/coordinator.js +49 -9
  6. package/dist/agents/coordinator.js.map +1 -1
  7. package/dist/agents/fork.d.ts +5 -1
  8. package/dist/agents/fork.d.ts.map +1 -1
  9. package/dist/agents/fork.js +9 -10
  10. package/dist/agents/fork.js.map +1 -1
  11. package/dist/agents/worker-pool.d.ts.map +1 -1
  12. package/dist/agents/worker-pool.js +8 -3
  13. package/dist/agents/worker-pool.js.map +1 -1
  14. package/dist/cli.js +6 -6
  15. package/dist/cli.js.map +1 -1
  16. package/dist/commands/context-tool-command-handlers.d.ts.map +1 -1
  17. package/dist/commands/context-tool-command-handlers.js +42 -0
  18. package/dist/commands/context-tool-command-handlers.js.map +1 -1
  19. package/dist/commands/core-command-handlers.d.ts.map +1 -1
  20. package/dist/commands/core-command-handlers.js +3 -4
  21. package/dist/commands/core-command-handlers.js.map +1 -1
  22. package/dist/commands/diagnostic-command-handlers.d.ts.map +1 -1
  23. package/dist/commands/diagnostic-command-handlers.js +3 -0
  24. package/dist/commands/diagnostic-command-handlers.js.map +1 -1
  25. package/dist/commands/model-command-handlers.d.ts +1 -1
  26. package/dist/commands/model-command-handlers.d.ts.map +1 -1
  27. package/dist/commands/model-command-handlers.js +166 -1
  28. package/dist/commands/model-command-handlers.js.map +1 -1
  29. package/dist/commands/registry.d.ts.map +1 -1
  30. package/dist/commands/registry.js +7 -3
  31. package/dist/commands/registry.js.map +1 -1
  32. package/dist/commands/session-command-handlers.d.ts.map +1 -1
  33. package/dist/commands/session-command-handlers.js +97 -5
  34. package/dist/commands/session-command-handlers.js.map +1 -1
  35. package/dist/commands/session-commands.js +2 -2
  36. package/dist/commands/session-commands.js.map +1 -1
  37. package/dist/commands/types.d.ts +6 -0
  38. package/dist/commands/types.d.ts.map +1 -1
  39. package/dist/commands/types.js.map +1 -1
  40. package/dist/commands/workflow-command-handlers.d.ts.map +1 -1
  41. package/dist/commands/workflow-command-handlers.js +2 -2
  42. package/dist/commands/workflow-command-handlers.js.map +1 -1
  43. package/dist/commands/workflow-commands.d.ts.map +1 -1
  44. package/dist/commands/workflow-commands.js +1 -1
  45. package/dist/commands/workflow-commands.js.map +1 -1
  46. package/dist/core/checkpoint.d.ts.map +1 -1
  47. package/dist/core/checkpoint.js +9 -8
  48. package/dist/core/checkpoint.js.map +1 -1
  49. package/dist/framework/index.d.ts +5 -3
  50. package/dist/framework/index.d.ts.map +1 -1
  51. package/dist/framework/index.js +9 -1
  52. package/dist/framework/index.js.map +1 -1
  53. package/dist/framework/prompt.d.ts +1 -1
  54. package/dist/framework/prompt.d.ts.map +1 -1
  55. package/dist/framework/prompt.js +5 -4
  56. package/dist/framework/prompt.js.map +1 -1
  57. package/dist/framework/query.d.ts +30 -4
  58. package/dist/framework/query.d.ts.map +1 -1
  59. package/dist/framework/query.js +329 -62
  60. package/dist/framework/query.js.map +1 -1
  61. package/dist/framework/stop-decision.d.ts +56 -0
  62. package/dist/framework/stop-decision.d.ts.map +1 -0
  63. package/dist/framework/stop-decision.js +36 -0
  64. package/dist/framework/stop-decision.js.map +1 -0
  65. package/dist/framework/store.d.ts.map +1 -1
  66. package/dist/framework/store.js +4 -4
  67. package/dist/framework/store.js.map +1 -1
  68. package/dist/framework/tool-scheduler.d.ts +23 -13
  69. package/dist/framework/tool-scheduler.d.ts.map +1 -1
  70. package/dist/framework/tool-scheduler.js +93 -77
  71. package/dist/framework/tool-scheduler.js.map +1 -1
  72. package/dist/framework/tool.d.ts +7 -0
  73. package/dist/framework/tool.d.ts.map +1 -1
  74. package/dist/framework/tool.js +9 -0
  75. package/dist/framework/tool.js.map +1 -1
  76. package/dist/harness/assembler.d.ts.map +1 -1
  77. package/dist/harness/assembler.js +77 -19
  78. package/dist/harness/assembler.js.map +1 -1
  79. package/dist/harness/capability-profile.d.ts +3 -0
  80. package/dist/harness/capability-profile.d.ts.map +1 -0
  81. package/dist/harness/capability-profile.js +44 -0
  82. package/dist/harness/capability-profile.js.map +1 -0
  83. package/dist/harness/capsule.d.ts.map +1 -1
  84. package/dist/harness/capsule.js +22 -3
  85. package/dist/harness/capsule.js.map +1 -1
  86. package/dist/harness/compact-benchmark-corpus.d.ts +10 -0
  87. package/dist/harness/compact-benchmark-corpus.d.ts.map +1 -0
  88. package/dist/harness/compact-benchmark-corpus.js +56 -0
  89. package/dist/harness/compact-benchmark-corpus.js.map +1 -0
  90. package/dist/harness/context-harness.d.ts +23 -3
  91. package/dist/harness/context-harness.d.ts.map +1 -1
  92. package/dist/harness/context-harness.js +183 -11
  93. package/dist/harness/context-harness.js.map +1 -1
  94. package/dist/harness/contract.d.ts.map +1 -1
  95. package/dist/harness/contract.js +106 -11
  96. package/dist/harness/contract.js.map +1 -1
  97. package/dist/harness/drift-guard.d.ts +2 -1
  98. package/dist/harness/drift-guard.d.ts.map +1 -1
  99. package/dist/harness/drift-guard.js +315 -20
  100. package/dist/harness/drift-guard.js.map +1 -1
  101. package/dist/harness/evidence.d.ts.map +1 -1
  102. package/dist/harness/evidence.js +25 -12
  103. package/dist/harness/evidence.js.map +1 -1
  104. package/dist/harness/index.d.ts +7 -2
  105. package/dist/harness/index.d.ts.map +1 -1
  106. package/dist/harness/index.js +19 -1
  107. package/dist/harness/index.js.map +1 -1
  108. package/dist/harness/ledger.d.ts.map +1 -1
  109. package/dist/harness/ledger.js +44 -14
  110. package/dist/harness/ledger.js.map +1 -1
  111. package/dist/harness/progress-controller.d.ts +14 -0
  112. package/dist/harness/progress-controller.d.ts.map +1 -0
  113. package/dist/harness/progress-controller.js +110 -0
  114. package/dist/harness/progress-controller.js.map +1 -0
  115. package/dist/harness/state.d.ts.map +1 -1
  116. package/dist/harness/state.js +5 -2
  117. package/dist/harness/state.js.map +1 -1
  118. package/dist/harness/stop-controller.d.ts +15 -0
  119. package/dist/harness/stop-controller.d.ts.map +1 -0
  120. package/dist/harness/stop-controller.js +87 -0
  121. package/dist/harness/stop-controller.js.map +1 -0
  122. package/dist/harness/types.d.ts +137 -0
  123. package/dist/harness/types.d.ts.map +1 -1
  124. package/dist/harness/verification.d.ts +7 -0
  125. package/dist/harness/verification.d.ts.map +1 -0
  126. package/dist/harness/verification.js +122 -0
  127. package/dist/harness/verification.js.map +1 -0
  128. package/dist/index.d.ts +5 -5
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +7 -1
  131. package/dist/index.js.map +1 -1
  132. package/dist/ink-ui/screens/ReplScreen.d.ts +3 -0
  133. package/dist/ink-ui/screens/ReplScreen.d.ts.map +1 -1
  134. package/dist/ink-ui/screens/ReplScreen.js +30 -5
  135. package/dist/ink-ui/screens/ReplScreen.js.map +1 -1
  136. package/dist/memory/index.d.ts +1 -0
  137. package/dist/memory/index.d.ts.map +1 -1
  138. package/dist/memory/index.js +1 -0
  139. package/dist/memory/index.js.map +1 -1
  140. package/dist/memory/prompt-context.d.ts +42 -0
  141. package/dist/memory/prompt-context.d.ts.map +1 -0
  142. package/dist/memory/prompt-context.js +129 -0
  143. package/dist/memory/prompt-context.js.map +1 -0
  144. package/dist/print-ui/launch.d.ts +1 -0
  145. package/dist/print-ui/launch.d.ts.map +1 -1
  146. package/dist/print-ui/launch.js +5 -2
  147. package/dist/print-ui/launch.js.map +1 -1
  148. package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
  149. package/dist/runtime/agent-runtime-controller.js +60 -22
  150. package/dist/runtime/agent-runtime-controller.js.map +1 -1
  151. package/dist/runtime/chat-checkpoint.d.ts.map +1 -1
  152. package/dist/runtime/chat-checkpoint.js +2 -5
  153. package/dist/runtime/chat-checkpoint.js.map +1 -1
  154. package/dist/runtime/chat-command-scope.d.ts +5 -0
  155. package/dist/runtime/chat-command-scope.d.ts.map +1 -0
  156. package/dist/runtime/chat-command-scope.js +22 -0
  157. package/dist/runtime/chat-command-scope.js.map +1 -0
  158. package/dist/runtime/chat-compact.d.ts +26 -0
  159. package/dist/runtime/chat-compact.d.ts.map +1 -0
  160. package/dist/runtime/chat-compact.js +132 -0
  161. package/dist/runtime/chat-compact.js.map +1 -0
  162. package/dist/runtime/chat-controller.d.ts.map +1 -1
  163. package/dist/runtime/chat-controller.js +102 -130
  164. package/dist/runtime/chat-controller.js.map +1 -1
  165. package/dist/runtime/chat-presentation.d.ts +6 -3
  166. package/dist/runtime/chat-presentation.d.ts.map +1 -1
  167. package/dist/runtime/chat-presentation.js +30 -6
  168. package/dist/runtime/chat-presentation.js.map +1 -1
  169. package/dist/runtime/goals/coordinator.d.ts +8 -0
  170. package/dist/runtime/goals/coordinator.d.ts.map +1 -1
  171. package/dist/runtime/goals/coordinator.js +103 -30
  172. package/dist/runtime/goals/coordinator.js.map +1 -1
  173. package/dist/runtime/goals/evidence.d.ts +10 -0
  174. package/dist/runtime/goals/evidence.d.ts.map +1 -1
  175. package/dist/runtime/goals/evidence.js +18 -0
  176. package/dist/runtime/goals/evidence.js.map +1 -1
  177. package/dist/runtime/goals/lifecycle.d.ts +13 -0
  178. package/dist/runtime/goals/lifecycle.d.ts.map +1 -0
  179. package/dist/runtime/goals/lifecycle.js +46 -0
  180. package/dist/runtime/goals/lifecycle.js.map +1 -0
  181. package/dist/runtime/goals/objective.d.ts +18 -0
  182. package/dist/runtime/goals/objective.d.ts.map +1 -0
  183. package/dist/runtime/goals/objective.js +60 -0
  184. package/dist/runtime/goals/objective.js.map +1 -0
  185. package/dist/runtime/goals/prompt.d.ts.map +1 -1
  186. package/dist/runtime/goals/prompt.js +7 -1
  187. package/dist/runtime/goals/prompt.js.map +1 -1
  188. package/dist/runtime/goals/stop-policy.d.ts +9 -0
  189. package/dist/runtime/goals/stop-policy.d.ts.map +1 -0
  190. package/dist/runtime/goals/stop-policy.js +83 -0
  191. package/dist/runtime/goals/stop-policy.js.map +1 -0
  192. package/dist/runtime/goals/tools.d.ts.map +1 -1
  193. package/dist/runtime/goals/tools.js +2 -2
  194. package/dist/runtime/goals/tools.js.map +1 -1
  195. package/dist/runtime/goals/types.d.ts +4 -1
  196. package/dist/runtime/goals/types.d.ts.map +1 -1
  197. package/dist/runtime/goals/types.js +2 -1
  198. package/dist/runtime/goals/types.js.map +1 -1
  199. package/dist/runtime/loop-budget.d.ts +2 -0
  200. package/dist/runtime/loop-budget.d.ts.map +1 -1
  201. package/dist/runtime/loop-budget.js +6 -2
  202. package/dist/runtime/loop-budget.js.map +1 -1
  203. package/dist/runtime/model-coordinator.d.ts +44 -1
  204. package/dist/runtime/model-coordinator.d.ts.map +1 -1
  205. package/dist/runtime/model-coordinator.js +161 -19
  206. package/dist/runtime/model-coordinator.js.map +1 -1
  207. package/dist/runtime/subagents/index.d.ts +1 -1
  208. package/dist/runtime/subagents/index.d.ts.map +1 -1
  209. package/dist/runtime/subagents/index.js.map +1 -1
  210. package/dist/runtime/subagents/production.d.ts +6 -2
  211. package/dist/runtime/subagents/production.d.ts.map +1 -1
  212. package/dist/runtime/subagents/production.js +25 -6
  213. package/dist/runtime/subagents/production.js.map +1 -1
  214. package/dist/runtime/subagents/runner.d.ts +12 -1
  215. package/dist/runtime/subagents/runner.d.ts.map +1 -1
  216. package/dist/runtime/subagents/runner.js +62 -1
  217. package/dist/runtime/subagents/runner.js.map +1 -1
  218. package/dist/runtime/subagents/runtime-integration.d.ts.map +1 -1
  219. package/dist/runtime/subagents/runtime-integration.js +2 -1
  220. package/dist/runtime/subagents/runtime-integration.js.map +1 -1
  221. package/dist/runtime/subagents/supervisor.d.ts.map +1 -1
  222. package/dist/runtime/subagents/supervisor.js +6 -0
  223. package/dist/runtime/subagents/supervisor.js.map +1 -1
  224. package/dist/runtime/subagents/types.d.ts +4 -1
  225. package/dist/runtime/subagents/types.d.ts.map +1 -1
  226. package/dist/runtime/subagents/types.js.map +1 -1
  227. package/dist/runtime/ui-events.d.ts +37 -1
  228. package/dist/runtime/ui-events.d.ts.map +1 -1
  229. package/dist/runtime/ui-events.js.map +1 -1
  230. package/dist/runtime/ui-view-model.d.ts +10 -1
  231. package/dist/runtime/ui-view-model.d.ts.map +1 -1
  232. package/dist/runtime/ui-view-model.js +93 -4
  233. package/dist/runtime/ui-view-model.js.map +1 -1
  234. package/dist/services/bounded-response.d.ts +12 -0
  235. package/dist/services/bounded-response.d.ts.map +1 -0
  236. package/dist/services/bounded-response.js +67 -0
  237. package/dist/services/bounded-response.js.map +1 -0
  238. package/dist/services/compact/auto-compact.d.ts +82 -2
  239. package/dist/services/compact/auto-compact.d.ts.map +1 -1
  240. package/dist/services/compact/auto-compact.js +226 -44
  241. package/dist/services/compact/auto-compact.js.map +1 -1
  242. package/dist/services/compact/compact.d.ts +54 -37
  243. package/dist/services/compact/compact.d.ts.map +1 -1
  244. package/dist/services/compact/compact.js +512 -127
  245. package/dist/services/compact/compact.js.map +1 -1
  246. package/dist/services/compact/coordinator.d.ts +5 -1
  247. package/dist/services/compact/coordinator.d.ts.map +1 -1
  248. package/dist/services/compact/coordinator.js +10 -1
  249. package/dist/services/compact/coordinator.js.map +1 -1
  250. package/dist/services/compact/fingerprint.d.ts +27 -0
  251. package/dist/services/compact/fingerprint.d.ts.map +1 -0
  252. package/dist/services/compact/fingerprint.js +69 -0
  253. package/dist/services/compact/fingerprint.js.map +1 -0
  254. package/dist/services/compact/index.d.ts +7 -5
  255. package/dist/services/compact/index.d.ts.map +1 -1
  256. package/dist/services/compact/index.js +19 -6
  257. package/dist/services/compact/index.js.map +1 -1
  258. package/dist/services/compact/planner.d.ts +41 -0
  259. package/dist/services/compact/planner.d.ts.map +1 -0
  260. package/dist/services/compact/planner.js +102 -0
  261. package/dist/services/compact/planner.js.map +1 -0
  262. package/dist/services/compact/semantic-summary.d.ts +93 -0
  263. package/dist/services/compact/semantic-summary.d.ts.map +1 -0
  264. package/dist/services/compact/semantic-summary.js +158 -0
  265. package/dist/services/compact/semantic-summary.js.map +1 -0
  266. package/dist/services/compact/summary-generator.d.ts +23 -0
  267. package/dist/services/compact/summary-generator.d.ts.map +1 -1
  268. package/dist/services/compact/summary-generator.js +173 -39
  269. package/dist/services/compact/summary-generator.js.map +1 -1
  270. package/dist/services/concurrent-sessions.d.ts +1 -0
  271. package/dist/services/concurrent-sessions.d.ts.map +1 -1
  272. package/dist/services/concurrent-sessions.js +35 -22
  273. package/dist/services/concurrent-sessions.js.map +1 -1
  274. package/dist/services/file-context.d.ts.map +1 -1
  275. package/dist/services/file-context.js +29 -33
  276. package/dist/services/file-context.js.map +1 -1
  277. package/dist/services/file-lock.d.ts.map +1 -1
  278. package/dist/services/file-lock.js +60 -27
  279. package/dist/services/file-lock.js.map +1 -1
  280. package/dist/services/global-config.d.ts +6 -0
  281. package/dist/services/global-config.d.ts.map +1 -1
  282. package/dist/services/global-config.js +23 -13
  283. package/dist/services/global-config.js.map +1 -1
  284. package/dist/services/goal-storage.d.ts +1 -1
  285. package/dist/services/goal-storage.d.ts.map +1 -1
  286. package/dist/services/goal-storage.js +14 -4
  287. package/dist/services/goal-storage.js.map +1 -1
  288. package/dist/services/llm.d.ts +3 -0
  289. package/dist/services/llm.d.ts.map +1 -1
  290. package/dist/services/llm.js +7 -0
  291. package/dist/services/llm.js.map +1 -1
  292. package/dist/services/project-instructions.d.ts +8 -0
  293. package/dist/services/project-instructions.d.ts.map +1 -1
  294. package/dist/services/project-instructions.js +101 -51
  295. package/dist/services/project-instructions.js.map +1 -1
  296. package/dist/services/provider-resilience/request-gate.d.ts +9 -5
  297. package/dist/services/provider-resilience/request-gate.d.ts.map +1 -1
  298. package/dist/services/provider-resilience/request-gate.js +71 -23
  299. package/dist/services/provider-resilience/request-gate.js.map +1 -1
  300. package/dist/services/safe-project-reader.d.ts +30 -0
  301. package/dist/services/safe-project-reader.d.ts.map +1 -0
  302. package/dist/services/safe-project-reader.js +141 -0
  303. package/dist/services/safe-project-reader.js.map +1 -0
  304. package/dist/services/session-storage.d.ts +146 -10
  305. package/dist/services/session-storage.d.ts.map +1 -1
  306. package/dist/services/session-storage.js +851 -120
  307. package/dist/services/session-storage.js.map +1 -1
  308. package/dist/services/tool-allowlist.d.ts +4 -4
  309. package/dist/services/tool-allowlist.js +4 -4
  310. package/dist/services/usage-state.d.ts +7 -0
  311. package/dist/services/usage-state.d.ts.map +1 -1
  312. package/dist/services/usage-state.js +117 -16
  313. package/dist/services/usage-state.js.map +1 -1
  314. package/dist/services/web-search-adapters.d.ts.map +1 -1
  315. package/dist/services/web-search-adapters.js +24 -10
  316. package/dist/services/web-search-adapters.js.map +1 -1
  317. package/dist/services/web-search-mcp.d.ts.map +1 -1
  318. package/dist/services/web-search-mcp.js +13 -3
  319. package/dist/services/web-search-mcp.js.map +1 -1
  320. package/dist/services/workspace-containment.d.ts +8 -0
  321. package/dist/services/workspace-containment.d.ts.map +1 -0
  322. package/dist/services/workspace-containment.js +44 -0
  323. package/dist/services/workspace-containment.js.map +1 -0
  324. package/dist/skills/runtime.d.ts.map +1 -1
  325. package/dist/skills/runtime.js +34 -35
  326. package/dist/skills/runtime.js.map +1 -1
  327. package/dist/terminal-ui/completion.d.ts.map +1 -1
  328. package/dist/terminal-ui/completion.js +5 -1
  329. package/dist/terminal-ui/completion.js.map +1 -1
  330. package/dist/terminal-ui/launch.d.ts +5 -0
  331. package/dist/terminal-ui/launch.d.ts.map +1 -1
  332. package/dist/terminal-ui/launch.js +53 -17
  333. package/dist/terminal-ui/launch.js.map +1 -1
  334. package/dist/tools/git.d.ts.map +1 -1
  335. package/dist/tools/git.js +47 -12
  336. package/dist/tools/git.js.map +1 -1
  337. package/dist/tools/index.d.ts.map +1 -1
  338. package/dist/tools/index.js +73 -64
  339. package/dist/tools/index.js.map +1 -1
  340. package/dist/tools/plan.d.ts.map +1 -1
  341. package/dist/tools/plan.js +7 -6
  342. package/dist/tools/plan.js.map +1 -1
  343. package/dist/tools/web.d.ts.map +1 -1
  344. package/dist/tools/web.js +11 -2
  345. package/dist/tools/web.js.map +1 -1
  346. package/dist/tui-ui/chrome-view-model.js +1 -1
  347. package/dist/tui-ui/chrome-view-model.js.map +1 -1
  348. package/dist/tui-ui/inline-surface.d.ts +1 -1
  349. package/dist/tui-ui/inline-surface.d.ts.map +1 -1
  350. package/dist/tui-ui/inline-surface.js +24 -16
  351. package/dist/tui-ui/inline-surface.js.map +1 -1
  352. package/dist/tui-ui/state.d.ts.map +1 -1
  353. package/dist/tui-ui/state.js +93 -13
  354. package/dist/tui-ui/state.js.map +1 -1
  355. package/dist/tui-ui/transcript-layout.d.ts.map +1 -1
  356. package/dist/tui-ui/transcript-layout.js +38 -29
  357. package/dist/tui-ui/transcript-layout.js.map +1 -1
  358. package/dist/ui/command-panel.d.ts +2 -0
  359. package/dist/ui/command-panel.d.ts.map +1 -1
  360. package/dist/ui/command-panel.js +46 -20
  361. package/dist/ui/command-panel.js.map +1 -1
  362. package/dist/ui/file-completion.d.ts.map +1 -1
  363. package/dist/ui/file-completion.js +12 -6
  364. package/dist/ui/file-completion.js.map +1 -1
  365. package/dist/ui/shared/command-palette.d.ts.map +1 -1
  366. package/dist/ui/shared/command-palette.js +13 -9
  367. package/dist/ui/shared/command-palette.js.map +1 -1
  368. package/dist/ui/shared/text.d.ts +2 -0
  369. package/dist/ui/shared/text.d.ts.map +1 -1
  370. package/dist/ui/shared/text.js +20 -12
  371. package/dist/ui/shared/text.js.map +1 -1
  372. package/dist/ui/suggestions.d.ts.map +1 -1
  373. package/dist/ui/suggestions.js +7 -6
  374. package/dist/ui/suggestions.js.map +1 -1
  375. package/docs/migration/v0.1.8-to-v0.1.9.md +60 -0
  376. package/docs/plan/v0.1.9-release-checklist.md +64 -0
  377. package/docs/readme.md +27 -0
  378. package/npm-shrinkwrap.json +7124 -0
  379. package/package.json +17 -7
  380. package/dist/ink/index.d.ts +0 -54
  381. package/dist/ink/index.d.ts.map +0 -1
  382. package/dist/ink/index.js +0 -111
  383. package/dist/ink/index.js.map +0 -1
  384. package/dist/services/compact/micro-compact.d.ts +0 -21
  385. package/dist/services/compact/micro-compact.d.ts.map +0 -1
  386. package/dist/services/compact/micro-compact.js +0 -99
  387. package/dist/services/compact/micro-compact.js.map +0 -1
  388. package/dist/ui-v2/components/command-palette.d.ts +0 -2
  389. package/dist/ui-v2/components/command-palette.d.ts.map +0 -1
  390. package/dist/ui-v2/components/command-palette.js +0 -18
  391. package/dist/ui-v2/components/command-palette.js.map +0 -1
  392. package/dist/ui-v2/components/edit-preview-picker.d.ts +0 -26
  393. package/dist/ui-v2/components/edit-preview-picker.d.ts.map +0 -1
  394. package/dist/ui-v2/components/edit-preview-picker.js +0 -79
  395. package/dist/ui-v2/components/edit-preview-picker.js.map +0 -1
  396. package/dist/ui-v2/components/session-picker.d.ts +0 -19
  397. package/dist/ui-v2/components/session-picker.d.ts.map +0 -1
  398. package/dist/ui-v2/components/session-picker.js +0 -52
  399. package/dist/ui-v2/components/session-picker.js.map +0 -1
  400. package/dist/ui-v2/components/shell.d.ts +0 -36
  401. package/dist/ui-v2/components/shell.d.ts.map +0 -1
  402. package/dist/ui-v2/components/shell.js +0 -131
  403. package/dist/ui-v2/components/shell.js.map +0 -1
  404. package/dist/ui-v2/index.d.ts +0 -11
  405. package/dist/ui-v2/index.d.ts.map +0 -1
  406. package/dist/ui-v2/index.js +0 -27
  407. package/dist/ui-v2/index.js.map +0 -1
  408. package/dist/ui-v2/runtime/text.d.ts +0 -2
  409. package/dist/ui-v2/runtime/text.d.ts.map +0 -1
  410. package/dist/ui-v2/runtime/text.js +0 -18
  411. package/dist/ui-v2/runtime/text.js.map +0 -1
  412. package/dist/ui-v2/state/input-reducer.d.ts +0 -39
  413. package/dist/ui-v2/state/input-reducer.d.ts.map +0 -1
  414. package/dist/ui-v2/state/input-reducer.js +0 -82
  415. package/dist/ui-v2/state/input-reducer.js.map +0 -1
  416. package/dist/ui-v2/state/picker.d.ts +0 -16
  417. package/dist/ui-v2/state/picker.d.ts.map +0 -1
  418. package/dist/ui-v2/state/picker.js +0 -52
  419. package/dist/ui-v2/state/picker.js.map +0 -1
  420. package/dist/ui-v2/state/sessions.d.ts +0 -15
  421. package/dist/ui-v2/state/sessions.d.ts.map +0 -1
  422. package/dist/ui-v2/state/sessions.js +0 -70
  423. package/dist/ui-v2/state/sessions.js.map +0 -1
  424. package/dist/ui-v2/state/suggestions.d.ts +0 -2
  425. package/dist/ui-v2/state/suggestions.d.ts.map +0 -1
  426. package/dist/ui-v2/state/suggestions.js +0 -18
  427. package/dist/ui-v2/state/suggestions.js.map +0 -1
  428. package/dist/ui-v2/types.d.ts +0 -2
  429. package/dist/ui-v2/types.d.ts.map +0 -1
  430. package/dist/ui-v2/types.js +0 -18
  431. package/dist/ui-v2/types.js.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,445 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## Delivery status legend
9
+
10
+ This project distinguishes three delivery states. **Never present unreleased work as released.**
11
+
12
+ | State | Meaning | Criterion |
13
+ | ----------------- | -------------------------------------------- | ------------------------------------------ |
14
+ | **Published** | Tagged source is installable from npm | git tag exists **and** `npm publish` done |
15
+ | **npm-published** | Registry version exists without full release | exact npm version, but tag/release may lag |
16
+ | **Merged** | In the default branch, not yet installable | merged, **no** tag / not published |
17
+ | **Candidate** | Reviewable source, no release promise | committed PR branch or owned worktree |
18
+
19
+ Evidence labels follow `docs/archive/releases/v0.1.x/targets-v0.1.3-v0.1.3-2.md`:
20
+ `met` / `partial` / `unmet` / `not_run` — where `not_run` means "blocked by environment",
21
+ which is **not** a pass.
22
+
23
+ ## [Unreleased]
24
+
25
+ ## [0.1.9] — CANDIDATE
26
+
27
+ > **Status: candidate.** Source, CI, exact tarball, npm `next`, tag, GitHub Release, and stable
28
+ > `latest` are independent receipts. This section must be updated after each delivery action; it
29
+ > does not claim publication in advance.
30
+
31
+ ### Added
32
+
33
+ - Add a typed semantic Compact pipeline with atomic message groups, canonical fingerprints,
34
+ structured ContextItems, TaskContract/evidence/capability reinjection, bounded manual focus, and
35
+ deterministic fallback diagnostics.
36
+ - Add Compact Checkpoint V2 receipts with source/replacement hashes, target-headroom validation,
37
+ Harness/Goal bindings, transactional candidate installation, rollback, and V1 read compatibility.
38
+ - Add HarnessKernel TaskContract V3 criteria, evidence-to-criterion receipts, deterministic state,
39
+ Capability Profiles, ProgressDelta, and typed StopDecision projections.
40
+ - Add mature-agent Compact benchmark fixtures and lifecycle trace events for prepare, validate,
41
+ commit, rollback, and boundary transitions.
42
+ - Add bounded project-level `compactInstructions` for manual and automatic compaction; caller
43
+ guidance remains subordinate to protocol, safety, criteria, evidence, failures, and pending work.
44
+
45
+ ### Changed
46
+
47
+ - Replace Goal's fixed five-continuation stop with criterion/evidence completion, no-progress,
48
+ blocker, provider, explicit budget, and user-abort decisions. Resource circuit breakers remain
49
+ bounded and resumable.
50
+ - Bind subagent reservations to child query/provider accounting; keep deprecated turn fields only
51
+ as compatibility inputs rather than task-complete semantics.
52
+ - Load a bounded memory index at startup and retrieve relevant content per turn with an auditable,
53
+ body-free prompt manifest.
54
+ - Extend `/context explain` with section budgets, capability identity, output/safety reserves, and
55
+ the latest committed Compact receipt.
56
+
57
+ ### Fixed
58
+
59
+ - Serialize usage JSONL appends with an independent cross-process lock and replay-safe request IDs
60
+ (#206).
61
+ - Contain project context, project instructions, and explicit skill reads at a canonical project
62
+ boundary; project-provided `@file` content remains untrusted data (#207).
63
+ - Make smaller-context model switches run and commit a semantic preflight before changing the
64
+ active model.
65
+ - Reject stale Compact candidates when the transcript tail or active checkpoint changes between
66
+ prepare and commit, while preserving append-only session history.
67
+ - Stop treating request/tool budgets or an unsatisfied completion gate as successful task
68
+ completion; render resumable typed decisions consistently.
69
+
70
+ ### Security
71
+
72
+ - Reject symlink and non-regular project context paths, revalidate opened descriptors, and redact
73
+ boundary errors without exposing out-of-project file contents.
74
+
75
+ ## [0.1.8] — 2026-08-15
76
+
77
+ > **Status: published.** Tag `v0.1.8` identifies the source;
78
+ > `@orion-agents/orion-code@0.1.8` is published through the npm `next` dist-tag.
79
+ > Stable `latest` remains `0.1.4`; promotion is a separate decision.
80
+
81
+ ### Added
82
+
83
+ - Add schema-level and scheduler-level finite safe-integer validation for bounded tool inputs,
84
+ including `exec_command.timeout`, `exec_command.maxOutputBytes`, and `list_files.maxDepth` (#203).
85
+ - Add a renderer-neutral budget-stop view with usage, last completed work, and visible recovery
86
+ actions across TUI, terminal, print, JSON, and `/loop-stats` (#204).
87
+ - Add typed tool-authorization provenance and an explicit BUILD/PLAN/AUTO network-permission
88
+ architecture contract; AUTO stays prompt-free after hard policy and explicit deny checks (#175).
89
+ - Add repository-layout, cleanup-manifest, and per-issue verification ledgers for auditable release
90
+ ownership and recovery.
91
+
92
+ ### Changed
93
+
94
+ - Restrict the npm package to the single runtime icon and enforce packed size, unpacked size, entry
95
+ count, required files, and unexpected-path budgets during release checks.
96
+ - Move maintained scripts into `scripts/release`, `scripts/smoke`, and `scripts/maintenance`; archive
97
+ historical v0.1.x plans under `docs/archive/releases/v0.1.x`.
98
+ - Enforce renderer command scope before special command dispatch, integrating the behavior reviewed
99
+ in PR #201 for issue #179.
100
+ - Keep session transcript append metadata incremental and cover a 5,000-row history without a
101
+ full JSONL rescan (#172).
102
+
103
+ ### Fixed
104
+
105
+ - Publish file-lock owner metadata atomically and quarantine stale legacy zero-byte recovery
106
+ sentinels so an interrupted writer cannot permanently block `/resume`.
107
+ - Verify the existing security, persistence, TUI/performance, release/dependency, and Goal lifecycle
108
+ candidate fixes for issues #170–#200 with focused regression batches and real renderer smokes.
109
+ - Keep Goal completion evidence durable across failure, compact, restart, and resume, then
110
+ automatically leave Goal mode after a passing audit (#189).
111
+ - Update PTY harnesses to current provider profiles and durable trace/status assertions so the
112
+ release matrix exercises source code without deprecated configuration fallbacks.
113
+
114
+ ### Removed
115
+
116
+ - Remove 18 unreferenced tracked documentation images, 15 superseded `test-runtime` probes, the
117
+ unused `src/ink` helper, and the unreferenced `src/ui-v2` experiment after replacement mapping.
118
+
119
+ ## [0.1.7] — 2026-08-13
120
+
121
+ > **Status: published.** Tag `v0.1.7` and its GitHub prerelease identify the source;
122
+ > `@orion-agents/orion-code@0.1.7` is published through the npm `next` dist-tag.
123
+ > Stable `latest` remains `0.1.4`; promotion is a separate decision.
124
+
125
+ ### Added
126
+
127
+ - Add `/plan [task]` as the task-scoped, read-only planning entry with an automatically saved exit
128
+ transition and restoration of the previous interactive/auto mode.
129
+ - Add an original Orion Pixel terminal identity with a portable pixel mascot, semantic poses,
130
+ restrained motion, and safe classic/NO_COLOR/narrow-terminal fallbacks.
131
+ - Add persisted TUI themes, motion, mascot, status-line, and semantic keymap configuration plus
132
+ `/theme`, `/keymap`, `/statusline`, and `/queue` command surfaces.
133
+ - Add a bounded shared-runtime follow-up queue: Enter steers the active turn while Tab queues FIFO
134
+ work without interrupting it.
135
+
136
+ ### Changed
137
+
138
+ - Remove the `/mode` command and its `/perm` compatibility alias. Base modes now change only through
139
+ `Shift+Tab`; `/plan` remains the task entry and model-driven `enter_plan_mode` stays unavailable,
140
+ so Plan state has one lifecycle authority and completion never starts implementation in the same
141
+ turn.
142
+ - Replace renderer-local status strings with a typed Chrome projection for Goal, model, permission,
143
+ context, effort, queued follow-ups, and active work.
144
+ - Complete Ctrl+R history search, Ctrl+E external composition, empty Ctrl+D exit, and Esc-owned
145
+ interruption behavior while preserving native terminal scrollback.
146
+ - Show stable sequence numbers for active subtasks and keep critical Goal, evidence, research, and
147
+ permission state visible before lower-priority chrome.
148
+
149
+ ### Fixed
150
+
151
+ - Automatically exit Goal mode after a persisted passing completion audit, restore the underlying
152
+ BUILD/PLAN/AUTO mode, retain the completed Goal sidecar as an audit receipt, and reconcile the
153
+ narrow crash window where the terminal sidecar was saved before the session binding was cleared.
154
+ - Route explicit `exit goal mode` / `退出 goal 模式` intent through the same deterministic runtime
155
+ clear boundary as `/goal exit`, reject completion retries without new runtime evidence, and cap
156
+ each autonomous continuation below fresh-user loop budgets.
157
+ - Sanitize every dynamic startup-banner field, including 8-bit C1 CSI/OSC forms, before writing it
158
+ to the terminal (#164).
159
+ - Serialize global configuration read-modify-write transactions across processes and add an atomic
160
+ session catalog for indexed lookup and bounded listing (#157, #159, #163).
161
+ - Reject brace-quantified and overlapping-alternative ReDoS patterns, while distinguishing benign
162
+ command substitution from visible recursive deletion in permission policy; contain command cwd
163
+ inside the workspace across permission and execution paths (#160, #162, #169).
164
+ - Require explicit risk metadata on every built-in slash command, cover drift-guard prepare/execute
165
+ enforcement and session rename success/scoping, and make coverage a release gate (#158, #166,
166
+ #167, #168).
167
+ - Pin all third-party GitHub Actions in CI to immutable commit SHAs (#165).
168
+
169
+ ### Compatibility
170
+
171
+ - `/goal exit` remains the canonical slash command; explicit natural-language exit intent is routed
172
+ to the same operation. Removed `/goal clear --yes` and `/target clear --yes` syntax is still
173
+ rejected and is not restored as a compatibility alias.
174
+
175
+ ## [0.1.6] — 2026-08-12
176
+
177
+ > **Status: published.** Tag `v0.1.6` and its GitHub Release identify the source;
178
+ > `@orion-agents/orion-code@0.1.6` is published through the npm `next` dist-tag.
179
+ > Stable `latest` remains `0.1.4`; promotion is a separate decision.
180
+
181
+ ### Changed
182
+
183
+ - Require explicit user authorization before a model-created Goal can become active and bound
184
+ non-user continuation loops so a Goal cannot run indefinitely without returning control (#150).
185
+ - Replace destructive Goal clearing with `/goal exit`, which aborts the active turn, rejects any
186
+ pending permission request, and clears persisted Goal state. The old `/goal clear --yes` and
187
+ `/target clear --yes` forms are intentionally rejected rather than retained as aliases.
188
+ - Make the default dependency-health report reproducible without registry access; registry-backed
189
+ `npm audit` and `npm outdated` reports now require explicit `--full-network` (#155).
190
+
191
+ ### Fixed
192
+
193
+ - Preserve `vector.db` during brand migration when native SQLite verification is unavailable and
194
+ report the actionable ABI/rebuild cause instead of misclassifying it as corruption (#149).
195
+ - Remove real embedding-provider calls from vector tests, make source-only import tests independent
196
+ of prebuilt `dist/`, and select installed Node runtimes by numeric version (#140, #144, #146).
197
+ - Keep dependency policy mandatory in prepublish/release gates and synchronize release version
198
+ claims across README and release metadata (#129, #147).
199
+ - Anchor macOS seatbelt secret-file denies to the stable project root and make `exec_command`
200
+ permission prechecks use the same explicit command cwd as execution (#151, #153).
201
+ - Strip ANSI/OSC/C0/C1 control sequences from terminal-ui transcript and streamed assistant output
202
+ before it reaches the terminal writer (#154).
203
+ - Make memory drift validation perform a bounded project symbol scan, expose it through
204
+ `/memory validate`, and fail inconclusive scans closed instead of silently accepting them (#156).
205
+
206
+ ### Compatibility
207
+
208
+ - This pre-1.0 release contains an intentional command-line breaking change: scripts using
209
+ `/goal clear --yes` or `/target clear --yes` must migrate to `/goal exit`. Goal/session storage
210
+ remains additive and compatible; the removed command syntax is not supported as an alias.
211
+
212
+ ## [0.1.5] — 2026-08-11
213
+
214
+ > **Status: npm-published.** `@orion-agents/orion-code@0.1.5` is available through the npm
215
+ > `next` dist-tag. No `v0.1.5` Git tag or GitHub Release exists, and stable `latest` remains
216
+ > `0.1.4`; those delivery states are intentionally recorded separately.
217
+
218
+ ### Added
219
+
220
+ - Added a typed slash-command descriptor registry, exact invocation grammar, compatibility
221
+ lifecycle metadata, busy policies, and canonical `/goal`, `/session`, `/context`,
222
+ `/commit-plan`, `/rewind`, `/subagents`, and `/effort` control surfaces.
223
+ - Added provider-aware effort capability resolution, scoped persistence, immutable retry
224
+ snapshots, structured renderer events, and additive reasoning/effort usage ledger metadata.
225
+
226
+ ### Changed
227
+
228
+ - Split agent mode from tool permission policy and constrained the empty command palette to a
229
+ primary, searchable surface while retaining explicit advanced and compatibility commands.
230
+ - Made dependency, Jest-major, tag/changelog, and prepublish checks fail closed.
231
+ - Made the dependency policy reject runtimes outside the declared Node 20/22/24 matrix (#133).
232
+ - Added version-tag CI triggers, synchronized the Jest 29 lockfile, and moved the candidate
233
+ package/install metadata to `0.1.5` (#134, #135, #141).
234
+ - Made the dependency policy prove the installed OpenAI client on each CI runtime instead of
235
+ inferring Node support from an engine-string regex, and added a real sqlite-vec load/query
236
+ probe (#137, #142).
237
+
238
+ ### Fixed
239
+
240
+ - Canonicalized recursive `rm` targets before safety evaluation and routed batch confirmations
241
+ and local fast paths through the shared permission policy (#125, #126, #132).
242
+ - Repaired Goal completion audit persistence, entity decoding, confirmation fallback, and TUI
243
+ submission/projection behavior (#127).
244
+ - Classified every recursive `rm` flag form as destructive so broad tool rules cannot silently
245
+ approve shell deletion (#136).
246
+ - Made concurrent session registration reserve capacity atomically across processes,
247
+ with atomic heartbeats and serialized stale-lock recovery (#121).
248
+ - Serialized session transcript, metadata, statistics, summaries, and deletion updates under a
249
+ per-session cross-process lock so counters cannot lose concurrent writes (#138).
250
+ - Deferred native SQLite loading to semantic-storage boundaries and added actionable
251
+ ABI diagnostics for memory, maintenance, migration, and dependency checks (#111).
252
+ - Removed real Ollama/OpenAI calls from vector unit tests by using deterministic embedding
253
+ fixtures, eliminating timeout-driven release flakiness (#139, #140).
254
+
255
+ ## [0.1.4-2] — 2026-08-09
256
+
257
+ > **Status: published.** Tag `v0.1.4-2` exists and the package is on npm
258
+ > (`@orion-agents/orion-code@0.1.4-2`, `next` dist-tag). Stable `latest` remains `0.1.4`.
259
+
260
+ ### Changed
261
+
262
+ - Split the slash-command registry and chat runtime into bounded modules, removed
263
+ deprecated OpenHorse type aliases, and made strict lint rules fail the build.
264
+ - Upgraded the OpenAI SDK to the Node-20-compatible 6.x line, removed unused runtime
265
+ dependencies, and added automated dependency policy/update checks.
266
+ - Added structured diagnostics, provider recovery metrics, runtime-matrix CI, and
267
+ real PTY research lifecycle coverage.
268
+
269
+ ### Fixed
270
+
271
+ - Closed persistence races, checkpoint corruption/rollback gaps, task-capacity and
272
+ response-parsing bugs, tool-call group corruption, context compaction errors, and
273
+ provider retry/stream recovery inconsistencies.
274
+ - Hardened forked-agent capabilities, harness evidence/sandbox enforcement, AWS auth,
275
+ command execution gates, and macOS sandbox fail-closed behavior.
276
+ - Completed the research contract across controlled web access, redirects, budgets,
277
+ atomic CAS persistence, citation durability, renderer events, and restart/resume.
278
+ - Added conversational Goal abandonment with explicit user authorization and corrected
279
+ Goal boundary/audit/no-progress semantics.
280
+ - Made `prepublishOnly` build before the release pack gate so clean checkouts and final
281
+ tarballs are validated against the same generated `dist` output.
282
+
283
+ ## [0.1.4] — 2026-08-06
284
+
285
+ > **Status: published.** Tag `v0.1.4` exists and the package is on npm
286
+ > (`@orion-agents/orion-code@0.1.4`, `latest` dist-tag). Released 2026-08-06.
287
+ > Work that remains a worktree-only draft carries no release promise (see legend).
288
+
289
+ Aligns `package.json` / `package-lock.json` with the `v0.1.4` release so the
290
+ CLI banner, HTTP `User-Agent`, and crash/telemetry reports stop misreporting `0.1.3`.
291
+
292
+ ### Changed
293
+
294
+ - **Release metadata (#10):** bumped `package.json` and `package-lock.json` to
295
+ `0.1.4` so `orion --version` and the outbound `User-Agent` reflect the development line.
296
+ - **Type safety (#5):** removed ~22 `any` usages (120 → 98 on the committed tree):
297
+ - native `Intl.Segmenter` typing via the `ES2022.Intl` `lib` (no more `(Intl as any)` casts);
298
+ - typed SQLite rows in `src/memory/vector-store.ts` (`MemoryRow` / `MemoryVectorRow`);
299
+ - `unknown`-typed task params in `src/services/task-manager.ts`;
300
+ - typed provider-error messages in `src/services/provider-resilience/error-classifier.ts`.
301
+
302
+ ### Fixed
303
+
304
+ - **Lint (#6):** resolved unused-vars / prefer-const warnings and removed dead code
305
+ (17 ESLint `no-explicit-any` / unused-var alerts cleared).
306
+
307
+ ## [0.1.3] — 2026-08-05
308
+
309
+ > **Status: published.** Tag `v0.1.3` exists and the package is on npm
310
+ > (`@orion-agents/orion-code@0.1.3`). The model-config subset (`/model` / `/models`)
311
+ > is merged; the security/tooling subset below shipped in this release.
312
+
313
+ This release hardens the execution surface (sandbox POC, tool-allowlist ReDoS,
314
+ plan-mode bypass, SSRF / API-key leakage) and rounds out developer-facing tooling
315
+ (git tools, TUI permission interaction, incremental input, goal-tool diagnostics).
316
+
317
+ ### Added
318
+
319
+ - **Shell sandbox POC** (`src/tools/sandbox.ts`)
320
+ - Commands are wrapped as an **argv array**, never re-parsed by an intermediate shell
321
+ (eliminates quote-injection surface).
322
+ - **Runtime backend probes** for `seatbelt` / `bubblewrap` / `docker` via `spawnSync`
323
+ — capability is never inferred from `which`.
324
+ - **Fail-closed**: a configured profile that cannot be applied (no backend, unusable
325
+ backend, unknown profile/backend) **refuses execution** instead of silently degrading.
326
+ - Default `profile: 'none'` is fully backward compatible with the legacy `sh -c` path.
327
+ - Docker backend runs with a **`--read-only` rootfs** and explicit `rw` bind-mounts for
328
+ the workspace + tmp + user `writableRoots`; network is blocked unless `allowNetwork`.
329
+ - Wired into `src/tools/index.ts` (`exec_command` plan + `checkPermissions` gate) and
330
+ `src/services/global-config.ts` (`sandbox` config at global + project scope).
331
+ - **Git tooling** (`src/tools/git.ts`)
332
+ - Structured read-only `git_diff` / `git_log` / `git_branch` / `git_status`
333
+ (with ahead/behind for the tracking branch).
334
+ - Risk-graded `git_commit` (state-write, `isDestructive() => true`) and the pre-existing
335
+ `git_push`. There is **no** `git_stage` tool; staging happens via `git_commit`'s
336
+ `paths` / `all` arguments.
337
+ - All paths confined to the repository; `paths` rejects glob / pathspec syntax;
338
+ output is redacted.
339
+ - ⚠️ **Known gap**: `git_commit({ all: true })` stages _every_ tracked modification.
340
+ The index snapshot / rollback and user-visible preview required by plan §P1-C are
341
+ **not implemented** — prefer explicit `paths`.
342
+ - **TUI permission interaction** (`/permissions` command)
343
+ - Toggle tool-confirmation live; immediately rewrite in-memory config **and** persist to disk.
344
+ - Status-bar `perm:` chip reflects the current mode; a system confirmation message is appended
345
+ to the session. A failed `updateGlobalConfig` leaves the in-memory state unchanged.
346
+
347
+ ### Changed
348
+
349
+ - **Tool allowlist — ReDoS hardening** (`src/services/tool-allowlist.ts`)
350
+ - Regex-compiled glob matchers replaced by a **linear dual-pointer matcher**
351
+ (`O(pattern × subject)`, `O(1)` extra state, no catastrophic backtracking). Regressed by a
352
+ pathological `(a*)*b`-style input test.
353
+ - **Plan-mode bypass fixed** (`src/framework/tool-scheduler.ts`)
354
+ - Plan-mode commands no longer short-circuit permission checks with a default allow; they go
355
+ through the same gating as interactive mode.
356
+ - **SSRF / API-key hardening** (`src/tools/web.ts`, `src/utils/mask.ts`)
357
+ - Per-hop redirect host checks, a response-body hard cap, and full API-key masking in logs/output.
358
+ - **Incremental input during a running turn**
359
+ - Supplementary user input is echoed immediately (G1), accumulated without loss (G2),
360
+ dedupe-guarded, and reflected in status text (G4).
361
+ - **Goal tools** (`src/runtime/goals/tools.ts`)
362
+ - `update_goal` / `update_goal_plan` / `create_goal` failures now return a **diagnostic `output`**
363
+ instead of an empty string.
364
+ - **Config model** (`src/services/global-config.ts`)
365
+ - `sandbox` config at both global and project scope, with documented schema / defaults / migration /
366
+ redaction / rollback (P1-E). Project config shallow-overrides global per key.
367
+
368
+ ### Security
369
+
370
+ - Sandbox execution is fail-closed and verifiable: on hosts with a usable backend, the OS-enforcement
371
+ assertions exercise **real kernel-level confinement** (Docker `--read-only` + bind-mounts verified on macOS).
372
+ - Allowlist matching is ReDoS-safe.
373
+ - Web tool rejects redirect-based SSRF pivots and never leaks API keys in output.
374
+
375
+ ### Out of scope (this release)
376
+
377
+ Deliberately deferred to a later version per the architecture review
378
+ (`docs/archive/releases/v0.1.x/v0.1.3-2-plan.md`):
379
+
380
+ - **Hook system (#27)** — external scripts expand the permission / timeout / secret / audit surface and
381
+ need a standalone technical design.
382
+ - Several `v0.1.3-2` plan items (writable / background sub-agents, generic MCP SSE/HTTP/OAuth, queue
383
+ injection / project-instruction files, custom slash commands, domestic-differentiation, Goal self-repair)
384
+ are tracked for **v0.2**.
385
+
386
+ ### Evidence
387
+
388
+ Verified by `npm run release:check` on **2026-08-05**:
389
+
390
+ - **Full Jest suite (Node 24.14.0): 3045 tests — 3042 passed, 1 failed, 2 skipped; 179 suites passed.**
391
+ The single failure is `tests/terminal-ui-pty.test.ts` (sandbox `safe-delete` `EACCES`) → `not_run`.
392
+ - Focused v0.1.3-2 suites: `sandbox` 30 (incl. live Docker OS-enforcement assertions),
393
+ `tool-allowlist` 38, `web-ssrf-bypass` 21, `git-tools` 7, plus `tool-confirmation` /
394
+ `permission-mode` / `incremental-input` / `goal-tools` / `tool-scheduler` / `config`.
395
+ - `tsc --noEmit` **0 errors**; ESLint **0 errors / 137 warnings** (pre-existing `no-explicit-any`).
396
+ - `npm pack --dry-run` OK — 1098 files, 5.23 MB unpacked.
397
+ - CI / real-PTY / tarball clean-install evidence remains environment-gated and labelled `not_run`
398
+ rather than substituted by a local green run.
399
+
400
+ **Corrections to earlier claims.** The previously reported "10 focused suites: 173/173" was a
401
+ cherry-picked subset that excluded failing suites. A full run surfaced pre-§8 test rot in
402
+ `tests/agent-runtime-controller.test.ts`, `tests/runtime-ui-parity.test.ts` and
403
+ `tests/turn-controller.test.ts` (they asserted latest-only revision semantics and the old
404
+ English status strings). These were realigned with the §8 G1/G2 design — the product behaviour
405
+ was not changed. The PTY smoke scripts `scripts/terminal-ui-pty-smoke.py` /
406
+ `scripts/tui-ui-pty-smoke.py` were updated to wait for the current Chinese status text.
407
+
408
+ > Run the suite with **Node 24.14.0**. Node 22 produces 14 spurious `better-sqlite3` failures
409
+ > (native module built for `NODE_MODULE_VERSION 137`, Node 22 requires `127`).
410
+
411
+ ### Still open (release gate)
412
+
413
+ - `docs/archive/releases/v0.1.x/targets-v0.1.3-v0.1.3-2.md` P0-C Goal sidecar overwrite protection — `unverified`.
414
+ - Worktree not yet frozen into a commit (index currently holds the 42 in-scope files).
415
+ - No `v0.1.3` tag; not published.
416
+
417
+ ## [0.1.2] — 2026-08-02 · Published (tag `v0.1.2`)
418
+
419
+ Goal reliability release. Typed continuation for a single session with a single active Goal;
420
+ safe pause after restart/resume requiring explicit recovery; runtime evidence ledger with
421
+ per-criterion completion audit and precise stop reasons; confirmation was single-session scoped.
422
+
423
+ ## [0.1.1] — 2026-07-31 · Published
424
+
425
+ Command contract, TUI as the default path, OpenHorse migration and data-safety convergence;
426
+ terminal-ui repositioned as the diagnostics build, Ink formally deprecated.
427
+
428
+ ## [0.1.0] — 2026-07-28 · Published
429
+
430
+ First public TUI baseline.
431
+
432
+ ---
433
+
434
+ ## Maintenance rules
435
+
436
+ 1. Run `npm run release:check` before every release. It verifies version consistency
437
+ (`package.json` / `package-lock.json` / both README install pins / the Chinese README
438
+ "current version" marker), CHANGELOG presence, `git diff --check`, worktree cleanliness,
439
+ lint, types, the full test suite, and `npm pack --dry-run`.
440
+ 2. `release:check` is **read-only**: it never runs `git tag`, `git push`, PR, merge or
441
+ `npm publish`. Those stay separately authorized.
442
+ 3. When an entry moves Candidate → Merged → Published, **move it to the matching section**.
443
+ Leaving a stale status label is a release-gate failure.
444
+
445
+ (Legacy release notes under `docs/mvp/` are not maintained in this file.)
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Goal-driven coding agent for the terminal.**
4
4
  >
5
- > v0.1.7Orion Pixel TUI, typed status chrome, and queued follow-ups
5
+ > v0.1.9semantic compact, evidence-driven completion, and autonomous progress control
6
6
 
7
7
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
8
  [![Node.js](https://img.shields.io/badge/node-%3E%3D20.0-green.svg)](https://nodejs.org)
@@ -35,8 +35,8 @@ Orion Code is a terminal-based coding agent. It wraps LLM APIs in a harness of s
35
35
  ### Install & Run
36
36
 
37
37
  ```bash
38
- # Install the exact audited version:
39
- npm install -g @orion-agents/orion-code@0.1.7
38
+ # After the registry receipt exists, install this exact prerelease version:
39
+ npm install -g @orion-agents/orion-code@0.1.9
40
40
  # Install the current prerelease channel:
41
41
  npm install -g @orion-agents/orion-code@next
42
42
 
@@ -75,9 +75,12 @@ orion -p "review the current git diff"
75
75
  echo "summarize this project" | orion --print
76
76
  ```
77
77
 
78
- > **Release status.** `0.1.7` is published through the npm `next` dist-tag and is identified by the
79
- > `v0.1.7` tag and GitHub prerelease. Stable `latest` remains `0.1.4`; promotion is a separate
80
- > decision.
78
+ Before upgrading, read the [v0.1.8 v0.1.9 migration guide](docs/migration/v0.1.8-to-v0.1.9.md).
79
+ Release verification is tracked in the [v0.1.9 checklist](docs/plan/v0.1.9-release-checklist.md).
80
+
81
+ > **Release status.** `0.1.9` is the current release candidate for the npm `next` channel. Stable
82
+ > `latest` remains `0.1.4`; tag, GitHub Release, npm publish, and `latest` promotion are verified as
83
+ > separate delivery actions.
81
84
 
82
85
  ### TUI startup banner
83
86
 
@@ -174,10 +177,12 @@ the waiting tool continues. A write failure denies the call.
174
177
 
175
178
  Machine-wide rules live at root `allowedTools`; project rules live under
176
179
  `projects["<absolute path>"].allowedTools`. Both sets are evaluated, and the most restrictive
177
- matching effect wins (`deny` > `ask` > `allow`). A durable `allow` can skip repeated prompts for
178
- a tool with known risk metadata, including external tools and explicit file edits, but it cannot
179
- auto-approve destructive shell/system operations or override a hard tool-policy denial, plan mode,
180
- an explicit `ask`/`deny` rule, or missing risk metadata.
180
+ matching effect wins (`deny` > `ask` > `allow`). Choosing project or machine scope is explicit
181
+ durable consent for that tool, so a durable `allow` skips repeated prompts for external tools, file
182
+ edits, and shell operations that are not hard-blocked by command safety policy. AUTO skips all
183
+ interactive prompts and authorizes every invocation after hard tool-policy and explicit `deny`
184
+ checks. PLAN exposes the same registry as BUILD and inherits the independently selected permission
185
+ policy, including durable project or machine grants.
181
186
 
182
187
  ```json
183
188
  {
@@ -203,8 +208,8 @@ an explicit `ask`/`deny` rule, or missing risk metadata.
203
208
  - Interactive persistent choices add an exact tool rule such as `allow:exec_command`; edit
204
209
  `~/.orion-code/orion.json` to audit or revoke a stored rule. `/permissions show` reports the
205
210
  active machine-wide and project rule counts.
206
- - `allow` only skips an interactive confirmation. It never overrides a tool's own `deny`,
207
- never escapes plan mode, and never applies when risk metadata is missing.
211
+ - `allow` skips an interactive confirmation. It never overrides a tool's own `deny`, an explicit
212
+ allowlist `deny`, workspace containment, sandbox restrictions, or hard command safety policy.
208
213
  - Malformed entries are ignored and listed by `/config` rather than silently applied.
209
214
 
210
215
  ### Shell execution sandbox (`sandbox`)
@@ -251,29 +256,34 @@ backend is probed at runtime and a configured-but-unusable sandbox **fails close
251
256
 
252
257
  ## Interactive Commands
253
258
 
254
- | Command | Description |
255
- | ---------------------- | -------------------------------------------------------------------------- |
256
- | `/help` | Show help |
257
- | `/goal` | Create, inspect, pause, resume, replace, budget, or exit a persistent goal |
258
- | `/plan [task]` | Explore read-only, save a plan, then restore the previous agent mode |
259
- | `/status` | System status |
260
- | `/model` | View or switch models |
261
- | `/effort` | View or change supported reasoning effort |
262
- | `/permissions` | View or change tool confirmation and edit policy |
263
- | `/config` | Show configuration |
264
- | `/usage` | Token usage and cost |
265
- | `/compact` | Trigger context compact |
266
- | `/session` | List, inspect, or rename sessions |
267
- | `/resume` | Resume last session |
268
- | `/memory` | Memory status, reference validation, and semantic reindexing |
269
- | `/skills` | List loaded skills |
270
- | `/mcp` | MCP server status |
271
- | `/doctor` | Run diagnostics |
272
- | `/diff` | Workspace diff |
273
- | `/commit-plan` | Create a read-only commit plan |
274
- | `/clear` | Clear screen |
275
- | `/context clear --yes` | Clear in-memory model context; preserve the saved session |
276
- | `/exit` | Exit |
259
+ | Command | Description |
260
+ | ---------------------- | --------------------------------------------------------------------------- |
261
+ | `/help` | Show help |
262
+ | `/goal` | Create, inspect, pause, resume, replace, budget, or exit a persistent goal |
263
+ | `/plan [task]` | Plan with normal tool access, save it, then restore the previous agent mode |
264
+ | `/status` | System status |
265
+ | `/model` | View or switch models |
266
+ | `/effort` | View or change supported reasoning effort |
267
+ | `/permissions` | View or change tool confirmation and edit policy |
268
+ | `/config` | Show configuration |
269
+ | `/usage` | Token usage and cost |
270
+ | `/compact [N] [focus]` | Trigger context compact with optional retained-message threshold and focus |
271
+ | `/session` | List, inspect, or rename sessions |
272
+ | `/resume` | Resume last session |
273
+ | `/memory` | Memory status, reference validation, and semantic reindexing |
274
+ | `/skills` | List loaded skills |
275
+ | `/mcp` | MCP server status |
276
+ | `/doctor` | Run diagnostics |
277
+ | `/diff` | Workspace diff |
278
+ | `/commit-plan` | Create a read-only commit plan |
279
+ | `/clear` | Clear screen |
280
+ | `/context clear --yes` | Clear in-memory model context; preserve the saved session |
281
+ | `/exit` | Exit |
282
+
283
+ Project-level compact guidance can be set in
284
+ `projects["<absolute path>"].compactInstructions` in `~/.orion-code/orion.json`. It applies to
285
+ manual and automatic compact, is bounded and redacted before model use, and cannot override tool
286
+ protocol, safety constraints, acceptance criteria, evidence, failures, or pending work.
277
287
 
278
288
  Agent modes are TUI actions: use `Shift+Tab` to cycle `BUILD → PLAN → AUTO`; `/mode` and `/perm`
279
289
  are not registered commands. The remaining deprecated spellings keep their v0.3.0 compatibility
@@ -291,14 +301,18 @@ scheduled for removal in v0.2.0.
291
301
 
292
302
  Use `/plan` to arm planning for the next message, `/plan <task>` to start immediately, or press
293
303
  `Shift+Tab` to cycle `BUILD → PLAN → AUTO → BUILD` while preserving the draft. Orion allows
294
- read-only repository exploration and blocks edits, mutating commands, and external actions during
295
- the planning request. When the plan is decision-complete, the model calls `exit_plan_mode` once;
304
+ the complete tool registry in every Agent mode. PLAN never blocks a call solely because of the
305
+ mode: writes, commands, and external tools use the current `/permissions` policy and reusable
306
+ project/machine grants. Explicit denies, workspace containment, sandboxing, and hard safety rules
307
+ remain enforced. When the plan is decision-complete, the model calls `exit_plan_mode` once;
296
308
  Orion saves it, exits Plan, and starts implementation in a separate logical request. Base modes are
297
309
  changed only with `Shift+Tab`; the retired `/mode` and `/perm` commands are not compatibility entry
298
310
  points. Auto runs without permission or clarification prompts, while hard safety policies and
299
311
  explicit user boundaries remain enforced.
300
312
 
301
313
  See [the Plan-mode lifecycle contract](docs/plan/plan-mode-contract.md).
314
+ Authorization precedence, AUTO network behavior, and audit provenance are defined in the
315
+ [Agent Mode and Tool Permission Contract](docs/architecture/agent-mode-permission-contract.md).
302
316
 
303
317
  ### Persistent Goal safety contract
304
318
 
@@ -317,12 +331,17 @@ promise multi-Goal scheduling or unattended background execution.
317
331
 
318
332
  After a completion audit passes, Orion automatically clears the session's active Goal binding,
319
333
  returns the TUI to its current BUILD/PLAN/AUTO base mode, and retains the terminal Goal sidecar as
320
- the durable completion receipt. Use `/goal exit` to abandon before completion: it aborts the active
334
+ the durable completion receipt. A trailing lifecycle clause such as `测试一轮,然后退出目标模式`
335
+ is separated from the auditable work: Orion verifies `测试一轮`, then performs the same runtime-owned
336
+ automatic exit after the audit passes. It is not treated as an impossible success criterion. Use
337
+ `/goal exit` to abandon before completion: it aborts the active
321
338
  turn, rejects pending permission requests, and removes the persisted Goal. Explicit natural-language
322
339
  requests such as `exit goal mode` or `退出 goal 模式` route through the same deterministic runtime
323
- boundary. Rejected completion requests
340
+ boundary. Session binding and Goal-sidecar cleanup fail closed as one lifecycle operation; Orion
341
+ never reports a successful exit after only one persisted object changed. Rejected completion requests
324
342
  cannot be retried in the same turn until new runtime evidence exists, and autonomous continuation
325
- turns have stricter model/tool budgets than fresh user turns. The old `/goal clear --yes` and
343
+ turns have stricter model/tool budgets than fresh user turns. Two consecutive blocked autonomous
344
+ continuations pause for review instead of spending the full continuation window. The old `/goal clear --yes` and
326
345
  `/target clear --yes` syntax is intentionally unsupported in v0.1.6.
327
346
 
328
347
  ## Migration from OpenHorse
@@ -337,7 +356,7 @@ orion migrate openhorse --yes [--include-env]
337
356
 
338
357
  See the [v0.1.2 release notes](https://github.com/orion-agents/orion-code/blob/main/docs/mvp/v0.1.2.md),
339
358
  [Goal evidence and recovery guide](https://github.com/orion-agents/orion-code/blob/main/docs/goals/goal-evidence-and-recovery.md),
340
- and [execution plan](https://github.com/orion-agents/orion-code/blob/main/docs/plan/v0.1.2-execution-plan.md).
359
+ and [execution plan](https://github.com/orion-agents/orion-code/blob/main/docs/archive/releases/v0.1.x/v0.1.2-execution-plan.md).
341
360
 
342
361
  ## Research-to-Evidence (v0.1.4, experimental)
343
362