Skip to content

fix: close H8 batch-approval classifyToolCall gaps and Telegram class-trust guard (M-1)#55

Merged
jkyberneees merged 1 commit into
mainfrom
fix/h8-batch-classify
Jul 18, 2026
Merged

fix: close H8 batch-approval classifyToolCall gaps and Telegram class-trust guard (M-1)#55
jkyberneees merged 1 commit into
mainfrom
fix/h8-batch-classify

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

This PR closes H8 and the Telegram half of M-1 from the security roadmap.

H8 — Batch approval card hides parallel_shell / batch_patch / browser payloads

  • internal/loop/loop.go::classifyToolCall now understands:
    • parallel_shell — walks the commands array, classifies every command, and surfaces all commands in the batch card.
    • batch_patch — walks the patches array, classifies every path, and surfaces all paths.
    • browser — recognises the modern single-tool schema (action + url) instead of the dead browser_navigate/browser_click cases.
  • The batch card no longer truncates commands/paths at 120 characters, so the user sees the full payload before approving.
  • If any tool in the iteration is unclassifiable by classifyToolCall, the loop no longer calls SetTrustAll(true) after the batch approval. Those tools must be approved individually by their own internal gates instead of getting a free pass.

M-1 — Telegram class-trust guard

  • internal/telegram/approver.go now hides the "Trust Session" button for destructive, blocked, unknown, and the synthetic tool_batch class.
  • A trust callback for any of those classes is treated as a denial, matching the TTY/Web approver policy and preventing a single batch approval from blanket-authorizing later destructive operations.

Tests & docs

  • Added regression tests for the new classifyToolCall cases and the Telegram trust guard.
  • Updated AGENTS.md and docs/SECURITY.md to document the new behavior.

…-trust guard (M-1)

- classifyToolCall now handles parallel_shell commands, batch_patch paths, and the modern browser tool.

- Batch approval card lists every classified command/path and shows full text instead of truncating.

- Iterations containing unclassifiable tools no longer receive blanket SetTrustAll.

- Telegram approver hides Trust Session for destructive/blocked/unknown/tool_batch and denies trust callbacks for those classes.

- Update AGENTS.md and docs/SECURITY.md; add regression tests.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 81565ab Commit Preview URL

Branch Preview URL
Jul 18 2026, 11:58 AM

@jkyberneees
jkyberneees merged commit 5e28ca9 into main Jul 18, 2026
7 checks passed
@jkyberneees
jkyberneees deleted the fix/h8-batch-classify branch July 18, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant