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
@@ -0,0 +1,10 @@
1
+ # The Orkeon runtime the launcher downloads at the first start when the machine has none (ADR 0028).
2
+ # id: the seven characters of the pin the archives were built from; url: the folder holding
3
+ # orkeon-runtime-<id>-<platform>.tar.gz; then one SHA-256 per platform. The release workflow fills this file
4
+ # before it publishes; in a checkout the id is empty, and nothing is downloaded.
5
+ id=
6
+ url=
7
+ linux-x64=
8
+ linux-arm64=
9
+ osx-x64=
10
+ osx-arm64=
package/.orkeon-version CHANGED
@@ -1 +1 @@
1
- 839818d6aedefd96954bc470d4cefa6541aec1ba
1
+ a9f3878aca94c81d5c23fa0b858b59b8a78d5122
package/NOTICE.md CHANGED
@@ -4,7 +4,7 @@ Orkeon Code
4
4
  Copyright (c) 2026 Orkeon Contributors. Licensed under the MIT License (see [LICENSE.md](LICENSE.md)).
5
5
 
6
6
  Orkeon Code runs on the [Orkeon](https://github.com/Orkeon/orkeon) runtime (MIT), which is distributed separately
7
- (the release archives, the `orkeon-runners` container image, the apt package, the .NET tools) with its own
7
+ (the release archives, the `orkeon` container image, the apt package, the .NET tools) with its own
8
8
  third-party notices.
9
9
 
10
10
  This repository ships TypeScript sources, and the Python sources of its speech MCP server (`mcp/whisper/`). Its
package/README.fr.md CHANGED
@@ -35,7 +35,7 @@ chaque prompt est un fichier source : modifiez-le, ou ajoutez le vôtre.
35
35
  ([Configuration](docs/fr/configuration.md#outils-supplémentaires--serveurs-mcp-et-plugins)).
36
36
  - **La transcription de la parole** : un serveur MCP Whisper est livré dans `mcp/whisper/` ; `ORKEON_CODE_AUDIO_DIR`
37
37
  l'active, et l'assistant transcrit notes vocales, réunions et vidéos d'écran sur votre machine ; `/voice` dicte une
38
- requête et `/say` lit à voix haute ([Configuration](docs/fr/configuration.md#transcription-de-la-parole)).
38
+ requête et `/say` lit à voix haute ([Configuration](docs/fr/speech.md#transcription-de-la-parole)).
39
39
  - **Des crews pour les tâches récurrentes** : `/init` (décrire le projet pour l'agent), `/commit` (un commit
40
40
  conventionnel tiré du diff), `/review` (revue de code multi-angles ; `--lens security` pour le seul angle sécurité), `/analyze`
41
41
  (analyse déterministe du code), `/compact` et `/summary` (gestion du contexte), `/init-verifiers`, `/advisor`.
@@ -51,28 +51,15 @@ chaque prompt est un fichier source : modifiez-le, ou ajoutez le vôtre.
51
51
  - **Gestion du contexte** : compaction automatique avec disjoncteur, `/compact` qui résume toute la session
52
52
  (la troncature est `/compact --snip`, ou le repli d'un résumé en échec), restauration des fichiers après
53
53
  compaction, paliers de pression du contexte, mémoire typée tenue par le processus Orkeon (`/memory`).
54
- - **48 commandes slash** au total : [docs/fr/commands.md](docs/fr/commands.md).
54
+ - **50 commandes slash** au total : [docs/fr/commands.md](docs/fr/commands.md).
55
55
 
56
56
  ## Démarrage rapide
57
57
 
58
58
  Il faut le runtime Orkeon et une clé d'API pour un fournisseur LLM pris en charge par Orkeon (tout point d'accès
59
- compatible OpenAI, Anthropic...). Orkeon Code est vérifié contre les sources d'Orkeon au commit de `.orkeon-version` ;
60
- les releases le font tourner aussi, en retard sur cette épingle. Chacun de ces trois fait tourner Orkeon Code :
61
-
62
- - **`orkeon-repl`** de la dernière release, `1.0.0-rc.6`, du paquet Debian/Ubuntu `orkeon` (amd64 et arm64 ; une release candidate est publiée sur le canal
63
- apt `rc`, le canal `stable` par défaut ne porte que les versions finales) ou de
64
- l'[archive de release d'Orkeon](https://github.com/Orkeon/orkeon/releases) de votre plateforme (Linux x64 et arm64,
65
- macOS x64 et arm64, `.zip` Windows x64), autonome : aucun .NET à installer ;
66
- - **Docker** : la dernière image `orkeon-runners` publiée (amd64 et arm64 ; `1.0.0-rc.5`, l'image `1.0.0-rc.6` n'est
67
- pas publiée), rien d'autre à installer ;
68
- - **un checkout d'Orkeon** à l'épingle, le runtime de référence : `ORKEON_SOURCE=<checkout> ./orkeon-code --mode source`.
69
-
70
- **Windows** : `orkeon-code.ps1` n'a ni mode source ni `--demo` (`-Mode` accepte `docker` ou `tool`) : le mode tool sur
71
- le `orkeon-<version>-win-x64.zip` de la release est celui de Windows ; la voie que ce projet pratique est WSL avec le
72
- lanceur bash ([tutoriel](docs/fr/wsl-tutorial.md)).
73
-
74
- Orkeon Code lui-même s'installe depuis une release (`install.sh`, `install.ps1`) ou depuis npm (`npm install -g
75
- orkeon-code@next`), ou tourne depuis un clone comme ci-dessous. Détails : [Premiers pas](docs/fr/getting-started.md).
59
+ compatible OpenAI, Anthropic...). Le runtime s'obtient par une release (`orkeon-repl`), par une image Docker ou
60
+ depuis un checkout d'Orkeon ; sous Windows, la voie que ce projet pratique est WSL
61
+ ([tutoriel](docs/fr/wsl-tutorial.md)). Le choix du runtime, ses versions et ses canaux, et les façons d'installer
62
+ Orkeon Code lui-même sont dans [Premiers pas](docs/fr/getting-started.md). Depuis un clone :
76
63
 
77
64
  ```bash
78
65
  git clone https://github.com/Orkeon/orkeon-code.git ~/orkeon-code
@@ -120,9 +107,9 @@ Le REPL est une façon de lancer les crews, pas la seule.
120
107
  `/mode` pour la session ; en mode `default`, le runtime vous demande avant une modification, une commande ou un
121
108
  appel réseau.
122
109
  - **Autonome** : en `bypassPermissions`, la boucle mène une tâche jusqu'au bout sans poser de question, sous un budget
123
- (200 appels d'outils, 30 minutes, 400k tokens) et la garde de l'hôte. `scripts/run-crew.sh` lance le même crew en un
110
+ (200 appels d'outils, 30 minutes, 700k tokens de contexte) et la garde du runtime. `scripts/run-crew.sh` lance le même crew en un
124
111
  coup depuis un shell, une ligne de cron ou un job de CI, et imprime son résultat en JSON.
125
- - **Embarqué** : une application lance l'outil `orkeon` (nuget.org) ou l'image `orkeon-runners` sur un crew et lit le
112
+ - **Embarqué** : une application lance l'outil `orkeon` (nuget.org) ou l'image `orkeon` sur un crew et lit le
126
113
  JSON ; le démon `orkeon-host` d'Orkeon peut héberger les crews derrière un canal de chat ou un point d'accès A2A.
127
114
  L'intégration .NET en processus attend que la couche de scripting soit publiée en paquet.
128
115
 
@@ -148,11 +135,18 @@ La documentation est publiée en français et en anglais, en site consultable, a
148
135
  | [Premiers pas](docs/fr/getting-started.md) | Modes docker, tool et source, première session |
149
136
  | [Tutoriel WSL](docs/fr/wsl-tutorial.md) | La voix et un modèle local sous WSL2, sur le GPU, pas à pas |
150
137
  | [Configuration](docs/fr/configuration.md) | Fournisseurs LLM, fichier de settings, variables d'environnement |
138
+ | [Voix](docs/fr/speech.md) | Transcrire un fichier, dicter une requête, lire une réponse à voix haute |
139
+ | [Modèles de décision](docs/fr/decision-models.md) | Ce qu'Orkeon Code demande à un modèle de décision : élaguer un long tour, router un crew, suggérer des skills, avec ce qui a été mesuré |
140
+ | [Modèles de décision en local](docs/fr/decision-models-local.md) | Kev sur cette machine et Liquid, pas à pas, avec des profils de décision à essayer |
151
141
  | [Permissions](docs/fr/permissions.md) | Modes, règles, ce que l'agent peut toucher |
142
+ | [Référence des permissions](docs/fr/permissions-reference.md) | L'ordre des contrôles, ce que lit une règle, chaque règle des jeux des étapes dev |
152
143
  | [Hooks](docs/fr/hooks.md) | Vos commandes autour des appels d'outils du modèle dans les étapes dev |
153
144
  | [Mémoire partagée](docs/fr/shared-memory.md) | Décisions, structures, méthodes et erreurs admises que les agents rappellent |
154
145
  | [Commandes](docs/fr/commands.md) | La liste complète (générée) |
155
- | [Architecture](docs/fr/architecture.md) | Couches, ports, crews, la boucle, l'assemblage du prompt, recettes |
146
+ | [Architecture](docs/fr/architecture.md) | Couches, ports, points d'entrée, le VFS, les crews |
147
+ | [Le déroulement d'un tour](docs/fr/turn.md) | La boucle, l'assemblage du prompt, le routage, la suggestion de skills, la compaction |
148
+ | [Les prompts des crews](docs/fr/crew-prompts.md) | Le comportement d'après lequel le prompt de chaque crew est écrit |
149
+ | [Recettes](docs/fr/recipes.md) | Ajouter une commande, un crew, un outil, un mode, un bloc de prompt, une clé de configuration, un port |
156
150
  | [Exécutions autonomes et embarquées](docs/fr/headless.md) | Tours sans opérateur, lancement en un coup, planificateurs et CI, votre application |
157
151
  | [Étendre](docs/fr/extending.md) | Commandes, crews, outils, prompts, modes, vos propres dossiers, les limites |
158
152
  | [Développement](docs/fr/development.md) | Tests, vérifications, typings, montée de version d'Orkeon, release |
package/README.md CHANGED
@@ -32,7 +32,7 @@ trimmed by the mode. Every command, crew and prompt is a source file: change it,
32
32
  catalogue once `tools.extra` names them ([Configuration](docs/configuration.md#extra-tools-mcp-servers-and-plugins)).
33
33
  - **Speech-to-text**: a Whisper MCP server ships in `mcp/whisper/`; `ORKEON_CODE_AUDIO_DIR` turns it on, and the
34
34
  assistant transcribes voice notes, meetings and screen recordings on your machine; `/voice` dictates a request
35
- and `/say` reads aloud ([Configuration](docs/configuration.md#speech-to-text)).
35
+ and `/say` reads aloud ([Configuration](docs/speech.md#speech-to-text)).
36
36
  - **Crews for the recurring jobs**: `/init` (describe the project for the agent), `/commit` (a conventional commit
37
37
  from the diff), `/review` (multi-lens code review; `--lens security` for the security lens alone), `/analyze` (deterministic
38
38
  codebase analysis), `/compact` and `/summary` (context management), `/init-verifiers`, `/advisor`.
@@ -47,28 +47,15 @@ trimmed by the mode. Every command, crew and prompt is a source file: change it,
47
47
  - **Context management**: automatic compaction with a circuit breaker, a `/compact` that summarises the whole session
48
48
  (the snip is `/compact --snip`, or the fallback of a failed summary), file restore after compaction, context
49
49
  pressure tiers, typed memory held by the Orkeon process (`/memory`).
50
- - **48 slash commands** in all: [docs/commands.md](docs/commands.md).
50
+ - **50 slash commands** in all: [docs/commands.md](docs/commands.md).
51
51
 
52
52
  ## Quick start
53
53
 
54
54
  You need the Orkeon runtime and an API key for an LLM provider Orkeon supports (any OpenAI-compatible endpoint,
55
- Anthropic...). Orkeon Code is checked against Orkeon's sources at the commit of `.orkeon-version`; the releases run
56
- it too, behind that pin. Any of these runs Orkeon Code:
57
-
58
- - **`orkeon-repl`** of the last release, `1.0.0-rc.6`, from the `orkeon` Debian/Ubuntu package (amd64 and arm64; a release candidate is published on the
59
- apt `rc` channel, the default `stable` channel carries finals only) or from the
60
- [Orkeon release archive](https://github.com/Orkeon/orkeon/releases) of your platform (Linux x64 and arm64, macOS x64
61
- and arm64, Windows x64 `.zip`), self-contained: no .NET to install;
62
- - **Docker**: the last `orkeon-runners` image published (amd64 and arm64; `1.0.0-rc.5`, the `1.0.0-rc.6` image is not
63
- published), nothing else to install;
64
- - **an Orkeon checkout** at the pin, the reference runtime: `ORKEON_SOURCE=<checkout> ./orkeon-code --mode source`.
65
-
66
- **Windows**: `orkeon-code.ps1` has no source mode and no `--demo` (`-Mode` takes `docker` or `tool`): the tool mode on
67
- the release's `orkeon-<version>-win-x64.zip` is the one for Windows; the path this project exercises is WSL with the
68
- bash launcher ([tutorial](docs/wsl-tutorial.md)).
69
-
70
- Orkeon Code itself installs from a release (`install.sh`, `install.ps1`) or from npm (`npm install -g
71
- orkeon-code@next`), or runs from a clone as below. Details: [Getting started](docs/getting-started.md).
55
+ Anthropic...). The runtime comes as a release (`orkeon-repl`), as a Docker image or from an Orkeon checkout; on
56
+ Windows, the path this project exercises is WSL ([tutorial](docs/wsl-tutorial.md)). Which runtime to pick, its
57
+ versions and channels, and the ways to install Orkeon Code itself are in
58
+ [Getting started](docs/getting-started.md). From a clone:
72
59
 
73
60
  ```bash
74
61
  git clone https://github.com/Orkeon/orkeon-code.git ~/orkeon-code
@@ -114,9 +101,9 @@ The REPL is one way to run the crews, not the only one.
114
101
  - **Interactive**: `./orkeon-code` on your project. `plan:` to ask, `acceptEdits:` to let it edit, `/mode` for the
115
102
  session; in `default` mode the runtime asks you before an edit, a command or a network call.
116
103
  - **Autonomous**: in `bypassPermissions` the loop runs a task to the end without a question, under a budget (200 tool
117
- calls, 30 minutes, 400k tokens) and the host gate. `scripts/run-crew.sh` runs the same crew in one shot from a shell, a
104
+ calls, 30 minutes, 700k context tokens) and the host gate. `scripts/run-crew.sh` runs the same crew in one shot from a shell, a
118
105
  cron line or a CI job, and prints its result as JSON.
119
- - **Embedded**: an application starts the `orkeon` tool (nuget.org) or the `orkeon-runners` image on a crew and reads
106
+ - **Embedded**: an application starts the `orkeon` tool (nuget.org) or the `orkeon` image on a crew and reads
120
107
  the JSON; Orkeon's `orkeon-host` daemon can host the crews behind a chat channel or an A2A endpoint. In-process
121
108
  .NET embedding waits for the scripting layer to ship as a package.
122
109
 
@@ -142,11 +129,18 @@ are written in English only.
142
129
  | [Getting started](docs/getting-started.md) | Docker, tool and source modes, first session |
143
130
  | [WSL tutorial](docs/wsl-tutorial.md) | Speech and a local model on WSL2, on the GPU, step by step |
144
131
  | [Configuration](docs/configuration.md) | LLM providers, settings file, environment variables |
132
+ | [Speech](docs/speech.md) | Transcribing a file, dictating a request, reading an answer aloud |
133
+ | [Decision models](docs/decision-models.md) | What Orkeon Code asks a decision model: pruning a long turn, routing a crew, suggesting skills, with what was measured |
134
+ | [Decision models locally](docs/decision-models-local.md) | Kev on this machine and Liquid, step by step, with decision profiles to try |
145
135
  | [Permissions](docs/permissions.md) | Modes, rules, what the agent can touch |
136
+ | [Permissions reference](docs/permissions-reference.md) | The order of the checks, what a rule reads, every rule of the dev steps' rule sets |
146
137
  | [Hooks](docs/hooks.md) | Your commands around the model's tool calls in the dev steps |
147
138
  | [Shared memory](docs/shared-memory.md) | Admitted decisions, structures, methods and mistakes the agents recall |
148
139
  | [Slash commands](docs/commands.md) | The full list (generated) |
149
- | [Architecture](docs/architecture.md) | Layers, ports, crews, the loop, prompt assembly, recipes |
140
+ | [Architecture](docs/architecture.md) | Layers, ports, entry points, the VFS, crews |
141
+ | [How a turn runs](docs/turn.md) | The loop, prompt assembly, routing, skill suggestion, compaction |
142
+ | [Crew prompts](docs/crew-prompts.md) | The behaviour each crew's prompt is written from |
143
+ | [Recipes](docs/recipes.md) | Add a command, a crew, a tool, a mode, a prompt block, a config key, a port |
150
144
  | [Autonomous and embedded runs](docs/headless.md) | Unattended turns, one-shot runs, schedulers and CI, your application |
151
145
  | [Extending](docs/extending.md) | Commands, crews, tools, prompts, modes, your own directories, the limits |
152
146
  | [Development](docs/development.md) | Tests, checks, typings, upgrading Orkeon, releasing |
@@ -20,7 +20,10 @@
20
20
  "Temperature": 0.2,
21
21
  "MaxTokens": 24576,
22
22
  "TimeoutSeconds": 600,
23
- "MaxRateLimitWait": "00:05:00"
23
+ "MaxRateLimitWait": "00:05:00",
24
+ "Fallback": [
25
+ "large"
26
+ ]
24
27
  },
25
28
  "large": {
26
29
  "Model": "deepseek-v4-pro",
@@ -20,7 +20,10 @@
20
20
  "Temperature": 0.2,
21
21
  "MaxTokens": 24576,
22
22
  "TimeoutSeconds": 600,
23
- "MaxRateLimitWait": "00:05:00"
23
+ "MaxRateLimitWait": "00:05:00",
24
+ "Fallback": [
25
+ "large"
26
+ ]
24
27
  },
25
28
  "large": {
26
29
  "Model": "deepseek-v4-pro",
@@ -20,7 +20,10 @@
20
20
  "Temperature": 0.2,
21
21
  "MaxTokens": 24576,
22
22
  "TimeoutSeconds": 600,
23
- "MaxRateLimitWait": "00:05:00"
23
+ "MaxRateLimitWait": "00:05:00",
24
+ "Fallback": [
25
+ "large"
26
+ ]
24
27
  },
25
28
  "large": {
26
29
  "Model": "deepseek-v4-pro",
@@ -75,6 +75,7 @@
75
75
  "whisper": {
76
76
  "Transport": "Stdio",
77
77
  "TrustAnnotations": true,
78
+ "CallTimeout": "00:15:00",
78
79
  "Command": "/home/me/.local/bin/uv",
79
80
  "Args": ["run", "--project", "/home/me/orkeon-code/mcp/whisper", "--extra", "voice", "--extra", "tts", "--extra", "cuda", "/home/me/orkeon-code/mcp/whisper/whisper_mcp.py"],
80
81
  "Env": {
@@ -13,6 +13,7 @@
13
13
  "whisper": {
14
14
  "Transport": "Stdio",
15
15
  "TrustAnnotations": true,
16
+ "CallTimeout": "00:15:00",
16
17
  "Command": "/home/me/.local/bin/uv",
17
18
  "Args": [
18
19
  "run",
@@ -182,7 +182,8 @@ Linux, the container reaches the host on the bridge address (`172.17.0.1` by def
182
182
  Never listen on `0.0.0.0`: Orkeon's HTTP transport sends no credentials, so the server has none to check, and every
183
183
  machine of the network could list and transcribe the audio folder.
184
184
 
185
- Two limits of Orkeon's HTTP transport: a call that lasts more than 100 s fails on the REPL's side (its HTTP client's
185
+ Every transport bounds a call with `MCP:Servers:whisper:CallTimeout` (60 s by default; the launchers and the example
186
+ settings set 15 minutes). Two limits of Orkeon's HTTP transport: a call that lasts more than 100 s fails on the REPL's side (its HTTP client's
186
187
  default timeout), although the server finishes and writes the transcript, so files whose transcription takes longer
187
188
  are for the stdio modes: about 10 minutes of audio on a CPU with `small`, about 35 minutes on a laptop GPU (45 minutes
188
189
  took 92 s with the server in one container, 117 s in another); and the transport sends no
package/orkeon-code CHANGED
@@ -38,8 +38,11 @@
38
38
  # Modes (auto-detected in this order, or forced with --mode / ORKEON_CODE_MODE):
39
39
  # tool orkeon-repl on PATH (from the orkeon Debian package, an Orkeon release archive, or the
40
40
  # dotnet tool), or ORKEON_REPL="<command line>" (e.g. "dotnet /opt/orkeon/Orkeon.ConsoleApp.dll")
41
- # docker ghcr.io/orkeon/orkeon-runners:latest (the last release, not the pin), nothing else to install
41
+ # docker ghcr.io/orkeon/orkeon:latest (the last release, not the pin), nothing else to install
42
42
  # source an Orkeon checkout named by ORKEON_SOURCE, built there with `dotnet build`, run from the project
43
+ # With none of them, an install downloads the runtime of its pin once, after asking, into ~/.orkeon-code/runtime
44
+ # (tool mode from then on): `orkeon-code runtime install` does it without starting, ORKEON_CODE_RUNTIME_DOWNLOAD=1
45
+ # answers yes where there is no terminal, `orkeon-code runtime remove` deletes it.
43
46
  #
44
47
  # Settings: --settings, else ORKEON_CODE_SETTINGS, else config/appsettings.local.json (a clone),
45
48
  # else ~/.orkeon-code/appsettings.json, else ${XDG_CONFIG_HOME:-~/.config}/orkeon-code/appsettings.json
@@ -74,7 +77,7 @@ ROOT="$(cd "$(dirname "$SELF")" && pwd -P)"
74
77
  ORKEON_REF="$(tr -d '[:space:]' < "$ROOT/.orkeon-version")"
75
78
  ORKEON_PIN="${ORKEON_REF:0:7}"
76
79
  CODE_VERSION="$(sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$ROOT/package.json" | head -n 1)"
77
- IMAGE="${ORKEON_CODE_IMAGE:-ghcr.io/orkeon/orkeon-runners:latest}"
80
+ IMAGE="${ORKEON_CODE_IMAGE:-ghcr.io/orkeon/orkeon:latest}"
78
81
  # A clone (a .git, folder or worktree file, or the tests of an unpacked source archive) or an
79
82
  # install, whose folder is never written to.
80
83
  if [ -e "$ROOT/.git" ] || [ -d "$ROOT/tests" ]; then KIND=clone; else KIND=install; fi
@@ -83,6 +86,63 @@ CODE_HOME="${ORKEON_CODE_HOME:-$HOME/.orkeon-code}"
83
86
  die() { echo "orkeon-code: $*" >&2; exit 1; }
84
87
  warn() { echo "orkeon-code: warning: $*" >&2; }
85
88
 
89
+ # ── The runtime downloaded at the first start (ADR 0028) ───────────────────
90
+ # .orkeon-runtime names the archives published for this package: an id, their folder, a SHA-256 per platform. An
91
+ # empty id (a checkout) means there is none. The archive is extracted where it is kept and runs from there.
92
+ RUNTIME_HOME="$CODE_HOME/runtime"
93
+ runtime_field() { # <key>
94
+ [ -f "$ROOT/.orkeon-runtime" ] || return 0
95
+ sed -n "s/^$1=//p" "$ROOT/.orkeon-runtime" 2>/dev/null | head -n 1 | tr -d '[:space:]'
96
+ }
97
+ RUNTIME_ID="$(runtime_field id)"
98
+ RUNTIME_REPL="$RUNTIME_HOME/${RUNTIME_ID:-none}/bin/orkeon-repl"
99
+ runtime_downloaded() { [ -n "$RUNTIME_ID" ] && [ -x "$RUNTIME_REPL" ]; }
100
+
101
+ # The platform as the archives name it; 1 when no archive is built for it.
102
+ runtime_platform() {
103
+ local os arch
104
+ case "$(uname -s)" in Linux) os=linux ;; Darwin) os=osx ;; *) return 1 ;; esac
105
+ case "$(uname -m)" in x86_64|amd64) arch=x64 ;; aarch64|arm64) arch=arm64 ;; *) return 1 ;; esac
106
+ echo "$os-$arch"
107
+ }
108
+
109
+ sha256() { if command -v sha256sum >/dev/null 2>&1; then sha256sum "$1"; else shasum -a 256 "$1"; fi | cut -d ' ' -f 1; }
110
+
111
+ # Downloads the runtime of .orkeon-runtime into $RUNTIME_HOME/<id>, checked against the sum the package carries,
112
+ # and removes the runtimes of earlier packages. Nothing is asked: the callers do.
113
+ download_runtime() {
114
+ local platform sum name work found other
115
+ [ -n "$RUNTIME_ID" ] || die "this checkout names no runtime to download (.orkeon-runtime): use Docker, orkeon-repl or ORKEON_SOURCE (see docs/getting-started.md)."
116
+ platform="$(runtime_platform)" && sum="$(runtime_field "$platform")" && [ -n "$sum" ] \
117
+ || die "no Orkeon runtime is published for this platform ($(uname -s) $(uname -m)): install Docker, or the orkeon-repl tool (see docs/getting-started.md)."
118
+ name="orkeon-runtime-$RUNTIME_ID-$platform.tar.gz"
119
+ work="$RUNTIME_HOME/.$RUNTIME_ID.new"
120
+ rm -rf "$work"
121
+ mkdir -p "$work"
122
+ echo "orkeon-code: downloading $(runtime_field url)/$name" >&2
123
+ if command -v curl >/dev/null 2>&1; then curl -fSL "$([ -t 2 ] && echo --progress-bar || echo -s)" -o "$work/$name" "$(runtime_field url)/$name"
124
+ elif command -v wget >/dev/null 2>&1; then wget -q -O "$work/$name" "$(runtime_field url)/$name"
125
+ else rm -rf "$work"; die "neither curl nor wget found: the runtime cannot be downloaded."
126
+ fi || { rm -rf "$work"; die "the download of $name failed: nothing installed."; }
127
+ if [ "$(sha256 "$work/$name")" != "$sum" ]; then
128
+ rm -rf "$work"
129
+ die "checksum mismatch for $name (.orkeon-runtime says $sum): the download was deleted, nothing installed."
130
+ fi
131
+ mkdir "$work/tree"
132
+ tar -xzf "$work/$name" -C "$work/tree" || { rm -rf "$work"; die "$name cannot be extracted: nothing installed."; }
133
+ # The archive holds bin/orkeon-repl, at its root or in one folder.
134
+ found="$(find "$work/tree" -maxdepth 3 -path '*/bin/orkeon-repl' -type f | head -n 1)"
135
+ [ -n "$found" ] || { rm -rf "$work"; die "$name holds no bin/orkeon-repl: nothing installed."; }
136
+ chmod 0755 "$found"
137
+ rm -rf "$RUNTIME_HOME/${RUNTIME_ID:?}"
138
+ mv "$(dirname "$(dirname "$found")")" "$RUNTIME_HOME/$RUNTIME_ID"
139
+ rm -rf "$work"
140
+ for other in "$RUNTIME_HOME"/*; do
141
+ if [ -d "$other" ] && [ "$other" != "$RUNTIME_HOME/$RUNTIME_ID" ]; then rm -rf "$other"; fi
142
+ done
143
+ echo "orkeon-code: Orkeon $RUNTIME_ID installed in $RUNTIME_HOME/$RUNTIME_ID (orkeon-code runtime remove deletes it)." >&2
144
+ }
145
+
86
146
  # Moves the Orkeon checkout of ORKEON_SOURCE from <head> to the pin, when nothing of the user's is in the way: no
87
147
  # change to a tracked file, on main or detached, <head> an ancestor of the pin (fetched from origin's main when
88
148
  # missing). Fails, moving nothing, otherwise or with ORKEON_SOURCE_FOLLOW_PIN=0.
@@ -128,8 +188,10 @@ runtime_found() { # <forced mode or empty>
128
188
  elif v="$(dpkg-query -W -f='${Version}' orkeon 2>/dev/null)" && [ -n "$v" ]; then echo "$v ($repl, the orkeon package)"
129
189
  else echo "unknown ($repl_bin)"
130
190
  fi
191
+ elif runtime_downloaded; then echo "$RUNTIME_ID (downloaded, $RUNTIME_HOME/$RUNTIME_ID)"
131
192
  elif command -v docker >/dev/null 2>&1; then echo "image $IMAGE (docker mode, not pulled)"
132
193
  elif [ -n "${ORKEON_SOURCE:-}" ]; then source_found
194
+ elif [ -n "$RUNTIME_ID" ]; then echo "none yet ($RUNTIME_ID is downloaded at the first start)"
133
195
  else echo "none (see docs/getting-started.md)"
134
196
  fi
135
197
  }
@@ -241,8 +303,16 @@ project_slug() ( # <path>
241
303
  printf '%s-%s\n' "$(printf '%s' "$out" | tr 'A-Z' 'a-z')" "${hash:0:12}"
242
304
  )
243
305
 
244
- # <string> as a JSON string, the trust store's escaping (\ and ").
245
- json_string() { local s="${1//\\/\\\\}"; printf '"%s"' "${s//\"/\\\"}"; }
306
+ # <text> as a JSON string: \, " and every control character escaped. awk, not bash's ${s//}, whose backslashes in the
307
+ # replacement differ from bash 3.2 to 5.2; bytes, not characters (LC_ALL=C), so UTF-8 passes as it is. No node, no jq.
308
+ json_str() {
309
+ LC_ALL=C awk 'BEGIN {
310
+ s = ARGV[1]; for (i = 1; i < 32; i++) e[sprintf("%c", i)] = sprintf("\\u%04x", i)
311
+ e["\\"] = "\\\\"; e["\""] = "\\\""; e["\n"] = "\\n"; e["\t"] = "\\t"; e["\r"] = "\\r"
312
+ o = "\""; for (i = 1; i <= length(s); i++) { c = substr(s, i, 1); o = o ((c in e) ? e[c] : c) }
313
+ printf "%s\"", o
314
+ }' "$1"
315
+ }
246
316
 
247
317
  # A string field of a session file as stored (its escapes unread), or nothing.
248
318
  session_field() { # <file> <field>
@@ -393,6 +463,41 @@ fi
393
463
  case "${XDG_CONFIG_HOME:-}" in /*) CONFIG_BASE="$XDG_CONFIG_HOME" ;; *) CONFIG_BASE="$HOME/.config" ;; esac
394
464
  HOME_SETTINGS="$CODE_HOME/appsettings.json"
395
465
  LEGACY_SETTINGS="$CONFIG_BASE/orkeon-code/appsettings.json"
466
+ # Has the runtime downloaded, once: asked on the terminal, taken as agreed with ORKEON_CODE_RUNTIME_DOWNLOAD=1,
467
+ # refused without a terminal (3) and on a no (DECLINED), like the folder trust.
468
+ ensure_runtime() {
469
+ local answer
470
+ runtime_downloaded && return 0
471
+ if [ "${ORKEON_CODE_RUNTIME_DOWNLOAD:-}" != 1 ]; then
472
+ if [ ! -t 0 ]; then
473
+ echo "orkeon-code: no Orkeon runtime found, and there is no terminal to ask in before downloading one. Run" \
474
+ "'orkeon-code runtime install' once, or set ORKEON_CODE_RUNTIME_DOWNLOAD=1." >&2
475
+ exit 3
476
+ fi
477
+ {
478
+ echo "orkeon-code: no Orkeon runtime found on this machine."
479
+ echo " Orkeon $RUNTIME_ID can be downloaded once (about 120 MB) into $RUNTIME_HOME."
480
+ printf '[y] download [n] quit: '
481
+ } >&2
482
+ read -r answer || answer=""
483
+ case "$(lowered "$answer")" in
484
+ y|yes) ;;
485
+ *) echo "orkeon-code: nothing downloaded, nothing started." >&2; exit "$DECLINED" ;;
486
+ esac
487
+ fi
488
+ download_runtime
489
+ }
490
+ if [ "${1:-}" = runtime ]; then
491
+ case "${2:-}" in
492
+ install)
493
+ if runtime_downloaded; then echo "orkeon-code: Orkeon $RUNTIME_ID is already in $RUNTIME_HOME/$RUNTIME_ID."; exit 0; fi
494
+ download_runtime; exit 0 ;;
495
+ remove)
496
+ rm -rf "$RUNTIME_HOME"; echo "orkeon-code: no downloaded runtime left in $RUNTIME_HOME."; exit 0 ;;
497
+ *) die "usage: orkeon-code runtime install | remove" ;;
498
+ esac
499
+ fi
500
+
396
501
  # What `orkeon init` writes and the REPL reads when no --settings is given (RunnerSettings.GetGlobalSettingsPath).
397
502
  RUNTIME_SETTINGS="$CONFIG_BASE/Orkeon/appsettings.json"
398
503
 
@@ -565,12 +670,20 @@ export Orkeon__Security__PermissionGate__Enabled="${Orkeon__Security__Permission
565
670
 
566
671
  # ── Mode ───────────────────────────────────────────────────────────────────
567
672
  if [ -z "$MODE" ]; then
568
- if [ -n "${ORKEON_REPL:-}" ] || command -v orkeon-repl >/dev/null 2>&1; then MODE=tool
673
+ if [ -n "${ORKEON_REPL:-}" ] || command -v orkeon-repl >/dev/null 2>&1 || runtime_downloaded; then MODE=tool
569
674
  elif command -v docker >/dev/null 2>&1; then MODE=docker
570
675
  elif [ -n "${ORKEON_SOURCE:-}" ]; then MODE=source
676
+ elif [ -n "$RUNTIME_ID" ]; then MODE=tool
571
677
  else die "no Orkeon runtime found: install Docker, or the orkeon-repl tool, or set ORKEON_SOURCE (see docs/getting-started.md)."
572
678
  fi
573
679
  fi
680
+ # The tool mode with no orkeon-repl of the user's runs the downloaded runtime, fetched now when it is missing: before
681
+ # any state is made, so a refusal leaves nothing behind.
682
+ OWN_RUNTIME=0
683
+ if [ "$MODE" = tool ] && [ -z "${ORKEON_REPL:-}" ] && ! command -v orkeon-repl >/dev/null 2>&1 && [ -n "$RUNTIME_ID" ]; then
684
+ ensure_runtime
685
+ OWN_RUNTIME=1
686
+ fi
574
687
 
575
688
  # ── State and sessions ─────────────────────────────────────────────────────
576
689
  # An install keeps one folder per project, ~/.orkeon-code/projects/<slug>; a clone's .crew-output and an
@@ -596,7 +709,7 @@ if [ "$MODE" = docker ]; then RUNTIME_SLUG="$(project_slug /work/project)"; else
596
709
  now="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
597
710
  first_seen="$(session_field "$PROJECT_STATE/project.json" firstSeen)"
598
711
  {
599
- printf '{\n "path": %s,\n "slug": "%s",\n "runtimeSlug": "%s",\n' "$(json_string "$WORKSPACE")" "$SLUG" "$RUNTIME_SLUG"
712
+ printf '{\n "path": %s,\n "slug": "%s",\n "runtimeSlug": "%s",\n' "$(json_str "$WORKSPACE")" "$SLUG" "$RUNTIME_SLUG"
600
713
  printf ' "firstSeen": "%s",\n "lastSeen": "%s"\n}\n' "${first_seen:-$now}" "$now"
601
714
  } > "$PROJECT_STATE/project.json.tmp.$$" && mv -f "$PROJECT_STATE/project.json.tmp.$$" "$PROJECT_STATE/project.json" \
602
715
  || die "could not write $PROJECT_STATE/project.json."
@@ -690,6 +803,9 @@ export Orkeon__Cli__Session__StartScript="${Orkeon__Cli__Session__StartScript-/t
690
803
  export Orkeon__Cli__Session__Persist="${Orkeon__Cli__Session__Persist:-true}"
691
804
  export ORKEON_Orkeon__Cli__Session__SessionsDirectory=/sessions
692
805
  export ORKEON_Orkeon__Cli__Memory__RootDirectory=/memory
806
+ # The embedding model's fingerprint goes beside the RAG's manifests, in /output, not in the project: the runtime's
807
+ # default, /workspace/.orkeon/, leaves a file in the project that /commit sweeps in. A settings file may name another.
808
+ export Orkeon__Embeddings__FingerprintPath="${Orkeon__Embeddings__FingerprintPath:-/output/rag/embedding-fingerprint.json}"
693
809
 
694
810
  # ── Speech-to-text (optional) ──────────────────────────────────────────────
695
811
  # ORKEON_CODE_AUDIO_DIR names the folder of audio and video files. The Whisper
@@ -706,7 +822,9 @@ if [ -n "${ORKEON_CODE_AUDIO_DIR:-}" ]; then
706
822
  warn "ORKEON_CODE_AUDIO_DIR is ignored in docker mode: the Whisper server runs in tool and source modes (mcp/whisper/README.md)."
707
823
  elif grep -qi '"whisper"[[:space:]]*:' "$SETTINGS"; then
708
824
  warn "$SETTINGS declares a \"whisper\" MCP server: ORKEON_CODE_AUDIO_DIR is ignored, the settings file wins."
709
- elif env | grep -q '^ORKEON_MCP__Servers__whisper__'; then
825
+ # compgen, not `env | grep -q`: grep leaves at the first match, env then dies on the closed pipe, and under pipefail
826
+ # the test is false although the variable is there.
827
+ elif compgen -e ORKEON_MCP__Servers__whisper__ >/dev/null; then
710
828
  warn "the environment declares a \"whisper\" MCP server (ORKEON_MCP__Servers__whisper__*): ORKEON_CODE_AUDIO_DIR is ignored, that declaration wins."
711
829
  elif ! UV="$(command -v uv)"; then
712
830
  warn "ORKEON_CODE_AUDIO_DIR is set but uv is not on PATH: speech-to-text is off (mcp/whisper/README.md, 'Install')."
@@ -720,6 +838,9 @@ if [ -n "${ORKEON_CODE_AUDIO_DIR:-}" ]; then
720
838
  # The gate reads a server's annotations (readOnlyHint on transcribe_audio, list_audio and whisper_info)
721
839
  # only when the server is trusted (Orkeon #223); untrusted, every tool of the server would be a write.
722
840
  export ORKEON_MCP__Servers__whisper__TrustAnnotations=true
841
+ # The runtime ends a server call after MCP:Servers:<id>:CallTimeout, 60 s by default (Orkeon #299):
842
+ # a dictation records up to /voice --max (600 s) then transcribes, and a long file on a CPU takes minutes.
843
+ export ORKEON_MCP__Servers__whisper__CallTimeout=00:15:00
723
844
  # ORKEON_CODE_VOICE=1 opens the microphone to /voice and the speaker to /say and
724
845
  # voice.reply: the server gets the `voice` extra (sounddevice), WHISPER_MICROPHONE=1
725
846
  # and WHISPER_SPEAKER=1; without it, it refuses to record and only writes what it
@@ -783,6 +904,74 @@ repl_args() { # <commands> <crews> <settings> <workspace> <output> <tmp> <user-c
783
904
  --mount "$8/$SESSIONS_SUB:/sessions:rw" --mount "$8/history:/session-history:ro" --mount "$8/memory:/memory:rw")
784
905
  }
785
906
 
907
+ # The physical folders of the tool and source modes' mounts, in repl_args order from <workspace>.
908
+ HOST_MOUNTS=("$WORKSPACE" "$STATE/output" "$STATE/tmp" "$USER_CONFIG_DIR" "$PROJECT_STATE")
909
+
910
+ # launch.json, beside config.json on /user-config: the host the REPL runs on (posix, wsl or windows) and the physical
911
+ # base of each mount, the very string given to --mount, with its Windows spelling under WSL (wslpath -w; null without
912
+ # wslpath). Docker mode hides the host on purpose: posix, no mount. Rewritten at every start. What it reads beyond the
913
+ # rest of the launcher: WSL_DISTRO_NAME, and ORKEON_CODE_PROC_VERSION (the tests' /proc/version), nothing else (V-04).
914
+ host_flavour() {
915
+ if [ "$MODE" = docker ]; then echo posix
916
+ elif [ -n "${WSL_DISTRO_NAME:-}" ] || grep -qi microsoft "${ORKEON_CODE_PROC_VERSION:-/proc/version}" 2>/dev/null; then echo wsl
917
+ else echo posix; fi
918
+ }
919
+ # The distribution: WSL_DISTRO_NAME, else the share of `wslpath -w /` (\\wsl.localhost\<distro>\ or \\wsl$\<distro>\).
920
+ wsl_distro() {
921
+ local root rest
922
+ if [ -n "${WSL_DISTRO_NAME:-}" ]; then printf '%s' "$WSL_DISTRO_NAME"; return; fi
923
+ root="$(wslpath -w / 2>/dev/null)" || return 0
924
+ case "$root" in '\\wsl.localhost\'*) rest="${root:16}" ;; '\\wsl$\'*) rest="${root:7}" ;; *) return 0 ;; esac
925
+ printf '%s' "${rest%%\\*}"
926
+ }
927
+ # Where the Windows drives are mounted: `wslpath -u 'C:\'` less its /c, else [automount] root= of /etc/wsl.conf, else /mnt.
928
+ wsl_automount_root() {
929
+ local c root
930
+ if c="$(wslpath -u 'C:\' 2>/dev/null)" && [ -n "$c" ]; then
931
+ c="${c%/}"; c="${c%/c}"; printf '%s' "${c:-/}"; return
932
+ fi
933
+ root="$(awk -F= '/^[[:space:]]*\[/ { s = tolower($0) ~ /^[[:space:]]*\[automount\]/ }
934
+ s && $1 ~ /^[[:space:]]*root[[:space:]]*$/ { v = $2; sub(/^[[:space:]]*"?/, "", v); sub(/"?[[:space:]]*$/, "", v); print v; exit }' \
935
+ /etc/wsl.conf 2>/dev/null)"
936
+ if [ -n "$root" ]; then root="${root%/}"; printf '%s' "${root:-/}"; else printf '/mnt'; fi
937
+ }
938
+ write_launch_file() {
939
+ local flavour file="$USER_CONFIG_DIR/launch.json" mounts=() m prev="" rest base root w sep="" has_wslpath=0 distro
940
+ flavour="$(host_flavour)"
941
+ if [ "$MODE" != docker ]; then
942
+ repl_args "" "" "" "${HOST_MOUNTS[@]}"
943
+ for m in "${ARGS[@]}" ${AUDIO_ARGS[@]+"${AUDIO_ARGS[@]}"}; do
944
+ if [ "$prev" = --mount ]; then mounts+=("$m"); fi
945
+ prev="$m"
946
+ done
947
+ fi
948
+ if [ "$flavour" = wsl ]; then
949
+ if command -v wslpath >/dev/null 2>&1; then has_wslpath=1
950
+ else warn "wslpath is not on PATH: $file gives no Windows spelling of the mounts."; fi
951
+ fi
952
+ {
953
+ printf '{\n "version": 1,\n "flavour": %s,\n "mode": %s,\n' "$(json_str "$flavour")" "$(json_str "$MODE")"
954
+ if [ "$flavour" = wsl ]; then
955
+ distro="$(wsl_distro)"
956
+ printf ' "wsl": { "distro": %s, "automountRoot": %s },\n' \
957
+ "$(if [ -n "$distro" ]; then json_str "$distro"; else echo null; fi)" "$(json_str "$(wsl_automount_root)")"
958
+ fi
959
+ printf ' "mounts": {'
960
+ for m in ${mounts[@]+"${mounts[@]}"}; do
961
+ rest="${m%:*}"; root="${rest##*:}"; base="${rest%:*}"
962
+ printf '%s\n %s: { "posix": %s' "$sep" "$(json_str "$root")" "$(json_str "$base")"
963
+ if [ "$flavour" = wsl ]; then
964
+ if [ "$has_wslpath" = 1 ] && w="$(wslpath -w "$base" 2>/dev/null)" && [ -n "$w" ]; then
965
+ printf ', "windows": %s' "$(json_str "$w")"
966
+ else printf ', "windows": null'; fi
967
+ fi
968
+ printf ' }'; sep=,
969
+ done
970
+ if [ -n "$sep" ]; then printf '\n }\n}\n'; else printf '}\n}\n'; fi
971
+ } > "$file.tmp.$$" && mv -f "$file.tmp.$$" "$file" || warn "could not write $file."
972
+ }
973
+ write_launch_file
974
+
786
975
  # The exchange log (--llm-log) would land in ./llm-logs, the project: a bare --llm-log among the REPL's
787
976
  # arguments is sent to <project state>/llm-logs instead; an explicit --llm-log-path is passed as given (a bare
788
977
  # --llm-log beside it is then dropped, since the runtime keeps the last path it reads).
@@ -800,14 +989,18 @@ llm_log_args() { # <project state as the REPL sees it>
800
989
  case "$MODE" in
801
990
  docker)
802
991
  command -v docker >/dev/null 2>&1 || die "docker not found."
992
+ # `docker run` alone would answer with the pipe or the socket it could not open, and nothing about what to do.
993
+ docker version --format '{{.Server.Version}}' >/dev/null 2>&1 \
994
+ || die "the Docker engine does not answer: start Docker Desktop or the Docker service, then run orkeon-code again. Without Docker, install the orkeon-repl tool (docs/getting-started.md)."
803
995
  # Everything the REPL reads sits under its working directory /work. The
804
996
  # image is multi-arch (linux/amd64, linux/arm64): docker pulls the host's.
805
- env_args=(-e ORKEON_RUNNER=repl -e HOME=/tmp -e DOTNET_CLI_HOME=/tmp
997
+ env_args=(-e ORKEON_ENTRYPOINT=repl -e HOME=/tmp -e DOTNET_CLI_HOME=/tmp
806
998
  -e "Orkeon__Security__PermissionGate__Enabled=$Orkeon__Security__PermissionGate__Enabled"
807
999
  -e "Orkeon__Cli__Session__StartScript=$Orkeon__Cli__Session__StartScript"
808
1000
  -e "Orkeon__Cli__Session__Persist=$Orkeon__Cli__Session__Persist"
809
1001
  -e ORKEON_Orkeon__Cli__Session__SessionsDirectory=/sessions
810
- -e ORKEON_Orkeon__Cli__Memory__RootDirectory=/memory)
1002
+ -e ORKEON_Orkeon__Cli__Memory__RootDirectory=/memory
1003
+ -e "Orkeon__Embeddings__FingerprintPath=$Orkeon__Embeddings__FingerprintPath")
811
1004
  # The github tool's token (Orkeon #222): GITHUB_TOKEN, GH_TOKEN, or the variable Orkeon__Tools__GitHub__TokenVariable
812
1005
  # names, each handed over only when set, with the setting itself so the runtime reads the same variable.
813
1006
  for v in ORKEON_Llm__ApiKey ORKEON_Llm__Model "$KEY_VAR" GITHUB_TOKEN GH_TOKEN \
@@ -832,7 +1025,9 @@ case "$MODE" in
832
1025
  ;;
833
1026
  tool|source)
834
1027
  if [ "$MODE" = tool ]; then
835
- if [ -n "${ORKEON_REPL:-}" ]; then read -r -a REPL <<< "$ORKEON_REPL"; else REPL=(orkeon-repl); fi
1028
+ if [ -n "${ORKEON_REPL:-}" ]; then read -r -a REPL <<< "$ORKEON_REPL"
1029
+ elif [ "$OWN_RUNTIME" = 1 ]; then REPL=("$RUNTIME_REPL")
1030
+ else REPL=(orkeon-repl); fi
836
1031
  command -v "${REPL[0]}" >/dev/null 2>&1 || die "${REPL[0]} not found (see docs/getting-started.md, 'Tool mode')."
837
1032
  else
838
1033
  [ -n "${ORKEON_SOURCE:-}" ] && [ -d "$ORKEON_SOURCE/src/apps/Orkeon.ConsoleApp" ] \
@@ -888,7 +1083,7 @@ case "$MODE" in
888
1083
  # /llm-logs, /cli-commands..., /crews...).
889
1084
  export ORKEON_ALLOW_EXTERNAL_MOUNTS=1
890
1085
  repl_args "$ROOT/src/commands" "$ROOT/src/crews" "$([ "$RUNTIME_OWN" = 1 ] || echo "$SETTINGS")" \
891
- "$WORKSPACE" "$STATE/output" "$STATE/tmp" "$USER_CONFIG_DIR" "$PROJECT_STATE"
1086
+ "${HOST_MOUNTS[@]}"
892
1087
  llm_log_args "$PROJECT_STATE"
893
1088
  cd "$WORKSPACE"
894
1089
  exec "${REPL[@]}" "${ARGS[@]}" ${AUDIO_ARGS[@]+"${AUDIO_ARGS[@]}"} ${EXTRA[@]+"${EXTRA[@]}"}