Expand description
test-mcp’s SCRIPT MODE: a BREP_mcp/tests/scripts/*.js program played
through code mode, the way an agent drives the app through run.
A program is a script body whose first statement const meta = {…}
carries the JSON format’s session keys (name, note, document, seed, size,
ppp, fixtures, plm, timeout_ms) and which drives the app with
await sdk.<namespace>.<action>(args), checks with the test assertion
library and returns test.run(…)’s report. The runner puts PRELUDE in
front of it, which makes every action call one STEP: each step is reported
back through sdk.runner.step_record as it ends, so the per-step
artefacts (NNNN-<action>.json, images,
result.json) are those of the JSON runner and survive a killed worker.
The runner group exists only while a program runs: the step record, the
PLM fixture’s plm_request / plm_server, ${plm:NAME} / ${out}
substitution, bind, and session_restart (whose own session group is
not script-callable).
Structs§
- Program
- A converted script: its session description and its program.
Constants§
- PRELUDE
- The step recorder and assertion library put in front of every program.
- RUNNER_
GROUP - The group of the tools the runner serves a program.
- RUNNER_
TOOL_ NAMES - The names of
runner_tools, in its order (the generated SDK mapping lists them: a headless registry does not hold them).
Functions§
- run
- Play
programthrough code mode onstate’s session.