diff --git a/extensions/ext-toggle.ts b/extensions/ext-toggle.ts index 3cc084d..0ffe385 100644 --- a/extensions/ext-toggle.ts +++ b/extensions/ext-toggle.ts @@ -58,6 +58,18 @@ const DISABLE_GUARDS: Record string | null> = { if (!hasSshFlag) return null; return "Active --ssh session — disabling would silently revert read/write/edit/bash to local. Exit pi and relaunch without --ssh."; }, + // ext-toggle owns the /ext slash command. Disabling it removes the + // only TUI surface for re-enabling itself: pi auto-discovers `*.ts` + // only, so once renamed to `.ts.off` the file is invisible to pi and + // the next /reload silently drops the command. The disabled state + // also persists — in containerized setups (opencode-devbox) the + // ~/.pi volume keeps the `.ts.off` rename across container recreate, + // so even nuking the container doesn't recover the surface. Recovery + // path is manual: shell into the container (or open a host shell), + // run `mv ~/.pi/agent/extensions/ext-toggle.ts.off \ + // ~/.pi/agent/extensions/ext-toggle.ts`, then /reload. + "ext-toggle": () => + "Disabling ext-toggle would remove the /ext command itself — only manual `mv ~/.pi/agent/extensions/ext-toggle.ts.off ~/.pi/agent/extensions/ext-toggle.ts` recovers it. Refusing.", }; // ── Filesystem helpers ────────────────────────────────────────────────────────