@zergai/ztc 0.5.0-beta.1 → 0.5.1-dev.202611021234
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.
- package/README.md +65 -46
- package/THIRD_PARTY_NOTICES.md +7 -2
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/ztc-audio-darwin-arm64 +0 -0
- package/bin/ztc-capture-darwin-arm64 +0 -0
- package/bin/ztc-computer-darwin-arm64 +0 -0
- package/bin/ztc-llm-darwin-arm64 +0 -0
- package/bin/ztc-tts-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/zterm-darwin-arm64 +0 -0
- package/dist/App.js +26 -9
- package/dist/agent/agent.d.ts +77 -0
- package/dist/agent/agent.js +618 -94
- package/dist/agent/backends/account_login.js +3 -1
- package/dist/agent/backends/anthropic.js +4 -3
- package/dist/agent/backends/bedrock.d.ts +20 -0
- package/dist/agent/backends/bedrock.js +175 -0
- package/dist/agent/backends/claude_cli.js +8 -0
- package/dist/agent/backends/codex_app_server.js +2 -0
- package/dist/agent/backends/codex_auth.d.ts +5 -2
- package/dist/agent/backends/codex_auth.js +131 -31
- package/dist/agent/backends/gemini.js +1 -1
- package/dist/agent/backends/http_error.d.ts +2 -0
- package/dist/agent/backends/http_error.js +4 -0
- package/dist/agent/backends/index.d.ts +3 -0
- package/dist/agent/backends/index.js +16 -0
- package/dist/agent/backends/model_pool.d.ts +20 -0
- package/dist/agent/backends/model_pool.js +98 -0
- package/dist/agent/backends/openai.js +2 -0
- package/dist/agent/backends/openai_compatible.js +8 -3
- package/dist/agent/backends/openai_responses.d.ts +14 -3
- package/dist/agent/backends/openai_responses.js +91 -26
- package/dist/agent/backends/responses_reasoning.d.ts +5 -0
- package/dist/agent/backends/responses_reasoning.js +23 -0
- package/dist/agent/backends/transport_errors.d.ts +6 -0
- package/dist/agent/backends/transport_errors.js +11 -0
- package/dist/agent/backends/types.d.ts +25 -2
- package/dist/agent/backends/types.js +4 -0
- package/dist/agent/backends/zrouter_stream.d.ts +16 -0
- package/dist/agent/backends/zrouter_stream.js +162 -17
- package/dist/agent/background_workers.d.ts +68 -0
- package/dist/agent/background_workers.js +139 -0
- package/dist/agent/commands/accounts.d.ts +9 -1
- package/dist/agent/commands/accounts.js +13 -5
- package/dist/agent/commands/auth.d.ts +30 -1
- package/dist/agent/commands/auth.js +166 -35
- package/dist/agent/commands/command_refusal.d.ts +8 -0
- package/dist/agent/commands/command_refusal.js +8 -0
- package/dist/agent/commands/compact.js +16 -10
- package/dist/agent/commands/config.js +386 -80
- package/dist/agent/commands/connect.d.ts +20 -0
- package/dist/agent/commands/connect.js +150 -0
- package/dist/agent/commands/credential_redaction.d.ts +12 -0
- package/dist/agent/commands/credential_redaction.js +46 -0
- package/dist/agent/commands/credential_status.d.ts +72 -0
- package/dist/agent/commands/credential_status.js +181 -0
- package/dist/agent/commands/direct_credential_prompt.d.ts +71 -0
- package/dist/agent/commands/direct_credential_prompt.js +422 -0
- package/dist/agent/commands/effort.d.ts +1 -0
- package/dist/agent/commands/effort.js +16 -34
- package/dist/agent/commands/goal.d.ts +0 -4
- package/dist/agent/commands/goal.js +48 -10
- package/dist/agent/commands/handoff.d.ts +6 -0
- package/dist/agent/commands/handoff.js +17 -0
- package/dist/agent/commands/help.js +1 -1
- package/dist/agent/commands/inbox.js +3 -0
- package/dist/agent/commands/index.js +5 -3
- package/dist/agent/commands/keybindings.js +4 -3
- package/dist/agent/commands/mirror.js +29 -16
- package/dist/agent/commands/model.js +83 -4
- package/dist/agent/commands/models.d.ts +1 -1
- package/dist/agent/commands/models.js +89 -67
- package/dist/agent/commands/openai_compat_wizard.d.ts +3 -2
- package/dist/agent/commands/openai_compat_wizard.js +53 -15
- package/dist/agent/commands/provider_choices.d.ts +56 -0
- package/dist/agent/commands/provider_choices.js +72 -3
- package/dist/agent/commands/provider_model_defaults.d.ts +7 -0
- package/dist/agent/commands/provider_model_defaults.js +11 -0
- package/dist/agent/commands/provider_selection.d.ts +27 -2
- package/dist/agent/commands/provider_selection.js +143 -8
- package/dist/agent/commands/reasoning_page.d.ts +33 -0
- package/dist/agent/commands/reasoning_page.js +595 -0
- package/dist/agent/commands/reasoning_picker.d.ts +14 -0
- package/dist/agent/commands/reasoning_picker.js +99 -0
- package/dist/agent/commands/reasoning_settings.d.ts +18 -0
- package/dist/agent/commands/reasoning_settings.js +46 -0
- package/dist/agent/commands/settings.d.ts +2 -0
- package/dist/agent/commands/settings.js +689 -264
- package/dist/agent/commands/status.js +13 -44
- package/dist/agent/commands/types.d.ts +108 -2
- package/dist/agent/commands/update.d.ts +18 -0
- package/dist/agent/commands/update.js +55 -96
- package/dist/agent/completion_state.d.ts +18 -0
- package/dist/agent/completion_state.js +35 -3
- package/dist/agent/factory.d.ts +9 -1
- package/dist/agent/factory.js +61 -17
- package/dist/agent/loop_policy.d.ts +14 -0
- package/dist/agent/loop_policy.js +9 -0
- package/dist/agent/request_encoder.d.ts +6 -0
- package/dist/agent/request_encoder.js +36 -6
- package/dist/agent/result_emit_cap.d.ts +1 -0
- package/dist/agent/result_emit_cap.js +1 -0
- package/dist/agent/runaway_output.d.ts +32 -0
- package/dist/agent/runaway_output.js +80 -0
- package/dist/agent/runtime/command_execution_policy.d.ts +6 -0
- package/dist/agent/runtime/command_execution_policy.js +39 -0
- package/dist/agent/runtime/evidence.d.ts +17 -1
- package/dist/agent/runtime/evidence.js +58 -8
- package/dist/agent/runtime/execution_context.js +7 -3
- package/dist/agent/runtime/read_only_command.d.ts +15 -0
- package/dist/agent/runtime/read_only_command.js +265 -0
- package/dist/agent/runtime/recovery.js +2 -38
- package/dist/agent/runtime/source_verification.js +3 -1
- package/dist/agent/runtime/tool_checkpoints.js +5 -1
- package/dist/agent/runtime/tool_runtime.js +15 -1
- package/dist/agent/runtime/tool_scheduler.js +3 -1
- package/dist/agent/subagent.d.ts +4 -0
- package/dist/agent/subagent.js +195 -23
- package/dist/agent/system_prompt.d.ts +3 -1
- package/dist/agent/system_prompt.js +3 -1
- package/dist/agent/tool_response_store.d.ts +9 -0
- package/dist/agent/tool_response_store.js +39 -3
- package/dist/agent/tool_result_parsing.d.ts +2 -0
- package/dist/agent/tool_result_parsing.js +1 -0
- package/dist/agent/tool_result_presentation.d.ts +21 -0
- package/dist/agent/tool_result_presentation.js +237 -0
- package/dist/agent/tools/apply_patch.js +130 -42
- package/dist/agent/tools/deferred.js +22 -2
- package/dist/agent/tools/delegate.js +182 -49
- package/dist/agent/tools/edit_view.d.ts +13 -0
- package/dist/agent/tools/edit_view.js +134 -0
- package/dist/agent/tools/file.js +54 -16
- package/dist/agent/tools/recall_tool_response.d.ts +6 -0
- package/dist/agent/tools/recall_tool_response.js +60 -17
- package/dist/agent/tools/screenshot.js +5 -3
- package/dist/agent/tools/search.js +18 -9
- package/dist/agent/tools/shell.d.ts +1 -1
- package/dist/agent/tools/shell.js +48 -10
- package/dist/agent/tools/sim_domain_tools.js +7 -1
- package/dist/agent/tools/tool_groups.d.ts +34 -0
- package/dist/agent/tools/tool_groups.js +112 -0
- package/dist/agent/tools/types.d.ts +10 -0
- package/dist/app/activity.js +2 -1
- package/dist/app/agent_runner.js +13 -4
- package/dist/app/ask_user_response.d.ts +6 -0
- package/dist/app/ask_user_response.js +26 -0
- package/dist/app/command_context.js +11 -5
- package/dist/app/launch_notices.d.ts +10 -0
- package/dist/app/launch_notices.js +20 -0
- package/dist/app/selection_completion.d.ts +30 -1
- package/dist/app/selection_completion.js +191 -28
- package/dist/app/session_manager.d.ts +5 -0
- package/dist/app/session_manager.js +50 -12
- package/dist/app/session_messages.d.ts +3 -0
- package/dist/app/session_messages.js +34 -12
- package/dist/app/workspace_admission_details.d.ts +7 -0
- package/dist/app/workspace_admission_details.js +45 -1
- package/dist/cli_args.js +1 -1
- package/dist/cli_main.js +20 -3
- package/dist/cli_ratatui.d.ts +95 -3
- package/dist/cli_ratatui.js +654 -161
- package/dist/components/InputArea.js +1 -1
- package/dist/config/compaction.d.ts +2 -1
- package/dist/config/compaction.js +2 -1
- package/dist/config/defaults.js +20 -48
- package/dist/config/provider_api_key_env.d.ts +76 -0
- package/dist/config/provider_api_key_env.js +148 -0
- package/dist/config/resolved.d.ts +4 -4
- package/dist/config/types.d.ts +102 -1
- package/dist/config.d.ts +70 -8
- package/dist/config.js +253 -63
- package/dist/diagnostics/session_export.d.ts +1 -0
- package/dist/diagnostics/session_export.js +81 -13
- package/dist/emulation/catalog.d.ts +2 -0
- package/dist/emulation/catalog.js +50 -21
- package/dist/emulation/tool_adapters.d.ts +6 -0
- package/dist/emulation/tool_adapters.js +30 -0
- package/dist/emulation/ztc_addendum.d.ts +22 -0
- package/dist/emulation/ztc_addendum.js +37 -0
- package/dist/events.d.ts +3 -0
- package/dist/headless.d.ts +35 -1
- package/dist/headless.js +209 -14
- package/dist/headless_cli.js +6 -0
- package/dist/headless_cli_args.d.ts +4 -0
- package/dist/headless_cli_args.js +2 -0
- package/dist/headless_output_schema.d.ts +46 -0
- package/dist/headless_output_schema.js +386 -0
- package/dist/headless_trajectory.d.ts +44 -0
- package/dist/headless_trajectory.js +113 -0
- package/dist/library.d.ts +6 -3
- package/dist/library.js +8 -4
- package/dist/lsp/client.js +4 -1
- package/dist/lsp/servers.js +2 -0
- package/dist/onboarding/first_run.d.ts +26 -6
- package/dist/onboarding/first_run.js +63 -45
- package/dist/onboarding/router_tips.d.ts +7 -0
- package/dist/onboarding/router_tips.js +38 -0
- package/dist/onboarding/setup.js +1 -1
- package/dist/onboarding/wordmark.d.ts +7 -0
- package/dist/onboarding/wordmark.js +14 -0
- package/dist/onboarding/zergai_login.d.ts +48 -0
- package/dist/onboarding/zergai_login.js +60 -0
- package/dist/prompts/subagent_worker.j2 +20 -0
- package/dist/prompts/tool_delegate_task.j2 +5 -14
- package/dist/router_auth.d.ts +37 -3
- package/dist/router_auth.js +221 -73
- package/dist/runtime_info.d.ts +19 -6
- package/dist/runtime_info.js +64 -28
- package/dist/session.d.ts +9 -0
- package/dist/session.js +41 -8
- package/dist/session_handoff_contract.d.ts +13 -0
- package/dist/session_handoff_contract.js +81 -15
- package/dist/session_media.d.ts +5 -0
- package/dist/session_media.js +2 -1
- package/dist/simulation/domain_types.d.ts +3 -3
- package/dist/simulation/living/context.d.ts +9 -9
- package/dist/simulation/living/definition.d.ts +1 -1
- package/dist/simulation/living/open-world.d.ts +3 -3
- package/dist/simulation/living/recall.d.ts +1 -1
- package/dist/simulation/living/types.d.ts +18 -18
- package/dist/simulation/orchestration/world_response.d.ts +2 -2
- package/dist/simulation/toolkit/dynamic_meetings.d.ts +1 -1
- package/dist/simulation/toolkit/dynamic_state.d.ts +1 -1
- package/dist/simulation/world/bootstrap_schema.d.ts +1 -1
- package/dist/simulation/world/gm_schema.d.ts +8 -8
- package/dist/skills/loader.js +3 -1
- package/dist/types.d.ts +6 -2
- package/dist/ui/core/input.d.ts +5 -1
- package/dist/ui/core/input.js +5 -1
- package/dist/ui/core/input_segments.d.ts +5 -1
- package/dist/ui/core/input_segments.js +5 -3
- package/dist/ui/ratatui/headless_pane_manager.d.ts +3 -1
- package/dist/ui/ratatui/headless_pane_manager.js +16 -5
- package/dist/ui/ratatui/input.js +4 -3
- package/dist/ui/ratatui/process.js +22 -13
- package/dist/ui/ratatui/protocol.d.ts +14 -0
- package/dist/ui/ratatui/protocol.js +2 -0
- package/dist/ui/scrollback.d.ts +17 -0
- package/dist/ui/scrollback.js +138 -4
- package/dist/ui/terminal_image.d.ts +129 -0
- package/dist/ui/terminal_image.js +516 -0
- package/dist/ui/transcript_render_cache.d.ts +4 -4
- package/dist/ui/transcript_render_cache.js +7 -4
- package/dist/ui/views/app.d.ts +7 -3
- package/dist/ui/views/app.js +13 -6
- package/dist/ui/views/completion_menu.js +18 -10
- package/dist/ui/views/input_area.d.ts +1 -2
- package/dist/ui/views/input_area.js +2 -2
- package/dist/ui/views/message_list.d.ts +8 -1
- package/dist/ui/views/message_list.js +176 -45
- package/dist/ui/views/status_bar.js +7 -1
- package/dist/ui/views/theme.d.ts +2 -0
- package/dist/ui/views/theme.js +2 -0
- package/dist/ui/widgets/color_panel.js +4 -3
- package/dist/ui/widgets/form.d.ts +8 -1
- package/dist/ui/widgets/form.js +36 -22
- package/dist/ui/widgets/index.d.ts +1 -1
- package/dist/ui/widgets/index.js +1 -1
- package/dist/ui/widgets/log_view.js +4 -3
- package/dist/ui/widgets/navigator_panel.js +5 -4
- package/dist/ui/widgets/panel_frame.d.ts +2 -0
- package/dist/ui/widgets/panel_frame.js +14 -0
- package/dist/ui/widgets/prompt_viewer.js +2 -1
- package/dist/ui/widgets/questionnaire.js +3 -3
- package/dist/ui/widgets/reasoning_track.d.ts +60 -0
- package/dist/ui/widgets/reasoning_track.js +218 -0
- package/dist/ui/widgets/resume_panel.js +15 -10
- package/dist/ui/widgets/rewind_panel.js +4 -16
- package/dist/ui/widgets/select.d.ts +90 -4
- package/dist/ui/widgets/select.js +305 -135
- package/dist/ui/widgets/settings_panel.d.ts +21 -1
- package/dist/ui/widgets/settings_panel.js +266 -45
- package/dist/ui/widgets/status_line_panel.js +6 -5
- package/dist/ui/widgets/text_input.d.ts +4 -0
- package/dist/ui/widgets/text_input.js +20 -13
- package/dist/ui/widgets/types.d.ts +2 -0
- package/dist/utils/compaction.d.ts +24 -4
- package/dist/utils/compaction.js +228 -44
- package/dist/utils/context.js +1 -0
- package/dist/utils/debug_log.d.ts +12 -0
- package/dist/utils/debug_log.js +25 -3
- package/dist/utils/deepseek.d.ts +3 -1
- package/dist/utils/deepseek.js +29 -1
- package/dist/utils/docker_target.d.ts +28 -0
- package/dist/utils/docker_target.js +89 -0
- package/dist/utils/ephemeral.js +2 -0
- package/dist/utils/fireworks.d.ts +4 -4
- package/dist/utils/fireworks.js +11 -7
- package/dist/utils/idle_compaction.d.ts +32 -0
- package/dist/utils/idle_compaction.js +113 -0
- package/dist/utils/mid_turn_compaction.d.ts +12 -0
- package/dist/utils/mid_turn_compaction.js +17 -0
- package/dist/utils/open_url.d.ts +4 -0
- package/dist/utils/open_url.js +10 -0
- package/dist/utils/openrouter_prices.d.ts +165 -0
- package/dist/utils/openrouter_prices.js +313 -0
- package/dist/utils/router_catalog.d.ts +13 -0
- package/dist/utils/router_catalog.js +30 -3
- package/dist/utils/sandbox.d.ts +12 -0
- package/dist/utils/sandbox.js +23 -5
- package/dist/utils/session_interactivity.d.ts +21 -0
- package/dist/utils/session_interactivity.js +28 -0
- package/dist/utils/shell.d.ts +7 -0
- package/dist/utils/shell.js +43 -7
- package/dist/utils/subprocess_env.d.ts +27 -0
- package/dist/utils/subprocess_env.js +69 -3
- package/dist/utils/tool_output_copies.d.ts +44 -0
- package/dist/utils/tool_output_copies.js +196 -0
- package/dist/utils/tool_result_message.d.ts +7 -0
- package/dist/utils/tool_result_message.js +11 -0
- package/dist/utils/tool_trace.d.ts +15 -0
- package/dist/utils/tool_trace.js +40 -9
- package/dist/web/event_history_store.d.ts +2 -0
- package/dist/web/event_history_store.js +31 -6
- package/dist/web/mirror_client.d.ts +3 -0
- package/dist/web/mirror_stream.d.ts +11 -0
- package/dist/web/mirror_stream.js +23 -3
- package/dist/worker/executor.js +3 -1
- package/dist/worker/toolsets.d.ts +1 -1
- package/dist/worker/toolsets.js +4 -3
- package/dist/worker/types.d.ts +6 -0
- package/dist/worker/worker_models.d.ts +17 -0
- package/dist/worker/worker_models.js +79 -0
- package/dist/zlm-embed.mjs +53761 -10916
- package/node_modules/@zerg/model-contracts/README.md +16 -5
- package/node_modules/@zerg/model-contracts/index.d.ts +7 -3
- package/node_modules/@zerg/model-contracts/index.js +40 -18
- package/package.json +24 -12
- package/packages/model-contracts/README.md +16 -5
- package/packages/model-contracts/index.d.ts +7 -3
- package/packages/model-contracts/index.js +40 -18
- package/scripts/install-macos-app.mjs +10 -1
package/README.md
CHANGED
|
@@ -35,9 +35,9 @@ See the [public Quickstart](https://zergai.com/docs/ztc) for install,
|
|
|
35
35
|
authentication, your first plan, named sessions, platform support, and licensing.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
# Check the published
|
|
39
|
-
npm view @zergai/ztc version
|
|
40
|
-
npm install -g @zergai/ztc
|
|
38
|
+
# Check the published beta and install the public CLI
|
|
39
|
+
npm view @zergai/ztc@next version
|
|
40
|
+
npm install -g @zergai/ztc@next
|
|
41
41
|
ztc --version
|
|
42
42
|
|
|
43
43
|
# Start with a read-only inspection of a real project
|
|
@@ -50,16 +50,24 @@ the source version used during development. Use `ztc --version` to identify your
|
|
|
50
50
|
installed release. For reproducible installs, use `@zergai/ztc@<version>` with the
|
|
51
51
|
version you selected.
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
At launch, until you log in with ZergAI or choose local API keys that reach a
|
|
54
|
+
model, ZTC asks how to reach a model: **Log in with ZergAI (recommended)** or
|
|
55
|
+
**Use your local API keys**. The question needs an answer: typing or Esc only
|
|
56
|
+
reminds you to choose one, and Ctrl+C quits. Choosing ZergAI opens your browser
|
|
57
|
+
to log in. A first login starts on DeepSeek V4.1 Flash on Fireworks; pick any
|
|
58
|
+
other Zerg Router model with `/model zergrouter <provider> <model>`. `/connect`
|
|
59
|
+
asks again any time. Then describe the project outcome you want. Review the
|
|
60
|
+
plan and run `/execute` when you are ready for ZTC to make the proposed changes.
|
|
56
61
|
|
|
57
62
|
Authentication options are Zerg Router browser login (`/auth login`), a provider API key
|
|
58
|
-
(`/config key <provider
|
|
59
|
-
|
|
63
|
+
(`/config key <provider>`, which takes the key in a hidden prompt or the name of the
|
|
64
|
+
environment variable that holds it), or Claude Code OAuth (`claude setup-token`, then
|
|
65
|
+
`/model claude_code`). A variable you name is used once it is set; until then ZTC keeps
|
|
66
|
+
using the saved key or the provider's standard variable.
|
|
60
67
|
|
|
61
68
|
For browser login at **zergrouter.com**, run `ztc auth login` in your shell or
|
|
62
|
-
`/auth login` inside ZTC. Both use the same flow and credentials.
|
|
69
|
+
`/auth login` inside ZTC. Both use the same flow and credentials. `/auth cancel`
|
|
70
|
+
(or Esc) stops a login still waiting for approval; in the shell, Ctrl+C does. See
|
|
63
71
|
[Zerg Router and DeepSeek setup](docs/zerg-router.md) for model selection,
|
|
64
72
|
Claude Code/Codex emulation, and `ztc "prompt"` or `ztc -p "prompt"` usage.
|
|
65
73
|
|
|
@@ -151,57 +159,65 @@ beta does not claim an interactive native payload for them.
|
|
|
151
159
|
|
|
152
160
|
### ZTC Desktop
|
|
153
161
|
|
|
154
|
-
On Apple Silicon macOS,
|
|
162
|
+
On Apple Silicon macOS, ZTC also ships as a native desktop app, `ztc.app`,
|
|
163
|
+
from [zergai.com/ztc](https://zergai.com/ztc) or the installer:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
curl -fsSL https://zergai.com/install/ztc.sh | sh -s -- --preview
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
The app carries its own Node and matching ZTC agent, so it starts from the
|
|
170
|
+
icon without a global Node or ZTC install, and it uses the same accounts,
|
|
171
|
+
configuration and saved sessions as the CLI. Its title bar names the project
|
|
172
|
+
and branch, and holds the model (click it to choose another), the queue, Stop
|
|
173
|
+
and Updates. Releases are signed, notarized and published in
|
|
174
|
+
[`Epoch-ML/ztc-releases`](https://github.com/Epoch-ML/ztc-releases).
|
|
175
|
+
|
|
176
|
+
From a terminal you can also open the desktop surface explicitly:
|
|
155
177
|
|
|
156
178
|
```bash
|
|
157
179
|
ztc --desktop --cwd /path/to/project
|
|
158
180
|
```
|
|
159
181
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
182
|
+
An npm-installed `ztc --desktop` uses a legacy `/Applications/ZTerm.app` (or
|
|
183
|
+
`~/Applications/ZTerm.app`) when one is installed, and otherwise the renderer
|
|
184
|
+
packaged with the CLI. `npm install` does not create an application bundle;
|
|
185
|
+
the package includes an optional launcher installer:
|
|
163
186
|
|
|
164
187
|
```bash
|
|
165
188
|
node "$(npm root -g)/@zergai/ztc/scripts/install-macos-app.mjs"
|
|
166
189
|
```
|
|
167
190
|
|
|
168
|
-
|
|
169
|
-
`ZTC_DESKTOP_APP_DIR=/path` selects another directory and
|
|
170
|
-
skips
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
and
|
|
182
|
-
|
|
183
|
-
and
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
From a bundled app session, type `/desktop install-cli` to install an optional
|
|
187
|
-
`ztc` command in `~/.local/bin`, or `/desktop install-cli /path/to/bin` to choose
|
|
188
|
-
another directory. Installation preserves foreign commands and does not edit
|
|
189
|
-
PATH or shell configuration. The command runs that app's agent with the same
|
|
190
|
-
arguments, working directory and profile/config/session selection as the CLI.
|
|
191
|
-
If the app moves, the command reports how to reinstall it. An agent cannot
|
|
192
|
-
request installation on the user's behalf.
|
|
193
|
-
|
|
194
|
-
The native Updates window saves **Check for updates on startup**, enabled by
|
|
195
|
-
default. Downloads and installation require explicit actions. Bundled sessions
|
|
196
|
-
use this app update path instead of npm updates. A successful update starts its
|
|
197
|
-
helper only after a forced session save, then resumes the owning ZTC session
|
|
198
|
-
with a fresh renderer socket. See [desktop release details](packages/zterm/RELEASES.md)
|
|
199
|
-
for the current source implementation and publication gates.
|
|
191
|
+
It creates `ZTC Desktop.app` in `/Applications` when writable, otherwise
|
|
192
|
+
`~/Applications`; `ZTC_DESKTOP_APP_DIR=/path` selects another directory and
|
|
193
|
+
`ZTC_SKIP_DESKTOP_APP=1` skips it. Opening the launcher runs
|
|
194
|
+
`ztc --desktop --cwd "$HOME"` through the package's own launcher.
|
|
195
|
+
|
|
196
|
+
From a desktop session, type `/desktop install-cli` to install an optional
|
|
197
|
+
`ztc` command in `~/.local/bin` (or `/desktop install-cli /path/to/bin`). It
|
|
198
|
+
preserves foreign commands, does not edit PATH or shell configuration, and runs
|
|
199
|
+
that app's agent with the same arguments, directory and profile/config/session
|
|
200
|
+
selection as the CLI. If the app moves, the command says how to reinstall it.
|
|
201
|
+
|
|
202
|
+
**Updates are automatic.** The app checks its signed release feed at startup
|
|
203
|
+
and every 6 hours, downloads and verifies a newer release in the background,
|
|
204
|
+
and installs it when you quit ZTC; it never restarts while you work. Turning
|
|
205
|
+
off **Update ZTC automatically** in the Updates window restores manual
|
|
206
|
+
download and installation. Inside the app, `/update` explains this instead of
|
|
207
|
+
running npm. See [desktop release details](packages/zterm/RELEASES.md) for the
|
|
208
|
+
trust, packaging and publication contract.
|
|
200
209
|
|
|
201
210
|
### Voice & Media
|
|
202
211
|
- **Voice dictation** — native Whisper transcription (Ctrl+R)
|
|
203
212
|
- **TTS synthesis** — multiple backends (macOS say, Parler, OpenAI, ElevenLabs)
|
|
204
213
|
- **Image support** — paste from clipboard (Ctrl+I), screenshot compression
|
|
214
|
+
- **Images in the transcript** — pasted images, image files the agent reads and
|
|
215
|
+
tool screenshots appear under their message. Ghostty and Kitty show the image
|
|
216
|
+
itself, sent once with the Kitty graphics protocol and placed with its Unicode
|
|
217
|
+
placeholders, so it scrolls into history like text, in zmux or without it.
|
|
218
|
+
Other terminals, tmux, ZTC child panes and ZTC Desktop show a 24-bit
|
|
219
|
+
half-block preview.
|
|
220
|
+
`ZTC_IMAGE_PROTOCOL=kitty` or `=blocks` overrides the detection.
|
|
205
221
|
|
|
206
222
|
---
|
|
207
223
|
|
|
@@ -805,7 +821,8 @@ preserve operation tombstones and call linkage before archiving evidence.
|
|
|
805
821
|
| Command | Description |
|
|
806
822
|
|---------|-------------|
|
|
807
823
|
| `/config show` | View configuration |
|
|
808
|
-
| `/config key
|
|
824
|
+
| `/config key [provider]` | Add a provider API key in a hidden prompt, or name the variable that holds it; without a provider, pick one first |
|
|
825
|
+
| `/config key <provider> --remove` | Forget the saved key, or stop reading the variable named for it; for `openai_compatible`, both, keeping the endpoint's URL and model |
|
|
809
826
|
| `/config model <name>` | Set model |
|
|
810
827
|
| `/config statusline [show|on|off|reset]` | Inspect or toggle the bottom status line |
|
|
811
828
|
| `/config statusline <left|right> <field,...>` | Set status line fields without opening the editor |
|
|
@@ -940,6 +957,7 @@ Optional App Server config:
|
|
|
940
957
|
|---------|-------------|
|
|
941
958
|
| `/clear` | Clear message history |
|
|
942
959
|
| `/sessions` | List/manage saved sessions |
|
|
960
|
+
| `/handoff` | Show the saved task checkpoint a resumed session started from |
|
|
943
961
|
| `/rename <name>` | Set a stable session name; `--clear` returns to automatic labels |
|
|
944
962
|
| `/label [pane <id>] ...` | Show, name, pin, group, or tag a session or pane |
|
|
945
963
|
| `/status` | Show current status |
|
|
@@ -1345,6 +1363,7 @@ unset preserves normal interactive discovery.
|
|
|
1345
1363
|
|----------|-------------|
|
|
1346
1364
|
| `ANTHROPIC_API_KEY` | Anthropic API key for direct API billing |
|
|
1347
1365
|
| `CLAUDE_CODE_OAUTH_TOKEN` | Claude Code OAuth token from `claude setup-token`; used by `/config provider claude_code` |
|
|
1366
|
+
| `ZTC_NO_BROWSER` | Set to `1` so ZTC never opens a browser (logins, `/mirror`, billing); it prints the URL instead. CI and test runs behave this way already |
|
|
1348
1367
|
| `ZTC_DEBUG` | Enable debug logging |
|
|
1349
1368
|
| `ZTC_SUBAGENT_DEBUG` | Log sub-agent execution |
|
|
1350
1369
|
| `ZTC_DISABLE_AUTO_COMPACT` | Disable automatic compaction |
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -26,7 +26,8 @@ retain their own license and notice files; this table does not replace them.
|
|
|
26
26
|
|
|
27
27
|
| Package | Locked version | License | Upstream |
|
|
28
28
|
| --- | ---: | --- | --- |
|
|
29
|
-
| `@
|
|
29
|
+
| `@aws-sdk/client-bedrock-runtime` | 3.1160.0 | Apache-2.0 | https://www.npmjs.com/package/@aws-sdk/client-bedrock-runtime |
|
|
30
|
+
| `@modelcontextprotocol/sdk` | 1.32.2 | MIT | https://www.npmjs.com/package/@modelcontextprotocol/sdk |
|
|
30
31
|
| `acorn` | 8.18.0 | MIT | https://www.npmjs.com/package/acorn |
|
|
31
32
|
| `chalk` | 5.6.2 | MIT | https://www.npmjs.com/package/chalk |
|
|
32
33
|
| `docx` | 9.7.1 | MIT | https://www.npmjs.com/package/docx |
|
|
@@ -34,16 +35,20 @@ retain their own license and notice files; this table does not replace them.
|
|
|
34
35
|
| `fastify` | 5.12.5 | MIT | https://www.npmjs.com/package/fastify |
|
|
35
36
|
| `immer` | 10.1.1 | MIT | https://github.com/immerjs/immer |
|
|
36
37
|
| `ink` | 5.2.1 | MIT | https://www.npmjs.com/package/ink |
|
|
38
|
+
| `jpeg-js` | 0.4.4 | BSD-3-Clause | https://www.npmjs.com/package/jpeg-js |
|
|
37
39
|
| `jsonrepair` | 3.15.0 | ISC | https://www.npmjs.com/package/jsonrepair |
|
|
38
40
|
| `node-pty` | 1.1.0 | MIT | https://www.npmjs.com/package/node-pty |
|
|
39
41
|
| `nunjucks` | 3.2.4 | BSD-2-Clause | https://www.npmjs.com/package/nunjucks |
|
|
42
|
+
| `omggif` | 1.0.10 | MIT | https://www.npmjs.com/package/omggif |
|
|
40
43
|
| `pdfkit` | 0.18.0 | MIT | https://www.npmjs.com/package/pdfkit |
|
|
44
|
+
| `pngjs` | 7.0.0 | MIT | https://www.npmjs.com/package/pngjs |
|
|
41
45
|
| `pptxgenjs` | 4.0.1 | MIT | https://github.com/gitbrent/PptxGenJS/tree/v4.0.1 |
|
|
46
|
+
| `proper-lockfile` | 4.1.2 | MIT | https://www.npmjs.com/package/proper-lockfile |
|
|
42
47
|
| `react` | 18.3.1 | MIT | https://www.npmjs.com/package/react |
|
|
43
48
|
| `semver` | 7.8.5 | ISC | https://www.npmjs.com/package/semver |
|
|
44
49
|
| `socket.io-client` | 4.8.3 | MIT | https://www.npmjs.com/package/socket.io-client |
|
|
45
50
|
| `yaml` | 2.9.0 | ISC | https://www.npmjs.com/package/yaml |
|
|
46
|
-
| `zod` | 4.
|
|
51
|
+
| `zod` | 4.6.7 | MIT | https://www.npmjs.com/package/zod |
|
|
47
52
|
|
|
48
53
|
### Separate view clients and retained historical references
|
|
49
54
|
|
package/bin/zmux-darwin-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/ztc-llm-darwin-arm64
CHANGED
|
Binary file
|
package/bin/ztc-tts-darwin-arm64
CHANGED
|
Binary file
|
package/bin/ztc-tui-darwin-arm64
CHANGED
|
Binary file
|
package/bin/zterm-darwin-arm64
CHANGED
|
Binary file
|
package/dist/App.js
CHANGED
|
@@ -207,6 +207,7 @@ export const App = () => {
|
|
|
207
207
|
const [agentMode, setAgentMode] = useState('normal');
|
|
208
208
|
const [agent, setAgent] = useState(null);
|
|
209
209
|
const diagnosticAgentRef = useRef(null);
|
|
210
|
+
const agentStartFailedRef = useRef(false); // the last createBoundAgent threw, and said why
|
|
210
211
|
diagnosticAgentRef.current = agent;
|
|
211
212
|
const retainedUsageRef = useRef({ sessionId, snapshot: createUsageSnapshot() });
|
|
212
213
|
const [routingUsageRevision, setRoutingUsageRevision] = useState(0);
|
|
@@ -883,7 +884,17 @@ export const App = () => {
|
|
|
883
884
|
onLocalFileChange: async (paths, cwd) => { await workspaceCoordinator.recordObservedPaths(paths, cwd); },
|
|
884
885
|
}), [admitWorkspace, addMessage, sessionId, workspaceCoordinator]);
|
|
885
886
|
const createBoundAgent = useCallback((mode, skillPrompt) => {
|
|
886
|
-
|
|
887
|
+
agentStartFailedRef.current = false;
|
|
888
|
+
let next;
|
|
889
|
+
try {
|
|
890
|
+
next = createAgent(mode, skillPrompt, workspaceFactoryOptions());
|
|
891
|
+
}
|
|
892
|
+
catch (error) {
|
|
893
|
+
// A configuration no agent can be built from is said in the transcript, not thrown into the renderer.
|
|
894
|
+
agentStartFailedRef.current = true;
|
|
895
|
+
addMessage({ role: 'system', content: `Unable to start the agent: ${error instanceof Error ? error.message : String(error)}` });
|
|
896
|
+
return null;
|
|
897
|
+
}
|
|
887
898
|
const previous = diagnosticAgentRef.current;
|
|
888
899
|
if (next) {
|
|
889
900
|
next.restoreUsageSnapshot(getUsageSnapshot());
|
|
@@ -897,7 +908,7 @@ export const App = () => {
|
|
|
897
908
|
diagnosticAgentRef.current = next;
|
|
898
909
|
}
|
|
899
910
|
return next;
|
|
900
|
-
}, [workspaceFactoryOptions, getUsageSnapshot]);
|
|
911
|
+
}, [workspaceFactoryOptions, getUsageSnapshot, addMessage]);
|
|
901
912
|
// Every reconstruction retains workspace admission and successful-file observation.
|
|
902
913
|
const reloadAgent = useCallback(() => {
|
|
903
914
|
retireAgentQuestion();
|
|
@@ -1795,10 +1806,12 @@ export const App = () => {
|
|
|
1795
1806
|
setAgent(currentAgent);
|
|
1796
1807
|
}
|
|
1797
1808
|
if (!currentAgent) {
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1809
|
+
if (!agentStartFailedRef.current) { // otherwise createBoundAgent just said why
|
|
1810
|
+
addMessage({
|
|
1811
|
+
role: 'system',
|
|
1812
|
+
content: 'Failed to initialize agent. Please check your configuration.'
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1802
1815
|
return;
|
|
1803
1816
|
}
|
|
1804
1817
|
const userMsg = {
|
|
@@ -1960,9 +1973,13 @@ export const App = () => {
|
|
|
1960
1973
|
break;
|
|
1961
1974
|
case 'api_retry':
|
|
1962
1975
|
setAgentState(s => applyAgentEventToState(s, event));
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1976
|
+
// Retries of one request update one notice instead of adding a line per attempt.
|
|
1977
|
+
setMessages(prev => {
|
|
1978
|
+
const last = prev[prev.length - 1];
|
|
1979
|
+
const content = formatApiRetryNotice(event);
|
|
1980
|
+
return last?.role === 'system' && last.metadata?.apiRetry === true
|
|
1981
|
+
? [...prev.slice(0, -1), { ...last, content }]
|
|
1982
|
+
: [...prev, { role: 'system', content, metadata: { apiRetry: true }, id: generateId(), timestamp: new Date() }];
|
|
1966
1983
|
});
|
|
1967
1984
|
break;
|
|
1968
1985
|
case 'error':
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -10,9 +10,12 @@ import { type ExecutionContext } from './runtime/execution_context.js';
|
|
|
10
10
|
import { Policy } from './runtime/policy.js';
|
|
11
11
|
import { Tracer } from './runtime/tracing.js';
|
|
12
12
|
import { type DiagnosticEventKind, type DiagnosticJsonObject, type DiagnosticSnapshot } from '../diagnostics/session_export.js';
|
|
13
|
+
import { type ToolGroupsConfig } from './tools/tool_groups.js';
|
|
14
|
+
import type { ToolDefinition } from '../types.js';
|
|
13
15
|
import type { Tool } from './tools/types.js';
|
|
14
16
|
import { ToolResponseStore } from './tool_response_store.js';
|
|
15
17
|
import { type EvidenceSnapshot } from './runtime/evidence.js';
|
|
18
|
+
import { BackgroundWorkers } from './background_workers.js';
|
|
16
19
|
import type { HostApprovalContext } from './runtime/tool_runtime.js';
|
|
17
20
|
import { ToolCapability } from './runtime/capabilities.js';
|
|
18
21
|
import { HookDispatcher } from '../hooks/dispatcher.js';
|
|
@@ -30,6 +33,7 @@ export interface SteeringAdmissionCheckpoint {
|
|
|
30
33
|
}
|
|
31
34
|
export type SteeringAdmissionCheckpointHandler = (checkpoint: SteeringAdmissionCheckpoint) => Promise<void>;
|
|
32
35
|
export interface AgentConfig {
|
|
36
|
+
provider?: string;
|
|
33
37
|
remoteResourceSession?: import('./runtime/remote_resources.js').RemoteResourceSession;
|
|
34
38
|
model?: string;
|
|
35
39
|
apiKey?: string;
|
|
@@ -73,6 +77,7 @@ export interface AgentConfig {
|
|
|
73
77
|
tracer?: Tracer;
|
|
74
78
|
cwd?: string;
|
|
75
79
|
autoContinue?: boolean;
|
|
80
|
+
completionCheck?: boolean;
|
|
76
81
|
/**
|
|
77
82
|
* Cap on consecutive auto-continues before a turn is allowed to end. Each
|
|
78
83
|
* auto-continue is a full-context API request, and a model that narrates an
|
|
@@ -88,6 +93,15 @@ export interface AgentConfig {
|
|
|
88
93
|
* request.system exactly as configured.
|
|
89
94
|
*/
|
|
90
95
|
pinTaskHeader?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Session environment composed at startup (working directory, date, git
|
|
98
|
+
* status). It changes between sessions of one project, so local task
|
|
99
|
+
* sessions send it as the first conversation row, after the system prompt
|
|
100
|
+
* and the tool definitions that chat templates render after it, leaving
|
|
101
|
+
* that whole prefix shared across sessions in provider caches. Otherwise it
|
|
102
|
+
* ends request.system.
|
|
103
|
+
*/
|
|
104
|
+
runtimeContext?: string;
|
|
91
105
|
/**
|
|
92
106
|
* Exact environment exposed to ZTC shell-tool subprocesses. When present it
|
|
93
107
|
* replaces ambient process.env; reserved ZTC coordination variables are
|
|
@@ -121,6 +135,15 @@ export interface AgentConfig {
|
|
|
121
135
|
* via tool_search (which a restrictive mode allowlist can even hide).
|
|
122
136
|
*/
|
|
123
137
|
alwaysLoadedToolNames?: Iterable<string>;
|
|
138
|
+
/** Host note placed after each authored prompt, such as a lead's reminder to delegate. */
|
|
139
|
+
leadTurnNote?: string;
|
|
140
|
+
/** Host note for a lead that has worked alone for `afterSteps` requests in a turn, sent once. */
|
|
141
|
+
leadStaffingNote?: {
|
|
142
|
+
afterSteps: number;
|
|
143
|
+
content: string;
|
|
144
|
+
};
|
|
145
|
+
/** How often a lead gets a progress check on its background workers. */
|
|
146
|
+
workerCheckIntervalMs?: number;
|
|
124
147
|
/**
|
|
125
148
|
* When false, every registered tool schema ships with each request instead
|
|
126
149
|
* of hiding non-core tools behind tool_search. Set by factory for modes
|
|
@@ -128,6 +151,18 @@ export interface AgentConfig {
|
|
|
128
151
|
* the agent's whole vocabulary. Default: true (defer).
|
|
129
152
|
*/
|
|
130
153
|
deferToolSchemas?: boolean;
|
|
154
|
+
/** Host-declared tool groups; visibility lasts for this Agent instance. */
|
|
155
|
+
toolGroups?: ToolGroupsConfig;
|
|
156
|
+
onMidTurnCompact?: (context: MidTurnCompactContext) => Promise<Message[] | null>;
|
|
157
|
+
midTurnCompactThresholdPercent?: number;
|
|
158
|
+
midTurnCompactWindow?: number | null;
|
|
159
|
+
midTurnCompactTokenBudget?: number;
|
|
160
|
+
}
|
|
161
|
+
export interface MidTurnCompactContext {
|
|
162
|
+
messages: Message[];
|
|
163
|
+
usedTokens: number;
|
|
164
|
+
windowTokens?: number;
|
|
165
|
+
signal?: AbortSignal;
|
|
131
166
|
}
|
|
132
167
|
export interface AgentConversationBinding {
|
|
133
168
|
driver: ConversationDriver;
|
|
@@ -141,6 +176,7 @@ export interface AgentRunResult {
|
|
|
141
176
|
usage?: TokenUsage;
|
|
142
177
|
stopReason: 'complete' | 'interactive' | 'max_iterations';
|
|
143
178
|
reasoning?: string;
|
|
179
|
+
responseItems?: Array<Record<string, unknown>>;
|
|
144
180
|
nativeContent?: ContentBlock[];
|
|
145
181
|
nativeModel?: string;
|
|
146
182
|
nativeContextId?: string;
|
|
@@ -171,8 +207,15 @@ export type EventHandler = (event: AgentEvent) => void;
|
|
|
171
207
|
export declare class Agent {
|
|
172
208
|
#private;
|
|
173
209
|
private config;
|
|
210
|
+
private onMidTurnCompact?;
|
|
211
|
+
private midTurnCompactThresholdPercent?;
|
|
212
|
+
private midTurnCompactWindow?;
|
|
213
|
+
private midTurnCompactTokenBudget?;
|
|
174
214
|
/** Codex/GPT reasoning effort override; undefined = provider default. */
|
|
175
215
|
private _codexEffort?;
|
|
216
|
+
/** One-shot: the next request carries the output-limit note at this effort. */
|
|
217
|
+
/** The next request retries a discarded response: a note for the model, and lower effort when offered. */
|
|
218
|
+
private responseRetry;
|
|
176
219
|
/** Fast mode — request the priority service tier from the Codex/GPT backend. */
|
|
177
220
|
private _codexFastMode;
|
|
178
221
|
private eventHandlers;
|
|
@@ -194,6 +237,11 @@ export declare class Agent {
|
|
|
194
237
|
private _autoContinue;
|
|
195
238
|
/** Auto-continues spent since the last tool run; reset per turn and per tool. */
|
|
196
239
|
private _consecutiveAutoContinues;
|
|
240
|
+
private _turnAutoContinues;
|
|
241
|
+
private _turnToolBatches;
|
|
242
|
+
private _turnToolChangedState;
|
|
243
|
+
private _turnCommandsRun;
|
|
244
|
+
private _turnCheckAsked;
|
|
197
245
|
private readonly _subprocessEnv?;
|
|
198
246
|
private readonly commandPolicy?;
|
|
199
247
|
private readonly toolEffectObserver?;
|
|
@@ -223,8 +271,13 @@ export declare class Agent {
|
|
|
223
271
|
private toolTraceData;
|
|
224
272
|
/** Fresh applicability is a projection; original process/source observations remain immutable. */
|
|
225
273
|
refreshVerificationCoverage(): Promise<void>;
|
|
274
|
+
private readonly toolGroups;
|
|
226
275
|
readonly discoveredTools: Set<string>;
|
|
227
276
|
readonly alwaysLoadedToolNames: Set<string>;
|
|
277
|
+
/** Workers started with delegate_task `background: true`; stopped when a run ends. */
|
|
278
|
+
readonly backgroundWorkers: BackgroundWorkers;
|
|
279
|
+
/** The latest authored prompt, for a worker's brief. */
|
|
280
|
+
private turnInstruction;
|
|
228
281
|
private hooks?;
|
|
229
282
|
private approvalRequester?;
|
|
230
283
|
private readonly approvalRequiredCapabilities;
|
|
@@ -251,8 +304,16 @@ export declare class Agent {
|
|
|
251
304
|
hasApiKey(): boolean;
|
|
252
305
|
setCwd(cwd: string): void;
|
|
253
306
|
getCwd(): string;
|
|
307
|
+
/** Load a declared group after a host page change; Codex requires a new session. */
|
|
308
|
+
loadToolGroup(group: string): {
|
|
309
|
+
group: string;
|
|
310
|
+
tools: ToolDefinition[];
|
|
311
|
+
};
|
|
254
312
|
/** Snapshot the effective tool surface after mode/provider filtering. */
|
|
255
313
|
getConfiguredToolNames(): string[];
|
|
314
|
+
getHandoffContext(messages?: Message[]): BackendRequest & {
|
|
315
|
+
backend: AgentBackend;
|
|
316
|
+
};
|
|
256
317
|
private getDefaultSystemPrompt;
|
|
257
318
|
on(handler: EventHandler): () => void;
|
|
258
319
|
private emit;
|
|
@@ -264,6 +325,8 @@ export declare class Agent {
|
|
|
264
325
|
private _nativeContextId?;
|
|
265
326
|
private formatMessages;
|
|
266
327
|
private _encodeDeps;
|
|
328
|
+
/** A whole result kept on disk before it is sent shortened; an ephemeral tool's stays in memory. */
|
|
329
|
+
private saveFullResult;
|
|
267
330
|
private contentLength;
|
|
268
331
|
private buildContentBlocks;
|
|
269
332
|
private loadImageBlock;
|
|
@@ -300,6 +363,7 @@ export declare class Agent {
|
|
|
300
363
|
steerUserMessage(message: Message): Promise<boolean>;
|
|
301
364
|
/** Tools that end the agent turn when called (require user interaction before continuing). */
|
|
302
365
|
private static readonly TURN_ENDING_TOOLS;
|
|
366
|
+
private static readonly SELF_RESOLVING_TOOLS;
|
|
303
367
|
/**
|
|
304
368
|
* R7: the original task, pinned into request.system so it survives compaction
|
|
305
369
|
* (which only rewrites the message array, never request.system) and the rolling
|
|
@@ -309,9 +373,22 @@ export declare class Agent {
|
|
|
309
373
|
* genuinely multi-task long-lived agents is deferred (plan A10).
|
|
310
374
|
*/
|
|
311
375
|
private _taskHeader;
|
|
376
|
+
private runtimeContext;
|
|
312
377
|
private taskHandoff;
|
|
378
|
+
private taskHandoffTurn;
|
|
379
|
+
private runtimeEnvironmentTurn;
|
|
313
380
|
/** Only a host-selected checkpoint may supply historical task context. */
|
|
314
381
|
setTaskHandoff(projection: TaskHandoffProjection | null): void;
|
|
382
|
+
hostScaffoldMessages(): Array<{
|
|
383
|
+
id: string;
|
|
384
|
+
content: string;
|
|
385
|
+
capturedAt: string;
|
|
386
|
+
}>;
|
|
387
|
+
setHostScaffoldMessages(rows: readonly {
|
|
388
|
+
id: string;
|
|
389
|
+
content: string;
|
|
390
|
+
capturedAt: string;
|
|
391
|
+
}[] | undefined): void;
|
|
315
392
|
/**
|
|
316
393
|
* Drop the explicitly pinned task for the next conversation. Wired into the /clear-only path (clearTransientState), never into
|
|
317
394
|
* /compact — the pin must survive compaction (that is the whole point of R7).
|