Repository navigation
tole v0.7.1
Scan-gate hardening, tool-call authorization gate, SSRF and approval-prompt fixes.
Changed
- Approval prompts now show control characters, bidi overrides and line separators in tool descriptions as visible escapes (shared sanitizer in ToolRegistry::decide) (#327).
- Unknown-tool aborts (fresh and guarded replay) now settle the turn to
Finallike every other abort (#316). A baretole resume <id>after one reports "nothing to resume"; send a new prompt instead. The Tier 1 abort-path contract moved from "parks at Planning, resume continues" to "settles to Final, next prompt continues". serveapproval-resume now honors/cancel, andBudgetExhaustedmaps tomax_tokensthere too (#318).- Tool specs sent to the provider now use a static
Tool::summary()(defaulted method) instead ofdescribe(Null); git and systemone were being advertised with validation error strings (#320). - The MCP server path (
RegistryServer::execute_checked) now authorizes tool
calls through the same crate-internal gate asdrive/resume_turn.
Behavior change forRegistryServer::newembedders: pre-hooks configured on
an embedder-supplied registry are now enforced there (a configured deny-hook
must not be bypassable on one path). No in-repo face is affected, since
none can attach pre-hooks. Destructive refusal and error strings are
unchanged (#303, part 3 of 3). - Internal refactor, no behavior change:
driveandresume_turnnow share
one crate-internal tool-call authorization gate (gate.rs) with a typed
denial and aPermitrequired to execute non-ReadOnly tools; tool risk is
read once per call. Durable entry shapes and error strings are unchanged
(#303, part 2 of 3). - Behavior change:
agent_pollis nowRisk::Write(a successful poll
consumes the mailbox: it writesmeta.jsonand forgets mailbox memories),
matching the rule that a ReadOnly poll never mutates.--trust internal
allowlists the exact nameagent_poll, so poll loops stay prompt-free and
agent_startstill prompts; users on theread_onlypreset who approved
agent_startare now prompted on everyagent_poll; plan mode drops it
together withagent_start(#300).
Fixed
- Security: server-supplied text is sanitized before it reaches MCP approval
prompts (#286); the subprocess env scrubber matches SECRET/TOKEN/
PASSWORD/API_KEY-shaped names by substring (#284,TOKENIZERS_PARALLELISM
kept); memoryrecallpasses the query after--(#280); a failed or
timed-out request-body read on the MCP HTTP face is a 400, not an empty
body (#277); MCP registration sync waits longer than the serial reactor's
worst-case queueing (#285). - Redirects:
web_fetchresolves relativeLocations per RFC 3986 against
the current hop and refuses non-http(s) hops (#281). gitrejects NUL bytes in argv with a clear error (#282).- Behavior change:
AllowlistApprover::new(patterns, Deny|Ask)now
ignorespatterns— the default verdict is final (fail closed). Embedders
that usednew(p, Deny)as an allowlist must useallow_only(p)(#283). - Behavior change: the
web_fetchSSRF guard now also refuses 100.64.0.0/10
(CGNAT / Tailscale-style overlay networks), 0.0.0.0/8, 192.0.0.0/24,
198.18.0.0/15, multicast (224.0.0.0/4, ff00::/8), reserved 240.0.0.0/4,
site-local fec0::/10, and 6to4/Teredo addresses that embed a private IPv4.
Fetching a host on a tailnet now requiresTOLE_WEB_ALLOW_PRIVATE=1(#317). tole acp: a hanging/modelsendpoint no longer re-stalls every
session/new(probe wait 60 s → 5 s, failures cached for 30 s, probe runs
before the sessions lock is taken) (#319).chatregisters and hydratestodo_read/todo_write(#276); an agent
mailbox is marked consumed only after a successful recall (#287).- Tests: the perf
resume_replaygate actually replays 25 tool calls and
asserts it (#278);turn_looptemp dirs are unique per call (#279).
Architecture-review follow-ups (#293–#299):
- The
ghtool is registered only when a GitHub origin is detected; the
hardcodedcodecoradev/tolefallback on the run/chat/resume/mission and
tole mcpfaces is gone (#293). tole serve --transport mcphonors--plan-modein its server-level
registry (only ReadOnly tools remain) (#294).- One session-id rule everywhere:
[A-Za-z0-9_-], at most 64 bytes
(tole_core::storage::is_valid_session_id); an id accepted by serve/ACP
is no longer rejected bytole chat --resume/tole status(#295). tole acpcaps live sessions at 256 with non-busy eviction (shared helper
with serve and the MCP session tools) and prunes the approval state of
evicted sessions (#299).