Skip to content

Auto Mode Gate v0.2.0

Choose a tag to compare

@Yivas Yivas released this 17 Aug 22:14
· 13 commits to main since this release

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.