Scope of protections
Local operation
Discovery, recommendation, task breakdown, and compilation run in local Node.js processes. The recommender is deterministic and does not call a remote AI service. Approved prompts are delivered through your existing agent session, which reuses that agent’s authentication, model, and permissions. The OpenCode adapter can talk to a local OpenCode server (serverUrl or OPENCODE_SERVER_URL) to dispatch into the active session.
Zero dependencies
package.json declares no runtime dependencies and requires Node.js 20 or later. The codebase is plain ESM plus a single-file HTML UI, so you can audit it directly.
Pre-approval blocking
Hooks match prompts against^(?:\/(?:e|d)ispatch|(?:e|d)ispatch:)\s*(.+)$ (case-insensitive). On a match:
- Codex and Claude Code: the
UserPromptSubmithook returns{ "decision": "block", "reason": "..." }and, unlessEISPATCH_NO_SPAWN=1is set, starts the Local Composer. - OpenCode (experimental): the
chat.messagehook replacesoutput.partswith a notice that contains the composer URL, so the original task text is not passed on in that message. - Antigravity: the
PreInvocationhook captures the prompt before task execution.
EISPATCH_AUTO_INTERCEPT=1 makes the Codex, Claude Code, and OpenCode hooks intercept every prompt, not only prefixed ones.
Prompts that contain <!-- DISPATCH_COMPILED_PROMPT pass through unchanged. This prevents loops when an approved prompt is pasted or dispatched back into the agent.
How reliably a host honors a hook’s block decision depends on the host. EISPATCH cannot stop a prompt that bypasses the hook (for example, if the hook is not installed or the host is configured to skip it).
Local Composer hardening
The Local Composer (core/local-composer.mjs) is used by Codex, Claude Code, and OpenCode.
- Loopback only: binds to
127.0.0.1on an ephemeral port. - Host header check: every request must use
Host: 127.0.0.1:<port>orlocalhost:<port>, otherwise 403. - Same-origin checks on
/api/*: ifOriginorRefereris present, it must point to the same loopback origin, otherwise 403. - Session token on
/api/*: a random per-session token is injected into the page aswindow.__EISPATCH_LOCAL_SESSION__and must be sent asX-EISPATCH-Token. A missing or wrong token returns 401. - Body size limit: request bodies over 5 MB are rejected (returned as a 500 error).
- Response headers:
Cache-Control: no-store,X-Content-Type-Options: nosniff, andX-Frame-Options: DENY. - Idle timeout: the launcher used by the Codex and Claude Code hooks closes the server after 30 minutes without requests (configurable with
--idle-ms). The timer resets on every request. The server started by the OpenCode plugin has no idle timeout; it is replaced when the next intercepted prompt starts a new composer.
Approval integrity (Local Composer only)
The SHA-256 approval binding applies only to the Local Composer. The Antigravity MCP App tracks approval in the composer UI and dispatches withapp.sendMessage(); it does not issue approval tokens or compute a prompt hash.
In the Local Composer:
POST /api/approvestores a random approval token and the SHA-256 hash of the exact compiled prompt. Only one approval is active at a time.POST /api/compose,/api/breakdown, and/api/compileclear the active approval.POST /api/revoke-approvalclears it and marks the token as consumed.POST /api/dispatchchecks the token and hash, then consumes the token before delivering the prompt.
Secret handling during discovery
sanitizeMetadataText in core/schema.mjs redacts the following from capability descriptions and saved instructions:
http(s)://andws(s)://URLsBearertokensapi_key,token,secret,password,passwd, andauthassignments- Common key formats (
sk-...,ghp_...style GitHub tokens,AIza...)
Library storage
The Prompt Library is stored at~/.eispatch/library.json:
- The
~/.eispatch/directory is created with mode0700if it does not exist. - The library is written to a temporary file with mode
0600and renamed into place. library.json.lockserializes writes. A writer waits up to 3 seconds for the lock; a lock older than 10 seconds is treated as stale.- Saved and imported entries pass descriptions and instructions through the same redaction.
- Entries do not include approval tokens or prompt hashes.
Installers and uninstallers
Installers register EISPATCH hooks, MCP servers, skills, or plugins. Each installer supports--check and --uninstall; the uninstaller removes only EISPATCH-owned entries and preserves other settings.
Advisory capability labels
Selected capabilities are labeled advisory guidance unless a capability is markedenforceable by an active host-level PreToolUse or BeforeToolSelection enforcement hook. Advisory capabilities are instructions in the prompt; whether the model follows them is up to the model. See Capabilities.
Reporting a security issue
Emailframewireio@gmail.com with a description, steps to reproduce, and relevant logs. Do not open a public issue for undisclosed vulnerabilities.