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
@donmai/plugin-linear is the canonical shipped plugin. It exposes Linear
operations as in-process MCP tools that agents call directly instead of
shelling out to the rensei linear CLI.
Install:
npm install @donmai/plugin-linearThe plugin registers the following 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_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_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
When @renseiai/agentfactory-code-intelligence is installed, agents receive
six additional MCP tools for in-codebase search:
| 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 package is not installed, agents still work
fully — they just won't have af_code_* tools available.
Writing your own plugin
See Authoring a plugin for the ToolPlugin interface
and a worked example.