Skip to content

Add agy as an external pstack-runner provider - #31

Draft
realtime3392 wants to merge 2 commits into
ericlitman:mainfrom
realtime3392:feat/agy-external-provider
Draft

Add agy as an external pstack-runner provider#31
realtime3392 wants to merge 2 commits into
ericlitman:mainfrom
realtime3392:feat/agy-external-provider

Conversation

@realtime3392

Copy link
Copy Markdown

What changed

pstack-runner accepts --provider agy from a Claude Code or Codex
parent. The lane preflights agy models, invokes print mode once,
maps read-only to --mode plan --sandbox, maps isolated-write to
--mode accept-edits --sandbox --disable-slash-commands, and never
passes --dangerously-skip-permissions. Agy --effort is
low|medium|high; xhigh and max pin to high. Receipts use
Codex-style pinned-argv because Agy JSON does not report a served
model id.

Agy is not a parent harness and is not a fifth first-run matrix
family. The four-model panel stays Fable, Sol, Grok, and Opus. The
portable slug is agy:gemini-3.1-pro-high@high.

Commits:

  • feat(pstack): add agy as an external pstack-runner provider
  • docs(pstack): document the agy external runner lane

Verification

  • Bun tests, strict typecheck, static invariants, and plugin
    validation pass.
  • The exact candidate is installed in every affected harness.
  • The changed behavior passes from each real user surface.
  • The installed version, action, and observed result appear below.

Live evidence:

  • Installed version: branch feat/agy-external-provider in a local
    clone of open-pstack (f9e5811), runner at
    plugins/pstack/skills/poteto-mode/scripts/runner/pstack-runner.
    Child CLI: agy 1.1.19 at /usr/local/bin/agy.
  • Surface: headless pstack-runner from the shell, parent claude,
    provider agy. Not yet installed into Claude Code or Codex plugin
    surfaces.
  • Action:
pstack-runner --parent claude --provider agy \
  --model gemini-3.7-flash-low --effort low --mode read-only \
  --prompt /tmp/agy-pstack-smoke/prompt.md \
  --cwd /tmp/agy-pstack-smoke \
  --output /tmp/agy-pstack-smoke/output.md \
  --receipt /tmp/agy-pstack-smoke/receipt.json
  • Observed: exit 0, output pong, receipt status: complete,
    modelEvidence: pinned-argv, preflight passed, argv used
    --mode plan --sandbox and --print-timeout 8760h. No
    --dangerously-skip-permissions.

Also: 162 Bun tests, strict typecheck, PSTACK_STATIC_ONLY=1
tests/skill-collision-repro.sh, and
grok plugin validate plugins/pstack.

This stays a draft until the candidate is installed and the lane is
run from Claude Code and from Codex.

A pull request without live evidence remains a draft. Do not merge,
tag, release, or roll it out.

pstack-runner can now launch one Agy print-mode child with the same
preflight, receipt, and no-fallback contract as Grok. Agy stays
provider-only. xhigh and max pin to high. JSON receipts use
pinned-argv because the CLI does not report a served model id.
Record Agy on the parent route table and in External lanes without
adding a fifth first-run matrix family. Setup and the four-model
panel stay Fable, Sol, Grok, and Opus.
@greptile-apps

greptile-apps Bot commented Aug 30, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds Agy as an external runner provider while keeping Claude Code and Codex as the only parent harnesses.

  • Adds Agy CLI parsing, preflight model detection, command construction, output normalization, and pinned-argv receipt evidence.
  • Maps runner access and effort levels to Agy-compatible flags without enabling permission bypasses.
  • Extends tests and provider documentation for authentication, model availability, execution, and receipts.

Confidence Score: 5/5

The reviewed implementation appears safe to merge once the draft PR’s stated real-surface verification requirement is completed.

The Agy lane is consistently wired through provider validation, preflight, invocation, parsing, failure handling, receipts, tests, and documentation, with no concrete changed-code defect remaining.

Important Files Changed

Filename Overview
plugins/pstack/skills/poteto-mode/scripts/runner/commands.ts Adds Agy preflight and invocation arguments, including access-mode and effort mappings.
plugins/pstack/skills/poteto-mode/scripts/runner/run.ts Integrates Agy model-list validation, failure classification, and pinned-argv model evidence.
plugins/pstack/skills/poteto-mode/scripts/runner/parse-output.ts Normalizes Agy’s JSON response, session identifier, and token usage into the runner receipt format.
plugins/pstack/skills/poteto-mode/scripts/runner/types.ts Extends the external provider type and CLI validation universe with Agy.
plugins/pstack/skills/poteto-mode/scripts/runner/run.test.ts Covers Agy execution, receipts, authentication failure, unavailable models, and environment handling.
plugins/pstack/skills/poteto-mode/references/provider-dispatch.md Documents Agy routing, sandbox mappings, preflight behavior, effort normalization, and receipt requirements.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  P[Claude Code or Codex parent] --> R[pstack-runner]
  R --> F[agy models preflight]
  F -->|authenticated and model listed| M{Access mode}
  F -->|sign-in required| U[Unauthenticated receipt]
  F -->|model absent| A[Unavailable-model receipt]
  M -->|read-only| RO[agy --mode plan --sandbox]
  M -->|isolated-write| IW[agy --mode accept-edits --sandbox --disable-slash-commands]
  RO --> J[Parse Agy JSON result]
  IW --> J
  J --> C[Complete receipt with pinned-argv evidence]
Loading

Reviews (1): Last reviewed commit: "docs(pstack): document the agy external ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant