oh-my-knowledge 0.26.0 → 0.28.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.
Files changed (167) hide show
  1. package/README.md +105 -346
  2. package/README.zh.md +142 -375
  3. package/dist/src/analysis/report-diagnostics.d.ts +2 -2
  4. package/dist/src/analysis/report-diagnostics.js +2 -2
  5. package/dist/src/analysis/sample-diagnostics.d.ts +3 -3
  6. package/dist/src/analysis/sample-diagnostics.js +3 -3
  7. package/dist/src/authoring/generator.d.ts.map +1 -1
  8. package/dist/src/authoring/generator.js +9 -8
  9. package/dist/src/authoring/generator.js.map +1 -1
  10. package/dist/src/cli/cli-exit.d.ts +15 -0
  11. package/dist/src/cli/cli-exit.d.ts.map +1 -0
  12. package/dist/src/cli/cli-exit.js +19 -0
  13. package/dist/src/cli/cli-exit.js.map +1 -0
  14. package/dist/src/cli/commands/_shared.d.ts +12 -0
  15. package/dist/src/cli/commands/_shared.d.ts.map +1 -0
  16. package/dist/src/cli/commands/_shared.js +26 -0
  17. package/dist/src/cli/commands/_shared.js.map +1 -0
  18. package/dist/src/cli/commands/doctor.d.ts +2 -0
  19. package/dist/src/cli/commands/doctor.d.ts.map +1 -0
  20. package/dist/src/cli/commands/doctor.js +174 -0
  21. package/dist/src/cli/commands/doctor.js.map +1 -0
  22. package/dist/src/cli/commands/eval-gold.d.ts +2 -0
  23. package/dist/src/cli/commands/eval-gold.d.ts.map +1 -0
  24. package/dist/src/cli/commands/eval-gold.js +137 -0
  25. package/dist/src/cli/commands/eval-gold.js.map +1 -0
  26. package/dist/src/cli/commands/eval-runner.d.ts +2 -0
  27. package/dist/src/cli/commands/eval-runner.d.ts.map +1 -0
  28. package/dist/src/cli/commands/eval-runner.js +299 -0
  29. package/dist/src/cli/commands/eval-runner.js.map +1 -0
  30. package/dist/src/cli/commands/eval.d.ts +2 -0
  31. package/dist/src/cli/commands/eval.d.ts.map +1 -0
  32. package/dist/src/cli/commands/eval.js +11 -0
  33. package/dist/src/cli/commands/eval.js.map +1 -0
  34. package/dist/src/cli/commands/evolve.d.ts +2 -0
  35. package/dist/src/cli/commands/evolve.d.ts.map +1 -0
  36. package/dist/src/cli/commands/evolve.js +115 -0
  37. package/dist/src/cli/commands/evolve.js.map +1 -0
  38. package/dist/src/cli/commands/init.d.ts +2 -0
  39. package/dist/src/cli/commands/init.d.ts.map +1 -0
  40. package/dist/src/cli/commands/init.js +110 -0
  41. package/dist/src/cli/commands/init.js.map +1 -0
  42. package/dist/src/cli/commands/observe.d.ts +2 -0
  43. package/dist/src/cli/commands/observe.d.ts.map +1 -0
  44. package/dist/src/cli/commands/observe.js +77 -0
  45. package/dist/src/cli/commands/observe.js.map +1 -0
  46. package/dist/src/cli/commands/registry.d.ts +11 -0
  47. package/dist/src/cli/commands/registry.d.ts.map +1 -0
  48. package/dist/src/cli/commands/registry.js +24 -0
  49. package/dist/src/cli/commands/registry.js.map +1 -0
  50. package/dist/src/cli/commands/sample.d.ts +2 -0
  51. package/dist/src/cli/commands/sample.d.ts.map +1 -0
  52. package/dist/src/cli/commands/sample.js +121 -0
  53. package/dist/src/cli/commands/sample.js.map +1 -0
  54. package/dist/src/cli/commands/studio.d.ts +2 -0
  55. package/dist/src/cli/commands/studio.d.ts.map +1 -0
  56. package/dist/src/cli/commands/studio.js +76 -0
  57. package/dist/src/cli/commands/studio.js.map +1 -0
  58. package/dist/src/cli/i18n-dict.d.ts +2 -4
  59. package/dist/src/cli/i18n-dict.d.ts.map +1 -1
  60. package/dist/src/cli/i18n-dict.js +461 -675
  61. package/dist/src/cli/i18n-dict.js.map +1 -1
  62. package/dist/src/cli/index.js +43 -1516
  63. package/dist/src/cli/index.js.map +1 -1
  64. package/dist/src/cli/parse-run-config.d.ts +3 -4
  65. package/dist/src/cli/parse-run-config.d.ts.map +1 -1
  66. package/dist/src/cli/parse-run-config.js +5 -5
  67. package/dist/src/cli/parse-run-config.js.map +1 -1
  68. package/dist/src/cli/parse-strict.d.ts +0 -13
  69. package/dist/src/cli/parse-strict.d.ts.map +1 -1
  70. package/dist/src/cli/parse-strict.js +2 -1
  71. package/dist/src/cli/parse-strict.js.map +1 -1
  72. package/dist/src/doctor/health/builtin-dimensions.d.ts +11 -0
  73. package/dist/src/doctor/health/builtin-dimensions.d.ts.map +1 -0
  74. package/dist/src/doctor/health/builtin-dimensions.js +94 -0
  75. package/dist/src/doctor/health/builtin-dimensions.js.map +1 -0
  76. package/dist/src/doctor/health/composer.d.ts +19 -0
  77. package/dist/src/doctor/health/composer.d.ts.map +1 -0
  78. package/dist/src/doctor/health/composer.js +289 -0
  79. package/dist/src/doctor/health/composer.js.map +1 -0
  80. package/dist/src/doctor/health/dimension-registry.d.ts +13 -0
  81. package/dist/src/doctor/health/dimension-registry.d.ts.map +1 -0
  82. package/dist/src/doctor/health/dimension-registry.js +28 -0
  83. package/dist/src/doctor/health/dimension-registry.js.map +1 -0
  84. package/dist/src/doctor/health/dimension-spec.d.ts +46 -0
  85. package/dist/src/doctor/health/dimension-spec.d.ts.map +1 -0
  86. package/dist/src/doctor/health/dimension-spec.js +12 -0
  87. package/dist/src/doctor/health/dimension-spec.js.map +1 -0
  88. package/dist/src/doctor/health/parser.d.ts +27 -0
  89. package/dist/src/doctor/health/parser.d.ts.map +1 -0
  90. package/dist/src/doctor/health/parser.js +190 -0
  91. package/dist/src/doctor/health/parser.js.map +1 -0
  92. package/dist/src/doctor/health/prompt-builder.d.ts +22 -0
  93. package/dist/src/doctor/health/prompt-builder.d.ts.map +1 -0
  94. package/dist/src/doctor/health/prompt-builder.js +162 -0
  95. package/dist/src/doctor/health/prompt-builder.js.map +1 -0
  96. package/dist/src/doctor/health/register.d.ts +13 -0
  97. package/dist/src/doctor/health/register.d.ts.map +1 -0
  98. package/dist/src/doctor/health/register.js +20 -0
  99. package/dist/src/doctor/health/register.js.map +1 -0
  100. package/dist/src/doctor/html-renderer.d.ts +20 -0
  101. package/dist/src/doctor/html-renderer.d.ts.map +1 -0
  102. package/dist/src/doctor/html-renderer.js +366 -0
  103. package/dist/src/doctor/html-renderer.js.map +1 -0
  104. package/dist/src/doctor/index.d.ts +1 -1
  105. package/dist/src/doctor/index.d.ts.map +1 -1
  106. package/dist/src/doctor/index.js +57 -8
  107. package/dist/src/doctor/index.js.map +1 -1
  108. package/dist/src/doctor/preflight.d.ts +2 -2
  109. package/dist/src/doctor/preflight.js +2 -2
  110. package/dist/src/doctor/renderer.d.ts +4 -0
  111. package/dist/src/doctor/renderer.d.ts.map +1 -1
  112. package/dist/src/doctor/renderer.js +72 -18
  113. package/dist/src/doctor/renderer.js.map +1 -1
  114. package/dist/src/doctor/rules.d.ts +6 -5
  115. package/dist/src/doctor/rules.d.ts.map +1 -1
  116. package/dist/src/doctor/rules.js +4 -3
  117. package/dist/src/doctor/rules.js.map +1 -1
  118. package/dist/src/eval-core/fact-checker.js +1 -1
  119. package/dist/src/eval-core/fact-checker.js.map +1 -1
  120. package/dist/src/eval-core/layer-gates.d.ts +1 -1
  121. package/dist/src/eval-core/layer-gates.js +1 -1
  122. package/dist/src/eval-core/verdict.d.ts +4 -4
  123. package/dist/src/eval-core/verdict.d.ts.map +1 -1
  124. package/dist/src/eval-core/verdict.js +2 -2
  125. package/dist/src/eval-workflows/batch-evaluation-workflow.d.ts +15 -2
  126. package/dist/src/eval-workflows/batch-evaluation-workflow.d.ts.map +1 -1
  127. package/dist/src/eval-workflows/batch-evaluation-workflow.js +13 -2
  128. package/dist/src/eval-workflows/batch-evaluation-workflow.js.map +1 -1
  129. package/dist/src/eval-workflows/evaluation-pipeline.d.ts +6 -3
  130. package/dist/src/eval-workflows/evaluation-pipeline.d.ts.map +1 -1
  131. package/dist/src/eval-workflows/evaluation-pipeline.js +10 -9
  132. package/dist/src/eval-workflows/evaluation-pipeline.js.map +1 -1
  133. package/dist/src/eval-workflows/run-evaluation.d.ts +1 -1
  134. package/dist/src/eval-workflows/run-evaluation.d.ts.map +1 -1
  135. package/dist/src/eval-workflows/run-evaluation.js +13 -6
  136. package/dist/src/eval-workflows/run-evaluation.js.map +1 -1
  137. package/dist/src/executors/script.d.ts.map +1 -1
  138. package/dist/src/executors/script.js +16 -3
  139. package/dist/src/executors/script.js.map +1 -1
  140. package/dist/src/grading/debias-validate.d.ts +2 -2
  141. package/dist/src/grading/debias-validate.js +2 -2
  142. package/dist/src/grading/gold-cli.d.ts +2 -5
  143. package/dist/src/grading/gold-cli.d.ts.map +1 -1
  144. package/dist/src/grading/gold-cli.js +4 -8
  145. package/dist/src/grading/gold-cli.js.map +1 -1
  146. package/dist/src/grading/judge.d.ts +1 -1
  147. package/dist/src/renderer/html-renderer.js +1 -1
  148. package/dist/src/renderer/layout.js +5 -5
  149. package/dist/src/renderer/layout.js.map +1 -1
  150. package/dist/src/renderer/skill-health-renderer.d.ts +1 -1
  151. package/dist/src/renderer/skill-health-renderer.js +1 -1
  152. package/dist/src/renderer/summary.js +8 -8
  153. package/dist/src/server/report-server.d.ts.map +1 -1
  154. package/dist/src/server/report-server.js +8 -7
  155. package/dist/src/server/report-server.js.map +1 -1
  156. package/dist/src/types/doctor.d.ts +44 -6
  157. package/dist/src/types/doctor.d.ts.map +1 -1
  158. package/dist/src/types/doctor.js +3 -0
  159. package/dist/src/types/doctor.js.map +1 -1
  160. package/dist/src/types/eval.d.ts +1 -1
  161. package/dist/src/types/report.d.ts +2 -2
  162. package/dist/src/types/report.d.ts.map +1 -1
  163. package/package.json +1 -1
  164. package/dist/src/cli/coverage-renderer.d.ts +0 -15
  165. package/dist/src/cli/coverage-renderer.d.ts.map +0 -1
  166. package/dist/src/cli/coverage-renderer.js +0 -74
  167. package/dist/src/cli/coverage-renderer.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ import { CliExit } from '../cli-exit.js';
2
+ import { resolve, join } from 'node:path';
3
+ import { tCli, langFromArgv } from '../i18n.js';
4
+ import { COMMON_OPTIONS } from '../parse-run-config.js';
5
+ import { parseArgsStrictOrExit } from '../parse-strict.js';
6
+ import { parseLastWindow } from './_shared.js';
7
+ export async function execute(argv) {
8
+ const lang = langFromArgv(argv);
9
+ const { values: rawValues, positionals } = parseArgsStrictOrExit({
10
+ args: argv,
11
+ allowPositionals: true,
12
+ options: {
13
+ ...COMMON_OPTIONS,
14
+ kb: { type: 'string' },
15
+ last: { type: 'string' },
16
+ from: { type: 'string' },
17
+ to: { type: 'string' },
18
+ skills: { type: 'string' },
19
+ 'output-dir': { type: 'string' },
20
+ },
21
+ });
22
+ // 该 handler options 全是 string-typed (无 boolean), 收紧 cast 让 caller 直接 use values.xxx 当 string 用。
23
+ const values = rawValues;
24
+ const dir = positionals[0];
25
+ if (!dir) {
26
+ console.error(tCli('cli.help.observe', lang).trim());
27
+ throw new CliExit(1);
28
+ }
29
+ const tracePath = resolve(dir);
30
+ const { existsSync, mkdirSync, writeFileSync } = await import('node:fs');
31
+ if (!existsSync(tracePath)) {
32
+ console.error(`Trace path does not exist: ${tracePath}`);
33
+ throw new CliExit(1);
34
+ }
35
+ // 时间窗: --from/--to 优先, --last fallback
36
+ let from = values.from;
37
+ if (!from && values.last) {
38
+ const inferred = parseLastWindow(values.last);
39
+ if (!inferred) {
40
+ console.error(`Invalid --last format: "${values.last}". Expected e.g. "7d" / "24h" / "30m".`);
41
+ throw new CliExit(1);
42
+ }
43
+ from = inferred;
44
+ }
45
+ const to = values.to;
46
+ const skills = values.skills ? values.skills.split(',').map((s) => s.trim()).filter(Boolean) : undefined;
47
+ console.log(`[omk] analyzing ${tracePath}...`);
48
+ const { computeSkillHealthReport } = await import('../../observability/skill-health-analyzer.js');
49
+ const report = computeSkillHealthReport(tracePath, {
50
+ kbRoot: values.kb ? resolve(values.kb) : undefined,
51
+ from,
52
+ to,
53
+ skills,
54
+ });
55
+ // JSON 是主产物;HTML 由 report server 的 /analyses/:id 按需渲染。
56
+ const outDir = resolve(values['output-dir'] || join(process.env.HOME || '.', '.oh-my-knowledge', 'analyses'));
57
+ mkdirSync(outDir, { recursive: true });
58
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19);
59
+ const jsonPath = join(outDir, `${timestamp}-skill-health.json`);
60
+ writeFileSync(jsonPath, JSON.stringify(report, null, 2));
61
+ // 控制台摘要
62
+ const { sessionCount, segmentCount, toolCallCount, toolFailureRate } = report.meta;
63
+ console.log('');
64
+ console.log(`sessions: ${sessionCount} · segments: ${segmentCount} · tool calls: ${toolCallCount} · fail rate: ${(toolFailureRate * 100).toFixed(1)}%`);
65
+ console.log(`overall: gapRate ${(report.overall.gapRate * 100).toFixed(1)}% · weightedGapRate ${(report.overall.weightedGapRate * 100).toFixed(1)}% · health: ${report.overall.healthBand}`);
66
+ console.log('');
67
+ const skillRows = Object.values(report.bySkill)
68
+ .sort((a, b) => b.segmentCount - a.segmentCount)
69
+ .slice(0, 10)
70
+ .map((s) => ` ${s.skillName.padEnd(24)} segs=${String(s.segmentCount).padStart(4)} gapRate=${String(Math.round(s.gap.gapRate * 100) + '%').padStart(4)} weighted=${String(Math.round(s.gap.weightedGapRate * 100) + '%').padStart(4)}${s.coverage ? ` cov=${Math.round(s.coverage.fileCoverageRate * 100)}%` : ''}`);
71
+ console.log('top skills:');
72
+ console.log(skillRows.join('\n'));
73
+ console.log('');
74
+ console.log(`report written to: ${jsonPath}`);
75
+ console.log(tCli('cli.observe.view_hint', lang));
76
+ }
77
+ //# sourceMappingURL=observe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observe.js","sourceRoot":"","sources":["../../../../src/cli/commands/observe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM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SAC/C,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;SACZ,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,gBAAgB,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3T,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC3B,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,sBAAsB,QAAQ,EAAE,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { CliMessageKey } from '../i18n-dict.js';
2
+ export interface CommandModule {
3
+ /** i18n key,dispatcher 收到 --help / -h 时打印此 key 的内容并 exit 0。 */
4
+ helpKey: CliMessageKey;
5
+ /** 二级子命令 help。用于 `omk eval gold --help` 这类产品子路径。 */
6
+ subHelp?: Record<string, CliMessageKey>;
7
+ execute: (argv: string[]) => Promise<void>;
8
+ }
9
+ /** 产品级主命令查表。新增对外命令时,在这里加一行就够。 */
10
+ export declare const PRODUCT_COMMANDS: Record<string, CommandModule>;
11
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AASrD,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,OAAO,EAAE,aAAa,CAAC;IACvB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5C;AAED,iCAAiC;AACjC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAc1D,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { execute as doctor } from './doctor.js';
2
+ import { execute as evalCommand } from './eval.js';
3
+ import { execute as evolve } from './evolve.js';
4
+ import { execute as init } from './init.js';
5
+ import { execute as observe } from './observe.js';
6
+ import { execute as sample } from './sample.js';
7
+ import { execute as studio } from './studio.js';
8
+ /** 产品级主命令查表。新增对外命令时,在这里加一行就够。 */
9
+ export const PRODUCT_COMMANDS = {
10
+ init: { helpKey: 'cli.help.init_usage', execute: init },
11
+ doctor: { helpKey: 'cli.help.doctor_usage', execute: doctor },
12
+ eval: {
13
+ helpKey: 'cli.help.eval',
14
+ subHelp: {
15
+ gold: 'cli.help.eval_gold',
16
+ },
17
+ execute: evalCommand,
18
+ },
19
+ observe: { helpKey: 'cli.help.observe', execute: observe },
20
+ evolve: { helpKey: 'cli.help.evolve', execute: evolve },
21
+ sample: { helpKey: 'cli.help.sample', execute: sample },
22
+ studio: { helpKey: 'cli.help.studio', execute: studio },
23
+ };
24
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/cli/commands/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAUhD,iCAAiC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAkC;IAC7D,IAAI,EAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE;IAC1D,MAAM,EAAG,EAAE,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,EAAE;IAC9D,IAAI,EAAK;QACP,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE;YACP,IAAI,EAAE,oBAAoB;SAC3B;QACD,OAAO,EAAE,WAAW;KACrB;IACD,OAAO,EAAE,EAAE,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE;IAC1D,MAAM,EAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE;IACxD,MAAM,EAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE;IACxD,MAAM,EAAG,EAAE,OAAO,EAAE,iBAAiB,EAAG,OAAO,EAAE,MAAM,EAAE;CAC1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function execute(argv: string[]): Promise<void>;
2
+ //# sourceMappingURL=sample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/sample.ts"],"names":[],"mappings":"AAYA,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuH3D"}
@@ -0,0 +1,121 @@
1
+ import { CliExit } from '../cli-exit.js';
2
+ import { resolve, join } from 'node:path';
3
+ import { existsSync } from 'node:fs';
4
+ import { tCli, langFromArgv } from '../i18n.js';
5
+ import { COMMON_OPTIONS } from '../parse-run-config.js';
6
+ import { parseArgsStrictOrExit } from '../parse-strict.js';
7
+ export async function execute(argv) {
8
+ const lang = langFromArgv(argv);
9
+ const { values, positionals } = parseArgsStrictOrExit({
10
+ args: argv,
11
+ options: {
12
+ ...COMMON_OPTIONS,
13
+ batch: { type: 'boolean', default: false },
14
+ count: { type: 'string', default: '5' },
15
+ model: { type: 'string', default: 'sonnet' },
16
+ 'skill-dir': { type: 'string', default: 'skills' },
17
+ },
18
+ allowPositionals: true,
19
+ });
20
+ const { generateSamples } = await import('../../authoring/generator.js');
21
+ const { readFileSync, writeFileSync } = await import('node:fs');
22
+ const count = Math.max(1, Number(values.count) || 5);
23
+ const model = values.model;
24
+ if (values.batch) {
25
+ // Batch mode: generate for all skills missing eval-samples
26
+ const skillDir = resolve(values['skill-dir']);
27
+ if (!existsSync(skillDir)) {
28
+ console.error(tCli('cli.common.skill_dir_not_found', lang, { path: skillDir }));
29
+ throw new CliExit(1);
30
+ }
31
+ const { readdirSync, statSync } = await import('node:fs');
32
+ const entries = readdirSync(skillDir);
33
+ let generated = 0;
34
+ for (const entry of entries) {
35
+ let name;
36
+ let skillPath;
37
+ let samplesPath;
38
+ const fullPath = join(skillDir, entry);
39
+ if (entry.endsWith('.md') && !entry.endsWith('.eval-samples.json')) {
40
+ name = entry.slice(0, -3);
41
+ skillPath = fullPath;
42
+ samplesPath = join(skillDir, `${name}.eval-samples.json`);
43
+ }
44
+ else if (statSync(fullPath).isDirectory()) {
45
+ const skillMd = join(fullPath, 'SKILL.md');
46
+ if (!existsSync(skillMd))
47
+ continue;
48
+ name = entry;
49
+ skillPath = skillMd;
50
+ samplesPath = join(fullPath, 'eval-samples.json');
51
+ }
52
+ else {
53
+ continue;
54
+ }
55
+ if (existsSync(samplesPath)) {
56
+ process.stderr.write(tCli('cli.gen.skill_skipped_existing', lang, { name }));
57
+ continue;
58
+ }
59
+ process.stderr.write(tCli('cli.gen.skill_generating', lang, { name, count }));
60
+ try {
61
+ const skillContent = readFileSync(skillPath, 'utf-8');
62
+ const { samples, costUSD } = await generateSamples({ skillContent, count, model });
63
+ writeFileSync(samplesPath, JSON.stringify(samples, null, 2));
64
+ const cost = costUSD > 0 ? ` $${costUSD.toFixed(4)}` : '';
65
+ process.stderr.write(tCli('cli.gen.skill_done', lang, {
66
+ name, n: samples.length, path: samplesPath, cost,
67
+ }));
68
+ generated++;
69
+ }
70
+ catch (err) {
71
+ process.stderr.write(tCli('cli.gen.skill_failed', lang, {
72
+ name, message: err.message,
73
+ }));
74
+ }
75
+ }
76
+ if (generated === 0) {
77
+ console.log(tCli('cli.gen.batch_none_needed', lang));
78
+ }
79
+ else {
80
+ console.log(tCli('cli.gen.batch_summary', lang, { n: generated }));
81
+ }
82
+ }
83
+ else {
84
+ // Single skill mode — 必须显式传 <skill-path>;flag value (如 --count 3 里的 3)
85
+ // 不会被当成 positional,因为我们用的是 parser 返回的 positionals。
86
+ const skillPath = positionals[0];
87
+ if (!skillPath) {
88
+ console.error(tCli('cli.gen.specify_skill_path', lang));
89
+ throw new CliExit(1);
90
+ }
91
+ const resolvedPath = resolve(skillPath);
92
+ if (!existsSync(resolvedPath)) {
93
+ console.error(tCli('cli.common.skill_file_not_found', lang, { path: resolvedPath }));
94
+ throw new CliExit(1);
95
+ }
96
+ const skillContent = readFileSync(resolvedPath, 'utf-8');
97
+ const outputPath = resolve('eval-samples.json');
98
+ if (existsSync(outputPath)) {
99
+ console.error(tCli('cli.gen.samples_already_exists', lang));
100
+ throw new CliExit(1);
101
+ }
102
+ process.stderr.write(tCli('cli.gen.single_generating', lang, { count }));
103
+ try {
104
+ const { samples, costUSD } = await generateSamples({ skillContent, count, model });
105
+ writeFileSync(outputPath, JSON.stringify(samples, null, 2));
106
+ const cost = costUSD > 0 ? ` $${costUSD.toFixed(4)}` : '';
107
+ process.stderr.write(tCli('cli.gen.single_done', lang, {
108
+ n: samples.length, path: outputPath, cost,
109
+ }));
110
+ console.log(tCli('cli.gen.review_hint', lang));
111
+ }
112
+ catch (err) {
113
+ // CliExit 透传,保持 eval / improve / doctor 的一致性约束。
114
+ if (err instanceof CliExit)
115
+ throw err;
116
+ console.error(tCli('cli.gen.failed', lang, { message: err.message }));
117
+ throw new CliExit(1);
118
+ }
119
+ }
120
+ }
121
+ //# sourceMappingURL=sample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../../src/cli/commands/sample.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAO3D,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAc;IAC1C,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,qBAAqB,CAAC;QACpD,IAAI,EAAE,IAAI;QACV,OAAO,EAAE;YACP,GAAG,cAAc;YACjB,KAAK,EAAE,EAAE,IAAI,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ClE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,EAAE;gBACrD,CAAC,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;aAC1C,CAAC,CAAC,CAAC;YACJ,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,gDAAgD;YAChD,IAAI,GAAG,YAAY,OAAO;gBAAE,MAAM,GAAG,CAAC;YACtC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,EAAE,OAAO,EAAG,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjF,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function execute(argv: string[]): Promise<void>;
2
+ //# sourceMappingURL=studio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/studio.ts"],"names":[],"mappings":"AA0BA,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAqD3D"}
@@ -0,0 +1,76 @@
1
+ import { resolve } from 'node:path';
2
+ import { langFromArgv, tCli } from '../i18n.js';
3
+ import { COMMON_OPTIONS, DEFAULT_REPORTS_DIR } from '../parse-run-config.js';
4
+ import { parseArgsStrictOrExit } from '../parse-strict.js';
5
+ async function openWorkbench(url, lang) {
6
+ const { execFile } = await import('node:child_process');
7
+ const { platform } = await import('node:os');
8
+ const browser = process.env.BROWSER?.trim();
9
+ if (browser?.toLowerCase() === 'none')
10
+ return;
11
+ const os = platform();
12
+ const command = browser || (os === 'win32' ? 'cmd' : os === 'darwin' ? 'open' : 'xdg-open');
13
+ const args = os === 'win32' && !browser
14
+ ? ['/c', 'start', '', url]
15
+ : [url];
16
+ execFile(command, args, (err) => {
17
+ if (!err)
18
+ return;
19
+ process.stderr.write(tCli('cli.studio.open_failed', lang, {
20
+ command,
21
+ message: err.message,
22
+ }));
23
+ });
24
+ }
25
+ export async function execute(argv) {
26
+ const lang = langFromArgv(argv);
27
+ const { values } = parseArgsStrictOrExit({
28
+ args: argv,
29
+ options: {
30
+ ...COMMON_OPTIONS,
31
+ port: { type: 'string', default: '7799' },
32
+ 'reports-dir': { type: 'string', default: DEFAULT_REPORTS_DIR },
33
+ 'analyses-dir': { type: 'string' },
34
+ 'no-open': { type: 'boolean', default: false },
35
+ dev: { type: 'boolean', default: false },
36
+ },
37
+ });
38
+ if (values.dev && !process.env.__OMK_DEV_CHILD) {
39
+ const { spawn } = await import('node:child_process');
40
+ const { fileURLToPath } = await import('node:url');
41
+ const cliPath = resolve(fileURLToPath(import.meta.url), '..', '..', 'index.js');
42
+ const watchRoot = resolve(cliPath, '..', '..');
43
+ const args = [
44
+ '--watch-path', watchRoot,
45
+ cliPath,
46
+ 'studio',
47
+ '--port', values.port,
48
+ '--reports-dir', values['reports-dir'],
49
+ ];
50
+ if (values['analyses-dir']) {
51
+ args.push('--analyses-dir', values['analyses-dir']);
52
+ }
53
+ if (values['no-open']) {
54
+ args.push('--no-open');
55
+ }
56
+ const child = spawn(process.execPath, args, {
57
+ stdio: 'inherit',
58
+ env: { ...process.env, __OMK_DEV_CHILD: '1' },
59
+ });
60
+ child.on('exit', (code) => process.exit(code || 0));
61
+ return;
62
+ }
63
+ const { createReportServer } = await import('../../server/report-server.js');
64
+ const server = createReportServer({
65
+ port: Number(values.port),
66
+ reportsDir: resolve(values['reports-dir']),
67
+ ...(values['analyses-dir'] ? { analysesDir: resolve(values['analyses-dir']) } : {}),
68
+ });
69
+ const url = await server.start();
70
+ console.log(tCli('cli.studio.started', lang, { url }));
71
+ console.log(tCli('cli.studio.stop_hint', lang));
72
+ if (!values['no-open'] && process.stdout.isTTY) {
73
+ await openWorkbench(url, lang);
74
+ }
75
+ }
76
+ //# sourceMappingURL=studio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio.js","sourceRoot":"","sources":["../../../../src/cli/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,IAAI,EAAgB,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,KAAK,UAAU,aAAa,CAAC,GAAW,EAAE,IAAa;IACrD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACxD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;IAC5C,IAAI,OAAO,EAAE,WAAW,EAAE,KAAK,MAAM;QAAE,OAAO;IAE9C,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;IACtB,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAC5F,MAAM,IAAI,GAAG,EAAE,KAAK,OAAO,IAAI,CAAC,OAAO;QACrC,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC;QAC1B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACV,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;QAC9B,IAAI,CAA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AAO,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC,CAAC;IAChD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAC/C,MAAM,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;AACH,CAAC"}
@@ -16,9 +16,7 @@
16
16
  * 2. **保留原文的白名单 (产品术语 / 命令 / 文件名)**
17
17
  * 以下 token 在两种语言里都保留原文, 不翻译:
18
18
  * - 产品名: omk, oh-my-knowledge, Claude, npm
19
- * - 子命令空间和命令名: bench, analyze, run, report, init, evolve, gold,
20
- * diff, ci, gen-samples, debias-validate, saturation, verdict,
21
- * diagnose, failures
19
+ * - 命令名: init, doctor, eval, observe, evolve, sample, studio, gold
22
20
  * - omk 核心业务术语: skill, variant, sample, judge, executor (出现在产品
23
21
  * UI 里时首字母可大写如 "Skill 评测", 描述句中保持小写)
24
22
  * - 技术参数: --lang, --control, --treatment, --bootstrap, --judge-repeat,
@@ -47,7 +45,7 @@
47
45
  * 未来扩 Lang (zh-TW / ja / ko ...): 改 src/types/shared.ts 的 Lang union,
48
46
  * Record 类型自动强制每 key 加新语言版本。
49
47
  */
50
- export type CliMessageKey = 'cli.common.lang_invalid_silent' | 'cli.common.help_hint' | 'cli.common.unknown_domain' | 'cli.common.unknown_bench_command' | 'cli.init.scaffolded' | 'cli.init.next_steps_title' | 'cli.init.next_step_edit_samples' | 'cli.init.next_step_edit_skills' | 'cli.init.next_step_run' | 'cli.init.note_codex_executor' | 'cli.update.new_version_available' | 'cli.progress.preflight_starting' | 'cli.progress.sample_retry' | 'cli.progress.sample_error' | 'cli.progress.sample_executing' | 'cli.progress.sample_exec_done' | 'cli.progress.output_preview' | 'cli.progress.judging' | 'cli.progress.judged' | 'cli.progress.skipped' | 'cli.progress.sample_done' | 'cli.progress.sample_failed_done' | 'cli.run.invalid_repeat' | 'cli.run.invalid_judge_repeat' | 'cli.run.no_debias_length_active' | 'cli.run.invalid_bootstrap_samples' | 'cli.run.bootstrap_samples_too_large' | 'cli.run.skill_section' | 'cli.run.run_section' | 'cli.run.batch_complete' | 'cli.run.eval_complete' | 'cli.run.tally' | 'cli.run.report_saved' | 'cli.run.report_server_running' | 'cli.run.report_server_view' | 'cli.run.report_server_stop' | 'cli.run.no_serve_in_non_tty' | 'cli.run.no_serve_view_hint' | 'cli.run.gold_load_failed' | 'cli.run.gold_load_issue' | 'cli.run.contamination_warning' | 'cli.common.error_prefix' | 'cli.analyze.view_in_browser' | 'cli.common.skill_dir_not_found' | 'cli.common.skill_file_not_found' | 'cli.common.report_not_found' | 'cli.common.no_judge_model' | 'cli.common.judge_models_single_only' | 'cli.common.usage_gold_validate' | 'cli.common.warn_load_samples_failed' | 'cli.gen.skill_skipped_existing' | 'cli.gen.skill_generating' | 'cli.gen.skill_done' | 'cli.gen.skill_failed' | 'cli.gen.batch_none_needed' | 'cli.gen.batch_summary' | 'cli.gen.specify_skill_path' | 'cli.gen.samples_already_exists' | 'cli.gen.single_generating' | 'cli.gen.single_done' | 'cli.gen.review_hint' | 'cli.gen.failed' | 'cli.evolve.specify_skill_path' | 'cli.evolve.section_header' | 'cli.evolve.round_baseline' | 'cli.evolve.round_error' | 'cli.evolve.round_done' | 'cli.evolve.summary' | 'cli.evolve.best_path' | 'cli.evolve.versions_saved' | 'cli.evolve.report_link' | 'cli.gold.created_files' | 'cli.gold.next_step_edit_annotations' | 'cli.gold.validate_ok' | 'cli.debias.warn_cost_doubles' | 'cli.saturation.no_data' | 'cli.saturation.verdict_header' | 'cli.saturation.variant_no_trace' | 'cli.saturation.variant_label' | 'cli.saturation.checkpoints' | 'cli.saturation.last_point' | 'cli.saturation.persisted_verdict' | 'cli.saturation.persisted_verdict_saturated' | 'cli.saturation.persisted_verdict_unsaturated' | 'cli.saturation.skipped_too_few_points' | 'cli.help.main' | 'cli.help.diff_usage' | 'cli.help.analyze_usage' | 'cli.help.gold' | 'cli.help.debias_validate' | 'cli.help.saturation' | 'cli.help.verdict' | 'cli.help.diagnose' | 'cli.help.failures' | 'cli.diagnose.coverage_header' | 'cli.diagnose.coverage_unspecified' | 'cli.diagnose.coverage_chars' | 'cli.diagnose.coverage_hint_empty' | 'cli.diagnose.coverage_declared' | 'cli.doctor.rule.skill_readable' | 'cli.doctor.rule.skill_metadata' | 'cli.doctor.rule.dependencies' | 'cli.doctor.rule.samples_contract' | 'cli.doctor.skill_readable.pass' | 'cli.doctor.skill_metadata.pass' | 'cli.doctor.dependencies.pass' | 'cli.doctor.samples_contract.pass' | 'cli.doctor.skill_readable.fail.missing' | 'cli.doctor.skill_readable.fail.empty' | 'cli.doctor.skill_readable.fail.too_short' | 'cli.doctor.skill_readable.hint.missing' | 'cli.doctor.dependencies.hint.tool' | 'cli.doctor.dependencies.hint.file' | 'cli.doctor.dependencies.hint.env' | 'cli.doctor.dependencies.hint.preflight' | 'cli.doctor.dependencies.issue.tool_not_found' | 'cli.doctor.dependencies.issue.file_not_found' | 'cli.doctor.dependencies.issue.env_not_set' | 'cli.doctor.dependencies.issue.preflight_failed' | 'cli.doctor.skill_readable.hint.too_short' | 'cli.doctor.skill_metadata.fail.frontmatter_invalid' | 'cli.doctor.skill_metadata.fail.missing_skillmd' | 'cli.doctor.skill_metadata.hint.frontmatter' | 'cli.doctor.skill_metadata.hint.missing_skillmd' | 'cli.doctor.dependencies.fail' | 'cli.doctor.samples_contract.skipped' | 'cli.doctor.samples_contract.warn.empty' | 'cli.doctor.samples_contract.warn.missing_prompt' | 'cli.doctor.samples_contract.hint' | 'cli.help.doctor_usage' | 'cli.doctor.no_skill_found' | 'cli.doctor.gate_blocked' | 'cli.run.skip_connectivity_warning';
48
+ export type CliMessageKey = 'cli.common.unknown_domain' | 'cli.init.scaffolded' | 'cli.init.next_steps_title' | 'cli.init.next_step_edit_samples' | 'cli.init.next_step_edit_skills' | 'cli.init.next_step_run' | 'cli.init.note_codex_executor' | 'cli.update.new_version_available' | 'cli.progress.preflight_starting' | 'cli.progress.sample_retry' | 'cli.progress.sample_error' | 'cli.progress.sample_executing' | 'cli.progress.sample_exec_done' | 'cli.progress.output_preview' | 'cli.progress.judging' | 'cli.progress.judged' | 'cli.progress.skipped' | 'cli.progress.sample_done' | 'cli.progress.sample_failed_done' | 'cli.run.invalid_repeat' | 'cli.run.invalid_judge_repeat' | 'cli.run.no_debias_length_active' | 'cli.run.invalid_bootstrap_samples' | 'cli.run.bootstrap_samples_too_large' | 'cli.run.power_warning_tiny_n' | 'cli.run.power_warning_small_n' | 'cli.run.power_warning_repeat_one' | 'cli.run.dry_run_no_scores' | 'cli.run.skill_section' | 'cli.run.run_section' | 'cli.run.batch_complete' | 'cli.run.batch_verdict_header' | 'cli.run.batch_child_report_missing' | 'cli.run.eval_complete' | 'cli.run.tally' | 'cli.run.report_saved' | 'cli.run.report_only_gate_skipped' | 'cli.run.report_server_running' | 'cli.run.report_server_view' | 'cli.run.report_server_stop' | 'cli.run.no_serve_in_non_tty' | 'cli.run.no_serve_view_hint' | 'cli.run.gold_load_failed' | 'cli.run.gold_load_issue' | 'cli.run.contamination_warning' | 'cli.common.error_prefix' | 'cli.observe.view_hint' | 'cli.common.skill_dir_not_found' | 'cli.common.skill_file_not_found' | 'cli.common.report_not_found' | 'cli.common.no_judge_model' | 'cli.common.judge_models_single_only' | 'cli.common.warn_load_samples_failed' | 'cli.studio.started' | 'cli.studio.stop_hint' | 'cli.studio.open_failed' | 'cli.gen.skill_skipped_existing' | 'cli.gen.skill_generating' | 'cli.gen.skill_done' | 'cli.gen.skill_failed' | 'cli.gen.batch_none_needed' | 'cli.gen.batch_summary' | 'cli.gen.specify_skill_path' | 'cli.gen.samples_already_exists' | 'cli.gen.single_generating' | 'cli.gen.single_done' | 'cli.gen.review_hint' | 'cli.gen.failed' | 'cli.evolve.specify_skill_path' | 'cli.evolve.section_header' | 'cli.evolve.round_baseline' | 'cli.evolve.round_error' | 'cli.evolve.round_done' | 'cli.evolve.summary' | 'cli.evolve.best_path' | 'cli.evolve.versions_saved' | 'cli.evolve.report_link' | 'cli.help.product_main' | 'cli.help.init_usage' | 'cli.help.eval' | 'cli.help.eval_gold' | 'cli.help.observe' | 'cli.help.evolve' | 'cli.help.sample' | 'cli.help.studio' | 'cli.doctor.rule.skill_readable' | 'cli.doctor.rule.skill_metadata' | 'cli.doctor.rule.dependencies' | 'cli.doctor.rule.samples_contract' | 'cli.doctor.rule.skill_health_check' | 'cli.doctor.health.skipped' | 'cli.doctor.health.no_dimensions' | 'cli.doctor.health.fail.executor' | 'cli.doctor.health.fail.parse' | 'cli.doctor.health.fail.empty_output' | 'cli.doctor.health.hint.executor' | 'cli.doctor.health.hint.parse' | 'cli.doctor.health.dim.message' | 'cli.doctor.health.dim.missing' | 'cli.doctor.health.summary.label' | 'cli.doctor.health.summary.message' | 'cli.doctor.health.summary.no_top' | 'cli.doctor.health.dim.trigger-boundary' | 'cli.doctor.health.dim.doc-clarity' | 'cli.doctor.health.dim.instr-precision' | 'cli.doctor.health.dim.dependency' | 'cli.doctor.health.dim.tool-conventions' | 'cli.doctor.health.dim.security' | 'cli.doctor.health.dim.examples' | 'cli.doctor.skill_readable.pass' | 'cli.doctor.skill_metadata.pass' | 'cli.doctor.dependencies.pass' | 'cli.doctor.samples_contract.pass' | 'cli.doctor.skill_readable.fail.missing' | 'cli.doctor.skill_readable.fail.empty' | 'cli.doctor.skill_readable.fail.too_short' | 'cli.doctor.skill_readable.hint.missing' | 'cli.doctor.dependencies.hint.tool' | 'cli.doctor.dependencies.hint.file' | 'cli.doctor.dependencies.hint.env' | 'cli.doctor.dependencies.hint.preflight' | 'cli.doctor.dependencies.issue.tool_not_found' | 'cli.doctor.dependencies.issue.file_not_found' | 'cli.doctor.dependencies.issue.env_not_set' | 'cli.doctor.dependencies.issue.preflight_failed' | 'cli.doctor.skill_readable.hint.too_short' | 'cli.doctor.skill_metadata.fail.frontmatter_invalid' | 'cli.doctor.skill_metadata.fail.missing_skillmd' | 'cli.doctor.skill_metadata.hint.frontmatter' | 'cli.doctor.skill_metadata.hint.missing_skillmd' | 'cli.doctor.dependencies.fail' | 'cli.doctor.samples_contract.skipped' | 'cli.doctor.samples_contract.warn.empty' | 'cli.doctor.samples_contract.warn.missing_prompt' | 'cli.doctor.samples_contract.hint' | 'cli.help.doctor_usage' | 'cli.doctor.no_skill_found' | 'cli.doctor.samples_detected' | 'cli.doctor.gate_blocked' | 'cli.run.skip_connectivity_warning';
51
49
  export interface CliMessage {
52
50
  zh: string;
53
51
  en: string;
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-dict.d.ts","sourceRoot":"","sources":["../../../src/cli/i18n-dict.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,MAAM,MAAM,aAAa,GAErB,gCAAgC,GAChC,sBAAsB,GACtB,2BAA2B,GAC3B,kCAAkC,GAElC,qBAAqB,GACrB,2BAA2B,GAC3B,iCAAiC,GACjC,gCAAgC,GAChC,wBAAwB,GACxB,8BAA8B,GAE9B,kCAAkC,GAElC,iCAAiC,GACjC,2BAA2B,GAC3B,2BAA2B,GAC3B,+BAA+B,GAC/B,+BAA+B,GAC/B,6BAA6B,GAC7B,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,GACtB,0BAA0B,GAC1B,iCAAiC,GAEjC,wBAAwB,GACxB,8BAA8B,GAC9B,iCAAiC,GACjC,mCAAmC,GACnC,qCAAqC,GAErC,uBAAuB,GACvB,qBAAqB,GACrB,wBAAwB,GACxB,uBAAuB,GACvB,eAAe,GACf,sBAAsB,GACtB,+BAA+B,GAC/B,4BAA4B,GAC5B,4BAA4B,GAC5B,6BAA6B,GAC7B,4BAA4B,GAC5B,0BAA0B,GAC1B,yBAAyB,GACzB,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