Skip to content

fix(swarm): resolve agy runtime compatibility and register global hook guard - #2

Merged
caelaxie merged 3 commits into
mainfrom
fix/agy-swarm-compatibility
Nov 14, 2026
Merged

caelaxie merged 3 commits into
mainfrom
fix/agy-swarm-compatibility

Conversation

@caelaxie

Copy link
Copy Markdown
Contributor

Why

Users running agy-pstack-next on agy CLI 1.5.8+ and native swarm need worker role capsules, PreToolUse safety guards, pstack-models.md model routing, and sibling skill delegation to work reliably without hijacking ordinary non-swarm chats. Synthetic Swarm Worker subagent specs skip user-plugin hooks.json and <skills> bundles while named rules under rules/*.md drop silently without trigger frontmatter.

What changed

  • Hardened hooks/guard.mjs, hooks.json, and roles/*.md with three-state session classification (worker, coordinator, unmanaged), O(1) member-map.json and non-worker-roots.json caching, shared plugin_data/agy-pstack-next deduplication, run_workflow blocking, canonical temp-root confinement, and worktree shell-escape checks.
  • Updated skills/setup-pstack/SKILL.md to write always_on YAML frontmatter in ~/.gemini/config/rules/pstack-models.md and merge pstack-swarm-guard into global ~/.gemini/config/hooks.json while preserving existing user hooks.
  • Aligned skills/**, docs/guide/**, README.md, .antigravity-plugin/plugin.json, and skills/statechart/scripts/statechart with schema-gated swarm channels, explicit worker SKILL.md brief paths, /agy-pstack-next:<skill> CLI namespacing, narrator swarm_view/view.json discovery, --mode auto eval flags, and macOS /private/var symlink canonicalization.

Scope

  • Covers all 11 verified agy CLI and native swarm runtime compatibility gaps across hooks, setup, skills, scripts, and docs.
  • Leaves host agy binary specInheritsUserPlugins behavior unchanged by routing worker hook enforcement through global ~/.gemini/config/hooks.json and explicit SKILL.md brief paths.

Blast Radius

Ordinary non-swarm agy conversations now run as unmanaged with zero injected coordinator prompts, zero subagent tool blocks, and O(1) hook overhead. Swarm coordinators and workers share <appDataDir>/plugin_data/agy-pstack-next state without duplicate capsule injections when both plugin and global hooks.json entries are active.

Verification

  • agy plugin validate --strict --json exited 0 with 0 findings across the repository, installed plugin, and global hooks.json configuration.
  • node --test hooks/guard.test.mjs passed 15/15 suites and node --test passed 126/126 tests in skills/statechart/scripts/test/cli.test.ts (193/193 across all zero-dependency statechart suites).
  • Live Swarm Worker verification (ro-verify-3) confirmed SessionStart roles/research.md injection, /tmp scratch allowance, and PreToolUse path-escape denial under global ~/.gemini/config/hooks.json without restarting agy.

…me paths

Add required trigger always_on frontmatter to the pstack-models.md template and add Step 4b in setup-pstack to merge pstack-swarm-guard into global ~/.gemini/config/hooks.json so native swarm workers enforce capsules and tool guards while sharing plugin_data state.

Update plugin.json suggestedPrompts, README.md, docs/guide, and setup recipes for /agy-pstack-next:<skill> CLI namespacing, agy 1.5.8+ and Antigravity 2.0 naming, schema-gated swarm channels, narrator swarm_view/view.json fallback in ketchup, and sidecar ANTIGRAVITY_LS_ADDRESS and ~/.gemini/config/config.json rules in make-bot-ui.
…untime

Gate swarm channel directives on live tool schema support with main-board lead-<area> fallback, pass explicit resolved plugin SKILL.md and role capsule paths in worker briefs, update evolve trials to impl-eval-* with --mode auto and .agents/skills copies, resolve watch-pr via <pstack-skill-dir>, page read_board on cold pickup while preserving monitor and narrator on teardown, and canonicalize symlink parent directories in the statechart launcher on macOS.
@caelaxie
caelaxie merged commit b52c0e4 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