teamix-evo 0.16.0 → 0.18.0
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/README.md +36 -35
- package/dist/core/index.d.ts +42 -2
- package/dist/core/index.js +489 -33
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +627 -61
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -167,41 +167,42 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
167
167
|
|
|
168
168
|
## 命令参考
|
|
169
169
|
|
|
170
|
-
| 命令
|
|
171
|
-
|
|
|
172
|
-
| `teamix-evo init [-y] [--dry-run] [--variant <n>]`
|
|
173
|
-
| `teamix-evo update [--dry-run] [--cwd <dir>]`
|
|
174
|
-
| `teamix-evo migrate [--cwd <dir>] [--json]`
|
|
175
|
-
| `teamix-evo
|
|
176
|
-
| `teamix-evo
|
|
177
|
-
| `teamix-evo
|
|
178
|
-
| `teamix-evo tokens
|
|
179
|
-
| `teamix-evo tokens list`
|
|
180
|
-
| `teamix-evo tokens
|
|
181
|
-
| `teamix-evo tokens
|
|
182
|
-
| `teamix-evo tokens
|
|
183
|
-
| `teamix-evo tokens
|
|
184
|
-
| `teamix-evo tokens
|
|
185
|
-
| `teamix-evo tokens
|
|
186
|
-
| `teamix-evo tokens
|
|
187
|
-
| `teamix-evo tokens
|
|
188
|
-
| `teamix-evo
|
|
189
|
-
| `teamix-evo skills
|
|
190
|
-
| `teamix-evo skills
|
|
191
|
-
| `teamix-evo skills
|
|
192
|
-
| `teamix-evo skills
|
|
193
|
-
| `teamix-evo skills
|
|
194
|
-
| `teamix-evo skills
|
|
195
|
-
| `teamix-evo
|
|
196
|
-
| `teamix-evo ui
|
|
197
|
-
| `teamix-evo ui
|
|
198
|
-
| `teamix-evo ui
|
|
199
|
-
| `teamix-evo
|
|
200
|
-
| `teamix-evo biz-ui
|
|
201
|
-
| `teamix-evo
|
|
202
|
-
| `teamix-evo blocks
|
|
203
|
-
| `teamix-evo blocks
|
|
204
|
-
| `teamix-evo
|
|
170
|
+
| 命令 | 说明 |
|
|
171
|
+
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
172
|
+
| `teamix-evo init [-y] [--dry-run] [--variant <n>]` | 普通版接入:检测冲突 → wizard → 静默落地(已有 npm 工程入口) |
|
|
173
|
+
| `teamix-evo update [--dry-run] [--cwd <dir>]` | 一键升级已装资源(tokens + skills,ADR 0003 三态 + ADR 0035 短路) |
|
|
174
|
+
| `teamix-evo migrate [--cwd <dir>] [--json]` | shadcn 项目迁移前置检查(AI skill 引导实际迁移) |
|
|
175
|
+
| `teamix-evo graft [--variant <v>] [--json] [--cwd <dir>]` | 叠加 Teamix Evo 到传统组件库项目(双栈共存,ADR 0047) |
|
|
176
|
+
| `teamix-evo restore [ts] [--list] [-y]` | 回滚 `.teamix-evo/` 到指定 snapshot(ADR 0019 §2 — 自身可逆) |
|
|
177
|
+
| `teamix-evo switch <new-variant> [--apply] [-y]` | variant 切换:默认 dry-run 展示 file-level diff,--apply 才真写(ADR 0019 §D3) |
|
|
178
|
+
| `teamix-evo tokens init <variant>` | 初始化 tokens |
|
|
179
|
+
| `teamix-evo tokens list-variants` | 列出可用 variant |
|
|
180
|
+
| `teamix-evo tokens list` | 查看已装机的 variant |
|
|
181
|
+
| `teamix-evo tokens update` | 更新已装资源(stub,v0.7 见 ADR 0019) |
|
|
182
|
+
| `teamix-evo tokens uninstall` | 卸载已装 tokens |
|
|
183
|
+
| `teamix-evo tokens audit` | 审计 tokens 引用(4 类:redundant / kept / migrate / custom,v3↔v4 语义比较) |
|
|
184
|
+
| `teamix-evo tokens diagnose` | 诊断 tokens 使用情况,生成分级报告(L1-L3)+ `.treatment-plan.md` |
|
|
185
|
+
| `teamix-evo tokens treat [--lock-baseline] [--apply]` | 一键 token 治理流水线:lint → codemod → lint → 报告 → 可选锁定 baseline |
|
|
186
|
+
| `teamix-evo tokens codemod [name] [--apply] [--list]` | 执行指定 token codemod(5 个可用:hsl-to-v4 / hex-to-token / tw-scale-to-semantic / space-to-gap / arbitrary-to-token) |
|
|
187
|
+
| `teamix-evo tokens reflect [--min-frequency <n>]` | 扫描重复色值,推荐新增项目级 token(反哺 overrides.css) |
|
|
188
|
+
| `teamix-evo tokens baseline-check` | 对比 baseline 检查 token 违规是否超标(CI 友好,exitCode=1 on fail) |
|
|
189
|
+
| `teamix-evo skills init` | 自举 skills(按 variant + scope 全装 — ADR 0034) |
|
|
190
|
+
| `teamix-evo skills add <name...>` | 增量装指定 skill(`<name...>` 必填) |
|
|
191
|
+
| `teamix-evo skills list` | 列出所有 skill 的安装状态 |
|
|
192
|
+
| `teamix-evo skills update [name...] [--dry-run]` | 升级 skills(双闸 + version 短路 — ADR 0035) |
|
|
193
|
+
| `teamix-evo skills sync [name...]` | 源 → IDE 镜像(漂移恢复用) |
|
|
194
|
+
| `teamix-evo skills doctor` | 检测源/镜像漂移(ADR 0013) |
|
|
195
|
+
| `teamix-evo skills uninstall` | 卸载 skills(源 + 镜像 + lock) |
|
|
196
|
+
| `teamix-evo ui init` | 初始化 ui 配置(aliases / iconLibrary / tsx / rsc) |
|
|
197
|
+
| `teamix-evo ui add <id...>` | 安装指定 ui 组件源码 |
|
|
198
|
+
| `teamix-evo ui list [--installed]` | 列出可用/已安装 ui 组件 |
|
|
199
|
+
| `teamix-evo ui promote-to-biz <id...>` | 把 ui 组件提升为业务组件(8 模式:Coexist/Preset/Wrapper/Compose/Variant/Fork/TokenOnly/ManualReview) |
|
|
200
|
+
| `teamix-evo biz-ui list-variants` | 列出 biz-ui 包内提供的业务变体 |
|
|
201
|
+
| `teamix-evo biz-ui add <id...> --variant <name>` | 安装变体感知业务组件(`--variant` 必填) |
|
|
202
|
+
| `teamix-evo blocks add <id...>` | 安装营销页区块(保留目录结构) |
|
|
203
|
+
| `teamix-evo blocks list [--installed] [--json]` | 列出可用/已安装区块 |
|
|
204
|
+
| `teamix-evo blocks upgrade [<id...>]` | 升级已安装的区块源码 |
|
|
205
|
+
| `teamix-evo lint init [-y]` | 一键安装 ESLint + Stylelint token-discipline 规则集 |
|
|
205
206
|
|
|
206
207
|
> 占位组件 → 真组件的升级流程**不是** CLI 子命令,由
|
|
207
208
|
> [`teamix-evo-manage`](../../packages/skills/src/teamix-evo-manage/SKILL.md)
|
package/dist/core/index.d.ts
CHANGED
|
@@ -656,10 +656,14 @@ interface ProjectStateReport {
|
|
|
656
656
|
hasPackageJson: boolean;
|
|
657
657
|
hasComponentsJson: boolean;
|
|
658
658
|
significantEntries: string[];
|
|
659
|
+
/** Legacy component library detected — only populated when state is 'other'. */
|
|
660
|
+
legacyLib?: string;
|
|
661
|
+
/** Build tool detected — only populated when state is 'other'. */
|
|
662
|
+
buildTool?: string;
|
|
659
663
|
}
|
|
660
664
|
declare function detectProjectState(cwd: string): Promise<ProjectStateReport>;
|
|
661
665
|
|
|
662
|
-
type LifecycleCommand = 'init' | 'migrate' | 'update';
|
|
666
|
+
type LifecycleCommand = 'init' | 'migrate' | 'update' | 'graft';
|
|
663
667
|
declare function assertCommandPrecondition(command: LifecycleCommand, state: ProjectState): void;
|
|
664
668
|
|
|
665
669
|
/**
|
|
@@ -774,6 +778,42 @@ interface RunProjectInitResult {
|
|
|
774
778
|
}
|
|
775
779
|
declare function runProjectInit(options: RunProjectInitOptions): Promise<RunProjectInitResult>;
|
|
776
780
|
|
|
781
|
+
/**
|
|
782
|
+
* Programmatic orchestrator for `teamix-evo graft` (ADR 0047).
|
|
783
|
+
*
|
|
784
|
+
* Installs the teamix-evo AICoding stack (tokens, skills, UI, biz-ui,
|
|
785
|
+
* AGENTS.md, config) into an existing project that uses a legacy component
|
|
786
|
+
* library (Fusion / Antd / Element). Designed to be called by the
|
|
787
|
+
* `graft.md` skill after AI-driven steps (Tailwind install, PostCSS merge,
|
|
788
|
+
* CSS entry creation) are complete.
|
|
789
|
+
*
|
|
790
|
+
* Does NOT create CSS entry files or modify PostCSS config — those are
|
|
791
|
+
* handled by the skill (AI judgement required).
|
|
792
|
+
*/
|
|
793
|
+
|
|
794
|
+
type GraftInitStepName = 'ensure-teamix-dir' | 'snapshot' | 'tokens' | 'ui-init' | 'ui-add' | 'biz-ui-add' | 'skills' | 'agents-md' | 'agents-md-graft' | 'meta-landing' | 'config-mode' | 'gitignore';
|
|
795
|
+
type GraftInitStepStatus = 'ok' | 'skip' | 'fail';
|
|
796
|
+
interface GraftInitStep {
|
|
797
|
+
name: GraftInitStepName;
|
|
798
|
+
status: GraftInitStepStatus;
|
|
799
|
+
detail?: string;
|
|
800
|
+
}
|
|
801
|
+
interface GraftInitOptions {
|
|
802
|
+
projectRoot: string;
|
|
803
|
+
variant: string;
|
|
804
|
+
legacyLib: string;
|
|
805
|
+
ide?: string;
|
|
806
|
+
ides?: SkillIde[];
|
|
807
|
+
scope?: SkillScope;
|
|
808
|
+
skipInstall?: boolean;
|
|
809
|
+
onStep?: (step: GraftInitStep) => void;
|
|
810
|
+
}
|
|
811
|
+
interface GraftInitResult {
|
|
812
|
+
status: 'success' | 'partial';
|
|
813
|
+
steps: GraftInitStep[];
|
|
814
|
+
}
|
|
815
|
+
declare function runGraftInit(options: GraftInitOptions): Promise<GraftInitResult>;
|
|
816
|
+
|
|
777
817
|
interface InstallOptions {
|
|
778
818
|
/** Project root directory */
|
|
779
819
|
projectRoot: string;
|
|
@@ -998,4 +1038,4 @@ declare function readInstalledManifest(projectRoot: string): Promise<InstalledMa
|
|
|
998
1038
|
*/
|
|
999
1039
|
declare function writeInstalledManifest(projectRoot: string, manifest: InstalledManifest): Promise<void>;
|
|
1000
1040
|
|
|
1001
|
-
export { type ConflictItem, type ConflictKey, type ConflictReport, type ConflictStrategy, DEFAULT_UI_ALIASES, DEFAULT_UI_ICON_LIBRARY, type InstallOptions, type InstallResult, type ListVariantUiEntriesResult, type ListVariantUiResult, type ListVariantsResult, type ProjectInitStep, type ProjectInitStepName, type ProjectInitStepStatus, type ProjectState, type ProjectState$1 as ProjectStateLegacy, type ProjectStateReport, type ProjectStateReport$1 as ProjectStateReportLegacy, type ReinstallToIdesOptions, type ReinstallToIdesResult, type ResumeHint, type RunGenerateAgentsMdOptions, type RunGenerateAgentsMdResult, type RunLintInitOptions, type RunLintInitResult, type RunProjectInitOptions, type RunProjectInitResult, type RunSkillsAddOptions, type RunSkillsAddResult, type RunSkillsInitOptions, type RunSkillsInitResult, type RunSkillsUpdateOptions, type RunSkillsUpdateResult, type RunTokensInitOptions, type RunTokensInitResult, type RunUiAddOptions, type RunUiAddResult, type RunUiInitOptions, type RunUiInitResult, type RunUiListOptions, type RunUiListResult, type RunVariantUiAddOptions, type RunVariantUiAddResult, type SkillInstallOptions, type SkillInstallResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, type UpdatePlanItem, assertCommandPrecondition, detectConflicts, detectProjectState, detectProjectState$1 as detectProjectStateLegacy, ensureTeamixDir, extractDescriptionParts, getTeamixDir, installResources, installSkills, installUiEntries, listBizUiEntries, listBizUiVariants, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, reinstallSkillsToIdes, removeSkillFiles, removeUiFiles, runBizUiAdd, runGenerateAgentsMd, runLintInit, runProjectInit, runSkillsAdd, runSkillsInit, runSkillsUpdate, runTokensInit, runUiAdd, runUiInit, runUiList, updateSkills, writeInstalledManifest, writeProjectConfig };
|
|
1041
|
+
export { type ConflictItem, type ConflictKey, type ConflictReport, type ConflictStrategy, DEFAULT_UI_ALIASES, DEFAULT_UI_ICON_LIBRARY, type GraftInitOptions, type GraftInitResult, type GraftInitStep, type GraftInitStepName, type GraftInitStepStatus, type InstallOptions, type InstallResult, type ListVariantUiEntriesResult, type ListVariantUiResult, type ListVariantsResult, type ProjectInitStep, type ProjectInitStepName, type ProjectInitStepStatus, type ProjectState, type ProjectState$1 as ProjectStateLegacy, type ProjectStateReport, type ProjectStateReport$1 as ProjectStateReportLegacy, type ReinstallToIdesOptions, type ReinstallToIdesResult, type ResumeHint, type RunGenerateAgentsMdOptions, type RunGenerateAgentsMdResult, type RunLintInitOptions, type RunLintInitResult, type RunProjectInitOptions, type RunProjectInitResult, type RunSkillsAddOptions, type RunSkillsAddResult, type RunSkillsInitOptions, type RunSkillsInitResult, type RunSkillsUpdateOptions, type RunSkillsUpdateResult, type RunTokensInitOptions, type RunTokensInitResult, type RunUiAddOptions, type RunUiAddResult, type RunUiInitOptions, type RunUiInitResult, type RunUiListOptions, type RunUiListResult, type RunVariantUiAddOptions, type RunVariantUiAddResult, type SkillInstallOptions, type SkillInstallResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, type UpdatePlanItem, assertCommandPrecondition, detectConflicts, detectProjectState, detectProjectState$1 as detectProjectStateLegacy, ensureTeamixDir, extractDescriptionParts, getTeamixDir, installResources, installSkills, installUiEntries, listBizUiEntries, listBizUiVariants, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, reinstallSkillsToIdes, removeSkillFiles, removeUiFiles, runBizUiAdd, runGenerateAgentsMd, runGraftInit, runLintInit, runProjectInit, runSkillsAdd, runSkillsInit, runSkillsUpdate, runTokensInit, runUiAdd, runUiInit, runUiList, updateSkills, writeInstalledManifest, writeProjectConfig };
|