CodeVetter · Repo Unpack · Extension points
microsoft/rushstack
Extension mechanisms are explicit and operate at several layers: CLI commands, operation graphs, project tasks, generated documentation, and MCP tools. Configuration rigs supply reusable defaults, while public APIs support programmatic invocation. Hooks distinguish session registration from per-graph execution customization. Plugin mechanisms load executable code and therefore carry compatibility and trust requirements.
- Rush adds custom actions from CommandLineConfiguration.commands and plugin-supplied configurations; a plugin-provided build command suppresses automatic creation of the default build command.
- Rush session hooks runAnyPhasedCommand and runPhasedCommand[actionName] allow registration before createOperationsAsync receives the operation set and execution context.
- onGraphCreatedAsync exposes the constructed graph and initial snapshot; graph hooks can transform operation environments and observe request results, including native PATH augmentation and afterExecuteRequestAsync.
- Heft plugins implement apply(session, heftConfiguration, pluginOptions); task and lifecycle interfaces distinguish scope, and an optional accessor lets other plugins request access within the same phase.
- Heft configuration extends rig profiles and augments phasesByName/tasksByName with named task plugins, options, and dependencies; Explorer’s TypeScript task explicitly depends on pre-compile-copy.
- API Extractor supports loadConfigAndInvoke or invoke with prepared configuration; ExtractorConfig.prepare accepts runtime configuration objects, but requires extends expansion and an absolute configObjectFullPath when supplied.
- Documenter resolves config-listed plugin packages, requires apiDocumenterPluginManifest version 1000, selects named features, permits one MarkdownDocumenterFeature, and invokes initialization, pre-write, and finished callbacks.
- MCP loads schema-validated mcpPlugins from common/config/rush-mcp/rush-mcp.json, prepares their autoinstallers, reads rush-mcp-plugin.json manifests, and exposes registerTool with Zod schema shapes and bound executeAsync callbacks.