python-yama 0.10.0__tar.gz → 0.10.1__tar.gz

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 (79) hide show
  1. {python_yama-0.10.0 → python_yama-0.10.1}/.gitignore +3 -0
  2. {python_yama-0.10.0 → python_yama-0.10.1}/PKG-INFO +13 -7
  3. {python_yama-0.10.0 → python_yama-0.10.1}/README.md +11 -6
  4. {python_yama-0.10.0 → python_yama-0.10.1}/README.zh-CN.md +11 -6
  5. {python_yama-0.10.0 → python_yama-0.10.1}/docs/agent-skill-test-framework-design.md +181 -73
  6. {python_yama-0.10.0 → python_yama-0.10.1}/docs/case-schema-reference.md +106 -30
  7. python_yama-0.10.1/docs/superpowers/plans/2026-08-07-judge-model-resolution.md +382 -0
  8. python_yama-0.10.1/docs/superpowers/plans/2026-08-07-local-judge-default-model-retry.md +348 -0
  9. python_yama-0.10.1/docs/superpowers/plans/2026-08-07-openai-timeout-retry-reporting.md +881 -0
  10. python_yama-0.10.1/docs/superpowers/specs/2026-08-04-judge-model-object-design.md +131 -0
  11. python_yama-0.10.1/docs/superpowers/specs/2026-08-04-openai-adapter-safety-design.md +108 -0
  12. python_yama-0.10.1/docs/superpowers/specs/2026-08-07-judge-model-resolution-design.md +143 -0
  13. python_yama-0.10.1/docs/superpowers/specs/2026-08-07-local-judge-default-model-retry-design.md +124 -0
  14. python_yama-0.10.1/docs/superpowers/specs/2026-08-07-openai-timeout-retry-reporting-design.md +260 -0
  15. {python_yama-0.10.0 → python_yama-0.10.1}/docs/yama-intro.html +1 -1
  16. {python_yama-0.10.0 → python_yama-0.10.1}/pyproject.toml +1 -0
  17. {python_yama-0.10.0 → python_yama-0.10.1}/skills/eval-plugin-with-yama/SKILL.md +17 -7
  18. {python_yama-0.10.0 → python_yama-0.10.1}/skills/eval-plugin-with-yama/references/case-schema.md +49 -10
  19. {python_yama-0.10.0 → python_yama-0.10.1}/skills/eval-plugin-with-yama/references/debugging.md +36 -3
  20. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_assertions.py +395 -27
  21. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_cli.py +98 -11
  22. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_framework.py +124 -8
  23. python_yama-0.10.1/tests/test_judge_llm.py +1318 -0
  24. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_llm.py +24 -1
  25. python_yama-0.10.1/tests/test_openai_llm.py +612 -0
  26. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_preview.py +36 -0
  27. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_report.py +100 -1
  28. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_runner.py +131 -1
  29. python_yama-0.10.1/tests/test_skill_loader.py +401 -0
  30. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_skill_tool.py +57 -0
  31. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_tool_loader.py +12 -0
  32. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_workspace.py +17 -2
  33. {python_yama-0.10.0 → python_yama-0.10.1}/uv.lock +2 -0
  34. {python_yama-0.10.0 → python_yama-0.10.1}/yama/assertions.py +187 -28
  35. {python_yama-0.10.0 → python_yama-0.10.1}/yama/cli.py +27 -5
  36. python_yama-0.10.1/yama/judge_llm.py +552 -0
  37. {python_yama-0.10.0 → python_yama-0.10.1}/yama/llm.py +10 -0
  38. {python_yama-0.10.0 → python_yama-0.10.1}/yama/loaders/case.py +7 -52
  39. python_yama-0.10.1/yama/loaders/skill_loader.py +190 -0
  40. {python_yama-0.10.0 → python_yama-0.10.1}/yama/loaders/tool_loader.py +6 -0
  41. {python_yama-0.10.0 → python_yama-0.10.1}/yama/models.py +3 -0
  42. python_yama-0.10.1/yama/openai_llm.py +280 -0
  43. {python_yama-0.10.0 → python_yama-0.10.1}/yama/report.py +41 -9
  44. {python_yama-0.10.0 → python_yama-0.10.1}/yama/runner.py +9 -5
  45. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/skill/skill.py +12 -1
  46. {python_yama-0.10.0 → python_yama-0.10.1}/yama/workspace.py +1 -1
  47. {python_yama-0.10.0 → python_yama-0.10.1}/.github/workflows/publish.yml +0 -0
  48. {python_yama-0.10.0 → python_yama-0.10.1}/CLAUDE.md +0 -0
  49. {python_yama-0.10.0 → python_yama-0.10.1}/LICENSE +0 -0
  50. {python_yama-0.10.0 → python_yama-0.10.1}/skills/eval-plugin-with-yama/references/install-upgrade.md +0 -0
  51. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_cli_shim.py +0 -0
  52. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_dashboard.py +0 -0
  53. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_main_entrypoint.py +0 -0
  54. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_mocks.py +0 -0
  55. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_pr.py +0 -0
  56. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_public_api.py +0 -0
  57. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_report_bundle.py +0 -0
  58. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_report_upload.py +0 -0
  59. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_run_plan.py +0 -0
  60. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_thread_case.py +0 -0
  61. {python_yama-0.10.0 → python_yama-0.10.1}/tests/test_usage.py +0 -0
  62. {python_yama-0.10.0 → python_yama-0.10.1}/yama/__init__.py +0 -0
  63. {python_yama-0.10.0 → python_yama-0.10.1}/yama/__main__.py +0 -0
  64. {python_yama-0.10.0 → python_yama-0.10.1}/yama/dashboard.py +0 -0
  65. {python_yama-0.10.0 → python_yama-0.10.1}/yama/loaders/__init__.py +0 -0
  66. {python_yama-0.10.0 → python_yama-0.10.1}/yama/loaders/common.py +0 -0
  67. {python_yama-0.10.0 → python_yama-0.10.1}/yama/mocks.py +0 -0
  68. {python_yama-0.10.0 → python_yama-0.10.1}/yama/pr.py +0 -0
  69. {python_yama-0.10.0 → python_yama-0.10.1}/yama/preview.py +0 -0
  70. {python_yama-0.10.0 → python_yama-0.10.1}/yama/report_bundle.py +0 -0
  71. {python_yama-0.10.0 → python_yama-0.10.1}/yama/report_upload.py +0 -0
  72. {python_yama-0.10.0 → python_yama-0.10.1}/yama/thread_case.py +0 -0
  73. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/__init__.py +0 -0
  74. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/base.py +0 -0
  75. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/bash/__init__.py +0 -0
  76. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/bash/_cli_shim.py +0 -0
  77. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/bash/bash.py +0 -0
  78. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/bash/fs.py +0 -0
  79. {python_yama-0.10.0 → python_yama-0.10.1}/yama/tools/skill/__init__.py +0 -0
@@ -49,3 +49,6 @@ Thumbs.db
49
49
  # Claude Code local state (settings.json itself is shared/committed)
50
50
  .claude/settings.local.json
51
51
  .claude/worktrees/
52
+
53
+ # Local isolated worktrees used by agentic development workflows
54
+ .worktrees/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-yama
3
- Version: 0.10.0
3
+ Version: 0.10.1
4
4
  Summary: A reproducible evaluation runner for tool-using Agent skills
5
5
  Project-URL: Repository, https://github.com/world-sim-dev/yama
6
6
  Project-URL: Issues, https://github.com/world-sim-dev/yama/issues
@@ -18,6 +18,7 @@ Requires-Python: >=3.12
18
18
  Requires-Dist: fastapi>=0.139.0
19
19
  Requires-Dist: jinja2>=3.1
20
20
  Requires-Dist: litellm<2.0,>=1.80
21
+ Requires-Dist: openai<3.0,>=2.0
21
22
  Requires-Dist: orjson>=3.11.9
22
23
  Requires-Dist: python-dotenv>=1.0
23
24
  Requires-Dist: pyyaml>=6.0
@@ -28,20 +29,24 @@ Description-Content-Type: text/markdown
28
29
 
29
30
  English | [简体中文](https://github.com/world-sim-dev/yama/blob/main/README.zh-CN.md)
30
31
 
31
- `yama` is a reproducible evaluation framework for tool-using Agent Skills: a declarative YAML Case describes what the model sees — the system prompt, Skill metadata, tool schemas, and multi-turn user messages — then yama calls the LLM through LiteLLM, drives the tool loop, and scores the transcript with deterministic hard checks or an LLM judge. See the [design doc](https://github.com/world-sim-dev/yama/blob/main/docs/agent-skill-test-framework-design.md) (Chinese) for the full Case schema and execution contract.
32
+ `yama` is a reproducible evaluation framework for tool-using Agent Skills: a declarative YAML Case describes what the model sees — the system prompt, Skill metadata, tool schemas, and multi-turn user messages — then yama calls an OpenAI-compatible chat completions endpoint, drives the tool loop, and scores the transcript with deterministic hard checks or an LLM judge. See the [design doc](https://github.com/world-sim-dev/yama/blob/main/docs/agent-skill-test-framework-design.md) (Chinese) for the full Case schema and execution contract.
32
33
 
33
34
  ## Quick start
34
35
 
35
36
  ```bash
36
37
  # Run from a plugin root; collects __evals__/cases/**/*.yaml by default
37
38
  cd dingding-simple
38
- OPENAI_API_KEY=... uv run --project yama yama
39
+ YAMA_LLM_API_KEY=... uv run --project yama yama
39
40
 
40
41
  # Or, from a workspace root (a directory with yama.toml), pick a plugin by name
41
- OPENAI_API_KEY=... uv run --project yama yama --plugin dingding-simple
42
+ YAMA_LLM_API_KEY=... uv run --project yama yama --plugin dingding-simple
42
43
  ```
43
44
 
44
- Instead of prefixing every command, you can put credentials in a `.env` file: on startup the CLI loads the nearest `.env` found from the working directory upward (variables already set in the environment are not overridden).
45
+ Instead of prefixing every command, you can put credentials in a `.env` file: on startup the CLI loads the nearest `.env` found from the working directory upward (variables already set in the environment are not overridden). The default endpoint can be overridden with `YAMA_LLM_BASE_URL`.
46
+
47
+ ### Judge routing
48
+
49
+ Evaluated Agent calls always use the configured OpenAI-compatible API. In an ordinary non-CI run, an LLM Judge instead prefers a local agent selected from its resolved `judge.model.name`: OpenAI/GPT/o-family names use Codex, and Claude/Anthropic names use Claude Code; all other names use the API. Any local failure (including a missing command) emits one sanitized warning on stderr so `--json` stdout remains valid JSON and retries the API with the original, complete model object. CI and `pr-run` are API-only. Local agents receive the model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings.
45
50
 
46
51
  ## Writing a Case
47
52
 
@@ -78,6 +83,7 @@ outcome:
78
83
  - `description` (optional) is a one-line summary of what the Case tests; it is shown in the CLI output and the HTML report.
79
84
  - `context.tools` is the tool schema sent to the model; `mocks.tools` is how the runner responds when a tool call arrives. The two sets of tool names must match exactly.
80
85
  - To use a Skill, declare it by name under `context.skills` and also declare `{builtin: skill}` under `context.tools`; the model reads the Skill body via `skill(name, file?, call_reason?)`.
86
+ - Skills resolve from `<plugin-root>/skills/<name>/SKILL.md` first. If that local Skill is absent, Yama uses the sibling `.common-skills/<name>/versions/...` tree only when `<plugin-root>/config.json` explicitly declares the name in `skill_refs`; an undeclared missing Skill is a collection error.
81
87
  - To simulate command-line tools, declare `{builtin: bash}` and configure per-command output under `mocks.cli`.
82
88
  - `steps[].assert.hard` are deterministic checks (nine types, including `tool_called`, `tool_arguments`, and `assistant_contains`); untagged hard checks must all pass by default. Add `assert.judge` for LLM scoring.
83
89
 
@@ -119,10 +125,10 @@ uv run --project yama yama dashboard --plugin dingding-simple
119
125
 
120
126
  ```bash
121
127
  uv run --project yama yama pr-plan --base origin/main --json
122
- OPENAI_API_KEY=... uv run --project yama yama pr-run --base origin/main --report --json-summary yama-pr-summary.json
128
+ YAMA_LLM_API_KEY=... uv run --project yama yama pr-run --base origin/main --report --json-summary yama-pr-summary.json
123
129
  ```
124
130
 
125
- `yama pr-plan` selects PR-scoped eval cases without model calls. `yama pr-run` executes the same selection and writes a JSON summary for external CI jobs to render or upload; credentials stay in environment variables or `.env`, not CLI flags. `pr-run` always forces builtin bash execution to the Linux `linux-bubblewrap` sandbox, regardless of Case backend settings, so the runner must be Linux with `bwrap`/`bubblewrap` installed. See the [CI integration guide](https://github.com/world-sim-dev/yama/blob/main/docs/pr-evals-ci-integration.zh-CN.md) for workflow examples and the summary JSON contract.
131
+ `yama pr-plan` selects PR-scoped eval cases without model calls. `yama pr-run` executes the same selection and writes a JSON summary for external CI jobs to render or upload; both evaluated-Agent and Judge calls are API-only, and credentials stay in environment variables or `.env`, not CLI flags. `pr-run` always forces builtin bash execution to the Linux `linux-bubblewrap` sandbox, regardless of Case backend settings, so the runner must be Linux with `bwrap`/`bubblewrap` installed. See the [CI integration guide](https://github.com/world-sim-dev/yama/blob/main/docs/pr-evals-ci-integration.zh-CN.md) for workflow examples and the summary JSON contract.
126
132
 
127
133
  For CI environments that publish reports to the Yama Eval Report service, add
128
134
  `--upload-report --commit-id <sha>` together with `--report`. The command reads
@@ -2,20 +2,24 @@
2
2
 
3
3
  English | [简体中文](https://github.com/world-sim-dev/yama/blob/main/README.zh-CN.md)
4
4
 
5
- `yama` is a reproducible evaluation framework for tool-using Agent Skills: a declarative YAML Case describes what the model sees — the system prompt, Skill metadata, tool schemas, and multi-turn user messages — then yama calls the LLM through LiteLLM, drives the tool loop, and scores the transcript with deterministic hard checks or an LLM judge. See the [design doc](https://github.com/world-sim-dev/yama/blob/main/docs/agent-skill-test-framework-design.md) (Chinese) for the full Case schema and execution contract.
5
+ `yama` is a reproducible evaluation framework for tool-using Agent Skills: a declarative YAML Case describes what the model sees — the system prompt, Skill metadata, tool schemas, and multi-turn user messages — then yama calls an OpenAI-compatible chat completions endpoint, drives the tool loop, and scores the transcript with deterministic hard checks or an LLM judge. See the [design doc](https://github.com/world-sim-dev/yama/blob/main/docs/agent-skill-test-framework-design.md) (Chinese) for the full Case schema and execution contract.
6
6
 
7
7
  ## Quick start
8
8
 
9
9
  ```bash
10
10
  # Run from a plugin root; collects __evals__/cases/**/*.yaml by default
11
11
  cd dingding-simple
12
- OPENAI_API_KEY=... uv run --project yama yama
12
+ YAMA_LLM_API_KEY=... uv run --project yama yama
13
13
 
14
14
  # Or, from a workspace root (a directory with yama.toml), pick a plugin by name
15
- OPENAI_API_KEY=... uv run --project yama yama --plugin dingding-simple
15
+ YAMA_LLM_API_KEY=... uv run --project yama yama --plugin dingding-simple
16
16
  ```
17
17
 
18
- Instead of prefixing every command, you can put credentials in a `.env` file: on startup the CLI loads the nearest `.env` found from the working directory upward (variables already set in the environment are not overridden).
18
+ Instead of prefixing every command, you can put credentials in a `.env` file: on startup the CLI loads the nearest `.env` found from the working directory upward (variables already set in the environment are not overridden). The default endpoint can be overridden with `YAMA_LLM_BASE_URL`.
19
+
20
+ ### Judge routing
21
+
22
+ Evaluated Agent calls always use the configured OpenAI-compatible API. In an ordinary non-CI run, an LLM Judge instead prefers a local agent selected from its resolved `judge.model.name`: OpenAI/GPT/o-family names use Codex, and Claude/Anthropic names use Claude Code; all other names use the API. Any local failure (including a missing command) emits one sanitized warning on stderr so `--json` stdout remains valid JSON and retries the API with the original, complete model object. CI and `pr-run` are API-only. Local agents receive the model name and a compatible `reasoning_effort`, but never temperature, credentials, or endpoint settings.
19
23
 
20
24
  ## Writing a Case
21
25
 
@@ -52,6 +56,7 @@ outcome:
52
56
  - `description` (optional) is a one-line summary of what the Case tests; it is shown in the CLI output and the HTML report.
53
57
  - `context.tools` is the tool schema sent to the model; `mocks.tools` is how the runner responds when a tool call arrives. The two sets of tool names must match exactly.
54
58
  - To use a Skill, declare it by name under `context.skills` and also declare `{builtin: skill}` under `context.tools`; the model reads the Skill body via `skill(name, file?, call_reason?)`.
59
+ - Skills resolve from `<plugin-root>/skills/<name>/SKILL.md` first. If that local Skill is absent, Yama uses the sibling `.common-skills/<name>/versions/...` tree only when `<plugin-root>/config.json` explicitly declares the name in `skill_refs`; an undeclared missing Skill is a collection error.
55
60
  - To simulate command-line tools, declare `{builtin: bash}` and configure per-command output under `mocks.cli`.
56
61
  - `steps[].assert.hard` are deterministic checks (nine types, including `tool_called`, `tool_arguments`, and `assistant_contains`); untagged hard checks must all pass by default. Add `assert.judge` for LLM scoring.
57
62
 
@@ -93,10 +98,10 @@ uv run --project yama yama dashboard --plugin dingding-simple
93
98
 
94
99
  ```bash
95
100
  uv run --project yama yama pr-plan --base origin/main --json
96
- OPENAI_API_KEY=... uv run --project yama yama pr-run --base origin/main --report --json-summary yama-pr-summary.json
101
+ YAMA_LLM_API_KEY=... uv run --project yama yama pr-run --base origin/main --report --json-summary yama-pr-summary.json
97
102
  ```
98
103
 
99
- `yama pr-plan` selects PR-scoped eval cases without model calls. `yama pr-run` executes the same selection and writes a JSON summary for external CI jobs to render or upload; credentials stay in environment variables or `.env`, not CLI flags. `pr-run` always forces builtin bash execution to the Linux `linux-bubblewrap` sandbox, regardless of Case backend settings, so the runner must be Linux with `bwrap`/`bubblewrap` installed. See the [CI integration guide](https://github.com/world-sim-dev/yama/blob/main/docs/pr-evals-ci-integration.zh-CN.md) for workflow examples and the summary JSON contract.
104
+ `yama pr-plan` selects PR-scoped eval cases without model calls. `yama pr-run` executes the same selection and writes a JSON summary for external CI jobs to render or upload; both evaluated-Agent and Judge calls are API-only, and credentials stay in environment variables or `.env`, not CLI flags. `pr-run` always forces builtin bash execution to the Linux `linux-bubblewrap` sandbox, regardless of Case backend settings, so the runner must be Linux with `bwrap`/`bubblewrap` installed. See the [CI integration guide](https://github.com/world-sim-dev/yama/blob/main/docs/pr-evals-ci-integration.zh-CN.md) for workflow examples and the summary JSON contract.
100
105
 
101
106
  For CI environments that publish reports to the Yama Eval Report service, add
102
107
  `--upload-report --commit-id <sha>` together with `--report`. The command reads
@@ -2,20 +2,24 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- `yama` 是一个可复现的 Agent Skill 评测框架:用声明式 YAML Case 描述模型看到的 System Prompt、Skill metadata、Tool Schema 与多轮 User Message,通过 LiteLLM 统一调用 LLM 并驱动 Tool Loop,再对 Transcript 做确定性 Hard Check 或 LLM Judge 评分。完整 Case Schema 与执行契约见[设计文档](docs/agent-skill-test-framework-design.md)。
5
+ `yama` 是一个可复现的 Agent Skill 评测框架:用声明式 YAML Case 描述模型看到的 System Prompt、Skill metadata、Tool Schema 与多轮 User Message,通过 OpenAI-compatible chat completions endpoint 调用 LLM 并驱动 Tool Loop,再对 Transcript 做确定性 Hard Check 或 LLM Judge 评分。完整 Case Schema 与执行契约见[设计文档](docs/agent-skill-test-framework-design.md)。
6
6
 
7
7
  ## 快速开始
8
8
 
9
9
  ```bash
10
10
  # 在 Plugin 根目录下直接运行,默认收集 __evals__/cases/**/*.yaml
11
11
  cd dingding-simple
12
- OPENAI_API_KEY=... uv run --project yama yama
12
+ YAMA_LLM_API_KEY=... uv run --project yama yama
13
13
 
14
14
  # 在 Workspace 根目录(存在 yama.toml)按名字指定 Plugin
15
- OPENAI_API_KEY=... uv run --project yama yama --plugin dingding-simple
15
+ YAMA_LLM_API_KEY=... uv run --project yama yama --plugin dingding-simple
16
16
  ```
17
17
 
18
- 也可以把凭据写进 `.env` 文件,省去每次命令前缀:CLI 启动时会从当前目录向上查找并加载最近的 `.env`(已在环境中设置的变量不会被覆盖)。
18
+ 也可以把凭据写进 `.env` 文件,省去每次命令前缀:CLI 启动时会从当前目录向上查找并加载最近的 `.env`(已在环境中设置的变量不会被覆盖)。默认 endpoint 可用 `YAMA_LLM_BASE_URL` 覆盖。
19
+
20
+ ### Judge 路由
21
+
22
+ 被评测 Agent 的调用始终使用配置好的 OpenAI-compatible API。普通非 CI 运行中,LLM Judge 会按解析后的 `judge.model.name` 优先选择本地 Agent:OpenAI/GPT/o 系列使用 Codex,Claude/Anthropic 系列使用 Claude Code,其他模型仍走 API。任何本地失败(包括找不到命令)都会在 stderr 输出一行脱敏警告,再携带原始、完整的 model 对象重试 API,因此 `--json` 的 stdout 始终保持合法 JSON。CI 和 `pr-run` 均只走 API。本地 Agent 只接收模型名和兼容的 `reasoning_effort`,不会接收 temperature、凭据或 endpoint 设置。
19
23
 
20
24
  ## 编写一个 Case
21
25
 
@@ -52,6 +56,7 @@ outcome:
52
56
  - `description`(可选)是一句话说明当前 Case 测试什么;会展示在 CLI 输出和 HTML 报告中。
53
57
  - `context.tools` 是发给模型的 Tool Schema,`mocks.tools` 是 Runner 收到 Tool Call 后如何返回结果;两者的 Tool 名字集合必须完全一致。
54
58
  - 需要 Skill 时在 `context.skills` 中按名字声明,并在 `context.tools` 中同时声明 `{builtin: skill}`;模型通过 `skill(name, file?, call_reason?)` 读取正文。
59
+ - Skill 优先解析 `<plugin-root>/skills/<name>/SKILL.md`。本地不存在时,只有 `<plugin-root>/config.json` 的 `skill_refs` 显式声明了该名字,Yama 才会从同级 `.common-skills/<name>/versions/...` 加载;缺失且未声明会在 collection 阶段报错。
55
60
  - 需要模拟命令行工具时声明 `{builtin: bash}`,在 `mocks.cli` 中按命令配置输出。
56
61
  - `steps[].assert.hard` 是确定性检查(`tool_called`、`tool_arguments`、`assistant_contains` 等九种类型);未打 tag 的 hard check 默认必须全部通过。还可以加 `assert.judge` 做 LLM 打分。
57
62
 
@@ -93,10 +98,10 @@ uv run --project yama yama dashboard --plugin dingding-simple
93
98
 
94
99
  ```bash
95
100
  uv run --project yama yama pr-plan --base origin/main --json
96
- OPENAI_API_KEY=... uv run --project yama yama pr-run --base origin/main --report --json-summary yama-pr-summary.json
101
+ YAMA_LLM_API_KEY=... uv run --project yama yama pr-run --base origin/main --report --json-summary yama-pr-summary.json
97
102
  ```
98
103
 
99
- `yama pr-plan` 只计算 PR 范围内要跑的 eval,不发起模型调用。`yama pr-run` 执行同一套选择逻辑,并写出供外部 CI 渲染或上传的 JSON summary;凭据继续通过环境变量或 `.env` 提供,不增加 CLI 参数。`pr-run` 会忽略 Case 里的 backend 设置,固定把内置 bash 执行强制为 Linux `linux-bubblewrap` 沙箱,因此 runner 必须是 Linux 且安装 `bwrap`/`bubblewrap`。CI workflow 示例和 summary JSON 契约见 [CI 接入指南](docs/pr-evals-ci-integration.zh-CN.md)。
104
+ `yama pr-plan` 只计算 PR 范围内要跑的 eval,不发起模型调用。`yama pr-run` 执行同一套选择逻辑,并写出供外部 CI 渲染或上传的 JSON summary;被评测 Agent 和 Judge 的调用都只走 API,凭据继续通过环境变量或 `.env` 提供,不增加 CLI 参数。`pr-run` 会忽略 Case 里的 backend 设置,固定把内置 bash 执行强制为 Linux `linux-bubblewrap` 沙箱,因此 runner 必须是 Linux 且安装 `bwrap`/`bubblewrap`。CI workflow 示例和 summary JSON 契约见 [CI 接入指南](docs/pr-evals-ci-integration.zh-CN.md)。
100
105
 
101
106
  CI 需要把报告发布到 Yama Eval Report 服务时,在 `--report` 之外加
102
107
  `--upload-report --commit-id <sha>`。命令从环境变量读取 `ADMIN_HOST` 和