Skip to content

Follow up Amp upstream updates: Plugin API (hooks via .amp/plugins/*.ts) #1938

Description

@dyoshikawa

Summary

Amp shipped a Plugin API (part of the "Neo" rebuild) that is the event-reaction surface rulesync models as hooks for other tools, but hooks is unsupported for amp. (Amp's rules/mcp/skills/permissions surfaces are current — see #1788 / #1739; this is the remaining gap. Custom commands were intentionally removed upstream and correctly remain unsupported.)

Recent Releases

Gaps

  • hooks — Amp Plugin API unmapped (unsupported). Amp plugins are TypeScript files in .amp/plugins/*.ts (project) and ~/.config/amp/plugins/*.ts (global) that subscribe to lifecycle/hook events via amp.on(...): session.start, tool.call, tool.result, agent.start, agent.end — the same role rulesync's hooks feature fills for other tools (e.g. Claude Code's PreToolUse/PostToolUse). The legacy Toolbox surface (AMP_TOOLBOX, .amp/toolbox) is now deprecated in favor of plugins. rulesync has no src/features/hooks/amp-hooks.ts; amp --features hooks prints "does not support the feature 'hooks'. Skipping."

Proposed Follow-up

  • Evaluate a hooks adapter for Amp targeting .amp/plugins/*.ts (project) and ~/.config/amp/plugins/*.ts (global), mapping rulesync hook events onto amp.on(...) (tool.call → pre-tool, tool.result → post-tool, agent.start/agent.end → session lifecycle). Caveat: Amp plugins are arbitrary TypeScript code rather than declarative command/matcher entries, so this is a generation-shape decision (emit a TS plugin wrapper) rather than JSON config — worth a design discussion before implementing.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    consideringenhancementNew feature or requestmaintainer-scrapRough notes for AI implementation. Not for human eyes.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions