@orion-agents/orion-code 0.3.1 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (800) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +71 -32
  3. package/README.zh-CN.md +56 -29
  4. package/dist/commands/model-command-handlers.js +59 -14
  5. package/dist/commands/types.d.ts +6 -0
  6. package/dist/commands/workflow-command-handlers.d.ts +1 -1
  7. package/dist/commands/workflow-command-handlers.js +42 -3
  8. package/dist/commands/workflow-commands.js +2 -2
  9. package/dist/runtime/agent-runtime-controller.d.ts +17 -2
  10. package/dist/runtime/agent-runtime-controller.js +207 -47
  11. package/dist/runtime/agent-runtime-protocol.d.ts +3 -0
  12. package/dist/runtime/agent-runtime-runner.d.ts +8 -0
  13. package/dist/runtime/capability-receipt-journal.js +1 -1
  14. package/dist/runtime/durable-tool-receipt-reader.js +1 -1
  15. package/dist/runtime/legacy-thread-materializer.js +2 -2
  16. package/dist/runtime/orion-runtime-v1.d.ts +2 -1
  17. package/dist/runtime/orion-runtime-v1.js +18 -16
  18. package/dist/runtime/orion-session-runner.d.ts +6 -0
  19. package/dist/runtime/orion-session-runner.js +27 -4
  20. package/dist/runtime/plan-review.d.ts +38 -0
  21. package/dist/runtime/plan-review.js +173 -0
  22. package/dist/runtime/product-bootstrap.d.ts +6 -0
  23. package/dist/runtime/product-bootstrap.js +388 -314
  24. package/dist/runtime/product-orion-runtime.d.ts +5 -0
  25. package/dist/runtime/product-orion-runtime.js +16 -35
  26. package/dist/runtime/protocol/runtime-protocol-v1.d.ts +73 -0
  27. package/dist/runtime/protocol/runtime-protocol-v1.js +37 -0
  28. package/dist/runtime/release-receipts.d.ts +9 -3
  29. package/dist/runtime/release-receipts.js +120 -1
  30. package/dist/runtime/session-composer-control.d.ts +136 -0
  31. package/dist/runtime/session-composer-control.js +532 -0
  32. package/dist/runtime/step-snapshot.d.ts +12 -0
  33. package/dist/runtime/step-snapshot.js +14 -1
  34. package/dist/runtime/subagent-thread-runtime.js +1 -1
  35. package/dist/runtime/thread-event-store.d.ts +10 -1
  36. package/dist/runtime/thread-event-store.js +48 -12
  37. package/dist/runtime/thread-projection.d.ts +36 -0
  38. package/dist/runtime/thread-projection.js +99 -0
  39. package/dist/runtime/thread-runtime.d.ts +2 -2
  40. package/dist/runtime/thread-runtime.js +2 -2
  41. package/dist/runtime/thread-session-index.d.ts +17 -1
  42. package/dist/runtime/thread-session-index.js +89 -6
  43. package/dist/runtime/thread-session-view.d.ts +4 -1
  44. package/dist/runtime/thread-session-view.js +5 -2
  45. package/dist/runtime/thread-ui-adapter.js +10 -3
  46. package/dist/runtime/tool-gateway.js +1 -0
  47. package/dist/runtime/turn-commit.js +1 -1
  48. package/dist/runtime/ui-events.d.ts +9 -1
  49. package/dist/runtime/workspace-runtime-kernel.d.ts +67 -0
  50. package/dist/runtime/workspace-runtime-kernel.js +148 -0
  51. package/dist/services/global-config.d.ts +2 -0
  52. package/dist/services/global-config.js +7 -1
  53. package/dist/services/provider-resilience/coordinator.d.ts +3 -1
  54. package/dist/services/provider-resilience/coordinator.js +23 -1
  55. package/dist/services/provider-resilience/request-gate.js +7 -2
  56. package/dist/services/redaction.js +19 -2
  57. package/dist/services/session-storage.d.ts +36 -0
  58. package/dist/services/session-storage.js +77 -1
  59. package/dist/services/settings-coordinator.d.ts +3 -1
  60. package/dist/services/settings-coordinator.js +40 -8
  61. package/dist/services/settings-document-repository.d.ts +8 -1
  62. package/dist/services/settings-document-repository.js +22 -1
  63. package/dist/tui-ui/transcript-inspector-layout.js +13 -6
  64. package/dist/web/event-hub.d.ts +2 -0
  65. package/dist/web/event-hub.js +53 -6
  66. package/dist/web/file-read-service.d.ts +11 -0
  67. package/dist/web/file-read-service.js +56 -19
  68. package/dist/web/git-read-model-service.d.ts +8 -0
  69. package/dist/web/git-read-model-service.js +35 -2
  70. package/dist/web/protocol.d.ts +193 -3
  71. package/dist/web/protocol.js +245 -2
  72. package/dist/web/review-service.d.ts +1 -0
  73. package/dist/web/review-service.js +1 -0
  74. package/dist/web/server.js +75 -14
  75. package/dist/web/session-runtime-registry.d.ts +124 -0
  76. package/dist/web/session-runtime-registry.js +448 -0
  77. package/dist/web/terminal-manager.d.ts +1 -0
  78. package/dist/web/terminal-manager.js +60 -9
  79. package/dist/web/terminal-server.js +35 -6
  80. package/dist/web/workbench-controller.d.ts +52 -11
  81. package/dist/web/workbench-controller.js +1049 -110
  82. package/dist/web/workspace-mutation-arbiter.d.ts +54 -0
  83. package/dist/web/workspace-mutation-arbiter.js +267 -0
  84. package/dist/web-client/assets/{DiffViewer-DpKoD07C.js → DiffViewer-D6mG729y.js} +1 -1
  85. package/dist/web-client/assets/FilesPanel-CCDoAZ1J.js +2 -0
  86. package/dist/web-client/assets/{GitPanel-D20StcdG.js → GitPanel-DtNgiH7A.js} +1 -1
  87. package/dist/web-client/assets/ReviewPanel-CKEBSt6P.js +1 -0
  88. package/dist/web-client/assets/{TerminalPanel-BLQ592Fb.js → TerminalPanel-CNxMaBLp.js} +15 -13
  89. package/dist/web-client/assets/index-BBvNg3By.css +1 -0
  90. package/dist/web-client/assets/index-C6TDJwMC.js +17 -0
  91. package/dist/web-client/index.html +4 -4
  92. package/docs/architecture/agent-mode-permission-contract.md +87 -0
  93. package/docs/architecture/v0.3.1-web-api.yaml +53 -5
  94. package/docs/architecture/v0.3.2-web-api.yaml +3029 -0
  95. package/docs/architecture/v0.3.3-web-api.yaml +3205 -0
  96. package/docs/architecture/v0.3.4-stabilization-contract.md +32 -0
  97. package/docs/migration/v0.3.1-to-v0.3.2.md +94 -0
  98. package/docs/migration/v0.3.2-to-v0.3.3.md +62 -0
  99. package/docs/migration/v0.3.3-to-v0.3.4.md +36 -0
  100. package/docs/plan/v0.3.1-web-workbench-professional-shell-plan.md +1 -1
  101. package/docs/plan/v0.3.2-web-workbench-layout-and-composer-plan.md +869 -0
  102. package/docs/plan/v0.3.3-plan.md +1113 -0
  103. package/docs/plan/v0.3.4-stabilization-plan.md +89 -0
  104. package/docs/readme.md +12 -2
  105. package/docs/test/v0.3.1-web-workbench-e2e-plan.md +1 -1
  106. package/docs/test/v0.3.2-web-workbench-e2e-plan.md +100 -0
  107. package/docs/test/v0.3.3-web-workbench-e2e-plan.md +79 -0
  108. package/docs/test/v0.3.4-stabilization-e2e-plan.md +54 -0
  109. package/npm-shrinkwrap.json +25 -25
  110. package/package.json +15 -1
  111. package/dist/cli.d.ts.map +0 -1
  112. package/dist/cli.js.map +0 -1
  113. package/dist/commands/context-commands.d.ts.map +0 -1
  114. package/dist/commands/context-commands.js.map +0 -1
  115. package/dist/commands/context-tool-command-handlers.d.ts.map +0 -1
  116. package/dist/commands/context-tool-command-handlers.js.map +0 -1
  117. package/dist/commands/core-command-handlers.d.ts.map +0 -1
  118. package/dist/commands/core-command-handlers.js.map +0 -1
  119. package/dist/commands/diagnostic-command-handlers.d.ts.map +0 -1
  120. package/dist/commands/diagnostic-command-handlers.js.map +0 -1
  121. package/dist/commands/diagnostic-commands.d.ts.map +0 -1
  122. package/dist/commands/diagnostic-commands.js.map +0 -1
  123. package/dist/commands/index.d.ts.map +0 -1
  124. package/dist/commands/index.js.map +0 -1
  125. package/dist/commands/model-command-handlers.d.ts.map +0 -1
  126. package/dist/commands/model-command-handlers.js.map +0 -1
  127. package/dist/commands/model-commands.d.ts.map +0 -1
  128. package/dist/commands/model-commands.js.map +0 -1
  129. package/dist/commands/parser.d.ts.map +0 -1
  130. package/dist/commands/parser.js.map +0 -1
  131. package/dist/commands/registry.d.ts.map +0 -1
  132. package/dist/commands/registry.js.map +0 -1
  133. package/dist/commands/session-command-handlers.d.ts.map +0 -1
  134. package/dist/commands/session-command-handlers.js.map +0 -1
  135. package/dist/commands/session-commands.d.ts.map +0 -1
  136. package/dist/commands/session-commands.js.map +0 -1
  137. package/dist/commands/system-commands.d.ts.map +0 -1
  138. package/dist/commands/system-commands.js.map +0 -1
  139. package/dist/commands/target-command.d.ts.map +0 -1
  140. package/dist/commands/target-command.js.map +0 -1
  141. package/dist/commands/tool-commands.d.ts.map +0 -1
  142. package/dist/commands/tool-commands.js.map +0 -1
  143. package/dist/commands/types.d.ts.map +0 -1
  144. package/dist/commands/types.js.map +0 -1
  145. package/dist/commands/workflow-command-handlers.d.ts.map +0 -1
  146. package/dist/commands/workflow-command-handlers.js.map +0 -1
  147. package/dist/commands/workflow-commands.d.ts.map +0 -1
  148. package/dist/commands/workflow-commands.js.map +0 -1
  149. package/dist/core/checkpoint.d.ts.map +0 -1
  150. package/dist/core/checkpoint.js.map +0 -1
  151. package/dist/core/cost-tracker.d.ts.map +0 -1
  152. package/dist/core/cost-tracker.js.map +0 -1
  153. package/dist/core/security-warning.d.ts.map +0 -1
  154. package/dist/core/security-warning.js.map +0 -1
  155. package/dist/core/strategy-tracker.d.ts.map +0 -1
  156. package/dist/core/strategy-tracker.js.map +0 -1
  157. package/dist/core/tool-artifacts.d.ts.map +0 -1
  158. package/dist/core/tool-artifacts.js.map +0 -1
  159. package/dist/core/warn-dedup.d.ts.map +0 -1
  160. package/dist/core/warn-dedup.js.map +0 -1
  161. package/dist/framework/agent-mode.d.ts.map +0 -1
  162. package/dist/framework/agent-mode.js.map +0 -1
  163. package/dist/framework/external-assertion.d.ts.map +0 -1
  164. package/dist/framework/external-assertion.js.map +0 -1
  165. package/dist/framework/index.d.ts.map +0 -1
  166. package/dist/framework/index.js.map +0 -1
  167. package/dist/framework/loop-budget-contract.d.ts.map +0 -1
  168. package/dist/framework/loop-budget-contract.js.map +0 -1
  169. package/dist/framework/prompt.d.ts.map +0 -1
  170. package/dist/framework/prompt.js.map +0 -1
  171. package/dist/framework/query.d.ts.map +0 -1
  172. package/dist/framework/query.js.map +0 -1
  173. package/dist/framework/stop-decision.d.ts.map +0 -1
  174. package/dist/framework/stop-decision.js.map +0 -1
  175. package/dist/framework/store.d.ts.map +0 -1
  176. package/dist/framework/store.js.map +0 -1
  177. package/dist/framework/tool-call-orchestrator.d.ts.map +0 -1
  178. package/dist/framework/tool-call-orchestrator.js.map +0 -1
  179. package/dist/framework/tool-serializer.d.ts.map +0 -1
  180. package/dist/framework/tool-serializer.js.map +0 -1
  181. package/dist/framework/tool-state.d.ts.map +0 -1
  182. package/dist/framework/tool-state.js.map +0 -1
  183. package/dist/framework/tool.d.ts.map +0 -1
  184. package/dist/framework/tool.js.map +0 -1
  185. package/dist/harness/assembler.d.ts.map +0 -1
  186. package/dist/harness/assembler.js.map +0 -1
  187. package/dist/harness/capability-profile.d.ts.map +0 -1
  188. package/dist/harness/capability-profile.js.map +0 -1
  189. package/dist/harness/capsule.d.ts.map +0 -1
  190. package/dist/harness/capsule.js.map +0 -1
  191. package/dist/harness/compact-benchmark-corpus.d.ts.map +0 -1
  192. package/dist/harness/compact-benchmark-corpus.js.map +0 -1
  193. package/dist/harness/context-harness.d.ts.map +0 -1
  194. package/dist/harness/context-harness.js.map +0 -1
  195. package/dist/harness/contract.d.ts.map +0 -1
  196. package/dist/harness/contract.js.map +0 -1
  197. package/dist/harness/drift-guard.d.ts.map +0 -1
  198. package/dist/harness/drift-guard.js.map +0 -1
  199. package/dist/harness/evidence.d.ts.map +0 -1
  200. package/dist/harness/evidence.js.map +0 -1
  201. package/dist/harness/index.d.ts.map +0 -1
  202. package/dist/harness/index.js.map +0 -1
  203. package/dist/harness/intent.d.ts.map +0 -1
  204. package/dist/harness/intent.js.map +0 -1
  205. package/dist/harness/ledger.d.ts.map +0 -1
  206. package/dist/harness/ledger.js.map +0 -1
  207. package/dist/harness/progress-controller.d.ts.map +0 -1
  208. package/dist/harness/progress-controller.js.map +0 -1
  209. package/dist/harness/state.d.ts.map +0 -1
  210. package/dist/harness/state.js.map +0 -1
  211. package/dist/harness/stop-controller.d.ts.map +0 -1
  212. package/dist/harness/stop-controller.js.map +0 -1
  213. package/dist/harness/turn-summary.d.ts.map +0 -1
  214. package/dist/harness/turn-summary.js.map +0 -1
  215. package/dist/harness/types.d.ts.map +0 -1
  216. package/dist/harness/types.js.map +0 -1
  217. package/dist/harness/verification.d.ts.map +0 -1
  218. package/dist/harness/verification.js.map +0 -1
  219. package/dist/index.d.ts.map +0 -1
  220. package/dist/index.js.map +0 -1
  221. package/dist/memory/embeddings.d.ts.map +0 -1
  222. package/dist/memory/embeddings.js.map +0 -1
  223. package/dist/memory/entrypoint.d.ts.map +0 -1
  224. package/dist/memory/entrypoint.js.map +0 -1
  225. package/dist/memory/index.d.ts.map +0 -1
  226. package/dist/memory/index.js.map +0 -1
  227. package/dist/memory/prompt-context.d.ts.map +0 -1
  228. package/dist/memory/prompt-context.js.map +0 -1
  229. package/dist/memory/prompts.d.ts.map +0 -1
  230. package/dist/memory/prompts.js.map +0 -1
  231. package/dist/memory/relevant-finder.d.ts.map +0 -1
  232. package/dist/memory/relevant-finder.js.map +0 -1
  233. package/dist/memory/semantic-config.d.ts.map +0 -1
  234. package/dist/memory/semantic-config.js.map +0 -1
  235. package/dist/memory/semantic-search.d.ts.map +0 -1
  236. package/dist/memory/semantic-search.js.map +0 -1
  237. package/dist/memory/storage.d.ts.map +0 -1
  238. package/dist/memory/storage.js.map +0 -1
  239. package/dist/memory/store.d.ts.map +0 -1
  240. package/dist/memory/store.js.map +0 -1
  241. package/dist/memory/team-paths.d.ts.map +0 -1
  242. package/dist/memory/team-paths.js.map +0 -1
  243. package/dist/memory/types.d.ts.map +0 -1
  244. package/dist/memory/types.js.map +0 -1
  245. package/dist/memory/validation.d.ts.map +0 -1
  246. package/dist/memory/validation.js.map +0 -1
  247. package/dist/memory/vector-store.d.ts.map +0 -1
  248. package/dist/memory/vector-store.js.map +0 -1
  249. package/dist/migration/command.d.ts.map +0 -1
  250. package/dist/migration/command.js.map +0 -1
  251. package/dist/migration/index.d.ts.map +0 -1
  252. package/dist/migration/index.js.map +0 -1
  253. package/dist/migration/migrate.d.ts.map +0 -1
  254. package/dist/migration/migrate.js.map +0 -1
  255. package/dist/migration/types.d.ts.map +0 -1
  256. package/dist/migration/types.js.map +0 -1
  257. package/dist/print-ui/launch.d.ts.map +0 -1
  258. package/dist/print-ui/launch.js.map +0 -1
  259. package/dist/product/environment.d.ts.map +0 -1
  260. package/dist/product/environment.js.map +0 -1
  261. package/dist/product/identity.d.ts.map +0 -1
  262. package/dist/product/identity.js.map +0 -1
  263. package/dist/product/index.d.ts.map +0 -1
  264. package/dist/product/index.js.map +0 -1
  265. package/dist/product/paths.d.ts.map +0 -1
  266. package/dist/product/paths.js.map +0 -1
  267. package/dist/product/version.d.ts.map +0 -1
  268. package/dist/product/version.js.map +0 -1
  269. package/dist/runtime/agent-loop.d.ts.map +0 -1
  270. package/dist/runtime/agent-loop.js.map +0 -1
  271. package/dist/runtime/agent-runtime-controller.d.ts.map +0 -1
  272. package/dist/runtime/agent-runtime-controller.js.map +0 -1
  273. package/dist/runtime/agent-runtime-protocol.d.ts.map +0 -1
  274. package/dist/runtime/agent-runtime-protocol.js.map +0 -1
  275. package/dist/runtime/agent-runtime-runner.d.ts.map +0 -1
  276. package/dist/runtime/agent-runtime-runner.js.map +0 -1
  277. package/dist/runtime/agent-status.d.ts.map +0 -1
  278. package/dist/runtime/agent-status.js.map +0 -1
  279. package/dist/runtime/aggregate-tool-presenter.d.ts.map +0 -1
  280. package/dist/runtime/aggregate-tool-presenter.js.map +0 -1
  281. package/dist/runtime/batch-read-service.d.ts.map +0 -1
  282. package/dist/runtime/batch-read-service.js.map +0 -1
  283. package/dist/runtime/builtin-tool-provider.d.ts.map +0 -1
  284. package/dist/runtime/builtin-tool-provider.js.map +0 -1
  285. package/dist/runtime/capabilities/compiler.d.ts.map +0 -1
  286. package/dist/runtime/capabilities/compiler.js.map +0 -1
  287. package/dist/runtime/capabilities/index.d.ts.map +0 -1
  288. package/dist/runtime/capabilities/index.js.map +0 -1
  289. package/dist/runtime/capabilities/types.d.ts.map +0 -1
  290. package/dist/runtime/capabilities/types.js.map +0 -1
  291. package/dist/runtime/capability-receipt-journal.d.ts.map +0 -1
  292. package/dist/runtime/capability-receipt-journal.js.map +0 -1
  293. package/dist/runtime/capability-step-factory.d.ts.map +0 -1
  294. package/dist/runtime/capability-step-factory.js.map +0 -1
  295. package/dist/runtime/compact-transaction.d.ts.map +0 -1
  296. package/dist/runtime/compact-transaction.js.map +0 -1
  297. package/dist/runtime/composer/buffer.d.ts.map +0 -1
  298. package/dist/runtime/composer/buffer.js.map +0 -1
  299. package/dist/runtime/composer/grapheme.d.ts.map +0 -1
  300. package/dist/runtime/composer/grapheme.js.map +0 -1
  301. package/dist/runtime/composer/history.d.ts.map +0 -1
  302. package/dist/runtime/composer/history.js.map +0 -1
  303. package/dist/runtime/composer/layout.d.ts.map +0 -1
  304. package/dist/runtime/composer/layout.js.map +0 -1
  305. package/dist/runtime/core-tools/descriptors.d.ts.map +0 -1
  306. package/dist/runtime/core-tools/descriptors.js.map +0 -1
  307. package/dist/runtime/durable-tool-receipt-reader.d.ts.map +0 -1
  308. package/dist/runtime/durable-tool-receipt-reader.js.map +0 -1
  309. package/dist/runtime/first-party-core-provider.d.ts.map +0 -1
  310. package/dist/runtime/first-party-core-provider.js.map +0 -1
  311. package/dist/runtime/first-party-long-tail-provider.d.ts.map +0 -1
  312. package/dist/runtime/first-party-long-tail-provider.js.map +0 -1
  313. package/dist/runtime/first-party-tool-services.d.ts.map +0 -1
  314. package/dist/runtime/first-party-tool-services.js.map +0 -1
  315. package/dist/runtime/first-party-tool-universe.d.ts.map +0 -1
  316. package/dist/runtime/first-party-tool-universe.js.map +0 -1
  317. package/dist/runtime/goal-lifecycle-v2.d.ts.map +0 -1
  318. package/dist/runtime/goal-lifecycle-v2.js.map +0 -1
  319. package/dist/runtime/goal-runtime-coordinator.d.ts.map +0 -1
  320. package/dist/runtime/goal-runtime-coordinator.js.map +0 -1
  321. package/dist/runtime/goals/completion-audit.d.ts.map +0 -1
  322. package/dist/runtime/goals/completion-audit.js.map +0 -1
  323. package/dist/runtime/goals/evidence.d.ts.map +0 -1
  324. package/dist/runtime/goals/evidence.js.map +0 -1
  325. package/dist/runtime/goals/objective.d.ts.map +0 -1
  326. package/dist/runtime/goals/objective.js.map +0 -1
  327. package/dist/runtime/goals/presentation.d.ts.map +0 -1
  328. package/dist/runtime/goals/presentation.js.map +0 -1
  329. package/dist/runtime/goals/types.d.ts.map +0 -1
  330. package/dist/runtime/goals/types.js.map +0 -1
  331. package/dist/runtime/harness-confluence.d.ts.map +0 -1
  332. package/dist/runtime/harness-confluence.js.map +0 -1
  333. package/dist/runtime/harness-eval.d.ts.map +0 -1
  334. package/dist/runtime/harness-eval.js.map +0 -1
  335. package/dist/runtime/harness-metrics.d.ts.map +0 -1
  336. package/dist/runtime/harness-metrics.js.map +0 -1
  337. package/dist/runtime/legacy-session-importer.d.ts.map +0 -1
  338. package/dist/runtime/legacy-session-importer.js.map +0 -1
  339. package/dist/runtime/legacy-thread-materializer.d.ts.map +0 -1
  340. package/dist/runtime/legacy-thread-materializer.js.map +0 -1
  341. package/dist/runtime/long-tail-tools/descriptors.d.ts.map +0 -1
  342. package/dist/runtime/long-tail-tools/descriptors.js.map +0 -1
  343. package/dist/runtime/loop-budget.d.ts.map +0 -1
  344. package/dist/runtime/loop-budget.js.map +0 -1
  345. package/dist/runtime/mcp/first-party-mcp-adapter.d.ts.map +0 -1
  346. package/dist/runtime/mcp/first-party-mcp-adapter.js.map +0 -1
  347. package/dist/runtime/mcp/first-party-mcp-config.d.ts.map +0 -1
  348. package/dist/runtime/mcp/first-party-mcp-config.js.map +0 -1
  349. package/dist/runtime/mcp/index.d.ts.map +0 -1
  350. package/dist/runtime/mcp/index.js.map +0 -1
  351. package/dist/runtime/mcp/lazy-mcp-runtime.d.ts.map +0 -1
  352. package/dist/runtime/mcp/lazy-mcp-runtime.js.map +0 -1
  353. package/dist/runtime/mcp/types.d.ts.map +0 -1
  354. package/dist/runtime/mcp/types.js.map +0 -1
  355. package/dist/runtime/model-coordinator.d.ts.map +0 -1
  356. package/dist/runtime/model-coordinator.js.map +0 -1
  357. package/dist/runtime/orion-runtime-v1.d.ts.map +0 -1
  358. package/dist/runtime/orion-runtime-v1.js.map +0 -1
  359. package/dist/runtime/orion-session-runner.d.ts.map +0 -1
  360. package/dist/runtime/orion-session-runner.js.map +0 -1
  361. package/dist/runtime/product-bootstrap.d.ts.map +0 -1
  362. package/dist/runtime/product-bootstrap.js.map +0 -1
  363. package/dist/runtime/product-orion-runtime.d.ts.map +0 -1
  364. package/dist/runtime/product-orion-runtime.js.map +0 -1
  365. package/dist/runtime/prompts/index.d.ts.map +0 -1
  366. package/dist/runtime/prompts/index.js.map +0 -1
  367. package/dist/runtime/prompts/prompt-registry.d.ts.map +0 -1
  368. package/dist/runtime/prompts/prompt-registry.js.map +0 -1
  369. package/dist/runtime/prompts/types.d.ts.map +0 -1
  370. package/dist/runtime/prompts/types.js.map +0 -1
  371. package/dist/runtime/protocol/canonical.d.ts.map +0 -1
  372. package/dist/runtime/protocol/canonical.js.map +0 -1
  373. package/dist/runtime/protocol/index.d.ts.map +0 -1
  374. package/dist/runtime/protocol/index.js.map +0 -1
  375. package/dist/runtime/protocol/runtime-protocol-v1.d.ts.map +0 -1
  376. package/dist/runtime/protocol/runtime-protocol-v1.js.map +0 -1
  377. package/dist/runtime/release-receipts.d.ts.map +0 -1
  378. package/dist/runtime/release-receipts.js.map +0 -1
  379. package/dist/runtime/resource-scope.d.ts.map +0 -1
  380. package/dist/runtime/resource-scope.js.map +0 -1
  381. package/dist/runtime/rich-text/ansi-parser.d.ts.map +0 -1
  382. package/dist/runtime/rich-text/ansi-parser.js.map +0 -1
  383. package/dist/runtime/rich-text/layout.d.ts.map +0 -1
  384. package/dist/runtime/rich-text/layout.js.map +0 -1
  385. package/dist/runtime/rich-text/markdown-parser.d.ts.map +0 -1
  386. package/dist/runtime/rich-text/markdown-parser.js.map +0 -1
  387. package/dist/runtime/rich-text/sanitizer.d.ts.map +0 -1
  388. package/dist/runtime/rich-text/sanitizer.js.map +0 -1
  389. package/dist/runtime/rich-text/types.d.ts.map +0 -1
  390. package/dist/runtime/rich-text/types.js.map +0 -1
  391. package/dist/runtime/runtime-event-buffer.d.ts.map +0 -1
  392. package/dist/runtime/runtime-event-buffer.js.map +0 -1
  393. package/dist/runtime/runtime-services.d.ts.map +0 -1
  394. package/dist/runtime/runtime-services.js.map +0 -1
  395. package/dist/runtime/session-history-recovery.d.ts.map +0 -1
  396. package/dist/runtime/session-history-recovery.js.map +0 -1
  397. package/dist/runtime/skills/bounded-lru-cache.d.ts.map +0 -1
  398. package/dist/runtime/skills/bounded-lru-cache.js.map +0 -1
  399. package/dist/runtime/skills/filesystem-skill-provider.d.ts.map +0 -1
  400. package/dist/runtime/skills/filesystem-skill-provider.js.map +0 -1
  401. package/dist/runtime/skills/index.d.ts.map +0 -1
  402. package/dist/runtime/skills/index.js.map +0 -1
  403. package/dist/runtime/skills/lazy-skill-runtime.d.ts.map +0 -1
  404. package/dist/runtime/skills/lazy-skill-runtime.js.map +0 -1
  405. package/dist/runtime/skills/types.d.ts.map +0 -1
  406. package/dist/runtime/skills/types.js.map +0 -1
  407. package/dist/runtime/step-snapshot.d.ts.map +0 -1
  408. package/dist/runtime/step-snapshot.js.map +0 -1
  409. package/dist/runtime/subagent-thread-runtime.d.ts.map +0 -1
  410. package/dist/runtime/subagent-thread-runtime.js.map +0 -1
  411. package/dist/runtime/subagents/budget.d.ts.map +0 -1
  412. package/dist/runtime/subagents/budget.js.map +0 -1
  413. package/dist/runtime/subagents/child-executor-guard.d.ts.map +0 -1
  414. package/dist/runtime/subagents/child-executor-guard.js.map +0 -1
  415. package/dist/runtime/subagents/context-builder.d.ts.map +0 -1
  416. package/dist/runtime/subagents/context-builder.js.map +0 -1
  417. package/dist/runtime/subagents/index.d.ts.map +0 -1
  418. package/dist/runtime/subagents/index.js.map +0 -1
  419. package/dist/runtime/subagents/parent-step-fork.d.ts.map +0 -1
  420. package/dist/runtime/subagents/parent-step-fork.js.map +0 -1
  421. package/dist/runtime/subagents/policy.d.ts.map +0 -1
  422. package/dist/runtime/subagents/policy.js.map +0 -1
  423. package/dist/runtime/subagents/presets.d.ts.map +0 -1
  424. package/dist/runtime/subagents/presets.js.map +0 -1
  425. package/dist/runtime/subagents/production.d.ts.map +0 -1
  426. package/dist/runtime/subagents/production.js.map +0 -1
  427. package/dist/runtime/subagents/provider-gate.d.ts.map +0 -1
  428. package/dist/runtime/subagents/provider-gate.js.map +0 -1
  429. package/dist/runtime/subagents/receipt-journal.d.ts.map +0 -1
  430. package/dist/runtime/subagents/receipt-journal.js.map +0 -1
  431. package/dist/runtime/subagents/research-artifact.d.ts.map +0 -1
  432. package/dist/runtime/subagents/research-artifact.js.map +0 -1
  433. package/dist/runtime/subagents/research-citation.d.ts.map +0 -1
  434. package/dist/runtime/subagents/research-citation.js.map +0 -1
  435. package/dist/runtime/subagents/research-contract.d.ts.map +0 -1
  436. package/dist/runtime/subagents/research-contract.js.map +0 -1
  437. package/dist/runtime/subagents/research-quality.d.ts.map +0 -1
  438. package/dist/runtime/subagents/research-quality.js.map +0 -1
  439. package/dist/runtime/subagents/research-renderer.d.ts.map +0 -1
  440. package/dist/runtime/subagents/research-renderer.js.map +0 -1
  441. package/dist/runtime/subagents/research-types.d.ts.map +0 -1
  442. package/dist/runtime/subagents/research-types.js.map +0 -1
  443. package/dist/runtime/subagents/result-parser.d.ts.map +0 -1
  444. package/dist/runtime/subagents/result-parser.js.map +0 -1
  445. package/dist/runtime/subagents/runner.d.ts.map +0 -1
  446. package/dist/runtime/subagents/runner.js.map +0 -1
  447. package/dist/runtime/subagents/runtime-contract.d.ts.map +0 -1
  448. package/dist/runtime/subagents/runtime-contract.js.map +0 -1
  449. package/dist/runtime/subagents/runtime-integration.d.ts.map +0 -1
  450. package/dist/runtime/subagents/runtime-integration.js.map +0 -1
  451. package/dist/runtime/subagents/supervisor.d.ts.map +0 -1
  452. package/dist/runtime/subagents/supervisor.js.map +0 -1
  453. package/dist/runtime/subagents/tool.d.ts.map +0 -1
  454. package/dist/runtime/subagents/tool.js.map +0 -1
  455. package/dist/runtime/subagents/types.d.ts.map +0 -1
  456. package/dist/runtime/subagents/types.js.map +0 -1
  457. package/dist/runtime/subagents/web-research-adapter.d.ts.map +0 -1
  458. package/dist/runtime/subagents/web-research-adapter.js.map +0 -1
  459. package/dist/runtime/task-context-service.d.ts.map +0 -1
  460. package/dist/runtime/task-context-service.js.map +0 -1
  461. package/dist/runtime/thread-admission.d.ts.map +0 -1
  462. package/dist/runtime/thread-admission.js.map +0 -1
  463. package/dist/runtime/thread-compact-persistence.d.ts.map +0 -1
  464. package/dist/runtime/thread-compact-persistence.js.map +0 -1
  465. package/dist/runtime/thread-event-store.d.ts.map +0 -1
  466. package/dist/runtime/thread-event-store.js.map +0 -1
  467. package/dist/runtime/thread-projection.d.ts.map +0 -1
  468. package/dist/runtime/thread-projection.js.map +0 -1
  469. package/dist/runtime/thread-runtime.d.ts.map +0 -1
  470. package/dist/runtime/thread-runtime.js.map +0 -1
  471. package/dist/runtime/thread-session-index.d.ts.map +0 -1
  472. package/dist/runtime/thread-session-index.js.map +0 -1
  473. package/dist/runtime/thread-session-view.d.ts.map +0 -1
  474. package/dist/runtime/thread-session-view.js.map +0 -1
  475. package/dist/runtime/thread-tool-journal.d.ts.map +0 -1
  476. package/dist/runtime/thread-tool-journal.js.map +0 -1
  477. package/dist/runtime/thread-ui-adapter.d.ts.map +0 -1
  478. package/dist/runtime/thread-ui-adapter.js.map +0 -1
  479. package/dist/runtime/tool-detail-repository.d.ts.map +0 -1
  480. package/dist/runtime/tool-detail-repository.js.map +0 -1
  481. package/dist/runtime/tool-gateway.d.ts.map +0 -1
  482. package/dist/runtime/tool-gateway.js.map +0 -1
  483. package/dist/runtime/tool-output-presentation.d.ts.map +0 -1
  484. package/dist/runtime/tool-output-presentation.js.map +0 -1
  485. package/dist/runtime/tool-receipt-validator.d.ts.map +0 -1
  486. package/dist/runtime/tool-receipt-validator.js.map +0 -1
  487. package/dist/runtime/turn-commit.d.ts.map +0 -1
  488. package/dist/runtime/turn-commit.js.map +0 -1
  489. package/dist/runtime/turn-controller.d.ts.map +0 -1
  490. package/dist/runtime/turn-controller.js.map +0 -1
  491. package/dist/runtime/ui-events.d.ts.map +0 -1
  492. package/dist/runtime/ui-events.js.map +0 -1
  493. package/dist/runtime/ui-view-model.d.ts.map +0 -1
  494. package/dist/runtime/ui-view-model.js.map +0 -1
  495. package/dist/services/atomic-write.d.ts.map +0 -1
  496. package/dist/services/atomic-write.js.map +0 -1
  497. package/dist/services/auth/auth.d.ts.map +0 -1
  498. package/dist/services/auth/auth.js.map +0 -1
  499. package/dist/services/auth/aws.d.ts.map +0 -1
  500. package/dist/services/auth/aws.js.map +0 -1
  501. package/dist/services/auth/index.d.ts.map +0 -1
  502. package/dist/services/auth/index.js.map +0 -1
  503. package/dist/services/auto-fix/autoFixConfig.d.ts.map +0 -1
  504. package/dist/services/auto-fix/autoFixConfig.js.map +0 -1
  505. package/dist/services/auto-fix/autoFixHook.d.ts.map +0 -1
  506. package/dist/services/auto-fix/autoFixHook.js.map +0 -1
  507. package/dist/services/auto-fix/autoFixRunner.d.ts.map +0 -1
  508. package/dist/services/auto-fix/autoFixRunner.js.map +0 -1
  509. package/dist/services/auto-fix/index.d.ts.map +0 -1
  510. package/dist/services/auto-fix/index.js.map +0 -1
  511. package/dist/services/bounded-response.d.ts.map +0 -1
  512. package/dist/services/bounded-response.js.map +0 -1
  513. package/dist/services/commit-plan.d.ts.map +0 -1
  514. package/dist/services/commit-plan.js.map +0 -1
  515. package/dist/services/compact/auto-compact.d.ts.map +0 -1
  516. package/dist/services/compact/auto-compact.js.map +0 -1
  517. package/dist/services/compact/compact.d.ts.map +0 -1
  518. package/dist/services/compact/compact.js.map +0 -1
  519. package/dist/services/compact/coordinator.d.ts.map +0 -1
  520. package/dist/services/compact/coordinator.js.map +0 -1
  521. package/dist/services/compact/fingerprint.d.ts.map +0 -1
  522. package/dist/services/compact/fingerprint.js.map +0 -1
  523. package/dist/services/compact/index.d.ts.map +0 -1
  524. package/dist/services/compact/index.js.map +0 -1
  525. package/dist/services/compact/planner.d.ts.map +0 -1
  526. package/dist/services/compact/planner.js.map +0 -1
  527. package/dist/services/compact/semantic-summary.d.ts.map +0 -1
  528. package/dist/services/compact/semantic-summary.js.map +0 -1
  529. package/dist/services/compact/summary-generator.d.ts.map +0 -1
  530. package/dist/services/compact/summary-generator.js.map +0 -1
  531. package/dist/services/compact/tool-call-groups.d.ts.map +0 -1
  532. package/dist/services/compact/tool-call-groups.js.map +0 -1
  533. package/dist/services/concurrent-sessions.d.ts.map +0 -1
  534. package/dist/services/concurrent-sessions.js.map +0 -1
  535. package/dist/services/config-dir.d.ts.map +0 -1
  536. package/dist/services/config-dir.js.map +0 -1
  537. package/dist/services/config.d.ts.map +0 -1
  538. package/dist/services/config.js.map +0 -1
  539. package/dist/services/diagnostic-tracking/diagnosticTracking.d.ts.map +0 -1
  540. package/dist/services/diagnostic-tracking/diagnosticTracking.js.map +0 -1
  541. package/dist/services/diagnostic-tracking/formatter.d.ts.map +0 -1
  542. package/dist/services/diagnostic-tracking/formatter.js.map +0 -1
  543. package/dist/services/diagnostic-tracking/index.d.ts.map +0 -1
  544. package/dist/services/diagnostic-tracking/index.js.map +0 -1
  545. package/dist/services/diagnostic-tracking/types.d.ts.map +0 -1
  546. package/dist/services/diagnostic-tracking/types.js.map +0 -1
  547. package/dist/services/doctor.d.ts.map +0 -1
  548. package/dist/services/doctor.js.map +0 -1
  549. package/dist/services/effort.d.ts.map +0 -1
  550. package/dist/services/effort.js.map +0 -1
  551. package/dist/services/file-context.d.ts.map +0 -1
  552. package/dist/services/file-context.js.map +0 -1
  553. package/dist/services/file-glob.d.ts.map +0 -1
  554. package/dist/services/file-glob.js.map +0 -1
  555. package/dist/services/file-lock.d.ts.map +0 -1
  556. package/dist/services/file-lock.js.map +0 -1
  557. package/dist/services/format.d.ts.map +0 -1
  558. package/dist/services/format.js.map +0 -1
  559. package/dist/services/global-config.d.ts.map +0 -1
  560. package/dist/services/global-config.js.map +0 -1
  561. package/dist/services/goal-storage.d.ts.map +0 -1
  562. package/dist/services/goal-storage.js.map +0 -1
  563. package/dist/services/llm.d.ts.map +0 -1
  564. package/dist/services/llm.js.map +0 -1
  565. package/dist/services/mcp/index.d.ts.map +0 -1
  566. package/dist/services/mcp/index.js.map +0 -1
  567. package/dist/services/mcp/transports.d.ts.map +0 -1
  568. package/dist/services/mcp/transports.js.map +0 -1
  569. package/dist/services/memory.d.ts.map +0 -1
  570. package/dist/services/memory.js.map +0 -1
  571. package/dist/services/model-catalog.d.ts.map +0 -1
  572. package/dist/services/model-catalog.js.map +0 -1
  573. package/dist/services/model-client-pool.d.ts.map +0 -1
  574. package/dist/services/model-client-pool.js.map +0 -1
  575. package/dist/services/model-context.d.ts.map +0 -1
  576. package/dist/services/model-context.js.map +0 -1
  577. package/dist/services/model-registry.d.ts.map +0 -1
  578. package/dist/services/model-registry.js.map +0 -1
  579. package/dist/services/project-instructions.d.ts.map +0 -1
  580. package/dist/services/project-instructions.js.map +0 -1
  581. package/dist/services/prompt-context.d.ts.map +0 -1
  582. package/dist/services/prompt-context.js.map +0 -1
  583. package/dist/services/provider-diagnostics.d.ts.map +0 -1
  584. package/dist/services/provider-diagnostics.js.map +0 -1
  585. package/dist/services/provider-resilience/circuit-breaker.d.ts.map +0 -1
  586. package/dist/services/provider-resilience/circuit-breaker.js.map +0 -1
  587. package/dist/services/provider-resilience/coordinator.d.ts.map +0 -1
  588. package/dist/services/provider-resilience/coordinator.js.map +0 -1
  589. package/dist/services/provider-resilience/error-classifier.d.ts.map +0 -1
  590. package/dist/services/provider-resilience/error-classifier.js.map +0 -1
  591. package/dist/services/provider-resilience/index.d.ts.map +0 -1
  592. package/dist/services/provider-resilience/index.js.map +0 -1
  593. package/dist/services/provider-resilience/request-gate.d.ts.map +0 -1
  594. package/dist/services/provider-resilience/request-gate.js.map +0 -1
  595. package/dist/services/provider-resilience/stream-recovery.d.ts.map +0 -1
  596. package/dist/services/provider-resilience/stream-recovery.js.map +0 -1
  597. package/dist/services/provider-resilience/types.d.ts.map +0 -1
  598. package/dist/services/provider-resilience/types.js.map +0 -1
  599. package/dist/services/redaction.d.ts.map +0 -1
  600. package/dist/services/redaction.js.map +0 -1
  601. package/dist/services/safe-project-reader.d.ts.map +0 -1
  602. package/dist/services/safe-project-reader.js.map +0 -1
  603. package/dist/services/session-index.d.ts.map +0 -1
  604. package/dist/services/session-index.js.map +0 -1
  605. package/dist/services/session-memory/index.d.ts.map +0 -1
  606. package/dist/services/session-memory/index.js.map +0 -1
  607. package/dist/services/session-memory/prompts.d.ts.map +0 -1
  608. package/dist/services/session-memory/prompts.js.map +0 -1
  609. package/dist/services/session-memory/sessionMemory.d.ts.map +0 -1
  610. package/dist/services/session-memory/sessionMemory.js.map +0 -1
  611. package/dist/services/session-storage.d.ts.map +0 -1
  612. package/dist/services/session-storage.js.map +0 -1
  613. package/dist/services/settings-coordinator.d.ts.map +0 -1
  614. package/dist/services/settings-coordinator.js.map +0 -1
  615. package/dist/services/settings-document-repository.d.ts.map +0 -1
  616. package/dist/services/settings-document-repository.js.map +0 -1
  617. package/dist/services/smart-routing.d.ts.map +0 -1
  618. package/dist/services/smart-routing.js.map +0 -1
  619. package/dist/services/storage-maintenance.d.ts.map +0 -1
  620. package/dist/services/storage-maintenance.js.map +0 -1
  621. package/dist/services/tool-allowlist.d.ts.map +0 -1
  622. package/dist/services/tool-allowlist.js.map +0 -1
  623. package/dist/services/usage-state.d.ts.map +0 -1
  624. package/dist/services/usage-state.js.map +0 -1
  625. package/dist/services/verification-profile.d.ts.map +0 -1
  626. package/dist/services/verification-profile.js.map +0 -1
  627. package/dist/services/web-search-adapters.d.ts.map +0 -1
  628. package/dist/services/web-search-adapters.js.map +0 -1
  629. package/dist/services/web-search-mcp.d.ts.map +0 -1
  630. package/dist/services/web-search-mcp.js.map +0 -1
  631. package/dist/services/web-search-provider.d.ts.map +0 -1
  632. package/dist/services/web-search-provider.js.map +0 -1
  633. package/dist/services/workspace-containment.d.ts.map +0 -1
  634. package/dist/services/workspace-containment.js.map +0 -1
  635. package/dist/services/workspace-diff.d.ts.map +0 -1
  636. package/dist/services/workspace-diff.js.map +0 -1
  637. package/dist/services/workspace-registry.d.ts.map +0 -1
  638. package/dist/services/workspace-registry.js.map +0 -1
  639. package/dist/services/workspace-state.d.ts.map +0 -1
  640. package/dist/services/workspace-state.js.map +0 -1
  641. package/dist/services/yaml-config.d.ts.map +0 -1
  642. package/dist/services/yaml-config.js.map +0 -1
  643. package/dist/terminal-ui/completion.d.ts.map +0 -1
  644. package/dist/terminal-ui/completion.js.map +0 -1
  645. package/dist/terminal-ui/editor.d.ts.map +0 -1
  646. package/dist/terminal-ui/editor.js.map +0 -1
  647. package/dist/terminal-ui/launch.d.ts.map +0 -1
  648. package/dist/terminal-ui/launch.js.map +0 -1
  649. package/dist/terminal-ui/output-queue.d.ts.map +0 -1
  650. package/dist/terminal-ui/output-queue.js.map +0 -1
  651. package/dist/terminal-ui/raw-editor.d.ts.map +0 -1
  652. package/dist/terminal-ui/raw-editor.js.map +0 -1
  653. package/dist/tools/_validate.d.ts.map +0 -1
  654. package/dist/tools/_validate.js.map +0 -1
  655. package/dist/tools/bash_security.d.ts.map +0 -1
  656. package/dist/tools/bash_security.js.map +0 -1
  657. package/dist/tools/core/common.d.ts.map +0 -1
  658. package/dist/tools/core/common.js.map +0 -1
  659. package/dist/tools/core/edit-file.d.ts.map +0 -1
  660. package/dist/tools/core/edit-file.js.map +0 -1
  661. package/dist/tools/core/exec-command.d.ts.map +0 -1
  662. package/dist/tools/core/exec-command.js.map +0 -1
  663. package/dist/tools/core/glob.d.ts.map +0 -1
  664. package/dist/tools/core/glob.js.map +0 -1
  665. package/dist/tools/core/grep.d.ts.map +0 -1
  666. package/dist/tools/core/grep.js.map +0 -1
  667. package/dist/tools/core/index.d.ts.map +0 -1
  668. package/dist/tools/core/index.js.map +0 -1
  669. package/dist/tools/core/list-files.d.ts.map +0 -1
  670. package/dist/tools/core/list-files.js.map +0 -1
  671. package/dist/tools/core/read-file.d.ts.map +0 -1
  672. package/dist/tools/core/read-file.js.map +0 -1
  673. package/dist/tools/core/write-file.d.ts.map +0 -1
  674. package/dist/tools/core/write-file.js.map +0 -1
  675. package/dist/tools/git.d.ts.map +0 -1
  676. package/dist/tools/git.js.map +0 -1
  677. package/dist/tools/lsp.d.ts.map +0 -1
  678. package/dist/tools/lsp.js.map +0 -1
  679. package/dist/tools/sandbox.d.ts.map +0 -1
  680. package/dist/tools/sandbox.js.map +0 -1
  681. package/dist/tools/todo.d.ts.map +0 -1
  682. package/dist/tools/todo.js.map +0 -1
  683. package/dist/tools/web.d.ts.map +0 -1
  684. package/dist/tools/web.js.map +0 -1
  685. package/dist/tui-core/frame.d.ts.map +0 -1
  686. package/dist/tui-core/frame.js.map +0 -1
  687. package/dist/tui-core/input-parser.d.ts.map +0 -1
  688. package/dist/tui-core/input-parser.js.map +0 -1
  689. package/dist/tui-core/style.d.ts.map +0 -1
  690. package/dist/tui-core/style.js.map +0 -1
  691. package/dist/tui-core/terminal-writer.d.ts.map +0 -1
  692. package/dist/tui-core/terminal-writer.js.map +0 -1
  693. package/dist/tui-ui/chrome-view-model.d.ts.map +0 -1
  694. package/dist/tui-ui/chrome-view-model.js.map +0 -1
  695. package/dist/tui-ui/inline-surface.d.ts.map +0 -1
  696. package/dist/tui-ui/inline-surface.js.map +0 -1
  697. package/dist/tui-ui/input-ownership.d.ts.map +0 -1
  698. package/dist/tui-ui/input-ownership.js.map +0 -1
  699. package/dist/tui-ui/launch.d.ts.map +0 -1
  700. package/dist/tui-ui/launch.js.map +0 -1
  701. package/dist/tui-ui/layout.d.ts.map +0 -1
  702. package/dist/tui-ui/layout.js.map +0 -1
  703. package/dist/tui-ui/pickers.d.ts.map +0 -1
  704. package/dist/tui-ui/pickers.js.map +0 -1
  705. package/dist/tui-ui/pixel-mascot.d.ts.map +0 -1
  706. package/dist/tui-ui/pixel-mascot.js.map +0 -1
  707. package/dist/tui-ui/render-scheduler.d.ts.map +0 -1
  708. package/dist/tui-ui/render-scheduler.js.map +0 -1
  709. package/dist/tui-ui/runner.d.ts.map +0 -1
  710. package/dist/tui-ui/runner.js.map +0 -1
  711. package/dist/tui-ui/state.d.ts.map +0 -1
  712. package/dist/tui-ui/state.js.map +0 -1
  713. package/dist/tui-ui/terminal-image.d.ts.map +0 -1
  714. package/dist/tui-ui/terminal-image.js.map +0 -1
  715. package/dist/tui-ui/theme-profile.d.ts.map +0 -1
  716. package/dist/tui-ui/theme-profile.js.map +0 -1
  717. package/dist/tui-ui/theme.d.ts.map +0 -1
  718. package/dist/tui-ui/theme.js.map +0 -1
  719. package/dist/tui-ui/transcript-cache.d.ts.map +0 -1
  720. package/dist/tui-ui/transcript-cache.js.map +0 -1
  721. package/dist/tui-ui/transcript-inspector-layout.d.ts.map +0 -1
  722. package/dist/tui-ui/transcript-inspector-layout.js.map +0 -1
  723. package/dist/tui-ui/transcript-inspector-surface.d.ts.map +0 -1
  724. package/dist/tui-ui/transcript-inspector-surface.js.map +0 -1
  725. package/dist/tui-ui/transcript-inspector.d.ts.map +0 -1
  726. package/dist/tui-ui/transcript-inspector.js.map +0 -1
  727. package/dist/tui-ui/transcript-layout.d.ts.map +0 -1
  728. package/dist/tui-ui/transcript-layout.js.map +0 -1
  729. package/dist/ui/box.d.ts.map +0 -1
  730. package/dist/ui/box.js.map +0 -1
  731. package/dist/ui/command-panel.d.ts.map +0 -1
  732. package/dist/ui/command-panel.js.map +0 -1
  733. package/dist/ui/file-completion.d.ts.map +0 -1
  734. package/dist/ui/file-completion.js.map +0 -1
  735. package/dist/ui/markdown.d.ts.map +0 -1
  736. package/dist/ui/markdown.js.map +0 -1
  737. package/dist/ui/multiline-input.d.ts.map +0 -1
  738. package/dist/ui/multiline-input.js.map +0 -1
  739. package/dist/ui/progress.d.ts.map +0 -1
  740. package/dist/ui/progress.js.map +0 -1
  741. package/dist/ui/shared/command-palette.d.ts.map +0 -1
  742. package/dist/ui/shared/command-palette.js.map +0 -1
  743. package/dist/ui/shared/command-suggestions.d.ts.map +0 -1
  744. package/dist/ui/shared/command-suggestions.js.map +0 -1
  745. package/dist/ui/shared/input-frame.d.ts.map +0 -1
  746. package/dist/ui/shared/input-frame.js.map +0 -1
  747. package/dist/ui/shared/text.d.ts.map +0 -1
  748. package/dist/ui/shared/text.js.map +0 -1
  749. package/dist/ui/shared/types.d.ts.map +0 -1
  750. package/dist/ui/shared/types.js.map +0 -1
  751. package/dist/ui/status-bar.d.ts.map +0 -1
  752. package/dist/ui/status-bar.js.map +0 -1
  753. package/dist/ui/stream-markdown.d.ts.map +0 -1
  754. package/dist/ui/stream-markdown.js.map +0 -1
  755. package/dist/ui/suggestions.d.ts.map +0 -1
  756. package/dist/ui/suggestions.js.map +0 -1
  757. package/dist/ui/tool-preview.d.ts.map +0 -1
  758. package/dist/ui/tool-preview.js.map +0 -1
  759. package/dist/ui/user-input.d.ts.map +0 -1
  760. package/dist/ui/user-input.js.map +0 -1
  761. package/dist/utils/debug-log.d.ts.map +0 -1
  762. package/dist/utils/debug-log.js.map +0 -1
  763. package/dist/utils/errors.d.ts.map +0 -1
  764. package/dist/utils/errors.js.map +0 -1
  765. package/dist/utils/json.d.ts.map +0 -1
  766. package/dist/utils/json.js.map +0 -1
  767. package/dist/utils/mask.d.ts.map +0 -1
  768. package/dist/utils/mask.js.map +0 -1
  769. package/dist/utils/observability.d.ts.map +0 -1
  770. package/dist/utils/observability.js.map +0 -1
  771. package/dist/utils/token-estimate.d.ts.map +0 -1
  772. package/dist/utils/token-estimate.js.map +0 -1
  773. package/dist/web/errors.d.ts.map +0 -1
  774. package/dist/web/errors.js.map +0 -1
  775. package/dist/web/event-hub.d.ts.map +0 -1
  776. package/dist/web/event-hub.js.map +0 -1
  777. package/dist/web/file-read-service.d.ts.map +0 -1
  778. package/dist/web/file-read-service.js.map +0 -1
  779. package/dist/web/git-read-model-service.d.ts.map +0 -1
  780. package/dist/web/git-read-model-service.js.map +0 -1
  781. package/dist/web/index.d.ts.map +0 -1
  782. package/dist/web/index.js.map +0 -1
  783. package/dist/web/launch.d.ts.map +0 -1
  784. package/dist/web/launch.js.map +0 -1
  785. package/dist/web/protocol.d.ts.map +0 -1
  786. package/dist/web/protocol.js.map +0 -1
  787. package/dist/web/review-service.d.ts.map +0 -1
  788. package/dist/web/review-service.js.map +0 -1
  789. package/dist/web/server.d.ts.map +0 -1
  790. package/dist/web/server.js.map +0 -1
  791. package/dist/web/terminal-manager.d.ts.map +0 -1
  792. package/dist/web/terminal-manager.js.map +0 -1
  793. package/dist/web/terminal-server.d.ts.map +0 -1
  794. package/dist/web/terminal-server.js.map +0 -1
  795. package/dist/web/workbench-controller.d.ts.map +0 -1
  796. package/dist/web/workbench-controller.js.map +0 -1
  797. package/dist/web-client/assets/FilesPanel-BkoLmgjR.js +0 -2
  798. package/dist/web-client/assets/ReviewPanel-3MVWbMQV.js +0 -1
  799. package/dist/web-client/assets/index-BkIDl_xk.js +0 -16
  800. package/dist/web-client/assets/index-DXMpnWE8.css +0 -1
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThreadEventStore = exports.ThreadEventStoreError = void 0;
4
+ exports.threadEventStorePerformanceCountersV1 = threadEventStorePerformanceCountersV1;
4
5
  const fs_1 = require("fs");
5
6
  const path_1 = require("path");
6
7
  const atomic_write_1 = require("../services/atomic-write");
@@ -21,6 +22,19 @@ exports.ThreadEventStoreError = ThreadEventStoreError;
21
22
  const DEFAULT_MAX_LOG_BYTES = 128 * 1024 * 1024;
22
23
  const DEFAULT_MAX_REPLAY_EVENTS = 10000;
23
24
  const DEFAULT_LOCK_WAIT_MS = 10000;
25
+ const threadEventStorePerformance = {
26
+ logScans: 0,
27
+ bytesScanned: 0,
28
+ eventsScanned: 0,
29
+ scanReasons: {},
30
+ };
31
+ /** Process-local monotonic read counters for diagnostics and switch budgets. */
32
+ function threadEventStorePerformanceCountersV1() {
33
+ return Object.freeze({
34
+ ...threadEventStorePerformance,
35
+ scanReasons: Object.freeze({ ...threadEventStorePerformance.scanReasons }),
36
+ });
37
+ }
24
38
  /**
25
39
  * Append-only durable fact store for a single Thread.
26
40
  *
@@ -172,7 +186,7 @@ class ThreadEventStore {
172
186
  (0, runtime_protocol_v1_1.assertRuntimeEventEnvelopeV1)(event);
173
187
  return deepFreeze(event);
174
188
  }
175
- replay(cursor = 0, limit = this.maxReplayEvents) {
189
+ replay(cursor = 0, limit = this.maxReplayEvents, reason = 'direct') {
176
190
  if (!Number.isSafeInteger(cursor) || cursor < 0) {
177
191
  throw new ThreadEventStoreError('ORION_THREAD_EVENT_CURSOR', 'Replay cursor must be a non-negative safe integer');
178
192
  }
@@ -181,7 +195,7 @@ class ThreadEventStore {
181
195
  throw new ThreadEventStoreError('ORION_THREAD_EVENT_LIMIT', `Replay limit ${safeLimit} exceeds ${this.maxReplayEvents}`);
182
196
  }
183
197
  return this.withLogLock(() => {
184
- const scan = requireVerifiedScan(this.loadVerifiedHead(true));
198
+ const scan = requireVerifiedScan(this.loadVerifiedHead(true, `replay:${reason}`));
185
199
  const lastSeq = scan.events.length;
186
200
  if (cursor > lastSeq) {
187
201
  throw new ThreadEventStoreError('ORION_THREAD_EVENT_CURSOR', `Replay cursor ${cursor} is ahead of durable cursor ${lastSeq}`);
@@ -216,7 +230,7 @@ class ThreadEventStore {
216
230
  const expected = { cursor, eventDigest, projectionDigest };
217
231
  if (head.verifiedPrefixes.some(prefix => sameVerifiedPrefix(prefix, expected)))
218
232
  return true;
219
- head = this.loadVerifiedHead(true);
233
+ head = this.loadVerifiedHead(true, 'verify_durable_prefix');
220
234
  const scan = requireVerifiedScan(head);
221
235
  const events = scan.events.slice(0, cursor);
222
236
  if (events.length !== cursor ||
@@ -333,14 +347,14 @@ class ThreadEventStore {
333
347
  */
334
348
  loadAuthoritativeModelHistory() {
335
349
  return this.withLogLock(() => {
336
- const scan = requireVerifiedScan(this.loadVerifiedHead(true));
350
+ const head = this.loadVerifiedHead();
337
351
  const state = readCompactState(this.compactStatePath, this.threadId);
338
352
  if (state)
339
353
  this.assertCompactCheckpoint(state);
340
- const turnState = readLatestDurableTurnState(scan.events, this.threadId);
354
+ const turnState = readLatestDurableTurnStateFromProjection(head.projection);
341
355
  if (!state && !turnState)
342
356
  return undefined;
343
- return resolveCompactAuthority(scan.events, state, this.threadId).history;
357
+ return resolveCompactAuthorityState(turnState, state).history;
344
358
  });
345
359
  }
346
360
  /**
@@ -350,7 +364,7 @@ class ThreadEventStore {
350
364
  captureCompactSource(turnId) {
351
365
  return this.withLogLock(() => {
352
366
  ensurePrivateDirectory(this.rootDir);
353
- const head = this.loadVerifiedHead(true);
367
+ const head = this.loadVerifiedHead(true, 'capture_compact_source');
354
368
  const scan = requireVerifiedScan(head);
355
369
  const { projection } = head;
356
370
  assertActiveMaintenanceTurn(projection, turnId);
@@ -387,7 +401,7 @@ class ThreadEventStore {
387
401
  ensurePrivateDirectory(this.compactCheckpointsDir);
388
402
  validateCompactCommitInput(input, this.threadId);
389
403
  input.onBoundary('before_cas_recheck');
390
- const head = this.loadVerifiedHead(true);
404
+ const head = this.loadVerifiedHead(true, 'compact_cas');
391
405
  const scan = requireVerifiedScan(head);
392
406
  const { projection } = head;
393
407
  const eventsAfterAnchor = scan.events.slice(input.expectedEventAnchor.cursor);
@@ -454,7 +468,10 @@ class ThreadEventStore {
454
468
  }
455
469
  listCompactEvents() {
456
470
  return this.withLogLock(() => {
457
- const scan = requireVerifiedScan(this.loadVerifiedHead(true));
471
+ const projection = this.loadVerifiedHead().projection;
472
+ if (projection.compactEvents)
473
+ return projection.compactEvents;
474
+ const scan = requireVerifiedScan(this.loadVerifiedHead(true, 'legacy_compact_projection'));
458
475
  return deepFreeze(scan.events.filter((event) => event.payload.type === 'compact.started' ||
459
476
  event.payload.type === 'compact.completed' ||
460
477
  event.payload.type === 'compact.failed'));
@@ -511,7 +528,7 @@ class ThreadEventStore {
511
528
  * projection still match. Callers that need historical events explicitly
512
529
  * request a scan; cursor/projection/append paths stay O(head + projection).
513
530
  */
514
- loadVerifiedHead(requireScan = false) {
531
+ loadVerifiedHead(requireScan = false, scanReason = 'unspecified') {
515
532
  ensurePrivateDirectory(this.rootDir);
516
533
  const logIdentity = readFileIdentity(this.logPath);
517
534
  if (this.cachedHead?.logFingerprint === logIdentity.fingerprint &&
@@ -528,6 +545,11 @@ class ThreadEventStore {
528
545
  }
529
546
  }
530
547
  const scan = scanThreadEventLog(this.logPath, this.threadId, this.maxLogBytes);
548
+ threadEventStorePerformance.logScans += 1;
549
+ threadEventStorePerformance.bytesScanned += scan.safeByteLength + scan.discardedTailBytes;
550
+ threadEventStorePerformance.eventsScanned += scan.events.length;
551
+ threadEventStorePerformance.scanReasons[scanReason] =
552
+ (threadEventStorePerformance.scanReasons[scanReason] ?? 0) + 1;
531
553
  this.onLogScan?.({
532
554
  threadId: this.threadId,
533
555
  bytes: scan.safeByteLength + scan.discardedTailBytes,
@@ -961,6 +983,9 @@ function assertActiveMaintenanceTurn(projection, turnId) {
961
983
  }
962
984
  function resolveCompactAuthority(events, compactState, threadId) {
963
985
  const turnState = readLatestDurableTurnState(events, threadId);
986
+ return resolveCompactAuthorityState(turnState, compactState);
987
+ }
988
+ function resolveCompactAuthorityState(turnState, compactState) {
964
989
  if (!turnState && !compactState) {
965
990
  throw new ThreadEventStoreError('ORION_THREAD_COMPACT_INVALID', 'Compact requires a durable TurnCommitV1 source');
966
991
  }
@@ -981,15 +1006,26 @@ function resolveCompactAuthority(events, compactState, threadId) {
981
1006
  taskContextRevision: taskContextOwner.taskContextRevision,
982
1007
  });
983
1008
  }
1009
+ function readLatestDurableTurnStateFromProjection(projection) {
1010
+ const commit = Object.values(projection.turns)
1011
+ .map(turn => turn.commit)
1012
+ .filter((value) => Boolean(value))
1013
+ .sort((left, right) => left.seq - right.seq)
1014
+ .at(-1);
1015
+ return commit ? parseDurableTurnState(commit.receipt, commit.seq, projection.threadId) : null;
1016
+ }
984
1017
  function readLatestDurableTurnState(events, threadId) {
985
1018
  const event = [...events]
986
1019
  .reverse()
987
1020
  .find(candidate => candidate.payload.type === 'turn.committed');
988
1021
  if (!event || event.payload.type !== 'turn.committed')
989
1022
  return null;
1023
+ return parseDurableTurnState(event.payload.data.receipt, event.seq, threadId);
1024
+ }
1025
+ function parseDurableTurnState(serializedReceipt, eventSeq, threadId) {
990
1026
  let receipt;
991
1027
  try {
992
- receipt = JSON.parse(event.payload.data.receipt);
1028
+ receipt = JSON.parse(serializedReceipt);
993
1029
  }
994
1030
  catch {
995
1031
  throw compactCorrupt('TurnCommitV1 receipt is not valid JSON');
@@ -1022,7 +1058,7 @@ function readLatestDurableTurnState(events, threadId) {
1022
1058
  throw compactCorrupt('TurnCommitV1 history or TaskContext digest changed');
1023
1059
  }
1024
1060
  return deepFreeze({
1025
- eventSeq: event.seq,
1061
+ eventSeq,
1026
1062
  history: structuredClone(history),
1027
1063
  historyDigest: receipt.historyDigest,
1028
1064
  taskContext: structuredClone(taskContext),
@@ -1,4 +1,5 @@
1
1
  import type { RuntimeEventEnvelopeV1, RuntimeEventTypeV1 } from './protocol/runtime-protocol-v1';
2
+ import type { CompactRuntimeEventV1 } from './compact-transaction';
2
3
  export type ThreadProjectionStatusV1 = 'new' | 'active' | 'idle';
3
4
  export type TurnProjectionStatusV1 = 'active' | 'completed' | 'failed' | 'interrupted';
4
5
  export type ItemProjectionStatusV1 = 'started' | 'completed' | 'failed' | 'interrupted' | 'indeterminate';
@@ -51,6 +52,25 @@ export interface QueuedTurnProjectionV1 {
51
52
  readonly deadline: number;
52
53
  readonly queuedSeq: number;
53
54
  }
55
+ export interface PlanReviewProjectionV1 {
56
+ readonly reviewId: string;
57
+ readonly revision: string;
58
+ readonly planDigest: string;
59
+ readonly planReceiptDigest: string;
60
+ readonly status: 'awaiting_review' | 'approved' | 'continued' | 'cancelled';
61
+ readonly createdAt: number;
62
+ readonly createdModel: string;
63
+ readonly returnMode: 'build' | 'auto';
64
+ readonly requestedSeq: number;
65
+ readonly resolvedAt?: number;
66
+ readonly resolvedSeq?: number;
67
+ readonly feedback?: string;
68
+ readonly feedbackDigest?: string;
69
+ }
70
+ export interface ThreadDiagnosticEventsV1 {
71
+ readonly latestCapability?: RuntimeEventEnvelopeV1;
72
+ readonly latestStepSnapshot?: RuntimeEventEnvelopeV1;
73
+ }
54
74
  export interface ThreadProjectionV1 {
55
75
  readonly version: 1;
56
76
  readonly threadId: string;
@@ -60,6 +80,16 @@ export interface ThreadProjectionV1 {
60
80
  readonly turns: Readonly<Record<string, TurnProjectionV1>>;
61
81
  readonly items: Readonly<Record<string, ItemProjectionV1>>;
62
82
  readonly queue: readonly QueuedTurnProjectionV1[];
83
+ readonly planReview?: PlanReviewProjectionV1;
84
+ /** Missing only on projections written before diagnostics became head-only. */
85
+ readonly diagnosticEvents?: ThreadDiagnosticEventsV1;
86
+ /**
87
+ * Compact lifecycle facts retained by new projections so fresh-process
88
+ * orphan recovery does not have to replay the full authoritative JSONL.
89
+ * Missing means a projection written by an older Orion version and forces
90
+ * the store to take the verified scan fallback.
91
+ */
92
+ readonly compactEvents?: readonly RuntimeEventEnvelopeV1<CompactRuntimeEventV1>[];
63
93
  readonly stepSnapshotDigests: readonly string[];
64
94
  readonly capabilityReceiptDigests: readonly string[];
65
95
  readonly toolInvocationIds: readonly string[];
@@ -74,6 +104,12 @@ interface MutableThreadProjectionV1 {
74
104
  turns: Record<string, TurnProjectionV1>;
75
105
  items: Record<string, ItemProjectionV1>;
76
106
  queue: QueuedTurnProjectionV1[];
107
+ planReview?: PlanReviewProjectionV1;
108
+ diagnosticEvents: {
109
+ latestCapability?: RuntimeEventEnvelopeV1;
110
+ latestStepSnapshot?: RuntimeEventEnvelopeV1;
111
+ };
112
+ compactEvents: RuntimeEventEnvelopeV1<CompactRuntimeEventV1>[];
77
113
  stepSnapshotDigests: string[];
78
114
  capabilityReceiptDigests: string[];
79
115
  toolInvocationIds: string[];
@@ -25,6 +25,8 @@ function projectThreadEvents(threadId, events) {
25
25
  turns: {},
26
26
  items: {},
27
27
  queue: [],
28
+ diagnosticEvents: {},
29
+ compactEvents: [],
28
30
  stepSnapshotDigests: [],
29
31
  capabilityReceiptDigests: [],
30
32
  toolInvocationIds: [],
@@ -64,6 +66,11 @@ function advanceThreadProjection(projection, events) {
64
66
  ])),
65
67
  items: Object.fromEntries(Object.entries(projection.items).map(([id, item]) => [id, { ...item }])),
66
68
  queue: projection.queue.map(item => ({ ...item })),
69
+ ...(projection.planReview ? { planReview: { ...projection.planReview } } : {}),
70
+ diagnosticEvents: projection.diagnosticEvents
71
+ ? structuredClone(projection.diagnosticEvents)
72
+ : {},
73
+ compactEvents: (projection.compactEvents ?? []).map(event => structuredClone(event)),
67
74
  stepSnapshotDigests: [...projection.stepSnapshotDigests],
68
75
  capabilityReceiptDigests: [...projection.capabilityReceiptDigests],
69
76
  toolInvocationIds: [...projection.toolInvocationIds],
@@ -111,6 +118,12 @@ function applyThreadEvent(state, event) {
111
118
  case 'turn.committed':
112
119
  commitTurn(state, event);
113
120
  break;
121
+ case 'plan.review_requested':
122
+ requestPlanReview(state, event);
123
+ break;
124
+ case 'plan.review_resolved':
125
+ resolvePlanReview(state, event);
126
+ break;
114
127
  case 'turn.completed':
115
128
  finishTurn(state, event, 'completed');
116
129
  break;
@@ -141,6 +154,7 @@ function applyThreadEvent(state, event) {
141
154
  throw invariant('step snapshot already exists', event);
142
155
  }
143
156
  state.stepSnapshotDigests.push(event.payload.data.digest);
157
+ state.diagnosticEvents.latestStepSnapshot = structuredClone(event);
144
158
  break;
145
159
  case 'capability.receipt':
146
160
  validateCapabilityReceipt(event);
@@ -148,6 +162,7 @@ function applyThreadEvent(state, event) {
148
162
  throw invariant('capability receipt already exists', event);
149
163
  }
150
164
  state.capabilityReceiptDigests.push(event.payload.data.digest);
165
+ state.diagnosticEvents.latestCapability = structuredClone(event);
151
166
  break;
152
167
  case 'tool.receipt':
153
168
  if (state.toolInvocationIds.includes(event.payload.data.invocationId)) {
@@ -158,6 +173,8 @@ function applyThreadEvent(state, event) {
158
173
  case 'compact.started':
159
174
  case 'compact.completed':
160
175
  case 'compact.failed':
176
+ state.compactEvents.push(structuredClone(event));
177
+ break;
161
178
  case 'approval.requested':
162
179
  break;
163
180
  case 'item.delta':
@@ -319,6 +336,86 @@ function commitTurn(state, event) {
319
336
  },
320
337
  };
321
338
  }
339
+ function requestPlanReview(state, event) {
340
+ if (event.payload.type !== 'plan.review_requested') {
341
+ throw invariant('invalid plan review request payload', event);
342
+ }
343
+ const turnId = requiredIdentity(event.turnId, 'turnId', event);
344
+ const turn = state.turns[turnId];
345
+ if (!turn?.commit)
346
+ throw invariant('plan review requires a committed planning turn', event);
347
+ if (state.planReview?.status === 'awaiting_review') {
348
+ throw invariant('another plan is already awaiting review', event);
349
+ }
350
+ let commit;
351
+ let receipt;
352
+ try {
353
+ commit = JSON.parse(turn.commit.receipt);
354
+ receipt = JSON.parse(String(commit.planReceipt ?? ''));
355
+ }
356
+ catch {
357
+ throw invariant('plan review is not bound to a valid PlanReceipt', event);
358
+ }
359
+ const { digest, ...content } = receipt;
360
+ const data = event.payload.data;
361
+ if (commit.planReceiptDigest !== data.planReceiptDigest ||
362
+ digest !== data.planReceiptDigest ||
363
+ (0, canonical_1.digestRuntimeValue)(content) !== data.planReceiptDigest ||
364
+ receipt.planDigest !== data.planDigest ||
365
+ receipt.threadId !== state.threadId ||
366
+ receipt.turnId !== turnId) {
367
+ throw invariant('plan review failed PlanReceipt integrity validation', event);
368
+ }
369
+ state.planReview = {
370
+ reviewId: data.reviewId,
371
+ revision: data.revision,
372
+ planDigest: data.planDigest,
373
+ planReceiptDigest: data.planReceiptDigest,
374
+ status: 'awaiting_review',
375
+ createdAt: data.createdAt,
376
+ createdModel: data.createdModel,
377
+ returnMode: data.returnMode,
378
+ requestedSeq: event.seq,
379
+ };
380
+ }
381
+ function resolvePlanReview(state, event) {
382
+ if (event.payload.type !== 'plan.review_resolved') {
383
+ throw invariant('invalid plan review resolution payload', event);
384
+ }
385
+ const current = state.planReview;
386
+ const data = event.payload.data;
387
+ if (!current || current.status !== 'awaiting_review') {
388
+ throw invariant('no plan is awaiting review', event);
389
+ }
390
+ if (current.reviewId !== data.reviewId ||
391
+ current.revision !== data.previousRevision ||
392
+ current.planDigest !== data.planDigest) {
393
+ throw invariant('plan review resolution is stale', event);
394
+ }
395
+ if (data.action === 'continue' && (!data.feedback || !data.feedbackDigest)) {
396
+ throw invariant('continue plan review requires a feedback digest', event);
397
+ }
398
+ const feedback = data.feedback?.trim();
399
+ if (data.action === 'continue' && (0, canonical_1.digestRuntimeValue)(feedback) !== data.feedbackDigest) {
400
+ throw invariant('plan review feedback digest is invalid', event);
401
+ }
402
+ if (data.action !== 'continue' && (data.feedback || data.feedbackDigest)) {
403
+ throw invariant('only continue plan review may bind feedback', event);
404
+ }
405
+ state.planReview = {
406
+ ...current,
407
+ revision: data.revision,
408
+ status: data.action === 'approve'
409
+ ? 'approved'
410
+ : data.action === 'continue'
411
+ ? 'continued'
412
+ : 'cancelled',
413
+ resolvedAt: data.resolvedAt,
414
+ resolvedSeq: event.seq,
415
+ ...(feedback ? { feedback } : {}),
416
+ ...(data.feedbackDigest ? { feedbackDigest: data.feedbackDigest } : {}),
417
+ };
418
+ }
322
419
  function startItem(state, event) {
323
420
  const turnId = requiredIdentity(event.turnId, 'turnId', event);
324
421
  const stepId = requiredIdentity(event.stepId, 'stepId', event);
@@ -430,6 +527,8 @@ function freezeProjection(state) {
430
527
  ])),
431
528
  items: Object.fromEntries(Object.entries(state.items).map(([id, item]) => [id, { ...item }])),
432
529
  queue: state.queue.map(item => ({ ...item })),
530
+ diagnosticEvents: structuredClone(state.diagnosticEvents),
531
+ compactEvents: state.compactEvents.map(event => structuredClone(event)),
433
532
  stepSnapshotDigests: [...state.stepSnapshotDigests],
434
533
  capabilityReceiptDigests: [...state.capabilityReceiptDigests],
435
534
  toolInvocationIds: [...state.toolInvocationIds],
@@ -1,6 +1,6 @@
1
1
  import { RuntimeEventBufferV1, type RuntimeEventBufferOptionsV1 } from './runtime-event-buffer';
2
2
  import { type ThreadAdmissionOptionsV1, type ThreadCommandAdmissionV1, type ThreadTurnRequestV1 } from './thread-admission';
3
- import { ThreadEventStore } from './thread-event-store';
3
+ import { ThreadEventStore, type ThreadEventReplayReasonV1 } from './thread-event-store';
4
4
  import { type AgentRuntimeCommandV1, type RuntimeEventEnvelopeV1 } from './protocol/runtime-protocol-v1';
5
5
  import type { CompactPrepareSourceReceiptV1 } from './compact-transaction';
6
6
  export interface ThreadCompactCandidateDraftV1 {
@@ -143,7 +143,7 @@ export declare class ThreadRuntimeV1 {
143
143
  unsubscribe(consumerId: string): void;
144
144
  /** Observe committed durable facts without acquiring ownership of the Thread lifecycle. */
145
145
  observeCommittedEvents(listener: (events: readonly RuntimeEventEnvelopeV1[]) => void): () => void;
146
- replay(cursor?: number, limit?: number): import("./thread-event-store").ThreadEventReplayV1;
146
+ replay(cursor?: number, limit?: number, reason?: ThreadEventReplayReasonV1): import("./thread-event-store").ThreadEventReplayV1;
147
147
  getProjection(): import("./thread-projection").ThreadProjectionV1;
148
148
  getAdmissionSnapshot(): import("./thread-admission").ThreadAdmissionSnapshotV1;
149
149
  waitForIdle(): Promise<void>;
@@ -252,8 +252,8 @@ class ThreadRuntimeV1 {
252
252
  throw new Error('Closed Thread runtime cannot be observed');
253
253
  return this.store.subscribeCommitted(listener);
254
254
  }
255
- replay(cursor = 0, limit) {
256
- return this.store.replay(cursor, limit);
255
+ replay(cursor = 0, limit, reason) {
256
+ return this.store.replay(cursor, limit, reason);
257
257
  }
258
258
  getProjection() {
259
259
  return this.store.loadProjection();
@@ -1,7 +1,15 @@
1
1
  import type { Message } from '../services/llm';
2
2
  import type { RuntimeEventEnvelopeV1 } from './protocol/runtime-protocol-v1';
3
3
  import type { ThreadLogIdentityV1 } from './thread-event-store';
4
- import type { ItemProjectionV1, ThreadProjectionV1 } from './thread-projection';
4
+ import type { ItemProjectionV1, PlanReviewProjectionV1, ThreadProjectionV1, TurnProjectionStatusV1 } from './thread-projection';
5
+ export interface ThreadSessionIndexPerformanceCountersV1 {
6
+ readonly indexBuilds: number;
7
+ readonly manifestReads: number;
8
+ readonly pageReads: number;
9
+ readonly bytesRead: number;
10
+ }
11
+ /** Process-local monotonic derived-index counters for Web performance evidence. */
12
+ export declare function threadSessionIndexPerformanceCountersV1(): ThreadSessionIndexPerformanceCountersV1;
5
13
  export interface ThreadSessionTranscriptMessageV1 {
6
14
  readonly role: Message['role'];
7
15
  readonly content: string;
@@ -15,6 +23,12 @@ export interface ThreadSessionTurnCommitV1 {
15
23
  readonly seq: number;
16
24
  readonly receipt: string;
17
25
  }
26
+ export interface ThreadSessionLatestTurnV1 {
27
+ readonly turnId: string;
28
+ readonly status: TurnProjectionStatusV1;
29
+ readonly startedSeq: number;
30
+ readonly terminalSeq?: number;
31
+ }
18
32
  export interface ThreadSessionIndexHeadV1 {
19
33
  readonly cursor: number;
20
34
  readonly projectionDigest: string;
@@ -41,8 +55,10 @@ export interface ThreadSessionIndexManifestV1 {
41
55
  readonly updatedAt: number;
42
56
  readonly messageCount: number;
43
57
  readonly pages: readonly StoredTranscriptPagePointerV1[];
58
+ readonly latestTurn?: ThreadSessionLatestTurnV1;
44
59
  readonly latestTurnCommit?: ThreadSessionTurnCommitV1;
45
60
  readonly latestPlanTurnCommit?: ThreadSessionTurnCommitV1;
61
+ readonly planReview?: PlanReviewProjectionV1;
46
62
  readonly digest: string;
47
63
  }
48
64
  export interface ThreadSessionIndexedPageV1 {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ThreadSessionIndexError = void 0;
4
+ exports.threadSessionIndexPerformanceCountersV1 = threadSessionIndexPerformanceCountersV1;
4
5
  exports.buildThreadSessionIndexV1 = buildThreadSessionIndexV1;
5
6
  exports.advanceThreadSessionIndexV1 = advanceThreadSessionIndexV1;
6
7
  exports.loadThreadSessionIndexManifestV1 = loadThreadSessionIndexManifestV1;
@@ -12,6 +13,16 @@ const atomic_write_1 = require("../services/atomic-write");
12
13
  const canonical_1 = require("./protocol/canonical");
13
14
  const TRANSCRIPT_PAGE_ITEMS = 100;
14
15
  const MAX_MANIFEST_PAGES = 100000;
16
+ const threadSessionIndexPerformance = {
17
+ indexBuilds: 0,
18
+ manifestReads: 0,
19
+ pageReads: 0,
20
+ bytesRead: 0,
21
+ };
22
+ /** Process-local monotonic derived-index counters for Web performance evidence. */
23
+ function threadSessionIndexPerformanceCountersV1() {
24
+ return Object.freeze({ ...threadSessionIndexPerformance });
25
+ }
15
26
  class ThreadSessionIndexError extends Error {
16
27
  constructor(code, message) {
17
28
  super(message);
@@ -21,6 +32,7 @@ class ThreadSessionIndexError extends Error {
21
32
  }
22
33
  exports.ThreadSessionIndexError = ThreadSessionIndexError;
23
34
  function buildThreadSessionIndexV1(input) {
35
+ threadSessionIndexPerformance.indexBuilds += 1;
24
36
  const previous = readManifest(manifestPath(input.rootDir, input.threadId), input.threadId);
25
37
  const messages = projectTranscriptMessages(input.projection.items, input.events);
26
38
  const pages = [];
@@ -36,6 +48,7 @@ function buildThreadSessionIndexV1(input) {
36
48
  updatedAt: input.events.at(-1)?.timestamp ?? 0,
37
49
  messageCount: messages.length,
38
50
  pages,
51
+ ...(input.projection.planReview ? { planReview: input.projection.planReview } : {}),
39
52
  ...commits,
40
53
  });
41
54
  writeManifest(input.rootDir, manifest);
@@ -63,7 +76,22 @@ function advanceThreadSessionIndexV1(input) {
63
76
  }
64
77
  const pages = [...current.pages];
65
78
  let messageCount = current.messageCount;
66
- for (let start = 0; start < messages.length; start += TRANSCRIPT_PAGE_ITEMS) {
79
+ let messageOffset = 0;
80
+ const partialTail = pages.at(-1);
81
+ if (partialTail &&
82
+ partialTail.end === messageCount &&
83
+ partialTail.end - partialTail.start < TRANSCRIPT_PAGE_ITEMS &&
84
+ messages.length > 0) {
85
+ const existing = readPage(input.rootDir, input.threadId, partialTail);
86
+ const appended = messages.slice(0, Math.min(messages.length, TRANSCRIPT_PAGE_ITEMS - existing.items.length));
87
+ pages[pages.length - 1] = writeImmutablePage(input.rootDir, input.threadId, partialTail.start, [
88
+ ...existing.items,
89
+ ...appended,
90
+ ]);
91
+ messageOffset = appended.length;
92
+ messageCount += appended.length;
93
+ }
94
+ for (let start = messageOffset; start < messages.length; start += TRANSCRIPT_PAGE_ITEMS) {
67
95
  const chunk = messages.slice(start, start + TRANSCRIPT_PAGE_ITEMS);
68
96
  pages.push(writeImmutablePage(input.rootDir, input.threadId, messageCount, chunk));
69
97
  messageCount += chunk.length;
@@ -77,8 +105,10 @@ function advanceThreadSessionIndexV1(input) {
77
105
  updatedAt: input.nextHead.lastEventTimestamp,
78
106
  messageCount,
79
107
  pages,
108
+ ...(nextCommits.latestTurn ? { latestTurn: nextCommits.latestTurn } : {}),
80
109
  latestTurnCommit: nextCommits.latestTurnCommit ?? current.latestTurnCommit,
81
110
  latestPlanTurnCommit: nextCommits.latestPlanTurnCommit ?? current.latestPlanTurnCommit,
111
+ ...(input.projection.planReview ? { planReview: input.projection.planReview } : {}),
82
112
  });
83
113
  writeManifest(input.rootDir, manifest);
84
114
  return true;
@@ -155,10 +185,12 @@ function createManifest(input) {
155
185
  updatedAt: input.updatedAt,
156
186
  messageCount: input.messageCount,
157
187
  pages: input.pages.map(page => ({ ...page })),
188
+ ...(input.latestTurn ? { latestTurn: { ...input.latestTurn } } : {}),
158
189
  ...(input.latestTurnCommit ? { latestTurnCommit: { ...input.latestTurnCommit } } : {}),
159
190
  ...(input.latestPlanTurnCommit
160
191
  ? { latestPlanTurnCommit: { ...input.latestPlanTurnCommit } }
161
192
  : {}),
193
+ ...(input.planReview ? { planReview: { ...input.planReview } } : {}),
162
194
  };
163
195
  return deepFreeze({ ...content, digest: (0, canonical_1.digestRuntimeValue)(content) });
164
196
  }
@@ -168,7 +200,9 @@ function latestAuthorityCommits(projection, events) {
168
200
  .filter(event => event.payload.type === 'turn.committed' && event.turnId)
169
201
  .map(event => event.turnId))
170
202
  : undefined;
171
- const commits = Object.values(projection.turns)
203
+ const orderedTurns = Object.values(projection.turns).sort((left, right) => left.startedSeq - right.startedSeq);
204
+ const latestTurnProjection = orderedTurns.at(-1);
205
+ const commits = orderedTurns
172
206
  .filter(turn => !committedTurns || committedTurns.has(turn.turnId))
173
207
  .flatMap(turn => (turn.commit ? [{ seq: turn.commit.seq, receipt: turn.commit.receipt }] : []))
174
208
  .sort((left, right) => left.seq - right.seq);
@@ -177,6 +211,18 @@ function latestAuthorityCommits(projection, events) {
177
211
  .reverse()
178
212
  .find(commit => turnCommitContainsPlan(commit.receipt));
179
213
  return {
214
+ ...(latestTurnProjection
215
+ ? {
216
+ latestTurn: {
217
+ turnId: latestTurnProjection.turnId,
218
+ status: latestTurnProjection.status,
219
+ startedSeq: latestTurnProjection.startedSeq,
220
+ ...(latestTurnProjection.terminalSeq !== undefined
221
+ ? { terminalSeq: latestTurnProjection.terminalSeq }
222
+ : {}),
223
+ },
224
+ }
225
+ : {}),
180
226
  ...(latestTurnCommit ? { latestTurnCommit } : {}),
181
227
  ...(latestPlanTurnCommit ? { latestPlanTurnCommit } : {}),
182
228
  };
@@ -208,7 +254,7 @@ function writeManifest(rootDir, manifest) {
208
254
  fsyncDirectory(rootDir);
209
255
  }
210
256
  function readManifest(path, threadId) {
211
- const value = readRegularJson(path);
257
+ const value = readRegularJson(path, 'manifest');
212
258
  if (!isRecord(value))
213
259
  return null;
214
260
  const { digest: _digest, ...content } = value;
@@ -238,13 +284,44 @@ function readManifest(path, threadId) {
238
284
  }
239
285
  if (nextStart !== value.messageCount)
240
286
  return null;
287
+ if (value.latestTurn !== undefined && !isLatestTurn(value.latestTurn))
288
+ return null;
241
289
  if (value.latestTurnCommit !== undefined && !isTurnCommit(value.latestTurnCommit))
242
290
  return null;
243
291
  if (value.latestPlanTurnCommit !== undefined && !isTurnCommit(value.latestPlanTurnCommit)) {
244
292
  return null;
245
293
  }
294
+ if (value.planReview !== undefined && !isPlanReview(value.planReview))
295
+ return null;
246
296
  return deepFreeze(value);
247
297
  }
298
+ function isPlanReview(value) {
299
+ if (!isRecord(value))
300
+ return false;
301
+ return (typeof value.reviewId === 'string' &&
302
+ value.reviewId.length > 0 &&
303
+ typeof value.revision === 'string' &&
304
+ value.revision.length > 0 &&
305
+ isSha256(value.planDigest) &&
306
+ isSha256(value.planReceiptDigest) &&
307
+ ['awaiting_review', 'approved', 'continued', 'cancelled'].includes(String(value.status)) &&
308
+ nonNegativeSafeInteger(value.createdAt) &&
309
+ typeof value.createdModel === 'string' &&
310
+ value.createdModel.length > 0 &&
311
+ ['build', 'auto'].includes(String(value.returnMode)) &&
312
+ positiveSafeInteger(value.requestedSeq) &&
313
+ (value.resolvedAt === undefined || nonNegativeSafeInteger(value.resolvedAt)) &&
314
+ (value.resolvedSeq === undefined || positiveSafeInteger(value.resolvedSeq)) &&
315
+ (value.feedback === undefined || typeof value.feedback === 'string') &&
316
+ (value.feedbackDigest === undefined || isSha256(value.feedbackDigest)));
317
+ }
318
+ function isLatestTurn(value) {
319
+ return (isRecord(value) &&
320
+ typeof value.turnId === 'string' &&
321
+ ['active', 'completed', 'failed', 'interrupted'].includes(String(value.status)) &&
322
+ positiveSafeInteger(value.startedSeq) &&
323
+ (value.terminalSeq === undefined || positiveSafeInteger(value.terminalSeq)));
324
+ }
248
325
  function readPage(rootDir, threadId, pointer) {
249
326
  if ((0, path_1.basename)(pointer.file) !== pointer.file)
250
327
  throw indexCorrupt('Transcript page path escaped.');
@@ -258,7 +335,7 @@ function readPage(rootDir, threadId, pointer) {
258
335
  return page;
259
336
  }
260
337
  function readStoredPage(path, threadId) {
261
- const value = readRegularJson(path);
338
+ const value = readRegularJson(path, 'page');
262
339
  if (!isRecord(value))
263
340
  return null;
264
341
  const { digest: _digest, ...content } = value;
@@ -435,13 +512,19 @@ function isItemTerminalEvent(event) {
435
512
  function isMessageRole(value) {
436
513
  return value === 'system' || value === 'user' || value === 'assistant' || value === 'tool';
437
514
  }
438
- function readRegularJson(path) {
515
+ function readRegularJson(path, kind) {
439
516
  let fd;
440
517
  try {
441
518
  fd = (0, fs_1.openSync)(path, fs_1.constants.O_RDONLY | (typeof fs_1.constants.O_NOFOLLOW === 'number' ? fs_1.constants.O_NOFOLLOW : 0));
442
519
  if (!(0, fs_1.fstatSync)(fd).isFile())
443
520
  return undefined;
444
- return JSON.parse((0, fs_1.readFileSync)(fd, 'utf8'));
521
+ const bytes = (0, fs_1.readFileSync)(fd);
522
+ threadSessionIndexPerformance.bytesRead += bytes.byteLength;
523
+ if (kind === 'manifest')
524
+ threadSessionIndexPerformance.manifestReads += 1;
525
+ else
526
+ threadSessionIndexPerformance.pageReads += 1;
527
+ return JSON.parse(bytes.toString('utf8'));
445
528
  }
446
529
  catch {
447
530
  return undefined;
@@ -1,7 +1,8 @@
1
1
  import type { Message } from '../services/llm';
2
2
  import { type SessionHistoryRecoveryDiagnosticV1, type SessionHistoryResolvedSourceV1 } from './session-history-recovery';
3
3
  import { ThreadEventStore, type ThreadReadModelHeadV1 } from './thread-event-store';
4
- import { type ThreadSessionTranscriptMessageV1, type ThreadSessionTurnCommitV1 } from './thread-session-index';
4
+ import { type ThreadSessionLatestTurnV1, type ThreadSessionTranscriptMessageV1, type ThreadSessionTurnCommitV1 } from './thread-session-index';
5
+ import type { PlanReviewProjectionV1 } from './thread-projection';
5
6
  export type { ThreadSessionTranscriptMessageV1, ThreadSessionTurnCommitV1, } from './thread-session-index';
6
7
  /** Metadata/transcript projection that never needs to decode model history. */
7
8
  export interface ThreadSessionSummaryV1 {
@@ -72,8 +73,10 @@ export interface ThreadSessionSnapshotPageV1 {
72
73
  readonly lastRecordHash: string | null;
73
74
  readonly log: ThreadReadModelHeadV1['log'];
74
75
  };
76
+ readonly latestTurn?: ThreadSessionLatestTurnV1;
75
77
  readonly latestTurnCommit?: ThreadSessionTurnCommitV1;
76
78
  readonly latestPlanTurnCommit?: ThreadSessionTurnCommitV1;
79
+ readonly planReview?: PlanReviewProjectionV1;
77
80
  }
78
81
  export declare class ThreadSessionViewError extends Error {
79
82
  readonly code = "ORION_THREAD_SESSION_VIEW_INVALID";