@zhivex-ai/harness 1.6.3 → 1.8.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 (391) hide show
  1. package/CHANGELOG.md +16 -3
  2. package/README.md +17 -5
  3. package/SECURITY.md +1 -1
  4. package/SUPPORT.md +2 -2
  5. package/benchmarks/README.md +98 -0
  6. package/contracts/engine-api.json +1587 -0
  7. package/contracts/public-api.json +114 -0
  8. package/contracts/stable-api-signatures.json +17 -17
  9. package/dist/acp-cli.js +37 -1090
  10. package/dist/application/agenda.d.ts +10 -0
  11. package/dist/application/approval-review.d.ts +61 -0
  12. package/dist/application/assistant/automation/scheduler.d.ts +21 -0
  13. package/dist/application/assistant/automation/summary.d.ts +29 -0
  14. package/dist/application/assistant/automation/time.d.ts +10 -0
  15. package/dist/application/assistant/calendar/calendar.d.ts +238 -0
  16. package/dist/application/assistant/calendar/connection.d.ts +50 -0
  17. package/dist/application/assistant/calendar/create-event.d.ts +75 -0
  18. package/dist/application/assistant/calendar/environment.d.ts +2 -0
  19. package/dist/application/assistant/calendar/http.d.ts +6 -0
  20. package/dist/application/assistant/calendar/oauth.d.ts +68 -0
  21. package/dist/application/assistant/calendar/store.d.ts +11 -0
  22. package/dist/application/assistant/calendar/tools.d.ts +78 -0
  23. package/dist/application/assistant/client.d.ts +10 -0
  24. package/dist/application/assistant/config.d.ts +9 -0
  25. package/dist/application/assistant/contracts.d.ts +77 -0
  26. package/dist/application/assistant/daily/service.d.ts +181 -0
  27. package/dist/application/assistant/doctor.d.ts +22 -0
  28. package/dist/application/assistant/evaluation.d.ts +81 -0
  29. package/dist/application/assistant/host.d.ts +399 -0
  30. package/dist/application/assistant/integrations/google.d.ts +117 -0
  31. package/dist/application/assistant/integrations/public-web.d.ts +16 -0
  32. package/dist/application/assistant/managed/secrets.d.ts +10 -0
  33. package/dist/application/assistant/managed/setup-state.d.ts +346 -0
  34. package/dist/application/assistant/managed/setup.d.ts +492 -0
  35. package/dist/application/assistant/microsoft/connection.d.ts +73 -0
  36. package/dist/application/assistant/microsoft/tools.d.ts +78 -0
  37. package/dist/application/assistant/modules/calendar.d.ts +3 -0
  38. package/dist/application/assistant/modules/catalog.d.ts +38 -0
  39. package/dist/application/assistant/modules/daily.d.ts +5 -0
  40. package/dist/application/assistant/modules/github.d.ts +5 -0
  41. package/dist/application/assistant/modules/google.d.ts +3 -0
  42. package/dist/application/assistant/modules/mcp.d.ts +11 -0
  43. package/dist/application/assistant/modules/microsoft.d.ts +3 -0
  44. package/dist/application/assistant/modules/module.d.ts +224 -0
  45. package/dist/application/assistant/modules/tools.d.ts +11 -0
  46. package/dist/application/assistant/modules/web.d.ts +7 -0
  47. package/dist/application/assistant/private-directory.d.ts +3 -0
  48. package/dist/application/assistant/proactive/service.d.ts +142 -0
  49. package/dist/application/assistant/providers/openai-compatible.d.ts +66 -0
  50. package/dist/application/assistant/providers/provider.d.ts +141 -0
  51. package/dist/application/assistant/providers/web-citations.d.ts +2 -0
  52. package/dist/application/assistant/runtime.d.ts +16 -0
  53. package/dist/application/assistant/task-metrics.d.ts +304 -0
  54. package/dist/application/assistant/telegram/api.d.ts +47 -0
  55. package/dist/application/assistant/telegram/bridge.d.ts +69 -0
  56. package/dist/application/assistant/telegram/store.d.ts +10 -0
  57. package/dist/application/automation.d.ts +5 -0
  58. package/dist/application/calendar-review.d.ts +5 -0
  59. package/dist/application/checkpoint-review.d.ts +30 -0
  60. package/dist/application/client.d.ts +18 -0
  61. package/dist/application/code/context.d.ts +5 -0
  62. package/dist/application/code/delivery.d.ts +6 -0
  63. package/dist/application/code/git-delivery.d.ts +54 -0
  64. package/dist/application/code/github-git-transport.d.ts +15 -0
  65. package/dist/application/code/github-pr-transport.d.ts +6 -0
  66. package/dist/application/code/host.d.ts +25 -0
  67. package/dist/application/code/pr-delivery.d.ts +79 -0
  68. package/dist/application/code/projects.d.ts +90 -0
  69. package/dist/application/code/remote-delivery.d.ts +80 -0
  70. package/dist/application/code/repository.d.ts +9 -0
  71. package/dist/application/code/worktrees.d.ts +123 -0
  72. package/dist/application/contracts.d.ts +288 -0
  73. package/dist/application/coordinator-client.d.ts +33 -0
  74. package/dist/application/coordinator-discovery.d.ts +17 -0
  75. package/dist/application/coordinator-launcher.d.ts +2 -0
  76. package/dist/application/coordinator.d.ts +27 -0
  77. package/dist/application/credential-process.d.ts +13 -0
  78. package/dist/application/host.d.ts +7 -0
  79. package/dist/application/management.d.ts +68 -0
  80. package/dist/application/notes.d.ts +5 -0
  81. package/dist/application/offline-migration.d.ts +16 -0
  82. package/dist/application/personal-state.d.ts +5 -0
  83. package/dist/application/review-channel.d.ts +23 -0
  84. package/dist/application/review-tickets.d.ts +29 -0
  85. package/dist/application/runtime-binding.d.ts +4 -0
  86. package/dist/application-cli-wfh08g41.js +184 -0
  87. package/dist/application-cli-z3f9pvcf.js +209 -0
  88. package/dist/arguments-75r85mvc.js +27 -0
  89. package/dist/arguments-x24bbqvd.js +22 -0
  90. package/dist/audit/index.js +16 -472
  91. package/dist/audit-pack-1gnych0m.js +93 -0
  92. package/dist/{audit-pack-s9n693by.js → audit-pack-h44kjkbj.js} +17 -11
  93. package/dist/calendar-2xw0rr7b.js +49 -0
  94. package/dist/cli/application-cli.d.ts +2 -0
  95. package/dist/cli/arguments.d.ts +14 -1
  96. package/dist/cli/auto-approve-setup.d.ts +13 -0
  97. package/dist/cli/configured-harness.d.ts +1 -2
  98. package/dist/cli/console/console-budget.d.ts +16 -2
  99. package/dist/cli/console/console-checkpoints.d.ts +12 -0
  100. package/dist/cli/console/console-commands.d.ts +3 -3
  101. package/dist/cli/console/console-compaction.d.ts +1 -1
  102. package/dist/cli/console/console-diff.d.ts +2 -0
  103. package/dist/cli/console/console-input.d.ts +29 -1
  104. package/dist/cli/console/console-navigation.d.ts +2 -2
  105. package/dist/cli/console/console-outcome.d.ts +10 -0
  106. package/dist/cli/console/console-presentation.d.ts +17 -2
  107. package/dist/cli/console/console-pricing.d.ts +14 -0
  108. package/dist/cli/console/console-reasoning.d.ts +1 -1
  109. package/dist/cli/console/console-recovery.d.ts +2 -0
  110. package/dist/cli/console/console-review.d.ts +34 -0
  111. package/dist/cli/console/console-run-policy.d.ts +5 -0
  112. package/dist/cli/console/console-run-view.d.ts +28 -0
  113. package/dist/cli/console/console-task.d.ts +30 -0
  114. package/dist/cli/console/console-welcome.d.ts +13 -3
  115. package/dist/cli/console/review-diff.d.ts +20 -0
  116. package/dist/cli/presentation.d.ts +8 -6
  117. package/dist/cli/service-checkpoints.d.ts +234 -0
  118. package/dist/cli/terminal/activity-history.d.ts +4 -2
  119. package/dist/cli/terminal/activity-stream.d.ts +33 -0
  120. package/dist/cli/terminal/file-diff.d.ts +11 -0
  121. package/dist/cli/terminal/terminal-theme.d.ts +9 -0
  122. package/dist/cli/terminal/terminal-ui.d.ts +44 -2
  123. package/dist/cli/terminal/tool-activity.d.ts +6 -2
  124. package/dist/{cli-entry-hdtfef27.js → cli-entry-68kqraj7.js} +95 -43
  125. package/dist/{cli-entry-1epvek01.js → cli-entry-86rcbmwh.js} +294 -14
  126. package/dist/cli-entry-btkpb4h1.js +3627 -0
  127. package/dist/cli-entry-bxjbs6qq.js +200 -0
  128. package/dist/cli-entry-cpm89r9q.js +624 -0
  129. package/dist/{cli-entry-mbcq96nx.js → cli-entry-dksm56sj.js} +39 -293
  130. package/dist/{cli-entry-rsx0wpvs.js → cli-entry-eka68ttb.js} +4087 -4625
  131. package/dist/cli-entry-h7dcah4p.js +137 -0
  132. package/dist/cli-entry-kwk23ktq.js +33 -0
  133. package/dist/{cli-entry-nyzyvf24.js → cli-entry-vmce694z.js} +1286 -3142
  134. package/dist/cli-entry-wanv05db.js +1113 -0
  135. package/dist/{cli-yxvq8qf1.js → cli-z7vhm1rk.js} +1767 -380
  136. package/dist/cli.js +8 -6
  137. package/dist/client/json-contracts.d.ts +153 -0
  138. package/dist/client/local-service.d.ts +7 -12
  139. package/dist/client/local-transport.d.ts +14 -0
  140. package/dist/client/protocol.d.ts +43 -1
  141. package/dist/compat/cli-options.d.ts +7 -1
  142. package/dist/compat/cli.d.ts +2 -0
  143. package/dist/compat/cli.js +4043 -0
  144. package/dist/compat/code-support.d.ts +4 -0
  145. package/dist/compat/code-support.js +50 -28
  146. package/dist/{config-r9fdhce6.js → config-hw78440t.js} +5 -5
  147. package/dist/{config-vyajmksy.js → config-v7s8hp37.js} +1 -1
  148. package/dist/context/adaptive-compaction.d.ts +1 -0
  149. package/dist/context/lossless-lines.d.ts +13 -0
  150. package/dist/context/numbered-read-lines.d.ts +15 -0
  151. package/dist/context/read-attempts.d.ts +21 -0
  152. package/dist/context/request-projection.d.ts +32 -4
  153. package/dist/context/scoped-context.d.ts +31 -5
  154. package/dist/context/working-read-replay.d.ts +12 -0
  155. package/dist/coordinator-client-nzysqxf0.js +10 -0
  156. package/dist/engine/acp.js +27 -21
  157. package/dist/engine/application-client.d.ts +11 -0
  158. package/dist/engine/application-client.js +18 -0
  159. package/dist/engine/application-protocol.d.ts +5 -0
  160. package/dist/engine/application-protocol.js +7 -0
  161. package/dist/engine/application.d.ts +43 -0
  162. package/dist/engine/application.js +206 -0
  163. package/dist/engine/assistant/automation/scheduler.d.ts +2 -0
  164. package/dist/engine/assistant/automation/scheduler.js +11 -0
  165. package/dist/engine/assistant/automation/summary.d.ts +3 -0
  166. package/dist/engine/assistant/automation/summary.js +8 -0
  167. package/dist/engine/assistant/automation/time.d.ts +5 -0
  168. package/dist/engine/assistant/automation/time.js +15 -0
  169. package/dist/engine/assistant/calendar/calendar.d.ts +5 -0
  170. package/dist/engine/assistant/calendar/calendar.js +12 -0
  171. package/dist/engine/assistant/calendar/connection.d.ts +2 -0
  172. package/dist/engine/assistant/calendar/connection.js +11 -0
  173. package/dist/engine/assistant/calendar/environment.d.ts +1 -0
  174. package/dist/engine/assistant/calendar/environment.js +7 -0
  175. package/dist/engine/assistant/calendar/http.d.ts +3 -0
  176. package/dist/engine/assistant/calendar/http.js +9 -0
  177. package/dist/engine/assistant/calendar/oauth.d.ts +5 -0
  178. package/dist/engine/assistant/calendar/oauth.js +12 -0
  179. package/dist/engine/assistant/calendar/store.d.ts +2 -0
  180. package/dist/engine/assistant/calendar/store.js +8 -0
  181. package/dist/engine/assistant/calendar/tools.d.ts +2 -0
  182. package/dist/engine/assistant/calendar/tools.js +46 -0
  183. package/dist/engine/assistant/client.d.ts +2 -0
  184. package/dist/engine/assistant/client.js +33 -0
  185. package/dist/engine/assistant/config.d.ts +1 -0
  186. package/dist/engine/assistant/config.js +102 -0
  187. package/dist/engine/assistant/contracts.d.ts +10 -0
  188. package/dist/engine/assistant/contracts.js +78 -0
  189. package/dist/engine/assistant/daily/service.d.ts +12 -0
  190. package/dist/engine/assistant/daily/service.js +27 -0
  191. package/dist/engine/assistant/doctor.d.ts +1 -0
  192. package/dist/engine/assistant/doctor.js +116 -0
  193. package/dist/engine/assistant/evaluation.d.ts +2 -0
  194. package/dist/engine/assistant/evaluation.js +76 -0
  195. package/dist/engine/assistant/host.d.ts +2 -0
  196. package/dist/engine/assistant/host.js +63 -0
  197. package/dist/engine/assistant/integrations/google.d.ts +9 -0
  198. package/dist/engine/assistant/integrations/google.js +30 -0
  199. package/dist/engine/assistant/integrations/public-web.d.ts +3 -0
  200. package/dist/engine/assistant/integrations/public-web.js +11 -0
  201. package/dist/engine/assistant/managed/secrets.d.ts +1 -0
  202. package/dist/engine/assistant/managed/secrets.js +0 -0
  203. package/dist/engine/assistant/managed/setup-state.d.ts +11 -0
  204. package/dist/engine/assistant/managed/setup-state.js +84 -0
  205. package/dist/engine/assistant/managed/setup.d.ts +3 -0
  206. package/dist/engine/assistant/managed/setup.js +85 -0
  207. package/dist/engine/assistant/microsoft/connection.d.ts +7 -0
  208. package/dist/engine/assistant/microsoft/connection.js +21 -0
  209. package/dist/engine/assistant/microsoft/tools.d.ts +8 -0
  210. package/dist/engine/assistant/microsoft/tools.js +30 -0
  211. package/dist/engine/assistant/modules/calendar.d.ts +1 -0
  212. package/dist/engine/assistant/modules/calendar.js +49 -0
  213. package/dist/engine/assistant/modules/catalog.d.ts +3 -0
  214. package/dist/engine/assistant/modules/catalog.js +67 -0
  215. package/dist/engine/assistant/modules/daily.d.ts +1 -0
  216. package/dist/engine/assistant/modules/daily.js +48 -0
  217. package/dist/engine/assistant/modules/github.d.ts +1 -0
  218. package/dist/engine/assistant/modules/github.js +43 -0
  219. package/dist/engine/assistant/modules/google.d.ts +1 -0
  220. package/dist/engine/assistant/modules/google.js +53 -0
  221. package/dist/engine/assistant/modules/mcp.d.ts +1 -0
  222. package/dist/engine/assistant/modules/mcp.js +42 -0
  223. package/dist/engine/assistant/modules/microsoft.d.ts +1 -0
  224. package/dist/engine/assistant/modules/microsoft.js +53 -0
  225. package/dist/engine/assistant/modules/module.d.ts +5 -0
  226. package/dist/engine/assistant/modules/module.js +42 -0
  227. package/dist/engine/assistant/modules/tools.d.ts +2 -0
  228. package/dist/engine/assistant/modules/tools.js +42 -0
  229. package/dist/engine/assistant/modules/web.d.ts +1 -0
  230. package/dist/engine/assistant/modules/web.js +45 -0
  231. package/dist/engine/assistant/private-directory.d.ts +1 -0
  232. package/dist/engine/assistant/private-directory.js +7 -0
  233. package/dist/engine/assistant/proactive/service.d.ts +6 -0
  234. package/dist/engine/assistant/proactive/service.js +16 -0
  235. package/dist/engine/assistant/providers/openai-compatible.d.ts +4 -0
  236. package/dist/engine/assistant/providers/openai-compatible.js +12 -0
  237. package/dist/engine/assistant/providers/provider.d.ts +7 -0
  238. package/dist/engine/assistant/providers/provider.js +54 -0
  239. package/dist/engine/assistant/providers/web-citations.d.ts +1 -0
  240. package/dist/engine/assistant/providers/web-citations.js +7 -0
  241. package/dist/engine/assistant/runtime.d.ts +2 -0
  242. package/dist/engine/assistant/runtime.js +73 -0
  243. package/dist/engine/assistant/task-metrics.d.ts +8 -0
  244. package/dist/engine/assistant/task-metrics.js +17 -0
  245. package/dist/engine/assistant/telegram/api.d.ts +5 -0
  246. package/dist/engine/assistant/telegram/api.js +11 -0
  247. package/dist/engine/assistant/telegram/bridge.d.ts +2 -0
  248. package/dist/engine/assistant/telegram/bridge.js +40 -0
  249. package/dist/engine/assistant/telegram/store.d.ts +2 -0
  250. package/dist/engine/assistant/telegram/store.js +8 -0
  251. package/dist/engine/client.js +26 -18
  252. package/dist/engine/desktop-providers-v1.js +4 -4
  253. package/dist/engine/desktop-state-v1.js +16 -13
  254. package/dist/engine/index.d.ts +4 -0
  255. package/dist/engine/index.js +117 -159
  256. package/dist/engine/mcp-stdio-v1.js +13 -12
  257. package/dist/engine/models.js +65 -23
  258. package/dist/engine/protocol.js +10 -6
  259. package/dist/engine/service.js +32 -21
  260. package/dist/hostile-repository-demo.js +2329 -1096
  261. package/dist/index-09rsdr2d.js +1744 -0
  262. package/dist/index-0csc5sc7.js +139 -0
  263. package/dist/{index-4mn6m3bq.js → index-0dkty795.js} +8 -6
  264. package/dist/index-0kkgqvg7.js +0 -0
  265. package/dist/index-0mzz9axm.js +58 -0
  266. package/dist/index-1e69ar8r.js +38 -0
  267. package/dist/index-1z0xhkh9.js +18 -0
  268. package/dist/index-2cef1k92.js +356 -0
  269. package/dist/{index-rgqzdgv6.js → index-2j0v1xwr.js} +17 -13
  270. package/dist/index-2jw9jd7h.js +116 -0
  271. package/dist/index-2n9qx4km.js +0 -0
  272. package/dist/index-3rvk23e8.js +877 -0
  273. package/dist/index-3wa4j0yk.js +71 -0
  274. package/dist/index-41q1k17x.js +210 -0
  275. package/dist/index-4vz4bqqw.js +33 -0
  276. package/dist/index-5jxm2wy5.js +123 -0
  277. package/dist/index-5rk6ss42.js +216 -0
  278. package/dist/index-5v1skxf7.js +1852 -0
  279. package/dist/{index-fqqz1yt8.js → index-6ehtssyz.js} +369 -335
  280. package/dist/index-76kpdbpw.js +80 -0
  281. package/dist/{index-5nmm0642.js → index-7nbmhmw5.js} +10 -10
  282. package/dist/index-8mx0yrkz.js +31 -0
  283. package/dist/index-8tjev5ds.js +11 -0
  284. package/dist/index-91n5wr6s.js +163 -0
  285. package/dist/index-91trs3ew.js +151 -0
  286. package/dist/index-9y8p5vy5.js +222 -0
  287. package/dist/index-abxahprd.js +55 -0
  288. package/dist/index-aptyr511.js +84 -0
  289. package/dist/{index-8sm2a1wa.js → index-ay26xfxt.js} +28 -20
  290. package/dist/index-b4yed1s3.js +657 -0
  291. package/dist/index-bb7phvtg.js +23 -0
  292. package/dist/index-bk5tn9b8.js +236 -0
  293. package/dist/index-bw34861c.js +292 -0
  294. package/dist/index-c6fnjhgv.js +55 -0
  295. package/dist/{index-qfsrrnz6.js → index-cjevq9s8.js} +2 -2
  296. package/dist/{index-c39197wq.js → index-ctcwrkrc.js} +4 -4
  297. package/dist/{index-yx52bt4a.js → index-cztmcesv.js} +2 -2
  298. package/dist/index-dpbmxnrf.js +564 -0
  299. package/dist/index-ekxdcy36.js +134 -0
  300. package/dist/index-f8zpcsx3.js +289 -0
  301. package/dist/{index-6dxrbnxm.js → index-f970qtb4.js} +7 -143
  302. package/dist/index-fatcn6fp.js +2791 -0
  303. package/dist/index-fbzykqxy.js +105 -0
  304. package/dist/{index-1265j7t2.js → index-fwf274vc.js} +24 -14
  305. package/dist/index-fy4w0a7v.js +0 -0
  306. package/dist/index-gvva3e5x.js +76 -0
  307. package/dist/index-h7dcah4p.js +137 -0
  308. package/dist/index-hm9r120s.js +42 -0
  309. package/dist/index-j3d2tw97.js +328 -0
  310. package/dist/index-jfqj20x8.js +41 -0
  311. package/dist/{index-hhrnrqfc.js → index-k529a278.js} +6 -6
  312. package/dist/{index-bt2p8x7r.js → index-kbrf5bx7.js} +110 -106
  313. package/dist/index-kwk23ktq.js +33 -0
  314. package/dist/index-kz857p1j.js +557 -0
  315. package/dist/{index-j466sekf.js → index-mkt5yrax.js} +31 -105
  316. package/dist/{index-nxmk6re7.js → index-ndgnvjez.js} +18 -18
  317. package/dist/index-nemn4epv.js +43 -0
  318. package/dist/index-nkwy5bjr.js +1225 -0
  319. package/dist/index-nvvzr4ny.js +136 -0
  320. package/dist/index-pkspzsfs.js +78 -0
  321. package/dist/{index-fm84men1.js → index-px1tnqgt.js} +2 -2
  322. package/dist/index-q7qdw883.js +79 -0
  323. package/dist/{index-mzydbzp8.js → index-qvbg6tx1.js} +65 -23
  324. package/dist/index-r3mwr5fb.js +0 -0
  325. package/dist/index-rdr78m0k.js +91 -0
  326. package/dist/index-rtamqsfs.js +59 -0
  327. package/dist/index-s125ss45.js +38 -0
  328. package/dist/{index-vn91b9z1.js → index-sx1t6dnd.js} +3721 -2382
  329. package/dist/index-tar0ngkm.js +359 -0
  330. package/dist/index-tn58cr6w.js +471 -0
  331. package/dist/{index-w0m1nckc.js → index-v79s9bf9.js} +118 -45
  332. package/dist/index-vk3rq21m.js +17 -0
  333. package/dist/index-vmvnr28y.js +72 -0
  334. package/dist/index-vz629cg8.js +49 -0
  335. package/dist/{index-eps3c3g6.js → index-w292hdpz.js} +197 -960
  336. package/dist/{index-amjttjaj.js → index-w9eqg6p9.js} +24 -302
  337. package/dist/index-wj96kdw2.js +57 -0
  338. package/dist/index-wyck5yhd.js +141 -0
  339. package/dist/index-xvtk8pxs.js +674 -0
  340. package/dist/{index-bpc596v3.js → index-xwb691v9.js} +2 -2
  341. package/dist/index-ym69x168.js +518 -0
  342. package/dist/index-yprdjk9v.js +65 -0
  343. package/dist/index-z2a81ccr.js +35 -0
  344. package/dist/{index-3ah1f369.js → index-z69cqk74.js} +3 -3
  345. package/dist/index-zaakvmzq.js +62 -0
  346. package/dist/index-zk3m4mzg.js +232 -0
  347. package/dist/index-zx3wgvx4.js +218 -0
  348. package/dist/index.js +102 -83
  349. package/dist/persistence/migration-guard.d.ts +3 -0
  350. package/dist/runtime/agent-profile.d.ts +12 -0
  351. package/dist/runtime/harness.d.ts +13 -0
  352. package/dist/runtime/known-file-preload.d.ts +35 -0
  353. package/dist/service-cli.js +130 -40
  354. package/dist/service-client-cli-2rzxy5mj.js +1166 -0
  355. package/dist/service-client-cli-5ne8q5ej.js +543 -0
  356. package/dist/tools/ooxml-zip.d.ts +21 -0
  357. package/dist/tools/presentations.d.ts +47 -0
  358. package/dist/tools/tabular-data.d.ts +114 -0
  359. package/dist/tools/workspace.d.ts +76 -0
  360. package/dist/verify-historical-migrations.js +2249 -1016
  361. package/dist/workspace/workspace.d.ts +13 -1
  362. package/dist/zhx.js +8 -6
  363. package/docs/APPLICATION_MIGRATION.md +32 -0
  364. package/docs/CLI.md +166 -2
  365. package/docs/CODE_RELEASE.md +11 -5
  366. package/docs/CODE_WEB_TASKS.md +3 -114
  367. package/docs/CONTEXT_ENGINEERING.md +93 -0
  368. package/docs/ENGINE_API.md +9 -2
  369. package/docs/EXTENSIBILITY.md +1 -1
  370. package/docs/FIRST_USE.md +6 -6
  371. package/docs/INTERNAL_ARCHIVE.md +43 -0
  372. package/docs/LOCAL_SERVICE.md +1 -1
  373. package/docs/MODEL_CATALOG.md +14 -0
  374. package/docs/PROJECT_MEMORY.md +1 -1
  375. package/docs/README.md +23 -4
  376. package/evaluations/representative-assembly-matrix.json +19 -1
  377. package/examples/README.md +4 -4
  378. package/examples/assistant/compatible-calendar.json +17 -0
  379. package/examples/assistant/composed-modules.json +23 -0
  380. package/examples/assistant/connected-tools.json +9 -0
  381. package/examples/assistant/daily-tools.json +6 -0
  382. package/examples/assistant/offline.mjs +24 -0
  383. package/fixtures/cli-compatibility/README.md +10 -0
  384. package/fixtures/cli-compatibility/inventory.json +7858 -0
  385. package/package.json +232 -26
  386. package/dist/cli/console/console-model-catalog.d.ts +0 -8
  387. package/dist/index-2yyfg69h.js +0 -619
  388. package/dist/index-3wwfn5n6.js +0 -270
  389. package/dist/index-4gt045j0.js +0 -288
  390. package/dist/index-4jw3tvy8.js +0 -301
  391. package/dist/service-client-cli-xbj7j5kj.js +0 -1251
@@ -0,0 +1,49 @@
1
+ import {
2
+ createCalendarModule
3
+ } from "./index-1e69ar8r.js";
4
+ import"./index-8mx0yrkz.js";
5
+ import"./index-0csc5sc7.js";
6
+ import"./index-vk3rq21m.js";
7
+ import"./index-41q1k17x.js";
8
+ import"./index-fbzykqxy.js";
9
+ import"./index-2cef1k92.js";
10
+ import"./index-hm9r120s.js";
11
+ import"./index-fy4w0a7v.js";
12
+ import"./index-pkspzsfs.js";
13
+ import"./index-w292hdpz.js";
14
+ import"./index-b4yed1s3.js";
15
+ import"./index-j3d2tw97.js";
16
+ import"./index-nvvzr4ny.js";
17
+ import"./index-f8zpcsx3.js";
18
+ import"./index-2j0v1xwr.js";
19
+ import"./index-z69cqk74.js";
20
+ import"./index-mkt5yrax.js";
21
+ import"./index-ay26xfxt.js";
22
+ import"./index-1z0xhkh9.js";
23
+ import"./index-q7qdw883.js";
24
+ import"./index-0dkty795.js";
25
+ import"./index-sx1t6dnd.js";
26
+ import"./index-k529a278.js";
27
+ import"./index-bw34861c.js";
28
+ import"./index-w9eqg6p9.js";
29
+ import"./index-v79s9bf9.js";
30
+ import"./index-fwf274vc.js";
31
+ import"./index-ctcwrkrc.js";
32
+ import"./index-qvbg6tx1.js";
33
+ import"./index-7nbmhmw5.js";
34
+ import"./index-cztmcesv.js";
35
+ import"./index-kbrf5bx7.js";
36
+ import"./index-kwk23ktq.js";
37
+ import"./index-6ehtssyz.js";
38
+ import"./index-f970qtb4.js";
39
+ import"./index-h7dcah4p.js";
40
+ import"./index-3wa4j0yk.js";
41
+ import"./index-rdr78m0k.js";
42
+ import"./index-5jxm2wy5.js";
43
+ import"./index-xwb691v9.js";
44
+ import"./index-px1tnqgt.js";
45
+ import"./index-76kpdbpw.js";
46
+ import"./index-1bx83sw4.js";
47
+ export {
48
+ createCalendarModule
49
+ };
@@ -0,0 +1,2 @@
1
+ import type { CliOptions } from './arguments.js';
2
+ export declare function useApplicationCli(options: CliOptions): Promise<string | undefined>;
@@ -2,7 +2,7 @@ import { type HarnessReasoningEffort } from "../providers/reasoning.js";
2
2
  import { type AgentStatus } from "@zhivex-ai/agents";
3
3
  import { type HarnessSubagentProfile } from "../runtime/config.js";
4
4
  import { HarnessError } from "../runtime/errors.js";
5
- export declare const CLI_COMMANDS: readonly ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "memory", "export-audit", "verify-audit", "help", "version"];
5
+ export declare const CLI_COMMANDS: readonly ["automations", "personal", "agents", "connections", "projects", "application", "init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "memory", "export-audit", "verify-audit", "help", "version"];
6
6
  export declare const CLI_RUNS_COMMANDS: readonly ["list", "inspect", "cancel", "cleanup", "export", "report"];
7
7
  export declare const CLI_SESSIONS_COMMANDS: readonly ["list", "inspect", "rename", "fork", "archive"];
8
8
  export declare const CLI_CHANGES_COMMANDS: readonly ["create", "verify"];
@@ -16,6 +16,19 @@ export interface CliOptions {
16
16
  compactionModel?: string;
17
17
  compactionProvider?: string;
18
18
  serviceFile?: string;
19
+ autoApproveMode?: "manual" | "auto-edits" | "auto-limits";
20
+ autoApproveAllow?: string[];
21
+ applicationDirectory?: string;
22
+ applicationArea?: "assistant" | "code";
23
+ managementAction?: string;
24
+ managementArgs?: string[];
25
+ managementInput?: unknown;
26
+ automationCommand?: "status" | "apply";
27
+ personalCommand?: "tasks" | "reminders" | "notes" | "search-notes" | "note";
28
+ personalQuery?: string;
29
+ personalNoteId?: string;
30
+ personalOffset?: number;
31
+ applicationCommand?: "status" | "start" | "stop";
19
32
  command: Command;
20
33
  helpTopic?: string;
21
34
  profile?: string;
@@ -0,0 +1,13 @@
1
+ import { type ApprovalConfigFile, type AutoApproveMode } from "../compat/code-support.js";
2
+ import type { CliOptions } from "./arguments.js";
3
+ /** Session override wins over the CLI flag, which wins over `.zhivex-harness/approval.json`. */
4
+ export declare const createAutoApproveController: (workspace: string, options: CliOptions, file: ApprovalConfigFile) => {
5
+ policy(overLimit?: boolean): import("../approvals/auto-approve.js").AutoApprovePolicy;
6
+ setSession(mode: AutoApproveMode): void;
7
+ saveWorkspace(mode: AutoApproveMode): Promise<void>;
8
+ };
9
+ export declare const openAutoApproveController: (workspace: string, options: CliOptions) => Promise<{
10
+ policy(overLimit?: boolean): import("../approvals/auto-approve.js").AutoApprovePolicy;
11
+ setSession(mode: AutoApproveMode): void;
12
+ saveWorkspace(mode: AutoApproveMode): Promise<void>;
13
+ }>;
@@ -1,11 +1,10 @@
1
1
  import { CliCredentials } from "./cli-credentials.js";
2
- import { ConsoleInput } from "./console/console-input.js";
3
2
  import { type HarnessSubagentProfile } from "../runtime/config.js";
4
3
  import { type HarnessModelRoute } from "../providers/routing.js";
5
4
  import { type CliOptions } from "./arguments.js";
6
5
  export declare const createConfiguredHarness: (options: CliOptions, extraProfiles?: readonly HarnessSubagentProfile[], persistedRoutes?: ReadonlyMap<HarnessSubagentProfile, HarnessModelRoute>, credentials?: {
7
6
  store: CliCredentials;
8
- input: ConsoleInput;
7
+ input: Parameters<CliCredentials["providerEnvironment"]>[1];
9
8
  }) => Promise<{
10
9
  harness: import("../index.js").ZhivexHarness;
11
10
  routes: ReadonlyMap<"explorer" | "implementer" | "reviewer" | "tester", HarnessModelRoute>;
@@ -1,14 +1,28 @@
1
1
  import type { CliOptions } from "../arguments.js";
2
2
  import { type HarnessConfig, type HarnessConfigInput } from "../../runtime/config.js";
3
3
  import type { TokenUsage } from "@zhivex-ai/core";
4
- /** Only new local console sessions change defaults. Explicit limits always opt
4
+ /** Web keeps finite engine ceilings, including read-only tools, unless the launch sets a number. */
5
+ export declare const webBudgetOptions: <T extends HarnessConfigInput>(options: T, env?: NodeJS.ProcessEnv) => T & {
6
+ unlimitedSteps: boolean;
7
+ unlimitedToolCalls: boolean;
8
+ unlimitedDuration: boolean;
9
+ unlimitedTokens: boolean;
10
+ };
11
+ /** Only the interactive console opts into unlimited ceilings. Explicit limits opt
5
12
  * into bounded execution; SDK, service hosts and automation retain their policy. */
13
+ export declare const interactiveBudgetOptions: <T extends HarnessConfigInput>(options: T, env?: NodeJS.ProcessEnv) => T & {
14
+ unlimitedSteps: boolean;
15
+ unlimitedToolCalls: boolean;
16
+ unlimitedDuration: boolean;
17
+ unlimitedTokens: boolean;
18
+ };
19
+ /** Terminal-specific error tolerance must not replace Web's existing guard. */
6
20
  export declare const consoleBudgetOptions: <T extends HarnessConfigInput>(options: T, env?: NodeJS.ProcessEnv) => T & {
7
- maxToolErrors?: number;
8
21
  unlimitedSteps: boolean;
9
22
  unlimitedToolCalls: boolean;
10
23
  unlimitedDuration: boolean;
11
24
  unlimitedTokens: boolean;
25
+ maxToolErrors?: number;
12
26
  };
13
27
  /** A saved run owns its budget, including legacy runs without a mode flag. */
14
28
  export declare const restoreConsoleOptions: (current: CliOptions, saved: Partial<CliOptions>) => CliOptions;
@@ -0,0 +1,12 @@
1
+ import type { CliSession, CliSessionStore } from "../../persistence/sessions.js";
2
+ import type { Workspace } from "../../workspace/workspace.js";
3
+ import type { ConsoleInput } from "./console-input.js";
4
+ export declare const handleConsoleCheckpoint: (command: string, context: {
5
+ workspace: Workspace;
6
+ sessions: CliSessionStore;
7
+ session: CliSession;
8
+ input: Pick<ConsoleInput, "select" | "question">;
9
+ hasActiveTurn: () => Promise<unknown>;
10
+ restoreSession: (session: CliSession) => Promise<void>;
11
+ write?: (text: string) => void;
12
+ }) => Promise<boolean>;
@@ -1,6 +1,6 @@
1
1
  /** Presentation shared by the direct console and the local-service client. */
2
- export declare const CONSOLE_COMMAND_CATALOG: readonly [readonly ["/menu", "Open navigation menu", true], readonly ["/help", "Show commands; /help all shows everything", true], readonly ["/connection", "Inspect credentials and optionally test selected model access", false], readonly ["/credentials", "Manage provider keys in the system keychain or this session", false], readonly ["/provider", "Select a provider", false], readonly ["/model", "Select a model and reasoning effort", false], readonly ["/reasoning", "Choose reasoning effort for the current model", false], readonly ["/route", "Configure specialist model routes", false], readonly ["/status", "Inspect the current session and run", true], readonly ["/diff", "Review workspace changes", false], readonly ["/review", "Review a task", false], readonly ["/resume", "Reopen a conversation by session ID", true], readonly ["/pending", "Inspect pending approvals", true], readonly ["/approve", "Approve the pending actions", true], readonly ["/deny", "Deny the pending actions", true], readonly ["/approvals", "Change approval mode for this CLI session", false], readonly ["/continue", "Continue an interrupted task with retained results in a new run", false], readonly ["/compact", "Compact conversation context", false], readonly ["/compaction", "Choose a compaction model or inspect recommendations", false], readonly ["/new", "Start a new conversation", true], readonly ["/rename", "Rename the current conversation", true], readonly ["/clear", "Clear conversation context", false], readonly ["/exit", "Exit the console", true], readonly ["/paste", "Compose a literal multiline draft", true], readonly ["/activity", "Show recent activity; /activity clear resets it", true], readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true], readonly ["/verbose", "Toggle full or compact activity details", false], readonly ["/context", "Inspect project rules and selected context", false], readonly ["/attach", "Attach a workspace file to the next request", false], readonly ["/attachments", "List selected attachments", false], readonly ["/detach", "Remove selected attachments", false], readonly ["/sessions", "Find saved conversations", true], readonly ["/limits", "Inspect or change the step limit for next turns", false], readonly ["/usage", "Inspect transport usage", false], readonly ["/cancel", "Cancel the active run", true]];
2
+ export declare const CONSOLE_COMMAND_CATALOG: readonly [readonly ["/menu", "Open navigation menu", true], readonly ["/theme", "Choose light, dark or system terminal colors", true], readonly ["/help", "Show commands; /help all shows everything", true], readonly ["/connection", "Inspect credentials and optionally test selected model access", false], readonly ["/credentials", "Manage provider keys in the system keychain or this session", false], readonly ["/provider", "Select a provider", false], readonly ["/model", "Select a model and reasoning effort", false], readonly ["/reasoning", "Choose reasoning effort for the current model", false], readonly ["/route", "Configure specialist model routes", false], readonly ["/status", "Inspect the current session and run", true], readonly ["/diff", "Review workspace changes", false], readonly ["/task", "Define, review, keep or revise a bounded task", false], readonly ["/checkpoint", "Capture, review and restore selected text files", false], readonly ["/budget", "Set estimated USD policy for each next run", false], readonly ["/pricing", "Inspect advisory model prices and their source", false], readonly ["/review", "Review a task", false], readonly ["/resume", "Reopen a conversation by session ID", true], readonly ["/pending", "Inspect pending approvals", true], readonly ["/approve", "Approve the pending actions", true], readonly ["/deny", "Deny the pending actions", true], readonly ["/approvals", "Change approval mode for this CLI session", false], readonly ["/auto-approve", "Set Manual, Auto-edits, or Auto with limits for this session", false], readonly ["/manual", "Drop auto-approve back to Manual for this session", true], readonly ["/undo", "Revert the latest auto-approved file change", false], readonly ["/continue", "Continue an interrupted task with retained results in a new run", false], readonly ["/compact", "Compact conversation context", false], readonly ["/compaction", "Choose a compaction model or inspect recommendations", false], readonly ["/new", "Start a new conversation", true], readonly ["/rename", "Rename the current conversation", true], readonly ["/clear", "Clear conversation context", false], readonly ["/exit", "Exit the console", true], readonly ["/paste", "Compose a literal multiline draft", true], readonly ["/activity", "Show recent activity; /activity clear resets it", true], readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true], readonly ["/verbose", "Toggle full or compact activity details", false], readonly ["/context", "Inspect project rules and selected context", false], readonly ["/attach", "Attach a workspace file to the next request", false], readonly ["/attachments", "List selected attachments", false], readonly ["/detach", "Remove selected attachments", false], readonly ["/sessions", "Find saved conversations", true], readonly ["/limits", "Inspect or change the step limit for next turns", false], readonly ["/usage", "Inspect transport usage", false], readonly ["/cancel", "Cancel the active run", true]];
3
3
  export type ConsoleMode = "direct" | "service";
4
- export declare const consoleCommands: (mode?: ConsoleMode) => (readonly ["/activity", "Show recent activity; /activity clear resets it", true] | readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model and reasoning effort", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/provider", "Select a provider", false] | readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true] | readonly ["/reasoning", "Choose reasoning effort for the current model", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
5
- export declare const searchConsoleCommands: (query: string, mode?: ConsoleMode) => (readonly ["/activity", "Show recent activity; /activity clear resets it", true] | readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model and reasoning effort", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/provider", "Select a provider", false] | readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true] | readonly ["/reasoning", "Choose reasoning effort for the current model", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
4
+ export declare const consoleCommands: (mode?: ConsoleMode) => (readonly ["/activity", "Show recent activity; /activity clear resets it", true] | readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/auto-approve", "Set Manual, Auto-edits, or Auto with limits for this session", false] | readonly ["/budget", "Set estimated USD policy for each next run", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/checkpoint", "Capture, review and restore selected text files", false] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/manual", "Drop auto-approve back to Manual for this session", true] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model and reasoning effort", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/pricing", "Inspect advisory model prices and their source", false] | readonly ["/provider", "Select a provider", false] | readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true] | readonly ["/reasoning", "Choose reasoning effort for the current model", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/task", "Define, review, keep or revise a bounded task", false] | readonly ["/theme", "Choose light, dark or system terminal colors", true] | readonly ["/undo", "Revert the latest auto-approved file change", false] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
5
+ export declare const searchConsoleCommands: (query: string, mode?: ConsoleMode) => (readonly ["/activity", "Show recent activity; /activity clear resets it", true] | readonly ["/approvals", "Change approval mode for this CLI session", false] | readonly ["/approve", "Approve the pending actions", true] | readonly ["/attach", "Attach a workspace file to the next request", false] | readonly ["/attachments", "List selected attachments", false] | readonly ["/auto-approve", "Set Manual, Auto-edits, or Auto with limits for this session", false] | readonly ["/budget", "Set estimated USD policy for each next run", false] | readonly ["/cancel", "Cancel the active run", true] | readonly ["/checkpoint", "Capture, review and restore selected text files", false] | readonly ["/clear", "Clear conversation context", false] | readonly ["/compact", "Compact conversation context", false] | readonly ["/compaction", "Choose a compaction model or inspect recommendations", false] | readonly ["/connection", "Inspect credentials and optionally test selected model access", false] | readonly ["/context", "Inspect project rules and selected context", false] | readonly ["/continue", "Continue an interrupted task with retained results in a new run", false] | readonly ["/credentials", "Manage provider keys in the system keychain or this session", false] | readonly ["/deny", "Deny the pending actions", true] | readonly ["/detach", "Remove selected attachments", false] | readonly ["/diff", "Review workspace changes", false] | readonly ["/exit", "Exit the console", true] | readonly ["/help", "Show commands; /help all shows everything", true] | readonly ["/limits", "Inspect or change the step limit for next turns", false] | readonly ["/manual", "Drop auto-approve back to Manual for this session", true] | readonly ["/menu", "Open navigation menu", true] | readonly ["/model", "Select a model and reasoning effort", false] | readonly ["/new", "Start a new conversation", true] | readonly ["/paste", "Compose a literal multiline draft", true] | readonly ["/pending", "Inspect pending approvals", true] | readonly ["/pricing", "Inspect advisory model prices and their source", false] | readonly ["/provider", "Select a provider", false] | readonly ["/queue", "Inspect queued tasks; /queue clear discards them", true] | readonly ["/reasoning", "Choose reasoning effort for the current model", false] | readonly ["/rename", "Rename the current conversation", true] | readonly ["/resume", "Reopen a conversation by session ID", true] | readonly ["/review", "Review a task", false] | readonly ["/route", "Configure specialist model routes", false] | readonly ["/sessions", "Find saved conversations", true] | readonly ["/status", "Inspect the current session and run", true] | readonly ["/task", "Define, review, keep or revise a bounded task", false] | readonly ["/theme", "Choose light, dark or system terminal colors", true] | readonly ["/undo", "Revert the latest auto-approved file change", false] | readonly ["/usage", "Inspect transport usage", false] | readonly ["/verbose", "Toggle full or compact activity details", false])[];
6
6
  export declare const formatConsoleHelp: (mode?: ConsoleMode, all?: boolean) => string;
@@ -1,6 +1,6 @@
1
1
  import type { CliOptions } from "../arguments.js";
2
2
  import type { HarnessConfig, HarnessProvider } from "../../runtime/config.js";
3
- import { type CatalogSnapshot } from "../../models/catalog-store.js";
3
+ import { type CatalogSnapshot } from "../../compat/code-support.js";
4
4
  export interface ConsoleCompactionDependencies {
5
5
  config: HarnessConfig;
6
6
  options: CliOptions;
@@ -0,0 +1,2 @@
1
+ import type { Workspace } from '../../workspace/workspace.js';
2
+ export declare function consoleWorkspaceDiff(workspace: Workspace, color?: boolean): Promise<string>;
@@ -1,7 +1,8 @@
1
1
  import { type Readable, Writable } from "node:stream";
2
2
  import { type ConsoleComposerInput } from "./console-presentation.js";
3
3
  import { type ConsoleMode } from "./console-commands.js";
4
- export declare const CONSOLE_COMMANDS: ("/activity" | "/approvals" | "/approve" | "/attach" | "/attachments" | "/cancel" | "/clear" | "/compact" | "/compaction" | "/connection" | "/context" | "/continue" | "/credentials" | "/deny" | "/detach" | "/diff" | "/exit" | "/help" | "/limits" | "/menu" | "/model" | "/new" | "/paste" | "/pending" | "/provider" | "/queue" | "/reasoning" | "/rename" | "/resume" | "/review" | "/route" | "/sessions" | "/status" | "/usage" | "/verbose")[];
4
+ import { type ConsoleReview } from "./console-review.js";
5
+ export declare const CONSOLE_COMMANDS: ("/activity" | "/approvals" | "/approve" | "/attach" | "/attachments" | "/auto-approve" | "/budget" | "/cancel" | "/checkpoint" | "/clear" | "/compact" | "/compaction" | "/connection" | "/context" | "/continue" | "/credentials" | "/deny" | "/detach" | "/diff" | "/exit" | "/help" | "/limits" | "/manual" | "/menu" | "/model" | "/new" | "/paste" | "/pending" | "/pricing" | "/provider" | "/queue" | "/reasoning" | "/rename" | "/resume" | "/review" | "/route" | "/sessions" | "/status" | "/task" | "/theme" | "/undo" | "/usage" | "/verbose")[];
5
6
  export declare const MAX_CONSOLE_INPUT_BYTES: number;
6
7
  export declare const completeConsoleCommand: (line: string) => [string[], string];
7
8
  /** Background drafts and queued tasks are separate from fresh approval answers. */
@@ -33,17 +34,44 @@ export declare class ConsoleInput {
33
34
  private historyDraft;
34
35
  private historyDraftWasPaste;
35
36
  private pending;
37
+ private focusState;
36
38
  private paste;
37
39
  onInterrupt: (() => void) | undefined;
38
40
  constructor(input: Readable, output: Writable, terminal?: boolean, mode?: ConsoleMode);
39
41
  private selection;
42
+ private reviewing;
43
+ private reviewOffset;
44
+ private reviewPage;
45
+ private reviewNotice;
46
+ private reviewHunks;
47
+ private manualRequest;
48
+ private reviewWrapped;
49
+ /** Lines of the inline review currently on screen. Zero before the first paint. */
50
+ private reviewLinesDrawn;
40
51
  private selectionMatches;
41
52
  private finishSelection;
42
53
  select<T>(title: string, items: readonly {
43
54
  value: T;
44
55
  label: string;
45
56
  detail?: string;
57
+ key?: string;
46
58
  }[]): Promise<T | undefined>;
59
+ /** One-key drop to Manual while a review is open. The current change still needs a decision. */
60
+ onManual(handler: () => void): void;
61
+ review<T>(review: ConsoleReview, items: readonly {
62
+ value: T;
63
+ label: string;
64
+ detail?: string;
65
+ key?: string;
66
+ }[]): Promise<T | undefined>;
67
+ /** Drop the inline review so the next transcript line continues under the activity line. */
68
+ private eraseReview;
69
+ private styleReviewLine;
70
+ /**
71
+ * Draw the review where the cursor already is. A short diff stays under the
72
+ * activity line. Only a diff that fills the screen starts at the top.
73
+ */
74
+ private paintReview;
47
75
  private taskPrompt;
48
76
  private shortcutsShown;
49
77
  private historySearch;
@@ -1,6 +1,6 @@
1
- import type { HarnessReasoningEffort } from "../../providers/reasoning.js";
1
+ import type { HarnessReasoningEffort } from "../../compat/code-support.js";
2
2
  import type { ConsoleInput } from "./console-input.js";
3
- import { type ModelCatalog } from "../../models/catalog.js";
3
+ import { type ModelCatalog } from "../../compat/code-support.js";
4
4
  import type { ProviderAvailability } from "../../providers/providers.js";
5
5
  export declare const consoleModelChoices: (provider: string, defaultModel: string, current?: string, catalog?: ModelCatalog) => {
6
6
  value: string;
@@ -0,0 +1,10 @@
1
+ import type { AgentRunOutput } from "@zhivex-ai/agents";
2
+ /** One honest line. Errors and rejections stay visible. Checks are named only when receipts exist. */
3
+ export declare const formatConsoleOutcome: (result: Pick<AgentRunOutput, "status" | "toolResults"> & {
4
+ state?: Pick<AgentRunOutput["state"], "approvalHistory">;
5
+ }, appliedFiles: number, denied: number, diff?: {
6
+ added: number;
7
+ removed: number;
8
+ }) => string;
9
+ /** Visual break between turns: a rule, the summary, and a blank line before the next task. */
10
+ export declare const formatTurnBanner: (summary: string) => string;
@@ -1,3 +1,5 @@
1
+ /** Hard-wrap without dropping spaces or code characters. Only trusted styles follow. */
2
+ export declare const consoleLines: (text: string, width: number) => string[];
1
3
  /** Bound presentation metadata without allowing paths/titles to control the terminal. */
2
4
  export declare const consoleLabel: (text: string, width: number) => string;
3
5
  export interface ConsoleComposerInput {
@@ -8,17 +10,30 @@ export interface ConsoleComposerInput {
8
10
  attachments?: number;
9
11
  automaticApprovals?: boolean;
10
12
  approvalMode?: "ask" | "auto" | "restricted";
13
+ autoApproveMode?: "manual" | "auto-edits" | "auto-limits";
14
+ runUsage?: {
15
+ estimatedUsd: number | null;
16
+ limitUsd: number | null;
17
+ usageComplete: boolean;
18
+ };
19
+ nextLimitUsd?: number | null;
20
+ contextTokens?: number;
11
21
  }
12
22
  export declare const consoleWidth: (columns?: number) => number;
23
+ /** One composer/dock line. Cost appears only for a real cap or an incomplete capped run. */
24
+ export declare const consoleStatusParts: (input: ConsoleComposerInput) => string[];
25
+ export declare const consoleStatusText: (input: ConsoleComposerInput) => string;
26
+ export declare const consoleStateLines: (input: ConsoleComposerInput, columns?: number) => string[];
13
27
  /** Focus keeps policy and pending decisions ahead of optional presentation metadata. */
14
- export declare const formatComposer: (input: ConsoleComposerInput, columns?: number, color?: boolean) => string;
15
- export declare const formatComposerFooter: (columns?: number, color?: boolean) => string[];
28
+ export declare const formatComposer: (input: ConsoleComposerInput, columns?: number, color?: boolean, layout?: "legacy" | "focus") => string;
29
+ export declare const formatComposerFooter: (columns?: number, color?: boolean, focus?: ConsoleComposerInput) => string[];
16
30
  export declare const formatComposerPlaceholder: (columns?: number, color?: boolean) => string;
17
31
  export declare const CONSOLE_SHORTCUTS: string;
18
32
  export declare const chooseConsoleItem: <T>(title: string, items: readonly {
19
33
  value: T;
20
34
  label: string;
21
35
  detail?: string;
36
+ key?: string;
22
37
  }[], io: {
23
38
  write(text: string): void;
24
39
  ask(prompt: string): Promise<string>;
@@ -0,0 +1,14 @@
1
+ import { type ModelCatalog } from "../../compat/code-support.js";
2
+ import type { CliOptions } from "../arguments.js";
3
+ import type { ConsoleInput } from "./console-input.js";
4
+ export declare const catalogPrice: (model: ModelCatalog["providers"][number]["models"][number] | undefined) => string;
5
+ export declare const handleConsoleBudget: (command: string, context: {
6
+ options: CliOptions;
7
+ provider: string;
8
+ model: string;
9
+ guidedTask?: boolean;
10
+ input: Pick<ConsoleInput, "select" | "question">;
11
+ hasActiveTurn: () => Promise<unknown>;
12
+ replaceOptions: (options: CliOptions) => Promise<void>;
13
+ write?: (text: string) => void;
14
+ }) => Promise<boolean>;
@@ -1,3 +1,3 @@
1
- import { type HarnessReasoningEffort } from "../../providers/reasoning.js";
1
+ import { type HarnessReasoningEffort } from "../../compat/code-support.js";
2
2
  import type { ConsoleInput } from "./console-input.js";
3
3
  export declare const chooseReasoning: (input: Pick<ConsoleInput, "select">, provider: string, model: string, current?: HarnessReasoningEffort) => Promise<HarnessReasoningEffort | undefined>;
@@ -0,0 +1,2 @@
1
+ /** Guidance does not refresh an authorization or retry a filesystem operation. */
2
+ export declare const checkpointRecovery: (message: string) => string | undefined;
@@ -0,0 +1,34 @@
1
+ export interface ConsoleReview {
2
+ title: string;
3
+ body: string;
4
+ /** One or two lines of intent, kept above the scrolling diff. */
5
+ summary?: string;
6
+ /** A one-line notice kept above the diff, including a restored pending review. */
7
+ banner?: string;
8
+ /** Per-file `path +added −removed` lines, kept above the scrolling diff. */
9
+ fileList?: string;
10
+ /** Preformatted diff. Line indexes are hunk headers for n/p. */
11
+ layout?: (width: number) => {
12
+ lines: readonly string[];
13
+ hunks: readonly number[];
14
+ };
15
+ /** `~/project · provider/model` on the right of the one-line header. */
16
+ headerRight?: string;
17
+ /** Files represented in the diff, for the end-of-changes line. */
18
+ files?: number;
19
+ notice?: string;
20
+ }
21
+ export interface ReviewItem {
22
+ label: string;
23
+ index: number;
24
+ detail?: string;
25
+ /** Single letter, or `Esc`, drawn beside the label. */
26
+ key?: string;
27
+ }
28
+ /** Pageable diff above a fixed decision menu. No filter row. */
29
+ export declare const reviewFrame: (review: ConsoleReview, items: readonly ReviewItem[], selected: number, _query: string, offset: number, columns?: number, rows?: number, wrappedBody?: readonly string[]) => {
30
+ lines: string[];
31
+ offset: number;
32
+ capacity: number;
33
+ filterRow: number;
34
+ };
@@ -0,0 +1,5 @@
1
+ import type { AgentRunState } from "@zhivex-ai/agents";
2
+ import type { CliOptions } from "../arguments.js";
3
+ /** Console defaults for new runs only. The engine ledger owns resumed-run policy. */
4
+ export declare const consoleRunPolicyMetadata: (options: CliOptions) => NonNullable<AgentRunState["metadata"]>;
5
+ export declare const restoreConsoleRunPolicy: (options: CliOptions, state: Pick<AgentRunState, "metadata">) => CliOptions;
@@ -0,0 +1,28 @@
1
+ import type { Writable } from "node:stream";
2
+ import type { AgentStreamEvent } from "@zhivex-ai/agents";
3
+ import { type ConsoleComposerInput } from "./console-presentation.js";
4
+ /** Reserve a small status dock while the conversation scrolls above it. */
5
+ export declare class ConsoleRunView {
6
+ private readonly output;
7
+ private readonly state;
8
+ private readonly draft;
9
+ private timer;
10
+ private bottom;
11
+ private started;
12
+ private phase;
13
+ private step;
14
+ constructor(output: Writable & {
15
+ isTTY?: boolean;
16
+ rows?: number;
17
+ columns?: number;
18
+ }, state: () => ConsoleComposerInput, draft: () => string);
19
+ begin(phase?: string): void;
20
+ /** Restore the dock after approval without restarting the current operation. */
21
+ resume(): void;
22
+ private lines;
23
+ private layout;
24
+ private readonly resize;
25
+ private draw;
26
+ observe(event: AgentStreamEvent): void;
27
+ end(): void;
28
+ }
@@ -0,0 +1,30 @@
1
+ import { type TaskAcceptanceContract } from '../../runtime/task-acceptance.js';
2
+ import type { ZhivexHarness } from '../../runtime/harness.js';
3
+ import type { AgentRunState } from '@zhivex-ai/core';
4
+ export declare const CODE_TASK_KEY = "zhivexCodeTaskV1";
5
+ export interface CodeTask {
6
+ schemaVersion: 1;
7
+ goal: string;
8
+ constraints: string[];
9
+ contract: TaskAcceptanceContract;
10
+ baseline: Record<string, string>;
11
+ budgetVersion?: 1 | undefined;
12
+ keep?: {
13
+ runId: string;
14
+ snapshotDigest: string;
15
+ at: number;
16
+ } | undefined;
17
+ }
18
+ export declare function restoredCodeTask(state?: Pick<AgentRunState, 'metadata'>): CodeTask | undefined;
19
+ export declare function prepareCodeTask(harness: ZhivexHarness, input: unknown): Promise<CodeTask>;
20
+ export declare function codeTaskPrompt(task: CodeTask, prompt: string): string;
21
+ /** Recover only Code's append-only human correction; never infer a new scope or baseline. */
22
+ export declare function recoverCodeTask(harness: ZhivexHarness, task: CodeTask): Promise<CodeTask>;
23
+ /** An explicit operator correction revises existing durable authority before a new brief is used. */
24
+ export declare function reviseCodeTask(harness: ZhivexHarness, task: CodeTask, correction: string): Promise<CodeTask>;
25
+ export declare function codeTaskBudgetRecap(value: unknown): string;
26
+ export declare function freshCodeTaskBudgetRecap(harness: ZhivexHarness, task: CodeTask): Promise<string>;
27
+ export declare function codeTaskRecap(state?: AgentRunState, budgetSummary?: unknown): string;
28
+ export declare function freshCodeTaskRecap(harness: ZhivexHarness, state?: AgentRunState): Promise<string>;
29
+ /** Fresh inspection and CAS; no Git commit, reset, restore or model invocation. */
30
+ export declare function keepCodeTask(harness: ZhivexHarness, state: AgentRunState, confirm: (review: string) => Promise<boolean>): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  export declare const ZHIVEX_TERMINAL_LOGO: string;
2
- export declare const formatConsoleWelcome: (input: {
2
+ export interface ConsoleWelcomeInput {
3
3
  version: string;
4
4
  workspace: string;
5
5
  sessionId?: string;
@@ -7,7 +7,17 @@ export declare const formatConsoleWelcome: (input: {
7
7
  provider?: string;
8
8
  model?: string;
9
9
  service?: boolean;
10
- }, options?: {
10
+ }
11
+ export interface ConsoleWelcomeOptions {
11
12
  color?: boolean;
12
13
  columns?: number;
13
- }) => string;
14
+ rows?: number;
15
+ compact?: boolean;
16
+ tty?: boolean;
17
+ term?: string;
18
+ /** Direct `zhx` chat. Omitted calls, including the service client, keep the previous welcome. */
19
+ layout?: "code";
20
+ policy?: string;
21
+ restored?: boolean;
22
+ }
23
+ export declare const formatConsoleWelcome: (input: ConsoleWelcomeInput, options?: ConsoleWelcomeOptions) => string;
@@ -0,0 +1,20 @@
1
+ export interface RenderedReviewDiff {
2
+ lines: string[];
3
+ /** Body line indexes of each hunk header, for n/p. */
4
+ hunks: number[];
5
+ }
6
+ /** Mark tokens that differ between a removed line and its added pair. */
7
+ export declare const markWordChanges: (before: string, after: string) => {
8
+ before: string;
9
+ after: string;
10
+ };
11
+ /**
12
+ * Line numbers, word markers, indent-preserving soft wrap, and collapsed-context banners.
13
+ * The body is already terminal-safe. Callers must not hard-wrap it again.
14
+ */
15
+ export declare const renderReviewedDiff: (diff: string, width: number) => RenderedReviewDiff;
16
+ /** One or two lines: the agent's stated intent when present, otherwise what the diff itself changes. */
17
+ export declare const changeSummary: (approval: {
18
+ name: string;
19
+ arguments: string;
20
+ }, diffBody: string) => string;
@@ -1,6 +1,7 @@
1
1
  import type { PolicyDecisionEvidence } from "../runtime/policy-decisions.js";
2
2
  import type { ActivityHistory } from "./terminal/activity-history.js";
3
3
  import { TerminalMarkdown } from "./terminal/terminal-markdown.js";
4
+ import { type TerminalApprovalResolverOptions } from "./terminal/terminal-ui.js";
4
5
  import { type AgentApprovalRequest, type AgentApprovalResponse, type AgentRunOutput, type AgentStreamEvent } from "@zhivex-ai/agents";
5
6
  import { type HarnessRunOptions, type ZhivexHarness } from "../runtime/harness.js";
6
7
  import { type AgentTelemetryObserver } from "@zhivex-ai/agents/ops";
@@ -10,23 +11,24 @@ export declare const cliStreamErrorSequence: (error: unknown) => number;
10
11
  export declare const terminalErrorMessage: (error: unknown) => string;
11
12
  export declare const summarizeApproval: (approval: AgentApprovalRequest) => string;
12
13
  export declare const approvalResponses: (approvals: readonly AgentApprovalRequest[], approve: boolean, reason: string) => AgentApprovalResponse[];
13
- export declare const terminalApprovalResolver: (automaticallyApprove: boolean | "ask" | "auto" | "restricted", ask?: (question: string) => Promise<string>, ui?: {
14
- select: import("./cli-credentials.js").CredentialInput["select"];
15
- workspace: string;
16
- sessionGrants?: Set<string>;
17
- }, reviewHost?: ZhivexHarness) => NonNullable<HarnessRunOptions["resolveApprovals"]>;
14
+ export declare const terminalApprovalResolver: (automaticallyApprove: boolean | "ask" | "auto" | "restricted", ask?: (question: string) => Promise<string>, ui?: Omit<TerminalApprovalResolverOptions, "ask" | "write">, reviewHost?: ZhivexHarness) => NonNullable<HarnessRunOptions["resolveApprovals"]>;
18
15
  export declare const printTerminalResult: (result: AgentRunOutput, harness: ZhivexHarness, output: Pick<CliOptions, "json" | "jsonl">, tracker: {
19
16
  streamedText: boolean;
20
17
  sequence?: number;
21
18
  markdown?: TerminalMarkdown;
22
19
  policyEvidence?: PolicyDecisionEvidence;
23
20
  }) => void;
24
- export declare const flushToolActivity: (tracker: object) => void | undefined;
21
+ export declare const flushToolActivity: (tracker: object) => void;
25
22
  export declare const streamSink: (output: Pick<CliOptions, "json" | "jsonl">, tracker: {
26
23
  streamedText: boolean;
27
24
  sequence?: number;
28
25
  markdown?: TerminalMarkdown;
29
26
  activityHistory?: ActivityHistory;
30
27
  inputStatus?: () => string;
28
+ consoleView?: boolean;
29
+ turnDiff?: {
30
+ added: number;
31
+ removed: number;
32
+ };
31
33
  }, compact?: boolean) => (event: AgentStreamEvent) => Promise<void>;
32
34
  export declare const orchestrationObserver: (json: boolean) => AgentTelemetryObserver;