Auto Mode Gate v0.4.0
Version 0.4.0 adds persistent global controls for the Pi permission judge while preserving deterministic-first, fail-closed enforcement.
Added
Pi judge controls
- Open the native control menu with
/amg-judgein TUI mode. - Search available models by provider, model ID, or display name.
- Choose only thinking levels supported by the selected model.
- Use direct
status,on,off,model,thinking, andresetcommands in TUI and RPC workflows. - Toggle Auto with
Ctrl+Alt+Aand open the menu withCtrl+Alt+Gby default. - See requested and effective Auto state in Pi's status area.
Persistent global preferences
- Save requested Auto state, judge model, thinking, and shortcuts under Pi's global configuration root.
- Restore those preferences in new sessions without granting judge authorization or overriding project restrictions.
- Keep preferences separate from policy, session JSONL, and sanitized decision logs.
Explicit judge thinking
- Apply explicit thinking through Pi 0.84.2's public provider transport and exact model authentication.
- Keep
inheriton the verified model-registry path. - Leave Pi's primary conversation model and thinking level unchanged.
Changed
- Separate requested Auto, model, and thinking from their effective state.
- Turn effective Auto off when authorization, project policy, model scope, model availability, or thinking support is missing.
- Update the public status contract with requested/effective authorization, model, and thinking fields.
- Expand the documentation site with a dedicated Pi judge controls guide.
Fixed and hardened
- Publish complete preference snapshots with temporary-file verification, flush, and atomic replacement.
- Preserve the previous session state when a preference write fails.
- Reject unsupported thinking levels instead of substituting another level.
- Keep each eligible decision to one isolated request with no tools, no history, no retries, host cancellation, and a local deadline.
- Check generated documentation routes, the search index, and the custom 404 before Pages deployment.
Upgrade from 0.3.0
Update the package reference to auto-mode-gate@0.4.0. Existing host-owned policy files and the 0.3.0 migration contract remain unchanged.
Persistent Pi controls and explicit judge thinking require Pi 0.84.2. After upgrading, run /amg-judge status to inspect requested and effective state. Run /reload or restart Pi after changing shortcut values.
Compatibility
- OpenCode 1.18.18 remains the validated plugin baseline and continues to block eligible judge cases as unavailable.
- Pi 0.84.2 is the validated baseline for persistent controls and explicit thinking.
- Node 24.9.0 remains the test baseline.
PermissionJudgeSessionStatuskeeps its previous fields and adds required requested/effective authorization, model, and thinking fields. TypeScript consumers that construct status literals must supply the expanded shape.
Verification
- 246 tests passed on Windows and Ubuntu.
- TypeScript 5.9.3 strict checking passed with the validated Node type baseline.
- CI, Pages, and CodeQL passed on release commit
985b4c8. - The npm package contains 22 public files and no bundled dependencies.
- The npm tarball and GitHub asset match byte for byte.
- The Astro/Starlight wiki builds 12 pages and passed live desktop, mobile, and 404 checks.
- Independent release-readiness, contract, and documentation reviews found no remaining blocker or high-severity issue.
Install
pi install npm:auto-mode-gate@0.4.0
For OpenCode, use auto-mode-gate@0.4.0 in the plugin array. See the installation guide for npm and checkout-based setup.
Downloads
auto-mode-gate-0.4.0.tgzSHA256SUMS.txt- SHA-256:
ef4517e9656f7ca92cca9f8b12ad6220a6fa4ef481be181081206bcdef26a6a7
Known limits
- Auto Mode Gate covers calls through the validated pre-tool hooks and does not replace native host permissions.
- OpenCode 1.18.18 has no verified isolated judge transport.
- Pi shortcut changes require
/reloador restart, and Pi may warn about non-reserved collisions with another extension. - Automatic 0.2.0 policy migration requires same-filesystem hard-link support; unsupported filesystems require manual no-clobber migration.