Skip to content

fix(swarm): resolve plain swarm, swarm_pane, disable, and remote roster caveats - #4

Merged
caelaxie merged 5 commits into
mainfrom
fix/swarm-caveats
Nov 14, 2026
Merged

caelaxie merged 5 commits into
mainfrom
fix/swarm-caveats

Conversation

@caelaxie

Copy link
Copy Markdown
Contributor

Why

Users running agy-pstack-next on agy 1.5.9 hit four remaining native swarm compatibility caveats. Plain /swarm sessions were governed by global pstack hooks, read-only ro-* verifiers could not save timeline screenshots in <appDataDir>/brain/<conversation-id>/ for swarm_pane, agy plugin disable and uninstall drifted from global ~/.gemini/config/hooks.json, and remote swarm.json anchors failed open without resolving worker rosters.

What changed

  • hooks/guard.mjs and hooks/guard.test.mjs. Check plugins["agy-pstack-next"].enabled in config.json before capsule injection or PreToolUse gating, leave built-in /swarm sessions and unprefixed plain swarms unmanaged without polluting member-map.json or non-worker-roots.json, allow ro-* screenshot writes (.png, .jpg, .jpeg, .webp) and extensionless subdirectories inside each worker's own brain/<conversation-id>/ artifact folder while blocking .system_generated mutations across all worker roles, and resolve remote swarm.json anchors via bounded --roster-only CLI probes cached in remote-rosters.json and member-map.json.
  • roles/*.md, skills/**, docs/guide/01-setup.md, and README.md. Update /setup-pstack global hooks.json commands to test ! -f '<abs_guard_path>' || node '<abs_guard_path>' for exit-0 uninstall safety, and document config.json disable parity, plain /swarm pass-through, swarm_pane plan.json and brain-directory Screenshot: timeline rules, and remote --roster-only resolution.

Scope

  • Covers hooks/guard.mjs, hooks/guard.test.mjs, roles/coordinator.md, roles/research.md, skills/pstack/SKILL.md, skills/control-ui/SKILL.md, skills/setup-pstack/SKILL.md, docs/guide/01-setup.md, and README.md.
  • Leaves host ~/.gemini/config/* files on operator machines untouched until the updated plugin is pulled and /setup-pstack is re-run if desired.

Blast Radius

Affects SessionStart, PreInvocation, and PreToolUse decisions in hooks/guard.mjs plus coordinator and read-only worker documentation. Ordinary non-swarm chats and plain built-in /swarm runs pass through unmanaged.

Verification

  • node --test hooks/guard.test.mjs passed 25/25 tests across 10 suites with 0 host plugin_data mutations, alongside 44/44 live adversarial confinement probes across artifact screenshot paths, symlinks, globs, and .system_generated metadata.
  • agy plugin validate --strict . passed (13 skills, 1 hook, 0 findings), 269/269 relative markdown links resolved across 92 .md files, roles/*.md passed zero-dash and zero-colon checks, and isolated agy 1.5.9 install, disable, enable, and uninstall lifecycle checks exited 0.
  • node --test skills/statechart/scripts/test/*.test.ts exited 0 (267 passed, 0 failed).

… rosters

Update /setup-pstack global hook commands with a test ! -f check and document plugin disable parity, plain /swarm pass-through, swarm_pane plan.json and brain-directory timeline screenshots, and remote --roster-only lookup across capsules, skills, setup guide, and README.
Honor plugin disable flags in config.json before session capsule injection or PreToolUse gating, resolving config paths from PSTACK_CONFIG_DIR, parent plugin directories, or HOME.

Leave built-in /swarm sessions and unprefixed plain swarms unmanaged without polluting member-map.json or non-worker-roots.json, while upgrading cleanly when pstack workers or commands join.

Allow read-only workers to write Overview timeline screenshots inside explicit or brain/<conversation-id> artifact directories and protect .system_generated metadata across all worker roles.

Resolve remote swarm.json anchors through bounded --roster-only CLI probes cached in remote-rosters.json with fail-open fallback.
…tian/.gemini/antigravity-cli/worktrees/dd4f7d38-fa48-4cc7-91e3-a75e80f12bba/swarm-impl-guard-5a016fe3 into fix/swarm-caveats
Reject dotfile and extension-bearing directory segments, directory or non-image copy sources, and recursive directory copies when read-only workers target artifact screenshot paths.

Validate Python Path.symlink_to, Path.hardlink_to, and Path.link_to targets across direct, variable-bound, and Path-wrapped expressions.

Block rsync delete flags and glob or brace patterns that can reach .system_generated inside worker artifact roots, with behavioral regression coverage.
…tian/.gemini/antigravity-cli/worktrees/dd4f7d38-fa48-4cc7-91e3-a75e80f12bba/swarm-impl-guard-5a016fe3 into fix/swarm-caveats

@caelaxie caelaxie left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passes the bar on b1f4f79. hook and docs changes stay scoped to the four agy 1.5.9 caveats (plain /swarm pass-through, ro-* brain-dir screenshots with .system_generated blocked, config.json disable, remote --roster-only rosters). no cursor-team-kit mentions, skills stay in skills/, control-cli and control-ui still load. ci run 10 green on agy 1.5.9: validate+install+list of 13 skills including control-cli and control-ui, guard tests 25/25, statechart 267/0. squash-merging.

@caelaxie
caelaxie merged commit d5d96bf into main Nov 14, 2026
1 check passed
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