Repository navigation
feat(amp): Add user plugins - #56
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a23a17-65fa-77cc-9c9f-cb97cc958ff5 Co-authored-by: Amp <amp@ampcode.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
ℹ️ No blocking issues — three non-blocking findings below.
Approach: sound — the three official Finder/Librarian/Oracle plugins are vendored with only model/effort changes, and btw adds a small side-thread command on the same plugin API; all four typecheck and load against the current CLI.
Reviewed changes — reviewed the full 684-line diff for the four new Amp plugins under .config/amp/plugins/:
btwcommand — registersbtw.ask, prompts for a question, creates a child thread ondeepseek/deepseek-v4.1-flashat high effort, waits up to two minutes, then offers to open the thread URL.findertool — read-onlyshell_commandsubagent onzhipuai/glm-5.3-flashat low effort; returns file links and line ranges.librariantool — clones repositories into/tmp/amp-librarian/and researches them ondeepseek/deepseek-v4.1-flash-1017at high effort.oracletool — read-only review/advice subagent ondeepseek/deepseek-v4-pro-0813at high effort; can delegate tofinderandlibrarian.
Non-blocking
btwside thread inherits the full tool set. The agent is created with onlymodelandreasoningEffort, sotoolsdefaults to'all'and a "quick side question" can edit files in the workspace; consider restricting it to read-only tools (ortools: { include: [] }) if the command is meant to answer only. btw.ts#L20- A timed-out subagent thread keeps running.
waitForResponserejects whentimeoutMselapses but does not cancel the child thread, and these threads are created withoutshow: true, so a finder/librarian/oracle timeout leaves an invisible thread consuming tokens; cancel it in acatchbefore rethrowing. The same pattern is at librarian.ts#L157 and oracle.ts#L191. finder.ts#L112 - The librarian's clone reuse check races. The prompt tells the agent to clone into
/tmp/amp-librarian/<owner>__<repo>and reuse it whentest -d "$dir/.git"succeeds; two librarian calls for the same repo can both pass that check and race ongit clone. Clone into a unique temp directory (or retry against the existing clone) to make parallel calls safe. librarian.ts#L15-L17
deepseek-v4.1-flash-1017 | 𝕏
Amp-Thread-ID: https://ampcode.com/threads/T-01a23a17-65fa-77cc-9c9f-cb97cc958ff5 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
ℹ️ No blocking issues — the timeout cleanup is sound; one non-blocking note on
btwbelow.
Reviewed changes — reviewed the delta since the prior pullfrog review (fe2c0d4), which adds cancellation to every timed-out child thread:
- Timed-out subagent threads are cancelled.
runSubagentinfinder,librarian, andoraclenow awaitsthread.cancel()before rethrowing, so a hidden child thread no longer keeps running afterwaitForResponsetimes out. btwcancels its side thread on timeout. The command stops the child thread before showing the failure, which introduces the tradeoff noted below.
Non-blocking
btwdiscards the late answer when its wait times out. The newbtw.cancel()stops the side thread, but the dialog still offers "Open BTW Thread", which now opens a cancelled thread that will never finish; either leavebtw's visible thread running (the dialog already lets the user retrieve it) or skip the open prompt when the thread was cancelled. btw.ts#L52
deepseek-v4.1-flash-1017 | 𝕏
Amp-Thread-ID: https://ampcode.com/threads/T-01a23a17-65fa-77cc-9c9f-cb97cc958ff5 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — reviewed the delta since the prior pullfrog review (fe2c0d4):
btwnow reports a stopped side thread instead of offering a dead one. On awaitForResponsetimeout or error, the command cancels the side thread, notifies the failure message, and returns before the "Open BTW Thread" confirm, so the dialog no longer points at a thread that can never finish.
deepseek-v4.1-flash-1017 | 𝕏

These four Amp plugins had only been living in the personal plugins repository, so a fresh machine had no record of them in the dotfiles repository. Adding them here keeps the setup versioned with the rest of the configuration.
Each plugin is a single TypeScript file under
.config/amp/plugins/. Thebtwplugin registers a command that asks a side question in a separate thread without interrupting the current one, running ondeepseek/deepseek-v4.1-flashat high effort. The other three register thefinder,librarian, andoracletools, which each delegate a turn to a child thread running a search, research, or review prompt. Those three share one pattern: create the child thread, append the task, and wait for the response rather than callingagent.run, becauseagent.runfails when a plugin agent's thread invokes the tool.To verify, load the directory as project plugins and list them:
The output should report the
finder,librarian, andoracletools and thebtw: Askcommand, each active.Making the plugins available to running sessions is a separate step: they take effect after they are published to the personal plugins repository, since Amp loads personal plugins from the pushed commit.