python-yama 0.2.0__py3-none-any.whl → 0.4.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-yama
3
- Version: 0.2.0
3
+ Version: 0.4.0
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
@@ -45,6 +45,8 @@ OPENAI_API_KEY=... uv run --project yama yama --plugin dingding-simple
45
45
  A Case is a YAML file organized as `context` (what the model sees) → `mocks` (how tool calls get executed) → `steps` (user turns sent in order, each with assertions) → `outcome` (the pass bar for the whole Case):
46
46
 
47
47
  ```yaml
48
+ description: The model reads the DSL before proposing creative directions
49
+
48
50
  context:
49
51
  system_prompt: { default: true } # use SYSTEM.md from the plugin root
50
52
 
@@ -71,8 +73,9 @@ outcome:
71
73
  hard_checks: all_pass
72
74
  ```
73
75
 
76
+ - `description` (optional) is a one-line summary of what the Case tests; it is shown in the CLI output and the HTML report.
74
77
  - `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.
75
- - 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?)`.
78
+ - 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?)`.
76
79
  - To simulate command-line tools, declare `{builtin: bash}` and configure per-command output under `mocks.cli`.
77
80
  - `steps[].assert.hard` are deterministic checks (nine types, including `tool_called`, `tool_arguments`, and `assistant_contains`); add `assert.judge` for LLM scoring.
78
81
 
@@ -90,10 +93,14 @@ uv run --project yama yama --plugin dingding-simple --report
90
93
  | `--plugin-root PATH` | Use the given path as the single plugin root |
91
94
  | `--plugin NAME` (repeatable) | Select plugins by name from `yama.toml` |
92
95
  | `--all-plugins` | Run every plugin configured in `yama.toml` |
96
+ | `-k, --filter PATTERN` (repeatable) | Only run cases whose case key (path relative to the plugin root) matches — a substring, or an fnmatch glob when the pattern contains `*` `?` `[`; with several patterns a case runs if any matches |
93
97
  | `--result-dir PATH` | Override the artifact root (default `<plugin_root>/.yama/runs`) |
98
+ | `--concurrency N` | Maximum number of cases running in parallel (default 10; `1` runs cases one at a time) |
94
99
  | `--report [PATH]` | Also generate a single-file HTML report (default `.yama/reports/latest.html`) |
95
100
  | `--list` | Only print the collected Cases, without running them |
96
101
  | `--no-artifacts` | Write no artifact files at all |
97
102
  | `--json` | Emit machine-readable JSON instead of Rich tables |
98
103
 
99
104
  `--plugin`, `--all-plugins`, and `--plugin-root` are mutually exclusive. When none of them is given, yama walks up from the current directory to the nearest directory containing `yama.toml` and uses it as the workspace root (falling back to the cwd), running it as a single plugin root.
105
+
106
+ Cases run in parallel, up to 10 at a time by default (`--concurrency` changes the cap); runs within one case stay sequential, and results keep collection order regardless of completion order. While several cases run concurrently, a transient dashboard at the bottom of the terminal shows one row per case, updated in place — waiting, then a spinner with the run/step currently executing, then its ✓/✗ verdict — and each case's full run/step detail is printed above the dashboard as one block the moment it finishes, so blocks of different cases never interleave. With `--concurrency 1` (or a single collected case) it streams instead — a spinner marks the step currently executing (on a terminal), and each case, run, and assertion result is printed the moment it completes. Either way a per-case summary table closes the output, and with `--json` the progress stream goes to stderr so stdout stays valid JSON.
@@ -0,0 +1,27 @@
1
+ yama/__init__.py,sha256=UYhoZTSu1HiMT54LOZCdvLKMQ_L0qec8RT8jDfde_cY,1156
2
+ yama/__main__.py,sha256=k1ocEWawweo1qCJWNFAAvyxz3tcY13dzvCenHszij30,48
3
+ yama/assertions.py,sha256=_PXx-yCTbTqVI-upyPFVxDu3EQC1aSoGtTP3A10q47k,21968
4
+ yama/cli.py,sha256=rTccf7nXKnxvY2Wc311zEgyN5GHAG7ZEBCM3DSqm7kU,24952
5
+ yama/llm.py,sha256=F_9HoFvLisKhTc8kREVvdqf3XN3JHE-Zy-1mW7O8DbQ,14627
6
+ yama/mocks.py,sha256=YyiU6Y7NgttxHYJBsqGPILKYlTsM4IMTIilMNRkUuzs,14973
7
+ yama/models.py,sha256=0BMCWku5zWDOESrFUibiJShlfEhOAGlVKaNxfPB-9OM,4020
8
+ yama/report.py,sha256=vYvqt6I0NXCgp1Cbr-FnHNDAc8oJc_4mrLfZ7DTybU8,40172
9
+ yama/runner.py,sha256=Sp8DbIrFPQtLyNbeauJjcX29AD_yS1-BdRpObMNApvI,25542
10
+ yama/workspace.py,sha256=4GAe36Uj1-gjROMPwrQfTIg1TkzEIk9-gHEuezjbY_I,4614
11
+ yama/loaders/__init__.py,sha256=DIwfa8QlIlKt6NpFMZJ_OcqbJPPrmKLBzd9_e-BCuBs,174
12
+ yama/loaders/case.py,sha256=5uUpXm1t9EOmee2BZe7vDGXCrc4CSgcFGApSkuFe5tc,13954
13
+ yama/loaders/common.py,sha256=Fg71_vcnu5339QI_itvYPvRbk9LtBgEnzoA3t4Krb4U,754
14
+ yama/loaders/tool_loader.py,sha256=AaJwrFEjmfdUhKqXIlfl_jyvaKQ4ZoPPOpT8Wg5xuNU,12574
15
+ yama/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ yama/tools/base.py,sha256=ONFuGzTSWVsA0k4-UUREncqAHmyQI2uHpVOU2Dh_XiQ,446
17
+ yama/tools/bash/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ yama/tools/bash/_cli_shim.py,sha256=f3Rom5UipW0dA0KRYavqIa9HJDKT336ssDZGWeVmkvo,2494
19
+ yama/tools/bash/bash.py,sha256=4GlFvmqTUS4k6DgJ5Io91YF5fB6wF6e3e7p2P-pmbEQ,10358
20
+ yama/tools/bash/fs.py,sha256=GChDwGe_Sgn73btZJDNp5nOwlVDhLfZyaMVqWSQwfOw,21859
21
+ yama/tools/skill/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
+ yama/tools/skill/skill.py,sha256=H2KdIBLkYhecYX7M2xbn79csDpDvougpRcAmlrwigEM,2235
23
+ python_yama-0.4.0.dist-info/METADATA,sha256=ankApENSDGGbFE4OkxO9g1713UyGD4a3Y8WBZVi2JRs,6083
24
+ python_yama-0.4.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
25
+ python_yama-0.4.0.dist-info/entry_points.txt,sha256=N5se3y1FflUcDU3TmUrH2Tu9dzsrBBo7sUP-Gu_2cVs,39
26
+ python_yama-0.4.0.dist-info/licenses/LICENSE,sha256=cMAJJAs7R1lemJPPc7qMNv4w_sqn5QncFf4aXKYyEc4,1067
27
+ python_yama-0.4.0.dist-info/RECORD,,
yama/assertions.py CHANGED
@@ -574,4 +574,8 @@ async def run_judge(
574
574
  passed = False
575
575
  judged["overall"] = weighted / total_weight
576
576
  judged["passed"] = passed
577
+ if response.usage is not None:
578
+ # Judge calls bypass the runner's per-request records, so their
579
+ # token usage rides on the judge result to reach run aggregation.
580
+ judged["usage"] = deepcopy(response.usage)
577
581
  return judged