@zergai/ztc 0.26.6-dev.202611240947 → 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 (268) hide show
  1. package/README.md +629 -167
  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 +7 -1
  17. package/dist/agent/backends/codex_app_server.js +11 -1
  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 +1 -0
  54. package/dist/agent/runtime/tool_runtime.js +2 -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 +80 -10
  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 +4 -1
  92. package/dist/config/hosted_runtime.js +4 -1
  93. package/dist/config/permission_pin.d.ts +34 -2
  94. package/dist/config/permission_pin.js +52 -2
  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/profiles.d.ts +21 -0
  98. package/dist/config/profiles.js +56 -2
  99. package/dist/config/types.d.ts +4 -1
  100. package/dist/config.js +34 -19
  101. package/dist/desktop/daily/codex_exec_adapter.js +7 -2
  102. package/dist/desktop/daily/desktop_wiring.d.ts +7 -1
  103. package/dist/desktop/daily/desktop_wiring.js +11 -3
  104. package/dist/desktop/daily/recipes.js +20 -4
  105. package/dist/desktop/health.d.ts +24 -0
  106. package/dist/desktop/health.js +151 -0
  107. package/dist/desktop/native_dialogs.d.ts +37 -0
  108. package/dist/desktop/native_dialogs.js +105 -0
  109. package/dist/diagnostics/session_export.d.ts +1 -0
  110. package/dist/diagnostics/session_export.js +28 -0
  111. package/dist/embedded/registry.js +4 -2
  112. package/dist/emulation/tool_adapters.js +9 -4
  113. package/dist/emulation/ztc_addendum.js +3 -0
  114. package/dist/headless.d.ts +11 -4
  115. package/dist/headless.js +99 -34
  116. package/dist/headless_approval.d.ts +6 -0
  117. package/dist/headless_cli.js +1 -1
  118. package/dist/hooks/runner.js +7 -6
  119. package/dist/library.d.ts +4 -0
  120. package/dist/library.js +3 -0
  121. package/dist/mcp/client.js +3 -3
  122. package/dist/modes/registry.js +13 -4
  123. package/dist/onboarding/setup_environment.js +13 -1
  124. package/dist/optimize/adapters/kernelbench.js +88 -10
  125. package/dist/optimize/adapters/types.d.ts +5 -0
  126. package/dist/optimize/executor.js +21 -0
  127. package/dist/panes/cli_install.d.ts +54 -0
  128. package/dist/panes/cli_install.js +157 -0
  129. package/dist/panes/model_catalog.js +3 -0
  130. package/dist/panes/new_pane_choices.d.ts +6 -2
  131. package/dist/panes/new_pane_choices.js +24 -12
  132. package/dist/panes/pane_cli_launch.d.ts +50 -0
  133. package/dist/panes/pane_cli_launch.js +124 -0
  134. package/dist/panes/pane_clis.d.ts +171 -0
  135. package/dist/panes/pane_clis.js +325 -0
  136. package/dist/panes/person_only_panes.d.ts +45 -0
  137. package/dist/panes/person_only_panes.js +117 -0
  138. package/dist/plugin/simulation_living.js +0 -2
  139. package/dist/plugin/simulation_living_engine.d.ts +1 -0
  140. package/dist/plugin/simulation_living_engine.js +1 -0
  141. package/dist/plugin/simulation_living_labels.d.ts +3 -0
  142. package/dist/plugin/simulation_living_labels.js +2 -0
  143. package/dist/router_auth.js +12 -1
  144. package/dist/session.js +26 -1
  145. package/dist/simulation/art/gemini_image.js +11 -5
  146. package/dist/simulation/domains/loader.js +25 -3
  147. package/dist/simulation/living/cold.d.ts +23 -0
  148. package/dist/simulation/living/cold.js +41 -0
  149. package/dist/simulation/living/context.d.ts +591 -1283
  150. package/dist/simulation/living/context.js +378 -244
  151. package/dist/simulation/living/contradictions.d.ts +14 -0
  152. package/dist/simulation/living/contradictions.js +282 -0
  153. package/dist/simulation/living/core/ids.d.ts +53 -0
  154. package/dist/simulation/living/core/ids.js +39 -0
  155. package/dist/simulation/living/core/kind.d.ts +20 -0
  156. package/dist/simulation/living/core/kind.js +15 -0
  157. package/dist/simulation/living/core/laws.d.ts +179 -0
  158. package/dist/simulation/living/core/laws.js +184 -0
  159. package/dist/simulation/living/core/ops.d.ts +257 -0
  160. package/dist/simulation/living/core/ops.js +34 -0
  161. package/dist/simulation/living/definer.d.ts +17 -1
  162. package/dist/simulation/living/definer.js +130 -51
  163. package/dist/simulation/living/definition.d.ts +174 -65
  164. package/dist/simulation/living/definition.js +287 -180
  165. package/dist/simulation/living/director.d.ts +80 -0
  166. package/dist/simulation/living/director.js +363 -0
  167. package/dist/simulation/living/frame.d.ts +108 -21
  168. package/dist/simulation/living/frame.js +111 -66
  169. package/dist/simulation/living/identifiers.d.ts +0 -1
  170. package/dist/simulation/living/identifiers.js +0 -3
  171. package/dist/simulation/living/index.d.ts +18 -9
  172. package/dist/simulation/living/index.js +18 -9
  173. package/dist/simulation/living/inference.d.ts +92 -50
  174. package/dist/simulation/living/inference.js +319 -175
  175. package/dist/simulation/living/knowledge.d.ts +28 -0
  176. package/dist/simulation/living/knowledge.js +73 -0
  177. package/dist/simulation/living/library.json +1177 -0
  178. package/dist/simulation/living/mechanics.d.ts +31 -34
  179. package/dist/simulation/living/mechanics.js +222 -138
  180. package/dist/simulation/living/model-input.d.ts +6 -3
  181. package/dist/simulation/living/model-input.js +18 -26
  182. package/dist/simulation/living/open-world.d.ts +74 -94
  183. package/dist/simulation/living/open-world.js +151 -30
  184. package/dist/simulation/living/phrases.d.ts +3 -0
  185. package/dist/simulation/living/phrases.js +37 -0
  186. package/dist/simulation/living/phrases.json +560 -0
  187. package/dist/simulation/living/projection.d.ts +316 -2
  188. package/dist/simulation/living/projection.js +50 -2
  189. package/dist/simulation/living/prompts/example-spec.json +11 -0
  190. package/dist/simulation/living/prompts/role-text.json +14 -0
  191. package/dist/simulation/living/prompts.d.ts +5 -0
  192. package/dist/simulation/living/prompts.js +275 -0
  193. package/dist/simulation/living/recall.d.ts +2 -2
  194. package/dist/simulation/living/reduce.d.ts +51 -14
  195. package/dist/simulation/living/reduce.js +941 -579
  196. package/dist/simulation/living/replay.d.ts +5 -4
  197. package/dist/simulation/living/replay.js +10 -9
  198. package/dist/simulation/living/runtime.d.ts +135 -25
  199. package/dist/simulation/living/runtime.js +1641 -583
  200. package/dist/simulation/living/scale.d.ts +96 -0
  201. package/dist/simulation/living/scale.js +124 -0
  202. package/dist/simulation/living/script.d.ts +5 -0
  203. package/dist/simulation/living/script.js +115 -0
  204. package/dist/simulation/living/shared-kinds.d.ts +4 -11
  205. package/dist/simulation/living/shared-kinds.js +11 -81
  206. package/dist/simulation/living/space.d.ts +14 -0
  207. package/dist/simulation/living/space.js +132 -0
  208. package/dist/simulation/living/state.d.ts +100 -0
  209. package/dist/simulation/living/state.js +393 -0
  210. package/dist/simulation/living/types.d.ts +829 -512
  211. package/dist/simulation/living/types.js +162 -187
  212. package/dist/simulation/living/world-rules.d.ts +100 -0
  213. package/dist/simulation/living/world-rules.js +267 -0
  214. package/dist/simulation/plugins/loader.js +11 -0
  215. package/dist/skills/loader.js +4 -0
  216. package/dist/tools.d.ts +1 -0
  217. package/dist/tools.js +1 -0
  218. package/dist/ui/ratatui/headless_pane_manager.d.ts +4 -1
  219. package/dist/ui/ratatui/headless_pane_manager.js +13 -9
  220. package/dist/ui/ratatui/pane_relay.js +29 -0
  221. package/dist/ui/ratatui/pane_type.d.ts +10 -0
  222. package/dist/ui/ratatui/pane_type.js +11 -0
  223. package/dist/ui/ratatui/process.d.ts +30 -0
  224. package/dist/ui/ratatui/process.js +133 -19
  225. package/dist/ui/ratatui/protocol.d.ts +124 -2
  226. package/dist/ui/ratatui/protocol.js +35 -0
  227. package/dist/ui/ratatui/relay_policy.js +3 -0
  228. package/dist/ui/ratatui/ztc_launch_trust.d.ts +2 -1
  229. package/dist/ui/ratatui/ztc_launch_trust.js +8 -1
  230. package/dist/ui/terminal_image.d.ts +12 -0
  231. package/dist/ui/terminal_image.js +21 -1
  232. package/dist/utils/codex_project_trust.d.ts +19 -0
  233. package/dist/utils/codex_project_trust.js +37 -0
  234. package/dist/utils/compaction.js +103 -20
  235. package/dist/utils/git_program_files.d.ts +19 -12
  236. package/dist/utils/git_program_files.js +411 -83
  237. package/dist/utils/host_shell.d.ts +10 -1
  238. package/dist/utils/host_shell.js +14 -1
  239. package/dist/utils/mid_turn_compaction.d.ts +2 -0
  240. package/dist/utils/mid_turn_compaction.js +2 -0
  241. package/dist/utils/models.js +6 -1
  242. package/dist/utils/sandbox.d.ts +109 -8
  243. package/dist/utils/sandbox.js +981 -187
  244. package/dist/utils/shell.d.ts +2 -0
  245. package/dist/utils/shell.js +10 -4
  246. package/dist/utils/subprocess_env.d.ts +47 -11
  247. package/dist/utils/subprocess_env.js +107 -15
  248. package/dist/utils/system_ps.d.ts +8 -0
  249. package/dist/utils/system_ps.js +39 -7
  250. package/dist/utils/unattended_compaction.d.ts +9 -0
  251. package/dist/utils/unattended_compaction.js +13 -0
  252. package/dist/utils/ztc_own_state.d.ts +8 -5
  253. package/dist/utils/ztc_own_state.js +17 -11
  254. package/dist/web/mirror_client.js +1 -0
  255. package/dist/web/mirror_stream.d.ts +50 -6
  256. package/dist/web/mirror_stream.js +160 -15
  257. package/dist/workflows/registry.js +3 -1
  258. package/dist/workspace/controller.js +12 -0
  259. package/dist/workspace_collision.d.ts +3 -0
  260. package/dist/workspace_collision.js +14 -1
  261. package/dist/workspace_session_context.js +2 -1
  262. package/dist/zlm-embed.mjs +3823 -1970
  263. package/node_modules/@zerg/model-contracts/README.md +16 -4
  264. package/node_modules/@zerg/model-contracts/index.js +6 -1
  265. package/npm-shrinkwrap.json +1 -1
  266. package/package.json +42 -24
  267. package/packages/model-contracts/README.md +16 -4
  268. package/packages/model-contracts/index.js +6 -1
@@ -25,7 +25,7 @@ thread settings. Translation happens at the provider boundary:
25
25
  | DeepSeek | `thinking.type`, plus `reasoning_effort` when enabled |
26
26
  | Anthropic | `output_config.effort` |
27
27
  | Gemini 2.5 | `generationConfig.thinkingConfig.thinkingBudget` |
28
- | Gemini 3 | `generationConfig.thinkingConfig.thinkingLevel` |
28
+ | Gemini 3 and 4 | `generationConfig.thinkingConfig.thinkingLevel` |
29
29
  | Kimi | Exact K3 depth ladder; no invented depth control for K2.6 |
30
30
  | Z.AI | `thinking.type`; graded effort only on reviewed GLM 5.2+ models |
31
31
  | Cohere | `thinking.type` on Command A Reasoning |
@@ -75,11 +75,13 @@ chat API accepts `none`, `low`, `high` and `max` and rejects unknown levels with
75
75
  HTTP 422. The contract keeps DeepSeek's own four levels, although DeepInfra
76
76
  also accepts `minimal`, `medium` and `xhigh`. IDs are matched case-insensitively.
77
77
 
78
- `morph/morph-dsv41flash-1017`, `morph/morph-dsv41flash` and
79
- `morph/morph-kimik31` are Morph's personal-subscription models. Bounded live
78
+ `morph/morph-dsv41flash-1017`, `morph/morph-dsv41flash-abliterated`,
79
+ `morph/morph-dsv41flash` and `morph/morph-kimik31` are Morph's
80
+ personal-subscription models. Bounded live
80
81
  requests on November 10, 2026 showed Morph's chat API accepts `none`, `minimal`,
81
82
  `low`, `medium`, `high`, `xhigh` and `max` for each and rejects other values with
82
- HTTP 400; `none` turns thinking off. The DeepSeek pair keeps DeepSeek's four
83
+ HTTP 400; `none` turns thinking off. The abliterated checkpoint shares the 1017
84
+ contract. The DeepSeek models keep DeepSeek's four
83
85
  levels and the 384,000-token output range above, with a 1,048,576-token window
84
86
  (a 945,000-token prompt was accepted). Kimi K3.1 lists the five levels whose
85
87
  reasoning depth differed, Kimi K3's 64,000-token output cap, and a conservative
@@ -87,6 +89,16 @@ reasoning depth differed, Kimi K3's 64,000-token output cap, and a conservative
87
89
  `max_tokens` at 1,048,576 or less. Router serves these only on their owner's own
88
90
  key.
89
91
 
92
+ `gemini/gemini-4-neon` is Google's stable Gemini 4 Neon. Its
93
+ [model page](https://aistudio.google.com/docs/models/gemini-4-neon) and the
94
+ [thinking guide](https://aistudio.google.com/docs/thinking) (checked November 25,
95
+ 2026) publish a 1,048,576-token window that input, thinking and output share,
96
+ image input, and the levels `low`, `medium`, `high` (its default) and `xhigh`;
97
+ Gemini 4 refuses `minimal`. A `generateContent` call returns at most 65,536
98
+ output tokens ([long decode](https://aistudio.google.com/docs/long-decode?generate-content=true)).
99
+ The 256-token output floor and hosted fallback are Router policy, as for the
100
+ other Gemini models.
101
+
90
102
  ## Evidence and extension
91
103
 
92
104
  Reviewed on September 30, 2026:
@@ -61,6 +61,10 @@ const MODEL_CONTRACTS = new Map([
61
61
  ["gemini-3.5-flash", { reasoningEfforts: ["minimal","low","medium","high"], maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
62
62
  ["gemini-3.8-flash", { reasoningEfforts: ["minimal","low","medium","high"], maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
63
63
  ["gemini-3.1-pro-preview", { reasoningEfforts: ["low","high"], maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
64
+ // Stable; a window input, thinking and output share; 65,536 output tokens a generateContent call; image input;
65
+ // thinkingLevel low/medium/high (default)/xhigh, minimal refused. https://aistudio.google.com/docs/models/gemini-4-neon
66
+ // and /docs/thinking (2026-11-25).
67
+ ["gemini-4-neon", { reasoningEfforts: ["low","medium","high","xhigh"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
64
68
  ])],
65
69
  ["deepseek", new Map([
66
70
  // Image input: only the vision preview is marked; nobody checked DeepSeek's own API.
@@ -174,13 +178,14 @@ const MODEL_CONTRACTS = new Map([
174
178
  // DeepSeek ids named the colour of a PNG sent as an image_url part
175
179
  // (2026-11-16); the Kimi models were not checked for images.
176
180
  ["morph-dsv41flash-1017", { reasoningEfforts: ["none","low","high","max"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":384000}, fallbackRouting: true, images: true }],
181
+ ["morph-dsv41flash-abliterated", { reasoningEfforts: ["none","low","high","max"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":384000}, fallbackRouting: true }],
177
182
  ["morph-dsv41flash", { reasoningEfforts: ["none","low","high","max"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":384000}, fallbackRouting: true, images: true }],
178
183
  ["morph-kimik31", { reasoningEfforts: ["none","low","medium","high","max"], contextWindow: 262144, maxOutputTokens: {"min":256,"max":64000}, fallbackRouting: true }],
179
184
  ["morph-kimik3", { reasoningEfforts: ["none","low","high","max"], maxOutputTokens: null, fallbackRouting: false }],
180
185
  ])],
181
186
  ]);
182
187
 
183
- export const CONTRACT_PROVIDERS = Object.freeze(["anthropic","openai","gemini","deepseek","fireworks","openrouter","deepinfra","morph","kimi","voyage","cohere","elevenlabs","replicate","fal","zai","modal","codex","self_hosted","openai_compatible","typesafe"]);
188
+ export const CONTRACT_PROVIDERS = Object.freeze(["anthropic","openai","gemini","deepseek","fireworks","openrouter","deepinfra","morph","kimi","voyage","cohere","elevenlabs","replicate","fal","zai","modal","codex","self_hosted","openai_compatible","typesafe","hive"]);
184
189
 
185
190
  export function normalizeContractProvider(provider) {
186
191
  const normalized = provider.trim().toLowerCase();
@@ -5,7 +5,7 @@
5
5
  "packages": {
6
6
  "": {
7
7
  "name": "zerg-ztc",
8
- "version": "0.26.6-dev.202611240947",
8
+ "version": "0.27.0-beta.1",
9
9
  "bundleDependencies": [
10
10
  "@zerg/model-contracts",
11
11
  "@ztc/sim-graph",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zergai/ztc",
3
- "version": "0.26.6-dev.202611240947",
3
+ "version": "0.27.0-beta.1",
4
4
  "description": "Zerg Terminal Client - CLI agent for continual AI systems",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "homepage": "https://zergai.com/docs/ztc",
@@ -122,11 +122,22 @@
122
122
  "types": "./dist/plugin/simulation_living.d.ts",
123
123
  "import": "./dist/plugin/simulation_living.js",
124
124
  "default": "./dist/plugin/simulation_living.js"
125
+ },
126
+ "./plugin/simulation-living-engine": {
127
+ "types": "./dist/plugin/simulation_living_engine.d.ts",
128
+ "import": "./dist/plugin/simulation_living_engine.js",
129
+ "default": "./dist/plugin/simulation_living_engine.js"
130
+ },
131
+ "./plugin/simulation-living-labels": {
132
+ "types": "./dist/plugin/simulation_living_labels.d.ts",
133
+ "import": "./dist/plugin/simulation_living_labels.js",
134
+ "default": "./dist/plugin/simulation_living_labels.js"
125
135
  }
126
136
  },
127
137
  "scripts": {
128
138
  "prebuild": "npm run clean",
129
- "build": "npm run build:packages && tsc && npm run build:remote-broker && npm run build:zlm-embed && npm run copy:modes && npm run copy:domains && npm run copy:harnesses && npm run copy:workflow-templates && npm run copy:audio && npm run copy:prompts && npm run copy:skills && npm run chmod:cli",
139
+ "build": "npm run build:living-prompts && npm run build:packages && tsc && npm run build:remote-broker && npm run build:zlm-embed && npm run copy:modes && npm run copy:domains && npm run copy:living && npm run copy:harnesses && npm run copy:workflow-templates && npm run copy:audio && npm run copy:prompts && npm run copy:skills && npm run chmod:cli",
140
+ "build:living-prompts": "node scripts/build-living-prompts.mjs",
130
141
  "build:zlm-embed": "node scripts/build-zlm-embed.mjs",
131
142
  "build:packages": "npm --prefix packages/sim-graph run build && npm --prefix packages/sim-swarm run build",
132
143
  "chmod:cli": "chmod +x dist/cli_main.js",
@@ -134,6 +145,7 @@
134
145
  "copy:skills": "find src/skills/bundled -name 'SKILL.md' | while read f; do dir=$(dirname \"${f#src/}\"); mkdir -p \"dist/$dir\"; cp \"$f\" \"dist/$dir/\"; done",
135
146
  "copy:modes": "mkdir -p dist/modes/builtin && cp src/modes/builtin/*.yaml dist/modes/builtin/",
136
147
  "copy:domains": "find src/simulation/domains -name '*.yaml' -o -name '*.j2' | while read f; do dir=$(dirname \"${f#src/}\"); mkdir -p \"dist/$dir\"; cp \"$f\" \"dist/$dir/\"; done && find src/simulation/templates -name '*.j2' | while read f; do dir=$(dirname \"${f#src/}\"); mkdir -p \"dist/$dir\"; cp \"$f\" \"dist/$dir/\"; done",
148
+ "copy:living": "find src/simulation/living -name '*.json' | while read f; do dir=$(dirname \"${f#src/}\"); mkdir -p \"dist/$dir\"; cp \"$f\" \"dist/$dir/\"; done",
137
149
  "copy:harnesses": "find src/computer_use/harnesses -name '*.json' -o -name '*.md' | while read f; do dir=$(dirname \"${f#src/}\"); mkdir -p \"dist/$dir\"; cp \"$f\" \"dist/$dir/\"; done",
138
150
  "copy:workflow-templates": "find src/workflows/templates -type f | while read f; do dir=$(dirname \"${f#src/}\"); mkdir -p \"dist/$dir\"; cp \"$f\" \"dist/$dir/\"; done",
139
151
  "copy:audio": "rm -rf dist/audio/packs && mkdir -p dist/audio/packs && cp -R src/audio/packs/peon dist/audio/packs/",
@@ -144,6 +156,7 @@
144
156
  "pack:dry": "npm pack --dry-run --cache ${NPM_CONFIG_CACHE:-/tmp/ztc-npm-cache}",
145
157
  "pack:tarball": "npm pack --cache ${NPM_CONFIG_CACHE:-/tmp/ztc-npm-cache}",
146
158
  "prepack": "npm run package:prepare && node ../scripts/npm/prepare-cli.mjs",
159
+ "prepublishOnly": "node ../scripts/npm/ztc-lane-only.mjs",
147
160
  "predev": "npm run clean",
148
161
  "dev": "npm run build:rust && tsx src/cli_main.ts",
149
162
  "dev:ink": "tsx src/cli.tsx",
@@ -159,12 +172,17 @@
159
172
  "test:unit": "node scripts/run-unit-tests.mjs",
160
173
  "test:unit:ci": "node scripts/run-unit-tests.mjs --ci",
161
174
  "test:unit:fast": "node scripts/run-unit-tests.mjs --fast",
175
+ "test:unit:quick": "node scripts/run-unit-tests.mjs --ci --quick",
176
+ "test:unit:slow": "node scripts/run-unit-tests.mjs --ci --slow",
177
+ "test:affected": "node scripts/run-unit-tests.mjs --ci --affected",
162
178
  "test:zterm:smoke": "cargo build --manifest-path packages/zterm/Cargo.toml && node tests/sim/smoke-zterm-desktop.mjs",
163
179
  "test:zterm-bench": "node scripts/test-zterm-bench.mjs",
164
180
  "release:zterm:request": "node scripts/write-zterm-release-request.mjs",
165
181
  "release:zterm:package": "node scripts/package-zterm-macos.mjs",
166
182
  "release:zterm:collect": "node scripts/collect-zterm-release.mjs",
167
- "test:simulation": "ZTC_SIM_DISABLE_EMBEDDINGS=1 node --import tsx --test tests/simulation/*.test.ts && ZTC_SIM_DISABLE_EMBEDDINGS=1 node --import tsx --test --test-concurrency=1 tests/simulation/scale/*.test.ts && ZTC_SIM_DISABLE_EMBEDDINGS=1 vitest run tests/mutation/*.test.ts",
183
+ "guard:static": "node --import tsx tests/simulation/guards/static.ts",
184
+ "test:simulation": "npm run guard:static && ZTC_SIM_DISABLE_EMBEDDINGS=1 node --import tsx --test tests/simulation/*.test.ts && ZTC_SIM_DISABLE_EMBEDDINGS=1 node --import tsx --test --test-concurrency=1 tests/simulation/scale/*.test.ts && ZTC_SIM_DISABLE_EMBEDDINGS=1 vitest run tests/mutation/*.test.ts",
185
+ "test:simulation:forever": "ZTC_SIM_DISABLE_EMBEDDINGS=1 ZTC_SIM_FOREVER=1 node --import tsx --test tests/simulation/generality_soak.test.ts",
168
186
  "test:mutation": "vitest run tests/mutation/*.test.ts",
169
187
  "smoke:simulation-contract": "ZTC_SIM_DISABLE_EMBEDDINGS=1 node --import tsx scripts/smoke-simulation-contract.ts",
170
188
  "test:plugin-loader-dist": "node --import tsx tests/unit/plugin_loader_dist_import_static.test.ts",
@@ -283,16 +301,16 @@
283
301
  "engines": {
284
302
  "node": "^20.19.0 || >=22.12.0"
285
303
  },
286
- "gitHead": "5e4e77c3737a5d06513218f8f4fe2829e3812638",
304
+ "gitHead": "e950b93840e18e038f074ced0b4781ab0a6b1722",
287
305
  "repository": {
288
306
  "type": "git",
289
307
  "url": "git+https://github.com/Epoch-ML/zerg.git",
290
308
  "directory": "ztc"
291
309
  },
292
310
  "zergRelease": {
293
- "branch": "development",
294
- "channel": "dev",
295
- "sourceCommit": "5e4e77c3737a5d06513218f8f4fe2829e3812638",
311
+ "branch": "main",
312
+ "channel": "next",
313
+ "sourceCommit": "e950b93840e18e038f074ced0b4781ab0a6b1722",
296
314
  "sourceVersion": "0.2.0-canary.2",
297
315
  "whatsNew": [
298
316
  "Headless runs (--headless, -p, --json) check their work before ending, and the exit code says how each ended: failed, timed out or stalled.",
@@ -301,6 +319,14 @@
301
319
  "Your first Zerg Router sign-in picks your account's own default model and names it; a model you already chose stays."
302
320
  ],
303
321
  "changes": [
322
+ "ZTC's Codex threads load no project-local Codex config.",
323
+ "The trust earlier versions' Codex threads saved stays: review it.",
324
+ "The desktop's delegated Codex workers keep project-local Codex config out on their marks alone.",
325
+ "The release lane scans every member of the npm tarball before it publishes, and nothing else publishes ZTC.",
326
+ "The publish guard binds every member the scanner reads only in part, and its pinned digests to the G10 form; npm publishes only the bytes it scanned.",
327
+ "A Gemini API key goes in the x-goog-api-key header, never in a URL.",
328
+ "Where its host runs ZTC, no program it starts that is not a ZTC is given a platform or Router bearer.",
329
+ "Under ZTC_PERMISSION_PROFILE_PINNED, your commands run only inside the OS sandbox, and the shell panes, runners and workspaces that ran them outside it are refused.",
304
330
  "A headless start its host runs (ZTC_HOSTED=1) keeps the agent's commands in an OS sandbox.",
305
331
  "Under ZTC_PERMISSION_PROFILE_PINNED, ZTC doesn't start where its own state or TMPDIR lies inside a folder the profile lets the agent write.",
306
332
  "Under ZTC_PERMISSION_PROFILE_PINNED, or where its host runs it (ZTC_HOSTED=1), a headless run approves no call that starts a program outside the OS sandbox by itself.",
@@ -317,8 +343,14 @@
317
343
  "A profile's relative file roots hold for the agent's commands wherever they run.",
318
344
  "bubblewrap plans no command whose roots would put the host's services' sockets in its reach.",
319
345
  "Under bubblewrap, a root named through a link is bound as named and by its real path, and what the plan keeps from a command in it is kept at both.",
346
+ "ZTC looks at each root a permission profile names once, and nothing after that look resolves the root again.",
347
+ "A root a permission profile names through a link that a command could have made is refused.",
348
+ "A root a permission profile names that ZTC can't look at, or a denial it can't look up, is refused saying why, not with a raw error on every call.",
349
+ "A root inside another root is that root's, under bubblewrap too.",
350
+ "A root inside another root is no root of its own where the sandbox protects the programs a repository names, and nothing there resolves a root again.",
351
+ "A command's working directory that a link in one of its roots leads outside them gives it nothing there.",
320
352
  "Under bubblewrap, a denied path that doesn't exist yet can't be made.",
321
- "No sandboxed command carries off what the sandbox hides with a folder above it.",
353
+ "No sandboxed command renames a folder above what the sandbox hides to carry it off.",
322
354
  "Under bubblewrap, ZTC doesn't plan a command whose denial, or its own state, is named through a link the command could remove.",
323
355
  "On macOS, a sandboxed command that keeps the network connects to no Unix socket but the system's name resolver's.",
324
356
  "The LSP tools start their language server only where a profile lets the agent run a program outside the OS sandbox.",
@@ -326,25 +358,11 @@
326
358
  "The ML tools start ZTC's ML helper only where a profile lets the agent run a program outside the OS sandbox, and the files they name are checked.",
327
359
  "/mcp shows where a server is, not the credentials its address carries.",
328
360
  "Under a profile that limits the agent, ZTC's own state is never the agent's.",
329
- "A profile whose sandbox block turns the network off asks for the OS sandbox for its commands.",
330
- "Under such a profile, ZTC doesn't start while one of its own files has a second name.",
331
- "Under such a profile, what could widen it is kept as ZTC started with it.",
332
- "Under such a profile, hooks run inside the OS sandbox the profile requires, or not at all.",
333
- "Under such a profile, the file tools open only the file the policy admitted",
334
- "Where the agent's commands run only inside an OS sandbox, ZTC starts no program the agent chose outside it.",
335
- "Where the agent can write the repository's config, ZTC's own git starts none of its programs.",
336
- "ZTC's own git starts no fsmonitor, external diff, textconv driver or signature program the repository names, under every profile.",
337
- "Where the agent's commands write inside an OS sandbox, the files where a repository names programs are read-only to them, in every repository ZTC finds that they can write",
338
- "ZTC keeps its credentials out of every child's own environment.",
339
- "A host can hand ZTC its Router grant and the mirror's secret in a file.",
340
- "ZTC takes the credentials handed to it as it starts together, or none of them.",
341
- "A hosted resident writes its host's Router grant nowhere a log or stream keeps it.",
342
- "A platform login handed over in ZTC_AUTH_TOKEN goes only to a ZergAI platform API someone named for it.",
343
- "A Zerg Router credential ZTC can recognize is never sent to a platform API call."
361
+ "A profile whose sandbox block turns the network off asks for the OS sandbox for its commands."
344
362
  ]
345
363
  },
346
364
  "publishConfig": {
347
- "tag": "dev",
365
+ "tag": "next",
348
366
  "access": "public"
349
367
  }
350
368
  }
@@ -25,7 +25,7 @@ thread settings. Translation happens at the provider boundary:
25
25
  | DeepSeek | `thinking.type`, plus `reasoning_effort` when enabled |
26
26
  | Anthropic | `output_config.effort` |
27
27
  | Gemini 2.5 | `generationConfig.thinkingConfig.thinkingBudget` |
28
- | Gemini 3 | `generationConfig.thinkingConfig.thinkingLevel` |
28
+ | Gemini 3 and 4 | `generationConfig.thinkingConfig.thinkingLevel` |
29
29
  | Kimi | Exact K3 depth ladder; no invented depth control for K2.6 |
30
30
  | Z.AI | `thinking.type`; graded effort only on reviewed GLM 5.2+ models |
31
31
  | Cohere | `thinking.type` on Command A Reasoning |
@@ -75,11 +75,13 @@ chat API accepts `none`, `low`, `high` and `max` and rejects unknown levels with
75
75
  HTTP 422. The contract keeps DeepSeek's own four levels, although DeepInfra
76
76
  also accepts `minimal`, `medium` and `xhigh`. IDs are matched case-insensitively.
77
77
 
78
- `morph/morph-dsv41flash-1017`, `morph/morph-dsv41flash` and
79
- `morph/morph-kimik31` are Morph's personal-subscription models. Bounded live
78
+ `morph/morph-dsv41flash-1017`, `morph/morph-dsv41flash-abliterated`,
79
+ `morph/morph-dsv41flash` and `morph/morph-kimik31` are Morph's
80
+ personal-subscription models. Bounded live
80
81
  requests on November 10, 2026 showed Morph's chat API accepts `none`, `minimal`,
81
82
  `low`, `medium`, `high`, `xhigh` and `max` for each and rejects other values with
82
- HTTP 400; `none` turns thinking off. The DeepSeek pair keeps DeepSeek's four
83
+ HTTP 400; `none` turns thinking off. The abliterated checkpoint shares the 1017
84
+ contract. The DeepSeek models keep DeepSeek's four
83
85
  levels and the 384,000-token output range above, with a 1,048,576-token window
84
86
  (a 945,000-token prompt was accepted). Kimi K3.1 lists the five levels whose
85
87
  reasoning depth differed, Kimi K3's 64,000-token output cap, and a conservative
@@ -87,6 +89,16 @@ reasoning depth differed, Kimi K3's 64,000-token output cap, and a conservative
87
89
  `max_tokens` at 1,048,576 or less. Router serves these only on their owner's own
88
90
  key.
89
91
 
92
+ `gemini/gemini-4-neon` is Google's stable Gemini 4 Neon. Its
93
+ [model page](https://aistudio.google.com/docs/models/gemini-4-neon) and the
94
+ [thinking guide](https://aistudio.google.com/docs/thinking) (checked November 25,
95
+ 2026) publish a 1,048,576-token window that input, thinking and output share,
96
+ image input, and the levels `low`, `medium`, `high` (its default) and `xhigh`;
97
+ Gemini 4 refuses `minimal`. A `generateContent` call returns at most 65,536
98
+ output tokens ([long decode](https://aistudio.google.com/docs/long-decode?generate-content=true)).
99
+ The 256-token output floor and hosted fallback are Router policy, as for the
100
+ other Gemini models.
101
+
90
102
  ## Evidence and extension
91
103
 
92
104
  Reviewed on September 30, 2026:
@@ -61,6 +61,10 @@ const MODEL_CONTRACTS = new Map([
61
61
  ["gemini-3.5-flash", { reasoningEfforts: ["minimal","low","medium","high"], maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
62
62
  ["gemini-3.8-flash", { reasoningEfforts: ["minimal","low","medium","high"], maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
63
63
  ["gemini-3.1-pro-preview", { reasoningEfforts: ["low","high"], maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
64
+ // Stable; a window input, thinking and output share; 65,536 output tokens a generateContent call; image input;
65
+ // thinkingLevel low/medium/high (default)/xhigh, minimal refused. https://aistudio.google.com/docs/models/gemini-4-neon
66
+ // and /docs/thinking (2026-11-25).
67
+ ["gemini-4-neon", { reasoningEfforts: ["low","medium","high","xhigh"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":65536}, fallbackRouting: true, images: true }],
64
68
  ])],
65
69
  ["deepseek", new Map([
66
70
  // Image input: only the vision preview is marked; nobody checked DeepSeek's own API.
@@ -174,13 +178,14 @@ const MODEL_CONTRACTS = new Map([
174
178
  // DeepSeek ids named the colour of a PNG sent as an image_url part
175
179
  // (2026-11-16); the Kimi models were not checked for images.
176
180
  ["morph-dsv41flash-1017", { reasoningEfforts: ["none","low","high","max"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":384000}, fallbackRouting: true, images: true }],
181
+ ["morph-dsv41flash-abliterated", { reasoningEfforts: ["none","low","high","max"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":384000}, fallbackRouting: true }],
177
182
  ["morph-dsv41flash", { reasoningEfforts: ["none","low","high","max"], contextWindow: 1048576, maxOutputTokens: {"min":256,"max":384000}, fallbackRouting: true, images: true }],
178
183
  ["morph-kimik31", { reasoningEfforts: ["none","low","medium","high","max"], contextWindow: 262144, maxOutputTokens: {"min":256,"max":64000}, fallbackRouting: true }],
179
184
  ["morph-kimik3", { reasoningEfforts: ["none","low","high","max"], maxOutputTokens: null, fallbackRouting: false }],
180
185
  ])],
181
186
  ]);
182
187
 
183
- export const CONTRACT_PROVIDERS = Object.freeze(["anthropic","openai","gemini","deepseek","fireworks","openrouter","deepinfra","morph","kimi","voyage","cohere","elevenlabs","replicate","fal","zai","modal","codex","self_hosted","openai_compatible","typesafe"]);
188
+ export const CONTRACT_PROVIDERS = Object.freeze(["anthropic","openai","gemini","deepseek","fireworks","openrouter","deepinfra","morph","kimi","voyage","cohere","elevenlabs","replicate","fal","zai","modal","codex","self_hosted","openai_compatible","typesafe","hive"]);
184
189
 
185
190
  export function normalizeContractProvider(provider) {
186
191
  const normalized = provider.trim().toLowerCase();