tunnel-policy

Reviewed at commit b468b10

MIDDLEWARE TUNNEL stage 3: Policy: allows everything harmless; denies a matching rule

Made by
ucsandman
What we checked

A small demo of stacked tool-call handlers: for Bash commands containing the word "tunnel", it logs the call and blocks it if it also contains "format c:"; otherwise it lets it through. It reads no files, runs no programs and makes no network calls.

Review details

Static review of the source at the pinned commit; not run. Registers one handler, on('tool.call', { tool: 'Bash', command: /tunnel/i }). It logs the first 60 characters of the command via $.ui.log, returns { deny: 'tunnel policy: no' } when the command matches /format c:/i, and otherwise awaits next(e) and returns the result unchanged with a timing log. It never fires for Bash commands without the word "tunnel". No store, fs, process, env, network or model calls. It is stage 3 of a four-stage demo meant to be loaded together.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: no
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: no
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for tunnel-policy

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/tunnel-policy.svg)](https://modsforclaude.com/mods/tunnel-policy/)

← All mods