Plugins overview
What a ToolPlugin is, how plugins are loaded, and what ships out of the box.
Agent tools in donmai are extended through plugins. A plugin is a TypeScript
package that implements the ToolPlugin interface from @donmai/core. When an
agent session starts, each registered plugin's createTools() method is called
and the returned tool definitions are injected into the agent's MCP tool set.
How plugins are loaded
Plugins are registered in code by the CLI/orchestrator layer at agent spawn time. There is no config-file plugin declaration - plugins are compiled into the orchestrator package that starts sessions.
@donmai/plugin-linear
The Linear tools ship inside the donmai binary: the daemon wires them to
agents as in-process MCP tools, so agents call them directly instead of
shelling out to the donmai linear CLI. No install is required to use them.
@donmai/plugin-linear is the TypeScript package that implements those tools
against the ToolPlugin interface. It is published to npm and stays
resolvable, but the @donmai/* plugin scope is deprecated: no further
packages are published to it. Install it only when you are embedding the
Linear tools in your own TypeScript orchestrator rather than running the
binary.
npm install @donmai/plugin-linearThe plugin registers 17 MCP tools (tool names as received by agents):
| Tool name | Description |
|---|---|
af_linear_get_issue | Get a Linear issue by ID or identifier |
af_linear_create_issue | Create a new Linear issue |
af_linear_update_issue | Update an existing issue |
af_linear_create_comment | Post a comment on an issue |
af_linear_list_comments | List comments on an issue |
af_linear_list_issues | List issues with optional filters |
af_linear_list_backlog_issues | List all backlog issues for a project |
af_linear_list_unblocked_backlog | List unblocked backlog issues for a project (sorted by priority) |
af_linear_add_relation | Add a relation between two issues |
af_linear_list_relations | List relations for an issue |
af_linear_remove_relation | Remove a relation |
af_linear_list_sub_issues | List sub-issues of a parent issue |
af_linear_list_sub_issue_statuses | List status of all sub-issues for a parent issue |
af_linear_update_sub_issue | Update a sub-issue state and optionally add a comment |
af_linear_check_blocked | Check whether an issue is blocked |
af_linear_create_blocker | Create a blocker issue linked to a source issue |
af_linear_check_deployment | Check whether a PR has been deployed |
Code intelligence tools
The 6 code intelligence tools ship inside the donmai binary. The binary's embedded code-intel runner makes them available to agents as in-process MCP tools without any npm install.
code intelligence ships in the binary
@donmai/code-intelligence npm package: it was never published and none is planned. The @donmai/* plugin scope is deprecated for further publishes, so do not wait on one. The legacy package @renseiai/agentfactory-code-intelligence is deprecated (historical name only). The six code ops ship natively in the binary as donmai code subcommands; no npm package is required.| Tool name | Description |
|---|---|
af_code_get_repo_map | PageRank-ranked map of important files |
af_code_search_symbols | Find function/class/type definitions by name |
af_code_search_code | BM25 keyword search with code-aware tokenization |
af_code_check_duplicate | Exact and near-duplicate detection |
af_code_find_type_usages | Find all switch/case and usage sites for a type |
af_code_validate_cross_deps | Check cross-package import declarations |
These tools are optional. If the binary's code-intel runner is not active, agents still work fully - they just will not have the code intelligence tools available.
Writing your own plugin
See Authoring a plugin for the ToolPlugin interface
and a worked example.