From 17b5d31110dd1addd340fee879e0b4bed690162f Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 6 Nov 2026 11:56:35 -0600 Subject: [PATCH 1/4] feat(runner): give Amp an opted-in writer Measured Amp CLI 0.0.1792123242-g03edc7 through the runner in a linked worktree under the home directory: its edit tool and shell wrote outside the worktree, so Amp supports isolated-write-full-access only. The writer's settings enable and allow the edit tools and the shell. Refs #269 Co-Authored-By: Claude Opus 5.5 --- CHANGES.md | 4 ++ .../poteto-mode/references/model-catalog.md | 4 +- .../scripts/runner/providers/amp.test.ts | 15 +++++- .../scripts/runner/providers/amp.ts | 49 ++++++++++--------- .../scripts/runner/registry.test.ts | 8 +-- .../poteto-mode/scripts/runner/run.test.ts | 2 +- 6 files changed, 49 insertions(+), 33 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index ad376c00..434ae3eb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,10 @@ Open Pstack lands on green: Mergify merges a ready PR to main once verify and exact-head live-gate pass and no review thread is unresolved, and a workflow resolves Unfret's own threads. A PR that touches `.github/` or the Mergify config also waits for Unfret, and workflow changes require operator queueing. This port applies the Cursor → Claude Code substitutions in skill bodies. Earlier drafts left them flagged; this revision resolves them. A later pass added a Codex build that shares the same skills; see [Codex port](#codex-port) below. +## Unreleased + +**Amp writer (#269).** Amp's writer was measured on Amp CLI 0.0.1792123242-g03edc7: its edit tool and shell wrote outside the lane's worktree, including into the main repository's shared `.git`, a home directory and `/tmp`, so an Amp writer runs only when the model sheet holds `amp writer sandbox: full-access`. Its settings then enable the edit tools and the shell, and every other tool stays rejected. A bounded `isolated-write` Amp lane is refused before launch. + ## 1.19.0 adds T3 Code as a third harness Open Pstack 1.19.0 keeps the Cursor pstack 0.15.36 sync. Default roles and panels are unchanged. diff --git a/plugins/pstack/skills/poteto-mode/references/model-catalog.md b/plugins/pstack/skills/poteto-mode/references/model-catalog.md index 38318507..000ff945 100644 --- a/plugins/pstack/skills/poteto-mode/references/model-catalog.md +++ b/plugins/pstack/skills/poteto-mode/references/model-catalog.md @@ -71,7 +71,7 @@ Rolling aliases: | devin | external runner | external runner | `read-only`, `isolated-write`, `isolated-write-full-access` | file | provider report | allowlist | - | | opencode | external runner | external runner | `read-only`, `isolated-write-full-access` | stdin | pinned argv | allowlist | - | | dsh | external runner | external runner | `read-only`, `isolated-write` | stdin | pinned argv | allowlist | dsh 0.2.1-rc.2 exactly | -| amp | external runner | external runner | `read-only` | stdin | pinned argv | allowlist | - | +| amp | external runner | external runner | `read-only`, `isolated-write-full-access` | stdin | pinned argv | allowlist | - | | agy | external runner | external runner | `read-only`, `isolated-write-full-access` | stdin | pinned argv | allowlist | - | | cursor | external runner | external runner | `read-only`, `isolated-write-full-access` | stdin | pinned argv | allowlist | - | | muse | external runner | external runner | `read-only`, `isolated-write-full-access` | file | pinned argv | allowlist | - | @@ -164,7 +164,7 @@ The runner refuses an access mode outside a provider's Access modes cell before - State paths: `~/.local/share/amp/` (the login in `secrets.json`, accounts, session and recent threads) and `~/.cache/amp/` (logs, downloaded plugins and skills). - Child environment: only `PATH` `HOME` `USER` `LOGNAME` `SHELL` `TMPDIR` `LANG` `TERM` `COLORTERM` `TZ` `HTTP_PROXY` `HTTPS_PROXY` `NO_PROXY` `ALL_PROXY` `http_proxy` `https_proxy` `no_proxy` `all_proxy` `SSL_CERT_FILE` `SSL_CERT_DIR` `NODE_EXTRA_CA_CERTS` `AMP_API_KEY`, and variables starting with `LC_`, `XDG_`; sets `AMP_IGNORE_GUIDANCE_FILES=*`. - Effort is part of the model ID. The model is an official Amp agent mode, such as `deepseek-v4.1-flash`, from Amp's own `official-modes` plugin, which Amp serves to every user. Where a mode has effort variants, the variant is part of its name (for example `gpt-6-astra-low` to `gpt-6-astra-max`). An unregistered Amp model must be a mode name with the `default` effort. An unknown mode exits 1 with a generic error and ends `child-failed`/70. -- Read-only only. Amp has no OS sandbox and auto-approves its `ask` rules in execute mode, and a shell write escaped the cwd whenever the shell was allowed, so no Amp mode is a bounded writer. The runner refuses an `isolated-write` lane before launch. Amp has no opted-in writer (`isolated-write-full-access`) yet: its login had expired when the other providers' writers were measured on 2026-11-06, so no writer mapping was measured. +- No Amp writer is confined, so a writer needs the model sheet's opt-in (`isolated-write-full-access`); the runner refuses a bounded `isolated-write` lane before launch. An opted-in writer's settings also enable and allow `create_file`, `edit_file`, `apply_patch`, `shell_command` and `async_shell_command`, the name Amp checks a `shell_command` call against. `code_exec` and every other tool stay rejected. Measured with Amp CLI 0.0.1792123242-g03edc7 on macOS 27.0.1 in the built-in `smart` mode, whose tools are `apply_patch` and `shell_command`, in a linked worktree under the home directory, whose main repository and a sibling directory sat beside it: edits, shell writes and a Python run inside the worktree succeeded. The edit tool wrote into the sibling, the main checkout, through symlinks to both, `/tmp` and a home directory. The shell wrote into each of those, the main repository's shared `.git` and `$TMPDIR`. An edit into the shared `.git` and one into `$TMPDIR` never returned: the first raised a UI request that execute mode cannot answer, and both turns waited until they were cancelled. The account's official modes failed that day with a server `agentMode` validation error, so the measurement used `smart`. - A read-only lane is a run-owned `--settings-file` in its private `.provider/` directory (0700). It enables only the `Read` tool and rejects every other tool, which turns off the shell, edits, subagents, web tools, code execution, thread tools and `manage_amp`. It also turns off MCP servers, Claude Code and `~/.agents` skills, updates and notifications. The lane sets `AMP_IGNORE_GUIDANCE_FILES=*`, so `AGENTS.md` in the cwd and its parents does not load. `Read` can read any path on the host. Measured with Amp CLI 0.0.1792094445-g3475f5 and 0.0.1792123242-g03edc7. - Amp's own `official-modes` plugin supplies the pinned modes and runs its code in every lane. Amp serves and updates it with no version pin: its cache hash changed from `a1f1ef61c4dd011d` to `cb61cf1a7f4be96c` between 2026-10-15 and 2026-10-16. - System plugins in `$XDG_CONFIG_HOME/amp/plugins` or `~/.config/amp/plugins` load in every lane, and the lane keeps an inherited `XDG_CONFIG_HOME`. A plugin is Bun code that runs as the user, and Amp has no production switch that turns plugins off (`AMP_DISABLE_PLUGINS` is ignored outside development builds). Measured with Amp CLI 0.0.1792123242-g03edc7: a system plugin ran at import and in the `session.start`, `agent.start` and `agent.end` hooks. One that called `configuration.update` at startup rewrote the lane's settings file to enable every tool with an allow-all rule, after which the model had 29 tools and ran a shell write in the cwd. One that registered the key `deepseek-v4.1-flash` replaced the official mode's prompt and tools, while the argv still named that mode. diff --git a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.test.ts b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.test.ts index a3aa3571..b7d5763b 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.test.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.test.ts @@ -38,9 +38,20 @@ describe("amp launch", () => { expect(amp.launch.sidecar!.output).toBeNull(); }); - it("refuses an isolated-write lane and efforts the mode does not list", () => { + it("enables and allows the edit and shell tools only for an opted-in writer, and refuses a bounded writer and efforts the mode does not list", () => { + const writer = lane({ mode: "isolated-write", writerSandbox: "full-access" }); + const settings = JSON.parse(amp.launch.sidecar!.config!.content(writer)); + const tools = ["create_file", "edit_file", "apply_patch", "shell_command", "async_shell_command"]; + expect(settings["amp.tools.enable"]).toEqual(["Read", ...tools]); + expect(settings["amp.permissions"]).toEqual([ + { tool: "Read", action: "allow" }, + ...tools.map((tool) => ({ tool, action: "allow" })), + { tool: "code_exec", action: "reject" }, + { tool: "*", action: "reject" }, + ]); + expect(amp.launch.argv(writer, testFacts(amp))).toEqual(amp.launch.argv(lane(), testFacts(amp))); expect(() => lane({ mode: "isolated-write" })) - .toThrow("provider amp does not support isolated-write; it supports only: read-only"); + .toThrow("provider amp does not support isolated-write; it supports only: read-only, isolated-write-full-access"); expect(() => lane({ effort: "max" })).toThrow("effort max is not offered for amp:deepseek-v4.1-flash; choose one of: default"); }); diff --git a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts index 5447de7d..352353de 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts @@ -1,24 +1,30 @@ -import { adapter, type LaunchFacts, type ParseResult } from "../registry/contract.ts"; +import { type Access, adapter, type LaunchFacts, type ParseResult } from "../registry/contract.ts"; import type { NormalizedUsage } from "../types.ts"; import { BASE_ALLOWLIST, BASE_PREFIXES, normalizedUsage, nullableString, object, type JsonObject } from "./shared.ts"; -const LOCKDOWN = { - "amp.mcpServers": {}, - "amp.skills.disableClaudeCodeSkills": true, - "amp.skills.disableGlobalAgentsSkills": true, - "amp.tools.enable": ["Read"], - "amp.permissions": [ - { tool: "Read", action: "allow" }, - { tool: "create_file", action: "reject" }, - { tool: "edit_file", action: "reject" }, - { tool: "apply_patch", action: "reject" }, - { tool: "shell_command", action: "reject" }, - { tool: "code_exec", action: "reject" }, - { tool: "*", action: "reject" }, - ], - "amp.updates.mode": "disabled", - "amp.notifications.enabled": false, -}; +const EDITS = ["create_file", "edit_file", "apply_patch"]; +// `smart` lists `shell_command`, and Amp checks the call's permission as `async_shell_command`. +const SHELLS = ["shell_command", "async_shell_command"]; + +function lockdown(access: Access) { + const writer = access.mode === "isolated-write"; + return { + "amp.mcpServers": {}, + "amp.skills.disableClaudeCodeSkills": true, + "amp.skills.disableGlobalAgentsSkills": true, + "amp.tools.enable": writer ? ["Read", ...EDITS, ...SHELLS] : ["Read"], + "amp.permissions": [ + { tool: "Read", action: "allow" }, + ...(writer + ? [...EDITS, ...SHELLS].map((tool) => ({ tool, action: "allow" })) + : [...EDITS, "shell_command"].map((tool) => ({ tool, action: "reject" }))), + { tool: "code_exec", action: "reject" }, + { tool: "*", action: "reject" }, + ], + "amp.updates.mode": "disabled", + "amp.notifications.enabled": false, + }; +} // SIGINT and SIGTERM both exit 0 with this result error. const CANCELLED = "User cancelled (SIGINT/SIGTERM)"; @@ -92,9 +98,8 @@ export const amp = adapter({ }, launch: { prompt: "stdin", - sidecar: { output: null, config: { name: "settings.json", content: () => `${JSON.stringify(LOCKDOWN, null, 2)}\n` } }, - // No sandbox: a shell write escaped the cwd whenever the shell was allowed, so Amp has no bounded writer. - supports: ["read-only"], + sidecar: { output: null, config: { name: "settings.json", content: (lane) => `${JSON.stringify(lockdown(lane.access), null, 2)}\n` } }, + supports: ["read-only", "isolated-write-full-access"], needsSharedGitDir: () => false, argv: (lane, facts) => [ "-x", @@ -129,7 +134,7 @@ export const amp = adapter({ ], notes: [ "Effort is part of the model ID. The model is an official Amp agent mode, such as `deepseek-v4.1-flash`, from Amp's own `official-modes` plugin, which Amp serves to every user. Where a mode has effort variants, the variant is part of its name (for example `gpt-6-astra-low` to `gpt-6-astra-max`). An unregistered Amp model must be a mode name with the `default` effort. An unknown mode exits 1 with a generic error and ends `child-failed`/70.", - "Read-only only. Amp has no OS sandbox and auto-approves its `ask` rules in execute mode, and a shell write escaped the cwd whenever the shell was allowed, so no Amp mode is a bounded writer. The runner refuses an `isolated-write` lane before launch. Amp has no opted-in writer (`isolated-write-full-access`) yet: its login had expired when the other providers' writers were measured on 2026-11-06, so no writer mapping was measured.", + "No Amp writer is confined, so a writer needs the model sheet's opt-in (`isolated-write-full-access`); the runner refuses a bounded `isolated-write` lane before launch. An opted-in writer's settings also enable and allow `create_file`, `edit_file`, `apply_patch`, `shell_command` and `async_shell_command`, the name Amp checks a `shell_command` call against. `code_exec` and every other tool stay rejected. Measured with Amp CLI 0.0.1792123242-g03edc7 on macOS 27.0.1 in the built-in `smart` mode, whose tools are `apply_patch` and `shell_command`, in a linked worktree under the home directory, whose main repository and a sibling directory sat beside it: edits, shell writes and a Python run inside the worktree succeeded. The edit tool wrote into the sibling, the main checkout, through symlinks to both, `/tmp` and a home directory. The shell wrote into each of those, the main repository's shared `.git` and `$TMPDIR`. An edit into the shared `.git` and one into `$TMPDIR` never returned: the first raised a UI request that execute mode cannot answer, and both turns waited until they were cancelled. The account's official modes failed that day with a server `agentMode` validation error, so the measurement used `smart`.", "A read-only lane is a run-owned `--settings-file` in its private `.provider/` directory (0700). It enables only the `Read` tool and rejects every other tool, which turns off the shell, edits, subagents, web tools, code execution, thread tools and `manage_amp`. It also turns off MCP servers, Claude Code and `~/.agents` skills, updates and notifications. The lane sets `AMP_IGNORE_GUIDANCE_FILES=*`, so `AGENTS.md` in the cwd and its parents does not load. `Read` can read any path on the host. Measured with Amp CLI 0.0.1792094445-g3475f5 and 0.0.1792123242-g03edc7.", "Amp's own `official-modes` plugin supplies the pinned modes and runs its code in every lane. Amp serves and updates it with no version pin: its cache hash changed from `a1f1ef61c4dd011d` to `cb61cf1a7f4be96c` between 2026-10-15 and 2026-10-16.", "System plugins in `$XDG_CONFIG_HOME/amp/plugins` or `~/.config/amp/plugins` load in every lane, and the lane keeps an inherited `XDG_CONFIG_HOME`. A plugin is Bun code that runs as the user, and Amp has no production switch that turns plugins off (`AMP_DISABLE_PLUGINS` is ignored outside development builds). Measured with Amp CLI 0.0.1792123242-g03edc7: a system plugin ran at import and in the `session.start`, `agent.start` and `agent.end` hooks. One that called `configuration.update` at startup rewrote the lane's settings file to enable every tool with an allow-all rule, after which the model had 29 tools and ran a shell write in the cwd. One that registered the key `deepseek-v4.1-flash` replaced the official mode's prompt and tools, while the argv still named that mode.", diff --git a/plugins/pstack/skills/poteto-mode/scripts/runner/registry.test.ts b/plugins/pstack/skills/poteto-mode/scripts/runner/registry.test.ts index adcbb128..3e5c749b 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/runner/registry.test.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/runner/registry.test.ts @@ -299,13 +299,11 @@ describe("hand-written dispatch and setup rules", () => { devin: "read-only, isolated-write, isolated-write-full-access", opencode: "read-only, isolated-write-full-access", dsh: "read-only, isolated-write", - amp: "read-only", + amp: "read-only, isolated-write-full-access", agy: "read-only, isolated-write-full-access", cursor: "read-only, isolated-write-full-access", muse: "read-only, isolated-write-full-access", }); - const ampRoute = renderCatalog(REGISTRY).content.split("\n").find((line) => line.startsWith("| amp |")); - expect(ampRoute).toContain("| `read-only` |"); }); it("proposes a kept predecessor's current model at the same effort and keeps it on a decline", () => { @@ -537,9 +535,7 @@ describe("resolveLane", () => { expect(() => resolveLane(request({ parent, provider, model, mode: "isolated-write", writerSandbox: "full-access" }))) .toThrow(`provider ${provider} does not support isolated-write-full-access; it supports only: read-only, isolated-write`); } - expect(() => resolveLane(request({ parent: "claude", provider: "amp", model: "deepseek-v4.1-flash", effort: "default", mode: "isolated-write", writerSandbox: "full-access" }))) - .toThrow("provider amp does not support isolated-write-full-access; it supports only: read-only"); - for (const provider of ["opencode", "agy", "cursor", "muse"]) { + for (const provider of ["opencode", "amp", "agy", "cursor", "muse"]) { expect(() => resolveLane(request({ parent: "claude", provider, model: "any", effort: "default", mode: "isolated-write" }))) .toThrow(`provider ${provider} does not support isolated-write; it supports only: read-only, isolated-write-full-access`); expect(resolveLane(request({ parent: "claude", provider, model: "any", effort: "default", mode: "isolated-write", writerSandbox: "full-access" })).access) diff --git a/plugins/pstack/skills/poteto-mode/scripts/runner/run.test.ts b/plugins/pstack/skills/poteto-mode/scripts/runner/run.test.ts index e381f871..20e7095b 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/runner/run.test.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/runner/run.test.ts @@ -2051,7 +2051,7 @@ describe("childEnvironment", () => { devin: { "read-only": [], "isolated-write": [], "isolated-write-full-access": [] }, opencode: { "read-only": [], "isolated-write-full-access": [] }, dsh: { "read-only": ["DEEPSEEK_API_KEY"], "isolated-write": ["DEEPSEEK_API_KEY"] }, - amp: { "read-only": ["AMP_API_KEY"] }, + amp: { "read-only": ["AMP_API_KEY"], "isolated-write-full-access": ["AMP_API_KEY"] }, agy: { "read-only": [], "isolated-write-full-access": [] }, cursor: { "read-only": ["CURSOR_API_KEY", "CURSOR_AUTH_TOKEN"], "isolated-write-full-access": ["CURSOR_API_KEY", "CURSOR_AUTH_TOKEN"] }, muse: { "read-only": [], "isolated-write-full-access": [] }, From 9123185fef3741a38d5bf43f10961b6d1097a73e Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 6 Nov 2026 11:56:35 -0600 Subject: [PATCH 2/4] feat(verify): add the Amp writer case and select writers per provider Each provider's writer cases are also the feature writers:, and a change to one provider's adapter, tests or fixtures reaches only that feature. Refs #269 Co-Authored-By: Claude Opus 5.5 --- .../skills/verify-open-pstack/features/README.md | 2 +- .../skills/verify-open-pstack/features/recipes.ts | 8 ++++++-- .../skills/verify-open-pstack/features/runner.md | 2 +- .../verify-open-pstack/scripts/catalog.test.ts | 3 ++- .../skills/verify-open-pstack/scripts/core.test.ts | 13 ++++++++++--- .claude/skills/verify-open-pstack/scripts/core.ts | 5 +++-- .../verify-open-pstack/scripts/runner.test.ts | 8 ++++++-- .claude/skills/verify-open-pstack/scripts/types.ts | 1 + CHANGES.md | 2 ++ 9 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.claude/skills/verify-open-pstack/features/README.md b/.claude/skills/verify-open-pstack/features/README.md index 414099a7..58b19ec5 100644 --- a/.claude/skills/verify-open-pstack/features/README.md +++ b/.claude/skills/verify-open-pstack/features/README.md @@ -8,7 +8,7 @@ The ownership table below says which features a changed path reaches. `SKILL.md` | --- | --- | | `skills` | One `skill-invocation:` exercise per selected skill, in both harnesses | | `shared` | All listed skills, setup, runner, shipped tools, and `hook:startup` in both harnesses, and Claude's `agent-preload:poteto-agent`; a version-only manifest change reaches less, as described below | -| `catalog` | The generated model catalog and native agents, and the registry sources: `catalog`, `setup`, and `runner`, and no skill check; a provider adapter under `runner/providers/` also reaches `writers` | +| `catalog` | The generated model catalog and native agents, and the registry sources: `catalog`, `setup`, and `runner`, and no skill check; a provider adapter under `runner/providers/` also reaches `writers:`, or `writers` when no writer case names that provider | | `assets` | Installed UI/resource surface for each actual consumer found in the pinned plugin manifests | | `setup` | Installed setup/model configuration with byte-exact daily Claude file restoration before publication | | `runner` | Installed parent invoking real configured provider lanes | diff --git a/.claude/skills/verify-open-pstack/features/recipes.ts b/.claude/skills/verify-open-pstack/features/recipes.ts index 87655e09..78a0a4ec 100644 --- a/.claude/skills/verify-open-pstack/features/recipes.ts +++ b/.claude/skills/verify-open-pstack/features/recipes.ts @@ -364,7 +364,7 @@ function codexWriter(optIn: boolean): Case { const PROVIDER_WRITERS: [descriptor: string, optIn: boolean][] = [ ['devin:swe-2@medium', false], ['dsh:deepseek-flash@low', false], ['opencode:opencode/deepseek-v4.1-flash-free@low', true], - ['agy:gemini-3.8-flash@low', true], ['cursor:composer-2.5@default', true], + ['agy:gemini-3.8-flash@low', true], ['cursor:composer-2.5@default', true], ['amp:smart@default', true], ]; const MUSE = { provider: 'muse', model: 'muse-spark-1.3', effort: 'low' }; @@ -810,7 +810,11 @@ export function recipe(feature: string, harness: Harness, routes: string[] = []) if (feature === 'project-skill') return [projectSkill]; if (feature === 'hook:startup') return [startupHook]; if (feature === 'runner') return runner(harness, routes); - if (feature === 'writers') return [...PROVIDER_WRITERS.map(([descriptor, optIn]) => providerWriter(descriptor, optIn)), museWriter, museReader]; + const writers = /^writers(?::([a-z]+))?$/.exec(feature); + if (writers) { + const cases = [...PROVIDER_WRITERS.map(([descriptor, optIn]) => providerWriter(descriptor, optIn)), museWriter, museReader]; + return writers[1] === undefined ? cases : cases.filter(c => c.id.startsWith(`${writers[1]}-`)); + } if (feature === 'setup' || feature === 'skill-invocation:setup-pstack') return setup; if (feature === 'catalog') return catalog(harness); if (feature === 'shipped-tools') return [shippedTools]; diff --git a/.claude/skills/verify-open-pstack/features/runner.md b/.claude/skills/verify-open-pstack/features/runner.md index 8fe68911..d48a7836 100644 --- a/.claude/skills/verify-open-pstack/features/runner.md +++ b/.claude/skills/verify-open-pstack/features/runner.md @@ -26,4 +26,4 @@ From Codex the recipe adds the `linked-worktree-writer` case: one `claude:opus@m From Claude the recipe adds the `full-access-writer` case. Its fixture sheet puts `feature, refactoring` on `codex:gpt-6.1-sol@max` and holds the line `codex writer sandbox: full-access`. The prompt names the sheet, the role and the lane's paths, never the runner flag. The child writes a per-run nonce to `.agents/result.json` in its cwd, and adds a second nonce that it reads from the DOM headless Chrome dumps for a fixture page (Playwright's Chromium when Chrome is absent). The page file holds that nonce only base64-encoded. The case asserts the receipt is `complete` for that route and cwd, records `writerSandbox: "full-access"` and carries `--sandbox danger-full-access` in its argv, and that the `.agents/` result written this session holds both nonces. Its counterpart, `bounded-writer`, uses the same dispatch from a fixture sheet that puts `feature, refactoring` on `codex:gpt-6.1-sol@low` and has no setting line. The child writes a per-run nonce to the plain file `result.json` in its cwd, which `workspace-write` allows; it uses no browser and no `.agents/` path. The case asserts the receipt is `complete` for that route and cwd, records `writerSandbox: "bounded"`, carries `--sandbox workspace-write` and never `danger-full-access` in its argv, and that `result.json` written this session holds the nonce. Docker is not exercised. Route overrides do not change these cases. -The `writers` feature is reachable when a path under `plugins/pstack/skills/poteto-mode/scripts/runner/providers/` changes, and runs only when named. Its recipe has one writer case each for `devin:swe-2@medium` and `dsh:deepseek-flash@low`, whose sheets hold no setting line, and for `opencode:opencode/deepseek-v4.1-flash-free@low`, `agy:gemini-3.8-flash@low` and `cursor:composer-2.5@default`, whose sheets hold ` writer sandbox: full-access`. Each fixture sheet puts `feature, refactoring` on that descriptor, and the prompt names the sheet, the role and the lane's paths, never the runner flag. The lane's cwd is a linked worktree of a run-owned repository. The child runs a Python command that writes the SHA-256 of a per-run nonce to `result.txt`; the case asserts the receipt is `complete` for that route, cwd and writer sandbox, and that `result.txt`, written this session, holds the hash, which the model cannot produce without running the command. `muse-writer` runs the same task with launcher arguments that name `--writer-sandbox full-access`, because no Muse family is registered for a sheet to name. `muse-reader` runs a read-only `muse:muse-spark-1.3@low` lane that must reply with a per-run marker from a fixture file, with a `pinned-argv` receipt. +The `writers` feature is reachable when a path under `plugins/pstack/skills/poteto-mode/scripts/runner/providers/` changes, and runs only when named. Its recipe has one writer case each for `devin:swe-2@medium` and `dsh:deepseek-flash@low`, whose sheets hold no setting line, and for `opencode:opencode/deepseek-v4.1-flash-free@low`, `agy:gemini-3.8-flash@low`, `cursor:composer-2.5@default` and `amp:smart@default`, whose sheets hold ` writer sandbox: full-access`. Each fixture sheet puts `feature, refactoring` on that descriptor, and the prompt names the sheet, the role and the lane's paths, never the runner flag. The lane's cwd is a linked worktree of a run-owned repository. The child runs a Python command that writes the SHA-256 of a per-run nonce to `result.txt`; the case asserts the receipt is `complete` for that route, cwd and writer sandbox, and that `result.txt`, written this session, holds the hash, which the model cannot produce without running the command. `muse-writer` runs the same task with launcher arguments that name `--writer-sandbox full-access`, because no Muse family is registered for a sheet to name. `muse-reader` runs a read-only `muse:muse-spark-1.3@low` lane that must reply with a per-run marker from a fixture file, with a `pinned-argv` receipt. Each provider's cases also form the feature `writers:`, such as `writers:amp` or `writers:muse` (both Muse cases), and a change to that provider's adapter, tests or fixtures under `runner/providers/` reaches only that feature, while any other path there reaches the whole `writers` set. diff --git a/.claude/skills/verify-open-pstack/scripts/catalog.test.ts b/.claude/skills/verify-open-pstack/scripts/catalog.test.ts index 11059f43..8db47f62 100644 --- a/.claude/skills/verify-open-pstack/scripts/catalog.test.ts +++ b/.claude/skills/verify-open-pstack/scripts/catalog.test.ts @@ -454,7 +454,8 @@ test('each provider writer case puts its setting line in the sheet only for an o const run = { ...record('claude', 'pstack:poteto-mode'), commands: ['"$RUNNER/pstack-runner" --provider x'] }; for (const [name, model, effort, optIn] of [ ['devin', 'swe-2', 'medium', false], ['dsh', 'deepseek-flash', 'low', false], ['opencode', 'opencode/deepseek-v4.1-flash-free', 'low', true], - ['agy', 'gemini-3.8-flash', 'low', true], ['cursor', 'composer-2.5', 'default', true], ['muse', 'muse-spark-1.3', 'low', true], + ['agy', 'gemini-3.8-flash', 'low', true], ['cursor', 'composer-2.5', 'default', true], ['amp', 'smart', 'default', true], + ['muse', 'muse-spark-1.3', 'low', true], ] as const) { const f = await fixture('claude'), c = recipe('writers', 'claude').find(c => c.id === `${name}-writer`)!; await c.prepare!(f); diff --git a/.claude/skills/verify-open-pstack/scripts/core.test.ts b/.claude/skills/verify-open-pstack/scripts/core.test.ts index e5907e97..b02c3566 100644 --- a/.claude/skills/verify-open-pstack/scripts/core.test.ts +++ b/.claude/skills/verify-open-pstack/scripts/core.test.ts @@ -4,7 +4,7 @@ import { resolve } from 'node:path'; import registryData from '../features/registry.json'; import { recipe } from '../features/recipes.ts'; import { classify, completeEvidence, matches, newReceipt, requiredFeatures, requiredHarnesses, validateRegistry } from './core.ts'; -import { HARNESSES, LIVE_HARNESSES, type Receipt } from './types.ts'; +import { HARNESSES, LIVE_HARNESSES, WRITER_PROVIDERS, type Receipt } from './types.ts'; import codexManifest from '../../../../plugins/pstack/.codex-plugin/plugin.json'; import claudeManifest from '../../../../plugins/pstack/.claude-plugin/plugin.json'; @@ -89,8 +89,15 @@ describe('registry and ownership', () => { expect(s.skills).toEqual([]); expect(s.features).toEqual(both('catalog', 'runner', 'setup')); } - expect(classify([{ filename: 'plugins/pstack/skills/poteto-mode/scripts/runner/providers/grok.ts' }], registry).features) - .toEqual(both('catalog', 'runner', 'setup', 'writers')); + const PROVIDERS = 'plugins/pstack/skills/poteto-mode/scripts/runner/providers/'; + for (const [filename, writers] of [ + ['grok.ts', 'writers'], ['shared.ts', 'writers'], ['adapter-suite.ts', 'writers'], ['fixtures/claude/stream.jsonl', 'writers'], + ...WRITER_PROVIDERS.map(provider => [`${provider}.ts`, `writers:${provider}`]), + ['amp.test.ts', 'writers:amp'], ['fixtures/amp/lockdown-settings.json', 'writers:amp'], ['dsh-preflight.yml', 'writers:dsh'], + ]) { + expect([filename, classify([{ filename: `${PROVIDERS}${filename}` }], registry).features]) + .toEqual([filename, both('catalog', 'runner', 'setup', writers!)]); + } }); test('a renamed or deleted catalog path keeps catalog ownership', () => { for (const previous_filename of [CATALOG, 'plugins/pstack/agents/pstack-opus-max.md']) { diff --git a/.claude/skills/verify-open-pstack/scripts/core.ts b/.claude/skills/verify-open-pstack/scripts/core.ts index 655f37b7..40ab1353 100644 --- a/.claude/skills/verify-open-pstack/scripts/core.ts +++ b/.claude/skills/verify-open-pstack/scripts/core.ts @@ -1,4 +1,4 @@ -import { HARNESSES, LIVE_HARNESSES, REPO, type ChangedFile, type Harness, type Receipt, type Registry, type Selection } from './types.ts'; +import { HARNESSES, LIVE_HARNESSES, REPO, WRITER_PROVIDERS, type ChangedFile, type Harness, type Receipt, type Registry, type Selection } from './types.ts'; export function validateRegistry(value: unknown): Registry { if (!value || typeof value !== 'object') throw new Error('Invalid feature registry'); @@ -55,7 +55,8 @@ export function classify(files: ChangedFile[], registry: Registry): Selection { if (registry[key].some(p => matches(path, p))) { both(feature); covered = true; } } if (/^plugins\/pstack\/skills\/poteto-mode\/scripts\/resolve-codex-transcript(?:\.ts)?$/.test(path)) { skills.add('reflect'); covered = true; } - if (path.startsWith('plugins/pstack/skills/poteto-mode/scripts/runner/providers/')) both('writers'); + const provider = /^plugins\/pstack\/skills\/poteto-mode\/scripts\/runner\/providers\/(?:fixtures\/)?([a-z]+)?/.exec(path); + if (provider) both((WRITER_PROVIDERS as readonly string[]).includes(provider[1] ?? '') ? `writers:${provider[1]}` : 'writers'); const skill = /^plugins\/pstack\/skills\/([^/]+)\/(.+)$/.exec(path); if (!catalog && skill && registry.skills.includes(skill[1]!)) { const leaf = skill[2]!; diff --git a/.claude/skills/verify-open-pstack/scripts/runner.test.ts b/.claude/skills/verify-open-pstack/scripts/runner.test.ts index 80df9566..c500888c 100644 --- a/.claude/skills/verify-open-pstack/scripts/runner.test.ts +++ b/.claude/skills/verify-open-pstack/scripts/runner.test.ts @@ -4,7 +4,7 @@ import { tmpdir } from 'node:os'; import { join, resolve } from 'node:path'; import { recipe, type Fixture } from '../features/recipes.ts'; import { command } from './io.ts'; -import type { SessionRecord } from './types.ts'; +import { WRITER_PROVIDERS, type SessionRecord } from './types.ts'; const roots: string[] = []; afterEach(async () => { for (const root of roots.splice(0)) await rm(root, { recursive: true, force: true }); }); @@ -31,7 +31,11 @@ test('the runner recipe adds one linked-worktree writer case for a Codex parent expect(recipe('runner', 'claude').map(c => c.id)).toEqual(['route-1', 'full-access-writer', 'bounded-writer']); expect(recipe('runner', 'codex').map(c => c.id)).toEqual(['route-1', 'linked-worktree-writer']); expect(recipe('writers', 'claude').map(c => c.id)) - .toEqual(['devin-writer', 'dsh-writer', 'opencode-writer', 'agy-writer', 'cursor-writer', 'muse-writer', 'muse-reader']); + .toEqual(['devin-writer', 'dsh-writer', 'opencode-writer', 'agy-writer', 'cursor-writer', 'amp-writer', 'muse-writer', 'muse-reader']); + expect(WRITER_PROVIDERS.flatMap(provider => recipe(`writers:${provider}`, 'claude').map(c => c.id)).sort()) + .toEqual(recipe('writers', 'claude').map(c => c.id).sort()); + expect(recipe('writers:amp', 'codex').map(c => c.id)).toEqual(['amp-writer']); + expect(recipe('writers:muse', 'codex').map(c => c.id)).toEqual(['muse-writer', 'muse-reader']); const dir = await realpath(await mkdtemp(join(tmpdir(), 'pstack-runner-recipe-'))); roots.push(dir); const workspace = resolve(import.meta.dir, '../../../..'); diff --git a/.claude/skills/verify-open-pstack/scripts/types.ts b/.claude/skills/verify-open-pstack/scripts/types.ts index 3aa6cb0e..10f35543 100644 --- a/.claude/skills/verify-open-pstack/scripts/types.ts +++ b/.claude/skills/verify-open-pstack/scripts/types.ts @@ -2,6 +2,7 @@ export const REPO = 'ericlitman/open-pstack'; export const HARNESSES = ['claude', 'codex'] as const; export type CoreHarness = typeof HARNESSES[number]; export const LIVE_HARNESSES = [...HARNESSES, 't3'] as const; +export const WRITER_PROVIDERS = ['devin', 'dsh', 'opencode', 'agy', 'cursor', 'amp', 'muse'] as const; export type Harness = typeof LIVE_HARNESSES[number]; export type Phase = 'resolve' | 'classify' | 'prepare' | 'exercise' | 'publish' | 'failed' | 'head-moved'; export interface Pull { diff --git a/CHANGES.md b/CHANGES.md index 434ae3eb..6050394c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,8 @@ This port applies the Cursor → Claude Code substitutions in skill bodies. Earl **Amp writer (#269).** Amp's writer was measured on Amp CLI 0.0.1792123242-g03edc7: its edit tool and shell wrote outside the lane's worktree, including into the main repository's shared `.git`, a home directory and `/tmp`, so an Amp writer runs only when the model sheet holds `amp writer sandbox: full-access`. Its settings then enable the edit tools and the shell, and every other tool stays rejected. A bounded `isolated-write` Amp lane is refused before launch. +**One writer case per provider in the live gate (#269).** The verifier's `writers` feature gains an Amp case, and each provider's cases are also the feature `writers:`, such as `writers:amp`. A change to one provider's adapter, tests or fixtures reaches only that provider's feature, so its live gate runs one case. + ## 1.19.0 adds T3 Code as a third harness Open Pstack 1.19.0 keeps the Cursor pstack 0.15.36 sync. Default roles and panels are unchanged. From db45a5eeb4ca25b9fb109398a483bfc8ede8d5ea Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 6 Nov 2026 13:11:12 -0500 Subject: [PATCH 3/4] docs(catalog): note Amp's writer hang and Grok's OrbStack socket prerequisite Amp: a writer edit that raises a UI request waits until the parent cancels it, since the runner adds no timeout. Grok: its macOS sandbox refuses to start when /var/run/docker.sock links outside its runtime socket list, as OrbStack's link does. Refs #269 Refs #275 Co-Authored-By: Claude Opus 5.5 --- .../pstack/skills/poteto-mode/references/model-catalog.md | 7 ++++--- .../skills/poteto-mode/scripts/runner/providers/amp.ts | 2 +- .../skills/poteto-mode/scripts/runner/providers/grok.ts | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/pstack/skills/poteto-mode/references/model-catalog.md b/plugins/pstack/skills/poteto-mode/references/model-catalog.md index 000ff945..e1976c62 100644 --- a/plugins/pstack/skills/poteto-mode/references/model-catalog.md +++ b/plugins/pstack/skills/poteto-mode/references/model-catalog.md @@ -67,7 +67,7 @@ Rolling aliases: | --- | --- | --- | --- | --- | --- | --- | --- | | claude | native `Agent` | external runner | `read-only`, `isolated-write` | stdin | provider report | read-only: inherited; isolated-write: inherited without `GIT_*` | - | | codex | external runner | native `spawn_agent` | `read-only`, `isolated-write`, `isolated-write-full-access` | stdin | pinned argv | inherited | - | -| grok | external runner | external runner | `read-only`, `isolated-write` | file | provider report | allowlist | Linux: Landlock and `bwrap` | +| grok | external runner | external runner | `read-only`, `isolated-write` | file | provider report | allowlist | Linux: Landlock and `bwrap`; macOS: any `/var/run/docker.sock` symlink points inside Grok's runtime-socket list | | devin | external runner | external runner | `read-only`, `isolated-write`, `isolated-write-full-access` | file | provider report | allowlist | - | | opencode | external runner | external runner | `read-only`, `isolated-write-full-access` | stdin | pinned argv | allowlist | - | | dsh | external runner | external runner | `read-only`, `isolated-write` | stdin | pinned argv | allowlist | dsh 0.2.1-rc.2 exactly | @@ -97,11 +97,12 @@ The runner refuses an access mode outside a provider's Access modes cell before ### grok: Grok Build CLI - Executable: `grok`. -- Host prerequisites: Linux: Landlock and `bwrap`. +- Host prerequisites: Linux: Landlock and `bwrap`; macOS: any `/var/run/docker.sock` symlink points inside Grok's runtime-socket list. - State paths: `~/.grok/`, which the CLI writes (for example `~/.grok/managed_config.toml`). - Child environment: only `PATH` `HOME` `USER` `LOGNAME` `SHELL` `TMPDIR` `LANG` `TERM` `COLORTERM` `TZ` `HTTP_PROXY` `HTTPS_PROXY` `NO_PROXY` `ALL_PROXY` `http_proxy` `https_proxy` `no_proxy` `all_proxy` `SSL_CERT_FILE` `SSL_CERT_DIR` `NODE_EXTRA_CA_CERTS`, and variables starting with `LC_`, `XDG_`, `GROK_`, `XAI_`. - `fast` is part of Cursor's Grok selector, not a Grok Build CLI model or effort flag. - The preflight passes when `grok models` reports a login (`logged in`, `You are using XAI_API_KEY.`, or `You are authenticated via deployment key.`) and lists the lane's model on a line under `Available models:`. A model named only above that header, such as on the `Default model:` line, or output without the header, is `unavailable-model`/69. +- On macOS, Grok 1.0.77's sandbox refuses to start when a runtime socket it blocks, such as `/var/run/docker.sock`, is a symlink to a path outside its built-in list (`/var/run/docker.sock`, the podman and containerd sockets, `~/.docker/desktop/docker.sock`, `~/.docker/run/docker.sock`). OrbStack's link to `~/.orbstack/run/docker.sock` triggers it, and a `sandbox.toml` deny entry does not help. Removing the link (`sudo rm /var/run/docker.sock`; `docker` keeps working through the `orbstack` context) lets the bounded sandbox start (#275). - The authentication preflight has one bounded retry. If the first `grok models` result would be classified as unauthenticated, the runner waits five seconds and tries the same preflight once more. A second failure is terminal. The delay and second attempt share the runner's absolute deadline and cancellation latch, and the receipt keeps evidence from both attempts. Model execution is never retried. ### devin: Devin CLI @@ -164,7 +165,7 @@ The runner refuses an access mode outside a provider's Access modes cell before - State paths: `~/.local/share/amp/` (the login in `secrets.json`, accounts, session and recent threads) and `~/.cache/amp/` (logs, downloaded plugins and skills). - Child environment: only `PATH` `HOME` `USER` `LOGNAME` `SHELL` `TMPDIR` `LANG` `TERM` `COLORTERM` `TZ` `HTTP_PROXY` `HTTPS_PROXY` `NO_PROXY` `ALL_PROXY` `http_proxy` `https_proxy` `no_proxy` `all_proxy` `SSL_CERT_FILE` `SSL_CERT_DIR` `NODE_EXTRA_CA_CERTS` `AMP_API_KEY`, and variables starting with `LC_`, `XDG_`; sets `AMP_IGNORE_GUIDANCE_FILES=*`. - Effort is part of the model ID. The model is an official Amp agent mode, such as `deepseek-v4.1-flash`, from Amp's own `official-modes` plugin, which Amp serves to every user. Where a mode has effort variants, the variant is part of its name (for example `gpt-6-astra-low` to `gpt-6-astra-max`). An unregistered Amp model must be a mode name with the `default` effort. An unknown mode exits 1 with a generic error and ends `child-failed`/70. -- No Amp writer is confined, so a writer needs the model sheet's opt-in (`isolated-write-full-access`); the runner refuses a bounded `isolated-write` lane before launch. An opted-in writer's settings also enable and allow `create_file`, `edit_file`, `apply_patch`, `shell_command` and `async_shell_command`, the name Amp checks a `shell_command` call against. `code_exec` and every other tool stay rejected. Measured with Amp CLI 0.0.1792123242-g03edc7 on macOS 27.0.1 in the built-in `smart` mode, whose tools are `apply_patch` and `shell_command`, in a linked worktree under the home directory, whose main repository and a sibling directory sat beside it: edits, shell writes and a Python run inside the worktree succeeded. The edit tool wrote into the sibling, the main checkout, through symlinks to both, `/tmp` and a home directory. The shell wrote into each of those, the main repository's shared `.git` and `$TMPDIR`. An edit into the shared `.git` and one into `$TMPDIR` never returned: the first raised a UI request that execute mode cannot answer, and both turns waited until they were cancelled. The account's official modes failed that day with a server `agentMode` validation error, so the measurement used `smart`. +- No Amp writer is confined, so a writer needs the model sheet's opt-in (`isolated-write-full-access`); the runner refuses a bounded `isolated-write` lane before launch. An opted-in writer's settings also enable and allow `create_file`, `edit_file`, `apply_patch`, `shell_command` and `async_shell_command`, the name Amp checks a `shell_command` call against. `code_exec` and every other tool stay rejected. Measured with Amp CLI 0.0.1792123242-g03edc7 on macOS 27.0.1 in the built-in `smart` mode, whose tools are `apply_patch` and `shell_command`, in a linked worktree under the home directory, whose main repository and a sibling directory sat beside it: edits, shell writes and a Python run inside the worktree succeeded. The edit tool wrote into the sibling, the main checkout, through symlinks to both, `/tmp` and a home directory. The shell wrote into each of those, the main repository's shared `.git` and `$TMPDIR`. An edit into the shared `.git` and one into `$TMPDIR` never returned: the first raised a UI request that execute mode cannot answer, and both turns waited until they were cancelled. The runner adds no timeout, so such a writer lane runs until the parent cancels it. The account's official modes failed that day with a server `agentMode` validation error, so the measurement used `smart`. - A read-only lane is a run-owned `--settings-file` in its private `.provider/` directory (0700). It enables only the `Read` tool and rejects every other tool, which turns off the shell, edits, subagents, web tools, code execution, thread tools and `manage_amp`. It also turns off MCP servers, Claude Code and `~/.agents` skills, updates and notifications. The lane sets `AMP_IGNORE_GUIDANCE_FILES=*`, so `AGENTS.md` in the cwd and its parents does not load. `Read` can read any path on the host. Measured with Amp CLI 0.0.1792094445-g3475f5 and 0.0.1792123242-g03edc7. - Amp's own `official-modes` plugin supplies the pinned modes and runs its code in every lane. Amp serves and updates it with no version pin: its cache hash changed from `a1f1ef61c4dd011d` to `cb61cf1a7f4be96c` between 2026-10-15 and 2026-10-16. - System plugins in `$XDG_CONFIG_HOME/amp/plugins` or `~/.config/amp/plugins` load in every lane, and the lane keeps an inherited `XDG_CONFIG_HOME`. A plugin is Bun code that runs as the user, and Amp has no production switch that turns plugins off (`AMP_DISABLE_PLUGINS` is ignored outside development builds). Measured with Amp CLI 0.0.1792123242-g03edc7: a system plugin ran at import and in the `session.start`, `agent.start` and `agent.end` hooks. One that called `configuration.update` at startup rewrote the lane's settings file to enable every tool with an allow-all rule, after which the model had 29 tools and ran a shell write in the cwd. One that registered the key `deepseek-v4.1-flash` replaced the official mode's prompt and tools, while the argv still named that mode. diff --git a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts index 352353de..195ea14f 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/amp.ts @@ -134,7 +134,7 @@ export const amp = adapter({ ], notes: [ "Effort is part of the model ID. The model is an official Amp agent mode, such as `deepseek-v4.1-flash`, from Amp's own `official-modes` plugin, which Amp serves to every user. Where a mode has effort variants, the variant is part of its name (for example `gpt-6-astra-low` to `gpt-6-astra-max`). An unregistered Amp model must be a mode name with the `default` effort. An unknown mode exits 1 with a generic error and ends `child-failed`/70.", - "No Amp writer is confined, so a writer needs the model sheet's opt-in (`isolated-write-full-access`); the runner refuses a bounded `isolated-write` lane before launch. An opted-in writer's settings also enable and allow `create_file`, `edit_file`, `apply_patch`, `shell_command` and `async_shell_command`, the name Amp checks a `shell_command` call against. `code_exec` and every other tool stay rejected. Measured with Amp CLI 0.0.1792123242-g03edc7 on macOS 27.0.1 in the built-in `smart` mode, whose tools are `apply_patch` and `shell_command`, in a linked worktree under the home directory, whose main repository and a sibling directory sat beside it: edits, shell writes and a Python run inside the worktree succeeded. The edit tool wrote into the sibling, the main checkout, through symlinks to both, `/tmp` and a home directory. The shell wrote into each of those, the main repository's shared `.git` and `$TMPDIR`. An edit into the shared `.git` and one into `$TMPDIR` never returned: the first raised a UI request that execute mode cannot answer, and both turns waited until they were cancelled. The account's official modes failed that day with a server `agentMode` validation error, so the measurement used `smart`.", + "No Amp writer is confined, so a writer needs the model sheet's opt-in (`isolated-write-full-access`); the runner refuses a bounded `isolated-write` lane before launch. An opted-in writer's settings also enable and allow `create_file`, `edit_file`, `apply_patch`, `shell_command` and `async_shell_command`, the name Amp checks a `shell_command` call against. `code_exec` and every other tool stay rejected. Measured with Amp CLI 0.0.1792123242-g03edc7 on macOS 27.0.1 in the built-in `smart` mode, whose tools are `apply_patch` and `shell_command`, in a linked worktree under the home directory, whose main repository and a sibling directory sat beside it: edits, shell writes and a Python run inside the worktree succeeded. The edit tool wrote into the sibling, the main checkout, through symlinks to both, `/tmp` and a home directory. The shell wrote into each of those, the main repository's shared `.git` and `$TMPDIR`. An edit into the shared `.git` and one into `$TMPDIR` never returned: the first raised a UI request that execute mode cannot answer, and both turns waited until they were cancelled. The runner adds no timeout, so such a writer lane runs until the parent cancels it. The account's official modes failed that day with a server `agentMode` validation error, so the measurement used `smart`.", "A read-only lane is a run-owned `--settings-file` in its private `.provider/` directory (0700). It enables only the `Read` tool and rejects every other tool, which turns off the shell, edits, subagents, web tools, code execution, thread tools and `manage_amp`. It also turns off MCP servers, Claude Code and `~/.agents` skills, updates and notifications. The lane sets `AMP_IGNORE_GUIDANCE_FILES=*`, so `AGENTS.md` in the cwd and its parents does not load. `Read` can read any path on the host. Measured with Amp CLI 0.0.1792094445-g3475f5 and 0.0.1792123242-g03edc7.", "Amp's own `official-modes` plugin supplies the pinned modes and runs its code in every lane. Amp serves and updates it with no version pin: its cache hash changed from `a1f1ef61c4dd011d` to `cb61cf1a7f4be96c` between 2026-10-15 and 2026-10-16.", "System plugins in `$XDG_CONFIG_HOME/amp/plugins` or `~/.config/amp/plugins` load in every lane, and the lane keeps an inherited `XDG_CONFIG_HOME`. A plugin is Bun code that runs as the user, and Amp has no production switch that turns plugins off (`AMP_DISABLE_PLUGINS` is ignored outside development builds). Measured with Amp CLI 0.0.1792123242-g03edc7: a system plugin ran at import and in the `session.start`, `agent.start` and `agent.end` hooks. One that called `configuration.update` at startup rewrote the lane's settings file to enable every tool with an allow-all rule, after which the model had 29 tools and ran a shell write in the cwd. One that registered the key `deepseek-v4.1-flash` replaced the official mode's prompt and tools, while the argv still named that mode.", diff --git a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/grok.ts b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/grok.ts index 3de42f61..10bee7ba 100644 --- a/plugins/pstack/skills/poteto-mode/scripts/runner/providers/grok.ts +++ b/plugins/pstack/skills/poteto-mode/scripts/runner/providers/grok.ts @@ -137,11 +137,12 @@ export const grok = adapter({ environment: () => ({ kind: "allowlist", names: BASE_ALLOWLIST, prefixes: ENVIRONMENT_PREFIXES }), docs: { name: "Grok Build CLI", - hostPrerequisites: ["Linux: Landlock and `bwrap`"], + hostPrerequisites: ["Linux: Landlock and `bwrap`", "macOS: any `/var/run/docker.sock` symlink points inside Grok's runtime-socket list"], statePaths: ["`~/.grok/`, which the CLI writes (for example `~/.grok/managed_config.toml`)"], notes: [ "`fast` is part of Cursor's Grok selector, not a Grok Build CLI model or effort flag.", "The preflight passes when `grok models` reports a login (`logged in`, `You are using XAI_API_KEY.`, or `You are authenticated via deployment key.`) and lists the lane's model on a line under `Available models:`. A model named only above that header, such as on the `Default model:` line, or output without the header, is `unavailable-model`/69.", + "On macOS, Grok 1.0.77's sandbox refuses to start when a runtime socket it blocks, such as `/var/run/docker.sock`, is a symlink to a path outside its built-in list (`/var/run/docker.sock`, the podman and containerd sockets, `~/.docker/desktop/docker.sock`, `~/.docker/run/docker.sock`). OrbStack's link to `~/.orbstack/run/docker.sock` triggers it, and a `sandbox.toml` deny entry does not help. Removing the link (`sudo rm /var/run/docker.sock`; `docker` keeps working through the `orbstack` context) lets the bounded sandbox start (#275).", "The authentication preflight has one bounded retry. If the first `grok models` result would be classified as unauthenticated, the runner waits five seconds and tries the same preflight once more. A second failure is terminal. The delay and second attempt share the runner's absolute deadline and cancellation latch, and the receipt keeps evidence from both attempts. Model execution is never retried.", ], }, From 4c084ea96ac4f256dd7732d9dd410715546c3028 Mon Sep 17 00:00:00 2001 From: Eric Litman Date: Fri, 6 Nov 2026 13:11:12 -0500 Subject: [PATCH 4/4] chore: release Amp's opted-in writer as 1.20.0 Refs #269 Co-Authored-By: Claude Opus 5.5 --- .claude-plugin/marketplace.json | 2 +- CHANGES.md | 4 +++- README.md | 2 +- UPSTREAM.md | 4 ++-- docs/reference.md | 2 +- plugins/pstack/.claude-plugin/plugin.json | 2 +- plugins/pstack/.codex-plugin/plugin.json | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 1dc9b976..591b7f6b 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ "name": "pstack", "source": "./plugins/pstack", "description": "if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence.", - "version": "1.19.0", + "version": "1.20.0", "author": { "name": "Lauren Tan (original)" }, diff --git a/CHANGES.md b/CHANGES.md index 6050394c..86a1415a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,9 @@ Open Pstack lands on green: Mergify merges a ready PR to main once verify and exact-head live-gate pass and no review thread is unresolved, and a workflow resolves Unfret's own threads. A PR that touches `.github/` or the Mergify config also waits for Unfret, and workflow changes require operator queueing. This port applies the Cursor → Claude Code substitutions in skill bodies. Earlier drafts left them flagged; this revision resolves them. A later pass added a Codex build that shares the same skills; see [Codex port](#codex-port) below. -## Unreleased +## 1.20.0 gives Amp an opted-in writer + +Open Pstack 1.20.0 keeps the Cursor pstack 0.15.36 sync. Default roles and panels are unchanged. **Amp writer (#269).** Amp's writer was measured on Amp CLI 0.0.1792123242-g03edc7: its edit tool and shell wrote outside the lane's worktree, including into the main repository's shared `.git`, a home directory and `/tmp`, so an Amp writer runs only when the model sheet holds `amp writer sandbox: full-access`. Its settings then enable the edit tools and the shell, and every other tool stays rejected. A bounded `isolated-write` Amp lane is refused before launch. diff --git a/README.md b/README.md index 032d9e92..db2cd593 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ This repository also keeps: ## Staying close to Lauren's pstack -Open Pstack 1.19.0 tracks pstack 0.15.36 at Cursor commit [`2776ddd2355d6d6c8747d3964600f28daf62f049`](https://github.com/cursor/plugins/commit/2776ddd2355d6d6c8747d3964600f28daf62f049). +Open Pstack 1.20.0 tracks pstack 0.15.36 at Cursor commit [`2776ddd2355d6d6c8747d3964600f28daf62f049`](https://github.com/cursor/plugins/commit/2776ddd2355d6d6c8747d3964600f28daf62f049). The two projects have separate version numbers. The pstack version identifies Lauren's upstream content. The Open Pstack version identifies the Claude Code and Codex package built from it. diff --git a/UPSTREAM.md b/UPSTREAM.md index a330694d..f611ffce 100644 --- a/UPSTREAM.md +++ b/UPSTREAM.md @@ -10,9 +10,9 @@ open-pstack tracks [Cursor's pstack](https://github.com/cursor/plugins/tree/main | Path | `pstack/` | | Commit | `2776ddd2355d6d6c8747d3964600f28daf62f049` | | Upstream version | `0.15.36` | -| open-pstack version | `1.19.0` | +| open-pstack version | `1.20.0` | -The table above is the current Cursor sync point. Open Pstack 1.17.0 imported this 0.15.36 sync, and 1.18.0 and 1.19.0 keep it. `README-UPSTREAM.md` preserves the upstream pstack README verbatim. `CHANGES.md` and `NOTICE.md` describe the adaptations and provenance. +The table above is the current Cursor sync point. Open Pstack 1.17.0 imported this 0.15.36 sync, and 1.18.0 to 1.20.0 keep it. `README-UPSTREAM.md` preserves the upstream pstack README verbatim. `CHANGES.md` and `NOTICE.md` describe the adaptations and provenance. ## Upstream-only exclusions diff --git a/docs/reference.md b/docs/reference.md index 8c7e20d7..013242bd 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -2,7 +2,7 @@ This page contains the full skill, dependency, runtime, and porting reference. For the plain-English introduction and quick start, see the [main README](../README.md). -[Poteto](https://x.com/poteto)'s [pstack](https://github.com/cursor/plugins/tree/main/pstack), adapted to run in Claude Code, Codex and T3 Code without Cursor. One shared skill tree serves all three harnesses, and in T3 Code the Claude Code or Codex runtime loads it; lanes on other providers' models, including Grok and seven more providers, run through the bundled runner. Version 1.19.0 is synced to Cursor pstack v0.15.36 at `2776ddd2355d6d6c8747d3964600f28daf62f049`. See [UPSTREAM.md](../UPSTREAM.md) for the exact sync contract. +[Poteto](https://x.com/poteto)'s [pstack](https://github.com/cursor/plugins/tree/main/pstack), adapted to run in Claude Code, Codex and T3 Code without Cursor. One shared skill tree serves all three harnesses, and in T3 Code the Claude Code or Codex runtime loads it; lanes on other providers' models, including Grok and seven more providers, run through the bundled runner. Version 1.20.0 is synced to Cursor pstack v0.15.36 at `2776ddd2355d6d6c8747d3964600f28daf62f049`. See [UPSTREAM.md](../UPSTREAM.md) for the exact sync contract. Original by Lauren Tan. This distribution builds on Michael Denyer's [pstack-claude](https://github.com/michael-denyer/pstack-claude) port and retains its history and MIT attribution. It imports seven MIT-licensed skills from [cursor-team-kit](https://github.com/cursor/plugins/tree/main/cursor-team-kit): `deslop`, `thermo-nuclear-code-quality-review`, `make-pr-easy-to-review`, `fix-ci`, `fix-merge-conflicts`, `get-pr-comments`, `what-did-i-get-done`. diff --git a/plugins/pstack/.claude-plugin/plugin.json b/plugins/pstack/.claude-plugin/plugin.json index a6dbe8ce..9b747384 100644 --- a/plugins/pstack/.claude-plugin/plugin.json +++ b/plugins/pstack/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "pstack", "displayName": "pstack", - "version": "1.19.0", + "version": "1.20.0", "description": "if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Ported from cursor/plugins/pstack for Claude Code and Codex.", "author": { "name": "Lauren Tan" diff --git a/plugins/pstack/.codex-plugin/plugin.json b/plugins/pstack/.codex-plugin/plugin.json index b65a3136..b0a0e68b 100644 --- a/plugins/pstack/.codex-plugin/plugin.json +++ b/plugins/pstack/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "pstack", - "version": "1.19.0", + "version": "1.20.0", "description": "if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. Codex port of the Claude Code plugin; skills are shared, tool names resolve via skills/poteto-mode/references/codex-tools.md.", "author": { "name": "Lauren Tan"