@orion-agents/orion-code 0.3.66 → 0.4.3

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 (370) hide show
  1. package/CHANGELOG.md +81 -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 +34 -0
  6. package/dist/acp/session-updates.js +162 -0
  7. package/dist/acp/sessions.d.ts +32 -0
  8. package/dist/acp/sessions.js +315 -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 +5 -1
  15. package/dist/commands/diagnostic-command-handlers.js +20 -6
  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 +0 -18
  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/tool-commands.js +1 -1
  28. package/dist/commands/types.d.ts +4 -10
  29. package/dist/commands/types.js +1 -21
  30. package/dist/commands/workflow-command-handlers.js +13 -4
  31. package/dist/framework/loop-budget-contract.d.ts +7 -2
  32. package/dist/framework/loop-budget-contract.js +4 -1
  33. package/dist/framework/loop-progress.d.ts +22 -0
  34. package/dist/framework/loop-progress.js +79 -0
  35. package/dist/framework/prompt.d.ts +0 -2
  36. package/dist/framework/prompt.js +9 -27
  37. package/dist/framework/query.d.ts +27 -20
  38. package/dist/framework/query.js +453 -153
  39. package/dist/framework/store.d.ts +6 -10
  40. package/dist/framework/store.js +2 -21
  41. package/dist/framework/tool-call-orchestrator.d.ts +7 -0
  42. package/dist/framework/tool-call-orchestrator.js +8 -3
  43. package/dist/framework/tool-state.d.ts +2 -0
  44. package/dist/framework/tool.d.ts +0 -23
  45. package/dist/framework/verification-command.d.ts +15 -0
  46. package/dist/framework/verification-command.js +32 -0
  47. package/dist/harness/assembler.d.ts +1 -0
  48. package/dist/harness/assembler.js +24 -0
  49. package/dist/harness/capsule.d.ts +1 -1
  50. package/dist/harness/capsule.js +33 -14
  51. package/dist/harness/context-harness.d.ts +31 -12
  52. package/dist/harness/context-harness.js +491 -35
  53. package/dist/harness/contract.js +1 -1
  54. package/dist/harness/drift-guard.d.ts +4 -0
  55. package/dist/harness/drift-guard.js +68 -16
  56. package/dist/harness/intent.js +21 -0
  57. package/dist/harness/ledger.d.ts +6 -11
  58. package/dist/harness/ledger.js +39 -9
  59. package/dist/harness/progress-controller.d.ts +12 -7
  60. package/dist/harness/progress-controller.js +66 -21
  61. package/dist/harness/state.js +9 -1
  62. package/dist/harness/task-checklist.d.ts +16 -0
  63. package/dist/harness/task-checklist.js +95 -0
  64. package/dist/harness/types.d.ts +73 -1
  65. package/dist/harness/verification.d.ts +19 -1
  66. package/dist/harness/verification.js +116 -29
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +1 -3
  69. package/dist/print-ui/event-stream.d.ts +38 -0
  70. package/dist/print-ui/event-stream.js +187 -0
  71. package/dist/print-ui/launch.d.ts +12 -1
  72. package/dist/print-ui/launch.js +173 -11
  73. package/dist/product/environment.d.ts +1 -1
  74. package/dist/product/environment.js +1 -1
  75. package/dist/product/identity.d.ts +1 -1
  76. package/dist/product/identity.js +1 -1
  77. package/dist/product/paths.d.ts +3 -2
  78. package/dist/product/paths.js +6 -2
  79. package/dist/runtime/agent-loop.d.ts +11 -2
  80. package/dist/runtime/agent-loop.js +165 -25
  81. package/dist/runtime/agent-runtime-controller.d.ts +13 -3
  82. package/dist/runtime/agent-runtime-controller.js +347 -183
  83. package/dist/runtime/agent-runtime-protocol.d.ts +10 -18
  84. package/dist/runtime/agent-runtime-runner.d.ts +10 -0
  85. package/dist/runtime/builtin-tool-provider.js +5 -1
  86. package/dist/runtime/capability-receipt-journal.js +1 -0
  87. package/dist/runtime/durable-tool-receipt-reader.js +2 -1
  88. package/dist/runtime/first-party-tool-services.d.ts +1 -0
  89. package/dist/runtime/first-party-tool-services.js +2 -12
  90. package/dist/runtime/first-party-tool-universe.d.ts +1 -0
  91. package/dist/runtime/first-party-tool-universe.js +1 -1
  92. package/dist/runtime/followup-queue-store.d.ts +16 -0
  93. package/dist/runtime/followup-queue-store.js +75 -0
  94. package/dist/runtime/goal-lifecycle-v2.d.ts +11 -1
  95. package/dist/runtime/goal-lifecycle-v2.js +85 -15
  96. package/dist/runtime/goal-runtime-coordinator.d.ts +10 -1
  97. package/dist/runtime/goal-runtime-coordinator.js +81 -24
  98. package/dist/runtime/loop-budget.js +7 -5
  99. package/dist/runtime/mcp/first-party-mcp-adapter.d.ts +2 -0
  100. package/dist/runtime/mcp/first-party-mcp-adapter.js +23 -19
  101. package/dist/runtime/model-coordinator.js +2 -5
  102. package/dist/runtime/orion-runtime-v1.d.ts +18 -2
  103. package/dist/runtime/orion-runtime-v1.js +135 -39
  104. package/dist/runtime/orion-session-runner.d.ts +7 -0
  105. package/dist/runtime/orion-session-runner.js +82 -0
  106. package/dist/runtime/plan-review.d.ts +1 -0
  107. package/dist/runtime/plan-review.js +8 -4
  108. package/dist/runtime/product-bootstrap.d.ts +6 -0
  109. package/dist/runtime/product-bootstrap.js +41 -51
  110. package/dist/runtime/product-orion-runtime.js +128 -52
  111. package/dist/runtime/release-receipts.d.ts +24 -133
  112. package/dist/runtime/release-receipts.js +129 -693
  113. package/dist/runtime/rich-text/layout.js +108 -65
  114. package/dist/runtime/rsi/contracts.d.ts +50 -0
  115. package/dist/runtime/rsi/contracts.js +17 -0
  116. package/dist/runtime/rsi/diagnosis.d.ts +46 -0
  117. package/dist/runtime/rsi/diagnosis.js +98 -0
  118. package/dist/runtime/rsi/evaluation-suite.d.ts +25 -0
  119. package/dist/runtime/rsi/evaluation-suite.js +141 -0
  120. package/dist/runtime/rsi/evaluation-worker.d.ts +19 -0
  121. package/dist/runtime/rsi/evaluation-worker.js +64 -0
  122. package/dist/runtime/rsi/evaluation.d.ts +49 -0
  123. package/dist/runtime/rsi/evaluation.js +351 -0
  124. package/dist/runtime/rsi/lifecycle.d.ts +54 -0
  125. package/dist/runtime/rsi/lifecycle.js +279 -0
  126. package/dist/runtime/rsi/proposal.d.ts +39 -0
  127. package/dist/runtime/rsi/proposal.js +312 -0
  128. package/dist/runtime/rsi/receipt.d.ts +28 -0
  129. package/dist/runtime/rsi/receipt.js +138 -0
  130. package/dist/runtime/rsi/skill-state.d.ts +7 -0
  131. package/dist/runtime/rsi/skill-state.js +50 -0
  132. package/dist/runtime/rsi/trajectory.d.ts +19 -0
  133. package/dist/runtime/rsi/trajectory.js +314 -0
  134. package/dist/runtime/rsi/triage.d.ts +274 -0
  135. package/dist/runtime/rsi/triage.js +58 -0
  136. package/dist/runtime/session-composer-control.d.ts +5 -24
  137. package/dist/runtime/session-composer-control.js +27 -189
  138. package/dist/runtime/step-snapshot.d.ts +1 -0
  139. package/dist/runtime/subagents/policy.js +0 -1
  140. package/dist/runtime/subagents/production.js +1 -1
  141. package/dist/runtime/subagents/runtime-integration.js +2 -4
  142. package/dist/runtime/subagents/types.d.ts +0 -5
  143. package/dist/runtime/subagents/types.js +0 -2
  144. package/dist/runtime/task-context-recovery.d.ts +55 -0
  145. package/dist/runtime/task-context-recovery.js +342 -0
  146. package/dist/runtime/task-context-service.d.ts +16 -10
  147. package/dist/runtime/task-context-service.js +35 -4
  148. package/dist/runtime/thread-admission.d.ts +1 -1
  149. package/dist/runtime/thread-admission.js +12 -6
  150. package/dist/runtime/thread-event-store.d.ts +2 -2
  151. package/dist/runtime/thread-event-store.js +7 -2
  152. package/dist/runtime/thread-projection.js +4 -2
  153. package/dist/runtime/thread-runtime.d.ts +7 -0
  154. package/dist/runtime/thread-runtime.js +43 -0
  155. package/dist/runtime/thread-session-index.d.ts +8 -0
  156. package/dist/runtime/thread-session-index.js +50 -1
  157. package/dist/runtime/thread-session-view.d.ts +2 -1
  158. package/dist/runtime/thread-session-view.js +4 -0
  159. package/dist/runtime/thread-tool-journal.d.ts +1 -0
  160. package/dist/runtime/thread-tool-journal.js +6 -2
  161. package/dist/runtime/thread-ui-adapter.d.ts +1 -0
  162. package/dist/runtime/thread-ui-adapter.js +88 -11
  163. package/dist/runtime/tool-gateway.d.ts +7 -0
  164. package/dist/runtime/tool-gateway.js +20 -0
  165. package/dist/runtime/tool-transcript-entry.d.ts +16 -0
  166. package/dist/runtime/tool-transcript-entry.js +73 -0
  167. package/dist/runtime/turn-commit.d.ts +4 -1
  168. package/dist/runtime/turn-commit.js +19 -15
  169. package/dist/runtime/ui-events.d.ts +12 -0
  170. package/dist/runtime/ui-view-model.d.ts +6 -5
  171. package/dist/runtime/ui-view-model.js +33 -19
  172. package/dist/runtime/workspace-runtime-kernel.js +0 -1
  173. package/dist/services/atomic-write.d.ts +2 -0
  174. package/dist/services/atomic-write.js +12 -1
  175. package/dist/services/code-review/format.d.ts +4 -1
  176. package/dist/services/code-review/format.js +5 -1
  177. package/dist/services/code-review/runner.d.ts +2 -2
  178. package/dist/services/code-review/runner.js +86 -64
  179. package/dist/services/code-review/snapshot.d.ts +9 -9
  180. package/dist/services/code-review/snapshot.js +182 -166
  181. package/dist/services/compact/auto-compact.d.ts +21 -6
  182. package/dist/services/compact/auto-compact.js +148 -22
  183. package/dist/services/compact/background-candidate.d.ts +33 -0
  184. package/dist/services/compact/background-candidate.js +184 -0
  185. package/dist/services/compact/compact.d.ts +4 -1
  186. package/dist/services/compact/compact.js +30 -3
  187. package/dist/services/compact/coordinator.d.ts +10 -4
  188. package/dist/services/compact/coordinator.js +17 -7
  189. package/dist/services/compact/summary-generator.d.ts +4 -2
  190. package/dist/services/compact/summary-generator.js +17 -3
  191. package/dist/services/config.d.ts +5 -5
  192. package/dist/services/config.js +30 -45
  193. package/dist/services/doctor.js +85 -13
  194. package/dist/services/effort.d.ts +5 -5
  195. package/dist/services/effort.js +5 -11
  196. package/dist/services/file-lock.d.ts +9 -3
  197. package/dist/services/file-lock.js +92 -26
  198. package/dist/services/global-config.d.ts +26 -56
  199. package/dist/services/global-config.js +213 -183
  200. package/dist/services/llm.d.ts +40 -4
  201. package/dist/services/llm.js +164 -45
  202. package/dist/services/model-client-pool.d.ts +15 -9
  203. package/dist/services/model-client-pool.js +62 -33
  204. package/dist/services/model-context.d.ts +2 -1
  205. package/dist/services/model-context.js +15 -9
  206. package/dist/services/model-registry.d.ts +4 -15
  207. package/dist/services/model-registry.js +32 -101
  208. package/dist/services/provider-diagnostics.d.ts +7 -0
  209. package/dist/services/provider-diagnostics.js +9 -10
  210. package/dist/services/provider-resilience/coordinator.d.ts +1 -1
  211. package/dist/services/provider-resilience/coordinator.js +10 -6
  212. package/dist/services/provider-resilience/request-gate.d.ts +3 -0
  213. package/dist/services/provider-resilience/request-gate.js +29 -18
  214. package/dist/services/provider-resilience/types.d.ts +2 -0
  215. package/dist/services/session-storage.d.ts +7 -10
  216. package/dist/services/session-storage.js +57 -30
  217. package/dist/services/settings-coordinator.d.ts +0 -6
  218. package/dist/services/settings-coordinator.js +19 -56
  219. package/dist/services/settings-document-repository.d.ts +3 -10
  220. package/dist/services/settings-document-repository.js +7 -85
  221. package/dist/services/usage-state.d.ts +3 -3
  222. package/dist/services/usage-state.js +11 -42
  223. package/dist/terminal-ui/answer-format.d.ts +14 -0
  224. package/dist/terminal-ui/answer-format.js +119 -0
  225. package/dist/terminal-ui/launch.d.ts +7 -6
  226. package/dist/terminal-ui/launch.js +160 -70
  227. package/dist/terminal-ui/output-queue.d.ts +2 -1
  228. package/dist/terminal-ui/output-queue.js +1 -1
  229. package/dist/terminal-ui/raw-editor.d.ts +2 -1
  230. package/dist/terminal-ui/raw-editor.js +56 -15
  231. package/dist/tools/core/edit-file.js +2 -0
  232. package/dist/tools/core/write-file.js +5 -0
  233. package/dist/tools/lsp.d.ts +16 -1
  234. package/dist/tools/lsp.js +60 -19
  235. package/dist/tools/sandbox.d.ts +1 -1
  236. package/dist/tools/sandbox.js +3 -16
  237. package/dist/tools/todo.d.ts +4 -2
  238. package/dist/tools/todo.js +76 -31
  239. package/dist/tui-core/input-parser.d.ts +1 -0
  240. package/dist/tui-core/input-parser.js +6 -0
  241. package/dist/tui-core/style.d.ts +1 -8
  242. package/dist/tui-core/style.js +3 -110
  243. package/dist/tui-ui/chrome-view-model.d.ts +1 -1
  244. package/dist/tui-ui/chrome-view-model.js +22 -27
  245. package/dist/tui-ui/launch.js +14 -14
  246. package/dist/tui-ui/layout.d.ts +5 -7
  247. package/dist/tui-ui/layout.js +129 -124
  248. package/dist/tui-ui/runner.d.ts +11 -12
  249. package/dist/tui-ui/runner.js +88 -67
  250. package/dist/tui-ui/state.d.ts +0 -11
  251. package/dist/tui-ui/state.js +22 -33
  252. package/dist/tui-ui/terminal-image.js +22 -4
  253. package/dist/tui-ui/transcript-inspector-layout.js +6 -3
  254. package/dist/tui-ui/transcript-inspector.d.ts +1 -0
  255. package/dist/tui-ui/transcript-inspector.js +7 -1
  256. package/dist/tui-ui/transcript-layout.js +42 -6
  257. package/dist/utils/terminal-text.d.ts +11 -0
  258. package/dist/utils/terminal-text.js +114 -0
  259. package/docs/cli-guide.md +562 -0
  260. package/docs/orion.example.yaml +42 -0
  261. package/docs/readme.md +12 -57
  262. package/npm-shrinkwrap.json +484 -1855
  263. package/package.json +13 -63
  264. package/dist/migration/command.d.ts +0 -9
  265. package/dist/migration/command.js +0 -100
  266. package/dist/migration/index.d.ts +0 -7
  267. package/dist/migration/index.js +0 -14
  268. package/dist/migration/migrate.d.ts +0 -19
  269. package/dist/migration/migrate.js +0 -406
  270. package/dist/migration/types.d.ts +0 -55
  271. package/dist/migration/types.js +0 -6
  272. package/dist/services/tool-allowlist.d.ts +0 -110
  273. package/dist/services/tool-allowlist.js +0 -299
  274. package/dist/services/yaml-config.d.ts +0 -57
  275. package/dist/services/yaml-config.js +0 -178
  276. package/dist/web/cli-options.d.ts +0 -17
  277. package/dist/web/cli-options.js +0 -51
  278. package/dist/web/code-review-run-service.d.ts +0 -68
  279. package/dist/web/code-review-run-service.js +0 -228
  280. package/dist/web/context-text.d.ts +0 -17
  281. package/dist/web/context-text.js +0 -40
  282. package/dist/web/errors.d.ts +0 -6
  283. package/dist/web/errors.js +0 -13
  284. package/dist/web/event-hub.d.ts +0 -45
  285. package/dist/web/event-hub.js +0 -370
  286. package/dist/web/file-read-service.d.ts +0 -101
  287. package/dist/web/file-read-service.js +0 -593
  288. package/dist/web/file-write-service.d.ts +0 -16
  289. package/dist/web/file-write-service.js +0 -103
  290. package/dist/web/git-compare-service.d.ts +0 -45
  291. package/dist/web/git-compare-service.js +0 -160
  292. package/dist/web/git-diff-document.d.ts +0 -102
  293. package/dist/web/git-diff-document.js +0 -258
  294. package/dist/web/git-file-source.d.ts +0 -25
  295. package/dist/web/git-file-source.js +0 -21
  296. package/dist/web/git-history-service.d.ts +0 -151
  297. package/dist/web/git-history-service.js +0 -619
  298. package/dist/web/git-index-transaction.d.ts +0 -45
  299. package/dist/web/git-index-transaction.js +0 -174
  300. package/dist/web/git-patch-builder.d.ts +0 -30
  301. package/dist/web/git-patch-builder.js +0 -138
  302. package/dist/web/git-read-model-service.d.ts +0 -452
  303. package/dist/web/git-read-model-service.js +0 -1833
  304. package/dist/web/git-version-service.d.ts +0 -79
  305. package/dist/web/git-version-service.js +0 -279
  306. package/dist/web/host-daemon.d.ts +0 -70
  307. package/dist/web/host-daemon.js +0 -237
  308. package/dist/web/index.d.ts +0 -6
  309. package/dist/web/index.js +0 -28
  310. package/dist/web/launch.d.ts +0 -12
  311. package/dist/web/launch.js +0 -89
  312. package/dist/web/native-directory-picker.d.ts +0 -63
  313. package/dist/web/native-directory-picker.js +0 -169
  314. package/dist/web/protocol.d.ts +0 -705
  315. package/dist/web/protocol.js +0 -639
  316. package/dist/web/review-service.d.ts +0 -22
  317. package/dist/web/review-service.js +0 -68
  318. package/dist/web/server.d.ts +0 -20
  319. package/dist/web/server.js +0 -1453
  320. package/dist/web/session-runtime-registry.d.ts +0 -138
  321. package/dist/web/session-runtime-registry.js +0 -471
  322. package/dist/web/terminal-manager.d.ts +0 -156
  323. package/dist/web/terminal-manager.js +0 -779
  324. package/dist/web/terminal-server.d.ts +0 -8
  325. package/dist/web/terminal-server.js +0 -304
  326. package/dist/web/workbench-controller.d.ts +0 -395
  327. package/dist/web/workbench-controller.js +0 -3077
  328. package/dist/web/workspace-discovery.d.ts +0 -92
  329. package/dist/web/workspace-discovery.js +0 -324
  330. package/dist/web/workspace-mutation-arbiter.d.ts +0 -54
  331. package/dist/web/workspace-mutation-arbiter.js +0 -267
  332. package/dist/web/workspace-open-telemetry.d.ts +0 -55
  333. package/dist/web/workspace-open-telemetry.js +0 -73
  334. package/dist/web-client/assets/FilesPanel-CPDovK_K.js +0 -1
  335. package/dist/web-client/assets/GitPanel-DtU_TD61.js +0 -4
  336. package/dist/web-client/assets/ReviewPanel-vMO7BEA3.js +0 -6
  337. package/dist/web-client/assets/TerminalPanel-C9vDTAlS.js +0 -23
  338. package/dist/web-client/assets/TerminalPanel-DLuoa74B.css +0 -1
  339. package/dist/web-client/assets/index-CABdwh4l.css +0 -1
  340. package/dist/web-client/assets/index-KvshfEbl.js +0 -20
  341. package/dist/web-client/assets/useAutoNotice-IE1g2wcb.js +0 -1
  342. package/dist/web-client/favicon.svg +0 -9
  343. package/dist/web-client/index.html +0 -17
  344. package/docs/architecture/agent-mode-permission-contract.md +0 -87
  345. package/docs/architecture/v0.3.0-web-api.yaml +0 -1340
  346. package/docs/architecture/v0.3.1-web-api.yaml +0 -2338
  347. package/docs/architecture/v0.3.2-web-api.yaml +0 -3029
  348. package/docs/architecture/v0.3.3-web-api.yaml +0 -3205
  349. package/docs/architecture/v0.3.4-stabilization-contract.md +0 -32
  350. package/docs/migration/v0.1.9-to-v0.2.0.md +0 -98
  351. package/docs/migration/v0.2.2-to-v0.3.0-settings.md +0 -114
  352. package/docs/migration/v0.2.2-to-v0.3.0.md +0 -55
  353. package/docs/migration/v0.3.0-to-v0.3.1.md +0 -88
  354. package/docs/migration/v0.3.1-to-v0.3.2.md +0 -94
  355. package/docs/migration/v0.3.2-to-v0.3.3.md +0 -62
  356. package/docs/migration/v0.3.3-to-v0.3.4.md +0 -36
  357. package/docs/orion.example.json +0 -86
  358. package/docs/plan/v0.2.0-dsh-harness-redesign-plan.md +0 -1234
  359. package/docs/plan/v0.2.0-release-checklist.md +0 -91
  360. package/docs/plan/v0.3.0-node-runtime-compatibility-plan.md +0 -57
  361. package/docs/plan/v0.3.0-settings-integration-plan.md +0 -740
  362. package/docs/plan/v0.3.0-web-workbench-plan.md +0 -376
  363. package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +0 -848
  364. package/docs/plan/v0.3.2-web-workbench-layout-and-composer-plan.md +0 -869
  365. package/docs/plan/v0.3.3-plan.md +0 -1113
  366. package/docs/plan/v0.3.4-stabilization-plan.md +0 -89
  367. package/docs/test/v0.3.1-web-workbench-e2e-plan.md +0 -140
  368. package/docs/test/v0.3.2-web-workbench-e2e-plan.md +0 -100
  369. package/docs/test/v0.3.3-web-workbench-e2e-plan.md +0 -79
  370. package/docs/test/v0.3.4-stabilization-e2e-plan.md +0 -54
@@ -24,6 +24,8 @@ export interface SummaryOptions {
24
24
  * secondary to protocol, safety, criteria, evidence, and pending-work rules.
25
25
  */
26
26
  instructions?: string;
27
+ /** Optional foreground/speculative provider budget. Larger inputs use typed local projection. */
28
+ singleProviderRequest?: boolean;
27
29
  }
28
30
  export declare function normalizeCompactFocus(value: string | undefined): string | undefined;
29
31
  export declare function normalizeCompactInstructions(value: string | undefined): string | undefined;
@@ -41,7 +43,7 @@ export interface GeneratedSummary {
41
43
  semanticSummary: CompactSummary;
42
44
  diagnostics: SummaryDiagnostic[];
43
45
  }
44
- export type SummaryDiagnosticCode = 'llm_request_failed' | 'llm_empty_response' | 'llm_chunked_input' | 'heuristic_fallback' | 'deterministic_projection';
46
+ export type SummaryDiagnosticCode = 'llm_request_failed' | 'llm_empty_response' | 'llm_chunked_input' | 'llm_summary_budget' | 'background_summary_reused' | 'heuristic_fallback' | 'deterministic_projection';
45
47
  export interface SummaryDiagnostic {
46
48
  code: SummaryDiagnosticCode;
47
49
  message: string;
@@ -49,7 +51,7 @@ export interface SummaryDiagnostic {
49
51
  chunkIndex?: number;
50
52
  chunkCount?: number;
51
53
  }
52
- export declare function generateSummaryWithSource(messages: Message[], llm: LLMService, options?: SummaryOptions): Promise<GeneratedSummary>;
54
+ export declare function generateSummaryWithSource(messages: Message[], llm: Pick<LLMService, 'chat'>, options?: SummaryOptions, abortSignal?: AbortSignal): Promise<GeneratedSummary>;
53
55
  /**
54
56
  * Generate a summary using the LLM for high-quality context compaction.
55
57
  * Falls back to heuristic summary if LLM call fails or times out.
@@ -258,7 +258,8 @@ function mergeChunkOutputs(outputs, maxLength) {
258
258
  const perChunk = Math.max(1, Math.floor((maxLength - separatorBudget) / outputs.length));
259
259
  return truncateSummary(outputs.map(output => truncateSummary(output.trim(), perChunk)).join('\n'), maxLength);
260
260
  }
261
- async function generateSummaryWithSource(messages, llm, options) {
261
+ async function generateSummaryWithSource(messages, llm, options, abortSignal) {
262
+ abortSignal?.throwIfAborted();
262
263
  const opts = { ...DEFAULT_OPTIONS, ...options };
263
264
  if (messages.length === 0) {
264
265
  return {
@@ -296,7 +297,16 @@ async function generateSummaryWithSource(messages, llm, options) {
296
297
  });
297
298
  }
298
299
  const outputs = [];
299
- for (const [chunkIndex, chunk] of chunks.entries()) {
300
+ const providerChunks = opts.singleProviderRequest && chunks.length > 1 ? [] : chunks;
301
+ if (providerChunks.length !== chunks.length) {
302
+ diagnostics.push({
303
+ code: 'llm_summary_budget',
304
+ message: 'Used local projection because the summary would require multiple provider calls.',
305
+ fallbackUsed: true,
306
+ chunkCount: chunks.length,
307
+ });
308
+ }
309
+ for (const [chunkIndex, chunk] of providerChunks.entries()) {
300
310
  const priorSummarySection = chunkIndex === 0 && prepared.priorSummary
301
311
  ? `Prior durable summary (merge it with only the new conversation below):\n${prepared.priorSummary}\n\n`
302
312
  : '';
@@ -319,7 +329,10 @@ ${chunk}
319
329
 
320
330
  Summary:`;
321
331
  try {
322
- const response = await llm.chat([{ role: 'user', content: prompt }]);
332
+ abortSignal?.throwIfAborted();
333
+ const response = await llm.chat([{ role: 'user', content: prompt }], undefined, {
334
+ abortSignal,
335
+ });
323
336
  if (!response.content?.trim()) {
324
337
  diagnostics.push({
325
338
  code: 'llm_empty_response',
@@ -333,6 +346,7 @@ Summary:`;
333
346
  outputs.push(response.content.trim());
334
347
  }
335
348
  catch (error) {
349
+ abortSignal?.throwIfAborted();
336
350
  diagnostics.push({
337
351
  code: 'llm_request_failed',
338
352
  message: (0, redaction_1.redactTraceText)(error instanceof Error ? error.message : String(error)),
@@ -3,24 +3,24 @@
3
3
  *
4
4
  * Config loading priority:
5
5
  * 1. CLI arguments
6
- * 2. ~/.orion-code/orion.json (GlobalConfig)
6
+ * 2. ~/.orion-code/orion.yaml (GlobalConfig)
7
7
  * 3. Agent internal defaults
8
8
  *
9
- * orion.json is the single configuration source. Provider credentials
9
+ * orion.yaml is the single configuration source. Provider credentials
10
10
  * (ANTHROPIC_API_KEY, OPENAI_API_KEY, DASHSCOPE_API_KEY, etc.) are still read
11
11
  * from the process environment by the model/web-search clients at runtime;
12
12
  * those are functional reads, not configuration overrides.
13
13
  *
14
- * UI renderer is intentionally not read from orion.json or env. TUI is the
14
+ * UI renderer is intentionally not read from orion.yaml or env. TUI is the
15
15
  * public product default; --ui terminal selects the technical diagnostics
16
16
  * fallback. The retired Ink renderer is intentionally not a compatibility path.
17
17
  */
18
- import { type ToolConfirmationPolicy, type UIConfig, type UIRenderer, type UIConfirmationMode, type WebSearchMcpConfig, type SkillsConfig, type AgentLoopConfig, type AgentLoopBudgetConfig, type SubagentUserConfig, type SubagentMode, type SubagentRole, type CostConfig } from './global-config';
18
+ import { type ToolConfirmationPolicy, type UIConfig, type UIRenderer, type WebSearchMcpConfig, type SkillsConfig, type AgentLoopConfig, type AgentLoopBudgetConfig, type SubagentUserConfig, type SubagentMode, type SubagentRole, type CostConfig } from './global-config';
19
19
  import { type ModelRegistry } from './model-registry';
20
20
  import { ModelClientPool } from './model-client-pool';
21
21
  import type { EffortPreference } from './effort';
22
22
  import { type SubagentConfig } from '../runtime/subagents/types';
23
- export type { ToolConfirmationPolicy, UIConfig, UIRenderer, UIConfirmationMode, WebSearchMcpConfig, SkillsConfig, AgentLoopConfig, AgentLoopBudgetConfig, SubagentUserConfig, SubagentMode, SubagentRole, CostConfig, };
23
+ export type { ToolConfirmationPolicy, UIConfig, UIRenderer, WebSearchMcpConfig, SkillsConfig, AgentLoopConfig, AgentLoopBudgetConfig, SubagentUserConfig, SubagentMode, SubagentRole, CostConfig, };
24
24
  export declare const PRODUCT_UI_RENDERER: UIRenderer;
25
25
  export declare const TECHNICAL_UI_RENDERERS: readonly ["terminal"];
26
26
  export declare const DEFAULT_UI_RENDERER: UIRenderer;
@@ -4,15 +4,15 @@
4
4
  *
5
5
  * Config loading priority:
6
6
  * 1. CLI arguments
7
- * 2. ~/.orion-code/orion.json (GlobalConfig)
7
+ * 2. ~/.orion-code/orion.yaml (GlobalConfig)
8
8
  * 3. Agent internal defaults
9
9
  *
10
- * orion.json is the single configuration source. Provider credentials
10
+ * orion.yaml is the single configuration source. Provider credentials
11
11
  * (ANTHROPIC_API_KEY, OPENAI_API_KEY, DASHSCOPE_API_KEY, etc.) are still read
12
12
  * from the process environment by the model/web-search clients at runtime;
13
13
  * those are functional reads, not configuration overrides.
14
14
  *
15
- * UI renderer is intentionally not read from orion.json or env. TUI is the
15
+ * UI renderer is intentionally not read from orion.yaml or env. TUI is the
16
16
  * public product default; --ui terminal selects the technical diagnostics
17
17
  * fallback. The retired Ink renderer is intentionally not a compatibility path.
18
18
  */
@@ -43,7 +43,6 @@ exports.SUPPORTED_UI_RENDERERS = [
43
43
  // ============================================================================
44
44
  // Agent internal defaults
45
45
  // ============================================================================
46
- let _legacyConfigWarned = false;
47
46
  const INTERNAL_DEFAULTS = {
48
47
  name: 'orion-code',
49
48
  mode: 'development',
@@ -51,20 +50,10 @@ const INTERNAL_DEFAULTS = {
51
50
  toolConfirmation: 'allow',
52
51
  ui: {
53
52
  renderer: exports.DEFAULT_UI_RENDERER,
54
- confirmations: 'config',
55
53
  theme: 'orion-pixel',
56
54
  motion: 'reduced',
57
55
  mascot: true,
58
- statusLine: [
59
- 'mode',
60
- 'goal',
61
- 'model',
62
- 'effort',
63
- 'context',
64
- 'permission',
65
- 'queue',
66
- 'activity',
67
- ],
56
+ statusLine: ['mode', 'goal', 'model', 'effort', 'context', 'queue', 'activity'],
68
57
  keymap: {},
69
58
  },
70
59
  };
@@ -88,9 +77,6 @@ function isProductUIRenderer(value) {
88
77
  function isTechnicalUIRenderer(value) {
89
78
  return typeof value === 'string' && exports.TECHNICAL_UI_RENDERERS.includes(value);
90
79
  }
91
- function normalizeUIConfirmationMode(value) {
92
- return value === 'config' || value === 'interactive' ? value : undefined;
93
- }
94
80
  function toNonEmptyString(value) {
95
81
  if (typeof value !== 'string')
96
82
  return undefined;
@@ -117,7 +103,7 @@ function loadWebSearchConfig(globalConfig, overrides) {
117
103
  ...globalConfig.webSearch,
118
104
  ...overrides.webSearch,
119
105
  };
120
- // orion.json is the sole structured configuration source. The provider API
106
+ // orion.yaml is the sole structured configuration source. The provider API
121
107
  // key remains a functional read from the environment (DASHSCOPE_API_KEY) so
122
108
  // the built-in DashScope web search keeps working without an explicit key.
123
109
  const apiKey = merged.apiKey ?? process.env.DASHSCOPE_API_KEY;
@@ -128,9 +114,6 @@ function loadWebSearchConfig(globalConfig, overrides) {
128
114
  function loadUIConfig(globalConfig, overrides) {
129
115
  return {
130
116
  renderer: resolveUIRenderer(overrides.ui?.renderer) ?? INTERNAL_DEFAULTS.ui.renderer,
131
- confirmations: normalizeUIConfirmationMode(overrides.ui?.confirmations) ??
132
- normalizeUIConfirmationMode(globalConfig.ui?.confirmations) ??
133
- INTERNAL_DEFAULTS.ui.confirmations,
134
117
  theme: overrides.ui?.theme ?? globalConfig.ui?.theme ?? INTERNAL_DEFAULTS.ui.theme,
135
118
  motion: overrides.ui?.motion ?? globalConfig.ui?.motion ?? INTERNAL_DEFAULTS.ui.motion,
136
119
  mascot: overrides.ui?.mascot ?? globalConfig.ui?.mascot ?? INTERNAL_DEFAULTS.ui.mascot,
@@ -150,7 +133,19 @@ function loadAgentLoopConfig(globalConfig, overrides) {
150
133
  ...globalConfig.agentLoop?.budget,
151
134
  ...overrides.agentLoop?.budget,
152
135
  };
153
- return Object.keys(budget).length > 0 ? { budget } : undefined;
136
+ const continuation = overrides.agentLoop?.continuation ?? globalConfig.agentLoop?.continuation;
137
+ const budgetPolicy = overrides.agentLoop?.budgetPolicy ?? globalConfig.agentLoop?.budgetPolicy;
138
+ const goalBudget = {
139
+ ...globalConfig.agentLoop?.goalBudget,
140
+ ...overrides.agentLoop?.goalBudget,
141
+ };
142
+ const result = {
143
+ ...(budgetPolicy ? { budgetPolicy } : {}),
144
+ ...(Object.keys(budget).length > 0 ? { budget } : {}),
145
+ ...(continuation ? { continuation } : {}),
146
+ ...(Object.keys(goalBudget).length > 0 ? { goalBudget } : {}),
147
+ };
148
+ return Object.keys(result).length > 0 ? result : undefined;
154
149
  }
155
150
  function normalizePricing(value) {
156
151
  if (!value || typeof value !== 'object')
@@ -200,7 +195,6 @@ function loadSubagentConfig(globalConfig, overrides) {
200
195
  mode: merged.mode ?? types_1.DEFAULT_SUBAGENT_CONFIG.mode,
201
196
  maxParallel: merged.maxParallel ?? types_1.DEFAULT_SUBAGENT_CONFIG.maxParallel,
202
197
  maxTasksPerTurn: merged.maxTasksPerTurn ?? types_1.DEFAULT_SUBAGENT_CONFIG.maxTasksPerTurn,
203
- maxTurnsPerTask: merged.maxTurnsPerTask ?? types_1.DEFAULT_SUBAGENT_CONFIG.maxTurnsPerTask,
204
198
  maxModelRequestsPerTask: merged.maxModelRequestsPerTask ?? types_1.DEFAULT_SUBAGENT_CONFIG.maxModelRequestsPerTask,
205
199
  maxModelRequestsPerTurn: merged.maxModelRequestsPerTurn ?? types_1.DEFAULT_SUBAGENT_CONFIG.maxModelRequestsPerTurn,
206
200
  maxToolCallsPerTask: merged.maxToolCallsPerTask ?? types_1.DEFAULT_SUBAGENT_CONFIG.maxToolCallsPerTask,
@@ -240,12 +234,6 @@ function loadConfig(overrides = {}) {
240
234
  }
241
235
  }
242
236
  if (!modelRegistry) {
243
- if ((0, model_registry_1.isLegacyConfig)(rawConfig)) {
244
- if (!_legacyConfigWarned) {
245
- _legacyConfigWarned = true;
246
- console.warn(`[orion-code] ${(0, model_registry_1.getLegacyMigrationHint)().split('\n')[0]}`);
247
- }
248
- }
249
237
  resolvedModel =
250
238
  toNonEmptyString(overrides.model) ?? toNonEmptyString(globalConfig.defaultModel) ?? 'gpt-4o';
251
239
  resolvedFallback =
@@ -254,14 +242,13 @@ function loadConfig(overrides = {}) {
254
242
  undefined;
255
243
  }
256
244
  const config = {
257
- apiKey: toNonEmptyString(overrides.apiKey) ?? globalConfig.apiKey ?? '',
258
- apiBaseUrl: toNonEmptyString(overrides.apiBaseUrl) ?? globalConfig.apiBaseUrl ?? undefined,
245
+ apiKey: toNonEmptyString(overrides.apiKey) ?? '',
246
+ apiBaseUrl: toNonEmptyString(overrides.apiBaseUrl),
259
247
  model: resolvedModel,
260
248
  fallbackModel: resolvedFallback,
261
249
  modelRegistry,
262
250
  modelClientPool,
263
251
  toolConfirmation: normalizeToolConfirmationPolicy(overrides.toolConfirmation) ??
264
- normalizeToolConfirmationPolicy(globalConfig.toolConfirmation) ??
265
252
  INTERNAL_DEFAULTS.toolConfirmation,
266
253
  defaultEffort: globalConfig.defaultEffort,
267
254
  webSearch: loadWebSearchConfig(globalConfig, overrides),
@@ -277,20 +264,18 @@ function loadConfig(overrides = {}) {
277
264
  return config;
278
265
  }
279
266
  function isConfigured(config) {
280
- if (config.modelRegistry?.defaultProfile) {
281
- const provider = config.modelRegistry.providers.get(config.modelRegistry.defaultProfile.provider);
282
- if (provider) {
283
- return provider.apiKey.length > 0;
284
- }
285
- }
286
- return Boolean(config.apiKey);
267
+ return getConfigErrors(config).length === 0;
287
268
  }
288
269
  function getConfigErrors(config) {
289
- const errors = [];
290
- if (!isConfigured(config)) {
291
- errors.push('Missing API key. Set it in ~/.orion-code/orion.json.');
270
+ const registry = config.modelRegistry;
271
+ const provider = registry?.defaultProfile
272
+ ? registry.providers.get(registry.defaultProfile.provider)
273
+ : undefined;
274
+ if (registry && !provider) {
275
+ return ['No default model provider is configured in ~/.orion-code/orion.yaml.'];
292
276
  }
293
- return errors;
277
+ const { error } = (0, model_client_pool_1.resolveProviderCredential)(provider?.apiKey ?? config.apiKey);
278
+ return error ? [error] : [];
294
279
  }
295
280
  function getConfigSummary(config) {
296
281
  return {
@@ -302,7 +287,7 @@ function getConfigSummary(config) {
302
287
  mode: config.mode,
303
288
  logLevel: config.logLevel,
304
289
  toolConfirmation: config.toolConfirmation,
305
- ui: `${config.ui?.renderer ?? INTERNAL_DEFAULTS.ui.renderer}/${config.ui?.confirmations ?? INTERNAL_DEFAULTS.ui.confirmations}`,
290
+ ui: config.ui?.renderer ?? INTERNAL_DEFAULTS.ui.renderer,
306
291
  webSearch: config.webSearch?.endpoint || config.webSearch?.apiKey || config.webSearch?.toolName
307
292
  ? 'configured'
308
293
  : '(default)',
@@ -7,6 +7,7 @@ const fs_1 = require("fs");
7
7
  const path_1 = require("path");
8
8
  const config_dir_1 = require("./config-dir");
9
9
  const config_1 = require("./config");
10
+ const model_client_pool_1 = require("./model-client-pool");
10
11
  const mcp_1 = require("../runtime/mcp");
11
12
  const project_instructions_1 = require("./project-instructions");
12
13
  const prompt_context_1 = require("./prompt-context");
@@ -91,6 +92,19 @@ function summarizeAutoCompact(ctx) {
91
92
  `preCompactArmed=${stats.preCompactArmed}`,
92
93
  `compactCount=${stats.compactCount}`,
93
94
  `lastCompactMode=${stats.lastCompactMode ?? 'none'}`,
95
+ ...(stats.backgroundCompact
96
+ ? [
97
+ `backgroundCompact=${stats.backgroundCompact.state}${stats.backgroundCompact.reason ? ` (${stats.backgroundCompact.reason})` : ''}`,
98
+ `backgroundElapsedMs=${stats.backgroundCompact.elapsedMs}`,
99
+ `backgroundSummaryAttempts=${stats.backgroundCompact.summaryAttempts ?? 0}`,
100
+ ...(stats.backgroundCompact.promptTokens === undefined
101
+ ? []
102
+ : [
103
+ `backgroundPromptTokens=${stats.backgroundCompact.promptTokens}`,
104
+ `backgroundCompletionTokens=${stats.backgroundCompact.completionTokens}`,
105
+ ]),
106
+ ]
107
+ : []),
94
108
  ].join('\n'),
95
109
  };
96
110
  }
@@ -423,18 +437,78 @@ function summarizeWarningDedup() {
423
437
  };
424
438
  }
425
439
  function summarizeProviderConfig(ctx) {
440
+ // v0.4: resolve the active model's provider from the registry, not the
441
+ // retired top-level apiKey/apiBaseUrl fields, so custom providers show their
442
+ // real endpoint instead of "unknown / default endpoint".
443
+ const registry = ctx.config.modelRegistry;
444
+ const selector = ctx.store.getSnapshot().currentModel;
445
+ const activeModel = ctx.llm?.getModel() ?? selector;
446
+ const profile = registry?.profiles.get(selector) ??
447
+ registry?.enabledProfiles.find(item => item.id === activeModel || item.model === activeModel);
448
+ const provider = profile ? registry?.providers.get(profile.provider) : undefined;
449
+ const credential = (0, model_client_pool_1.resolveProviderCredential)(provider?.apiKey ?? ctx.config.apiKey);
426
450
  const diagnostic = (0, provider_diagnostics_1.diagnoseProviderConfig)({
427
- apiKey: ctx.config.apiKey,
428
- baseUrl: ctx.config.apiBaseUrl,
451
+ apiKey: credential.apiKey,
452
+ baseUrl: ctx.config.apiBaseUrl || provider?.baseUrl,
429
453
  fallbackModel: ctx.config.fallbackModel,
430
- model: ctx.llm?.getModel() ?? ctx.config.model,
454
+ model: activeModel,
455
+ provider: profile?.provider ?? provider?.id,
456
+ ...(profile
457
+ ? {
458
+ effectiveLimits: {
459
+ contextWindow: profile.resolvedContextWindow,
460
+ maxOutputTokens: profile.resolvedMaxOutputTokens,
461
+ source: `${profile.contextSource}/${profile.outputSource}`,
462
+ },
463
+ }
464
+ : {}),
431
465
  });
432
466
  return {
433
467
  id: 'provider-config',
434
468
  status: diagnostic.status,
435
469
  label: 'Provider Config',
436
470
  summary: diagnostic.summary,
437
- detail: diagnostic.detail.join('\n'),
471
+ detail: [...diagnostic.detail, ...(credential.error ? [credential.error] : [])].join('\n'),
472
+ };
473
+ }
474
+ /**
475
+ * v0.4.0 — detect injected proxy env that hijacks provider requests.
476
+ * WorkBuddy/Conductor sessions inject HTTP(S)_PROXY; Node's fetch/undici honors
477
+ * them by default, so a healthy provider appears to fail before TLS. Report a
478
+ * warn with the remediation command, never echoing credentials in proxy URLs.
479
+ */
480
+ function summarizeProxyEnvironment() {
481
+ const names = [
482
+ 'HTTP_PROXY',
483
+ 'HTTPS_PROXY',
484
+ 'ALL_PROXY',
485
+ 'http_proxy',
486
+ 'https_proxy',
487
+ 'all_proxy',
488
+ ];
489
+ const present = names.filter(name => {
490
+ const value = process.env[name]?.trim() ?? '';
491
+ return value.length > 0 && !/^(direct|none|off)$/i.test(value);
492
+ });
493
+ if (present.length === 0) {
494
+ return {
495
+ id: 'proxy-environment',
496
+ status: 'ok',
497
+ label: 'Proxy Environment',
498
+ summary: 'No proxy environment variables set',
499
+ };
500
+ }
501
+ return {
502
+ id: 'proxy-environment',
503
+ status: 'warn',
504
+ label: 'Proxy Environment',
505
+ summary: `${present.length} proxy variable(s) set — provider requests may be hijacked`,
506
+ detail: [
507
+ `set: ${present.join(', ')} (values redacted)`,
508
+ 'If provider requests fail before TLS (ECONNRESET / socket hang up), retry with:',
509
+ ' env -u HTTP_PROXY -u HTTPS_PROXY -u ALL_PROXY -u http_proxy -u https_proxy -u all_proxy orion',
510
+ 'Or set NO_PROXY to include the provider host.',
511
+ ].join('\n'),
438
512
  };
439
513
  }
440
514
  function collectDoctorReport(ctx) {
@@ -443,32 +517,30 @@ function collectDoctorReport(ctx) {
443
517
  const tools = snapshot.tools;
444
518
  const staticTools = tools.filter(tool => !tool.name.startsWith('mcp__')).length;
445
519
  const mcpTools = tools.length - staticTools;
520
+ const configError = (0, config_1.getConfigErrors)(ctx.config)[0];
446
521
  const checks = [
447
522
  {
448
523
  id: 'config',
449
- status: (0, config_1.isConfigured)(ctx.config) ? 'ok' : 'fail',
524
+ status: configError ? 'fail' : 'ok',
450
525
  label: 'Config',
451
- summary: (0, config_1.isConfigured)(ctx.config)
452
- ? `API key present, model ${ctx.config.model}`
453
- : 'Missing API key',
526
+ summary: configError ?? `API key present, model ${ctx.config.model}`,
454
527
  detail: `config=${(0, config_dir_1.getGlobalConfigPath)()}\nbaseUrl=${(0, provider_diagnostics_1.redactProviderSecrets)(ctx.config.apiBaseUrl || '(default OpenAI-compatible endpoint)')}`,
455
528
  },
456
529
  {
457
530
  id: 'llm',
458
- status: ctx.llm && (0, config_1.isConfigured)(ctx.config) ? 'ok' : 'fail',
531
+ status: ctx.llm && !configError ? 'ok' : 'fail',
459
532
  label: 'LLM',
460
533
  summary: ctx.llm ? `Initialized ${ctx.llm.getModel()}` : 'LLM service is not initialized',
461
534
  },
462
535
  summarizeProviderConfig(ctx),
536
+ summarizeProxyEnvironment(),
463
537
  summarizeAutoCompact(ctx),
464
538
  {
465
539
  id: 'permissions',
466
540
  status: 'ok',
467
541
  label: 'Permissions',
468
- summary: `toolConfirmation=${ctx.config.toolConfirmation}, ui=${ctx.config.ui?.renderer}/${ctx.config.ui?.confirmations}`,
469
- detail: ctx.config.toolConfirmation === 'ask'
470
- ? `Interactive tool confirmation is routed through the shared runtime permission protocol.${(0, config_1.isProductUIRenderer)(ctx.config.ui?.renderer) ? ' TUI is the product default.' : ''}`
471
- : undefined,
542
+ summary: 'All registered tools are enabled by default',
543
+ detail: 'Built-in tool checks and workspace containment apply during execution.',
472
544
  },
473
545
  {
474
546
  id: 'tools',
@@ -3,12 +3,12 @@ export declare const EFFORT_LEVELS: readonly ["none", "minimal", "low", "medium"
3
3
  export type EffortLevel = (typeof EFFORT_LEVELS)[number];
4
4
  export type EffortPreference = 'auto' | EffortLevel;
5
5
  export type EffortScope = 'session' | 'project' | 'global';
6
- export type EffortAdapterId = 'openai-chat-reasoning-effort' | 'anthropic-output-config-effort';
7
- export interface ReasoningCapability {
8
- kind: 'effort-level' | 'thinking-level' | 'thinking-budget';
6
+ export interface ReasoningEffortPolicy {
9
7
  supportedLevels: EffortLevel[];
10
8
  defaultLevel?: EffortLevel;
11
- adapter: EffortAdapterId;
9
+ }
10
+ /** Resolved registry metadata, never read from the public configuration document. */
11
+ export interface ReasoningCapability extends ReasoningEffortPolicy {
12
12
  source: 'config' | 'discovery' | 'builtin';
13
13
  }
14
14
  export interface ResolvedEffort {
@@ -34,7 +34,7 @@ export interface ProviderEffortSnapshot {
34
34
  capability?: ReasoningCapability;
35
35
  resolved: ResolvedEffort;
36
36
  }
37
- /** Build an immutable provider fragment. `auto` intentionally sends no override. */
37
+ /** An inherited preference sends an override only when the model has a configured level. */
38
38
  export declare function buildProviderEffortParams(snapshot: ProviderEffortSnapshot): Record<string, unknown>;
39
39
  export declare function resolveProfileEffort(profile: ResolvedModelProfile | undefined, preferences: Omit<EffortResolutionInput, 'capability'>): ResolvedEffort;
40
40
  //# sourceMappingURL=effort.d.ts.map
@@ -26,7 +26,7 @@ function resolveEffort(input) {
26
26
  source,
27
27
  supported: false,
28
28
  supportedLevels: [],
29
- warning: 'capability levels and provider adapter are not configured',
29
+ warning: 'reasoning effort capability is not configured',
30
30
  };
31
31
  }
32
32
  if (requested === 'auto') {
@@ -58,21 +58,15 @@ function resolveEffort(input) {
58
58
  supportedLevels: [...capability.supportedLevels],
59
59
  };
60
60
  }
61
- /** Build an immutable provider fragment. `auto` intentionally sends no override. */
61
+ /** An inherited preference sends an override only when the model has a configured level. */
62
62
  function buildProviderEffortParams(snapshot) {
63
- if (!snapshot.resolved.supported ||
64
- snapshot.resolved.requested === 'auto' ||
63
+ if (snapshot.protocol !== 'openai-completions' ||
64
+ !snapshot.resolved.supported ||
65
65
  !snapshot.resolved.effective ||
66
66
  !snapshot.capability) {
67
67
  return {};
68
68
  }
69
- if (snapshot.protocol === 'openai-completions' &&
70
- snapshot.capability.adapter === 'openai-chat-reasoning-effort') {
71
- return { reasoning_effort: snapshot.resolved.effective };
72
- }
73
- // Anthropic Messages is not sent through Orion's current OpenAI SDK seam.
74
- // Keep it unavailable until a native protocol adapter owns the full request.
75
- return {};
69
+ return { reasoning_effort: snapshot.resolved.effective };
76
70
  }
77
71
  function resolveProfileEffort(profile, preferences) {
78
72
  return resolveEffort({ ...preferences, capability: profile?.reasoningCapability });
@@ -1,7 +1,13 @@
1
- /** Serialize a synchronous read-modify-write operation across Orion processes. */
2
- export declare function withFileLockSync<T>(targetPath: string, operation: () => T, options?: {
1
+ export declare class FileLockBusyError extends Error {
2
+ constructor(lockPath: string);
3
+ }
4
+ interface FileLockOptions {
3
5
  waitMs?: number;
4
6
  retryMs?: number;
5
7
  staleMs?: number;
6
- }): T;
8
+ }
9
+ /** Exclusive owner handle for a lifecycle that spans asynchronous work. */
10
+ export declare function acquireFileLockSync(rawTargetPath: string, options?: FileLockOptions): () => void;
11
+ export declare function withFileLockSync<T>(rawTargetPath: string, operation: () => T, options?: FileLockOptions): T;
12
+ export {};
7
13
  //# sourceMappingURL=file-lock.d.ts.map