
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@ampcode/plugin
Advanced tools
Amp plugins are TypeScript files that extend and customize Amp. Plugins live in .amp/plugins/ (project) or ~/.config/amp/plugins/ (global).
The Amp plugin API is experimental. Expect many breaking changes if you choose to use it right now. Do not use it for anything critical.
The plugin API supports:
amp.on(...) for hooking into tool calls, messages, and other eventsamp.registerTool(...) for custom toolsamp.registerCommand(...) to add to Amp's command palettectx.ui.notify(...), ctx.ui.confirm(...)amp.ai.ask(...) for yes-no LLM answersYou can use plugins to:
See Amp Plugin API documentation.
Run the Amp CLI with PLUGINS=all amp to use plugins. If the PLUGINS env var is not set, plugins are disabled. Plugins can execute arbitrary code, so only enable plugins when running Amp in trusted workspaces.
Limitations:
npm install.Use this prompt:
Make an Amp plugin to __________. See https://ampcode.com/manual/plugin-api for docs.
PLUGINS=all ampCtrl-o plugins: reload to reload all plugins after they're changed.// @i-know-the-amp-plugin-api-is-wip-and-very-experimental-right-now..amp/plugins/permissions.ts:
// @i-know-the-amp-plugin-api-is-wip-and-very-experimental-right-now
import type { PluginAPI } from '@ampcode/plugin'
export default function (amp: PluginAPI) {
// Ask the user before executing any tool.
amp.on('tool.call', async (event, ctx) => {
const confirmed = await ctx.ui.confirm({
title: `Allow ${event.tool}?`,
message: `The agent wants to execute the "${event.tool}" tool.`,
confirmButtonText: 'Allow',
})
if (!confirmed) {
ctx.logger.log(`User rejected tool execution: ${event.tool}`)
return {
action: 'reject-and-continue',
message: `User rejected execution of tool ${event.tool}.`,
}
}
return { action: 'allow' }
})
}
Amp's plugin API is inspired by pi's extension API, created by the awesome genius Mario Zechner.
FAQs
Amp Plugin API
We found that @ampcode/plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.