oh-my-knowledge 1.0.0-beta.4 → 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.
- package/README.md +13 -1
- package/README.zh.md +13 -1
- package/dist/cli/commands/eval/index.js +4 -0
- package/dist/cli/lib/run-core-evaluation.js +8 -5
- package/dist/dsh-plugin/core-adapter.d.ts +2 -2
- package/dist/dsh-plugin/core-adapter.js +4 -4
- package/dist/dsh-plugin/core-command.js +13 -6
- package/dist/dsh-plugin/core-protocol.d.ts +1 -1
- package/dist/dsh-plugin/core-protocol.js +2 -2
- package/dist/eval-hosts/node/index.d.ts +6 -0
- package/dist/eval-hosts/node/index.js +6 -0
- package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-composition.d.ts +8 -8
- package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-composition.js +18 -9
- package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-evaluation-resolver.d.ts +2 -2
- package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-evaluation-resolver.js +6 -6
- package/dist/{eval-workflows/production-host → eval-hosts/node}/node-sample-content-resolver.d.ts +1 -1
- package/dist/{eval-workflows/production-host → eval-hosts/node}/node-sample-content-resolver.js +1 -1
- package/dist/{eval-workflows/production-host → eval-hosts/node}/runtime-registry.d.ts +8 -2
- package/dist/{eval-workflows/production-host → eval-hosts/node}/runtime-registry.js +10 -3
- package/dist/{eval-workflows/production-host → eval-hosts/node}/safe-http-content-resolver.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/api.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/protocol.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli-protocol.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli-protocol.js +2 -2
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli.js +5 -5
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/resources.d.ts +3 -2
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/resources.js +19 -7
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-protocol.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-protocol.js +2 -2
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk.js +5 -5
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-resources.d.ts +2 -2
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-resources.js +3 -3
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli.js +21 -11
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/protocol-core.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/resources.d.ts +2 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/resources.js +12 -7
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk.js +21 -11
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/custom/command.js +55 -37
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/index.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/index.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/api.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/protocol.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-protocol-core.js +1 -1
- package/dist/eval-hosts/runtime-adapter/adapters/shared/trial-workspace.d.ts +10 -0
- package/dist/eval-hosts/runtime-adapter/adapters/shared/trial-workspace.js +52 -0
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/assembly.js +6 -7
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/builtins.js +12 -12
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/composition.d.ts +8 -4
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/composition.js +161 -185
- package/dist/eval-hosts/runtime-adapter/evaluators/index.d.ts +6 -0
- package/dist/eval-hosts/runtime-adapter/evaluators/index.js +6 -0
- package/dist/eval-hosts/runtime-adapter/evaluators/llm-assertion-factory.d.ts +6 -0
- package/dist/eval-hosts/runtime-adapter/evaluators/llm-assertion-factory.js +43 -0
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/rubric-judge.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/rubric-judge.js +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/index.d.ts +3 -3
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/index.js +3 -3
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/preflight.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/access.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/access.js +1 -46
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/node.d.ts +1 -1
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/node.js +40 -40
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/types.d.ts +3 -2
- package/dist/{eval-workflows → eval-hosts}/runtime-adapter/types.d.ts +1 -1
- package/dist/eval-runtime/evaluate.d.ts +2 -1
- package/dist/eval-runtime/evaluate.js +27 -0
- package/dist/eval-runtime/evaluators/abstention.d.ts +54 -0
- package/dist/eval-runtime/evaluators/abstention.js +123 -0
- package/dist/eval-runtime/execution.d.ts +60 -0
- package/dist/eval-runtime/execution.js +183 -0
- package/dist/eval-runtime/index.d.ts +1 -0
- package/dist/eval-runtime/index.js +0 -1
- package/dist/eval-runtime/provider.d.ts +38 -0
- package/dist/eval-runtime/provider.js +13 -0
- package/dist/eval-workflows/{runtime-adapter → measurement/analysis}/series-variance.d.ts +2 -2
- package/dist/eval-workflows/{runtime-adapter → measurement/analysis}/series-variance.js +2 -2
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/execution-assertions.d.ts +3 -3
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/execution-assertions.js +1 -1
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/index.d.ts +1 -2
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/index.js +1 -2
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/llm-assertions.d.ts +12 -8
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/llm-assertions.js +3 -40
- package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/output-assertions.d.ts +2 -2
- package/dist/eval-workflows/production-host/index.d.ts +0 -5
- package/dist/eval-workflows/production-host/index.js +0 -5
- package/dist/eval-workflows/production-host/measurement-design.js +11 -2
- package/dist/eval-workflows/production-host/orchestration.d.ts +1 -1
- package/dist/eval-workflows/production-host/orchestration.js +40 -45
- package/dist/eval-workflows/production-host/workflow.d.ts +13 -15
- package/dist/eval-workflows/production-host/workflow.js +41 -28
- package/dist/knowledge-artifacts/authoring/core-evolver.js +1 -1
- package/package.json +1 -1
- package/dist/eval-workflows/runtime-adapter/adapters/shared/omk-resource-same-process.d.ts +0 -15
- package/dist/eval-workflows/runtime-adapter/adapters/shared/omk-resource-same-process.js +0 -7
- package/dist/eval-workflows/runtime-adapter/source-neutral-trace.d.ts +0 -1
- package/dist/eval-workflows/runtime-adapter/source-neutral-trace.js +0 -1
- /package/dist/{eval-workflows/production-host → eval-hosts/node}/judge-provider-identity.d.ts +0 -0
- /package/dist/{eval-workflows/production-host → eval-hosts/node}/judge-provider-identity.js +0 -0
- /package/dist/{eval-workflows/production-host → eval-hosts/node}/safe-http-content-resolver.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/api.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/anthropic/protocol.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-runtime.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-runtime.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-protocol.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/cli-protocol.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/content-identity.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/content-identity.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/environment.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/environment.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/protocol-core.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-protocol.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-protocol.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-runtime.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/codex/sdk-runtime.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/custom/command.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/api.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/openai/protocol.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-http.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-http.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/api-protocol-core.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/classified-environment.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/classified-environment.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/content-identity.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/content-identity.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/stateless-api-resources.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/shared/stateless-api-resources.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/assembly.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/builtins.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/llm-judge-invocation.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/evaluators/llm-judge-invocation.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/preflight.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/index.d.ts +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/index.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/resource-leases/types.js +0 -0
- /package/dist/{eval-workflows → eval-hosts}/runtime-adapter/types.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-node-contract.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-node-contract.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-node.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-node.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-parameters.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-parameters.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-source-adapter-v1.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-source-adapter-v1.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-source-adapter.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-source-adapter.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-table.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/agreement-table.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/analysis-support.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/analysis-support.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-node.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-node.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-parameters.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer-parameters.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/assertion-layer.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-contract.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-contract.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-support.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-support.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-v2.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node-v2.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-node.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-parameters.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-parameters.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-source-adapter.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-source-adapter.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-table-v2.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-table-v2.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-table.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/bootstrap-family-table.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node-contract.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node-contract.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-node.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-parameters.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-parameters.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-source-adapter.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-source-adapter.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-table.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/composite-table.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-node.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-node.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-parameters.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-parameters.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-table-v1.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-table-v1.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-table.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/dimension-table.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/index.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/index.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/judge-aggregation.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/judge-aggregation.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/judge-agreement.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/judge-agreement.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/release-decision-parameters.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/release-decision-parameters.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/release-decision.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/analysis/release-decision.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/assertion-common.d.ts +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/assertion-common.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter → measurement}/evaluators/output-assertions.js +0 -0
- /package/dist/eval-workflows/{runtime-adapter/event-projection.d.ts → projections/runtime-progress.d.ts} +0 -0
- /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
|
|
@@ -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)** —
|
|
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
|
|
@@ -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)** ——
|
|
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)
|
|
@@ -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) {
|
|
@@ -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,
|
|
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';
|
|
@@ -226,10 +228,11 @@ export async function runCoreEvaluationCommand(input) {
|
|
|
226
228
|
resourceLeaseRoot: machineLayout.resourceLeasesDir,
|
|
227
229
|
environment: input.environment,
|
|
228
230
|
});
|
|
229
|
-
const store = input.store ?? runStoreForOutput(outputDirectory, composition.
|
|
231
|
+
const store = input.store ?? runStoreForOutput(outputDirectory, composition.contentResolver);
|
|
230
232
|
const host = {
|
|
231
233
|
compiled,
|
|
232
|
-
|
|
234
|
+
runtime: composition.runtime,
|
|
235
|
+
schemaValidators: composition.schemaValidators,
|
|
233
236
|
artifactStore: store,
|
|
234
237
|
};
|
|
235
238
|
if (compiled.orchestration.dryRun) {
|
|
@@ -261,8 +264,8 @@ export async function runCoreEvaluationCommand(input) {
|
|
|
261
264
|
const memberArtifacts = await Promise.all(series.members.map(async (member) => {
|
|
262
265
|
if (member.executionStatus !== 'started')
|
|
263
266
|
throw member.error;
|
|
264
|
-
await member.run.result;
|
|
265
267
|
const persistence = await member.run.persistence;
|
|
268
|
+
await member.run.result;
|
|
266
269
|
if (persistence.persistenceStatus !== 'stored') {
|
|
267
270
|
if (persistence.persistenceStatus === 'failed')
|
|
268
271
|
throw persistence.error;
|
|
@@ -316,8 +319,8 @@ export async function runCoreEvaluationCommand(input) {
|
|
|
316
319
|
createdAt: new Date().toISOString(),
|
|
317
320
|
progressSink: emitProgress(input.lang),
|
|
318
321
|
});
|
|
319
|
-
await run.result;
|
|
320
322
|
const persistence = await run.persistence;
|
|
323
|
+
await run.result;
|
|
321
324
|
if (persistence.persistenceStatus !== 'stored') {
|
|
322
325
|
if (persistence.persistenceStatus === 'failed')
|
|
323
326
|
throw persistence.error;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EvaluationDefinition } from '../eval-core/contracts/index.js';
|
|
2
2
|
import { type ExecutionExecutor } from '../eval-core/execution/index.js';
|
|
3
|
-
import type { OmkBindingResourceLeaseAccess } from '../eval-
|
|
4
|
-
import type { RuntimeBindingOf } from '../eval-
|
|
3
|
+
import type { OmkBindingResourceLeaseAccess } from '../eval-hosts/runtime-adapter/resource-leases/types.js';
|
|
4
|
+
import type { RuntimeBindingOf } from '../eval-hosts/runtime-adapter/types.js';
|
|
5
5
|
import type { DshAgentLike, DshHostContextLike } from './host-executor.js';
|
|
6
6
|
export { DSH_HOST_CORE_ADAPTER_IMPLEMENTATION_VERSION, createDshHostCoreSchemaValidators, } from './core-protocol.js';
|
|
7
7
|
export declare const DEFAULT_DSH_HOST_CORE_MAX_INPUT_BYTES: number;
|
|
@@ -2,7 +2,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { JsonValueSchema, RuntimeIdentitySchema, canonicalizeJson, deepFreezeCanonicalJson, digestCanonicalJson, } from '../eval-core/contracts/index.js';
|
|
3
3
|
import { ExecutionPortFailure, } from '../eval-core/execution/index.js';
|
|
4
4
|
import { createDshHostRuntimeFingerprint } from '../executors/core/runtime-fingerprint.js';
|
|
5
|
-
import { captureClaudeCliRunState, captureClaudeCliTarget, disposeClaudeCliTrial, openClaudeCliTrial, } from '../eval-
|
|
5
|
+
import { captureClaudeCliRunState, captureClaudeCliTarget, disposeClaudeCliTrial, openClaudeCliTrial, } from '../eval-hosts/runtime-adapter/adapters/claude/resources.js';
|
|
6
6
|
import { createSameProcessExecutorAdapter } from '../eval-runtime/adapters/same-process.js';
|
|
7
7
|
import { DSH_HOST_CORE_ADAPTER_IMPLEMENTATION_VERSION, dshHostCoreExecutorCapabilities, parseDshHostCoreResult, } from './core-protocol.js';
|
|
8
8
|
import { supportsDshTraceEventType } from './trace-adapter.js';
|
|
@@ -716,7 +716,7 @@ export async function createDshHostCoreExecutorAdapter(input) {
|
|
|
716
716
|
}
|
|
717
717
|
runState.acquireTrial();
|
|
718
718
|
try {
|
|
719
|
-
return openClaudeCliTrial(trial, runState, host.maxInputBytes, RESOURCE_PROFILE);
|
|
719
|
+
return await openClaudeCliTrial(trial, runState, host.maxInputBytes, RESOURCE_PROFILE);
|
|
720
720
|
}
|
|
721
721
|
catch (error) {
|
|
722
722
|
await runState.releaseTrial();
|
|
@@ -726,8 +726,8 @@ export async function createDshHostCoreExecutorAdapter(input) {
|
|
|
726
726
|
execute({ runState, trialState, attempt, scope }) {
|
|
727
727
|
return executeDshHost(host, target, runState, trialState, attempt, scope.operationIsolationKey);
|
|
728
728
|
},
|
|
729
|
-
disposeTrial({ runState }) {
|
|
730
|
-
return disposeClaudeCliTrial(runState, RESOURCE_PROFILE);
|
|
729
|
+
disposeTrial({ runState, trialState }) {
|
|
730
|
+
return disposeClaudeCliTrial(runState, trialState, RESOURCE_PROFILE);
|
|
731
731
|
},
|
|
732
732
|
disposeRun({ runState }) {
|
|
733
733
|
return runState.requestDispose();
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { createOmkRuntimeProvider, createOmkEvaluationSchemaValidators } from '../eval-hosts/runtime-adapter/composition.js';
|
|
1
2
|
import { join, resolve } from 'node:path';
|
|
2
3
|
import { schemaIdentityKey, } from '../eval-core/contracts/index.js';
|
|
3
4
|
import { compileCliEvaluationInput, parseCliEvaluationRequest, } from '../eval-workflows/input-compilation/index.js';
|
|
4
5
|
import { createNodeCoreContentStore, createNodeCoreRunArtifactStore, } from '../eval-workflows/artifact-store/index.js';
|
|
5
6
|
import { globalLayout, projectLayout } from '../evidence/storage/layout.js';
|
|
6
|
-
import { createNodeEvaluationRuntimeSupportPorts,
|
|
7
|
+
import { createNodeEvaluationRuntimeSupportPorts, createProductionRuntimeFactoryRegistry, } from '../eval-hosts/node/runtime-registry.js';
|
|
8
|
+
import { createNodeHostPreflightDeclarations, } from '../eval-hosts/node/node-cli-composition.js';
|
|
9
|
+
import { createProductionEvaluationHost, executeProductionEvaluationSeries, persistCoreArtifactSidecars, } from '../eval-workflows/production-host/index.js';
|
|
10
|
+
import { createJudgeProviderRuntimeIdentity, } from '../eval-hosts/node/judge-provider-identity.js';
|
|
11
|
+
import { resolveNodeCliEvaluationRequest, } from '../eval-hosts/node/node-cli-evaluation-resolver.js';
|
|
7
12
|
import { projectCoreCliRunOutcome, projectCoreCliSeriesOutcome, } from '../eval-workflows/projections/cli.js';
|
|
8
13
|
import { projectCoreManagedEvidence } from '../eval-workflows/projections/managed.js';
|
|
9
14
|
import { managedDir, recordCoreEvalEvidence } from '../knowledge-artifacts/governance/index.js';
|
|
@@ -229,9 +234,11 @@ export async function runDshCoreEvaluation(input) {
|
|
|
229
234
|
});
|
|
230
235
|
const host = {
|
|
231
236
|
compiled,
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
237
|
+
runtime: createOmkRuntimeProvider({
|
|
238
|
+
compiled, factories: factories({ compiled, host: input.host, parentAgent: input.parentAgent, projectRoot }),
|
|
239
|
+
support, resources: { leaseRoot: machineLayout.resourceLeasesDir },
|
|
240
|
+
}),
|
|
241
|
+
schemaValidators: createOmkEvaluationSchemaValidators(support.schemaValidators),
|
|
235
242
|
artifactStore,
|
|
236
243
|
};
|
|
237
244
|
const independentSeries = compiled.orchestration.independentSeries;
|
|
@@ -254,8 +261,8 @@ export async function runDshCoreEvaluation(input) {
|
|
|
254
261
|
const artifacts = await Promise.all(series.members.map(async (member) => {
|
|
255
262
|
if (member.executionStatus !== 'started')
|
|
256
263
|
throw member.error;
|
|
257
|
-
await member.run.result;
|
|
258
264
|
const persisted = await member.run.persistence;
|
|
265
|
+
await member.run.result;
|
|
259
266
|
if (persisted.persistenceStatus !== 'stored') {
|
|
260
267
|
throw persisted.persistenceStatus === 'failed'
|
|
261
268
|
? persisted.error
|
|
@@ -285,8 +292,8 @@ export async function runDshCoreEvaluation(input) {
|
|
|
285
292
|
createdAt: new Date().toISOString(),
|
|
286
293
|
signal: input.signal,
|
|
287
294
|
});
|
|
288
|
-
await run.result;
|
|
289
295
|
const persisted = await run.persistence;
|
|
296
|
+
await run.result;
|
|
290
297
|
if (persisted.persistenceStatus !== 'stored') {
|
|
291
298
|
throw persisted.persistenceStatus === 'failed'
|
|
292
299
|
? persisted.error
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CoreSchemaValidator, type ExecutorCapabilities, type JsonValue, type UsageRecord } from '../eval-core/contracts/index.js';
|
|
2
2
|
import { type DshHostRunResult } from './protocol.js';
|
|
3
|
-
export declare const DSH_HOST_CORE_ADAPTER_IMPLEMENTATION_VERSION: "
|
|
3
|
+
export declare const DSH_HOST_CORE_ADAPTER_IMPLEMENTATION_VERSION: "2.0.0";
|
|
4
4
|
export interface ParsedDshHostCoreResult {
|
|
5
5
|
readonly output?: string;
|
|
6
6
|
readonly trace: JsonValue;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { EXECUTOR_CAPABILITIES_SCHEMA_VERSION, ExecutorCapabilitiesSchema, JsonValueSchema, UsageRecordSchema, deepFreezeCanonicalJson, digestCanonicalJson, } from '../eval-core/contracts/index.js';
|
|
3
3
|
import { ExecutionPortFailure } from '../eval-core/execution/index.js';
|
|
4
|
-
import { SOURCE_NEUTRAL_TRACE_WITHOUT_MOCKS_SCHEMA_DESCRIPTOR, SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION, SourceNeutralTraceWithoutMocksSchema, } from '../eval-
|
|
4
|
+
import { SOURCE_NEUTRAL_TRACE_WITHOUT_MOCKS_SCHEMA_DESCRIPTOR, SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION, SourceNeutralTraceWithoutMocksSchema, } from '../eval-runtime/traces/source-neutral.js';
|
|
5
5
|
import { buildDshHostResult } from './protocol.js';
|
|
6
6
|
import { supportsDshTraceEventType } from './trace-adapter.js';
|
|
7
|
-
export const DSH_HOST_CORE_ADAPTER_IMPLEMENTATION_VERSION = '
|
|
7
|
+
export const DSH_HOST_CORE_ADAPTER_IMPLEMENTATION_VERSION = '2.0.0';
|
|
8
8
|
const SCHEMA_DESCRIPTORS = {
|
|
9
9
|
input: { valueKind: 'json-value' },
|
|
10
10
|
output: { valueKind: 'string' },
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './node-cli-composition.js';
|
|
2
|
+
export * from './node-cli-evaluation-resolver.js';
|
|
3
|
+
export * from './node-sample-content-resolver.js';
|
|
4
|
+
export * from './safe-http-content-resolver.js';
|
|
5
|
+
export * from './runtime-registry.js';
|
|
6
|
+
export * from './judge-provider-identity.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './node-cli-composition.js';
|
|
2
|
+
export * from './node-cli-evaluation-resolver.js';
|
|
3
|
+
export * from './node-sample-content-resolver.js';
|
|
4
|
+
export * from './safe-http-content-resolver.js';
|
|
5
|
+
export * from './runtime-registry.js';
|
|
6
|
+
export * from './judge-provider-identity.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type
|
|
1
|
+
import type { EvaluationRuntimeProvider } from '../../eval-runtime/provider.js';
|
|
2
|
+
import { type CoreSchemaValidator } from '../../eval-core/contracts/index.js';
|
|
3
|
+
import type { CliEvaluationCompileResult } from '../../eval-workflows/input-compilation/index.js';
|
|
4
|
+
import type { OmkRuntimePreflightDeclaration } from '../runtime-adapter/types.js';
|
|
3
5
|
import type { ClassifiedEnvironmentEntry } from '../runtime-adapter/adapters/shared/classified-environment.js';
|
|
4
|
-
import { createNodeEvaluationRuntimeSupportPorts
|
|
6
|
+
import { createNodeEvaluationRuntimeSupportPorts } from './runtime-registry.js';
|
|
5
7
|
export interface NodeCliProductionComposition {
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly leaseRoot: string;
|
|
10
|
-
};
|
|
8
|
+
readonly runtime: EvaluationRuntimeProvider;
|
|
9
|
+
readonly schemaValidators: ReadonlyMap<string, CoreSchemaValidator>;
|
|
10
|
+
readonly contentResolver: ReturnType<typeof createNodeEvaluationRuntimeSupportPorts>['contentResolver'];
|
|
11
11
|
}
|
|
12
12
|
export interface CreateNodeCliProductionCompositionInput {
|
|
13
13
|
readonly compiled: CliEvaluationCompileResult;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createOmkRuntimeProvider, createOmkEvaluationSchemaValidators } from '../runtime-adapter/composition.js';
|
|
1
2
|
import { access, readFile, realpath } from 'node:fs/promises';
|
|
2
3
|
import { constants } from 'node:fs';
|
|
3
4
|
import { delimiter, isAbsolute, join } from 'node:path';
|
|
@@ -6,7 +7,13 @@ import { checkDependencies } from '../../executors/preflight/dependencies.js';
|
|
|
6
7
|
import { createExecutor } from '../../executors/index.js';
|
|
7
8
|
import { resolveExecutorRuntimeFingerprint } from '../../executors/core/runtime-fingerprint.js';
|
|
8
9
|
import { OmkUserFacingPreflightFailure } from '../runtime-adapter/preflight.js';
|
|
9
|
-
import { createAnthropicApiCoreSchemaValidators,
|
|
10
|
+
import { createAnthropicApiCoreSchemaValidators, } from '../runtime-adapter/adapters/anthropic/protocol.js';
|
|
11
|
+
import { createClaudeCliCoreSchemaValidators, } from '../runtime-adapter/adapters/claude/cli-protocol.js';
|
|
12
|
+
import { createClaudeSdkCoreSchemaValidators, } from '../runtime-adapter/adapters/claude/sdk-protocol.js';
|
|
13
|
+
import { createCodexCliCoreSchemaValidators, } from '../runtime-adapter/adapters/codex/cli-protocol.js';
|
|
14
|
+
import { createCodexSdkCoreSchemaValidators, } from '../runtime-adapter/adapters/codex/sdk-protocol.js';
|
|
15
|
+
import { createCustomCommandCoreSchemaValidators, customCommandExecutorCapabilities, } from '../runtime-adapter/adapters/custom/command.js';
|
|
16
|
+
import { createOpenAIApiCoreSchemaValidators, } from '../runtime-adapter/adapters/openai/protocol.js';
|
|
10
17
|
import { createJudgeProviderRuntimeIdentity } from './judge-provider-identity.js';
|
|
11
18
|
import { createNodeEvaluationRuntimeSupportPorts, createProductionRuntimeFactoryRegistry, } from './runtime-registry.js';
|
|
12
19
|
const CREDENTIAL_ENVIRONMENT = new Set([
|
|
@@ -165,7 +172,7 @@ function dependencyDoctor(compiled, environment, projectRoot) {
|
|
|
165
172
|
return;
|
|
166
173
|
const { runDoctor } = await import('../../knowledge-artifacts/doctor/index.js');
|
|
167
174
|
const { renderDoctorReportText } = await import('../../knowledge-artifacts/doctor/renderer.js');
|
|
168
|
-
const { tEvalWorkflowMessage } = await import('
|
|
175
|
+
const { tEvalWorkflowMessage } = await import('../../eval-workflows/messages.js');
|
|
169
176
|
const language = compiled.presentation.language;
|
|
170
177
|
const report = await runDoctor({
|
|
171
178
|
artifacts,
|
|
@@ -452,14 +459,16 @@ export async function createNodeCliProductionComposition(input) {
|
|
|
452
459
|
...baseSupport,
|
|
453
460
|
schemaValidators: productionSchemaValidators(),
|
|
454
461
|
});
|
|
462
|
+
const factories = createProductionRuntimeFactoryRegistry({
|
|
463
|
+
executorsByImplementationId: new Map(configurations),
|
|
464
|
+
resolveJudgeInvocation: judgeResolver(environment),
|
|
465
|
+
});
|
|
455
466
|
return Object.freeze({
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
}),
|
|
460
|
-
support,
|
|
461
|
-
resources: Object.freeze({
|
|
462
|
-
leaseRoot: input.resourceLeaseRoot,
|
|
467
|
+
runtime: createOmkRuntimeProvider({
|
|
468
|
+
compiled: input.compiled, factories, support,
|
|
469
|
+
resources: { leaseRoot: input.resourceLeaseRoot },
|
|
463
470
|
}),
|
|
471
|
+
schemaValidators: createOmkEvaluationSchemaValidators(support.schemaValidators),
|
|
472
|
+
contentResolver: support.contentResolver,
|
|
464
473
|
});
|
|
465
474
|
}
|
package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-evaluation-resolver.d.ts
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type CliEvaluationRequest, type ResolvedCliEvaluationInput } from '
|
|
2
|
-
import { type SampleContentResolverSession } from '
|
|
1
|
+
import { type CliEvaluationRequest, type ResolvedCliEvaluationInput } from '../../eval-workflows/input-compilation/index.js';
|
|
2
|
+
import { type SampleContentResolverSession } from '../../eval-workflows/production-host/sample-content-resolution.js';
|
|
3
3
|
export interface ResolveNodeCliEvaluationRequestOptions {
|
|
4
4
|
/** Absolute semantic root for relative CLI/eval.yaml locators. */
|
|
5
5
|
readonly projectRoot: string;
|
package/dist/{eval-workflows/production-host → eval-hosts/node}/node-cli-evaluation-resolver.js
RENAMED
|
@@ -2,15 +2,15 @@ import { createHash } from 'node:crypto';
|
|
|
2
2
|
import { chmod, lstat, mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { extname, isAbsolute, join, resolve } from 'node:path';
|
|
4
4
|
import { canonicalizeJson, deepFreezeCanonicalJson, JsonValueSchema, } from '../../eval-core/contracts/index.js';
|
|
5
|
-
import { loadSamples } from '
|
|
6
|
-
import { resolveArtifacts } from '
|
|
5
|
+
import { loadSamples } from '../../eval-workflows/inputs/load-samples.js';
|
|
6
|
+
import { resolveArtifacts } from '../../eval-workflows/inputs/skill-loader.js';
|
|
7
7
|
import { MOCK_INTERCEPTION_PLAN_MEDIA_TYPE } from '../../eval-runtime/mock-interception.js';
|
|
8
|
-
import { RESOLVED_CLI_EVALUATION_INPUT_SCHEMA_VERSION, RESOLVED_HOST_RESOURCES_SCHEMA_VERSION, CliEvaluationInputError, } from '
|
|
8
|
+
import { RESOLVED_CLI_EVALUATION_INPUT_SCHEMA_VERSION, RESOLVED_HOST_RESOURCES_SCHEMA_VERSION, CliEvaluationInputError, } from '../../eval-workflows/input-compilation/index.js';
|
|
9
9
|
import { digestNodeFileResource, digestNodeTreeResource, } from '../runtime-adapter/resource-leases/node.js';
|
|
10
|
-
import { BOOTSTRAP_FAMILY_ANALYSIS_V2_IMPLEMENTATION_ID, } from '
|
|
11
|
-
import { buildProductionMeasurementDesign } from '
|
|
10
|
+
import { BOOTSTRAP_FAMILY_ANALYSIS_V2_IMPLEMENTATION_ID, } from '../../eval-workflows/measurement/analysis/bootstrap-family-node-v2.js';
|
|
11
|
+
import { buildProductionMeasurementDesign } from '../../eval-workflows/production-host/measurement-design.js';
|
|
12
12
|
import { createNodeSampleContentResolver } from './node-sample-content-resolver.js';
|
|
13
|
-
import { SampleContentResolutionError, hasResolvableSampleUrls, resolveSampleContents, } from '
|
|
13
|
+
import { SampleContentResolutionError, hasResolvableSampleUrls, resolveSampleContents, } from '../../eval-workflows/production-host/sample-content-resolution.js';
|
|
14
14
|
function fail(input) {
|
|
15
15
|
throw new CliEvaluationInputError(input);
|
|
16
16
|
}
|
package/dist/{eval-workflows/production-host → eval-hosts/node}/node-sample-content-resolver.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SampleContentResolution, type SampleContentResolverSession } from '
|
|
1
|
+
import { type SampleContentResolution, type SampleContentResolverSession } from '../../eval-workflows/production-host/sample-content-resolution.js';
|
|
2
2
|
interface SampleContentMcpFetchTool {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly urlParam?: string;
|
package/dist/{eval-workflows/production-host → eval-hosts/node}/node-sample-content-resolver.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
2
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
3
|
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
4
|
-
import { SampleContentResolutionError, safeUrlLabel, } from '
|
|
4
|
+
import { SampleContentResolutionError, safeUrlLabel, } from '../../eval-workflows/production-host/sample-content-resolution.js';
|
|
5
5
|
import { resolveSafeHttpSampleContent } from './safe-http-content-resolver.js';
|
|
6
6
|
const MCP_TIMEOUT_MS = 30_000;
|
|
7
7
|
function isRecord(value) {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { EvaluationEngineClock } from '../../eval-core/engine/index.js';
|
|
2
|
-
import { type AnthropicApiCoreConfiguration
|
|
2
|
+
import { type AnthropicApiCoreConfiguration } from '../runtime-adapter/adapters/anthropic/api.js';
|
|
3
|
+
import { type ClaudeCliCoreConfiguration } from '../runtime-adapter/adapters/claude/cli.js';
|
|
4
|
+
import { type ClaudeSdkCoreConfiguration } from '../runtime-adapter/adapters/claude/sdk.js';
|
|
5
|
+
import { type CodexCliCoreConfiguration } from '../runtime-adapter/adapters/codex/cli.js';
|
|
6
|
+
import { type CodexSdkCoreConfiguration } from '../runtime-adapter/adapters/codex/sdk.js';
|
|
7
|
+
import { type CustomCommandConfiguration, type CustomCommandRuntimeDescription } from '../runtime-adapter/adapters/custom/command.js';
|
|
8
|
+
import { type OpenAIApiCoreConfiguration } from '../runtime-adapter/adapters/openai/api.js';
|
|
3
9
|
import type { OmkEvaluationRuntimeSupportPorts } from '../runtime-adapter/composition.js';
|
|
4
|
-
import { type OmkLlmJudgeInvocationResolver } from '../runtime-adapter/evaluators/llm-
|
|
10
|
+
import { type OmkLlmJudgeInvocationResolver } from '../runtime-adapter/evaluators/llm-assertion-factory.js';
|
|
5
11
|
import type { OmkRuntimeBindingFactories, OmkRuntimePreflightDeclaration } from '../runtime-adapter/types.js';
|
|
6
12
|
type ProductionExecutorPreflightConfiguration = {
|
|
7
13
|
/** Physical checks are host-owned and captured without executing them. */
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { LLM_ASSERTION_EVALUATOR_IMPLEMENTATION_ID } from '../../eval-workflows/measurement/evaluators/llm-assertions.js';
|
|
1
2
|
import { isAbsolute } from 'node:path';
|
|
2
3
|
import { createNodeEvaluationClock } from '../../eval-runtime/clock.js';
|
|
3
4
|
import { deepFreezeCanonicalJson, } from '../../eval-core/contracts/index.js';
|
|
4
|
-
import { createNodeCoreContentStore } from '
|
|
5
|
-
import { createAnthropicApiExecutorAdapter,
|
|
5
|
+
import { createNodeCoreContentStore } from '../../eval-workflows/artifact-store/node-content-store.js';
|
|
6
|
+
import { createAnthropicApiExecutorAdapter, } from '../runtime-adapter/adapters/anthropic/api.js';
|
|
7
|
+
import { createClaudeCliExecutorAdapter, } from '../runtime-adapter/adapters/claude/cli.js';
|
|
8
|
+
import { createClaudeSdkExecutorAdapter, } from '../runtime-adapter/adapters/claude/sdk.js';
|
|
9
|
+
import { createCodexCliExecutorAdapter, } from '../runtime-adapter/adapters/codex/cli.js';
|
|
10
|
+
import { createCodexSdkExecutorAdapter, } from '../runtime-adapter/adapters/codex/sdk.js';
|
|
11
|
+
import { createCustomCommandExecutorAdapter, } from '../runtime-adapter/adapters/custom/command.js';
|
|
12
|
+
import { createOpenAIApiExecutorAdapter, } from '../runtime-adapter/adapters/openai/api.js';
|
|
6
13
|
import { captureCoreApiTransport } from '../runtime-adapter/adapters/shared/api-http.js';
|
|
7
|
-
import { createLlmAssertionEvaluatorBindingFactory,
|
|
14
|
+
import { createLlmAssertionEvaluatorBindingFactory, } from '../runtime-adapter/evaluators/llm-assertion-factory.js';
|
|
8
15
|
import { createRubricJudgeEvaluatorBindingFactory, RUBRIC_JUDGE_EVALUATOR_IMPLEMENTATION_ID, } from '../runtime-adapter/evaluators/rubric-judge.js';
|
|
9
16
|
export class ProductionRuntimeRegistryError extends TypeError {
|
|
10
17
|
code;
|
package/dist/{eval-workflows/production-host → eval-hosts/node}/safe-http-content-resolver.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SampleContentResolution } from '
|
|
1
|
+
import type { SampleContentResolution } from '../../eval-workflows/production-host/sample-content-resolution.js';
|
|
2
2
|
export declare function isPublicNetworkAddress(address: string, family: 4 | 6): boolean;
|
|
3
3
|
/** Fetches public text while pinning validated DNS results across each request hop. */
|
|
4
4
|
export declare function resolveSafeHttpSampleContent(urlString: string): Promise<SampleContentResolution>;
|
|
@@ -5,7 +5,7 @@ import { captureClassifiedEnvironment, mergeOutputClassification, } from '../sha
|
|
|
5
5
|
import { ApiResponseBodyError, ApiResponseLimitError, captureCoreApiTransport, discardApiResponse, normalizeCoreApiEndpoint, readBoundedJsonResponse, requiredApiHeaderValue, } from '../shared/api-http.js';
|
|
6
6
|
import { ANTHROPIC_API_CORE_ADAPTER_IMPLEMENTATION_VERSION, anthropicApiExecutorCapabilities, parseAnthropicApiMessage, } from './protocol.js';
|
|
7
7
|
import { captureStatelessApiRunState, captureStatelessApiTarget, openStatelessApiTrial, } from '../shared/stateless-api-resources.js';
|
|
8
|
-
import { createSameProcessExecutorAdapter } from '
|
|
8
|
+
import { createSameProcessExecutorAdapter } from '../../../../eval-runtime/adapters/same-process.js';
|
|
9
9
|
export { ANTHROPIC_API_CORE_ADAPTER_IMPLEMENTATION_VERSION, createAnthropicApiCoreSchemaValidators, } from './protocol.js';
|
|
10
10
|
export const DEFAULT_ANTHROPIC_API_ENDPOINT = 'https://api.anthropic.com/v1/messages';
|
|
11
11
|
export const DEFAULT_ANTHROPIC_API_MAX_REQUEST_BYTES = 2 * 1024 * 1024;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UsageRecordSchema, } from '../../../../eval-core/contracts/index.js';
|
|
2
2
|
import { ExecutionPortFailure } from '../../../../eval-core/execution/index.js';
|
|
3
3
|
import { createStatelessApiCoreSchemaValidators, statelessApiExecutorCapabilities, } from '../shared/api-protocol-core.js';
|
|
4
|
-
import { SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION } from '
|
|
4
|
+
import { SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION } from '../../../../eval-runtime/traces/source-neutral.js';
|
|
5
5
|
export const ANTHROPIC_API_CORE_ADAPTER_IMPLEMENTATION_VERSION = '1.1.0';
|
|
6
6
|
export const ANTHROPIC_API_PROTOCOL_PROFILE = Object.freeze({
|
|
7
7
|
providerId: 'anthropic-api',
|
package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/cli-protocol.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CoreSchemaValidator, type ExecutorCapabilities, type JsonValue, type UsageRecord } from '../../../../eval-core/contracts/index.js';
|
|
2
2
|
import type { ClaudeMessage } from '../../../../executors/anthropic/claude/protocol.js';
|
|
3
|
-
export declare const CLAUDE_CLI_CORE_ADAPTER_IMPLEMENTATION_VERSION: "
|
|
3
|
+
export declare const CLAUDE_CLI_CORE_ADAPTER_IMPLEMENTATION_VERSION: "2.0.0";
|
|
4
4
|
export interface ParsedClaudeCliStream {
|
|
5
5
|
readonly messages: readonly ClaudeMessage[];
|
|
6
6
|
readonly output?: string;
|
|
@@ -2,8 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { EXECUTOR_CAPABILITIES_SCHEMA_VERSION, ExecutorCapabilitiesSchema, JsonValueSchema, UsageRecordSchema, deepFreezeCanonicalJson, digestCanonicalJson, } from '../../../../eval-core/contracts/index.js';
|
|
3
3
|
import { ExecutionPortFailure } from '../../../../eval-core/execution/index.js';
|
|
4
4
|
import { extractClaudeTrace, isClaudeResultMessage, } from '../../../../executors/anthropic/claude/trace.js';
|
|
5
|
-
import { SOURCE_NEUTRAL_TRACE_SCHEMA_DESCRIPTOR, SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION, SourceNeutralTraceSchema, } from '
|
|
6
|
-
export const CLAUDE_CLI_CORE_ADAPTER_IMPLEMENTATION_VERSION = '
|
|
5
|
+
import { SOURCE_NEUTRAL_TRACE_SCHEMA_DESCRIPTOR, SOURCE_NEUTRAL_TRACE_SCHEMA_VERSION, SourceNeutralTraceSchema, } from '../../../../eval-runtime/traces/source-neutral.js';
|
|
6
|
+
export const CLAUDE_CLI_CORE_ADAPTER_IMPLEMENTATION_VERSION = '2.0.0';
|
|
7
7
|
const CLAUDE_SCHEMA_DESCRIPTORS = {
|
|
8
8
|
input: { valueKind: 'json-value' },
|
|
9
9
|
output: { valueKind: 'string' },
|
|
@@ -9,8 +9,8 @@ import { captureClassifiedEnvironment, mergeOutputClassification, } from '../sha
|
|
|
9
9
|
import { assertIdentityFilesUnchanged, captureIdentityFiles, } from '../shared/content-identity.js';
|
|
10
10
|
import { CLAUDE_CLI_CORE_ADAPTER_IMPLEMENTATION_VERSION, claudeCliExecutorCapabilities, parseClaudeCliStream, } from './cli-protocol.js';
|
|
11
11
|
import { captureClaudeCliRunState, captureClaudeCliTarget, disposeClaudeCliMockHandle, disposeClaudeCliTrial, openClaudeCliTrial, } from './resources.js';
|
|
12
|
-
import { createSameProcessExecutorAdapter } from '
|
|
13
|
-
import { attachSourceNeutralMockStats } from '
|
|
12
|
+
import { createSameProcessExecutorAdapter } from '../../../../eval-runtime/adapters/same-process.js';
|
|
13
|
+
import { attachSourceNeutralMockStats } from '../../../../eval-runtime/traces/source-neutral.js';
|
|
14
14
|
export { CLAUDE_CLI_CORE_ADAPTER_IMPLEMENTATION_VERSION, createClaudeCliCoreSchemaValidators, } from './cli-protocol.js';
|
|
15
15
|
export const DEFAULT_CLAUDE_CLI_MAX_OUTPUT_BYTES = 10 * 1024 * 1024;
|
|
16
16
|
export const DEFAULT_CLAUDE_CLI_MAX_INPUT_BYTES = 2 * 1024 * 1024;
|
|
@@ -585,7 +585,7 @@ export async function createClaudeCliExecutorAdapter(input) {
|
|
|
585
585
|
}
|
|
586
586
|
runState.acquireTrial();
|
|
587
587
|
try {
|
|
588
|
-
return openClaudeCliTrial(trial, runState, configuration.maxInputBytes);
|
|
588
|
+
return await openClaudeCliTrial(trial, runState, configuration.maxInputBytes);
|
|
589
589
|
}
|
|
590
590
|
catch (error) {
|
|
591
591
|
await runState.releaseTrial();
|
|
@@ -596,8 +596,8 @@ export async function createClaudeCliExecutorAdapter(input) {
|
|
|
596
596
|
await assertIdentityUnchanged(files, attempt.signal);
|
|
597
597
|
return executeAttempt(configuration, target, runState, trialState, attempt);
|
|
598
598
|
},
|
|
599
|
-
disposeTrial({ runState }) {
|
|
600
|
-
return disposeClaudeCliTrial(runState);
|
|
599
|
+
disposeTrial({ runState, trialState }) {
|
|
600
|
+
return disposeClaudeCliTrial(runState, trialState);
|
|
601
601
|
},
|
|
602
602
|
disposeRun({ runState }) {
|
|
603
603
|
return runState.requestDispose();
|
|
@@ -85,6 +85,7 @@ export interface ClaudeCliRunState {
|
|
|
85
85
|
requestDispose(): Promise<void>;
|
|
86
86
|
}
|
|
87
87
|
export interface ClaudeCliTrialState {
|
|
88
|
+
closeWorkspace(): Promise<void>;
|
|
88
89
|
readonly prompt: string;
|
|
89
90
|
readonly workingDirectory: string;
|
|
90
91
|
readonly allowedTools?: readonly string[];
|
|
@@ -118,7 +119,7 @@ export declare const CLAUDE_SDK_RESOURCE_PROFILE: Readonly<{
|
|
|
118
119
|
}>;
|
|
119
120
|
export declare function captureClaudeCliTarget(targetInput: EvaluationDefinition['targets'][number], bindingInput: RuntimeBindingOf<'executor'>, profile?: ClaudeResourceProjectionProfile): CapturedClaudeCliTarget;
|
|
120
121
|
export declare function captureClaudeCliRunState(lease: OmkBindingResourceLease, target: CapturedClaudeCliTarget, maxInputBytes: number, profile?: ClaudeResourceProjectionProfile): Promise<ClaudeCliRunState>;
|
|
121
|
-
export declare function openClaudeCliTrial(trial: Readonly<ExecutorTrialContext>, runState: ClaudeCliRunState, maxInputBytes: number, profile?: ClaudeResourceProjectionProfile): ClaudeCliTrialState
|
|
122
|
-
export declare function disposeClaudeCliTrial(runState: ClaudeCliRunState, profile?: ClaudeResourceProjectionProfile): Promise<void>;
|
|
122
|
+
export declare function openClaudeCliTrial(trial: Readonly<ExecutorTrialContext>, runState: ClaudeCliRunState, maxInputBytes: number, profile?: ClaudeResourceProjectionProfile): Promise<ClaudeCliTrialState>;
|
|
123
|
+
export declare function disposeClaudeCliTrial(runState: ClaudeCliRunState, trialState: ClaudeCliTrialState, profile?: ClaudeResourceProjectionProfile): Promise<void>;
|
|
123
124
|
export declare function disposeClaudeCliMockHandle(handle: CliMockHandle, profile?: ClaudeResourceProjectionProfile): Promise<void>;
|
|
124
125
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { openNodeTrialWorkspace } from '../shared/trial-workspace.js';
|
|
1
2
|
import { lstat, mkdtemp, readFile, rm } from 'node:fs/promises';
|
|
2
3
|
import { tmpdir } from 'node:os';
|
|
3
4
|
import { join, relative } from 'node:path';
|
|
@@ -576,7 +577,7 @@ export async function captureClaudeCliRunState(lease, target, maxInputBytes, pro
|
|
|
576
577
|
|| workspace.leaseMode !== 'copy-on-write-overlay'
|
|
577
578
|
|| !sameDescriptor(workspace, workspaceDescriptor))
|
|
578
579
|
fail(profile, 'WORKSPACE_INVALID', 'workspace lease does not match the sealed Target.');
|
|
579
|
-
workspaceDirectoriesByResourceId.set(workspaceDescriptor.resourceId, workspace.
|
|
580
|
+
workspaceDirectoriesByResourceId.set(workspaceDescriptor.resourceId, workspace.baseSnapshotPath);
|
|
580
581
|
}
|
|
581
582
|
privateWorkingDirectory = await mkdtemp(join(tmpdir(), 'omk-claude-run-'));
|
|
582
583
|
let systemPromptBytes = 0;
|
|
@@ -649,13 +650,13 @@ export async function captureClaudeCliRunState(lease, target, maxInputBytes, pro
|
|
|
649
650
|
fail(profile, 'RUN_MATERIALIZATION_FAILED', 'run state could not be materialized.');
|
|
650
651
|
}
|
|
651
652
|
}
|
|
652
|
-
export function openClaudeCliTrial(trial, runState, maxInputBytes, profile = CLAUDE_CLI_RESOURCE_PROFILE) {
|
|
653
|
+
export async function openClaudeCliTrial(trial, runState, maxInputBytes, profile = CLAUDE_CLI_RESOURCE_PROFILE) {
|
|
653
654
|
if (canonicalizeJson(trial.executionControl) !== canonicalizeJson(resolveEffectiveExecutionControl(runState.executionControls, trial.sampleId))) {
|
|
654
655
|
fail(profile, 'EXECUTION_CONTROL_MISMATCH', 'Trial control differs from the sealed Target.');
|
|
655
656
|
}
|
|
656
657
|
const workspace = trial.executionControl.workspace;
|
|
657
|
-
const
|
|
658
|
-
?
|
|
658
|
+
const baseSnapshotPath = workspace.workspaceMode === 'not-required'
|
|
659
|
+
? undefined
|
|
659
660
|
: runState.workspaceDirectoriesByResourceId.get(workspace.descriptor.resourceId)
|
|
660
661
|
?? fail(profile, 'WORKSPACE_INVALID', 'Trial workspace is absent from the sealed lease.');
|
|
661
662
|
const toolControl = trial.executionControl.tools;
|
|
@@ -691,18 +692,29 @@ export function openClaudeCliTrial(trial, runState, maxInputBytes, profile = CLA
|
|
|
691
692
|
if (Buffer.byteLength(prompt) + runState.systemPromptBytes > maxInputBytes) {
|
|
692
693
|
fail(profile, 'INPUT_LIMIT_EXCEEDED', 'prompt exceeds the adapter input limit.');
|
|
693
694
|
}
|
|
695
|
+
const trialWorkspace = await openNodeTrialWorkspace({
|
|
696
|
+
parentRoot: runState.privateWorkingDirectory,
|
|
697
|
+
...(baseSnapshotPath === undefined ? {} : { baseSnapshotPath }),
|
|
698
|
+
signal: trial.signal,
|
|
699
|
+
});
|
|
694
700
|
return Object.freeze({
|
|
695
701
|
prompt,
|
|
696
|
-
workingDirectory,
|
|
702
|
+
workingDirectory: trialWorkspace.workingDirectory,
|
|
703
|
+
closeWorkspace: trialWorkspace.close,
|
|
697
704
|
...(allowedTools === undefined ? {} : { allowedTools: Object.freeze(allowedTools) }),
|
|
698
705
|
...(mockControls === undefined ? {} : { mocks: mockControls.mocks }),
|
|
699
706
|
mocksStrict: mockControls?.strict ?? false,
|
|
700
707
|
classification: higherClassification(runState.classification, mockControls?.classification ?? 'public'),
|
|
701
708
|
});
|
|
702
709
|
}
|
|
703
|
-
export async function disposeClaudeCliTrial(runState, profile = CLAUDE_CLI_RESOURCE_PROFILE) {
|
|
710
|
+
export async function disposeClaudeCliTrial(runState, trialState, profile = CLAUDE_CLI_RESOURCE_PROFILE) {
|
|
704
711
|
try {
|
|
705
|
-
|
|
712
|
+
try {
|
|
713
|
+
await trialState.closeWorkspace();
|
|
714
|
+
}
|
|
715
|
+
finally {
|
|
716
|
+
await runState.releaseTrial();
|
|
717
|
+
}
|
|
706
718
|
}
|
|
707
719
|
catch {
|
|
708
720
|
fail(profile, 'TRIAL_DISPOSE_FAILED', 'trial state could not be released.');
|
package/dist/{eval-workflows → eval-hosts}/runtime-adapter/adapters/claude/sdk-protocol.d.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CoreSchemaValidator, type ExecutorCapabilities } from '../../../../eval-core/contracts/index.js';
|
|
2
2
|
import { type ParsedClaudeCliStream } from './cli-protocol.js';
|
|
3
|
-
export declare const CLAUDE_SDK_CORE_ADAPTER_IMPLEMENTATION_VERSION: "
|
|
3
|
+
export declare const CLAUDE_SDK_CORE_ADAPTER_IMPLEMENTATION_VERSION: "2.0.0";
|
|
4
4
|
export type ParsedClaudeSdkStream = ParsedClaudeCliStream;
|
|
5
5
|
export declare function createClaudeSdkCoreSchemaValidators(): readonly CoreSchemaValidator[];
|
|
6
6
|
export declare function claudeSdkExecutorCapabilities(): ExecutorCapabilities;
|