mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-21 21:56:46 +00:00
1.0 KiB
1.0 KiB
Agent Tools Performance
Tool tests should not load full channel or plugin runtimes for static tool descriptions.
Guardrails
- Message-tool discovery should flow through shared discovery helpers and lightweight channel artifacts before falling back to a full channel plugin load.
- Channel-specific tool schemas, action lists, and static capabilities belong in plugin-owned helpers that are reused by both the full plugin and the lightweight artifact.
- Do not add direct bundled-plugin imports to agent tool tests for schema or capability assertions. If the production path needs the same data, promote a small public artifact instead.
- If a single assertion starts paying multi-second import/setup cost, split the static descriptor path from runtime execution instead of adding more mocks around the broad import.
Verification
- For
src/agents/tools/*.test.tsperformance work, compare targeted file runtime withpnpm test <file>before/after. - Run
pnpm buildwhen adding or changing bundled plugin artifacts.