feat(agents): add agy adapter#123
Conversation
Greptile SummaryIntroduces a complete
Confidence Score: 5/5Safe to merge — the change is a self-contained new adapter that does not touch existing session or dispatch logic. All changed files are additive: a new package plus one-line registrations in dispatch, registry, and the wiring smoke test. The adapter follows the established pattern from droid/amp/codex exactly, the binary cache uses correct double-checked RWMutex locking, hook install/uninstall is idempotent and preserves user-defined hooks, and the shared hookutil.AtomicWriteFile is used for crash-safe writes. Test coverage spans manifest, launch, restore, session-info, and the full hooks lifecycle. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant AO as AO Daemon
participant Registry as registry.Constructors()
participant Plugin as agy.Plugin
participant Hooks as .gemini/hooks.json
participant AgyCLI as agy CLI
participant Dispatch as activitydispatch
AO->>Registry: Constructors()
Registry-->>AO: [..., agy.New()]
Note over AO,Plugin: Session Launch
AO->>Plugin: GetLaunchCommand(cfg)
Plugin->>Plugin: agyBinary() [RWMutex cache]
Plugin-->>AO: ["agy", "--add-dir", path, "--prompt-interactive", prompt]
Note over AO,Hooks: Hook Installation
AO->>Plugin: GetAgentHooks(cfg)
Plugin->>Hooks: read .gemini/hooks.json
Plugin->>Plugin: merge AO hooks (idempotent)
Plugin->>Hooks: atomic write via hookutil
Note over AgyCLI,Dispatch: Activity Reporting (runtime)
AgyCLI->>AgyCLI: fires BeforeAgent hook
AgyCLI->>AO: exec "ao hooks agy before-agent"
AO->>Dispatch: Derive("agy", "before-agent", payload)
Dispatch->>Dispatch: agy.DeriveActivityState
Dispatch-->>AO: ActivityActive
Note over AO,Plugin: Session Restore
AO->>Plugin: GetRestoreCommand(cfg)
Plugin-->>AO: ["agy", "--add-dir", path, "--conversation", nativeID]
Reviews (2): Last reviewed commit: "feat(agents): add agy adapter" | Re-trigger Greptile |
Registers the agy harness, stacked on the agent platform. Includes its own activity deriver. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the agy harness, stacked on #119 (agent platform). Adapter package +
Constructors()registration + resolver test. Includes its own activity deriver.🤖 Generated with Claude Code
Stack