teamix-evo 0.13.4 → 0.14.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 +1 -4
- package/dist/core/index.d.ts +49 -68
- package/dist/core/index.js +837 -713
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +1821 -2110
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -171,6 +171,7 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
171
171
|
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
172
172
|
| `teamix-evo init [-y] [--dry-run] [--variant <n>]` | 普通版接入:检测冲突 → wizard → 静默落地(已有 npm 工程入口) |
|
|
173
173
|
| `teamix-evo update [--dry-run] [--cwd <dir>]` | 一键升级已装资源(tokens + skills,ADR 0003 三态 + ADR 0035 短路) |
|
|
174
|
+
| `teamix-evo migrate [--cwd <dir>] [--json]` | shadcn 项目迁移前置检查(AI skill 引导实际迁移) |
|
|
174
175
|
| `teamix-evo restore [ts] [--list] [-y]` | 回滚 `.teamix-evo/` 到指定 snapshot(ADR 0019 §2 — 自身可逆) |
|
|
175
176
|
| `teamix-evo switch <new-variant> [--apply] [-y]` | variant 切换:默认 dry-run 展示 file-level diff,--apply 才真写(ADR 0019 §D3) |
|
|
176
177
|
| `teamix-evo tokens init <variant>` | 初始化 tokens |
|
|
@@ -200,11 +201,7 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
200
201
|
| `teamix-evo blocks add <id...>` | 安装营销页区块(保留目录结构) |
|
|
201
202
|
| `teamix-evo blocks list [--installed] [--json]` | 列出可用/已安装区块 |
|
|
202
203
|
| `teamix-evo blocks upgrade [<id...>]` | 升级已安装的区块源码 |
|
|
203
|
-
| `teamix-evo templates list-variants` | _(deprecated → blocks)_ 列出 templates 包内提供的页面模板变体 |
|
|
204
|
-
| `teamix-evo templates add <id...> --variant <name>` | _(deprecated → blocks)_ 安装变体感知页面模板 |
|
|
205
204
|
| `teamix-evo lint init [-y]` | 一键安装 ESLint + Stylelint token-discipline 规则集 |
|
|
206
|
-
| `teamix-evo logs analyze [...]` | 分析 vibe-logger AI 调用链(`.log/ai/**/*.jsonl`) |
|
|
207
|
-
| `teamix-evo logs trace [...]` | 按会话还原 AI 调用链(prompt → PreToolUse → PostToolUse → Stop) |
|
|
208
205
|
|
|
209
206
|
> 占位组件 → 真组件的升级流程**不是** CLI 子命令,由
|
|
210
207
|
> [`teamix-evo-manage`](../../packages/skills/src/teamix-evo-manage/SKILL.md)
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InstalledResource, SkillIde, SkillScope, UiAliases, UiEntry, VariantManifest,
|
|
1
|
+
import { InstalledResource, SkillIde, SkillScope, UiAliases, UiEntry, VariantManifest, SkillEntry, SkillsPackageManifest, UiPackageManifest, InstalledManifest, ProjectConfig } from '@teamix-evo/registry';
|
|
2
2
|
export { InstalledManifest, InstalledResource, ProjectConfig, SkillIde, SkillScope, TailwindVersion, UiAliases } from '@teamix-evo/registry';
|
|
3
3
|
|
|
4
4
|
interface RunTokensInitOptions {
|
|
@@ -74,7 +74,6 @@ interface ListVariantsResult {
|
|
|
74
74
|
description?: string;
|
|
75
75
|
linked?: {
|
|
76
76
|
'biz-ui'?: string;
|
|
77
|
-
templates?: string;
|
|
78
77
|
};
|
|
79
78
|
}>;
|
|
80
79
|
}
|
|
@@ -397,8 +396,6 @@ interface RunVariantUiAddResult {
|
|
|
397
396
|
}
|
|
398
397
|
/** `teamix-evo biz-ui add <ids...> --variant <name>`. */
|
|
399
398
|
declare function runBizUiAdd(options: RunVariantUiAddOptions): Promise<RunVariantUiAddResult>;
|
|
400
|
-
/** `teamix-evo templates add <ids...> --variant <name>`. */
|
|
401
|
-
declare function runTemplatesAdd(options: RunVariantUiAddOptions): Promise<RunVariantUiAddResult>;
|
|
402
399
|
interface ListVariantUiResult {
|
|
403
400
|
packageName: string;
|
|
404
401
|
variants: Array<{
|
|
@@ -409,7 +406,6 @@ interface ListVariantUiResult {
|
|
|
409
406
|
}>;
|
|
410
407
|
}
|
|
411
408
|
declare function listBizUiVariants(packageRoot?: string): Promise<ListVariantUiResult>;
|
|
412
|
-
declare function listTemplatesVariants(packageRoot?: string): Promise<ListVariantUiResult>;
|
|
413
409
|
interface ListVariantUiEntriesResult {
|
|
414
410
|
packageName: string;
|
|
415
411
|
variant: string;
|
|
@@ -422,7 +418,6 @@ interface ListVariantUiEntriesResult {
|
|
|
422
418
|
}>;
|
|
423
419
|
}
|
|
424
420
|
declare function listBizUiEntries(variant: string, packageRoot?: string): Promise<ListVariantUiEntriesResult>;
|
|
425
|
-
declare function listTemplatesEntries(variant: string, packageRoot?: string): Promise<ListVariantUiEntriesResult>;
|
|
426
421
|
|
|
427
422
|
/**
|
|
428
423
|
* Phase 3.E lint conflict strategies (mirrors `init-conflicts.ts`).
|
|
@@ -521,9 +516,8 @@ interface RunGenerateAgentsMdOptions {
|
|
|
521
516
|
/** Tokens / skills variant (e.g. "opentrek"). Used for header context. */
|
|
522
517
|
variant: string;
|
|
523
518
|
/**
|
|
524
|
-
* Skill ids
|
|
525
|
-
*
|
|
526
|
-
* (e.g. `teamix-evo-manage`).
|
|
519
|
+
* Skill ids to index. Caller is responsible for filtering out global-only
|
|
520
|
+
* skills (e.g. `teamix-evo-manage`).
|
|
527
521
|
*/
|
|
528
522
|
skillIds: string[];
|
|
529
523
|
/**
|
|
@@ -603,10 +597,10 @@ declare function extractDescriptionParts(fileContent: string): SkillDescriptionP
|
|
|
603
597
|
* - `teamix-evo-installed`: 已存在 `.teamix-evo/` → 推荐 `teamix-evo update` / 卸载流程
|
|
604
598
|
* - `non-teamix-evo` : 已有非 teamix-evo 工程 → 走 `teamix-evo init` 普通版接入
|
|
605
599
|
*/
|
|
606
|
-
type ProjectState = 'empty' | 'teamix-evo-installed' | 'non-teamix-evo';
|
|
607
|
-
interface ProjectStateReport {
|
|
600
|
+
type ProjectState$1 = 'empty' | 'teamix-evo-installed' | 'non-teamix-evo';
|
|
601
|
+
interface ProjectStateReport$1 {
|
|
608
602
|
/** Decision-tree branch the caller should take. */
|
|
609
|
-
state: ProjectState;
|
|
603
|
+
state: ProjectState$1;
|
|
610
604
|
/** Absolute path that was inspected. */
|
|
611
605
|
cwd: string;
|
|
612
606
|
/** Whether `.teamix-evo/` exists at `cwd`. */
|
|
@@ -629,8 +623,28 @@ interface ProjectStateReport {
|
|
|
629
623
|
* → `empty`
|
|
630
624
|
* 3. otherwise → `non-teamix-evo`
|
|
631
625
|
*/
|
|
626
|
+
declare function detectProjectState$1(cwd: string): Promise<ProjectStateReport$1>;
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* ADR 0046 — Three-command lifecycle model.
|
|
630
|
+
*
|
|
631
|
+
* Detection priority:
|
|
632
|
+
* .teamix-evo/ → components.json (with shadcn traits) → empty → other
|
|
633
|
+
*/
|
|
634
|
+
type ProjectState = 'empty' | 'shadcn' | 'teamix-evo' | 'other';
|
|
635
|
+
interface ProjectStateReport {
|
|
636
|
+
state: ProjectState;
|
|
637
|
+
cwd: string;
|
|
638
|
+
hasTeamixDir: boolean;
|
|
639
|
+
hasPackageJson: boolean;
|
|
640
|
+
hasComponentsJson: boolean;
|
|
641
|
+
significantEntries: string[];
|
|
642
|
+
}
|
|
632
643
|
declare function detectProjectState(cwd: string): Promise<ProjectStateReport>;
|
|
633
644
|
|
|
645
|
+
type LifecycleCommand = 'init' | 'migrate' | 'update';
|
|
646
|
+
declare function assertCommandPrecondition(command: LifecycleCommand, state: ProjectState): void;
|
|
647
|
+
|
|
634
648
|
/**
|
|
635
649
|
* The 8 categories of consumer-side files that `teamix-evo init` may
|
|
636
650
|
* conflict with when running against a non-teamix-evo project.
|
|
@@ -698,7 +712,7 @@ interface FileChange {
|
|
|
698
712
|
* true, it skips conflict detection entirely.
|
|
699
713
|
*/
|
|
700
714
|
|
|
701
|
-
type ProjectInitStepName = 'tokens' | 'skills' | 'agents-md' | 'ui-init' | 'ui-add' | 'biz-ui-add' | 'lint' | 'gitignore';
|
|
715
|
+
type ProjectInitStepName = 'tokens' | 'skills' | 'agents-md' | 'ui-init' | 'ui-add' | 'biz-ui-add' | 'meta-landing' | 'lint' | 'gitignore';
|
|
702
716
|
type ProjectInitStepStatus = 'ok' | 'skip' | 'fail' | 'planned';
|
|
703
717
|
interface ProjectInitStep {
|
|
704
718
|
name: ProjectInitStepName;
|
|
@@ -767,19 +781,9 @@ interface InstallResult {
|
|
|
767
781
|
declare function installResources(options: InstallOptions): Promise<InstallResult>;
|
|
768
782
|
|
|
769
783
|
/**
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
* 1. **writeSkillSources** — render upstream `<packageRoot>/<skill.source>` and
|
|
774
|
-
* write to `<projectRoot>/.teamix-evo/skills-source/<id>/` (the consumer-side
|
|
775
|
-
* source of truth, regenerable, in git).
|
|
776
|
-
* 2. **syncSkillsToIdes** — pure byte-for-byte copy from source dir to each
|
|
777
|
-
* requested IDE mirror path (`.qoder/skills/<id>/`, `.claude/skills/<id>/`).
|
|
778
|
-
* Mirrors are 100% derived; not subject to managed-region preservation.
|
|
779
|
-
*
|
|
780
|
-
* `installSkills` orchestrates both. `updateSkills` re-renders the source with
|
|
781
|
-
* managed-region preservation against the existing source (NOT the mirrors),
|
|
782
|
-
* then re-syncs.
|
|
784
|
+
* Skills installer — renders upstream skill sources from the npm package
|
|
785
|
+
* and writes directly to IDE mirror paths (`.qoder/skills/<id>/`,
|
|
786
|
+
* `.claude/skills/<id>/`).
|
|
783
787
|
*/
|
|
784
788
|
interface SkillInstallOptions {
|
|
785
789
|
/** Project root directory */
|
|
@@ -802,28 +806,12 @@ interface SkillInstallResult {
|
|
|
802
806
|
count: number;
|
|
803
807
|
}
|
|
804
808
|
/**
|
|
805
|
-
* Install (or reinstall) all skills declared in the manifest
|
|
806
|
-
*
|
|
807
|
-
* and IDE mirror files.
|
|
809
|
+
* Install (or reinstall) all skills declared in the manifest.
|
|
810
|
+
* Renders from the npm package and writes directly to IDE mirror paths.
|
|
808
811
|
*/
|
|
809
812
|
declare function installSkills(options: SkillInstallOptions): Promise<SkillInstallResult>;
|
|
810
813
|
interface SkillUpdateOptions extends SkillInstallOptions {
|
|
811
|
-
/**
|
|
812
|
-
* Optional: existing installed records (legacy parameter kept for callers that
|
|
813
|
-
* still pass it). The refactored updater consults the file-system source under
|
|
814
|
-
* `.teamix-evo/skills/<id>/` for managed-region preservation, so this is
|
|
815
|
-
* unused by the new flow. Callers should stop passing it.
|
|
816
|
-
*/
|
|
817
814
|
installed?: InstalledResource[];
|
|
818
|
-
/**
|
|
819
|
-
* Optional: limit the update to these skill ids. When provided, skills not
|
|
820
|
-
* in the set are skipped (no source rewrite, no mirror). Per ADR 0035,
|
|
821
|
-
* the high-level `runSkillsUpdate` always passes this with the intersection
|
|
822
|
-
* of `keys(lock.skills)` and the current install scope, ensuring update
|
|
823
|
-
* never accidentally installs new skills or skills from a mismatched scope.
|
|
824
|
-
*
|
|
825
|
-
* Type matches `SkillInstallOptions.onlyIds` (mutable `string[] | undefined`).
|
|
826
|
-
*/
|
|
827
815
|
onlyIds?: string[];
|
|
828
816
|
}
|
|
829
817
|
interface SkillUpdateResult {
|
|
@@ -836,49 +824,42 @@ interface SkillUpdateResult {
|
|
|
836
824
|
};
|
|
837
825
|
}
|
|
838
826
|
/**
|
|
839
|
-
* Update skills with
|
|
840
|
-
*
|
|
827
|
+
* Update skills with strategy-aware logic (frozen/regenerable/managed) applied
|
|
828
|
+
* directly to IDE mirror files.
|
|
841
829
|
*/
|
|
842
830
|
declare function updateSkills(options: SkillUpdateOptions): Promise<SkillUpdateResult>;
|
|
843
831
|
/**
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
* Used by:
|
|
847
|
-
* - `skills add` (immediate mirror after source write — handled by installSkills)
|
|
848
|
-
* - `skills sync` (re-mirror after the user adds an IDE or moves machines)
|
|
849
|
-
* - `skills update` (re-mirror after source is rewritten)
|
|
850
|
-
*
|
|
851
|
-
* `onlyIds` lets the caller limit which skills are synced.
|
|
832
|
+
* Re-install skills from the npm package to IDE mirror paths.
|
|
833
|
+
* Used by `skills sync` to refresh IDE files from upstream.
|
|
852
834
|
*/
|
|
853
|
-
interface
|
|
835
|
+
interface ReinstallToIdesOptions {
|
|
854
836
|
projectRoot: string;
|
|
855
|
-
/** Skills
|
|
837
|
+
/** Skills to reinstall (caller derives from lock). */
|
|
856
838
|
skills: ReadonlyArray<{
|
|
857
839
|
id: string;
|
|
858
840
|
name: string;
|
|
859
841
|
updateStrategy: SkillEntry['updateStrategy'];
|
|
860
|
-
/** Managed-region ids for region-aware mirror sync. */
|
|
861
842
|
managedRegions?: readonly string[];
|
|
862
843
|
}>;
|
|
844
|
+
/** Upstream package data for rendering. */
|
|
845
|
+
manifest: SkillsPackageManifest;
|
|
846
|
+
data: Record<string, unknown>;
|
|
847
|
+
packageRoot: string;
|
|
863
848
|
ides: readonly SkillIde[];
|
|
864
849
|
scope: SkillScope;
|
|
865
|
-
onlyIds?: string[];
|
|
866
850
|
}
|
|
867
|
-
interface
|
|
851
|
+
interface ReinstallToIdesResult {
|
|
868
852
|
resources: InstalledResource[];
|
|
869
853
|
count: number;
|
|
870
854
|
}
|
|
871
855
|
/**
|
|
872
|
-
*
|
|
873
|
-
* paths. Pure byte-for-byte copy — no rendering, no merge.
|
|
856
|
+
* Reinstall skills from npm package directly to IDE mirrors.
|
|
874
857
|
*/
|
|
875
|
-
declare function
|
|
858
|
+
declare function reinstallSkillsToIdes(options: ReinstallToIdesOptions): Promise<ReinstallToIdesResult>;
|
|
876
859
|
/**
|
|
877
860
|
* Remove all installed skill files. Returns the absolute paths removed.
|
|
878
|
-
* After files are unlinked, walks up the directory tree pruning empty dirs
|
|
879
|
-
* until a non-empty ancestor is reached (#33).
|
|
880
861
|
*/
|
|
881
|
-
declare function removeSkillFiles(records: InstalledResource[]): Promise<string[]>;
|
|
862
|
+
declare function removeSkillFiles(records: InstalledResource[], projectRoot: string): Promise<string[]>;
|
|
882
863
|
|
|
883
864
|
interface UiInstallOptions {
|
|
884
865
|
/** Project root directory */
|
|
@@ -890,7 +871,7 @@ interface UiInstallOptions {
|
|
|
890
871
|
/**
|
|
891
872
|
* Optional per-entry package root override. When set, entries in the map
|
|
892
873
|
* resolve their `file.source` against the mapped root instead of `packageRoot`.
|
|
893
|
-
* Used by variant-aware packages (biz-ui
|
|
874
|
+
* Used by variant-aware packages (biz-ui) that pull in
|
|
894
875
|
* @teamix-evo/ui transitive deps — each entry resolves from its source package.
|
|
895
876
|
*/
|
|
896
877
|
entryPackageRoot?: Map<string, string>;
|
|
@@ -923,7 +904,7 @@ declare function installUiEntries(options: UiInstallOptions): Promise<UiInstallR
|
|
|
923
904
|
/**
|
|
924
905
|
* Remove all installed ui resource files and prune empty parent directories.
|
|
925
906
|
*/
|
|
926
|
-
declare function removeUiFiles(records: InstalledResource[]): Promise<string[]>;
|
|
907
|
+
declare function removeUiFiles(records: InstalledResource[], projectRoot: string): Promise<string[]>;
|
|
927
908
|
|
|
928
909
|
/**
|
|
929
910
|
* Load the variant manifest and _data.json for template rendering.
|
|
@@ -992,4 +973,4 @@ declare function readInstalledManifest(projectRoot: string): Promise<InstalledMa
|
|
|
992
973
|
*/
|
|
993
974
|
declare function writeInstalledManifest(projectRoot: string, manifest: InstalledManifest): Promise<void>;
|
|
994
975
|
|
|
995
|
-
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 ProjectStateReport, 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
|
|
976
|
+
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 };
|