oh-my-knowledge 1.0.0-beta.3 → 1.0.0-beta.5

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 (415) hide show
  1. package/README.md +14 -2
  2. package/README.zh.md +14 -2
  3. package/dist/assets/agent-skills/omk/references/commands.md +4 -3
  4. package/dist/cli/commands/eval/gold/compare.d.ts +1 -0
  5. package/dist/cli/commands/eval/gold/compare.js +25 -10
  6. package/dist/cli/commands/eval/gold/validate.js +7 -3
  7. package/dist/cli/commands/eval/index.js +8 -1
  8. package/dist/cli/commands/init.js +4 -4
  9. package/dist/cli/commands/studio.js +4 -4
  10. package/dist/cli/lib/i18n-dict/init.js +2 -2
  11. package/dist/cli/lib/i18n-dict/run.js +2 -2
  12. package/dist/cli/lib/run-core-evaluation.js +11 -5
  13. package/dist/cli/templates/init-samples.js +71 -91
  14. package/dist/dsh-plugin/core-adapter.d.ts +2 -2
  15. package/dist/dsh-plugin/core-adapter.js +4 -4
  16. package/dist/dsh-plugin/core-command.js +31 -24
  17. package/dist/dsh-plugin/core-protocol.d.ts +1 -1
  18. package/dist/dsh-plugin/core-protocol.js +2 -2
  19. package/dist/eval-core/analysis/builtins.d.ts +8 -0
  20. package/dist/eval-core/analysis/builtins.js +1334 -33
  21. package/dist/eval-core/analysis/decision.js +2 -2
  22. package/dist/eval-core/analysis/runtime.js +12 -2
  23. package/dist/eval-core/compiler/immutability.d.ts +1 -1
  24. package/dist/eval-core/compiler/immutability.js +1 -12
  25. package/dist/eval-core/compiler/index.d.ts +2 -2
  26. package/dist/eval-core/compiler/index.js +48 -9
  27. package/dist/eval-core/compiler/types.d.ts +9 -1
  28. package/dist/eval-core/compiler/types.js +1 -0
  29. package/dist/eval-core/compiler/validation.d.ts +3 -0
  30. package/dist/eval-core/compiler/validation.js +304 -25
  31. package/dist/eval-core/contracts/analysis-bundle.d.ts +15 -0
  32. package/dist/eval-core/contracts/analysis-bundle.js +36 -2
  33. package/dist/eval-core/contracts/analysis-input-matching.d.ts +4 -0
  34. package/dist/eval-core/contracts/analysis-input-matching.js +29 -0
  35. package/dist/eval-core/contracts/common.d.ts +5 -0
  36. package/dist/eval-core/contracts/comparability.d.ts +1 -1
  37. package/dist/eval-core/contracts/comparability.js +14 -1
  38. package/dist/eval-core/contracts/definition.d.ts +253 -7
  39. package/dist/eval-core/contracts/definition.js +29 -3
  40. package/dist/eval-core/contracts/digests.d.ts +8 -1
  41. package/dist/eval-core/contracts/digests.js +168 -5
  42. package/dist/eval-core/contracts/evaluation-bundle.js +5 -16
  43. package/dist/eval-core/contracts/execution-controls.d.ts +162 -0
  44. package/dist/eval-core/contracts/execution-controls.js +43 -1
  45. package/dist/eval-core/contracts/execution-identities.d.ts +1 -1
  46. package/dist/eval-core/contracts/execution-identities.js +33 -3
  47. package/dist/eval-core/contracts/immutability.d.ts +2 -0
  48. package/dist/eval-core/contracts/immutability.js +20 -0
  49. package/dist/eval-core/contracts/index.d.ts +1 -0
  50. package/dist/eval-core/contracts/index.js +1 -0
  51. package/dist/eval-core/contracts/json.js +3 -10
  52. package/dist/eval-core/contracts/plans.d.ts +324 -14
  53. package/dist/eval-core/contracts/plans.js +12 -6
  54. package/dist/eval-core/contracts/schemas/{v1 → v2}/execution-plan.schema.json +205 -82
  55. package/dist/eval-core/contracts/schemas/{v1 → v3}/analysis-plan.schema.json +159 -42
  56. package/dist/eval-core/contracts/schemas/{v1 → v3}/evaluation-definition.schema.json +233 -116
  57. package/dist/eval-core/contracts/schemas/v3/execution-plan.schema.json +1177 -0
  58. package/dist/eval-core/contracts/schemas/{v1 → v3}/run-plan.schema.json +594 -445
  59. package/dist/eval-core/contracts/schemas/v4/evaluation-definition.schema.json +1407 -0
  60. package/dist/eval-core/contracts/schemas/v4/execution-plan.schema.json +1221 -0
  61. package/dist/eval-core/contracts/schemas/v4/run-plan.schema.json +2710 -0
  62. package/dist/eval-core/contracts/schemas/v5/evaluation-definition.schema.json +1451 -0
  63. package/dist/eval-core/contracts/schemas/v5/run-plan.schema.json +2754 -0
  64. package/dist/eval-core/{internal → contracts}/sealed-run-plan.d.ts +2 -2
  65. package/dist/eval-core/{internal → contracts}/sealed-run-plan.js +1 -1
  66. package/dist/eval-core/contracts/series.d.ts +1 -1
  67. package/dist/eval-core/contracts/series.js +1 -1
  68. package/dist/eval-core/contracts/statistics.d.ts +2 -0
  69. package/dist/eval-core/contracts/statistics.js +19 -0
  70. package/dist/eval-core/engine/index.d.ts +21 -1
  71. package/dist/eval-core/engine/index.js +59 -25
  72. package/dist/eval-core/engine/types.d.ts +2 -0
  73. package/dist/eval-core/evaluation/runtime.js +5 -6
  74. package/dist/eval-core/execution/runtime.js +7 -3
  75. package/dist/eval-core/execution/types.d.ts +2 -0
  76. package/dist/eval-core/facade.d.ts +1 -1
  77. package/dist/eval-core/facade.js +1 -1
  78. package/dist/eval-core/index.d.ts +2 -2
  79. package/dist/eval-core/index.js +1 -1
  80. package/dist/eval-core/schemas.js +10 -0
  81. package/dist/eval-core/series/builtins.d.ts +30 -0
  82. package/dist/eval-core/series/builtins.js +226 -0
  83. package/dist/eval-core/series/index.d.ts +1 -0
  84. package/dist/eval-core/series/index.js +1 -0
  85. package/dist/eval-core/series/runtime.js +10 -1
  86. package/dist/eval-hosts/node/index.d.ts +6 -0
  87. package/dist/eval-hosts/node/index.js +6 -0
  88. package/dist/eval-hosts/node/judge-provider-identity.d.ts +9 -0
  89. package/dist/eval-hosts/node/judge-provider-identity.js +89 -0
  90. package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-composition.d.ts +8 -8
  91. package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-composition.js +34 -34
  92. package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-evaluation-resolver.d.ts +2 -2
  93. package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-evaluation-resolver.js +98 -19
  94. package/dist/{eval-workflows/production-host → eval-hosts/node}/node-sample-content-resolver.d.ts +1 -1
  95. package/dist/{eval-workflows/production-host → eval-hosts/node}/node-sample-content-resolver.js +1 -1
  96. package/dist/{eval-workflows/production-host → eval-hosts/node}/runtime-registry.d.ts +8 -2
  97. package/dist/{eval-workflows/production-host → eval-hosts/node}/runtime-registry.js +10 -3
  98. package/dist/{eval-workflows/production-host → eval-hosts/node}/safe-http-content-resolver.d.ts +1 -1
  99. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/api.js +1 -1
  100. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/protocol.js +1 -1
  101. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli-protocol.d.ts +1 -1
  102. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli-protocol.js +2 -2
  103. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli.js +6 -6
  104. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/resources.d.ts +5 -31
  105. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/resources.js +169 -105
  106. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-protocol.d.ts +1 -1
  107. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-protocol.js +2 -2
  108. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk.js +5 -5
  109. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-resources.d.ts +2 -2
  110. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-resources.js +3 -3
  111. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli.d.ts +1 -1
  112. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli.js +21 -11
  113. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/protocol-core.js +1 -1
  114. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/resources.d.ts +2 -1
  115. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/resources.js +12 -7
  116. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk.d.ts +1 -1
  117. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk.js +21 -11
  118. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/custom/command.d.ts +33 -0
  119. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/custom/command.js +182 -40
  120. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/index.d.ts +1 -1
  121. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/index.js +1 -1
  122. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/api.js +1 -1
  123. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/protocol.js +1 -1
  124. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-protocol-core.js +1 -1
  125. package/dist/eval-hosts/runtime-adapter/adapters/shared/trial-workspace.d.ts +10 -0
  126. package/dist/eval-hosts/runtime-adapter/adapters/shared/trial-workspace.js +52 -0
  127. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/assembly.js +28 -33
  128. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/builtins.js +13 -11
  129. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/composition.d.ts +8 -4
  130. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/composition.js +162 -184
  131. package/dist/eval-hosts/runtime-adapter/evaluators/index.d.ts +6 -0
  132. package/dist/eval-hosts/runtime-adapter/evaluators/index.js +6 -0
  133. package/dist/eval-hosts/runtime-adapter/evaluators/llm-assertion-factory.d.ts +6 -0
  134. package/dist/eval-hosts/runtime-adapter/evaluators/llm-assertion-factory.js +43 -0
  135. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/rubric-judge.d.ts +1 -1
  136. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/rubric-judge.js +2 -1
  137. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/index.d.ts +3 -3
  138. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/index.js +3 -3
  139. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/preflight.d.ts +1 -1
  140. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/access.d.ts +1 -1
  141. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/access.js +8 -51
  142. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/node.d.ts +1 -1
  143. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/node.js +60 -50
  144. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/types.d.ts +4 -3
  145. package/dist/{eval-workflows → eval-hosts}/runtime-adapter/types.d.ts +1 -1
  146. package/dist/eval-runtime/adapters/executor-fn.js +3 -3
  147. package/dist/eval-runtime/adapters/invoke-contract.d.ts +104 -2
  148. package/dist/eval-runtime/adapters/invoke-contract.js +11 -5
  149. package/dist/eval-runtime/adapters/json-executor.d.ts +56 -0
  150. package/dist/eval-runtime/adapters/json-executor.js +853 -67
  151. package/dist/eval-runtime/advanced.d.ts +11 -7
  152. package/dist/eval-runtime/advanced.js +4 -4
  153. package/dist/eval-runtime/builders/paired-comparison.js +8 -1
  154. package/dist/eval-runtime/builders/policy.d.ts +220 -4
  155. package/dist/eval-runtime/builders/policy.js +189 -33
  156. package/dist/eval-runtime/conformance/cache.d.ts +26 -0
  157. package/dist/eval-runtime/conformance/cache.js +305 -0
  158. package/dist/eval-runtime/conformance/content-store.d.ts +27 -0
  159. package/dist/eval-runtime/conformance/content-store.js +98 -0
  160. package/dist/eval-runtime/conformance/evaluator.d.ts +38 -0
  161. package/dist/eval-runtime/conformance/evaluator.js +281 -0
  162. package/dist/eval-runtime/conformance/executor.d.ts +2 -1
  163. package/dist/eval-runtime/conformance/executor.js +10 -5
  164. package/dist/eval-runtime/conformance/judge.d.ts +43 -0
  165. package/dist/eval-runtime/conformance/judge.js +276 -0
  166. package/dist/eval-runtime/conformance/runtime.d.ts +48 -0
  167. package/dist/eval-runtime/conformance/runtime.js +130 -0
  168. package/dist/eval-runtime/conformance/workspace-provider.d.ts +20 -0
  169. package/dist/eval-runtime/conformance/workspace-provider.js +260 -0
  170. package/dist/eval-runtime/custom-evaluator.d.ts +106 -0
  171. package/dist/eval-runtime/custom-evaluator.js +285 -0
  172. package/dist/eval-runtime/evaluate.d.ts +388 -37
  173. package/dist/eval-runtime/evaluate.js +2344 -249
  174. package/dist/eval-runtime/evaluators/abstention.d.ts +54 -0
  175. package/dist/eval-runtime/evaluators/abstention.js +123 -0
  176. package/dist/eval-runtime/evaluators/retrieval.d.ts +30 -0
  177. package/dist/eval-runtime/evaluators/retrieval.js +172 -0
  178. package/dist/eval-runtime/evaluators/tool-trajectory.d.ts +22 -0
  179. package/dist/eval-runtime/evaluators/tool-trajectory.js +177 -0
  180. package/dist/eval-runtime/execution-controls.d.ts +6 -0
  181. package/dist/eval-runtime/execution-controls.js +57 -0
  182. package/dist/eval-runtime/execution.d.ts +60 -0
  183. package/dist/eval-runtime/execution.js +183 -0
  184. package/dist/eval-runtime/identity.d.ts +22 -0
  185. package/dist/eval-runtime/identity.js +45 -17
  186. package/dist/eval-runtime/index.d.ts +23 -2
  187. package/dist/eval-runtime/index.js +5 -2
  188. package/dist/eval-runtime/infrastructure.d.ts +51 -0
  189. package/dist/eval-runtime/infrastructure.js +89 -0
  190. package/dist/eval-runtime/judges/rubric-contracts.d.ts +1 -0
  191. package/dist/eval-runtime/judges/rubric-judge.d.ts +1 -0
  192. package/dist/eval-runtime/judges/rubric-judge.js +15 -1
  193. package/dist/eval-runtime/mcp-config.d.ts +48 -0
  194. package/dist/eval-runtime/mcp-config.js +90 -0
  195. package/dist/eval-runtime/mock-interception.d.ts +65 -0
  196. package/dist/eval-runtime/mock-interception.js +109 -0
  197. package/dist/eval-runtime/provider.d.ts +38 -0
  198. package/dist/eval-runtime/provider.js +13 -0
  199. package/dist/eval-runtime/result-store.d.ts +45 -0
  200. package/dist/eval-runtime/result-store.js +247 -0
  201. package/dist/eval-runtime/runner.d.ts +18 -6
  202. package/dist/eval-runtime/runner.js +50 -28
  203. package/dist/eval-runtime/series.d.ts +85 -0
  204. package/dist/eval-runtime/series.js +383 -0
  205. package/dist/eval-runtime/tool-policy.d.ts +12 -0
  206. package/dist/eval-runtime/tool-policy.js +69 -0
  207. package/dist/eval-runtime/workspace.d.ts +49 -0
  208. package/dist/eval-runtime/workspace.js +84 -0
  209. package/dist/eval-workflows/analysis/binomial-confidence.d.ts +13 -0
  210. package/dist/eval-workflows/analysis/binomial-confidence.js +122 -0
  211. package/dist/eval-workflows/analysis/bootstrap.d.ts +17 -5
  212. package/dist/eval-workflows/analysis/bootstrap.js +73 -30
  213. package/dist/eval-workflows/analysis/sample-size.d.ts +16 -0
  214. package/dist/eval-workflows/analysis/sample-size.js +83 -0
  215. package/dist/eval-workflows/artifact-store/contracts.d.ts +2 -2
  216. package/dist/eval-workflows/artifact-store/node-run-store.js +10 -1
  217. package/dist/eval-workflows/evaluation-defaults.d.ts +4 -0
  218. package/dist/eval-workflows/evaluation-defaults.js +4 -0
  219. package/dist/eval-workflows/gold/cli.d.ts +1 -1
  220. package/dist/eval-workflows/gold/cli.js +4 -4
  221. package/dist/eval-workflows/gold/dataset.d.ts +4 -0
  222. package/dist/eval-workflows/gold/dataset.js +60 -12
  223. package/dist/eval-workflows/gold/human.d.ts +56 -0
  224. package/dist/eval-workflows/gold/human.js +121 -30
  225. package/dist/eval-workflows/input-compilation/compile.js +45 -16
  226. package/dist/eval-workflows/input-compilation/parse.js +78 -2
  227. package/dist/eval-workflows/input-compilation/registry.d.ts +1 -1
  228. package/dist/eval-workflows/input-compilation/registry.js +13 -1
  229. package/dist/eval-workflows/input-compilation/types.d.ts +18 -5
  230. package/dist/eval-workflows/input-compilation/types.js +3 -3
  231. package/dist/eval-workflows/inputs/contracts/config.d.ts +14 -0
  232. package/dist/eval-workflows/inputs/contracts/sample.d.ts +9 -3
  233. package/dist/eval-workflows/inputs/contracts/schemas/{v1 → v2}/eval-sample-set.schema.json +148 -129
  234. package/dist/eval-workflows/inputs/eval-config.d.ts +1 -1
  235. package/dist/eval-workflows/inputs/eval-config.js +111 -2
  236. package/dist/eval-workflows/inputs/eval-samples.d.ts +1 -1
  237. package/dist/eval-workflows/inputs/eval-samples.js +1 -1
  238. package/dist/eval-workflows/inputs/load-samples.d.ts +1 -1
  239. package/dist/eval-workflows/inputs/load-samples.js +1 -1
  240. package/dist/eval-workflows/inputs/rubric-contract.d.ts +2 -0
  241. package/dist/eval-workflows/inputs/rubric-contract.js +2 -0
  242. package/dist/eval-workflows/inputs/sample-contract.js +14 -6
  243. package/dist/eval-workflows/inputs/schemas/json-schema.js +22 -1
  244. package/dist/eval-workflows/inputs/schemas/sample-set.d.ts +3 -2
  245. package/dist/eval-workflows/inputs/schemas/sample-set.js +18 -4
  246. package/dist/eval-workflows/instruments/contracts/config.d.ts +7 -2
  247. package/dist/eval-workflows/instruments/contracts/index.d.ts +0 -1
  248. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-node-contract.d.ts +6 -1
  249. package/dist/eval-workflows/measurement/analysis/agreement-node-contract.js +147 -0
  250. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-node.d.ts +1 -1
  251. package/dist/eval-workflows/measurement/analysis/agreement-node.js +74 -0
  252. package/dist/eval-workflows/{runtime-adapter/analysis/agreement-source-adapter.js → measurement/analysis/agreement-source-adapter-v1.js} +1 -1
  253. package/dist/eval-workflows/measurement/analysis/agreement-source-adapter.d.ts +11 -0
  254. package/dist/eval-workflows/measurement/analysis/agreement-source-adapter.js +114 -0
  255. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-table.d.ts +207 -1
  256. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-table.js +134 -5
  257. package/dist/eval-workflows/measurement/analysis/bootstrap-family-node-contract.d.ts +3 -0
  258. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-contract.js +4 -37
  259. package/dist/eval-workflows/{runtime-adapter/analysis/bootstrap-family-node-contract.d.ts → measurement/analysis/bootstrap-family-node-support.d.ts} +1 -4
  260. package/dist/eval-workflows/measurement/analysis/bootstrap-family-node-support.js +36 -0
  261. package/dist/eval-workflows/measurement/analysis/bootstrap-family-node-v2.d.ts +5 -0
  262. package/dist/eval-workflows/measurement/analysis/bootstrap-family-node-v2.js +90 -0
  263. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node.js +2 -1
  264. package/dist/eval-workflows/measurement/analysis/bootstrap-family-table-v2.d.ts +320 -0
  265. package/dist/eval-workflows/measurement/analysis/bootstrap-family-table-v2.js +265 -0
  266. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-table.d.ts +34 -1
  267. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-table.js +41 -28
  268. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node-contract.d.ts +1 -1
  269. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node-contract.js +3 -3
  270. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-source-adapter.js +1 -1
  271. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-node.d.ts +1 -1
  272. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-node.js +36 -10
  273. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-parameters.d.ts +8 -0
  274. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-parameters.js +36 -4
  275. package/dist/eval-workflows/measurement/analysis/dimension-table.d.ts +141 -0
  276. package/dist/eval-workflows/measurement/analysis/dimension-table.js +216 -0
  277. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/index.d.ts +2 -0
  278. package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/index.js +2 -0
  279. package/dist/eval-workflows/measurement/analysis/judge-agreement.d.ts +8 -0
  280. package/dist/eval-workflows/measurement/analysis/judge-agreement.js +55 -0
  281. package/dist/eval-workflows/measurement/analysis/release-decision-parameters.d.ts +144 -0
  282. package/dist/eval-workflows/measurement/analysis/release-decision-parameters.js +284 -0
  283. package/dist/eval-workflows/measurement/analysis/release-decision.d.ts +25 -0
  284. package/dist/eval-workflows/measurement/analysis/release-decision.js +837 -0
  285. package/dist/eval-workflows/{runtime-adapter → measurement/analysis}/series-variance.d.ts +2 -2
  286. package/dist/eval-workflows/{runtime-adapter → measurement/analysis}/series-variance.js +2 -2
  287. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/execution-assertions.d.ts +3 -3
  288. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/execution-assertions.js +1 -1
  289. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/index.d.ts +1 -2
  290. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/index.js +1 -2
  291. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/llm-assertions.d.ts +13 -8
  292. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/llm-assertions.js +14 -40
  293. package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/output-assertions.d.ts +2 -2
  294. package/dist/eval-workflows/messages.d.ts +1 -1
  295. package/dist/eval-workflows/messages.js +0 -12
  296. package/dist/eval-workflows/production-host/index.d.ts +0 -4
  297. package/dist/eval-workflows/production-host/index.js +0 -4
  298. package/dist/eval-workflows/production-host/measurement-design.js +66 -27
  299. package/dist/eval-workflows/production-host/orchestration.d.ts +1 -1
  300. package/dist/eval-workflows/production-host/orchestration.js +40 -45
  301. package/dist/eval-workflows/production-host/workflow.d.ts +13 -15
  302. package/dist/eval-workflows/production-host/workflow.js +41 -28
  303. package/dist/eval-workflows/projections/contracts.d.ts +45 -8
  304. package/dist/eval-workflows/projections/contracts.js +1 -1
  305. package/dist/eval-workflows/projections/gold.d.ts +2 -0
  306. package/dist/eval-workflows/projections/gold.js +107 -14
  307. package/dist/evidence/storage/directories.js +5 -10
  308. package/dist/evidence/storage/directory-selection.d.ts +5 -0
  309. package/dist/evidence/storage/directory-selection.js +13 -0
  310. package/dist/knowledge-artifacts/authoring/core-evolver.js +1 -1
  311. package/dist/knowledge-artifacts/authoring/generator.js +24 -19
  312. package/dist/knowledge-artifacts/governance/store.d.ts +1 -1
  313. package/dist/knowledge-artifacts/governance/store.js +13 -16
  314. package/dist/observability/inbox/paths.js +4 -5
  315. package/dist/studio/presentation/observation-inbox/styles/experience.d.ts +1 -0
  316. package/dist/studio/presentation/observation-inbox/styles/experience.js +943 -0
  317. package/dist/studio/presentation/observation-inbox/styles/metrics.d.ts +1 -0
  318. package/dist/studio/presentation/observation-inbox/styles/metrics.js +679 -0
  319. package/dist/studio/presentation/observation-inbox/styles/review.d.ts +1 -0
  320. package/dist/studio/presentation/observation-inbox/styles/review.js +1422 -0
  321. package/dist/studio/presentation/observation-inbox/styles/shell.d.ts +1 -0
  322. package/dist/studio/presentation/observation-inbox/styles/shell.js +844 -0
  323. package/dist/studio/presentation/observation-inbox/styles/trajectory.d.ts +1 -0
  324. package/dist/studio/presentation/observation-inbox/styles/trajectory.js +1299 -0
  325. package/dist/studio/presentation/observation-inbox/styles.d.ts +2 -1
  326. package/dist/studio/presentation/observation-inbox/styles.js +11 -5183
  327. package/package.json +5 -2
  328. package/dist/eval-runtime/engine.d.ts +0 -3
  329. package/dist/eval-runtime/engine.js +0 -3
  330. package/dist/eval-workflows/instruments/contracts/result.d.ts +0 -54
  331. package/dist/eval-workflows/instruments/contracts/result.js +0 -1
  332. package/dist/eval-workflows/instruments/judge-trace.d.ts +0 -1
  333. package/dist/eval-workflows/instruments/judge-trace.js +0 -1
  334. package/dist/eval-workflows/instruments/judge.d.ts +0 -78
  335. package/dist/eval-workflows/instruments/judge.js +0 -323
  336. package/dist/eval-workflows/runtime-adapter/adapters/shared/omk-resource-same-process.d.ts +0 -15
  337. package/dist/eval-workflows/runtime-adapter/adapters/shared/omk-resource-same-process.js +0 -7
  338. package/dist/eval-workflows/runtime-adapter/analysis/agreement-node-contract.js +0 -78
  339. package/dist/eval-workflows/runtime-adapter/analysis/agreement-node.js +0 -29
  340. package/dist/eval-workflows/runtime-adapter/analysis/release-decision-parameters.d.ts +0 -36
  341. package/dist/eval-workflows/runtime-adapter/analysis/release-decision-parameters.js +0 -114
  342. package/dist/eval-workflows/runtime-adapter/analysis/release-decision.d.ts +0 -6
  343. package/dist/eval-workflows/runtime-adapter/analysis/release-decision.js +0 -406
  344. package/dist/eval-workflows/runtime-adapter/source-neutral-trace.d.ts +0 -1
  345. package/dist/eval-workflows/runtime-adapter/source-neutral-trace.js +0 -1
  346. /package/dist/{eval-workflows/production-host → eval-hosts/node}/safe-http-content-resolver.js +0 -0
  347. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/api.d.ts +0 -0
  348. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/protocol.d.ts +0 -0
  349. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli.d.ts +0 -0
  350. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-runtime.d.ts +0 -0
  351. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-runtime.js +0 -0
  352. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk.d.ts +0 -0
  353. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-protocol.d.ts +0 -0
  354. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-protocol.js +0 -0
  355. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/content-identity.d.ts +0 -0
  356. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/content-identity.js +0 -0
  357. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/environment.d.ts +0 -0
  358. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/environment.js +0 -0
  359. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/protocol-core.d.ts +0 -0
  360. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-protocol.d.ts +0 -0
  361. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-protocol.js +0 -0
  362. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-runtime.d.ts +0 -0
  363. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-runtime.js +0 -0
  364. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/api.d.ts +0 -0
  365. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/protocol.d.ts +0 -0
  366. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-http.d.ts +0 -0
  367. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-http.js +0 -0
  368. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-protocol-core.d.ts +0 -0
  369. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/classified-environment.d.ts +0 -0
  370. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/classified-environment.js +0 -0
  371. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/content-identity.d.ts +0 -0
  372. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/content-identity.js +0 -0
  373. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/stateless-api-resources.d.ts +0 -0
  374. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/stateless-api-resources.js +0 -0
  375. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/assembly.d.ts +0 -0
  376. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/builtins.d.ts +0 -0
  377. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/llm-judge-invocation.d.ts +0 -0
  378. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/llm-judge-invocation.js +0 -0
  379. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/preflight.js +0 -0
  380. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/index.d.ts +0 -0
  381. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/index.js +0 -0
  382. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/types.js +0 -0
  383. /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/types.js +0 -0
  384. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-parameters.d.ts +0 -0
  385. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-parameters.js +0 -0
  386. /package/dist/eval-workflows/{runtime-adapter/analysis/agreement-source-adapter.d.ts → measurement/analysis/agreement-source-adapter-v1.d.ts} +0 -0
  387. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/analysis-support.d.ts +0 -0
  388. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/analysis-support.js +0 -0
  389. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-node.d.ts +0 -0
  390. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-node.js +0 -0
  391. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-parameters.d.ts +0 -0
  392. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-parameters.js +0 -0
  393. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer.d.ts +0 -0
  394. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer.js +0 -0
  395. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node.d.ts +0 -0
  396. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-parameters.d.ts +0 -0
  397. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-parameters.js +0 -0
  398. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-source-adapter.d.ts +0 -0
  399. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-source-adapter.js +0 -0
  400. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node.d.ts +0 -0
  401. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node.js +0 -0
  402. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-parameters.d.ts +0 -0
  403. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-parameters.js +0 -0
  404. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-source-adapter.d.ts +0 -0
  405. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-table.d.ts +0 -0
  406. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-table.js +0 -0
  407. /package/dist/eval-workflows/{runtime-adapter/analysis/dimension-table.d.ts → measurement/analysis/dimension-table-v1.d.ts} +0 -0
  408. /package/dist/eval-workflows/{runtime-adapter/analysis/dimension-table.js → measurement/analysis/dimension-table-v1.js} +0 -0
  409. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/judge-aggregation.d.ts +0 -0
  410. /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/judge-aggregation.js +0 -0
  411. /package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/assertion-common.d.ts +0 -0
  412. /package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/assertion-common.js +0 -0
  413. /package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/output-assertions.js +0 -0
  414. /package/dist/eval-workflows/{runtime-adapter/event-projection.d.ts → projections/runtime-progress.d.ts} +0 -0
  415. /package/dist/eval-workflows/{runtime-adapter/event-projection.js → projections/runtime-progress.js} +0 -0
package/README.md CHANGED
@@ -22,6 +22,16 @@ Observe real-world performance, measure version differences, and determine wheth
22
22
 
23
23
  📖 **Full documentation: [oh-my-knowledge.pages.dev](https://oh-my-knowledge.pages.dev)** (searchable, English / 简体中文)
24
24
 
25
+ ## What knowledge means in OMK
26
+
27
+ **Entities are the things knowledge describes; knowledge expresses their states, relationships, or actions in a specific context.**
28
+
29
+ **How knowledge is expressed:**
30
+
31
+ > **Time scope + scenario + conditions + entity A + relation or action + entity B (if any)**
32
+
33
+ See [How OMK understands knowledge](docs/explanation/knowledge.md) for entity roles, shared relationships, and the distinction between knowledge and its carriers. Entity-based retrieval remains a design direction.
34
+
25
35
  ## What OMK helps you know
26
36
 
27
37
  | Decision | Command | Evidence you get |
@@ -35,6 +45,8 @@ Observe real-world performance, measure version differences, and determine wheth
35
45
 
36
46
  ## Quick start
37
47
 
48
+ Already have a Node.js service, retriever, or Agent? Start with [Use OMK in your service](docs/guides/eval-runtime.md): run an example without model credentials, choose a scorer, connect your service, and read the results. The command-line quickstart follows below.
49
+
38
50
  ```bash
39
51
  npm i -g oh-my-knowledge
40
52
  omk init demo && cd demo
@@ -55,7 +67,7 @@ export OMK_EXECUTOR=codex
55
67
 
56
68
  Without `OMK_MODEL`, omk reads the model from `~/.codex/config.toml`. You can still pass `--executor codex --model <codex-model>` per command. Pass `--judge-models` or set `OMK_JUDGE_MODELS` only when you want a different judge.
57
69
 
58
- > The default 3-case pack is a low-cost workflow check, so `UNDERPOWERED` is expected. `--samples 20` selects a first-party, difficulty-stratified starter pack that meets omk's registered sample-size floor. Its provenance is `llm-generated`: use it to learn the statistical workflow, then review and replace it with real domain cases before making a release decision.
70
+ > The default 3-case pack is a low-cost workflow check, so `UNDERPOWERED` is expected. `--samples 20` selects a first-party, difficulty-stratified starter pack that meets omk's default heuristic evidence floor; it is not an a priori power calculation. Its provenance is `llm-generated`: use it to learn the statistical workflow, then review and replace it with real domain cases before making a release decision.
59
71
 
60
72
  > The CLI notifies you when a newer version is available (at most once per 20h); set `OMK_SKIP_UPDATE_CHECK=1` to silence it permanently.
61
73
 
@@ -228,7 +240,7 @@ The full docs are published at **[oh-my-knowledge.pages.dev](https://oh-my-knowl
228
240
  - **[CLI reference](docs/reference/cli.md)** — all top-level commands with bash examples and flag tables
229
241
  - **[Migrate to the 1.0 preview](docs/guides/v1-preview-migration.md)** — install channel, storage reset, sample protocol, CLI automation, and embedded API changes since 0.54
230
242
  - **[Evaluation Core cutover](docs/guides/eval-core-cutover.md)** — `BREAKING-SCHEMA` storage, resume, Studio, Gold, managed-evidence, and evolve migration
231
- - **[Embed OMK in a service](docs/guides/eval-runtime.md)** — one `evaluate()` API for Node.js and FaaS hosts
243
+ - **[Embed OMK in a service](docs/guides/eval-runtime.md)** — choose a scorer, connect a Node.js service, and interpret scores and failures
232
244
  - **[Storage layout v2](docs/specs/storage-layout-spec.md)** — project/global domains, compatibility boundary, and Git policy
233
245
  - **[Executors](docs/reference/executors.md)** & **[artifact layout](docs/reference/artifact-layout.md)** — built-in / custom executors; how `variant` resolves to an artifact + runtime context
234
246
  - **[How-to guides](docs/guides/agent-eval.md)** — [evaluate an agent](docs/guides/agent-eval.md) (project runtime context) and [use non-Claude models](docs/guides/non-claude-models.md) (GLM / Qwen / DeepSeek / Moonshot / Ollama)
package/README.zh.md CHANGED
@@ -22,6 +22,16 @@
22
22
 
23
23
  📖 **完整文档:[oh-my-knowledge.pages.dev/zh](https://oh-my-knowledge.pages.dev/zh/)**(可搜索,可切换英文)
24
24
 
25
+ ## OMK 中的知识是什么
26
+
27
+ **实体是知识所描述的事物;知识表达实体在特定上下文中的状态、关系或行为。**
28
+
29
+ **知识的表达形式:**
30
+
31
+ > **时间范围+场景+条件+实体 A+关系或行为+实体 B(如有)**
32
+
33
+ 实体角色、多实体关联及知识与载体的区别,见[OMK 如何理解知识](docs/zh/explanation/knowledge.md)。实体关联检索仍是设计方向。
34
+
25
35
  ## OMK 让你知道什么
26
36
 
27
37
  | 决策问题 | 命令 | 你会得到的证据 |
@@ -35,6 +45,8 @@
35
45
 
36
46
  ## 快速开始
37
47
 
48
+ 已有 Node.js 服务、检索系统或 Agent,希望接入评分与版本对比?从[在服务中使用 OMK](docs/zh/guides/eval-runtime.md)开始:先运行无需模型凭证的示例,再选择评分方法、接入自己的服务并解读结果。下面是命令行上手流程。
49
+
38
50
  ```bash
39
51
  npm i -g oh-my-knowledge
40
52
  omk init demo && cd demo
@@ -55,7 +67,7 @@ export OMK_EXECUTOR=codex
55
67
 
56
68
  不设置 `OMK_MODEL` 时,omk 会读取 `~/.codex/config.toml` 的模型。也可以继续逐次显式传 `--executor codex --model <codex-model>`。自定义评委时再传 `--judge-models` 或设置 `OMK_JUDGE_MODELS`。
57
69
 
58
- > 默认 3 条用例是低成本流程检查,出现「数据不足(UNDERPOWERED)」符合预期。`--samples 20` 会选择经过难度分层的官方起步用例集,达到 omk 注册的样本量下限。其来源明确标记为 `llm-generated`:它适合学习统计流程,发布判断前仍应人工复核并替换为真实领域用例。
70
+ > 默认 3 条用例是低成本流程检查,出现「数据不足(UNDERPOWERED)」符合预期。`--samples 20` 会选择经过难度分层的官方起步用例集,达到 omk 默认的启发式证据下限,但这不是先验功效计算。其来源明确标记为 `llm-generated`:它适合学习统计流程,发布判断前仍应人工复核并替换为真实领域用例。
59
71
 
60
72
  > 命令行有新版本时会自动提示(每 20 小时最多一次);想永久关闭该提醒,设环境变量 `OMK_SKIP_UPDATE_CHECK=1` 即可。
61
73
 
@@ -228,7 +240,7 @@ omk-mcp
228
240
  - **[CLI 参考](docs/zh/reference/cli.md)** —— 顶层命令的 bash 示例和 flag 表
229
241
  - **[迁移到 1.0 预览版](docs/zh/guides/v1-preview-migration.md)** —— 从 `0.54` 升级时的安装渠道、存储重建、用例协议、CLI 自动化与嵌入式 API 变化
230
242
  - **[Evaluation Core 生产切换](docs/zh/guides/eval-core-cutover.md)** —— `BREAKING-SCHEMA` 存储、resume、Studio、Gold、受管证据与 evolve 迁移
231
- - **[在服务中嵌入 OMK](docs/zh/guides/eval-runtime.md)** —— 面向 Node.js 与 FaaS 宿主的单一 `evaluate()` API
243
+ - **[在服务中嵌入 OMK](docs/zh/guides/eval-runtime.md)** —— 选择评分方法、接入 Node.js 服务、解读分数与失败原因
232
244
  - **[存储布局 v2](docs/zh/specs/storage-layout-spec.md)** —— 项目/全局领域、迁移兼容与 Git 策略
233
245
  - **[执行器](docs/zh/reference/executors.md)** & **[知识载体布局](docs/zh/reference/artifact-layout.md)** —— 内置 / 自定义执行器;variant 如何解析为 artifact + runtime context
234
246
  - **[操作指南](docs/zh/guides/agent-eval.md)** —— [评测 agent](docs/zh/guides/agent-eval.md)(项目 runtime context)与[使用非 Claude 模型](docs/zh/guides/non-claude-models.md)(GLM / 通义 / DeepSeek / Moonshot / Ollama)
@@ -104,7 +104,7 @@ omk eval [flags]
104
104
  - `--no-serve` `boolean`:不启 report server
105
105
  - `--no-strict-baseline` `boolean`:关闭 baseline 隔离
106
106
  - `--output-dir` `option`:报告输出目录(默认项目级 .omk/eval)
107
- - `--repeat` `option`:每个用例重复运行 N 次
107
+ - `--repeat` `option`:预先固定 Evaluation Series 的独立 run 数
108
108
  - `--report-only` `boolean`:生成报告并打印判定,但始终 exit 0(不参与 CI gate)。
109
109
  - `--resume` `option`:复用经过完整契约校验的 Core runId;拒绝时失败关闭
110
110
  - `--retry` `option`:单用例失败重试次数
@@ -169,6 +169,7 @@ omk eval gold compare <runId> [flags]
169
169
  - `--gold-dir` `option`:gold dataset 目录,必填
170
170
  - `--lang` `option` (默认 `zh`):输出语言 zh|en,优先级 CLI > OMK_LANG env > zh。
171
171
  - `--metric` `option`:显式选择 Core metric ID。
172
+ - `--minimum-alpha` `option`:可选的一致性阈值;按 Krippendorff α 置信区间下界评估
172
173
  - `--reports-dir` `option`:只读取指定 Core 报告目录(默认当前项目 + 全局)
173
174
  - `--seed` `option`:bootstrap seed,可复现
174
175
  - `--target` `option`:显式选择 Core target ID。
@@ -274,7 +275,7 @@ omk init [targetDir] [flags]
274
275
 
275
276
  - `--force` `boolean`:允许覆盖目标目录中已有的 omk 脚手架文件
276
277
  - `--lang` `option` (默认 `zh`):输出语言 zh|en,优先级 CLI > OMK_LANG env > zh。
277
- - `--samples` `3|20` (默认 `3`):官方起步用例数量:3 条用于快速跑通,20 条用于达到注册样本量下限
278
+ - `--samples` `3|20` (默认 `3`):官方起步用例数量:3 条用于快速跑通,20 条用于达到默认启发式证据下限
278
279
 
279
280
  **示例:**
280
281
 
@@ -290,7 +291,7 @@ omk init
290
291
  omk init my-project
291
292
  ```
292
293
 
293
- > 使用达到注册样本量下限的 20 条官方用例初始化
294
+ > 使用达到默认启发式证据下限的 20 条官方用例初始化
294
295
 
295
296
  ```bash
296
297
  omk init my-project --samples 20
@@ -10,6 +10,7 @@ export default class EvalGoldCompare extends BaseCommand {
10
10
  target: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
11
  evaluator: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
12
  metric: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ 'minimum-alpha': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
14
  'trial-index': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
15
  'reports-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
16
  'bootstrap-samples': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -2,7 +2,7 @@ import { resolve } from 'node:path';
2
2
  import { Args, Flags } from '@oclif/core';
3
3
  import { BaseCommand } from '../../../oclif/base-command.js';
4
4
  import { LANG_FLAG, bilingual } from '../../../oclif/i18n.js';
5
- import { integerStringParser } from '../../../oclif/parsers.js';
5
+ import { integerStringParser, numberStringParser } from '../../../oclif/parsers.js';
6
6
  import { CliExit } from '../../../lib/cli-exit.js';
7
7
  import { projectReportsDir, globalReportsDir } from '../../../../evidence/storage/directories.js';
8
8
  export default class EvalGoldCompare extends BaseCommand {
@@ -33,6 +33,13 @@ export default class EvalGoldCompare extends BaseCommand {
33
33
  metric: Flags.string({
34
34
  description: bilingual({ zh: '显式选择 Core metric ID。', en: 'Explicit Core metric ID.' }),
35
35
  }),
36
+ 'minimum-alpha': Flags.string({
37
+ description: bilingual({
38
+ zh: '可选的一致性阈值;按 Krippendorff α 置信区间下界评估',
39
+ en: 'Optional agreement threshold, assessed against the Krippendorff alpha CI lower bound',
40
+ }),
41
+ parse: numberStringParser('--minimum-alpha', { min: -1, max: 1 }),
42
+ }),
36
43
  'trial-index': Flags.string({
37
44
  description: bilingual({ zh: '显式选择 trial index。', en: 'Explicit trial index.' }),
38
45
  parse: integerStringParser('--trial-index', { min: 0 }),
@@ -61,26 +68,31 @@ export default class EvalGoldCompare extends BaseCommand {
61
68
  await this.runWithCliExit(async () => {
62
69
  const runId = args.runId;
63
70
  if (!runId) {
64
- console.error('Usage: omk eval gold compare <runId> --gold-dir <dir> --target <id> --evaluator <id> --metric <id>');
71
+ console.error(lang === 'zh'
72
+ ? '用法:omk eval gold compare <runId> --gold-dir <dir> --target <id> --evaluator <id> --metric <id>'
73
+ : 'Usage: omk eval gold compare <runId> --gold-dir <dir> --target <id> --evaluator <id> --metric <id>');
65
74
  throw new CliExit(1);
66
75
  }
67
76
  const goldDir = flags['gold-dir'];
68
77
  if (!goldDir) {
69
- console.error('--gold-dir is required');
78
+ console.error(lang === 'zh' ? '必须提供 --gold-dir。' : '--gold-dir is required.');
70
79
  throw new CliExit(1);
71
80
  }
72
- const { loadGoldDataset } = await import('../../../../eval-workflows/gold/dataset.js');
81
+ const { loadGoldDataset, validationIssueMessage } = await import('../../../../eval-workflows/gold/dataset.js');
73
82
  const { createNodeCoreContentStore, createNodeCoreRunArtifactStore, createOverlayCoreRunArtifactStore, } = await import('../../../../eval-workflows/artifact-store/index.js');
74
83
  const { compareGoldToCoreRun } = await import('../../../../eval-workflows/projections/gold.js');
75
84
  const { dataset, issues } = loadGoldDataset(goldDir);
76
85
  if (!dataset) {
77
- console.error('Cannot load gold dataset:');
86
+ console.error(lang === 'zh' ? '无法加载 gold dataset:' : 'Cannot load gold dataset:');
78
87
  for (const i of issues)
79
- console.error(` - ${i.message}`);
88
+ console.error(` - ${validationIssueMessage(i, lang)}`);
80
89
  throw new CliExit(1);
81
90
  }
82
- for (const i of issues)
83
- console.error(`warn: ${i.message}`);
91
+ for (const i of issues) {
92
+ console.error(lang === 'zh'
93
+ ? `警告:${validationIssueMessage(i, lang)}`
94
+ : `Warning: ${validationIssueMessage(i, lang)}`);
95
+ }
84
96
  const storeOf = (directory) => createNodeCoreRunArtifactStore(directory, {
85
97
  contentResolver: createNodeCoreContentStore(resolve(directory, 'content')),
86
98
  });
@@ -90,8 +102,8 @@ export default class EvalGoldCompare extends BaseCommand {
90
102
  const source = await store.get(runId);
91
103
  if (source === undefined) {
92
104
  console.error(lang === 'zh'
93
- ? `找不到 Core run「${runId}」;旧 evaluation report 不再支持 gold compare。`
94
- : `Core run "${runId}" was not found; legacy evaluation reports are no longer supported.`);
105
+ ? `找不到 Core run「${runId}」。`
106
+ : `Core run "${runId}" was not found.`);
95
107
  throw new CliExit(1);
96
108
  }
97
109
  if (!flags.target || !flags.evaluator || !flags.metric) {
@@ -114,6 +126,9 @@ export default class EvalGoldCompare extends BaseCommand {
114
126
  }),
115
127
  },
116
128
  bootstrapSamples: samples,
129
+ ...(flags['minimum-alpha'] === undefined ? {} : {
130
+ minimumAlpha: Number(flags['minimum-alpha']),
131
+ }),
117
132
  ...(Number.isFinite(seedVal) ? { bootstrapSeed: seedVal } : {}),
118
133
  });
119
134
  console.log(JSON.stringify(result, null, 2));
@@ -25,18 +25,22 @@ export default class EvalGoldValidate extends BaseCommand {
25
25
  await this.runWithCliExit(async () => {
26
26
  const dir = args.dir;
27
27
  if (!dir) {
28
- console.error('Usage: omk eval gold validate <dir>');
28
+ console.error(lang === 'zh'
29
+ ? '用法:omk eval gold validate <dir>'
30
+ : 'Usage: omk eval gold validate <dir>');
29
31
  throw new CliExit(1);
30
32
  }
31
33
  const { validateGoldDataset } = await import('../../../../eval-workflows/gold/cli.js');
32
- const result = validateGoldDataset(dir);
34
+ const result = validateGoldDataset(dir, lang);
33
35
  if (result.ok) {
34
36
  console.log(lang === 'zh'
35
37
  ? `✓ gold dataset OK,共 ${result.sampleCount} 条标注`
36
38
  : `✓ gold dataset OK — ${result.sampleCount} annotations`);
37
39
  return;
38
40
  }
39
- console.error(`✗ gold dataset has ${result.issues.length} issue(s):`);
41
+ console.error(lang === 'zh'
42
+ ? `✗ gold dataset 存在 ${result.issues.length} 个问题:`
43
+ : `✗ gold dataset has ${result.issues.length} issue(s):`);
40
44
  for (const msg of result.issues)
41
45
  console.error(` - ${msg}`);
42
46
  throw new CliExit(1);
@@ -160,6 +160,10 @@ async function runEval(_args, flags, lang) {
160
160
  process.stdout.write(`Core: ${outcome.status?.runStatus ?? 'prepared'}/${outcome.status?.evidenceStatus ?? 'n/a'}/${outcome.status?.conclusionStatus ?? 'n/a'}\n`
161
161
  + `Gate: ${outcome.gate?.gateStatus ?? 'not-applicable'}${outcome.gate?.reasonCodes?.length ? `(${outcome.gate.reasonCodes.join(', ')})` : ''}\n`);
162
162
  }
163
+ // A blocked gate exits immediately through oclif; flush a piped JSON report first.
164
+ await new Promise((resolve, reject) => {
165
+ process.stdout.write('', (error) => error ? reject(error) : resolve());
166
+ });
163
167
  throw new CliExit(result.exitCode);
164
168
  }
165
169
  catch (err) {
@@ -333,7 +337,10 @@ export default class Eval extends BaseCommand {
333
337
  }),
334
338
  // ── eval-runner extra ──
335
339
  repeat: Flags.string({
336
- description: bilingual({ zh: '每个用例重复运行 N 次', en: 'Repeat each sample N times' }),
340
+ description: bilingual({
341
+ zh: '预先固定 Evaluation Series 的独立 run 数',
342
+ en: 'Predeclare the independent run count for the Evaluation Series',
343
+ }),
337
344
  parse: integerStringParser('--repeat', { min: 1 }),
338
345
  }),
339
346
  'holdout-ratio': Flags.string({
@@ -77,8 +77,8 @@ export default class Init extends BaseCommand {
77
77
  },
78
78
  {
79
79
  description: bilingual({
80
- zh: '使用达到注册样本量下限的 20 条官方用例初始化',
81
- en: 'Initialize with the 20 first-party samples that meet the registered sample-size floor',
80
+ zh: '使用达到默认启发式证据下限的 20 条官方用例初始化',
81
+ en: 'Initialize with 20 first-party samples that meet the default heuristic evidence floor',
82
82
  }),
83
83
  command: '<%= config.bin %> init my-project --samples 20',
84
84
  },
@@ -108,8 +108,8 @@ export default class Init extends BaseCommand {
108
108
  lang: LANG_FLAG,
109
109
  samples: Flags.string({
110
110
  description: bilingual({
111
- zh: '官方起步用例数量:3 条用于快速跑通,20 条用于达到注册样本量下限',
112
- en: 'Number of first-party starter samples: 3 for a quick run, 20 to meet the registered sample-size floor',
111
+ zh: '官方起步用例数量:3 条用于快速跑通,20 条用于达到默认启发式证据下限',
112
+ en: 'Number of first-party starter samples: 3 for a quick run, 20 to meet the default heuristic evidence floor',
113
113
  }),
114
114
  options: [String(DEFAULT_INIT_SAMPLE_COUNT), String(FULL_INIT_SAMPLE_COUNT)],
115
115
  default: String(DEFAULT_INIT_SAMPLE_COUNT),
@@ -9,11 +9,11 @@ import { resolveObserveHealthDir, projectObserveHealthDir, globalObserveHealthDi
9
9
  import { DEFAULT_GLOBAL_OBSERVATIONS_DIR } from '../../observability/inbox/index.js';
10
10
  import { openWorkbench } from '../lib/open-workbench.js';
11
11
  // dev / browser-open 测试需要 mock `node:child_process` + `node:os`,通过 in-process
12
- // import 直接调用。把业务作为 module-level helper export 从 Command file 暴露,
13
- // 既保留 test 兼容又让产品命令树语义干净(无 legacy commands directory)。
12
+ // import 直接调用。把业务作为 module-level helper export 从 Command file 暴露,
13
+ // 便于测试命令行为,同时保持产品命令树语义干净。
14
14
  export async function runStudio(_args, flags, lang) {
15
- // reports 读取目录:显式 --reports-dir 固定该目录;--global 钉全局;默认只聚合
16
- // 当前项目 + 全局 Core run。旧 eval report index 已删除,不再扫描其它项目。
15
+ // reports 读取目录:显式 --reports-dir 固定该目录;--global 钉全局;默认聚合
16
+ // 当前项目与全局 Core run。
17
17
  const reportsDirOpt = flags['reports-dir']
18
18
  ? resolve(flags['reports-dir'])
19
19
  : flags.global
@@ -27,8 +27,8 @@ export const initDict = {
27
27
  en: ' 2. Read the report verdict and Next line: 3 samples only prove the workflow, so UNDERPOWERED is expected; use --samples 20 in a new empty directory for the full starter set.',
28
28
  },
29
29
  'cli.init.next_step_report_full': {
30
- zh: ' 2. 看报告里的 verdict 和“下一步”:20 条用例达到注册样本量下限,但来源是 llm-generated;用于理解统计流程,发布前应人工复核并替换为真实领域用例。',
31
- en: ' 2. Read the report verdict and Next line: 20 samples meet the registered sample-size floor but are llm-generated; use them to learn the statistical workflow, then review and replace them with real domain cases before release.',
30
+ zh: ' 2. 看报告里的 verdict 和“下一步”:20 条用例达到默认启发式证据下限,但不等于完成先验功效规划;其来源是 llm-generated,发布前应人工复核并替换为真实领域用例。',
31
+ en: ' 2. Read the report verdict and Next line: 20 samples meet the default heuristic evidence floor, not an a priori power plan; they are llm-generated and must be reviewed or replaced with real domain cases before release.',
32
32
  },
33
33
  'cli.init.next_step_executor': {
34
34
  zh: ' executor / judge 会按运行环境选择;Codex 任务自动使用本机 Codex 配置。也可用 OMK_EXECUTOR / OMK_MODEL 固定环境偏好,详见 https://oh-my-knowledge.pages.dev/zh/reference/executors。',
@@ -64,8 +64,8 @@ export const runDict = {
64
64
  en: '⚠ --bootstrap-samples "{value}" is invalid (expected an integer ≥ 100), falling back to 1000\n',
65
65
  },
66
66
  'cli.run.bootstrap_samples_too_large': {
67
- zh: '⚠ --bootstrap-samples {n} 较大, 可能耗时数秒。1000 是业内标准, 通常已够用。\n',
68
- en: '⚠ --bootstrap-samples {n} is large and may take several seconds. 1000 is the industry standard and usually sufficient.\n',
67
+ zh: '⚠ --bootstrap-samples {n} 较大,可能耗时数秒。有限重采样误差会单独进入显著性证据。\n',
68
+ en: '⚠ --bootstrap-samples {n} is large and may take several seconds. Finite-resampling error is reported separately in significance evidence.\n',
69
69
  },
70
70
  'cli.run.dry_run_no_scores': {
71
71
  zh: 'eval dry-run:仅预览任务,不检查分数。下一步:确认任务无误后,去掉 --dry-run 运行正式评测。',
@@ -2,7 +2,9 @@ import { existsSync } from 'node:fs';
2
2
  import { join, resolve } from 'node:path';
3
3
  import { compileCliEvaluationInput, parseCliEvaluationRequest, } from '../../eval-workflows/input-compilation/index.js';
4
4
  import { createNodeCoreBatchArtifactStore, createNodeCoreContentStore, createNodeCoreRunArtifactStore, createOverlayCoreRunArtifactStore, } from '../../eval-workflows/artifact-store/index.js';
5
- import { createNodeCliProductionComposition, createProductionEvaluationHost, executeProductionEvaluationSeries, persistCoreArtifactSidecars, resolveNodeCliEvaluationRequest, } from '../../eval-workflows/production-host/index.js';
5
+ import { createNodeCliProductionComposition, } from '../../eval-hosts/node/node-cli-composition.js';
6
+ import { createProductionEvaluationHost, executeProductionEvaluationSeries, persistCoreArtifactSidecars, } from '../../eval-workflows/production-host/index.js';
7
+ import { resolveNodeCliEvaluationRequest, } from '../../eval-hosts/node/node-cli-evaluation-resolver.js';
6
8
  import { projectCoreCliDryRun, projectCoreCliBatchOutcome, projectCoreCliRunOutcome, projectCoreCliSeriesOutcome, } from '../../eval-workflows/projections/cli.js';
7
9
  import { projectCoreManagedEvidence } from '../../eval-workflows/projections/managed.js';
8
10
  import { discoverBatchSkills } from '../../eval-workflows/inputs/skill-loader.js';
@@ -45,6 +47,9 @@ function requestFor(input, projectRoot) {
45
47
  judgeMembers: input.config.judgeModels.map((judge) => ({
46
48
  executorId: judge.executor,
47
49
  model: judge.model,
50
+ ...(judge.deploymentRevision === undefined
51
+ ? {}
52
+ : { deploymentRevision: judge.deploymentRevision }),
48
53
  })),
49
54
  presentation: {
50
55
  projectOutputDirectoryLocator: projectReportsDir(),
@@ -223,10 +228,11 @@ export async function runCoreEvaluationCommand(input) {
223
228
  resourceLeaseRoot: machineLayout.resourceLeasesDir,
224
229
  environment: input.environment,
225
230
  });
226
- const store = input.store ?? runStoreForOutput(outputDirectory, composition.support.contentResolver);
231
+ const store = input.store ?? runStoreForOutput(outputDirectory, composition.contentResolver);
227
232
  const host = {
228
233
  compiled,
229
- ...composition,
234
+ runtime: composition.runtime,
235
+ schemaValidators: composition.schemaValidators,
230
236
  artifactStore: store,
231
237
  };
232
238
  if (compiled.orchestration.dryRun) {
@@ -258,8 +264,8 @@ export async function runCoreEvaluationCommand(input) {
258
264
  const memberArtifacts = await Promise.all(series.members.map(async (member) => {
259
265
  if (member.executionStatus !== 'started')
260
266
  throw member.error;
261
- await member.run.result;
262
267
  const persistence = await member.run.persistence;
268
+ await member.run.result;
263
269
  if (persistence.persistenceStatus !== 'stored') {
264
270
  if (persistence.persistenceStatus === 'failed')
265
271
  throw persistence.error;
@@ -313,8 +319,8 @@ export async function runCoreEvaluationCommand(input) {
313
319
  createdAt: new Date().toISOString(),
314
320
  progressSink: emitProgress(input.lang),
315
321
  });
316
- await run.result;
317
322
  const persistence = await run.persistence;
323
+ await run.result;
318
324
  if (persistence.persistenceStatus !== 'stored') {
319
325
  if (persistence.persistenceStatus === 'failed')
320
326
  throw persistence.error;