donmai is in 0.x preview. APIs may change between minor releases. See the changelog.

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-linear

The plugin registers the following MCP tools (tool names as received by agents):

Tool nameDescription
af_linear_get_issueGet a Linear issue by ID or identifier
af_linear_create_issueCreate a new Linear issue
af_linear_update_issueUpdate an existing issue
af_linear_create_commentPost a comment on an issue
af_linear_list_commentsList comments on an issue
af_linear_list_issuesList issues with optional filters
af_linear_add_relationAdd a relation between two issues
af_linear_list_relationsList relations for an issue
af_linear_remove_relationRemove a relation
af_linear_list_sub_issuesList sub-issues of a parent issue
af_linear_check_blockedCheck whether an issue is blocked
af_linear_create_blockerCreate a blocker issue linked to a source issue
af_linear_check_deploymentCheck 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 nameDescription
af_code_get_repo_mapPageRank-ranked map of important files
af_code_search_symbolsFind function/class/type definitions by name
af_code_search_codeBM25 keyword search with code-aware tokenization
af_code_check_duplicateExact and near-duplicate detection
af_code_find_type_usagesFind all switch/case and usage sites for a type
af_code_validate_cross_depsCheck 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.