@humain/humain-code 0.6.2 → 0.7.0

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 (792) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/README.md +23 -6
  3. package/dist/agent-monitor/entry.lazy.d.ts +3 -0
  4. package/dist/agent-monitor/entry.lazy.d.ts.map +1 -0
  5. package/dist/agent-monitor/entry.lazy.js +3 -0
  6. package/dist/agent-monitor/entry.lazy.js.map +1 -0
  7. package/dist/bundle/agent-monitor.js +1 -1
  8. package/dist/bundle/chunks/adaptive-peer-worker-X2ZNZE3S.js +8 -0
  9. package/dist/bundle/chunks/adaptive-session-host-7KDSQV5I.js +162 -0
  10. package/dist/bundle/chunks/anthropic-messages-TQK3FUV3.js +68 -0
  11. package/dist/bundle/chunks/anthropic.js +13 -10
  12. package/dist/bundle/chunks/{azure-openai-responses-IV74M5OR.js → azure-openai-responses-JY7OSLH2.js} +6 -6
  13. package/dist/bundle/chunks/bedrock-converse-stream.js +79 -74
  14. package/dist/bundle/chunks/chunk-2FYYW6FY.js +2 -0
  15. package/dist/bundle/chunks/{chunk-A2VPLMF2.js → chunk-2G7YVAVF.js} +1 -1
  16. package/dist/bundle/chunks/chunk-32QLLD2P.js +1114 -0
  17. package/dist/bundle/chunks/{chunk-3LP543EX.js → chunk-3EDMWQ35.js} +17 -16
  18. package/dist/bundle/chunks/chunk-3HVHETMU.js +18 -0
  19. package/dist/bundle/chunks/{chunk-XMZGB3H4.js → chunk-4HTVBBJD.js} +11 -6
  20. package/dist/bundle/chunks/chunk-4JRER4XK.js +175 -0
  21. package/dist/bundle/chunks/{chunk-FHLLDO7U.js → chunk-4PRNKB6V.js} +5 -5
  22. package/dist/bundle/chunks/chunk-4QAXV5T6.js +49 -0
  23. package/dist/bundle/chunks/{chunk-JCTQQ3DX.js → chunk-4V5VL2BO.js} +1 -1
  24. package/dist/bundle/chunks/chunk-5B25YXF7.js +24 -0
  25. package/dist/bundle/chunks/chunk-5L4PBYC7.js +11 -0
  26. package/dist/bundle/chunks/chunk-66FZJO75.js +5146 -0
  27. package/dist/bundle/chunks/chunk-6P6GJPYB.js +4 -0
  28. package/dist/bundle/chunks/chunk-6PNQYO6A.js +10 -0
  29. package/dist/bundle/chunks/chunk-7NKUVTBL.js +76 -0
  30. package/dist/bundle/chunks/chunk-AEWYICBL.js +89 -0
  31. package/dist/bundle/chunks/chunk-AQ4EXORZ.js +14 -0
  32. package/dist/bundle/chunks/chunk-AZXVJN6E.js +19 -0
  33. package/dist/bundle/chunks/chunk-CRN54O4D.js +24 -0
  34. package/dist/bundle/chunks/chunk-CTU2ECLD.js +7 -0
  35. package/dist/bundle/chunks/{chunk-BQ3TMEWD.js → chunk-EIC7CQX3.js} +4 -3
  36. package/dist/bundle/chunks/chunk-F6ZAYLU2.js +59 -0
  37. package/dist/bundle/chunks/chunk-G4QPSFBF.js +493 -0
  38. package/dist/bundle/chunks/chunk-GME4AWDG.js +23 -0
  39. package/dist/bundle/chunks/{chunk-SFMDIVZ4.js → chunk-GRJUKEE3.js} +43 -30
  40. package/dist/bundle/chunks/chunk-GTILMMUF.js +12 -0
  41. package/dist/bundle/chunks/chunk-GUHNFZ2Q.js +51 -0
  42. package/dist/bundle/chunks/chunk-GY663MNP.js +11 -0
  43. package/dist/bundle/chunks/chunk-HTA325LJ.js +56 -0
  44. package/dist/bundle/chunks/{chunk-5L4JG6PO.js → chunk-I3NDOUHE.js} +8 -7
  45. package/dist/bundle/chunks/chunk-I5E7RQ5V.js +21 -0
  46. package/dist/bundle/chunks/chunk-IWZQ25I3.js +5 -0
  47. package/dist/bundle/chunks/chunk-IYGHKVUG.js +2 -0
  48. package/dist/bundle/chunks/chunk-J57HOSWD.js +21 -0
  49. package/dist/bundle/chunks/chunk-JF7FYXAI.js +288 -0
  50. package/dist/bundle/chunks/chunk-JSZBTGI6.js +10 -0
  51. package/dist/bundle/chunks/chunk-JYWUOKOI.js +1061 -0
  52. package/dist/bundle/chunks/{chunk-DLCBSLHW.js → chunk-KRCX3ZBA.js} +1 -1
  53. package/dist/bundle/chunks/chunk-KTSJYIYC.js +30 -0
  54. package/dist/bundle/chunks/{chunk-K7SDY3VJ.js → chunk-LB4CIS4F.js} +40 -165
  55. package/dist/bundle/chunks/{chunk-NN53K2QQ.js → chunk-LYZ37DJP.js} +2 -14
  56. package/dist/bundle/chunks/chunk-MD7K7RPN.js +20 -0
  57. package/dist/bundle/chunks/chunk-MX4Q4W6H.js +214 -0
  58. package/dist/bundle/chunks/{chunk-6PD3T2EF.js → chunk-N2SNMUD3.js} +1 -1
  59. package/dist/bundle/chunks/chunk-NXA6NEHE.js +54 -0
  60. package/dist/bundle/chunks/chunk-OB332KMV.js +300 -0
  61. package/dist/bundle/chunks/chunk-P6AXBESH.js +1883 -0
  62. package/dist/bundle/chunks/chunk-PPBDDQHP.js +11 -0
  63. package/dist/bundle/chunks/chunk-PWUDFU5V.js +51 -0
  64. package/dist/bundle/chunks/chunk-Q5RKNQ2T.js +73 -0
  65. package/dist/bundle/chunks/chunk-QT6ZHDMP.js +12 -0
  66. package/dist/bundle/chunks/chunk-R5OOX7RW.js +16 -0
  67. package/dist/bundle/chunks/chunk-R6YQR7TZ.js +25 -0
  68. package/dist/bundle/chunks/{chunk-4ZBGTJJM.js → chunk-RNBZBCH2.js} +1 -1
  69. package/dist/bundle/chunks/chunk-RQU722SY.js +1 -0
  70. package/dist/bundle/chunks/{chunk-RGUZULEE.js → chunk-RS6PZK35.js} +71 -72
  71. package/dist/bundle/chunks/{jiti-loader-6P33XTLC.js → chunk-RW7GT7L3.js} +1 -1
  72. package/dist/bundle/chunks/{chunk-PCTLFSQG.js → chunk-SCINMV4X.js} +1 -1
  73. package/dist/bundle/chunks/{chunk-NCC2FAJN.js → chunk-SSRCVJZK.js} +28 -28
  74. package/dist/bundle/chunks/chunk-T5A6T24H.js +93 -0
  75. package/dist/bundle/chunks/chunk-T7BXP46S.js +3367 -0
  76. package/dist/bundle/chunks/chunk-TGDPZCSW.js +9 -0
  77. package/dist/bundle/chunks/{chunk-4J6BGNX2.js → chunk-TWAHPPXN.js} +434 -429
  78. package/dist/bundle/chunks/chunk-UEW6TUSP.js +36 -0
  79. package/dist/bundle/chunks/chunk-UZNIPOGS.js +323 -0
  80. package/dist/bundle/chunks/{chunk-KM4GQ2BU.js → chunk-VFLVWPLZ.js} +5 -6
  81. package/dist/bundle/chunks/chunk-WAPZN4KP.js +74 -0
  82. package/dist/bundle/chunks/chunk-WCFHG6NO.js +16 -0
  83. package/dist/bundle/chunks/chunk-WQ7EJQIT.js +839 -0
  84. package/dist/bundle/chunks/chunk-WQOOJP7U.js +4 -0
  85. package/dist/bundle/chunks/chunk-XHDVDJM7.js +17 -0
  86. package/dist/bundle/chunks/chunk-YPZPCHNV.js +3 -0
  87. package/dist/bundle/chunks/chunk-Z5YLKK3S.js +41 -0
  88. package/dist/bundle/chunks/chunk-ZJUU6WOV.js +2052 -0
  89. package/dist/bundle/chunks/{cli-N7KOVPLB.js → cli-H4LJNE2V.js} +2 -2
  90. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-KRMHG2L3.js → cloudflare-workers-ai-system-one-T5R2RVFQ.js} +1 -1
  91. package/dist/bundle/chunks/codemode-worker.js +2 -0
  92. package/dist/bundle/chunks/compat-ZK2DIW3P.js +15 -0
  93. package/dist/bundle/chunks/dist-EY7YKQHB.js +11 -0
  94. package/dist/bundle/chunks/dist-FMWWM4H7.js +268 -0
  95. package/dist/bundle/chunks/dist-NHQTBDHT.js +1107 -0
  96. package/dist/bundle/chunks/{easter-egg-3d-O2GG2XIG.js → easter-egg-3d-BUEOC3NO.js} +1 -1
  97. package/dist/bundle/chunks/entry-A2CSLKHC.js +323 -0
  98. package/dist/bundle/chunks/entry-AL54ZGYO.js +2 -0
  99. package/dist/bundle/chunks/{execute-LMBACTKA.js → execute-MY5JSEPV.js} +18 -15
  100. package/dist/bundle/chunks/{extract-CXXLVFC5.js → extract-PTGACPGP.js} +3 -3
  101. package/dist/bundle/chunks/flow-implementer-APJFY4YI.js +21 -0
  102. package/dist/bundle/chunks/github-copilot.js +66 -62
  103. package/dist/bundle/chunks/{google-generative-ai-SBL77OXO.js → google-generative-ai-UL7YEQ6J.js} +2 -3
  104. package/dist/bundle/chunks/{google-vertex-NZBNNXMK.js → google-vertex-OTMSPUYH.js} +3 -3
  105. package/dist/bundle/chunks/host-75YAHLDR.js +3 -0
  106. package/dist/bundle/chunks/index.bundle-THL4EUSU.js +390 -0
  107. package/dist/bundle/chunks/inprocess-5NP5VJHZ.js +32 -0
  108. package/dist/bundle/chunks/interactive-mode-IW4PIVAQ.js +5 -0
  109. package/dist/bundle/chunks/jiti-bun-loader-VSLLRCSD.js +3459 -0
  110. package/dist/bundle/chunks/jiti-loader-TMJL6S2D.js +2 -0
  111. package/dist/bundle/chunks/{llama-cpp-classify-PP63BYDF.js → llama-cpp-classify-GJAXULWL.js} +1 -1
  112. package/dist/bundle/chunks/{mistral-conversations-DX4YKJSO.js → mistral-conversations-E72Y6OC3.js} +2 -2
  113. package/dist/bundle/chunks/{node-UGQUSQE6.js → node-ZFIIS5IM.js} +32 -32
  114. package/dist/bundle/chunks/openai-codex-responses-S7CMCAOY.js +101 -0
  115. package/dist/bundle/chunks/openai-completions-2Z57N7PC.js +87 -0
  116. package/dist/bundle/chunks/{openai-decisions-ALJROWBE.js → openai-decisions-JIOJDB4C.js} +1 -1
  117. package/dist/bundle/chunks/openai-responses-5VBZSTHL.js +27 -0
  118. package/dist/bundle/chunks/{openrouter-images-FCJT7C7I.js → openrouter-images-S6O7DBEJ.js} +1 -1
  119. package/dist/bundle/chunks/{pi-messages-NHTQQOPW.js → pi-messages-SMLN5J2W.js} +10 -7
  120. package/dist/bundle/chunks/runtime-OYTWXIUM.js +2 -0
  121. package/dist/bundle/chunks/session-picker-DM6S37IF.js +4 -0
  122. package/dist/bundle/chunks/startup-ui-4GGLWNSU.js +3 -0
  123. package/dist/bundle/chunks/trace-command-YLDYCL55.js +254 -0
  124. package/dist/bundle/chunks/typesafe-system-one-7BEL3H5N.js +3 -0
  125. package/dist/bundle/chunks/virtual-modules-TI3W24YL.js +28 -0
  126. package/dist/bundle/cli-runtime.js +5 -3
  127. package/dist/bundle/flow/agents/orch-implementation-fast.md +4 -4
  128. package/dist/bundle/flow/agents/orch-implementation-strong.md +5 -5
  129. package/dist/bundle/flow/package.json +35 -3
  130. package/dist/bundle/index.js +20 -17
  131. package/dist/bundle/orchestrate/README.md +37 -0
  132. package/dist/bundle/{flow → orchestrate}/agents/orch-qa-agent.md +1 -1
  133. package/dist/bundle/{flow → orchestrate}/agents/orch-worker.md +1 -1
  134. package/dist/bundle/{flow → orchestrate}/agents/orchestrator-lead.md +1 -1
  135. package/dist/bundle/orchestrate/package.json +29 -0
  136. package/dist/bundle/rpc-entry.js +5 -3
  137. package/dist/cli/args.d.ts +6 -0
  138. package/dist/cli/args.d.ts.map +1 -1
  139. package/dist/cli/args.js +69 -2
  140. package/dist/cli/args.js.map +1 -1
  141. package/dist/cli/auth-check.d.ts +3 -2
  142. package/dist/cli/auth-check.d.ts.map +1 -1
  143. package/dist/cli/auth-check.js +4 -3
  144. package/dist/cli/auth-check.js.map +1 -1
  145. package/dist/cli/config-selector.d.ts.map +1 -1
  146. package/dist/cli/config-selector.js +3 -1
  147. package/dist/cli/config-selector.js.map +1 -1
  148. package/dist/cli/file-processor.d.ts +2 -0
  149. package/dist/cli/file-processor.d.ts.map +1 -1
  150. package/dist/cli/file-processor.js +6 -6
  151. package/dist/cli/file-processor.js.map +1 -1
  152. package/dist/cli/metadata-disclosure.d.ts +4 -0
  153. package/dist/cli/metadata-disclosure.d.ts.map +1 -0
  154. package/dist/cli/metadata-disclosure.js +23 -0
  155. package/dist/cli/metadata-disclosure.js.map +1 -0
  156. package/dist/cli/project-trust.d.ts.map +1 -1
  157. package/dist/cli/project-trust.js +4 -1
  158. package/dist/cli/project-trust.js.map +1 -1
  159. package/dist/cli/session-picker.lazy.d.ts +3 -0
  160. package/dist/cli/session-picker.lazy.d.ts.map +1 -0
  161. package/dist/cli/session-picker.lazy.js +3 -0
  162. package/dist/cli/session-picker.lazy.js.map +1 -0
  163. package/dist/cli/startup-ui.d.ts +4 -4
  164. package/dist/cli/startup-ui.d.ts.map +1 -1
  165. package/dist/cli/startup-ui.js +38 -14
  166. package/dist/cli/startup-ui.js.map +1 -1
  167. package/dist/cli/startup-ui.lazy.d.ts +3 -0
  168. package/dist/cli/startup-ui.lazy.d.ts.map +1 -0
  169. package/dist/cli/startup-ui.lazy.js +3 -0
  170. package/dist/cli/startup-ui.lazy.js.map +1 -0
  171. package/dist/cli/trace-command.lazy.d.ts +3 -0
  172. package/dist/cli/trace-command.lazy.d.ts.map +1 -0
  173. package/dist/cli/trace-command.lazy.js +3 -0
  174. package/dist/cli/trace-command.lazy.js.map +1 -0
  175. package/dist/cli.js.map +1 -1
  176. package/dist/coordination/broker/entry.lazy.d.ts +3 -0
  177. package/dist/coordination/broker/entry.lazy.d.ts.map +1 -0
  178. package/dist/coordination/broker/entry.lazy.js +3 -0
  179. package/dist/coordination/broker/entry.lazy.js.map +1 -0
  180. package/dist/core/acceptance-command.d.ts +15 -0
  181. package/dist/core/acceptance-command.d.ts.map +1 -0
  182. package/dist/core/acceptance-command.js +150 -0
  183. package/dist/core/acceptance-command.js.map +1 -0
  184. package/dist/core/acceptance-ledger.d.ts +52 -0
  185. package/dist/core/acceptance-ledger.d.ts.map +1 -0
  186. package/dist/core/acceptance-ledger.js +341 -0
  187. package/dist/core/acceptance-ledger.js.map +1 -0
  188. package/dist/core/admission-types.d.ts +69 -0
  189. package/dist/core/admission-types.js +2 -0
  190. package/dist/core/admission-types.js.map +1 -0
  191. package/dist/core/agent-session-runtime.d.ts +7 -0
  192. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  193. package/dist/core/agent-session-runtime.js +43 -9
  194. package/dist/core/agent-session-runtime.js.map +1 -1
  195. package/dist/core/agent-session-services.d.ts +8 -0
  196. package/dist/core/agent-session-services.d.ts.map +1 -1
  197. package/dist/core/agent-session-services.js +13 -1
  198. package/dist/core/agent-session-services.js.map +1 -1
  199. package/dist/core/agent-session.d.ts +127 -10
  200. package/dist/core/agent-session.d.ts.map +1 -1
  201. package/dist/core/agent-session.js +1390 -145
  202. package/dist/core/agent-session.js.map +1 -1
  203. package/dist/core/anthropic-subscription-usage.d.ts +1 -1
  204. package/dist/core/anthropic-subscription-usage.d.ts.map +1 -1
  205. package/dist/core/anthropic-subscription-usage.js +31 -3
  206. package/dist/core/anthropic-subscription-usage.js.map +1 -1
  207. package/dist/core/auth-storage.d.ts +2 -1
  208. package/dist/core/auth-storage.d.ts.map +1 -1
  209. package/dist/core/auth-storage.js +13 -10
  210. package/dist/core/auth-storage.js.map +1 -1
  211. package/dist/core/auto-session-namer.d.ts.map +1 -1
  212. package/dist/core/auto-session-namer.js +3 -1
  213. package/dist/core/auto-session-namer.js.map +1 -1
  214. package/dist/core/bash-executor.d.ts.map +1 -1
  215. package/dist/core/bash-executor.js +3 -1
  216. package/dist/core/bash-executor.js.map +1 -1
  217. package/dist/core/bug-report-redaction.d.ts +4 -0
  218. package/dist/core/bug-report-redaction.d.ts.map +1 -0
  219. package/dist/core/bug-report-redaction.js +209 -0
  220. package/dist/core/bug-report-redaction.js.map +1 -0
  221. package/dist/core/bug-report.d.ts +26 -6
  222. package/dist/core/bug-report.d.ts.map +1 -1
  223. package/dist/core/bug-report.js +82 -9
  224. package/dist/core/bug-report.js.map +1 -1
  225. package/dist/core/cache-warmer.d.ts.map +1 -1
  226. package/dist/core/cache-warmer.js +5 -0
  227. package/dist/core/cache-warmer.js.map +1 -1
  228. package/dist/core/compaction/compaction.d.ts +6 -0
  229. package/dist/core/compaction/compaction.d.ts.map +1 -1
  230. package/dist/core/compaction/compaction.js +103 -71
  231. package/dist/core/compaction/compaction.js.map +1 -1
  232. package/dist/core/compaction/utils.d.ts.map +1 -1
  233. package/dist/core/compaction/utils.js +2 -1
  234. package/dist/core/compaction/utils.js.map +1 -1
  235. package/dist/core/extensions/jiti-bun-babel.d.ts +4 -0
  236. package/dist/core/extensions/jiti-bun-babel.d.ts.map +1 -0
  237. package/dist/core/extensions/jiti-bun-babel.js +4 -0
  238. package/dist/core/extensions/jiti-bun-babel.js.map +1 -0
  239. package/dist/core/extensions/jiti-bun-loader.d.ts +4 -0
  240. package/dist/core/extensions/jiti-bun-loader.d.ts.map +1 -0
  241. package/dist/core/extensions/jiti-bun-loader.js +13 -0
  242. package/dist/core/extensions/jiti-bun-loader.js.map +1 -0
  243. package/dist/core/extensions/jiti-bun-loader.lazy.d.ts +3 -0
  244. package/dist/core/extensions/jiti-bun-loader.lazy.d.ts.map +1 -0
  245. package/dist/core/extensions/jiti-bun-loader.lazy.js +3 -0
  246. package/dist/core/extensions/jiti-bun-loader.lazy.js.map +1 -0
  247. package/dist/core/extensions/loader.d.ts.map +1 -1
  248. package/dist/core/extensions/loader.js +9 -3
  249. package/dist/core/extensions/loader.js.map +1 -1
  250. package/dist/core/extensions/runner.d.ts.map +1 -1
  251. package/dist/core/extensions/runner.js +4 -0
  252. package/dist/core/extensions/runner.js.map +1 -1
  253. package/dist/core/extensions/types.d.ts +3 -0
  254. package/dist/core/extensions/types.d.ts.map +1 -1
  255. package/dist/core/extensions/types.js.map +1 -1
  256. package/dist/core/flow-implementer.d.ts +25 -0
  257. package/dist/core/flow-implementer.d.ts.map +1 -0
  258. package/dist/core/flow-implementer.js +301 -0
  259. package/dist/core/flow-implementer.js.map +1 -0
  260. package/dist/core/internal-process.d.ts +23 -0
  261. package/dist/core/internal-process.d.ts.map +1 -0
  262. package/dist/core/internal-process.js +88 -0
  263. package/dist/core/internal-process.js.map +1 -0
  264. package/dist/core/keybindings.d.ts +2 -2
  265. package/dist/core/keybindings.js +1 -1
  266. package/dist/core/keybindings.js.map +1 -1
  267. package/dist/core/model-config.d.ts +52 -0
  268. package/dist/core/model-config.d.ts.map +1 -1
  269. package/dist/core/model-config.js +4 -4
  270. package/dist/core/model-config.js.map +1 -1
  271. package/dist/core/model-registry.d.ts +4 -0
  272. package/dist/core/model-registry.d.ts.map +1 -1
  273. package/dist/core/model-registry.js +8 -0
  274. package/dist/core/model-registry.js.map +1 -1
  275. package/dist/core/model-request-admission.d.ts +51 -0
  276. package/dist/core/model-request-admission.d.ts.map +1 -0
  277. package/dist/core/model-request-admission.js +103 -0
  278. package/dist/core/model-request-admission.js.map +1 -0
  279. package/dist/core/model-resolver.d.ts +4 -0
  280. package/dist/core/model-resolver.d.ts.map +1 -1
  281. package/dist/core/model-resolver.js +109 -2
  282. package/dist/core/model-resolver.js.map +1 -1
  283. package/dist/core/model-runtime.d.ts +56 -1
  284. package/dist/core/model-runtime.d.ts.map +1 -1
  285. package/dist/core/model-runtime.js +482 -40
  286. package/dist/core/model-runtime.js.map +1 -1
  287. package/dist/core/model-selection-intent.d.ts +14 -0
  288. package/dist/core/model-selection-intent.d.ts.map +1 -0
  289. package/dist/core/model-selection-intent.js +15 -0
  290. package/dist/core/model-selection-intent.js.map +1 -0
  291. package/dist/core/oauth-account-pool.d.ts +4 -1
  292. package/dist/core/oauth-account-pool.d.ts.map +1 -1
  293. package/dist/core/oauth-account-pool.js +251 -228
  294. package/dist/core/oauth-account-pool.js.map +1 -1
  295. package/dist/core/os-secret-store.d.ts +25 -0
  296. package/dist/core/os-secret-store.d.ts.map +1 -0
  297. package/dist/core/os-secret-store.js +290 -0
  298. package/dist/core/os-secret-store.js.map +1 -0
  299. package/dist/core/output-guard.d.ts.map +1 -1
  300. package/dist/core/output-guard.js +62 -2
  301. package/dist/core/output-guard.js.map +1 -1
  302. package/dist/core/pi-ai-schemas.d.ts +4 -0
  303. package/dist/core/pi-ai-schemas.d.ts.map +1 -1
  304. package/dist/core/private-windows-path.d.ts +4 -0
  305. package/dist/core/private-windows-path.d.ts.map +1 -0
  306. package/dist/core/private-windows-path.js +44 -0
  307. package/dist/core/private-windows-path.js.map +1 -0
  308. package/dist/core/prompt-templates.d.ts.map +1 -1
  309. package/dist/core/prompt-templates.js +18 -2
  310. package/dist/core/prompt-templates.js.map +1 -1
  311. package/dist/core/provider-composer.d.ts.map +1 -1
  312. package/dist/core/provider-composer.js +1 -1
  313. package/dist/core/provider-composer.js.map +1 -1
  314. package/dist/core/resource-loader.d.ts.map +1 -1
  315. package/dist/core/resource-loader.js +6 -2
  316. package/dist/core/resource-loader.js.map +1 -1
  317. package/dist/core/run-outcome.d.ts +40 -0
  318. package/dist/core/run-outcome.d.ts.map +1 -0
  319. package/dist/core/run-outcome.js +91 -0
  320. package/dist/core/run-outcome.js.map +1 -0
  321. package/dist/core/run-preflight.d.ts +5 -0
  322. package/dist/core/run-preflight.d.ts.map +1 -0
  323. package/dist/core/run-preflight.js +96 -0
  324. package/dist/core/run-preflight.js.map +1 -0
  325. package/dist/core/runtime-credentials.d.ts +18 -2
  326. package/dist/core/runtime-credentials.d.ts.map +1 -1
  327. package/dist/core/runtime-credentials.js +65 -9
  328. package/dist/core/runtime-credentials.js.map +1 -1
  329. package/dist/core/sdk.d.ts +19 -3
  330. package/dist/core/sdk.d.ts.map +1 -1
  331. package/dist/core/sdk.js +115 -20
  332. package/dist/core/sdk.js.map +1 -1
  333. package/dist/core/settings-defaults.d.ts +2 -1
  334. package/dist/core/settings-defaults.d.ts.map +1 -1
  335. package/dist/core/settings-defaults.js +2 -1
  336. package/dist/core/settings-defaults.js.map +1 -1
  337. package/dist/core/settings-manager.d.ts +15 -4
  338. package/dist/core/settings-manager.d.ts.map +1 -1
  339. package/dist/core/settings-manager.js +114 -22
  340. package/dist/core/settings-manager.js.map +1 -1
  341. package/dist/core/settings-schema.d.ts +7 -2
  342. package/dist/core/settings-schema.d.ts.map +1 -1
  343. package/dist/core/settings-schema.js +12 -5
  344. package/dist/core/settings-schema.js.map +1 -1
  345. package/dist/core/skills.d.ts.map +1 -1
  346. package/dist/core/skills.js +11 -0
  347. package/dist/core/skills.js.map +1 -1
  348. package/dist/core/system-prompt.d.ts +3 -0
  349. package/dist/core/system-prompt.d.ts.map +1 -1
  350. package/dist/core/system-prompt.js +10 -2
  351. package/dist/core/system-prompt.js.map +1 -1
  352. package/dist/core/tools/bash-jobs.d.ts +109 -0
  353. package/dist/core/tools/bash-jobs.d.ts.map +1 -0
  354. package/dist/core/tools/bash-jobs.js +563 -0
  355. package/dist/core/tools/bash-jobs.js.map +1 -0
  356. package/dist/core/tools/bash.d.ts +68 -6
  357. package/dist/core/tools/bash.d.ts.map +1 -1
  358. package/dist/core/tools/bash.js +350 -37
  359. package/dist/core/tools/bash.js.map +1 -1
  360. package/dist/core/tools/edit-diff.d.ts +11 -1
  361. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  362. package/dist/core/tools/edit-diff.js +89 -20
  363. package/dist/core/tools/edit-diff.js.map +1 -1
  364. package/dist/core/tools/edit.d.ts.map +1 -1
  365. package/dist/core/tools/edit.js +15 -7
  366. package/dist/core/tools/edit.js.map +1 -1
  367. package/dist/core/tools/file-mutation-custody.d.ts +29 -0
  368. package/dist/core/tools/file-mutation-custody.d.ts.map +1 -0
  369. package/dist/core/tools/file-mutation-custody.js +173 -0
  370. package/dist/core/tools/file-mutation-custody.js.map +1 -0
  371. package/dist/core/tools/find.d.ts +6 -0
  372. package/dist/core/tools/find.d.ts.map +1 -1
  373. package/dist/core/tools/find.js +84 -38
  374. package/dist/core/tools/find.js.map +1 -1
  375. package/dist/core/tools/grep.d.ts +8 -2
  376. package/dist/core/tools/grep.d.ts.map +1 -1
  377. package/dist/core/tools/grep.js +121 -77
  378. package/dist/core/tools/grep.js.map +1 -1
  379. package/dist/core/tools/index.d.ts +3 -1
  380. package/dist/core/tools/index.d.ts.map +1 -1
  381. package/dist/core/tools/index.js +12 -0
  382. package/dist/core/tools/index.js.map +1 -1
  383. package/dist/core/tools/jobs.d.ts +24 -0
  384. package/dist/core/tools/jobs.d.ts.map +1 -0
  385. package/dist/core/tools/jobs.js +86 -0
  386. package/dist/core/tools/jobs.js.map +1 -0
  387. package/dist/core/tools/ls.d.ts.map +1 -1
  388. package/dist/core/tools/ls.js +2 -1
  389. package/dist/core/tools/ls.js.map +1 -1
  390. package/dist/core/tools/output-accumulator.d.ts +12 -1
  391. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  392. package/dist/core/tools/output-accumulator.js +88 -8
  393. package/dist/core/tools/output-accumulator.js.map +1 -1
  394. package/dist/core/tools/output-cleanup.d.ts +40 -0
  395. package/dist/core/tools/output-cleanup.d.ts.map +1 -0
  396. package/dist/core/tools/output-cleanup.js +273 -0
  397. package/dist/core/tools/output-cleanup.js.map +1 -0
  398. package/dist/core/tools/powershell.d.ts.map +1 -1
  399. package/dist/core/tools/powershell.js +15 -2
  400. package/dist/core/tools/powershell.js.map +1 -1
  401. package/dist/core/tools/read.d.ts +21 -0
  402. package/dist/core/tools/read.d.ts.map +1 -1
  403. package/dist/core/tools/read.js +162 -29
  404. package/dist/core/tools/read.js.map +1 -1
  405. package/dist/core/tools/renderers/bash.d.ts.map +1 -1
  406. package/dist/core/tools/renderers/bash.js +3 -1
  407. package/dist/core/tools/renderers/bash.js.map +1 -1
  408. package/dist/core/tools/renderers/index.d.ts.map +1 -1
  409. package/dist/core/tools/renderers/index.js +1 -0
  410. package/dist/core/tools/renderers/index.js.map +1 -1
  411. package/dist/core/tools/subagent.d.ts +5 -1
  412. package/dist/core/tools/subagent.d.ts.map +1 -1
  413. package/dist/core/tools/subagent.js +76 -19
  414. package/dist/core/tools/subagent.js.map +1 -1
  415. package/dist/core/tools/truncate.d.ts +4 -0
  416. package/dist/core/tools/truncate.d.ts.map +1 -1
  417. package/dist/core/tools/truncate.js +24 -1
  418. package/dist/core/tools/truncate.js.map +1 -1
  419. package/dist/core/tools/write.d.ts.map +1 -1
  420. package/dist/core/tools/write.js +6 -1
  421. package/dist/core/tools/write.js.map +1 -1
  422. package/dist/core/trace/config.js +3 -3
  423. package/dist/core/trace/config.js.map +1 -1
  424. package/dist/core/trace/redaction.d.ts.map +1 -1
  425. package/dist/core/trace/redaction.js +12 -9
  426. package/dist/core/trace/redaction.js.map +1 -1
  427. package/dist/core/trace-client/credential-store.d.ts +1 -1
  428. package/dist/core/trace-client/credential-store.d.ts.map +1 -1
  429. package/dist/core/trace-client/credential-store.js +20 -3
  430. package/dist/core/trace-client/credential-store.js.map +1 -1
  431. package/dist/core/usage-ledger.d.ts +35 -0
  432. package/dist/core/usage-ledger.d.ts.map +1 -0
  433. package/dist/core/usage-ledger.js +140 -0
  434. package/dist/core/usage-ledger.js.map +1 -0
  435. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  436. package/dist/extensions/codemode/execute.js +24 -15
  437. package/dist/extensions/codemode/execute.js.map +1 -1
  438. package/dist/extensions/codemode/index.d.ts +4 -2
  439. package/dist/extensions/codemode/index.d.ts.map +1 -1
  440. package/dist/extensions/codemode/index.js +8 -4
  441. package/dist/extensions/codemode/index.js.map +1 -1
  442. package/dist/extensions/codemode/tool.d.ts +4 -2
  443. package/dist/extensions/codemode/tool.d.ts.map +1 -1
  444. package/dist/extensions/codemode/tool.js +34 -12
  445. package/dist/extensions/codemode/tool.js.map +1 -1
  446. package/dist/extensions/llama/client.d.ts +2 -0
  447. package/dist/extensions/llama/client.d.ts.map +1 -1
  448. package/dist/extensions/llama/client.js +23 -2
  449. package/dist/extensions/llama/client.js.map +1 -1
  450. package/dist/extensions/llama/ui.d.ts.map +1 -1
  451. package/dist/extensions/llama/ui.js +15 -3
  452. package/dist/extensions/llama/ui.js.map +1 -1
  453. package/dist/extensions/mcp/runtime.d.ts.map +1 -1
  454. package/dist/extensions/mcp/runtime.js +3 -2
  455. package/dist/extensions/mcp/runtime.js.map +1 -1
  456. package/dist/extensions/tool-search/tool.d.ts.map +1 -1
  457. package/dist/extensions/tool-search/tool.js +18 -6
  458. package/dist/extensions/tool-search/tool.js.map +1 -1
  459. package/dist/extensions/usage/hcode-overview.d.ts +23 -0
  460. package/dist/extensions/usage/hcode-overview.d.ts.map +1 -0
  461. package/dist/extensions/usage/hcode-overview.js +109 -0
  462. package/dist/extensions/usage/hcode-overview.js.map +1 -0
  463. package/dist/extensions/usage/index.d.ts +5 -0
  464. package/dist/extensions/usage/index.d.ts.map +1 -1
  465. package/dist/extensions/usage/index.js +194 -12
  466. package/dist/extensions/usage/index.js.map +1 -1
  467. package/dist/extensions/usage/overview.d.ts +5 -0
  468. package/dist/extensions/usage/overview.d.ts.map +1 -1
  469. package/dist/extensions/usage/overview.js +21 -1
  470. package/dist/extensions/usage/overview.js.map +1 -1
  471. package/dist/extensions/usage/popup.d.ts +14 -3
  472. package/dist/extensions/usage/popup.d.ts.map +1 -1
  473. package/dist/extensions/usage/popup.js +199 -25
  474. package/dist/extensions/usage/popup.js.map +1 -1
  475. package/dist/humain/adaptive-execution.d.ts +51 -0
  476. package/dist/humain/adaptive-execution.d.ts.map +1 -0
  477. package/dist/humain/adaptive-execution.js +100 -0
  478. package/dist/humain/adaptive-execution.js.map +1 -0
  479. package/dist/humain/adaptive-peer-process.d.ts +44 -0
  480. package/dist/humain/adaptive-peer-process.d.ts.map +1 -0
  481. package/dist/humain/adaptive-peer-process.js +159 -0
  482. package/dist/humain/adaptive-peer-process.js.map +1 -0
  483. package/dist/humain/adaptive-peer-worker.d.ts +3 -0
  484. package/dist/humain/adaptive-peer-worker.d.ts.map +1 -0
  485. package/dist/humain/adaptive-peer-worker.js +122 -0
  486. package/dist/humain/adaptive-peer-worker.js.map +1 -0
  487. package/dist/humain/adaptive-runtime-types.d.ts +621 -0
  488. package/dist/humain/adaptive-runtime-types.d.ts.map +1 -0
  489. package/dist/humain/adaptive-runtime-types.js +3 -0
  490. package/dist/humain/adaptive-runtime-types.js.map +1 -0
  491. package/dist/humain/adaptive-session-host.d.ts +113 -0
  492. package/dist/humain/adaptive-session-host.d.ts.map +1 -0
  493. package/dist/humain/adaptive-session-host.js +1838 -0
  494. package/dist/humain/adaptive-session-host.js.map +1 -0
  495. package/dist/humain/adhd/index.d.ts +2 -2
  496. package/dist/humain/adhd/index.d.ts.map +1 -1
  497. package/dist/humain/adhd/index.js +22 -13
  498. package/dist/humain/adhd/index.js.map +1 -1
  499. package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +162 -49
  500. package/dist/humain/caveman/index.d.ts +1 -1
  501. package/dist/humain/caveman/index.d.ts.map +1 -1
  502. package/dist/humain/caveman/index.js +21 -12
  503. package/dist/humain/caveman/index.js.map +1 -1
  504. package/dist/humain/classify-tool.d.ts +4 -0
  505. package/dist/humain/classify-tool.d.ts.map +1 -0
  506. package/dist/humain/classify-tool.js +50 -0
  507. package/dist/humain/classify-tool.js.map +1 -0
  508. package/dist/humain/flow-command.d.ts +1 -1
  509. package/dist/humain/flow-command.d.ts.map +1 -1
  510. package/dist/humain/flow-command.js +21 -3
  511. package/dist/humain/flow-command.js.map +1 -1
  512. package/dist/humain/flow-loader.d.ts +15 -10
  513. package/dist/humain/flow-loader.d.ts.map +1 -1
  514. package/dist/humain/flow-loader.js +72 -18
  515. package/dist/humain/flow-loader.js.map +1 -1
  516. package/dist/humain/fuse-provider.d.ts +5 -0
  517. package/dist/humain/fuse-provider.d.ts.map +1 -0
  518. package/dist/humain/fuse-provider.js +302 -0
  519. package/dist/humain/fuse-provider.js.map +1 -0
  520. package/dist/humain/gateway/provider.d.ts.map +1 -1
  521. package/dist/humain/gateway/provider.js +2 -0
  522. package/dist/humain/gateway/provider.js.map +1 -1
  523. package/dist/humain/gateway/secret-store.d.ts +3 -7
  524. package/dist/humain/gateway/secret-store.d.ts.map +1 -1
  525. package/dist/humain/gateway/secret-store.js +21 -249
  526. package/dist/humain/gateway/secret-store.js.map +1 -1
  527. package/dist/humain/hcode/account-store.d.ts +92 -0
  528. package/dist/humain/hcode/account-store.d.ts.map +1 -0
  529. package/dist/humain/hcode/account-store.js +720 -0
  530. package/dist/humain/hcode/account-store.js.map +1 -0
  531. package/dist/humain/hcode/account.d.ts +42 -0
  532. package/dist/humain/hcode/account.d.ts.map +1 -0
  533. package/dist/humain/hcode/account.js +552 -0
  534. package/dist/humain/hcode/account.js.map +1 -0
  535. package/dist/humain/hcode/catalog.d.ts +6 -0
  536. package/dist/humain/hcode/catalog.d.ts.map +1 -0
  537. package/dist/humain/hcode/catalog.js +47 -0
  538. package/dist/humain/hcode/catalog.js.map +1 -0
  539. package/dist/humain/hcode/contracts.d.ts +389 -0
  540. package/dist/humain/hcode/contracts.d.ts.map +1 -0
  541. package/dist/humain/hcode/contracts.js +1243 -0
  542. package/dist/humain/hcode/contracts.js.map +1 -0
  543. package/dist/humain/hcode/environment.d.ts +9 -0
  544. package/dist/humain/hcode/environment.d.ts.map +1 -0
  545. package/dist/humain/hcode/environment.js +24 -0
  546. package/dist/humain/hcode/environment.js.map +1 -0
  547. package/dist/humain/hcode/facade.d.ts +54 -0
  548. package/dist/humain/hcode/facade.d.ts.map +1 -0
  549. package/dist/humain/hcode/facade.js +326 -0
  550. package/dist/humain/hcode/facade.js.map +1 -0
  551. package/dist/humain/hcode/http.d.ts +10 -0
  552. package/dist/humain/hcode/http.d.ts.map +1 -0
  553. package/dist/humain/hcode/http.js +119 -0
  554. package/dist/humain/hcode/http.js.map +1 -0
  555. package/dist/humain/hcode/notices.d.ts +15 -0
  556. package/dist/humain/hcode/notices.d.ts.map +1 -0
  557. package/dist/humain/hcode/notices.js +69 -0
  558. package/dist/humain/hcode/notices.js.map +1 -0
  559. package/dist/humain/hcode/ports.d.ts +34 -0
  560. package/dist/humain/hcode/ports.d.ts.map +1 -0
  561. package/dist/humain/hcode/ports.js +2 -0
  562. package/dist/humain/hcode/ports.js.map +1 -0
  563. package/dist/humain/hcode/provider.d.ts +15 -0
  564. package/dist/humain/hcode/provider.d.ts.map +1 -0
  565. package/dist/humain/hcode/provider.js +200 -0
  566. package/dist/humain/hcode/provider.js.map +1 -0
  567. package/dist/humain/hcode/selection.d.ts +16 -0
  568. package/dist/humain/hcode/selection.d.ts.map +1 -0
  569. package/dist/humain/hcode/selection.js +37 -0
  570. package/dist/humain/hcode/selection.js.map +1 -0
  571. package/dist/humain/hcode/transport.d.ts +22 -0
  572. package/dist/humain/hcode/transport.d.ts.map +1 -0
  573. package/dist/humain/hcode/transport.js +368 -0
  574. package/dist/humain/hcode/transport.js.map +1 -0
  575. package/dist/humain/hcode/usage.d.ts +5 -0
  576. package/dist/humain/hcode/usage.d.ts.map +1 -0
  577. package/dist/humain/hcode/usage.js +66 -0
  578. package/dist/humain/hcode/usage.js.map +1 -0
  579. package/dist/humain/hcode/wire.d.ts +16 -0
  580. package/dist/humain/hcode/wire.d.ts.map +1 -0
  581. package/dist/humain/hcode/wire.js +104 -0
  582. package/dist/humain/hcode/wire.js.map +1 -0
  583. package/dist/humain/index.d.ts +1 -3
  584. package/dist/humain/index.d.ts.map +1 -1
  585. package/dist/humain/index.js +8 -60
  586. package/dist/humain/index.js.map +1 -1
  587. package/dist/humain/login-menu.d.ts.map +1 -1
  588. package/dist/humain/login-menu.js +8 -1
  589. package/dist/humain/login-menu.js.map +1 -1
  590. package/dist/humain/metadata/contracts.d.ts +82 -0
  591. package/dist/humain/metadata/contracts.d.ts.map +1 -0
  592. package/dist/humain/metadata/contracts.js +214 -0
  593. package/dist/humain/metadata/contracts.js.map +1 -0
  594. package/dist/humain/metadata/identity.d.ts +10 -0
  595. package/dist/humain/metadata/identity.d.ts.map +1 -0
  596. package/dist/humain/metadata/identity.js +209 -0
  597. package/dist/humain/metadata/identity.js.map +1 -0
  598. package/dist/humain/metadata/index.d.ts +41 -0
  599. package/dist/humain/metadata/index.d.ts.map +1 -0
  600. package/dist/humain/metadata/index.js +100 -0
  601. package/dist/humain/metadata/index.js.map +1 -0
  602. package/dist/humain/metadata/sender.d.ts +20 -0
  603. package/dist/humain/metadata/sender.d.ts.map +1 -0
  604. package/dist/humain/metadata/sender.js +302 -0
  605. package/dist/humain/metadata/sender.js.map +1 -0
  606. package/dist/humain/metadata/version.d.ts +8 -0
  607. package/dist/humain/metadata/version.d.ts.map +1 -0
  608. package/dist/humain/metadata/version.js +38 -0
  609. package/dist/humain/metadata/version.js.map +1 -0
  610. package/dist/humain/node-http.d.ts +2 -0
  611. package/dist/humain/node-http.d.ts.map +1 -1
  612. package/dist/humain/node-http.js +9 -4
  613. package/dist/humain/node-http.js.map +1 -1
  614. package/dist/humain/node-provider.d.ts +2 -0
  615. package/dist/humain/node-provider.d.ts.map +1 -1
  616. package/dist/humain/node-provider.js +39 -8
  617. package/dist/humain/node-provider.js.map +1 -1
  618. package/dist/humain/ponytail/vendor/hooks/ponytail-config.d.ts +1 -1
  619. package/dist/humain/ponytail/vendor/hooks/ponytail-config.d.ts.map +1 -1
  620. package/dist/humain/ponytail/vendor/hooks/ponytail-config.js +4 -4
  621. package/dist/humain/ponytail/vendor/hooks/ponytail-config.js.map +1 -1
  622. package/dist/humain/ponytail/vendor/hooks/ponytail-instructions.d.ts.map +1 -1
  623. package/dist/humain/ponytail/vendor/hooks/ponytail-instructions.js +7 -0
  624. package/dist/humain/ponytail/vendor/hooks/ponytail-instructions.js.map +1 -1
  625. package/dist/humain/ponytail/vendor/pi-extension/index.d.ts.map +1 -1
  626. package/dist/humain/ponytail/vendor/pi-extension/index.js +12 -1
  627. package/dist/humain/ponytail/vendor/pi-extension/index.js.map +1 -1
  628. package/dist/humain/systemone.d.ts +23 -0
  629. package/dist/humain/systemone.d.ts.map +1 -0
  630. package/dist/humain/systemone.js +101 -0
  631. package/dist/humain/systemone.js.map +1 -0
  632. package/dist/humain/trace-capture/flow-producer.d.ts.map +1 -1
  633. package/dist/humain/trace-capture/flow-producer.js +3 -3
  634. package/dist/humain/trace-capture/flow-producer.js.map +1 -1
  635. package/dist/index.d.ts +4 -2
  636. package/dist/index.d.ts.map +1 -1
  637. package/dist/index.js.map +1 -1
  638. package/dist/main.d.ts +1 -0
  639. package/dist/main.d.ts.map +1 -1
  640. package/dist/main.js +292 -183
  641. package/dist/main.js.map +1 -1
  642. package/dist/modes/interactive/bug-report.d.ts.map +1 -1
  643. package/dist/modes/interactive/bug-report.js +82 -36
  644. package/dist/modes/interactive/bug-report.js.map +1 -1
  645. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  646. package/dist/modes/interactive/components/assistant-message.js +8 -5
  647. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  648. package/dist/modes/interactive/components/diff.d.ts.map +1 -1
  649. package/dist/modes/interactive/components/diff.js +11 -5
  650. package/dist/modes/interactive/components/diff.js.map +1 -1
  651. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  652. package/dist/modes/interactive/components/extension-selector.js +9 -1
  653. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  654. package/dist/modes/interactive/components/first-time-setup.d.ts +10 -5
  655. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
  656. package/dist/modes/interactive/components/first-time-setup.js +55 -29
  657. package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
  658. package/dist/modes/interactive/components/model-selector.d.ts +16 -2
  659. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  660. package/dist/modes/interactive/components/model-selector.js +164 -19
  661. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  662. package/dist/modes/interactive/components/oauth-selector.d.ts +3 -0
  663. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  664. package/dist/modes/interactive/components/oauth-selector.js +19 -2
  665. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  666. package/dist/modes/interactive/components/status-indicator.d.ts +17 -0
  667. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  668. package/dist/modes/interactive/components/status-indicator.js +78 -1
  669. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  670. package/dist/modes/interactive/components/tree-selector.d.ts +1 -0
  671. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  672. package/dist/modes/interactive/components/tree-selector.js +19 -10
  673. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  674. package/dist/modes/interactive/interactive-mode.d.ts +4 -0
  675. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  676. package/dist/modes/interactive/interactive-mode.js +353 -65
  677. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  678. package/dist/modes/interactive/interactive-mode.lazy.d.ts +3 -0
  679. package/dist/modes/interactive/interactive-mode.lazy.d.ts.map +1 -0
  680. package/dist/modes/interactive/interactive-mode.lazy.js +3 -0
  681. package/dist/modes/interactive/interactive-mode.lazy.js.map +1 -0
  682. package/dist/modes/interactive/model-catalog-refresh.d.ts +2 -0
  683. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -1
  684. package/dist/modes/interactive/model-catalog-refresh.js +12 -0
  685. package/dist/modes/interactive/model-catalog-refresh.js.map +1 -1
  686. package/dist/modes/interactive/theme/theme-controller.d.ts +2 -3
  687. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  688. package/dist/modes/interactive/theme/theme-controller.js +4 -5
  689. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  690. package/dist/modes/interactive/theme/theme-schema.js +4 -4
  691. package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
  692. package/dist/modes/interactive/theme/theme.d.ts +2 -0
  693. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  694. package/dist/modes/interactive/theme/theme.js +8 -0
  695. package/dist/modes/interactive/theme/theme.js.map +1 -1
  696. package/dist/modes/json-event.d.ts +2 -1
  697. package/dist/modes/json-event.d.ts.map +1 -1
  698. package/dist/modes/json-event.js.map +1 -1
  699. package/dist/modes/print-mode.d.ts +4 -0
  700. package/dist/modes/print-mode.d.ts.map +1 -1
  701. package/dist/modes/print-mode.js +57 -11
  702. package/dist/modes/print-mode.js.map +1 -1
  703. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  704. package/dist/modes/rpc/rpc-mode.js +68 -16
  705. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  706. package/dist/modes/rpc/rpc-types.d.ts +2 -0
  707. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  708. package/dist/modes/rpc/rpc-types.js.map +1 -1
  709. package/dist/utils/changelog.d.ts +1 -1
  710. package/dist/utils/changelog.d.ts.map +1 -1
  711. package/dist/utils/changelog.js +7 -5
  712. package/dist/utils/changelog.js.map +1 -1
  713. package/dist/utils/image-resize.d.ts.map +1 -1
  714. package/dist/utils/image-resize.js +3 -1
  715. package/dist/utils/image-resize.js.map +1 -1
  716. package/dist/utils/lazy-validator.d.ts +5 -0
  717. package/dist/utils/lazy-validator.d.ts.map +1 -0
  718. package/dist/utils/lazy-validator.js +7 -0
  719. package/dist/utils/lazy-validator.js.map +1 -0
  720. package/dist/utils/shell.d.ts +3 -1
  721. package/dist/utils/shell.d.ts.map +1 -1
  722. package/dist/utils/shell.js +9 -4
  723. package/dist/utils/shell.js.map +1 -1
  724. package/docs/cli.md +23 -5
  725. package/docs/codemode.md +21 -1
  726. package/docs/development.md +18 -0
  727. package/docs/docs.json +4 -0
  728. package/docs/extensions.md +4 -0
  729. package/docs/flow.md +115 -16
  730. package/docs/headless-modes.md +61 -0
  731. package/docs/humain-code-forge-architecture.md +65 -13
  732. package/docs/humain-code-forge-component-scorecard.md +10 -1
  733. package/docs/humain-code-forge-flow-walkthrough.md +54 -55
  734. package/docs/humain-code.md +22 -19
  735. package/docs/index.md +1 -0
  736. package/docs/keybindings.md +1 -1
  737. package/docs/models-configuration.md +6 -1
  738. package/docs/models.md +1 -1
  739. package/docs/prompt-templates.md +1 -1
  740. package/docs/providers.md +67 -15
  741. package/docs/run-preflight.md +47 -0
  742. package/docs/sdk.md +39 -1
  743. package/docs/security.md +1 -1
  744. package/docs/settings.md +12 -5
  745. package/docs/skills.md +2 -0
  746. package/docs/slash-commands.md +5 -3
  747. package/docs/usage.md +29 -0
  748. package/examples/extensions/custom-provider-anthropic/package-lock.json +4 -4
  749. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  750. package/examples/tsconfig.json +13 -0
  751. package/npm-shrinkwrap.json +67 -67
  752. package/package.json +25 -19
  753. package/schemas/models.schema.json +30 -0
  754. package/schemas/settings.schema.json +28 -9
  755. package/src/humain/caveman/UPSTREAM.md +19 -3
  756. package/src/humain/caveman/upstream.json +2 -2
  757. package/src/humain/ponytail/UPSTREAM.md +16 -1
  758. package/src/humain/web-access/UPSTREAM.md +10 -0
  759. package/src/humain/web-access/upstream.json +1 -0
  760. package/dist/bundle/chunks/anthropic-messages-MNISFDZA.js +0 -66
  761. package/dist/bundle/chunks/chunk-2HZ2V3HS.js +0 -1985
  762. package/dist/bundle/chunks/chunk-2PZ46FSM.js +0 -6
  763. package/dist/bundle/chunks/chunk-4SQUP6IR.js +0 -88
  764. package/dist/bundle/chunks/chunk-5JSLXC2A.js +0 -3
  765. package/dist/bundle/chunks/chunk-75CQYZ63.js +0 -1336
  766. package/dist/bundle/chunks/chunk-DCPACGLH.js +0 -12267
  767. package/dist/bundle/chunks/chunk-FLVBQ6GS.js +0 -24
  768. package/dist/bundle/chunks/chunk-H7Y4QY7K.js +0 -11
  769. package/dist/bundle/chunks/chunk-JEAM6N22.js +0 -139
  770. package/dist/bundle/chunks/chunk-PS2FJ7M4.js +0 -23
  771. package/dist/bundle/chunks/chunk-TEOMXMW6.js +0 -23
  772. package/dist/bundle/chunks/chunk-WEFEQEIQ.js +0 -28
  773. package/dist/bundle/chunks/chunk-WW4SILXG.js +0 -249
  774. package/dist/bundle/chunks/compat-MXAZPYDN.js +0 -13
  775. package/dist/bundle/chunks/dist-3V7ZSLER.js +0 -3166
  776. package/dist/bundle/chunks/dist-66CW64M2.js +0 -8
  777. package/dist/bundle/chunks/host-SCZ4IKWR.js +0 -2
  778. package/dist/bundle/chunks/openai-codex-responses-LZWBQYVP.js +0 -101
  779. package/dist/bundle/chunks/openai-completions-7NWH423P.js +0 -82
  780. package/dist/bundle/chunks/openai-responses-5YOLHMCF.js +0 -27
  781. package/dist/bundle/chunks/runtime-UVPDE4CX.js +0 -2
  782. package/dist/bundle/chunks/typesafe-system-one-BHJYAZ6E.js +0 -3
  783. package/dist/bundle/chunks/virtual-modules-YQPK57CW.js +0 -23
  784. package/dist/humain/legacy-workflow-tiers.d.ts +0 -3
  785. package/dist/humain/legacy-workflow-tiers.d.ts.map +0 -1
  786. package/dist/humain/legacy-workflow-tiers.js +0 -46
  787. package/dist/humain/legacy-workflow-tiers.js.map +0 -1
  788. /package/dist/bundle/{flow → orchestrate}/agents/orch-architect.md +0 -0
  789. /package/dist/bundle/{flow → orchestrate}/agents/orch-scout.md +0 -0
  790. /package/dist/bundle/{flow → orchestrate}/agents/orch-security-review.md +0 -0
  791. /package/dist/bundle/{flow → orchestrate}/agents/orch-technical-lead.md +0 -0
  792. /package/dist/bundle/{flow → orchestrate}/agents/orch-technical-review.md +0 -0
package/docs/flow.md CHANGED
@@ -1,14 +1,15 @@
1
1
  # Flow
2
2
 
3
- Flow is the hierarchical agent harness built into HUMAIN Code. `/flow run <goal>` plans a task, dispatches child agents (scouts, leads, workers, reviewers, QA), verifies the result, and reports it. This guide describes what is implemented in this checkout. Statements about behavior this checkout has not verified (builds, live provider entitlements, macOS recovery, billing accuracy) are labeled as limits; see [Known limits](../../flow/docs/known-limits.md).
3
+ Flow is the agent harness built into HUMAIN Code. `/flow run <goal>` runs one implementer with repository checks and never escalates to a multi-agent topology. `/orchestrate <goal>` sizes the task and can dispatch scouts, leads, workers, reviewers and QA. A frozen `--flow-admission` file stays authoritative for either command. This guide describes what is implemented in this checkout. Statements about behavior this checkout has not verified (builds, live provider entitlements, macOS recovery, billing accuracy) are labeled as limits; see [Known limits](../../flow/docs/known-limits.md).
4
4
 
5
- ## One command
5
+ ## Commands
6
6
 
7
- Flow has one slash command, `/flow`, with subcommands. Bare `/flow` shows help. Unknown subcommands are errors and never become goals: `/flow Fix the login timeout` answers `Unknown Flow command: Fix. Use /flow help to see available commands. To start work: /flow run <goal>`.
7
+ Flow uses `/flow` with subcommands. The private bundled `@humain/orchestrate` package provides `/orchestrate` and `/flow orchestrate`, registering its hierarchy executor against Flow’s existing run and dispatch services. Bare `/flow` shows help. Unknown subcommands are errors and never become goals: `/flow Fix the login timeout` answers `Unknown Flow command: Fix. Use /flow help to see available commands. To start work: /flow run <goal>`.
8
8
 
9
9
  | Command | What it does |
10
10
  |---|---|
11
- | `/flow run <goal> [flags]` | Start a run. |
11
+ | `/flow run <goal> [flags]` | Run one implementer with checks. |
12
+ | `/orchestrate <goal> [flags]`, `/flow orchestrate <goal> [flags]` | Plan and run a multi-agent topology. |
12
13
  | `/flow list` | List recent runs in this checkout (read-only). |
13
14
  | `/flow status` | Open the live progress board. |
14
15
  | `/flow cancel` | Stop the active run. |
@@ -23,12 +24,70 @@ Flow has one slash command, `/flow`, with subcommands. Bare `/flow` shows help.
23
24
  | `/flow setup` | Connect providers and configure Flow (terminal only). |
24
25
  | `/flow help [command]` | Static usage and examples. |
25
26
 
26
- Help and argument completion are static: they work before Flow loads and while Flow is disabled. Flow code is not loaded at startup. HUMAIN Code registers the lightweight `/flow` command plus the `--profile` and `--flow-admission` startup flags, and the first Flow-requiring invocation performs one memoized dynamic import of the bundled Flow package. A failed load is reported as `Failed to load Flow: <message>` and retried on the next invocation. A recognized subcommand that a build does not implement answers `/flow <command> is not available in this build. Use /flow help to see supported commands.`
27
+ Help and argument completion are static: they work before either package loads and while Flow is disabled. Neither executor package loads at startup. HUMAIN Code registers the lightweight `/flow` and `/orchestrate` commands plus the `--profile` and `--flow-admission` startup flags. The first Flow-requiring invocation loads the bundled `@humain/flow` package through a memoized dynamic import. Hierarchy commands additionally load `@humain/orchestrate` through a separate memoized import and reuse the initialized Flow instance. Ordinary SMALL/MEDIUM `/flow run` does not load Orchestrate. If Flow needs hierarchy execution and none is registered, it can request this same host loader, independently of command spelling. Orchestrate registers its hierarchy implementation through Flow’s executor hook. Hierarchy personas and nested role-cost interpretation belong to Orchestrate; implementer personas, child bootstrap, sessions, recovery storage, telemetry and the usage ledger remain Flow-owned. Nested children resolve both packages’ trusted personas through a private child-lifetime directory, with unchanged user override and repository trust rules. A failed load is reported as `Failed to load Flow: <message>` and retried on the next invocation. A recognized subcommand that a build does not implement answers `/flow <command> is not available in this build. Use /flow help to see supported commands.`
27
28
 
28
- A plain prompt goes to the normal session and never touches Flow. The previous per-command slash names are not registered and have no aliases; see [Migration](../../flow/docs/migration.md) for the old-to-new mapping. Internal tools, `flow_*` RPC operations, and run settlement contracts are unchanged.
29
+ With the default `executionEngine: "legacy"`, a plain prompt goes to the normal session and never touches Flow. Explicit `adaptive-v2` selection uses the lazy adaptive session boundary described below; it does not replace `/flow run` or `/orchestrate`. The previous per-command slash names are not registered and have no aliases; see [Migration](../../flow/docs/migration.md) for the old-to-new mapping. Internal tools, `flow_*` RPC operations, and run settlement contracts are unchanged.
29
30
 
30
31
  Flow payloads are passed through verbatim: the goal, message, or title text after the subcommand is never split or rejoined.
31
32
 
33
+ ## Opt-in adaptive prompts (partial worktree implementation)
34
+
35
+ Trusted settings or SDK `CreateAgentSessionOptions.executionEngine` select `"legacy"` (default) or
36
+ `"adaptive-v2"`; unknown values reject. The selected engine is frozen for the run. This is not a new `/flow`
37
+ flag, task-name router, default change or shipped-release claim. Legacy saved sessions remain legacy even when
38
+ settings later select adaptive execution; a frozen `--flow-admission` cannot be reinterpreted by adaptive prompts.
39
+
40
+ For adaptive prompts, Flow's private owner drives Understand → Act → Check → Decide over the existing primary
41
+ session. Understand drafts atomic requirements and runs one fresh missing-items pass before mutation. Interactive
42
+ mode offers a 2–5-line checklist summary/correction; headless does not wait. L0 uses the primary alone; L1 adds a
43
+ fresh read-only reviewer receiving checklist, candidate diff and captured results. L2 admits the primary plus up
44
+ to two independent subprocess peers and one reviewer, within the same run budget. The parent retains provider
45
+ requests, credentials, tool authorization and usage reconciliation; child allocations are pre-reserved, not fresh
46
+ budgets. The primary integrates and repairs; unsplittable work stays on one worker. No recursion or automatic
47
+ in-process promotion is introduced. Security/unknown code impact requires L1; denied required depth blocks completion.
48
+
49
+ The worktree also implements shared time/token admission and verification reserve, sanitized request attestation,
50
+ criterion-bound completion, and owned-job stdin/EOF, deadlines and terminal notification. Completion reports
51
+ `verified`, `partial` or `unverified` separately from workflow outcome; assistant text and `agent_end` are not
52
+ settlement. Local `adaptive_status`/`adaptive_completion` session events and SDK `adaptiveCompletion` do not add
53
+ Flow v1 wire keys. Default Flow settlement verification emission remains unchanged and off. Status counts checked
54
+ criteria, not passing tests: `checking 5/6` retains the ledger revision. In the TUI, the single live status surface
55
+ shows its expansion shortcut: `app.tools.expand` (Ctrl+O by default, configurable in `keybindings.json`) toggles
56
+ running/open/checked/unmet/uncheckable criteria, current evidence references and admitted L2 paths/benefits.
57
+ The dock stays compact; expanded details use a height-bounded overlay. Scroll with the configured selection
58
+ up/down and page-up/page-down keys (arrows and PageUp/PageDown by default); the expansion shortcut or selection
59
+ cancel key closes details and restores editor focus. Wrapped details resize with the terminal and update live
60
+ without resetting the scroll position.
61
+ Expansion stays live through primary completion and Check/review until run settlement; no mode choice or separate
62
+ agent board is added. Admitted L2 scope names appear before peer dispatch. Host-observed relevant reads/completed scoped artifacts and passing
63
+ checks count as semantic progress once per candidate/configuration/criterion/observation identity; repeated
64
+ captures, model claims and arbitrary file touches do not. Progress alone is not verification. A completed primary
65
+ response may propose earlier escalation with a bounded `<adaptive_escalation>{id,reason,benefit}</adaptive_escalation>`
66
+ JSON record; the owner still enforces next-level admission, signal floors and remaining allocation.
67
+
68
+ The host's `adaptiveExecution.checks` must be trusted direct Node JavaScript verifiers captured before work,
69
+ with exact criterion acceptance links. Changed/new executable dependencies, unsupported formats/native addons,
70
+ and shell/package wrappers refuse qualification. Verifiers must consume mutable candidate source as data, not
71
+ evaluate it or dispatch model producers; arbitrary shell, nested/model-capable and unqualified extension tools
72
+ refuse. Scoped native write/edit currently qualify only on macOS/Linux Node.js; Windows, other OSes and Bun
73
+ (including compiled binaries) are unsupported. Virtual-model peer fan-out refuses without a frozen physical
74
+ pricing bound; supported physical-model L2 is not blanket-disabled. This is not a sandbox or general-purpose
75
+ repository test runner. A factual answer without independently qualified source/counterexample observations
76
+ remains unverified, even after model self-check.
77
+
78
+ Saved adaptive sessions use frozen original admission and versioned safe checkpoints for Understand, pre-Act,
79
+ Check and Decide, preserving budgets, downtime, checklist revisions, floors, attempts and job identities. Ambiguous
80
+ in-flight work, unknown producer/child/job custody, missing provenance or changed model/profile/authority block
81
+ unsafe continuation, never replay work or adopt saved PIDs. Sealed terminal results re-observe current integrity
82
+ and artifacts without model/check/job or settlement replay; an originally unverified result cannot be upgraded.
83
+ This is the session resume path, not `/flow continue`; the experimental in-process transport remains non-resumable.
84
+
85
+ Phase 1 is not complete. At this documentation refresh the exact-tree full `./test.sh` is running, with no passing
86
+ result available; focused historical results do not close final qualification. Phase-2 navigation/editing, mini-eval, measured improvement/adoption, Forge migration
87
+ and command removal are not established here. Existing commands and legacy Flow v1 contracts remain intact.
88
+ See [executors](../../flow/docs/executors.md#adaptive-session-boundary-worktree-only) and
89
+ [known limits](../../flow/docs/known-limits.md#adaptive-v2-partial-worktree-implementation).
90
+
32
91
  ## `/flow run <goal>`
33
92
 
34
93
  ```
@@ -48,12 +107,21 @@ Flags are honored only before or after the goal text (the leading and trailing f
48
107
 
49
108
  `/flow help run` lists these flags. Preparing a run (parsing flags, resolving the profile, freezing the admission) is not dispatch. Admission refusals end with `Nothing was dispatched.`
50
109
 
51
- Auto mode:
110
+ Topology:
52
111
 
53
- - Frozen Flow runs classify the goal with rules first. SMALL and MEDIUM start one implementer without LLM triage. Rules-large runs may use LLM triage to refine the size; an explicit admission size skips triage.
112
+ - Without a frozen admission file, `/flow run` builds an admission with `sizeOverride: "small"` and disables escalation. Workflow and risk flags cannot select a multi-agent topology. `/flow continue` preserves this choice even after an interruption during planning, before any topology was recorded. Recovery safety checks and required deterministic checks still apply.
113
+ - `/orchestrate <goal> [flags]` (also `/flow orchestrate`) accepts the same flags and keeps automatic sizing and escalation. These runs classify the goal with rules first. SMALL and MEDIUM start one implementer without LLM triage. Rules-large runs may use LLM triage to refine the size; an explicit admission size skips triage.
54
114
  - There is no approval step. Runs auto-approve by default. `--yes` and `-y` are accepted as no-ops.
55
115
  - The command parses flags and starts the run in the background; the command handler returns while the run continues. Triage and workflow signal collection run inside the run, so the first dispatch is not instant.
56
116
 
117
+ ## Experimental in-process implementer
118
+
119
+ `HUMAIN_TERMINAL_FLOW_INPROCESS=1` selects an in-process session for the single lean implementer. It is off by default, has no CLI flag or profile setting, and leaves hierarchy and other dispatches on child processes. On Linux, codemode can call bash, text read, edit, write, ls and installed grep/find tools with the child's filtered environment. A session-owned registry retains shell/search processes, observed descendants, codemode workers and pending host calls until they stop. It reuses Flow's process reaper, not the parent's PID. Descendants that escape before observation remain the same limitation as the child backend; this is not OS containment.
120
+
121
+ Unaudited extension tools, subprocess tools on other platforms, PowerShell, subagent delegation, missing search binaries, image reads requiring resize workers, traced hosts, credential commands, configured Gateway keychain credentials, Bedrock/Vertex credential chains, resource packages and a different agent configuration root refuse rather than bypass custody. `models.classify()` and `models.generateImages()` refuse until late nested model usage can be accounted safely. A runtime policy rechecks credentials and loaded/registered model configuration, so introducing a credential command after startup cannot bypass the refusal. Configuration references to filtered or changed parent variables also refuse instead of resolving the parent's value. Managed search-tool probes and downloads are not started by the in-process session. Provider/proxy/bootstrap configuration still has ambient surfaces; this is not a general SDK environment sandbox.
122
+
123
+ Every run that used it is non-resumable: `/flow continue` refuses it; start a new run instead. Pause/resume gates new dispatch, not a running session. RPC messages explicitly targeting the implementer's task ID queue through the session's steering API. Untargeted `/flow message` and lead-targeted messages refuse: a lean run has no lead to drain that queue. Qualified child control remains unavailable. Cancellation, inactivity and the live run deadline request cooperative abort and owned subprocess cleanup. Session end also drains custody before returning. A session or resource still running after a one-second grace fails with `inprocess_abort_grace_expired` and blocks later in-process sessions until it stops. An event-loop block cannot be interrupted in-process; a fatal error or OOM takes down the Flow parent too. Keep the child backend for normal work and unattended callers. See the [experiment report](../../../docs/research/2026-11-12-flow-inprocess-implementer.md#10-linux-codemode-and-subprocess-custody-continuation) for measured workloads and remaining ambient configuration.
124
+
57
125
  ## Verify-after (`--verify-after`)
58
126
 
59
127
  Opt-in. `--verify-after`, a profile with `verification: { "mode": "after" }`, or a host admission with `verification: "after"` publishes the result of a SMALL or MEDIUM run as soon as the implementer finishes, then verifies it. The chat first shows `Implemented: N file(s) changed` and the widget shows `VERIFYING`; the verdict follows in the run summary:
@@ -83,13 +151,13 @@ Flow has four workflow levels: `direct`, `checked`, `led`, `full`.
83
151
  | medium | `checked` | the SMALL pipeline until evaluation justifies a separate tier |
84
152
  | large | `full` | architect, recon, several leads, review, QA |
85
153
 
86
- SMALL and MEDIUM dispatch exactly one implementer, then deterministic checks. They dispatch no architect, scouts, lead, independent reviewer, LLM QA, or repair agent. Missing or unavailable checks are never replaced with an LLM verdict. When a run discovers no checks, or its only non-passing checks are provably unavailable in this environment, verification passes with `evidence_status: unverified_checks_unavailable` and a verification warning; it is never reported as verified. Real check failures still fail the run, pre-existing failures settle as warnings, and recovery runs still require real checks. Scope and candidate-integrity checks still apply.
154
+ SMALL and MEDIUM dispatch exactly one implementer, then deterministic checks. They dispatch no architect, scouts, lead, independent reviewer, LLM QA, or repair agent. Missing or unavailable checks are never replaced with an LLM verdict. When a run discovers no checks, or its only non-passing checks are provably unavailable in this environment, the run can still settle `succeeded`, but the report and human summary show `verification: NOT RUN (<reason>)` instead of `verification: PASS`. The reason states that no deterministic checks were discovered or names the unavailable checks. The machine-readable `RunResultV1.codeVerification` is `not_run`. The existing `evidence_status` remains `unverified_checks_unavailable`, with a blocked check verdict and a verification warning; a successful settlement does not mean verified correctness. Real check failures still fail the run, pre-existing failures settle as warnings, and recovery runs still require real checks. Scope and candidate-integrity checks still apply.
87
155
 
88
156
  A legacy `checked` run outside this size-based pipeline in a repository with no discovered deterministic checks passes when the independent review passes. It reports `evidence_status: unverified_checks_unavailable` as a warning in the run summary, `run.log`, and the ledger, and starts no repair. A review FAIL still fails. `direct` runs and continuations or recovery runs still require deterministic checks.
89
157
 
90
- A `led` or `full` run with no discoverable deterministic checks settles the same way when the mandatory independent review passes and QA passes: `succeeded` with `evidence_status: unverified_checks_unavailable` as a warning, one QA dispatch, and no repair. A QA FAIL or review FAIL still fails the run. If checks appear during the run (at the run root, git root, verify root, or a changed file's package directories), the exception no longer applies. When no round was attested, the report's verification target shows the last observed candidate identity with `, not attested`, and prints `HEAD unborn` for a tree without commits.
158
+ A `led` or `full` run with no discoverable deterministic checks settles the same way when the mandatory independent review passes and QA passes: `succeeded` with `evidence_status: unverified_checks_unavailable` as a warning, one QA dispatch, and no repair. The report and human summary still show `verification: NOT RUN (<reason>)`, not PASS: review and QA approval do not replace deterministic check evidence. When a LARGE run passes its required deterministic checks and skips QA and independent review, the report instead shows `verification: SKIPPED (QA and independent review; deterministic checks passed)`. In that case `RunResultV1.codeVerification` remains `pass`, because deterministic checks actually ran. Skipped QA or a missing mandatory review verdict likewise cannot produce verification PASS. A QA FAIL or review FAIL still fails the run. If checks appear during the run (at the run root, git root, verify root, or a changed file's package directories), the exception no longer applies. When no round was attested, the report's verification target shows the last observed candidate identity with `, not attested`, and prints `HEAD unborn` for a tree without commits.
91
159
 
92
- Before any agent changes the candidate, Flow runs each discovered deterministic check once on the untouched tree (baseline). A check that fails after the change with only failures it already had at baseline (same check, configuration and exit code, no new diagnostic) is pre-existing and does not fail the run; a check that newly fails or gains any new diagnostic still fails and goes through repair. CLI and web runs behave the same: the run summary names the pre-existing checks, states that Flow did not change files to fix them, and suggests a follow-up run to fix them; the ledger gets a content-free `warning` event (`preexisting_check_failures`, opaque check ids only). Flow does not repair pre-existing failures within the run. The baseline runs before the run-start change observation, so files the checks write (for example `tsbuildinfo`, caches, snapshots) are not counted as the run's changes. Read-only tasks, runs without discovered deterministic checks, continuations and recovery runs take no baseline.
160
+ For writable fresh runs, Flow captures the untouched run-start tree before dispatch when available. If a check fails after implementation, Flow lazily re-runs that check on a pristine copy of the snapshot; it does not run the whole suite before implementation. A check that fails with only failures it already had at baseline (same check, configuration and exit code, no new diagnostic) is pre-existing and does not fail the run; a check that newly fails or gains any new diagnostic still fails and goes through repair. CLI and web runs behave the same: the run summary names the pre-existing checks, states that Flow did not change files to fix them, and suggests a follow-up run to fix them; the ledger gets a content-free `warning` event (`preexisting_check_failures`, opaque check ids only). Flow does not repair pre-existing failures within the run. Baseline checks run outside the candidate checkout. Read-only tasks, runs without discovered deterministic checks, continuations and recovery runs run no baseline checks.
93
161
 
94
162
  The candidate identity normally comes from git. When git is missing (`ENOENT`) or refuses the repository for dubious ownership (`safe.directory`) and the root has a `.git` entry, it falls back to a git-free filesystem walk (basis `filesystem`). Unborn repositories (no commits) keep the git-based identity.
95
163
 
@@ -106,13 +174,17 @@ For LARGE and legacy runs, workflow routing still applies:
106
174
 
107
175
  ### Size override
108
176
 
109
- There is no user-facing `--size` flag on `/flow run` (`--size` in the goal is not applied; see the warning above). A size override comes only from a `FlowRunAdmissionV1` `sizeOverride` (`hc --flow-admission <file>`). With admission `sizeOverride: "small"` or `"medium"`, the run uses one implementer and deterministic checks regardless of advisory workflow floors. Only an explicit implementer scope-growth report can request the LARGE pipeline; actual out-of-candidate writes still block verification.
177
+ There is no user-facing `--size` flag on `/flow run` (`--size` in the goal is not applied; see the warning above). `/flow run` sets `sizeOverride: "small"` on CLI-built admissions. `/orchestrate` leaves sizing automatic. A frozen `FlowRunAdmissionV1` `sizeOverride` (`hc --flow-admission <file>`) takes precedence for both commands. On a fresh run, admission `sizeOverride: "small"` or `"medium"` selects one implementer and deterministic checks regardless of advisory workflow floors. Recovery preserves an already recorded executed topology; without one, a frozen `sizeOverride: "small"` selects the single-implementer path. When escalation is allowed, only an explicit implementer scope-growth report can request the LARGE pipeline; actual out-of-candidate writes still block verification.
178
+
179
+ A frozen large admission, a hierarchy recovery snapshot, or a lean hierarchy handover must resolve a registered hierarchy executor. If the host cannot provide one, the run refuses with `Run refused: hierarchy executor unavailable (@humain/orchestrate). No hierarchy work was dispatched.` The existing aborted-run settlement reports `failureClass: internal`, including over RPC; it never substitutes lean execution. Earlier preparation or handover usage remains counted.
110
180
 
111
181
  ### Escalation
112
182
 
183
+ `/flow run` without a frozen admission file never escalates. Use `/orchestrate` for the multi-agent topology. The rules below apply to `/orchestrate` and runs governed by a frozen admission file.
184
+
113
185
  - A fresh SMALL or MEDIUM run can escalate once to LARGE when the implementer's final report ends with `SCOPE_GROWTH: large`, a blank line, and `STATUS: partial` or `STATUS: completed`. The profile must allow escalation, and scope safety and retry-budget gates still apply. Deterministic check failures alone never trigger this transition.
114
186
  - A legacy flat run (`direct`/`checked`) can escalate once to `led` when progress-aware repair requests escalation and retry budget remains. Prior work and failure evidence carry forward. An escalated re-run is never escalated flat again. This only applies in `enforce` mode, because flat runs happen only there.
115
- - Escalation is not guaranteed. Provider failures, unsafe or unverified scope, blocked work, a read-only task, and an exhausted or explicit retry budget can stop the run without escalation (`src/pipeline/run-orchestration.ts:3090-3137,3351-3365`; `src/pipeline/repair-policy.ts:130-144`).
187
+ - Escalation is not guaranteed. Provider failures, unsafe or unverified scope, blocked work, a read-only task, and an exhausted or explicit retry budget can stop the run without escalation (`packages/orchestrate/src/pipeline/hierarchy-executor.ts`, `packages/flow/src/pipeline/lean-repair.ts`; `packages/flow/src/pipeline/repair-policy.ts`).
116
188
  - On verification failure, retry leads can move up one lead capability tier.
117
189
  - SMALL/MEDIUM scope-growth transitions emit the original size and destination `large` in escalation telemetry. LARGE keeps its existing architecture and verification pipeline.
118
190
 
@@ -122,7 +194,7 @@ A run uses a versioned Flow profile (`FlowProfileV1`) from the profile store und
122
194
 
123
195
  Before dispatch Flow resolves the profile and freezes it, with its sizing and spend thresholds, into `runs/<id>/admission.json` (`resolveProfile`, `buildCliAdmission`; see `packages/flow/src/run-admission.ts`). Later edits to the stored profile never change a started run; recovery reads and verifies the frozen admission and its digest. See [flow-profiles.md](flow-profiles.md) for the profile format.
124
196
 
125
- `hc --flow-admission <file>` is a string startup flag and is authoritative for every `/flow` in the session. With it, `/flow run` parses no flags: the whole argument text after `run` is the goal, and flag-like tokens (`--force`, `--candidate`, `--context`, `--profile`, `--model`, `--route-only`, `--flow-admission`, and any other `--x` or `-y`) are left in the goal, not applied, and reported once as a warning (`Ignored flag(s) in the /flow goal: ...`). Combining startup `--profile` with startup `--flow-admission` is refused before dispatch.
197
+ `hc --flow-admission <file>` is a string startup flag and is authoritative for every `/flow` in the session. With it, `/flow run` and `/orchestrate` parse no flags: the whole argument text after the run subcommand (or `/orchestrate`) is the goal, and flag-like tokens (`--force`, `--candidate`, `--context`, `--profile`, `--model`, `--route-only`, `--flow-admission`, and any other `--x` or `-y`) are left in the goal, not applied, and reported once as a warning (`Ignored flag(s) in the /flow goal: ...`). Combining startup `--profile` with startup `--flow-admission` is refused before dispatch.
126
198
 
127
199
  Model choice for each capability is resolved independently for the primary model and for fallbacks:
128
200
 
@@ -206,7 +278,7 @@ Flow can be disabled without affecting direct prompts. Either of these makes `/f
206
278
  - Environment variable `HUMAIN_TERMINAL_FLOW_DISABLED` set to `1` or `true` (case-insensitive, trimmed).
207
279
  - Setting `flow.enabled` set to `false` in `settings.json`.
208
280
 
209
- `/flow help` and completion keep working. `cancel`, `status`, `pause`, `hide`, and `show` stay available for an already loaded run. `resume` is refused. Plain prompts do not go through Flow, so they keep working.
281
+ `/flow help` and completion keep working. `cancel`, `status`, `pause`, `hide`, and `show` stay available for an already loaded run. `resume` is refused. Legacy plain prompts do not go through Flow, so they keep working. These command kill switches do not select the adaptive engine; `executionEngine` controls new adaptive prompt admission without moving a live run between engines.
210
282
 
211
283
  ## Failure handling
212
284
 
@@ -215,9 +287,36 @@ Flow can be disabled without affecting direct prompts. Either of these makes `/f
215
287
  - Flow does not re-run a failed `/flow` as a direct prompt unless you choose to.
216
288
  - After a failed fresh CLI run that is eligible, Flow offers "Retry with Flow", "Retry as normal prompt" or "Not now" through a select titled with the failure reason (for example `Flow run failed. Unexpected error.`). Dismissing the select does nothing. Not every failure is eligible: there is no offer for cancelled, `budget_stop`, recovered (`/flow continue`) or `--flow-admission` runs, and narrower rules apply per failure class. "Retry with Flow" respects the kill switch and starts a new run; "Retry as normal prompt" sends the goal as a normal prompt.
217
289
  - Contracts for the typed settlement fields (`run_settled`, `failureClass`, `retryOffer`) exist in `packages/humain-code-contracts/src/flow-events.ts`.
218
- - All monetary thresholds are warning-only: per-dispatch/per-role/lead limits, the frozen admission's run threshold (built-ins: $50), recovery spending ceilings, and `SENTINEL_CHILD_MAX_COST_USD`. Legacy `dispatch_spend_cap.mode=enforce` now warns, never cancels. Accurate spending telemetry and threshold warnings remain; no spending is reset or hidden. Non-monetary limits and safety checks remain enforced.
290
+ - CLI monetary thresholds are warning-only: per-dispatch/per-role/lead limits, the frozen CLI admission's run threshold (built-ins: $50), recovery spending ceilings, and `SENTINEL_CHILD_MAX_COST_USD`. Legacy `dispatch_spend_cap.mode=enforce` now warns, never cancels. Web admissions enforce their frozen run spend cap and settle `budget_stopped`. Accurate spending telemetry and threshold warnings remain; no spending is reset or hidden. Non-monetary limits and safety checks remain enforced.
219
291
  - `/flow continue <run-id>` can recover an old budget-stopped run without reset. It preserves the ledger and frozen admission, and retries unfinished leads instead of marking them successful. Confirmation, original-checkout identity, ownership/process-lineage checks, effect reconciliation, validation, and retry ceilings still apply. See [tracking.md](../../flow/docs/tracking.md#spend-accounting).
220
292
 
293
+ ## Usage reporting, including failed runs
294
+
295
+ Flow writes `request_usage` events to `<STATE_ROOT>/runs/<runId>/events.jsonl` as it receives each assistant `message_end` or compaction usage entry, not only when the run ends. An RPC host also receives these events as `flow_event` frames. Nested subagent usage arrives as cumulative snapshot deltas, not individual provider-request records. Deduplicate by `requestId`; do not add `run_settled.totals` to those events again.
296
+
297
+ Every normal `run_settled` includes `totals` by role: `tokens` (input + output + cache-read + cache-write), `costMicrousd`, `durationMs`, and `requests`. Failure does not erase these totals. Only roles with usage rows appear. Unknown rows count toward `requests`, so this is an accounting-row count, not necessarily the number of physical provider submissions.
298
+
299
+ | Terminal path | What the caller receives |
300
+ |---|---|
301
+ | `succeeded` | Streamed usage and final role totals; settlement awaits child stream drain and sink flush. Success alone does not prove usage completeness. |
302
+ | `failed` after implementation (`check_failed`, `qa_failed`, `verification_unavailable`, `blocked`, etc.) | The same streamed usage and role totals, with the failure class. Failed or blocked work is not free. |
303
+ | Refusal or `config_invalid` before any dispatch | A failed settlement with `totals: {}` and `settledCleanly: true`; no requests were dispatched. If admission cannot be read, the refusal may use a synthetic run identity. |
304
+ | Caller cancellation | Completed requests remain counted. Settlement waits for child streams, including late usage after the dispatch has already returned cancelled. A missing final usage frame becomes an unknown row at drain, not an invented zero-cost request. |
305
+ | `budget_stopped` | Includes the request that crossed the web spend cap and all subsequently drained usage. Further dispatch is blocked. Other children stopped mid-response retain their completed requests and unknown-usage markers. |
306
+ | `interrupted`, including bounded shutdown expiry | Observed usage and role totals remain. `settledCleanly: false` means the terminal evidence is not a complete acknowledgement. Outstanding observed responses and unfinished nested children are marked unknown. |
307
+ | External `SIGTERM` | Flow stops dispatch, cancels owned children, and drains usage. Standalone Flow signal handling allows up to 15 seconds; session shutdown allows 2 seconds. The RPC host has a separate 1.5-second signal-shutdown bound, which can end the process sooner. Flow's own expiry writes an incomplete interrupted settlement and synchronously fsyncs the ledger. RPC attempts to flush queued frames on SIGTERM too, within the host bound; expiry or SIGKILL can still cut delivery short. |
308
+ | External `SIGKILL`, including escalation after `SIGTERM` | No handler, settlement, or flush is guaranteed. Only already written ledger records and already delivered frames can be recovered. A request still running or not yet visible to Flow cannot supply final token counts. |
309
+
310
+ `request_usage.costMicrousd: null` with `costBasis: "unknown"` is unknown, never free. Provider `usageIncomplete`, malformed usage, unpriceable nonzero tokens, and missing final usage can produce unknown rows. Known tokens and positive partial costs remain lower bounds; a separate zero-token unknown marker can accompany a known partial bill. Role cost totals sum only known costs and do not encode the unknown count. Read the usage events as well as the settlement. `settledCleanly` describes settlement/drain health, not whether every request was priced or every token was reported; there is no C1 `usage_complete` flag. The legacy run-summary `cost.complete` is separate: it requires reported-cost evidence for every finished dispatch and no unknown or estimated external cost. Missing reported prices can make it false even when token counters are available; an early dispatch result is not revised by late frames, whereas the C1 ledger continues accounting until drain.
311
+
312
+ Missing-frame markers are decided after producers drain, or at a forced incomplete settlement. A late complete usage frame received before that boundary closes the gap. Cancellation between completed requests does not itself make their usage unknown. An unfinished nested child retains its reported subtotal plus an unknown marker, even when an earlier snapshot carried a valid cost.
313
+
314
+ ### Per-request ledger and limits
315
+
316
+ Set `HUMAIN_TERMINAL_USAGE_LEDGER` to a private JSONL file before launching the parent; see [Usage ledger](../../../docs/usage-ledger.md). Flow children inherit its absolute path and append to the same file with one synchronous `O_APPEND` write per record. Records carry process/session and physical submission identities, including retries. A submitted request can have a `request` record without a matching `response` if its process dies. Failed or aborted responses keep whatever usage the provider reported; unavailable usage is null.
317
+
318
+ This ledger improves coverage, including submissions that Flow's response stream has not exposed yet, but cannot guarantee complete token usage on every path. Providers may omit final usage; a killed process cannot append its response; write failures are best-effort warnings; and calls bypassing the observer hooks are not covered. Neither the usage ledger nor Flow telemetry can recover token counts a provider never delivered. Use request/response reconciliation to expose unfinished submissions, retain known lower bounds, and report unknowns separately rather than discarding all usage for an unsuccessful run.
319
+
221
320
  ## Related
222
321
 
223
322
  - [flow-profiles.md](flow-profiles.md)
@@ -0,0 +1,61 @@
1
+ # Headless mode policy
2
+
3
+ Without explicit settings, mode defaults depend on the extension context:
4
+
5
+ | Context | Caveman | ADHD | Ponytail |
6
+ | --- | --- | --- | --- |
7
+ | Interactive TUI (`ctx.hasUI && ctx.mode === "tui"`) | `full` | `on` | `full` |
8
+ | Print, JSON, RPC, headless SDK and Flow worker sessions | `off` | `off` | `safe` |
9
+
10
+ RPC's extension UI support does not make it interactive. Fresh SDK sessions
11
+ that never emit `session_start` resolve their defaults before the first input,
12
+ mode command or agent turn. No terminal probing or extra startup process is needed.
13
+
14
+ Existing precedence stays intact: explicit session mode, valid
15
+ `HUMAIN_TERMINAL_{CAVEMAN,ADHD,PONYTAIL}_DEFAULT_MODE`, valid module
16
+ `config.json` default, then the contextual built-in default. Invalid environment
17
+ values and invalid or unreadable configuration fall through. Commands and
18
+ whole-message deactivation still work. `/ponytail safe` and
19
+ `/ponytail default safe` select the new level explicitly.
20
+
21
+ `safe` retains code reuse and no unnecessary code or abstractions. It explicitly
22
+ forbids trimming task requirements, acceptance checks or verification, and
23
+ forbids premature completion claims. Failed, missing and unavailable checks
24
+ must be reported honestly, not treated as passes. It does not inject the
25
+ interactive skill's instructions to reduce vague tasks to a core version.
26
+ This is an instruction policy, not a guarantee of model compliance; verified
27
+ completion enforcement belongs to PHC-VERIFY.
28
+
29
+ ## System prompt resources
30
+
31
+ The harness documentation section appears only in the interactive terminal UI
32
+ (`ctx.hasUI && ctx.mode === "tui"`). Print, JSON, RPC and SDK sessions without a
33
+ terminal UI omit it, even when RPC exposes extension UI methods.
34
+
35
+ Skills remain available in every mode when enabled. `--no-skills` (SDK:
36
+ `DefaultResourceLoader`'s `noSkills: true`) also suppresses skill paths contributed
37
+ by bundled modules and extensions. Explicit `--skill <path>` selections (SDK:
38
+ `additionalSkillPaths`) still load.
39
+
40
+ ## Effective-mode records for PHC-LEDGER
41
+
42
+ Each enabled host appends a custom session entry in `before_agent_start`,
43
+ including when its mode is off:
44
+
45
+ ```json
46
+ {"type":"custom","customType":"caveman-effective-mode","data":{"mode":"off"}}
47
+ {"type":"custom","customType":"adhd-effective-mode","data":{"mode":"off"}}
48
+ {"type":"custom","customType":"ponytail-effective-mode","data":{"mode":"safe"}}
49
+ ```
50
+
51
+ The session manager supplies entry IDs, parent IDs and timestamps. These are
52
+ per-turn observations, not user settings. Mode restoration only reads the
53
+ existing `caveman-mode`, `adhd-mode` and `ponytail-mode` setting entries, so
54
+ resuming an interactive session headlessly does not turn an old observed
55
+ default into an explicit override. Explicit persisted settings do still win.
56
+
57
+ Ledger consumers should use the latest observation for each host preceding
58
+ the request. An absent observation means unknown or disabled host, not off.
59
+ Ephemeral Flow SDK sessions retain entries in memory; consumers must read the
60
+ live session manager rather than assume a JSONL session file exists. This
61
+ workstream does not add a second request ledger or alter Flow telemetry.
@@ -35,9 +35,9 @@ That means:
35
35
  1. **Forge is first-class, but configuration-driven.** Support Forge startup through explicit `--cwd`, settings,
36
36
  and `HUMAIN_TERMINAL_FORGE_CWD` precedence. Do not infer Forge identity structurally or hardcode a developer
37
37
  machine path as runtime behavior.
38
- 2. **HUMAIN Code is a provider-registration layer.** Add HUMAIN-specific providers, theme setup, default
39
- packages, and narrowly scoped legacy cleanup through the bundled HUMAIN extension and normal resource seams.
40
- Forge startup cwd stays in `main.ts`; model selection stays in the normal session flow.
38
+ 2. **HUMAIN product policy has one owner per concern.** The bundled extension owns independent providers and
39
+ themes. ModelRuntime owns the reserved `humain-code-account` facade; native account qualification, secure or
40
+ session-only storage, usage and transport stay in `src/humain/hcode`. Startup and modes only wire these owners.
41
41
  3. **Runtime model bindings are normal provider registrations.** DeployNow bindings should enter through the
42
42
  same provider/model registry and request-auth machinery as other providers.
43
43
  4. **DeployNow credentials are descriptors, not secrets.** Loopback binding URLs and placeholder credentials
@@ -56,9 +56,9 @@ That means:
56
56
  upstream project unless the package scope is deliberately migrated. Put HUMAIN branding at public boundaries.
57
57
  10. **Do not imply sandboxing that does not exist.** Project trust, provider registration, and model selection
58
58
  are not process, filesystem, network, or credential isolation.
59
- 11. **HUMAIN SSO is visible but unsupported.** Keep `HUMAIN SSO` in `/login`, with no models or model API base
60
- URL. Login and refresh operations must reject with `HUMAIN SSO is not supported yet.` Legacy OIDC
61
- configuration must not enable it.
59
+ 11. **Retired providers stay removed.** Unsupported `humain-sso`, legacy env/API-key `humain-code`, fabricated
60
+ defaults and startup tier deletion are removed. Preserve user tier files and inert credentials. No old-ID
61
+ translation, unsupported-provider revocation or silent model fallback is allowed.
62
62
  12. **Drop-in replacement means behavioral compatibility, not internal mimicry.** Preserve the CLI/package
63
63
  surfaces, config paths, working-directory behavior, provider/model selection, and tool/session behavior Forge
64
64
  needs.
@@ -74,17 +74,69 @@ That means:
74
74
  | `packages/coding-agent/src/main.ts` | CLI bootstrap, startup cwd resolution, app mode dispatch, runtime factory construction, distribution wiring for bundled HUMAIN extension factories. | Forge policy, provider selection policy, DeployNow descriptor parsing beyond passing env into the runtime. |
75
75
  | `packages/coding-agent/src/core` | Sessions, settings, auth storage, model registry, resource loading, tools, extension runtime. | Product-specific Forge workflow copy or DeployNow env names. |
76
76
  | `packages/coding-agent/src/modes` | Interactive, print, and RPC mode I/O behavior. | Provider detection, model binding interpretation, package-specific architecture rules. |
77
- | `packages/coding-agent/src/humain` | HUMAIN branding hooks, HUMAIN themes/logo, legacy generated-tier cleanup, DeployNow binding descriptor interpretation, bundled HUMAIN provider registration, and the always-visible unsupported HUMAIN SSO entry. | Startup cwd resolution, generic auth resolution, generic provider transport behavior, workflow model policy, low-level TUI mechanics, real provider secret custody. |
77
+ | `packages/coding-agent/src/humain` | HUMAIN branding/themes, native account qualification and lifecycle, independent provider registration, DeployNow descriptors, and the lazy adaptive session host bridge. | Startup cwd resolution, generic auth resolution, generic provider transport behavior, workflow model policy, low-level TUI mechanics, real provider secret custody. |
78
+ | `packages/flow/src/adaptive` | Private adaptive lifecycle, budgets, depth policy, requirements and evidence-bound completion over injected session/check services. | Provider transport, Forge billing/admission policy, new Flow v1 wire fields, or a second agent scheduler. |
78
79
  | `packages/coding-agent/docs` | Durable user and engineering contract for HUMAIN Code CLI behavior. | Stale implementation plans or speculative roadmap as current architecture truth. |
79
80
  | `docs/superpowers/specs` | Historical product specs and implementation plans. | Canonical current architecture rules after implementation has landed. |
80
81
 
82
+ ## Opt-in adaptive execution: worktree implementation, partial qualification
83
+
84
+ Trusted settings and SDK `CreateAgentSessionOptions.executionEngine` accept `legacy` or `adaptive-v2`;
85
+ `legacy` is the default. Selection is frozen at run admission, not inferred from task names. Legacy plain
86
+ prompts retain their direct path. Explicit adaptive prompts lazily load Flow through `humain/flow-loader.ts`.
87
+ The private Flow engine owns Understand → Act → Check → Decide; the host reuses the primary `AgentSession`
88
+ continuation/settlement seam, candidate/check services and session-owned jobs. L0 has only the primary;
89
+ L1 adds a fresh read-only reviewer context, not a mutating worker or hierarchy bootstrap. L2 permits up to two
90
+ independent subprocess peers alongside the primary, plus one reviewer. The parent owns requests, credentials,
91
+ SDK request policy, tool authorization and usage reconciliation. Peers share pre-reserved child allocations and
92
+ the absolute run deadline, cannot recurse, and return integration/repair to the primary. Unsplittable work keeps
93
+ one worker; no experimental in-process transport is promoted.
94
+
95
+ The current worktree implements the L0/L1/L2 loop, draft plus fresh missing-items checklist, versioned
96
+ criterion/candidate/configuration evidence, sanitized effective-request attestation, throwing physical-submission
97
+ admission, and owned-job stdin/deadline/cleanup extensions. Semantic progress deduplicates host-observed relevant
98
+ observations, scoped artifacts and passing checks, not model claims or arbitrary writes. Validated primary
99
+ escalation proposals remain subject to ordered depth, floors and budget admission. Local status exposes criterion
100
+ revision/states/evidence and publishes admitted independent L2 scopes before dispatch.
101
+
102
+ Integrated session recovery preserves frozen original admission, elapsed budget including downtime, checklist,
103
+ floors, attempts and job identity at safe Understand/pre-Act/Check/Decide checkpoints. Ambiguous in-flight work,
104
+ unknown producer/child/job custody and changed authority cannot authorize replay or PID adoption. A matching
105
+ private terminal seal permits integrity/artifact re-observation without model/check/job or settlement replay,
106
+ never upgrading an originally unverified result. Experimental in-process runs remain non-resumable. Saved legacy
107
+ sessions stay legacy; adaptive selection cannot reinterpret a frozen Flow admission. This is not a shipped-release
108
+ or phase-1-complete claim: the exact-tree full `./test.sh` is running at this refresh, with no passing result yet.
109
+
110
+ Host checks currently require trusted, admission-captured Node JavaScript verifiers with unchanged executable
111
+ modules/configuration; mutable candidate source may be read as data, not executed as an unadmitted producer.
112
+ Scoped native mutation custody qualifies only macOS/Linux Node.js write/edit, refusing Windows, other OSes and
113
+ Bun (including compiled binaries). Virtual-model peer fan-out refuses without a frozen physical pricing bound;
114
+ physical-model L2 remains available within admission. This is qualification, not OS isolation or general
115
+ repository-test support. Factual answers can remain unverified
116
+ without independently qualified source and contradictory-case observations. See [executor boundaries](../../flow/docs/executors.md#adaptive-session-boundary-worktree-only)
117
+ and [known limits](../../flow/docs/known-limits.md#adaptive-v2-partial-worktree-implementation).
118
+
119
+ Flow v1 admissions, profile digests, request IDs, omission semantics, usage reconciliation and settlement ordering
120
+ remain authoritative. Adaptive status/evidence stays on local session surfaces, not new Flow v1 keys or enums.
121
+ `implementation_ready` stays provisional; `run_settled.totals` reconciles streamed usage, not another charge.
122
+ Optional settlement verification remains omitted unless `HUMAIN_TERMINAL_FLOW_SETTLEMENT_VERIFICATION=1`.
123
+ Limited installed-reader checks do not authorize enabling that gate. No Forge migration, command deletion,
124
+ phase-2 navigation/editing, mini-eval, measured improvement or default/adoption promotion is established by this
125
+ worktree implementation. Independent PREVIEWER/integrator and merge authority remain external.
126
+
81
127
  ## HUMAIN Code And Forge Boundaries
82
128
 
83
129
  HUMAIN Code and Forge integration should stay in the bundled HUMAIN extension unless the change is plainly
84
130
  generic:
85
131
 
86
- - HUMAIN theme startup, provider registration, and exact legacy generated-tier cleanup belong in
132
+ - HUMAIN theme startup, native account policy and provider registration belong in
87
133
  `packages/coding-agent/src/humain`; explicit Forge startup cwd resolution belongs in `main.ts`.
134
+ - Native readiness is selected-environment public config, never private auth or model availability. Recheck on
135
+ login-menu/direct-login actions; cancel stale work. Startup and unrelated providers never await native discovery.
136
+ - Explicit session-only consent precedes grant acquisition. Shared awaited finalizers attempt one device-family
137
+ revoke within 3,000 ms before clearing memory; persistent or borrowed runtimes are not revoked on ordinary exit.
138
+ No credential/reference/account identity is persisted for a session-only sign-in. Crashes rely on qualified expiry.
139
+ - Independent Node, Gateway, Fuse, Local and DeployNow retain their own routes, credentials and selection.
88
140
  - DeployNow binding descriptor detection belongs in the HUMAIN extension.
89
141
  - Dynamic provider registration and provider-scoped request env belong in the model registry and extension API.
90
142
  - Normal authentication and model selection belong to `/login`, `/model`, session restoration, and default-model
@@ -131,7 +183,7 @@ Use this order before changing code:
131
183
 
132
184
  | If the change is about... | Start in... | Evidence to update |
133
185
  | --- | --- | --- |
134
- | HUMAIN theme, bundled provider registration, unsupported SSO, or exact legacy-tier cleanup | `packages/coding-agent/src/humain` | HUMAIN extension and SSO tests plus operator docs. |
186
+ | HUMAIN themes, native account lifecycle, independent providers, or retired-provider removal | `packages/coding-agent/src/humain` | HUMAIN extension and SSO tests plus operator docs. |
135
187
  | DeployNow descriptor parsing or provider registration from Forge env | `packages/coding-agent/src/humain` plus model registry seams | HUMAIN Forge extension tests and flow docs. |
136
188
  | Request-scoped auth, provider availability, selected model behavior | `packages/coding-agent/src/core/model-registry*` | Model registry/auth tests and command path tests. |
137
189
  | Bedrock endpoint, AWS env, HTTP handler, stream payloads, provider metadata | `packages/ai` | Provider/API tests and generated metadata checks. |
@@ -144,11 +196,11 @@ Use this order before changing code:
144
196
 
145
197
  | Do | Don't |
146
198
  | --- | --- |
147
- | Register local, explicit `humain-code`, and DeployNow models through normal provider APIs. | Reintroduce `/hc` or `/humaincode` routing, model profiles, or Forge prompt injection. |
199
+ | Register Local, Node, Gateway, Fuse and DeployNow normally; reserve native `humain-code-account` for ModelRuntime. | Reintroduce `/hc` or `/humaincode` routing, model profiles, or Forge prompt injection. |
148
200
  | Register DeployNow runtime models as normal providers/models. | Special-case DeployNow models outside the registry or bypass `hasConfiguredAuth`/`setModel`. |
149
201
  | Treat `deploynow-proxy`, `deploynow-broker`, and legacy placeholders as descriptors for a loopback route. | Document or store real provider secrets as if they were part of HUMAIN Code CLI. |
150
202
  | Keep explicit provider selection fail-closed. | Fall back from explicit `FORGE_RUNTIME_MODEL_PROVIDER=openai` to Bedrock just because Bedrock env exists. |
151
- | Keep HUMAIN SSO visible but unsupported while non-SSO HUMAIN Code and DeployNow remain independent model-access paths. | Let legacy OIDC variables enable login, token exchange, credentials, or `humain-sso` models. |
203
+ | Keep retired providers absent while native Code and independent providers retain separate account lifetimes. | Let legacy OIDC variables enable login, token exchange, credentials, or `humain-sso` models. |
152
204
  | Put generic Bedrock custom-endpoint fixes in `packages/ai`. | Put AWS SDK handler or proxy details in HUMAIN extension policy. |
153
205
  | Keep `ProviderConfig` request auth, availability, and status behavior aligned. | Add provider config fields that only work during the final request path. |
154
206
  | Prefer existing settings, extension, workflow, and provider seams before adding new globals. | Add another global env flag when an existing resource or provider contract can carry the behavior. |
@@ -169,7 +221,7 @@ Use this order before changing code:
169
221
  - Reintroducing a product-specific routing layer on top of `/login`, `/model`, session restoration, or
170
222
  dynamic-workflows model selection.
171
223
  - Treating placeholder API keys or loopback URLs as real secrets.
172
- - Treating unsupported HUMAIN SSO as a prerequisite for any model access.
224
+ - Treating retired SSO or old env/API-key providers as a prerequisite for supported model access.
173
225
  - Making root README guidance diverge from this architecture contract.
174
226
  - Adding broad compatibility layers to mimic another coding agent when Forge only needs command, cwd, tool,
175
227
  session, model, or package compatibility.
@@ -195,7 +247,7 @@ If the owning layer is unclear, stop and inspect sibling behavior before patchin
195
247
 
196
248
  | Change Type | Expected Verification |
197
249
  | --- | --- |
198
- | HUMAIN extension providers, unsupported SSO, or legacy cleanup | Focused `packages/coding-agent` tests around `test/humain-*.test.ts`. |
250
+ | HUMAIN extension providers, native lifecycle, or retired-provider removal | Focused `packages/coding-agent` tests around `test/humain-*.test.ts`. |
199
251
  | Provider registry/auth behavior | Focused model registry/auth-storage tests plus command path tests if UI commands consume it. |
200
252
  | Bedrock or other provider transport behavior | Focused `packages/ai` provider/API tests. |
201
253
  | Startup cwd or CLI argument behavior | Focused startup/args tests in `packages/coding-agent/test`. |
@@ -7,7 +7,16 @@ This scorecard records how the implementation observed on 2026-07-01 aligned wit
7
7
  The audit was produced on 2026-07-01 with an Ultracode multi-agent pass and a local source review. It records
8
8
  the implementation as observed on that date, not the current architecture contract.
9
9
 
10
- ## Follow-up: 2026-07-15
10
+ ## Current follow-up: 2026-11-10
11
+
12
+ C3 supersedes the provider and cleanup claims in the historical follow-up below. Native `humain-code-account`
13
+ uses qualified selected-environment readiness and explicit persistent/session-only account lifetimes. Independent
14
+ Node, Gateway, Fuse, Local and DeployNow remain separate. Unsupported `humain-sso` and legacy env/API-key
15
+ `humain-code` registrations, fabricated models and startup tier deletion are removed. User tier files and inert
16
+ credentials remain untouched. Interactive, print, JSON and RPC finalizers await bounded memory-session revocation.
17
+ This is a targeted integration update, not a new audit or a live activation/release qualification.
18
+
19
+ ## Historical follow-up: 2026-07-15
11
20
 
12
21
  The HUMAIN routing and SSO simplification supersedes several current-state claims in the original audit below.
13
22
  The original scores, evidence, and required fixes remain unchanged as historical audit provenance; this targeted