MCPcopy
hub / github.com/garrytan/gstack / isWriteInvocation

Function isWriteInvocation

browse/src/server.ts:734–736  ·  view source on GitHub ↗

* Whether an invocation should be treated as a WRITE for capability gating * (scope, watch-mode block, tab ownership, tunnel). A command is a write if it * mutates state (`WRITE_COMMANDS`) OR it carries an `--out` flag — `js`/`eval * --out` writes the evaluate result to local disk, so the capabil

(command: string, args: string[])

Source from the content-addressed store, hash-verified

732 * security gates consult this.
733 */
734function isWriteInvocation(command: string, args: string[]): boolean {
735 return WRITE_COMMANDS.has(command) || hasOutArg(args);
736}
737
738// ─── Inspector State (in-memory) ──────────────────────────────
739let inspectorData: InspectorResult | null = null;

Callers 1

Calls 1

hasOutArgFunction · 0.90

Tested by

no test coverage detected