@zergai/ztc 0.26.4-dev.202611231953 → 0.26.5-dev.202611240151
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 +192 -106
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/zmux-linux-x64 +0 -0
- package/bin/ztc-audio-darwin-arm64 +0 -0
- package/bin/ztc-capture-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/ztc-tui-linux-x64 +0 -0
- package/bin/zterm-darwin-arm64 +1 -1
- package/dist/agent/backends/zrouter_stream.d.ts +9 -8
- package/dist/agent/backends/zrouter_stream.js +19 -21
- package/dist/agent/commands/status.js +10 -5
- package/dist/agent/commands/types.d.ts +2 -0
- package/dist/agent/commands/update.js +6 -0
- package/dist/agent/runtime/cpu_benchmark.js +2 -0
- package/dist/agent/tools/ml.js +36 -9
- package/dist/app/command_context.js +6 -1
- package/dist/cli_main.js +13 -9
- package/dist/cli_ratatui.js +8 -1
- package/dist/config/permission_pin.d.ts +25 -12
- package/dist/config/permission_pin.js +34 -16
- package/dist/config.d.ts +14 -5
- package/dist/config.js +23 -13
- package/dist/headless_cli.js +4 -2
- package/dist/lsp/client.d.ts +5 -2
- package/dist/lsp/client.js +42 -5
- package/dist/utils/sandbox.d.ts +18 -1
- package/dist/utils/sandbox.js +284 -37
- package/dist/utils/subprocess_env.js +4 -0
- package/dist/zlm-embed.mjs +298 -150
- package/npm-shrinkwrap.json +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2454,8 +2454,9 @@ preserves normal interactive discovery.
|
|
|
2454
2454
|
| `ZTC_TODO_STORE` | Override path to the todo JSON file (defaults to `~/.ztc/todos/<projectHash>.json`) |
|
|
2455
2455
|
| `ZTC_EXTENSION_DISCOVERY` | Set to `explicit` for env-root-plus-builtin discovery with no cwd/repository/home extensions or repo config, or `default` for normal discovery; unset, it is `explicit` under a host's Router runtime grant and `default` otherwise |
|
|
2456
2456
|
| `ZTC_MODEL_PINNED` | Set to `1` to pin the session to the provider and model it starts on (`ZTC_PROVIDER` and `ZTC_MODEL`, or `--provider` and `--model`): `/model`, `/models set` and `/models latest`, `/provider`, `/config`'s route settings and Zerg Router address (`zrouter-url`), `/connect`, the agent's own `ztc_command`, the mirror's model picker and routing setting, a resumed session's saved route and a host effort policy that names another model (schema 2) are refused with the pinned route named. A host `--session-file` thread saved on another route runs on the pinned route, and its other settings still apply. Effort and reasoning the model takes can still change. Where `ZTC_LLM_AUTH_MODE` also pins the routing, a refused switch names the pinned route. Not held: a Morph key saved while the session runs (`/config key morph`) takes a session pinned to Morph through Zerg Router to Morph's own API unless `ZTC_LLM_AUTH_MODE=zrouter` holds too; `/profile` can move it to the routing another profile saves unless `ZTC_LLM_AUTH_MODE` pins that, and where the environment names no Zerg Router, `/profile` and `/auth login --url` can change its Zerg Router address; and a new ZTC pane is pinned to the route it opens on: another model when it names one (the web client's "+ ZTC pane", the agent's `create_ztc_pane`), the route new panes start on when it names none (`ZTC_PROVIDER` and `ZTC_MODEL` pass to a pane, `--provider` and `--model` don't) |
|
|
2457
|
-
| `ZTC_PERMISSION_PROFILE_PINNED` | Set to `1` (or `true`) to pin the session's permission profile and sandbox as its startup leaves them: the profile `--permission-profile` names, a host's `--session-file` thread gives it (a `--headless --mirror` resident's) or `config.json` saves, with that profile's definition, the sandbox settings and the tool permissions as ZTC holds them. ZergCloud's hub sets it next to `ZTC_MODEL_PINNED`. ZTC reads it once, as its startup ends (`zerg-ztc-headless` too), so nothing later in the process unsets it. A host that pins them means them to limit the agent: where the profile ZTC would pin limits nothing (`trusted`, the default, `local_full` or an id nothing defines, unless the sandbox settings require the OS sandbox), or runs the agent's commands
|
|
2457
|
+
| `ZTC_PERMISSION_PROFILE_PINNED` | Set to `1` (or `true`) to pin the session's permission profile and sandbox as its startup leaves them: the profile `--permission-profile` names, a host's `--session-file` thread gives it (a `--headless --mirror` resident's) or `config.json` saves, with that profile's definition, the sandbox settings and the tool permissions as ZTC holds them. ZergCloud's hub sets it next to `ZTC_MODEL_PINNED`. ZTC reads it once, as its startup ends (`zerg-ztc-headless` too), so nothing later in the process unsets it. A host that pins them means them to limit the agent: where the profile ZTC would pin limits nothing (`trusted`, the default, `local_full` or an id nothing defines, unless the sandbox settings require the OS sandbox), or runs the agent's commands without requiring an OS sandbox for them, whether it asks for none (one that only turns `computer_control` off, asks before a capability or limits shell commands or network hosts, where `/status` would say `OS command sandbox: not required, and none is used`) or only asks for one (one that names `allowedPaths` or `deniedPaths`, keeps commands off the network or names a sandbox backend, where `/status` would say `OS command sandbox: not required; enforced by seatbelt`, and under which the LSP tools, `run_and_capture` and `workflow` start programs outside the sandbox), ZTC doesn't start, whatever starts it (a one-prompt run; a resident, one on a host's thread with no settings yet included; a ZTC pane or colony cell a pinned session opens), and exits 2 saying "ZTC did not start: its host pins this session's permission profile and sandbox (ZTC_PERMISSION_PROFILE_PINNED), and the permission profile it would pin, trusted, limits nothing. Start ZTC with --permission-profile and a profile that limits the agent, such as workspace_autonomous, or unset ZTC_PERMISSION_PROFILE_PINNED.", or, for the second, that the profile "doesn't require an OS sandbox (sandbox.requireOsEnforcement), so the agent's commands, and the programs some of its tools start, can run outside one, where they reach ZTC's own state and the config.json the pin is taken from. Start ZTC with --permission-profile and a profile that requires the OS sandbox (set sandbox.requireOsEnforcement to true in it, as workspace_autonomous does) or runs no command (shell_exec off), or unset ZTC_PERMISSION_PROFILE_PINNED." (`zerg-ztc-headless`, which takes no `--permission-profile`, says to save such a profile as `permissionProfile` in `config.json`). Every other profile that limits the agent is pinned: one that requires the OS sandbox for its commands (`sandbox.requireOsEnforcement` in it or in the sandbox settings, or one that writes nothing), or runs none (`shell_exec` off in it or in the tool permissions), as every built-in one that limits the agent does. Your own commands (`!cmd` and `/shell`, `/diff`'s git, the commands `/optimize` runs), yours or a controller's, then run only inside the OS sandbox too, as the agent's do, under the pinned profile's roots with ZTC's own state hidden, even where the profile runs none of the agent's, and where no OS sandbox is usable they are refused with "OS sandbox enforcement required but unavailable: ..." (the Ink interface's run outside any: see the Limits under [A profile that limits the agent](#a-profile-that-limits-the-agent)). From then on, whoever asks (you, a controller, a relayed line, the agent), `/permissions use` and `/permissions set`, a `/profile` switch, `create` or `duplicate` to a config profile that holds other ones, the settings panel's permission profile, tool permission and sandbox rows, a host thread's later `set_session_settings` revision that names another permission profile than the session started on (the thread's then, else the pinned one), a factory reset, which would remove `config.json` (`/config reset`, the settings panel's; `ztc config reset`, run from a shell, takes no pin), and a restart in place, your own `/restart` included, while `config.json` holds an edit to them (ZTC reads the file for it whatever its inode, size and modification time say, so an edit made in place that kept them counts too) are refused with "This session's permission profile and sandbox are pinned by its host (ZTC_PERMISSION_PROFILE_PINNED): ...", which names nothing of the profile, and nothing is saved, nor anything of a refused revision taken. A revision that names that profile is taken without its profile and sandbox, which the pin holds; a session that took no thread's settings as it started, pinned on a profile no revision can name (a resident's own), takes none. The profile's relative file roots (`workspace_autonomous`'s `.`) are resolved once, against the folder the session started in (its `--cwd`, the mounted workspace), and `/permissions` names them: a `/cd` elsewhere (yours, a controller's or a relayed one), an environment the session opens, or the agent built again there moves none, so the agent's file tools outside them are refused, and so are its commands there, which every pinned profile that runs them keeps in the OS sandbox (`workspace_autonomous`, `ask_before_mutation`, a resident's `requireOsEnforcement` profile). A restart in place starts the next ZTC in that folder, wherever an environment moved the session, and refuses one that would start elsewhere (a session the resume panel picks that works in another folder, or that folder gone); it hands that ZTC the variable, whatever this process's environment says of it by then, and what its pin was taken from as `config.json` or the host's thread gives it (in `ZTC_PERMISSION_PIN_SOURCE`, which that ZTC, `zerg-ztc-headless` too, takes out of its environment as it starts, before any MCP server connects, and which no MCP server, hook, pane or command is given, whatever an MCP server's `passEnv` names), with no built-in profile they don't redefine and no default (so an update that rewords a built-in profile or changes a default doesn't keep that ZTC from starting), and one that finds `config.json` or the host's thread changed them after the restart's check doesn't start, saying "ZTC did not start again in place: the permission settings it would pin changed after the ZTC it replaces checked them: ..." and exiting 2. Nor does a pinned ZTC update itself, since an update would put a ZTC its host didn't choose in its place: `/update` installs nothing and says "ZTC doesn't update itself in a session its host pins (ZTC_PERMISSION_PROFILE_PINNED): an update replaces the ZTC that holds the session's permission profile and sandbox, and a ZTC its host didn't choose might not hold them. Nothing was installed. Update ZTC where its host starts it, or with `ztc update` from a shell.", the native interface's start-up check, which installs a newer release with npm and starts it in place, doesn't run (the Ink interface's still installs one: see the Limits under [A profile that limits the agent](#a-profile-that-limits-the-agent)), and the desktop app is given no context to start that ZTC again with, without which its updater installs no app update while that ZTC runs. An agent's `/ztc` compares the pane's saved profile with the pinned one by the folder the pane starts in. A reload takes no `config.json` edit to them, nor to the hooks, MCP servers, skills and workflows, as under a profile that limits the agent, and a save leaves another process's edit as it made it, never writing what the pin holds as yours. `/config scope clear` leaves them (the agent's is refused, and says its host pinned them), `/permissions` shows them and says they are pinned, `/status` names the profile and says "pinned by its host (ZTC_PERMISSION_PROFILE_PINNED)", and a Claude Code or Codex pane you open starts with its permission prompts, whatever `panes.agentPermissions` says. A ZTC pane opened from the session is given the variable and pins what it starts on itself (`--permission-profile` passes to it), or doesn't start where that limits nothing or doesn't require the OS sandbox; a colony cell inherits it. Not held: words that skip a Claude Code or Codex pane's permission checks (`/claude --dangerously-skip-permissions`), yours, a controller's or a relayed line's, still do, and a config profile that holds the same permission settings brings its own hooks and MCP servers, as without the pin. Without the variable, or with one that isn't `1` or `true`, nothing changes |
|
|
2458
2458
|
| `ZTC_LLM_AUTH_MODE` | `zrouter`, `direct` or `auto`, over the saved Routing setting (`ZERG_LLM_AUTH_MODE` is read when it is unset; the zerg image sets it from its deploy tier). `zrouter` and `direct` pin the routing: a switch to a route that runs another way, from `/model`, `/provider`, `/models latest`, `/config`, `/connect`, the settings panel, the mirror or the agent's `ztc_command`, and a new ZTC pane that names a provider on one, are refused with the mode named, and nothing is saved. That is a local login (Codex, Kimi Code) or a provider's own key under `zrouter`, where Morph runs through Zerg Router even with a Morph key on this machine, and Zerg Router under `direct`. Any model on that routing can still be chosen. The pin refuses switches: it doesn't move a session that starts on another routing (a default saved before it, a `ZTC_PROVIDER` or `--provider` that names a local login), nor refuse a `/profile` switch to a profile saved on one, or a new ZTC pane that names no provider, which starts on the route new panes start on. `auto` picks each provider's routing and pins none |
|
|
2459
|
+
| `ZTC_PROMPT_CACHE_TTL` | The prompt cache ZTC asks for on a Claude model: `1h` (the default), `5m` or `off`, in any letter case. With `off`, ZTC's requests to Anthropic, and on Zerg Router's native Anthropic route, carry no `cache_control`, and a Claude turn on Zerg Router's chat route (on a host's Router runtime grant or your own Router key or sign-in) asks Router for no prompt cache either (`prompt_cache: false`), so Router adds none to a long system prompt and can price the turn (one it records without a price counts against a dollar spending limit at its whole hold). Zerg Router drops the field before any provider sees it (since Router #903), so ZTC adds no route for it, and a deck's or workspace's stored route plan, with its fallbacks, applies as with the variable unset. Use `off` only with a Router at or past #903: an older one (this repository's `zapps/zergrouter` among them) hands the field as it came to another provider's model that a stored route plan falls back to, which may refuse it, and ZTC adds no route to keep the turn on Claude (`allow_fallbacks: false`), since Router refuses one from a service-account key. A route plan of the turn's own (`zrouterRoutePlan`) that can fall back to another provider's model asks for nothing, nor do Router's Responses route and another provider's model. An older Router that refuses the field from a service-account key (400 "Unsupported service inference option") gets the turn again at once without it, and nothing more of it on that Router and key for the rest of the run, which ZTC says once among its runtime diagnostics (the Logs tab; stderr in a headless run). With `off`, the settings panel's "Compact before the cache expires" counts no Anthropic cache lifetime, unless you set "Prompt cache lifetime (seconds)" |
|
|
2459
2460
|
| `ZTC_ROUTER_RUNTIME_GRANT_FILE` | Path of a file holding the host's Router runtime grant, in place of `ZTC_ROUTER_RUNTIME_GRANT`: read once and removed as ZTC starts, so the environment ZTC was started with never holds the grant under `ZTC_ROUTER_RUNTIME_GRANT`. A copy the launcher also sets is still there: ZergCloud's launch sets the grant as `ZERG_API_TOKEN` and `ZTC_AUTH_TOKEN`, and in zrouter mode the zerg image copies `ZERG_API_TOKEN` into `ZTC_AUTH_TOKEN` when that is unset. The file keeps the grant out of ZTC's start environment only when no other variable holds it. A regular file with one name that only its owner can read; see [Credentials a host hands over](#credentials-a-host-hands-over) |
|
|
2460
2461
|
| `ZTC_MIRROR_SHARED_SECRET_FILE` | Path of a file holding the mirror's shared secret, in place of `ZTC_MIRROR_SHARED_SECRET`, taken the same way |
|
|
2461
2462
|
| `ZTC_PLUGIN_PATHS` | Explicit plugin roots (platform-delimited) |
|
|
@@ -2601,23 +2602,27 @@ A permission profile limits the agent when it names `allowedPaths` or `deniedPat
|
|
|
2601
2602
|
capability off or asks before one, or keeps commands in an OS sandbox (`sandbox.requireOsEnforcement`, a backend of its
|
|
2602
2603
|
own, no network there): `read_only`, the hosted `workspace_autonomous`, `ask_before_mutation`, `tests_allowed` and
|
|
2603
2604
|
`hosted_read_only`, and a resident's own profile do; `trusted`, the default, and `local_full` don't. `/status` names the
|
|
2604
|
-
profile the agent runs under and says whether its commands must run in an OS sandbox
|
|
2605
|
-
(`OS command sandbox: required; enforced by seatbelt`, or
|
|
2605
|
+
profile the agent runs under and says whether its commands must run in an OS sandbox (they must under one that requires
|
|
2606
|
+
it, or writes nothing) and what enforces them here (`OS command sandbox: required; enforced by seatbelt`, or
|
|
2606
2607
|
`not enforced: no OS sandbox on this host, so commands don't run`), never what the profile allows, which `/permissions`
|
|
2607
2608
|
shows: `/status --verbose`, which adds the agent's execution facts, leaves out their permission block (the profile's
|
|
2608
2609
|
capabilities, its file roots and the OS sandbox it asks for), whoever asks; the facts in the agent's own prompt keep
|
|
2609
|
-
it.
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2610
|
+
it. On Linux it says `enforced by bubblewrap` only where the `bwrap` on `PATH` makes the namespaces ZTC runs commands
|
|
2611
|
+
in, which ZTC checks once, by running it on `/bin/true`, and otherwise `not enforced: bubblewrap is installed, but
|
|
2612
|
+
can't make the namespaces ZTC runs commands in here (the host must let this user create user namespaces), so commands
|
|
2613
|
+
fail`. A profile of your own that writes nothing runs commands only in an OS sandbox, as `read_only` does, so on a host
|
|
2614
|
+
with none it runs no commands. Under one:
|
|
2615
|
+
|
|
2616
|
+
- **ZTC's own state is never the agent's**, but for its commands, and the programs its tools start, where they run
|
|
2617
|
+
outside any OS sandbox (see the Limits). Its config folder, `~/.ztc`, its sessions and its runtime's hand-offs in a
|
|
2618
|
+
temp folder are refused to the file tools, search, the project-context index and the host verifiers by name and, for
|
|
2619
|
+
a hard link to one of them, by the file it is, and to the OS sandbox by name. Your own skills folder,
|
|
2620
|
+
`~/.ztc/skills`, stays readable, never writable, where discovery is not explicit. Commands that run outside any OS
|
|
2621
|
+
sandbox read and write that state as any program of yours does: those of a profile that runs them but asks for no OS
|
|
2622
|
+
sandbox for them (one that only turns `computer_control`, `screen_capture`, `ml_inference` or `file_read` off, asks
|
|
2623
|
+
before a capability, or limits shell commands or network hosts), and, on a host that has none, those of one that asks
|
|
2624
|
+
for it without requiring it (`/status` says `not enforced: no OS sandbox on this host`); neither kind starts under
|
|
2625
|
+
`ZTC_PERMISSION_PROFILE_PINNED` (below). A profile whose sandbox block turns the network off
|
|
2621
2626
|
(`sandbox.network: false`) asks for the OS sandbox for its commands, as one that turns its `network` capability off
|
|
2622
2627
|
does.
|
|
2623
2628
|
- **ZTC's own files must be its own, with one name.** ZTC doesn't start while `config.json` (or a backup of it),
|
|
@@ -2650,17 +2655,25 @@ it. Under one:
|
|
|
2650
2655
|
has started, `--permission-profile`'s, a host thread's (a `--headless --mirror` resident's) or the one `config.json`
|
|
2651
2656
|
saves, with its definition, the sandbox and the tool permissions, is then its only one. ZTC reads the variable as its
|
|
2652
2657
|
startup ends, and so does `zerg-ztc-headless`. Where that profile limits nothing (`trusted`, the default, or
|
|
2653
|
-
`local_full`, with no sandbox setting that requires the OS sandbox), or runs the agent's commands
|
|
2654
|
-
sandbox for them (`/status` would say
|
|
2655
|
-
`
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
the OS sandbox
|
|
2663
|
-
|
|
2658
|
+
`local_full`, with no sandbox setting that requires the OS sandbox), or runs the agent's commands without requiring an
|
|
2659
|
+
OS sandbox for them, whether it asks for none (`/status` would say
|
|
2660
|
+
`OS command sandbox: not required, and none is used`: one that only turns `computer_control` off, say) or only asks
|
|
2661
|
+
for one (`not required; enforced by seatbelt`: one that names `allowedPaths`, say, under which the LSP tools,
|
|
2662
|
+
`run_and_capture` and `workflow` start programs outside the sandbox), where they could reach ZTC's own state and the
|
|
2663
|
+
`config.json` the pin is taken from, ZTC doesn't start, whatever starts it: a one-prompt run, a resident (one on a
|
|
2664
|
+
host's thread that has no settings yet included), a ZTC pane or colony cell a pinned session opens. It exits 2, saying
|
|
2665
|
+
that its host pins the permission settings and the profile it would pin limits nothing, or doesn't require an OS
|
|
2666
|
+
sandbox, and to start ZTC with `--permission-profile` and a profile that limits the agent, or, for the second, one
|
|
2667
|
+
that requires the OS sandbox (set `sandbox.requireOsEnforcement` to true in it, as `workspace_autonomous` does) or
|
|
2668
|
+
runs no command (`shell_exec` off) (`zerg-ztc-headless`: to save one as `permissionProfile`), or to unset the
|
|
2669
|
+
variable. Every other profile that limits the agent is pinned: one that requires the OS sandbox for its commands
|
|
2670
|
+
(`sandbox.requireOsEnforcement` in it or in the sandbox settings, or one that writes nothing), or runs none, as every
|
|
2671
|
+
built-in one that limits the agent does. Your own commands (`!cmd` and `/shell`, `/diff`'s git, the commands
|
|
2672
|
+
`/optimize` runs), yours or a controller's, then run only inside the OS sandbox too, as the agent's do, under the
|
|
2673
|
+
pinned profile's roots with ZTC's own state hidden, even under one that runs none of the agent's (`safe_edits`), so
|
|
2674
|
+
they reach neither that state nor the `config.json` the pin is taken from, and where no OS sandbox is usable they are
|
|
2675
|
+
refused ("OS sandbox enforcement required but unavailable: ..."); the Ink interface's, and your hooks under a profile
|
|
2676
|
+
that runs no command, run outside it (see the Limits). You, a controller, a relayed line and the agent are all
|
|
2664
2677
|
refused `/permissions use` and `set`, a `/profile` switch to a config profile that holds other ones, the settings
|
|
2665
2678
|
panel's rows for them, a factory reset (it would remove `config.json`; `ztc config reset` from a shell takes no pin),
|
|
2666
2679
|
and a restart in place (your `/restart` too) while `config.json` holds an edit to them. The host is refused a thread
|
|
@@ -2674,17 +2687,23 @@ it. Under one:
|
|
|
2674
2687
|
folder the pane starts in. The pinned profile's relative file roots (`workspace_autonomous`'s `.`) are the folder the
|
|
2675
2688
|
session started in, its mounted workspace, and `/permissions` names them (`File roots: /path/to/workspace`). A `/cd`
|
|
2676
2689
|
elsewhere (yours, a controller's or a relayed one), or an environment the session opens, moves none: the agent, built
|
|
2677
|
-
again there, is still refused its file tools outside them, and its commands there
|
|
2678
|
-
OS sandbox (`workspace_autonomous`, `ask_before_mutation`, a resident's `requireOsEnforcement`
|
|
2679
|
-
|
|
2680
|
-
the
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2690
|
+
again there, is still refused its file tools outside them, and its commands there, which every pinned profile that
|
|
2691
|
+
runs them keeps in the OS sandbox (`workspace_autonomous`, `ask_before_mutation`, a resident's `requireOsEnforcement`
|
|
2692
|
+
profile). A restart in place starts the next ZTC in the folder the session started in, wherever an environment moved
|
|
2693
|
+
the session, and is refused where it would start elsewhere (a session the resume panel picks that works in another
|
|
2694
|
+
folder, or that folder gone). The ZTC that starts is handed the variable itself and what the pin was taken from, as
|
|
2695
|
+
`config.json` or the host's thread gives it: where they changed the pinned settings after the restart's check, it
|
|
2696
|
+
doesn't start, says so ("ZTC did not start again in place: the permission settings it would pin changed after the ZTC
|
|
2697
|
+
it replaces checked them: ..."), and exits 2, so its host or you start it again. No built-in profile they don't
|
|
2698
|
+
redefine and no default goes with it, so an update that rewords a built-in profile or changes a default doesn't keep
|
|
2699
|
+
it from starting. It takes what it was handed (`ZTC_PERMISSION_PIN_SOURCE`) out of its environment as it starts,
|
|
2700
|
+
before any MCP server connects, and no MCP server, hook, pane or command is given that variable, whatever an MCP
|
|
2701
|
+
server's `passEnv` names.
|
|
2702
|
+
A pinned ZTC doesn't update itself, since an update would put a ZTC its host didn't choose in its place: `/update`
|
|
2703
|
+
installs nothing, saying why (naming the variable) and to update ZTC where its host starts it, or with `ztc update`
|
|
2704
|
+
from a shell; the native interface's start-up check, which installs a newer release with npm and starts it in place,
|
|
2705
|
+
doesn't run; and the desktop app is given no context to start that ZTC again with, without which its updater installs
|
|
2706
|
+
no app update while that ZTC runs.
|
|
2688
2707
|
- **Hooks run inside the OS sandbox the profile requires, or not at all**, except under a profile whose agent writes
|
|
2689
2708
|
nothing (`read_only`, `hosted_read_only`), where your own approved hooks run as before. In the sandbox a hook reads,
|
|
2690
2709
|
beside the system's folders and the project, its own code, read-only: the program its command line starts (found on
|
|
@@ -2703,24 +2722,33 @@ it. Under one:
|
|
|
2703
2722
|
the computer-use routine tools (`computer_run_routine`, `computer_save_routine`, `computer_list_routines`,
|
|
2704
2723
|
`computer_delete_routine`, whose runner runs the agent's JavaScript outside any sandbox), the LSP tools
|
|
2705
2724
|
(`goto_definition`, `find_references`, `hover`, `diagnostics`, `lsp_status`, whose language server runs the
|
|
2706
|
-
workspace's code: rust-analyzer runs a crate's build script),
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
`
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2725
|
+
workspace's code: rust-analyzer runs a crate's build script), the ML tools in ML mode (`ml_load_model`, `ml_infer`,
|
|
2726
|
+
`ml_train`, `ml_status`, which start ZTC's ML helper, `ztc-ml`, and hand it files), and through `ztc_command`
|
|
2727
|
+
`/claude`, `/codex`, `/zerg launch`, `/zerg serve` and `/debug headlines` are refused and not offered, the routine
|
|
2728
|
+
tools whatever the profile says of `computer_control`. A profile that runs no command (`hosted_read_only`,
|
|
2729
|
+
`safe_edits`, `locked_down`) doesn't offer the LSP tools, the routine tools, the ML tools or
|
|
2730
|
+
`create_supervised_ztc_pane` either. The file an LSP tool names is checked as `read_file`'s path is, and so are the
|
|
2731
|
+
weights `ml_load_model` loads and the session data `ml_train` trains on, while the place `ml_train` saves weights to
|
|
2732
|
+
is checked as `write_file`'s path is, each resolved against the agent's folder. A profile that asks before each shell
|
|
2733
|
+
command (`tests_allowed`, `ask_before_mutation`) asks, and you decide; a call it refuses whatever you answer (a
|
|
2734
|
+
working directory or a path outside its roots, a file a patch writes there, the file an LSP tool or an ML tool reads
|
|
2735
|
+
there, the weights `ml_train` would save there) is refused without asking you, a file read with
|
|
2736
|
+
`Permission denied: path is outside allowed profile roots (<file>). <tool> read nothing.` A language server the LSP
|
|
2737
|
+
tools started is ended once the permissions change to ones that don't admit those tools without asking (through
|
|
2715
2738
|
`/permissions use` or `set`, the settings panel's permission profile, tool permission and sandbox rows, `/profile` or
|
|
2716
2739
|
a host's revision: a switch to `workspace_autonomous`, `ask_before_mutation`, `tests_allowed` or `read_only`,
|
|
2717
|
-
`shell_exec` turned off, the OS sandbox required)
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
`
|
|
2740
|
+
`shell_exec` turned off, the OS sandbox required): ZTC asks it to shut down and exit, and once it has left, or a
|
|
2741
|
+
second after it was asked to exit, ends what is left of its process group, the server and what it started there; a
|
|
2742
|
+
server that doesn't answer the request to shut down is ended the same way once ZTC has waited 10 seconds for the
|
|
2743
|
+
answer and a second more (each server leads a process group and session of its own on macOS and Linux, so the
|
|
2744
|
+
Ctrl+C or hangup your terminal sends ZTC no longer reaches it; on Windows the server alone is ended). So none goes on
|
|
2745
|
+
building the workspace outside the sandbox; under permissions that admit them without asking (`trusted`,
|
|
2746
|
+
`local_full`) it keeps running, and the next call admitted starts one again. The agent built again under the same
|
|
2747
|
+
permissions (after a `/model` switch or a `/cd`) stops none, so one you approved under `tests_allowed` or
|
|
2748
|
+
`ask_before_mutation` keeps running until a change of the permissions stops it as above. `run_command`,
|
|
2749
|
+
`delegate_task`, Claude Code's `Bash`, `WebFetch`, `Glob` and `Task`, MCP tools and `/ztc` (whose pane runs under
|
|
2750
|
+
permissions no wider than this one's) stay. There, a `run_command` (or Codex's `exec_command`) whose working
|
|
2751
|
+
directory is outside the profile's roots is refused before it runs, with
|
|
2724
2752
|
`Permission denied: working directory is outside allowed profile roots (<folder>)`, and one in a folder it denies with
|
|
2725
2753
|
`Permission denied: working directory is blocked by profile (<folder>)`; each goes on to name the profile's roots to
|
|
2726
2754
|
run the command in instead (`Run the command in a folder inside this profile's roots (...)`), or the session's folder,
|
|
@@ -2736,36 +2764,75 @@ it. Under one:
|
|
|
2736
2764
|
the command runs. Under a profile that names `allowedPaths`, the folder a `run_command` names as its `cwd` is no root
|
|
2737
2765
|
of its own, so a command there can't write outside the workspace (`.` used to name that folder); one that names none
|
|
2738
2766
|
keeps the folder a command runs in as its write root, while its relative `deniedPaths` are the session's folder's. The
|
|
2739
|
-
sandbox audit's `allowed_paths` and `denied_paths` name the roots so.
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
command
|
|
2767
|
+
sandbox audit's `allowed_paths` and `denied_paths` name the roots so. Both sandboxes hold every root by its real path
|
|
2768
|
+
too: macOS's matches only real paths, and bubblewrap binds a root named through a link as named and by its real path,
|
|
2769
|
+
and hides, or holds read-only, at both spellings what the plan keeps from a command in it (a denial, ZTC's own state,
|
|
2770
|
+
a hook's own files, where its repository names the programs git starts). So with the session's folder named through a
|
|
2771
|
+
link (a `/cd` to it by another name) a command still writes in the workspace, and a relative denial still keeps it out
|
|
2772
|
+
of the denied folder. bubblewrap enters a working directory named through a link into the workspace by its real path.
|
|
2773
|
+
One outside the roots and the system's folders every command reads (`/usr`, `/bin`, `/etc`), which a profile not
|
|
2774
|
+
requiring the sandbox lets a command run in, it binds read-only, so the command starts, only where a filter refuses
|
|
2775
|
+
the command Unix sockets (a profile without network, on x86-64 and arm64). Where none does, a read-only bind would
|
|
2776
|
+
leave a host service's socket in that folder, or below it, in the command's reach, so bubblewrap binds no such folder:
|
|
2777
|
+
the command doesn't start, and is refused with "Permission denied: working directory is outside this profile's roots
|
|
2778
|
+
(<folder>), and bubblewrap binds no folder outside them for a command that may use the network: a host service's
|
|
2779
|
+
socket in it would be in the command's reach. Run the command in a folder inside this profile's roots (<roots>): give
|
|
2780
|
+
it one there as its working directory, or none to run it in the session's folder.", the last words only where a root
|
|
2781
|
+
holds the session's folder (under `allowedPaths: ['./build']` none does, and a command in the session's folder is
|
|
2782
|
+
refused too). Without network, on an architecture ZTC has no such filter for (anything but x86-64 and arm64), the
|
|
2783
|
+
refusal says "for a command no filter keeps from Unix sockets, as ZTC has none for this architecture" in place of
|
|
2784
|
+
"for a command that may use the network". Whatever the network, a working directory that is a folder where the host's
|
|
2785
|
+
services keep their sockets (`/tmp`, `/var/tmp`, `/dev/shm`, `/run`, `/var/run`, `/run/user`, the session's
|
|
2786
|
+
`XDG_RUNTIME_DIR`), lies in one (tmux's `/tmp/tmux-<uid>`; a drive the host mounts for you in `/run/media` lies in
|
|
2787
|
+
none, below) or holds one (`/var`, or `/`, which holds them all) is never bound so, since a read-only
|
|
2788
|
+
bind would put those sockets in reach (tmux's, the session bus, `docker.sock`): the command doesn't start, and is
|
|
2789
|
+
refused with
|
|
2748
2790
|
`Permission denied: working directory is a folder where the host's services keep their sockets (<folder>)` (or
|
|
2749
2791
|
`lies in <folder>, where ...`, `holds <folder>, where ...`, and for `/` `holds the folders where ...`), followed by
|
|
2750
2792
|
where to run it instead: a folder inside the profile's roots, or none, to run it in the session's folder.
|
|
2751
2793
|
- **Where the agent's commands keep the network, bubblewrap binds no root that would put the host's services' sockets in
|
|
2752
|
-
their reach**, as no filter refuses them Unix sockets there: it plans no command whose root is `/`,
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2794
|
+
their reach**, as no filter refuses them Unix sockets there: it plans no command whose root is `/`, is or holds one of
|
|
2795
|
+
the folders above, or lies in one of the host's runtime folders (`/run`, `/var/run`, `/run/user`, the session's
|
|
2796
|
+
`XDG_RUNTIME_DIR`) but on a drive the host mounts for you in `/run/media` (below), judged as named and by where a link
|
|
2797
|
+
leads, and its refusal says what to do instead. A root the profile names is refused with "Permission denied: this
|
|
2798
|
+
profile's root is a folder where the host's services keep their sockets (/tmp), which bubblewrap keeps out of a
|
|
2799
|
+
command's reach. Name a project's folder in its allowedPaths instead, to run commands under it." (or
|
|
2800
|
+
`holds <folder>, where ...`,
|
|
2801
|
+
`lies in /run, where the host's services keep their sockets (/run/postgresql)`, and for `/`
|
|
2802
|
+
`holds the folders where ...`). Its relative root (`workspace_autonomous`'s `.`) in a session started in `/tmp` or `/`
|
|
2803
|
+
keeps every command from running, the refusal ending "Start ZTC in a project's folder, which its relative root (.)
|
|
2804
|
+
then names, to run commands under it." Under a profile that names no `allowedPaths` (`trusted` where the sandbox
|
|
2805
|
+
settings require the OS sandbox, or one of your own), whose only root is the folder a command runs in, that folder is
|
|
2806
|
+
refused where it is `/`, is or holds one of those folders, lies in a runtime folder, or lies in a scratch folder
|
|
2807
|
+
(`/tmp`, `/var/tmp`, `/dev/shm`) outside the session's folder (`/tmp/tmux-<uid>`), with
|
|
2762
2808
|
`Permission denied: working directory is a folder where the host's services keep their sockets (<folder>)` (or
|
|
2763
2809
|
`lies in`, `holds` as above), followed by "Run the command in another folder, such as a project's: give it one as its
|
|
2764
|
-
working directory, or none to run it in the session's folder." A root that only lies in
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2810
|
+
working directory, or none to run it in the session's folder." A root that only lies in a scratch folder (`/tmp/proj`)
|
|
2811
|
+
is bound as before, as are the session's own folder there and the folders in it under a profile that names no
|
|
2812
|
+
`allowedPaths`, and a profile without network, whose commands bubblewrap refuses Unix sockets on x86-64 and arm64,
|
|
2813
|
+
plans its commands as before. A drive the host mounts for you in `/run/media` (udisks2's `/run/media/<user>/<drive>`,
|
|
2814
|
+
on Fedora, Arch and openSUSE) is no folder where the host's services keep their sockets: a project there is bound as
|
|
2815
|
+
any project's folder is, as a root the profile names, as `workspace_autonomous`'s `.` in a session started there and
|
|
2816
|
+
as the folder a profile that names no `allowedPaths` runs a command in, and a working directory there outside the
|
|
2817
|
+
roots is treated as any other folder outside them. The rest of `/run` is refused, `/run/user/<uid>/gvfs` (GNOME's
|
|
2818
|
+
network shares) and `/run/host` (the host's root in a Toolbx or Distrobox container) among it (see the Limits). A
|
|
2819
|
+
plan refused for its roots records no repository of theirs in `~/.ztc/sandbox/known-repositories.json`.
|
|
2820
|
+
- **A denied path that doesn't exist yet can't be made in the sandbox.** macOS's sandbox denies a path by its name,
|
|
2821
|
+
whether or not it exists. bubblewrap hides a path with a mount over it, which needs something there, so where a
|
|
2822
|
+
`deniedPaths` entry, or one of the folders of ZTC's own state (`~/.ztc`, its config folder, `ZTC_SESSIONS_DIR`,
|
|
2823
|
+
`ZTC_WORKSPACE_LAYOUT_DIR`), doesn't exist when a command starts, in a root the command writes, it stands an empty
|
|
2824
|
+
read-only folder over it for the command's run: the command can make neither it nor anything in it
|
|
2825
|
+
(`Read-only file system`, `Is a directory` or `File exists`), so a denied `.env` or `.github/workflows` stays unmade.
|
|
2826
|
+
bwrap makes that folder on the host, as you, with any folder above it that didn't exist either, and it stands there
|
|
2827
|
+
for the whole of the command's run, a background command's too; every command this ZTC plans meanwhile stands one
|
|
2828
|
+
there again, and ZTC removes them once the last of those commands ends, keeping one that something was put in.
|
|
2829
|
+
Meanwhile your other programs see an empty folder there: writing `.env`, or reading it as dotenv and `docker compose`
|
|
2830
|
+
do, gets `Is a directory`, and a file watcher sees the folder come and go around each command. A folder made above
|
|
2831
|
+
it (`.github`, for a denied `.github/workflows`) is an ordinary writable folder on the host meanwhile, and what is
|
|
2832
|
+
put in it stays. A file you put at the path while such a command runs, once you have removed its folder, is hidden
|
|
2833
|
+
from the next command as a file is, with `/dev/null` over it. None is put outside the roots the command writes,
|
|
2834
|
+
through a link below a root, under a read-only or emptied mount, under a profile that writes nothing, inside another
|
|
2835
|
+
one, or in a folder you can't write, where the command can make nothing either (see the Limits).
|
|
2769
2836
|
- **On macOS, a sandboxed command that keeps the network gets IP networking and the system's name resolver, and connects
|
|
2770
2837
|
to no other Unix socket.** It connects out to any address, listens and accepts on local ones and resolves names
|
|
2771
2838
|
through the resolver's socket (`mDNSResponder`), but no other Unix socket is in its reach, in its workspace or outside
|
|
@@ -2836,29 +2903,52 @@ programs.
|
|
|
2836
2903
|
stop ZTC, or ask it to start again in place (`kill -USR1`), which takes no `config.json` edit to the settings above.
|
|
2837
2904
|
bubblewrap gives a command processes of its own.
|
|
2838
2905
|
- On Linux, bubblewrap refuses no Unix socket to a command whose profile leaves it the network. It keeps the folders
|
|
2839
|
-
where the host's services keep their sockets out of the command's reach
|
|
2840
|
-
network, and with it the host's abstract sockets, and reaches a
|
|
2841
|
-
above your home folder holds the sockets programs keep there (Docker
|
|
2842
|
-
a profile of your own that writes nothing and names no `allowedPaths`
|
|
2843
|
-
folders. `read_only` keeps its commands off the network and, on x86-64
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2906
|
+
where the host's services keep their sockets out of the command's reach, and binds no folder outside the roots for it
|
|
2907
|
+
to run in (above), but the command shares the host's network, and with it the host's abstract sockets, and reaches a
|
|
2908
|
+
socket file in any folder it binds: a root at or above your home folder holds the sockets programs keep there (Docker
|
|
2909
|
+
Desktop's `~/.docker/desktop/docker.sock`), and a profile of your own that writes nothing and names no `allowedPaths`
|
|
2910
|
+
binds every folder, read-only, but the socket folders. `read_only` keeps its commands off the network and, on x86-64
|
|
2911
|
+
and arm64, refuses them Unix sockets.
|
|
2912
|
+
- On Linux, a project in `/run/user/<uid>/gvfs` (GNOME's network shares) or in `/run/host` (the host's root in a Toolbx
|
|
2913
|
+
or Distrobox container, its `/run` and sockets included) lies in `/run`, so where no filter keeps commands from Unix
|
|
2914
|
+
sockets (a profile that keeps the network) bubblewrap plans no command with a root there (above). Turn the profile's
|
|
2915
|
+
network off (`sandbox.network: false`), whose filter keeps commands from Unix sockets on x86-64 and arm64, or work on
|
|
2916
|
+
a copy elsewhere.
|
|
2917
|
+
- On Linux, where `bwrap` is on `PATH` but can't make the namespaces ZTC asks of it (a host or container that doesn't
|
|
2918
|
+
let the user create user namespaces, as Ubuntu 24.04's AppArmor doesn't by default), every sandboxed command fails
|
|
2919
|
+
with bubblewrap's error, and none runs outside the sandbox, a profile's that only asks for it included; `/status`
|
|
2920
|
+
says so (above).
|
|
2921
|
+
- Under bubblewrap, ZTC removes the empty folders that keep a denied path not made yet (above) once the command ends:
|
|
2922
|
+
one can stay where ZTC is killed while the command runs, and where it exits or starts again in place then, since it
|
|
2923
|
+
stops a running command without waiting for it to end (remove it with `rmdir`); and where two ZTCs run commands in
|
|
2924
|
+
one workspace at once with the same denied path not made yet, the end of one's command can remove the folder the
|
|
2925
|
+
other's stands on, and the other command can then make that path. A denied path that is a link leading nowhere is
|
|
2926
|
+
neither hidden nor held: a command can remove the link and make the path.
|
|
2847
2927
|
- A restart in place checks `config.json` before it starts the next ZTC, which reads the file again as it starts: an
|
|
2848
2928
|
edit another process makes in between to the hooks, MCP servers, skills or workflows is taken. Under
|
|
2849
2929
|
`ZTC_PERMISSION_PROFILE_PINNED`, one to the pinned permission settings keeps that ZTC from starting instead.
|
|
2850
|
-
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2930
|
+
- A colony cell's `/restart` isn't a restart in place: it asks its overseer to start the cell again, which doesn't
|
|
2931
|
+
check `config.json` first, nor hand the ZTC it starts what the pin was taken from: that ZTC takes the permission
|
|
2932
|
+
settings from `config.json` as a fresh start does, and pins them where its environment holds
|
|
2933
|
+
`ZTC_PERMISSION_PROFILE_PINNED`. Nor is the desktop app's start of ZTC after it installs an update, which doesn't
|
|
2934
|
+
check `config.json` first either, and which it makes only for a ZTC that isn't pinned (above).
|
|
2854
2935
|
- Under `ZTC_PERMISSION_PROFILE_PINNED`, ZTC takes the pin as its startup ends, after it has started the MCP servers
|
|
2855
|
-
`config.json` names: one that then doesn't start (the profile it would pin limits nothing or
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2936
|
+
`config.json` names: one that then doesn't start (the profile it would pin limits nothing or doesn't require an OS
|
|
2937
|
+
sandbox, or the pinned settings changed after a restart's check) has started them by then. A ZTC started again in
|
|
2938
|
+
place takes what it was handed (`ZTC_PERMISSION_PIN_SOURCE`) out of its environment before any of them starts, so
|
|
2939
|
+
none holds it, but the environment the process was started with (`/proc/<pid>/environ` on Linux) still does, which a
|
|
2940
|
+
program running as the same user can read, as it can read `config.json`.
|
|
2941
|
+
- Under `ZTC_PERMISSION_PROFILE_PINNED`, the Ink interface, which ZTC runs where its native interface isn't built
|
|
2942
|
+
(Windows, say), still installs a newer release with npm as it starts, for the next start to run (it starts nothing in
|
|
2943
|
+
place); `ZTC_DISABLE_UPDATE=1` keeps it from checking, and the `ztc` command the npm package installs sets it.
|
|
2944
|
+
- The Ink interface runs your own commands (`!cmd` and `/shell`, `/diff`'s git, the commands `/optimize` runs) outside
|
|
2945
|
+
any OS sandbox, under every profile, `ZTC_PERMISSION_PROFILE_PINNED` or not: the native interface runs them in the
|
|
2946
|
+
sandbox the profile asks for, and under the pin only inside one.
|
|
2947
|
+
- Under `ZTC_PERMISSION_PROFILE_PINNED`, a pinned profile that runs none of the agent's commands (`safe_edits`, or one
|
|
2948
|
+
that turns `shell_exec` off) requires no OS sandbox, so your hooks run outside one there, as under `read_only`: a hook
|
|
2949
|
+
reaches ZTC's own state, and the `config.json` the pin is taken from, as any program of yours does, and where the
|
|
2950
|
+
profile lets the agent write, a hook that runs the workspace's code (`npm run lint`) runs what the agent may have
|
|
2951
|
+
written there.
|
|
2862
2952
|
- `--new-window` in Terminal or iTerm starts the new window's ZTC in a shell of its own, which ZTC hands neither
|
|
2863
2953
|
`ZTC_PERMISSION_PROFILE_PINNED` nor `ZTC_MODEL_PINNED`: that ZTC pins neither.
|
|
2864
2954
|
- Settings that name programs ZTC runs when you ask aren't kept as ZTC started with them: the Codex app server's
|
|
@@ -2881,16 +2971,12 @@ programs.
|
|
|
2881
2971
|
with a credential; under `ZTC_PERMISSION_PROFILE_PINNED`, `/permissions use` is refused whoever asks. Turn sign-in on
|
|
2882
2972
|
for a mirror you run under such a profile.
|
|
2883
2973
|
- Where a profile lets the agent start a program outside the OS sandbox (`trusted`, `local_full`, a profile of your own
|
|
2884
|
-
that doesn't require the sandbox, or one that asks, once you approve), the
|
|
2885
|
-
|
|
2886
|
-
scripts and proc macros)
|
|
2887
|
-
|
|
2888
|
-
`
|
|
2889
|
-
|
|
2890
|
-
which doesn't ask before them, `hosted_read_only`), the agent can have the helper read a file outside its roots, or
|
|
2891
|
-
in ZTC's own state, and `ml_train` write its weights there. ML mode is a launch choice (`--ml`): without it ZTC
|
|
2892
|
-
offers no ML tool, and a profile with `ml_inference: false` (`read_only`, `safe_edits`, `tests_allowed`,
|
|
2893
|
-
`locked_down`) refuses them.
|
|
2974
|
+
that doesn't require the sandbox, or one that asks, once you approve), the tools above that start one start it outside
|
|
2975
|
+
any sandbox. The LSP tools' language server runs the workspace's code there as it builds it (rust-analyzer runs a
|
|
2976
|
+
crate's build scripts and proc macros), and ZTC exits, or starts again in place, without waiting for it to stop, so a
|
|
2977
|
+
server that ignores the request to exit, and the end of its input, runs on after that ZTC. In ML mode, ZTC's ML helper
|
|
2978
|
+
(`ztc-ml`) opens the files the ML tools name, which the profile checks as above, and, for `ml_train`, the
|
|
2979
|
+
`events.jsonl` and `session.json` in the folder it names, which it opens itself, following a link there.
|
|
2894
2980
|
- The file tools check what they opened, but a unified diff, which `git apply` writes, and `search`, which runs
|
|
2895
2981
|
ripgrep, open files themselves.
|
|
2896
2982
|
- Git in a workspace a sandboxed command writes:
|
package/bin/zmux-darwin-arm64
CHANGED
|
Binary file
|
package/bin/zmux-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/ztc-tui-darwin-arm64
CHANGED
|
Binary file
|
package/bin/ztc-tui-linux-x64
CHANGED
|
Binary file
|
package/bin/zterm-darwin-arm64
CHANGED
|
@@ -128,17 +128,18 @@ export declare class ZRouterStreamBackend implements AgentBackend {
|
|
|
128
128
|
* (promptCacheTtl, as AnthropicBackend reads it, whose requests then carry no cache_control), for a route whose every
|
|
129
129
|
* provider is Anthropic. Router's translation to Anthropic's Messages API caches a system prompt of 1024 characters or
|
|
130
130
|
* more unless the body says so, and records a request carrying cache_control without a price, which a dollar limit
|
|
131
|
-
* counts at its whole hold.
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
131
|
+
* counts at its whole hold. A route plan of the turn's own that can fall back to another provider's model doesn't ask:
|
|
132
|
+
* a Router older than #903 handed that model's API the body as it came, the field included. Since #903 Router drops the
|
|
133
|
+
* field before any upstream, so a turn with no plan of its own asks and names no route, and the deck's or the
|
|
134
|
+
* workspace's stored plan, which ZTC can't see, applies as it does to any turn. Never on a Router and account that
|
|
135
|
+
* refused the field (refusedPromptCache).
|
|
135
136
|
*/
|
|
136
137
|
private asksNoPromptCache;
|
|
137
138
|
/**
|
|
138
|
-
* Whether Router refused REQUEST, whose body asked for no prompt cache, for a field its account doesn't take, as
|
|
139
|
-
* service-account key's allowlist
|
|
140
|
-
*
|
|
141
|
-
*
|
|
139
|
+
* Whether Router refused REQUEST, whose body asked for no prompt cache, for a field its account doesn't take, as an
|
|
140
|
+
* older Router's service-account key's allowlist refused prompt_cache: then that Router and account get the field no
|
|
141
|
+
* more (promptCacheRefused), which the runtime diagnostics say once, and the caller sends the request once more without
|
|
142
|
+
* it.
|
|
142
143
|
*/
|
|
143
144
|
private refusedPromptCache;
|
|
144
145
|
/**
|