@zergai/ztc 0.26.5-dev.202611240151 → 0.27.0-beta.1

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 (275) hide show
  1. package/README.md +773 -127
  2. package/RUST_THIRD_PARTY_LICENSES.txt +5 -5
  3. package/bin/zmux-darwin-arm64 +0 -0
  4. package/bin/zmux-linux-x64 +0 -0
  5. package/bin/ztc-audio-darwin-arm64 +0 -0
  6. package/bin/ztc-capture-darwin-arm64 +0 -0
  7. package/bin/ztc-computer-darwin-arm64 +0 -0
  8. package/bin/ztc-llm-darwin-arm64 +0 -0
  9. package/bin/ztc-tts-darwin-arm64 +0 -0
  10. package/bin/ztc-tui-darwin-arm64 +0 -0
  11. package/bin/ztc-tui-linux-x64 +0 -0
  12. package/bin/zterm-darwin-arm64 +2 -2
  13. package/dist/App.js +6 -1
  14. package/dist/agent/agent.d.ts +21 -15
  15. package/dist/agent/agent.js +389 -163
  16. package/dist/agent/backends/codex_app_server.d.ts +61 -10
  17. package/dist/agent/backends/codex_app_server.js +113 -21
  18. package/dist/agent/backends/gemini.js +22 -8
  19. package/dist/agent/commands/batch.js +8 -0
  20. package/dist/agent/commands/config.js +10 -0
  21. package/dist/agent/commands/environment.js +5 -5
  22. package/dist/agent/commands/goal.d.ts +1 -0
  23. package/dist/agent/commands/goal.js +2 -1
  24. package/dist/agent/commands/index.js +2 -1
  25. package/dist/agent/commands/manifest.js +4 -0
  26. package/dist/agent/commands/optimize.js +5 -2
  27. package/dist/agent/commands/pane_cli.d.ts +29 -0
  28. package/dist/agent/commands/pane_cli.js +303 -0
  29. package/dist/agent/commands/settings.js +13 -3
  30. package/dist/agent/commands/shannon.js +8 -0
  31. package/dist/agent/commands/update.js +15 -3
  32. package/dist/agent/commands/zerg.js +31 -1
  33. package/dist/agent/commands/ztc_pane.js +3 -1
  34. package/dist/agent/factory.d.ts +4 -0
  35. package/dist/agent/factory.js +11 -1
  36. package/dist/agent/loop_policy.d.ts +42 -5
  37. package/dist/agent/loop_policy.js +206 -3
  38. package/dist/agent/runtime/command_jobs.d.ts +5 -0
  39. package/dist/agent/runtime/command_jobs.js +241 -31
  40. package/dist/agent/runtime/command_wait.d.ts +2 -0
  41. package/dist/agent/runtime/command_wait.js +1 -0
  42. package/dist/agent/runtime/done_report.d.ts +18 -0
  43. package/dist/agent/runtime/done_report.js +130 -0
  44. package/dist/agent/runtime/execution_context.js +4 -1
  45. package/dist/agent/runtime/failure_cause.d.ts +2 -0
  46. package/dist/agent/runtime/failure_cause.js +35 -0
  47. package/dist/agent/runtime/policy.d.ts +14 -2
  48. package/dist/agent/runtime/policy.js +104 -12
  49. package/dist/agent/runtime/quiet_job.d.ts +18 -0
  50. package/dist/agent/runtime/quiet_job.js +48 -0
  51. package/dist/agent/runtime/recovery.d.ts +1 -5
  52. package/dist/agent/runtime/recovery.js +2 -44
  53. package/dist/agent/runtime/tool_runtime.d.ts +2 -1
  54. package/dist/agent/runtime/tool_runtime.js +9 -0
  55. package/dist/agent/subagent.js +6 -1
  56. package/dist/agent/tools/deferred.js +1 -0
  57. package/dist/agent/tools/index.d.ts +2 -0
  58. package/dist/agent/tools/index.js +1 -0
  59. package/dist/agent/tools/outcome.d.ts +15 -0
  60. package/dist/agent/tools/outcome.js +107 -0
  61. package/dist/agent/tools/pane.d.ts +2 -1
  62. package/dist/agent/tools/pane.js +21 -3
  63. package/dist/agent/tools/registry.js +2 -0
  64. package/dist/agent/tools/shell.d.ts +1 -0
  65. package/dist/agent/tools/shell.js +128 -17
  66. package/dist/agent/tools/sim_domain_tools.js +4 -2
  67. package/dist/agent/tools/supervision.js +4 -2
  68. package/dist/agent/tools/types.d.ts +3 -0
  69. package/dist/app/command_context.js +5 -9
  70. package/dist/app/conversation_compaction.d.ts +4 -2
  71. package/dist/app/conversation_compaction.js +16 -5
  72. package/dist/app/headless_shell_mode.d.ts +14 -0
  73. package/dist/app/headless_shell_mode.js +7 -0
  74. package/dist/app/hosted_resident.d.ts +356 -0
  75. package/dist/app/hosted_resident.js +677 -0
  76. package/dist/app/restart.js +11 -2
  77. package/dist/app/session_manager.d.ts +5 -0
  78. package/dist/app/session_manager.js +21 -6
  79. package/dist/app/session_messages.js +6 -6
  80. package/dist/app/workspace_layout_controller.js +7 -0
  81. package/dist/batch/worktree.d.ts +10 -0
  82. package/dist/batch/worktree.js +15 -0
  83. package/dist/bench/registry.js +4 -2
  84. package/dist/cli_args.js +1 -1
  85. package/dist/cli_main.js +121 -12
  86. package/dist/cli_ratatui.d.ts +75 -0
  87. package/dist/cli_ratatui.js +485 -84
  88. package/dist/components/InputArea.js +4 -4
  89. package/dist/config/execution.d.ts +10 -0
  90. package/dist/config/execution.js +10 -0
  91. package/dist/config/hosted_runtime.d.ts +74 -0
  92. package/dist/config/hosted_runtime.js +97 -0
  93. package/dist/config/permission_pin.d.ts +81 -1
  94. package/dist/config/permission_pin.js +116 -1
  95. package/dist/config/person_command_policy.d.ts +38 -0
  96. package/dist/config/person_command_policy.js +11 -0
  97. package/dist/config/profile_limits.d.ts +11 -1
  98. package/dist/config/profile_limits.js +14 -0
  99. package/dist/config/profiles.d.ts +21 -0
  100. package/dist/config/profiles.js +56 -2
  101. package/dist/config/types.d.ts +4 -1
  102. package/dist/config.d.ts +23 -1
  103. package/dist/config.js +105 -27
  104. package/dist/desktop/daily/codex_exec_adapter.js +7 -2
  105. package/dist/desktop/daily/desktop_wiring.d.ts +7 -1
  106. package/dist/desktop/daily/desktop_wiring.js +11 -3
  107. package/dist/desktop/daily/recipes.js +20 -4
  108. package/dist/desktop/health.d.ts +24 -0
  109. package/dist/desktop/health.js +151 -0
  110. package/dist/desktop/native_dialogs.d.ts +37 -0
  111. package/dist/desktop/native_dialogs.js +105 -0
  112. package/dist/diagnostics/session_export.d.ts +1 -0
  113. package/dist/diagnostics/session_export.js +28 -0
  114. package/dist/embedded/registry.js +4 -2
  115. package/dist/emulation/tool_adapters.js +9 -4
  116. package/dist/emulation/ztc_addendum.js +3 -0
  117. package/dist/headless.d.ts +11 -4
  118. package/dist/headless.js +116 -34
  119. package/dist/headless_approval.d.ts +6 -0
  120. package/dist/headless_cli.js +38 -7
  121. package/dist/hooks/runner.js +7 -6
  122. package/dist/hooks/types.d.ts +6 -0
  123. package/dist/library.d.ts +4 -0
  124. package/dist/library.js +3 -0
  125. package/dist/mcp/client.js +3 -3
  126. package/dist/modes/registry.js +13 -4
  127. package/dist/onboarding/setup_environment.js +13 -1
  128. package/dist/optimize/adapters/kernelbench.js +88 -10
  129. package/dist/optimize/adapters/types.d.ts +5 -0
  130. package/dist/optimize/executor.js +21 -0
  131. package/dist/panes/agent_cli.d.ts +6 -0
  132. package/dist/panes/agent_cli.js +15 -2
  133. package/dist/panes/agent_panes.js +31 -11
  134. package/dist/panes/cli_install.d.ts +54 -0
  135. package/dist/panes/cli_install.js +157 -0
  136. package/dist/panes/model_catalog.js +3 -0
  137. package/dist/panes/new_pane_choices.d.ts +6 -2
  138. package/dist/panes/new_pane_choices.js +24 -12
  139. package/dist/panes/pane_cli_launch.d.ts +50 -0
  140. package/dist/panes/pane_cli_launch.js +124 -0
  141. package/dist/panes/pane_clis.d.ts +171 -0
  142. package/dist/panes/pane_clis.js +325 -0
  143. package/dist/panes/person_only_panes.d.ts +45 -0
  144. package/dist/panes/person_only_panes.js +117 -0
  145. package/dist/plugin/simulation_living.js +0 -2
  146. package/dist/plugin/simulation_living_engine.d.ts +1 -0
  147. package/dist/plugin/simulation_living_engine.js +1 -0
  148. package/dist/plugin/simulation_living_labels.d.ts +3 -0
  149. package/dist/plugin/simulation_living_labels.js +2 -0
  150. package/dist/router_auth.js +12 -1
  151. package/dist/session.js +26 -1
  152. package/dist/simulation/art/gemini_image.js +11 -5
  153. package/dist/simulation/domains/loader.js +25 -3
  154. package/dist/simulation/living/cold.d.ts +23 -0
  155. package/dist/simulation/living/cold.js +41 -0
  156. package/dist/simulation/living/context.d.ts +591 -1283
  157. package/dist/simulation/living/context.js +378 -244
  158. package/dist/simulation/living/contradictions.d.ts +14 -0
  159. package/dist/simulation/living/contradictions.js +282 -0
  160. package/dist/simulation/living/core/ids.d.ts +53 -0
  161. package/dist/simulation/living/core/ids.js +39 -0
  162. package/dist/simulation/living/core/kind.d.ts +20 -0
  163. package/dist/simulation/living/core/kind.js +15 -0
  164. package/dist/simulation/living/core/laws.d.ts +179 -0
  165. package/dist/simulation/living/core/laws.js +184 -0
  166. package/dist/simulation/living/core/ops.d.ts +257 -0
  167. package/dist/simulation/living/core/ops.js +34 -0
  168. package/dist/simulation/living/definer.d.ts +17 -1
  169. package/dist/simulation/living/definer.js +130 -51
  170. package/dist/simulation/living/definition.d.ts +174 -65
  171. package/dist/simulation/living/definition.js +287 -180
  172. package/dist/simulation/living/director.d.ts +80 -0
  173. package/dist/simulation/living/director.js +363 -0
  174. package/dist/simulation/living/frame.d.ts +108 -21
  175. package/dist/simulation/living/frame.js +111 -66
  176. package/dist/simulation/living/identifiers.d.ts +0 -1
  177. package/dist/simulation/living/identifiers.js +0 -3
  178. package/dist/simulation/living/index.d.ts +18 -9
  179. package/dist/simulation/living/index.js +18 -9
  180. package/dist/simulation/living/inference.d.ts +92 -50
  181. package/dist/simulation/living/inference.js +319 -175
  182. package/dist/simulation/living/knowledge.d.ts +28 -0
  183. package/dist/simulation/living/knowledge.js +73 -0
  184. package/dist/simulation/living/library.json +1177 -0
  185. package/dist/simulation/living/mechanics.d.ts +31 -34
  186. package/dist/simulation/living/mechanics.js +222 -138
  187. package/dist/simulation/living/model-input.d.ts +6 -3
  188. package/dist/simulation/living/model-input.js +18 -26
  189. package/dist/simulation/living/open-world.d.ts +74 -94
  190. package/dist/simulation/living/open-world.js +151 -30
  191. package/dist/simulation/living/phrases.d.ts +3 -0
  192. package/dist/simulation/living/phrases.js +37 -0
  193. package/dist/simulation/living/phrases.json +560 -0
  194. package/dist/simulation/living/projection.d.ts +316 -2
  195. package/dist/simulation/living/projection.js +50 -2
  196. package/dist/simulation/living/prompts/example-spec.json +11 -0
  197. package/dist/simulation/living/prompts/role-text.json +14 -0
  198. package/dist/simulation/living/prompts.d.ts +5 -0
  199. package/dist/simulation/living/prompts.js +275 -0
  200. package/dist/simulation/living/recall.d.ts +2 -2
  201. package/dist/simulation/living/reduce.d.ts +51 -14
  202. package/dist/simulation/living/reduce.js +941 -579
  203. package/dist/simulation/living/replay.d.ts +5 -4
  204. package/dist/simulation/living/replay.js +10 -9
  205. package/dist/simulation/living/runtime.d.ts +135 -25
  206. package/dist/simulation/living/runtime.js +1641 -583
  207. package/dist/simulation/living/scale.d.ts +96 -0
  208. package/dist/simulation/living/scale.js +124 -0
  209. package/dist/simulation/living/script.d.ts +5 -0
  210. package/dist/simulation/living/script.js +115 -0
  211. package/dist/simulation/living/shared-kinds.d.ts +4 -11
  212. package/dist/simulation/living/shared-kinds.js +11 -81
  213. package/dist/simulation/living/space.d.ts +14 -0
  214. package/dist/simulation/living/space.js +132 -0
  215. package/dist/simulation/living/state.d.ts +100 -0
  216. package/dist/simulation/living/state.js +393 -0
  217. package/dist/simulation/living/types.d.ts +829 -512
  218. package/dist/simulation/living/types.js +162 -187
  219. package/dist/simulation/living/world-rules.d.ts +100 -0
  220. package/dist/simulation/living/world-rules.js +267 -0
  221. package/dist/simulation/plugins/loader.js +11 -0
  222. package/dist/skills/loader.js +4 -0
  223. package/dist/tools.d.ts +1 -0
  224. package/dist/tools.js +1 -0
  225. package/dist/ui/ratatui/headless_pane_manager.d.ts +4 -1
  226. package/dist/ui/ratatui/headless_pane_manager.js +13 -9
  227. package/dist/ui/ratatui/pane_relay.js +29 -0
  228. package/dist/ui/ratatui/pane_type.d.ts +10 -0
  229. package/dist/ui/ratatui/pane_type.js +11 -0
  230. package/dist/ui/ratatui/process.d.ts +30 -0
  231. package/dist/ui/ratatui/process.js +133 -19
  232. package/dist/ui/ratatui/protocol.d.ts +124 -2
  233. package/dist/ui/ratatui/protocol.js +35 -0
  234. package/dist/ui/ratatui/relay_policy.js +3 -0
  235. package/dist/ui/ratatui/ztc_launch_trust.d.ts +2 -1
  236. package/dist/ui/ratatui/ztc_launch_trust.js +8 -1
  237. package/dist/ui/terminal_image.d.ts +12 -0
  238. package/dist/ui/terminal_image.js +21 -1
  239. package/dist/utils/codex_project_trust.d.ts +19 -0
  240. package/dist/utils/codex_project_trust.js +37 -0
  241. package/dist/utils/compaction.js +103 -20
  242. package/dist/utils/git_program_files.d.ts +19 -12
  243. package/dist/utils/git_program_files.js +411 -83
  244. package/dist/utils/host_shell.d.ts +10 -1
  245. package/dist/utils/host_shell.js +14 -1
  246. package/dist/utils/mid_turn_compaction.d.ts +2 -0
  247. package/dist/utils/mid_turn_compaction.js +2 -0
  248. package/dist/utils/models.js +6 -1
  249. package/dist/utils/sandbox.d.ts +118 -5
  250. package/dist/utils/sandbox.js +1259 -168
  251. package/dist/utils/shell.d.ts +2 -0
  252. package/dist/utils/shell.js +10 -4
  253. package/dist/utils/subprocess_env.d.ts +57 -6
  254. package/dist/utils/subprocess_env.js +136 -10
  255. package/dist/utils/system_ps.d.ts +8 -0
  256. package/dist/utils/system_ps.js +39 -7
  257. package/dist/utils/unattended_compaction.d.ts +9 -0
  258. package/dist/utils/unattended_compaction.js +13 -0
  259. package/dist/utils/ztc_own_state.d.ts +28 -0
  260. package/dist/utils/ztc_own_state.js +84 -4
  261. package/dist/web/mirror_client.js +1 -0
  262. package/dist/web/mirror_stream.d.ts +50 -6
  263. package/dist/web/mirror_stream.js +160 -15
  264. package/dist/workflows/registry.js +3 -1
  265. package/dist/workspace/controller.js +12 -0
  266. package/dist/workspace_collision.d.ts +3 -0
  267. package/dist/workspace_collision.js +14 -1
  268. package/dist/workspace_session_context.js +2 -1
  269. package/dist/zlm-embed.mjs +18536 -16248
  270. package/node_modules/@zerg/model-contracts/README.md +16 -4
  271. package/node_modules/@zerg/model-contracts/index.js +6 -1
  272. package/npm-shrinkwrap.json +1 -1
  273. package/package.json +47 -29
  274. package/packages/model-contracts/README.md +16 -4
  275. package/packages/model-contracts/index.js +6 -1
@@ -210,7 +210,7 @@ foreign-types-macros@0.2.3 | MIT/Apache-2.0 | D0073, D0239 | https://github.com/
210
210
  foreign-types-macros@0.2.4 | MIT/Apache-2.0 | D0073, D0239 | https://github.com/sfackler/foreign-types
211
211
  foreign-types-shared@0.3.1 | MIT/Apache-2.0 | D0073, D0239 | https://github.com/sfackler/foreign-types
212
212
  foreign-types@0.5.0 | MIT/Apache-2.0 | D0073, D0239 | https://github.com/sfackler/foreign-types
213
- form_urlencoded@1.2.2 | MIT OR Apache-2.0 | D0049, D0204 | https://github.com/servo/rust-url
213
+ form_urlencoded@1.2.3 | MIT OR Apache-2.0 | D0049, D0204 | https://github.com/servo/rust-url
214
214
  fs_extra@1.3.0 | MIT | D0057 | https://github.com/webdesus/fs_extra
215
215
  futures-channel@0.3.31 | MIT OR Apache-2.0 | D0062, D0129 | https://github.com/rust-lang/futures-rs
216
216
  futures-channel@0.3.33 | MIT OR Apache-2.0 | D0062, D0129 | https://github.com/rust-lang/futures-rs
@@ -582,7 +582,7 @@ unicode-width@0.2.2 | MIT OR Apache-2.0 | D0157, D0204 | https://github.com/unic
582
582
  unicode-xid@0.2.6 | MIT OR Apache-2.0 | D0157, D0204 | https://github.com/unicode-rs/unicode-xid
583
583
  untrusted@0.9.0 | ISC | D0156 | https://github.com/briansmith/untrusted
584
584
  ureq@2.12.1 | MIT OR Apache-2.0 | D0120, D0161, D0204, D0241 | https://github.com/algesten/ureq
585
- url@2.5.8 | MIT OR Apache-2.0 | D0204, D0223 | https://github.com/servo/rust-url
585
+ url@2.5.9 | MIT OR Apache-2.0 | D0204, D0223 | https://github.com/servo/rust-url
586
586
  utf8_iter@1.0.4 | Apache-2.0 OR MIT | D0088, D0255 | https://github.com/hsivonen/utf8_iter
587
587
  utf8parse@0.2.2 | Apache-2.0 OR MIT | D0124, D0271 | https://github.com/alacritty/vte
588
588
  v_frame@0.3.9 | BSD-2-Clause | D0007 | https://github.com/rust-av/v_frame
@@ -3161,7 +3161,7 @@ SOFTWARE.
3161
3161
  ===== D0049 =====
3162
3162
  SHA-256: 20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e
3163
3163
  Source filenames: LICENSE-MIT
3164
- Used by: form_urlencoded@1.2.2
3164
+ Used by: form_urlencoded@1.2.3
3165
3165
 
3166
3166
  Copyright (c) 2013-2016 The rust-url developers
3167
3167
 
@@ -13409,7 +13409,7 @@ limitations under the License.
13409
13409
  ===== D0204 =====
13410
13410
  SHA-256: a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2
13411
13411
  Source filenames: LICENSE, LICENSE-APACHE
13412
- Used by: ahash@0.8.12, aligned@0.4.3, arrayvec@0.7.6, arrayvec@0.7.8, as-slice@0.2.1, autocfg@1.5.0, autocfg@1.5.1, base64@0.13.1, base64@0.22.1, bitflags@1.3.2, bitflags@2.10.0, bitflags@2.11.0, bitflags@2.11.1, bitflags@2.13.1, bitstream-io@4.9.0, bumpalo@3.19.1, cc@1.2.57, cc@1.2.61, cc@1.2.62, cc@1.4.2, cexpr@0.6.0, cfg-if@1.0.4, cmake@0.1.57, cmake@0.1.58, core-foundation-sys@0.8.7, core-foundation@0.10.1, core-foundation@0.9.4, core-graphics-types@0.1.3, core-graphics-types@0.2.0, core-graphics@0.23.2, core-graphics@0.24.0, coreaudio-rs@0.11.3, crossbeam-deque@0.8.6, crossbeam-deque@0.8.7, crossbeam-epoch@0.9.21, crossbeam-utils@0.8.21, crossbeam-utils@0.8.22, displaydoc@0.2.5, displaydoc@0.2.7, either@1.15.0, either@1.17.0, equivalent@1.0.2, errno@0.3.14, fastrand@2.5.0, filetime@0.2.29, find-msvc-tools@0.1.10, find-msvc-tools@0.1.9, flate2@1.1.10, flate2@1.1.9, fnv@1.0.7, form_urlencoded@1.2.2, gethostname@1.1.0, glob@0.3.3, glob@0.3.4, hashbrown@0.15.5, hashbrown@0.17.0, hashbrown@0.17.1, heck@0.5.0, idna@1.1.0, idna_adapter@1.2.2, indexmap@2.14.0, itertools@0.11.0, itertools@0.12.1, itertools@0.13.0, itertools@0.14.0, jobserver@0.1.34, jobserver@0.1.35, khronos-egl@6.0.0, lazy_static@1.5.0, lazycell@1.3.0, linux-raw-sys@0.11.0, linux-raw-sys@0.12.1, linux-raw-sys@0.4.15, lock_api@0.4.14, log@0.4.29, log@0.4.33, metal@0.27.0, metal@0.29.0, num-bigint@0.4.6, num-bigint@0.4.8, num-complex@0.4.6, num-derive@0.4.2, num-integer@0.1.46, num-iter@0.1.45, num-iter@0.1.46, num-rational@0.4.2, num-traits@0.2.19, num@0.4.3, num_cpus@1.17.0, once_cell@1.21.3, once_cell@1.21.4, parking_lot@0.12.5, parking_lot_core@0.9.12, percent-encoding@2.3.2, pkg-config@0.3.33, png@0.17.16, png@0.18.0, png@0.18.1, polling@3.11.0, pollster@0.3.0, rayon-cond@0.3.0, rayon-core@1.13.0, rayon@1.11.0, rayon@1.12.0, regex-automata@0.4.14, regex-automata@0.4.18, regex-syntax@0.8.10, regex-syntax@0.8.11, regex-syntax@0.8.9, regex@1.12.3, regex@1.13.1, renderdoc-sys@1.1.0, ring@0.17.14, ringbuf@0.4.8, rustc-hash@1.1.0, rustix-openpty@0.2.0, rustix@0.38.44, rustix@1.1.3, rustix@1.1.4, rustix@1.1.5, rustls@0.23.46, scopeguard@1.2.0, security-framework-sys@2.17.0, security-framework@3.7.0, serde_plain@1.0.2, signal-hook-mio@0.2.5, signal-hook-registry@1.4.8, signal-hook@0.3.18, smallvec@1.15.1, smallvec@1.15.2, smol_str@0.2.2, socket2@0.6.2, socket2@0.6.5, stable_deref_trait@1.2.1, tar@0.4.46, tempfile@3.27.0, thread_local@1.1.9, ttf-parser@0.25.1, unicode-normalization-alignments@0.1.12, unicode-segmentation@1.12.0, unicode-segmentation@1.13.2, unicode-segmentation@1.13.3, unicode-truncate@1.1.0, unicode-width@0.1.14, unicode-width@0.2.0, unicode-width@0.2.2, unicode-xid@0.2.6, ureq@2.12.1, url@2.5.8, version_check@0.9.5, wasm-bindgen-macro-support@0.2.108, wasm-bindgen-macro@0.2.108, wasm-bindgen-shared@0.2.108, wasm-bindgen@0.2.108, xattr@1.6.1
13412
+ Used by: ahash@0.8.12, aligned@0.4.3, arrayvec@0.7.6, arrayvec@0.7.8, as-slice@0.2.1, autocfg@1.5.0, autocfg@1.5.1, base64@0.13.1, base64@0.22.1, bitflags@1.3.2, bitflags@2.10.0, bitflags@2.11.0, bitflags@2.11.1, bitflags@2.13.1, bitstream-io@4.9.0, bumpalo@3.19.1, cc@1.2.57, cc@1.2.61, cc@1.2.62, cc@1.4.2, cexpr@0.6.0, cfg-if@1.0.4, cmake@0.1.57, cmake@0.1.58, core-foundation-sys@0.8.7, core-foundation@0.10.1, core-foundation@0.9.4, core-graphics-types@0.1.3, core-graphics-types@0.2.0, core-graphics@0.23.2, core-graphics@0.24.0, coreaudio-rs@0.11.3, crossbeam-deque@0.8.6, crossbeam-deque@0.8.7, crossbeam-epoch@0.9.21, crossbeam-utils@0.8.21, crossbeam-utils@0.8.22, displaydoc@0.2.5, displaydoc@0.2.7, either@1.15.0, either@1.17.0, equivalent@1.0.2, errno@0.3.14, fastrand@2.5.0, filetime@0.2.29, find-msvc-tools@0.1.10, find-msvc-tools@0.1.9, flate2@1.1.10, flate2@1.1.9, fnv@1.0.7, form_urlencoded@1.2.3, gethostname@1.1.0, glob@0.3.3, glob@0.3.4, hashbrown@0.15.5, hashbrown@0.17.0, hashbrown@0.17.1, heck@0.5.0, idna@1.1.0, idna_adapter@1.2.2, indexmap@2.14.0, itertools@0.11.0, itertools@0.12.1, itertools@0.13.0, itertools@0.14.0, jobserver@0.1.34, jobserver@0.1.35, khronos-egl@6.0.0, lazy_static@1.5.0, lazycell@1.3.0, linux-raw-sys@0.11.0, linux-raw-sys@0.12.1, linux-raw-sys@0.4.15, lock_api@0.4.14, log@0.4.29, log@0.4.33, metal@0.27.0, metal@0.29.0, num-bigint@0.4.6, num-bigint@0.4.8, num-complex@0.4.6, num-derive@0.4.2, num-integer@0.1.46, num-iter@0.1.45, num-iter@0.1.46, num-rational@0.4.2, num-traits@0.2.19, num@0.4.3, num_cpus@1.17.0, once_cell@1.21.3, once_cell@1.21.4, parking_lot@0.12.5, parking_lot_core@0.9.12, percent-encoding@2.3.2, pkg-config@0.3.33, png@0.17.16, png@0.18.0, png@0.18.1, polling@3.11.0, pollster@0.3.0, rayon-cond@0.3.0, rayon-core@1.13.0, rayon@1.11.0, rayon@1.12.0, regex-automata@0.4.14, regex-automata@0.4.18, regex-syntax@0.8.10, regex-syntax@0.8.11, regex-syntax@0.8.9, regex@1.12.3, regex@1.13.1, renderdoc-sys@1.1.0, ring@0.17.14, ringbuf@0.4.8, rustc-hash@1.1.0, rustix-openpty@0.2.0, rustix@0.38.44, rustix@1.1.3, rustix@1.1.4, rustix@1.1.5, rustls@0.23.46, scopeguard@1.2.0, security-framework-sys@2.17.0, security-framework@3.7.0, serde_plain@1.0.2, signal-hook-mio@0.2.5, signal-hook-registry@1.4.8, signal-hook@0.3.18, smallvec@1.15.1, smallvec@1.15.2, smol_str@0.2.2, socket2@0.6.2, socket2@0.6.5, stable_deref_trait@1.2.1, tar@0.4.46, tempfile@3.27.0, thread_local@1.1.9, ttf-parser@0.25.1, unicode-normalization-alignments@0.1.12, unicode-segmentation@1.12.0, unicode-segmentation@1.13.2, unicode-segmentation@1.13.3, unicode-truncate@1.1.0, unicode-width@0.1.14, unicode-width@0.2.0, unicode-width@0.2.2, unicode-xid@0.2.6, ureq@2.12.1, url@2.5.9, version_check@0.9.5, wasm-bindgen-macro-support@0.2.108, wasm-bindgen-macro@0.2.108, wasm-bindgen-shared@0.2.108, wasm-bindgen@0.2.108, xattr@1.6.1
13413
13413
 
13414
13414
  Apache License
13415
13415
  Version 2.0, January 2004
@@ -14769,7 +14769,7 @@ THIS SOFTWARE.
14769
14769
  ===== D0223 =====
14770
14770
  SHA-256: b38f11f6096706e6de553dabe2a7ed142d59b6fa8c97e290c67496154745cdd5
14771
14771
  Source filenames: LICENSE-MIT
14772
- Used by: idna@1.1.0, percent-encoding@2.3.2, url@2.5.8
14772
+ Used by: idna@1.1.0, percent-encoding@2.3.2, url@2.5.9
14773
14773
 
14774
14774
  Copyright (c) 2013-2025 The rust-url developers
14775
14775
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/zterm-darwin-arm64
3
- size: 35046592 bytes
4
- sha256: e0c1d69d0ef30a89adf64cb27524bc026cbfbec81bf77d919450419bb9a5b868
3
+ size: 35507232 bytes
4
+ sha256: fd9c561d4e3efc5c6762e994c68acfa9d66e3bf456adf624cd296bc32e04b14d
package/dist/App.js CHANGED
@@ -24,6 +24,8 @@ import { loadEmulationProfiles, getEmulationProfile } from './emulation/catalog.
24
24
  import { getTraceStyle } from './emulation/trace_style.js';
25
25
  import { debugLog } from './debug/logger.js';
26
26
  import { runShellCommand, resolveWorkingDir } from './utils/shell.js';
27
+ import { ToolCapability } from './agent/runtime/capabilities.js';
28
+ import { personCommandPolicy } from './config/person_command_policy.js';
27
29
  import { writeClipboard } from './utils/clipboard.js';
28
30
  import { launchedByAnotherZtc } from './utils/subprocess_env.js';
29
31
  import { isPersistableAssistantMessage } from './utils/assistant_message.js';
@@ -1342,7 +1344,10 @@ export const App = () => {
1342
1344
  addMessage({ role: 'system', content: 'Workspace session paused. The shell command is retained; use /sessions continue.' });
1343
1345
  return;
1344
1346
  }
1345
- resolve(await runShellCommand(command, cwd));
1347
+ // The person's command: as before, but under its host's pin (ZTC_PERMISSION_PROFILE_PINNED) planned as the person's
1348
+ // are everywhere, with the OS sandbox required (config/person_command_policy.ts), so it runs inside it or not at all.
1349
+ resolve(await runShellCommand(command, cwd, undefined, undefined, configStore.permissionsPinned()
1350
+ ? { ...personCommandPolicy(configStore), capabilities: [ToolCapability.SHELL_EXEC] } : { byPerson: true }));
1346
1351
  };
1347
1352
  void execute().catch(reject);
1348
1353
  });
@@ -102,12 +102,16 @@ export interface AgentConfig {
102
102
  maxConsecutiveAutoContinues?: number;
103
103
  /**
104
104
  * Nobody can answer this run (a headless prompt with no attached driver,
105
- * pane parent or remote answerer). A turn that ends by asking the user
106
- * something or by listing unfinished, unverified steps is then continued
107
- * with a decide-and-continue nudge instead of ending with the question
108
- * unanswered. Shares the maxConsecutiveAutoContinues budget. Default: false.
105
+ * pane parent, remote answerer, person at the terminal or --human-present).
106
+ * A turn that ends by asking the user something or by listing unfinished,
107
+ * unverified steps is then continued with a decide-and-continue nudge
108
+ * instead of ending with the question unanswered. Shares the
109
+ * maxConsecutiveAutoContinues budget. With endProtocol on, the end protocol
110
+ * governs instead. Default: false.
109
111
  */
110
112
  noHumanAvailable?: boolean;
113
+ unattended?: boolean;
114
+ endProtocol?: boolean;
111
115
  /**
112
116
  * Local task sessions: append current execution facts and any explicitly
113
117
  * pinned goal to request.system. User messages are never automatically
@@ -197,7 +201,8 @@ export interface AgentRunResult {
197
201
  content: string;
198
202
  toolCalls: ToolCall[];
199
203
  usage?: TokenUsage;
200
- stopReason: 'complete' | 'interactive' | 'max_iterations';
204
+ stopReason: 'complete' | 'interactive' | 'max_iterations' | 'stalled';
205
+ outcome?: 'done' | 'blocked' | 'needs_input';
201
206
  reasoning?: string;
202
207
  reasoningModel?: string;
203
208
  responseItems?: Array<Record<string, unknown>>;
@@ -313,16 +318,10 @@ export declare class Agent {
313
318
  private _lastResponseStreamed;
314
319
  private _cwd;
315
320
  private _autoContinue;
321
+ private _runawayEscalationLimit;
316
322
  private modelSupportsTools;
317
- /** Auto-continues spent since the last tool run; reset per turn and per tool. */
318
- private _consecutiveAutoContinues;
319
- private _turnAutoContinues;
320
- private _turnToolBatches;
321
- private _turnToolChangedState;
322
- private _turnCommandsRun;
323
- /** What this turn has read, by tool and arguments: reading something new is progress for the auto-continue budget. */
324
- private _turnReadsSeen;
325
- private _turnCheckAsked;
323
+ /** The newest run's count of the end protocol's nudges: a run that asks the same request again (a stall's retry) goes on from it. */
324
+ private _endProtocol;
326
325
  private readonly _subprocessEnv?;
327
326
  private readonly commandPolicy?;
328
327
  private readonly toolEffectObserver?;
@@ -488,7 +487,8 @@ export declare class Agent {
488
487
  private _workChecked;
489
488
  /** Whether this run was told about jobs still running as its turn ended (jobsEndWithTurn). */
490
489
  private _jobsChecked;
491
- private _turnUsedTools;
490
+ /** The request the long session's note was last placed for: one note per request, whatever runs ask it again. */
491
+ private _longSessionGuardFor;
492
492
  /** The session's run log, or undefined when the session keeps none. */
493
493
  private recordedRuns;
494
494
  /**
@@ -498,6 +498,8 @@ export declare class Agent {
498
498
  canRetryFailedTurn(): boolean;
499
499
  private recordedRunRows;
500
500
  private unreportedRunFailures;
501
+ /** The host check, if any, that holds RUN's final answer: the run log's, then its jobs', then the repository's. */
502
+ private nextHostCompletionCheck;
501
503
  /** The checkpoint row heading the conversation; `requestId` is the message the latest request answered. */
502
504
  private taskHandoffTurn;
503
505
  /** What the checkpoint learned since that row, each sent just before the message it arrived with. */
@@ -530,6 +532,10 @@ export declare class Agent {
530
532
  * A blank value clears the pin, matching clearPinnedTask.
531
533
  */
532
534
  setPinnedTask(task: string): void;
535
+ /** What RUN's done report is held against: the person's newest Done-when items in its messages, else the pinned task's. */
536
+ private taskDoneWhen;
537
+ /** The Done-when items of the person's newest message in RUN's MESSAGES that has any, kept on RUN: no other run's. */
538
+ private noteDoneWhen;
533
539
  /** Append the pinned task header (R7) to the static system prompt. */
534
540
  getExecutionContext(): ExecutionContext;
535
541
  /** The execution facts RUN's requests go with: its host policy's output limit, when one chose the model. */