Repository navigation
Conversation
… detection for agy
…mate trust - Install semantic busy-state hooks (PreInvocation -> busy, Stop -> idle + touch turn-ended) in task worktree .agents/hooks.json for agy crewmates. - Merge fm-crew-busy with pre-existing worktree hooks and exclude from git tracking. - Prune fm-crew-busy safely on relaunch and worktree teardown. - Enable agy as a verified persistent secondmate adapter with --secondmate-home trust pre-registration. - Add docs/supervision-protocols/agy.md and update agy reference documentation. - Restore clean upstream Herdr agent liveness detection. - Add comprehensive hermetic integration suite in tests/fm-agy-crew-turnend.test.sh.
Author
|
Closed while local testing and no-mistakes pipeline validation run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Establishes full native support for the Antigravity CLI (
agy) across all Firstmate fleet roles: Primary Firstmate, Persistent Secondmate, and Crewmate/Scout.This PR supersedes and replaces #4622 by incorporating the subagent delegation check and completing the full lifecycle and wake integration so Firstmate reliably wakes up when crewmates finish.
Core Problems Solved
Crewmate Turn-End Wake Failure:
bin/fm-spawn.shtreatedagyas having no hook surface, sobin/fm-busy-event.shwas never armed andstate/<id>.turn-endedwas never touched.bin/fm-spawn.sharms a per-task busy generation and installs$WT/.agents/hooks.jsonwith:PreInvocation: recordsbusystate viafm-busy-event.sh.Stop: touchesstate/<id>.turn-ended, recordsidleviafm-busy-event.sh, and emits{"decision":"allow"}..agents/hooks.json,bin/fm-spawn.shsafely mergesfm-crew-busyviajqrather than clobbering existing project hooks, and excludes.agents/hooks.jsonfrom git tracking.bin/fm-control-lib.sh) and worktree teardown (bin/fm-teardown.sh),fm-crew-busyis safely pruned while preserving other project hooks.Primary Supervisor Stop-Hook Park Model:
.agents/hooks.jsonwhere command precedence previously caused newline corruption during root directory resolution.docs/supervision-protocols/agy.mdand routed inbin/fm-supervision-instructions.sh.bin/fm-watch-arm.shand returns{"decision":"continue"}upon actionable wakes, bounded by loop ceiling and block budgets.Persistent Secondmate Support:
agyinbin/fm-spawn.sh.bin/fm-agy-trust.shwith--secondmate-hometo pre-register workspace trust in~/.gemini/antigravity-cli/settings.json.In-Process Subagent Guard (from fix(agents): restrict subagent dispatch outside fleet supervision #4622):
bin/fm-subagent-pretool-check.shto parse Antigravity's.toolCall.namestdin payload and deny in-process subagent tools (invoke_subagent,define_subagent, etc.) in primary homes to enforce fleet orchestration.Herdr Backend Integrity:
agent_not_found->no-agentlogic inbin/backends/herdr.sh.Testing
Comprehensive test suites were created and verified:
tests/fm-agy-crew-turnend.test.sh: 4/4 passed (hook installation, turn-end notification, hook merging without clobbering, wiring cleanup, and secondmate trust).tests/fm-agy-primary.test.sh: 11/11 passed (Stop-hook park model, supervision need, loop bounds, repair followup, and hook command syntax).tests/fm-busy-adapter-wiring.test.sh: 14/14 passed (agylifecycle and stale rejection).tests/fm-agy-harness.test.sh: 30/30 passed (detection, models timeout, workspace trust, secondmate gate).tests/fm-subagent-pretool-check.test.sh: 13/13 passed.tests/fm-send-agy-confirm.test.sh: 6/6 passed.tests/fm-backend-herdr.test.sh: 167+ tests passed.tests/fm-control-relaunch.test.sh: All passed.tests/fm-turnend-guard.test.sh: All 92 passed.tests/fm-documentation-audiences.test.sh: All passed.shellcheck: Clean with zero errors across all modified scripts.