plugin.config.ts
它负责什么
plugin.config.ts 是项目级装配入口。它会把以下内容传给:
- pipeline 选项
- 插件列表
- 任何编程式覆写
也就是传入 defineConfig(),由它生成实际执行时使用的 PipelineConfig。
这个文件定义了已经装配好的集成表面,但它本身并不意味着每个已装配插件都会真正输出文件。
当前默认装配的输出插件
当前在 cli/src/plugin.config.ts 中装配的默认输出插件包括:
AgentsOutputPluginClaudeCodeCLIOutputPluginCodexCLIOutputPlugin(现在也会输出 Codex skill bundle 和每个 skill 的mcp.json文件)JetBrainsAIAssistantCodexOutputPluginDroidCLIOutputPluginGeminiCLIOutputPluginOpencodeCLIOutputPluginQoderIDEPluginOutputPluginTraeIDEOutputPluginTraeCNIDEOutputPluginWarpIDEOutputPluginWindsurfOutputPluginCursorOutputPluginGitExcludeOutputPluginJetBrainsIDECodeStyleConfigOutputPluginVisualStudioCodeIDEConfigOutputPluginReadmeMdConfigFileOutputPlugin(也会输出.editorconfig)
装配与启用的区别
plugin.config.ts 回答的是:
- 哪些插件实现被装配进运行时
- 项目已知可以生成哪些目标
~/.aindex/.tnmsc.json 回答的是:
- 这些已装配插件中,当前哪些被允许实际输出
当前内建默认行为是:
plugins.git默认启用plugins.readme默认启用,同时也覆盖.editorconfig输出- 其他已装配的输出插件默认保持关闭,直到用户在
~/.aindex/.tnmsc.json中显式启用 ~/.aindex/.tnmsc.json里的plugins配置块只能使用 JSON Schema 中受支持的键;不受支持的键现在会触发配置错误并中止运行
示例:
{
"plugins": {
"git": true,
"claudeCode": true,
"trae": true
}
}这意味着什么
这份配置不是展示性质的示例文档,而是当前真实装配后的运行时表面。只要某个插件出现在这里,运行时就知道如何面向它输出;至于它是否真的写文件,则取决于上面提到的用户配置启用规则。
最小心智模型
你可以把 plugin.config.ts 理解为这样一个文件:
- 选择哪些目标被装配进运行时
- 决定是否在项目级追加编程式配置
- 让项目配置与全局用户配置合并,而不是完全绕过后者
Last updated on