teamix-evo 0.5.0 → 0.6.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 +5 -3
- package/dist/core/index.d.ts +150 -24
- package/dist/core/index.js +416 -67
- package/dist/core/index.js.map +1 -1
- package/dist/index.js +780 -253
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -174,9 +174,10 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
174
174
|
| `teamix-evo tokens list` | 查看已装机的 variant |
|
|
175
175
|
| `teamix-evo tokens update` | 更新已装资源(stub,v0.7 见 ADR 0019) |
|
|
176
176
|
| `teamix-evo tokens uninstall` | 卸载已装 tokens |
|
|
177
|
-
| `teamix-evo skills
|
|
177
|
+
| `teamix-evo skills init` | 自举 skills(按 variant + scope 全装 — ADR 0034) |
|
|
178
|
+
| `teamix-evo skills add <name...>` | 增量装指定 skill(`<name...>` 必填) |
|
|
178
179
|
| `teamix-evo skills list` | 列出所有 skill 的安装状态 |
|
|
179
|
-
| `teamix-evo skills update`
|
|
180
|
+
| `teamix-evo skills update [name...] [--dry-run]` | 升级 skills(双闸 + version 短路 — ADR 0035) |
|
|
180
181
|
| `teamix-evo skills sync [name...]` | 源 → IDE 镜像(漂移恢复用) |
|
|
181
182
|
| `teamix-evo skills doctor` | 检测源/镜像漂移(ADR 0013) |
|
|
182
183
|
| `teamix-evo skills uninstall` | 卸载 skills(源 + 镜像 + lock) |
|
|
@@ -187,6 +188,7 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
187
188
|
| `teamix-evo biz-ui add <id...> --variant <name>` | 安装变体感知业务组件(`--variant` 必填) |
|
|
188
189
|
| `teamix-evo templates list-variants` | 列出 templates 包内提供的页面模板变体 |
|
|
189
190
|
| `teamix-evo templates add <id...> --variant <name>` | 安装变体感知页面模板(`--variant` 必填) |
|
|
191
|
+
| `teamix-evo lint init [-y]` | 一键安装 ESLint + Stylelint token-discipline 规则集 |
|
|
190
192
|
| `teamix-evo logs analyze [...]` | 分析 vibe-logger AI 调用链(`.log/ai/**/*.jsonl`) |
|
|
191
193
|
| `teamix-evo logs trace [...]` | 按会话还原 AI 调用链(prompt → PreToolUse → PostToolUse → Stop) |
|
|
192
194
|
|
|
@@ -196,7 +198,7 @@ TEAMIX_DEBUG=1 teamix-evo tokens init opentrek
|
|
|
196
198
|
|
|
197
199
|
### 全局装 skill(`--scope global`)
|
|
198
200
|
|
|
199
|
-
`skills add`
|
|
201
|
+
`skills init` 与 `skills add` 都支持 `--scope global` 装到 IDE 全局(`~/.qoder/skills/` + `~/.claude/skills/`)。当 cwd 不是 Teamix Evo 项目时,工具会自动把元数据写到 `~/.teamix-evo-global/`,不污染当前目录。
|
|
200
202
|
|
|
201
203
|
```bash
|
|
202
204
|
# Onboarding 推荐:全局装 manage skill
|
package/dist/core/index.d.ts
CHANGED
|
@@ -80,31 +80,58 @@ interface ListVariantsResult {
|
|
|
80
80
|
}
|
|
81
81
|
declare function listTokenVariants(packageName?: string, packageRoot?: string): Promise<ListVariantsResult>;
|
|
82
82
|
|
|
83
|
+
interface RunSkillsInitOptions {
|
|
84
|
+
/** Absolute project root directory. */
|
|
85
|
+
projectRoot: string;
|
|
86
|
+
/** Target IDEs to inject skills into. Required (bulk has no fallback source). */
|
|
87
|
+
ides: readonly SkillIde[];
|
|
88
|
+
/** Install scope. Required (bulk has no fallback source). */
|
|
89
|
+
scope: SkillScope;
|
|
90
|
+
/** IDE identifier written into config.ide when bootstrapping a fresh config (defaults to "qoder"). */
|
|
91
|
+
ide?: string;
|
|
92
|
+
/** Override the skills package name (defaults to "@teamix-evo/skills"). */
|
|
93
|
+
packageName?: string;
|
|
94
|
+
}
|
|
95
|
+
type RunSkillsInitResult = {
|
|
96
|
+
status: 'installed';
|
|
97
|
+
packageName: string;
|
|
98
|
+
version: string;
|
|
99
|
+
ides: SkillIde[];
|
|
100
|
+
scope: SkillScope;
|
|
101
|
+
skillCount: number;
|
|
102
|
+
fileCount: number;
|
|
103
|
+
resources: InstalledResource[];
|
|
104
|
+
addedSkillIds: string[];
|
|
105
|
+
skippedSkillIds: string[];
|
|
106
|
+
} | {
|
|
107
|
+
/** Returned when a skills package is already installed and bulk has nothing new to add. */
|
|
108
|
+
status: 'already-initialized';
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Programmatic equivalent of `teamix-evo skills init`.
|
|
112
|
+
*
|
|
113
|
+
* Installs every manifest skill that matches the current tokens variant +
|
|
114
|
+
* install scope (per ADR 0033 scope filter). Re-running on a project whose
|
|
115
|
+
* `packages.skills` is already configured AND has no missing candidates
|
|
116
|
+
* returns `'already-initialized'`.
|
|
117
|
+
*/
|
|
118
|
+
declare function runSkillsInit(options: RunSkillsInitOptions): Promise<RunSkillsInitResult>;
|
|
83
119
|
interface RunSkillsAddOptions {
|
|
84
120
|
/** Absolute project root directory. */
|
|
85
121
|
projectRoot: string;
|
|
86
122
|
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* Required for the bulk path.
|
|
123
|
+
* Skill ids to add. **Required, must contain at least one id.** Use
|
|
124
|
+
* {@link runSkillsInit} for bulk bootstrap (no ids).
|
|
90
125
|
*/
|
|
126
|
+
names: readonly string[];
|
|
127
|
+
/** Target IDEs. Optional — falls back to the previously installed config. */
|
|
91
128
|
ides?: readonly SkillIde[];
|
|
92
|
-
/**
|
|
93
|
-
* Install scope. Optional in incremental mode (falls back to existing
|
|
94
|
-
* config). Required for the bulk path.
|
|
95
|
-
*/
|
|
129
|
+
/** Install scope. Optional — falls back to existing config. */
|
|
96
130
|
scope?: SkillScope;
|
|
97
131
|
/** IDE identifier written into config.ide when bootstrapping a fresh config (defaults to "qoder"). */
|
|
98
132
|
ide?: string;
|
|
99
133
|
/** Override the skills package name (defaults to "@teamix-evo/skills"). */
|
|
100
134
|
packageName?: string;
|
|
101
|
-
/**
|
|
102
|
-
* Optional skill ids to add. When omitted, all skills declared in the
|
|
103
|
-
* manifest are installed (bulk mode). When provided, only the listed skills
|
|
104
|
-
* are added (incremental mode); skills that are already installed are
|
|
105
|
-
* silently skipped and reported via `skippedSkillIds`.
|
|
106
|
-
*/
|
|
107
|
-
names?: readonly string[];
|
|
108
135
|
}
|
|
109
136
|
type RunSkillsAddResult = {
|
|
110
137
|
status: 'installed';
|
|
@@ -122,21 +149,85 @@ type RunSkillsAddResult = {
|
|
|
122
149
|
addedSkillIds: string[];
|
|
123
150
|
/** Skill ids that were requested but already installed; skipped. */
|
|
124
151
|
skippedSkillIds: string[];
|
|
125
|
-
} | {
|
|
126
|
-
/** Returned only from bulk mode when a skills package is already installed. */
|
|
127
|
-
status: 'already-added';
|
|
128
152
|
};
|
|
129
153
|
/**
|
|
130
|
-
* Programmatic equivalent of `teamix-evo skills add
|
|
154
|
+
* Programmatic equivalent of `teamix-evo skills add <names...>` (ADR 0034).
|
|
131
155
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
156
|
+
* Installs only the listed skills. Skills already present are skipped (use
|
|
157
|
+
* `skills update` to refresh). `ides` / `scope` may be omitted — they fall
|
|
158
|
+
* back to the previously installed config.
|
|
159
|
+
*
|
|
160
|
+
* Throws if `names` is empty — bulk bootstrap belongs to {@link runSkillsInit}.
|
|
137
161
|
*/
|
|
138
162
|
declare function runSkillsAdd(options: RunSkillsAddOptions): Promise<RunSkillsAddResult>;
|
|
139
163
|
|
|
164
|
+
interface RunSkillsUpdateOptions {
|
|
165
|
+
/** Absolute project (or global meta) root. */
|
|
166
|
+
projectRoot: string;
|
|
167
|
+
/**
|
|
168
|
+
* Optional: limit the update to these skill ids. Falls back to "every
|
|
169
|
+
* skill in lock that matches the current install scope".
|
|
170
|
+
*/
|
|
171
|
+
names?: readonly string[];
|
|
172
|
+
/** When true, plan only — no source rewrite, no mirror, no lock write. */
|
|
173
|
+
dryRun?: boolean;
|
|
174
|
+
/** Override the skills package name (defaults to `@teamix-evo/skills`). */
|
|
175
|
+
packageName?: string;
|
|
176
|
+
}
|
|
177
|
+
interface UpdatePlanItem {
|
|
178
|
+
id: string;
|
|
179
|
+
current: string;
|
|
180
|
+
next: string;
|
|
181
|
+
/** Same as updateStrategy semantics, computed from the manifest. */
|
|
182
|
+
strategy: 'frozen' | 'regenerable' | 'managed';
|
|
183
|
+
/**
|
|
184
|
+
* Predicted action for this skill source file in non-dryRun mode.
|
|
185
|
+
* - `up-to-date` — version unchanged; safe to skip
|
|
186
|
+
* - `version-bump` — version changed; will overwrite/merge per strategy
|
|
187
|
+
*/
|
|
188
|
+
action: 'up-to-date' | 'version-bump';
|
|
189
|
+
}
|
|
190
|
+
type RunSkillsUpdateResult = {
|
|
191
|
+
status: 'no-skills';
|
|
192
|
+
} | {
|
|
193
|
+
status: 'no-changes';
|
|
194
|
+
packageName: string;
|
|
195
|
+
version: string;
|
|
196
|
+
checkedSkillIds: string[];
|
|
197
|
+
} | {
|
|
198
|
+
status: 'dry-run';
|
|
199
|
+
packageName: string;
|
|
200
|
+
currentVersion: string;
|
|
201
|
+
availableVersion: string;
|
|
202
|
+
plan: UpdatePlanItem[];
|
|
203
|
+
} | {
|
|
204
|
+
status: 'updated';
|
|
205
|
+
packageName: string;
|
|
206
|
+
version: string;
|
|
207
|
+
ides: SkillIde[];
|
|
208
|
+
scope: SkillScope;
|
|
209
|
+
updatedSkillIds: string[];
|
|
210
|
+
skippedSkillIds: string[];
|
|
211
|
+
summary: {
|
|
212
|
+
overwritten: number;
|
|
213
|
+
managed: number;
|
|
214
|
+
skipped: number;
|
|
215
|
+
created: number;
|
|
216
|
+
};
|
|
217
|
+
resources: InstalledResource[];
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Programmatic equivalent of `teamix-evo skills update [names...] [--dry-run]`.
|
|
221
|
+
*
|
|
222
|
+
* Per ADR 0035:
|
|
223
|
+
* 1. Range = `keys(lock.skills) ∩ scope-match ∩ (names if given)`
|
|
224
|
+
* 2. version-diff short-circuit when every target id has the same lock
|
|
225
|
+
* version as the manifest
|
|
226
|
+
* 3. New skills (not in lock) are NEVER auto-installed by update
|
|
227
|
+
* 4. lock writeback only touches `targetIds` — existing entries are preserved
|
|
228
|
+
*/
|
|
229
|
+
declare function runSkillsUpdate(options: RunSkillsUpdateOptions): Promise<RunSkillsUpdateResult>;
|
|
230
|
+
|
|
140
231
|
declare const DEFAULT_UI_ALIASES: UiAliases;
|
|
141
232
|
declare const DEFAULT_UI_ICON_LIBRARY = "lucide";
|
|
142
233
|
interface RunUiInitOptions {
|
|
@@ -244,6 +335,31 @@ interface RunUiListResult {
|
|
|
244
335
|
*/
|
|
245
336
|
declare function runUiList(options: RunUiListOptions): Promise<RunUiListResult>;
|
|
246
337
|
|
|
338
|
+
interface RunLintInitOptions {
|
|
339
|
+
/** Absolute project root directory. */
|
|
340
|
+
projectRoot: string;
|
|
341
|
+
/**
|
|
342
|
+
* Skip npm dependency installation. Used by the create scaffold where
|
|
343
|
+
* dependencies are already declared in the template package.json and
|
|
344
|
+
* installed in a later batch step.
|
|
345
|
+
*/
|
|
346
|
+
skipInstall?: boolean;
|
|
347
|
+
}
|
|
348
|
+
type RunLintInitResult = {
|
|
349
|
+
status: 'installed';
|
|
350
|
+
eslint: boolean;
|
|
351
|
+
stylelint: boolean;
|
|
352
|
+
} | {
|
|
353
|
+
status: 'already-initialized';
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* Programmatic equivalent of `teamix-evo lint init`.
|
|
357
|
+
*
|
|
358
|
+
* Writes lint configuration files and optionally installs dependencies.
|
|
359
|
+
* Idempotent: if both config files already exist, returns `already-initialized`.
|
|
360
|
+
*/
|
|
361
|
+
declare function runLintInit(options: RunLintInitOptions): Promise<RunLintInitResult>;
|
|
362
|
+
|
|
247
363
|
interface InstallOptions {
|
|
248
364
|
/** Project root directory */
|
|
249
365
|
projectRoot: string;
|
|
@@ -316,6 +432,16 @@ interface SkillUpdateOptions extends SkillInstallOptions {
|
|
|
316
432
|
* unused by the new flow. Callers should stop passing it.
|
|
317
433
|
*/
|
|
318
434
|
installed?: InstalledResource[];
|
|
435
|
+
/**
|
|
436
|
+
* Optional: limit the update to these skill ids. When provided, skills not
|
|
437
|
+
* in the set are skipped (no source rewrite, no mirror). Per ADR 0035,
|
|
438
|
+
* the high-level `runSkillsUpdate` always passes this with the intersection
|
|
439
|
+
* of `keys(lock.skills)` and the current install scope, ensuring update
|
|
440
|
+
* never accidentally installs new skills or skills from a mismatched scope.
|
|
441
|
+
*
|
|
442
|
+
* Type matches `SkillInstallOptions.onlyIds` (mutable `string[] | undefined`).
|
|
443
|
+
*/
|
|
444
|
+
onlyIds?: string[];
|
|
319
445
|
}
|
|
320
446
|
interface SkillUpdateResult {
|
|
321
447
|
resources: InstalledResource[];
|
|
@@ -481,4 +607,4 @@ declare function readInstalledManifest(projectRoot: string): Promise<InstalledMa
|
|
|
481
607
|
*/
|
|
482
608
|
declare function writeInstalledManifest(projectRoot: string, manifest: InstalledManifest): Promise<void>;
|
|
483
609
|
|
|
484
|
-
export { DEFAULT_UI_ALIASES, DEFAULT_UI_ICON_LIBRARY, type InstallOptions, type InstallResult, type ListVariantsResult, type RunSkillsAddOptions, type RunSkillsAddResult, type RunTokensInitOptions, type RunTokensInitResult, type RunUiAddOptions, type RunUiAddResult, type RunUiInitOptions, type RunUiInitResult, type RunUiListOptions, type RunUiListResult, type SkillInstallOptions, type SkillInstallResult, type SkillSyncOptions, type SkillSyncResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, ensureTeamixDir, getTeamixDir, installResources, installSkills, installUiEntries, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, removeSkillFiles, removeUiFiles, runSkillsAdd, runTokensInit, runUiAdd, runUiInit, runUiList, syncSkillsToIdes, updateSkills, writeInstalledManifest, writeProjectConfig };
|
|
610
|
+
export { DEFAULT_UI_ALIASES, DEFAULT_UI_ICON_LIBRARY, type InstallOptions, type InstallResult, type ListVariantsResult, type RunLintInitOptions, type RunLintInitResult, 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 SkillInstallOptions, type SkillInstallResult, type SkillSyncOptions, type SkillSyncResult, type SkillUpdateOptions, type SkillUpdateResult, type UiEntryListItem, type UiInstallOptions, type UiInstallResult, type UpdatePlanItem, ensureTeamixDir, getTeamixDir, installResources, installSkills, installUiEntries, listTokenVariants, loadSkillsData, loadUiData, loadVariantData, readInstalledManifest, readProjectConfig, removeSkillFiles, removeUiFiles, runLintInit, runSkillsAdd, runSkillsInit, runSkillsUpdate, runTokensInit, runUiAdd, runUiInit, runUiList, syncSkillsToIdes, updateSkills, writeInstalledManifest, writeProjectConfig };
|