oh-my-knowledge 0.32.0 → 0.34.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 (729) hide show
  1. package/README.md +29 -14
  2. package/README.zh.md +32 -17
  3. package/dist/analysis/coverage-analyzer.d.ts +0 -1
  4. package/dist/analysis/coverage-analyzer.js +0 -1
  5. package/dist/analysis/failure-clusterer.d.ts +0 -1
  6. package/dist/analysis/failure-clusterer.js +0 -1
  7. package/dist/analysis/gap-analyzer.d.ts +0 -1
  8. package/dist/analysis/gap-analyzer.js +0 -1
  9. package/dist/analysis/hedging-classifier.d.ts +0 -1
  10. package/dist/analysis/hedging-classifier.js +1 -2
  11. package/dist/analysis/report-diagnostics.d.ts +0 -1
  12. package/dist/analysis/report-diagnostics.js +0 -1
  13. package/dist/analysis/sample-diagnostics.d.ts +1 -2
  14. package/dist/analysis/sample-diagnostics.js +18 -19
  15. package/dist/analysis/saturation.d.ts +8 -1
  16. package/dist/analysis/saturation.js +12 -5
  17. package/dist/assets/agent-skills/omk/SKILL.md +197 -0
  18. package/dist/assets/agent-skills/omk/references/commands.md +547 -0
  19. package/dist/authoring/evolver.d.ts +169 -4
  20. package/dist/authoring/evolver.js +287 -15
  21. package/dist/authoring/generator.d.ts +29 -2
  22. package/dist/authoring/generator.js +113 -1
  23. package/dist/authoring/sample-fixer.d.ts +0 -1
  24. package/dist/authoring/sample-fixer.js +0 -1
  25. package/dist/cli/commands/doctor.d.ts +2 -1
  26. package/dist/cli/commands/doctor.js +24 -6
  27. package/dist/cli/commands/eval/gold/compare.d.ts +0 -1
  28. package/dist/cli/commands/eval/gold/compare.js +0 -1
  29. package/dist/cli/commands/eval/gold/index.d.ts +0 -1
  30. package/dist/cli/commands/eval/gold/index.js +0 -1
  31. package/dist/cli/commands/eval/gold/init.d.ts +0 -1
  32. package/dist/cli/commands/eval/gold/init.js +0 -1
  33. package/dist/cli/commands/eval/gold/validate.d.ts +0 -1
  34. package/dist/cli/commands/eval/gold/validate.js +0 -1
  35. package/dist/cli/commands/eval/index.d.ts +2 -1
  36. package/dist/cli/commands/eval/index.js +23 -11
  37. package/dist/cli/commands/evolve.d.ts +7 -1
  38. package/dist/cli/commands/evolve.js +93 -6
  39. package/dist/cli/commands/init.d.ts +0 -1
  40. package/dist/cli/commands/init.js +0 -1
  41. package/dist/cli/commands/install.d.ts +22 -0
  42. package/dist/cli/commands/install.js +411 -0
  43. package/dist/cli/commands/observe/inbox.d.ts +0 -1
  44. package/dist/cli/commands/observe/inbox.js +0 -1
  45. package/dist/cli/commands/observe/index.d.ts +0 -1
  46. package/dist/cli/commands/observe/index.js +6 -3
  47. package/dist/cli/commands/observe/ingest.d.ts +0 -1
  48. package/dist/cli/commands/observe/ingest.js +0 -1
  49. package/dist/cli/commands/observe/show.d.ts +0 -1
  50. package/dist/cli/commands/observe/show.js +0 -1
  51. package/dist/cli/commands/sample.d.ts +2 -1
  52. package/dist/cli/commands/sample.js +100 -9
  53. package/dist/cli/commands/studio.d.ts +0 -1
  54. package/dist/cli/commands/studio.js +0 -1
  55. package/dist/cli/index.d.ts +0 -1
  56. package/dist/cli/index.js +1 -2
  57. package/dist/cli/lib/cli-exit.d.ts +0 -1
  58. package/dist/cli/lib/cli-exit.js +0 -1
  59. package/dist/cli/lib/cmd-flags.d.ts +11 -1
  60. package/dist/cli/lib/cmd-flags.js +0 -1
  61. package/dist/cli/lib/i18n-dict/common.d.ts +1 -2
  62. package/dist/cli/lib/i18n-dict/common.js +18 -3
  63. package/dist/cli/lib/i18n-dict/evolve.d.ts +1 -2
  64. package/dist/cli/lib/i18n-dict/evolve.js +24 -1
  65. package/dist/cli/lib/i18n-dict/gen.d.ts +0 -1
  66. package/dist/cli/lib/i18n-dict/gen.js +0 -1
  67. package/dist/cli/lib/i18n-dict/help.d.ts +0 -1
  68. package/dist/cli/lib/i18n-dict/help.js +0 -1
  69. package/dist/cli/lib/i18n-dict/init.d.ts +0 -1
  70. package/dist/cli/lib/i18n-dict/init.js +0 -1
  71. package/dist/cli/lib/i18n-dict/install.d.ts +3 -0
  72. package/dist/cli/lib/i18n-dict/install.js +90 -0
  73. package/dist/cli/lib/i18n-dict/run.d.ts +0 -1
  74. package/dist/cli/lib/i18n-dict/run.js +0 -1
  75. package/dist/cli/lib/i18n-dict/types.d.ts +0 -1
  76. package/dist/cli/lib/i18n-dict/types.js +0 -1
  77. package/dist/cli/lib/i18n-dict.d.ts +2 -2
  78. package/dist/cli/lib/i18n-dict.js +2 -1
  79. package/dist/cli/lib/i18n.d.ts +0 -1
  80. package/dist/cli/lib/i18n.js +0 -1
  81. package/dist/cli/lib/parse-run-config/judge-models.d.ts +0 -1
  82. package/dist/cli/lib/parse-run-config/judge-models.js +0 -1
  83. package/dist/cli/lib/parse-run-config/samples-discovery.d.ts +0 -1
  84. package/dist/cli/lib/parse-run-config/samples-discovery.js +1 -4
  85. package/dist/cli/lib/parse-run-config/variant-resolution.d.ts +8 -4
  86. package/dist/cli/lib/parse-run-config/variant-resolution.js +46 -14
  87. package/dist/cli/lib/parse-run-config.d.ts +0 -1
  88. package/dist/cli/lib/parse-run-config.js +1 -2
  89. package/dist/cli/lib/progress.d.ts +0 -1
  90. package/dist/cli/lib/progress.js +0 -1
  91. package/dist/cli/lib/resolve-skill-input.d.ts +0 -1
  92. package/dist/cli/lib/resolve-skill-input.js +7 -6
  93. package/dist/cli/lib/run-tally.d.ts +0 -1
  94. package/dist/cli/lib/run-tally.js +1 -2
  95. package/dist/cli/lib/shared.d.ts +0 -1
  96. package/dist/cli/lib/shared.js +1 -2
  97. package/dist/cli/lib/update-check.d.ts +65 -1
  98. package/dist/cli/lib/update-check.js +220 -32
  99. package/dist/cli/lib/update-fetch-worker.d.ts +1 -0
  100. package/dist/cli/lib/update-fetch-worker.js +34 -0
  101. package/dist/cli/oclif/base-command.d.ts +0 -1
  102. package/dist/cli/oclif/base-command.js +0 -1
  103. package/dist/cli/oclif/help.d.ts +0 -1
  104. package/dist/cli/oclif/help.js +0 -1
  105. package/dist/cli/oclif/i18n.d.ts +0 -1
  106. package/dist/cli/oclif/i18n.js +0 -1
  107. package/dist/cli/oclif/parsers.d.ts +0 -1
  108. package/dist/cli/oclif/parsers.js +0 -1
  109. package/dist/cli/oclif/projection.d.ts +0 -1
  110. package/dist/cli/oclif/projection.js +0 -1
  111. package/dist/cli/oclif/run.d.ts +0 -1
  112. package/dist/cli/oclif/run.js +0 -1
  113. package/dist/diagnosis/observe-mapper.d.ts +2 -3
  114. package/dist/diagnosis/observe-mapper.js +6 -7
  115. package/dist/diagnosis/observe-producer.d.ts +0 -1
  116. package/dist/diagnosis/observe-producer.js +3 -4
  117. package/dist/diagnosis/studio-projection.d.ts +0 -1
  118. package/dist/diagnosis/studio-projection.js +0 -1
  119. package/dist/diagnosis/types.d.ts +0 -1
  120. package/dist/diagnosis/types.js +0 -1
  121. package/dist/doctor/fixer.d.ts +0 -1
  122. package/dist/doctor/fixer.js +0 -1
  123. package/dist/doctor/health/builtin-dimensions.d.ts +0 -1
  124. package/dist/doctor/health/builtin-dimensions.js +0 -1
  125. package/dist/doctor/health/composer.d.ts +0 -1
  126. package/dist/doctor/health/composer.js +1 -2
  127. package/dist/doctor/health/dimension-registry.d.ts +0 -1
  128. package/dist/doctor/health/dimension-registry.js +0 -1
  129. package/dist/doctor/health/dimension-spec.d.ts +0 -1
  130. package/dist/doctor/health/dimension-spec.js +0 -1
  131. package/dist/doctor/health/load-custom-dimensions.d.ts +1 -0
  132. package/dist/doctor/health/load-custom-dimensions.js +30 -0
  133. package/dist/doctor/health/parser.d.ts +0 -1
  134. package/dist/doctor/health/parser.js +0 -1
  135. package/dist/doctor/health/prompt-builder.d.ts +0 -1
  136. package/dist/doctor/health/prompt-builder.js +0 -1
  137. package/dist/doctor/health/register.d.ts +0 -1
  138. package/dist/doctor/health/register.js +0 -1
  139. package/dist/doctor/index.d.ts +0 -1
  140. package/dist/doctor/index.js +1 -2
  141. package/dist/doctor/messages.d.ts +0 -1
  142. package/dist/doctor/messages.js +1 -2
  143. package/dist/doctor/preflight.d.ts +0 -1
  144. package/dist/doctor/preflight.js +0 -1
  145. package/dist/doctor/renderer.d.ts +0 -1
  146. package/dist/doctor/renderer.js +0 -1
  147. package/dist/doctor/rules.d.ts +0 -1
  148. package/dist/doctor/rules.js +0 -1
  149. package/dist/eval-core/bootstrap.d.ts +8 -1
  150. package/dist/eval-core/bootstrap.js +11 -4
  151. package/dist/eval-core/cache.d.ts +0 -1
  152. package/dist/eval-core/cache.js +0 -1
  153. package/dist/eval-core/comparability.d.ts +0 -1
  154. package/dist/eval-core/comparability.js +3 -4
  155. package/dist/eval-core/dependency-checker.d.ts +0 -1
  156. package/dist/eval-core/dependency-checker.js +2 -2
  157. package/dist/eval-core/evaluation-execution.d.ts +0 -1
  158. package/dist/eval-core/evaluation-execution.js +0 -1
  159. package/dist/eval-core/evaluation-job.d.ts +0 -1
  160. package/dist/eval-core/evaluation-job.js +0 -1
  161. package/dist/eval-core/evaluation-reporting.d.ts +0 -1
  162. package/dist/eval-core/evaluation-reporting.js +9 -8
  163. package/dist/eval-core/execution-strategy.d.ts +0 -1
  164. package/dist/eval-core/execution-strategy.js +6 -3
  165. package/dist/eval-core/fact-checker.d.ts +0 -1
  166. package/dist/eval-core/fact-checker.js +0 -1
  167. package/dist/eval-core/layer-gates.d.ts +0 -1
  168. package/dist/eval-core/layer-gates.js +0 -1
  169. package/dist/eval-core/mocks-runtime.d.ts +0 -1
  170. package/dist/eval-core/mocks-runtime.js +0 -1
  171. package/dist/eval-core/schema.d.ts +0 -1
  172. package/dist/eval-core/schema.js +0 -1
  173. package/dist/eval-core/statistics.d.ts +0 -1
  174. package/dist/eval-core/statistics.js +0 -1
  175. package/dist/eval-core/task-planner.d.ts +0 -1
  176. package/dist/eval-core/task-planner.js +0 -1
  177. package/dist/eval-core/verdict.d.ts +21 -4
  178. package/dist/eval-core/verdict.js +54 -5
  179. package/dist/eval-workflows/batch-evaluation-workflow.d.ts +18 -3
  180. package/dist/eval-workflows/batch-evaluation-workflow.js +31 -15
  181. package/dist/eval-workflows/evaluation-pipeline/preflight-warnings.d.ts +0 -1
  182. package/dist/eval-workflows/evaluation-pipeline/preflight-warnings.js +0 -1
  183. package/dist/eval-workflows/evaluation-pipeline/report-finalize.d.ts +0 -1
  184. package/dist/eval-workflows/evaluation-pipeline/report-finalize.js +0 -1
  185. package/dist/eval-workflows/evaluation-pipeline/run-state.d.ts +0 -1
  186. package/dist/eval-workflows/evaluation-pipeline/run-state.js +0 -1
  187. package/dist/eval-workflows/evaluation-pipeline/test-set-hash.d.ts +0 -1
  188. package/dist/eval-workflows/evaluation-pipeline/test-set-hash.js +0 -1
  189. package/dist/eval-workflows/evaluation-pipeline.d.ts +0 -1
  190. package/dist/eval-workflows/evaluation-pipeline.js +0 -1
  191. package/dist/eval-workflows/evaluation-preparation.d.ts +1 -5
  192. package/dist/eval-workflows/evaluation-preparation.js +20 -16
  193. package/dist/eval-workflows/messages.d.ts +0 -1
  194. package/dist/eval-workflows/messages.js +0 -1
  195. package/dist/eval-workflows/run-evaluation.d.ts +4 -9
  196. package/dist/eval-workflows/run-evaluation.js +16 -26
  197. package/dist/executors/anthropic-api.d.ts +0 -1
  198. package/dist/executors/anthropic-api.js +1 -2
  199. package/dist/executors/claude-cli.d.ts +0 -1
  200. package/dist/executors/claude-cli.js +0 -1
  201. package/dist/executors/claude-sdk-trace.d.ts +0 -1
  202. package/dist/executors/claude-sdk-trace.js +0 -1
  203. package/dist/executors/claude-sdk.d.ts +0 -1
  204. package/dist/executors/claude-sdk.js +0 -1
  205. package/dist/executors/codex-cli-trace.d.ts +0 -1
  206. package/dist/executors/codex-cli-trace.js +0 -1
  207. package/dist/executors/codex-cli.d.ts +0 -1
  208. package/dist/executors/codex-cli.js +0 -1
  209. package/dist/executors/codex-sdk.d.ts +0 -1
  210. package/dist/executors/codex-sdk.js +0 -1
  211. package/dist/executors/gemini.d.ts +0 -1
  212. package/dist/executors/gemini.js +0 -1
  213. package/dist/executors/index.d.ts +0 -1
  214. package/dist/executors/index.js +0 -1
  215. package/dist/executors/openai-api.d.ts +0 -1
  216. package/dist/executors/openai-api.js +0 -1
  217. package/dist/executors/runtime-fingerprint.d.ts +0 -1
  218. package/dist/executors/runtime-fingerprint.js +2 -3
  219. package/dist/executors/script.d.ts +0 -1
  220. package/dist/executors/script.js +0 -1
  221. package/dist/executors/shared.d.ts +0 -2
  222. package/dist/executors/shared.js +0 -1
  223. package/dist/grading/assertions.d.ts +0 -1
  224. package/dist/grading/assertions.js +0 -1
  225. package/dist/grading/debias-validate.d.ts +0 -1
  226. package/dist/grading/debias-validate.js +0 -1
  227. package/dist/grading/diagnostic.d.ts +0 -1
  228. package/dist/grading/diagnostic.js +0 -1
  229. package/dist/grading/gold-cli.d.ts +0 -1
  230. package/dist/grading/gold-cli.js +0 -1
  231. package/dist/grading/gold-dataset.d.ts +0 -1
  232. package/dist/grading/gold-dataset.js +0 -1
  233. package/dist/grading/human-gold.d.ts +0 -1
  234. package/dist/grading/human-gold.js +0 -1
  235. package/dist/grading/index.d.ts +0 -1
  236. package/dist/grading/index.js +0 -1
  237. package/dist/grading/judge.d.ts +0 -1
  238. package/dist/grading/judge.js +0 -1
  239. package/dist/grading/layered-scores.d.ts +0 -1
  240. package/dist/grading/layered-scores.js +0 -1
  241. package/dist/inputs/eval-config.d.ts +0 -1
  242. package/dist/inputs/eval-config.js +3 -2
  243. package/dist/inputs/load-samples.d.ts +0 -1
  244. package/dist/inputs/load-samples.js +0 -1
  245. package/dist/inputs/mcp-resolver.d.ts +0 -1
  246. package/dist/inputs/mcp-resolver.js +0 -1
  247. package/dist/inputs/skill-loader.d.ts +99 -7
  248. package/dist/inputs/skill-loader.js +325 -45
  249. package/dist/inputs/source-resolver.d.ts +28 -0
  250. package/dist/inputs/source-resolver.js +125 -0
  251. package/dist/inputs/url-fetcher.d.ts +0 -1
  252. package/dist/inputs/url-fetcher.js +0 -1
  253. package/dist/managed/index.d.ts +5 -0
  254. package/dist/managed/index.js +5 -0
  255. package/dist/managed/store.d.ts +76 -0
  256. package/dist/managed/store.js +260 -0
  257. package/dist/observability/experience-frontmatter.d.ts +0 -1
  258. package/dist/observability/experience-frontmatter.js +0 -1
  259. package/dist/observability/experience.d.ts +1 -2
  260. package/dist/observability/experience.js +1 -2
  261. package/dist/observability/feedback-matchers.d.ts +0 -1
  262. package/dist/observability/feedback-matchers.js +0 -1
  263. package/dist/observability/feedback-projection.d.ts +0 -1
  264. package/dist/observability/feedback-projection.js +0 -1
  265. package/dist/observability/inbox-view-model.d.ts +0 -1
  266. package/dist/observability/inbox-view-model.js +0 -1
  267. package/dist/observability/inbox.d.ts +0 -1
  268. package/dist/observability/inbox.js +2 -3
  269. package/dist/observability/problem-patterns.d.ts +0 -1
  270. package/dist/observability/problem-patterns.js +0 -1
  271. package/dist/observability/resolved-review.d.ts +0 -1
  272. package/dist/observability/resolved-review.js +4 -5
  273. package/dist/observability/review-state.d.ts +0 -1
  274. package/dist/observability/review-state.js +3 -4
  275. package/dist/observability/skill-chain-advisories.d.ts +0 -1
  276. package/dist/observability/skill-chain-advisories.js +0 -1
  277. package/dist/observability/skill-chain.d.ts +0 -1
  278. package/dist/observability/skill-chain.js +5 -6
  279. package/dist/observability/skill-health-analyzer.d.ts +13 -1
  280. package/dist/observability/skill-health-analyzer.js +17 -3
  281. package/dist/observability/soft-standards/constants.d.ts +0 -1
  282. package/dist/observability/soft-standards/constants.js +0 -1
  283. package/dist/observability/soft-standards/index.d.ts +0 -1
  284. package/dist/observability/soft-standards/index.js +0 -1
  285. package/dist/observability/soft-standards/llm-extractor.d.ts +0 -1
  286. package/dist/observability/soft-standards/llm-extractor.js +7 -8
  287. package/dist/observability/soft-standards/runtime-evaluator.d.ts +0 -1
  288. package/dist/observability/soft-standards/runtime-evaluator.js +2 -3
  289. package/dist/observability/soft-standards/skill-standards-store.d.ts +0 -1
  290. package/dist/observability/soft-standards/skill-standards-store.js +5 -6
  291. package/dist/observability/soft-standards/types.d.ts +10 -11
  292. package/dist/observability/soft-standards/types.js +0 -1
  293. package/dist/observability/text-signals.d.ts +0 -1
  294. package/dist/observability/text-signals.js +0 -1
  295. package/dist/observability/trace-adapter.d.ts +0 -1
  296. package/dist/observability/trace-adapter.js +0 -1
  297. package/dist/observability/trace-attribution.d.ts +0 -1
  298. package/dist/observability/trace-attribution.js +0 -1
  299. package/dist/observability/trace-segmenter.d.ts +0 -1
  300. package/dist/observability/trace-segmenter.js +0 -1
  301. package/dist/observability/trace-source.d.ts +0 -1
  302. package/dist/observability/trace-source.js +0 -1
  303. package/dist/renderer/html-renderer.d.ts +0 -1
  304. package/dist/renderer/html-renderer.js +4 -5
  305. package/dist/renderer/layout.d.ts +0 -1
  306. package/dist/renderer/layout.js +2 -1
  307. package/dist/renderer/observation-inbox/helpers.d.ts +0 -1
  308. package/dist/renderer/observation-inbox/helpers.js +0 -1
  309. package/dist/renderer/observation-inbox/styles.d.ts +0 -1
  310. package/dist/renderer/observation-inbox/styles.js +0 -1
  311. package/dist/renderer/observation-inbox-renderer.d.ts +0 -1
  312. package/dist/renderer/observation-inbox-renderer.js +13 -14
  313. package/dist/renderer/skill-detail-renderer.d.ts +0 -1
  314. package/dist/renderer/skill-detail-renderer.js +101 -23
  315. package/dist/renderer/skill-health-renderer.d.ts +0 -1
  316. package/dist/renderer/skill-health-renderer.js +33 -5
  317. package/dist/renderer/skill-list-renderer.d.ts +0 -1
  318. package/dist/renderer/skill-list-renderer.js +18 -7
  319. package/dist/renderer/summary.d.ts +0 -1
  320. package/dist/renderer/summary.js +21 -10
  321. package/dist/renderer/table.d.ts +0 -1
  322. package/dist/renderer/table.js +0 -1
  323. package/dist/renderer/test-view.d.ts +0 -1
  324. package/dist/renderer/test-view.js +0 -1
  325. package/dist/renderer/trends.d.ts +0 -1
  326. package/dist/renderer/trends.js +0 -1
  327. package/dist/server/job-store.d.ts +0 -1
  328. package/dist/server/job-store.js +0 -1
  329. package/dist/server/report-server.d.ts +0 -1
  330. package/dist/server/report-server.js +10 -4
  331. package/dist/server/report-store.d.ts +1 -2
  332. package/dist/server/report-store.js +6 -7
  333. package/dist/server/skill-index.d.ts +0 -1
  334. package/dist/server/skill-index.js +7 -5
  335. package/dist/server/skill-insights.d.ts +0 -1
  336. package/dist/server/skill-insights.js +41 -14
  337. package/dist/shared/hard-rules.d.ts +0 -1
  338. package/dist/shared/hard-rules.js +0 -1
  339. package/dist/shared/llm-prompts/index.d.ts +0 -1
  340. package/dist/shared/llm-prompts/index.js +0 -1
  341. package/dist/shared/llm-prompts/skill-health.d.ts +0 -1
  342. package/dist/shared/llm-prompts/skill-health.js +0 -1
  343. package/dist/shared/time.d.ts +0 -1
  344. package/dist/shared/time.js +0 -1
  345. package/dist/shared/tool-search.d.ts +0 -1
  346. package/dist/shared/tool-search.js +0 -1
  347. package/dist/types/dependencies.d.ts +0 -1
  348. package/dist/types/dependencies.js +0 -1
  349. package/dist/types/diagnosis.d.ts +0 -1
  350. package/dist/types/diagnosis.js +0 -1
  351. package/dist/types/doctor.d.ts +4 -5
  352. package/dist/types/doctor.js +2 -3
  353. package/dist/types/eval.d.ts +2 -1
  354. package/dist/types/eval.js +0 -1
  355. package/dist/types/executor.d.ts +1 -2
  356. package/dist/types/executor.js +0 -1
  357. package/dist/types/index.d.ts +1 -1
  358. package/dist/types/index.js +1 -1
  359. package/dist/types/judge.d.ts +0 -1
  360. package/dist/types/judge.js +0 -1
  361. package/dist/types/managed.d.ts +85 -0
  362. package/dist/types/managed.js +1 -0
  363. package/dist/types/observability.d.ts +5 -6
  364. package/dist/types/observability.js +0 -1
  365. package/dist/types/report.d.ts +2 -3
  366. package/dist/types/report.js +0 -1
  367. package/dist/types/shared.d.ts +0 -1
  368. package/dist/types/shared.js +0 -1
  369. package/dist/types/skill-index.d.ts +3 -1
  370. package/dist/types/skill-index.js +0 -1
  371. package/dist/types/storage.d.ts +0 -1
  372. package/dist/types/storage.js +0 -1
  373. package/dist/util/safe-slice.d.ts +0 -1
  374. package/dist/util/safe-slice.js +0 -1
  375. package/package.json +10 -5
  376. package/dist/analysis/coverage-analyzer.d.ts.map +0 -1
  377. package/dist/analysis/coverage-analyzer.js.map +0 -1
  378. package/dist/analysis/failure-clusterer.d.ts.map +0 -1
  379. package/dist/analysis/failure-clusterer.js.map +0 -1
  380. package/dist/analysis/gap-analyzer.d.ts.map +0 -1
  381. package/dist/analysis/gap-analyzer.js.map +0 -1
  382. package/dist/analysis/hedging-classifier.d.ts.map +0 -1
  383. package/dist/analysis/hedging-classifier.js.map +0 -1
  384. package/dist/analysis/report-diagnostics.d.ts.map +0 -1
  385. package/dist/analysis/report-diagnostics.js.map +0 -1
  386. package/dist/analysis/sample-diagnostics.d.ts.map +0 -1
  387. package/dist/analysis/sample-diagnostics.js.map +0 -1
  388. package/dist/analysis/saturation.d.ts.map +0 -1
  389. package/dist/analysis/saturation.js.map +0 -1
  390. package/dist/authoring/evolver.d.ts.map +0 -1
  391. package/dist/authoring/evolver.js.map +0 -1
  392. package/dist/authoring/generator.d.ts.map +0 -1
  393. package/dist/authoring/generator.js.map +0 -1
  394. package/dist/authoring/sample-fixer.d.ts.map +0 -1
  395. package/dist/authoring/sample-fixer.js.map +0 -1
  396. package/dist/cli/commands/doctor.d.ts.map +0 -1
  397. package/dist/cli/commands/doctor.js.map +0 -1
  398. package/dist/cli/commands/eval/gold/compare.d.ts.map +0 -1
  399. package/dist/cli/commands/eval/gold/compare.js.map +0 -1
  400. package/dist/cli/commands/eval/gold/index.d.ts.map +0 -1
  401. package/dist/cli/commands/eval/gold/index.js.map +0 -1
  402. package/dist/cli/commands/eval/gold/init.d.ts.map +0 -1
  403. package/dist/cli/commands/eval/gold/init.js.map +0 -1
  404. package/dist/cli/commands/eval/gold/validate.d.ts.map +0 -1
  405. package/dist/cli/commands/eval/gold/validate.js.map +0 -1
  406. package/dist/cli/commands/eval/index.d.ts.map +0 -1
  407. package/dist/cli/commands/eval/index.js.map +0 -1
  408. package/dist/cli/commands/evolve.d.ts.map +0 -1
  409. package/dist/cli/commands/evolve.js.map +0 -1
  410. package/dist/cli/commands/init.d.ts.map +0 -1
  411. package/dist/cli/commands/init.js.map +0 -1
  412. package/dist/cli/commands/observe/inbox.d.ts.map +0 -1
  413. package/dist/cli/commands/observe/inbox.js.map +0 -1
  414. package/dist/cli/commands/observe/index.d.ts.map +0 -1
  415. package/dist/cli/commands/observe/index.js.map +0 -1
  416. package/dist/cli/commands/observe/ingest.d.ts.map +0 -1
  417. package/dist/cli/commands/observe/ingest.js.map +0 -1
  418. package/dist/cli/commands/observe/show.d.ts.map +0 -1
  419. package/dist/cli/commands/observe/show.js.map +0 -1
  420. package/dist/cli/commands/sample.d.ts.map +0 -1
  421. package/dist/cli/commands/sample.js.map +0 -1
  422. package/dist/cli/commands/studio.d.ts.map +0 -1
  423. package/dist/cli/commands/studio.js.map +0 -1
  424. package/dist/cli/index.d.ts.map +0 -1
  425. package/dist/cli/index.js.map +0 -1
  426. package/dist/cli/lib/cli-exit.d.ts.map +0 -1
  427. package/dist/cli/lib/cli-exit.js.map +0 -1
  428. package/dist/cli/lib/cmd-flags.d.ts.map +0 -1
  429. package/dist/cli/lib/cmd-flags.js.map +0 -1
  430. package/dist/cli/lib/i18n-dict/common.d.ts.map +0 -1
  431. package/dist/cli/lib/i18n-dict/common.js.map +0 -1
  432. package/dist/cli/lib/i18n-dict/evolve.d.ts.map +0 -1
  433. package/dist/cli/lib/i18n-dict/evolve.js.map +0 -1
  434. package/dist/cli/lib/i18n-dict/gen.d.ts.map +0 -1
  435. package/dist/cli/lib/i18n-dict/gen.js.map +0 -1
  436. package/dist/cli/lib/i18n-dict/help.d.ts.map +0 -1
  437. package/dist/cli/lib/i18n-dict/help.js.map +0 -1
  438. package/dist/cli/lib/i18n-dict/init.d.ts.map +0 -1
  439. package/dist/cli/lib/i18n-dict/init.js.map +0 -1
  440. package/dist/cli/lib/i18n-dict/run.d.ts.map +0 -1
  441. package/dist/cli/lib/i18n-dict/run.js.map +0 -1
  442. package/dist/cli/lib/i18n-dict/types.d.ts.map +0 -1
  443. package/dist/cli/lib/i18n-dict/types.js.map +0 -1
  444. package/dist/cli/lib/i18n-dict.d.ts.map +0 -1
  445. package/dist/cli/lib/i18n-dict.js.map +0 -1
  446. package/dist/cli/lib/i18n.d.ts.map +0 -1
  447. package/dist/cli/lib/i18n.js.map +0 -1
  448. package/dist/cli/lib/parse-run-config/judge-models.d.ts.map +0 -1
  449. package/dist/cli/lib/parse-run-config/judge-models.js.map +0 -1
  450. package/dist/cli/lib/parse-run-config/samples-discovery.d.ts.map +0 -1
  451. package/dist/cli/lib/parse-run-config/samples-discovery.js.map +0 -1
  452. package/dist/cli/lib/parse-run-config/variant-resolution.d.ts.map +0 -1
  453. package/dist/cli/lib/parse-run-config/variant-resolution.js.map +0 -1
  454. package/dist/cli/lib/parse-run-config.d.ts.map +0 -1
  455. package/dist/cli/lib/parse-run-config.js.map +0 -1
  456. package/dist/cli/lib/progress.d.ts.map +0 -1
  457. package/dist/cli/lib/progress.js.map +0 -1
  458. package/dist/cli/lib/resolve-skill-input.d.ts.map +0 -1
  459. package/dist/cli/lib/resolve-skill-input.js.map +0 -1
  460. package/dist/cli/lib/run-tally.d.ts.map +0 -1
  461. package/dist/cli/lib/run-tally.js.map +0 -1
  462. package/dist/cli/lib/shared.d.ts.map +0 -1
  463. package/dist/cli/lib/shared.js.map +0 -1
  464. package/dist/cli/lib/update-check.d.ts.map +0 -1
  465. package/dist/cli/lib/update-check.js.map +0 -1
  466. package/dist/cli/oclif/base-command.d.ts.map +0 -1
  467. package/dist/cli/oclif/base-command.js.map +0 -1
  468. package/dist/cli/oclif/help.d.ts.map +0 -1
  469. package/dist/cli/oclif/help.js.map +0 -1
  470. package/dist/cli/oclif/i18n.d.ts.map +0 -1
  471. package/dist/cli/oclif/i18n.js.map +0 -1
  472. package/dist/cli/oclif/parsers.d.ts.map +0 -1
  473. package/dist/cli/oclif/parsers.js.map +0 -1
  474. package/dist/cli/oclif/projection.d.ts.map +0 -1
  475. package/dist/cli/oclif/projection.js.map +0 -1
  476. package/dist/cli/oclif/run.d.ts.map +0 -1
  477. package/dist/cli/oclif/run.js.map +0 -1
  478. package/dist/diagnosis/observe-mapper.d.ts.map +0 -1
  479. package/dist/diagnosis/observe-mapper.js.map +0 -1
  480. package/dist/diagnosis/observe-producer.d.ts.map +0 -1
  481. package/dist/diagnosis/observe-producer.js.map +0 -1
  482. package/dist/diagnosis/studio-projection.d.ts.map +0 -1
  483. package/dist/diagnosis/studio-projection.js.map +0 -1
  484. package/dist/diagnosis/types.d.ts.map +0 -1
  485. package/dist/diagnosis/types.js.map +0 -1
  486. package/dist/doctor/fixer.d.ts.map +0 -1
  487. package/dist/doctor/fixer.js.map +0 -1
  488. package/dist/doctor/health/builtin-dimensions.d.ts.map +0 -1
  489. package/dist/doctor/health/builtin-dimensions.js.map +0 -1
  490. package/dist/doctor/health/composer.d.ts.map +0 -1
  491. package/dist/doctor/health/composer.js.map +0 -1
  492. package/dist/doctor/health/dimension-registry.d.ts.map +0 -1
  493. package/dist/doctor/health/dimension-registry.js.map +0 -1
  494. package/dist/doctor/health/dimension-spec.d.ts.map +0 -1
  495. package/dist/doctor/health/dimension-spec.js.map +0 -1
  496. package/dist/doctor/health/parser.d.ts.map +0 -1
  497. package/dist/doctor/health/parser.js.map +0 -1
  498. package/dist/doctor/health/prompt-builder.d.ts.map +0 -1
  499. package/dist/doctor/health/prompt-builder.js.map +0 -1
  500. package/dist/doctor/health/register.d.ts.map +0 -1
  501. package/dist/doctor/health/register.js.map +0 -1
  502. package/dist/doctor/index.d.ts.map +0 -1
  503. package/dist/doctor/index.js.map +0 -1
  504. package/dist/doctor/messages.d.ts.map +0 -1
  505. package/dist/doctor/messages.js.map +0 -1
  506. package/dist/doctor/preflight.d.ts.map +0 -1
  507. package/dist/doctor/preflight.js.map +0 -1
  508. package/dist/doctor/renderer.d.ts.map +0 -1
  509. package/dist/doctor/renderer.js.map +0 -1
  510. package/dist/doctor/rules.d.ts.map +0 -1
  511. package/dist/doctor/rules.js.map +0 -1
  512. package/dist/eval-core/bootstrap.d.ts.map +0 -1
  513. package/dist/eval-core/bootstrap.js.map +0 -1
  514. package/dist/eval-core/cache.d.ts.map +0 -1
  515. package/dist/eval-core/cache.js.map +0 -1
  516. package/dist/eval-core/comparability.d.ts.map +0 -1
  517. package/dist/eval-core/comparability.js.map +0 -1
  518. package/dist/eval-core/dependency-checker.d.ts.map +0 -1
  519. package/dist/eval-core/dependency-checker.js.map +0 -1
  520. package/dist/eval-core/evaluation-execution.d.ts.map +0 -1
  521. package/dist/eval-core/evaluation-execution.js.map +0 -1
  522. package/dist/eval-core/evaluation-job.d.ts.map +0 -1
  523. package/dist/eval-core/evaluation-job.js.map +0 -1
  524. package/dist/eval-core/evaluation-reporting.d.ts.map +0 -1
  525. package/dist/eval-core/evaluation-reporting.js.map +0 -1
  526. package/dist/eval-core/execution-strategy.d.ts.map +0 -1
  527. package/dist/eval-core/execution-strategy.js.map +0 -1
  528. package/dist/eval-core/fact-checker.d.ts.map +0 -1
  529. package/dist/eval-core/fact-checker.js.map +0 -1
  530. package/dist/eval-core/layer-gates.d.ts.map +0 -1
  531. package/dist/eval-core/layer-gates.js.map +0 -1
  532. package/dist/eval-core/mocks-runtime.d.ts.map +0 -1
  533. package/dist/eval-core/mocks-runtime.js.map +0 -1
  534. package/dist/eval-core/schema.d.ts.map +0 -1
  535. package/dist/eval-core/schema.js.map +0 -1
  536. package/dist/eval-core/statistics.d.ts.map +0 -1
  537. package/dist/eval-core/statistics.js.map +0 -1
  538. package/dist/eval-core/task-planner.d.ts.map +0 -1
  539. package/dist/eval-core/task-planner.js.map +0 -1
  540. package/dist/eval-core/verdict.d.ts.map +0 -1
  541. package/dist/eval-core/verdict.js.map +0 -1
  542. package/dist/eval-workflows/batch-evaluation-workflow.d.ts.map +0 -1
  543. package/dist/eval-workflows/batch-evaluation-workflow.js.map +0 -1
  544. package/dist/eval-workflows/evaluation-pipeline/preflight-warnings.d.ts.map +0 -1
  545. package/dist/eval-workflows/evaluation-pipeline/preflight-warnings.js.map +0 -1
  546. package/dist/eval-workflows/evaluation-pipeline/report-finalize.d.ts.map +0 -1
  547. package/dist/eval-workflows/evaluation-pipeline/report-finalize.js.map +0 -1
  548. package/dist/eval-workflows/evaluation-pipeline/run-state.d.ts.map +0 -1
  549. package/dist/eval-workflows/evaluation-pipeline/run-state.js.map +0 -1
  550. package/dist/eval-workflows/evaluation-pipeline/test-set-hash.d.ts.map +0 -1
  551. package/dist/eval-workflows/evaluation-pipeline/test-set-hash.js.map +0 -1
  552. package/dist/eval-workflows/evaluation-pipeline.d.ts.map +0 -1
  553. package/dist/eval-workflows/evaluation-pipeline.js.map +0 -1
  554. package/dist/eval-workflows/evaluation-preparation.d.ts.map +0 -1
  555. package/dist/eval-workflows/evaluation-preparation.js.map +0 -1
  556. package/dist/eval-workflows/messages.d.ts.map +0 -1
  557. package/dist/eval-workflows/messages.js.map +0 -1
  558. package/dist/eval-workflows/run-evaluation.d.ts.map +0 -1
  559. package/dist/eval-workflows/run-evaluation.js.map +0 -1
  560. package/dist/executors/anthropic-api.d.ts.map +0 -1
  561. package/dist/executors/anthropic-api.js.map +0 -1
  562. package/dist/executors/claude-cli.d.ts.map +0 -1
  563. package/dist/executors/claude-cli.js.map +0 -1
  564. package/dist/executors/claude-sdk-trace.d.ts.map +0 -1
  565. package/dist/executors/claude-sdk-trace.js.map +0 -1
  566. package/dist/executors/claude-sdk.d.ts.map +0 -1
  567. package/dist/executors/claude-sdk.js.map +0 -1
  568. package/dist/executors/codex-cli-trace.d.ts.map +0 -1
  569. package/dist/executors/codex-cli-trace.js.map +0 -1
  570. package/dist/executors/codex-cli.d.ts.map +0 -1
  571. package/dist/executors/codex-cli.js.map +0 -1
  572. package/dist/executors/codex-sdk.d.ts.map +0 -1
  573. package/dist/executors/codex-sdk.js.map +0 -1
  574. package/dist/executors/gemini.d.ts.map +0 -1
  575. package/dist/executors/gemini.js.map +0 -1
  576. package/dist/executors/index.d.ts.map +0 -1
  577. package/dist/executors/index.js.map +0 -1
  578. package/dist/executors/openai-api.d.ts.map +0 -1
  579. package/dist/executors/openai-api.js.map +0 -1
  580. package/dist/executors/runtime-fingerprint.d.ts.map +0 -1
  581. package/dist/executors/runtime-fingerprint.js.map +0 -1
  582. package/dist/executors/script.d.ts.map +0 -1
  583. package/dist/executors/script.js.map +0 -1
  584. package/dist/executors/shared.d.ts.map +0 -1
  585. package/dist/executors/shared.js.map +0 -1
  586. package/dist/grading/assertions.d.ts.map +0 -1
  587. package/dist/grading/assertions.js.map +0 -1
  588. package/dist/grading/debias-validate.d.ts.map +0 -1
  589. package/dist/grading/debias-validate.js.map +0 -1
  590. package/dist/grading/diagnostic.d.ts.map +0 -1
  591. package/dist/grading/diagnostic.js.map +0 -1
  592. package/dist/grading/gold-cli.d.ts.map +0 -1
  593. package/dist/grading/gold-cli.js.map +0 -1
  594. package/dist/grading/gold-dataset.d.ts.map +0 -1
  595. package/dist/grading/gold-dataset.js.map +0 -1
  596. package/dist/grading/human-gold.d.ts.map +0 -1
  597. package/dist/grading/human-gold.js.map +0 -1
  598. package/dist/grading/index.d.ts.map +0 -1
  599. package/dist/grading/index.js.map +0 -1
  600. package/dist/grading/judge.d.ts.map +0 -1
  601. package/dist/grading/judge.js.map +0 -1
  602. package/dist/grading/layered-scores.d.ts.map +0 -1
  603. package/dist/grading/layered-scores.js.map +0 -1
  604. package/dist/inputs/eval-config.d.ts.map +0 -1
  605. package/dist/inputs/eval-config.js.map +0 -1
  606. package/dist/inputs/load-samples.d.ts.map +0 -1
  607. package/dist/inputs/load-samples.js.map +0 -1
  608. package/dist/inputs/mcp-resolver.d.ts.map +0 -1
  609. package/dist/inputs/mcp-resolver.js.map +0 -1
  610. package/dist/inputs/skill-loader.d.ts.map +0 -1
  611. package/dist/inputs/skill-loader.js.map +0 -1
  612. package/dist/inputs/url-fetcher.d.ts.map +0 -1
  613. package/dist/inputs/url-fetcher.js.map +0 -1
  614. package/dist/observability/experience-frontmatter.d.ts.map +0 -1
  615. package/dist/observability/experience-frontmatter.js.map +0 -1
  616. package/dist/observability/experience.d.ts.map +0 -1
  617. package/dist/observability/experience.js.map +0 -1
  618. package/dist/observability/feedback-matchers.d.ts.map +0 -1
  619. package/dist/observability/feedback-matchers.js.map +0 -1
  620. package/dist/observability/feedback-projection.d.ts.map +0 -1
  621. package/dist/observability/feedback-projection.js.map +0 -1
  622. package/dist/observability/inbox-view-model.d.ts.map +0 -1
  623. package/dist/observability/inbox-view-model.js.map +0 -1
  624. package/dist/observability/inbox.d.ts.map +0 -1
  625. package/dist/observability/inbox.js.map +0 -1
  626. package/dist/observability/problem-patterns.d.ts.map +0 -1
  627. package/dist/observability/problem-patterns.js.map +0 -1
  628. package/dist/observability/resolved-review.d.ts.map +0 -1
  629. package/dist/observability/resolved-review.js.map +0 -1
  630. package/dist/observability/review-state.d.ts.map +0 -1
  631. package/dist/observability/review-state.js.map +0 -1
  632. package/dist/observability/skill-chain-advisories.d.ts.map +0 -1
  633. package/dist/observability/skill-chain-advisories.js.map +0 -1
  634. package/dist/observability/skill-chain.d.ts.map +0 -1
  635. package/dist/observability/skill-chain.js.map +0 -1
  636. package/dist/observability/skill-health-analyzer.d.ts.map +0 -1
  637. package/dist/observability/skill-health-analyzer.js.map +0 -1
  638. package/dist/observability/soft-standards/constants.d.ts.map +0 -1
  639. package/dist/observability/soft-standards/constants.js.map +0 -1
  640. package/dist/observability/soft-standards/index.d.ts.map +0 -1
  641. package/dist/observability/soft-standards/index.js.map +0 -1
  642. package/dist/observability/soft-standards/llm-extractor.d.ts.map +0 -1
  643. package/dist/observability/soft-standards/llm-extractor.js.map +0 -1
  644. package/dist/observability/soft-standards/runtime-evaluator.d.ts.map +0 -1
  645. package/dist/observability/soft-standards/runtime-evaluator.js.map +0 -1
  646. package/dist/observability/soft-standards/skill-standards-store.d.ts.map +0 -1
  647. package/dist/observability/soft-standards/skill-standards-store.js.map +0 -1
  648. package/dist/observability/soft-standards/types.d.ts.map +0 -1
  649. package/dist/observability/soft-standards/types.js.map +0 -1
  650. package/dist/observability/text-signals.d.ts.map +0 -1
  651. package/dist/observability/text-signals.js.map +0 -1
  652. package/dist/observability/trace-adapter.d.ts.map +0 -1
  653. package/dist/observability/trace-adapter.js.map +0 -1
  654. package/dist/observability/trace-attribution.d.ts.map +0 -1
  655. package/dist/observability/trace-attribution.js.map +0 -1
  656. package/dist/observability/trace-segmenter.d.ts.map +0 -1
  657. package/dist/observability/trace-segmenter.js.map +0 -1
  658. package/dist/observability/trace-source.d.ts.map +0 -1
  659. package/dist/observability/trace-source.js.map +0 -1
  660. package/dist/renderer/html-renderer.d.ts.map +0 -1
  661. package/dist/renderer/html-renderer.js.map +0 -1
  662. package/dist/renderer/layout.d.ts.map +0 -1
  663. package/dist/renderer/layout.js.map +0 -1
  664. package/dist/renderer/observation-inbox/helpers.d.ts.map +0 -1
  665. package/dist/renderer/observation-inbox/helpers.js.map +0 -1
  666. package/dist/renderer/observation-inbox/styles.d.ts.map +0 -1
  667. package/dist/renderer/observation-inbox/styles.js.map +0 -1
  668. package/dist/renderer/observation-inbox-renderer.d.ts.map +0 -1
  669. package/dist/renderer/observation-inbox-renderer.js.map +0 -1
  670. package/dist/renderer/skill-detail-renderer.d.ts.map +0 -1
  671. package/dist/renderer/skill-detail-renderer.js.map +0 -1
  672. package/dist/renderer/skill-health-renderer.d.ts.map +0 -1
  673. package/dist/renderer/skill-health-renderer.js.map +0 -1
  674. package/dist/renderer/skill-list-renderer.d.ts.map +0 -1
  675. package/dist/renderer/skill-list-renderer.js.map +0 -1
  676. package/dist/renderer/summary.d.ts.map +0 -1
  677. package/dist/renderer/summary.js.map +0 -1
  678. package/dist/renderer/table.d.ts.map +0 -1
  679. package/dist/renderer/table.js.map +0 -1
  680. package/dist/renderer/test-view.d.ts.map +0 -1
  681. package/dist/renderer/test-view.js.map +0 -1
  682. package/dist/renderer/trends.d.ts.map +0 -1
  683. package/dist/renderer/trends.js.map +0 -1
  684. package/dist/server/job-store.d.ts.map +0 -1
  685. package/dist/server/job-store.js.map +0 -1
  686. package/dist/server/report-server.d.ts.map +0 -1
  687. package/dist/server/report-server.js.map +0 -1
  688. package/dist/server/report-store.d.ts.map +0 -1
  689. package/dist/server/report-store.js.map +0 -1
  690. package/dist/server/skill-index.d.ts.map +0 -1
  691. package/dist/server/skill-index.js.map +0 -1
  692. package/dist/server/skill-insights.d.ts.map +0 -1
  693. package/dist/server/skill-insights.js.map +0 -1
  694. package/dist/shared/hard-rules.d.ts.map +0 -1
  695. package/dist/shared/hard-rules.js.map +0 -1
  696. package/dist/shared/llm-prompts/index.d.ts.map +0 -1
  697. package/dist/shared/llm-prompts/index.js.map +0 -1
  698. package/dist/shared/llm-prompts/skill-health.d.ts.map +0 -1
  699. package/dist/shared/llm-prompts/skill-health.js.map +0 -1
  700. package/dist/shared/time.d.ts.map +0 -1
  701. package/dist/shared/time.js.map +0 -1
  702. package/dist/shared/tool-search.d.ts.map +0 -1
  703. package/dist/shared/tool-search.js.map +0 -1
  704. package/dist/types/dependencies.d.ts.map +0 -1
  705. package/dist/types/dependencies.js.map +0 -1
  706. package/dist/types/diagnosis.d.ts.map +0 -1
  707. package/dist/types/diagnosis.js.map +0 -1
  708. package/dist/types/doctor.d.ts.map +0 -1
  709. package/dist/types/doctor.js.map +0 -1
  710. package/dist/types/eval.d.ts.map +0 -1
  711. package/dist/types/eval.js.map +0 -1
  712. package/dist/types/executor.d.ts.map +0 -1
  713. package/dist/types/executor.js.map +0 -1
  714. package/dist/types/index.d.ts.map +0 -1
  715. package/dist/types/index.js.map +0 -1
  716. package/dist/types/judge.d.ts.map +0 -1
  717. package/dist/types/judge.js.map +0 -1
  718. package/dist/types/observability.d.ts.map +0 -1
  719. package/dist/types/observability.js.map +0 -1
  720. package/dist/types/report.d.ts.map +0 -1
  721. package/dist/types/report.js.map +0 -1
  722. package/dist/types/shared.d.ts.map +0 -1
  723. package/dist/types/shared.js.map +0 -1
  724. package/dist/types/skill-index.d.ts.map +0 -1
  725. package/dist/types/skill-index.js.map +0 -1
  726. package/dist/types/storage.d.ts.map +0 -1
  727. package/dist/types/storage.js.map +0 -1
  728. package/dist/util/safe-slice.d.ts.map +0 -1
  729. package/dist/util/safe-slice.js.map +0 -1
@@ -0,0 +1,411 @@
1
+ import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, realpathSync, rmSync, statSync } from 'node:fs';
2
+ import { homedir } from 'node:os';
3
+ import { basename, dirname, relative, resolve, join, sep } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { Args, Flags } from '@oclif/core';
6
+ import { LANG_FLAG, bilingual } from '../oclif/i18n.js';
7
+ import { BaseCommand } from '../oclif/base-command.js';
8
+ import { tCli } from '../lib/i18n.js';
9
+ import { resolveInstallSource, SourceResolveError } from '../../inputs/source-resolver.js';
10
+ import { buildManagedArtifactRecord, hashArtifactSource, isDistributablePath, managedDir, recordManagedArtifact } from '../../managed/index.js';
11
+ const BUILTIN_OMK_AGENT_SKILL_ID = 'omk-agent-skill';
12
+ const INSTALLABLE_KINDS = ['skill', 'prompt', 'agent', 'workflow'];
13
+ const TARGET_ORDER = ['codex', 'claude'];
14
+ const TARGET_SPECS = {
15
+ codex: {
16
+ label: 'Codex/AGENTS',
17
+ skillsDir: (home) => join(home, '.agents', 'skills'),
18
+ detectDirs: (home) => [join(home, '.agents'), join(home, '.codex')],
19
+ },
20
+ claude: {
21
+ label: 'Claude Code',
22
+ skillsDir: (home) => join(home, '.claude', 'skills'),
23
+ detectDirs: (home) => [join(home, '.claude')],
24
+ },
25
+ };
26
+ function packagedOmkAgentSkillDir() {
27
+ const here = dirname(fileURLToPath(import.meta.url));
28
+ return resolve(here, '..', '..', 'assets', 'agent-skills', 'omk');
29
+ }
30
+ function knownTarget(target) {
31
+ const home = homedir();
32
+ const spec = TARGET_SPECS[target];
33
+ return { label: spec.label, skillsDir: spec.skillsDir(home) };
34
+ }
35
+ function directoryExists(path) {
36
+ try {
37
+ return statSync(path).isDirectory();
38
+ }
39
+ catch {
40
+ return false;
41
+ }
42
+ }
43
+ function parseTargets(raw, lang) {
44
+ const parts = [...new Set(raw.split(',').map((part) => part.trim()).filter(Boolean))];
45
+ if (parts.length === 0)
46
+ return autoTargets();
47
+ if (parts.includes('auto')) {
48
+ if (parts.length > 1)
49
+ throw new Error(tCli('cli.install.invalid_target_combo', lang, { target: raw }));
50
+ return autoTargets();
51
+ }
52
+ if (parts.includes('all')) {
53
+ if (parts.length > 1)
54
+ throw new Error(tCli('cli.install.invalid_target_combo', lang, { target: raw }));
55
+ return TARGET_ORDER;
56
+ }
57
+ const out = [];
58
+ for (const part of parts) {
59
+ if (part !== 'codex' && part !== 'claude') {
60
+ throw new Error(tCli('cli.install.unknown_target', lang, { target: part }));
61
+ }
62
+ out.push(part);
63
+ }
64
+ return out;
65
+ }
66
+ function autoTargets() {
67
+ const home = homedir();
68
+ return TARGET_ORDER.filter((target) => TARGET_SPECS[target].detectDirs(home).some(directoryExists));
69
+ }
70
+ function resolveInstallTargets(params) {
71
+ if (params.dest) {
72
+ return [{ label: 'custom', skillsDir: resolve(params.dest) }];
73
+ }
74
+ const targets = parseTargets(params.to, params.lang);
75
+ if (targets.length === 0) {
76
+ throw new Error(tCli('cli.install.no_detected_targets', params.lang));
77
+ }
78
+ const seen = new Set();
79
+ return targets
80
+ .map(knownTarget)
81
+ .filter((target) => {
82
+ const key = resolve(target.skillsDir);
83
+ if (seen.has(key))
84
+ return false;
85
+ seen.add(key);
86
+ return true;
87
+ });
88
+ }
89
+ /** 目标落点:目录-skill → {skillsDir}/{name};文件-skill → {skillsDir}/{name}.md。 */
90
+ function targetArtifactPath(target, name, isDirectorySkill) {
91
+ return isDirectorySkill ? join(target.skillsDir, name) : join(target.skillsDir, `${name}.md`);
92
+ }
93
+ /** 内置 omk Agent Skill 固定落到 {skillsDir}/omk(目录-skill)。 */
94
+ function targetSkillDir(target) {
95
+ return targetArtifactPath(target, 'omk', true);
96
+ }
97
+ /** 全部目标预检通过才拷任何一个(无部分安装)。源就是目标(就地接管)的目标跳过存在性检查。 */
98
+ function validateInstallTargets(params) {
99
+ if (params.dryRun || params.force)
100
+ return;
101
+ for (const targetPath of params.targetPaths) {
102
+ if (params.source && classifyPaths(params.source, targetPath) === 'same')
103
+ continue;
104
+ if (existsSync(targetPath)) {
105
+ throw new Error(tCli('cli.install.target_exists', params.lang, { path: targetPath }));
106
+ }
107
+ }
108
+ }
109
+ /** 解析路径的物理形态:对存在的最长前缀做 realpath、余下保持字面,使尚不存在的目标也能比较。 */
110
+ function realPathBestEffort(p) {
111
+ let cur = resolve(p);
112
+ const tail = [];
113
+ while (!existsSync(cur)) {
114
+ tail.unshift(basename(cur));
115
+ const parent = dirname(cur);
116
+ if (parent === cur)
117
+ break;
118
+ cur = parent;
119
+ }
120
+ const base = existsSync(cur) ? realpathSync(cur) : cur;
121
+ return tail.length ? join(base, ...tail) : base;
122
+ }
123
+ /**
124
+ * 源与目标的物理关系(解析软链):
125
+ * - same:同一节点 → 就地接管(绝不删/拷);
126
+ * - overlap:一个是另一个的祖先 → rmSync(target) 会删掉源、或 cpSync 把目录拷进自身子目录,数据损坏,必须拒;
127
+ * - disjoint:正常拷贝。
128
+ */
129
+ function classifyPaths(source, targetPath) {
130
+ const rs = realPathBestEffort(source);
131
+ const rt = realPathBestEffort(targetPath);
132
+ if (rs === rt)
133
+ return 'same';
134
+ if (rs.startsWith(rt + sep) || rt.startsWith(rs + sep))
135
+ return 'overlap';
136
+ return 'disjoint';
137
+ }
138
+ /**
139
+ * 通用拷贝:目录递归 cp(过滤 .omk / .git / evolve 等非分发产物 + 软链)、单文件 copyFile。
140
+ * 不打印——由调用方决定文案。dry-run 不写。源即目标 → 就地接管(inPlace);源与目标互为祖先 → 拒绝(防自毁)。
141
+ */
142
+ function copyArtifactToTarget(params) {
143
+ if (!existsSync(params.source)) {
144
+ throw new Error(tCli('cli.install.asset_missing', params.lang, { path: params.source }));
145
+ }
146
+ if (params.dryRun) {
147
+ return { targetPath: params.targetPath, planned: true, inPlace: false };
148
+ }
149
+ const relation = classifyPaths(params.source, params.targetPath);
150
+ // 就地接管:源就是目标(接管已安装的 skill),绝不 rmSync 源。
151
+ if (relation === 'same') {
152
+ return { targetPath: params.targetPath, planned: false, inPlace: true };
153
+ }
154
+ // 互为祖先:删除目标会删掉源、或自拷进子目录 —— 数据损坏,直接拒,哪怕带 --force。
155
+ if (relation === 'overlap') {
156
+ throw new Error(tCli('cli.install.target_overlaps_source', params.lang, { source: params.source, target: params.targetPath }));
157
+ }
158
+ if (existsSync(params.targetPath) && !params.force) {
159
+ throw new Error(tCli('cli.install.target_exists', params.lang, { path: params.targetPath }));
160
+ }
161
+ mkdirSync(params.skillsDir, { recursive: true });
162
+ rmSync(params.targetPath, { recursive: true, force: true });
163
+ if (params.isDirectorySkill) {
164
+ cpSync(params.source, params.targetPath, {
165
+ recursive: true,
166
+ // 与 hashArtifactSource 共用过滤,保证"分发出去的 == 算进 hash 的":
167
+ // 源根永远拷;软链跳过(与 hash walk 一致,避免软链目标改了却不触发 drift);
168
+ // evolve 只在源根第一层排除(嵌套 references/evolve 正常分发),.omk/.git 任意层级排除。
169
+ filter: (src) => {
170
+ const rel = relative(params.source, src);
171
+ if (rel === '')
172
+ return true;
173
+ if (lstatSync(src).isSymbolicLink())
174
+ return false;
175
+ return isDistributablePath(rel.split(sep));
176
+ },
177
+ });
178
+ }
179
+ else {
180
+ copyFileSync(params.source, params.targetPath);
181
+ }
182
+ return { targetPath: params.targetPath, planned: false, inPlace: false };
183
+ }
184
+ function installOmkAgentSkill(params) {
185
+ const targetDir = targetSkillDir(params.target);
186
+ const { planned } = copyArtifactToTarget({
187
+ source: params.sourceDir,
188
+ isDirectorySkill: true,
189
+ targetPath: targetDir,
190
+ skillsDir: params.target.skillsDir,
191
+ force: params.force,
192
+ dryRun: params.dryRun,
193
+ lang: params.lang,
194
+ });
195
+ console.log(tCli(planned ? 'cli.install.plan' : 'cli.install.installed', params.lang, { path: targetDir }));
196
+ return targetDir;
197
+ }
198
+ /**
199
+ * 是否当作用户 artifact 路径(否则按 typo 的内置 id 处理,报 unknown_input)。
200
+ * - 显式路径意图(含 `/`)或 `.md` 结尾 → 是(后续 installManagedSkill 经 resolver 给出精确的存在性 / SKILL.md 报错);
201
+ * - 裸短名 → 仅当它确实解析到一个含 SKILL.md 的目录才算;裸的同名普通文件(如 cwd 里恰好有个
202
+ * `omk-agnt-skill` 文件)不该被当成 skill 安装,落回 unknown_input。
203
+ */
204
+ function looksLikeArtifactPath(input) {
205
+ if (input.includes('/') || /\.md$/i.test(input))
206
+ return true;
207
+ try {
208
+ const abs = resolve(input);
209
+ return statSync(abs).isDirectory() && existsSync(join(abs, 'SKILL.md'));
210
+ }
211
+ catch {
212
+ return false;
213
+ }
214
+ }
215
+ export default class Install extends BaseCommand {
216
+ static description = bilingual({
217
+ zh: '安装 omk 官方 Agent Skill,或登记并分发用户自己的 skill(内置 id omk-agent-skill,本地路径,或 git:<ref>:<name> 取当前仓库某个 ref 的 skill)。默认写入本机已检测 agent 目标;安装用户 skill 时同时登记一条受管记录。',
218
+ en: 'Install the official omk Agent Skill, or register and distribute your own skill (built-in id omk-agent-skill, a local path, or git:<ref>:<name> for a skill at a ref of the current repo). Defaults to detected local agent targets; installing a user skill also records a managed entry.',
219
+ });
220
+ static examples = [
221
+ {
222
+ description: bilingual({
223
+ zh: '安装 omk 官方 Agent Skill 到默认本机目标',
224
+ en: 'Install the official omk Agent Skill into default local targets',
225
+ }),
226
+ command: '<%= config.bin %> install omk-agent-skill',
227
+ },
228
+ {
229
+ description: bilingual({
230
+ zh: '强制安装到当前 omk 已知的所有目标',
231
+ en: 'Install into every target currently known to omk',
232
+ }),
233
+ command: '<%= config.bin %> install omk-agent-skill --to all',
234
+ },
235
+ {
236
+ description: bilingual({
237
+ zh: '安装到自定义 skill 根目录',
238
+ en: 'Install into a custom skill root',
239
+ }),
240
+ command: '<%= config.bin %> install omk-agent-skill --dest ~/.my-agent/skills',
241
+ },
242
+ {
243
+ description: bilingual({
244
+ zh: '登记并分发用户自己的 skill(--kind 可省,命中 SKILL.md 自动推导)',
245
+ en: 'Register and distribute your own skill (--kind optional; inferred from SKILL.md)',
246
+ }),
247
+ command: '<%= config.bin %> install ./skills/review',
248
+ },
249
+ {
250
+ description: bilingual({
251
+ zh: '从当前仓库某个 ref 安装 skill(可复现;SHA 不可变、分支会随 ref 漂移)',
252
+ en: 'Install a skill from a ref of the current repo (reproducible; a SHA is immutable, a branch drifts with the ref)',
253
+ }),
254
+ command: '<%= config.bin %> install git:main:skills/review',
255
+ },
256
+ ];
257
+ static args = {
258
+ input: Args.string({
259
+ description: bilingual({
260
+ zh: '要安装的知识输入:内置 id omk-agent-skill,本地 skill 路径(目录或 .md),或 git:<ref>:<name>(当前仓库某 ref 的 skill)。',
261
+ en: 'Knowledge input to install: built-in id omk-agent-skill, a local skill path (directory or .md), or git:<ref>:<name> (a skill at a ref of the current repo).',
262
+ }),
263
+ required: true,
264
+ }),
265
+ };
266
+ static flags = {
267
+ lang: LANG_FLAG,
268
+ kind: Flags.string({
269
+ description: bilingual({
270
+ zh: '用户 artifact 的 kind(对齐 Artifact.kind)。可省:命中 SKILL.md 自动推导,当前仅支持 skill。',
271
+ en: 'Kind of the user artifact (aligns with Artifact.kind). Optional: inferred from SKILL.md; only skill is supported today.',
272
+ }),
273
+ options: INSTALLABLE_KINDS,
274
+ }),
275
+ to: Flags.string({
276
+ description: bilingual({
277
+ zh: '安装目标:auto(默认,本机已检测目标) / codex / claude / all。',
278
+ en: 'Install target: auto (default, detected local targets) / codex / claude / all.',
279
+ }),
280
+ default: 'auto',
281
+ }),
282
+ dest: Flags.string({
283
+ description: bilingual({
284
+ zh: '自定义 skill 根目录;skill 安装到 <dir>/<name>(内置 omk-agent-skill 为 <dir>/omk)。',
285
+ en: 'Custom skill root; a skill installs into <dir>/<name> (the built-in omk-agent-skill into <dir>/omk).',
286
+ }),
287
+ }),
288
+ force: Flags.boolean({
289
+ description: bilingual({
290
+ zh: '覆盖目标位置已存在的 skill。',
291
+ en: 'Overwrite an existing skill at the target location.',
292
+ }),
293
+ default: false,
294
+ }),
295
+ 'dry-run': Flags.boolean({
296
+ description: bilingual({
297
+ zh: '只打印安装目标,不写文件。',
298
+ en: 'Print install targets without writing files.',
299
+ }),
300
+ default: false,
301
+ }),
302
+ };
303
+ async run() {
304
+ const { args, flags } = await this.parse(Install);
305
+ const lang = this.lang;
306
+ await this.runWithCliExit(async () => {
307
+ if (args.input === BUILTIN_OMK_AGENT_SKILL_ID) {
308
+ this.installBuiltinAgentSkill(flags, lang);
309
+ return;
310
+ }
311
+ if (args.input.startsWith('git:') || looksLikeArtifactPath(args.input)) {
312
+ this.installManagedSkill(args.input, flags.kind, flags, lang);
313
+ return;
314
+ }
315
+ throw new Error(tCli('cli.install.unknown_input', lang, { input: args.input }));
316
+ });
317
+ }
318
+ installBuiltinAgentSkill(flags, lang) {
319
+ const sourceDir = packagedOmkAgentSkillDir();
320
+ const targets = resolveInstallTargets({ to: flags.to, dest: flags.dest, lang });
321
+ validateInstallTargets({
322
+ targetPaths: targets.map(targetSkillDir),
323
+ force: flags.force,
324
+ dryRun: flags['dry-run'],
325
+ lang,
326
+ });
327
+ for (const target of targets) {
328
+ installOmkAgentSkill({ sourceDir, target, force: flags.force, dryRun: flags['dry-run'], lang });
329
+ }
330
+ if (!flags['dry-run'])
331
+ console.log(tCli('cli.install.next_hint', lang));
332
+ }
333
+ installManagedSkill(input, kindFlag, flags, lang) {
334
+ // kind 推导:--kind 显式优先;否则缺省 skill(Phase 1 仅 skill)。
335
+ const kind = kindFlag ?? 'skill';
336
+ if (kind !== 'skill') {
337
+ throw new Error(tCli('cli.install.kind_unsupported', lang, { kind }));
338
+ }
339
+ // 源解析委托给 source-resolver(file / git ...),install 主干源无关。
340
+ // resolver 不依赖 CLI,错误以 SourceResolveError(messageKey) 抛出,这里映射成本地化文案。
341
+ let src;
342
+ try {
343
+ src = resolveInstallSource(input);
344
+ }
345
+ catch (err) {
346
+ if (err instanceof SourceResolveError) {
347
+ throw new Error(tCli(err.messageKey, lang, err.params));
348
+ }
349
+ throw err;
350
+ }
351
+ try {
352
+ const { localRoot, name, isDirectorySkill, sourceKind, locator, ref } = src;
353
+ // 目录-skill 哈整棵可分发树(排除 .omk/.git/evolve);git 源哈的是物化后的临时树。
354
+ const contentHash = hashArtifactSource(localRoot, isDirectorySkill);
355
+ const targets = resolveInstallTargets({ to: flags.to, dest: flags.dest, lang });
356
+ validateInstallTargets({
357
+ targetPaths: targets.map((t) => targetArtifactPath(t, name, isDirectorySkill)),
358
+ force: flags.force,
359
+ dryRun: flags['dry-run'],
360
+ lang,
361
+ source: localRoot,
362
+ });
363
+ const now = new Date().toISOString();
364
+ const distribution = [];
365
+ const dir = managedDir();
366
+ // 即便多目标中途失败,也把已成功分发的落点登记进记录,保持"磁盘 == 记录"一致;
367
+ // 重跑 --force 时 upsert 会按 path 去重并补齐其余目标。
368
+ const writeRecordIfAny = () => {
369
+ if (flags['dry-run'] || distribution.length === 0)
370
+ return;
371
+ const record = buildManagedArtifactRecord({
372
+ name,
373
+ kind,
374
+ source: { sourceKind, locator, ...(ref ? { ref } : {}), isDirectorySkill },
375
+ contentHash,
376
+ installedAt: now,
377
+ distribution,
378
+ });
379
+ recordManagedArtifact(record, { dir });
380
+ console.log(tCli('cli.install.registered', lang, { id: record.id, store: dir }));
381
+ };
382
+ try {
383
+ for (const target of targets) {
384
+ const targetPath = targetArtifactPath(target, name, isDirectorySkill);
385
+ const { planned, inPlace } = copyArtifactToTarget({
386
+ source: localRoot,
387
+ isDirectorySkill,
388
+ targetPath,
389
+ skillsDir: target.skillsDir,
390
+ force: flags.force,
391
+ dryRun: flags['dry-run'],
392
+ lang,
393
+ });
394
+ if (planned) {
395
+ console.log(tCli('cli.install.plan_skill', lang, { name, path: targetPath }));
396
+ }
397
+ else {
398
+ console.log(tCli(inPlace ? 'cli.install.adopted' : 'cli.install.copied', lang, { name, path: targetPath }));
399
+ distribution.push({ label: target.label, path: targetPath, contentHash, copiedAt: now });
400
+ }
401
+ }
402
+ }
403
+ finally {
404
+ writeRecordIfAny();
405
+ }
406
+ }
407
+ finally {
408
+ src.cleanup(); // git 删临时物化目录;file noop
409
+ }
410
+ }
411
+ }
@@ -20,4 +20,3 @@ export default class ObserveInbox extends BaseCommand {
20
20
  };
21
21
  run(): Promise<void>;
22
22
  }
23
- //# sourceMappingURL=inbox.d.ts.map
@@ -257,4 +257,3 @@ export default class ObserveInbox extends BaseCommand {
257
257
  });
258
258
  }
259
259
  }
260
- //# sourceMappingURL=inbox.js.map
@@ -19,4 +19,3 @@ export default class Observe extends BaseCommand {
19
19
  };
20
20
  run(): Promise<void>;
21
21
  }
22
- //# sourceMappingURL=index.d.ts.map
@@ -101,12 +101,16 @@ export default class Observe extends BaseCommand {
101
101
  const { sessionCount, segmentCount, toolCallCount, toolFailureRate } = report.meta;
102
102
  console.log('');
103
103
  console.log(`sessions: ${sessionCount} · segments: ${segmentCount} · tool calls: ${toolCallCount} · fail rate: ${(toolFailureRate * 100).toFixed(1)}%`);
104
- console.log(`overall: gapRate ${(report.overall.gapRate * 100).toFixed(1)}% · weightedGapRate ${(report.overall.weightedGapRate * 100).toFixed(1)}% · health: ${report.overall.healthBand}`);
104
+ const overallConf = report.overall.confidence;
105
+ const confSuffix = overallConf === 'high'
106
+ ? ''
107
+ : ` · ⚠ confidence: ${overallConf} (N=${segmentCount} too small; band is indicative)`;
108
+ console.log(`overall: gapRate ${(report.overall.gapRate * 100).toFixed(1)}% · weightedGapRate ${(report.overall.weightedGapRate * 100).toFixed(1)}% · health: ${report.overall.healthBand}${confSuffix}`);
105
109
  console.log('');
106
110
  const skillRows = Object.values(report.bySkill)
107
111
  .sort((a, b) => b.segmentCount - a.segmentCount)
108
112
  .slice(0, 10)
109
- .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)}%` : ''}`);
113
+ .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)}%` : ''}${s.confidence !== 'high' ? ` ⚠${s.confidence}` : ''}`);
110
114
  console.log('top skills:');
111
115
  console.log(skillRows.join('\n'));
112
116
  console.log('');
@@ -115,4 +119,3 @@ export default class Observe extends BaseCommand {
115
119
  });
116
120
  }
117
121
  }
118
- //# sourceMappingURL=index.js.map
@@ -10,4 +10,3 @@ export default class ObserveIngest extends BaseCommand {
10
10
  };
11
11
  run(): Promise<void>;
12
12
  }
13
- //# sourceMappingURL=ingest.d.ts.map
@@ -68,4 +68,3 @@ export default class ObserveIngest extends BaseCommand {
68
68
  });
69
69
  }
70
70
  }
71
- //# sourceMappingURL=ingest.js.map
@@ -10,4 +10,3 @@ export default class ObserveShow extends BaseCommand {
10
10
  };
11
11
  run(): Promise<void>;
12
12
  }
13
- //# sourceMappingURL=show.d.ts.map
@@ -46,4 +46,3 @@ export default class ObserveShow extends BaseCommand {
46
46
  });
47
47
  }
48
48
  }
49
- //# sourceMappingURL=show.js.map
@@ -32,7 +32,8 @@ export default class Sample extends BaseCommand {
32
32
  fix: import("@oclif/core/interfaces").BooleanFlag<boolean>;
33
33
  'reports-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
34
34
  treatment: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
35
+ 'from-traces': import("@oclif/core/interfaces").BooleanFlag<boolean>;
36
+ 'observations-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
35
37
  };
36
38
  run(): Promise<void>;
37
39
  }
38
- //# sourceMappingURL=sample.d.ts.map
@@ -254,7 +254,65 @@ async function runSampleFix(args, flags, lang) {
254
254
  ? `\n🔧 修复完成: ${result.fixedCount}/${sampleDesignCount} 条已修复 → ${outputTarget}${cost}\n`
255
255
  : `\n🔧 Fix complete: ${result.fixedCount}/${sampleDesignCount} fixed → ${outputTarget}${cost}\n`);
256
256
  }
257
+ async function runSampleFromTraces(flags, lang) {
258
+ const { queryObservationInbox, DEFAULT_OBSERVATIONS_DIR } = await import('../../observability/inbox.js');
259
+ const { generateSamplesFromTraces } = await import('../../authoring/generator.js');
260
+ const obsDir = resolve(flags['observations-dir'] ?? DEFAULT_OBSERVATIONS_DIR);
261
+ if (!existsSync(obsDir)) {
262
+ console.error(lang === 'zh'
263
+ ? `observations 目录不存在: ${obsDir}(先运行 omk observe 生成 inbox)`
264
+ : `Observations dir not found: ${obsDir} (run omk observe first)`);
265
+ throw new CliExit(1);
266
+ }
267
+ // Drop noise-tier signals up front: they're exactly what the generator is told to
268
+ // skip, so filtering here avoids feeding junk to the LLM and keeps the no-op path clean.
269
+ const items = queryObservationInbox(obsDir).filter((it) => it.severity !== 'noise');
270
+ if (items.length === 0) {
271
+ process.stderr.write(lang === 'zh'
272
+ ? `✅ ${obsDir} 没有可回流的失败信号(噪声级已跳过)\n`
273
+ : `✅ No recyclable failure signals in ${obsDir} (noise-level skipped)\n`);
274
+ return;
275
+ }
276
+ const outPath = join(obsDir, 'sample-drafts.json');
277
+ if (existsSync(outPath)) {
278
+ console.error(lang === 'zh'
279
+ ? `草稿已存在: ${outPath},请先 review 并合入正式集(或删除)后再生成`
280
+ : `Draft already exists: ${outPath}; review/merge (or remove) it before regenerating`);
281
+ throw new CliExit(1);
282
+ }
283
+ const count = flags.count !== undefined ? Math.max(1, Number(flags.count) || 5) : undefined;
284
+ process.stderr.write(lang === 'zh'
285
+ ? `🔭 发现 ${items.length} 个失败信号,正在生成回归用例草稿...\n`
286
+ : `🔭 Found ${items.length} failure signal(s); generating regression-sample drafts...\n`);
287
+ try {
288
+ const { samples, costUSD } = await generateSamplesFromTraces({ items, count, model: flags.model });
289
+ const cost = costUSD > 0 ? ` $${costUSD.toFixed(4)}` : '';
290
+ if (samples.length === 0) {
291
+ // The model conservatively skipped every signal (noise / unreproducible). That's a
292
+ // valid outcome, not a failure — don't write an empty draft file.
293
+ process.stderr.write(lang === 'zh'
294
+ ? `\n✅ 没有可复现的草稿用例(信号多为噪声 / 证据不足,已保守跳过),未写文件${cost}\n`
295
+ : `\n✅ No reproducible draft samples (signals were noise / insufficient evidence; conservatively skipped); nothing written${cost}\n`);
296
+ return;
297
+ }
298
+ mkdirSync(dirname(outPath), { recursive: true });
299
+ writeFileSync(outPath, JSON.stringify(samples, null, 2));
300
+ process.stderr.write(lang === 'zh'
301
+ ? `\n✅ 生成 ${samples.length} 条草稿用例 → ${outPath}(provenance: production-trace)${cost}\n ⚠️ 这是草稿:trace 只抓失败信号,有抽样偏差。请人工 review 后再合入正式 eval-samples,不要直接当评测集。\n`
302
+ : `\n✅ Generated ${samples.length} draft sample(s) → ${outPath} (provenance: production-trace)${cost}\n ⚠️ Draft only: traces capture failures, a biased sample. Review before merging into your eval-samples; don't use as-is.\n`);
303
+ }
304
+ catch (err) {
305
+ if (err instanceof CliExit)
306
+ throw err;
307
+ console.error(lang === 'zh' ? `生成失败: ${err.message}` : `Generation failed: ${err.message}`);
308
+ throw new CliExit(1);
309
+ }
310
+ }
257
311
  async function runSample(args, flags, lang) {
312
+ if (flags['from-traces']) {
313
+ await runSampleFromTraces(flags, lang);
314
+ return;
315
+ }
258
316
  if (flags.fix) {
259
317
  await runSampleFix(args, flags, lang);
260
318
  return;
@@ -347,10 +405,24 @@ async function runSample(args, flags, lang) {
347
405
  throw new CliExit(1);
348
406
  }
349
407
  const skillContent = readFileSync(resolved.skillPath, 'utf-8');
350
- const outputPath = resolved.samplesPath;
351
- if (existsSync(outputPath)) {
352
- console.error(tCli('cli.gen.samples_already_exists', lang));
353
- throw new CliExit(1);
408
+ let outputPath;
409
+ if (!extname(resolved.samplesPath)) {
410
+ const dir = resolved.samplesPath;
411
+ if (existsSync(dir) && statSync(dir).isDirectory()) {
412
+ const existing = readdirSync(dir).find((f) => /\.(json|ya?ml)$/i.test(f) && !/^(report|health|_)/i.test(f));
413
+ if (existing) {
414
+ console.error(tCli('cli.gen.samples_already_exists', lang));
415
+ throw new CliExit(1);
416
+ }
417
+ }
418
+ outputPath = join(dir, 'samples.json');
419
+ }
420
+ else {
421
+ outputPath = resolved.samplesPath;
422
+ if (existsSync(outputPath)) {
423
+ console.error(tCli('cli.gen.samples_already_exists', lang));
424
+ throw new CliExit(1);
425
+ }
354
426
  }
355
427
  if (count !== undefined) {
356
428
  process.stderr.write(tCli('cli.gen.single_generating', lang, { count }));
@@ -378,13 +450,13 @@ async function runSample(args, flags, lang) {
378
450
  }
379
451
  export default class Sample extends BaseCommand {
380
452
  static description = bilingual({
381
- zh: '为指定 skill 生成评测用例(eval-samples),支持 batch / single / fix 三种模式。',
382
- en: 'Generate eval samples for the given skill. Supports batch / single / fix modes.',
453
+ zh: '为指定 skill 生成评测用例(eval-samples),支持 batch / single / fix / from-traces 四种模式。',
454
+ en: 'Generate eval samples for the given skill. Supports batch / single / fix / from-traces modes.',
383
455
  });
384
456
  static examples = [
385
457
  {
386
458
  description: bilingual({
387
- zh: '为单个 skill 生成默认数量的样本',
459
+ zh: '为单个 skill 生成默认数量的用例',
388
460
  en: 'Generate default-count samples for a single skill',
389
461
  }),
390
462
  command: '<%= config.bin %> sample skills/my-skill/SKILL.md',
@@ -403,6 +475,13 @@ export default class Sample extends BaseCommand {
403
475
  }),
404
476
  command: '<%= config.bin %> sample skills/my-skill/SKILL.md --fix',
405
477
  },
478
+ {
479
+ description: bilingual({
480
+ zh: '从 observe inbox 的失败信号回流生成回归用例草稿',
481
+ en: 'Recycle observe-inbox failure signals into draft regression samples',
482
+ }),
483
+ command: '<%= config.bin %> sample --from-traces',
484
+ },
406
485
  ];
407
486
  static args = {
408
487
  skillPath: Args.string({
@@ -424,7 +503,7 @@ export default class Sample extends BaseCommand {
424
503
  }),
425
504
  count: Flags.string({
426
505
  description: bilingual({
427
- zh: '生成样本条数。不传由 LLM 按 skill 类型自动决定。',
506
+ zh: '生成用例条数。不传由 LLM 按 skill 类型自动决定。',
428
507
  en: 'Number of samples to generate. Defaults to LLM auto-selection by skill type.',
429
508
  }),
430
509
  parse: integerStringParser('--count', { min: 1 }),
@@ -475,6 +554,19 @@ export default class Sample extends BaseCommand {
475
554
  en: 'Treatment name (fix mode), defaults to skill-path inference.',
476
555
  }),
477
556
  }),
557
+ 'from-traces': Flags.boolean({
558
+ description: bilingual({
559
+ zh: 'from-traces 模式:从 observe inbox 的失败信号回流生成回归用例草稿(provenance: production-trace),落草稿待人工 review。',
560
+ en: 'from-traces mode: recycle observe-inbox failure signals into draft regression samples (provenance: production-trace) for review.',
561
+ }),
562
+ default: false,
563
+ }),
564
+ 'observations-dir': Flags.string({
565
+ description: bilingual({
566
+ zh: 'observe inbox 目录(from-traces 模式用),默认项目 .omk/observations。',
567
+ en: 'Observe inbox dir (from-traces mode), default project .omk/observations.',
568
+ }),
569
+ }),
478
570
  };
479
571
  async run() {
480
572
  const { args, flags } = await this.parse(Sample);
@@ -484,4 +576,3 @@ export default class Sample extends BaseCommand {
484
576
  });
485
577
  }
486
578
  }
487
- //# sourceMappingURL=sample.js.map
@@ -20,4 +20,3 @@ export default class Studio extends BaseCommand {
20
20
  };
21
21
  run(): Promise<void>;
22
22
  }
23
- //# sourceMappingURL=studio.d.ts.map
@@ -155,4 +155,3 @@ export default class Studio extends BaseCommand {
155
155
  });
156
156
  }
157
157
  }
158
- //# sourceMappingURL=studio.js.map
@@ -1,3 +1,2 @@
1
1
  #!/usr/bin/env node
2
2
  export {};
3
- //# sourceMappingURL=index.d.ts.map