Skip to content

Releases: Yivas/auto-mode-gate

Auto Mode Gate v0.4.0

Choose a tag to compare

@Yivas Yivas released this 20 Aug 15:17

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-judge in 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, and reset commands in TUI and RPC workflows.
  • Toggle Auto with Ctrl+Alt+A and open the menu with Ctrl+Alt+G by 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 inherit on 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.
  • PermissionJudgeSessionStatus keeps 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

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 /reload or 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.

Full changelog

See all changes from v0.3.0 to v0.4.0.

Auto Mode Gate v0.3.0

Choose a tag to compare

@Yivas Yivas released this 20 Aug 00:26

Version 0.3.0 gives OpenCode and Pi separate policy files while keeping one npm package and the same fail-closed permission core.

Highlights

  • OpenCode reads global and project policy from its own configuration roots.
  • Pi reads global and project policy from its own agent and project roots.
  • Valid shared 0.2.0 configuration migrates byte for byte when the host-owned destination is absent.
  • Migration publishes through an exclusive same-filesystem hard link, never overwrites a destination, and never deletes the legacy source.
  • Invalid roots, files, symlinks, non-regular entries, races, I/O failures, and unsupported publication fail closed.
  • The public guide covers automatic and manual migration, isolation checks, cleanup, rollback, remigration, and troubleshooting.

Upgrade from 0.2.0

Keep the shared legacy file until every host you use has created and passed verification of its own destination. If automatic publication is unavailable, copy manually with create-only or no-clobber semantics. Version 0.2.0 ignores host-owned files, so retain or restore the legacy file before rolling back.

Compatibility

  • OpenCode 1.18.18 remains the validated plugin baseline.
  • Pi 0.84.1 remains the validated deterministic adapter baseline.
  • Pi 0.84.2 remains the isolated loopback baseline for the permission-judge transport.
  • Node 24.9.0 remains the test baseline.

The release preserves the 0.2.0 Pi judge behavior and OpenCode's fail-closed unavailable result for eligible judge cases.

Verification

  • 219 tests passed on Windows and Ubuntu.
  • TypeScript 5.9.3 strict checking passed.
  • The npm package contains 20 public files and no bundled dependencies.
  • The Astro/Starlight wiki built 11 pages with link and 404 checks.
  • Temporary OpenCode and Pi profiles completed migration, startup, isolation, and removal without modifying active profiles.

Known limits

  • Auto Mode Gate covers only calls through the validated pre-tool hooks and does not replace native host permissions.
  • Automatic migration requires same-filesystem hard-link support; unsupported filesystems require manual no-clobber migration.
  • The filesystem checks do not protect against a local attacker who can replace ancestor directories during a race.
  • No real-model inference was used for the permission-judge validation.

Auto Mode Gate v0.2.0

Choose a tag to compare

@Yivas Yivas released this 17 Aug 22:14

Version 0.2.0 adds an opt-in Pi permission judge after the deterministic policy. OpenCode keeps eligible unresolved actions blocked because its validated baseline has no equivalent isolated transport.

Highlights

  • Session-scoped /amg-judge controls; every Pi session starts off.
  • Configurable Pi model selected without changing the primary model or writing session state.
  • Closed sanitized requests for eligible Git diff, log, show, and status actions.
  • One isolated model call with no history, tools: [], maxRetries: 0, cancellation, and a local monotonic deadline.
  • Strict canonical response validation and fail-closed handling for malformed output, tool calls, timeouts, provider errors, and late completion.
  • Protected host argument snapshots so later pre-tool handlers cannot replace an approved command.
  • Global authorization with project configuration limited to disabling the judge or reducing its timeout.

Compatibility

  • OpenCode 1.18.18: deterministic policy; eligible judge cases block as unavailable.
  • Pi 0.84.1: validated deterministic adapter baseline.
  • Pi 0.84.2: validated permission-judge API and isolated loopback transport baseline.
  • Node 24.9.0: test baseline.

The Pi transport was validated with a loopback server and local doubles. No real-model inference was used, and no broader provider compatibility is claimed.

Install

OpenCode:

opencode plugin auto-mode-gate@0.2.0 --global

Pi:

pi install npm:auto-mode-gate@0.2.0

Review the package source before installation. Host plugins and extensions run with the user's system permissions.

Upgrade notes

Version 0.1.0 remains deterministic-only. Judge configuration requires 0.2.0. Enabling the judge requires global permissionJudge authorization and /amg-judge on in each Pi session.

Known limits

  • Auto Mode Gate covers only calls through the validated pre-tool hooks.
  • The judge handles only closed, simple Git candidates; all other ambiguity blocks.
  • Trusted executable paths are configuration authority, not immutable file handles.
  • Auto Mode Gate is not an operating-system sandbox and does not replace native host permissions.

Auto Mode Gate v0.1.0

Choose a tag to compare

@Yivas Yivas released this 16 Aug 19:51

First public release of the deterministic permission gate for OpenCode and Pi.

Highlights

  • Shared host-neutral policy core with stable structured denial codes.
  • Conservative Bash, PowerShell, and CMD analysis without command execution.
  • Fail-closed OpenCode and Pi pre-tool adapters.
  • Strict global and project configuration that project files cannot relax.
  • Optional sanitized JSONL decision logs.
  • npm, GitHub, and source-checkout installation paths.

Validated baselines

  • OpenCode 1.18.18
  • Pi 0.84.1
  • Node 24.9.0 for the test suite

Install

OpenCode:

opencode plugin auto-mode-gate@0.1.0 --global

Pi:

pi install npm:auto-mode-gate@0.1.0

Review the package source before installation. Host plugins and extensions run with the user's system permissions.

Known limits

  • V1 blocks ambiguous actions and does not invoke a model judge.
  • Only calls through the validated pre-tool hooks are covered.
  • Trusted executable paths are configuration authority, not immutable file handles.
  • Auto Mode Gate is not an operating-system sandbox and does not replace native host permissions.