orkeon-code 1.0.0-rc.1 → 1.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (440) hide show
  1. package/.orkeon-runtime +10 -0
  2. package/.orkeon-version +1 -1
  3. package/NOTICE.md +1 -1
  4. package/README.fr.md +16 -22
  5. package/README.md +16 -22
  6. package/config/appsettings.jev.example.json +4 -1
  7. package/config/appsettings.kev.example.json +4 -1
  8. package/config/appsettings.liquid.example.json +4 -1
  9. package/config/appsettings.ollama-whisper.example.json +1 -0
  10. package/config/appsettings.whisper.example.json +1 -0
  11. package/mcp/whisper/README.md +2 -1
  12. package/orkeon-code +206 -11
  13. package/orkeon-code.ps1 +109 -7
  14. package/package.json +2 -1
  15. package/src/commands/.orkeon/orkeon-cli.d.ts +1 -4
  16. package/src/commands/_lib/args.ts +5 -4
  17. package/src/commands/_lib/dev/dev-batches.ts +34 -36
  18. package/src/commands/_lib/dev/dev-implement.ts +11 -14
  19. package/src/commands/_lib/dev/dev-source.ts +7 -11
  20. package/src/commands/_lib/dev/dev.ts +34 -37
  21. package/src/commands/_lib/dev/markers.ts +7 -0
  22. package/src/commands/_lib/dev/messages.ts +112 -0
  23. package/src/commands/_lib/dev-step.ts +16 -13
  24. package/src/commands/_lib/dispatch.ts +62 -39
  25. package/src/commands/_lib/git/branch.ts +9 -10
  26. package/src/commands/_lib/git/commit.ts +9 -13
  27. package/src/commands/_lib/git/diff.ts +22 -12
  28. package/src/commands/_lib/git/messages.ts +54 -0
  29. package/src/commands/_lib/git/review.ts +9 -10
  30. package/src/commands/_lib/memory/memory-admit.ts +19 -21
  31. package/src/commands/_lib/memory/memory.ts +3 -2
  32. package/src/commands/_lib/memory/messages.ts +32 -0
  33. package/src/commands/_lib/messages.ts +48 -0
  34. package/src/commands/_lib/project/messages.ts +8 -0
  35. package/src/commands/_lib/session/export.ts +3 -2
  36. package/src/commands/_lib/session/messages.ts +87 -0
  37. package/src/commands/_lib/session/prompts.ts +4 -0
  38. package/src/commands/_lib/session/resume.ts +15 -24
  39. package/src/commands/_lib/session/tasks.ts +20 -23
  40. package/src/commands/_lib/settings/advisor.ts +11 -16
  41. package/src/commands/_lib/settings/agents.ts +18 -28
  42. package/src/commands/_lib/settings/choices.ts +8 -0
  43. package/src/commands/_lib/settings/config.ts +43 -43
  44. package/src/commands/_lib/settings/effort.ts +147 -0
  45. package/src/commands/_lib/settings/hooks.ts +12 -20
  46. package/src/commands/_lib/settings/messages.ts +408 -0
  47. package/src/commands/_lib/settings/mode.ts +33 -24
  48. package/src/commands/_lib/settings/model.ts +71 -36
  49. package/src/commands/_lib/settings/output-style.ts +39 -0
  50. package/src/commands/_lib/settings/permissions.ts +71 -93
  51. package/src/commands/_lib/settings/route.ts +63 -0
  52. package/src/commands/_lib/settings/skills.ts +53 -11
  53. package/src/commands/_lib/settings/theme.ts +42 -0
  54. package/src/commands/_lib/speech/messages.ts +58 -0
  55. package/src/commands/_lib/speech/prompts.ts +4 -0
  56. package/src/commands/_lib/speech/say.ts +9 -10
  57. package/src/commands/_lib/speech/transcribe.ts +14 -23
  58. package/src/commands/_lib/speech/voice.ts +14 -18
  59. package/src/commands/_lib/status/doctor.ts +47 -28
  60. package/src/commands/_lib/status/messages.ts +100 -0
  61. package/src/commands/_lib/status/meta.ts +3 -24
  62. package/src/commands/_lib/status/status.ts +10 -11
  63. package/src/commands/_lib/status/usage-tools.ts +2 -3
  64. package/src/commands/_lib/status/usage.ts +7 -18
  65. package/src/commands/_lib/view.ts +6 -1
  66. package/src/commands/dev/dev-batches.cmd.ts +4 -3
  67. package/src/commands/dev/dev-learn.cmd.ts +3 -3
  68. package/src/commands/dev/dev-plan.cmd.ts +6 -7
  69. package/src/commands/dev/dev-spec.cmd.ts +6 -7
  70. package/src/commands/git/commit.cmd.ts +3 -3
  71. package/src/commands/git/review.cmd.ts +3 -3
  72. package/src/commands/memory/memory.cmd.ts +2 -2
  73. package/src/commands/project/analyze.cmd.ts +3 -3
  74. package/src/commands/project/debug-tool-call.cmd.ts +4 -9
  75. package/src/commands/project/init-verifiers.cmd.ts +3 -3
  76. package/src/commands/project/init.cmd.ts +3 -3
  77. package/src/commands/project/verify.cmd.ts +2 -2
  78. package/src/commands/session/assistant.cmd.ts +2 -2
  79. package/src/commands/session/compact.cmd.ts +1 -1
  80. package/src/commands/session/copy.cmd.ts +8 -7
  81. package/src/commands/session/rename.cmd.ts +3 -2
  82. package/src/commands/session/rewind.cmd.ts +3 -4
  83. package/src/commands/session/summary.cmd.ts +3 -3
  84. package/src/commands/session/tasks.cmd.ts +4 -2
  85. package/src/commands/settings/config.cmd.ts +4 -2
  86. package/src/commands/settings/effort.cmd.ts +10 -31
  87. package/src/commands/settings/fast.cmd.ts +2 -1
  88. package/src/commands/settings/mode.cmd.ts +3 -3
  89. package/src/commands/settings/model.cmd.ts +3 -2
  90. package/src/commands/settings/output-style.cmd.ts +9 -38
  91. package/src/commands/settings/permissions.cmd.ts +2 -2
  92. package/src/commands/settings/proactive.cmd.ts +2 -1
  93. package/src/commands/settings/route.cmd.ts +16 -0
  94. package/src/commands/settings/skills.cmd.ts +3 -3
  95. package/src/commands/settings/theme.cmd.ts +14 -0
  96. package/src/commands/speech/say.cmd.ts +2 -2
  97. package/src/commands/speech/transcribe.cmd.ts +2 -2
  98. package/src/commands/status/release-notes.cmd.ts +1 -1
  99. package/src/crews/.orkeon/orkeon.d.ts +538 -93
  100. package/src/crews/_probe-shared-memory/domain/messages.ts +54 -0
  101. package/src/crews/_probe-shared-memory/domain/probe-verdict.ts +17 -12
  102. package/src/crews/_probe-shared-memory/domain/prompts.ts +5 -0
  103. package/src/crews/_probe-shared-memory/probe.ork.ts +5 -3
  104. package/src/crews/advisor/application/messages.ts +4 -0
  105. package/src/crews/advisor/application/prompts.ts +4 -0
  106. package/src/crews/advisor/application/run-advisor.ts +2 -1
  107. package/src/crews/advisor/crew.ork.ts +5 -4
  108. package/src/crews/advisor/domain/advice.ts +7 -23
  109. package/src/crews/advisor/domain/messages.ts +8 -0
  110. package/src/crews/advisor/domain/prompts.ts +26 -0
  111. package/src/crews/agent-run/application/messages.ts +18 -0
  112. package/src/crews/agent-run/application/run-agent-run.ts +5 -4
  113. package/src/crews/agent-run/crew.ork.ts +3 -3
  114. package/src/crews/analyze/application/messages.ts +27 -0
  115. package/src/crews/analyze/application/prompts.ts +4 -0
  116. package/src/crews/analyze/application/run-analyze.ts +16 -14
  117. package/src/crews/analyze/crew.ork.ts +5 -4
  118. package/src/crews/analyze/domain/harvest.ts +33 -65
  119. package/src/crews/analyze/domain/prompts.ts +86 -0
  120. package/src/crews/code-review/application/lens-material.ts +24 -0
  121. package/src/crews/code-review/application/messages.ts +17 -0
  122. package/src/crews/code-review/application/prompts.ts +10 -17
  123. package/src/crews/code-review/application/review.ts +4 -1
  124. package/src/crews/code-review/application/run-code-review.ts +13 -15
  125. package/src/crews/code-review/crew.ork.ts +5 -4
  126. package/src/crews/code-review/domain/lenses.ts +6 -45
  127. package/src/crews/code-review/domain/messages.ts +25 -0
  128. package/src/crews/code-review/domain/prompts.ts +58 -0
  129. package/src/crews/code-review/domain/report.ts +5 -6
  130. package/src/crews/code-review/domain/scope.ts +6 -12
  131. package/src/crews/dev-batches/application/messages.ts +127 -0
  132. package/src/crews/dev-batches/application/plan-close.ts +12 -12
  133. package/src/crews/dev-batches/application/prompts.ts +10 -0
  134. package/src/crews/dev-batches/application/run-dev-batches.ts +57 -50
  135. package/src/crews/dev-batches/application/run-wave.ts +24 -22
  136. package/src/crews/dev-batches/application/seed-harvest.ts +8 -7
  137. package/src/crews/dev-batches/crew.ork.ts +12 -9
  138. package/src/crews/dev-batches/domain/batches-log.ts +1 -3
  139. package/src/crews/dev-batches/domain/markers.ts +5 -0
  140. package/src/crews/dev-batches/domain/messages.ts +6 -0
  141. package/src/crews/dev-batches/domain/wave-order.ts +3 -2
  142. package/src/crews/dev-change/application/change-material.ts +44 -0
  143. package/src/crews/dev-change/application/evidence.ts +25 -22
  144. package/src/crews/dev-change/application/messages.ts +81 -0
  145. package/src/crews/dev-change/application/{change-prompt.ts → prompts.ts} +40 -43
  146. package/src/crews/dev-change/application/run-dev-change.ts +43 -34
  147. package/src/crews/dev-change/crew.ork.ts +11 -9
  148. package/src/crews/dev-change/domain/change-answer.ts +24 -20
  149. package/src/crews/dev-change/domain/change-render.ts +13 -15
  150. package/src/crews/dev-change/domain/markers.ts +28 -0
  151. package/src/crews/dev-change/domain/messages.ts +16 -0
  152. package/src/crews/dev-implement/application/close.ts +21 -18
  153. package/src/crews/dev-implement/application/locate-sheet.ts +7 -5
  154. package/src/crews/dev-implement/application/messages.ts +161 -0
  155. package/src/crews/dev-implement/application/observe.ts +4 -2
  156. package/src/crews/dev-implement/application/prompts.ts +9 -0
  157. package/src/crews/dev-implement/application/report-writes.ts +14 -9
  158. package/src/crews/dev-implement/application/run-dev-implement.ts +84 -73
  159. package/src/crews/dev-implement/application/suite-job.ts +15 -11
  160. package/src/crews/dev-implement/crew.ork.ts +2 -1
  161. package/src/crews/dev-implement/domain/contracts.ts +59 -60
  162. package/src/crews/dev-implement/domain/correction.ts +16 -15
  163. package/src/crews/dev-implement/domain/cycles.ts +2 -1
  164. package/src/crews/dev-implement/domain/markers.ts +23 -0
  165. package/src/crews/dev-implement/domain/messages.ts +58 -0
  166. package/src/crews/dev-implement/domain/prompts.ts +93 -0
  167. package/src/crews/dev-implement/domain/roles.ts +3 -7
  168. package/src/crews/dev-implement/domain/sheet-edits.ts +6 -5
  169. package/src/crews/dev-implement/domain/sheet-ticks.ts +5 -4
  170. package/src/crews/dev-implement/domain/step-checks.ts +17 -16
  171. package/src/crews/dev-implement/domain/step-section.ts +6 -4
  172. package/src/crews/dev-learn/application/learn-prompt-fit.ts +63 -0
  173. package/src/crews/dev-learn/application/messages.ts +51 -0
  174. package/src/crews/dev-learn/application/{learn-prompt.ts → prompts.ts} +24 -65
  175. package/src/crews/dev-learn/application/run-dev-learn.ts +37 -32
  176. package/src/crews/dev-learn/crew.ork.ts +4 -3
  177. package/src/crews/dev-learn/domain/learn-answer.ts +25 -27
  178. package/src/crews/dev-learn/domain/messages.ts +65 -0
  179. package/src/crews/dev-learn/domain/owner-lines.ts +12 -9
  180. package/src/crews/dev-learn/domain/proposals-render.ts +8 -9
  181. package/src/crews/dev-plan/application/anchor-paths.ts +57 -20
  182. package/src/crews/dev-plan/application/inventory.ts +17 -13
  183. package/src/crews/dev-plan/application/messages.ts +88 -0
  184. package/src/crews/dev-plan/application/plan-prompt-fit.ts +44 -0
  185. package/src/crews/dev-plan/application/{plan-prompt.ts → prompts.ts} +37 -55
  186. package/src/crews/dev-plan/application/run-dev-plan.ts +103 -75
  187. package/src/crews/dev-plan/crew.ork.ts +11 -8
  188. package/src/crews/dev-plan/domain/inventory-model.ts +3 -3
  189. package/src/crews/dev-plan/domain/markers.ts +18 -0
  190. package/src/crews/dev-plan/domain/messages.ts +118 -0
  191. package/src/crews/dev-plan/domain/plan-answer.ts +118 -103
  192. package/src/crews/dev-plan/domain/plan-render.ts +30 -31
  193. package/src/crews/dev-plan/domain/prompts.ts +44 -0
  194. package/src/crews/dev-spec/application/messages.ts +30 -0
  195. package/src/crews/dev-spec/application/{spec-prompt.ts → prompts.ts} +42 -47
  196. package/src/crews/dev-spec/application/run-dev-spec.ts +67 -36
  197. package/src/crews/dev-spec/application/spec-material.ts +42 -0
  198. package/src/crews/dev-spec/crew.ork.ts +11 -9
  199. package/src/crews/dev-spec/domain/markers.ts +30 -0
  200. package/src/crews/dev-spec/domain/messages.ts +39 -0
  201. package/src/crews/dev-spec/domain/spec-answer.ts +46 -47
  202. package/src/crews/dev-spec/domain/spec-render.ts +18 -18
  203. package/src/crews/dev-verify/application/audit-brief.ts +187 -0
  204. package/src/crews/dev-verify/application/audit.ts +38 -30
  205. package/src/crews/dev-verify/application/capture.ts +34 -26
  206. package/src/crews/dev-verify/application/messages.ts +119 -0
  207. package/src/crews/dev-verify/application/prompts.ts +209 -0
  208. package/src/crews/dev-verify/application/run-dev-verify.ts +60 -46
  209. package/src/crews/dev-verify/application/run-gate.ts +11 -9
  210. package/src/crews/dev-verify/crew.ork.ts +6 -6
  211. package/src/crews/dev-verify/domain/audit-answer.ts +16 -12
  212. package/src/crews/dev-verify/domain/capture-sections.ts +5 -4
  213. package/src/crews/dev-verify/domain/commands.ts +3 -3
  214. package/src/crews/dev-verify/domain/gate.ts +21 -16
  215. package/src/crews/dev-verify/domain/markers.ts +16 -0
  216. package/src/crews/dev-verify/domain/mechanical-table.ts +37 -44
  217. package/src/crews/dev-verify/domain/messages.ts +92 -0
  218. package/src/crews/dev-verify/domain/verdict.ts +4 -4
  219. package/src/crews/git-commit/application/draft.ts +16 -37
  220. package/src/crews/git-commit/application/messages.ts +15 -0
  221. package/src/crews/git-commit/application/prompts.ts +47 -0
  222. package/src/crews/git-commit/application/run-git-commit.ts +13 -12
  223. package/src/crews/git-commit/crew.ork.ts +5 -4
  224. package/src/crews/git-commit/domain/commit.ts +15 -35
  225. package/src/crews/git-commit/domain/markers.ts +4 -0
  226. package/src/crews/git-commit/domain/messages.ts +48 -0
  227. package/src/crews/init-verifiers/application/authoring.ts +2 -1
  228. package/src/crews/init-verifiers/application/messages.ts +13 -0
  229. package/src/crews/init-verifiers/application/prompts.ts +5 -1
  230. package/src/crews/init-verifiers/application/run-init-verifiers.ts +3 -2
  231. package/src/crews/init-verifiers/crew.ork.ts +5 -4
  232. package/src/crews/main-loop/application/auto-compact.ts +2 -1
  233. package/src/crews/main-loop/application/messages.ts +81 -0
  234. package/src/crews/main-loop/application/prompts.ts +12 -0
  235. package/src/crews/main-loop/application/run-main-loop.ts +63 -30
  236. package/src/crews/main-loop/application/{turn-prompt.ts → turn-context.ts} +7 -8
  237. package/src/crews/main-loop/crew.ork.ts +12 -7
  238. package/src/crews/main-loop/domain/prompt-assembly.ts +45 -228
  239. package/src/crews/main-loop/domain/prompts.ts +336 -0
  240. package/src/crews/main-loop/domain/turn-chains.ts +10 -9
  241. package/src/crews/project-init/application/detect.ts +5 -4
  242. package/src/crews/project-init/application/messages.ts +15 -0
  243. package/src/crews/project-init/application/prompts.ts +11 -7
  244. package/src/crews/project-init/crew.ork.ts +5 -4
  245. package/src/crews/project-init/domain/existing-files.ts +6 -4
  246. package/src/crews/project-init/domain/messages.ts +13 -0
  247. package/src/crews/project-init/domain/package-map.ts +3 -3
  248. package/src/crews/project-init/domain/prompts.ts +10 -0
  249. package/src/crews/session-compact/application/prompts.ts +5 -0
  250. package/src/crews/session-compact/crew.ork.ts +5 -4
  251. package/src/crews/shared-memory-admit/application/prompts.ts +5 -0
  252. package/src/crews/shared-memory-admit/crew.ork.ts +3 -2
  253. package/src/crews/speech/application/messages.ts +3 -0
  254. package/src/crews/speech/application/prompts.ts +3 -0
  255. package/src/crews/speech/application/run-speech.ts +2 -1
  256. package/src/crews/speech/crew.ork.ts +2 -1
  257. package/src/shared/application/agents/child-agent.ts +11 -7
  258. package/src/shared/application/agents/messages.ts +35 -0
  259. package/src/shared/application/agents/route-agent.ts +115 -0
  260. package/src/shared/application/agents/run-sub-agent.ts +31 -8
  261. package/src/shared/application/compaction/compact-session.ts +19 -14
  262. package/src/shared/application/compaction/messages.ts +20 -0
  263. package/src/shared/application/compaction/prune-context.ts +94 -0
  264. package/src/shared/application/compaction/pruned-llm.ts +35 -0
  265. package/src/shared/application/dev/brief-inventory.ts +6 -4
  266. package/src/shared/application/dev/close-batch.ts +9 -7
  267. package/src/shared/application/dev/find-repo-pack.ts +4 -3
  268. package/src/shared/application/dev/learn-decision.ts +20 -18
  269. package/src/shared/application/dev/load-dev-context.ts +7 -8
  270. package/src/shared/application/dev/measure-access-cost.ts +5 -4
  271. package/src/shared/application/dev/messages.ts +132 -0
  272. package/src/shared/application/dev/phase-timer.ts +54 -0
  273. package/src/shared/application/dev/plan-source.ts +12 -8
  274. package/src/shared/application/dev/preflight.ts +8 -8
  275. package/src/shared/application/dev/prompts.ts +34 -0
  276. package/src/shared/application/dev/question-round.ts +25 -17
  277. package/src/shared/application/dev/resolve-work-folder.ts +4 -3
  278. package/src/shared/application/dev/settle-questions.ts +4 -2
  279. package/src/shared/application/dev/source-review.ts +12 -8
  280. package/src/shared/application/dev/source-step.ts +12 -10
  281. package/src/shared/application/dev/spend.ts +17 -4
  282. package/src/shared/application/dev/step-precedents.ts +2 -1
  283. package/src/shared/application/dev/tool-call-policy.ts +9 -11
  284. package/src/shared/application/dev/tool-callbacks.ts +52 -5
  285. package/src/shared/application/dev/tool-trace-recorder.ts +2 -1
  286. package/src/shared/application/dev/verdict-sources.ts +5 -3
  287. package/src/shared/application/dev/wrapped-tools.ts +4 -2
  288. package/src/shared/application/extra-tools.ts +2 -1
  289. package/src/shared/application/git/batch-worktree.ts +22 -17
  290. package/src/shared/application/git/commit-files.ts +24 -19
  291. package/src/shared/application/git/merge-batch.ts +11 -7
  292. package/src/shared/application/git/messages.ts +75 -0
  293. package/src/shared/application/git/open-pull-request.ts +4 -3
  294. package/src/shared/application/host-context.ts +59 -0
  295. package/src/shared/application/host-layout-store.ts +45 -0
  296. package/src/shared/application/llm-profile.ts +4 -3
  297. package/src/shared/application/messages.ts +14 -0
  298. package/src/shared/application/permission-rules.ts +10 -0
  299. package/src/shared/application/ports/decision.ts +14 -0
  300. package/src/shared/application/ports/human.ts +25 -0
  301. package/src/shared/application/ports/llm.ts +32 -3
  302. package/src/shared/application/ports/memory.ts +1 -1
  303. package/src/shared/application/ports/theme.ts +11 -0
  304. package/src/shared/application/ports.ts +4 -2
  305. package/src/shared/application/session-io.ts +2 -1
  306. package/src/shared/application/shared-memory/admit-entries.ts +16 -14
  307. package/src/shared/application/shared-memory/harvest-after-gaps.ts +5 -8
  308. package/src/shared/application/shared-memory/harvest-mistakes.ts +3 -2
  309. package/src/shared/application/shared-memory/import-agent-memory.ts +9 -7
  310. package/src/shared/application/shared-memory/memory-files.ts +2 -1
  311. package/src/shared/application/shared-memory/memory-settings.ts +2 -1
  312. package/src/shared/application/shared-memory/messages.ts +63 -0
  313. package/src/shared/application/shared-memory/push-candidate.ts +14 -11
  314. package/src/shared/application/shared-memory/recall-precedents.ts +2 -1
  315. package/src/shared/application/skills/messages.ts +4 -0
  316. package/src/shared/application/skills/suggest-skills.ts +102 -0
  317. package/src/shared/application/workflow/messages.ts +8 -0
  318. package/src/shared/application/workflow/workflow-state.ts +7 -6
  319. package/src/shared/domain/agent-policy/behavior-flags.ts +4 -10
  320. package/src/shared/domain/agent-policy/extra-tools.ts +2 -4
  321. package/src/shared/domain/agent-policy/messages.ts +66 -0
  322. package/src/shared/domain/agent-policy/path-rules.ts +299 -0
  323. package/src/shared/domain/agent-policy/permission.ts +20 -18
  324. package/src/shared/domain/agent-policy/prompts.ts +17 -0
  325. package/src/shared/domain/agent-policy/reasoning.ts +59 -0
  326. package/src/shared/domain/agent-policy/rule-sets.ts +18 -14
  327. package/src/shared/domain/agent-policy/tool-access.ts +17 -3
  328. package/src/shared/domain/agent-registry.ts +6 -5
  329. package/src/shared/domain/agents/chain.ts +2 -2
  330. package/src/shared/domain/agents/charter.ts +8 -5
  331. package/src/shared/domain/agents/exclusive.ts +2 -1
  332. package/src/shared/domain/agents/instances.ts +18 -15
  333. package/src/shared/domain/agents/messages.ts +39 -0
  334. package/src/shared/domain/agents/model-route.ts +199 -0
  335. package/src/shared/domain/agents/prompts.ts +20 -0
  336. package/src/shared/domain/code-intel-contract.ts +5 -4
  337. package/src/shared/domain/code-intel-routing.ts +8 -61
  338. package/src/shared/domain/compact-outcome.ts +5 -3
  339. package/src/shared/domain/compaction-thresholds.ts +2 -1
  340. package/src/shared/domain/compaction.ts +22 -113
  341. package/src/shared/domain/config-schema.ts +94 -81
  342. package/src/shared/domain/context-prune.ts +176 -0
  343. package/src/shared/domain/decision/questions.ts +102 -0
  344. package/src/shared/domain/dev/access-cost.ts +19 -15
  345. package/src/shared/domain/dev/batches-concurrency.ts +5 -6
  346. package/src/shared/domain/dev/build-commands.ts +5 -4
  347. package/src/shared/domain/dev/call-guard.ts +29 -28
  348. package/src/shared/domain/dev/carried-text.ts +3 -5
  349. package/src/shared/domain/dev/learn-proposals.ts +5 -4
  350. package/src/shared/domain/dev/learn-state.ts +3 -2
  351. package/src/shared/domain/dev/markers.ts +107 -0
  352. package/src/shared/domain/dev/messages.ts +259 -0
  353. package/src/shared/domain/dev/phase-timing.ts +50 -0
  354. package/src/shared/domain/dev/plan-checks.ts +24 -23
  355. package/src/shared/domain/dev/plan-format.ts +14 -24
  356. package/src/shared/domain/dev/project-files.ts +1 -15
  357. package/src/shared/domain/dev/prompts/brief-blocks.ts +20 -0
  358. package/src/shared/domain/dev/{review-prompt.ts → prompts.ts} +91 -61
  359. package/src/shared/domain/dev/questions.ts +33 -15
  360. package/src/shared/domain/dev/repo-pack.ts +12 -9
  361. package/src/shared/domain/dev/review-answer.ts +40 -17
  362. package/src/shared/domain/dev/review-brief.ts +54 -0
  363. package/src/shared/domain/dev/reviewer-charter.ts +4 -0
  364. package/src/shared/domain/dev/sheet-facts.ts +2 -4
  365. package/src/shared/domain/dev/spec-format.ts +13 -14
  366. package/src/shared/domain/dev/step-budget.ts +4 -2
  367. package/src/shared/domain/dev/step-rules.ts +3 -4
  368. package/src/shared/domain/dev/test-commands.ts +14 -10
  369. package/src/shared/domain/dev/tool-guards.ts +4 -3
  370. package/src/shared/domain/dev/trait-pattern.ts +14 -10
  371. package/src/shared/domain/dev/verdict-format.ts +14 -21
  372. package/src/shared/domain/dev/whitespace.ts +3 -2
  373. package/src/shared/domain/dev/work-folder.ts +4 -3
  374. package/src/shared/domain/dev/yaml-subset.ts +8 -26
  375. package/src/shared/domain/error-text.ts +13 -0
  376. package/src/shared/domain/git/close.ts +5 -4
  377. package/src/shared/domain/git/messages.ts +20 -0
  378. package/src/shared/domain/git/pull-request.ts +5 -5
  379. package/src/shared/domain/host-layout.ts +147 -0
  380. package/src/shared/domain/host-paths.ts +399 -0
  381. package/src/shared/domain/llm-failure.ts +35 -7
  382. package/src/shared/domain/llm-profile.ts +22 -3
  383. package/src/shared/domain/marked-message.ts +1 -5
  384. package/src/shared/domain/markers.ts +30 -0
  385. package/src/shared/domain/messages.ts +291 -0
  386. package/src/shared/domain/model-catalog.ts +2 -9
  387. package/src/shared/domain/permission-modes.ts +4 -8
  388. package/src/shared/domain/prelude.ts +2 -2
  389. package/src/shared/domain/project-manifests.ts +3 -2
  390. package/src/shared/domain/prompts.ts +233 -0
  391. package/src/shared/domain/search-routing.ts +3 -11
  392. package/src/shared/domain/secret-patterns.ts +3 -2
  393. package/src/shared/domain/session-keys.ts +7 -0
  394. package/src/shared/domain/session-start.ts +3 -2
  395. package/src/shared/domain/shared-memory/agent-memory-import.ts +4 -2
  396. package/src/shared/domain/shared-memory/candidates.ts +3 -4
  397. package/src/shared/domain/shared-memory/entry.ts +26 -20
  398. package/src/shared/domain/shared-memory/front-matter.ts +17 -13
  399. package/src/shared/domain/shared-memory/gate.ts +4 -3
  400. package/src/shared/domain/shared-memory/harvest.ts +9 -6
  401. package/src/shared/domain/shared-memory/layout.ts +11 -8
  402. package/src/shared/domain/shared-memory/markers.ts +9 -0
  403. package/src/shared/domain/shared-memory/messages.ts +66 -0
  404. package/src/shared/domain/shared-memory/precedents-block.ts +4 -15
  405. package/src/shared/domain/shared-memory/prompts.ts +28 -0
  406. package/src/shared/domain/shared-memory/refused.ts +3 -3
  407. package/src/shared/domain/skills/prompts.ts +4 -0
  408. package/src/shared/domain/skills/shortlist.ts +149 -0
  409. package/src/shared/domain/snip-turns.ts +2 -14
  410. package/src/shared/domain/speech.ts +2 -1
  411. package/src/shared/domain/tool-trace.ts +5 -7
  412. package/src/shared/domain/verifiers.ts +7 -11
  413. package/src/shared/domain/vfs.ts +8 -1
  414. package/src/shared/domain/workflow/prompts.ts +15 -0
  415. package/src/shared/domain/workflow/state-file.ts +14 -12
  416. package/src/shared/infrastructure/globals.ts +7 -2
  417. package/src/shared/infrastructure/orkeon/child-agents.ts +11 -16
  418. package/src/shared/infrastructure/orkeon/chooser.ts +32 -0
  419. package/src/shared/infrastructure/orkeon/decision-model.ts +31 -0
  420. package/src/shared/infrastructure/orkeon/dev-deps.ts +21 -14
  421. package/src/shared/infrastructure/orkeon/files.ts +24 -6
  422. package/src/shared/infrastructure/orkeon/github-pull-requests.ts +3 -2
  423. package/src/shared/infrastructure/orkeon/host-context.ts +36 -0
  424. package/src/shared/infrastructure/orkeon/human-input.ts +1 -5
  425. package/src/shared/infrastructure/orkeon/llm-profile.ts +36 -16
  426. package/src/shared/infrastructure/orkeon/llm.ts +85 -30
  427. package/src/shared/infrastructure/orkeon/markers.ts +6 -0
  428. package/src/shared/infrastructure/orkeon/memory-store.ts +1 -1
  429. package/src/shared/infrastructure/orkeon/memory-tools.ts +18 -20
  430. package/src/shared/infrastructure/orkeon/messages.ts +15 -0
  431. package/src/shared/infrastructure/orkeon/prompts.ts +47 -0
  432. package/src/shared/infrastructure/orkeon/reasoning.ts +40 -0
  433. package/src/shared/infrastructure/orkeon/script-tools.ts +14 -19
  434. package/src/shared/infrastructure/orkeon/session-store.ts +7 -51
  435. package/src/shared/infrastructure/orkeon/shell-jobs.ts +13 -7
  436. package/src/shared/infrastructure/orkeon/shell.ts +13 -5
  437. package/src/shared/infrastructure/orkeon/tool-catalogue.ts +3 -2
  438. package/src/shared/infrastructure/orkeon/wiring.ts +68 -12
  439. package/src/crews/dev-verify/application/auditor-prompt.ts +0 -323
  440. package/src/shared/domain/session-summary.ts +0 -13
@@ -21,9 +21,18 @@ import type {
21
21
  import type { ConfigStore } from "../../../shared/application/config-store.ts";
22
22
  import { CODE_INTEL_TOOLS } from "../../../shared/domain/code-intel-contract.ts";
23
23
  import { knownConfigKeys } from "../../../shared/domain/config-schema.ts";
24
- import { CLI_BUILD, CLI_NAME, CLI_VERSION, isPinnedCommit, ORKEON_RUNTIME_PIN } from "./meta.ts";
24
+ import { readHostContext } from "../../../shared/application/host-context.ts";
25
+ import { describeHostLayout } from "../../../shared/domain/host-layout.ts";
26
+ import { listedEntries } from "../../../shared/domain/agent-policy/path-rules.ts";
27
+ import { CLI_BUILD, CLI_NAME, CLI_VERSION, isPinnedCommit } from "./meta.ts";
25
28
  import type { CommandView } from "../view.ts";
26
29
  import { WORKSPACE } from "../../../shared/domain/vfs.ts";
30
+ import {
31
+ ALL_CHECKS_PASSED, CHECK_CODE_INTEL, CHECK_LLM_CATALOGUE, CHECK_LLM_MODEL, CHECK_PROJECT_FILE, CHECK_SESSIONS,
32
+ NO_AVAILABLE_MODELS, NO_MODEL, NO_PATH_LIST, checksFailed, checksPassedWarned, codeIntelAbsent, essentialsPresent,
33
+ modelNotPinged, oldSessionsLeft, projectSettingIgnored, versionNoRuntime, versionNotPinned, versionPinned,
34
+ workspaceNotWritable,
35
+ } from "./messages.ts";
27
36
 
28
37
  /** Tools the coding agent cannot work without — absence is a FAIL, not a note. */
29
38
  export const ESSENTIAL_TOOLS = ["file_read", "file_write", "shell_command", "directory_read", "session_store"];
@@ -40,8 +49,10 @@ export interface DoctorDeps {
40
49
  shell: Shell;
41
50
  telemetry: Pick<Telemetry, "readMetadata">;
42
51
  catalogue: Pick<ToolCatalogue, "names">;
43
- files: Pick<Files, "mounts" | "list">;
44
- config: Pick<ConfigStore, "readValue">;
52
+ /** The mounts, the old sessions folder, and launch.json (the host's layout). */
53
+ files: Pick<Files, "mounts" | "list" | "read">;
54
+ /** What the project file could not widen, and the two settings files' path lists. */
55
+ config: Pick<ConfigStore, "readValue" | "readFile" | "readUserFile">;
45
56
  /** The running runtime's reader (Orkeon #225); absent, or answering nothing: the version row names the pin alone. */
46
57
  runtime?: RuntimeInfoReader;
47
58
  }
@@ -57,18 +68,16 @@ export function versionRow(runtime: RuntimeInfo | undefined): DoctorRow {
57
68
  return {
58
69
  check: "version",
59
70
  result: PASS,
60
- detail: `${CODE_VERSION_DETAIL}; Orkeon expected at commit ${ORKEON_RUNTIME_PIN} (.orkeon-version), the host names no runtime: ` +
61
- "orkeon-code --version in a terminal says the one found",
71
+ detail: versionNoRuntime(CODE_VERSION_DETAIL),
62
72
  };
63
73
  }
64
74
  const found = `Orkeon ${runtime.version}${runtime.commit ? `+${runtime.commit}` : ""} (${runtime.channel})`;
65
75
  return isPinnedCommit(runtime.commit)
66
- ? { check: "version", result: PASS, detail: `${CODE_VERSION_DETAIL}; ${found}, the pin of .orkeon-version` }
76
+ ? { check: "version", result: PASS, detail: versionPinned(CODE_VERSION_DETAIL, found) }
67
77
  : {
68
78
  check: "version",
69
79
  result: WARN,
70
- detail: `${CODE_VERSION_DETAIL}; ${found} runs, commit ${ORKEON_RUNTIME_PIN} expected (.orkeon-version): ` +
71
- "the commands were checked against the pin",
80
+ detail: versionNotPinned(CODE_VERSION_DETAIL, found),
72
81
  };
73
82
  }
74
83
 
@@ -97,18 +106,14 @@ export async function runDoctor(deps: DoctorDeps): Promise<CommandView> {
97
106
  const model = (md.model ?? "").trim();
98
107
  const declared = md.availableModels ?? [];
99
108
  rows.push({
100
- check: "llm: model configured",
109
+ check: CHECK_LLM_MODEL,
101
110
  result: model ? PASS : FAIL,
102
- detail: model
103
- ? `${model} (not pinged — a reachability test costs a real call)`
104
- : "the host reports NO model: expect every /assistant turn to no-op. Check the `Llm` section of the settings file.",
111
+ detail: model ? modelNotPinged(model) : NO_MODEL,
105
112
  });
106
113
  rows.push({
107
- check: "llm: declared catalogue",
114
+ check: CHECK_LLM_CATALOGUE,
108
115
  result: declared.length > 0 ? PASS : WARN,
109
- detail: declared.length > 0
110
- ? declared.join(", ")
111
- : "no Llm:AvailableModels — /model cannot offer a choice or flag an unserved name",
116
+ detail: declared.length > 0 ? declared.join(", ") : NO_AVAILABLE_MODELS,
112
117
  });
113
118
 
114
119
  // 3. Tool catalogue.
@@ -118,16 +123,16 @@ export async function runDoctor(deps: DoctorDeps): Promise<CommandView> {
118
123
  check: "tools: essential",
119
124
  result: missingEssential.length === 0 ? PASS : FAIL,
120
125
  detail: missingEssential.length === 0
121
- ? `${available.size} registered, all ${ESSENTIAL_TOOLS.length} essentials present`
126
+ ? essentialsPresent(available.size, ESSENTIAL_TOOLS.length)
122
127
  : `MISSING: ${missingEssential.join(", ")}`,
123
128
  });
124
129
  const missingIntel = CODE_INTEL_TOOLS.filter((t) => !available.has(t));
125
130
  rows.push({
126
- check: "tools: code intelligence",
131
+ check: CHECK_CODE_INTEL,
127
132
  result: missingIntel.length === 0 ? PASS : WARN,
128
133
  detail: missingIntel.length === 0
129
134
  ? `all ${CODE_INTEL_TOOLS.length} present`
130
- : `absent: ${missingIntel.join(", ")} — the agent falls back to reading files`,
135
+ : codeIntelAbsent(missingIntel),
131
136
  });
132
137
 
133
138
  // 4. VFS mounts — /workspace read-write is the precondition for everything.
@@ -143,32 +148,46 @@ export async function runDoctor(deps: DoctorDeps): Promise<CommandView> {
143
148
  // /workspace read-WRITE is the precondition for everything the agent does;
144
149
  // a read-only mount would fail every edit with a permissions error later.
145
150
  detail: (described.join(" ") || "(none)") +
146
- (hasWorkspace ? "" : ` ← ${WORKSPACE} is missing or not writable`),
151
+ (hasWorkspace ? "" : workspaceNotWritable(WORKSPACE)),
147
152
  });
148
153
  } catch (e: any) {
149
154
  rows.push({ check: "vfs: mounts", result: WARN, detail: `list_mounts unavailable: ${String(e?.message ?? e).split("\n")[0]}` });
150
155
  }
151
156
 
157
+ // 4b. The host the launcher described (launch.json) and the user's path lists, as every act's callbacks read them:
158
+ // the layout with each mount's base, the lists, and every entry or file they could not read.
159
+ const host = await readHostContext(files, deps.config);
160
+ const lists = [
161
+ ...(host.lists.deny.length > 0 ? [`deny: ${listedEntries(host.lists.deny).join(", ")}`] : []),
162
+ ...(host.lists.allow.length > 0 ? [`allow: ${listedEntries(host.lists.allow).join(", ")}`] : []),
163
+ ];
164
+ rows.push({
165
+ check: "host: paths",
166
+ result: host.problems.length === 0 ? PASS : WARN,
167
+ detail: [
168
+ describeHostLayout(host.layout), ...(lists.length > 0 ? lists : [NO_PATH_LIST]), ...host.problems.map((p) => `⚠ ${p}`),
169
+ ].join("; "),
170
+ });
171
+
152
172
  // 5. Sessions left in the project: the runtime kept them in /workspace/.orkeon/sessions
153
173
  // before the launcher mounted /sessions outside the project (QL-04). Left alone, named here.
154
174
  const inProject = await files.list(OLD_SESSIONS_DIR, 1).catch((): string[] => []);
155
175
  rows.push({
156
- check: "sessions: outside the project",
176
+ check: CHECK_SESSIONS,
157
177
  result: inProject.length === 0 ? PASS : WARN,
158
178
  detail: inProject.length === 0
159
179
  ? "nothing in .orkeon/sessions"
160
- : `${OLD_SESSIONS_DIR} holds sessions of an older start, left alone: sessions now live in the launcher's state folder, outside the project ` +
161
- "(orkeon-code --resume lists them); delete the folder once you no longer need it",
180
+ : oldSessionsLeft(OLD_SESSIONS_DIR),
162
181
  });
163
182
 
164
183
  // 6. What the project file set and could not widen (QL-06): said here as /permissions says it.
165
184
  const ignored: string[] = [];
166
185
  for (const key of knownConfigKeys()) {
167
186
  const r = await deps.config.readValue(key).catch(() => undefined);
168
- if (r?.ignored !== undefined) ignored.push(`the project file sets ${key} '${r.ignored.value}': ignored, ${r.ignored.reason}`);
187
+ if (r?.ignored !== undefined) ignored.push(projectSettingIgnored(key, r.ignored.value, r.ignored.reason));
169
188
  }
170
189
  rows.push({
171
- check: "settings: project file",
190
+ check: CHECK_PROJECT_FILE,
172
191
  result: ignored.length === 0 ? PASS : WARN,
173
192
  detail: ignored.length === 0 ? "widens nothing" : ignored.join("; "),
174
193
  });
@@ -178,9 +197,9 @@ export async function runDoctor(deps: DoctorDeps): Promise<CommandView> {
178
197
  return {
179
198
  table: rows,
180
199
  text: failed > 0
181
- ? `${failed} check(s) FAILED, ${warned} warning(s) — the host is not fully usable.`
200
+ ? checksFailed(failed, warned)
182
201
  : warned > 0
183
- ? `all checks passed, ${warned} warning(s).`
184
- : "all checks passed.",
202
+ ? checksPassedWarned(warned)
203
+ : ALL_CHECKS_PASSED,
185
204
  };
186
205
  }
@@ -0,0 +1,100 @@
1
+ // The text the status commands show the user (ADR 0026): the rows of /doctor and /status, the /usage legend and
2
+ // breakdown, the release notes.
3
+ import { CLI_BUILD, CLI_NAME, CLI_VERSION, ORKEON_RUNTIME_PIN } from "./meta.ts";
4
+
5
+ // /doctor
6
+
7
+ export const versionNoRuntime = (code: string): string =>
8
+ `${code}; Orkeon expected at commit ${ORKEON_RUNTIME_PIN} (.orkeon-version), the host names no runtime: ` +
9
+ "orkeon-code --version in a terminal says the one found";
10
+ export const versionPinned = (code: string, found: string): string => `${code}; ${found}, the pin of .orkeon-version`;
11
+ export const versionNotPinned = (code: string, found: string): string =>
12
+ `${code}; ${found} runs, commit ${ORKEON_RUNTIME_PIN} expected (.orkeon-version): ` +
13
+ "the commands were checked against the pin";
14
+ export const CHECK_LLM_MODEL = "llm: model configured";
15
+ export const modelNotPinged = (model: string): string => `${model} (not pinged — a reachability test costs a real call)`;
16
+ export const NO_MODEL =
17
+ "the host reports NO model: expect every /assistant turn to no-op. Check the `Llm` section of the settings file.";
18
+ export const CHECK_LLM_CATALOGUE = "llm: declared catalogue";
19
+ export const NO_AVAILABLE_MODELS = "no Llm:AvailableModels — /model cannot offer a choice or flag an unserved name";
20
+ export const essentialsPresent = (registered: number, essentials: number): string =>
21
+ `${registered} registered, all ${essentials} essentials present`;
22
+ export const CHECK_CODE_INTEL = "tools: code intelligence";
23
+ export const codeIntelAbsent = (tools: readonly string[]): string =>
24
+ `absent: ${tools.join(", ")} — the agent falls back to reading files`;
25
+ export const workspaceNotWritable = (workspace: string): string => ` ← ${workspace} is missing or not writable`;
26
+ export const NO_PATH_LIST = "no path list";
27
+ export const CHECK_SESSIONS = "sessions: outside the project";
28
+ export const oldSessionsLeft = (dir: string): string =>
29
+ `${dir} holds sessions of an older start, left alone: sessions now live in the launcher's state folder, outside the project ` +
30
+ "(orkeon-code --resume lists them); delete the folder once you no longer need it";
31
+ export const projectSettingIgnored = (key: string, value: string, reason: string): string =>
32
+ `the project file sets ${key} '${value}': ignored, ${reason}`;
33
+ export const CHECK_PROJECT_FILE = "settings: project file";
34
+ export const checksFailed = (failed: number, warned: number): string =>
35
+ `${failed} check(s) FAILED, ${warned} warning(s) — the host is not fully usable.`;
36
+ export const checksPassedWarned = (warned: number): string => `all checks passed, ${warned} warning(s).`;
37
+ export const ALL_CHECKS_PASSED = "all checks passed.";
38
+
39
+ // /status
40
+
41
+ export const RUNTIME_PIN_ONLY = `Orkeon ${ORKEON_RUNTIME_PIN} (the commit pinned by .orkeon-version)`;
42
+ export const runtimePinned = (found: string): string => `${found}, the pin of .orkeon-version`;
43
+ export const runtimeNotPinned = (found: string): string => `${found}, NOT the pin ${ORKEON_RUNTIME_PIN} of .orkeon-version`;
44
+
45
+ /** How Orkeon Code is updated: there is no self-update channel. */
46
+ export const UPDATE_NOTE =
47
+ "no self-update: update the orkeon-code checkout (git pull, or a newer release archive) and relaunch; " +
48
+ "the Orkeon runtime it runs on is pinned to a commit of Orkeon's main by its .orkeon-version";
49
+ export const MODEL_UNREPORTED = "(unreported by the host — see /model)";
50
+ export const hostDefaultProvider = (provider: string): string => `${provider} (the host's default)`;
51
+ export const UNREPORTED_BY_HOST = "(unreported by the host)";
52
+
53
+ // /usage
54
+
55
+ /** What a host without the usage service leaves the breakdown with. */
56
+ export const NO_USAGE_SERVICE = "usage by model and command: not reported by this host (no usage service)";
57
+ export const unpricedCalls = (count: number): string => `${count} call(s) unpriced: the cost is a lower bound`;
58
+ export const fromCache = (tokens: number): string => ` (${tokens} from the cache)`;
59
+ export const NO_MODEL_USAGE = "by model: none named by the provider yet";
60
+ export const NO_COMMAND_USAGE = "by command: no command instance yet";
61
+
62
+ /** What the row's columns count, and which are estimates: the closing text opens with it. */
63
+ export const USAGE_LEGEND = [
64
+ "usedTokens, estTokens: the conversation's size in the context window, estimated by the host.",
65
+ "llm*: counted by the providers over every call: llmInTokens sent, llmOutTokens received (llmReasoningTokens a part of",
66
+ "them), llmTokens = in + out. cacheRead and cacheWrite are parts of llmInTokens; cacheRatio = cacheRead / llmInTokens.",
67
+ "n/a: not reported, never a measured 0.",
68
+ ].join("\n");
69
+
70
+ /** What a sub-verb /usage does not know answers. */
71
+ export const USAGE_SYNTAX = "usage: /usage, or /usage tools [text] (the tool calls of this session's turns)";
72
+
73
+ export const NO_TOOL_TRACE = "no tool call recorded in this session yet";
74
+ export const noToolCallHolds = (text: string): string => `no tool call holds '${text}' in this session`;
75
+
76
+ // /release-notes
77
+
78
+ export const RELEASE_NOTES = [
79
+ `${CLI_NAME} ${CLI_VERSION} (${CLI_BUILD})`,
80
+ "",
81
+ `Second release candidate of 1.0.0, on Orkeon 1.2.0 (main ${ORKEON_RUNTIME_PIN}).`,
82
+ "",
83
+ "Crews: main-loop (the interactive loop behind /assistant), code-review, git-commit,",
84
+ " project-init, init-verifiers, session-compact, advisor, analyze, speech,",
85
+ " dev-verify, dev-learn, dev-plan, dev-spec, dev-change, dev-implement, dev-batches,",
86
+ " shared-memory-admit, agent-run.",
87
+ "Commands: 50 slash commands; free text without a leading / goes to /assistant.",
88
+ "Permissions: five modes (default, acceptEdits, plan, dontAsk, bypassPermissions),",
89
+ " deny/allow rules (argument patterns too) enforced by the host gate,",
90
+ " questions before writes and commands, /mode for the session default.",
91
+ "Extra tools: tools.extra offers an MCP server's or a plugin's tools to the assistant.",
92
+ "Speech: the MCP server of mcp/whisper, /transcribe [--then], /voice (dictation), /say (read aloud).",
93
+ "Context: automatic compaction with a persistent breaker, snip-first /compact,",
94
+ " file restore after compaction, context pressure tiers.",
95
+ "Models: /model switches the model per turn; /model list offers Llm:AvailableModels;",
96
+ " /effort sets the reasoning effort among the levels the model takes.",
97
+ "Decision model (off by default): /route runs a crew on the cheapest profile that fits,",
98
+ " /skills suggest offers the skills that fit a turn, compaction.prune drops stale tool results.",
99
+ "Code intelligence: index, maps, dependency graph and symbol tools of the Orkeon runtime.",
100
+ ].join("\n");
@@ -3,16 +3,16 @@
3
3
  // Orkeon Code versions independently of the Orkeon runtime it runs on: the
4
4
  // runtime is pinned to a commit of Orkeon's main in .orkeon-version, this one follows
5
5
  // package.json (tests/repository/version.test.ts keeps the two equal). The counts and crew names in
6
- // RELEASE_NOTES are pinned by tests/commands/_lib/status/meta.test.ts, which keeps them true.
6
+ // RELEASE_NOTES (messages.ts) are pinned by tests/commands/_lib/status/messages.test.ts, which keeps them true.
7
7
 
8
8
  export const CLI_NAME = "orkeon-code";
9
- export const CLI_VERSION = "1.0.0-rc.1";
9
+ export const CLI_VERSION = "1.0.0-rc.2";
10
10
  export const CLI_BUILD = "source";
11
11
  /** The Orkeon runtime this version runs on: the commit of Orkeon's `main` pinned in .orkeon-version, which the
12
12
  * launcher announces (tests/repository/version.test.ts keeps the two equal). A release tag is never the pin: the
13
13
  * commands are checked against the sources at this commit (ADR 0013). /status and /doctor compare it with the
14
14
  * commit of the runtime that runs them, read from the host's `runtime` service (Orkeon #225). */
15
- export const ORKEON_RUNTIME_COMMIT = "839818d6aedefd96954bc470d4cefa6541aec1ba";
15
+ export const ORKEON_RUNTIME_COMMIT = "a9f3878aca94c81d5c23fa0b858b59b8a78d5122";
16
16
  /** The pin as the launcher and the rows print it: its first seven characters. */
17
17
  export const ORKEON_RUNTIME_PIN = ORKEON_RUNTIME_COMMIT.slice(0, 7);
18
18
 
@@ -22,24 +22,3 @@ export const ORKEON_RUNTIME_PIN = ORKEON_RUNTIME_COMMIT.slice(0, 7);
22
22
  export function isPinnedCommit(commit: string | null): boolean {
23
23
  return commit !== null && commit.length >= 7 && ORKEON_RUNTIME_COMMIT.startsWith(commit);
24
24
  }
25
-
26
- export const RELEASE_NOTES = [
27
- `${CLI_NAME} ${CLI_VERSION} (${CLI_BUILD})`,
28
- "",
29
- `First release candidate of 1.0.0, on Orkeon main ${ORKEON_RUNTIME_PIN}.`,
30
- "",
31
- "Crews: main-loop (the interactive loop behind /assistant), code-review, git-commit,",
32
- " project-init, init-verifiers, session-compact, advisor, analyze, speech,",
33
- " dev-verify, dev-learn, dev-plan, dev-spec, dev-change, dev-implement, dev-batches,",
34
- " shared-memory-admit, agent-run.",
35
- "Commands: 48 slash commands; free text without a leading / goes to /assistant.",
36
- "Permissions: five modes (default, acceptEdits, plan, dontAsk, bypassPermissions),",
37
- " deny/allow rules (argument patterns too) enforced by the host gate,",
38
- " questions before writes and commands, /mode for the session default.",
39
- "Extra tools: tools.extra offers an MCP server's or a plugin's tools to the assistant.",
40
- "Speech: the MCP server of mcp/whisper, /transcribe [--then], /voice (dictation), /say (read aloud).",
41
- "Context: automatic compaction with a persistent breaker, snip-first /compact,",
42
- " file restore after compaction, context pressure tiers.",
43
- "Models: /model switches the model per turn; /model list offers Llm:AvailableModels.",
44
- "Code intelligence: index, maps, dependency graph and symbol tools of the Orkeon runtime.",
45
- ].join("\n");
@@ -7,7 +7,11 @@
7
7
  import type {
8
8
  CrewHost, RuntimeInfo, RuntimeInfoReader, SessionCost, SessionMetadata, SessionStats, SessionStore, Shell, Telemetry,
9
9
  } from "../../../shared/application/ports.ts";
10
- import { CLI_BUILD, CLI_NAME, CLI_VERSION, isPinnedCommit, ORKEON_RUNTIME_PIN } from "./meta.ts";
10
+ import { CLI_BUILD, CLI_NAME, CLI_VERSION, isPinnedCommit } from "./meta.ts";
11
+ import {
12
+ MODEL_UNREPORTED, RUNTIME_PIN_ONLY, UNREPORTED_BY_HOST, UPDATE_NOTE, hostDefaultProvider, runtimeNotPinned,
13
+ runtimePinned,
14
+ } from "./messages.ts";
11
15
  import type { CommandView } from "../view.ts";
12
16
  import { WORKSPACE } from "../../../shared/domain/vfs.ts";
13
17
 
@@ -34,18 +38,13 @@ export interface StatusInputs {
34
38
  * .orkeon-version, or the pin alone when the host names no runtime (Orkeon #225). A runtime that reports no commit
35
39
  * is not the pin. */
36
40
  export function runtimeRow(runtime: RuntimeInfo | undefined): string {
37
- if (runtime === undefined) return `Orkeon ${ORKEON_RUNTIME_PIN} (the commit pinned by .orkeon-version)`;
41
+ if (runtime === undefined) return RUNTIME_PIN_ONLY;
38
42
  const found = `Orkeon ${runtime.version}${runtime.commit ? `+${runtime.commit}` : ""} (${runtime.channel})`;
39
43
  return isPinnedCommit(runtime.commit)
40
- ? `${found}, the pin of .orkeon-version`
41
- : `${found}, NOT the pin ${ORKEON_RUNTIME_PIN} of .orkeon-version`;
44
+ ? runtimePinned(found)
45
+ : runtimeNotPinned(found);
42
46
  }
43
47
 
44
- /** How Orkeon Code is updated: there is no self-update channel. */
45
- export const UPDATE_NOTE =
46
- "no self-update: update the orkeon-code checkout (git pull, or a newer release archive) and relaunch; " +
47
- "the Orkeon runtime it runs on is pinned to a commit of Orkeon's main by its .orkeon-version";
48
-
49
48
  /**
50
49
  * The `/status` rows.
51
50
  *
@@ -62,9 +61,9 @@ export function buildStatusRows(i: StatusInputs): Array<{ field: string; value:
62
61
  const cost = Number(i.costUsd ?? 0) || 0;
63
62
 
64
63
  return [
65
- { field: "model", value: String(i.model ?? "").trim() || "(unreported by the host — see /model)" },
64
+ { field: "model", value: String(i.model ?? "").trim() || MODEL_UNREPORTED },
66
65
  // The host's default provider: a turn on another profile runs on that profile's.
67
- { field: "provider", value: String(i.provider ?? "").trim() ? `${String(i.provider).trim()} (the host's default)` : "(unreported by the host)" },
66
+ { field: "provider", value: String(i.provider ?? "").trim() ? hostDefaultProvider(String(i.provider).trim()) : UNREPORTED_BY_HOST },
68
67
  { field: "workspace", value: String(i.workspace ?? WORKSPACE) },
69
68
  { field: "session", value: String(i.title ?? "").trim() || "(untitled)" },
70
69
  { field: "messages", value: String(Number(i.messages ?? 0) || 0) },
@@ -5,12 +5,11 @@ import type { SessionMsg } from "../../../shared/domain/types.ts";
5
5
  import { isToolTrace } from "../../../shared/domain/tool-trace.ts";
6
6
  import { isMarkedMessage } from "../../../shared/domain/marked-message.ts";
7
7
  import type { CommandView } from "../view.ts";
8
+ import { NO_TOOL_TRACE, noToolCallHolds } from "./messages.ts";
8
9
 
9
10
  /** A request is cut past this many characters on its line. */
10
11
  export const MAX_REQUEST_CHARS = 100;
11
12
 
12
- export const NO_TOOL_TRACE = "no tool call recorded in this session yet";
13
-
14
13
  export interface UsageToolsDeps {
15
14
  session: Pick<SessionStore, "readMessages">;
16
15
  }
@@ -24,7 +23,7 @@ export async function runUsageTools(text: string, deps: UsageToolsDeps): Promise
24
23
  }
25
24
  const lines = toolTraceLines(messages, text.trim());
26
25
  if (lines.length > 0) return { lines };
27
- return { text: text.trim().length === 0 ? NO_TOOL_TRACE : `no tool call holds '${text.trim()}' in this session` };
26
+ return { text: text.trim().length === 0 ? NO_TOOL_TRACE : noToolCallHolds(text.trim()) };
28
27
  }
29
28
 
30
29
  /** Each turn's request, then its calls, the calls holding `text` alone (case aside) when it is not empty. */
@@ -15,6 +15,9 @@ import {
15
15
  import { UNREPORTED, type Unreported, cacheColumns, shown } from "./cache.ts";
16
16
  import type { CommandView } from "../view.ts";
17
17
  import { runUsageTools, type UsageToolsDeps } from "./usage-tools.ts";
18
+ import {
19
+ NO_COMMAND_USAGE, NO_MODEL_USAGE, NO_USAGE_SERVICE, USAGE_LEGEND, USAGE_SYNTAX, fromCache, unpricedCalls as unpricedCallsNote,
20
+ } from "./messages.ts";
18
21
 
19
22
  export interface UsageDeps {
20
23
  session: Pick<SessionStore, "readBudget">;
@@ -24,9 +27,6 @@ export interface UsageDeps {
24
27
  usage?: UsageReader;
25
28
  }
26
29
 
27
- /** What a host without the usage service leaves the breakdown with. */
28
- export const NO_USAGE_SERVICE = "usage by model and command: not reported by this host (no usage service)";
29
-
30
30
  /** A cost as the breakdown shows it: unpriced when the host priced no call of the set. */
31
31
  export function costText(cost: number | null): string {
32
32
  return cost === null ? "cost unpriced" : `$${cost.toFixed(4)}`;
@@ -34,12 +34,12 @@ export function costText(cost: number | null): string {
34
34
 
35
35
  /** The lower-bound note, when some calls were priced by nobody. */
36
36
  export function unpricedNote(unpricedCalls: number): string | null {
37
- return unpricedCalls > 0 ? `${unpricedCalls} call(s) unpriced: the cost is a lower bound` : null;
37
+ return unpricedCalls > 0 ? unpricedCallsNote(unpricedCalls) : null;
38
38
  }
39
39
 
40
40
  function spentText(s: UsageSpent): string {
41
41
  // A cache read no call reported is left out; one measured, 0 included, is named.
42
- const cached = s.cacheHitTokens === null ? "" : ` (${s.cacheHitTokens} from the cache)`;
42
+ const cached = s.cacheHitTokens === null ? "" : fromCache(s.cacheHitTokens);
43
43
  return `${s.calls} call(s), ${s.promptTokens} prompt${cached}, ${s.completionTokens} completion, ${costText(s.cost)}`;
44
44
  }
45
45
 
@@ -56,9 +56,9 @@ function commandLine(c: CommandUsage): string {
56
56
  export function usageBreakdown(report: UsageReport | undefined): string {
57
57
  if (report === undefined) return NO_USAGE_SERVICE;
58
58
  const lines = [
59
- report.byModel.length > 0 ? "by model:" : "by model: none named by the provider yet",
59
+ report.byModel.length > 0 ? "by model:" : NO_MODEL_USAGE,
60
60
  ...report.byModel.map(modelLine),
61
- report.byCommand.length > 0 ? "by command:" : "by command: no command instance yet",
61
+ report.byCommand.length > 0 ? "by command:" : NO_COMMAND_USAGE,
62
62
  ...report.byCommand.map(commandLine),
63
63
  ];
64
64
  const note = unpricedNote(report.unpricedCalls);
@@ -66,14 +66,6 @@ export function usageBreakdown(report: UsageReport | undefined): string {
66
66
  return lines.join("\n");
67
67
  }
68
68
 
69
- /** What the row's columns count, and which are estimates: the closing text opens with it. */
70
- export const USAGE_LEGEND = [
71
- "usedTokens, estTokens: the conversation's size in the context window, estimated by the host.",
72
- "llm*: counted by the providers over every call: llmInTokens sent, llmOutTokens received (llmReasoningTokens a part of",
73
- "them), llmTokens = in + out. cacheRead and cacheWrite are parts of llmInTokens; cacheRatio = cacheRead / llmInTokens.",
74
- "n/a: not reported, never a measured 0.",
75
- ].join("\n");
76
-
77
69
  /** The share of the prompt tokens read from the cache, to two decimals; `n/a` when no call reported a cache read, or
78
70
  * no prompt token is counted: an unmeasured cache never reads as a ratio of 0. */
79
71
  export function cacheRatio(cacheRead: number | Unreported, promptTokens: number | Unreported): string {
@@ -128,9 +120,6 @@ export async function runUsage(deps: UsageDeps): Promise<CommandView> {
128
120
  };
129
121
  }
130
122
 
131
- /** What a sub-verb /usage does not know answers. */
132
- export const USAGE_SYNTAX = "usage: /usage, or /usage tools [text] (the tool calls of this session's turns)";
133
-
134
123
  /** /usage with its tokens: the usage view bare, the session's tool calls after `tools`. */
135
124
  export async function runUsageCommand(tokens: readonly string[], deps: UsageDeps & UsageToolsDeps): Promise<CommandView> {
136
125
  if (tokens.length === 0) return runUsage(deps);
@@ -8,6 +8,8 @@
8
8
  export interface CommandView {
9
9
  /** Lines written with ctx.writeLine, first (a command's own output: a diff). */
10
10
  lines?: string[];
11
+ /** A unified diff, shown as a typed block after the lines: the console colours it, any other shows it plain. */
12
+ diff?: string;
11
13
  /** Rows shown with ctx.table, before the message. */
12
14
  table?: object[];
13
15
  /** The closing message; absent when the table says it all. */
@@ -17,13 +19,16 @@ export interface CommandView {
17
19
  /** The part of the command context a view is shown with. */
18
20
  export interface ViewContext<R> {
19
21
  writeLine(text: string): void;
22
+ /** A typed block: the console colours it, a plain console shows its text as lines. */
23
+ writeBlock(spec: { kind: "diff"; text: string }): void;
20
24
  table(rows: readonly object[]): void;
21
25
  continue(message?: string): R;
22
26
  }
23
27
 
24
- /** Write the lines, show the table, if any, then close with the message. */
28
+ /** Write the lines and the diff, show the table, if any, then close with the message. */
25
29
  export function showView<R>(ctx: ViewContext<R>, view: CommandView): R {
26
30
  for (const line of view.lines ?? []) ctx.writeLine(line);
31
+ if (view.diff !== undefined) ctx.writeBlock({ kind: "diff", text: view.diff });
27
32
  if (view.table) ctx.table(view.table);
28
33
  return view.text === undefined ? ctx.continue() : ctx.continue(view.text);
29
34
  }
@@ -22,6 +22,7 @@ import {
22
22
  parseDevBatchesArgs, recordChain, runDevVerifyDispatch,
23
23
  } from "../_lib/dev/dev-batches.ts";
24
24
  import { runDevImplementDispatch } from "../_lib/dev/dev-implement.ts";
25
+ import { WRITES_COMMITS_PUSHES } from "../_lib/dev/messages.ts";
25
26
  import { reapplyStepRules, startDevStep, writeModeRefusal } from "../_lib/dev-step.ts";
26
27
  import { launchCrew, withLlmProfile } from "../_lib/dispatch.ts";
27
28
  import { storedEffort } from "../_lib/effort.ts";
@@ -29,7 +30,7 @@ import { readPullRequestContext } from "../_lib/pr-context.ts";
29
30
  import { createCrewHost } from "../../shared/infrastructure/orkeon/crew-host.ts";
30
31
  import { createPermissionRules } from "../../shared/infrastructure/orkeon/permission-rules.ts";
31
32
  import {
32
- orkeonConfigStore, orkeonFiles, orkeonSessionIo, orkeonShell, orkeonToolCatalogue,
33
+ orkeonConfigStore, orkeonFiles, orkeonHostContext, orkeonSessionIo, orkeonShell, orkeonToolCatalogue,
33
34
  } from "../../shared/infrastructure/orkeon/wiring.ts";
34
35
  import type { CommandRuntimeContext } from "../.orkeon/orkeon-cli.d.ts";
35
36
 
@@ -43,7 +44,7 @@ const contextReader = (ctx: CommandRuntimeContext) => () => readPullRequestConte
43
44
  /** The run of a plan: the mode checked, the step started, what was read riding in the crew's input. */
44
45
  async function runDispatch(args: Parameters<typeof batchesLaunchInput>[0], ctx: CommandRuntimeContext) {
45
46
  const prContext = await contextReader(ctx)();
46
- const line = writeModeRefusal(String(prContext.permissionMode ?? ""), "dev-batches", "writes files, commits and pushes")
47
+ const line = writeModeRefusal(String(prContext.permissionMode ?? ""), "dev-batches", WRITES_COMMITS_PUSHES)
47
48
  ?? batchesModeRefusal(args, String(prContext.permissionMode ?? ""));
48
49
  if (line !== null) {
49
50
  ctx.writeLine(line);
@@ -51,7 +52,7 @@ async function runDispatch(args: Parameters<typeof batchesLaunchInput>[0], ctx:
51
52
  }
52
53
  // The batches run the dev-implement step: its rule sets and its two allow rules (run_tests, run_build).
53
54
  const start = await startDevStep("dev-implement", {
54
- ...deps, gate: createPermissionRules(ctx.services), catalogue: orkeonToolCatalogue(ctx.services),
55
+ ...deps, gate: createPermissionRules(ctx.services), host: orkeonHostContext, catalogue: orkeonToolCatalogue(ctx.services),
55
56
  });
56
57
  if (!start.ok) {
57
58
  ctx.writeLine(start.line);
@@ -4,9 +4,9 @@
4
4
  // few reads and one write, answered here.
5
5
  import { rawTokens } from "../_lib/args.ts";
6
6
  import { parseDevLearnArgs, runDevLearnDecision } from "../_lib/dev/dev.ts";
7
- import { launchCrew, withLlmProfile, writeCompleted } from "../_lib/dispatch.ts";
7
+ import { launchCrew, withRoutedProfile, writeCompleted } from "../_lib/dispatch.ts";
8
8
  import { createCrewHost } from "../../shared/infrastructure/orkeon/crew-host.ts";
9
- import { orkeonClock, orkeonConfigStore, orkeonFiles, orkeonShell } from "../../shared/infrastructure/orkeon/wiring.ts";
9
+ import { orkeonClock, orkeonConfigStore, orkeonFiles, orkeonRouting, orkeonShell } from "../../shared/infrastructure/orkeon/wiring.ts";
10
10
 
11
11
  const deps = { files: orkeonFiles(), shell: orkeonShell(), config: orkeonConfigStore(), clock: orkeonClock() };
12
12
 
@@ -22,7 +22,7 @@ defineAsyncCommand({
22
22
  }
23
23
  const a = parsed.args;
24
24
  if (a.kind === "accept" || a.kind === "refuse") return { message: await runDevLearnDecision(a, deps) };
25
- return launchCrew(await withLlmProfile({ crews: createCrewHost(ctx.services), log: ctx.log }, orkeonConfigStore()), "dev-learn",
25
+ return launchCrew(await withRoutedProfile({ crews: createCrewHost(ctx.services), log: ctx.log }, orkeonConfigStore(), orkeonRouting(), { crew: "dev-learn", brief: String(ctx.command?.rawInput ?? "") }), "dev-learn",
26
26
  { axis: a.axis, list: a.kind === "list" });
27
27
  },
28
28
  completed: (result, ctx) => writeCompleted(ctx, result, "dev-learn"),
@@ -5,14 +5,13 @@
5
5
  // tool callbacks check them again and run the /hooks the input carries.
6
6
  import { rawTokens } from "../_lib/args.ts";
7
7
  import { devPlanGate, parseDevPlanArgs } from "../_lib/dev/dev.ts";
8
+ import { WRITES_FILES } from "../_lib/dev/messages.ts";
8
9
  import { readWriteModeRefusal, startDevStep } from "../_lib/dev-step.ts";
9
10
  import { storedEffort } from "../_lib/effort.ts";
10
- import { launchCrew, withLlmProfile, writeCompleted } from "../_lib/dispatch.ts";
11
+ import { launchCrew, withRoutedProfile, writeCompleted } from "../_lib/dispatch.ts";
11
12
  import { createCrewHost } from "../../shared/infrastructure/orkeon/crew-host.ts";
12
13
  import { createPermissionRules } from "../../shared/infrastructure/orkeon/permission-rules.ts";
13
- import {
14
- orkeonConfigStore, orkeonFiles, orkeonSessionIo, orkeonShell, orkeonToolCatalogue,
15
- } from "../../shared/infrastructure/orkeon/wiring.ts";
14
+ import { orkeonConfigStore, orkeonFiles, orkeonHostContext, orkeonRouting, orkeonSessionIo, orkeonShell, orkeonToolCatalogue } from "../../shared/infrastructure/orkeon/wiring.ts";
16
15
 
17
16
  const deps = { files: orkeonFiles(), shell: orkeonShell(), config: orkeonConfigStore(), session: orkeonSessionIo() };
18
17
 
@@ -29,13 +28,13 @@ defineAsyncCommand({
29
28
  const stop = await devPlanGate(parsed.args, deps);
30
29
  if (stop !== null) return { message: stop };
31
30
  // The crew writes files through its own port, which no mode gates: a read-only mode refuses it here.
32
- const readOnly = await readWriteModeRefusal(deps.session, "dev-plan", "writes files");
31
+ const readOnly = await readWriteModeRefusal(deps.session, "dev-plan", WRITES_FILES);
33
32
  if (readOnly !== null) {
34
33
  ctx.writeLine(readOnly);
35
34
  return { refused: readOnly };
36
35
  }
37
36
  const start = await startDevStep("dev-plan", {
38
- ...deps, gate: createPermissionRules(ctx.services), catalogue: orkeonToolCatalogue(ctx.services),
37
+ ...deps, gate: createPermissionRules(ctx.services), host: orkeonHostContext, catalogue: orkeonToolCatalogue(ctx.services),
39
38
  });
40
39
  if (!start.ok) {
41
40
  ctx.writeLine(start.line);
@@ -44,7 +43,7 @@ defineAsyncCommand({
44
43
  for (const line of start.lines) ctx.writeLine(line);
45
44
  const details = { ruleSets: start.sets.join(" "), rules: start.rules, hooks: start.hooks.length };
46
45
  return launchCrew(
47
- await withLlmProfile({ crews: createCrewHost(ctx.services), log: ctx.log }, orkeonConfigStore()), "dev-plan",
46
+ await withRoutedProfile({ crews: createCrewHost(ctx.services), log: ctx.log }, orkeonConfigStore(), orkeonRouting(), { crew: "dev-plan", brief: String(ctx.command?.rawInput ?? "") }), "dev-plan",
48
47
  { ...parsed.args, ...start.input, effort: await storedEffort(deps.session) }, details,
49
48
  );
50
49
  },
@@ -8,14 +8,13 @@
8
8
  // sets are put in it before the crew (_lib/dev-step.ts), and the crew's tool callbacks check them again and run the /hooks.
9
9
  import { rawTokens, typedCommand } from "../_lib/args.ts";
10
10
  import { parseDevSpecArgs } from "../_lib/dev/dev-source.ts";
11
+ import { WRITES_FILES } from "../_lib/dev/messages.ts";
11
12
  import { readWriteModeRefusal, startDevStep } from "../_lib/dev-step.ts";
12
- import { launchCrew, withLlmProfile, writeCompleted } from "../_lib/dispatch.ts";
13
+ import { launchCrew, withRoutedProfile, writeCompleted } from "../_lib/dispatch.ts";
13
14
  import { storedEffort } from "../_lib/effort.ts";
14
15
  import { createCrewHost } from "../../shared/infrastructure/orkeon/crew-host.ts";
15
16
  import { createPermissionRules } from "../../shared/infrastructure/orkeon/permission-rules.ts";
16
- import {
17
- orkeonConfigStore, orkeonFiles, orkeonSessionIo, orkeonShell, orkeonToolCatalogue,
18
- } from "../../shared/infrastructure/orkeon/wiring.ts";
17
+ import { orkeonConfigStore, orkeonFiles, orkeonHostContext, orkeonRouting, orkeonSessionIo, orkeonShell, orkeonToolCatalogue } from "../../shared/infrastructure/orkeon/wiring.ts";
19
18
 
20
19
  const deps = { files: orkeonFiles(), shell: orkeonShell(), config: orkeonConfigStore(), session: orkeonSessionIo() };
21
20
 
@@ -32,13 +31,13 @@ defineAsyncCommand({
32
31
  }
33
32
  const crew = parsed.crew;
34
33
  // The crew writes files through its own port, which no mode gates: a read-only mode refuses it here.
35
- const readOnly = await readWriteModeRefusal(deps.session, crew, "writes files");
34
+ const readOnly = await readWriteModeRefusal(deps.session, crew, WRITES_FILES);
36
35
  if (readOnly !== null) {
37
36
  ctx.writeLine(readOnly);
38
37
  return { refused: readOnly };
39
38
  }
40
39
  const start = await startDevStep(crew, {
41
- ...deps, gate: createPermissionRules(ctx.services), catalogue: orkeonToolCatalogue(ctx.services),
40
+ ...deps, gate: createPermissionRules(ctx.services), host: orkeonHostContext, catalogue: orkeonToolCatalogue(ctx.services),
42
41
  });
43
42
  if (!start.ok) {
44
43
  ctx.writeLine(start.line);
@@ -47,7 +46,7 @@ defineAsyncCommand({
47
46
  for (const line of start.lines) ctx.writeLine(line);
48
47
  const details = { ruleSets: start.sets.join(" "), rules: start.rules, hooks: start.hooks.length };
49
48
  return launchCrew(
50
- await withLlmProfile({ crews: createCrewHost(ctx.services), log: ctx.log }, orkeonConfigStore()), crew,
49
+ await withRoutedProfile({ crews: createCrewHost(ctx.services), log: ctx.log }, orkeonConfigStore(), orkeonRouting(), { crew: crew, brief: String(ctx.command?.rawInput ?? "") }), crew,
51
50
  { ...parsed.args, ...start.input, effort: await storedEffort(deps.session) }, details,
52
51
  );
53
52
  },