Skip to content

feat(agents): add amp adapter#122

Closed
yyovil wants to merge 1 commit into
agents/02-droidfrom
agents/03-amp
Closed

feat(agents): add amp adapter#122
yyovil wants to merge 1 commit into
agents/02-droidfrom
agents/03-amp

Conversation

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 6, 2026

Greptile Summary

Adds the amp agent adapter following the same pattern as the existing droid, grok, and opencode adapters. The adapter is registered in registry.Constructors() and the resolver smoke-test in wiring_test.go is updated to assert HarnessAmp → "amp".

  • amp.go: Implements adapters.Adapter + ports.Agent with GetLaunchCommand (using --permission-mode / --append-system-prompt[-file] / -- separator), GetRestoreCommand (via --resume <agentSessionID>), and intentional no-ops for GetAgentHooks and SessionInfo pending a future Amp TypeScript plugin.
  • amp_test.go: Covers every public method, all three permission modes, both system-prompt paths, and context-cancellation for every method.
  • Registry + wiring: Single-line additions to Constructors() and the resolver test table.

Confidence Score: 5/5

Safe to merge — the adapter is a well-scoped addition that follows the established patterns without touching any shared logic paths.

The adapter correctly implements every interface method with context guards, the binary-caching mutex is used consistently, all permission modes are mapped, and the test suite covers every method including context-cancellation. No issues found in the changed files or their direct integration points.

No files require special attention.

Important Files Changed

Filename Overview
backend/internal/adapters/agent/amp/amp.go New adapter implementing the full ports.Agent interface; follows the established droid/grok pattern with correct mutex-guarded binary caching, context guards on all methods, and a clear fallback to the bare "amp" name when the binary is not found.
backend/internal/adapters/agent/amp/amp_test.go Comprehensive test suite covering all methods, permission-mode mapping, system-prompt prioritisation, and context-cancellation for every interface method including GetLaunchCommand.
backend/internal/adapters/agent/registry/registry.go Single-line addition of amp.New() to Constructors(); no other logic changed.
backend/internal/daemon/wiring_test.go Adds the HarnessAmp → "amp" entry to the resolver smoke-test table; correctly validates end-to-end wiring from harness constant through registry to adapter manifest ID.

Reviews (2): Last reviewed commit: "feat(agents): add amp adapter" | Re-trigger Greptile

Comment thread backend/internal/adapters/agent/amp/amp.go
Comment thread backend/internal/adapters/agent/amp/amp.go Outdated
Comment thread backend/internal/adapters/agent/amp/amp_test.go
Registers the amp harness, stacked on the agent platform.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants