teamix-evo 0.9.0 → 0.11.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 +35 -30
- package/dist/core/index.d.ts +44 -221
- package/dist/core/index.js +636 -1873
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +6936 -6106
- package/dist/index.js.map +1 -1
- package/package.json +17 -17
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -167,36 +167,41 @@ 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 restore [ts] [--list] [-y]`
|
|
175
|
-
| `teamix-evo switch <new-variant> [--apply] [-y]`
|
|
176
|
-
| `teamix-evo tokens init <variant>`
|
|
177
|
-
| `teamix-evo tokens list-variants`
|
|
178
|
-
| `teamix-evo tokens list`
|
|
179
|
-
| `teamix-evo tokens update`
|
|
180
|
-
| `teamix-evo tokens uninstall`
|
|
181
|
-
| `teamix-evo tokens audit`
|
|
182
|
-
| `teamix-evo
|
|
183
|
-
| `teamix-evo
|
|
184
|
-
| `teamix-evo
|
|
185
|
-
| `teamix-evo
|
|
186
|
-
| `teamix-evo
|
|
187
|
-
| `teamix-evo skills
|
|
188
|
-
| `teamix-evo skills
|
|
189
|
-
| `teamix-evo
|
|
190
|
-
| `teamix-evo
|
|
191
|
-
| `teamix-evo
|
|
192
|
-
| `teamix-evo
|
|
193
|
-
| `teamix-evo
|
|
194
|
-
| `teamix-evo
|
|
195
|
-
| `teamix-evo
|
|
196
|
-
| `teamix-evo
|
|
197
|
-
| `teamix-evo
|
|
198
|
-
| `teamix-evo
|
|
199
|
-
| `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 restore [ts] [--list] [-y]` | 回滚 `.teamix-evo/` 到指定 snapshot(ADR 0019 §2 — 自身可逆) |
|
|
175
|
+
| `teamix-evo switch <new-variant> [--apply] [-y]` | variant 切换:默认 dry-run 展示 file-level diff,--apply 才真写(ADR 0019 §D3) |
|
|
176
|
+
| `teamix-evo tokens init <variant>` | 初始化 tokens |
|
|
177
|
+
| `teamix-evo tokens list-variants` | 列出可用 variant |
|
|
178
|
+
| `teamix-evo tokens list` | 查看已装机的 variant |
|
|
179
|
+
| `teamix-evo tokens update` | 更新已装资源(stub,v0.7 见 ADR 0019) |
|
|
180
|
+
| `teamix-evo tokens uninstall` | 卸载已装 tokens |
|
|
181
|
+
| `teamix-evo tokens audit` | 审计 tokens 引用(4 类:redundant / kept / migrate / custom,v3↔v4 语义比较) |
|
|
182
|
+
| `teamix-evo tokens diagnose` | 诊断 tokens 使用情况,生成分级报告(L1-L3)+ `.treatment-plan.md` |
|
|
183
|
+
| `teamix-evo tokens treat [--lock-baseline] [--apply]` | 一键 token 治理流水线:lint → codemod → lint → 报告 → 可选锁定 baseline |
|
|
184
|
+
| `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) |
|
|
185
|
+
| `teamix-evo tokens reflect [--min-frequency <n>]` | 扫描重复色值,推荐新增项目级 token(反哺 overrides.css) |
|
|
186
|
+
| `teamix-evo tokens baseline-check` | 对比 baseline 检查 token 违规是否超标(CI 友好,exitCode=1 on fail) |
|
|
187
|
+
| `teamix-evo skills init` | 自举 skills(按 variant + scope 全装 — ADR 0034) |
|
|
188
|
+
| `teamix-evo skills add <name...>` | 增量装指定 skill(`<name...>` 必填) |
|
|
189
|
+
| `teamix-evo skills list` | 列出所有 skill 的安装状态 |
|
|
190
|
+
| `teamix-evo skills update [name...] [--dry-run]` | 升级 skills(双闸 + version 短路 — ADR 0035) |
|
|
191
|
+
| `teamix-evo skills sync [name...]` | 源 → IDE 镜像(漂移恢复用) |
|
|
192
|
+
| `teamix-evo skills doctor` | 检测源/镜像漂移(ADR 0013) |
|
|
193
|
+
| `teamix-evo skills uninstall` | 卸载 skills(源 + 镜像 + lock) |
|
|
194
|
+
| `teamix-evo ui init` | 初始化 ui 配置(aliases / iconLibrary / tsx / rsc) |
|
|
195
|
+
| `teamix-evo ui add <id...>` | 安装指定 ui 组件源码 |
|
|
196
|
+
| `teamix-evo ui list [--installed]` | 列出可用/已安装 ui 组件 |
|
|
197
|
+
| `teamix-evo ui promote-to-biz <id...>` | 把 ui 组件提升为业务组件(8 模式:Coexist/Preset/Wrapper/Compose/Variant/Fork/TokenOnly/ManualReview) |
|
|
198
|
+
| `teamix-evo biz-ui list-variants` | 列出 biz-ui 包内提供的业务变体 |
|
|
199
|
+
| `teamix-evo biz-ui add <id...> --variant <name>` | 安装变体感知业务组件(`--variant` 必填) |
|
|
200
|
+
| `teamix-evo templates list-variants` | 列出 templates 包内提供的页面模板变体 |
|
|
201
|
+
| `teamix-evo templates add <id...> --variant <name>` | 安装变体感知页面模板(`--variant` 必填) |
|
|
202
|
+
| `teamix-evo lint init [-y]` | 一键安装 ESLint + Stylelint token-discipline 规则集 |
|
|
203
|
+
| `teamix-evo logs analyze [...]` | 分析 vibe-logger AI 调用链(`.log/ai/**/*.jsonl`) |
|
|
204
|
+
| `teamix-evo logs trace [...]` | 按会话还原 AI 调用链(prompt → PreToolUse → PostToolUse → Stop) |
|
|
200
205
|
|
|
201
206
|
> 占位组件 → 真组件的升级流程**不是** CLI 子命令,由
|
|
202
207
|
> [`teamix-evo-manage`](../../packages/skills/src/teamix-evo-manage/SKILL.md)
|
package/dist/core/index.d.ts
CHANGED
|
@@ -104,10 +104,12 @@ type RunSkillsInitResult = {
|
|
|
104
104
|
addedSkillIds: string[];
|
|
105
105
|
skippedSkillIds: string[];
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
* Skill ids that were auto-upgraded because their locked version was
|
|
108
|
+
* older than the manifest version.
|
|
109
|
+
*/
|
|
110
|
+
autoUpdatedSkillIds: string[];
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated Outdated skills are now auto-upgraded; kept for compat.
|
|
111
113
|
*/
|
|
112
114
|
outdatedSkills: OutdatedSkillInfo[];
|
|
113
115
|
} | {
|
|
@@ -168,14 +170,17 @@ type RunSkillsAddResult = {
|
|
|
168
170
|
addedSkillIds: string[];
|
|
169
171
|
/**
|
|
170
172
|
* Skill ids that were requested but already installed at the latest version;
|
|
171
|
-
* nothing to do.
|
|
172
|
-
* {@link outdatedSkills}.
|
|
173
|
+
* nothing to do.
|
|
173
174
|
*/
|
|
174
175
|
skippedSkillIds: string[];
|
|
175
176
|
/**
|
|
176
|
-
* Skill ids that were
|
|
177
|
-
*
|
|
178
|
-
|
|
177
|
+
* Skill ids that were auto-upgraded because their locked version was older
|
|
178
|
+
* than the manifest version.
|
|
179
|
+
*/
|
|
180
|
+
autoUpdatedSkillIds: string[];
|
|
181
|
+
/**
|
|
182
|
+
* @deprecated Outdated skills are now auto-upgraded; this array is always
|
|
183
|
+
* empty. Kept for backward-compatible callers; will be removed in next major.
|
|
179
184
|
*/
|
|
180
185
|
outdatedSkills: OutdatedSkillInfo[];
|
|
181
186
|
};
|
|
@@ -474,6 +479,12 @@ type RunLintInitResult = {
|
|
|
474
479
|
* existed.
|
|
475
480
|
*/
|
|
476
481
|
packageJsonPatched?: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* True when the consumer's existing stylelint config was kept (skip /
|
|
484
|
+
* merge) and does not extend a teamix-evo preset — token definition
|
|
485
|
+
* files may trigger false-positive lint errors without `ignoreFiles`.
|
|
486
|
+
*/
|
|
487
|
+
stylelintIgnoreFilesWarning?: boolean;
|
|
477
488
|
} | {
|
|
478
489
|
status: 'already-initialized';
|
|
479
490
|
};
|
|
@@ -664,36 +675,6 @@ interface ConflictReport {
|
|
|
664
675
|
*/
|
|
665
676
|
declare function detectConflicts(cwd: string): Promise<ConflictReport>;
|
|
666
677
|
|
|
667
|
-
/**
|
|
668
|
-
* Final answers produced by the init wizard. Every consumer of `teamix-evo
|
|
669
|
-
* init` (orchestrator + later sub-commands) reads from this object exclusively
|
|
670
|
-
* — flags / prompts must not be re-evaluated downstream (silent sub-commands).
|
|
671
|
-
*/
|
|
672
|
-
interface InitWizardAnswers {
|
|
673
|
-
variant: string;
|
|
674
|
-
ides: SkillIde[];
|
|
675
|
-
scope: SkillScope;
|
|
676
|
-
withLint: boolean;
|
|
677
|
-
withUi: boolean;
|
|
678
|
-
/** 'baseline' = preset 推荐组件子集;'all' = 全量装 */
|
|
679
|
-
uiSelection: 'baseline' | 'all';
|
|
680
|
-
withBizUi: boolean;
|
|
681
|
-
/**
|
|
682
|
-
* 每类冲突文件的最终策略。键是 6 类 ConflictKey,值是 user-chosen
|
|
683
|
-
* `ConflictStrategy`。当对应 ConflictItem.exists === false 时,值默认为
|
|
684
|
-
* `'overwrite'`(即首次写入)。
|
|
685
|
-
*/
|
|
686
|
-
conflictDecisions: Record<ConflictKey, ConflictStrategy>;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/** Result of `createSnapshot` when a snapshot was actually taken. */
|
|
690
|
-
interface SnapshotResult {
|
|
691
|
-
/** Filesystem-safe UTC timestamp identifier (e.g. `2026-06-11T20-59-03-000Z`). */
|
|
692
|
-
ts: string;
|
|
693
|
-
/** Absolute path to the snapshot directory. */
|
|
694
|
-
path: string;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
678
|
type FileChangeKind = 'created' | 'modified' | 'backed-up' | 'deleted';
|
|
698
679
|
interface FileChange {
|
|
699
680
|
kind: FileChangeKind;
|
|
@@ -706,222 +687,62 @@ interface FileChange {
|
|
|
706
687
|
}
|
|
707
688
|
|
|
708
689
|
/**
|
|
709
|
-
* Programmatic orchestrator for `teamix-evo init` (
|
|
690
|
+
* Programmatic orchestrator for `teamix-evo init` (ADR 0043).
|
|
710
691
|
*
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
* order. Sub-commands are invoked silently — no interactive prompts here.
|
|
692
|
+
* Drives the 8-step pipeline that installs the full teamix-evo suite into an
|
|
693
|
+
* existing project. Each step is idempotent — re-running `init` picks up from
|
|
694
|
+
* where it left off.
|
|
715
695
|
*
|
|
716
|
-
* Conflict handling:
|
|
717
|
-
*
|
|
718
|
-
*
|
|
719
|
-
* - `'merge-managed'` (agents-md) is implemented today via
|
|
720
|
-
* `runGenerateAgentsMd` which writes managed regions natively.
|
|
721
|
-
* - `'skip-existing'` (shadcn-source) maps to `runUiAdd({ overwrite: false })`,
|
|
722
|
-
* the existing default.
|
|
723
|
-
* - All other strategies (`diff-prompt`, `backup-overwrite`, `migrate`,
|
|
724
|
-
* `coexist`, `append`, `per-file-prompt`) require the managed-region engine
|
|
725
|
-
* from batch 4 — they are recorded to `pendingConflictWork` so the CLI
|
|
726
|
-
* surface can guide the user to the followup `teamix-evo conflict resolve`
|
|
727
|
-
* step (post-batch-4).
|
|
728
|
-
*
|
|
729
|
-
* No interactive prompts, no `process.exit`. Throws on hard failure (P8).
|
|
696
|
+
* Conflict handling is intentionally thin (ADR 0043 §3): detect → terminate →
|
|
697
|
+
* structured output → AI decides. The orchestrator only checks `force` — when
|
|
698
|
+
* true, it skips conflict detection entirely.
|
|
730
699
|
*/
|
|
731
700
|
|
|
732
|
-
type ProjectInitStepName = 'tokens' | 'skills' | 'agents-md' | 'ui-init' | 'ui-add' | 'lint';
|
|
701
|
+
type ProjectInitStepName = 'tokens' | 'skills' | 'agents-md' | 'ui-init' | 'ui-add' | 'biz-ui-add' | 'lint' | 'gitignore';
|
|
733
702
|
type ProjectInitStepStatus = 'ok' | 'skip' | 'fail' | 'planned';
|
|
734
703
|
interface ProjectInitStep {
|
|
735
704
|
name: ProjectInitStepName;
|
|
736
705
|
status: ProjectInitStepStatus;
|
|
737
706
|
detail?: string;
|
|
738
|
-
/**
|
|
739
|
-
* Files this step touched (Phase 1.A1). Empty when the step skipped or
|
|
740
|
-
* failed before any I/O. The `kind` is `created` by default; the orchestrator
|
|
741
|
-
* upgrades entries to `modified` post-hoc by checking the backup ledger
|
|
742
|
-
* (`.teamix-evo/.backups/`).
|
|
743
|
-
*/
|
|
707
|
+
/** Files this step touched. */
|
|
744
708
|
changes?: FileChange[];
|
|
745
709
|
}
|
|
746
|
-
interface PendingConflictWork {
|
|
747
|
-
key: ConflictKey;
|
|
748
|
-
strategy: ConflictStrategy;
|
|
749
|
-
reason: string;
|
|
750
|
-
}
|
|
751
710
|
interface ResumeHint {
|
|
752
|
-
/** The first step that failed (caller resumes from here). */
|
|
753
711
|
failedAt: ProjectInitStepName;
|
|
754
|
-
/** Steps already finished (status === 'ok'); will short-circuit on resume. */
|
|
755
712
|
completed: ProjectInitStepName[];
|
|
756
|
-
/** All steps that ended in fail status. */
|
|
757
713
|
failed: ProjectInitStepName[];
|
|
758
|
-
/** Human-readable error from the first failed step. */
|
|
759
714
|
error: string;
|
|
760
|
-
/**
|
|
761
|
-
* Suggested CLI command to resume. Today this is just `teamix-evo init`
|
|
762
|
-
* itself — every sub-step is idempotent (returns `already-initialized`
|
|
763
|
-
* when the matching state file already exists), so a re-run continues
|
|
764
|
-
* from the failure point automatically. Future batches may grow a
|
|
765
|
-
* dedicated `--resume` flag with a richer recovery model (batch 3).
|
|
766
|
-
*/
|
|
767
715
|
resumeCommand: string;
|
|
768
716
|
}
|
|
769
717
|
interface RunProjectInitOptions {
|
|
770
718
|
/** Absolute project root (existing repo to adopt teamix-evo into). */
|
|
771
719
|
projectRoot: string;
|
|
772
|
-
/**
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
*/
|
|
779
|
-
uiEntries?: string[];
|
|
720
|
+
/** Tokens variant (e.g. "opentrek" / "uni-manager"). */
|
|
721
|
+
variant: string;
|
|
722
|
+
/** Target IDEs (at least one). */
|
|
723
|
+
ides: SkillIde[];
|
|
724
|
+
/** Skill install scope. Defaults to 'project'. */
|
|
725
|
+
scope?: SkillScope;
|
|
780
726
|
/**
|
|
781
|
-
*
|
|
782
|
-
*
|
|
783
|
-
* everything in one batch.
|
|
727
|
+
* When true, skip conflict detection and overwrite everything.
|
|
728
|
+
* Distinction: init --force = skip conflict check; create --force = overwrite directory.
|
|
784
729
|
*/
|
|
730
|
+
force?: boolean;
|
|
731
|
+
/** Skip `npm install` for lint deps. */
|
|
785
732
|
skipInstall?: boolean;
|
|
786
|
-
/**
|
|
787
|
-
* Legacy token CSS files (paths relative to `projectRoot`) detected by
|
|
788
|
-
* `detectConflicts` for the `tokens` key. When `conflictDecisions.tokens`
|
|
789
|
-
* is `'migrate'` and this list is non-empty, the orchestrator appends
|
|
790
|
-
* each file's content into `tokens/tokens.overrides.css` and backs the
|
|
791
|
-
* legacy files up to `.teamix-evo/.backups/` (W1.4 of the manage-entry
|
|
792
|
-
* plan; see [`legacy-tokens-migrate`](./legacy-tokens-migrate.ts)).
|
|
793
|
-
*
|
|
794
|
-
* Ignored for any other `tokens` decision. The caller (init command) is
|
|
795
|
-
* responsible for filtering out paths already inside `tokens/`.
|
|
796
|
-
*/
|
|
797
|
-
legacyTokensPaths?: string[];
|
|
798
|
-
/**
|
|
799
|
-
* Phase 3.E: existing ESLint config paths (relative to `projectRoot`)
|
|
800
|
-
* detected by `detectConflicts` for the `eslint-config` key. Used to
|
|
801
|
-
* back up the consumer's file before writing the teamix-evo template,
|
|
802
|
-
* and to gate the `merge` / `backup-overwrite` / `skip` strategies in
|
|
803
|
-
* `runLintInit`.
|
|
804
|
-
*/
|
|
805
|
-
legacyEslintPaths?: string[];
|
|
806
|
-
/**
|
|
807
|
-
* Phase 3.E: existing Stylelint config paths (relative to `projectRoot`).
|
|
808
|
-
*/
|
|
809
|
-
legacyStylelintPaths?: string[];
|
|
810
|
-
/** Step-level progress hook (caller controls presentation). */
|
|
733
|
+
/** Step-level progress hook. */
|
|
811
734
|
onStep?: (step: ProjectInitStep) => void;
|
|
812
|
-
/**
|
|
813
|
-
* If true, plan-only mode: compute the full step list without running any
|
|
814
|
-
* sub-command. Returns each step with `status: 'planned'`.
|
|
815
|
-
*/
|
|
735
|
+
/** Plan-only mode: compute steps without running sub-commands. */
|
|
816
736
|
dryRun?: boolean;
|
|
817
737
|
}
|
|
818
738
|
interface RunProjectInitResult {
|
|
819
739
|
status: 'installed' | 'partial' | 'dry-run';
|
|
820
740
|
steps: ProjectInitStep[];
|
|
821
|
-
/** Conflicts whose strategy needs the post-batch-4 managed-region engine. */
|
|
822
|
-
pendingConflictWork: PendingConflictWork[];
|
|
823
|
-
/**
|
|
824
|
-
* Aggregated, classified file-change ledger covering every step
|
|
825
|
-
* (Phase 1.A1). Backup entries are surfaced as `kind: 'backed-up'` so the
|
|
826
|
-
* CLI can render a four-bucket summary (新建 / 修改 / 备份 / 删除).
|
|
827
|
-
*/
|
|
828
741
|
changes: FileChange[];
|
|
829
|
-
/**
|
|
830
|
-
* Present when at least one step ended in `fail`. Lets the CLI surface a
|
|
831
|
-
* structured recovery message instead of just a stack-trace, and gives
|
|
832
|
-
* programmatic consumers a deterministic field to branch on.
|
|
833
|
-
*/
|
|
834
742
|
resumeHint?: ResumeHint;
|
|
835
|
-
/**
|
|
836
|
-
* Pre-init snapshot of `.teamix-evo/`, captured automatically before any
|
|
837
|
-
* file is written ([ADR 0019](../../../../docs/adr/0019-project-upgrade-flow.md) §2).
|
|
838
|
-
*
|
|
839
|
-
* - `null` on first-ever init (`.teamix-evo/` did not yet exist) and on
|
|
840
|
-
* `dryRun`.
|
|
841
|
-
* - Failure to capture a snapshot is **non-fatal** — surfaced via
|
|
842
|
-
* {@link snapshotError} so the CLI can warn the user. The init pipeline
|
|
843
|
-
* itself still runs.
|
|
844
|
-
*/
|
|
845
|
-
snapshot?: SnapshotResult | null;
|
|
846
|
-
/** Reason a snapshot capture failed (best-effort — never blocks init). */
|
|
847
|
-
snapshotError?: string;
|
|
848
743
|
}
|
|
849
|
-
/**
|
|
850
|
-
* Existing-project init pipeline.
|
|
851
|
-
*
|
|
852
|
-
* Order:
|
|
853
|
-
* 1. tokens init (auto-installs `teamix-evo-design-${variant}` skill)
|
|
854
|
-
* 2. skills add (`teamix-evo-code-${variant}`; entry skill is global, ADR 0033)
|
|
855
|
-
* 3. AGENTS.md (skill trigger fallback, ADR 0038)
|
|
856
|
-
* 4. ui init + ui add (gated by `withUi`)
|
|
857
|
-
* 5. lint init (gated by `withLint`)
|
|
858
|
-
*/
|
|
859
744
|
declare function runProjectInit(options: RunProjectInitOptions): Promise<RunProjectInitResult>;
|
|
860
745
|
|
|
861
|
-
type ProjectUpdateStepName = 'tokens' | 'skills' | 'ui' | 'biz-ui';
|
|
862
|
-
type ProjectUpdateStepStatus = 'ok' | 'skip' | 'fail' | 'planned';
|
|
863
|
-
interface ProjectUpdateStep {
|
|
864
|
-
name: ProjectUpdateStepName;
|
|
865
|
-
status: ProjectUpdateStepStatus;
|
|
866
|
-
detail?: string;
|
|
867
|
-
}
|
|
868
|
-
interface ProjectUpdateResumeHint {
|
|
869
|
-
/** The first step that failed (caller resumes from here). */
|
|
870
|
-
failedAt: ProjectUpdateStepName;
|
|
871
|
-
/** Steps already finished (status === 'ok'); will short-circuit on resume. */
|
|
872
|
-
completed: ProjectUpdateStepName[];
|
|
873
|
-
/** All steps that ended in fail status. */
|
|
874
|
-
failed: ProjectUpdateStepName[];
|
|
875
|
-
/** Human-readable error from the first failed step. */
|
|
876
|
-
error: string;
|
|
877
|
-
/**
|
|
878
|
-
* Suggested CLI command to resume. Today this is just `teamix-evo update`
|
|
879
|
-
* itself — every sub-step is idempotent (version-diff short-circuits when
|
|
880
|
-
* up-to-date), so a re-run continues from the failure point automatically.
|
|
881
|
-
*/
|
|
882
|
-
resumeCommand: string;
|
|
883
|
-
}
|
|
884
|
-
interface RunProjectUpdateOptions {
|
|
885
|
-
/** Absolute project root (must already be teamix-evo-installed). */
|
|
886
|
-
projectRoot: string;
|
|
887
|
-
/**
|
|
888
|
-
* If true, plan-only mode: compute version deltas without writing any
|
|
889
|
-
* file. Returns each step with `status: 'planned'`.
|
|
890
|
-
*/
|
|
891
|
-
dryRun?: boolean;
|
|
892
|
-
/** Step-level progress hook (caller controls presentation). */
|
|
893
|
-
onStep?: (step: ProjectUpdateStep) => void;
|
|
894
|
-
/** Override the tokens package name (defaults to `@teamix-evo/tokens`). */
|
|
895
|
-
tokensPackageName?: string;
|
|
896
|
-
/** Override the skills package name (defaults to `@teamix-evo/skills`). */
|
|
897
|
-
skillsPackageName?: string;
|
|
898
|
-
}
|
|
899
|
-
type RunProjectUpdateResult = {
|
|
900
|
-
status: 'not-initialized';
|
|
901
|
-
} | {
|
|
902
|
-
status: 'up-to-date' | 'updated' | 'partial' | 'dry-run';
|
|
903
|
-
steps: ProjectUpdateStep[];
|
|
904
|
-
resumeHint?: ProjectUpdateResumeHint;
|
|
905
|
-
/**
|
|
906
|
-
* Pre-update snapshot of `.teamix-evo/` ([ADR 0019](../../../../docs/adr/0019-project-upgrade-flow.md) §2).
|
|
907
|
-
* `null` on `dryRun`. Best-effort — capture failures surface via
|
|
908
|
-
* {@link snapshotError} but never abort the pipeline.
|
|
909
|
-
*/
|
|
910
|
-
snapshot?: SnapshotResult | null;
|
|
911
|
-
/** Reason a snapshot capture failed (best-effort — never blocks update). */
|
|
912
|
-
snapshotError?: string;
|
|
913
|
-
};
|
|
914
|
-
/**
|
|
915
|
-
* Post-init refresh pipeline.
|
|
916
|
-
*
|
|
917
|
-
* Order:
|
|
918
|
-
* 1. tokens update (regenerable rewrite + frozen preserved — ADR 0003 三态)
|
|
919
|
-
* 2. skills update (lock ∩ scope ∩ version-diff short-circuit — ADR 0035)
|
|
920
|
-
*
|
|
921
|
-
* Re-runs are safe: each sub-step short-circuits when already at latest.
|
|
922
|
-
*/
|
|
923
|
-
declare function runProjectUpdate(options: RunProjectUpdateOptions): Promise<RunProjectUpdateResult>;
|
|
924
|
-
|
|
925
746
|
interface InstallOptions {
|
|
926
747
|
/** Project root directory */
|
|
927
748
|
projectRoot: string;
|
|
@@ -1079,6 +900,8 @@ interface UiInstallOptions {
|
|
|
1079
900
|
requested: string[];
|
|
1080
901
|
/** When true, skip writing entries whose target file already exists (frozen-on-add). */
|
|
1081
902
|
skipExisting?: boolean;
|
|
903
|
+
/** When false, preserve directory structure in import paths (skip flattenRestPath). Defaults to true. */
|
|
904
|
+
flatten?: boolean;
|
|
1082
905
|
}
|
|
1083
906
|
interface UiInstallResult {
|
|
1084
907
|
/** Ordered list of entry ids that were processed (deps + requested) */
|
|
@@ -1169,4 +992,4 @@ declare function readInstalledManifest(projectRoot: string): Promise<InstalledMa
|
|
|
1169
992
|
*/
|
|
1170
993
|
declare function writeInstalledManifest(projectRoot: string, manifest: InstalledManifest): Promise<void>;
|
|
1171
994
|
|
|
1172
|
-
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
|
|
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 SkillSyncOptions, type SkillSyncResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, type UpdatePlanItem, detectConflicts, detectProjectState, ensureTeamixDir, extractDescriptionParts, getTeamixDir, installResources, installSkills, installUiEntries, listBizUiEntries, listBizUiVariants, listTemplatesEntries, listTemplatesVariants, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, removeSkillFiles, removeUiFiles, runBizUiAdd, runGenerateAgentsMd, runLintInit, runProjectInit, runSkillsAdd, runSkillsInit, runSkillsUpdate, runTemplatesAdd, runTokensInit, runUiAdd, runUiInit, runUiList, syncSkillsToIdes, updateSkills, writeInstalledManifest, writeProjectConfig };
|