@teamix-evo/mcp 0.4.0 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +64 -16
- package/dist/cli.js.map +1 -1
- package/dist/data/adr/0001-three-layer-alignment.md +11 -11
- package/dist/data/adr/0005-ui-no-variant.md +4 -4
- package/dist/data/adr/0006-ui-upgrade-no-baseline.md +6 -6
- package/dist/data/adr/0010-design-default-and-variants.md +1 -1
- package/dist/data/adr/0019-project-upgrade-flow.md +13 -13
- package/dist/data/adr/0021-semantic-color-api-unification.md +127 -0
- package/dist/data/adr/0022-preferences-css-boundary.md +75 -0
- package/dist/data/adr/0023-cursor-pointer-explicit-in-component-source.md +70 -0
- package/dist/data/adr/0024-scoped-css-radix-state-conflict.md +99 -0
- package/dist/data/adr/0025-component-props-explicit-declaration.md +145 -0
- package/dist/data/adr/0026-component-level-token-alias.md +107 -0
- package/dist/data/adr/0027-component-visual-token-alignment.md +127 -0
- package/dist/data/adr/0028-ui-component-categorization.md +112 -0
- package/dist/data/adr/0029-input-split-and-prefix-suffix-removal.md +68 -0
- package/dist/data/adr/0030-skill-uni-manager-uplift.md +56 -0
- package/dist/data/adr/0031-skill-templates-decoupling.md +77 -0
- package/dist/data/adr/0032-opentrek-v4.1-brand-token-alignment.md +129 -0
- package/dist/data/adr/0033-entry-skill-global-only-scope.md +64 -0
- package/dist/data/adr/0034-skills-cli-verb-alignment.md +61 -0
- package/dist/data/adr/0035-skills-update-scope-and-lock-gates.md +69 -0
- package/dist/data/adr/0036-ui-v2-shadcn-baseline-rebuild.md +146 -0
- package/dist/data/adr/0037-filter-bar-composable-architecture.md +426 -0
- package/dist/data/adr/0038-create-agents-md-skill-trigger-fallback.md +99 -0
- package/dist/data/adr/0040-component-source-layer-upgrade-flow.md +104 -0
- package/dist/data/adr/README.md +41 -28
- package/dist/index.js +64 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/data/adr/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Architecture Decision Records
|
|
2
2
|
|
|
3
3
|
> 本目录沉淀 Teamix Evo 的"为什么这么做"——决策的上下文、选项、取舍与后果。
|
|
4
|
-
> 设计参照 [Michael Nygard.
|
|
4
|
+
> 设计参照 [Michael Nygard. _Documenting Architecture Decisions_. 2011](https://www.cognitect.com/blog/2011/11/15/documenting-architecture-decisions)。
|
|
5
5
|
|
|
6
6
|
## 为什么需要 ADR
|
|
7
7
|
|
|
@@ -13,33 +13,46 @@ ADR 补这一层。每条 ADR 是一份**单决策档案**:在某一时刻、某
|
|
|
13
13
|
|
|
14
14
|
ADR 按编号区段对应 [PLAN §12](../../PLAN.md#12-五层模型驱动的演进规划v05) 的抽象层:
|
|
15
15
|
|
|
16
|
-
| 编号区段
|
|
17
|
-
|
|
|
18
|
-
| 0001–0099 | 工程哲学(Philosophy)
|
|
16
|
+
| 编号区段 | 抽象层 | 内容 |
|
|
17
|
+
| --------- | ------------------------------------ | -------------------------------------------------- |
|
|
18
|
+
| 0001–0099 | 工程哲学(Philosophy) | 跨工种共享、几乎不变的工程理念 |
|
|
19
19
|
| 0100–0999 | 协议与工具(Foundations + Patterns) | CLI 命令、Schema、组件、Skills、MCP 等具体协议决策 |
|
|
20
|
-
| 1000+
|
|
20
|
+
| 1000+ | 业务消费方决策(Scenarios) | 真实业务团队装机后的领域决策 |
|
|
21
21
|
|
|
22
22
|
> **种子 ADR 的特殊处理**:0001–0006 是 P0-1 任务从 PLAN.md §1 / §10 / §11 / 附录 B 反向沉淀的"已发生决策",作为种子条目使用顺序号,不严格按区段分配。从 0007 起按区段约定执行。
|
|
23
23
|
|
|
24
24
|
## 当前 ADR 索引
|
|
25
25
|
|
|
26
|
-
| #
|
|
27
|
-
|
|
|
28
|
-
| 0001 | [三层对齐(能力/理念/工程)](0001-three-layer-alignment.md)
|
|
29
|
-
| 0002 | [包命名方案](0002-package-naming.md)
|
|
30
|
-
| 0003 | [资源升级三态语义](0003-update-strategy-tri-state.md)
|
|
31
|
-
| 0004 | [CLI 命令结构](0004-cli-command-structure.md)
|
|
32
|
-
| 0005 | [UI 包不分 variant](0005-ui-no-variant.md)
|
|
33
|
-
| 0006 | [UI 升级机制无 baseline](0006-ui-upgrade-no-baseline.md)
|
|
34
|
-
| 0007 | [治理文档放根目录,与 packages/docs/ 分离](0007-governance-docs-at-root.md)
|
|
35
|
-
| 0008 | [ESLint 视觉规则暂为 warn 级,等待 design 补 token](0008-eslint-visual-rules-warn-baseline.md)
|
|
36
|
-
| 0009 | [registry-mcp 作为 AI 协议层的第一个 MCP server](0009-registry-mcp-protocol-layer.md)
|
|
37
|
-
| 0010 | [design 默认+变体模型(default + variants/ + extends
|
|
38
|
-
| 0011 | [MCP 单包单 bin 多 group + registry-mcp 改名 mcp](0011-mcp-single-package-multi-group.md)
|
|
39
|
-
| 0012 | [ESLint/Stylelint 双包共享 lint-core 内核](0012-lint-shared-core.md)
|
|
40
|
-
| 0013 | [Skills source-mirror 模型(.teamix-evo/skills/ 为源)](0013-skills-source-mirror.md)
|
|
41
|
-
| 0014 | [ui / biz-ui / templates 三层包分层(三包共享变体名空间)](0014-ui-biz-ui-templates-tier.md)
|
|
42
|
-
| 0019 | [已有工程升级 Teamix Evo 流程(语义合并 / 变体迁移 / cva codemod)](0019-project-upgrade-flow.md)
|
|
26
|
+
| # | 标题 | 状态 | 日期 |
|
|
27
|
+
| ---- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------- | ---------- |
|
|
28
|
+
| 0001 | [三层对齐(能力/理念/工程)](0001-three-layer-alignment.md) | Superseded by 0036 | 2026-05-15 |
|
|
29
|
+
| 0002 | [包命名方案](0002-package-naming.md) | Accepted | 2026-05-13 |
|
|
30
|
+
| 0003 | [资源升级三态语义](0003-update-strategy-tri-state.md) | Accepted | 2026-05-13 |
|
|
31
|
+
| 0004 | [CLI 命令结构](0004-cli-command-structure.md) | Accepted | 2026-05-13 |
|
|
32
|
+
| 0005 | [UI 包不分 variant](0005-ui-no-variant.md) | Superseded by 0036 | 2026-05-14 |
|
|
33
|
+
| 0006 | [UI 升级机制无 baseline](0006-ui-upgrade-no-baseline.md) | Superseded by 0036 | 2026-05-14 |
|
|
34
|
+
| 0007 | [治理文档放根目录,与 packages/docs/ 分离](0007-governance-docs-at-root.md) | Accepted | 2026-05-17 |
|
|
35
|
+
| 0008 | [ESLint 视觉规则暂为 warn 级,等待 design 补 token](0008-eslint-visual-rules-warn-baseline.md) | Accepted | 2026-05-17 |
|
|
36
|
+
| 0009 | [registry-mcp 作为 AI 协议层的第一个 MCP server](0009-registry-mcp-protocol-layer.md) | Superseded in part by 0011 | 2026-05-17 |
|
|
37
|
+
| 0010 | [design 默认+变体模型(default + variants/ + extends,文件级覆盖)](0010-design-default-and-variants.md) | Superseded by 0036 | 2026-05-18 |
|
|
38
|
+
| 0011 | [MCP 单包单 bin 多 group + registry-mcp 改名 mcp](0011-mcp-single-package-multi-group.md) | Proposed | 2026-05-18 |
|
|
39
|
+
| 0012 | [ESLint/Stylelint 双包共享 lint-core 内核](0012-lint-shared-core.md) | Proposed | 2026-05-18 |
|
|
40
|
+
| 0013 | [Skills source-mirror 模型(.teamix-evo/skills/ 为源)](0013-skills-source-mirror.md) | Proposed | 2026-05-18 |
|
|
41
|
+
| 0014 | [ui / biz-ui / templates 三层包分层(三包共享变体名空间)](0014-ui-biz-ui-templates-tier.md) | Proposed | 2026-05-18 |
|
|
42
|
+
| 0019 | [已有工程升级 Teamix Evo 流程(语义合并 / 变体迁移 / cva codemod)](0019-project-upgrade-flow.md) | Proposed | 2026-05-21 |
|
|
43
|
+
| 0021 | [语义色 API 统一治理(`tone`/`status`/`variant` 三分 + 字面值对齐 token)](0021-semantic-color-api-unification.md) | Accepted | 2026-05-29 |
|
|
44
|
+
| 0022 | [preferences.css 边界约束(仅装机偏好,禁止组件级 utility / token alias)](0022-preferences-css-boundary.md) | Accepted | 2026-05-31 |
|
|
45
|
+
| 0025 | [组件 Props 显式声明规范](0025-component-props-explicit-declaration.md) | Superseded by 0036 | 2026-06-01 |
|
|
46
|
+
| 0026 | [组件级 token 别名创建准则](0026-component-level-token-alias.md) | Superseded by 0036 | 2026-06-02 |
|
|
47
|
+
| 0027 | [组件视觉属性全轴对齐设计系统基线](0027-component-visual-token-alignment.md) | Superseded by 0036 | 2026-06-02 |
|
|
48
|
+
| 0028 | [UI 组件分类对齐 Ant Design 5.x](0028-ui-component-categorization.md) | Superseded by 0036 | 2026-06-02 |
|
|
49
|
+
| 0029 | [Input 拆分 + 移除 prefix/suffix/addon 快捷 prop + AutoComplete 内核同源化](0029-input-split-and-prefix-suffix-removal.md) | Superseded by 0036 | 2026-06-02 |
|
|
50
|
+
| 0030 | [uni-manager 变体 design + code skill 落地 + 通用规则反哺 opentrek](0030-skill-uni-manager-uplift.md) | Accepted | 2026-06-02 |
|
|
51
|
+
| 0031 | [AI Skill 链路解耦 `@teamix-evo/templates` 包(patterns/ 单一默认来源)](0031-skill-templates-decoupling.md) | Accepted | 2026-06-02 |
|
|
52
|
+
| 0036 | [UI 组件库 v2:以 shadcn v4 为基线全量重建](0036-ui-v2-shadcn-baseline-rebuild.md) | Accepted | 2026-06-05 |
|
|
53
|
+
| 0037 | [FilterBar v2 重做:组合式架构 + shadcn 三段式子组件](0037-filter-bar-composable-architecture.md) | Accepted | 2026-06-08 |
|
|
54
|
+
| 0038 | [create 工程根落地 AGENTS.md 作为 skill 触发兜底](0038-create-agents-md-skill-trigger-fallback.md) | Accepted | 2026-06-11 |
|
|
55
|
+
| 0040 | [组件源码层升级流程(ui / biz-ui staging-driven upgrade)](0040-component-source-layer-upgrade-flow.md) | Accepted | 2026-06-11 |
|
|
43
56
|
|
|
44
57
|
## 写新 ADR 的流程
|
|
45
58
|
|
|
@@ -52,12 +65,12 @@ ADR 按编号区段对应 [PLAN §12](../../PLAN.md#12-五层模型驱动的演
|
|
|
52
65
|
|
|
53
66
|
## 状态值
|
|
54
67
|
|
|
55
|
-
| 状态
|
|
56
|
-
|
|
|
57
|
-
| Proposed
|
|
58
|
-
| Accepted
|
|
59
|
-
| Superseded by NNNN | 被另一条 ADR 替代
|
|
60
|
-
| Deprecated
|
|
68
|
+
| 状态 | 含义 |
|
|
69
|
+
| ------------------ | ----------------------- |
|
|
70
|
+
| Proposed | 草案,等待评审 |
|
|
71
|
+
| Accepted | 已采纳并执行 |
|
|
72
|
+
| Superseded by NNNN | 被另一条 ADR 替代 |
|
|
73
|
+
| Deprecated | 决策不再适用,但无新替代 |
|
|
61
74
|
|
|
62
75
|
## 反向约束
|
|
63
76
|
|
package/dist/index.js
CHANGED
|
@@ -88,33 +88,46 @@ function parseFrontmatter(text) {
|
|
|
88
88
|
|
|
89
89
|
// src/groups/registry.ts
|
|
90
90
|
var ListComponentsInput = z.object({
|
|
91
|
-
status: z.enum(["stable", "experimental", "deprecated"]).optional()
|
|
91
|
+
status: z.enum(["stable", "experimental", "deprecated"]).optional(),
|
|
92
|
+
/**
|
|
93
|
+
* Include archived entries from `manifest.deprecatedEntries` (ADR 0028).
|
|
94
|
+
* Equivalent to `status: "deprecated"` when set alone, but composes with
|
|
95
|
+
* other filters: e.g. unset status + `includeDeprecated: true` returns
|
|
96
|
+
* active + deprecated together.
|
|
97
|
+
*/
|
|
98
|
+
includeDeprecated: z.boolean().optional()
|
|
92
99
|
});
|
|
93
100
|
var GetComponentMetaInput = z.object({
|
|
94
101
|
id: z.string().min(1)
|
|
95
102
|
});
|
|
96
103
|
var FindComponentsInput = z.object({
|
|
97
104
|
query: z.string().min(1),
|
|
98
|
-
limit: z.number().int().positive().max(100).optional()
|
|
105
|
+
limit: z.number().int().positive().max(100).optional(),
|
|
106
|
+
/** Include archived deprecated entries in matches (ADR 0028). */
|
|
107
|
+
includeDeprecated: z.boolean().optional()
|
|
99
108
|
});
|
|
100
109
|
var TOOLS = [
|
|
101
110
|
{
|
|
102
111
|
name: "list_components",
|
|
103
|
-
description:
|
|
112
|
+
description: 'List UI components in the @teamix-evo/ui registry. By default excludes archived `deprecatedEntries` (ADR 0028) \u2014 pass `includeDeprecated: true` (or `status: "deprecated"`) to inspect them, e.g. for upgrade audits. Returns id, name, description, status, registryDependencies \u2014 small enough for the model to scan whole.',
|
|
104
113
|
inputSchema: {
|
|
105
114
|
type: "object",
|
|
106
115
|
properties: {
|
|
107
116
|
status: {
|
|
108
117
|
type: "string",
|
|
109
118
|
enum: ["stable", "experimental", "deprecated"],
|
|
110
|
-
description: "Filter by maturity status."
|
|
119
|
+
description: "Filter active entries by maturity status. `deprecated` returns the archived `deprecatedEntries` list."
|
|
120
|
+
},
|
|
121
|
+
includeDeprecated: {
|
|
122
|
+
type: "boolean",
|
|
123
|
+
description: "When true, merge archived `deprecatedEntries` into the result (ADR 0028)."
|
|
111
124
|
}
|
|
112
125
|
}
|
|
113
126
|
}
|
|
114
127
|
},
|
|
115
128
|
{
|
|
116
129
|
name: "get_component_meta",
|
|
117
|
-
description: "Fetch the full registry entry + parsed meta.md for a single component by id. Returns props schema reference, registryDependencies, npm dependencies, AI generation rules, and the component description.",
|
|
130
|
+
description: "Fetch the full registry entry + parsed meta.md for a single component by id. Searches both active `entries` and archived `deprecatedEntries`; deprecated hits are flagged via `archived: true` in the payload. Returns props schema reference, registryDependencies, npm dependencies, AI generation rules, and the component description.",
|
|
118
131
|
inputSchema: {
|
|
119
132
|
type: "object",
|
|
120
133
|
properties: {
|
|
@@ -128,7 +141,7 @@ var TOOLS = [
|
|
|
128
141
|
},
|
|
129
142
|
{
|
|
130
143
|
name: "find_components",
|
|
131
|
-
description: 'Substring match over component id / name / description. Use when you need a component but don\'t know its exact id (e.g. "find a component supporting async search and pagination"). Returns up to `limit` matches (default 10). Note: substring match is a v0.1 implementation; semantic search is planned for v0.7 (see ADR 0009).',
|
|
144
|
+
description: 'Substring match over component id / name / description. Use when you need a component but don\'t know its exact id (e.g. "find a component supporting async search and pagination"). Excludes archived `deprecatedEntries` by default \u2014 pass `includeDeprecated: true` to widen the search (ADR 0028). Returns up to `limit` matches (default 10). Note: substring match is a v0.1 implementation; semantic search is planned for v0.7 (see ADR 0009).',
|
|
132
145
|
inputSchema: {
|
|
133
146
|
type: "object",
|
|
134
147
|
properties: {
|
|
@@ -141,6 +154,10 @@ var TOOLS = [
|
|
|
141
154
|
minimum: 1,
|
|
142
155
|
maximum: 100,
|
|
143
156
|
description: "Max matches to return (default 10)."
|
|
157
|
+
},
|
|
158
|
+
includeDeprecated: {
|
|
159
|
+
type: "boolean",
|
|
160
|
+
description: "When true, also search archived `deprecatedEntries` (ADR 0028)."
|
|
144
161
|
}
|
|
145
162
|
},
|
|
146
163
|
required: ["query"]
|
|
@@ -160,6 +177,9 @@ function pickListEntry(entry) {
|
|
|
160
177
|
registryDependencies: entry.registryDependencies ?? []
|
|
161
178
|
};
|
|
162
179
|
}
|
|
180
|
+
function pickArchivedEntry(entry) {
|
|
181
|
+
return { ...pickListEntry(entry), archived: true };
|
|
182
|
+
}
|
|
163
183
|
function createRegistryGroup(opts = {}) {
|
|
164
184
|
let cache = opts.loaded ?? null;
|
|
165
185
|
function getManifest() {
|
|
@@ -174,30 +194,44 @@ function createRegistryGroup(opts = {}) {
|
|
|
174
194
|
if (name === "list_components") {
|
|
175
195
|
const input = ListComponentsInput.parse(args ?? {});
|
|
176
196
|
const { manifest } = getManifest();
|
|
177
|
-
const
|
|
197
|
+
const archived = manifest.deprecatedEntries ?? [];
|
|
198
|
+
if (input.status === "deprecated") {
|
|
199
|
+
const entries = archived.filter((e) => e.type === "component").map(pickArchivedEntry);
|
|
200
|
+
return {
|
|
201
|
+
content: [{ type: "text", text: JSON.stringify(entries, null, 2) }]
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
const active = manifest.entries.filter((e) => e.type === "component").filter((e) => input.status ? e.status === input.status : true).map(pickListEntry);
|
|
205
|
+
const merged = input.includeDeprecated ? [
|
|
206
|
+
...active,
|
|
207
|
+
...archived.filter((e) => e.type === "component").map(pickArchivedEntry)
|
|
208
|
+
] : active;
|
|
178
209
|
return {
|
|
179
|
-
content: [{ type: "text", text: JSON.stringify(
|
|
210
|
+
content: [{ type: "text", text: JSON.stringify(merged, null, 2) }]
|
|
180
211
|
};
|
|
181
212
|
}
|
|
182
213
|
if (name === "get_component_meta") {
|
|
183
214
|
const input = GetComponentMetaInput.parse(args);
|
|
184
215
|
const { manifest, rootDir } = getManifest();
|
|
185
216
|
const entry = manifest.entries.find((e) => e.id === input.id);
|
|
186
|
-
|
|
217
|
+
const archived = entry ? null : (manifest.deprecatedEntries ?? []).find((e) => e.id === input.id) ?? null;
|
|
218
|
+
const found = entry ?? archived;
|
|
219
|
+
if (!found) {
|
|
187
220
|
return {
|
|
188
221
|
content: [
|
|
189
222
|
{
|
|
190
223
|
type: "text",
|
|
191
|
-
text: `Component not found: ${input.id}. Use list_components to discover ids.`
|
|
224
|
+
text: `Component not found: ${input.id}. Use list_components to discover ids (pass includeDeprecated: true to widen the search).`
|
|
192
225
|
}
|
|
193
226
|
],
|
|
194
227
|
isError: true
|
|
195
228
|
};
|
|
196
229
|
}
|
|
197
|
-
const meta = loadMeta(
|
|
230
|
+
const meta = loadMeta(found, rootDir);
|
|
198
231
|
const payload = {
|
|
199
|
-
entry,
|
|
200
|
-
meta: meta ?? null
|
|
232
|
+
entry: found,
|
|
233
|
+
meta: meta ?? null,
|
|
234
|
+
archived: archived !== null
|
|
201
235
|
};
|
|
202
236
|
return {
|
|
203
237
|
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }]
|
|
@@ -208,9 +242,23 @@ function createRegistryGroup(opts = {}) {
|
|
|
208
242
|
const limit = input.limit ?? 10;
|
|
209
243
|
const q = input.query.toLowerCase();
|
|
210
244
|
const { manifest } = getManifest();
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
245
|
+
const pool = input.includeDeprecated ? [
|
|
246
|
+
...manifest.entries.map((e) => ({ entry: e, archived: false })),
|
|
247
|
+
...(manifest.deprecatedEntries ?? []).map((e) => ({
|
|
248
|
+
entry: e,
|
|
249
|
+
archived: true
|
|
250
|
+
}))
|
|
251
|
+
] : manifest.entries.map((e) => ({ entry: e, archived: false }));
|
|
252
|
+
const matches = pool.filter(({ entry }) => entry.type === "component").filter(({ entry, archived: a }) => {
|
|
253
|
+
if (!input.includeDeprecated && !a && entry.status === "deprecated") {
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
return true;
|
|
257
|
+
}).filter(({ entry }) => {
|
|
258
|
+
return entry.id.toLowerCase().includes(q) || entry.name.toLowerCase().includes(q) || entry.description.toLowerCase().includes(q);
|
|
259
|
+
}).slice(0, limit).map(
|
|
260
|
+
({ entry, archived: a }) => a ? pickArchivedEntry(entry) : pickListEntry(entry)
|
|
261
|
+
);
|
|
214
262
|
return {
|
|
215
263
|
content: [
|
|
216
264
|
{
|